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

Started by Cosmic_Mango33 on

Topic category: Advanced modding

Joined Oct 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How do I make a snail hide in its shell when attacked?

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.

Joined Oct 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • 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.

Joined Jul 2022
Points:

User statistics:

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

Use Geckolib or change mob

Joined Jul 2022
Points:

User statistics:

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

Despawn current mob and spawn another form

Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • 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