Data Packs Other

Swap Item [Data Pack]

  • 7.9k views 4 today
  • save_alt 158 downloads
Compatibility
Minecraft 1.19
to version
Minecraft 1.21
Changes include
  • Functions
  • Predicates
  • 25
  • 20
Nico4play
Lvl 61High Grandmaster Programmer
93
⚠ The Mod version of this Data Pack is available ONLY on modrinth

Swap Item

Swap items between 2 slots.

❗️Note❗️ If you use either the Data Pack or the Mod, make sure, once installed, to run the "/reload" command.

📖Features


This Data Pack allows you to swap two inventory slots between the player and an entity and even put any item in your head slot. The commands are the following:

Command
Effect

/trigger swapitem.entity.mainhand
Swap the item you are holding with the item in the mainhand slot of the entity you are looking at.
/trigger swapitem.entity.offhandSwap the item you are holding with the item in the offhand slot of the entity you are looking at.
/trigger swapitem.entity.headSwap the item you are holding with the item in the head slot of the entity you are looking at.
/trigger swapitem.entity.chestSwap the item you are holding with the item in the chest slot of the entity you are looking at.
/trigger swapitem.entity.legsSwap the item you are holding with the item in the legs slot of the entity you are looking at.
/trigger swapitem.entity.feetSwap the item you are holding with the item in the feet slot of the entity
you are looking at.
/trigger swapitem.headPuts the item you are holding in your head slot.

🎬ShowCase

📤Uninstall the DataPack


To uninstall the Data Pack run the command "/function swap_item:uninstall" .When the uninstallation process is completed a confirmation message will be sent in the chat.

🔗External links

Swap Item [Data Pack] Minecraft Data PackSwap Item [Data Pack] Minecraft Data Pack

10 Update Logs

v1.2.4 for Minecraft 1.21.6 - 22 Jun. 2025 : by Nico4play 06/22/2025 1:21:20 pmJune 22, 2025 @ 5:21 pm UTC

🔷General

  • Updated to 1.21.6

🔧Improvements

  • Slightly improved performance by stopping unnecessary commands from running
LOAD MORE LOGS

More like this

Comments are disabled.

Welcome