ArmorStand, Villager, ItemFrame, FallingBlock, AreaEffectCloud

Entity Subtypes

These classes extend Entity with type-specific properties. They are returned automatically when the bridge detects the entity type, or can be used to wrap an existing entity handle.

ArmorStand

ArmorStand entity with pose and equipment properties.

stand = ArmorStand(handle=some_handle)
stand.small = True
stand.arms = True
stand.visible = False
stand.head_pose = {{"x": 0.0, "y": 45.0, "z": 0.0}}

Properties

All properties support both get and set.

PropertyTypeDescription
smallboolWhether armor stand is small
visibleboolVisibility (inverted from isInvisible)
armsboolWhether armor stand has arms
base_plateboolWhether armor stand has a base plate
markerboolWhether armor stand is a marker (no hitbox)
head_poseEulerAngleHead rotation
body_poseEulerAngleBody rotation
left_arm_poseEulerAngleLeft arm rotation
right_arm_poseEulerAngleRight arm rotation
left_leg_poseEulerAngleLeft leg rotation
right_leg_poseEulerAngleRight leg rotation

Villager

Villager entity with profession, trade properties, and merchant recipes.

villager = Villager(handle=some_handle)
villager.profession = "LIBRARIAN"
villager.villager_type = "PLAINS"
villager.villager_level = 3

# Add a trade: 10 emeralds for a diamond
villager.add_recipe(
    result={{"type": "DIAMOND", "amount": 1}},
    ingredients=[{{"type": "EMERALD", "amount": 10}}],
    max_uses=16,
    experience_reward=True,
    villager_experience=5,
)

# Read all trades
for recipe in villager.recipes:
    print(recipe["result"], recipe["ingredients"])

# Clear all trades
villager.clear_recipes()

Properties

PropertyTypeDescription
professionstrVillager profession (get/set)
villager_typestrBiome type (get/set)
villager_levelintTrade level (get/set)
villager_experienceintExperience points (get/set)
recipeslist[dict]Merchant trade recipes (get/set)
recipe_countintNumber of trade recipes (get)

Methods

MethodReturnDescription
add_recipe(result, ingredients, max_uses=1, experience_reward=True, villager_experience=0, price_multiplier=0.0, demand=0, special_price=0)NoneAdd a trade recipe
clear_recipes()NoneRemove all trade recipes

Recipe Dict Format

Each recipe is a dict with these keys:

KeyTypeDescription
resultdictSerialized ItemStack for the result
ingredientslist[dict]List of serialized ItemStack dicts (1-2)
maxUsesintMax uses before trade locks
usesintCurrent number of uses
experienceRewardboolWhether trade gives XP
villagerExperienceintXP given to the villager
priceMultiplierfloatDemand-based price multiplier
demandintCurrent demand
specialPriceintSpecial price adjustment

ItemFrame

ItemFrame entity with item and rotation.

frame = ItemFrame(handle=some_handle)
frame.item = some_item
frame.rotation = "CLOCKWISE_45"
frame.fixed = True

# Remove item
del frame.item

Properties

PropertyTypeDescription
itemItemItem in frame (get/set/delete)
rotationstrItem rotation (get/set)
fixedboolWhether frame is fixed/immovable (get/set)
item_drop_chancefloatDrop chance when broken (get/set)

FallingBlock

FallingBlock entity (a block affected by gravity).

fb = FallingBlock(handle=some_handle)
mat = fb.material
fb.drop_item = False
fb.can_hurt_entities = True
fb.damage_per_block = 2.0

Properties

PropertyTypeDescription
materialAnyBlock material (read-only)
drop_itemboolDrop item on landing (get/set)
can_hurt_entitiesboolWhether it damages entities (get/set)
damage_per_blockfloatDamage per block fallen (get/set)
max_damageintMaximum damage (get/set)

AreaEffectCloud

Lingering potion cloud entity.

cloud = AreaEffectCloud(handle=some_handle)
cloud.radius = 5.0
cloud.duration = 200
cloud.particle = "SPELL_MOB"

Properties

PropertyTypeDescription
radiusfloatCloud radius (get/set)
colorAnyParticle color (get/set)
durationintDuration in ticks (get/set)
wait_timeintTicks before affecting entities (get/set)
radius_on_usefloatRadius reduction on use (get/set)
radius_per_tickfloatRadius change per tick (get/set)
particleAnyParticle type (get/set)