Closed Yoshun closed 3 months ago
Thank you for your report. In version 5.5.1, the trading data were adjusted as noted in the changelog: "Note: Due to changes and fixes in the trading data, some trading data will be reset. Please edit the trades again, and they will be saved in the new format."
To ensure your trades are stored correctly in the latest version, please make a minor adjustment—such as moving an item out and then back in.
I will also implement a check to disable the "Open Trading Screen" option when invalid trading data is detected.
Hi, Thanks for the response! I read the changelogs and saw this information. I had updated the trades by removing all the items and putting them all back to make sure it was up to date in the new format before posting this issue.
Please examine the affected NPC and press "F3 + i" to copy the entity data to your clipboard. Share this data in the bug report so that I can investigate the issue and the crash in more detail.
I attempted to reproduce the issue with a new NPC but was unable to do so. It might be an isolated problem with the existing NPCs.
Entity data :
/summon easy_npc:humanoid -425.50 66.00 -495.50 {ActionData: {ActionEventSet: {}, ActionPermissionLevel: 4}, DeathTime: 0s, LeftHanded: 0b, OnGround: 1b, AbsorptionAmount: 0.0f, SkinData: {Skin: "", SkinUUID: [I; 1379223705, 2080193635, -2060185035, -1442307105], SkinURL: "https://pokemine.fr/images/skins/brandon.png", SkinType: "INSECURE_REMOTE_URL"}, Attributes: [{Name: "minecraft:generic.attack_damage", Base: 1.0d}, {Name: "minecraft:generic.knockback_resistance", Base: 0.0d}, {Name: "minecraft:generic.follow_range", Modifiers: [{Amount: 0.008406636896658354d, UUID: [I; 568897395, -1114488355, -1580054262, 1501830831], Name: "Random spawn bonus", Operation: 1}], Base: 32.0d}, {Name: "minecraft:generic.movement_speed", Base: 0.6000000238418579d}, {Name: "minecraft:generic.attack_knockback", Base: 0.0d}], Invulnerable: 1b, Brain: {memories: {}}, RenderData: {}, Navigation: {Home: {Y: 66, Z: -496, X: -426}}, Owner: [I; 1428444344, -1768468530, -1795086739, -1767964366], "puzzleslib:spawn_type": "SPAWN_EGG", Rotation: [133.46571f, 1.0133115f], HurtByTimestamp: 0, ArmorDropChances: [0.085f, 0.085f, 0.085f, 0.085f], HandDropChances: [0.085f, 0.085f], EntityAttribute: {CanCloseDoor: 0b, Freefall: 0b, IsAttackable: 0b, CanUseNetherPortal: 0b, CanPassDoor: 0b, PushEntities: 0b, CanFloat: 0b, CanBeLeashed: 0b, IsPushable: 0b, LightLevel: 7, CanOpenDoor: 0b}, ObjectiveData: {HasObjectives: 1b, ObjectiveDataSet: [{Type: "LOOK_AT_PLAYER", Prio: 9}, {Type: "LOOK_AT_MOB", Prio: 10}, {Type: "LOOK_AT_RESET", Prio: 9}]}, CustomName: '{"color":"#FFFF00","text":"Brandon"}', SoundData: {SoundDataSet: [{Type: "DEATH", Name: "minecraft:entity.player.death"}, {Type: "EAT", Name: "minecraft:entity.generic.eat"}, {Type: "HURT", Name: "minecraft:entity.player.hurt"}, {Type: "TRADE", Name: "minecraft:entity.villager.trade"}, {Type: "TRADE_YES", Name: "minecraft:entity.villager.yes"}, {Type: "TRADE_NO", Name: "minecraft:entity.villager.no"}]}, DialogData: {Type: "YES_NO", Default: "question", DialogDataSet: [{Buttons: [{Type: "DEFAULT", Name: "Montre moi ça !", Actions: [{Type: "OPEN_TRADING_SCREEN"}], Label: "yes_button"}, {Type: "DEFAULT", Name: "Non merci.", Actions: [{Type: "CLOSE_DIALOG"}], Label: "no_button"}], Texts: [{Text: "Bonjour @initiator ! Je t'échange tes Pièces de combat contre des médicaments spéciaux. Chaque médicament augmente l'IV correspondant d'un point. Parfait pour parfaire tes Pokémons !"}], Name: "Question Dialog", Label: "question"}]}, AngerTime: 0, ArmorItems: [{}, {}, {}, {}], EasyNPCVersion: 2, HandItems: [{}, {}], Air: 300s, Offers: {Inventory: {}, Recipes: {Recipes: [{xp: 0, buy: {id: "pokeminemod:battlecoin", Count: 6b}, sell: {id: "pokeminemod:hp_up_plus", Count: 1b}, uses: 0, priceMultiplier: 1.0f, maxUses: 64, rewardExp: 1b, demand: 0, specialPrice: 0, buyB: {id: "minecraft:air", Count: 0b}}, {xp: 0, buy: {id: "pokeminemod:battlecoin", Count: 6b}, sell: {id: "pokeminemod:protein_plus", Count: 1b}, uses: 0, priceMultiplier: 1.0f, maxUses: 64, rewardExp: 1b, demand: 0, specialPrice: 0, buyB: {id: "minecraft:air", Count: 0b}}, {xp: 0, buy: {id: "pokeminemod:battlecoin", Count: 6b}, sell: {id: "pokeminemod:iron_plus", Count: 1b}, uses: 0, priceMultiplier: 1.0f, maxUses: 64, rewardExp: 1b, demand: 0, specialPrice: 0, buyB: {id: "minecraft:air", Count: 0b}}, {xp: 0, buy: {id: "pokeminemod:battlecoin", Count: 6b}, sell: {id: "pokeminemod:calcium_plus", Count: 1b}, uses: 0, priceMultiplier: 1.0f, maxUses: 64, rewardExp: 1b, demand: 0, specialPrice: 0, buyB: {id: "minecraft:air", Count: 0b}}, {xp: 0, buy: {id: "pokeminemod:battlecoin", Count: 6b}, sell: {id: "pokeminemod:zinc_plus", Count: 1b}, uses: 0, priceMultiplier: 1.0f, maxUses: 64, rewardExp: 1b, demand: 0, specialPrice: 0, buyB: {id: "minecraft:air", Count: 0b}}, {xp: 0, buy: {id: "pokeminemod:battlecoin", Count: 6b}, sell: {id: "pokeminemod:carbos_plus", Count: 1b}, uses: 0, priceMultiplier: 1.0f, maxUses: 64, rewardExp: 1b, demand: 0, specialPrice: 0, buyB: {id: "minecraft:air", Count: 0b}}, {xp: 0, buy: {id: "minecraft:air", Count: 0b}, sell: {id: "minecraft:air", Count: 0b}, uses: 0, priceMultiplier: 1.0f, maxUses: 64, rewardExp: 1b, demand: 0, specialPrice: 0, buyB: {id: "minecraft:air", Count: 0b}}, {xp: 0, buy: {id: "minecraft:air", Count: 0b}, sell: {id: "minecraft:air", Count: 0b}, uses: 0, priceMultiplier: 1.0f, maxUses: 64, rewardExp: 1b, demand: 0, specialPrice: 0, buyB: {id: "minecraft:air", Count: 0b}}, {xp: 0, buy: {id: "minecraft:air", Count: 0b}, sell: {id: "minecraft:air", Count: 0b}, uses: 0, priceMultiplier: 1.0f, maxUses: 64, rewardExp: 1b, demand: 0, specialPrice: 0, buyB: {id: "minecraft:air", Count: 0b}}, {xp: 0, buy: {id: "minecraft:air", Count: 0b}, sell: {id: "minecraft:air", Count: 0b}, uses: 0, priceMultiplier: 1.0f, maxUses: 64, rewardExp: 1b, demand: 0, specialPrice: 0, buyB: {id: "minecraft:air", Count: 0b}}, {xp: 0, buy: {id: "minecraft:air", Count: 0b}, sell: {id: "minecraft:air", Count: 0b}, uses: 0, priceMultiplier: 1.0f, maxUses: 64, rewardExp: 1b, demand: 0, specialPrice: 0, buyB: {id: "minecraft:air", Count: 0b}}, {xp: 0, buy: {id: "minecraft:air", Count: 0b}, sell: {id: "minecraft:air", Count: 0b}, uses: 0, priceMultiplier: 1.0f, maxUses: 64, rewardExp: 1b, demand: 0, specialPrice: 0, buyB: {id: "minecraft:air", Count: 0b}}]}}, Profession: "NONE", TradingData: {TradingDataSet: {Type: "BASIC", RewardedXP: 0, LastReset: 1723549710640L, ResetsEveryMin: 64, MaxUses: 64}}, FallDistance: 0.0f, Variant: "STEVE", Motion: [0.0d, 0.0d, 0.0d], PersistenceRequired: 0b, FallFlying: 0b, CanPickUpLoot: 0b, ModelData: {DefaultPose: "STANDING", Pose: "DEFAULT", Visible: {}, Position: {}, Rotation: {}, SmartAnimations: 1b}, HurtTime: 0s, Health: 20.0f, Fire: -1s, PortalCooldown: 0}
When I created the NPC there was no problem. However, the problem occurred after the server automatically restarted at 5am. And after changing an item to force the registration of the NPC, the bug disappeared... It's quite strange. I'll wait to see if the bug starts again tomorrow after the automatic reboot to see if it's related to that or not.
Thanks for providing the details. One thing you could try is "respawning" the NPC, which is similar to performing a server restart.
If the issue persists after doing this, it might indicate that there’s a problem with the save data. If that’s the case, I should be able to address it relatively easily. Let me know how it goes!
Minecraft and Mod version 🐞 Minecraft 1.20.1, Fabric 0.5.11, EasyNPC 5.5.1
Describe the bug 🐞 I have an NPC to trade items. I set a "Yes/No" dialog to display text explaining the items the NPC is trading. The "No" button closes the dialog without opening the trade interface, no problem there. The problem is that clicking the "Yes" button disconnects the player with the error below in the server console.
To Reproduce ⚙️
Debugging 🛠️ Here is the error :
Thanks !