Started by
MrScautHD
on
Topic category: Help with Minecraft modding (Java Edition)
Hello, so I created a procedure that is triggered under block tick. As shown in the procedure (see attached) I have added many prints that include, the item in slot 0, the nbt value of "Energy" in accordance with the item in slot 0 before and after the change. All prints work and show their respected values, however, the NBT change doesn't happen. This led me to believe it was an issue with the, [Get copy of item in slot 0] procedure block, however it returns correctly. Attached gives the workspace and the procedure.
File:
https://cdn.discordapp.com/attachments/724161404180889630/7333481836141…
Edited by MrScautHD on Fri, 07/17/2020 - 19:18
pls help :(
every time you call the "get a copy..." code block it makes a new itemstack that's a copy of the old one. you're not saving the copy anywhere so its lost. why use a copy anyway? why not just use the original itemstack?
how?
how make this with the Original itemstack?
i was wrong. i looked at the generated code and seems like its returning the itemstack.
you change a lot of nbt tags in that procedure, does the other nbt tags get saved correctly?
yes the other is correctly but the other is a block and not a item only the item is not working
just because you stated your issue so clearly, i am compelled to help find the problem. i've never used the 1.15.2 generator before so i had to create a new 1.15.2 project just to see what was going on (on the 1.12.2 generator using that red code block gives you the actual itemstack but 1.15.2 generator makes a copy)
from what i've found, a simple way to solve this is to put the copy back into the slot after you've changed the itemstack, like so:
thx :)