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

Started by Gamemaster2022 on

Topic category: Help with Minecraft modding (Java Edition)

Active 5 days ago
Joined Apr 2021
Points:
665

User statistics:

  • Modifications: 1
  • Forum topics: 15
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 37
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

Active 1 year ago
Joined Jun 2021
Points:
623

User statistics:

  • Modifications: 0
  • Forum topics: 12
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 31
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.

Active 3 years ago
Joined Feb 2022
Points:
486

User statistics:

  • Modifications: 0
  • Forum topics: 2
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 11
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

Active 5 days ago
Joined Apr 2021
Points:
665

User statistics:

  • Modifications: 1
  • Forum topics: 15
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 37
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

Active 1 year ago
Joined Jun 2021
Points:
623

User statistics:

  • Modifications: 0
  • Forum topics: 12
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 31
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).

Active 5 days ago
Joined Apr 2021
Points:
665

User statistics:

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

Ok but Will it prevent from teleporting to owner?

Active 1 year ago
Joined Jun 2021
Points:
623

User statistics:

  • Modifications: 0
  • Forum topics: 12
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 31
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.

Active 1 year ago
Joined Apr 2022
Points:
456

User statistics:

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

Where do i put the NBT tag tho?

Active 3 years ago
Joined Aug 2022
Points:
382

User statistics:

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

how do you change the mobs though