Jump to content

Recommended Posts

Posted

Hi,

I'm trying to make a custom dimension with the new data driven system. I can't manage to make the game work with it. Every time I try to create a world, the game says that there was a problem with a datapack. I checked the logs and I think it is a registry problem.
Here is the error:

[09:54:52] [Render thread/WARN]: Failed to load datapacks, can't proceed with server load
java.util.concurrent.ExecutionException: java.lang.IllegalStateException: Trying to access unbound value 'ResourceKey[minecraft:dimension / futurcraft:moon]' from registry Registry[ResourceKey[minecraft:root / minecraft:dimension] (Stable)]
	at java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:396) ~[?:?]
	at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2073) ~[?:?]
	at net.minecraft.client.Minecraft.m_205125_(Minecraft.java:2076) ~[client-1.18.2-20220404.173914-srg.jar%2353!/:?]
	at net.minecraft.client.Minecraft.doLoadLevel(Minecraft.java:1902) ~[client-1.18.2-20220404.173914-srg.jar%2353!/:?]
	at net.minecraft.client.Minecraft.m_205185_(Minecraft.java:1870) ~[client-1.18.2-20220404.173914-srg.jar%2353!/:?]
	at net.minecraft.client.gui.screens.worldselection.CreateWorldScreen.m_100972_(CreateWorldScreen.java:246) ~[client-1.18.2-20220404.173914-srg.jar%2353!/:?]
	at net.minecraft.client.gui.screens.worldselection.CreateWorldScreen.lambda$init$13(CreateWorldScreen.java:195) ~[client-1.18.2-20220404.173914-srg.jar%2353!/:?]
	at net.minecraft.client.gui.components.Button.m_5691_(Button.java:40) ~[client-1.18.2-20220404.173914-srg.jar%2353!/:?]
	at net.minecraft.client.gui.components.AbstractButton.m_5716_(AbstractButton.java:16) ~[client-1.18.2-20220404.173914-srg.jar%2353!/:?]
	at net.minecraft.client.gui.components.AbstractWidget.m_6375_(AbstractWidget.java:111) ~[client-1.18.2-20220404.173914-srg.jar%2353!/:?]
	at net.minecraft.client.gui.components.events.ContainerEventHandler.m_6375_(ContainerEventHandler.java:27) ~[client-1.18.2-20220404.173914-srg.jar%2353!/:?]
	at net.minecraft.client.MouseHandler.m_168084_(MouseHandler.java:88) ~[client-1.18.2-20220404.173914-srg.jar%2353!/:?]
	at net.minecraft.client.gui.screens.Screen.m_96579_(Screen.java:528) ~[client-1.18.2-20220404.173914-srg.jar%2353!/:?]
	at net.minecraft.client.MouseHandler.m_91530_(MouseHandler.java:85) ~[client-1.18.2-20220404.173914-srg.jar%2353!/:?]
	at net.minecraft.client.MouseHandler.m_168091_(MouseHandler.java:185) ~[client-1.18.2-20220404.173914-srg.jar%2353!/:?]
	at net.minecraft.util.thread.BlockableEventLoop.execute(BlockableEventLoop.java:103) ~[client-1.18.2-20220404.173914-srg.jar%2353!/:?]
	at net.minecraft.client.MouseHandler.m_91565_(MouseHandler.java:184) ~[client-1.18.2-20220404.173914-srg.jar%2353!/:?]
	at org.lwjgl.glfw.GLFWMouseButtonCallbackI.callback(GLFWMouseButtonCallbackI.java:36) ~[lwjgl-glfw-3.2.1.jar%2347!/:build 12]
	at org.lwjgl.system.JNI.invokeV(Native Method) ~[lwjgl-3.2.1.jar%2343!/:build 12]
	at org.lwjgl.glfw.GLFW.glfwWaitEventsTimeout(GLFW.java:3129) ~[lwjgl-glfw-3.2.1.jar%2347!/:build 12]
	at com.mojang.blaze3d.systems.RenderSystem.m_69830_(RenderSystem.java:222) ~[client-1.18.2-20220404.173914-srg.jar%2353!/:?]
	at net.minecraft.client.Minecraft.m_91383_(Minecraft.java:1069) ~[client-1.18.2-20220404.173914-srg.jar%2353!/:?]
	at net.minecraft.client.Minecraft.m_91374_(Minecraft.java:663) ~[client-1.18.2-20220404.173914-srg.jar%2353!/:?]
	at net.minecraft.client.main.Main.main(Main.java:205) ~[client-1.18.2-20220404.173914-srg.jar%2353!/:?]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?]
	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
	at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]
	at net.minecraftforge.fml.loading.targets.CommonClientLaunchHandler.lambda$launchService$0(CommonClientLaunchHandler.java:45) ~[fmlloader-1.18.2-40.0.48.jar%2316!/:?]
	at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-9.1.3.jar%235!/:?]
	at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53) [modlauncher-9.1.3.jar%235!/:?]
	at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71) [modlauncher-9.1.3.jar%235!/:?]
	at cpw.mods.modlauncher.Launcher.run(Launcher.java:106) [modlauncher-9.1.3.jar%235!/:?]
	at cpw.mods.modlauncher.Launcher.main(Launcher.java:77) [modlauncher-9.1.3.jar%235!/:?]
	at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26) [modlauncher-9.1.3.jar%235!/:?]
	at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23) [modlauncher-9.1.3.jar%235!/:?]
	at cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:149) [bootstraplauncher-1.0.0.jar:?]
