Lootr (Forge & NeoForge)

Lootr (Forge & NeoForge)

59M Downloads

Minecarts don't have loot in 1.19.2 (fabric)

minc727 opened this issue ยท 2 comments

commented

I'm having an issue where lootr chests in minecarts display no loot inside of them. I'm playing on:
Minecraft 1.19.2
lootr-1.19-0.4.26.65 (fabric)

Playing on the Prominence v1.7.0 modpack

If I encounter a minecart chest, the normal interaction I have is I'll go to open it and it just shows a blank inventory

However, sometimes the Jade summary will show that there are contents in the chest. If I put the minecart over a hopper, the hopper will extract the items from the chest:

image
image

image
image

Something that I've noticed is if I spawn in a minecart and open it up very quickly (while Jade still says inventory is not generated) then I'm able to see the items just fine:
image
image

Once I do this, I'm able to close and reopen the chest etc just fine. However, the items that Jade shows as being in the chest are different:
image

and putting it over a hopper pulls out the items shown on the tooltip, not in the inventory screen:
image

Once all of the items are pulled out with the hopper, the tooltip shows that there are no items in the minecart, however, if I open it normally I still see the items I saw in there originally:
image

This happens both on a SMP server and in singleplayer.

2023-06-18-3.log is the single player log where I join the world, spawn in a minecart and quickly open it so I get both inventories, then spawn in a second one a bit slower and get a blank inventory when I open it. At first glance I don't really see anything in it (no obvious errors etc, it mostly just says I spawned two carts in).

commented

Thanks for reporting this and the extensive information!

I've narrowed it down to Jade interacting with the inventory, which cause loot generation, which wipes the loot table. That implies that there's a failure somewhere in the Minecart entity implementation to prevent these behaviours, which I'll look into.

This would explain why, if you open it quickly enough (before Jade tries to parse the container), it functions as expected; likewise, without having Jade or something equivalent in my development environment, I wasn't experiencing this.

Hoppering in and out of carts is also problematic.

This is possibly applicable to all Fabric versions and, by extension, all Forge versions, so I'll dig into it further.

commented

That was an annoying bug, but easily fixed. Thanks for the report! I'm just working on the Forge 1.20 fix now.