Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-17 13:30:06 +01:00
Added new entity mappings to CreatureSpawnEvent factory.
Dieser Commit ist enthalten in:
Ursprung
fb26465c58
Commit
820c51ab97
@ -1,9 +1,11 @@
|
|||||||
package org.bukkit.craftbukkit.event;
|
package org.bukkit.craftbukkit.event;
|
||||||
|
|
||||||
import net.minecraft.server.ChunkCoordinates;
|
import net.minecraft.server.ChunkCoordinates;
|
||||||
|
import net.minecraft.server.EntityCaveSpider;
|
||||||
import net.minecraft.server.EntityChicken;
|
import net.minecraft.server.EntityChicken;
|
||||||
import net.minecraft.server.EntityCow;
|
import net.minecraft.server.EntityCow;
|
||||||
import net.minecraft.server.EntityCreeper;
|
import net.minecraft.server.EntityCreeper;
|
||||||
|
import net.minecraft.server.EntityEnderman;
|
||||||
import net.minecraft.server.EntityGhast;
|
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;
|
||||||
@ -13,6 +15,7 @@ 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;
|
||||||
|
import net.minecraft.server.EntitySilverfish;
|
||||||
import net.minecraft.server.EntitySkeleton;
|
import net.minecraft.server.EntitySkeleton;
|
||||||
import net.minecraft.server.EntitySlime;
|
import net.minecraft.server.EntitySlime;
|
||||||
import net.minecraft.server.EntitySpider;
|
import net.minecraft.server.EntitySpider;
|
||||||
@ -213,12 +216,17 @@ public class CraftEventFactory {
|
|||||||
} else if (entityliving instanceof EntitySlime) {
|
} else if (entityliving instanceof EntitySlime) {
|
||||||
type = CreatureType.SLIME;
|
type = CreatureType.SLIME;
|
||||||
} else if (entityliving instanceof EntitySpider) {
|
} else if (entityliving instanceof EntitySpider) {
|
||||||
type = CreatureType.SPIDER;
|
if (entityliving instanceof EntityCaveSpider) type = CreatureType.CAVE_SPIDER;
|
||||||
|
else type = CreatureType.SPIDER;
|
||||||
} else if (entityliving instanceof EntitySquid) {
|
} else if (entityliving instanceof EntitySquid) {
|
||||||
type = CreatureType.SQUID;
|
type = CreatureType.SQUID;
|
||||||
} else if (entityliving instanceof EntityZombie) {
|
} else if (entityliving instanceof EntityZombie) {
|
||||||
type = CreatureType.ZOMBIE;
|
type = CreatureType.ZOMBIE;
|
||||||
// Supertype of many, last!
|
} else if (entityliving instanceof EntityEnderman) {
|
||||||
|
type = CreatureType.ENDERMAN;
|
||||||
|
} else if (entityliving instanceof EntitySilverfish) {
|
||||||
|
type = CreatureType.SILVERFISH;
|
||||||
|
// Supertype of many, last!
|
||||||
} else if (entityliving instanceof EntityMonster) {
|
} else if (entityliving instanceof EntityMonster) {
|
||||||
type = CreatureType.MONSTER;
|
type = CreatureType.MONSTER;
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren