Iron's Spells 'n Spellbooks

Iron's Spells 'n Spellbooks

18M Downloads

[Bug] CTD with Project MMO when attempting to trade with Priest Villagers

malice936 opened this issue ยท 5 comments

commented

Observed behaviour

On first attempt at speaking with a Priest Villager from Iron's Spells 'n Spellbooks, the trade menu will open and the player can trade as normal, any subsequent attempt to interact in any way, including attacking causes the game to CTD.

Expected behaviour

The ability to open a trade dialogue with the Priest more than once.

Steps to reproduce

  1. Open a trade dialogue with a Priest Villager.
  2. Close the dialogue.
  3. Attempt to open it again, or attempt to attack the villager.

Server Type

Single Player

Crashlog

https://gist.github.com/malice936/e2f4d6379a9a906f7cd356b72b843d9e

Iron's Spells N Spellbooks version

1.20.1-3.0.1

Forge version

1.20.1-47.2.0

Other mods

caelus-forge-3.1.0+1.20
curios-forge-5.7.0+1.20.1
geckolib-forge-1.20.1-4.4.2
player-animation-lib-forge-1.0.2-rc1+1.20
pmmo-1.20.1-1.2.18

commented

there are no mixins involved with this

commented

It seems like PMMO is trying to generate the priest's trades from the client. we can just make the trade have a client fallback but this is a weird behavior on PMMO's end.

commented

Here is the response from Caltinor over there, it seems you both disagree on the source of the problem so I will just link you to the other post so you 2 can sort it out.

image
Caltinor/Project-MMO-2.0#498

commented

What PMMO is doing in this scenario is serializing the entity's NBT and passing that through the check for whether the player can interact with that entity. The NBT is provided because players can use it when defining restrictions, such as requiring a player to have a certain skill level to interact with master level villagers or even if the villager has certain trades.

From what I can tell, fcaea5a would have been the cause. The MerchantOffers list was not null, but one of the MerchantOffer instances in the list of offers was. That was causing the serialization to fail. This commit should fix it.

commented

should be fixed in 3.1.0