
Guard Wolves: a Minecraft plugin I shouldn't have been able to build
I run a small Minecraft server for friends. We had a problem: every time we'd go exploring, mobs would wreck our base. The obvious solution? Guard dogs. Minecraft has wolves, they can be tamed, but tamed wolves are useless as guards. They either sit there doing nothing or follow you around like lost puppies. I wanted wolves that would stay at a location, patrol a radius, and attack hostile mobs. Basically guard dogs. Minecraft doesn't have that. The language I'd never seen The way to script custom behavior in Minecraft (without writing a full Java plugin) is DenizenScript . It's a YAML-like scripting language specific to Minecraft servers. It has its own syntax, its own commands, its own way of handling entities, events, and flags. I'd never written a line of it. My day job is TypeScript. DenizenScript looks like this: - if <[wolf].location.distance[<[guard_center]>]> > 15 : - walk <[wolf]> <[safe_center]> speed:0.3 - flag <[wolf]> return_attempts:++ That's not YAML. That's not any lan
Continue reading on Dev.to
Opens in a new tab


