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.

Featured Replies

Posted

Hello there,

 

Just curious, what is the correct way to call and override and use a moddedBiomeDecorator functions in a custom biome?

 

Like I've read people saying to override: CreateBiomeDecorator or getModdedBiomeDecorator but how do I call the variables and functions in my biome file? all I can seem to do is call the original decorator stuff.

 

This example is me, override the getModdedBiomeDecorator but I can't seem to figure out how to call my waterGrassPerChunks generator functions from my ExplorerDecorator.

	public BiomeCoralReef(BiomeProperties properties) {
		
		super(properties);
		topBlock = Blocks.SAND.getDefaultState();
		fillerBlock = Blocks.SAND.getDefaultState();
		this.decorator.clayPerChunk = 0;
		this.decorator.sandPatchesPerChunk = 10;
		this.decorator.gravelPatchesPerChunk = 0;
		this.decorator.waterGrassPerChunk = 0; //This calls an error because well it doesn't exist in the original biome decorator
		this.getModdedBiomeDecorator(decorator).waterGrassPerChunk = 0; //Once again, doesn't work
		getModdedBiomeDecorator(decorator).waterGrassPerChunk = 0; //How do I call the modded biome decorate correctly?

	}
	
	@Override
	public BiomeDecorator getModdedBiomeDecorator(BiomeDecorator original) {
		return new ExplorerDecorator();
	}

 

Now, this is why i'm asking how to do it correctly because this example below, works but i'm pretty much ignoring the entire getModdedBiomeDecorator/createBiomeDecorator functions and am not even overwriting them

    ExplorerDecorator explorerDecorator;
    
	public BiomeKelpForest(BiomeProperties properties) {
		
		super(properties);
		decorator = new ExplorerDecorator();
		explorerDecorator = (ExplorerDecorator)decorator;
		explorerDecorator.waterGrassPerChunk = 5;
	}

 

Like it works and all, so I could just keep on doing that but if there is a way to do it correctly through forge, i'd rather use it properly.

 

So any help or tips would be fantastic!

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.