Jump to content

[Solved] [1.16.5] Unknown biome id emitted by layers: 174


Zemelua
 Share

Recommended Posts

I implement a custom biome in a custom dimension and it crashes when I try to enter the custom dimension with /execute in umu_arcanum: the_silence run tp 0 0 0 (Unknown biome id emitted by layers: 174). I've referred to some mods that implement custom biomes in custom dimensions, but I'm not sure why this error is occurring.


Here is my code: https://github.com/Zemelua/UMU-Arcanum

Link to comment
Share on other sites

post full log please,
but i think your Biome is not registered with an ID,
because the vanilla Biome IDs end with 173 so 174 is a modded biome

Note: if you using the vanilla biome layer system it can lead problems if two mods are register a biome with the same id

Link to comment
Share on other sites

full log:

Spoiler

[19:42:17] [Worker-Main-22/FATAL] [ne.mi.co.ForgeMod/]: Preparing crash report with UUID 92db45c1-d8e1-49fa-be0e-c02dfd3f4eba
[19:42:17] [Worker-Main-18/FATAL] [ne.mi.co.ForgeMod/]: Preparing crash report with UUID 2d8b4bae-3a4d-49b4-bfad-2b32b3765f20
[19:42:17] [Worker-Main-9/FATAL] [ne.mi.co.ForgeMod/]: Preparing crash report with UUID d7c7353e-4720-4ac3-8086-079d656b273a
[19:42:17] [Worker-Main-18/FATAL] [ne.mi.co.ForgeMod/]: Preparing crash report with UUID b9e7dab1-685c-42ac-b48c-5fe63eff6517
[19:42:17] [Server thread/INFO] [minecraft/IntegratedServer]: Saving and pausing game...
[19:42:17] [Worker-Main-18/FATAL] [ne.mi.co.ForgeMod/]: Preparing crash report with UUID c881d047-5329-4c02-9cf9-7e3a81489477
[19:42:17] [Worker-Main-9/FATAL] [ne.mi.co.ForgeMod/]: Preparing crash report with UUID 1d26522a-3428-4fce-b2f4-8e0e7111e77b
[19:42:17] [Worker-Main-22/FATAL] [ne.mi.co.ForgeMod/]: Preparing crash report with UUID aeec4a9d-8afb-487a-8d52-0a23b9733f55
[19:42:17] [Worker-Main-18/FATAL] [ne.mi.co.ForgeMod/]: Preparing crash report with UUID a6c3ea56-cc91-43bd-9b54-84ae2c5a8779
[19:42:17] [Worker-Main-9/FATAL] [ne.mi.co.ForgeMod/]: Preparing crash report with UUID f43fccee-1c97-4127-9ac5-80633859a1e6
[19:42:17] [Server thread/INFO] [minecraft/MinecraftServer]: Saving chunks for level 'ServerLevel[New World]'/minecraft:overworld
[19:42:17] [Render thread/INFO] [minecraft/NewChatGui]: [CHAT] An unexpected error occurred trying to execute that command
[19:42:18] [Server thread/INFO] [minecraft/MinecraftServer]: Saving chunks for level 'ServerLevel[New World]'/minecraft:the_nether
[19:42:18] [Server thread/INFO] [minecraft/MinecraftServer]: Saving chunks for level 'ServerLevel[New World]'/minecraft:the_end
[19:42:18] [Server thread/INFO] [minecraft/MinecraftServer]: Saving chunks for level 'ServerLevel[New World]'/umu_arcanum:the_silence
[19:42:18] [Server thread/ERROR] [minecraft/MinecraftServer]: Encountered an unexpected exception
java.util.concurrent.CompletionException: net.minecraft.crash.ReportedException: Exception generating new chunk
    at java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:273) ~[?:1.8.0_292] {}
    at java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:280) ~[?:1.8.0_292] {}
    at java.util.concurrent.CompletableFuture.uniCompose(CompletableFuture.java:975) ~[?:1.8.0_292] {}
    at java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:940) ~[?:1.8.0_292] {}
    at java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:456) ~[?:1.8.0_292] {}
    at net.minecraft.world.chunk.ChunkTaskPriorityQueueSorter.lambda$null$1(ChunkTaskPriorityQueueSorter.java:44) ~[forge:?] {re:classloading}
    at net.minecraft.util.concurrent.DelegatedTaskExecutor.driveOne(DelegatedTaskExecutor.java:88) ~[forge:?] {re:classloading}
    at net.minecraft.util.concurrent.DelegatedTaskExecutor.driveWhile(DelegatedTaskExecutor.java:132) ~[forge:?] {re:classloading}
    at net.minecraft.util.concurrent.DelegatedTaskExecutor.run(DelegatedTaskExecutor.java:100) ~[forge:?] {re:classloading}
    at java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1402) ~[?:1.8.0_292] {}
    at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289) ~[?:1.8.0_292] {}
    at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056) ~[?:1.8.0_292] {}
    at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692) ~[?:1.8.0_292] {}
    at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:175) ~[?:1.8.0_292] {}
