Skip to content

Commit

Permalink
malachite ores spawn naturally
Browse files Browse the repository at this point in the history
  • Loading branch information
Bonnie39 committed Dec 24, 2023
1 parent b17fe80 commit 82f9800
Show file tree
Hide file tree
Showing 8 changed files with 59 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
// 1.19.4 2023-08-13T19:26:36.1576991 Registries
// 1.19.4 2023-12-23T16:43:45.815762 Registries
c75a69a06a66ad5a2ab402d7bca52e3e58098362 data/thesideways/worldgen/configured_feature/grass_patch.json
6b89cf197560d2f0286193a4ad084c6ab64059e9 data/thesideways/worldgen/configured_feature/luminite_ore.json
bce0e5b897875c6a20818a28094139036026f433 data/thesideways/worldgen/configured_feature/malachite_ore.json
c2f626799420c07b237e1a67ee82c9650001b819 data/thesideways/worldgen/configured_feature/nutroot.json
d34e9d2ef4b473a6425b08cfe754d90a88213192 data/thesideways/worldgen/configured_feature/nutroot_tree.json
06029a837eb77f1213cdb3c86f3b30cfa877ba18 data/thesideways/worldgen/configured_feature/tall_grass_patch.json
5ef425ee9b15df0dbf4abd6197573f7cfd035f6f data/thesideways/worldgen/configured_feature/trees_nutroot.json
bfceef8c2987f4b06f5c331b3b20b85cdfc23768 data/thesideways/worldgen/configured_feature/water_lake.json
9b04d51f3cfef0ae3bcab5834507720f1b1ed51a data/thesideways/worldgen/placed_feature/grass_patch.json
045bd0b06006ba3979e3d56acb79eaef17679226 data/thesideways/worldgen/placed_feature/luminite_ore.json
8c8f1011cf6ed7022e4d255a810d5c37c30ea8eb data/thesideways/worldgen/placed_feature/malachite_ore.json
e44dffee39b3cef39a47220d3faa861e1cbb1bfa data/thesideways/worldgen/placed_feature/nutroot_meadow_trees.json
10281d423157f205b24d55a771de99a443e978df data/thesideways/worldgen/placed_feature/tall_grass_patch.json
49bc8435422e405719f22a2d5112c159ce8566a2 data/thesideways/worldgen/placed_feature/water_lake.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"type": "minecraft:ore",
"config": {
"discard_chance_on_air_exposure": 0.0,
"size": 16,
"targets": [
{
"state": {
"Name": "thesideways:malachite_ore"
},
"target": {
"predicate_type": "minecraft:tag_match",
"tag": "thesideways:sideways_stone"
}
}
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"feature": "thesideways:malachite_ore",
"placement": [
{
"type": "minecraft:count",
"count": 8
},
{
"type": "minecraft:in_square"
},
{
"type": "minecraft:height_range",
"height": {
"type": "minecraft:uniform",
"max_inclusive": {
"above_bottom": 128
},
"min_inclusive": {
"above_bottom": 0
}
}
},
{
"type": "minecraft:biome"
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@

public class SidewaysFeatureStates {
public static final BlockState LUMINITE_ORE = ModBlocks.LUMINITE_ORE.get().defaultBlockState();
public static final BlockState MALACHITE_ORE = ModBlocks.MALACHITE_ORE.get().defaultBlockState();
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ public class ModConfiguredFeatures {
public static final ResourceKey<ConfiguredFeature<?, ?>> GRASS_PATCH_CONFIGURATION = registerKey("grass_patch");
public static final ResourceKey<ConfiguredFeature<?, ?>> TALL_GRASS_PATCH_CONFIGURATION = registerKey("tall_grass_patch");
public static final ResourceKey<ConfiguredFeature<?, ?>> ORE_LUMINITE_CONFIGURATION = registerKey("luminite_ore");
public static final ResourceKey<ConfiguredFeature<?, ?>> ORE_MALACHITE_CONFIGURATION = registerKey("malachite_ore");

public static void bootstrap(BootstapContext<ConfiguredFeature<?, ?>> context) {
HolderGetter<ConfiguredFeature<?, ?>> configuredFeatures = context.lookup(Registries.CONFIGURED_FEATURE);
Expand Down Expand Up @@ -67,6 +68,7 @@ public static void bootstrap(BootstapContext<ConfiguredFeature<?, ?>> context) {
PlacementUtils.inlinePlaced(configuredFeatures.getOrThrow(NUTROOT_TREE_CONFIGURATION), PlacementUtils.filteredByBlockSurvival(ModBlocks.NUTROOT_SAPLING.get()))));

register(context, ORE_LUMINITE_CONFIGURATION, Feature.ORE, new OreConfiguration(SidewaysFeatureRules.SIDEWAYS_STONE, SidewaysFeatureStates.LUMINITE_ORE, 16));
register(context, ORE_MALACHITE_CONFIGURATION, Feature.ORE, new OreConfiguration(SidewaysFeatureRules.SIDEWAYS_STONE, SidewaysFeatureStates.MALACHITE_ORE, 16));
}
public static ResourceKey<ConfiguredFeature<?, ?>> registerKey(String name) {
return ResourceKey.create(Registries.CONFIGURED_FEATURE, new ResourceLocation(TheSideways.MOD_ID, name));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public class ModPlacedFeatures {
public static final ResourceKey<PlacedFeature> GRASS_PATCH_PLACEMENT = createKey("grass_patch");
public static final ResourceKey<PlacedFeature> TALL_GRASS_PATCH_PLACEMENT = createKey("tall_grass_patch");
public static final ResourceKey<PlacedFeature> ORE_LUMINITE_PLACEMENT = createKey("luminite_ore");
public static final ResourceKey<PlacedFeature> ORE_MALACHITE_PLACEMENT = createKey("malachite_ore");

private static ResourceKey<PlacedFeature> createKey(String name) {
return ResourceKey.create(Registries.PLACED_FEATURE, new ResourceLocation(TheSideways.MOD_ID, name));
Expand Down Expand Up @@ -60,6 +61,9 @@ public static void bootstrap(BootstapContext<PlacedFeature> context) {

register(context, ORE_LUMINITE_PLACEMENT, configuredFeatures.getOrThrow(ModConfiguredFeatures.ORE_LUMINITE_CONFIGURATION),
SidewaysPlacedFeatureBuilders.commonOrePlacement(20, HeightRangePlacement.uniform(VerticalAnchor.bottom(), VerticalAnchor.aboveBottom(128))));

register(context, ORE_MALACHITE_PLACEMENT, configuredFeatures.getOrThrow(ModConfiguredFeatures.ORE_MALACHITE_CONFIGURATION),
SidewaysPlacedFeatureBuilders.commonOrePlacement(8, HeightRangePlacement.uniform(VerticalAnchor.bottom(), VerticalAnchor.aboveBottom(128))));
}

private static void register(BootstapContext<PlacedFeature> context, ResourceKey<PlacedFeature> key, Holder<ConfiguredFeature<?, ?>> configuration, List<PlacementModifier> modifiers) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"ambient_light": 0.0,
"bed_works": true,
"bed_works": false,
"coordinate_scale": 1.0,
"effects": "thesideways:the_sideways",
"has_ceiling": false,
Expand All @@ -9,7 +9,7 @@
"height": 256,
"infiniburn": "#minecraft:infiniburn_overworld",
"logical_height": 256,
"min_y": 32,
"min_y": -32,
"monster_spawn_block_light_limit": 0,
"monster_spawn_light_level": {
"type": "minecraft:uniform",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
[],
[],
[
"thesideways:luminite_ore"

"thesideways:luminite_ore",
"thesideways:malachite_ore"



Expand Down

0 comments on commit 82f9800

Please sign in to comment.