SamB440 / Tale-of-Kingdoms

An adventure of glory in the world of Minecraft - Revival of Tale of Kingdoms mod
GNU General Public License v3.0
17 stars 3 forks source link

If your inventory is full and you buy an item, it vanishes #129

Closed SamB440 closed 2 years ago

SamB440 commented 2 years ago

Summary

From π•Ώπ–π–Šπ•½π–Šπ–‡π–Šπ–‘π•Ώ on Discord: If the player's inventory is full and you buy something from the blacksmith, your coins get used to purchase the item but the item disappears into thin air rather than being dropped. Whether or not this is intentional, I think it would be better if the item was dropped if the inventory is full so you're not wasting coins

Steps to reproduce

Whilst having a full inventory, buy an item from a shop NPC, e.g the blacksmith.

Expected behaviour

The item should not vanish and should be dropped instead.

Mod list

Tale of Kingdoms

Possible fixes

ShopB

The code here uses insertStack, which I believe will return false if it fails to add the item. If this happens, we can drop it.

Relevent logs and/or screenshots/videos

No response

Other

No response

SamB440 commented 2 years ago

It seems that method returns true always unless you put something like air in...