
Trying to add reflection enchantment crashes game
CringeStar opened this issue ยท 6 comments
Whenever both a shield and this enchantment are in the slots of an anvil, the game crashes. I have not tested this outside of the development environment and am not certain if this has to do with issue #82
this is the crash log, also occurs in 1.6.0-1.19. this is happening in a mod using fabric shield lib, not the library itself btw
---- Minecraft Crash Report ----
// You should try our sister game, Minceraft!
Time: 2022-09-05 11:34:10
Description: mouseClicked event handler
java.lang.AbstractMethodError: Receiver class net.minecraft.enchantment.EnchantmentTarget$15 does not define or inherit an implementation of the resolved method 'abstract boolean isAcceptableItem(net.minecraft.item.Item)' of abstract class net.minecraft.enchantment.EnchantmentTarget.
at net.minecraft.enchantment.Enchantment.isAcceptableItem(Enchantment.java:128)
at net.minecraft.screen.AnvilScreenHandler.updateResult(AnvilScreenHandler.java:195)
at net.minecraft.screen.ForgingScreenHandler.onContentChanged(ForgingScreenHandler.java:80)
at net.minecraft.screen.ForgingScreenHandler$1.markDirty(ForgingScreenHandler.java:26)
at net.minecraft.inventory.SimpleInventory.redirect$zeo000$fabric_redirectMarkDirty(SimpleInventory.java:543)
at net.minecraft.inventory.SimpleInventory.setStack(SimpleInventory.java:140)
at net.minecraft.screen.slot.Slot.setStack(Slot.java:61)
at net.minecraft.screen.ScreenHandler.insertItem(ScreenHandler.java:655)
at net.minecraft.screen.ForgingScreenHandler.transferSlot(ForgingScreenHandler.java:123)
at net.minecraft.screen.ScreenHandler.internalOnSlotClick(ScreenHandler.java:394)
at net.minecraft.screen.ScreenHandler.onSlotClick(ScreenHandler.java:293)
at net.minecraft.client.network.ClientPlayerInteractionManager.clickSlot(ClientPlayerInteractionManager.java:450)
at net.minecraft.client.gui.screen.ingame.HandledScreen.onMouseClick(HandledScreen.java:569)
at net.minecraft.client.gui.screen.ingame.HandledScreen.mouseClicked(HandledScreen.java:361)
at net.minecraft.client.Mouse.method_1611(Mouse.java:94)
at net.minecraft.client.gui.screen.Screen.wrapScreenError(Screen.java:489)
at net.minecraft.client.Mouse.onMouseButton(Mouse.java:94)
at net.minecraft.client.Mouse.method_22686(Mouse.java:165)
at net.minecraft.util.thread.ThreadExecutor.execute(ThreadExecutor.java:103)
at net.minecraft.client.Mouse.method_22684(Mouse.java:165)
at org.lwjgl.glfw.GLFWMouseButtonCallbackI.callback(GLFWMouseButtonCallbackI.java:43)
at org.lwjgl.system.JNI.invokeV(Native Method)
at org.lwjgl.glfw.GLFW.glfwWaitEventsTimeout(GLFW.java:3474)
at com.mojang.blaze3d.systems.RenderSystem.limitDisplayFPS(RenderSystem.java:222)
at net.minecraft.client.MinecraftClient.render(MinecraftClient.java:1208)
at net.minecraft.client.MinecraftClient.run(MinecraftClient.java:768)
at net.minecraft.client.main.Main.main(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)
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.enchantment.Enchantment.isAcceptableItem(Enchantment.java:128)
at net.minecraft.screen.AnvilScreenHandler.updateResult(AnvilScreenHandler.java:195)
at net.minecraft.screen.ForgingScreenHandler.onContentChanged(ForgingScreenHandler.java:80)
at net.minecraft.screen.ForgingScreenHandler$1.markDirty(ForgingScreenHandler.java:26)
at net.minecraft.inventory.SimpleInventory.redirect$zeo000$fabric_redirectMarkDirty(SimpleInventory.java:543)
at net.minecraft.inventory.SimpleInventory.setStack(SimpleInventory.java:140)
at net.minecraft.screen.slot.Slot.setStack(Slot.java:61)
at net.minecraft.screen.ScreenHandler.insertItem(ScreenHandler.java:655)
at net.minecraft.screen.ForgingScreenHandler.transferSlot(ForgingScreenHandler.java:123)
at net.minecraft.screen.ScreenHandler.internalOnSlotClick(ScreenHandler.java:394)
at net.minecraft.screen.ScreenHandler.onSlotClick(ScreenHandler.java:293)
at net.minecraft.client.network.ClientPlayerInteractionManager.clickSlot(ClientPlayerInteractionManager.java:450)
at net.minecraft.client.gui.screen.ingame.HandledScreen.onMouseClick(HandledScreen.java:569)
at net.minecraft.client.gui.screen.ingame.HandledScreen.mouseClicked(HandledScreen.java:361)
at net.minecraft.client.Mouse.method_1611(Mouse.java:94)
at net.minecraft.client.gui.screen.Screen.wrapScreenError(Screen.java:489)
at net.minecraft.client.Mouse.onMouseButton(Mouse.java:94)
at net.minecraft.client.Mouse.method_22686(Mouse.java:165)
at net.minecraft.util.thread.ThreadExecutor.execute(ThreadExecutor.java:103)
at net.minecraft.client.Mouse.method_22684(Mouse.java:165)
at org.lwjgl.glfw.GLFWMouseButtonCallbackI.callback(GLFWMouseButtonCallbackI.java:43)
at org.lwjgl.system.JNI.invokeV(Native Method)
at org.lwjgl.glfw.GLFW.glfwWaitEventsTimeout(GLFW.java:3474)
-- Affected screen --
Details:
Screen name: net.minecraft.client.gui.screen.ingame.AnvilScreen
Stacktrace:
at net.minecraft.client.gui.screen.Screen.wrapScreenError(Screen.java:489)
at net.minecraft.client.Mouse.onMouseButton(Mouse.java:94)
at net.minecraft.client.Mouse.method_22686(Mouse.java:165)
at net.minecraft.util.thread.ThreadExecutor.execute(ThreadExecutor.java:103)
at net.minecraft.client.Mouse.method_22684(Mouse.java:165)
at org.lwjgl.glfw.GLFWMouseButtonCallbackI.callback(GLFWMouseButtonCallbackI.java:43)
at org.lwjgl.system.JNI.invokeV(Native Method)
at org.lwjgl.glfw.GLFW.glfwWaitEventsTimeout(GLFW.java:3474)
at com.mojang.blaze3d.systems.RenderSystem.limitDisplayFPS(RenderSystem.java:222)
at net.minecraft.client.MinecraftClient.render(MinecraftClient.java:1208)
at net.minecraft.client.MinecraftClient.run(MinecraftClient.java:768)
at net.minecraft.client.main.Main.main(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)
at net.fabricmc.devlaunchinjector.Main.main(Main.java:86)
-- Affected level --
Details:
All players: 1 total; [ClientPlayerEntity['Player439'/36, l='ClientLevel', x=33.65, y=-60.00, z=9.60]]
Chunk stats: 961, 612
Level dimension: minecraft:overworld
Level spawn location: World: (0,-60,0), Section: (at 0,4,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: 18339 game time, 1159 day time
Server brand: fabric
Server type: Integrated singleplayer server
Stacktrace:
at net.minecraft.client.world.ClientWorld.addDetailsToCrashReport(ClientWorld.java:453)
at net.minecraft.client.MinecraftClient.addDetailsToCrashReport(MinecraftClient.java:2341)
at net.minecraft.client.MinecraftClient.run(MinecraftClient.java:787)
at net.minecraft.client.main.Main.main(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)
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.19.2
Minecraft Version ID: 1.19.2
Operating System: Windows 10 (amd64) version 10.0
Java Version: 17.0.1, Oracle Corporation
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode, sharing), Oracle Corporation
Memory: 914358272 bytes (872 MiB) / 3019898880 bytes (2880 MiB) up to 4232052736 bytes (4036 MiB)
CPUs: 16
Processor Vendor: GenuineIntel
Processor Name: 11th Gen Intel(R) Core(TM) i7-11800H @ 2.30GHz
Identifier: Intel64 Family 6 Model 141 Stepping 1
Microarchitecture: unknown
Frequency (GHz): 2.30
Number of physical packages: 1
Number of physical CPUs: 8
Number of logical CPUs: 16
Graphics card #0 name: NVIDIA GeForce RTX 3060 Laptop GPU
Graphics card #0 vendor: NVIDIA (0x10de)
Graphics card #0 VRAM (MB): 4095.00
Graphics card #0 deviceId: 0x2520
Graphics card #0 versionInfo: DriverVersion=30.0.14.7288
Memory slot #0 capacity (MB): 8192.00
Memory slot #0 clockSpeed (GHz): 3.20
Memory slot #0 type: DDR4
Memory slot #1 capacity (MB): 8192.00
Memory slot #1 clockSpeed (GHz): 3.20
Memory slot #1 type: DDR4
Virtual memory max (MB): 32137.47
Virtual memory used (MB): 26847.23
Swap memory total (MB): 16000.00
Swap memory used (MB): 1987.46
JVM Flags: 0 total;
Fabric Mods:
cloth-basic-math: cloth-basic-math 0.6.1
cloth-config: Cloth Config v8 8.1.77
fabric-api: Fabric API 0.60.0+1.19.2
fabric-api-base: Fabric API Base 0.4.11+e62f51a390
fabric-api-lookup-api-v1: Fabric API Lookup API (v1) 1.6.9+9ff28f4090
fabric-biome-api-v1: Fabric Biome API (v1) 9.0.17+aeb40ebe90
fabric-blockrenderlayer-v1: Fabric BlockRenderLayer Registration (v1) 1.1.20+aeb40ebe90
fabric-client-tags-api-v1: Fabric Client Tags 1.0.1+b35fea8390
fabric-command-api-v2: Fabric Command API (v2) 2.1.7+0c17ea9690
fabric-content-registries-v0: Fabric Content Registries (v0) 3.2.3+aeb40ebe90
fabric-convention-tags-v1: Fabric Convention Tags 1.1.1+7cd20a1490
fabric-crash-report-info-v1: Fabric Crash Report Info (v1) 0.2.5+aeb40ebe90
fabric-data-generation-api-v1: Fabric Data Generation API (v1) 5.1.8+a680b9b490
fabric-dimensions-v1: Fabric Dimensions API (v1) 2.1.30+aeb40ebe90
fabric-entity-events-v1: Fabric Entity Events (v1) 1.4.18+9ff28f4090
fabric-events-interaction-v0: Fabric Events Interaction (v0) 0.4.28+aeb40ebe90
fabric-game-rule-api-v1: Fabric Game Rule API (v1) 1.0.21+aeb40ebe90
fabric-gametest-api-v1: Fabric Game Test API (v1) 1.0.35+e62f51a390
fabric-item-api-v1: Fabric Item API (v1) 1.5.7+35a03c4390
fabric-item-groups-v0: Fabric Item Groups (v0) 0.3.28+aeb40ebe90
fabric-key-binding-api-v1: Fabric Key Binding API (v1) 1.0.20+aeb40ebe90
fabric-lifecycle-events-v1: Fabric Lifecycle Events (v1) 2.1.2+aeb40ebe90
fabric-loot-api-v2: Fabric Loot API (v2) 1.1.3+83a8659290
fabric-message-api-v1: Fabric Message API (v1) 5.0.3+176380a290
fabric-mining-level-api-v1: Fabric Mining Level API (v1) 2.1.14+33fbc73890
fabric-models-v0: Fabric Models (v0) 0.3.17+aeb40ebe90
fabric-networking-api-v1: Fabric Networking API (v1) 1.2.4+5eb68ef290
fabric-object-builder-api-v1: Fabric Object Builder API (v1) 4.0.11+aeb40ebe90
fabric-particles-v1: Fabric Particles (v1) 1.0.10+aeb40ebe90
fabric-registry-sync-v0: Fabric Registry Sync (v0) 0.9.24+aeb40ebe90
fabric-renderer-api-v1: Fabric Renderer API (v1) 1.0.10+aeb40ebe90
fabric-renderer-indigo: Fabric Renderer - Indigo 0.6.12+aeb40ebe90
fabric-rendering-data-attachment-v1: Fabric Rendering Data Attachment (v1) 0.3.14+aeb40ebe90
fabric-rendering-fluids-v1: Fabric Rendering Fluids (v1) 3.0.7+aeb40ebe90
fabric-rendering-v1: Fabric Rendering (v1) 1.10.16+aeb40ebe90
fabric-resource-conditions-api-v1: Fabric Resource Conditions API (v1) 2.0.11+e62f51a390
fabric-resource-loader-v0: Fabric Resource Loader (v0) 0.6.1+aeb40ebe90
fabric-screen-api-v1: Fabric Screen API (v1) 1.0.26+f05effaf90
fabric-screen-handler-api-v1: Fabric Screen Handler API (v1) 1.2.13+9ff28f4090
fabric-textures-v0: Fabric Textures (v0) 1.0.20+aeb40ebe90
fabric-transfer-api-v1: Fabric Transfer API (v1) 2.0.11+83a8659290
fabric-transitive-access-wideners-v1: Fabric Transitive Access Wideners (v1) 1.3.0+42d99c3290
fabricloader: Fabric Loader 0.14.9
fabricshieldlib: Fabric Shield Lib 1.6.0-1.19
java: Java HotSpot(TM) 64-Bit Server VM 17
minecraft: Minecraft 1.19.2
mm: Manningham Mills 2.3
modmenu: Mod Menu 4.0.6
testshield: Test Shield 1.0.0
Launched Version: Fabric
Backend library: LWJGL version 3.3.1 SNAPSHOT
Backend API: NVIDIA GeForce RTX 3060 Laptop GPU/PCIe/SSE2 GL version 3.2.0 NVIDIA 472.88, NVIDIA Corporation
Window size: 1920x1027
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: 16x 11th Gen Intel(R) Core(TM) i7-11800H @ 2.30GHz
Server Running: true
Player Count: 1 / 8; [ServerPlayerEntity['Player439'/36, l='ServerLevel[test world]', x=33.65, y=-60.00, z=9.60]]
Data Packs: vanilla, Fabric Mods
World Generation: Stable
its a mod that just tests this library, but sure let me just upload it to github real quick
I'm not entirely sure what this means we will have to do but I found a reference to AbstractMethodError in FabricASM
https://github.com/Chocohead/Fabric-ASM
This is taken from that github repo's readme
"Landing Amphibiously
There are times when a jetty alone is insufficient for the extension task at hand, resulting in big problems for any added values. In such situations a full amphibious landing to the cove's shore can be performed instead.
Any situation where a method in the enum needs to be subclasses, such as an abstract enum, adding values directly will result in AbstractMethodErrors when the methods are called for the added values. The constructor alone is unable to provide a solution to this; hence MM allows subclassing enums for added entries. These subclasses are defined via an additional structure class (to the constructor's parameters) which defines the overrides a subclass would like to make to the enum. Like normal addition there are two options depending how the normal constructor parameters are passed:"
I looked into this further while working on updating basic shields. This is the same exact issue as #82