Skip to content

Commit

Permalink
make armor stands no longer 'living'
Browse files Browse the repository at this point in the history
  • Loading branch information
gamma-delta committed Nov 20, 2024
1 parent 2e4d53f commit 7dde078
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import net.minecraft.world.entity.LivingEntity
import net.minecraft.world.entity.animal.Animal
import net.minecraft.world.entity.animal.WaterAnimal
import net.minecraft.world.entity.boss.EnderDragonPart
import net.minecraft.world.entity.decoration.ArmorStand
import net.minecraft.world.entity.item.ItemEntity
import net.minecraft.world.entity.monster.Enemy
import net.minecraft.world.entity.player.Player
Expand Down Expand Up @@ -53,6 +54,6 @@ class OpGetEntitiesBy(val checker: Predicate<Entity>, val negate: Boolean) : Con
fun isPlayer(e: Entity): Boolean = e is Player

@JvmStatic
fun isLiving(e: Entity): Boolean = (e is LivingEntity) || (e is EnderDragonPart)
fun isLiving(e: Entity): Boolean = (e !is ArmorStand) && (e is LivingEntity || e is EnderDragonPart)
}
}

0 comments on commit 7dde078

Please sign in to comment.