fix some logic in lux capacitor sticking
This commit is contained in:
parent
da1e258808
commit
867d1b7229
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue