Changed reactor cell interaction, right click to open GUI, sneak right click to add item, sneak right click with empty hand to take item
This commit is contained in:
parent
aa0b050e70
commit
0d7dd572c0
|
@ -110,15 +110,9 @@ public class TileReactorCell extends TileInventory implements IMultiBlockStructu
|
|||
{
|
||||
TileReactorCell tile = getMultiBlock().get();
|
||||
|
||||
if (!player.isSneaking())
|
||||
if (player.isSneaking())
|
||||
{
|
||||
if (tile.getStackInSlot(0) != null)
|
||||
{
|
||||
InventoryUtility.dropItemStack(world(), new Vector3(player), tile.getStackInSlot(0), 0);
|
||||
tile.setInventorySlotContents(0, null);
|
||||
return true;
|
||||
}
|
||||
else if (player.inventory.getCurrentItem() != null)
|
||||
if (player.inventory.getCurrentItem() != null)
|
||||
{
|
||||
if (player.inventory.getCurrentItem().getItem() instanceof IReactorComponent)
|
||||
{
|
||||
|
@ -129,6 +123,12 @@ public class TileReactorCell extends TileInventory implements IMultiBlockStructu
|
|||
return true;
|
||||
}
|
||||
}
|
||||
else if (tile.getStackInSlot(0) != null)
|
||||
{
|
||||
InventoryUtility.dropItemStack(world(), new Vector3(player), tile.getStackInSlot(0), 0);
|
||||
tile.setInventorySlotContents(0, null);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
player.openGui(Atomic.INSTANCE, 0, world(), tile.xCoord, tile.yCoord, tile.zCoord);
|
||||
|
@ -214,8 +214,7 @@ public class TileReactorCell extends TileInventory implements IMultiBlockStructu
|
|||
{
|
||||
if (worldObj.rand.nextFloat() > 0.65)
|
||||
{
|
||||
List<EntityLiving> entities = worldObj.getEntitiesWithinAABB(EntityLiving.class,
|
||||
AxisAlignedBB.getBoundingBox(xCoord - RADIUS * 2, yCoord - RADIUS * 2, zCoord - RADIUS * 2, xCoord + RADIUS * 2, yCoord + RADIUS * 2, zCoord + RADIUS * 2));
|
||||
List<EntityLiving> entities = worldObj.getEntitiesWithinAABB(EntityLiving.class, AxisAlignedBB.getBoundingBox(xCoord - RADIUS * 2, yCoord - RADIUS * 2, zCoord - RADIUS * 2, xCoord + RADIUS * 2, yCoord + RADIUS * 2, zCoord + RADIUS * 2));
|
||||
|
||||
for (EntityLiving entity : entities)
|
||||
{
|
||||
|
@ -514,7 +513,8 @@ public class TileReactorCell extends TileInventory implements IMultiBlockStructu
|
|||
return 1;
|
||||
}
|
||||
|
||||
/** Returns true if automation can insert the given item in the given slot from the given side. Args: Slot, item, side */
|
||||
/** Returns true if automation can insert the given item in the given slot from the given side.
|
||||
* Args: Slot, item, side */
|
||||
@Override
|
||||
public boolean canInsertItem(int slot, ItemStack items, int side)
|
||||
{
|
||||
|
@ -583,8 +583,7 @@ public class TileReactorCell extends TileInventory implements IMultiBlockStructu
|
|||
@Override
|
||||
public FluidTankInfo[] getTankInfo(ForgeDirection from)
|
||||
{
|
||||
return new FluidTankInfo[]
|
||||
{ tank.getInfo() };
|
||||
return new FluidTankInfo[] { tank.getInfo() };
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue