yeelp / Distinct-Damage-Descriptions

Adding physical D&D-style damage types to Minecraft to deepen the combat
MIT License
8 stars 4 forks source link

[Suggestion] NBT:Location of NBT #87

Closed undyingtheglass closed 1 year ago

undyingtheglass commented 1 year ago

yeelp,I think DDD mod is fabulous, but I found a problem with DDDMOD (I'm not sure if it's intentional or not configured): NBT is not displayed in the correct position, and in general, NBT data for an item will be displayed inside the main compound:tag 11 (2) (It's the part framed by the red thread) But the NBT data stored by this mod is here KJDCM51NJ3)22NCH7A4WH42 So, this leads to a problem: I can't set the damage type via NBT, which is fatal for some mods (mods like slashblade that rely on NBT to distinguish between different items) I hope you can put the NBT of this mod into the main compound, which makes this mod more customizable

Finally, thank you for making us use such a fun mod, I believe that with our joint efforts, this mod will definitely get better PS:My English is poor, so there may be some when reading... Strange or impolite, please don't care, if there is something unclear, please let me know, I will explain

yeelp commented 1 year ago

Thanks for the suggestion! However, I do not manually serialize NBT data. DDD's information is stored as a Forge Capability, and Forge's Capability system works wonders. This is just how Forge stores capabilities; as it's own NBT compound tag. I believe this is for a specific reason, though not sure exactly why.

Could you explain why this causes a problem? Specifically, when you mentioned:

(mods like slashblade that rely on NBT to distinguish between different items)

Why is the fact that Slashblade relies on NBT to distinguish between different items problematic? Could you provide a description of what it is you are trying to do, what you believe the intended behavior is, and what happens instead? There may be other options to resolve the issue.

undyingtheglass commented 1 year ago

I'm sorry I just saw your question now,So let me describe the problem I encountered. Let me give you an example, in the slashblade mod, some items share an item ID, like this: QQ截图20221126180431 QQ截图20221126180527 In fact, most of the items in this mod use the same ID, which means that I can't use the item ID to edit the damage types of different items After exploring it myself, I found that for this situation where multiple objects share an item, using NBT to modify the damage type should be the most convenient solution,but I found two problems when editing item damage using NBT, the first is what I said before: NBT is not in the home directory, which prevents me from modifying the damage type through CraftTweaker or other mods, the second is when I try to modify the damage type by modifying the NBT If I change a damage type, the damage type of all items (except those written in the configuration file) will become the one I modified (e.g. I changed the damage type of the iron ingot, but the damage type of dirt was changed)

undyingtheglass commented 1 year ago

I'm sorry, my previous description doesn't seem clear and concise, I hope this mod can edit damage types for different items of the same item id through NBT, and can modify this NBT with CraftTweaker, but this mod currently places NBT outside the main directory, which makes me unable to modify it through CraftTweaker, if I modify NBT directly, It will cause all the damage types of unconfigured items to become the damage type I modified, finally, wish your mod to get better!

yeelp commented 1 year ago

Ah I see. I have a slightly better configuration system planned in #82 which would allow for stuff like this. Currently on my todo list.