Phosphor (Fabric)

Phosphor (Fabric)

8M Downloads

Crash when using this mod.

xieleo5 opened this issue · 7 comments

commented

I include this mod into the mods dir which is generated by fabric's runClient task. And it will make the game crash. Here is the crash report:

[19:46:00] [Render thread/ERROR] (Minecraft) Unreported exception thrown!
 java.lang.NoSuchMethodError: 'void net.minecraft.world.chunk.light.ChunkLightProvider.method_15483(long)'
	at net.minecraft.world.chunk.light.ChunkLightProvider.cancelUpdatesForChunk(ChunkLightProvider.java:698) ~[[email protected]:?]
	at net.minecraft.world.chunk.light.LightStorage.handler$zej000$preRemoveSection(LightStorage.java:816) ~[[email protected]:?]
	at net.minecraft.world.chunk.light.LightStorage.removeSection(LightStorage.java) ~[[email protected]:?]
	at net.minecraft.world.chunk.light.LightStorage.addQueuedLightmaps(LightStorage.java:1423) ~[[email protected]:?]
	at net.minecraft.world.chunk.light.LightStorage.updateLight(LightStorage.java:852) ~[[email protected]:?]
	at net.minecraft.world.chunk.light.ChunkLightProvider.doLightUpdates(ChunkLightProvider.java:186) ~[[email protected]:?]
	at net.minecraft.world.chunk.light.LightingProvider.doLightUpdates(LightingProvider.java:63) ~[[email protected]:?]
	at net.minecraft.client.render.WorldRenderer.render(WorldRenderer.java:1193) ~[[email protected]:?]
	at net.minecraft.client.render.GameRenderer.renderWorld(GameRenderer.java:1034) ~[[email protected]:?]
	at net.minecraft.client.render.GameRenderer.render(GameRenderer.java:813) ~[[email protected]:?]
	at net.minecraft.client.MinecraftClient.render(MinecraftClient.java:1122) ~[[email protected]:?]
	at net.minecraft.client.MinecraftClient.run(MinecraftClient.java:737) [[email protected]:?]
	at net.minecraft.client.main.Main.main(Main.java:236) [[email protected]:?]
	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.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:416) [fabric-loader-0.13.3.jar:?]
	at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:77) [fabric-loader-0.13.3.jar:?]
	at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23) [fabric-loader-0.13.3.jar:?]
	at net.fabricmc.devlaunchinjector.Main.main(Main.java:86) [dev-launch-injector-0.2.1+build.8.jar:?]

This is the gradle property I use:

org.gradle.jvmargs=-Xmx1G

minecraft_version=1.18.2
yarn_mappings=1.18.2+build.3
loader_version=0.13.3

fabric_version=0.51.1+1.18.2

Here is the whole crash report:

---- Minecraft Crash Report ----
// This doesn't make any sense!

Time: 2022/5/7 ����7:46
Description: Unexpected error

java.lang.NoSuchMethodError: 'void net.minecraft.world.chunk.light.ChunkLightProvider.method_15483(long)'
	at net.minecraft.world.chunk.light.ChunkLightProvider.cancelUpdatesForChunk(ChunkLightProvider.java:698)
	at net.minecraft.world.chunk.light.LightStorage.handler$zej000$preRemoveSection(LightStorage.java:816)
	at net.minecraft.world.chunk.light.LightStorage.removeSection(LightStorage.java)
	at net.minecraft.world.chunk.light.LightStorage.addQueuedLightmaps(LightStorage.java:1423)
	at net.minecraft.world.chunk.light.LightStorage.updateLight(LightStorage.java:852)
	at net.minecraft.world.chunk.light.ChunkLightProvider.doLightUpdates(ChunkLightProvider.java:186)
	at net.minecraft.world.chunk.light.LightingProvider.doLightUpdates(LightingProvider.java:63)
	at net.minecraft.client.render.WorldRenderer.render(WorldRenderer.java:1193)
	at net.minecraft.client.render.GameRenderer.renderWorld(GameRenderer.java:1034)
	at net.minecraft.client.render.GameRenderer.render(GameRenderer.java:813)
	at net.minecraft.client.MinecraftClient.render(MinecraftClient.java:1122)
	at net.minecraft.client.MinecraftClient.run(MinecraftClient.java:737)
	at net.minecraft.client.main.Main.main(Main.java:236)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:416)
	at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:77)
	at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23)
	at net.fabricmc.devlaunchinjector.Main.main(Main.java:86)


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

