Worked perfectly on 22w43a, but since upgrading the server to 22w44a any user trying to grow a warped or crimson fungus tree experience a client side crash.
Seems to work fine in single player (tested in fresh creative world)
---- Minecraft Crash Report ----
// Uh... Did I do that?Time: 2022-11-05 14:15:37
Description: Unexpected errorjava.lang.IllegalStateException: Missing registry: ResourceKey[minecraft:root / minecraft:worldgen/configured_feature]
at hl.f(SourceFile:26)
at java.base/java.util.Optional.orElseThrow(Optional.java:403)
at hl.d(SourceFile:26)
at cpa.a(SourceFile:43)
at cpa.a(SourceFile:48)
at cbb.a(SourceFile:71)
at cbb.a(SourceFile:43)
at cdb.a(SourceFile:270)
at eyd.b(SourceFile:370)
at eyd.a(SourceFile:328)
at eyd.a(SourceFile:278)
at eyd.a(SourceFile:327)
at eio.bb(SourceFile:1764)
at eio.bd(SourceFile:2018)
at eio.q(SourceFile:1845)
at eio.f(SourceFile:1142)
at eio.e(SourceFile:776)
at net.minecraft.client.main.Main.a(SourceFile:244)
at net.minecraft.client.main.Main.main(SourceFile:51)
A detailed walkthrough of the error, its code path and all known details is as follows:
----------------------------------------------------------------------------------------- Head --
Thread: Render thread
Stacktrace:
at hl.f(SourceFile:26)
at java.base/java.util.Optional.orElseThrow(Optional.java:403)
at hl.d(SourceFile:26)
at cpa.a(SourceFile:43)
at cpa.a(SourceFile:48)
at cbb.a(SourceFile:71)
at cbb.a(SourceFile:43)
at cdb.a(SourceFile:270)
at eyd.b(SourceFile:370)
at eyd.a(SourceFile:328)
at eyd.a(SourceFile:278)
at eyd.a(SourceFile:327)
at eio.bb(SourceFile:1764)
at eio.bd(SourceFile:2018)-- Affected level --
Details:
All players: 1 total; [fbz['nuhadu'/1269, l='ClientLevel', x=-612.57, y=70.00, z=787.01]]
Chunk stats: 729, 499
Level dimension: minecraft:overworld
Level spawn location: World: (-32,67,288), Section: (at 0,3,0 in -2,4,18; chunk contains blocks -32,-64,288 to -17,319,303), Region: (-1,0; contains chunks -32,0 to -1,31, blocks -512,-64,0 to -1,319,511)
Level time: 5595054 game time, 7134729 day time
Server brand: vanilla
Server type: Non-integrated multiplayer server
Stacktrace:
at exz.a(SourceFile:454)
at eio.d(SourceFile:2353)
at eio.e(SourceFile:800)
at net.minecraft.client.main.Main.a(SourceFile:244)
at net.minecraft.client.main.Main.main(SourceFile:51)-- Last reload --
Details:
Reload number: 1
Reload reason: initial
Finished: Yes
Packs: vanilla-- System Details --
Details:
Minecraft Version: 22w44a
Minecraft Version ID: 22w44a
Operating System: Windows 10 (amd64) version 10.0
Java Version: 17.0.3, Microsoft
Java VM Version: OpenJDK 64-Bit Server VM (mixed mode), Microsoft
Memory: 815376608 bytes (777 MiB) / 1610612736 bytes (1536 MiB) up to 2147483648 bytes (2048 MiB)
CPUs: 6
Processor Vendor: GenuineIntel
Processor Name: Intel(R) Core(TM) i5-9600K CPU @ 3.70GHz
Identifier: Intel64 Family 6 Model 158 Stepping 12
Microarchitecture: Coffee Lake
Frequency (GHz): 3.70
Number of physical packages: 1
Number of physical CPUs: 6
Number of logical CPUs: 6
Graphics card #0 name: NVIDIA GeForce RTX 2070
Graphics card #0 vendor: NVIDIA (0x10de)
Graphics card #0 VRAM (MB): 4095.00
Graphics card #0 deviceId: 0x1f02
Graphics card #0 versionInfo: DriverVersion=31.0.15.1748
Memory slot #0 capacity (MB): 8192.00
Memory slot #0 clockSpeed (GHz): 3.00
Memory slot #0 type: DDR4
Memory slot #1 capacity (MB): 8192.00
Memory slot #1 clockSpeed (GHz): 3.00
Memory slot #1 type: DDR4
Virtual memory max (MB): 22392.99
Virtual memory used (MB): 18556.40
Swap memory total (MB): 6073.64
Swap memory used (MB): 585.09
JVM Flags: 9 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xss1M -Xmx2G -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=32M
Launched Version: 22w44a
Backend library: LWJGL version 3.3.1 build 7
Backend API: NVIDIA GeForce RTX 2070/PCIe/SSE2 GL version 3.2.0 NVIDIA 517.48, NVIDIA Corporation
Window size: 1920x1129
GL Caps: Using framebuffer using OpenGL 3.2
GL debug messages:
Using VBOs: Yes
Is Modded: Probably not. Client jar signature and brand is untouched
Type: Client (map_client.txt)
Graphics mode: fancy
Resource Packs: vanilla
Current Language: English (US)
CPU: 6x Intel(R) Core(TM) i5-9600K CPU @ 3.70GHzAttachments
Comments 2
Code analysis (22w44a yarn)
The registry refactor in 22w44a brought many changes to code accessing dynamic registry, including configured feature registry. The problematic change here is FungusBlock, where the client tries to access the configured feature registry despite it not being synchronized.
private Optional<? extends RegistryEntry<ConfiguredFeature<?, ?>>> getFeatureEntry(WorldView world) {
return world.getRegistryManager().get(Registry.CONFIGURED_FEATURE_KEY).getEntry(this.featureKey);
}
public boolean isFertilizable(WorldView world, BlockPos pos, BlockState state, boolean isClient) {
Optional<? extends RegistryEntry<ConfiguredFeature<?, ?>>> optional = getFeatureEntry(world);
// trimmed extra code
}The method isFertilizable is clearly called by the client - as seen on isClient parameter. This gets the configured feature registry and gets the fungus feature entry. While the code prevents crashes when the feature is missing, they forgot the fact that the entire registry is missing on the client side. And the code uses get method, which throws when an unknown registry is queried.
This code is apparently for checking whether the fungus is placed on a correct block. Since the feature registry is large enough that syncing is not feasible, it should probably return true (note that this can cause temporary desync).
I can also confirm this behavior. Note that this also affects crimson fungus and isn't exclusive to just warped fungus.