Added code for Electric Blast Furnace to smoothly replace deprecated coils.
This commit is contained in:
parent
fa1955f6e5
commit
a8647b8929
1 changed files with 21 additions and 1 deletions
|
@ -142,7 +142,7 @@ public class GT_MetaTileEntity_ElectricBlastFurnace
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
addMufflerToMachineList(aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir, 3, zDir), 11);
|
addMufflerToMachineList(aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir, 3, zDir), 11);
|
||||||
|
replaceDeprecatedCoils(aBaseMetaTileEntity);
|
||||||
byte tUsedMeta = aBaseMetaTileEntity.getMetaIDOffset(xDir + 1, 2, zDir);
|
byte tUsedMeta = aBaseMetaTileEntity.getMetaIDOffset(xDir + 1, 2, zDir);
|
||||||
switch (tUsedMeta) {
|
switch (tUsedMeta) {
|
||||||
case 0:
|
case 0:
|
||||||
|
@ -231,4 +231,24 @@ public class GT_MetaTileEntity_ElectricBlastFurnace
|
||||||
public boolean explodesOnComponentBreak(ItemStack aStack) {
|
public boolean explodesOnComponentBreak(ItemStack aStack) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void replaceDeprecatedCoils(IGregTechTileEntity aBaseMetaTileEntity) {
|
||||||
|
int x = aBaseMetaTileEntity.getXCoord() + ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX;
|
||||||
|
int y = (int) aBaseMetaTileEntity.getYCoord();
|
||||||
|
int z = aBaseMetaTileEntity.getZCoord() + ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ;
|
||||||
|
int tUsedMeta;
|
||||||
|
for (int xPos = x - 1; xPos <= x + 1; xPos++) {
|
||||||
|
for (int zPos = z - 1; zPos <= z + 1; zPos++) {
|
||||||
|
if ((xPos == x) && (zPos == z)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
for (int yPos = y + 1; yPos <= y + 2; yPos++) {
|
||||||
|
tUsedMeta = aBaseMetaTileEntity.getMetaID(xPos, yPos, zPos);
|
||||||
|
if (tUsedMeta >= 12 && tUsedMeta <= 14 && aBaseMetaTileEntity.getBlock(xPos, yPos, zPos) == GregTech_API.sBlockCasings1) {
|
||||||
|
aBaseMetaTileEntity.getWorld().setBlock(xPos, yPos, zPos, GregTech_API.sBlockCasings5, tUsedMeta - 12, 3);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue