This commit is contained in:
tgame14 2014-03-08 20:33:35 +02:00
commit f1da57d224

View file

@ -1,5 +1,6 @@
package resonantinduction.archaic.engineering;
import java.util.ArrayList;
import java.util.Set;
import net.minecraft.block.material.Material;
@ -73,9 +74,7 @@ public class TileEngineeringTable extends TileInventory implements IPacketReceiv
/** The ability for the engineering table to search nearby inventories. */
public boolean searchInventories = true;
/**
* Temporary player inventory stored to draw the player's items.
*/
/** Temporary player inventory stored to draw the player's items. */
private InventoryPlayer invPlayer = null;
private int[] playerSlots;
@ -157,9 +156,7 @@ public class TileEngineeringTable extends TileInventory implements IPacketReceiv
hitVector.rotate(WorldUtility.getAngleFromForgeDirection(getDirection()), Vector3.UP());
hitVector.translate(new Vector3(0.5, 0, 0.5));
/**
* Crafting Matrix
*/
/** Crafting Matrix */
matrix:
for (int j = 0; j < 3; j++)
{
@ -183,9 +180,7 @@ public class TileEngineeringTable extends TileInventory implements IPacketReceiv
}
else if (hitSide != 0)
{
/**
* Take out of engineering table.
*/
/** Take out of engineering table. */
if (!world().isRemote)
{
setPlayerInventory(player.inventory);
@ -241,9 +236,11 @@ public class TileEngineeringTable extends TileInventory implements IPacketReceiv
}
@Override
public void onRemove(int par5, int par6)
public ArrayList<ItemStack> getDrops(int metadata, int fortune)
{
ItemBlockSaved.dropBlockWithNBT(getBlockType(), world(), x(), y(), z());
ArrayList<ItemStack> list = new ArrayList<ItemStack>();
list.add(ItemBlockSaved.getItemStackWithNBT(blockType, world(), x(), y(), z()));
return list;
}
@Override
@ -257,9 +254,7 @@ public class TileEngineeringTable extends TileInventory implements IPacketReceiv
{
}
/**
* Creates a "fake inventory" and hook the player up to the crafter to use the player's items.
*/
/** Creates a "fake inventory" and hook the player up to the crafter to use the player's items. */
public void setPlayerInventory(InventoryPlayer invPlayer)
{
if (searchInventories)
@ -353,9 +348,7 @@ public class TileEngineeringTable extends TileInventory implements IPacketReceiv
}
}
/**
* DO NOT USE THIS INTERNALLY. FOR EXTERNAL USE ONLY!
*/
/** DO NOT USE THIS INTERNALLY. FOR EXTERNAL USE ONLY! */
@Override
public ItemStack getStackInSlot(int slot)
{
@ -404,9 +397,7 @@ public class TileEngineeringTable extends TileInventory implements IPacketReceiv
}
else if (slot < CRAFTING_OUTPUT_END)
{
/**
* An external inventory is attempting to craft the item from the engineering table.
*/
/** An external inventory is attempting to craft the item from the engineering table. */
if (itemStack == null)
onPickUpFromSlot(null, slot, this.outputInventory[slot - CRAFTING_MATRIX_END]);
@ -446,10 +437,8 @@ public class TileEngineeringTable extends TileInventory implements IPacketReceiv
onInventoryChanged();
}
/**
* When some containers are closed they call this on each slot, then drop whatever it returns as
* an EntityItem - like when you close a workbench GUI.
*/
/** When some containers are closed they call this on each slot, then drop whatever it returns as
* an EntityItem - like when you close a workbench GUI. */
@Override
public ItemStack getStackInSlotOnClosing(int slot)
{
@ -483,11 +472,9 @@ public class TileEngineeringTable extends TileInventory implements IPacketReceiv
this.onInventoryChanged();
}
/**
* Construct an InventoryCrafting Matrix on the fly.
/** Construct an InventoryCrafting Matrix on the fly.
*
* @return
*/
* @return */
public InventoryCrafting getCraftingMatrix()
{
InventoryCrafting inventoryCrafting = new InventoryCrafting(new ContainerDummy(this), 3, 3);
@ -524,9 +511,7 @@ public class TileEngineeringTable extends TileInventory implements IPacketReceiv
didCraft = true;
}
/**
* If output does not exist, try using the filter.
*/
/** If output does not exist, try using the filter. */
if (!didCraft)
{
ItemStack filterStack = craftingMatrix[CENTER_SLOT];
@ -670,9 +655,7 @@ public class TileEngineeringTable extends TileInventory implements IPacketReceiv
return new int[0];
}
/**
* Auto-crafting methods.
*/
/** Auto-crafting methods. */
@Override
public boolean canInsertItem(int slot, ItemStack itemstack, int side)
{
@ -706,9 +689,7 @@ public class TileEngineeringTable extends TileInventory implements IPacketReceiv
if (outputStack != null)
{
/**
* Only allow take out crafting result when it can be crafted twice!
*/
/** Only allow take out crafting result when it can be crafted twice! */
Pair<ItemStack, ItemStack[]> idealRecipeItem = this.getCraftingManager().getIdealRecipe(outputStack);
ItemStack[] doubleResults = ArrayUtils.addAll(idealRecipeItem.right(), idealRecipeItem.right());