End Portal Recipe (Fabric)

End Portal Recipe (Fabric)

35.8k Downloads

Fixed Anvil Repair Cost crashing on modded tool in anvil

nekoyoubi opened this issue ยท 0 comments

commented

Information

Minecraft version: 1.19.2
Modloader: Fabric
Fabric loader version: 0.60.0
Environment: Singleplayer

Mod name: Fixed Anvil Repair Cost
Mod version: 2.1

Description

When attempting to put a modded pickaxe in the anvil's first slot so I could toss a book on it, placing the pickaxe crashed the game. This was with the Diamond Pickaxe variant from MC Dungeons Weapons/Artifacts (I'm not actually sure which one adds the pickaxe).

Crash report

Time: 2022-09-04 22:49:39
Description: Container click

java.lang.NullPointerException: Cannot read the array length because "array" is null
	at java.base/java.util.Arrays.stream(Arrays.java:5428)
	at chronosacaria.mcdw.bases.McdwPick.method_7878(McdwPick.java:37)
	at com.natamus.fixedanvilrepaircost.events.RepairEvent.onRepairEvent(RepairEvent.java:20)
	at com.natamus.fixedanvilrepaircost.Main.lambda$registerEvents$0(Main.java:26)
	at com.natamus.collective_fabric.fabric.callbacks.CollectiveAnvilEvents.lambda$static$0(CollectiveAnvilEvents.java:16)
	at net.minecraft.class_1706.handler$cap000$onCreateAnvilResult(class_1706.java:5043)
	at net.minecraft.class_1706.method_24928(class_1706.java:322)
	at net.minecraft.class_1706.method_7625(class_1706.java:341)
	at net.minecraft.class_471.method_2403(class_471.java:96)
	at net.minecraft.class_342.method_1874(class_342.java:151)
	at net.minecraft.class_342.method_1883(class_342.java:257)
	at net.minecraft.class_342.method_1872(class_342.java:269)
	at net.minecraft.class_342.method_1852(class_342.java:105)
	at net.minecraft.class_471.method_7635(class_471.java:138)
	at net.minecraft.class_1703.method_34246(class_1703.java:218)
	at net.minecraft.class_1703.method_7623(class_1703.java:175)
	at net.minecraft.class_1703.method_7609(class_1703.java:582)
	at net.minecraft.class_4861.method_7609(class_4861.java:77)
	at net.minecraft.class_4861$1.method_5431(class_4861.java:26)
	at net.minecraft.class_1277.redirect$djj000$fabric_redirectMarkDirty(class_1277.java:543)
	at net.minecraft.class_1277.method_5447(class_1277.java:140)
	at net.minecraft.class_1735.method_7673(class_1735.java:61)
	at net.minecraft.class_1735.method_32755(class_1735.java:151)
	at net.minecraft.class_1703.method_30010(class_1703.java:414)
	at net.minecraft.class_1703.method_30010(class_1703.java:341)
	at net.minecraft.class_1703.method_7593(class_1703.java:293)
	at net.minecraft.class_636.method_2906(class_636.java:450)
	at net.minecraft.class_465.method_2383(class_465.java:569)
	at net.minecraft.class_465.method_25406(class_465.java:524)
	at net.minecraft.class_312.method_1605(class_312.java:96)
	at net.minecraft.class_437.method_25412(class_437.java:489)
	at net.minecraft.class_312.method_1601(class_312.java:96)
	at net.minecraft.class_312.method_22686(class_312.java:165)
	at net.minecraft.class_1255.execute(class_1255.java:103)
	at net.minecraft.class_312.method_22684(class_312.java:165)
	at org.lwjgl.glfw.GLFWMouseButtonCallbackI.callback(GLFWMouseButtonCallbackI.java:43)
	at org.lwjgl.system.JNI.invokeV(Native Method)
	at org.lwjgl.glfw.GLFW.glfwPollEvents(GLFW.java:3403)
	at com.mojang.blaze3d.systems.RenderSystem.flipFrame(RenderSystem.java:197)
	at net.minecraft.class_1041.method_15998(class_1041.java:315)
	at net.minecraft.class_310.method_1523(class_310.java:1205)
	at net.minecraft.class_310.method_1514(class_310.java:768)
	at net.minecraft.client.main.Main.method_44604(Main.java:244)
	at net.minecraft.client.main.Main.main(Main.java:51)
	at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:461)
	at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:74)
	at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23)

(let me know if more of the stack is needed and I can update)