Started by
Gamemaster2022
on
Topic category: Help with Minecraft modding (Java Edition)
Hello, I am working on my mob And I've added new entity that Is tameable. I want to make it to "sit" on right click and also "unsit" on repeated right click. Does anybody know how to do it? Thank you
You'd have to despawn the mob and spawn a mob with the sitting model in the same place and vice versa.
or, if model was not an issue, you could just apply slowness 255 if it doesnt have slowness and if it did clear slowness
I just want to make it stop at one place and don't teleport to player.
To answer yaboytommy123, I have no sitting model so this is not a problem.
To ASulkyDragon, this idea is good, but it still teleports to player and I don't want it to do that. Trust me. I have tried this one
Make a logic NBT tag called "sitting." On entity right click, if "sitting," set "sitting" to false, else set "sitting" to true. Make a procedure that returns the "sitting" tag and use it in the AI conditions (at least, I think that's part of the AI).
Ok but Will it prevent from teleporting to owner?
I think the "Follow Owner" AI includes the teleporting, so that'd be where you put the condition.
Where do i put the NBT tag tho?
simple make 2 mobs
1: normal mob
2: the sitting version
on right click it will change a variable that determiens if its sitting or not
the sitting one will have movement speed of 0
how do you change the mobs though