Croptopia

Croptopia

30M Downloads

Quilt standard library crashes with croptopia on create new world screen

offbeat-stuff opened this issue ยท 5 comments

commented

Make sure you are not opening a duplicate.

Platform.

Fabric

Minecraft version.

1.19.2

Croptopia version.

2.1.0

What happened?

I clicked the singleplayer screen, I currently have no worlds and it crashed

Relevant logs

crash-2022-09-16_07.43.25-client.txt

Additional information

I am using quilt mod loader.
If this wont be supported, please tell that in the description.

commented

Have the same issue with server running on qfapi-4.0.0-beta.12_qsl-3.0.0-beta.16_fapi-0.61.0_mc-1.19.2 and mod version Croptopia-1.19.2-FABRIC-2.1.0

Although I've slightly different error:

[16:17:31] [main/ERROR]: Failed to start the minecraft server
java.lang.UnsupportedOperationException: null
	at Not Enough Crashes deobfuscated stack trace.(1.19.2+build.9) ~[?:?]
	at com.google.common.collect.ImmutableMap.clear(ImmutableMap.java:877) ~[guava-31.0.1-jre.jar:?]
	at org.quiltmc.qsl.block.content.registry.impl.BlockContentRegistriesInitializer.resetMaps(BlockContentRegistriesInitializer.java:99) ~[block_content_registry-3.0.0-beta.16+1.19.2.jar-54eb07ce-babc-413d-9251-cdc3096fc87b-nested.jar:?]
	at org.quiltmc.qsl.block.content.registry.impl.BlockContentRegistriesInitializer.lambda$onInitialize$3(BlockContentRegistriesInitializer.java:91) ~[block_content_registry-3.0.0-beta.16+1.19.2.jar-54eb07ce-babc-413d-9251-cdc3096fc87b-nested.jar:?]
	at org.quiltmc.qsl.resource.loader.api.ResourceLoaderEvents.lambda$static$2(ResourceLoaderEvents.java:56) ~[resource_loader-3.0.0-beta.16+1.19.2.jar-13ed47d4-6867-4081-b755-94a2288c5797-nested.jar:?]
	at net.minecraft.server.Main.modify$ebc000$onFailedReloadResources(Main:4104) ~[server-intermediary.jar:?]
	at net.minecraft.server.Main.main(Main:196) [server-intermediary.jar:?]
	at jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104) ~[?:?]
	at java.lang.reflect.Method.invoke(Method.java:577) ~[?:?]
	at org.quiltmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:423) [quilt-loader-0.17.5-beta.2.jar:?]
	at org.quiltmc.loader.impl.launch.knot.Knot.launch(Knot.java:76) [quilt-loader-0.17.5-beta.2.jar:?]
	at net.fabricmc.loader.launch.knot.KnotServer.main(KnotServer.java:31) [quilt-loader-0.17.5-beta.2.jar:?]
	at jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104) ~[?:?]
	at java.lang.reflect.Method.invoke(Method.java:577) ~[?:?]
	at org.quiltmc.loader.impl.launch.server.QuiltServerLauncher.main(QuiltServerLauncher.java:63) [quilt-loader-0.17.5-beta.2.jar:?]

Probably it has the same cause as error in this issue.

commented

I can recreate the issue with just the 2 mods Croptopia-1.19.2-FABRIC-2.1.0 and qfapi-4.0.0-beta.13_qsl-3.0.0-beta.16_fapi-0.62.0_mc-1.19.2 on Minecraft 1.19.2 with Quilt Loader 0.17.5-beta.3.

Here are my logs:
latest.log
crash-2022-10-02_13.50.34-client.txt

Some maybe relevant errors:

[13:50:31] [Render thread/ERROR]: Parsing error loading recipe croptopia:banana_cream_pie
com.google.gson.JsonSyntaxException: Missing ingredient, expected to find a JsonObject
...
[13:50:32] [Render thread/WARN]: Failed to validate default data-pack.
java.util.concurrent.CompletionException: java.lang.UnsupportedOperationException
...
[13:50:34] [Render thread/ERROR]: Reported exception thrown!
net.minecraft.class_148: mouseClicked event handler

@lospejos Your error message is slightly different due to the NotEnoughCrashes mod. Other than that it seems to be the same.

commented

Something that might be useful to note: The following block changes the backing map out for an ImmutableMap with new items:

private void modifyAxeBlockStripping() {
Map<Block, Block> immutableBlocks = AxeAccess.getStrippables();
var axeMap = new Builder<Block, Block>().putAll(immutableBlocks);
for (Tree crop : Tree.copy()) {
axeMap.put(crop.getLog(), crop.getStrippedLog());
axeMap.put(crop.getWood(), crop.getStrippedWood());
}
AxeAccess.setStrippables(axeMap.build());
}

QSL however, expects a mutable map, changing it out here:
https://github.com/QuiltMC/quilt-standard-libraries/blob/1.19/library/block/block_content_registry/src/main/java/org/quiltmc/qsl/block/content/registry/mixin/AxeItemMixin.java#L43

And using it here:
https://github.com/QuiltMC/quilt-standard-libraries/blob/8c80a0e36598efce2ad4e89cb50e6d543a9e66a8/library/block/block_content_registry/src/main/java/org/quiltmc/qsl/block/content/registry/impl/BlockContentRegistriesInitializer.java#L95-L102

For some reason, the preview doesn't want to work, but they are functional links to the actual code.

commented

On Fabric, strippable blocks should be registered via StrippableBlockRegistry#register. QSL supports this as well. I'm not sure if there's an equivalent for Forge.

commented