Backs of Engines are now solid
This commit is contained in:
parent
f03c00fba3
commit
513388f6e3
2 changed files with 11 additions and 2 deletions
|
@ -58,6 +58,15 @@ public class BlockEngine extends BlockContainer {
|
|||
return new TileEngine();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isBlockSolidOnSide(World world, int x, int y, int z, ForgeDirection side) {
|
||||
TileEntity tile = world.getBlockTileEntity(x, y, z);
|
||||
if (tile instanceof TileEngine) {
|
||||
return ForgeDirection.getOrientation(((TileEngine) tile).orientation).getOpposite() == side;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void breakBlock(World world, int x, int y, int z, int par5, int par6) {
|
||||
TileEngine engine = ((TileEngine) world.getBlockTileEntity(x, y, z));
|
||||
|
|
|
@ -71,7 +71,7 @@ public class TileEngine extends TileBuildCraft implements IPowerReceptor, IInven
|
|||
createEngineIfNeeded();
|
||||
}
|
||||
|
||||
engine.orientation = ForgeDirection.values()[orientation];
|
||||
engine.orientation = ForgeDirection.VALID_DIRECTIONS[orientation];
|
||||
provider.configure(0, engine.minEnergyReceived(), engine.maxEnergyReceived(), 1, engine.maxEnergy);
|
||||
checkRedstonePower();
|
||||
}
|
||||
|
@ -170,7 +170,7 @@ public class TileEngine extends TileBuildCraft implements IPowerReceptor, IInven
|
|||
|
||||
engine = newEngine(kind);
|
||||
|
||||
engine.orientation = ForgeDirection.values()[orientation];
|
||||
engine.orientation = ForgeDirection.VALID_DIRECTIONS[orientation];
|
||||
worldObj.notifyBlockChange(xCoord, yCoord, zCoord, BuildCraftEnergy.engineBlock.blockID);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue