Allow any type of Zombie to convert villagers. (#1050)

This commit is contained in:
Luis Michaelis 2020-10-09 05:53:11 +02:00 committed by GitHub
parent ddd57834aa
commit 97cbd80a70
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -54,6 +54,7 @@ import org.bukkit.entity.ThrownPotion;
import org.bukkit.entity.Vehicle;
import org.bukkit.entity.WaterMob;
import org.bukkit.entity.Wolf;
import org.bukkit.entity.Zombie;
import org.bukkit.entity.minecart.ExplosiveMinecart;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
@ -990,7 +991,7 @@ public class EntityEventHandler implements Listener
if (attacker == null)
{
//exception case
if (event.getEntityType() == EntityType.VILLAGER && damageSource != null && damageSource.getType() == EntityType.ZOMBIE)
if (event.getEntityType() == EntityType.VILLAGER && damageSource != null && damageSource instanceof Zombie)
{
return;
}