Cleanup some null checks and remove deprecated methods in Item and Block (#3429)

This commit is contained in:
mezz authored and LexManos committed 2016-11-22 15:20:05 -08:00
1 parent 2823447b6e
commit 2bd8b95a3b
31 files changed
+175 -174

No files matched your search

@@ -158,7 +158,7 @@ public class ModelAnimationDebug
GameRegistry.register(new ItemBlock(Block.REGISTRY.getObject(blockId))
{
@Override
public ICapabilityProvider initCapabilities(ItemStack stack, NBTTagCompound nbt)
public ICapabilityProvider initCapabilities(ItemStack stack, @Nullable NBTTagCompound nbt)
{
return new ItemAnimationHolder();
}
@@ -166,11 +166,13 @@ public class ModelAnimationDebug
GameRegistry.registerTileEntity(Chest.class, MODID + ":" + "tile_" + blockName);
}
@Nullable
public abstract IAnimationStateMachine load(ResourceLocation location, ImmutableMap<String, ITimeValue> parameters);
}
public static class ServerProxy extends CommonProxy
{
@Nullable
public IAnimationStateMachine load(ResourceLocation location, ImmutableMap<String, ITimeValue> parameters)
{
return null;
@@ -267,6 +269,7 @@ public class ModelAnimationDebug
public static class Chest extends TileEntity
{
@Nullable
private final IAnimationStateMachine asm;
private final VariableValue cycleLength = new VariableValue(4);
private final VariableValue clickTime = new VariableValue(Float.NEGATIVE_INFINITY);