function ui_1(player) {
const form = new ActionFormData()
.button("test1")
.button("test2")
.show(player).then(r=>player.sendMessage(`${r.selection}`))
}
world.afterEvents.entityHitEntity.subscribe(evd=>{
if (!(evd.damagingEntity instanceof Player)) return;
if (evd.hitEntity.typeId !== "minecraft:villager") return;
ui_1(evd.damagingEntity)
})```
#how do you make a mob that opens form when hit?
1 messages · Page 1 of 1 (latest)