Jump to content
  • Home
  • Files
  • Docs
Topics
  • All Content

  • This Topic
  • This Forum

  • Advanced Search
  • Existing user? Sign In  

    Sign In



    • Not recommended on shared computers


    • Forgot your password?

  • Sign Up
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • [1.16.4] Custom World Type & Biomes
Currently Supported: 1.16.X (Latest) and 1.15.X (LTS)
Sign in to follow this  
Followers 1
JoieNL

[1.16.4] Custom World Type & Biomes

By JoieNL, December 5, 2020 in Modder Support

  • Reply to this topic
  • Start new topic

Recommended Posts

JoieNL    0

JoieNL

JoieNL    0

  • Tree Puncher
  • JoieNL
  • Members
  • 0
  • 30 posts
Posted December 5, 2020

Hey y'all,

I've been trying my hands at making a new world type lately. This works exactly as it should using the recently added class

ForgeWorldType

. Now, I want my custom world type to use a set of custom biomes, and this is where I run into trouble. I've copied the code in

OverworldBiomeProvider

and swapped the entries of the biomes field out for my custom biomes. However, the vanilla biomes spawn like in the Default world type when I generate a world using my custom world type. And for the record: yes, I am passing it into the constructor of ForgeWorldType. I have already located the issue: the

getNoiseBiome

method in my copied biome provider class uses a lookup registry that always contains the vanilla biomes. How would I go about correctly implementing this method, such that my custom biomes generate instead? And on the subject of implementing biome provider methods, how do I implement the

getBiomeProviderCodec

method?

TL;DR: How do I implement BiomeProvider's abstract methods in my custom biome provider class?

  • Quote

Share this post


Link to post
Share on other sites

JoieNL    0

JoieNL

JoieNL    0

  • Tree Puncher
  • JoieNL
  • Members
  • 0
  • 30 posts
Posted December 9, 2020

So it took me a few days, but I managed to figure things out myself. First of all, apparently

RegistryObject<Biome>

fields used with

DeferredRegister

 cannot be referenced directly. When you want to reference your custom biomes, you need to get them from the biome registry itself. This solves the issues I had with the

getNoiseBiome

method. Secondly, the codec thing. All I had to do to get that working, was to register the codec in a static initialiser in my biome provider class:

static {
    Registry.register(Registry.BIOME_PROVIDER_CODEC, new ResourceLocation(MOD_ID, "biome_source"), CODEC);
}

I hope this helps anyone trying this for themselves.

  • Quote

Share this post


Link to post
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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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.

    • Insert image from URL
×
  • Desktop
  • Tablet
  • Phone
Sign in to follow this  
Followers 1
Go To Topic Listing



  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • diesieben07
      (1.16.2) Making a new capability (3)

      By diesieben07 · Posted 3 minutes ago

      @EventBusSubscriber subscribes to the forge bus by default, but FMLCommonSetupEvent is fired on the mod bus.     Please use the code format when posting code.
    • e2rifia
      (1.16.2) Making a new capability (3)

      By e2rifia · Posted 5 minutes ago

      @Mod(Main.MODID) @Mod.EventBusSubscriber(modid = Main.MODID) public class Main{     public static final String MODID = "main"; @SubscribeEvent      public static void setup(final FMLCommonSetupEvent event) {         System.out.println("I'm setting up!");         MinecraftForge.EVENT_BUS.register(new CapabilityAttatcher());         MagicCapability.register();     } }  
    • Heinzchen
      Update mod to 1.16.5

      By Heinzchen · Posted 6 minutes ago

      It is a mod I made.
    • diesieben07
      [1.16.4] How i can open a container by clicking on my mob

      By diesieben07 · Posted 7 minutes ago

      Yes, use getUniqueId instead of the name.
    • Klarks
      [1.16.4] How i can open a container by clicking on my mob

      By Klarks · Posted 8 minutes ago

      where i can get uuid. from player entity? Should my entity implement it?
  • Topics

    • e2rifia
      7
      (1.16.2) Making a new capability (3)

      By e2rifia
      Started 2 hours ago

    • Heinzchen
      2
      Update mod to 1.16.5

      By Heinzchen
      Started 14 hours ago

    • Klarks
      10
      [1.16.4] How i can open a container by clicking on my mob

      By Klarks
      Started 14 hours ago

    • XenoPyax
      3
      [1.16.4] Render Player in gui

      By XenoPyax
      Started 3 hours ago

    • metword
      16
      [1.16.4] Config file will not update.

      By metword
      Started Wednesday at 04:20 PM

  • Who's Online (See full list)

    • diesieben07
    • e2rifia
    • Choonster
    • Heinzchen
    • Pl00py_R
    • Danebi
    • Klarks
    • jdawg3636
    • Funyaah
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • [1.16.4] Custom World Type & Biomes
  • Theme

Copyright © 2019 ForgeDevelopment LLC · Ads by Longitude Ads LLC Powered by Invision Community