- Баллы
- 66
Приветствую! Мне нужно заспавнить жителя с определёнными торгами с помощью плагина. Я знаю как заспавнить жителя без торгов, но не знаю как сделать жителя с торгами. Помогите пожалуйста
код:
final int radius = 1000;
final EntityType entityType = EntityType.VILLAGER;
final World world = e.getWorld();
int x = ThreadLocalRandom.current().nextInt(-radius, radius);
int z = ThreadLocalRandom.current().nextInt(-radius, radius);
int y = world.getHighestBlockYAt(x, z);
Location location = new Location(world, x, y, z);
world.spawnEntity(location, entityType);
код:
final int radius = 1000;
final EntityType entityType = EntityType.VILLAGER;
final World world = e.getWorld();
int x = ThreadLocalRandom.current().nextInt(-radius, radius);
int z = ThreadLocalRandom.current().nextInt(-radius, radius);
int y = world.getHighestBlockYAt(x, z);
Location location = new Location(world, x, y, z);
world.spawnEntity(location, entityType);