Caused by: net.minecraft.crash.ReportedException: Exception generating new chunk
    at net.minecraft.world.server.ChunkManager.lambda$null$18(ChunkManager.java:552) ~[forge:?] {re:classloading}
    at com.mojang.datafixers.util.Either$Left.map(Either.java:38) ~[datafixerupper-4.0.26.jar:?] {re:classloading}
    at net.minecraft.world.server.ChunkManager.lambda$chunkGenerate$20(ChunkManager.java:539) ~[forge:?] {re:classloading}
    at java.util.concurrent.CompletableFuture.uniCompose(CompletableFuture.java:966) ~[?:1.8.0_292] {}
    ... 11 more
Caused by: java.lang.IllegalStateException: Unknown biome id emitted by layers: 174
    at net.minecraft.world.gen.layer.Layer.func_242936_a(Layer.java:26) ~[forge:?] {re:classloading}
    at io.github.zemelua.umu_arcanum.world.biome.SilenceBiomeProvider.getNoiseBiome(SilenceBiomeProvider.java:58) ~[?:?] {re:classloading}
    at net.minecraft.world.gen.ChunkGenerator.func_242707_a(ChunkGenerator.java:230) ~[forge:?] {re:classloading}
    at net.minecraft.world.chunk.ChunkStatus.lambda$static$2(ChunkStatus.java:41) ~[forge:?] {re:classloading,pl:accesstransformer:B}
    at net.minecraft.world.chunk.ChunkStatus.doGenerationWork(ChunkStatus.java:198) ~[forge:?] {re:classloading,pl:accesstransformer:B}
    at net.minecraft.world.server.ChunkManager.lambda$null$18(ChunkManager.java:541) ~[forge:?] {re:classloading}
    at com.mojang.datafixers.util.Either$Left.map(Either.java:38) ~[datafixerupper-4.0.26.jar:?] {re:classloading}
    at net.minecraft.world.server.ChunkManager.lambda$chunkGenerate$20(ChunkManager.java:539) ~[forge:?] {re:classloading}
    at java.util.concurrent.CompletableFuture.uniCompose(CompletableFuture.java:966) ~[?:1.8.0_292] {}
    ... 11 more
[19:42:18] [Server thread/FATAL] [ne.mi.co.ForgeMod/]: Preparing crash report with UUID 36f9fdec-1f6a-41ab-9a2b-f388ef3706de

When I registered in data/modid/worldgen/biome/biome.json, I thought that I didn't need to use DeferredRegister, but I got the same error when I didn't use DeferredRegister. No other mods have been introduced.

Link to comment
Share on other sites

I'm using Intellij IDEA's Minecraft Develoment Plugin, so I'm not sure which map I'm using. Probably mcp.

WorldGenRegistrys has a static field Map <ResourceLocation, Supplier<?>> REGISTRY_NAME_TO_DEFAULT, which is private access. It looks like there are no other methods to access.

Link to comment
Share on other sites

I found net.minecraft.world.biome.BiomeRegistry.idToKeyMap but it's private access. There are no other methods to access.

According to this , registration should be done just by putting the json file. I think I'm putting the json file in the right place, but what's wrong ...

Link to comment
Share on other sites

public UMUArcanum() {
		UMUArcanumBiomes.initialize();
		UMUArcanumDimensions.initialize();

		FMLJavaModLoadingContext.get().getModEventBus().addListener(this::onFMLCommonSetup);
	}

	public void onFMLCommonSetup(final FMLCommonSetupEvent event) {
		try {
			Field field = BiomeRegistry.class.getDeclaredField("idToKeyMap");
			Int2ObjectMap<RegistryKey<Biome>> map = (Int2ObjectMap<RegistryKey<Biome>>) field.get(null);
			map.put(174, UMUArcanumBiomes.DIM_FOREST);
		} catch (NoSuchFieldException exception) {
			exception.printStackTrace();
		} catch (IllegalAccessException e) {
			e.printStackTrace();
		}
	}

Well, I still get the error. What should i do?

Link to comment
Share on other sites

3 hours ago, Zemelua said:

full log:

  Hide contents

