Item NBT Tags doesn't work/save/load correctly in any cases.

Submitted by aidanete on Tue, 07/02/2019 - 18:30
Upvotes: 3
Issue description

I don't know exactly was is happening, but the item NBT tags doesn't work any time I used them.

I've created an item that you can attach to a block, and then execute it from far away. The item should save its coordinates but when I try to execute it shows the message of non-attached that I put for these cases. I tried some other stuff with item NBT Tags and doesn't work, neither the (+NBT) thing shows up (I don't know if that should show up but doesn't show.)

Here I attach the procedures:

Attachment Size
Remote Procedure66.9 KB 66.9 KB
Attachment Procedure64.8 KB 64.8 KB
Workspace264.7 KB 264.7 KB

Issue comments

Submitted by Klemen on Wed, 07/03/2019 - 10:03

There are two cases where NBT might not work as it should

  1. You are setting it using client-side only trigger (procedure selector has computer icon next to it)
  2. You have something wrong with the procedure. Try printing procedure in the chat or in the console to see its actual values and how they change

Submitted by aidanete on Wed, 07/03/2019 - 12:11

I'm not setting any client-side only trigger. I did the printing procedure and I can see that all values remain on -1.

Submitted by Klemen on Wed, 07/03/2019 - 12:19

Please attach a workspace with printing here and tell me which mod elements to check.

Submitted by aidanete on Wed, 07/03/2019 - 13:05

Done. The elements are PROAttachRemote, PRODetonateRemote and the item that uses them is RemoteDetonator

Submitted by Klemen on Wed, 07/03/2019 - 13:47

RemoteDetonator ony seems to be using attachremote.

Submitted by aidanete on Wed, 07/03/2019 - 13:50

Yes, and from attachremote it executes detonateremote

Submitted by Klemen on Wed, 07/03/2019 - 13:57

I have found the bug. The issue is that now MCreator by default copies the provided itemstack to a new stack due to some other issues. This causes that set nbt tag procedure sets it on the copy and not on the original itemstack.

I will revert the behavior so by default itemstack is not copied but referenced and require explicit copy for cases where copy is required.

This bug will be fixed in the next update. Thank you for your bug report.