Skip to content

Commit

Permalink
tryna fix custom ore gen
Browse files Browse the repository at this point in the history
  • Loading branch information
LucasPlacentino committed Dec 31, 2022
1 parent 6a2afd4 commit 142b72e
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,15 @@ public class ModConfiguredFeatures {
10 // vein size
)));
*/
// public static final RegistryObject<OreFeatures> BORAX_ORE =
// CONFIGURED_FEATURES.register("borax_ore",
// () -> new OreFeatures(new OreConfiguration(
// new TagMatchTest(BlockTags.BASE_STONE_OVERWORLD),
// ModBlocks.BORAX_ORE.get().defaultBlockState(),
// 10 // vein size
// )
// ));



public static final ResourceKey<ConfiguredFeature<?, ?>> ORE_BORAX = FeatureUtils.createKey("ore_borax");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.obsilab.mcsc.MCSC;
import net.minecraft.core.registries.Registries;
import net.minecraft.data.worldgen.features.FeatureUtils;
import net.minecraft.world.level.levelgen.VerticalAnchor;
import net.minecraft.world.level.levelgen.placement.*;
import net.minecraftforge.eventbus.api.IEventBus;
Expand All @@ -14,13 +15,13 @@ public class ModPlacedFeatures {
public static final DeferredRegister<PlacedFeature> PLACED_FEATURES =
DeferredRegister.create(Registries.PLACED_FEATURE, MCSC.MOD_ID);

public static final RegistryObject<PlacedFeature> BORAX_ORE_PLACED = PLACED_FEATURES.register("borax_ore_placed",
() -> new PlacedFeature(ModConfiguredFeatures.BORAX_ORE.getHolder().get(),
commonOrePlacement(6, // VeinsPerChunk
HeightRangePlacement.triangle(
VerticalAnchor.absolute(0),
VerticalAnchor.absolute(160)
))));
// public static final RegistryObject<PlacedFeature> BORAX_ORE_PLACED = PLACED_FEATURES.register("borax_ore_placed",
// () -> new PlacedFeature(ModConfiguredFeatures.BORAX_ORE.getHolder().get(),
// commonOrePlacement(6, // VeinsPerChunk
// HeightRangePlacement.triangle(
// VerticalAnchor.absolute(0),
// VerticalAnchor.absolute(160)
// ))));


public static List<PlacementModifier> orePlacement(PlacementModifier placementModifier, PlacementModifier placementModifier1) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
{
"type": "minecraft:height_range",
"height": {
"type": "minecraft:uniform",
"type": "minecraft:triangle",
"max_inclusive": {
"below_top": 0
"absolute": 160
},
"min_inclusive": {
"absolute": 136
"absolute": 0
}
}
},
Expand Down

0 comments on commit 142b72e

Please # to comment.