Fix incorrect detection of hostile and ambient creatures.

This commit is contained in:
sk89q 2015-01-06 15:01:07 -08:00
parent da032cb04e
commit 38c9479385

View File

@ -422,7 +422,7 @@ public void onDamageEntity(DamageEntityEvent event) {
String what;
/* Hostile / ambient mob override */
if (isWhitelistedEntity(event.getEntity()) || (rootCause instanceof Entity && isWhitelistedEntity((Entity) rootCause))) {
if (Entities.isHostile(event.getEntity()) || Entities.isAmbient(event.getEntity())) {
canDamage = event.getRelevantFlags().isEmpty() || query.testState(target, associable, combine(event));
what = "hit that";