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
  • #1955

Closed
Open
Created Jun 23, 2025 by Clexus@Clexus

the value of maxabsorb in shield mechanic is not as the same as amount by default(or wrongly get the default value 1)

this.amount = mlc.getPlaceholderFloat(new String[]{"amount", "a"}, 1.0F, new String[0]);
this.maxShield = mlc.getPlaceholderFloat(new String[]{"maxabsorb", "maxshield", "ma", "ms"}, String.valueOf(this.amount), new String[0]);
    public SkillResult castAtEntity(SkillMetadata data, AbstractEntity target) {
        if (target.isDead()) {
            return SkillResult.INVALID_TARGET;
        } else {
            double absorb = (double)(MythicBukkit.inst().getVolatileCodeHandler().getEntityHandler().getEntityAbsorptionHearts(target) + this.amount.get(data, target));
            if (absorb < (double)this.maxShield.get(data, target)) {
                MythicBukkit.inst().getVolatileCodeHandler().getEntityHandler().setEntityAbsorptionHearts(target, (float)absorb);
            }

            return SkillResult.SUCCESS;
        }
    }

the problem is this.maxShield.get(data, target) get 1(the value of amount by default) if you don't set maxabsorb manually

Edited Jun 23, 2025 by Clexus
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking