SpongePowered / SpongeForge

A Forge mod that implements SpongeAPI
http://www.spongepowered.org/
MIT License
1.14k stars 306 forks source link

Villager Trades mod - not enabling custom trades #2779

Closed Yorkforce closed 5 years ago

Yorkforce commented 5 years ago

I am currently running

Issue Description

Villager Trades are not adding custom villagers to villages, every village I have visited so far have all been normal vanilla villagers with standard vanilla trade options. The Villager Trades mod works fine in SSP, just not on the server.

This is on a SevTech 3.1.1 server with level=quark_realistic

This is the error we see in the start up log: https://pastebin.com/pK4Ns9Dm

Full server log: latest.log

gabizou commented 5 years ago

Brief overview of the VillagerTrade mod:

Reflect everything and mutate already registered objects dynamically, bypass most of the registration hooks that were written to avoid this sort of conflict. Sponge uses these hooks and registrations precisely to remain in sync with Forge's API for Villager trades. This mod just goes and bypasses most of that by using reflection. To add salt to the wound, VillagerTrades goes and makes it's own wrapper classes to "help" reflect back and forth. Good going.

When I get some time and motivation, I'll probably look at rewriting for the nth time to fallback on recreating all Sponge API objects constantly, based on a caching system of sorts, because clearly no one can figure out how to edit villager trades without breaking someone else's villager modifications. Thankfully 1.13+ already rewrote all of the villager trade handling to be straight registries in vanilla, so that can be laid to rest.

Yorkforce commented 5 years ago

Hmm thats a shame but not a huge problem, thankfully the advancements in the modpack that require this mod can be adjusted to work around the problem.

I noticed it was also mentioned on the Villager Trades github: https://github.com/crazysnailboy/VillagerTrades/issues/19

Yorkforce commented 5 years ago

Just to update this further for anyone else wondering.

The mod is sort of working, it applies both modded and vanilla professions to villagers, not perfect but workable.