Fix entity spawning on paper

This commit is contained in:
ceze88 2024-01-11 15:55:54 +01:00
parent ab0490d31a
commit 59c2d186cd
1 changed files with 1 additions and 1 deletions

View File

@ -196,7 +196,7 @@ public class EntityStackImpl implements EntityStack {
@Override
public synchronized LivingEntity takeOneAndSpawnEntity(Location location) {
if (amount <= 0) return null;
LivingEntity entity = Objects.requireNonNull(location.getWorld()).spawn(location, hostEntity.getClass());
LivingEntity entity = (LivingEntity) Objects.requireNonNull(location.getWorld()).spawnEntity(location, hostEntity.getType());
if (Settings.NO_AI.getBoolean()) {
EntityUtils.setUnaware(entity);
}