Jump to content

[1.16] Overriden minecraft grass block is missing from world gen


Recommended Posts

Posted

Hello, I was trying to override the vanilla grass block spread behavior by registering my own grass block and implementing it's own random tick function, it seemed to work in an all dirt superflat but the moment I created a regular world, all grass blocks are missing and patches of sand, gravel and pumpkins are floating up. (https://i.imgur.com/9fYC5YF.png)

I have to assume this field is the culprit because of it being static and DeferredRegister happening later. (along with some in other world gen classes that cache the old BlockState)

public abstract class SurfaceBuilder<C extends ISurfaceBuilderConfig> extends net.minecraftforge.registries.ForgeRegistryEntry<SurfaceBuilder<?>> {
   [...]
   private static final BlockState GRASS_BLOCK = Blocks.GRASS_BLOCK.defaultBlockState();
   [...]
}

I tried to use reflection to fix this but it doesn't seem to change things and is probably a bad idea, is there any way to fix this or is it better to avoid overriding any vanilla blocks and instead have my own replace them in generated chunks?

https://github.com/SekaiRed/GradualGrass

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.