-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Doesn't work with ByteItems #11
Comments
There is an API for ByteItems: https://github.com/randombyte-developer/byte-items/blob/master/src/main/kotlin/de/randombyte/byteitems/ByteItemsApi.kt I guess in this method it could first be checked if the given ID has the ByteItems prefix. The IDs in ByteItems are like this Ofc I don't know the inner workings of Pieconomy and don't know if this could be just added that simply. If ByteItems integration is even considered a goal. In general, I guess ByteItems was requested because it saves every data from the ItemStack (custom display name, enchantments, other custom things) and not just a variant number. This would mean Pieconomy would have to compare items "deeply", so comparing the whole data individually and not just the ID and variant number. So after renaming a gold ingot in an anvil, it would no longer be recognized by Pieconomy, because the data is different. |
I don't think I'll be adding support for ByteItems. Right now, items are recognized by ID and data value only, and this would require deep checking, as @randombyte-developer pointed out. If the API became more fleshed out, where there would be a catalog type for byte objects and methods to get an itemstack's byte item or check if an itemstack is a particular byte item, I would consider adding it. |
I always thought about adding some data to the byte items when given to the player. That data would contain the ID from the byte items config. Which then could be used to identify which item it actually is. Until now, I have decided against that because that information could just be out of date (a.k.a the config was changed and the data on the items didn't). |
A catalog type is a programmatic implement; they don't have to persist between server instances. All that gets persisted is the ID, and Sponge gracefully handles data it can't deserialize. Your adding custom data to identify byte items - you're on the right track there, and this would fix the anvil renaming problem. But issues with that would be strictly your field. What I would need is simply a way to tell what byte type an item is, if any. Preferably with a catalog type and associated registry module, but that's in no way a requirement. |
I'm trying to make the plugin work with ByteItems. I have a custom item with the id 'sterling_coin' and in the Pieconomy config it's written as 'byte-items:sterling_coin.'
Is there any way this could be implemented or is there something I'm doing wrong?
The text was updated successfully, but these errors were encountered: