GregTech CE Unofficial

GregTech CE Unofficial

412k Downloads

Issues with TE Cache with PipeNets

ghzdude opened this issue ยท 0 comments

commented

GregTech CEu Version

master

Modpack Used

No response

Addons Installed

No response

Environment

Dev Server

New Worlds

Yes

Cross-Mod Interaction

No

Expected Behavior

pipes to get the correct tile entity on dimension reload

Actual Behavior

pipes may not be getting the correct TE when the dimension is reloaded

Steps to Reproduce

  1. place energy emitter (the nether or end is a good place to test this)
  2. place a machine or energy consumer
  3. connect them with at least one energy wire
  4. make the machine do work
  5. leave and re-enter the dimesion
  6. machine is no longer receiving energy

Additional Information

after debugging, i have noticed that a new MTE holder is created on dimension load (or chunk load), which means a new set of neighbors. EnergyRoutePaths are initially created with the correct references to the target pipe, and the MTE holder that the pipe is connected to, but these references are stale once the dimension is reloaded, since a new MTE holder is created.

image
this breakpoint is placed at line 30 of EnergyRoutePath, and you can see that the target pipe is not the same as the TE at the same position.

I'll probably update this as I continue to debug this, or anyone else can make a comment in this issue.