Discuss Minecraft's mobs, animals, and other non-humanoid creatures. Share feedback on existing mobs, ideas for new creatures, and ways to improve their behaviors, interactions, and role in the game.

5

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

2 Comments

Post a new comment:

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);
        }
    }