Shopkeepers

Shopkeepers

2M Downloads

NBT Tags bothering me

blablubbabcDEV opened this issue ยท 4 comments

commented

Migrated from: https://dev.bukkit.org/projects/shopkeepers/issues/417

Originally posted by Pr0totype2 (Jun 3, 2016):

What steps will reproduce the problem?

  1. Put something with 1 NBT Tag in trading slot
  2. Put something with 2 NBT Tags in final slot
  3. Not able to trade.What is the expected output? What do you see instead?
    I'd like to have some sort of option in config to disable that
    As I currently have a lot of shopkeepers which are really not useful, but I need them as players can either get the 1 NBT Tag or the 2 NBT Tags of the same item and they need to exchange it in the same tag like the shopkeeper has it.It's really annoying, 1 of the most annoying parts of my server. It breaks the whole system and some players are wandering for 30 minutes orso, having no clue what to doWhat version of the product are you using?
    LatestI've tried to fix this myself by forking your latest git-version and removing everything data-related, but I didn't succeed at all
commented

Originally commented by Pr0totype2 (Jun 3, 2016):

I can't simply make 2 different trades and many players don't use F3 + H so they don't even see the difference.
It is very easy to change this in code, as I've attempted to do so and I noticed you had a lot of short data parameters and variables inside your methods and classes.
Even when I've removed those, the shopkeepers still want the trades to be 100% equal, including tags.
Can't you make a boolean in config about this?

commented

Originally commented by blablubbabc (Jun 4, 2016):

[at]Pr0totype2:
Quote:
It is very easy to change this in code, as I've attempted to do so and I noticed you had a lot of short data parameters and variables inside your methods and classes.

Even when I've removed those, the shopkeepers still want the trades to be 100% equal, including tags.

It is not shopkeepers preventing the trading of those items, it's minecraft itself. Shopkeepers only creates a 'virtual' minecraft villager, 'configures' that villagers trades, and then opens the trading menu for that virtual villager for a specific player. All the trading logic is then handled by minecraft itself. I can only add additional checks, I cannot remove minecraft's own checks.
Quote:
I can't simply make 2 different trades and many players don't use F3 + H so they don't even see the difference.

Then make sure that your players don't even end up with those 2 different item variations: Either by configuring your plugins (recommended), or, if that is not possible, write some plugin which replaces occurences of one of those variations with the other in the player's inventories, or when they get or try to use those items (more prone to errors and issues compared to the first mentioned solution).
Edited Feb 4, 2017

commented

Originally commented by blablubbabc (Jun 3, 2016):

This is a minecraft limitation, nothing shopkeepers can easily change..

Your options are either to configure your plugins so that your players don't end up with those 2 different item variations, or have 2 trades, each accepting one of those item variations (though that might still confuse your players, if the items only differ in some internal data).

        Edited Jun 3, 2016
commented

Originally closed by blablubbabc (Jun 3, 2016)