Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix: prevent an owner from attacking their pet while riding/being ridden #179

Merged
merged 4 commits into from
Aug 22, 2024

Commits on Aug 22, 2024

  1. use the logic from AbstractHorse, to prevent an owner from attacking …

    …their own mount/mounted pet:
    
    /**
         * Called when the entity is attacked.
         */
        public boolean attackEntityFrom(DamageSource source, float amount)
        {
            Entity entity = source.getTrueSource();
            return this.isBeingRidden() && entity != null && this.isRidingOrBeingRiddenBy(entity) ? false : super.attackEntityFrom(source, amount);
        }
    demonlexe committed Aug 22, 2024
    Configuration menu
    Copy the full SHA
    f162f33 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    148a999 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    dad67e6 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    b025cda View commit details
    Browse the repository at this point in the history