Backs of Engines are now solid

This commit is contained in:
CovertJaguar 2013-01-09 08:40:38 -08:00
parent f03c00fba3
commit 513388f6e3
2 changed files with 11 additions and 2 deletions

View file

@ -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));

View file

@ -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);
}
}