private void generateRoads() { // Generate roads Random random = new Random(); for (int i = 0; i < 5; i++) { int x = pos.getX() + random.nextInt(16); int z = pos.getZ() + random.nextInt(16); level.setBlock(new BlockPosition(x, pos.getY(), z), Blocks.GRAVEL.defaultBlockState(), 2); } }
private void generateDecorations() { // Generate decorations Random random = new Random(); for (int i = 0; i < 10; i++) { int x = pos.getX() + random.nextInt(16); int z = pos.getZ() + random.nextInt(16); level.setBlock(new BlockPosition(x, pos.getY() + 1, z), Blocks.TORCH.defaultBlockState(), 2); } } } Minecraft v1.19.1
// CityFeatureRegistration.java package com.example.minecraft.feature; private void generateRoads() { // Generate roads Random
public class District { private final Level level; private final BlockPosition pos; private final int index; for (int i = 0
// CityFeature.java package com.example.minecraft.feature;
This website or its third-party tools shares and processes personal information using cookies. You can opt-out of the sale of your personal information by clicking I decline below.
This website or its third-party tools shares and processes personal information using cookies. You can opt-out of the sale of your personal information by clicking I decline below.