Bug Closed · Invalid

BUG - "onDamaged" trigger doesn't work with armorstand type

#4890 opened by Unknown 2 years ago

Unknownreported this bug

Summary

"onDamaged" trigger doesn't work with armorstand type mobs.

Steps to reproduce

  1. Create and armorstand type mobs with an onDamaged trigger skill, see example below
armorstanddummy:
  Type: ARMORSTAND
  Display: 'Test-Stand'
  Health: 100 #i don't think armorstands can even have health now
  Options:
    AlwaysShowName: true
  Skills:
  - message{m="<caster.name>&f<&co> You just attacked me."} @trigger ~onDamaged # doesn't work
  - message{m="<caster.name>&f<&co> You just interacted with me."} @trigger ~onInteract
  1. Spawn the mob in-game
  2. Attack it with left-click

Current behavior

The trigger is not detecting and the skill isn't fire off.

Intended correct behavior

The trigger is detected and the skill fires off.

Server log file

https://paste.helpch.at/telusewaja.csharp

Video to illustrate the issue

NEW VIDEO COMING SOON

Version Info

> version MythicMobs
[11:32:51 INFO]: MythicMobs version 5.6.1-${CI_COMMIT_SHORT_SHA}
[11:32:51 INFO]: The total solution for all things mob-related.
[11:32:51 INFO]: Author: Lumine
> version
[11:33:09 INFO]: Checking version, please wait...
[11:33:09 INFO]: This server is running Paper version git-Paper-436 (MC: 1.20.4) (Implementing API version 1.20.4-R0.1-SNAPSHOT) (Git: 850b736)
You are 27 version(s) behind
Download the new version at: https://papermc.io/downloads/paper
Previous version: git-Paper-409 (MC: 1.20.4)```
Unknowncommented

Have you tried "~onDamaged"? I'm pretty sure that the "~onAttack" trigger only activates when the armor stand performs an attack (never).

Unknowncommented

I should not write issues early in the morning, without coffee. I apologize for any confusion.

The original issue was discovered with onDamaged and my un-caffeinated brain interpreted that as left-click which is attack and went to onAttack. I even wrote onDamaged when writing to Lxlp to confirm it was an issue before reporting it here, and also wrote onDamaged on discord.

furn_FRIDGE:
  Type: ARMOR_STAND 
  Display: 'furn_FRIDGE'
  Options:
    Despawn: persistent
    PreventOtherDrops: true
    KnockbackResistance: 1
    Collidable: false
    Silent: true
  Drops:
  - furn_FRIDGE 1 1
  Skills:  
  - setstance{stance=closed} @self ~onSpawn
  - skill{s=removelightFRIDGE} @self ~onDeath
  - skill{s=furniture_rotate} @self ~onInteract
  - skill{s=furniture_rotatecheck} @self ~onTimer:5
  - skill{s=furniture_SPAWN} @self ~onSpawn
  - skill{s=furniture_errorprevention} @selflocation ~onTimer:1
  - setblock{m=AIR;md=0} @selflocation ~onDeath
  - model{mid=fridge;d=false} @self ~onSpawn
  - model{mid=fridge;d=false} @self ~onLoad
  - BodyClamp{mh=0;mb=0;rde=0;rdu=0} @self ~onSpawn
  - BodyClamp{mh=0;mb=0;rde=0;rdu=0} @self ~onLoad
  - skill{s=toggleFRIDGE} @self ~onDamaged #this skill, it works fine when i use onInteract, but messes with the two below
  - skill{s=useFRIDGEclosed} @trigger ~onInteract
  - skill{s=useFRIDGEopen} @trigger ~onInteract

I will revisit this on the latest dev build in the next few days, and if it's still occurring with onDamaged will make a more informative video.

Unknowncommented

I restested this on the latest dev build MythicMobs-5.6.2-SNAPSHOT5063 using the following mob configs

ondamagedarmorstand:
  Type: ARMORSTAND
  Display: 'ondamagedarmorstand'
  Health: 100 #i don't think armorstands can even have health now
  Options:
    AlwaysShowName: true
  Skills:
  - message{m="<caster.name>&f<&co> You just attacked me."} @trigger ~onDamaged # doesn't work
  - message{m="<caster.name>&f<&co> You just interacted with me."} @trigger ~onInteract
ondamagedpig:
  Type: PIG
  Display: 'ondamagedpig'
  Health: 100
  AIGoalSelectors:
  - clear
  AITargetSelectors:
  - clear
  Options:
    AlwaysShowName: true
  Skills:
  - message{m="<caster.name>&f<&co> You just attacked me."} @trigger ~onDamaged # works
  - message{m="<caster.name>&f<&co> You just interacted with me."} @trigger ~onInteract

The issue persists.

Here's a more thorough video. https://youtu.be/o_h_MOJJmmY

Unknowncommented

Armor Stands don't really have health and can't actually be damaged, thus the trigger doesn't work

Unknowncommented

Closing this issue due to inactivity, and the vanilla behavior of armor stands being the primary limitation of this feature.

Sign in to join the discussion.