mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-22 13:09:53 +00:00
Really Remove all ItemStack == ItemStack and ComparisonHelper references.
This commit is contained in:
1 parent
4399b4f26e
commit
ca00652ad7
12 files changed
+23
-36
No files matched your search
@@ -1,6 +1,5 @@
|
||||
package tconstruct.util;
|
||||
|
||||
import mantle.common.ComparisonHelper;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
@@ -23,7 +22,7 @@ public class TCraftingHandler // implements ICraftingHandler
|
||||
Item item = event.crafting.getItem();
|
||||
if (!event.player.worldObj.isRemote)
|
||||
{
|
||||
if (ComparisonHelper.areEquivalent(item, TRepo.toolStationWood))
|
||||
if (item == Item.getItemFromBlock(TRepo.toolStationWood))
|
||||
{
|
||||
TPlayerStats stats = TPlayerStats.get(event.player);
|
||||
NBTTagCompound tags = event.player.getEntityData().getCompoundTag("TConstruct");
|
||||
@@ -34,7 +33,7 @@ public class TCraftingHandler // implements ICraftingHandler
|
||||
AbilityHelper.spawnItemAtPlayer(event.player, new ItemStack(TRepo.manualBook, 1, 1));
|
||||
}
|
||||
}
|
||||
if (ComparisonHelper.areEquivalent(item, TRepo.smeltery) || ComparisonHelper.areEquivalent(item, TRepo.lavaTank))
|
||||
if (item == Item.getItemFromBlock(TRepo.smeltery) || item == Item.getItemFromBlock(TRepo.lavaTank))
|
||||
{
|
||||
TPlayerStats stats = TPlayerStats.get(event.player);
|
||||
NBTTagCompound tags = event.player.getEntityData().getCompoundTag("TConstruct");
|
||||
@@ -47,7 +46,7 @@ public class TCraftingHandler // implements ICraftingHandler
|
||||
event.player.addStat(TAchievements.achievements.get("tconstruct:smelteryMaker"), 1);
|
||||
}
|
||||
|
||||
if (ComparisonHelper.areEquivalent(item, TRepo.craftingStationWood))
|
||||
if (item == Item.getItemFromBlock(TRepo.craftingStationWood))
|
||||
{
|
||||
event.player.addStat(TAchievements.achievements.get("tconstruct:betterCrafting"), 1);
|
||||
}
|
||||
|
||||
@@ -2,13 +2,13 @@ package tconstruct.util.landmine.behavior;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import mantle.common.ComparisonHelper;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.item.EntityTNTPrimed;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
/**
|
||||
@@ -23,7 +23,7 @@ public class BehaviorExplosive extends Behavior
|
||||
public void executeLogic (World par1World, int par2, int par3, int par4, ItemStack par5ItemStack, Entity triggerer, boolean willBlockBeRemoved)
|
||||
{
|
||||
float explodeStrenght = 0;
|
||||
if (ComparisonHelper.areEquivalent(par5ItemStack.getItem(), Blocks.tnt))
|
||||
if (par5ItemStack.getItem() == Item.getItemFromBlock(Blocks.tnt))
|
||||
{
|
||||
explodeStrenght = 4.0F * par5ItemStack.stackSize;
|
||||
}
|
||||
@@ -39,7 +39,7 @@ public class BehaviorExplosive extends Behavior
|
||||
public void getInformation (ItemStack par1ItemStack, List par2List)
|
||||
{
|
||||
String str = "UNDEFINED";
|
||||
if (ComparisonHelper.areEquivalent(par1ItemStack.getItem(), Blocks.tnt))
|
||||
if (par1ItemStack.getItem() == Item.getItemFromBlock(Blocks.tnt))
|
||||
{
|
||||
str = "medium";
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user