API/IMC Event for custom Trading Screen
dantaeusb opened this issue · 1 comments
Is your feature request related to a problem? Please describe.
I have a mod that changes the default trading screen for my own Painting Merchant profession with mixin, as it's not in Forge API. This does not work with MCA, as it seems to override Villager in some ways, as reported by players that request compatibility with MCA.
Describe the solution you'd like
I think an inter-mod-communitacion event or some API would be nice for that case to assign a custom screen for a specific profession
Describe alternatives you've considered
I should create a Forge Pull Request with an event for custom Trading Screens but nevertheless until I'm not sure if it will be compatible with MCA anyawy so would be nice to consider support for such cases with custom Villagers.
Additional context
The custom screen in question:
Actual reported behavior:
One thing I’ve noticed is when you go to “trade” with the villager in their terms it doesn’t pull up where you can buy paintings and is instead a traditional villager trade which was 4 emeralds for a painting item.
Which is expected as basic trades are used as a backend for custom screen.
The issue is that we can not use private void beginTradeWith(PlayerEntity customer)
since its private, instead we called setCustomer and sendOffer. I fixed that with an invoker mixin, your mod should work fine now.
By the way, shift-right click should be a workaround for older versions.