Removed useless variables

This commit is contained in:
Henry Mao 2013-01-04 23:26:46 +08:00
parent 07d2c768b1
commit f2e0290c14
9 changed files with 16 additions and 33 deletions

View file

@ -58,7 +58,7 @@ public class ClientProxy extends CommonProxy
return new GuiImprinter(player.inventory, world, new Vector3(x, y, z));
case GUI_ENCODER:
if (tileEntity != null && tileEntity instanceof TileEntityEncoder)
return new GuiEncoder(player.inventory, world, new Vector3(x, y, z), (TileEntityEncoder) tileEntity);
return new GuiEncoder(player.inventory, world, (TileEntityEncoder) tileEntity);
}
return null;

View file

@ -37,7 +37,6 @@ public class GuiEncoder extends GuiContainer implements IInventoryWatcher
private int containerWidth;
private int containerHeight;
private TileEntityEncoder tileEntity;
private int x, y, z;
private ArrayList<String> commands;
// list stuff
@ -49,18 +48,11 @@ public class GuiEncoder extends GuiContainer implements IInventoryWatcher
private GuiButton pDnButton;
private GuiTextField commandField;
public GuiEncoder(InventoryPlayer par1InventoryPlayer, World worldObj, Vector3 position, TileEntityEncoder tileEntity)
public GuiEncoder(InventoryPlayer par1InventoryPlayer, World worldObj, TileEntityEncoder tileEntity)
{
super(new ContainerEncoder(par1InventoryPlayer, worldObj, position, tileEntity));
super(new ContainerEncoder(par1InventoryPlayer, worldObj, tileEntity));
this.ySize = 256;
this.tileEntity = tileEntity;
if (tileEntity != null)
{
}
this.x = position.intX();
this.y = position.intY();
this.z = position.intZ();
}
@Override
@ -268,6 +260,6 @@ public class GuiEncoder extends GuiContainer implements IInventoryWatcher
@Override
public void inventoryChanged()
{
updateCommands();
this.updateCommands();
}
}

View file

@ -50,7 +50,7 @@ public class CommonProxy implements IGuiHandler
case GUI_ENCODER:
{
if (tileEntity != null && tileEntity instanceof TileEntityEncoder)
return new ContainerEncoder(player.inventory, world, new Vector3(x, y, z), (TileEntityEncoder) tileEntity);
return new ContainerEncoder(player.inventory, world, (TileEntityEncoder) tileEntity);
}
}

View file

@ -68,7 +68,7 @@ public class ContainerCrafter extends Container
if (par1 != 0)
{
if (itemStack2.itemID == Item.coal.shiftedIndex)
if (itemStack2.itemID == Item.coal.itemID)
{
if (!this.mergeItemStack(itemStack2, 0, 1, false)) { return null; }
}

View file

@ -12,14 +12,12 @@ public class ContainerEncoder extends Container
{
private ItemStack[] containingItems = new ItemStack[1];
private World worldObj;
private Vector3 position;
private InventoryPlayer inventoryPlayer;
private TileEntityEncoder encoder;
public ContainerEncoder(InventoryPlayer inventoryPlayer, World worldObj, Vector3 position, TileEntityEncoder encoder)
public ContainerEncoder(InventoryPlayer inventoryPlayer, World worldObj, TileEntityEncoder encoder)
{
this.worldObj = worldObj;
this.position = position;
this.inventoryPlayer = inventoryPlayer;
this.encoder = encoder;
@ -44,12 +42,6 @@ public class ContainerEncoder extends Container
}
}
@Override
public void updateCraftingResults()
{
super.updateCraftingResults();
}
@Override
public boolean canInteractWith(EntityPlayer player)
{

View file

@ -15,7 +15,7 @@ public class SlotDisk extends Slot
public boolean isItemValid(ItemStack itemStack)
{
return itemStack.itemID == AssemblyLine.itemDisk.shiftedIndex;
return itemStack.itemID == AssemblyLine.itemDisk.itemID;
}
}

View file

@ -157,8 +157,12 @@ public class TileEntityEncoder extends TileEntityAdvanced implements IPacketRece
{
try
{
// TODO: Get this to work and add commands to the stack
/**
* Only the server receives this from the client's button click action.
*/
int newAddCommandID = dataStream.readInt();
}
catch (Exception e)
{

View file

@ -57,12 +57,6 @@ public class ContainerImprinter extends Container implements IInventory, ISlotWa
}
}
@Override
public void updateCraftingResults()
{
super.updateCraftingResults();
}
@Override
public boolean canInteractWith(EntityPlayer player)
{
@ -85,7 +79,8 @@ public class ContainerImprinter extends Container implements IInventory, ISlotWa
if (slot == 2)
{
setInventorySlotContents(0, null); // Prevents filter from being duplicated
setInventorySlotContents(0, null); // Prevents filter from being
// duplicated
}
if (slot > 4)

View file

@ -15,7 +15,7 @@ public class SlotImprint extends Slot
public boolean isItemValid(ItemStack itemStack)
{
return itemStack.itemID == AssemblyLine.itemImprint.shiftedIndex;
return itemStack.itemID == AssemblyLine.itemImprint.itemID;
}
}