How to make tamed entity "sit" and "unsit" on right click

Started by Gamemaster2022 on

Topic category: Help with Minecraft modding (Java Edition)

Joined Apr 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to make tamed entity "sit" and "unsit" on right click

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

Joined Jun 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You'd have to despawn the…
Sat, 03/12/2022 - 16:33

You'd have to despawn the mob and spawn a mob with the sitting model in the same place and vice versa.

Joined Feb 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
or, if model was not an…
Sat, 03/12/2022 - 16:59

or, if model was not an issue, you could just apply slowness 255 if it doesnt have slowness and if it did clear slowness

Joined Apr 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I just want to make it stop…
Sat, 03/12/2022 - 17:51

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

Joined Jun 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Make a logic NBT tag called …
Sat, 03/12/2022 - 17:57

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).

Joined Apr 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Ok but Will it prevent from…
Sun, 03/13/2022 - 14:02

Ok but Will it prevent from teleporting to owner?

Joined Jun 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I think the "Follow Owner"…
Mon, 03/14/2022 - 03:23

I think the "Follow Owner" AI includes the teleporting, so that'd be where you put the condition.

Joined Apr 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Where do i put the NBT tag…
Fri, 07/15/2022 - 14:19

Where do i put the NBT tag tho?

Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
simple make 2 mobs 1: normal…
Fri, 07/15/2022 - 15:16

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

Joined Aug 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
how do you change the mobs…
Tue, 08/02/2022 - 21:45

how do you change the mobs though