Jaded Stone Structure
基本信息
| 属性 |
值 |
| 结构类型 |
石头替换(Stone Replacement) |
| 基础类 |
WorldGenStone |
| 子类 |
WorldGenJaded |
生成逻辑
WorldGenJaded
public boolean generate(World world, Random rand, BlockPos position) {
int height = 8 + rand.nextInt(32); // 高度 8~39
for (int x = -8; x < 8; x++) {
for (int z = -8; z < 8; z++) {
for (int y = -8; y < height; y++) {
int distSq = x * x + z * z;
if (y <= height - distSq + rand.nextInt(4)) {
BlockPos targetPos = position.add(x, y, z);
if (y < 0) {
// 替换现有石头
replaceStone(existingState, world, rand, targetPos);
} else
// 直接放置
WorldPlugin.setBlockStateWorldGen(world, targetPos, stone);
}
}
}
}
return true;
}
结构特征
| 参数 |
值 |
| X/Z 半径 |
8 格 |
| Y 高度 |
8 + random(0~31) = 8~39 |
| 形状 |
倒金字塔形(越往上越小) |
生成规则
- 中心位置(position)作为基准
- X/Z 范围:-8 ~ +7
- Y 范围:-8 ~ height-1
- 仅当
y <= height - x² - z² + random(0~3) 时放置
- y < 0 时替换现有石头,y >= 0 时直接放置
可替换方块
继承自 WorldGenStone,可替换石头包括:
- 石头(Stone)
- 花岗岩(Granite)
- 闪长岩(Diorite)
- 安山岩(Andesite)
- 地狱石(Netherrack)
- 及其他由
add() 方法添加的方块
源码依据
WorldGenJaded.java - Jaded 石头生成器
WorldGenStone.java - 基础石头生成器