From 647e5d2d4641e4178ff22e9a39cf3035059391eb Mon Sep 17 00:00:00 2001 From: UselessBullets <80850784+UselessBullets@users.noreply.github.com> Date: Fri, 10 Nov 2023 10:57:30 -0600 Subject: [PATCH] Bug Fixes --- .../useless/terrainapi/generation/retro/RetroConfig.java | 6 ++++++ .../useless/terrainapi/generation/retro/RetroFunctions.java | 1 + .../generation/retro/api/ChunkDecoratorRetroAPI.java | 4 ++-- .../initialization/worldtypes/RetroInitialization.java | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 src/main/java/useless/terrainapi/generation/retro/RetroConfig.java diff --git a/src/main/java/useless/terrainapi/generation/retro/RetroConfig.java b/src/main/java/useless/terrainapi/generation/retro/RetroConfig.java new file mode 100644 index 0000000..e52c4bc --- /dev/null +++ b/src/main/java/useless/terrainapi/generation/retro/RetroConfig.java @@ -0,0 +1,6 @@ +package useless.terrainapi.generation.retro; + +import useless.terrainapi.config.OreConfig; + +public class RetroConfig extends OreConfig { +} diff --git a/src/main/java/useless/terrainapi/generation/retro/RetroFunctions.java b/src/main/java/useless/terrainapi/generation/retro/RetroFunctions.java index ca59b93..f6a7148 100644 --- a/src/main/java/useless/terrainapi/generation/retro/RetroFunctions.java +++ b/src/main/java/useless/terrainapi/generation/retro/RetroFunctions.java @@ -9,6 +9,7 @@ import useless.terrainapi.generation.retro.api.ChunkDecoratorRetroAPI; public class RetroFunctions { + public static RetroConfig retroConfig = ChunkDecoratorRetroAPI.retroConfig; public static Void generateDungeon(Parameters parameters){ int x = parameters.chunk.xPosition * 16; int z = parameters.chunk.zPosition * 16; diff --git a/src/main/java/useless/terrainapi/generation/retro/api/ChunkDecoratorRetroAPI.java b/src/main/java/useless/terrainapi/generation/retro/api/ChunkDecoratorRetroAPI.java index 073f0e6..b57273f 100644 --- a/src/main/java/useless/terrainapi/generation/retro/api/ChunkDecoratorRetroAPI.java +++ b/src/main/java/useless/terrainapi/generation/retro/api/ChunkDecoratorRetroAPI.java @@ -7,18 +7,18 @@ import net.minecraft.core.world.noise.RetroPerlinNoise; import org.jetbrains.annotations.ApiStatus; import useless.terrainapi.config.ConfigManager; -import useless.terrainapi.config.OreConfig; import useless.terrainapi.generation.ChunkDecoratorAPI; import useless.terrainapi.generation.Parameters; import useless.terrainapi.generation.StructureFeatures; import useless.terrainapi.generation.overworld.OverworldBiomeFeatures; import useless.terrainapi.generation.overworld.OverworldOreFeatures; import useless.terrainapi.generation.overworld.OverworldRandomFeatures; +import useless.terrainapi.generation.retro.RetroConfig; import java.util.Random; public class ChunkDecoratorRetroAPI extends ChunkDecoratorAPI { - public static OreConfig retroConfig = ConfigManager.getConfig("retro", OreConfig.class); + public static RetroConfig retroConfig = ConfigManager.getConfig("retro", RetroConfig.class); public final RetroPerlinNoise treeDensityNoise; public final boolean snowCovered; public static StructureFeatures structureFeatures = new StructureFeatures(); diff --git a/src/main/java/useless/terrainapi/initialization/worldtypes/RetroInitialization.java b/src/main/java/useless/terrainapi/initialization/worldtypes/RetroInitialization.java index 9f5bc3f..1d12ae4 100644 --- a/src/main/java/useless/terrainapi/initialization/worldtypes/RetroInitialization.java +++ b/src/main/java/useless/terrainapi/initialization/worldtypes/RetroInitialization.java @@ -54,7 +54,7 @@ protected void initRandom() { @Override protected void initBiome() { - biomeFeatures.addFeature(RetroFunctions::getTreeFeature, null, RetroFunctions::getTreeDensity, null); + biomeFeatures.addFeature(RetroFunctions::getTreeFeature, null, RetroFunctions::getTreeDensity, null, -1); biomeFeatures.addFeature(new WorldFeatureFlowers(Block.flowerYellow.id), 1, 2, null); biomeFeatures.addFeature(new WorldFeatureSugarCane(), 1, 10, null); biomeFeatures.addFeature(new WorldFeatureCactus(), 1, 1, null);