-- Head --
Thread: Render thread
Stacktrace:
	at net.minecraft.world.chunk.light.ChunkLightProvider.cancelUpdatesForChunk(ChunkLightProvider.java:698)
	at net.minecraft.world.chunk.light.LightStorage.handler$zej000$preRemoveSection(LightStorage.java:816)
	at net.minecraft.world.chunk.light.LightStorage.removeSection(LightStorage.java)
	at net.minecraft.world.chunk.light.LightStorage.addQueuedLightmaps(LightStorage.java:1423)
	at net.minecraft.world.chunk.light.LightStorage.updateLight(LightStorage.java:852)
	at net.minecraft.world.chunk.light.ChunkLightProvider.doLightUpdates(ChunkLightProvider.java:186)
	at net.minecraft.world.chunk.light.LightingProvider.doLightUpdates(LightingProvider.java:63)
	at net.minecraft.client.render.WorldRenderer.render(WorldRenderer.java:1193)
	at net.minecraft.client.render.GameRenderer.renderWorld(GameRenderer.java:1034)

-- Affected level --
Details:
	All players: 1 total; [ClientPlayerEntity['Player26'/153, l='ClientLevel', x=-36.76, y=-0.70, z=16.70]]
	Chunk stats: 961, 601
	Level dimension: minecraft:overworld
	Level spawn location: World: (0,64,0), Section: (at 0,0,0 in 0,4,0; chunk contains blocks 0,-64,0 to 15,319,15), Region: (0,0; contains chunks 0,0 to 31,31, blocks 0,-64,0 to 511,319,511)
	Level time: 1054 game time, 1054 day time
	Server brand: fabric
	Server type: Integrated singleplayer server
Stacktrace:
	at net.minecraft.client.world.ClientWorld.addDetailsToCrashReport(ClientWorld.java:407)
	at net.minecraft.client.MinecraftClient.addDetailsToCrashReport(MinecraftClient.java:2376)
	at net.minecraft.client.MinecraftClient.run(MinecraftClient.java:761)
	at net.minecraft.client.main.Main.main(Main.java:236)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:416)
	at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:77)
	at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23)
	at net.fabricmc.devlaunchinjector.Main.main(Main.java:86)

-- Last reload --
Details:
	Reload number: 1
	Reload reason: initial
	Finished: Yes
	Packs: Default, Fabric Mods

