Jump to content

Recommended Posts

Posted

I've been trying to implement a custom biome and I've run across an error that crashes my game when trying to create a new world and disallows me to enter any existing worlds.

I followed this tutorial for making biomes (with one or two changes to class names and method names).

My code looks like this

  Reveal hidden contents

and the exception is this

  Reveal hidden contents

What exactly am I missing? I understand that the tutorial is for 1.16, but I couldn't find anything for 1.17 and so far it hasn't been that difficult to implement it into my project. Did they add a step in 1.17?

Posted

why on earth are you creating a ResourceKey in BiomeLoadingEvent, you should use the Name you get from the Event and the Location of the ResourceKey (you can get it from ResourceKey#location) instead also is your FMLCommonSetupEvent fierd?

Posted

sorry my mistake, did not see that the tutorial is for 1.16 and ResourceKey#get in 1.17 has been removed
i would recommend you to use the ResourceLocations instead,
one location you can get from the Event the other from your ResourceKey via ResourceKey#location

  • 2 weeks later...
Posted
  On 11/12/2021 at 9:09 PM, Luis_ST said:

sorry my mistake, did not see that the tutorial is for 1.16 and ResourceKey#get in 1.17 has been removed
i would recommend you to use the ResourceLocations instead,
one location you can get from the Event the other from your ResourceKey via ResourceKey#location

Expand  

I've implemented this, but I am still getting errors when trying to add my custom biome

Posted
  On 11/24/2021 at 7:57 PM, Luis_ST said:

post updated code

Expand  
  Reveal hidden contents

 

  • 2 weeks later...
Posted

if you add your Biome to the Overworld via BiomeManager#addAdditionalOverworldBiomes,
you need to register your Biome via DeferredRegister or RegistryEvent

unfortunately a json only Biome does not work in this case

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.