Closed HopsandBarley closed 3 years ago
Same issue on Enginners Life 2.
Hi guys, I gonna double check on the ED side, too. Is there already related issue dropped at pmmo so that @Harmonised7 knows? Cheers!
Hi, yes it's post in bug section on Discord's PMMO. Have a good day.
The issue in engineers life 2 is because of the conflict between engineers decor and pmmo. That's where I found it.
On Sat, Apr 10, 2021, 3:23 AM KoloNiko @.***> wrote:
Hi, yes it's post in bug section on Discord's PMMO. Have a good day.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/stfwi/engineers-decor/issues/173#issuecomment-817093147, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASVGY7ASORAA5YVIZ6IAYILTH74GRANCNFSM42O6K6WA .
I can confirm that LootContext code of Project MMO is causing this, looking into it now. If someone finds something out, please let me know on Discord. (I will likely not be replying anywhere other than Discord)
Edit: drops = block.getDrops( event.getState(), builder ); is the method that destroys the items. I do not think that this should happen, so I am assuming it's not my side that's causing this. Keep in mind that I don't really understand LootContext related things, though I give all the arguments to my builder that the event provides, this includes: Player Position, Tool used, Player Entity, and Tile Entity
I've found an inefficient solution to this issue, which will be fixed in 3.52.5
P.S. Whoever left the Thumbs Down emoji, that's super inconsiderate... Your actions affect people, and in this case, rather negatively...
Hi Harmonised, thanks for the quick check an keeping me in the loop. Let me take a look in the code of the Crate if I can find an problem there, too. Don't worry about the emoji, it's very likely mis-clicked, people are normally happy when modders care and maintain - and PMMO is a really nice mod. Cheers!
Hi, thanks.Harmonised.
Ok, quickly double checked. So the getDrops(...)
of the crate depends on the loot context explosion radius (not null and >0) and that the tile entity is still available when getDrops(...)
is called. Then it gathers the TE contents into item nbt and returns the crate item. The call is indirect via a super class (because I have more blocks keeping their inventory). Could we have a collision there?
In code, this would be these methods, getDrops()
is here:
... and the Crate drops here:
You can also paste the permalink of the caller side in PMMO if you like an additional pair of eyes checking. Cheers!
Hi! I was told about your reply ^^ Here's the LootContext Builder
Hi again. Alright, I'd say your code looks pretty much ok. One thing I noticed in the ED mod that can cause the problem, too: Querying the Crate drops will clear its inventory after gathering the TE data. That is a workaround for a drop dupe issue in the 1.14ish MC version range - which I did not take out yet. At least until now. So, if another event callback queries the Crate drops, but does not actually drop them, then your callback (probably last due to low prio) will see an empty crate. "Hence", there will be also a fix from the ED side ;). Cheers!
Okay, the update is on curse, closing then, cheers guys!
There is a conflict between Engineer's decor labeled crates and Project MMO, that is causing contents of Labeled crates to be voided when the crates are moved or broken. Do no know the exact conflict, but when PMMO is uninstalled, the bug goes away. (1.16)
Likely an issue with PMMO, but I dont know for sure, so I wanted to bring it to your attention.