1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-08-18 20:41:37 +02:00

Allow spawning zombies with swords too.

This commit is contained in:
KHobbits
2013-06-02 00:09:12 +01:00
parent 9adb02e24d
commit 32d65bd468

View File

@@ -353,13 +353,9 @@ public class SpawnMob
((Zombie)spawned).setBaby(true); ((Zombie)spawned).setBaby(true);
} }
} }
if (type == EntityType.SKELETON) if (spawned instanceof Zombie || type == EntityType.SKELETON)
{ {
if (data.contains("wither"))
{
((Skeleton)spawned).setSkeletonType(SkeletonType.WITHER);
}
if (data.contains("sword")) if (data.contains("sword"))
{ {
final EntityEquipment invent = ((LivingEntity)spawned).getEquipment(); final EntityEquipment invent = ((LivingEntity)spawned).getEquipment();
@@ -383,6 +379,14 @@ public class SpawnMob
} }
} }
if (type == EntityType.SKELETON)
{
if (data.contains("wither"))
{
((Skeleton)spawned).setSkeletonType(SkeletonType.WITHER);
}
}
if (type == EntityType.EXPERIENCE_ORB) if (type == EntityType.EXPERIENCE_ORB)
{ {
if (Util.isInt(data)) if (Util.isInt(data))