A few fixes

This commit is contained in:
cpw 2015-11-30 14:14:33 -05:00
parent 55e707cc07
commit ff42107b92
4 changed files with 11 additions and 8 deletions

View File

@ -9,18 +9,20 @@
private static final Map<ResourceLocation, Potion> field_180150_I = Maps.<ResourceLocation, Potion>newHashMap();
public static final Potion field_180151_b = null;
public static final Potion field_76424_c = (new Potion(1, new ResourceLocation("speed"), false, 8171462)).func_76390_b("potion.moveSpeed").func_76399_b(0, 0).func_111184_a(SharedMonsterAttributes.field_111263_d, "91AEAA56-376B-4498-935B-2F7F68070635", 0.20000000298023224D, 2);
@@ -64,8 +64,10 @@
@@ -64,10 +64,10 @@
private double field_76412_L;
private boolean field_76413_M;
+ @Deprecated // use the Constructor without potion ID or everything will explode.
protected Potion(int p_i45897_1_, ResourceLocation p_i45897_2_, boolean p_i45897_3_, int p_i45897_4_)
{
+ p_i45897_1_ = net.minecraftforge.fml.common.registry.GameRegistry.registerPotion(this, p_i45897_2_, p_i45897_1_);
this.field_76415_H = p_i45897_1_;
field_76425_a[p_i45897_1_] = this;
- this.field_76415_H = p_i45897_1_;
- field_76425_a[p_i45897_1_] = this;
+ net.minecraftforge.fml.common.registry.GameData.getPotionRegistry().func_177775_a(p_i45897_1_, p_i45897_2_, this);
field_180150_I.put(p_i45897_2_, this);
@@ -83,14 +85,18 @@
this.field_76418_K = p_i45897_3_;
@@ -83,14 +83,18 @@
this.field_76414_N = p_i45897_4_;
}
@ -41,7 +43,7 @@
}
protected Potion func_76399_b(int p_76399_1_, int p_76399_2_)
@@ -310,4 +316,27 @@
@@ -310,4 +314,27 @@
{
return p_111183_2_.func_111164_d() * (double)(p_111183_1_ + 1);
}

View File

@ -28,7 +28,7 @@ import net.minecraftforge.fml.common.registry.RegistryDelegate.Delegate;
public class FMLControlledNamespacedRegistry<I> extends RegistryNamespacedDefaultedByKey<ResourceLocation, I>
{
public static final boolean DEBUG = Boolean.parseBoolean(System.getProperty("fml.debugRegistryEntries", "true"));
public static final boolean DEBUG = Boolean.parseBoolean(System.getProperty("fml.debugRegistryEntries", "false"));
private final Class<I> superType;
private final boolean isDelegated;
private final Field delegateAccessor;

View File

@ -256,6 +256,7 @@ public class PersistentRegistryManager
if (!PersistentRegistry.FROZEN.isPopulated())
{
FMLLog.warning("Can't revert to frozen GameData state without freezing first.");
return;
}
else
{

View File

@ -63,7 +63,6 @@ public class ModelAnimationDebug
{
public void preInit(FMLPreInitializationEvent event)
{
B3DLoader.instance.addDomain(MODID);
GameRegistry.registerBlock(new Block(Material.wood)
{
{
@ -149,6 +148,7 @@ public class ModelAnimationDebug
public void preInit(FMLPreInitializationEvent event)
{
super.preInit(event);
B3DLoader.instance.addDomain(MODID);
ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(GameRegistry.findBlock(MODID, blockName)), 0, new ModelResourceLocation(MODID.toLowerCase() + ":" + blockName, "inventory"));
}