Skip to content

Commit

Permalink
Nice! All 1.18 ore-gen recreated using my data driven system
Browse files Browse the repository at this point in the history
  • Loading branch information
EwyBoy committed Jan 13, 2022
1 parent 7ba7ae6 commit d7f7885
Show file tree
Hide file tree
Showing 23 changed files with 200 additions and 94 deletions.
2 changes: 1 addition & 1 deletion TODO.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# 3.0.0 Update
[x] - Create Rarity system
[ ] - Recreate all vanilla features in 1.18 format
[ ] - Dimension Filter
[x] - Dimension Filter
[x] - Reimplement Deepslater
[x] - Filler Tag system
[ ] - Clean up Reconstructor
Expand Down
8 changes: 8 additions & 0 deletions cheat_sheet.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Feature :: maxVeinSize
Placeable :: spawnRate

CheckList:




Original file line number Diff line number Diff line change
Expand Up @@ -222,8 +222,8 @@ private static PlacedFeature reconstructPlacedFeature(ConfiguredFeature<?, ?> co
placementBuilder.add(InSquarePlacement.spread());

switch (distribution) {
case TRIANGLE -> placementBuilder.add(HeightRangePlacement.uniform(VerticalAnchor.absolute(minY), VerticalAnchor.absolute(maxY)));
case UNIFORM -> placementBuilder.add(HeightRangePlacement.triangle(VerticalAnchor.absolute(minY), VerticalAnchor.absolute(maxY)));
case TRIANGLE -> placementBuilder.add(HeightRangePlacement.triangle(VerticalAnchor.absolute(minY), VerticalAnchor.absolute(maxY)));
case UNIFORM -> placementBuilder.add(HeightRangePlacement.uniform(VerticalAnchor.absolute(minY), VerticalAnchor.absolute(maxY)));
case NONE -> {}
}

Expand Down
14 changes: 10 additions & 4 deletions src/main/java/com/ewyboy/oretweaker/json/template/Templates.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,15 @@
import java.lang.reflect.Field;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;

public class Templates {

public static final List<String> MOUNTAIN = Collections.singletonList("MOUNTAIN");
public static final List<String> BADLANDS = Arrays.asList("minecraft:badlands", "minecraft:eroded_badlands", "minecraft:wooded_badlands");

public static final class GeneratedTemplates {
public static final DefaultTemplate DEFAULT_TEMPLATE = new DefaultTemplate();
public static final DefaultNetherTemplate DEFAULT_NETHER_TEMPLATE = new DefaultNetherTemplate();
Expand Down Expand Up @@ -68,11 +74,11 @@ public static final class GeneratedTemplates {
public static final RedstoneOreTweak REDSTONE_ORE_TWEAK = new RedstoneOreTweak();

public static final AndesiteTweak ANDESITE_TWEAK = new AndesiteTweak();
public static final DeepslateTweak DEEPSLATE_TWEAK = new DeepslateTweak();
public static final DioriteTweak DIORITE_TWEAK = new DioriteTweak();
public static final DirtTweak DIRT_TWEAK = new DirtTweak();
public static final ClayTweak CLAY_TWEAK = new ClayTweak();
public static final GraniteTweak GRANITE_TWEAK = new GraniteTweak();
public static final InfestedStoneTweak INFESTED_STONE_TWEAK = new InfestedStoneTweak();
public static final InfestedTweak INFESTED_STONE_TWEAK = new InfestedTweak();
public static final TuffTweak TUFF_TWEAK = new TuffTweak();

public static final AncientDebrisTweak ANCIENT_DEBRIS_TWEAK = new AncientDebrisTweak();
Expand All @@ -97,11 +103,11 @@ public static final class DefaultData {
public static final RedstoneOreTweak REDSTONE_ORE_TWEAK = new RedstoneOreTweak();

public static final AndesiteTweak ANDESITE_TWEAK = new AndesiteTweak();
public static final DeepslateTweak DEEPSLATE_TWEAK = new DeepslateTweak();
public static final DioriteTweak DIORITE_TWEAK = new DioriteTweak();
public static final DirtTweak DIRT_TWEAK = new DirtTweak();
public static final ClayTweak CLAY_TWEAK = new ClayTweak();
public static final GraniteTweak GRANITE_TWEAK = new GraniteTweak();
public static final InfestedStoneTweak INFESTED_STONE_TWEAK = new InfestedStoneTweak();
public static final InfestedTweak INFESTED_STONE_TWEAK = new InfestedTweak();
public static final TuffTweak TUFF_TWEAK = new TuffTweak();

public static final AncientDebrisTweak ANCIENT_DEBRIS_TWEAK = new AncientDebrisTweak();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,23 +29,24 @@ public Path templateDirectory() {
public void buildTemplateEntries() {
entries.add(new OreEntry(
"minecraft:gravel",
Collections.singletonList("minecraft:stone"),
Collections.singletonList("base_stone_overworld"),
Distribution.UNIFORM,
1,
-64,
256,
32,
8,
33,
14,
0,
new BiomeFilters(emptyList, emptyList),
true
));

entries.add(new OreEntry(
"minecraft:gravel",
Collections.singletonList("minecraft:netherrack"),
Distribution.UNIFORM,
5,
37,
32,
41,
33,
2,
0,
new BiomeFilters(emptyList, emptyList),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,25 +29,25 @@ public Path templateDirectory() {
public void buildTemplateEntries() {
entries.add(new OreEntry(
"minecraft:ancient_debris",
Collections.singletonList("minecraft:netherrack"),
Distribution.UNIFORM,
Collections.singletonList("base_stone_nether"),
Distribution.TRIANGLE,
8,
120,
1,
24,
3,
1,
0,
1.0F,
new BiomeFilters(emptyList, emptyList),
true
));
entries.add(new OreEntry(
"minecraft:ancient_debris",
Collections.singletonList("minecraft:netherrack"),
Collections.singletonList("base_stone_nether"),
Distribution.UNIFORM,
8,
24,
118,
2,
1,
0,
1.0F,
new BiomeFilters(emptyList, emptyList),
true
));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public void buildTemplateEntries() {
Collections.singletonList("minecraft:netherrack"),
Distribution.UNIFORM,
10,
118,
116,
10,
10,
0,
Expand All @@ -44,7 +44,7 @@ public void buildTemplateEntries() {
Collections.singletonList("minecraft:netherrack"),
Distribution.UNIFORM,
10,
118,
116,
10,
20,
0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ public void buildTemplateEntries() {
Collections.singletonList("minecraft:netherrack"),
Distribution.UNIFORM,
10,
246,
116,
14,
10,
16,
0,
new BiomeFilters(emptyList, emptyList),
true
Expand All @@ -44,7 +44,7 @@ public void buildTemplateEntries() {
Collections.singletonList("minecraft:netherrack"),
Distribution.UNIFORM,
10,
246,
116,
14,
32,
0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public void buildTemplateEntries() {
Distribution.UNIFORM,
5,
31,
10,
33,
2,
0,
new BiomeFilters(emptyList, emptyList),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ public void buildTemplateEntries() {
"minecraft:magma_block",
Collections.singletonList("minecraft:netherrack"),
Distribution.UNIFORM,
26,
27,
36,
10,
15,
33,
4,
0,
new BiomeFilters(emptyList, emptyList),
true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ public void buildTemplateEntries() {
"minecraft:soul_sand",
Collections.singletonList("minecraft:netherrack"),
Distribution.UNIFORM,
1,
32,
0,
31,
12,
12,
0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public void buildTemplateEntries() {
20,
16,
0,
new BiomeFilters(emptyList, emptyList),
new BiomeFilters(emptyList, Collections.singletonList("minecraft:dripstone_caves")),
true
));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@ public void buildTemplateEntries() {
entries.add(new OreEntry(
"minecraft:emerald_ore",
Collections.singletonList("stone_ore_replaceables"),
Distribution.UNIFORM,
4,
32,
1,
5,
Distribution.TRIANGLE,
-16,
480,
3,
100,
0,
new BiomeFilters(emptyList, Collections.singletonList("MOUNTAIN")),
new BiomeFilters(emptyList, Templates.BADLANDS),
true
));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,24 @@ public void buildTemplateEntries() {
"minecraft:gold_ore",
Collections.singletonList("stone_ore_replaceables"),
Distribution.UNIFORM,
1,
32,
256,
9,
2,
50,
0,
new BiomeFilters(emptyList, Templates.BADLANDS),
true
));

entries.add(new OreEntry(
"minecraft:gold_ore",
Collections.singletonList("stone_ore_replaceables"),
Distribution.TRIANGLE,
-64,
32,
9,
4,
0.5f,
new BiomeFilters(emptyList, emptyList),
true
));
Expand All @@ -44,10 +57,10 @@ public void buildTemplateEntries() {
"minecraft:gold_ore",
Collections.singletonList("stone_ore_replaceables"),
Distribution.UNIFORM,
1,
32,
-64,
-48,
9,
2,
0.5f,
0.5f,
new BiomeFilters(emptyList, emptyList),
true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,28 @@ public void buildTemplateEntries() {
entries.add(new OreEntry(
"minecraft:lapis_ore",
Collections.singletonList("stone_ore_replaceables"),
Distribution.UNIFORM,
1,
30,
6,
3,
Distribution.TRIANGLE,
-32,
32,
7,
4,
0,
new BiomeFilters(emptyList, emptyList),
true
));

entries.add(new OreEntry(
"minecraft:lapis_ore",
Collections.singletonList("stone_ore_replaceables"),
Distribution.UNIFORM,
-64,
64,
7,
2,
1.0f,
new BiomeFilters(emptyList, emptyList),
true
));
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,22 @@ public void buildTemplateEntries() {
"minecraft:redstone_ore",
Collections.singletonList("stone_ore_replaceables"),
Distribution.UNIFORM,
1,
16,
7,
-64,
15,
4,
8,
0,
new BiomeFilters(emptyList, emptyList),
true
));

entries.add(new OreEntry(
"minecraft:redstone_ore",
Collections.singletonList("stone_ore_replaceables"),
Distribution.TRIANGLE,
-96,
-32,
8,
8,
0,
new BiomeFilters(emptyList, emptyList),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,25 @@ public Path templateDirectory() {
public void buildTemplateEntries() {
entries.add(new OreEntry(
"minecraft:andesite",
Collections.singletonList("minecraft:stone"),
Collections.singletonList("base_stone_overworld"),
Distribution.UNIFORM,
1,
80,
32,
10,
64,
128,
64,
0.1666666666666f,
0,
new BiomeFilters(emptyList, emptyList),
true
));

entries.add(new OreEntry(
"minecraft:andesite",
Collections.singletonList("base_stone_overworld"),
Distribution.UNIFORM,
0,
60,
64,
2,
0,
new BiomeFilters(emptyList, emptyList),
true
Expand Down
Loading

0 comments on commit d7f7885

Please sign in to comment.