WeaponMechanics / MechanicsMain

A New Age of Weapons in Minecraft.
https://www.spigotmc.org/resources/WeaponMechanics.99913/
MIT License
71 stars 26 forks source link

Damage mythicmob mechanic is not working when holding a weapon mechanics weapon. #409

Open pwnintended opened 2 months ago

pwnintended commented 2 months ago

Current/Expected Behavior

I'm running into an issue where the mythicmob damage mechanic is not working while holding a weapon mechanics weapon. It also does not work when using /mm test cast while holding a weapon mechanics weapon but it does work when not holding a weapon mechanics weapon.

I'm running weapon mechanics 3.3.2 and mythicmobs 5.6.1 on paper 1.20.4-464

Below are the configs:

Weapon Mechanics:

357_Magnum:
  Info:
    Weapon_Item:
      Type: "FEATHER"
      Name: "<gold>.357 Magnum"
      Lore:
        - "<gray>Revolver firing .357 Magnum ammunition for powerful damage over extended ranges."
        - ""
        - "<gray>Weapon Statistics <gold>-<gray> 60.7"
        - "<gold>➣<gray> 60 <gold>⟸ <gray>Accuracy"
        - "<gold>➣<gray> 63 <gold>⟸ <gray>Damage"
        - "<gold>➣<gray> 56 <gold>⟸ <gray>Range"
        - "<gold>➣<gray> 44 <gold>⟸ <gray>Fire Rate"
        - "<gold>➣<gray> 76 <gold>⟸ <gray>Mobility"
        - "<gold>➣<gray> 65 <gold>⟸ <gray>Control"
      Unbreakable: true
      Hide_Flags: true
      Attributes:
        - "GENERIC_MOVEMENT_SPEED -0.0002"
      Deny_Use_In_Crafting: true
    Weapon_Info_Display:
      Action_Bar:
        Message: "<gold>.357 Magnum<firearm_state> <gray>«<gold><ammo_left><gray>»<gold><reload>"
    Weapon_Get_Mechanics:
      - "Sound{sound=ITEM_ARMOR_EQUIP_CHAIN, pitch=0.75, listeners=Source{}}"
    Weapon_Equip_Delay: 10
    Cancel:
      Drop_Item: true
      Arm_Swing_Animation: true
      Break_Blocks: true
  Skin:
    Default: 8
    Scope: ADD 1000
    Sprint: ADD 2000
  Projectile: "pistol.Projectile"
  Shoot:
    Trigger:
      Main_Hand: "RIGHT_CLICK"
      Off_Hand: "RIGHT_CLICK"
      Circumstance:
        Swimming: "DENY"
        Sprinting: "DENY"
        Dual_Wielding: "DENY"
    Projectile_Speed: 80
    Delay_Between_Shots: 9
    Spread:
      Base_Spread: 5
      Modify_Spread_When:
        Zooming: 50%
        Sneaking: 50%
        In_Midair: 150%
    Recoil:
      Push_Time: 200
      Horizontal:
        - 3.5
        - 0
      Vertical:
        - 3.5
      Modify_Recoil_When:
        Zooming: 50%
        Sneaking: 50%
        In_Midair: 150%
    Mechanics:
      - "CustomSound{sound=shoot.357magnum.loud, volume=6, noise=0.1}"
  Reload:
    Trigger:
      Main_Hand: "DROP_ITEM"
      Off_Hand: "DROP_ITEM"
    Magazine_Size: 6
    Ammo_Per_Reload: 1
    Reload_Duration: 6
    Start_Mechanics:
      - "CustomSound{sound=reload.start.shotgun, volume=0.5, noise=0.1}"
  Damage:
    Base_Damage: 7.6
    Armor_Damage: 2
    Mechanics:
      - "MythicSkill{skill=Venom} @Target{}"
    Dropoff:
      - "10~-1.88"
      - "25~-3.76"
      - "50~-5.64"
  Scope:
    Trigger:
      Main_Hand: "LEFT_CLICK"
      Off_Hand: "LEFT_CLICK"
    Zoom_Amount: 1.3
    Shoot_Delay_After_Scope: 8
    Mechanics:
      - "CustomSound{sound=scope.in, volume=0.5, noise=0.1, listeners=Source{}}"
    Zoom_Off:
      Mechanics:
        - "CustomSound{sound=scope.out, volume=0.5, noise=0.1, listeners=Source{}}"
  Firearm_Action:
    Type: "REVOLVER"
    Open:
      Time: 9
      Mechanics:
        - "Sound{sound=BLOCK_NOTE_BLOCK_HAT, volume=0.5, noise=0.1, listeners=Source{}}"
        - "Sound{sound=BLOCK_PISTON_CONTRACT, volume=0.5, noise=0.1, listeners=Source{}, delayBeforePlay=2}"
    Close:
      Time: 9
      Mechanics:
        - "Sound{sound=BLOCK_PISTON_EXTEND, volume=0.5, noise=0.1, listeners=Source{}}"

  # The following options are added by WeaponMechanicsCosmetics, and you will
  # not see the changes take effect until you purchase it.

  Cosmetics:
    Muzzle_Flash: true
    Death_Messages:
      - "<yellow><target_name> was killed by the big iron on <source_name>'s hip"
      - "<rainbow><source_name> didn't care that he was after <target_name>"
    Splash_Mechanics:
      - "Sound{sound=ENTITY_GENERIC_SPLASH, pitch=1.85, noise=0.15} @Target{}"
      - "Particle{particle=WATER_SPLASH, count=20, noise=0.2 0.2 0.2} @Target{}"
    Bullet_Zip:
      Maximum_Distance: 4.0
      Sounds:
        - "CustomSound{sound=fx.whiz, noise=0.02, listeners=Target{}} @Target{}"
    Crossbow:
      Only_When_Scoping: false

  Trail:
    Distance_Between_Particles: 0.3
    Particle_Chooser: LOOP
    Particles:
      - "Particle{particle=DUST_COLOR_TRANSITION, color=RED, fadeColor=YELLOW, size=0.4}"

  Show_Time:
    Reload:
      Item_Cooldown: true
      Exp: true
      Action_Bar: "<gray>Reloading <bar> <gray><time>s"
      Action_Bar_Cancelled: "<red>Reload Cancelled"
      Bar:
        Left_Color: "<gray>"
        Right_Color: "<red>"
        Left_Symbol: "|"
        Right_Symbol: "|"
        Symbol_Amount: 6
    Weapon_Equip_Delay:
      Item_Cooldown: true
    Shoot_Delay_After_Scope:
      Item_Cooldown: true

And the mythic mob skill:

Venom:
  Skills:
  - message{m="<caster.name>&f<&co> test123"} @self
  - sound{s=entity.enderman.scream} @target
  - effect:particles{particle=flame;amount=200;hS=1;vS=1;speed=5} @target
  - damage{a=10} @target

Steps To Reproduce

Paste configs into the correct locations and fire a weapon at a mob.

Log File

latest.log

Anything else?

No response

CJCrafter commented 2 months ago

Some relevent code for myself: https://github.com/WeaponMechanics/MechanicsMain/blob/86fbcd8d28979e9484ba1027cee53bef92b1500c/WeaponMechanics/src/main/java/me/deecaad/weaponmechanics/listeners/trigger/TriggerEntityListeners.java#L66-L67