Data Packs Simple

Undying Pets

  • Functions
  • 4,975 views • 1 today
  • 221 downloads • 0 today
  • 16
  • 11
  • 2
Sunset_Moth
Level 24 : Expert Pixel Painter
13
This is no longer supported, in favor of Soul Link! It does similar stuff and sets itself up now.

! YOU MUST RUN THE INIT FUNCTION FOR THIS TO WORK !
! MAKE BACKUPS JUST IN CASE !


Pets (tamed cats, parrots,) become ghosts upon death (undying, glowing) and respawn at midnight. Incredibly simple, single-feature datapack. Does not require them to be named, but announces their death using their name if they have one.

Wolves respawn.
Cats respawn.
Parrots respawn.

Nothing else does.

Known bugs:
  • Parrots die for good if given a cookie (Unfixable)
  • Pets may become ghosts the first time they're loaded. (Workaround: Run the initialization function while all pets are already loaded.)
  • Mobs continue trying to attack ghosts if they were already doing so when the pet died. (Unfixable)
  • Ghosts are not affected by gravity.
  • Ghosts respond to the moon even when it isn't visible.
  • Parrots do not respawn if on your shoulder at midnight. (Unfixable)
Might add a bit of polish (i.e. more fanfare on pets dying/respawning) but otherwise I'm done.
CreditBertiecrafter, for Pet Heaven, which I used as syntax reference while making this since I didn't know how to perform certain checks and the wiki wasn't helping.
CompatibilityMinecraft 1.16
Tags

  Have something to say?

GuilleExe98
07/14/2020 2:52 pm
Level 7 : Apprentice Modder
I killed my cat, there´s no ghost, and y have no cat :(
1
Sunset_Moth
07/23/2020 9:28 am
Level 24 : Expert Pixel Painter
Did you run the initialization function and make a backup like the giant yellow and red text said?
2

Welcome