mirror of
https://github.com/PaperMC/Paper.git
synced 2025-03-12 14:50:03 +01:00
Deprecate spawnCreature and add spawnEntity. Addresses BUKKIT-1168
By: V10lator <v10lator@myway.de>
This commit is contained in:
parent
acc10eabc8
commit
25f555c6b9
@ -331,14 +331,14 @@ public class CraftWorld implements World {
|
|||||||
return spawnCreature(loc, creatureType.toEntityType());
|
return spawnCreature(loc, creatureType.toEntityType());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
public LivingEntity spawnCreature(Location loc, EntityType creatureType) {
|
public LivingEntity spawnCreature(Location loc, EntityType creatureType) {
|
||||||
Entity result = spawn(loc, creatureType.getEntityClass());
|
Validate.isTrue(!creatureType.isAlive(), "EntityType not instance of LivingEntity");
|
||||||
|
return (LivingEntity) spawnEntity(loc, creatureType);
|
||||||
if (result == null) {
|
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return (LivingEntity) result;
|
public Entity spawnEntity(Location loc, EntityType entityType) {
|
||||||
|
return spawn(loc, entityType.getEntityClass());
|
||||||
}
|
}
|
||||||
|
|
||||||
public LightningStrike strikeLightning(Location loc) {
|
public LightningStrike strikeLightning(Location loc) {
|
||||||
|
Loading…
Reference in New Issue
Block a user