How can we improve the existing moving creatures of Minecraft? Show us your coolest fantasy creatures. We are very interested in ideas that are unique and not just lists of mobs - spamming lists of animal names is spam and violates our posting guidelines. Be sure to check the Previously Considered Suggestion page (no sharks, MINECON Vote rejected monsters) before you post!

5

Ghasts shouldn't do 1000 damage to themselves (map maker feature)

2 Comments

Please sign in to leave a comment.

Sorted by oldest
  • 2
    Registered User commented
    Comment actions Permalink

    Great idea. Surprised this hasn't been fixed already.

  • 0
    Registered User commented
    Comment actions Permalink

    This happens because the Ghast's damage method is hardcoded to ignore how much actual damage was dealt by the damage source if it is a reflected fireball and instead deals itself 1000 damage. Changing this special case is rather easy.

    @Override
    public boolean damageEntity(DamageSource source, float amount) {
        if (EntityGhast.isReflectedFireball(source)) {
            super.damageEntity(source, 1000.0F);
            return true;
        } else {
            return this.isInvulnerable(source) ? false : super.damageEntity(source, amount);
        }
    }