quiqueck/BCLib

[Bug] BCLib crashing server on start with Better Nether and Better End on 1.20.1

Closed this issue ยท 33 comments

What happened?

My and my friends wanted to play minecraft so I put some mods togheter for better expierience, but when i tried to run everythng i got crashing with bclib on server, even when I installed only bclib, better nether and better end for troubleshooting.

BCLib

3.0.13

Fabric API

0.91.0

Fabric Loader

0.15.0

Minecraft

1.20.1

Relevant log output

[02:05:55] [main/INFO]: Loading Minecraft 1.20 with Fabric Loader 0.15.0
[02:05:55] [main/INFO]: Loading 49 mods:
	- bclib 3.0.13
	   \-- wunderlib 1.1.5
	- betterend 4.0.10
	- betternether 9.0.9
	- cloth-config 11.1.106
	   \-- cloth-basic-math 0.6.1
	- fabric-api 0.91.0+1.20.1
	   |-- fabric-api-base 0.4.30+7abfd51577
	   |-- fabric-api-lookup-api-v1 1.6.35+4d8536c977
	   |-- fabric-biome-api-v1 13.0.12+215bbe9677
	   |-- fabric-block-api-v1 1.0.10+92a0d36777
	   |-- fabric-block-view-api-v2 1.0.0+92a0d36777
	   |-- fabric-blockrenderlayer-v1 1.1.40+b3afc78b77
	   |-- fabric-client-tags-api-v1 1.1.1+97bb207577
	   |-- fabric-command-api-v1 1.2.33+f71b366f77
	   |-- fabric-command-api-v2 2.2.12+b3afc78b77
	   |-- fabric-commands-v0 0.2.50+df3654b377
	   |-- fabric-containers-v0 0.1.63+df3654b377
	   |-- fabric-content-registries-v0 4.0.10+57aed33f77
	   |-- fabric-convention-tags-v1 1.5.4+a1a980da77
	   |-- fabric-crash-report-info-v1 0.2.18+aeb40ebe77
	   |-- fabric-data-generation-api-v1 12.3.3+d7b148e077
	   |-- fabric-dimensions-v1 2.1.53+8536527b77
	   |-- fabric-entity-events-v1 1.5.22+b3afc78b77
	   |-- fabric-events-interaction-v0 0.6.1+e91849a877
	   |-- fabric-events-lifecycle-v0 0.2.62+df3654b377
	   |-- fabric-game-rule-api-v1 1.0.39+ae9f657a77
	   |-- fabric-item-api-v1 2.1.27+b3afc78b77
	   |-- fabric-item-group-api-v1 4.0.11+d7b148e077
	   |-- fabric-key-binding-api-v1 1.0.36+fb8d95da77
	   |-- fabric-keybindings-v0 0.2.34+df3654b377
	   |-- fabric-lifecycle-events-v1 2.2.21+b3afc78b77
	   |-- fabric-loot-api-v2 1.2.0+96dfa95977
	   |-- fabric-loot-tables-v1 1.1.44+9e7660c677
	   |-- fabric-message-api-v1 5.1.8+d7b148e077
	   |-- fabric-mining-level-api-v1 2.1.49+b3afc78b77
	   |-- fabric-model-loading-api-v1 1.0.2+709a987177
	   |-- fabric-models-v0 0.4.1+9386d8a777
	   |-- fabric-networking-api-v1 1.3.10+eeb8eb3677
	   |-- fabric-networking-v0 0.3.50+df3654b377
	   |-- fabric-object-builder-api-v1 11.1.2+4ee0bc6077
	   |-- fabric-particles-v1 1.1.1+201a23a077
	   |-- fabric-recipe-api-v1 1.0.20+b3afc78b77
	   |-- fabric-registry-sync-v0 2.3.2+4df89eb277
	   |-- fabric-renderer-api-v1 3.2.0+39a511ba77
	   |-- fabric-renderer-indigo 1.5.0+39a511ba77
	   |-- fabric-renderer-registries-v1 3.2.45+df3654b377
	   |-- fabric-rendering-data-attachment-v1 0.3.36+92a0d36777
	   |-- fabric-rendering-fluids-v1 3.0.27+b3afc78b77
	   |-- fabric-rendering-v0 1.1.48+df3654b377
	   |-- fabric-rendering-v1 3.0.7+b3afc78b77
	   |-- fabric-resource-conditions-api-v1 2.3.7+29de845d77
	   |-- fabric-resource-loader-v0 0.11.9+132c48c177
	   |-- fabric-screen-api-v1 2.0.7+b3afc78b77
	   |-- fabric-screen-handler-api-v1 1.3.29+b3afc78b77
	   |-- fabric-sound-api-v1 1.0.12+b3afc78b77
	   |-- fabric-transfer-api-v1 3.3.3+c81d263177
	   \-- fabric-transitive-access-wideners-v1 4.3.0+6c31357e77
	- fabricloader 0.15.0
	   \-- mixinextras 0.3.0
	- java 18
	- minecraft 1.20
