Really Remove all ItemStack == ItemStack and ComparisonHelper references.

This commit is contained in:
blue42u committed 2014-05-09 12:35:55 -05:00
1 parent 4399b4f26e
commit ca00652ad7
12 files changed
+23 -36

No files matched your search

@@ -1,6 +1,5 @@
package tconstruct.blocks;
import mantle.common.ComparisonHelper;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
@@ -91,4 +90,4 @@ public class CastingChannelBlock extends BlockContainer
return new CastingChannelLogic();
}
}
}
@@ -1,13 +1,13 @@
package tconstruct.blocks.traps;
import mantle.blocks.MantleBlock;
import mantle.common.ComparisonHelper;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.item.ItemStack;
import net.minecraft.item.Item;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.IIcon;
import net.minecraft.world.Explosion;
@@ -93,7 +93,7 @@ public class BarricadeBlock extends MantleBlock
public boolean onBlockActivated (World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9)
{
ItemStack stack = player.getCurrentEquippedItem();
if ((stack != null) && (ComparisonHelper.areEquivalent(stack.getItem(), this)) && (!player.isSneaking()))
if ((stack != null) && (stack.getItem() == Item.getItemFromBlock(this)) && (!player.isSneaking()))
{
int meta = world.getBlockMetadata(x, y, z);
if (meta % 4 != 3)
@@ -136,4 +136,4 @@ public class BarricadeBlock extends MantleBlock
{
return true;
}
}
}
@@ -10,6 +10,7 @@ import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.item.Item;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
import net.minecraft.util.DamageSource;
@@ -58,7 +59,7 @@ public class Punji extends MantleBlock
if (meta < 4)
{
ItemStack stack = player.getCurrentEquippedItem();
if (stack != null && stack == new ItemStack(TRepo.punji))
if (stack != null && stack.getItem() == Item.getItemFromBlock(TRepo.punji))
{
world.setBlockMetadataWithNotify(x, y, z, meta + 1, 3);
world.playSoundEffect((double) ((float) x + 0.5F), (double) ((float) y + 0.5F), (double) ((float) z + 0.5F), this.stepSound.soundName, (this.stepSound.getVolume() + 1.0F) / 2.0F,