Posted August 31, 20178 yr I created a single custom biome for my mod but it doesnt seem to be generating at all. I have found no tutorials for this so I have been looking at other people's code on GitHub. Even setting the weight in the BiomeManager to 1000 does nothing. There are no errors in registration, it just doesn't generate. What am I doing wrong? WorldUtil.java (registration) package io.github.voxelbuster.sbmod.common.world; import io.github.voxelbuster.sbmod.common.StarboundMod; import net.minecraft.world.biome.Biome; import net.minecraft.world.biome.BiomeProvider; import net.minecraftforge.common.BiomeDictionary; import net.minecraftforge.common.BiomeManager; import net.minecraftforge.event.RegistryEvent; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import net.minecraftforge.registries.IForgeRegistry; @Mod.EventBusSubscriber(modid = StarboundMod.MODID) public class WorldUtil { public static final BiomeAncientGarden ancientGarden = new BiomeAncientGarden(); @SubscribeEvent public static void registerBiomes(RegistryEvent.Register<Biome> event) { IForgeRegistry<Biome> registry = event.getRegistry(); registry.register(ancientGarden); BiomeDictionary.addTypes(ancientGarden, BiomeDictionary.Type.FOREST); BiomeManager.addBiome(BiomeManager.BiomeType.WARM, new BiomeManager.BiomeEntry(ancientGarden, 1000)); BiomeManager.addSpawnBiome(ancientGarden); BiomeProvider.allowedBiomes.add(ancientGarden); } } BiomeAncientGarden.java (biome) package io.github.voxelbuster.sbmod.common.world; import io.github.voxelbuster.sbmod.common.StarboundMod; import net.minecraft.entity.EnumCreatureType; import net.minecraft.init.Blocks; import net.minecraft.util.ResourceLocation; import net.minecraft.world.biome.Biome; import java.util.ArrayList; import java.util.List; public class BiomeAncientGarden extends Biome { ArrayList<SpawnListEntry> spawnableMonsterList = new ArrayList<>(); private static BiomeProperties properties = new Biome.BiomeProperties("ancientgarden"); static { properties.setBaseBiome("mutated_forest"); properties.setTemperature(0.7f); properties.setRainfall(0f); } public BiomeAncientGarden() { super(properties); this.setRegistryName(new ResourceLocation(StarboundMod.MODID, "ancientgarden")); decorator.treesPerChunk = 1; decorator.flowersPerChunk = 64; decorator.clayPerChunk = 0; decorator.sandPatchesPerChunk = 0; decorator.grassPerChunk = 64; decorator.reedsPerChunk = 2; this.topBlock = Blocks.GOLD_BLOCK.getDefaultState(); } @Override public boolean isHighHumidity() { return true; } @Override public boolean canRain() { return false; } @Override public boolean isMutation() { return true; } @Override public List<SpawnListEntry> getSpawnableList(EnumCreatureType type) { switch (type) { case AMBIENT: return this.spawnableCreatureList; case WATER_CREATURE: return this.spawnableWaterCreatureList; case MONSTER: return this.spawnableMonsterList; case CREATURE: return this.spawnableCreatureList; } return null; } } Edited August 31, 20178 yr by VoxelBuster
August 31, 20178 yr I believe you don't use public static final BiomeAncientGarden ancientGarden = new BiomeAncientGarden(); In 1.12, I think you may use a different method, but I don't know what that method would be. Idk though.
August 31, 20178 yr Author 1 minute ago, Big_Bad_E said: I believe you don't use public static final BiomeAncientGarden ancientGarden = new BiomeAncientGarden(); In 1.12, I think you may use a different method, but I don't know what that method would be. Idk though. Actually it was this code @Override public boolean isHighHumidity() { return true; } @Override public boolean canRain() { return false; } @Override public boolean isMutation() { return true; } @Override public List<SpawnListEntry> getSpawnableList(EnumCreatureType type) { switch (type) { case AMBIENT: return this.spawnableCreatureList; case WATER_CREATURE: return this.spawnableWaterCreatureList; case MONSTER: return this.spawnableMonsterList; case CREATURE: return this.spawnableCreatureList; } return null; } that was causing a problem. For whatever reason overriding these methods invalidate the biome (I guess?). As soon as I removed them it generated fine. Hm, this biome is pretty boring.
August 31, 20178 yr Hmm... I wonder what is the isHighHumidity for if you don't have rain enabled? Also, do you know how to make an Entity? I need help with that rn. (If you do just msg me your entity code.) Edited August 31, 20178 yr by Big_Bad_E
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.