Big Reactors

Big Reactors

11M Downloads

Mod pipes disconnecting from reactor/turbine after world loads

lefty82 opened this issue ยท 11 comments

commented

I tested this with the energy conduits from Enderio and the fluid pipes from Mekanism. After starting minecraft and a world loads the conduits will be disconnected most of the time (from turbine power taps) and the fluid pipes from turbine fluid port and reactor coolant port.

So far the problem does not seem to appear for me when interacting with mods other than big reactors.

http://i59.tinypic.com/2hi59n5.png <- picture after the world loads, a manual block update next to the pipe/port will fix it.

I am using 0.4.0rc2 for 1.7.10

commented

This is a known issue (at least between Mekanism and BigReactors). The reactor blocks are sending out TileEntity updates (like a chest sends when it's inventory changes) when the reactor forms, but our transmitters (and apparently EnderIO conduits) are only receptive to full-on block updates. This has been fixed in Mek code in our most in-dev branch, it should hit the build servers before too long. It'll still exist between BR and EIO, though.

commented

Thanks for the update.

commented

Yep; this is a problem with EIO and Mek, as @unpairedbracket noted. Mek has a fix in, but you'll probably need to report this to EIO to get their conduits fixed.

commented

I have no idea what this TileEntity event is or how to respond to it. Could it be pointed out in the mek/BR source to me?

commented

Here is an example of a function scattering the TileEntity neighbor change event: https://github.com/CoFH/CoFHCore/blob/master/src/main/java/cofh/core/block/TileCoFHBase.java#L46

Here is a function signature for receiving it (note: on a block class):
https://github.com/CoFH/CoFHCore/blob/master/src/main/java/cofh/core/block/BlockCoFHBase.java#L169

commented
commented

so something like:

@Override
public void onNeighborChange(IBlockAccess world, int x, int y, int z, int tileX, int tileY, int tileZ) {
  TileEntity conduit = world.getTileEntity(x, y, z);
  if (conduit instanceof IConduitBundle) {
    ((IConduitBundle)conduit).onNeighborBlockChange(world.getBlock(x, y, z));
  }
}

(same code as in onNeighborBlockChange)

commented

Yes, precisely. The advantage of onNeighborChange is that it includes the coordinates of the changed tile, so you don't have to perform six checks when only one is necessary.

commented

ok, so is the onNeighborBlockChange method irrelevant, or still needed for compatibility with other blocks?

commented

Up to you. I'm choosing to phase it out, which forces mods that want interoperability to switch over. You may prefer to not deal with the bug reports and just leave it in.

commented

If it doesn't create duplicate updates, I will probably leave it in. Thanks for the help.