Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[1.9]BiomeGenBase.BiomeProperties dosen't let you use the methods in it.

Featured Replies

Posted

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;
        }
    }

}

  • Author

Can you actually show the code instead of making me look through hundreds of files that all relate to biomes? Thanks.  :)

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());

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).

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

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.