This site works best with JavaScript enabled. Please enable JavaScript to get the best experience from this site.
same enchantet items have a different item id when items combine in a anvil
example: 5 items with the same enchantments (example Efficiency 5 Unbreaking 3) can have 5 item ids ... and then i need 5 chestshops for this items with the same enchantments
https://github.com/dmulloy2/ChestShop-3/issues/19
This probably happens due to them having different ItemMetas as enchantments can be in a different order and the items itself could have different repair cost values. Only the first case could really be solved (by using a consistent order of the enchantments for all items) but not the second one.
To help figure our which one is really your issue you can provide more information about the items, the full NBT data of it would be good. (E.g. via the .dat file of a player with all of them in their inventory)
A workaround could be to just create a shop with the item id without the special id.
You can easy reproduce this issue.
1. create some enchantments only with a enchantment table
2. create the same items with the same enchantments with books in a anvil
Now you will see, the same enchantments on the same items can have a different ids.
This bug is due to the nbt for repair cost (value changes when used on anvil). The fix is simple, use a custom item compare method that does not include such arbitrary things such as repair cost, rather than bukkit's isSimilar method.
The fix is simple, use a custom item compare method that does not include such arbitrary things such as repair cost, rather than bukkit's isSimilar method.
No it's not that simple. That way it would allow you to sell items that are different from what the shop accepts. (E.g. sell unrepairable tools where the shop wants repairable ones) Same goes for buying items, when the shop offers items with a low repair cost then the player should also get only ones that have a low repair cost. Another problem would be the programmatic meaning of the ids: they serve as the database key for the item information. There is no way to generate the same key for two items that aren't the same without having to loop and compare all the already registered items.
To post a comment, please login or register a new account.