Automatic Tool Swap

Automatic Tool Swap

313k Downloads

[ToolSwap 2.1.0][Forge 37.0.34] Minecraft 1.17.1 crashes upon automatic tool swap

Baarten opened this issue ยท 2 comments

commented

The following crash happens when having multiple tools in the hotbar, including a pickaxe, and trying to brake stone. I was not holding any tool in my hands.

---- Minecraft Crash Report ----
// You should try our sister game, Minceraft!

Time: 16/08/2021, 23:40
Description: Unexpected error

java.lang.NoSuchMethodError: 'int net.minecraft.world.level.block.state.BlockState.getHarvestLevel()'
	at de.melanx.toolswap.ClientToolSwap.onBlockDestroy(ClientToolSwap.java:225) ~[ToolSwap-2.1.0.jar%2352!:2.1.0] {re:classloading}
	at net.minecraftforge.eventbus.ASMEventHandler_11_ClientToolSwap_onBlockDestroy_BreakSpeed.invoke(.dynamic) ~[?:?] {}
	at net.minecraftforge.eventbus.ASMEventHandler.invoke(ASMEventHandler.java:85) ~[eventbus-5.0.3.jar%232!:?] {}
	at net.minecraftforge.eventbus.EventBus.post(EventBus.java:302) ~[eventbus-5.0.3.jar%232!:?] {}
	at net.minecraftforge.eventbus.EventBus.post(EventBus.java:283) ~[eventbus-5.0.3.jar%232!:?] {}
	at net.minecraftforge.event.ForgeEventFactory.getBreakSpeed(ForgeEventFactory.java:184) ~[forge-1.17.1-37.0.34-universal.jar%2358!:?] {re:classloading}
	at net.minecraft.world.entity.player.Player.getDigSpeed(Player.java:714) ~[client-1.17.1-20210706.113038-srg.jar%2354!:?] {re:classloading,pl:accesstransformer:B}
	at net.minecraft.world.level.block.state.BlockBehaviour.m_5880_(BlockBehaviour.java:315) ~[client-1.17.1-20210706.113038-srg.jar%2354!:?] {re:classloading}
	at net.minecraft.world.level.block.state.BlockBehaviour$BlockStateBase.m_60625_(BlockBehaviour.java:512) ~[client-1.17.1-20210706.113038-srg.jar%2354!:?] {re:classloading}
	at net.minecraft.client.multiplayer.MultiPlayerGameMode.m_105269_(MultiPlayerGameMode.java:161) ~[client-1.17.1-20210706.113038-srg.jar%2354!:?] {re:classloading,pl:runtimedistcleaner:A}
	at net.minecraft.client.Minecraft.m_91276_(Minecraft.java:1498) ~[client-1.17.1-20210706.113038-srg.jar%2354!:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
	at net.minecraft.client.Minecraft.m_91279_(Minecraft.java:1825) ~[client-1.17.1-20210706.113038-srg.jar%2354!:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
	at net.minecraft.client.Minecraft.m_91398_(Minecraft.java:1647) ~[client-1.17.1-20210706.113038-srg.jar%2354!:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
	at net.minecraft.client.Minecraft.m_91383_(Minecraft.java:1015) ~[client-1.17.1-20210706.113038-srg.jar%2354!:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
	at net.minecraft.client.Minecraft.m_91374_(Minecraft.java:660) ~[client-1.17.1-20210706.113038-srg.jar%2354!:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
	at net.minecraft.client.main.Main.main(Main.java:186) ~[client-1.17.1-20210706.113038-srg.jar%2354!:?] {re:classloading,pl:runtimedistcleaner:A}
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?] {}
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78) ~[?:?] {}
	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?] {}
	at java.lang.reflect.Method.invoke(Method.java:567) ~[?:?] {}
	at net.minecraftforge.fml.loading.targets.CommonClientLaunchHandler.lambda$launchService$0(CommonClientLaunchHandler.java:45) ~[fmlloader-1.17.1-37.0.34.jar%2321!:?] {}
	at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-9.0.7.jar%235!:?] {}
	at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53) [modlauncher-9.0.7.jar%235!:?] {}
	at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71) [modlauncher-9.0.7.jar%235!:?] {}
	at cpw.mods.modlauncher.Launcher.run(Launcher.java:106) [modlauncher-9.0.7.jar%235!:?] {}
	at cpw.mods.modlauncher.Launcher.main(Launcher.java:77) [modlauncher-9.0.7.jar%235!:?] {}
	at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26) [modlauncher-9.0.7.jar%235!:?] {}
	at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23) [modlauncher-9.0.7.jar%235!:?] {}
	at cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:90) [bootstraplauncher-0.1.17.jar:?] {}


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

