mirror of
https://github.com/PaperMC/Paper.git
synced 2025-03-09 13:19:25 +01:00
World.spawnCreature now returns LivingEntity instead of Creature, to allow Ghasts and Slimes to be spawned using the command.
By: Celtic Minstrel <celtic.minstrel.ca@>
This commit is contained in:
parent
ca3c9c0dcf
commit
11902a86ff
@ -342,10 +342,10 @@ public class CraftWorld implements World {
|
||||
return (Boat) boat.getBukkitEntity();
|
||||
}
|
||||
|
||||
public Creature spawnCreature(Location loc, CreatureType creatureType) {
|
||||
Creature creature;
|
||||
public LivingEntity spawnCreature(Location loc, CreatureType creatureType) {
|
||||
LivingEntity creature;
|
||||
try {
|
||||
EntityCreature entityCreature = (EntityCreature) EntityTypes.a(creatureType.getName(), world);
|
||||
EntityLiving entityCreature = (EntityLiving) EntityTypes.a(creatureType.getName(), world);
|
||||
entityCreature.a(loc.getX(), loc.getY(), loc.getZ());
|
||||
creature = (Creature) CraftEntity.getEntity(server, entityCreature);
|
||||
world.a(entityCreature);
|
||||
|
Loading…
Reference in New Issue
Block a user