[Solved]Is there an API yet that controls mobs breaking blocks?

Hello So I’m looking for a class in the API that would break a block infront of a Entity say Zombie. Sort of like how they use to break down doors. Is this planned? is there a class? Please let me know and point me in the right Direction. Thank you

1 Like

I think you are looking for a org.spongepowered.api.entity.ai.task.builtin.creature.AITask. There are some tasks in the SpongeAPI like AttackLivingAITask which is basically the NMS EntityAIAttackMelee class. For breaking doors there is the NMS class EntityAIBreakDoor but no SpongeAPI counterpart. You can open an issue here or try to do it yourself and PR it back.

2 Likes

please excuse my noobishism … what’s nms stand for? Normal Minecraft System?

net.minecraft.server

It’s a long standing nickname for code that bypasses API’s and taps straight into Minecraft code due to looking at the source of said plugins, and seeing hard references to net.minecraft.server everywhere.

But in this case is being used to literally mean a class somehwhere under that package name.

Brilliant! Thanks for that!