Compatibility
Minecraft: Java Edition
1.21.8
1.21.4
1.21.1–1.21.2
Platforms
Supported environments
Creators
Details
Licensed LGPL-3.0-or-later
Published 5 months ago
Updated 2 weeks ago
Changelog
-
New Class:
PlayerInventory
The player's inventory can now be accessed programmatically through thePlayer.inventory
property.- Slot indices follow vanilla layout:
0–8
: hotbar9–35
: main inventory36–39
: armor slots (feet → head)40
: offhand
- Use
player.inventory[i]
to read/write items. - Access the currently selected hotbar index via
inventory.selectedSlot
. - New method:
PlayerInventory:clear()
wipes all slots.
- Slot indices follow vanilla layout:
-
New Method:
Item:copy()
Creates a deep copy of the item.
Useful for duplicating stacks or preserving originals before modification. -
New Methods for Equipment Handling on
LivingEntity
:LivingEntity:getEquipment(slot)
Returns theItem
in a specific equipment slot.LivingEntity:setEquipment(slot, item)
Places an item into the specified slot.
Slot Names:
"mainhand"
,"offhand"
,"feet"
,"legs"
,"chest"
,"head"
,"body"
(Use lowercase names as strings.)
Files
Metadata
Release channel
ReleaseVersion number
2.2.0-1.21.1Loaders
Game versions
1.21.1Downloads
14Publication date
June 9, 2025 at 8:57 PMPublisher

mickkay
Member