Skip to content

Commit

Permalink
Fixed Registry Error
Browse files Browse the repository at this point in the history
  • Loading branch information
LudoCrypt committed Nov 16, 2020
1 parent aaf96a3 commit c537b23
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 6 additions & 0 deletions src/main/java/net/ludocrypt/perorate/Perorate.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,20 @@

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;

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));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<Biome> biomeRegistry, Registry<ChunkGeneratorSettings> chunkGeneratorSettingsRegistry, long seed, CallbackInfoReturnable<ChunkGenerator> ci) {
ci.setReturnValue(PerorateEnd.createEndGenerator(biomeRegistry, chunkGeneratorSettingsRegistry, seed));
ci.cancel();
}

}

0 comments on commit c537b23

Please sign in to comment.