-- Head --
Thread: Render thread
Stacktrace:
	at de.melanx.toolswap.ClientToolSwap.onBlockDestroy(ClientToolSwap.java:225) ~[ToolSwap-2.1.0.jar%2352!:2.1.0] {re:classloading}
	at net.minecraftforge.eventbus.ASMEventHandler_11_ClientToolSwap_onBlockDestroy_BreakSpeed.invoke(.dynamic) ~[?:?] {}
	at net.minecraftforge.eventbus.ASMEventHandler.invoke(ASMEventHandler.java:85) ~[eventbus-5.0.3.jar%232!:?] {}
	at net.minecraftforge.eventbus.EventBus.post(EventBus.java:302) ~[eventbus-5.0.3.jar%232!:?] {}
	at net.minecraftforge.eventbus.EventBus.post(EventBus.java:283) ~[eventbus-5.0.3.jar%232!:?] {}
	at net.minecraftforge.event.ForgeEventFactory.getBreakSpeed(ForgeEventFactory.java:184) ~[forge-1.17.1-37.0.34-universal.jar%2358!:?] {re:classloading}
	at net.minecraft.world.entity.player.Player.getDigSpeed(Player.java:714) ~[client-1.17.1-20210706.113038-srg.jar%2354!:?] {re:classloading,pl:accesstransformer:B}
	at net.minecraft.world.level.block.state.BlockBehaviour.m_5880_(BlockBehaviour.java:315) ~[client-1.17.1-20210706.113038-srg.jar%2354!:?] {re:classloading}
	at net.minecraft.world.level.block.state.BlockBehaviour$BlockStateBase.m_60625_(BlockBehaviour.java:512) ~[client-1.17.1-20210706.113038-srg.jar%2354!:?] {re:classloading}
	at net.minecraft.client.multiplayer.MultiPlayerGameMode.m_105269_(MultiPlayerGameMode.java:161) ~[client-1.17.1-20210706.113038-srg.jar%2354!:?] {re:classloading,pl:runtimedistcleaner:A}
	at net.minecraft.client.Minecraft.m_91276_(Minecraft.java:1498) ~[client-1.17.1-20210706.113038-srg.jar%2354!:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
	at net.minecraft.client.Minecraft.m_91279_(Minecraft.java:1825) ~[client-1.17.1-20210706.113038-srg.jar%2354!:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
-- Affected level --
Details:
	All players: 1 total; [LocalPlayer['Baarten'/434, l='ClientLevel', x=-162.63, y=30.00, z=-75.51]]
	Chunk stats: 841, 358
	Level dimension: minecraft:overworld
	Level spawn location: World: (0,64,-16), Section: (at 0,0,0 in 0,4,-1; chunk contains blocks 0,0,-16 to 15,255,-1), Region: (0,-1; contains chunks 0,-32 to 31,-1, blocks 0,0,-512 to 511,255,-1)
	Level time: 2109576 game time, 3245383 day time
	Server brand: forge
	Server type: Integrated singleplayer server
Stacktrace:
	at net.minecraft.client.multiplayer.ClientLevel.m_6026_(ClientLevel.java:364) ~[client-1.17.1-20210706.113038-srg.jar%2354!:?] {re:classloading,pl:runtimedistcleaner:A}
	at net.minecraft.client.Minecraft.m_91354_(Minecraft.java:2245) ~[client-1.17.1-20210706.113038-srg.jar%2354!:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
	at net.minecraft.client.Minecraft.m_91374_(Minecraft.java:682) ~[client-1.17.1-20210706.113038-srg.jar%2354!:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
	at net.minecraft.client.main.Main.main(Main.java:186) ~[client-1.17.1-20210706.113038-srg.jar%2354!:?] {re:classloading,pl:runtimedistcleaner:A}
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?] {}
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78) ~[?:?] {}
	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?] {}
	at java.lang.reflect.Method.invoke(Method.java:567) ~[?:?] {}
	at net.minecraftforge.fml.loading.targets.CommonClientLaunchHandler.lambda$launchService$0(CommonClientLaunchHandler.java:45) ~[fmlloader-1.17.1-37.0.34.jar%2321!:?] {}
	at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-9.0.7.jar%235!:?] {}
	at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53) [modlauncher-9.0.7.jar%235!:?] {}
	at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71) [modlauncher-9.0.7.jar%235!:?] {}
	at cpw.mods.modlauncher.Launcher.run(Launcher.java:106) [modlauncher-9.0.7.jar%235!:?] {}
	at cpw.mods.modlauncher.Launcher.main(Launcher.java:77) [modlauncher-9.0.7.jar%235!:?] {}
	at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26) [modlauncher-9.0.7.jar%235!:?] {}
	at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23) [modlauncher-9.0.7.jar%235!:?] {}
	at cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:90) [bootstraplauncher-0.1.17.jar:?] {}


