Posted March 23, 20169 yr I'm adding in a biome for my dimension and when I try to do the same thing that BiomeGenBase does when registering there biomes It gives me an error stating that the methods in BiomeProperties are not visible. This is my biome class: package com.moreoresmod.main.init; import net.minecraft.init.Bootstrap; import net.minecraft.util.ResourceLocation; import net.minecraft.world.biome.BiomeGenBase; import net.minecraft.world.biome.BiomeGenOcean; import net.minecraftforge.common.BiomeManager; import net.minecraftforge.common.BiomeManager.BiomeEntry; import net.minecraftforge.common.BiomeManager.BiomeType; import com.moreoresmod.main.biomes.BiomeGenOtherlyworld; public class MoreOresModBiomes { public static final BiomeGenBase otherlyworldBiome; private static BiomeGenBase.BiomeProperties otherlyworldProperties = new BiomeGenBase.BiomeProperties("Otherlyworld"); public static int lastBiomeID = 0; static{ if(!Bootstrap.isRegistered()){ throw new RuntimeException("Accessed Biomes before Bootstrap!"); }else{ otherlyworldBiome = getRegisteredBiome("otherlyworld"); } } public static void init(){ BiomeGenBase.registerBiome(90, "otherlyworld", new BiomeGenOtherlyworld((new BiomeGenBase.BiomeProperties("Otherlyworld")).setSnowEnabled().setTemperature(0F).setWaterColor(000000))); //otherlyworldBiome = new BiomeGenOtherlyworld((new BiomeGenBase.BiomeProperties("Otherlyworld"))); //BiomeEntry entry_otherlyworld = new BiomeEntry(otherlyworldBiome, 20); //BiomeManager.addBiome(BiomeType.WARM, entry_otherlyworld); //BiomeManager.addSpawnBiome(otherlyworldBiome); } private static BiomeGenBase getRegisteredBiome(String id) { BiomeGenBase biomegenbase = (BiomeGenBase)BiomeGenBase.biomeRegistry.getObject(new ResourceLocation(id)); if (biomegenbase == null) { throw new IllegalStateException("Invalid Biome requested: " + id); } else { return biomegenbase; } } }
March 23, 20169 yr I looked at Biomes O Plenty to see how they did it when I did a port. Look at PropsBuilder and BiomeProps in https://github.com/Glitchfiend/BiomesOPlenty/blob/BOP-1.9-4.0.x/src/main/java/biomesoplenty/api/biome/BOPBiome.java
March 23, 20169 yr Author Can you actually show the code instead of making me look through hundreds of files that all relate to biomes? Thanks.
March 23, 20169 yr I did, I gave you a direct link to the file and said "Look at PropsBuilder and BiomeProps" That's all the code you need. You then register your biome like new YourBiome((new PropsBuilder("Biome Name")).withRainfall().<allMethodsYouWantToUse>().build());
March 23, 20169 yr PropsBuilder and BiomeProps are defined in that class file, so NO, you cannot just import them. Go look at them. They are near the bottom (look at BiomeProps in particular).
March 24, 20169 yr You can import it it's a public class. anyways.. could be fixed with a simple PR to change those methods from protected to public. So that the class can be used outside of the BiomeGenBase class/SubClasses. I do Forge for free, however the servers to run it arn't free, so anything is appreciated. Consider supporting the team on Patreon
March 24, 20169 yr What does PR stand for? Pull Request. You can see the guidelines for contributing to Forge here. It looks like Lex just made this change himself, so there's no need for a PR now. Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.
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.