Skip to content

Commit d410a0f

Browse files
committed
Merge remote-tracking branch 'origin/master'
2 parents ee85188 + 243f0a9 commit d410a0f

File tree

3 files changed

+28
-0
lines changed

3 files changed

+28
-0
lines changed

src/main/java/com/github/chainmailstudios/astromine/common/world/generation/MoonChunkGenerator.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
import net.minecraft.world.biome.Biome;
4242
import net.minecraft.world.biome.source.BiomeSource;
4343
import net.minecraft.world.chunk.Chunk;
44+
import net.minecraft.world.gen.ChunkRandom;
4445
import net.minecraft.world.gen.StructureAccessor;
4546
import net.minecraft.world.gen.chunk.ChunkGenerator;
4647
import net.minecraft.world.gen.chunk.StructuresConfig;
@@ -93,6 +94,8 @@ public void populateNoise(WorldAccess world, StructureAccessor accessor, Chunk c
9394

9495
int x2 = chunk.getPos().getEndX();
9596
int z2 = chunk.getPos().getEndZ();
97+
ChunkRandom chunkRandom = new ChunkRandom();
98+
chunkRandom.setTerrainSeed(chunk.getPos().x, chunk.getPos().z);
9699

97100
for (int x = x1; x <= x2; ++x) {
98101
for (int z = z1; z <= z2; ++z) {
@@ -125,6 +128,12 @@ public void populateNoise(WorldAccess world, StructureAccessor accessor, Chunk c
125128
int height = (int) (depth + (noise * scale));
126129
for (int y = 0; y <= height; ++y) {
127130
chunk.setBlockState(new BlockPos(x, y, z), AstromineBlocks.MOON_STONE.getDefaultState(), false);
131+
if (y <= 5) {
132+
if (chunkRandom.nextInt(y + 1) == 0) {
133+
chunk.setBlockState(new BlockPos(x, y, z), Blocks.BEDROCK.getDefaultState(), false);
134+
}
135+
}
136+
128137
}
129138
}
130139
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"type": "astromine:triturating",
3+
"input": {
4+
"tag": "c:quartz_ores",
5+
"count": 1
6+
},
7+
"output": {
8+
"item": "astromine:quartz_dust",
9+
"count": 2
10+
},
11+
"time": 30,
12+
"energy_consumed": 280
13+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"replace": false,
3+
"values": [
4+
"minecraft:nether_quartz_ore"
5+
]
6+
}

0 commit comments

Comments
 (0)