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

@@ -22,7 +22,6 @@ import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.EnumBlockRenderType;
import net.minecraft.util.EnumFacing;
@@ -49,6 +48,8 @@ import net.minecraftforge.fml.common.registry.GameRegistry;
import com.google.common.collect.ImmutableList;
import com.google.common.primitives.Ints;
import javax.annotation.Nullable;
@Mod(modid = ModelBakeEventDebug.MODID, name = "ForgeDebugModelBakeEvent", version = ModelBakeEventDebug.VERSION, acceptableRemoteVersions = "*")
public class ModelBakeEventDebug
{
@@ -253,7 +254,7 @@ public class ModelBakeEventDebug
}
@Override
public List<BakedQuad> getQuads(IBlockState state, EnumFacing side, long rand)
public List<BakedQuad> getQuads(@Nullable IBlockState state, @Nullable EnumFacing side, long rand)
{
if(side != null) return ImmutableList.of();
IExtendedBlockState exState = (IExtendedBlockState)state;
@@ -310,7 +311,7 @@ public class ModelBakeEventDebug
case WEST: return new Vec3d(-vec.yCoord, vec.xCoord, vec.zCoord);
case EAST: return new Vec3d( vec.yCoord, -vec.xCoord, vec.zCoord);
}
return null;
throw new IllegalArgumentException("Unknown Side " + side);
}
private static Vec3d revRotate(Vec3d vec, EnumFacing side)
@@ -324,6 +325,6 @@ public class ModelBakeEventDebug
case WEST: return new Vec3d( vec.yCoord, -vec.xCoord, vec.zCoord);
case EAST: return new Vec3d(-vec.yCoord, vec.xCoord, vec.zCoord);
}
return null;
throw new IllegalArgumentException("Unknown Side " + side);
}
}