fixed engine schematics, fix #1538

This commit is contained in:
SpaceToad 2014-03-22 18:18:30 +01:00
parent eb2f436f42
commit d4038e763c

View file

@ -32,11 +32,24 @@ public class SchematicEngine extends SchematicTile {
@Override
public void writeToWorld(IBuilderContext context, int x, int y, int z) {
context.world().setBlock(x, y, z, block, meta,1);
super.writeToWorld(context, x, y, z);
TileEngine engine = (TileEngine) context.world().getTileEntity(x, y, z);
engine.orientation = ForgeDirection.getOrientation(cpt.getInteger("orientation"));
engine.sendNetworkUpdate();
}
@Override
public void postProcessing (IBuilderContext context, int x, int y, int z) {
TileEngine engine = (TileEngine) context.world().getTileEntity(x, y, z);
if (engine != null) {
engine.orientation = ForgeDirection.getOrientation(cpt.getInteger("orientation"));
engine.sendNetworkUpdate();
context.world().markBlockForUpdate(x, y, z);
context.world().notifyBlocksOfNeighborChange(x, y, z, block);
}
}
}