Modflower/data-driven-composter

Unaware registration with composting modded items 1.18.2

Closed this issue · 6 comments

Environment

  • Minecraft: 1.18.2
  • Data Driven Composter: 0.0.0+mc.1.18.2
  • Loader: Fabric 0.14.10
  • Java: 17

To reproduce

  1. Log into a game
  2. Compost sea lettuce or pretty much any modded item mentioned in the config file.

Expected results

To compost modded items such as croptopia's Sea Lettuce

Actual results

While it did compost the item. The item wasn't subtracted after composting it. Almost as if the mod didn't recognize it was composted.

Anything else?

Config File: https://gist.github.com/ShadowSharkWolf/ce8f6606dcbfbf44478ddeed89763566
Fabric Log File: https://gist.github.com/ShadowSharkWolf/70945d3ff2e05edcc85ba000db0c41a8

This mod does work as I've tried to compost leather armor and it did compost it. The item disappeared after composting it. Modded items seem to be the only issue at this point. Also one thing to mention is I noticed that when I composted the modded item the minecaft log file made no mention to that when I did compost the item.

I hope this helps somewhat.

Looking through, it seems first that I'll have to fix up the bootstrap code to defer even later into startup to be able to capture the issue. Croptopia registers later than Minecraft's bootstrap, which means it simply isn't seen by the mod by the time the composter's internal registry is initialised.

This so far appears to not be a duplication glitch, just a case of unaware registration that wasn't logged as a warning as it should've.

I've reworked the composter registry bootstrap to execute far later, and that does seem to work with Croptopia. I will need to check to see if there is actually any duplication glitch going on with any other mods you may have had installed. Tho, this may take a bit as you do have a fair amount of mods installed.

Croptopia + Fabric API alone doesn't have any duplication as is, it works as expected. Hoppers respond fine to it as well.

If you want to give it a try yourself to see if you can reproduce any duplication glitch, you can grab the latest build from here at Actions, or compile it yourself using the latest commit on the 1.18.x branch.

If there is any duplication glitch still present beyond just the composter not accepting the item at all, it may help for you to binary search on your end to see if there's a specific set of mods interacting in a way that it shouldn't. Be sure to back up your worlds you're testing in and any configs before doing that.

Thanks for the update and response. I appreciate it. I'll test it and see what happens.

It works. The item disappears after I put it inside the composter. Thanks again!

Fix released in v0.1.0. If you want to grab the official release jar, feel free to grab it from either here or on Modrinth when it's ready.