Replace all emptiness checks == ItemStack.Empty
with .isEmpty()
(#1247)
Fixes #1157 and probably a few other things.
This commit is contained in:
parent
df808760ad
commit
a016a6dd49
24 changed files with 41 additions and 39 deletions
|
@ -54,7 +54,7 @@ public class ItemBlockAdjustableSU extends ItemBlock {
|
|||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(ItemStack stack, World world, List list, ITooltipFlag flag) {
|
||||
if (stack != ItemStack.EMPTY && stack.hasTagCompound()) {
|
||||
if (!stack.isEmpty() && stack.hasTagCompound()) {
|
||||
if (stack.getTagCompound().getCompoundTag("tileEntity") != null)
|
||||
list.add(PowerSystem
|
||||
.getLocaliszedPower(stack.getTagCompound().getCompoundTag("tileEntity").getInteger("energy")));
|
||||
|
@ -72,7 +72,7 @@ public class ItemBlockAdjustableSU extends ItemBlock {
|
|||
// world.getBlockState(pos).getBlock().onPostBlockPlaced(world, x,
|
||||
// y, z, metadata);
|
||||
}
|
||||
if (stack != ItemStack.EMPTY && stack.hasTagCompound()) {
|
||||
if (!stack.isEmpty() && stack.hasTagCompound()) {
|
||||
((TileAdjustableSU) world.getTileEntity(pos))
|
||||
.readFromNBTWithoutCoords(stack.getTagCompound().getCompoundTag("tileEntity"));
|
||||
}
|
||||
|
|
|
@ -49,7 +49,7 @@ public class ItemBlockDigitalChest extends ItemBlock {
|
|||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(ItemStack stack, World world, List list, ITooltipFlag flag) {
|
||||
if (stack != ItemStack.EMPTY && stack.hasTagCompound()) {
|
||||
if (!stack.isEmpty() && stack.hasTagCompound()) {
|
||||
if (stack.getTagCompound().getCompoundTag("tileEntity") != null)
|
||||
list.add(stack.getTagCompound().getCompoundTag("tileEntity").getInteger("storedQuantity") + " items");
|
||||
}
|
||||
|
@ -66,7 +66,7 @@ public class ItemBlockDigitalChest extends ItemBlock {
|
|||
// world.getBlockState(pos).getBlock().onPostBlockPlaced(world, x,
|
||||
// y, z, metadata);
|
||||
}
|
||||
if (stack != ItemStack.EMPTY && stack.hasTagCompound()) {
|
||||
if (!stack.isEmpty() && stack.hasTagCompound()) {
|
||||
((TileDigitalChest) world.getTileEntity(pos))
|
||||
.readFromNBTWithoutCoords(stack.getTagCompound().getCompoundTag("tileEntity"));
|
||||
}
|
||||
|
|
|
@ -49,7 +49,7 @@ public class ItemBlockQuantumChest extends ItemBlock {
|
|||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(ItemStack stack, World world, List list, ITooltipFlag flag) {
|
||||
if (stack != ItemStack.EMPTY && stack.hasTagCompound()) {
|
||||
if (!stack.isEmpty() && stack.hasTagCompound()) {
|
||||
if (stack.getTagCompound().getCompoundTag("tileEntity") != null)
|
||||
list.add(stack.getTagCompound().getCompoundTag("tileEntity").getInteger("storedQuantity") + " items");
|
||||
}
|
||||
|
@ -66,7 +66,7 @@ public class ItemBlockQuantumChest extends ItemBlock {
|
|||
// world.getBlockState(pos).getBlock().onPostBlockPlaced(world, x,
|
||||
// y, z, metadata);
|
||||
}
|
||||
if (stack != ItemStack.EMPTY && stack.hasTagCompound()) {
|
||||
if (!stack.isEmpty() && stack.hasTagCompound()) {
|
||||
((TileQuantumChest) world.getTileEntity(pos))
|
||||
.readFromNBTWithoutCoords(stack.getTagCompound().getCompoundTag("tileEntity"));
|
||||
}
|
||||
|
|
|
@ -51,7 +51,7 @@ public class ItemBlockQuantumTank extends ItemBlock {
|
|||
// world.getBlockState(pos).getBlock().onPostBlockPlaced(world, x,
|
||||
// y, z, metadata);
|
||||
}
|
||||
if (stack != ItemStack.EMPTY && stack.hasTagCompound()) {
|
||||
if (!stack.isEmpty() && stack.hasTagCompound()) {
|
||||
((TileQuantumTank) world.getTileEntity(pos))
|
||||
.readFromNBTWithoutCoords(stack.getTagCompound().getCompoundTag("tileEntity"));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue