Jump to content

[1.12.2] Correct way to use/call ModdedBiomeDecorator?


Zathrox

Recommended Posts

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!

Link to comment
Share on other sites

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

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

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