Blocks from several mods keeping NBT data
jezzen opened this issue ยท 14 comments
Issue type:
- ๐ Bug
- โ Question
Short description:
Some blocks from CapabilityProxy, ColosssalChests, EvilCraft, and Structured Crafting are keeping NBT data of their position and rotation when broken.
Uncolossal Chest (Chests walls and cores seem to be fine)
Box of closure (So far, no access to more advanced machines yet)
Structured Crafter
I previously opened issues in CapabilityProxy and StructuredCrafting asking about this, then realized that they are from the same author and opted to close them in favor of one here.
Versions:
- This mod: CyclopsCore-1.12.2-0.11.5
- Minecraft: 1.12.2
- Forge: 14.23.2.2654
๐ Thanks for opening your first issue here! ๐ Please be sure to follow the issue template.
Indeed, that's because of an abstraction in the CyclopsCore base tile entity.
Is this causing any issues for you?
One problem that this causes is that it breaks the ability to do NBT filtering, since items that are the same for all intents and purposes have different NBT tags. Perhaps we could fix this the way McJty's mods do, with their split writeRestorableToNBT function.
The main issue is that it prevents such items from stacking. Even a simple shapeless crafting recipe to the same block would be enough to prevent having an inventory full of the crafters, etc. you just broke. Not sure how well that would work for the box of closure, but for now I just have a set of CraftTweaker scripts for it so I can keep them all my proxies and crafters in 1 stack.
Same problem with EC blocks: #109
Yeah, that's why I only really did the crafters and proxies. I hadn't even gone far enough into Modern Skyblock to worry about EvilCraft.
Out of curiosity, I went through the documentation a bit and came up with this. Added the .txt to be able to upload the file, it just needs to be removed. You'll have to add in the appropriate items to the list and check the names of the nbt tags added and change the names in the file.
removeNBT.zs.txt
Not sure how well it would work, but it should give you a starting point.
Documentation references for if you want to have a look, edit the script, etc.:
Recipe functions
Item Stack
Arrays and Loops
I don't have them on hand (deleted and reinstalled the pack), but the scripts were just addshapeless(item, item) or however the crafttweaker function goes. It's just trading in the said item for a new default one.
Looking back at the documentation it should be:
recipes.addShapeless(item,[item]);
Wouldn't that also strip things like the Box of Eternal Closure's contents? I was thinking of rules that would preserve most of the item's data, stripping only the offending tags, or at least would preserve the tags that the items need to work. Unfortunately, I can't seem to find the ModTweaker docs for handling NBT tags.
Unfortunately, your links don't seem to work. Whatever they've done to the CraftTweaker wiki, it (ETC) doesn't seems to want to show either its "tour-guide" sequence or a limited tree of topics. -- and any page that's not covered by the tree (like IIngredient) gets redirected to home. I can't find any of the pages I remember that discussed NBT tag handling.
Somebody back there has forgotten the advantages to a wiki's free-form structure. This business of trying to force access to the whole wiki into a single tutorial tree (as opposed to having individual tutorial pages) is for the birds. :-(
Strange, could be a cookies thing or something? Well, it's all in the menu on the left (button to bring it up to the left of the search bar in the top right)
Path to the ones I linked are:
Advanced Functions > Arrays and Loops
Vanilla > Items > IItemStack
Vanilla > Recipes > Crafting Table Recipes > Recipe Functions