-- System Details --
Details:
	Minecraft Version: 1.18.2
	Minecraft Version ID: 1.18.2
	Operating System: Windows 11 (amd64) version 10.0
	Java Version: 17.0.3.1, Oracle Corporation
	Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode, sharing), Oracle Corporation
	Memory: 1470420448 bytes (1402 MiB) / 2701131776 bytes (2576 MiB) up to 8522825728 bytes (8128 MiB)
	CPUs: 24
	Processor Vendor: GenuineIntel
	Processor Name: 12th Gen Intel(R) Core(TM) i9-12900K
	Identifier: Intel64 Family 6 Model 151 Stepping 2
	Microarchitecture: unknown
	Frequency (GHz): 3.19
	Number of physical packages: 1
	Number of physical CPUs: 16
	Number of logical CPUs: 24
	Graphics card #0 name: NVIDIA GeForce RTX 3080
	Graphics card #0 vendor: NVIDIA (0x10de)
	Graphics card #0 VRAM (MB): 4095.00
	Graphics card #0 deviceId: 0x220a
	Graphics card #0 versionInfo: DriverVersion=30.0.15.1259
	Memory slot #0 capacity (MB): 16384.00
	Memory slot #0 clockSpeed (GHz): 4.80
	Memory slot #0 type: Unknown
	Memory slot #1 capacity (MB): 16384.00
	Memory slot #1 clockSpeed (GHz): 4.80
	Memory slot #1 type: Unknown
	Virtual memory max (MB): 37629.27
	Virtual memory used (MB): 27674.79
	Swap memory total (MB): 5120.00
	Swap memory used (MB): 73.28
	JVM Flags: 0 total; 
	Fabric Mods: 
		fabric: Fabric API 0.51.1+1.18.2
		fabric-api-base: Fabric API Base 0.4.4+d7c144a860
		fabric-api-lookup-api-v1: Fabric API Lookup API (v1) 1.6.0+2373a54560
		fabric-biome-api-v1: Fabric Biome API (v1) 8.0.4+7b0f312660
		fabric-blockrenderlayer-v1: Fabric BlockRenderLayer Registration (v1) 1.1.12+3ac43d9560
		fabric-command-api-v1: Fabric Command API (v1) 1.1.9+d7c144a860
		fabric-commands-v0: Fabric Commands (v0) 0.2.8+b4f4f6cd60
		fabric-containers-v0: Fabric Containers (v0) 0.1.21+d7c144a860
		fabric-content-registries-v0: Fabric Content Registries (v0) 3.0.3+d82b939260
		fabric-convention-tags-v1: Fabric Convention Tags 1.0.1+474e4f7960
		fabric-crash-report-info-v1: Fabric Crash Report Info (v1) 0.1.11+3ac43d9560
		fabric-data-generation-api-v1: Fabric Data Generation API (v1) 2.0.9+e19de87d60
		fabric-dimensions-v1: Fabric Dimensions API (v1) 2.1.17+2540745460
		fabric-entity-events-v1: Fabric Entity Events (v1) 1.4.8+d7c144a860
		fabric-events-interaction-v0: Fabric Events Interaction (v0) 0.4.19+d7c144a860
		fabric-events-lifecycle-v0: Fabric Events Lifecycle (v0) 0.2.14+d7c144a860
		fabric-game-rule-api-v1: Fabric Game Rule API (v1) 1.0.13+d7c144a860
		fabric-gametest-api-v1: Fabric Game Test API (v1) 1.0.16+91b7aa6660
		fabric-item-api-v1: Fabric Item API (v1) 1.4.0+4457765560
		fabric-item-groups-v0: Fabric Item Groups (v0) 0.3.11+91896a4960
		fabric-key-binding-api-v1: Fabric Key Binding API (v1) 1.0.12+54e5b2ec60
		fabric-keybindings-v0: Fabric Key Bindings (v0) 0.2.10+b4f4f6cd60
		fabric-lifecycle-events-v1: Fabric Lifecycle Events (v1) 2.0.3+2d83e92c60
		fabric-loot-tables-v1: Fabric Loot Tables (v1) 1.0.11+d7c144a860
		fabric-mining-level-api-v1: Fabric Mining Level API (v1) 2.1.0+81ea5b3c60
		fabric-models-v0: Fabric Models (v0) 0.3.6+d7c144a860
		fabric-networking-api-v1: Fabric Networking API (v1) 1.0.21+d882b91560
		fabric-networking-v0: Fabric Networking (v0) 0.3.8+b4f4f6cd60
		fabric-object-builder-api-v1: Fabric Object Builder API (v1) 2.1.0+fe4ddef060
		fabric-particles-v1: Fabric Particles (v1) 0.2.12+526dc1ac60
		fabric-registry-sync-v0: Fabric Registry Sync (v0) 0.9.8+0d9ab37260
		fabric-renderer-api-v1: Fabric Renderer API (v1) 0.4.13+d882b91560
		fabric-renderer-indigo: Fabric Renderer - Indigo 0.5.0+7faf0d8860
		fabric-renderer-registries-v1: Fabric Renderer Registries (v1) 3.2.11+b4f4f6cd60
		fabric-rendering-data-attachment-v1: Fabric Rendering Data Attachment (v1) 0.3.7+d7c144a860
		fabric-rendering-fluids-v1: Fabric Rendering Fluids (v1) 2.0.2+54e5b2ec60
		fabric-rendering-v0: Fabric Rendering (v0) 1.1.13+b4f4f6cd60
		fabric-rendering-v1: Fabric Rendering (v1) 1.10.7+54e5b2ec60
		fabric-resource-conditions-api-v1: Fabric Resource Conditions API (v1) 2.0.3+91b7aa6660
		fabric-resource-loader-v0: Fabric Resource Loader (v0) 0.4.18+2de5574560
		fabric-screen-api-v1: Fabric Screen API (v1) 1.0.10+d882b91560
		fabric-screen-handler-api-v1: Fabric Screen Handler API (v1) 1.2.0+1f6558e860
		fabric-textures-v0: Fabric Textures (v0) 1.0.12+3ac43d9560
		fabric-transfer-api-v1: Fabric Transfer API (v1) 1.6.0+2373a54560
		fabric-transitive-access-wideners-v1: Fabric Transitive Access Wideners (v1) 1.0.0+bd8a4a1860
		fabricloader: Fabric Loader 0.13.3
		java: Java HotSpot(TM) 64-Bit Server VM 17
		lithium: Lithium 0.7.9
		minecraft: Minecraft 1.18.2
		modid: Example Mod 1.0.0
		phosphor: Phosphor 0.8.1
	Launched Version: Fabric
	Backend library: LWJGL version 3.2.2 build 10
	Backend API: NVIDIA GeForce RTX 3080/PCIe/SSE2 GL version 3.2.0 NVIDIA 512.59, NVIDIA Corporation
	Window size: 854x474
	GL Caps: Using framebuffer using OpenGL 3.2
	GL debug messages: 
	Using VBOs: Yes
	Is Modded: Definitely; Client brand changed to 'fabric'; Server brand changed to 'fabric'
	Type: Integrated Server (map_client.txt)
	Graphics mode: fancy
	Resource Packs: Fabric Mods
	Current Language: English (US)
	CPU: 24x 12th Gen Intel(R) Core(TM) i9-12900K
	Server Running: true
	Player Count: 1 / 8; [ServerPlayerEntity['Player26'/153, l='ServerLevel[New World]', x=-36.76, y=-0.70, z=16.70]]
	Data Packs: vanilla, Fabric Mods
	World Generation: Stable
