-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Worldgen again, Breccia Sounds & Handheld Nozzle Recipe & Tweaks
- Loading branch information
Showing
16 changed files
with
347 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
src/generated/resources/data/create_dd/recipes/mechanical_crafting/handheld_nozzle.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
{ | ||
"type": "create:mechanical_crafting", | ||
"acceptMirrored": true, | ||
"key": { | ||
"A": { | ||
"item": "create:andesite_alloy" | ||
}, | ||
"B": { | ||
"tag": "forge:storage_blocks/copper" | ||
}, | ||
"C": { | ||
"tag": "forge:ingots/copper" | ||
}, | ||
"E": { | ||
"item": "create:electron_tube" | ||
}, | ||
"F": { | ||
"item": "create:fluid_pipe" | ||
}, | ||
"M": { | ||
"item": "create:precision_mechanism" | ||
}, | ||
"P": { | ||
"item": "create:propeller" | ||
}, | ||
"W": { | ||
"tag": "minecraft:wool" | ||
} | ||
}, | ||
"pattern": [ | ||
"WBACE ", | ||
"WBPCMCC", | ||
" AFFACC" | ||
], | ||
"result": { | ||
"item": "create_dd:handheld_nozzle" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
src/main/java/uwu/lopyluna/create_dd/content/world/DesiresLayerPatterns.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package uwu.lopyluna.create_dd.content.world; | ||
|
||
import com.simibubi.create.content.decoration.palettes.AllPaletteStoneTypes; | ||
import com.simibubi.create.infrastructure.worldgen.LayerPattern; | ||
import com.tterrag.registrate.util.nullness.NonNullSupplier; | ||
import net.minecraft.world.level.block.Blocks; | ||
import uwu.lopyluna.create_dd.registry.DesiresPaletteStoneTypes; | ||
|
||
public class DesiresLayerPatterns { | ||
|
||
public static final NonNullSupplier<LayerPattern> SPACE_ROCK = () -> LayerPattern.builder() | ||
.layer(l -> l.weight(2) | ||
.block(DesiresPaletteStoneTypes.BRECCIA.getBaseBlock().get()) | ||
.size(2, 5)) | ||
.layer(l -> l.weight(1) | ||
.block(DesiresPaletteStoneTypes.GABBRO.getBaseBlock().get()) | ||
.block(Blocks.GRANITE) | ||
.size(2, 3)) | ||
.layer(l -> l.weight(1) | ||
.blocks(Blocks.GRANITE, DesiresPaletteStoneTypes.GABBRO.getBaseBlock().get()) | ||
.size(2, 2)) | ||
.layer(l -> l.weight(1) | ||
.block(Blocks.GLOWSTONE) | ||
.size(1, 2)) | ||
.build(); | ||
|
||
|
||
public static final NonNullSupplier<LayerPattern> WEATHERED_LIMESTONE = () -> LayerPattern.builder() | ||
.layer(l -> l.weight(1) | ||
.passiveBlock()) | ||
.layer(l -> l.weight(2) | ||
.block(Blocks.CALCITE)) | ||
.layer(l -> l.weight(1) | ||
.block(DesiresPaletteStoneTypes.DOLOMITE.getBaseBlock().get())) | ||
.layer(l -> l.weight(2) | ||
.block(DesiresPaletteStoneTypes.WEATHERED_LIMESTONE.getBaseBlock().get()) | ||
.size(2, 4)) | ||
.build(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
src/main/java/uwu/lopyluna/create_dd/infrastructure/world/CDrivenPlacement.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package uwu.lopyluna.create_dd.infrastructure.world; | ||
|
||
import com.simibubi.create.infrastructure.worldgen.ConfigDrivenPlacement; | ||
import com.simibubi.create.infrastructure.worldgen.OreFeatureConfigEntry; | ||
import net.minecraft.world.level.levelgen.placement.PlacementModifierType; | ||
import uwu.lopyluna.create_dd.infrastructure.config.DesiresConfigs; | ||
|
||
public class CDrivenPlacement extends ConfigDrivenPlacement { | ||
public CDrivenPlacement(OreFeatureConfigEntry entry) { | ||
super(entry); | ||
} | ||
|
||
@Override | ||
public PlacementModifierType<?> type() { | ||
return DesiresPlacementModifiers.CONFIG_DRIVEN.get(); | ||
} | ||
|
||
@Override | ||
public float getFrequency() { | ||
if (DesiresConfigs.common().worldGen.disable.get()) | ||
return 0; | ||
return getEntry().frequency.getF(); | ||
} | ||
} |
42 changes: 42 additions & 0 deletions
42
src/main/java/uwu/lopyluna/create_dd/infrastructure/world/DesireBuiltinRegistration.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
package uwu.lopyluna.create_dd.infrastructure.world; | ||
|
||
import com.simibubi.create.infrastructure.worldgen.OreFeatureConfigEntry; | ||
import net.minecraft.core.Registry; | ||
import net.minecraft.data.BuiltinRegistries; | ||
import net.minecraft.resources.ResourceLocation; | ||
import net.minecraft.world.level.levelgen.feature.ConfiguredFeature; | ||
import net.minecraft.world.level.levelgen.placement.PlacedFeature; | ||
import net.minecraftforge.common.world.BiomeModifier; | ||
import net.minecraftforge.eventbus.api.IEventBus; | ||
import net.minecraftforge.registries.DeferredRegister; | ||
import net.minecraftforge.registries.ForgeRegistries; | ||
|
||
import java.util.Map; | ||
|
||
import static uwu.lopyluna.create_dd.DesiresCreate.MOD_ID; | ||
|
||
public class DesireBuiltinRegistration { | ||
private static final DeferredRegister<ConfiguredFeature<?, ?>> CONFIGURED_FEATURE_REGISTER = DeferredRegister.create(Registry.CONFIGURED_FEATURE_REGISTRY, MOD_ID); | ||
private static final DeferredRegister<PlacedFeature> PLACED_FEATURE_REGISTER = DeferredRegister.create(Registry.PLACED_FEATURE_REGISTRY, MOD_ID); | ||
private static final DeferredRegister<BiomeModifier> BIOME_MODIFIER_REGISTER = DeferredRegister.create(ForgeRegistries.Keys.BIOME_MODIFIERS, MOD_ID); | ||
|
||
static { | ||
for (Map.Entry<ResourceLocation, OreFeatureConfigEntry> entry : OreFeatureConfigEntry.ALL.entrySet()) { | ||
ResourceLocation id = entry.getKey(); | ||
if (id.getNamespace().equals(MOD_ID)) { | ||
OreFeatureConfigEntry.DatagenExtension datagenExt = entry.getValue().datagenExt(); | ||
if (datagenExt != null) { | ||
CONFIGURED_FEATURE_REGISTER.register(id.getPath(), () -> datagenExt.createConfiguredFeature(BuiltinRegistries.ACCESS)); | ||
PLACED_FEATURE_REGISTER.register(id.getPath(), () -> datagenExt.createPlacedFeature(BuiltinRegistries.ACCESS)); | ||
BIOME_MODIFIER_REGISTER.register(id.getPath(), () -> datagenExt.createBiomeModifier(BuiltinRegistries.ACCESS)); | ||
} | ||
} | ||
} | ||
} | ||
|
||
public static void register(IEventBus modEventBus) { | ||
CONFIGURED_FEATURE_REGISTER.register(modEventBus); | ||
PLACED_FEATURE_REGISTER.register(modEventBus); | ||
BIOME_MODIFIER_REGISTER.register(modEventBus); | ||
} | ||
} |
Oops, something went wrong.