Dragon Survival [Forge]

Dragon Survival [Forge]

1M Downloads

[1.20.1 Bug]: Trade menu for prince and princess closes immediatly

FurtherV opened this issue · 1 comments

commented

■ Your Discord ID or other contacts

furtherv

■ Dragon Survival version

DragonSurvival-1.20.1-16.11.2024

■ Forge/Neoforge version

Forge 47.3.0

■ Single game or server?

Single-player (Default)

■ Describe the bug

When a prince or princess is loaded, not freshly spawned, they trade menu immediatly closes after opening. Freshly spawned princes and princesses do work as intended. I noticed that upon loading the creatures receive "VillagerData" nbt data like this:

{CanUpdate: 1b, DeathTime: 0s, RestocksToday: 0, Xp: 0, LeftHanded: 0b, OnGround: 1b, AbsorptionAmount: 0.0f, FoodLevel: 0b, LastRestock: 0L, Attributes: [{Name: "minecraft:generic.movement_speed", Base: 0.3d}, {Name: "forge:step_height_addition", Base: 0.0d}, {Name: "minecraft:generic.follow_range", Modifiers: [{Amount: -0.011267795854030763d, UUID: [I; -1216302341, 937903105, -1786355039, -2001706997], Name: "Random spawn bonus", Operation: 1}], Base: 48.0d}, {Name: "forge:entity_gravity", Base: 0.08d}, {Name: "minecraft:generic.attack_damage", Base: 1.0d}], Invulnerable: 0b, Brain: {memories: {}}, ForgeCaps: {"dragonsurvival:entitystatehandler": {lastPos: [-2.0736456476722998d, -60.0d, -5.146432946506135d], chainCount: 0, lastAfflicted: -1}}, Age: 0, HandDropChances: [0.085f, 0.085f], ArmorDropChances: [0.085f, 0.085f, 0.085f, 0.085f], Rotation: [133.5003f, -38.46344f], HurtByTimestamp: 0, ForcedAge: 0, BalmData: {}, ArmorItems: [{}, {}, {}, {}], Color: 14, HandItems: [{id: "minecraft:golden_sword", tag: {Damage: 0}, Count: 1b}, {}], Air: 300s, Offers: {Recipes: [{xp: 2, buy: {id: "minecraft:stone_sword", tag: {Damage: 0}, Count: 1b}, sell: {id: "minecraft:cobblestone", Count: 1b}, uses: 0, priceMultiplier: 0.0f, maxUses: 12, rewardExp: 1b, demand: 0, specialPrice: 0, buyB: {id: "minecraft:air", Count: 1b}}, {xp: 1, buy: {id: "minecraft:wooden_sword", tag: {Damage: 0}, Count: 1b}, sell: {id: "minecraft:stick", Count: 1b}, uses: 0, priceMultiplier: 0.0f, maxUses: 12, rewardExp: 1b, demand: 0, specialPrice: 0, buyB: {id: "minecraft:air", Count: 1b}}, {xp: 5, buy: {id: "minecraft:crossbow", tag: {Damage: 0}, Count: 1b}, sell: {id: "minecraft:string", Count: 1b}, uses: 0, priceMultiplier: 0.0f, maxUses: 12, rewardExp: 1b, demand: 0, specialPrice: 0, buyB: {id: "minecraft:air", Count: 1b}}, {xp: 5, buy: {id: "minecraft:bread", Count: 32b}, sell: {id: "minecraft:gold_nugget", Count: 1b}, uses: 0, priceMultiplier: 0.0f, maxUses: 24, rewardExp: 1b, demand: 0, specialPrice: 0, buyB: {id: "minecraft:air", Count: 1b}}]}, UUID: [I; -748698308, 962940089, -1977900812, -472257944], ForgeData: {upgraded_core_last_pos: [I; -3, -60, -6]}, Inventory: [], Gossips: [], FallDistance: 0.0f, VillagerData: {type: "minecraft:plains", profession: "minecraft:none", level: 1}, Motion: [-0.01923780759586059d, -0.0784000015258789d, -0.018251692508233382d], Fire: -1s, Pos: [-2.1441145367724865d, -60.0d, -5.213288081853636d], CanPickUpLoot: 1b, Health: 40.0f, HurtTime: 0s, FallFlying: 0b, PersistenceRequired: 0b, LastGossipDecay: 34750L, PortalCooldown: 0, "forge:spawn_type": "SPAWN_EGG"}

Maybe this is the issue? Removing it with /data remove entity @e[type=dragonsurvival:prince,limit=1,distance=0..10] VillagerData does not seem to help though...

Also I am only running gecklib, forge and this mod.

■ Crash Report File and Logs

The only relevant thing I can find the in the log is this:
[20:41:20] [Server thread/ERROR] [minecraft/Villager]: Unknown registry element in ResourceKey[minecraft:root / minecraft:villager_profession]:prince

commented

It seems if I run /data modify entity @e[type=dragonsurvival:prince,limit=1] VillagerData.profession set value "minecraft:nitwit" that fixes it, including for future reloads. Trading works as intended even after level up with this as well. So uh, maybe the mod or game kinda fucks up saving the correct tag?