[19:42:17] [Worker-Main-22/FATAL] [ne.mi.co.ForgeMod/]: Preparing crash report with UUID 92db45c1-d8e1-49fa-be0e-c02dfd3f4eba
[19:42:17] [Worker-Main-18/FATAL] [ne.mi.co.ForgeMod/]: Preparing crash report with UUID 2d8b4bae-3a4d-49b4-bfad-2b32b3765f20
[19:42:17] [Worker-Main-9/FATAL] [ne.mi.co.ForgeMod/]: Preparing crash report with UUID d7c7353e-4720-4ac3-8086-079d656b273a
[19:42:17] [Worker-Main-18/FATAL] [ne.mi.co.ForgeMod/]: Preparing crash report with UUID b9e7dab1-685c-42ac-b48c-5fe63eff6517
[19:42:17] [Server thread/INFO] [minecraft/IntegratedServer]: Saving and pausing game...
[19:42:17] [Worker-Main-18/FATAL] [ne.mi.co.ForgeMod/]: Preparing crash report with UUID c881d047-5329-4c02-9cf9-7e3a81489477
[19:42:17] [Worker-Main-9/FATAL] [ne.mi.co.ForgeMod/]: Preparing crash report with UUID 1d26522a-3428-4fce-b2f4-8e0e7111e77b
[19:42:17] [Worker-Main-22/FATAL] [ne.mi.co.ForgeMod/]: Preparing crash report with UUID aeec4a9d-8afb-487a-8d52-0a23b9733f55
[19:42:17] [Worker-Main-18/FATAL] [ne.mi.co.ForgeMod/]: Preparing crash report with UUID a6c3ea56-cc91-43bd-9b54-84ae2c5a8779
[19:42:17] [Worker-Main-9/FATAL] [ne.mi.co.ForgeMod/]: Preparing crash report with UUID f43fccee-1c97-4127-9ac5-80633859a1e6
[19:42:17] [Server thread/INFO] [minecraft/MinecraftServer]: Saving chunks for level 'ServerLevel[New World]'/minecraft:overworld
[19:42:17] [Render thread/INFO] [minecraft/NewChatGui]: [CHAT] An unexpected error occurred trying to execute that command
[19:42:18] [Server thread/INFO] [minecraft/MinecraftServer]: Saving chunks for level 'ServerLevel[New World]'/minecraft:the_nether
[19:42:18] [Server thread/INFO] [minecraft/MinecraftServer]: Saving chunks for level 'ServerLevel[New World]'/minecraft:the_end
[19:42:18] [Server thread/INFO] [minecraft/MinecraftServer]: Saving chunks for level 'ServerLevel[New World]'/umu_arcanum:the_silence
[19:42:18] [Server thread/ERROR] [minecraft/MinecraftServer]: Encountered an unexpected exception
java.util.concurrent.CompletionException: net.minecraft.crash.ReportedException: Exception generating new chunk
    at java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:273) ~[?:1.8.0_292] {}
    at java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:280) ~[?:1.8.0_292] {}
    at java.util.concurrent.CompletableFuture.uniCompose(CompletableFuture.java:975) ~[?:1.8.0_292] {}
    at java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:940) ~[?:1.8.0_292] {}
    at java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:456) ~[?:1.8.0_292] {}
    at net.minecraft.world.chunk.ChunkTaskPriorityQueueSorter.lambda$null$1(ChunkTaskPriorityQueueSorter.java:44) ~[forge:?] {re:classloading}
    at net.minecraft.util.concurrent.DelegatedTaskExecutor.driveOne(DelegatedTaskExecutor.java:88) ~[forge:?] {re:classloading}
    at net.minecraft.util.concurrent.DelegatedTaskExecutor.driveWhile(DelegatedTaskExecutor.java:132) ~[forge:?] {re:classloading}
    at net.minecraft.util.concurrent.DelegatedTaskExecutor.run(DelegatedTaskExecutor.java:100) ~[forge:?] {re:classloading}
    at java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1402) ~[?:1.8.0_292] {}
    at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289) ~[?:1.8.0_292] {}
    at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056) ~[?:1.8.0_292] {}
    at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692) ~[?:1.8.0_292] {}
    at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:175) ~[?:1.8.0_292] {}
Caused by: net.minecraft.crash.ReportedException: Exception generating new chunk
    at net.minecraft.world.server.ChunkManager.lambda$null$18(ChunkManager.java:552) ~[forge:?] {re:classloading}
    at com.mojang.datafixers.util.Either$Left.map(Either.java:38) ~[datafixerupper-4.0.26.jar:?] {re:classloading}
    at net.minecraft.world.server.ChunkManager.lambda$chunkGenerate$20(ChunkManager.java:539) ~[forge:?] {re:classloading}
    at java.util.concurrent.CompletableFuture.uniCompose(CompletableFuture.java:966) ~[?:1.8.0_292] {}
    ... 11 more