commented

Can you paste the relevant part of your buildscript? I think adding runtime files(...) to the dependencies block should work. However, I do remember some difficulties with that in the past, but I can't recall the issues axactly.

commented

See #76.

commented

See #76.

Sry, could you explain how to use -dev.jar in detail? I've tried to add the local jar to gradle dependency but this seems not working.

commented

Here is my buildscript:

plugins {
	id 'fabric-loom' version '0.11-SNAPSHOT'
	id 'maven-publish'
}

sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17

archivesBaseName = project.archives_base_name
version = project.mod_version
group = project.maven_group


dependencies {
	// To change the versions see the gradle.properties file
	minecraft "com.mojang:minecraft:${project.minecraft_version}"
	mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
	modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"

	// Fabric API. This is technically optional, but you probably want it anyway.
	modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"

	runtimeOnly files("/run/mods/phosphor-fabric-mc1.18.x-0.8.1.jar")
}

processResources {
	inputs.property "version", project.version

	filesMatching("fabric.mod.json") {
		expand "version": project.version
	}
}

tasks.withType(JavaCompile).configureEach {
	// Minecraft 1.18 (1.18-pre2) upwards uses Java 17.
	it.options.release = 17
}

java {
	// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
	// if it is present.
	// If you remove this line, sources will not be generated.
	withSourcesJar()
}

jar {
	from("LICENSE") {
		rename { "${it}_${project.archivesBaseName}"}
	}
}

When I add the line runtimeOnly files("/run/mods/phosphor-fabric-mc1.18.x-0.8.1.jar"), it will cause fabric to throw an error like this:

Uncaught exception in thread "main"
java.lang.RuntimeException: Failed to read accessWidener file from mod phosphor
	at net.fabricmc.loader.impl.FabricLoaderImpl.loadAccessWideners(FabricLoaderImpl.java:487)
	at net.fabricmc.loader.impl.launch.knot.Knot.init(Knot.java:145)
	at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:71)
	at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23)
	at net.fabricmc.devlaunchinjector.Main.main(Main.java:86)
Caused by: net.fabricmc.accesswidener.AccessWidenerFormatException: line 1: Namespace (intermediary) does not match current runtime namespace (named)
	at net.fabricmc.accesswidener.AccessWidenerReader.error(AccessWidenerReader.java:285)
	at net.fabricmc.accesswidener.AccessWidenerReader.read(AccessWidenerReader.java:84)
	at net.fabricmc.loader.impl.FabricLoaderImpl.loadAccessWideners(FabricLoaderImpl.java:485)
	... 4 more
commented

Sorry for the late response. It seems that you were not using the -dev jar but the remapped release artifact. The former can be found here.

commented

I've encountered this bug on 1.19 but the dev jar isn't published for the latest 1.19 release.

commented

Sorry for the late response.
It seems that Loom moved the -dev jar to build/devlibs/ at some point. It is now again included in the published artifacts. You can also compile the project yourself in case you need more up-to-date mappings or something.

Feel free to reopen the issue in case this still does not work.