[02:05:55] [main/INFO]: SpongePowered MIXIN Subsystem Version=0.8.5 Source=file:/data/libraries/net/fabricmc/sponge-mixin/0.12.5+mixin.0.8.5/sponge-mixin-0.12.5+mixin.0.8.5.jar Service=Knot/Fabric Env=SERVER
[02:05:55] [main/INFO]: Compatibility level set to JAVA_17
[02:05:55] [main/INFO]: Initializing MixinExtras via com.llamalad7.mixinextras.service.MixinExtrasServiceImpl(version=0.3.0).
[02:06:00] [main/INFO]: [bclib] Added Config betternether.main to auto sync (file hash)
[02:06:00] [main/INFO]: [bclib] Added Config betternether.generator to auto sync (file hash)
[02:06:00] [main/INFO]: [bclib] Added Config betternether.blocks to auto sync (file hash)
[02:06:00] [main/INFO]: [bclib] Added Config betternether.items to auto sync (file hash)
[02:06:00] [main/INFO]: [bclib] Added Config betternether.biomes to auto sync (file hash)
[02:06:00] [main/INFO]: [bclib] Added Config betternether.mobs to auto sync (file hash)
[02:06:00] [main/INFO]: [bclib] Added Config betternether.recipes to auto sync (file hash)
[02:06:00] [main/WARN]: [bclib] Recipe betternether:bone_block_bone_button only takes in a single item and should be shapeless
[02:06:01] [main/INFO]: [bclib] Added Config betterend.entities to auto sync (file hash)
[02:06:01] [main/INFO]: [bclib] Added Config betterend.blocks to auto sync (file hash)
[02:06:01] [main/INFO]: [bclib] Added Config betterend.items to auto sync (file hash)
[02:06:01] [main/INFO]: [bclib] Added Config betterend.biomes to auto sync (file hash)
[02:06:01] [main/INFO]: [bclib] Added Config betterend.recipes to auto sync (file hash)
[02:06:01] [main/INFO]: [bclib] Added Config betterend.enchantments to auto sync (file hash)
[02:06:01] [main/INFO]: [betternether] =^..^=    BetterNether for 1.20    =^..^=
[02:06:01] [main/ERROR]: Failed to start the minecraft server
java.lang.RuntimeException: Could not execute entrypoint stage 'main' due to errors, provided by 'bclib'!
	at net.fabricmc.loader.impl.FabricLoaderImpl.lambda$invokeEntrypoints$2(FabricLoaderImpl.java:388) ~[fabric-loader-0.15.0.jar:?]
	at net.fabricmc.loader.impl.util.ExceptionUtil.gatherExceptions(ExceptionUtil.java:33) ~[fabric-loader-0.15.0.jar:?]
	at net.fabricmc.loader.impl.FabricLoaderImpl.invokeEntrypoints(FabricLoaderImpl.java:386) ~[fabric-loader-0.15.0.jar:?]
	at net.fabricmc.loader.impl.game.minecraft.Hooks.startServer(Hooks.java:63) ~[fabric-loader-0.15.0.jar:?]
	at net.minecraft.server.Main.main(Main.java:112) ~[server-intermediary.jar:?]
	at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:470) ~[fabric-loader-0.15.0.jar:?]
	at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:74) ~[fabric-loader-0.15.0.jar:?]
	at net.fabricmc.loader.impl.launch.knot.KnotServer.main(KnotServer.java:23) ~[fabric-loader-0.15.0.jar:?]
	at net.fabricmc.loader.impl.launch.server.FabricServerLauncher.main(FabricServerLauncher.java:69) ~[fabric-loader-0.15.0.jar:?]
	at net.fabricmc.installer.ServerLauncher.main(ServerLauncher.java:69) ~[fabric-server-mc.1.20-loader.0.15.0-launcher.0.11.2.jar:0.11.2]
	Suppressed: java.lang.NoSuchFieldError: CLENT_CONFIG
		at org.betterx.betterend.config.Configs.<clinit>(Configs.java:22) ~[better-end-4.0.10.jar:?]
		at org.betterx.betterend.registry.EndBlocks.<clinit>(EndBlocks.java:29) ~[better-end-4.0.10.jar:?]
		at org.betterx.betterend.registry.EndBlockEntities.<clinit>(EndBlockEntities.java:17) ~[better-end-4.0.10.jar:?]
		at org.betterx.betterend.BetterEnd.onInitialize(BetterEnd.java:46) ~[better-end-4.0.10.jar:?]
		at net.fabricmc.loader.impl.FabricLoaderImpl.invokeEntrypoints(FabricLoaderImpl.java:384) ~[fabric-loader-0.15.0.jar:?]
		at net.fabricmc.loader.impl.game.minecraft.Hooks.startServer(Hooks.java:63) ~[fabric-loader-0.15.0.jar:?]
		at net.minecraft.server.Main.main(Main.java:112) ~[server-intermediary.jar:?]
		at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:470) ~[fabric-loader-0.15.0.jar:?]
		at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:74) ~[fabric-loader-0.15.0.jar:?]
		at net.fabricmc.loader.impl.launch.knot.KnotServer.main(KnotServer.java:23) ~[fabric-loader-0.15.0.jar:?]
		at net.fabricmc.loader.impl.launch.server.FabricServerLauncher.main(FabricServerLauncher.java:69) ~[fabric-loader-0.15.0.jar:?]
		at net.fabricmc.installer.ServerLauncher.main(ServerLauncher.java:69) ~[fabric-server-mc.1.20-loader.0.15.0-launcher.0.11.2.jar:0.11.2]
