diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PyrolyseOven.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PyrolyseOven.java index 4e323439..e8b83825 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PyrolyseOven.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PyrolyseOven.java @@ -99,6 +99,7 @@ public class GT_MetaTileEntity_PyrolyseOven extends GT_MetaTileEntity_MultiBlock public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX * 2; int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ * 2; + replaceDeprecatedCoils(aBaseMetaTileEntity); for (int i = -2; i < 3; i++) { for (int j = -2; j < 3; j++) { for (int h = 0; h < 4; h++) { @@ -186,4 +187,20 @@ public class GT_MetaTileEntity_PyrolyseOven extends GT_MetaTileEntity_MultiBlock return new GT_MetaTileEntity_PyrolyseOven(this.mName); } + private void replaceDeprecatedCoils(IGregTechTileEntity aBaseMetaTileEntity) { + int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX; + int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ; + int tX = aBaseMetaTileEntity.getXCoord() + xDir * 2; + int tY = (int) aBaseMetaTileEntity.getYCoord(); + int tZ = aBaseMetaTileEntity.getZCoord() + zDir * 2; + for (int xPos = tX - 1; xPos <= tX + 1; xPos++) { + for (int zPos = tZ - 1; zPos <= tZ + 1; zPos++) { + if (aBaseMetaTileEntity.getBlock(xPos, tY, zPos) == GregTech_API.sBlockCasings1 && + aBaseMetaTileEntity.getMetaID(xPos, tY, zPos) == 13) + { + aBaseMetaTileEntity.getWorld().setBlock(xPos, tY, zPos, GregTech_API.sBlockCasings5, 1, 3); + } + } + } + } }