31 lines
929 B
Java
31 lines
929 B
Java
package dev.chipper.dimension;
|
|
|
|
import net.minecraft.block.Blocks;
|
|
import net.minecraft.server.world.ServerWorld;
|
|
import net.minecraft.util.Identifier;
|
|
import net.minecraft.util.math.BlockPos;
|
|
import net.minecraft.registry.RegistryKey;
|
|
import net.minecraft.registry.RegistryKeys;
|
|
import net.minecraft.world.World;
|
|
|
|
public class ChipperDimensions {
|
|
|
|
public static final RegistryKey<World> CHIPPER_WORLD =
|
|
RegistryKey.of(RegistryKeys.WORLD, new Identifier("chipperdimension", "chipper"));
|
|
|
|
public static void init() {
|
|
// JSON handles dimension creation
|
|
}
|
|
|
|
public static void ensureSpawnPlatform(ServerWorld world) {
|
|
BlockPos center = new BlockPos(0, 64, 0);
|
|
|
|
for (int x = -5; x < 5; x++) {
|
|
for (int z = -5; z < 5; z++) {
|
|
world.setBlockState(center.add(x, 0, z),
|
|
Blocks.STONE.getDefaultState());
|
|
}
|
|
}
|
|
}
|
|
}
|