EntityHelpers
Lets scripts identify entity helpers through the EntityHelpers global,
without knowing their Java package names.
Checks follow helper inheritance, not entity registry IDs. These are Java types,
so their existing constructors and static members are also available. The group members are read-only. Listing a type here does not change which helper a factory returns.
js
const entities = World.getEntities();
if (entities !== null) {
for (const ent of entities) {
if (ent instanceof EntityHelpers.Horse) {
Chat.log(ent.getVariant());
}
}
}These names are available in JavaScript and Python without importing anything. They are read-only aliases of Java types, so instanceof works as usual.
| Script name | What it is |
|---|---|
EntityHelpers.AbstractHorse | Provides shared APIs for horses, donkeys, mules, and llamas. |
EntityHelpers.AbstractPiglin | Provides the shared zombification-immunity query for piglins. |
EntityHelpers.Allay | Provides access to an allay's dancing, duplication-cooldown, and held-item states. |
EntityHelpers.Animal | Provides food checks and breeding eligibility for animals. |
EntityHelpers.AreaEffectCloud | A lingering area-effect cloud applies its potion effects over time. |
EntityHelpers.ArmorStand | Reads an armor stand's flags and six pose rotations. |
EntityHelpers.Arrow | An arrow projectile, including ordinary, tipped, and spectral arrows. |
EntityHelpers.Axolotl | Provides access to an axolotl's variant, playing-dead state, and bucket-origin flag. |
EntityHelpers.Bat | Provides access to a bat's resting state. |
EntityHelpers.Bee | Provides access to a bee's nectar, anger, and sting states. |
EntityHelpers.Blaze | Provides helper access to a blaze. |
EntityHelpers.BlockDisplay | Provides access to the block state displayed by a block display entity. |
EntityHelpers.Boat | A helper for boats and rafts, including their chest variants. |
EntityHelpers.Cat | A tameable cat with a coat variant and collar colour. |
EntityHelpers.ClientPlayer | Provides client-side operations for the local player. |
EntityHelpers.Creeper | Reads a creeper's powered and ignited states and fuse counters. |
EntityHelpers.Display | Provides properties shared by block, item, and text display entities. |
EntityHelpers.Dolphin | Provides access to dolphin-specific state, including whether it carries a fish, its treasure destination, and its moisture level. |
EntityHelpers.Donkey | Provides horse APIs for donkeys and mules, including whether a chest is attached. |
EntityHelpers.Drowned | Provides access to drowned-specific checks for held tridents and nautilus shells. |
EntityHelpers.EndCrystal | Exposes an end crystal's base-display flag and optional beam target. |
EntityHelpers.EnderDragon | Provides access to the ender dragon's current phase and its eight body parts. |
EntityHelpers.Enderman | Provides access to an enderman's target-related flags and carried block state. |
EntityHelpers.Entity | Wraps a Minecraft entity for script access. |
EntityHelpers.FallingBlock | Represents a block moving as a falling entity, exposing its origin and block state. |
EntityHelpers.Fish | Helper for fish entities. |
EntityHelpers.FishingBobber | A fishing bobber projectile, with access to its bite and open-water state and hooked entity. |
EntityHelpers.Fox | Provides access to a fox's held item, trusted entities, variant, and behavior states. |
EntityHelpers.Frog | Provides variant, tongue-target, and croaking-state information for a frog. |
EntityHelpers.FurnaceMinecart | Provides access to the furnace minecart's displayed furnace lit state. |
EntityHelpers.Ghast | Provides access to whether a ghast is charging its fireball attack. |
EntityHelpers.Goat | Provides access to whether a goat is a screaming goat and which horns remain. |
EntityHelpers.Guardian | Provides access to guardian-specific state, including elder status, attack target, and movement state. |
EntityHelpers.Horse | Provides access to horse coat and markings data in addition to AbstractHorseEntityHelper. |
EntityHelpers.Illager | Provides access to illager state shared across specialized illager helpers. |
EntityHelpers.Interaction | Exposes an interaction entity's dimensions, response flag, recorded living entities, and client-side hit override. |
EntityHelpers.IronGolem | Provides access to iron-golem state, including whether it was player-created. |
EntityHelpers.Item | A dropped stack of items in the world. |
EntityHelpers.ItemDisplay | Displays an item entity; its displayed stack is empty when no item is set. |
EntityHelpers.ItemFrame | Provides the item frame's type, displayed-item rotation, and item stack. |
EntityHelpers.Living | Adds living-entity state, such as health, equipment, and status effects, to an entity helper. |
EntityHelpers.Llama | Provides llama coat, strength, and trader status alongside the chested-horse APIs inherited from DonkeyEntityHelper. |
EntityHelpers.Merchant | Helpers for villagers and wandering traders, which share the game's merchant base class. |
EntityHelpers.Mob | Wraps a Minecraft mob and exposes its mob-specific state. |
EntityHelpers.Mooshroom | Provides access to a mooshroom's variant and whether it is ready for shearing. |
EntityHelpers.Ocelot | Provides access to an ocelot's trust state. |
EntityHelpers.Painting | Reads a painting's variant dimensions and registry identifier. |
EntityHelpers.Panda | Provides access to a panda's genes and current behavior states. |
EntityHelpers.Parrot | A helper for a parrot entity. |
EntityHelpers.Phantom | Provides access to a phantom's size, which scales its dimensions and sets its base attack damage to 6 plus the size. |
EntityHelpers.Pig | Provides pig-specific access to saddle state. |
EntityHelpers.Piglin | Provides access to the piglin's current arm-pose states. |
EntityHelpers.Pillager | Provides access to a pillager's entity-helper API, including a check for a white banner in its head slot. |
EntityHelpers.Player | Provides player-specific entity data, including experience, score, and sleep state. |
EntityHelpers.PolarBear | Provides access to a polar bear's standing state. |
EntityHelpers.Pufferfish | Provides access to a pufferfish's inflation state. |
EntityHelpers.Rabbit | Wraps a rabbit and exposes its variant, including the killer bunny variant. |
EntityHelpers.Sheep | Provides access to a sheep's wool state and color. |
EntityHelpers.Shulker | Provides access to a shulker's shell state, attachment face, and optional dye color. |
EntityHelpers.Slime | Provides access to a slime's size and whether it is tiny. |
EntityHelpers.SnowGolem | Provides access to a snow golem's pumpkin and shearing state. |
EntityHelpers.SpellcastingIllager | Provides spell-casting state and the mapped spell name for a spellcasting illager. |
EntityHelpers.Spider | Provides access to a spider's climbing state through isClimbing(). |
EntityHelpers.Strider | Provides access to a strider's saddle and suffocating state. |
EntityHelpers.Tameable | Helpers for tameable animals, including wolves, cats, and parrots. |
EntityHelpers.TextDisplay | Exposes the client-built render state for a text display; getData() returns null until it exists. |
EntityHelpers.Tnt | Represents primed TNT; its fuse can be read with getRemainingTime(). |
EntityHelpers.TntMinecart | Provides fuse and primed-state queries for TNT minecarts. |
EntityHelpers.Trident | A helper for querying a thrown trident's stored loyalty level and foil state. |
EntityHelpers.TropicalFish | Provides a tropical fish's pattern, body size, and base and pattern colours. |
EntityHelpers.Vex | Provides access to a vex's charge state. |
EntityHelpers.Villager | A villager helper exposing the villager's profession, type, level and experience. |
EntityHelpers.Vindicator | Provides access to vindicator-specific helpers, including a custom-name-based Johnny check. |
EntityHelpers.Warden | Provides access to a warden's anger, poses, and sonic-boom animation state. |
EntityHelpers.Witch | Provides access to a witch's drinking state and main-hand item. |
EntityHelpers.Wither | Provides access to the wither's invulnerability countdown and health-based phase state. |
EntityHelpers.WitherSkull | A wither skull projectile, with access to its dangerous flag. |
EntityHelpers.Wolf | Provides access to wolf-specific state, including taming, collar color, begging, anger, and wetness. |
EntityHelpers.Zombie | Provides access to zombie-specific properties, including whether drowned conversion is active. |
EntityHelpers.ZombieVillager | Provides access to a zombie villager's conversion state and villager data. |