Caused by: java.lang.NoSuchFieldError: CLIENT_CONFIG
	at org.betterx.bclib.registry.PresetsRegistry.register(PresetsRegistry.java:17) ~[bclib-3.0.13.jar:?]
	at org.betterx.bclib.BCLib.onInitialize(BCLib.java:73) ~[bclib-3.0.13.jar:?]
	at net.fabricmc.loader.impl.FabricLoaderImpl.invokeEntrypoints(FabricLoaderImpl.java:384) ~[fabric-loader-0.15.0.jar:?]
	... 7 more

Other Mods

No response

Same issue here, it worked for a while, then I added new mods to the server, deleted them since it refused the start with the same tracktrace as yours, but even after removing the newly added mods, bclib still throws this exception.

fabric finally fixed an issue where annotated fields would be added to both sides instead of the side they were annotated to exist in. by fixing this, the bad code in bclib actually does what its supposed to and when they reference it it crashes

Called from common side (server and clientside)

PresetsRegistry.register();

checks Config.CLIENT_CONFIG object for a specific field (on both sides, serverside and clientside)

https://github.com/quiqueck/BCLib/blob/a8dbfee20af56348fcdb30343033df9a0b7a1cbb/src/main/java/org/betterx/bclib/registry/PresetsRegistry.java#L17C25-L17C25

