NBT data of block in inventry not being transferred when placed

Started by TheBiscuit on

Topic category: Help with Minecraft modding (Java Edition)

Joined Aug 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
NBT data of block in inventry not being transferred when placed

I have a block in my inventory with NBT data, which I was able to verify by having the data displayed in the lore. However, when the block is placed, the NBT data is not carried, which I tested with a procedure that checks the nbt value of the block when its placed. Why is this, and how can I make the data transfer?

Joined Dec 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
how are you putting the tags…
Mon, 10/06/2025 - 07:34

how are you putting the tags on the item?

Joined Sep 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
add procedure - if block…
Mon, 10/06/2025 - 12:00

add procedure - if block placed, when place copy NBT on item in you hand and set on block what placed, can be help

 

Joined Dec 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
can you send a picture of…
Mon, 10/06/2025 - 12:49

can you send a picture of the procedure(s)?

Joined Aug 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I have been manually adding…
Mon, 10/06/2025 - 21:16

I have been manually adding nbt data with commands and verifying it with this procedure: 

 

public class SpecialInformationProcedure {
public static String execute(ItemStack itemstack) {
return itemstack.getOrCreateTag().getDouble("luck") + ".";
}
}
I apologize for not knowing how to upload images, this code block is the best I can do