Not sure if this was confined to me or not, but upon overloading a machine and having it explode, it will not be removed from the energynet, it ghosts and placing any wire results in an explosion. On top of this, attempting to wrench or otherwise remove a machine results in the same behavior.
I was able to manually remedy this by modifying the onInject() code to call this.invalidate() and to modify the onActivate code to also call this.invalidate() [only if player is wrenching it]
I also removed the NEI related line as it's simply broken.
The below code shows how to get around the explosions from wrenching/removing the machines. (I didn't include the NEI removal code)
BlockAdvancedMachines.java
Code
@Override
public boolean onBlockActivated(World world, int x, int y, int z,
EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9) {
if (par5EntityPlayer.getCurrentEquippedItem() != null && (par5EntityPlayer.getCurrentEquippedItem().itemID == idWrench || par5EntityPlayer.getCurrentEquippedItem().itemID == idEWrench)) {
if (par5EntityPlayer.isSneaking())
return false;
EnergyNet.getForWorld(world).removeTileEntity(((TileEntityAdvancedMachine) world.getBlockTileEntity(x, y, z)));
((TileEntityAdvancedMachine) world.getBlockTileEntity(x, y, z)).invalidate();
((TileEntityAdvancedMachine) world.getBlockTileEntity(x, y, z)).setActive(false);
return true;
} else {
par5EntityPlayer.openGui(AdvancedMachines.instance, 0, world, x, y, z);
return true;
}
}
Display More
TileEntityBaseMachine.java
Code
public int injectEnergy(Direction var1, int var2) {
if (var2 > this.maxInput) {
if (!AdvancedMachines.explodeMachineAt(worldObj, xCoord, yCoord, zCoord)) {
worldObj.createExplosion(null, xCoord, yCoord, zCoord, 2.0F);
}
this.invalidate();
return 0;
} else {
this.energy += var2;
int var3 = 0;
if (this.energy > this.maxEnergy) {
var3 = this.energy - this.maxEnergy;
this.energy = this.maxEnergy;
}
return var3;
}
}
Display More