Gamemode4Dev / GM4_Datapacks

Gamemode 4 is a collection of modular Minecraft Datapacks that change or expand on the vanilla experience whilst keeping the vanilla feel. Our modules are developed with a focus on usability and efficiency.
https://gm4.co
GNU General Public License v3.0
114 stars 56 forks source link

Villagers with Balloon Animals installed give 24 Emeralds upon trading (1.20.6) #1046

Closed catter1 closed 1 month ago

catter1 commented 1 month ago

Describe the bug If Balloon Animals is installed on 1.20.5/6, trading with villagers will give 24 emeralds for free. This is the case when trading with a Wandering Trader selling balloon animals, its normal trades, and even regular villagers. This does not happen in 1.21.

To Reproduce Steps to reproduce the behavior:

  1. Install Balloon Animals
  2. Spawn trader with /function gm4_balloon_animals:debug/summon_trader_with_llamas
  3. Give yourself a stack of emeralds (64)
  4. Purchase balloon animal for 12 emeralds
  5. Observe yourself now having a stack + 12 emeralds in your inventory (78), which is 24 extra minus the cost of the trade
  6. Observe yourself gaining 24 emeralds with regular Villager and Wandering Trader trades

Expected behavior The player should not be given 24 emeralds upon completing any villager trade.

Fix Unsure of the fix yet. However, I can confirm that this is not an issue with lib_trades, but instead just with Balloon Animals. I was unsuccessful in reproducing the issue with Mob Curing and Apple Trees on fresh worlds (each), which are the two other modules updated to 1.20.6 that use lib_trades to add trades to Wandering Traders.

Videos

https://github.com/user-attachments/assets/6cc1e270-fb1c-4385-ad43-fc70a73a4d37

Environment

Additional context Initially reported by ProfElements in the discord server. Confirmed by me, leading to the creation of this issue.

BluePsychoRanger commented 1 month ago

Can confirm. Not an issue with 1.21. Looking into a possible reason for this bug.

Bloo-dev commented 1 month ago

Fixed in #1047.