build commit

This commit is contained in:
Teriuihi 2024-10-18 23:42:30 +02:00
parent 153543fb1f
commit 07b5010f74

View File

@ -106,17 +106,23 @@ public class Spawn extends SubCommand {
}
private void spawnMob(World world, Location location, EntityType entityType, MobType mobType) {
log.info("one");
log.info(mobType.toString());
log.info(mobType.entityModifiers().stream().map(EntityModifier::getName).collect(Collectors.joining(", ")));
if (entityType.getEntityClass() == null) {
log.warn("Tried to spawn entity with null entity class {}", entityType.name());
return;
}
log.info("two");
Entity entity = world.spawn(location, entityType.getEntityClass());
log.info("three");
if (!(entity instanceof LivingEntity livingEntity)) {
log.warn("Spawned entity is not a living entity? {}", entityType.name());
return;
}
log.info("four");
mobTypeApplier.apply(livingEntity, mobType);
log.info("five");
}
@Override