Caused by: java.lang.IllegalStateException: Trying to access unbound value 'ResourceKey[minecraft:dimension / futurcraft:moon]' from registry Registry[ResourceKey[minecraft:root / minecraft:dimension] (Stable)]
	at net.minecraft.core.Holder$Reference.m_203334_(Holder.java:146) ~[client-1.18.2-20220404.173914-srg.jar%2353!/:?]
	at com.google.common.collect.Maps$9.transformEntry(Maps.java:2053) ~[guava-31.0.1-jre.jar%2328!/:?]
	at com.google.common.collect.Maps$12.getValue(Maps.java:2101) ~[guava-31.0.1-jre.jar%2328!/:?]
	at net.minecraft.world.level.dimension.LevelStem.m_204525_(LevelStem.java:69) ~[client-1.18.2-20220404.173914-srg.jar%2353!/:?]
	at com.mojang.datafixers.util.Pair.mapFirst(Pair.java:64) ~[datafixerupper-4.1.27.jar%2333!/:?]
	at com.mojang.serialization.Decoder$2.lambda$decode$0(Decoder.java:63) ~[datafixerupper-4.1.27.jar%2333!/:?]
	at java.util.Optional.map(Optional.java:260) ~[?:?]
	at com.mojang.serialization.DataResult.lambda$map$5(DataResult.java:112) ~[datafixerupper-4.1.27.jar%2333!/:?]
	at com.mojang.datafixers.util.Either$Right.mapBoth(Either.java:94) ~[datafixerupper-4.1.27.jar%2333!/:?]
	at com.mojang.serialization.DataResult.map(DataResult.java:110) ~[datafixerupper-4.1.27.jar%2333!/:?]
	at com.mojang.serialization.Decoder$2.decode(Decoder.java:63) ~[datafixerupper-4.1.27.jar%2333!/:?]
	at com.mojang.serialization.Codec$2.decode(Codec.java:71) ~[datafixerupper-4.1.27.jar%2333!/:?]
	at com.mojang.serialization.Decoder.parse(Decoder.java:18) ~[datafixerupper-4.1.27.jar%2333!/:?]
	at com.mojang.serialization.codecs.FieldDecoder.decode(FieldDecoder.java:29) ~[datafixerupper-4.1.27.jar%2333!/:?]
	at com.mojang.serialization.MapCodec$1.decode(MapCodec.java:34) ~[datafixerupper-4.1.27.jar%2333!/:?]
	at com.mojang.serialization.codecs.RecordCodecBuilder$Instance$5.decode(RecordCodecBuilder.java:324) ~[datafixerupper-4.1.27.jar%2333!/:?]
	at com.mojang.serialization.codecs.RecordCodecBuilder$2.decode(RecordCodecBuilder.java:107) ~[datafixerupper-4.1.27.jar%2333!/:?]
	at com.mojang.serialization.MapDecoder.lambda$compressedDecode$0(MapDecoder.java:52) ~[datafixerupper-4.1.27.jar%2333!/:?]
	at com.mojang.serialization.DataResult.lambda$flatMap$10(DataResult.java:138) ~[datafixerupper-4.1.27.jar%2333!/:?]
	at com.mojang.datafixers.util.Either$Left.map(Either.java:38) ~[datafixerupper-4.1.27.jar%2333!/:?]
	at com.mojang.serialization.DataResult.flatMap(DataResult.java:136) ~[datafixerupper-4.1.27.jar%2333!/:?]
	at com.mojang.serialization.MapDecoder.compressedDecode(MapDecoder.java:52) ~[datafixerupper-4.1.27.jar%2333!/:?]
	at com.mojang.serialization.MapCodec$MapCodecCodec.decode(MapCodec.java:91) ~[datafixerupper-4.1.27.jar%2333!/:?]
	at com.mojang.serialization.Decoder$2.decode(Decoder.java:63) ~[datafixerupper-4.1.27.jar%2333!/:?]
	at com.mojang.serialization.Codec$2.decode(Codec.java:71) ~[datafixerupper-4.1.27.jar%2333!/:?]
	at com.mojang.serialization.Decoder$1.decode(Decoder.java:49) ~[datafixerupper-4.1.27.jar%2333!/:?]
	at com.mojang.serialization.Codec$2.decode(Codec.java:71) ~[datafixerupper-4.1.27.jar%2333!/:?]
	at com.mojang.serialization.Decoder.parse(Decoder.java:18) ~[datafixerupper-4.1.27.jar%2333!/:?]
	at net.minecraft.client.Minecraft.lambda$createLevel$33(Minecraft.java:1878) ~[client-1.18.2-20220404.173914-srg.jar%2353!/:?]
	at com.mojang.serialization.DataResult.lambda$flatMap$10(DataResult.java:138) ~[datafixerupper-4.1.27.jar%2333!/:?]
	at com.mojang.datafixers.util.Either$Left.map(Either.java:38) ~[datafixerupper-4.1.27.jar%2333!/:?]
	at com.mojang.serialization.DataResult.flatMap(DataResult.java:136) ~[datafixerupper-4.1.27.jar%2333!/:?]
	at net.minecraft.client.Minecraft.lambda$createLevel$34(Minecraft.java:1877) ~[client-1.18.2-20220404.173914-srg.jar%2353!/:?]
	at net.minecraft.server.WorldStem.m_206911_(WorldStem.java:40) ~[client-1.18.2-20220404.173914-srg.jar%2353!/:?]
	at net.minecraft.client.Minecraft.m_205125_(Minecraft.java:2074) ~[client-1.18.2-20220404.173914-srg.jar%2353!/:?]
	... 34 more

And here is my ModDimension class:

package fr.steakmans.futurcraft.dimension;

import fr.steakmans.futurcraft.Main;
import net.minecraft.core.Registry;
import net.minecraft.resources.ResourceKey;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.level.Level;
import net.minecraftforge.registries.ForgeRegistries;

public class ModDimensions {

    public static final ResourceKey<Level> MOON = ResourceKey.create(Registry.DIMENSION_REGISTRY, new ResourceLocation(Main.MODID, "moon"));

}

Thanks.

  • 9 months later...
Posted

Probably you solve this but someone gonna search like me and no found the answer

Make sure all `/dimension/mydim.json` and `/dimension_type/mydim.json` are correct, when someting in these jsons is wrong, minecraft no register the info(? is weird, i donk know what happens.

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.