Closed LeMayday closed 1 month ago
this is a tricky one. I can observe a problem in RocketLaunchPadBlockEntity.java. When you put a rocket on the pad, it links just fine via setLinkedRocket, but then when you destroy the pad, it calls hasRocket which doesn't seem to acknowledge that UUID and rocket should no longer be null. Thus the if statement if (pad.hasRocket()) in onRemove() in RocketLaunchPadBlock.java is never entered.
I'm not familiar with this syntax for instanceof, but my guess is the problem is here in RocketLaunchPadBlock.java:
if (level.getBlockEntity(center.offset(x, 0, z)) instanceof RocketLaunchPadBlockEntity pad)
My guess is this constructs a new instance of RocketLaunchPadBlockEntity that does not have the data from before. I will continue looking into this
nvm just found out this is a thing called pattern matching
ok actually I wonder if it has anything to do with the fact that it seems to create like 2 new launchpadblock entities every time you place down a launch pad block (so there are 18 in total when you make the multiblock)
turns out I think the issue was that the call to super() in onRemove destroyed the launchpadblockentity before the rest of the function could figure out whether there was a rocket on it
Mod Loader
Fabric
Version Information
688f2b2
Log or Crash Report
N/A
Reproduction steps