-- Last reload --
Details:
	Reload number: 1
	Reload reason: initial
	Finished: Yes
	Packs: Default, Mod Resources

-- System Details --
Details:
	Minecraft Version: 1.17.1
	Minecraft Version ID: 1.17.1
	Operating System: Linux (amd64) version 5.10.0-0.bpo.8-amd64
	Java Version: 16.0.1, Microsoft
	Java VM Version: OpenJDK 64-Bit Server VM (mixed mode), Microsoft
	Memory: 1117489312 bytes (1065 MiB) / 2013265920 bytes (1920 MiB) up to 2147483648 bytes (2048 MiB)
	CPUs: 12
	Processor Vendor: GenuineIntel
	Processor Name: Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
	Identifier: Intel64 Family 6 Model 158 Stepping 10
	Microarchitecture: Coffee Lake
	Frequency (GHz): 2.60
	Number of physical packages: 1
	Number of physical CPUs: 6
	Number of logical CPUs: 12
	Graphics card #0 name: UHD Graphics 630 (Mobile)
	Graphics card #0 vendor: Intel Corporation (0x8086)
	Graphics card #0 VRAM (MB): 256.00
	Graphics card #0 deviceId: 0x3e9b
	Graphics card #0 versionInfo: unknown
	Graphics card #1 name: TU117M [GeForce GTX 1650 Mobile / Max-Q]
	Graphics card #1 vendor: NVIDIA Corporation (0x10de)
	Graphics card #1 VRAM (MB): 288.00
	Graphics card #1 deviceId: 0x1f91
	Graphics card #1 versionInfo: unknown
	Virtual memory max (MB): 7825.37
	Virtual memory used (MB): 6507.20
	Swap memory total (MB): 0.00
	Swap memory used (MB): 0.00
	JVM Flags: 8 total; -Xss1M -Xmx2G -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=32M
	Launched Version: 1.17.1-forge-37.0.34
	Backend library: LWJGL version 3.2.2 SNAPSHOT
	Backend API: GeForce GTX 1650 with Max-Q Design/PCIe/SSE2 GL version 3.2.0 NVIDIA 460.73.01, NVIDIA Corporation
	Window size: 1920x1080
	GL Caps: Using framebuffer using OpenGL 3.2
	GL debug messages: 
	Using VBOs: Yes
	Is Modded: Definitely; Client brand changed to 'forge'
	Type: Integrated Server (map_client.txt)
	Graphics mode: fancy
	Resource Packs: 
	Current Language: English (US)
	CPU: 12x Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
	Player Count: 1 / 8; [ServerPlayer['Baarten'/434, l='ServerLevel[DebWorld]', x=-162.63, y=30.00, z=-75.51]]
	Data Packs: vanilla, mod:forge (incompatible), mod:toolswap, mod:wthit (incompatible)
	ModLauncher: 9.0.7+91+master.8569cdf
	ModLauncher launch target: forgeclient
	ModLauncher naming: srg
	ModLauncher services: 
		 eventbus PLUGINSERVICE 
		 object_holder_definalize PLUGINSERVICE 
		 runtime_enum_extender PLUGINSERVICE 
		 capability_inject_definalize PLUGINSERVICE 
		 accesstransformer PLUGINSERVICE 
		 runtimedistcleaner PLUGINSERVICE 
		 fml TRANSFORMATIONSERVICE 
	FML Language Providers: 
		[email protected]
		javafml@null
	Mod List: 
		client-1.17.1-20210706.113038-srg.jar             |Minecraft                     |minecraft                     |1.17.1              |DONE      |Manifest: NOSIGNATURE
		wthit-forge-3.8.1.jar                             |wthit                         |wthit                         |3.8.1               |DONE      |Manifest: NOSIGNATURE
		forge-1.17.1-37.0.34-universal.jar                |Forge                         |forge                         |37.0.34             |DONE      |Manifest: 22:af:21:d8:19:82:7f:93:94:fe:2b:ac:b7:e4:41:57:68:39:87:b1:a7:5c:c6:44:f9:25:74:21:14:f5:0d:90
		ToolSwap-2.1.0.jar                                |ToolSwap                      |toolswap                      |2.1.0               |DONE      |Manifest: NOSIGNATURE
	Crash Report UUID: 9c4ff7cd-cfe9-4180-ae18-991ffd94c6bf
	FML: 37.0
	Forge: net.minecraftforge:37.0.34
commented

Using Forge 37.0.30 should help for now.

commented

Thanks for the fix!