Caused by: java.lang.IllegalStateException: Unknown biome id emitted by layers: 174
    at net.minecraft.world.gen.layer.Layer.func_242936_a(Layer.java:26) ~[forge:?] {re:classloading}
    at io.github.zemelua.umu_arcanum.world.biome.SilenceBiomeProvider.getNoiseBiome(SilenceBiomeProvider.java:58) ~[?:?] {re:classloading}
    at net.minecraft.world.gen.ChunkGenerator.func_242707_a(ChunkGenerator.java:230) ~[forge:?] {re:classloading}
    at net.minecraft.world.chunk.ChunkStatus.lambda$static$2(ChunkStatus.java:41) ~[forge:?] {re:classloading,pl:accesstransformer:B}
    at net.minecraft.world.chunk.ChunkStatus.doGenerationWork(ChunkStatus.java:198) ~[forge:?] {re:classloading,pl:accesstransformer:B}
    at net.minecraft.world.server.ChunkManager.lambda$null$18(ChunkManager.java:541) ~[forge:?] {re:classloading}
    at com.mojang.datafixers.util.Either$Left.map(Either.java:38) ~[datafixerupper-4.0.26.jar:?] {re:classloading}
    at net.minecraft.world.server.ChunkManager.lambda$chunkGenerate$20(ChunkManager.java:539) ~[forge:?] {re:classloading}
    at java.util.concurrent.CompletableFuture.uniCompose(CompletableFuture.java:966) ~[?:1.8.0_292] {}
    ... 11 more
[19:42:18] [Server thread/FATAL] [ne.mi.co.ForgeMod/]: Preparing crash report with UUID 36f9fdec-1f6a-41ab-9a2b-f388ef3706de

 

same.

Link to comment
Share on other sites

public void onFMLCommonSetup(final FMLCommonSetupEvent event) {
		try {
			Field field = BiomeRegistry.class.getDeclaredField("idToKeyMap");
			field.setAccessible(true);
			Int2ObjectMap<RegistryKey<Biome>> map = (Int2ObjectMap<RegistryKey<Biome>>) field.get(null);
			map.put(174, UMUArcanumBiomes.DIM_FOREST);
		} catch (NoSuchFieldException exception) {
			exception.printStackTrace();
		} catch (IllegalAccessException e) {
			e.printStackTrace();
		}
	}

I still get the same error. What's wrong......

Link to comment
Share on other sites

public void onFMLCommonSetup(final FMLCommonSetupEvent event) {
		try {
			Field field = BiomeRegistry.class.getDeclaredField("idToKeyMap");
			Field modifiersField = Field.class.getDeclaredField("modifiers");
			modifiersField.setAccessible(true);
			modifiersField.setInt(field, field.getModifiers() & ~Modifier.PRIVATE & ~Modifier.FINAL);
			Int2ObjectMap<RegistryKey<Biome>> map = (Int2ObjectMap<RegistryKey<Biome>>) field.get(null);
			map.put(174, UMUArcanumBiomes.DIM_FOREST);
			field.set(null, map);
			LOGGER.warn(field.get(null).toString());
		} catch (NoSuchFieldException exception) {
			exception.printStackTrace();
		} catch (IllegalAccessException e) {
			e.printStackTrace();
		}
	}

Is it like this? I still get the error ...

Link to comment
Share on other sites

Luis, what the F are you doing. This is not Minecraft 1.2.5 where you register things by ID.

The only issue here is that you never register your Biome, because you do not register the DeferredRegister to the event bus. Once that is fixed the code in the Git repo works just fine without any reflection or ID hacks.

Although I would recommend that you stop doing this and just use the IDs of your biome as obtained from ForgeRegistries.BIOMES.

Link to comment
Share on other sites

26 minutes ago, diesieben07 said:

Luis, what the F are you doing. This is not Minecraft 1.2.5 where you register things by ID.

The only issue here is that you never register your Biome, because you do not register the DeferredRegister to the event bus. Once that is fixed the code in the Git repo works just fine without any reflection or ID hacks.

did you know how the Biome Layer works, did you looked at the vanilla code, sounds like you don't knw much about the biome layer they still use the ids
which is why i hate this system, but forge dosen't has a BiomeProvider/BiomeSource which make this easly

 

29 minutes ago, diesieben07 said:

and just use the IDs of your biome as obtained from ForgeRegistries.BIOMES

forge has biome IDs?

Link to comment
Share on other sites

  • Zemelua changed the title to [Solved] [1.16.5] Unknown biome id emitted by layers: 174

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

 Share



×
×
  • Create New...

Important Information

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