use isInstance instead of == (#847)

This commit is contained in:
Brennan Ward 2017-07-12 15:50:12 -04:00 committed by Ellpeck
parent 2252bb094e
commit 8d28135f3a

View file

@ -44,7 +44,7 @@ public class ItemChestToCrateUpgrade extends ItemBase{
ItemStack heldStack = player.getHeldItem(hand); ItemStack heldStack = player.getHeldItem(hand);
if(player.isSneaking()){ if(player.isSneaking()){
TileEntity tileHit = world.getTileEntity(pos); TileEntity tileHit = world.getTileEntity(pos);
if(tileHit != null && tileHit.getClass() == this.start){ if(tileHit != null && start.isInstance(tileHit)){
if(!world.isRemote){ if(!world.isRemote){
//Copy Slots //Copy Slots