From c537b235efa20960d90bc46e6f15273bbcd85797 Mon Sep 17 00:00:00 2001 From: LudoCrypt <60561627+LudoCrypt@users.noreply.github.com> Date: Mon, 16 Nov 2020 11:04:37 -0600 Subject: [PATCH] Fixed Registry Error --- gradle.properties | 2 +- src/main/java/net/ludocrypt/perorate/Perorate.java | 6 ++++++ .../net/ludocrypt/perorate/mixin/DimensionTypeMixin.java | 3 ++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/gradle.properties b/gradle.properties index 22445a0..acbc12b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -8,7 +8,7 @@ loader_version=0.10.8 # Mod Properties - mod_version = 1.0.2 + mod_version = 1.0.3 maven_group = net.ludocrypt archives_base_name = perorate diff --git a/src/main/java/net/ludocrypt/perorate/Perorate.java b/src/main/java/net/ludocrypt/perorate/Perorate.java index 5d57aee..35f6aaa 100644 --- a/src/main/java/net/ludocrypt/perorate/Perorate.java +++ b/src/main/java/net/ludocrypt/perorate/Perorate.java @@ -2,7 +2,10 @@ import net.fabricmc.api.ModInitializer; import net.ludocrypt.perorate.util.NoiseCollisionChecker; +import net.ludocrypt.perorate.world.EndMultiNoiseBiomeSource; import net.ludocrypt.perorate.world.PerorateEnd; +import net.minecraft.util.Identifier; +import net.minecraft.util.registry.Registry; import net.minecraft.world.biome.Biome; import net.minecraft.world.biome.BiomeKeys; @@ -10,6 +13,9 @@ public class Perorate implements ModInitializer { @Override public void onInitialize() { + + Registry.register(Registry.BIOME_SOURCE, new Identifier("perorate", "end_multi_noise"), EndMultiNoiseBiomeSource.CODEC); + // Default End Biomes PerorateEnd.addCenterBiome(BiomeKeys.THE_END, new Biome.MixedNoisePoint(0.0F, 0.0F, 0.0F, 0.0F, 0.0F)); PerorateEnd.addHighlandsBiome(BiomeKeys.END_HIGHLANDS, new Biome.MixedNoisePoint(0.0F, 0.0F, 0.0F, 0.0F, 0.0F)); diff --git a/src/main/java/net/ludocrypt/perorate/mixin/DimensionTypeMixin.java b/src/main/java/net/ludocrypt/perorate/mixin/DimensionTypeMixin.java index 7a45692..4d7af30 100644 --- a/src/main/java/net/ludocrypt/perorate/mixin/DimensionTypeMixin.java +++ b/src/main/java/net/ludocrypt/perorate/mixin/DimensionTypeMixin.java @@ -13,11 +13,12 @@ import net.minecraft.world.gen.chunk.ChunkGeneratorSettings; @Mixin(value = DimensionType.class, priority = 69) -public class DimensionTypeMixin { +public abstract class DimensionTypeMixin { @Inject(method = "createEndGenerator", at = @At("HEAD"), cancellable = true) private static void PERORATE_replaceEndGenerator(Registry biomeRegistry, Registry chunkGeneratorSettingsRegistry, long seed, CallbackInfoReturnable ci) { ci.setReturnValue(PerorateEnd.createEndGenerator(biomeRegistry, chunkGeneratorSettingsRegistry, seed)); ci.cancel(); } + }