and here we see that CLIENT_CONFIG only exists on the clientside

https://github.com/quiqueck/BCLib/blob/a8dbfee20af56348fcdb30343033df9a0b7a1cbb/src/main/java/org/betterx/bclib/config/Configs.java#L9C1-L10

any updates on this bug? i'm running into the same problem when trying to boot up a server

You'll just have to downgrade your Fabric Loader version to 0.14.25 until it's fixed (0.14.25 is the latest other than 0.15, which is what is causing this crash.)

Same error here, this is really obnoxious

Same problem here! And unfortunately we don't have control over the fabric loader version, so we can't downgrade the loader to its previous version on my hosting server!

fabric finally fixed an issue where annotated fields would be added to both sides instead of the side they were annotated to exist in. by fixing this, the bad code in bclib actually does what its supposed to and when they reference it it crashes

Called from common side (server and clientside)

PresetsRegistry.register();

checks Config.CLIENT_CONFIG object for a specific field (on both sides, serverside and clientside)

https://github.com/quiqueck/BCLib/blob/a8dbfee20af56348fcdb30343033df9a0b7a1cbb/src/main/java/org/betterx/bclib/registry/PresetsRegistry.java#L17C25-L17C25

and here we see that CLIENT_CONFIG only exists on the clientside

https://github.com/quiqueck/BCLib/blob/a8dbfee20af56348fcdb30343033df9a0b7a1cbb/src/main/java/org/betterx/bclib/config/Configs.java#L9C1-L10

So is this something we can fix on our side or?

@MeatVegetalbe You can downgrade to Fabric Loader 0.14.25 until BCLib gets a fix for this, as mentioned above. Or you can edit BCLib and compile it yourself

same problem

Yume7z commented

+1 same issue trying to host on shockbyte

you can try contacting your server hosting provider and seeing if they can downgrade the server for you.
Alternatively, download the fabric server installer on your own computers, create a fabric server with fabric loader version 0.14.25 > rename the server jarfile on your computer to the same one used before on your actual server > upload the file to replace the old jar file.

Yume7z commented

@Skullians This worked for me. Instead of using shockbyte's premade config for fabric I just downloaded fabric directly with loader version 0.14.25 and uploaded as custom.jar, in case anyone else has this issue and uses shockbyte

Glad to help.

Would any of these forks fix the issue? https://github.com/quiqueck/BCLib/forks

Would any of these forks fix the issue? https://github.com/quiqueck/BCLib/forks

Can't check, but I think the most recent one does it actually as it fixes what was pointed out here.

fabric finally fixed an issue where annotated fields would be added to both sides instead of the side they were annotated to exist in. by fixing this, the bad code in bclib actually does what its supposed to and when they reference it it crashes

Called from common side (server and clientside)

PresetsRegistry.register();

checks Config.CLIENT_CONFIG object for a specific field (on both sides, serverside and clientside)

https://github.com/quiqueck/BCLib/blob/a8dbfee20af56348fcdb30343033df9a0b7a1cbb/src/main/java/org/betterx/bclib/registry/PresetsRegistry.java#L17C25-L17C25

and here we see that CLIENT_CONFIG only exists on the clientside

https://github.com/quiqueck/BCLib/blob/a8dbfee20af56348fcdb30343033df9a0b7a1cbb/src/main/java/org/betterx/bclib/config/Configs.java#L9C1-L10

Would any of these forks fix the issue? https://github.com/quiqueck/BCLib/forks

Can't check, but I think the most recent one does it actually as it fixes what was pointed out here.

fabric finally fixed an issue where annotated fields would be added to both sides instead of the side they were annotated to exist in. by fixing this, the bad code in bclib actually does what its supposed to and when they reference it it crashes
Called from common side (server and clientside)

PresetsRegistry.register();

