Search in sources :

Example 6 with RegistryMaterials

use of net.minecraft.server.v1_12_R1.RegistryMaterials in project MyPet by xXKeyleXx.

the class EntityRegistry method restoreRegistryID.

protected void restoreRegistryID(RegistryMaterials registry, Object[] backup) {
    RegistryID a = (RegistryID) ReflectionUtil.getFieldValue(RegistryMaterials_a, registry);
    Object[] d = (Object[]) ReflectionUtil.getFieldValue(RegistryID_d, a);
    if (d != null) {
        for (int i = 0; i < backup.length; i++) {
            if (backup[i] != null) {
                d[i] = backup[i];
            }
        }
    }
}
Also used : RegistryID(net.minecraft.server.v1_12_R1.RegistryID)

Aggregations

RegistryID (net.minecraft.server.v1_12_R1.RegistryID)3 MyPetType (de.Keyle.MyPet.api.entity.MyPetType)2 RegistryMaterials (net.minecraft.server.v1_11_R1.RegistryMaterials)2 RegistryMaterials (net.minecraft.server.v1_12_R1.RegistryMaterials)2 RegistryID (net.minecraft.server.v1_11_R1.RegistryID)1