Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
MythicMobs MythicMobs
  • Project overview
    • Project overview
    • Details
    • Activity
  • Issues 161
    • Issues 161
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Operations
    • Operations
    • Incidents
  • Analytics
    • Analytics
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar
  • MythicCraft
  • MythicMobsMythicMobs
  • Issues
  • #1954

Closed
Open
Created Jun 19, 2025 by MurcisLuis@MurcisLuis

Target Selector when player is parent or owner: parentDamager ownerDamager

Summary

MythicMobs 5.9.1 throws NoSuchMethodError when using AI Target Selectors ownerAttack and parentDamager on Purpur 1.21.5, causing mobs with these selectors to fail during runtime.

Steps to reproduce https://youtu.be/fuATr8SHfEE

  1. Install Purpur 1.21.5-2445-HEAD@b1d412f
  2. Install MythicMobs 5.9.1-${CI_COMMIT_SHORT_SHA}
  3. Create a mob configuration with ownerAttack or parentDamager in AITargetSelectors
  4. Create a skill that summons the mob with setowner=true and summonerisparent=true
  5. Execute the skill using /mm test cast SummonCommanderSoldier or any spawning method
  6. The error occurs when the mob's AI tries to execute the target selector

Mob Configuration:

CommanderSoldier:
  Type: HUSK
  Display: '&aSoldado '
  Health: 30
  Damage: 5
  Options:
    AlwaysShowName: true
    MovementSpeed: 0.3
    PreventOtherDrops: true
    KnockbackResistance: 0.2
    FollowRange: 30
    Silent: false
    Persistent: true
    Despawn: true
    DespawnTimer: 3600
    PreventRenaming: true
    PreventMobKillDrops: true
  Equipment:
  - IRON_HELMET:4
  - IRON_CHESTPLATE:3
  - IRON_LEGGINGS:2
  - IRON_BOOTS:1
  - IRON_SWORD:0
  AIGoalSelectors:
  - clear
  - meleeAttack
  - gotoparent 
  - meleeattack{tps=20}
  - randomstroll{radius=10;conditions=[ - targetinrange{r=15} true ]} 
  AITargetSelectors:
  - clear
  - ownerAttack    # Causes NoSuchMethodError
  - ownerDamager
  # parentDamager also fails with the same error

Summoning Skill:

SummonCommanderSoldier:
  Cooldown: 10
  Skills:
  - message{m="<caster.name><&co> ¡A mí, soldado!";audience=@PlayersInRadius{r=20}} @self{}
  - effect:sound{s=entity.evoker.cast_spell;volume=1.0;pitch=1.2} @Self
  - effect:particles{p=cloud;amount=20;hSpread=0.5;vSpread=0.5;speed=0.2} @Self
  - delay 10
  - setvar{var=skill.faction;value=Troop_<caster.name>;type=STRING} @self
  - summon{mob=CommanderSoldier;amount=1;radius=2;setowner=true;summonerisparent=true;then=FactionCreate} @Self
  - message{m="&a[✓] &fSoldado invocado."} @Caster

FactionCreate:
  Skills:
  - setfaction{f=Commander_<skill.var.faction>} @self
  - aitarget{target=otherFactionMonsters}

Current behavior

Describe what happens currently, while the bug is affecting your server.

Intended correct behavior

Describe what you think should happen instead of the bug.

Server log file