checks Config.CLIENT_CONFIG object for a specific field (on both sides, serverside and clientside)
https://github.com/quiqueck/BCLib/blob/a8dbfee20af56348fcdb30343033df9a0b7a1cbb/src/main/java/org/betterx/bclib/registry/PresetsRegistry.java#L17C25-L17C25
and here we see that CLIENT_CONFIG only exists on the clientside
https://github.com/quiqueck/BCLib/blob/a8dbfee20af56348fcdb30343033df9a0b7a1cbb/src/main/java/org/betterx/bclib/config/Configs.java#L9C1-L10

I'm building it now, I'll let you guys know how it goes!

Sorry it took a bit, I'm no coder or developer (I was just figuring this out as I went) but I can confirm that fork https://github.com/m3t4f1v3/BCLib-fabric0.15 works. BetterNether is running without issue on my server with FabricLoader 0.15.0.

There does still seem to be an issue with the BetterEnd mod referencing "CLENT_CONFIG" which I'm assuming is a typo for "CLIENT_CONFIG" so it doesn't work currently but apart from that BCLib itself is no longer crashing my server.

temyy commented

just wanted to add that ive been using https://github.com/xg787/BCLib-0.15-unoffical-hotfix with bclib and betterend and they seem to work fine, dont think theres any forks that fix other bugs though

None of those forks work when i try to build them. I dont see a mod in build file, only loom-cache.

None of those forks work when i try to build them. I dont see a mod in build file, only loom-cache.

I had that problem trying to build on Linux. I had to build it on Windows and ran .\gradlew.bat build in CLI in that directory. The outputted .jar was under builds/lib/

temyy commented

None of those forks work when i try to build them. I dont see a mod in build file, only loom-cache.

xg787's forks have release files in the repos
https://github.com/xg787/BCLib-0.15-unoffical-hotfix/releases
https://github.com/xg787/BetterEnd-0.15-unoffical-hotfix/releases
https://github.com/xg787/BetterNether-0.15-unoffical-hotfix-/releases

I had that problem trying to build on Linux. I had to build it on Windows and ran .\gradlew.bat build in CLI in that directory. The outputted .jar was under builds/lib/

you can also just run cmd in local directory and run gradlew build

Redd56 commented

thank you @xg787 for the hotfix so i dont have to reinstall gradlew myself

Thanks you all for reporting. This will be fixed in the next release (doing some final testing for it right now)

This is also affecting 1.19.2, not just 1.20.1

@quiqueck

[12:20:44] [main/ERROR]: [net.fabricmc.loader.impl.launch.FabricLauncherBase#handleFormattedException] Minecraft has crashed!
net.fabricmc.loader.impl.FormattedException: java.lang.NoSuchFieldError: CLIENT_CONFIG
	at net.fabricmc.loader.impl.FormattedException.ofLocalized(FormattedException.java:63) ~[fabric-loader-0.15.3.jar:?]
	at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:472) ~[fabric-loader-0.15.3.jar:?]
	at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:74) [fabric-loader-0.15.3.jar:?]
	at net.fabricmc.loader.impl.launch.knot.KnotServer.main(KnotServer.java:23) [fabric-loader-0.15.3.jar:?]
	at net.fabricmc.loader.impl.launch.server.FabricServerLauncher.main(FabricServerLauncher.java:69) [fabric-loader-0.15.3.jar:?]
