Open BisUmTo opened 3 years ago
I can confirm the issue, although if you run the command on a piglin you get 8 as a result (the amount of slots of their hidden inventory). Still, it's inconsistent compared to other mobs, where hand items and armor equipment is also considered.
I ran a simple script to get the return value of inventory_size
for all monsters and here are the results:
blaze: 6
cave_spider: 6
creeper: 6
drowned: 6
elder_guardian: 6
ender_dragon: 6
enderman: 6
endermite: 6
evoker: 6
ghast: 6
giant: 6
guardian: 6
hoglin: 6
husk: 6
illusioner: 6
magma_cube: 6
phantom: 6
piglin: 8
piglin_brute: 6
pillager: 5
ravager: 6
shulker: 6
silverfish: 6
skeleton: 6
slime: 6
spider: 6
stray: 6
vex: 6
vindicator: 6
witch: 6
wither: 6
wither_skeleton: 6
zoglin: 6
zombie: 6
zombie_villager: 6
zombified_piglin: 6
inventory_*()
functions don't work for some living entities such aspiglins
andpillagers
How to replicate:
/script run inventory_size(p~'trace')
Aspected result: 7 (4 armor, 2 hands, 1 inventory (?)) Getted result: 5