[SOLVED] Here's my buggy code for the attack animation

Started by trav on

Topic category: Help with Minecraft modding (Java Edition)

Joined May 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
[SOLVED] Here's my buggy code for the attack animation
Fri, 05/23/2025 - 19:21 (edited)

Here's my buggy code for the attack animation, if anyone could help me out, I'd greatly appreciate it.

It's in the new version, so it's in the new snapshot, 1.21.4-2025.2

https://limewire.com/d/t5tzP#l4TRp1h8dy

 

Edited by trav on Fri, 05/23/2025 - 19:21
Your behavioral…
Thu, 05/22/2025 - 19:36

Your behavioral characteristic is "Creature" which does not have correct attack system since it is meant for passive living entites.

Setting that to "Mob" fixes the problem and animation works correctly :)

Joined May 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thank you for your help! …
Thu, 05/22/2025 - 20:07

Thank you for your help! ...but now the mob won't spawn during the daytime, and I need it to be able to do that, as the dimension it lives in is always day.

Previously, setting it to creature was my fix for it, but I need something else now. I've heard that procedures don't work very well with it though...

Joined May 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I did try procedures, and…
Fri, 05/23/2025 - 17:24

I did try procedures, and they spawned, but they spawned WAY too frequently. I don't know if it's controlled by spawn type, but I didn't think it was. (You probably know better than me though since you created it lol)

Joined May 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
So, I tried changing it to…
Fri, 05/23/2025 - 17:42

So, I tried changing it to spawn in the biome with a creature spawn type, but it did not work sadly. I also tried making it spawn in the biome through the biome itself, but that also didn't work, even when I set the spawn weight to 500.

Joined May 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I've figured it out! I…
Fri, 05/23/2025 - 18:43

I've figured it out! I managed to create a procedure that checks if there is one of these entities within a radius, and if not, it spawns one!

Thanks for all of your help! I greatly appreciate it!