Fabric API

Fabric API

106M Downloads

FabricItemGroupBuilder.build errors out

PsikoBlock opened this issue ยท 5 comments

commented

This happens on startup with SimpleVoidWorld and the ItemGroupMod test mod. Linux with Java 1.8 (Oracle), trying to run the mod out of IntelliJ IDEA.

[13:47:56] [main/INFO]: Loading for game Minecraft 1.14
[13:47:56] [ForkJoinPool-1-worker-2/WARN]: Mod ID fabric uses outdated schema version: 0 < 1
[13:47:56] [main/INFO]: [FabricLoader] Loading 3 mods: [email protected]+build.127, [email protected]+build.141, [email protected]
[13:47:56] [main/INFO]: SpongePowered MIXIN Subsystem Version=0.7.11 Source=file:/home/psiko/.gradle/caches/modules-2/files-2.1/net.fabricmc/sponge-mixin/0.7.11.30/12878b7fa8bcc30844de4fa9e09d95c36b8c359b/sponge-mixin-0.7.11.30.jar Service=Knot/Fabric Env=CLIENT
[13:47:56] [main/INFO]: Loaded Fabric development mappings for mixin remapper!
[13:47:56] [main/INFO]: Compatibility level set to JAVA_8
[13:47:56] [main/WARN]: Mixin config net.fabricmc.fabric.mixins.client.json does not specify "minVersion" property
[13:47:56] [main/WARN]: Mixin config net.fabricmc.fabric.mixins.common.json does not specify "minVersion" property
[13:47:56] [main/INFO]: Remapping refMap net.fabricmc.fabric.refmap.json using remapper chain
[13:47:56] [main/INFO]: Remapping refMap net.fabricmc.fabric.refmap.json using remapper chain
[13:47:57] [main/INFO]: Setting user: Player307
---- Minecraft Crash Report ----
// I bet Cylons wouldn't have this problem.

Time: 04.05.19 13:47
Description: Initializing game

java.lang.RuntimeException: Could not execute entrypoint stage 'main' due to errors!
	at net.fabricmc.loader.entrypoint.hooks.EntrypointUtils.logErrors(EntrypointUtils.java:45)
	at net.fabricmc.loader.entrypoint.hooks.EntrypointClient.start(EntrypointClient.java:34)
	at net.minecraft.client.MinecraftClient.init(MinecraftClient.java)
	at net.minecraft.client.MinecraftClient.start(MinecraftClient.java:395)
	at net.minecraft.client.main.Main.main(Main.java:154)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at net.fabricmc.loader.game.MinecraftGameProvider.launch(MinecraftGameProvider.java:170)
	at net.fabricmc.loader.launch.knot.Knot.init(Knot.java:127)
	at net.fabricmc.loader.launch.knot.KnotClient.main(KnotClient.java:26)
	Suppressed: java.lang.ClassCastException: net.minecraft.item.ItemGroup$1 cannot be cast to net.fabricmc.fabric.impl.itemgroup.ItemGroupExtensions
		at net.fabricmc.fabric.api.client.itemgroup.FabricItemGroupBuilder.build(FabricItemGroupBuilder.java:106)
		at net.fabricmc.fabric.api.client.itemgroup.FabricItemGroupBuilder.build(FabricItemGroupBuilder.java:96)
		at net.fabricmc.example.ExampleMod.onInitialize(ExampleMod.java:34)
		at net.fabricmc.loader.entrypoint.hooks.EntrypointUtils.lambda$logErrors$0(EntrypointUtils.java:38)
		at java.util.ArrayList.forEach(ArrayList.java:1257)
		at net.fabricmc.loader.entrypoint.hooks.EntrypointUtils.logErrors(EntrypointUtils.java:36)
		... 11 more


A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- Head --
Thread: Client thread
Stacktrace:
	at net.fabricmc.loader.entrypoint.hooks.EntrypointUtils.logErrors(EntrypointUtils.java:45)
	at net.fabricmc.loader.entrypoint.hooks.EntrypointClient.start(EntrypointClient.java:34)
	at net.minecraft.client.MinecraftClient.init(MinecraftClient.java)

-- Initialization --
Details:
Stacktrace:
	at net.minecraft.client.MinecraftClient.start(MinecraftClient.java:395)
	at net.minecraft.client.main.Main.main(Main.java:154)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at net.fabricmc.loader.game.MinecraftGameProvider.launch(MinecraftGameProvider.java:170)
	at net.fabricmc.loader.launch.knot.Knot.init(Knot.java:127)
	at net.fabricmc.loader.launch.knot.KnotClient.main(KnotClient.java:26)

-- System Details --
Details:
	Minecraft Version: 1.14
	Operating System: Linux (amd64) version 5.0.7-gentoo
	Java Version: 1.8.0_202, Oracle Corporation
	Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
	Memory: 337872912 bytes (322 MB) / 813694976 bytes (776 MB) up to 3733979136 bytes (3561 MB)
	JVM Flags: 0 total; 
	Fabric Mods: 
		fabric: 0.2.7+build.127
		fabricloader: 0.4.6+build.141
		modid: 1.0.0
	Launched Version: Fabric
	LWJGL: 3.2.1 build 12
	OpenGL: NO CONTEXT
	GL Caps: 
	Using VBOs: Yes
	Is Modded: Definitely; Client brand changed to 'fabric'
	Type: Client (map_client.txt)
	Resource Packs: ~~ERROR~~ NullPointerException: null
	Current Language: ~~ERROR~~ NullPointerException: null
	CPU: <unknown>

Process finished with exit code 255
commented

I've had this a few times too... For me I copied all my code to a fresh project and it stopped making that error, however I tested with Dmixin.debug=true in the workspace with this issue and it seemed as if all of fabrics mixins were being applied properly - including the item group extensions one. Worth trying a fresh workspace, however it's good to see I'm not the only one whose had this.

commented

How did you set up a fresh project? I pretty much followed the guide at https://fabricmc.net/wiki/tutorial:setup with the newest versions of Fabric, mappings and the loader and running gradlew idea. I opened the resulting ipr file with IDEA and imported the gradle config, which created three modules. Then I took out the mixins file from fabric.mod.json, deleted it and the src/mixin folder. Finally, I pasted the code from ItemGroupMod.java into ExampleMod.java, changed the package and class name and clicked Run > Minecraft Client. I selected the net.fabricmc.itemgroup.main package (folder was called itemgroup). This produced this error.

commented

Is this still an issue?

commented

If this still occurs, please re-open the issue.

commented

Hmmm.... yeah It's really weird, if you run "./gradlew runClient" from the terminal in the project it still works... It must be something with IDEA's reimporting of jobs... Are you sure you have "IDEA" picked to build in Project Structure > Build tool.