use of net.minecraft.tileentity.TileEntitySign in project PneumaticCraft by MineMaarten.
the class DroneAIEditSign method isValidPosition.
@Override
protected boolean isValidPosition(ChunkPosition pos) {
TileEntity te = drone.getWorld().getTileEntity(pos.chunkPosX, pos.chunkPosY, pos.chunkPosZ);
if (te instanceof TileEntitySign) {
TileEntitySign sign = (TileEntitySign) te;
String[] lines = ((ISignEditWidget) widget).getLines();
for (int i = 0; i < 4; i++) {
sign.signText[i] = i < lines.length ? lines[i] : "";
}
drone.getWorld().markBlockForUpdate(pos.chunkPosX, pos.chunkPosY, pos.chunkPosZ);
} else if (te instanceof TileEntityAphorismTile) {
TileEntityAphorismTile sign = (TileEntityAphorismTile) te;
sign.setTextLines(((ISignEditWidget) widget).getLines());
}
return false;
}
Aggregations