fix some logic in lux capacitor sticking

This commit is contained in:
MachineMuse 2014-03-12 23:58:58 -06:00
parent da1e258808
commit 867d1b7229

View file

@ -74,10 +74,10 @@ public class EntityLuxCapacitor extends EntityThrowable {
if (y > 0) {
int blockID = worldObj.getBlockId(x, y, z);
if (blockID <= 0 || Block.blocksList[blockID] == null || Block.blocksList[blockID].isAirBlock(worldObj, x, y, z)) {
int blockToStickTo = worldObj.getBlockId(x, y, z);
int blockToStickTo = worldObj.getBlockId(movingobjectposition.blockX, movingobjectposition.blockY, movingobjectposition.blockZ);
if (Block.isNormalCube(blockToStickTo)) {
worldObj.setBlock(x, y, z, BlockLuxCapacitor.assignedBlockID, 0, 7);
worldObj.setBlockTileEntity(x, y, z, new TileEntityLuxCapacitor(dir, red, green, blue));
worldObj.setBlockTileEntity(x, y, z, new TileEntityLuxCapacitor(dir.getOpposite(), red, green, blue));
} else {
for (ForgeDirection d : ForgeDirection.values()) {
int xo = x + d.offsetX;