How do I get barrels pre-loaded with items in creative mode?

On a creative mode server I play on, there are custom barrels players can use that when placed already have some items in them. I believe this is done with modifying NBT data. How can I achieve this, with plugins or in vanilla?

For reference, the server uses the following plugins: CoreProtect, Essentials, LuckPerms, NBTAPI, PlotSquared, WorldEdit. I can't use /give but can use /item and /powertool. It is on version 1.16.4.

1

1 Answer

In creative mode, when pressing ctrl + the middle mouse button (mouse wheel), you will get a copy of the item you are looking at with its NBT content. This is vanilla Minecraft. You can then just place that item wherever you want and its original content will be cloned.

That way you can clone :

  • Containers with their contents (chests, barrels, furnaces...)
  • Command Blocks with their command and state
  • Signs with the text written on it (placing it will not prompt the text)
  • Other block entities listed there
1

You Might Also Like