mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-30 16:19:03 +01:00
Add MONSTER to CreatureSpawnEvent
By: Erik Broes <erikbroes@grum.nl>
This commit is contained in:
parent
0258613d15
commit
58ba4e379d
1 changed files with 7 additions and 4 deletions
|
@ -8,6 +8,7 @@ import net.minecraft.server.EntityGhast;
|
||||||
import net.minecraft.server.EntityGiantZombie;
|
import net.minecraft.server.EntityGiantZombie;
|
||||||
import net.minecraft.server.EntityHuman;
|
import net.minecraft.server.EntityHuman;
|
||||||
import net.minecraft.server.EntityLiving;
|
import net.minecraft.server.EntityLiving;
|
||||||
|
import net.minecraft.server.EntityMonster;
|
||||||
import net.minecraft.server.EntityPig;
|
import net.minecraft.server.EntityPig;
|
||||||
import net.minecraft.server.EntityPigZombie;
|
import net.minecraft.server.EntityPigZombie;
|
||||||
import net.minecraft.server.EntitySheep;
|
import net.minecraft.server.EntitySheep;
|
||||||
|
@ -199,6 +200,8 @@ public class CraftEventFactory {
|
||||||
type = CreatureType.GHAST;
|
type = CreatureType.GHAST;
|
||||||
} else if (entityliving instanceof EntityGiantZombie) {
|
} else if (entityliving instanceof EntityGiantZombie) {
|
||||||
type = CreatureType.GIANT;
|
type = CreatureType.GIANT;
|
||||||
|
} else if (entityliving instanceof EntityMonster) {
|
||||||
|
type = CreatureType.MONSTER;
|
||||||
} else if (entityliving instanceof EntityPig) {
|
} else if (entityliving instanceof EntityPig) {
|
||||||
type = CreatureType.PIG;
|
type = CreatureType.PIG;
|
||||||
} else if (entityliving instanceof EntityPigZombie) {
|
} else if (entityliving instanceof EntityPigZombie) {
|
||||||
|
@ -207,14 +210,14 @@ public class CraftEventFactory {
|
||||||
type = CreatureType.SHEEP;
|
type = CreatureType.SHEEP;
|
||||||
} else if (entityliving instanceof EntitySkeleton) {
|
} else if (entityliving instanceof EntitySkeleton) {
|
||||||
type = CreatureType.SKELETON;
|
type = CreatureType.SKELETON;
|
||||||
} else if (entityliving instanceof EntitySpider) {
|
|
||||||
type = CreatureType.SPIDER;
|
|
||||||
} else if (entityliving instanceof EntityZombie) {
|
|
||||||
type = CreatureType.ZOMBIE;
|
|
||||||
} else if (entityliving instanceof EntitySlime) {
|
} else if (entityliving instanceof EntitySlime) {
|
||||||
type = CreatureType.SLIME;
|
type = CreatureType.SLIME;
|
||||||
|
} else if (entityliving instanceof EntitySpider) {
|
||||||
|
type = CreatureType.SPIDER;
|
||||||
} else if (entityliving instanceof EntitySquid) {
|
} else if (entityliving instanceof EntitySquid) {
|
||||||
type = CreatureType.SQUID;
|
type = CreatureType.SQUID;
|
||||||
|
} else if (entityliving instanceof EntityZombie) {
|
||||||
|
type = CreatureType.ZOMBIE;
|
||||||
}
|
}
|
||||||
|
|
||||||
CreatureSpawnEvent event = new CreatureSpawnEvent(entity, type, entity.getLocation());
|
CreatureSpawnEvent event = new CreatureSpawnEvent(entity, type, entity.getLocation());
|
||||||
|
|
Loading…
Reference in a new issue