henkelmax / trade-cycling

The trade cycling functionality of Easy Villagers.
11 stars 6 forks source link

Possibility to cycle trades from summoned villager with custom trades #28

Closed moonarts closed 5 months ago

moonarts commented 5 months ago

Bug description

You can cycle trades once on a summoned villager with custom trades.

The cycling option shouldn't be possible on villagers with custom trades, you can't prevent players on a server to mess up your custom villagers.

Minecraft version

1.20.1

Mod version

1.0.7

Mod loader and version

Fabric Loader 0.15.10

Steps to reproduce

1) Summon a villager with custom trades : /summon villager ~ ~1 ~ {VillagerData:{profession:fisherman,level:5,type:plains},Invulnerable:1,PersistenceRequired:1,CustomName:"\"Didier\"",Offers:{Recipes:[ {buy:{id:cooked_cod,Count:10},sell:{id:emerald,Count:1}}, {buy:{id:cooked_salmon,Count:10},sell:{id:emerald,Count:2}}]}}

2) Open the villager trades GUI

3) You can cycle the trades once

Expected behavior

Not being able to cycle trades from a villager with custom trades

Log files

https://pastebin.com/TkWBcny6

Screenshots

image image

henkelmax commented 5 months ago

This won't be a thing. This is only meant for villagers with professions.

moonarts commented 5 months ago

But you can't summon villagers with custom trades without profession.

Removing the profession tag or setting it on profession:"minecraft:none" won't allow players to open the trades GUI as the villager is unemployed.

So you can't have a server with Trade Cycling + villagers with custom trades ?

henkelmax commented 5 months ago

If the trades are manually being added with a command, no. Modded villager professions or trades added to the professions will work fine.