Caused by: java.lang.NoSuchFieldError: CLIENT_CONFIG
	at org.betterx.bclib.config.Configs.<clinit>(Configs.java:12) ~[bclib-2.1.7.jar:?]
	at org.betterx.bclib.api.v2.levelgen.biomes.BCLBiomeSettings.applyWithDefaults(BCLBiomeSettings.java:201) ~[bclib-2.1.7.jar:?]
	at org.betterx.bclib.api.v2.levelgen.biomes.BCLBiome.<init>(BCLBiome.java:290) ~[bclib-2.1.7.jar:?]
	at org.betterx.bclib.api.v2.levelgen.biomes.BCLBiome.<init>(BCLBiome.java:273) ~[bclib-2.1.7.jar:?]
	at org.betterx.bclib.api.v2.levelgen.biomes.InternalBiomeAPI.wrapNativeBiome(InternalBiomeAPI.java:268) ~[bclib-2.1.7.jar:?]
	at org.betterx.bclib.api.v2.levelgen.biomes.InternalBiomeAPI.wrapNativeBiome(InternalBiomeAPI.java:232) ~[bclib-2.1.7.jar:?]
	at org.betterx.bclib.api.v2.levelgen.biomes.BiomeAPI.<clinit>(BiomeAPI.java:254) ~[bclib-2.1.7.jar:?]
	at org.betterx.bclib.api.v2.levelgen.biomes.BCLBiomeRegistry.bootstrap(BCLBiomeRegistry.java:91) ~[bclib-2.1.7.jar:?]
	at net.minecraft.class_5458.method_44104(class_5458.java:98) ~[server-intermediary.jar:?]
	at net.minecraft.class_5458.method_30566(class_5458.java:105) ~[server-intermediary.jar:?]
	at java.util.LinkedHashMap.forEach(LinkedHashMap.java:721) ~[?:?]
	at net.minecraft.class_5458.<clinit>(class_5458.java:104) ~[server-intermediary.jar:?]
	at net.minecraft.class_2378.<clinit>(class_2378.java:326) ~[server-intermediary.jar:?]
	at net.minecraft.class_2966.method_12851(class_2966.java:50) ~[server-intermediary.jar:?]
	at net.minecraft.server.Main.main(Main.java:98) ~[server-intermediary.jar:?]
	at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:470) ~[fabric-loader-0.15.3.jar:?]
	... 3 more

Hey @quiqueck , can you tell me how you made this fix so that I can manually fix Industrial Revolution myself somehow? It's one of the few factory mods on Fabric overall, and the only one with farmers and proper pipes and whatnot, so it's a must-have for anyone playing Factory mods on Fabric, and I would like to fix it.

EDIT:
All it looks like to me, is that you removed

"@ Environment(value = EnvType.CLIENT)" and "import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment;"

from your code. Did that solve it?

EDIT 2:
Currently trying myself at compiling with IntelliJ IDEA, having removed Maven publishing (as it errored), and removed all references to

"@ Environment(value = EnvType.CLIENT)" and "import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment;"

. Let's see :)

EDIT 3:
I fixed it, thank you for the inspiration @quiqueck , it helped me as a noob fix this error in Industrial Revolution. I will push a fixed build soon :)

None of those forks work when i try to build them. I dont see a mod in build file, only loom-cache.

xg787's forks have release files in the repos https://github.com/xg787/BCLib-0.15-unoffical-hotfix/releases https://github.com/xg787/BetterEnd-0.15-unoffical-hotfix/releases https://github.com/xg787/BetterNether-0.15-unoffical-hotfix-/releases

I had that problem trying to build on Linux. I had to build it on Windows and ran .\gradlew.bat build in CLI in that directory. The outputted .jar was under builds/lib/

you can also just run cmd in local directory and run gradlew build

cant open the link

@lenigmacedo why do you need the forks? was this not fixed with the official updates?

@lenigmacedo why do you need the forks? was this not fixed with the official updates?

It was, I don't get it either.

what about fix for 1.20.1?

what about fix for 1.20.1?

Fix what? bclib runs fine on 1.20.1, im playing with this version of betterx

what about fix for 1.20.1?

Should be fixed @116pablo - make sure you're updated

@lenigmacedo why do you need the forks? was this not fixed with the official updates?

It was, I don't get it either.

What version is it fixed in? 2.1.8 doesn't seem to work, and that's the newest version available.

EDIT: Apparently you also need to update the BetterX mods if you have them. Which is... extremely suspicious. What are they doing to cause a crash in bclib?

1.18.2 still has yet to receive the fix..