mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-19 03:49:29 +00:00
get rid of moar errors
This commit is contained in:
1 parent
1bd860c52f
commit
7d8f58ea88
15 files changed
+109
-107
No files matched your search
@@ -662,7 +662,7 @@ public class GlassPaneConnected extends GlassBlockConnected
|
||||
this.setBlockBounds(f, 0.0F, f2, f1, 1.0F, f3);
|
||||
}
|
||||
|
||||
public Icon getSideTextureIndex ()
|
||||
public IIcon getSideTextureIndex ()
|
||||
{
|
||||
return this.theIcon;
|
||||
}
|
||||
|
||||
@@ -18,18 +18,20 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.network.INetworkManager;
|
||||
import net.minecraft.network.packet.Packet;
|
||||
import net.minecraft.network.Packet;
|
||||
import net.minecraft.network.packet.Packet132TileEntityData;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.fluids.FluidTankInfo;
|
||||
import net.minecraftforge.fluids.IFluidHandler;
|
||||
import net.minecraftforge.fluids.IFluidTank;
|
||||
|
||||
import org.apache.commons.lang3.ArrayUtils;
|
||||
|
||||
import tconstruct.common.TRepo;
|
||||
import tconstruct.inventory.SmelteryContainer;
|
||||
import mantle.blocks.abstracts.InventoryLogic;
|
||||
|
||||
@@ -5,7 +5,7 @@ import java.util.Random;
|
||||
import mantle.blocks.MantleBlock;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@@ -24,9 +24,9 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||
public class Punji extends MantleBlock
|
||||
{
|
||||
|
||||
public Punji(int id)
|
||||
public Punji()
|
||||
{
|
||||
super(id, Material.plants);
|
||||
super(Material.plants);
|
||||
this.setBlockBounds(0.125f, 0, 0.125f, 0.875f, 0.375f, 0.875f);
|
||||
this.setStepSound(Block.soundGrassFootstep);
|
||||
this.setCreativeTab(TConstructRegistry.blockTab);
|
||||
@@ -104,7 +104,7 @@ public class Punji extends MantleBlock
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons (IconRegister iconRegister)
|
||||
public void registerIcons (IIconRegister iconRegister)
|
||||
{
|
||||
this.blockIcon = iconRegister.registerIcon("tinker:punji");
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ import net.minecraft.client.renderer.RenderBlocks;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
|
||||
|
||||
@@ -849,7 +849,7 @@ public class BlockSkinRenderHelper
|
||||
return flag;
|
||||
}
|
||||
|
||||
public static boolean renderLiquidBlock (Icon stillIcon, Icon flowingIcon, int x, int y, int z, RenderBlocks renderer, IBlockAccess world)
|
||||
public static boolean renderLiquidBlock (IIcon stillIcon, IIcon flowingIcon, int x, int y, int z, RenderBlocks renderer, IBlockAccess world)
|
||||
{
|
||||
Block block = Block.stone;
|
||||
int var5 = block.colorMultiplier(world, x, y, z);
|
||||
@@ -871,7 +871,7 @@ public class BlockSkinRenderHelper
|
||||
stillIcon, flowingIcon, x, y, z, var6, var7, var8, renderer, world);
|
||||
}
|
||||
|
||||
static boolean renderFakeBlockWithAmbientOcclusion (Icon stillIcon, Icon flowingIcon, int xPos, int yPos, int zPos, float colorRed, float colorGreen, float colorBlue, RenderBlocks render,
|
||||
static boolean renderFakeBlockWithAmbientOcclusion (IIcon stillIcon, IIcon flowingIcon, int xPos, int yPos, int zPos, float colorRed, float colorGreen, float colorBlue, RenderBlocks render,
|
||||
IBlockAccess world)
|
||||
{
|
||||
Block block = Block.stone;
|
||||
@@ -1589,7 +1589,7 @@ public class BlockSkinRenderHelper
|
||||
return flag;
|
||||
}
|
||||
|
||||
static boolean renderFakeBlockWithColorMultiplier (Icon stillIcon, Icon flowingIcon, int xPos, int yPos, int zPos, float colorRed, float colorGreen, float colorBlue, RenderBlocks render,
|
||||
static boolean renderFakeBlockWithColorMultiplier (IIcon stillIcon, IIcon flowingIcon, int xPos, int yPos, int zPos, float colorRed, float colorGreen, float colorBlue, RenderBlocks render,
|
||||
IBlockAccess world)
|
||||
{
|
||||
Block block = Block.stone;
|
||||
|
||||
@@ -842,7 +842,7 @@ public class RenderLiquid
|
||||
return flag;
|
||||
}
|
||||
|
||||
public static boolean renderFakeBlock (Icon texture, int x, int y, int z, RenderBlocks renderer, IBlockAccess world)
|
||||
public static boolean renderFakeBlock (IIcon texture, int x, int y, int z, RenderBlocks renderer, IBlockAccess world)
|
||||
{
|
||||
Block block = Block.stone;
|
||||
int var5 = block.colorMultiplier(world, x, y, z);
|
||||
@@ -864,7 +864,7 @@ public class RenderLiquid
|
||||
var6, var7, var8, renderer, world);
|
||||
}
|
||||
|
||||
static boolean renderFakeBlockWithAmbientOcclusion (Icon texture, int xPos, int yPos, int zPos, float colorRed, float colorGreen, float colorBlue, RenderBlocks render, IBlockAccess world)
|
||||
static boolean renderFakeBlockWithAmbientOcclusion (IIcon texture, int xPos, int yPos, int zPos, float colorRed, float colorGreen, float colorBlue, RenderBlocks render, IBlockAccess world)
|
||||
{
|
||||
Block block = Block.stone;
|
||||
render.enableAO = true;
|
||||
|
||||
@@ -17,7 +17,7 @@ import net.minecraft.inventory.Container;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MathHelper;
|
||||
|
||||
import org.lwjgl.input.Keyboard;
|
||||
@@ -89,7 +89,7 @@ public abstract class NewContainerGui extends GuiScreen
|
||||
public void initGui ()
|
||||
{
|
||||
super.initGui();
|
||||
this.mc.thePlayer.openContainer = this.container;
|
||||
this.field_146297_k.thePlayer.openContainer = this.container;
|
||||
this.guiLeft = (this.width - this.xSize) / 2;
|
||||
this.guiTop = (this.height - this.ySize) / 2;
|
||||
}
|
||||
@@ -168,7 +168,7 @@ public abstract class NewContainerGui extends GuiScreen
|
||||
}*/
|
||||
|
||||
this.drawGuiContainerForegroundLayer(mouseX, mouseY);
|
||||
InventoryPlayer inventoryplayer = this.mc.thePlayer.inventory;
|
||||
InventoryPlayer inventoryplayer = this.field_146297_k.thePlayer.inventory;
|
||||
ItemStack itemstack = this.draggedStack == null ? inventoryplayer.getItemStack() : this.draggedStack;
|
||||
|
||||
if (itemstack != null)
|
||||
@@ -231,15 +231,15 @@ public abstract class NewContainerGui extends GuiScreen
|
||||
GL11.glTranslatef(0.0F, 0.0F, 32.0F);
|
||||
this.zLevel = 200.0F;
|
||||
itemRenderer.zLevel = 200.0F;
|
||||
itemRenderer.renderItemAndEffectIntoGUI(this.fontRenderer, this.mc.renderEngine, par1ItemStack, par2, par3);
|
||||
itemRenderer.renderItemOverlayIntoGUI(this.fontRenderer, this.mc.renderEngine, par1ItemStack, par2, par3 - (this.draggedStack == null ? 0 : 8), par4Str);
|
||||
itemRenderer.renderItemAndEffectIntoGUI(this.fontRenderer, this.field_146297_k.renderEngine, par1ItemStack, par2, par3);
|
||||
itemRenderer.renderItemOverlayIntoGUI(this.fontRenderer, this.field_146297_k.renderEngine, par1ItemStack, par2, par3 - (this.draggedStack == null ? 0 : 8), par4Str);
|
||||
this.zLevel = 0.0F;
|
||||
itemRenderer.zLevel = 0.0F;
|
||||
}
|
||||
|
||||
protected void drawItemStackTooltip (ItemStack par1ItemStack, int par2, int par3)
|
||||
{
|
||||
List list = par1ItemStack.getTooltip(this.mc.thePlayer, this.mc.gameSettings.advancedItemTooltips);
|
||||
List list = par1ItemStack.getTooltip(this.field_146297_k.thePlayer, this.field_146297_k.gameSettings.advancedItemTooltips);
|
||||
|
||||
for (int k = 0; k < list.size(); ++k)
|
||||
{
|
||||
@@ -365,7 +365,7 @@ public abstract class NewContainerGui extends GuiScreen
|
||||
ItemStack itemstack = par1Slot.getStack();
|
||||
boolean flag = false;
|
||||
boolean flag1 = par1Slot == this.clickedSlot && this.draggedStack != null && !this.isRightMouseClick;
|
||||
ItemStack itemstack1 = this.mc.thePlayer.inventory.getItemStack();
|
||||
ItemStack itemstack1 = this.field_146297_k.thePlayer.inventory.getItemStack();
|
||||
String s = null;
|
||||
|
||||
if (par1Slot == this.clickedSlot && this.draggedStack != null && this.isRightMouseClick && itemstack != null)
|
||||
@@ -410,12 +410,12 @@ public abstract class NewContainerGui extends GuiScreen
|
||||
|
||||
if (itemstack == null)
|
||||
{
|
||||
Icon icon = par1Slot.getBackgroundIconIndex();
|
||||
IIcon icon = par1Slot.getBackgroundIconIndex();
|
||||
|
||||
if (icon != null)
|
||||
{
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
this.mc.getTextureManager().bindTexture(TextureMap.locationItemsTexture);
|
||||
this.field_146297_k.getTextureManager().bindTexture(TextureMap.locationItemsTexture);
|
||||
this.drawTexturedModelRectFromIcon(i, j, icon, 16, 16);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
flag1 = true;
|
||||
@@ -430,8 +430,8 @@ public abstract class NewContainerGui extends GuiScreen
|
||||
}
|
||||
|
||||
GL11.glEnable(GL11.GL_DEPTH_TEST);
|
||||
itemRenderer.renderItemAndEffectIntoGUI(this.fontRenderer, this.mc.renderEngine, itemstack, i, j);
|
||||
itemRenderer.renderItemOverlayIntoGUI(this.fontRenderer, this.mc.renderEngine, itemstack, i, j, s);
|
||||
itemRenderer.renderItemAndEffectIntoGUI(this.fontRenderer, this.field_146297_k.renderEngine, itemstack, i, j);
|
||||
itemRenderer.renderItemOverlayIntoGUI(this.fontRenderer, this.field_146297_k.renderEngine, itemstack, i, j, s);
|
||||
}
|
||||
|
||||
itemRenderer.zLevel = 0.0F;
|
||||
@@ -440,7 +440,7 @@ public abstract class NewContainerGui extends GuiScreen
|
||||
|
||||
protected void func_94066_g ()
|
||||
{
|
||||
ItemStack itemstack = this.mc.thePlayer.inventory.getItemStack();
|
||||
ItemStack itemstack = this.field_146297_k.thePlayer.inventory.getItemStack();
|
||||
|
||||
if (itemstack != null && this.field_94076_q)
|
||||
{
|
||||
@@ -492,7 +492,7 @@ public abstract class NewContainerGui extends GuiScreen
|
||||
protected void mouseClicked (int mouseX, int mouseY, int mouseButton)
|
||||
{
|
||||
super.mouseClicked(mouseX, mouseY, mouseButton);
|
||||
boolean flag = mouseButton == this.mc.gameSettings.keyBindPickBlock.keyCode + 100;
|
||||
boolean flag = mouseButton == this.field_146297_k.gameSettings.keyBindPickBlock.keyCode + 100;
|
||||
Slot slot = this.getSlotAtPosition(mouseX, mouseY);
|
||||
long l = Minecraft.getSystemTime();
|
||||
this.field_94074_J = this.field_94072_H == slot && l - this.field_94070_G < 250L && this.field_94073_I == mouseButton;
|
||||
@@ -515,15 +515,15 @@ public abstract class NewContainerGui extends GuiScreen
|
||||
k1 = -999;
|
||||
}
|
||||
|
||||
if (this.mc.gameSettings.touchscreen && flag1 && this.mc.thePlayer.inventory.getItemStack() == null)
|
||||
if (this.field_146297_k.gameSettings.touchscreen && flag1 && this.field_146297_k.thePlayer.inventory.getItemStack() == null)
|
||||
{
|
||||
this.mc.displayGuiScreen((GuiScreen) null);
|
||||
this.field_146297_k.displayGuiScreen((GuiScreen) null);
|
||||
return;
|
||||
}
|
||||
|
||||
if (k1 != -1)
|
||||
{
|
||||
if (this.mc.gameSettings.touchscreen)
|
||||
if (this.field_146297_k.gameSettings.touchscreen)
|
||||
{
|
||||
if (slot != null && slot.getHasStack())
|
||||
{
|
||||
@@ -538,9 +538,9 @@ public abstract class NewContainerGui extends GuiScreen
|
||||
}
|
||||
else if (!this.field_94076_q)
|
||||
{
|
||||
if (this.mc.thePlayer.inventory.getItemStack() == null)
|
||||
if (this.field_146297_k.thePlayer.inventory.getItemStack() == null)
|
||||
{
|
||||
if (mouseButton == this.mc.gameSettings.keyBindPickBlock.keyCode + 100)
|
||||
if (mouseButton == this.field_146297_k.gameSettings.keyBindPickBlock.keyCode + 100)
|
||||
{
|
||||
this.handleMouseClick(slot, k1, mouseButton, 3);
|
||||
}
|
||||
@@ -591,9 +591,9 @@ public abstract class NewContainerGui extends GuiScreen
|
||||
protected void func_85041_a (int par1, int par2, int par3, long par4)
|
||||
{
|
||||
Slot slot = this.getSlotAtPosition(par1, par2);
|
||||
ItemStack itemstack = this.mc.thePlayer.inventory.getItemStack();
|
||||
ItemStack itemstack = this.field_146297_k.thePlayer.inventory.getItemStack();
|
||||
|
||||
if (this.clickedSlot != null && this.mc.gameSettings.touchscreen)
|
||||
if (this.clickedSlot != null && this.field_146297_k.gameSettings.touchscreen)
|
||||
{
|
||||
if (par3 == 0 || par3 == 1)
|
||||
{
|
||||
@@ -672,7 +672,7 @@ public abstract class NewContainerGui extends GuiScreen
|
||||
{
|
||||
slot1 = (Slot) iterator.next();
|
||||
|
||||
if (slot1 != null && slot1.canTakeStack(this.mc.thePlayer) && slot1.getHasStack() && slot1.inventory == slot.inventory
|
||||
if (slot1 != null && slot1.canTakeStack(this.field_146297_k.thePlayer) && slot1.getHasStack() && slot1.inventory == slot.inventory
|
||||
&& Container.func_94527_a(slot1, this.field_94075_K, true))
|
||||
{
|
||||
this.handleMouseClick(slot1, slot1.slotNumber, par3, 1);
|
||||
@@ -706,7 +706,7 @@ public abstract class NewContainerGui extends GuiScreen
|
||||
|
||||
boolean flag1;
|
||||
|
||||
if (this.clickedSlot != null && this.mc.gameSettings.touchscreen)
|
||||
if (this.clickedSlot != null && this.field_146297_k.gameSettings.touchscreen)
|
||||
{
|
||||
if (par3 == 0 || par3 == 1)
|
||||
{
|
||||
@@ -722,7 +722,7 @@ public abstract class NewContainerGui extends GuiScreen
|
||||
this.handleMouseClick(this.clickedSlot, this.clickedSlot.slotNumber, par3, 0);
|
||||
this.handleMouseClick(slot, j1, 0, 0);
|
||||
|
||||
if (this.mc.thePlayer.inventory.getItemStack() != null)
|
||||
if (this.field_146297_k.thePlayer.inventory.getItemStack() != null)
|
||||
{
|
||||
this.handleMouseClick(this.clickedSlot, this.clickedSlot.slotNumber, par3, 0);
|
||||
this.field_85049_r = par1 - l;
|
||||
@@ -762,9 +762,9 @@ public abstract class NewContainerGui extends GuiScreen
|
||||
|
||||
this.handleMouseClick((Slot) null, -999, Container.func_94534_d(2, this.field_94071_C), 5);
|
||||
}
|
||||
else if (this.mc.thePlayer.inventory.getItemStack() != null)
|
||||
else if (this.field_146297_k.thePlayer.inventory.getItemStack() != null)
|
||||
{
|
||||
if (par3 == this.mc.gameSettings.keyBindPickBlock.keyCode + 100)
|
||||
if (par3 == this.field_146297_k.gameSettings.keyBindPickBlock.keyCode + 100)
|
||||
{
|
||||
this.handleMouseClick(slot, j1, par3, 3);
|
||||
}
|
||||
@@ -782,7 +782,7 @@ public abstract class NewContainerGui extends GuiScreen
|
||||
}
|
||||
}
|
||||
|
||||
if (this.mc.thePlayer.inventory.getItemStack() == null)
|
||||
if (this.field_146297_k.thePlayer.inventory.getItemStack() == null)
|
||||
{
|
||||
this.field_94070_G = 0L;
|
||||
}
|
||||
@@ -822,7 +822,7 @@ public abstract class NewContainerGui extends GuiScreen
|
||||
par2 = par1Slot.slotNumber;
|
||||
}
|
||||
|
||||
this.mc.playerController.windowClick(this.container.windowId, par2, par3, par4, this.mc.thePlayer);
|
||||
this.field_146297_k.playerController.windowClick(this.container.windowId, par2, par3, par4, this.field_146297_k.thePlayer);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -830,20 +830,20 @@ public abstract class NewContainerGui extends GuiScreen
|
||||
*/
|
||||
protected void keyTyped (char par1, int par2)
|
||||
{
|
||||
if (par2 == 1 || par2 == this.mc.gameSettings.keyBindInventory.keyCode)
|
||||
if (par2 == 1 || par2 == this.field_146297_k.gameSettings.keyBindInventory.keyCode)
|
||||
{
|
||||
this.mc.thePlayer.closeScreen();
|
||||
this.field_146297_k.thePlayer.closeScreen();
|
||||
}
|
||||
|
||||
this.checkHotbarKeys(par2);
|
||||
|
||||
if (this.mainSlot != null && this.mainSlot.getHasStack())
|
||||
{
|
||||
if (par2 == this.mc.gameSettings.keyBindPickBlock.keyCode)
|
||||
if (par2 == this.field_146297_k.gameSettings.keyBindPickBlock.keyCode)
|
||||
{
|
||||
this.handleMouseClick(this.mainSlot, this.mainSlot.slotNumber, 0, 3);
|
||||
}
|
||||
else if (par2 == this.mc.gameSettings.keyBindDrop.keyCode)
|
||||
else if (par2 == this.field_146297_k.gameSettings.keyBindDrop.keyCode)
|
||||
{
|
||||
this.handleMouseClick(this.mainSlot, this.mainSlot.slotNumber, isCtrlKeyDown() ? 1 : 0, 4);
|
||||
}
|
||||
@@ -855,7 +855,7 @@ public abstract class NewContainerGui extends GuiScreen
|
||||
*/
|
||||
protected boolean checkHotbarKeys (int par1)
|
||||
{
|
||||
if (this.mc.thePlayer.inventory.getItemStack() == null && this.mainSlot != null)
|
||||
if (this.field_146297_k.thePlayer.inventory.getItemStack() == null && this.mainSlot != null)
|
||||
{
|
||||
for (int j = 0; j < 9; ++j)
|
||||
{
|
||||
@@ -875,9 +875,9 @@ public abstract class NewContainerGui extends GuiScreen
|
||||
*/
|
||||
public void onGuiClosed ()
|
||||
{
|
||||
if (this.mc.thePlayer != null)
|
||||
if (this.field_146297_k.thePlayer != null)
|
||||
{
|
||||
this.container.onContainerClosed(this.mc.thePlayer);
|
||||
this.container.onContainerClosed(this.field_146297_k.thePlayer);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -896,9 +896,9 @@ public abstract class NewContainerGui extends GuiScreen
|
||||
{
|
||||
super.updateScreen();
|
||||
|
||||
if (!this.mc.thePlayer.isEntityAlive() || this.mc.thePlayer.isDead)
|
||||
if (!this.field_146297_k.thePlayer.isEntityAlive() || this.field_146297_k.thePlayer.isDead)
|
||||
{
|
||||
this.mc.thePlayer.closeScreen();
|
||||
this.field_146297_k.thePlayer.closeScreen();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -12,7 +12,7 @@ import tconstruct.library.crafting.ToolBuilder;
|
||||
import tconstruct.library.tools.AbilityHelper;
|
||||
import tconstruct.library.tools.ToolCore;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.enchantment.Enchantment;
|
||||
import net.minecraft.enchantment.EnchantmentHelper;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@@ -22,7 +22,7 @@ import net.minecraft.item.EnumAction;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.event.entity.player.ArrowLooseEvent;
|
||||
@@ -63,8 +63,8 @@ public abstract class BowBase extends ToolCore
|
||||
time = event.charge;
|
||||
|
||||
boolean creative = player.capabilities.isCreativeMode || EnchantmentHelper.getEnchantmentLevel(Enchantment.infinity.effectId, stack) > 0;
|
||||
int slotID = getInventorySlotContainItem(TRepo.arrow.itemID, player.inventory);
|
||||
int arrowID = getInventorySlotContainItem(Item.arrow.itemID, player.inventory);
|
||||
int slotID = getInventorySlotContainItem(TRepo.arrow, player.inventory);
|
||||
int arrowID = getInventorySlotContainItem(Item.arrow, player.inventory);
|
||||
int arrowState = 0;
|
||||
ItemStack tinkerArrow = null;
|
||||
if (slotID != -1)
|
||||
@@ -149,11 +149,11 @@ public abstract class BowBase extends ToolCore
|
||||
//if (tinkerArrow != null)
|
||||
if (slotID != -1 && (arrowID == -1 || slotID < arrowID))
|
||||
{
|
||||
player.inventory.consumeInventoryItem(TRepo.arrow.itemID);
|
||||
player.inventory.consumeInventoryItem(TRepo.arrow);
|
||||
}
|
||||
else
|
||||
{
|
||||
player.inventory.consumeInventoryItem(Item.arrow.itemID);
|
||||
player.inventory.consumeInventoryItem(Item.arrow);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -164,7 +164,7 @@ public abstract class BowBase extends ToolCore
|
||||
}
|
||||
}
|
||||
|
||||
int getInventorySlotContainItem (int itemID, InventoryPlayer inventory)
|
||||
int getInventorySlotContainItem (Item item, InventoryPlayer inventory)
|
||||
{
|
||||
for (int j = 0; j < inventory.mainInventory.length; ++j)
|
||||
{
|
||||
@@ -239,7 +239,7 @@ public abstract class BowBase extends ToolCore
|
||||
|
||||
/* Rendering */
|
||||
@Override
|
||||
public void registerIcons (IconRegister iconRegister)
|
||||
public void registerIcons (IIconRegister iconRegister)
|
||||
{
|
||||
super.registerIcons(iconRegister);
|
||||
headIcons1.clear();
|
||||
@@ -383,7 +383,7 @@ public abstract class BowBase extends ToolCore
|
||||
registerArrows(iconRegister);
|
||||
}
|
||||
|
||||
void registerArrows (IconRegister iconRegister)
|
||||
void registerArrows (IIconRegister iconRegister)
|
||||
{
|
||||
arrow1 = iconRegister.registerIcon("tinker:" + getDefaultFolder() + "/arrow_1");
|
||||
arrow2 = iconRegister.registerIcon("tinker:" + getDefaultFolder() + "/arrow_2");
|
||||
@@ -391,7 +391,7 @@ public abstract class BowBase extends ToolCore
|
||||
}
|
||||
|
||||
@Override
|
||||
public Icon getIcon (ItemStack stack, int renderPass)
|
||||
public IIcon getIcon (ItemStack stack, int renderPass)
|
||||
{
|
||||
NBTTagCompound tags = stack.getTagCompound();
|
||||
|
||||
@@ -486,30 +486,30 @@ public abstract class BowBase extends ToolCore
|
||||
handleStrings.put(index, location[2]);
|
||||
}
|
||||
|
||||
public Icon arrow1;
|
||||
public Icon arrow2;
|
||||
public Icon arrow3;
|
||||
public IIcon arrow1;
|
||||
public IIcon arrow2;
|
||||
public IIcon arrow3;
|
||||
|
||||
public HashMap<Integer, Icon> headIcons1 = new HashMap<Integer, Icon>();
|
||||
public HashMap<Integer, Icon> handleIcons1 = new HashMap<Integer, Icon>();
|
||||
public HashMap<Integer, Icon> accessoryIcons1 = new HashMap<Integer, Icon>();
|
||||
public HashMap<Integer, Icon> extraIcons1 = new HashMap<Integer, Icon>();
|
||||
public HashMap<Integer, Icon> effectIcons1 = new HashMap<Integer, Icon>();
|
||||
public HashMap<Integer, IIcon> headIcons1 = new HashMap<Integer, IIcon>();
|
||||
public HashMap<Integer, IIcon> handleIcons1 = new HashMap<Integer, IIcon>();
|
||||
public HashMap<Integer, IIcon> accessoryIcons1 = new HashMap<Integer, IIcon>();
|
||||
public HashMap<Integer, IIcon> extraIcons1 = new HashMap<Integer, IIcon>();
|
||||
public HashMap<Integer, IIcon> effectIcons1 = new HashMap<Integer, IIcon>();
|
||||
|
||||
public HashMap<Integer, Icon> headIcons2 = new HashMap<Integer, Icon>();
|
||||
public HashMap<Integer, Icon> handleIcons2 = new HashMap<Integer, Icon>();
|
||||
public HashMap<Integer, Icon> accessoryIcons2 = new HashMap<Integer, Icon>();
|
||||
public HashMap<Integer, Icon> extraIcons2 = new HashMap<Integer, Icon>();
|
||||
public HashMap<Integer, Icon> effectIcons2 = new HashMap<Integer, Icon>();
|
||||
public HashMap<Integer, IIcon> headIcons2 = new HashMap<Integer, IIcon>();
|
||||
public HashMap<Integer, IIcon> handleIcons2 = new HashMap<Integer, IIcon>();
|
||||
public HashMap<Integer, IIcon> accessoryIcons2 = new HashMap<Integer, IIcon>();
|
||||
public HashMap<Integer, IIcon> extraIcons2 = new HashMap<Integer, IIcon>();
|
||||
public HashMap<Integer, IIcon> effectIcons2 = new HashMap<Integer, IIcon>();
|
||||
|
||||
public HashMap<Integer, Icon> headIcons3 = new HashMap<Integer, Icon>();
|
||||
public HashMap<Integer, Icon> handleIcons3 = new HashMap<Integer, Icon>();
|
||||
public HashMap<Integer, Icon> accessoryIcons3 = new HashMap<Integer, Icon>();
|
||||
public HashMap<Integer, Icon> extraIcons3 = new HashMap<Integer, Icon>();
|
||||
public HashMap<Integer, Icon> effectIcons3 = new HashMap<Integer, Icon>();
|
||||
public HashMap<Integer, IIcon> headIcons3 = new HashMap<Integer, IIcon>();
|
||||
public HashMap<Integer, IIcon> handleIcons3 = new HashMap<Integer, IIcon>();
|
||||
public HashMap<Integer, IIcon> accessoryIcons3 = new HashMap<Integer, IIcon>();
|
||||
public HashMap<Integer, IIcon> extraIcons3 = new HashMap<Integer, IIcon>();
|
||||
public HashMap<Integer, IIcon> effectIcons3 = new HashMap<Integer, IIcon>();
|
||||
|
||||
@Override
|
||||
public Icon getIcon (ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining)
|
||||
public IIcon getIcon (ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining)
|
||||
{
|
||||
int useTime = stack.getMaxItemUseDuration() - useRemaining;
|
||||
if (!stack.hasTagCompound())
|
||||
@@ -530,7 +530,7 @@ public abstract class BowBase extends ToolCore
|
||||
return getIcon1(stack, renderPass);
|
||||
}
|
||||
|
||||
public Icon getIcon1 (ItemStack stack, int renderPass)
|
||||
public IIcon getIcon1 (ItemStack stack, int renderPass)
|
||||
{
|
||||
NBTTagCompound tags = stack.getTagCompound();
|
||||
|
||||
@@ -607,7 +607,7 @@ public abstract class BowBase extends ToolCore
|
||||
return emptyIcon;
|
||||
}
|
||||
|
||||
public Icon getIcon2 (ItemStack stack, int renderPass)
|
||||
public IIcon getIcon2 (ItemStack stack, int renderPass)
|
||||
{
|
||||
NBTTagCompound tags = stack.getTagCompound();
|
||||
|
||||
@@ -684,7 +684,7 @@ public abstract class BowBase extends ToolCore
|
||||
return emptyIcon;
|
||||
}
|
||||
|
||||
public Icon getIcon3 (ItemStack stack, int renderPass)
|
||||
public IIcon getIcon3 (ItemStack stack, int renderPass)
|
||||
{
|
||||
NBTTagCompound tags = stack.getTagCompound();
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.event.Event.Result;
|
||||
import cpw.mods.fml.common.event.*;
|
||||
import tconstruct.library.TConstructRegistry;
|
||||
import tconstruct.library.armor.ArmorCore;
|
||||
import tconstruct.library.armor.ArmorMod;
|
||||
|
||||
@@ -4,6 +4,7 @@ import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import cpw.mods.fml.common.eventhandler.Event.Result;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.enchantment.EnchantmentHelper;
|
||||
import net.minecraft.enchantment.EnchantmentThorns;
|
||||
@@ -28,9 +29,8 @@ import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.FakePlayer;
|
||||
import net.minecraftforge.common.util.FakePlayer;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.event.Event.Result;
|
||||
import net.minecraftforge.event.entity.player.UseHoeEvent;
|
||||
import tconstruct.library.ActiveToolMod;
|
||||
import tconstruct.library.TConstructRegistry;
|
||||
|
||||
@@ -14,9 +14,9 @@ import net.minecraftforge.common.MinecraftForge;
|
||||
|
||||
public abstract class HarvestTool extends ToolCore
|
||||
{
|
||||
public HarvestTool(int itemID, int baseDamage)
|
||||
public HarvestTool(int baseDamage)
|
||||
{
|
||||
super(itemID, baseDamage);
|
||||
super(baseDamage);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -10,7 +10,7 @@ import java.util.Random;
|
||||
import mods.battlegear2.api.weapons.IBattlegearWeapon;
|
||||
import mods.battlegear2.api.weapons.OffhandAttackEvent;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
@@ -20,7 +20,7 @@ import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemPotion;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.event.entity.player.PlayerInteractEvent;
|
||||
import tconstruct.library.ActiveToolMod;
|
||||
@@ -65,12 +65,12 @@ public abstract class ToolCore extends Item implements IEnergyContainerItem, IBa
|
||||
|
||||
protected Random random = new Random();
|
||||
protected int damageVsEntity;
|
||||
public static Icon blankSprite;
|
||||
public static Icon emptyIcon;
|
||||
public static IIcon blankSprite;
|
||||
public static IIcon emptyIcon;
|
||||
|
||||
public ToolCore(int id, int baseDamage)
|
||||
public ToolCore( int baseDamage)
|
||||
{
|
||||
super(id);
|
||||
super();
|
||||
this.maxStackSize = 1;
|
||||
this.setMaxDamage(100);
|
||||
this.setUnlocalizedName("InfiTool");
|
||||
@@ -115,12 +115,12 @@ public abstract class ToolCore extends Item implements IEnergyContainerItem, IBa
|
||||
|
||||
/* Rendering */
|
||||
|
||||
public HashMap<Integer, Icon> headIcons = new HashMap<Integer, Icon>();
|
||||
public HashMap<Integer, Icon> brokenIcons = new HashMap<Integer, Icon>();
|
||||
public HashMap<Integer, Icon> handleIcons = new HashMap<Integer, Icon>();
|
||||
public HashMap<Integer, Icon> accessoryIcons = new HashMap<Integer, Icon>();
|
||||
public HashMap<Integer, Icon> effectIcons = new HashMap<Integer, Icon>();
|
||||
public HashMap<Integer, Icon> extraIcons = new HashMap<Integer, Icon>();
|
||||
public HashMap<Integer, IIcon> headIcons = new HashMap<Integer, IIcon>();
|
||||
public HashMap<Integer, IIcon> brokenIcons = new HashMap<Integer, IIcon>();
|
||||
public HashMap<Integer, IIcon> handleIcons = new HashMap<Integer, IIcon>();
|
||||
public HashMap<Integer, IIcon> accessoryIcons = new HashMap<Integer, IIcon>();
|
||||
public HashMap<Integer, IIcon> effectIcons = new HashMap<Integer, IIcon>();
|
||||
public HashMap<Integer, IIcon> extraIcons = new HashMap<Integer, IIcon>();
|
||||
|
||||
//Not liking this
|
||||
public HashMap<Integer, String> headStrings = new HashMap<Integer, String>();
|
||||
@@ -184,7 +184,7 @@ public abstract class ToolCore extends Item implements IEnergyContainerItem, IBa
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerIcons (IconRegister iconRegister)
|
||||
public void registerIcons (IIconRegister iconRegister)
|
||||
{
|
||||
headIcons.clear();
|
||||
brokenIcons.clear();
|
||||
@@ -245,14 +245,14 @@ public abstract class ToolCore extends Item implements IEnergyContainerItem, IBa
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public Icon getIconFromDamage (int meta)
|
||||
public IIcon getIconFromDamage (int meta)
|
||||
{
|
||||
return blankSprite;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public Icon getIcon (ItemStack stack, int renderPass)
|
||||
public IIcon getIcon (ItemStack stack, int renderPass)
|
||||
{
|
||||
NBTTagCompound tags = stack.getTagCompound();
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ public abstract class ToolMod
|
||||
{
|
||||
ItemStack removeStack = (ItemStack) iterate.next();
|
||||
|
||||
if (craftingStack.itemID == removeStack.itemID && (removeStack.getItemDamage() == Short.MAX_VALUE || craftingStack.getItemDamage() == removeStack.getItemDamage()))
|
||||
if (craftingStack.getItem() == removeStack.getItem() && (removeStack.getItemDamage() == Short.MAX_VALUE || craftingStack.getItemDamage() == removeStack.getItemDamage()))
|
||||
{
|
||||
canCraft = true;
|
||||
list.remove(removeStack);
|
||||
@@ -214,14 +214,14 @@ public abstract class ToolMod
|
||||
|
||||
public boolean areItemsEquivalent (ItemStack stack1, ItemStack stack2)
|
||||
{
|
||||
if (stack1.itemID != stack2.itemID)
|
||||
if (stack1.getItem() != stack2.getItem())
|
||||
return false;
|
||||
return ItemStack.areItemStackTagsEqual(stack1, stack2);
|
||||
}
|
||||
|
||||
public boolean areItemStacksEquivalent (ItemStack stack1, ItemStack stack2)
|
||||
{
|
||||
if (stack1.itemID != stack2.itemID)
|
||||
if (stack1.getItem() != stack2.getItem())
|
||||
return false;
|
||||
if (stack1.getItemDamage() != stack2.getItemDamage())
|
||||
return false;
|
||||
|
||||
@@ -14,9 +14,9 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||
public abstract class Weapon extends ToolCore
|
||||
{
|
||||
|
||||
public Weapon(int itemID, int baseDamage)
|
||||
public Weapon(int baseDamage)
|
||||
{
|
||||
super(itemID, baseDamage);
|
||||
super(baseDamage);
|
||||
}
|
||||
|
||||
protected float baseSpeed ()
|
||||
|
||||
@@ -5,7 +5,7 @@ import java.util.Random;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import tconstruct.common.TRepo;
|
||||
|
||||
public class SlimeTreeGen extends WorldGenerator
|
||||
|
||||
Reference in new issue
Block a user