How to modify item NBT of barrel to set the inventory to a specific amount of items?

Started by Daddy99_2022 on

Topic category: Help with modding (Java Edition)

Last seen on 19:02, 28. Jan 2024
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to modify item NBT of barrel to set the inventory to a specific amount of items?

I am trying to modify the NBT data of a barrel (the inventory part) to set a specific amount of items.  I am trying to make a command to set the signal strength of a barrel. For example, signal strength 1 would be a singular item (of whatever item); However for signal strength 9, it would be 15 stacks and 28 of an item.  How can i do this?

Last seen on 20:08, 17. Apr 2024
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Those properties are hard…
Sun, 01/28/2024 - 17:53

Those properties are hard coded, they aren't controlled by NBT tags. If you wanted to do this, you would need to create a custom storage block. Comparator outputs are also determined automatically by inventory size, so I'm not sure if there's a way to set this manually.