build commit
This commit is contained in:
parent
153543fb1f
commit
07b5010f74
|
|
@ -106,17 +106,23 @@ public class Spawn extends SubCommand {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void spawnMob(World world, Location location, EntityType entityType, MobType mobType) {
|
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(", ")));
|
log.info(mobType.entityModifiers().stream().map(EntityModifier::getName).collect(Collectors.joining(", ")));
|
||||||
if (entityType.getEntityClass() == null) {
|
if (entityType.getEntityClass() == null) {
|
||||||
log.warn("Tried to spawn entity with null entity class {}", entityType.name());
|
log.warn("Tried to spawn entity with null entity class {}", entityType.name());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
log.info("two");
|
||||||
Entity entity = world.spawn(location, entityType.getEntityClass());
|
Entity entity = world.spawn(location, entityType.getEntityClass());
|
||||||
|
log.info("three");
|
||||||
if (!(entity instanceof LivingEntity livingEntity)) {
|
if (!(entity instanceof LivingEntity livingEntity)) {
|
||||||
log.warn("Spawned entity is not a living entity? {}", entityType.name());
|
log.warn("Spawned entity is not a living entity? {}", entityType.name());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
log.info("four");
|
||||||
mobTypeApplier.apply(livingEntity, mobType);
|
mobTypeApplier.apply(livingEntity, mobType);
|
||||||
|
log.info("five");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user