diff options
-rw-r--r-- | src/main/java/net/minecraft/server/EntityEgg.java | 5 | ||||
-rw-r--r-- | src/main/java/net/minecraft/server/World.java | 26 | ||||
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/block/CraftCreatureSpawner.java | 37 |
3 files changed, 17 insertions, 51 deletions
diff --git a/src/main/java/net/minecraft/server/EntityEgg.java b/src/main/java/net/minecraft/server/EntityEgg.java index f9044d63..ad31f3c6 100644 --- a/src/main/java/net/minecraft/server/EntityEgg.java +++ b/src/main/java/net/minecraft/server/EntityEgg.java @@ -3,8 +3,8 @@ package net.minecraft.server; import java.util.List; // CraftBukkit start +import org.bukkit.entity.CreatureType; import org.bukkit.entity.Egg; -import org.bukkit.entity.MobType; import org.bukkit.entity.Player; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.event.Event.Type; @@ -188,7 +188,8 @@ public class EntityEgg extends Entity { if (!hatching) { numHatching = 0; } - MobType hatchingType = MobType.CHICKEN; + + CreatureType hatchingType = CreatureType.CHICKEN; if (this.g instanceof EntityPlayer) { CraftServer server = ((WorldServer) this.world).getServer(); diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java index b1d97e26..2decd5f9 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -12,12 +12,12 @@ import java.util.TreeSet; import org.bukkit.Location; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.craftbukkit.CraftWorld; +import org.bukkit.entity.CreatureType; import org.bukkit.event.Event; import org.bukkit.event.Event.Type; import org.bukkit.event.block.BlockCanBuildEvent; import org.bukkit.event.block.BlockPhysicsEvent; import org.bukkit.event.entity.CreatureSpawnEvent; -import org.bukkit.entity.MobType; // CraftBukkit end public class World implements IBlockAccess { @@ -716,30 +716,30 @@ public class World implements IBlockAccess { // CraftBukkit start if (entity instanceof EntityLiving) { - MobType type = null; + CreatureType type = null; if (entity instanceof EntityChicken) { - type = MobType.CHICKEN; + type = CreatureType.CHICKEN; } else if (entity instanceof EntityCow) { - type = MobType.COW; + type = CreatureType.COW; } else if (entity instanceof EntityCreeper) { - type = MobType.CREEPER; + type = CreatureType.CREEPER; } else if (entity instanceof EntityGhast) { - type = MobType.GHAST; + type = CreatureType.GHAST; } else if (entity instanceof EntityPig) { - type = MobType.PIG; + type = CreatureType.PIG; } else if (entity instanceof EntityPigZombie) { - type = MobType.PIG_ZOMBIE; + type = CreatureType.PIG_ZOMBIE; } else if (entity instanceof EntitySheep) { - type = MobType.SHEEP; + type = CreatureType.SHEEP; } else if (entity instanceof EntitySkeleton) { - type = MobType.SKELETON; + type = CreatureType.SKELETON; } else if (entity instanceof EntitySpider) { - type = MobType.SPIDER; + type = CreatureType.SPIDER; } else if (entity instanceof EntityZombie) { - type = MobType.ZOMBIE; + type = CreatureType.ZOMBIE; } else if (entity instanceof EntitySlime) { - type = MobType.SLIME; + type = CreatureType.SLIME; } if (type != null) { diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftCreatureSpawner.java b/src/main/java/org/bukkit/craftbukkit/block/CraftCreatureSpawner.java index 74c1b587..2acab116 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftCreatureSpawner.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftCreatureSpawner.java @@ -3,12 +3,10 @@ package org.bukkit.craftbukkit.block; import net.minecraft.server.TileEntityMobSpawner; import org.bukkit.block.Block; import org.bukkit.block.CreatureSpawner; -import org.bukkit.block.MobSpawner; import org.bukkit.craftbukkit.CraftWorld; import org.bukkit.entity.CreatureType; -import org.bukkit.entity.MobType; -public class CraftCreatureSpawner extends CraftBlockState implements CreatureSpawner, MobSpawner { +public class CraftCreatureSpawner extends CraftBlockState implements CreatureSpawner { private final CraftWorld world; private final TileEntityMobSpawner spawner; @@ -48,37 +46,4 @@ public class CraftCreatureSpawner extends CraftBlockState implements CreatureSpa spawner.a = delay; } - /** - * @deprecated Use getCreatureType() instead. - */ - public MobType getMobType() { - return MobType.fromName(spawner.h); - } - - /** - * @deprecated Use setCreatureType() instead. - */ - public void setMobType(MobType mobType) { - spawner.h = mobType.getName(); - - } - - /** - * @deprecated Use getCreatureTypeId() instead. - */ - public String getMobTypeId() { - return spawner.h; - } - - /** - * @deprecated Use setCreatureTypeId() instead. - */ - public void setMobTypeId(String mobType) { - // Verify input - MobType type = MobType.fromName(mobType); - if (type == null) { - return; - } - spawner.h = type.getName(); - } } |