How do I make a snail hide in its shell when attacked?

Started by Cosmic_Mango33 on Thu, 10/27/2022 - 16:14

Topic category: Advanced modding

Last seen on 15:10, 2. Jan 2023
Joined Oct 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
How do I make a snail hide in its shell when attacked?
Thu, 10/27/2022 - 16:14

I'm trying to make my snail mob hide in its shell for thirty seconds after being hit, but I don't know where to start with this.

Last seen on 01:57, 29. Jan 2023
Joined Jul 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Use Geckolib, you can make…
Thu, 10/27/2022 - 19:58

Use Geckolib, you can make an animation to do that.

Last seen on 15:10, 2. Jan 2023
Joined Oct 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
I've tried using GeckoLib…
Fri, 10/28/2022 - 03:08

I've tried using GeckoLib before, but it messes up all my previously made models.

Last seen on 13:13, 5. Dec 2022
Joined Jul 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Use Geckolib or change mob
Sun, 10/30/2022 - 05:34

Use Geckolib or change mob

Last seen on 13:13, 5. Dec 2022
Joined Jul 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Despawn current mob and…
Sun, 10/30/2022 - 05:34

Despawn current mob and spawn another form

Last seen on 22:40, 26. Jan 2023
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
if - entity attacked despawn…
Thu, 12/01/2022 - 14:34

if - entity attacked

despawn event/target entity

summon entity of type: “snail in shell”

wait 600 on server side

get health of “snail in shell” set as variable health new

despawn nearest entity of type “snail in shell”

summon new entity “snail”

set health of nearest entity of type “snail” to health variable

 

you can add geckolib animations if you want