https://mclo.gs/8hhSEub Debug log snippet [21:04:45] [Server thread/ERROR]: Entity threw exception at world:-103.49348644632107,80.0,-98.4010122272395 java.lang.NoSuchMethodError: 'boolean net.minecraft.world.entity.Mob.setTarget(net.minecraft.world.entity.LivingEntity, org.bukkit.event.entity.EntityTargetEvent$TargetReason, boolean)' at MythicMobs-5.9.1.jar/io.lumine.mythic.core.volatilecode.v1_21_R4.ai.targeters.OwnerHurtGoal$MythicOwnerHurtTargetGoal.start(OwnerHurtGoal.java:78) ~[MythicMobs-5.9.1.jar:?] at net.minecraft.world.entity.ai.goal.WrappedGoal.start(WrappedGoal.java:39) ~[purpur-1.21.5.jar:1.21.5-2445-b1d412f] at net.minecraft.world.entity.ai.goal.GoalSelector.tick(GoalSelector.java:114) ~[purpur-1.21.5.jar:1.21.5-2445-b1d412f] at net.minecraft.world.entity.Mob.serverAiStep(Mob.java:765) ~[purpur-1.21.5.jar:1.21.5-2445-b1d412f] at net.minecraft.world.entity.LivingEntity.aiStep(LivingEntity.java:3502) ~[purpur-1.21.5.jar:1.21.5-2445-b1d412f] at net.minecraft.world.entity.Mob.aiStep(Mob.java:515) ~[purpur-1.21.5.jar:1.21.5-2445-b1d412f] at net.minecraft.world.entity.monster.Monster.aiStep(Monster.java:45) ~[purpur-1.21.5.jar:1.21.5-2445-b1d412f] at net.minecraft.world.entity.monster.Zombie.aiStep(Zombie.java:306) ~[purpur-1.21.5.jar:1.21.5-2445-b1d412f] at net.minecraft.world.entity.LivingEntity.tick(LivingEntity.java:3280) ~[purpur-1.21.5.jar:1.21.5-2445-b1d412f] at net.minecraft.world.entity.Mob.tick(Mob.java:400) ~[purpur-1.21.5.jar:1.21.5-2445-b1d412f] at net.minecraft.world.entity.monster.Zombie.tick(Zombie.java:300) ~[purpur-1.21.5.jar:1.21.5-2445-b1d412f] at net.minecraft.server.level.ServerLevel.tickNonPassenger(ServerLevel.java:1365) ~[purpur-1.21.5.jar:1.21.5-2445-b1d412f] at net.minecraft.world.level.Level.guardEntityTick(Level.java:1529) ~[purpur-1.21.5.jar:1.21.5-2445-b1d412f] at net.minecraft.server.level.ServerLevel.lambda$tick$4(ServerLevel.java:828) ~[purpur-1.21.5.jar:1.21.5-2445-b1d412f] at net.minecraft.world.level.entity.EntityTickList.forEach(EntityTickList.java:39) ~[purpur-1.21.5.jar:1.21.5-2445-b1d412f] at net.minecraft.server.level.ServerLevel.tick(ServerLevel.java:810) ~[purpur-1.21.5.jar:1.21.5-2445-b1d412f] at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1759) ~[purpur-1.21.5.jar:1.21.5-2445-b1d412f] at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1563) ~[purpur-1.21.5.jar:1.21.5-2445-b1d412f] at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1279) ~[purpur-1.21.5.jar:1.21.5-2445-b1d412f] at net.minecraft.server.MinecraftServer.lambda$spin$2(MinecraftServer.java:311) ~[purpur-1.21.5.jar:1.21.5-2445-b1d412f] at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?] `

`

Proposed fixes

This appears to be a compatibility issue between MythicMobs 5.9.1 and Minecraft 1.21.5/Purpur. The error occurs in OwnerHurtGoal.java:78 where MythicMobs attempts to call a method signature that has changed or been removed in the newer Minecraft version.

Technical Details:

  • Affected AI Target Selectors: ownerAttack , parentDamager (confirmed by testing)
  • Error Location: io.lumine.mythic.core.volatilecode.v1_21_R4.ai.targeters.OwnerHurtGoal$MythicOwnerHurtTargetGoal.start(OwnerHurtGoal.java:78)
  • Missing Method: net.minecraft.world.entity.Mob.setTarget(LivingEntity, TargetReason, boolean)
  • Server Version: Purpur 1.21.5-2445-HEAD@b1d412f
  • MythicMobs Version: 5.9.1-${CI_COMMIT_SHORT_SHA}
  • Additional Plugins: ModelEngine R4.0.9 (no conflicts observed)
  • Trigger Mechanism: summon mechanic with setowner=true and summonerisparent=true The issue likely requires updating the volatile code mappings for 1.21.5 to use the correct method signature for setTarget() in the Mob class.
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking