fixed manipulator interaction issue

This commit is contained in:
DarkGuardsman 2013-09-16 10:12:43 -04:00
parent 2f43204498
commit 2fdb142ab7
3 changed files with 9 additions and 15 deletions

View file

@ -220,7 +220,7 @@ public class InvInteractionHelper
}
}
}
else if (tileEntity instanceof TileEntityChest)
else if (tileEntity.getClass() == TileEntityChest.class)
{
TileEntityChest[] chests = { (TileEntityChest) tileEntity, null };
@ -262,9 +262,7 @@ public class InvInteractionHelper
else if (tileEntity instanceof ISidedInventory)
{
ISidedInventory inventory = (ISidedInventory) tileEntity;
/*TODO something might be wrong with taking items out of machines */
int[] slots = inventory.getAccessibleSlotsFromSide(direction.ordinal());
for (int i = 0; i < slots.length; i++)
{
int slot = slots[i];

View file

@ -18,7 +18,7 @@ import dark.core.interfaces.IExternalInv;
import dark.core.network.PacketHandler;
import dark.core.prefab.TileEntityInv;
public class TileEntityCrate extends TileEntityInv implements IPacketReceiver, IExternalInv
public class TileEntityCrate extends TileEntityInv implements IPacketReceiver
{
/** Collective total stack of all inv slots */
private ItemStack sampleStack;

View file

@ -126,17 +126,13 @@ public class TileEntityManipulator extends TileEntityFilterable implements IRota
{
this.isRedstonePowered = false;
/** input location up */
Vector3 inputUp = new Vector3(this);
inputUp.modifyPositionFromSide(ForgeDirection.UP);
Vector3 inputUp = new Vector3(this).modifyPositionFromSide(ForgeDirection.UP);
/** input location down */
Vector3 inputDown = new Vector3(this);
inputDown.modifyPositionFromSide(ForgeDirection.DOWN);
Vector3 inputDown = new Vector3(this).modifyPositionFromSide(ForgeDirection.DOWN);
/** input location facing */
Vector3 inputPosition = new Vector3(this);
inputPosition.modifyPositionFromSide(this.getDirection().getOpposite());
Vector3 inputPosition = new Vector3(this).modifyPositionFromSide(this.getDirection().getOpposite());
/** output location facing */
Vector3 outputPosition = new Vector3(this);
outputPosition.modifyPositionFromSide(this.getDirection());
Vector3 outputPosition = new Vector3(this).modifyPositionFromSide(this.getDirection());
ItemStack itemStack = invHelper().tryGrabFromPosition(inputUp, ForgeDirection.UP, 1);