GregTechCEu / GregTech

GregTech CE 1.12 fork continuing progression and development
GNU Lesser General Public License v3.0
227 stars 173 forks source link

Ore Drilling Plant controller being deleted #1486

Open Correlander opened 1 year ago

Correlander commented 1 year ago

GregTech CEu Version

v2.5.0

Modpack Used

Nomifactory CEU

Addons Installed

No response

Environment

Forge Server, but I can reproduce in singleplayer.

New Worlds

Yes

Cross-Mod Interaction

Unsure

Expected Behavior

For it to not delete the controller unit.

Actual Behavior

It deletes the controller unit.

Steps to Reproduce

Phantom Breaker + Placer swapping out the controller block of an ore drilling plant deletes it (occasionally). As in, a phantom breaker on pulse mode will break the controller on a redstone timer (2400 ticks but that shouldn't matter). Item conduits then immediately feed it back into an auto placer, on deactivation mode (always on, unless redstone signal, which there is none so just always on). I noticed my controller block disappeared one day, so I spawned a stack of controllers in, put them in the placer, and waited 48 hours. Upon checking again, this is far less than a stack, so it's definitely deleting them on occasion. The area is chunk loaded. If it matters it's on a space station biome. 2023-02-07_22 52 11 2023-02-07_22 52 20 2023-02-07_22 52 41 2023-02-07_22 52 49

Additional Information

Could either be issue with GTCEu or AA, not sure. I will report it there next if it's thought this isn't an issue with GTCEu.

ghzdude commented 1 year ago

I've investigated this issue, and can reliably reproduce it as of dc82278c2a1f32ef58983b8c3ad70357b531a87d.

The steps to reproduce it are:

  1. Make a formed Large Miner that can do work (has ores to mine)
  2. Link a Phantom Breaker from Actually Additions to the Large Miner controller
  3. As the Large Miner is running, log out of the world
  4. Log back into the world
  5. Break the controller via the Phantom Breaker
  6. Controller is voided

~I've also noticed that, after logging back in, getDrops() isn't called in BlockMachine, resulting the the controller being voided. I believe the issue to be from Actually Additions, but I would need to do more digging to be sure.~

EDIT: Turns out that getMetaTileEntity() from MetaTileEntityHolder is returning null, which is why getDrops() isn't working as intended. ~I think the issue is actually from gregtech.~ The tile entity at the position of the controller is replaced by the Phantom Breaker, which is why getMetaTileEntity() returns null