Tree block don't always break in singleplayer, with speed multiplicand of 1
vahaala opened this issue ยท 6 comments
Describe the bug
I'm playing a stricte singleplayer world, and with this mod enabled, trees don't always break on the first try when I enable the "speed multiplicand" feature (on screenshot). It's basically like the thing mentioned in description of this option is happening in singleplayer too, just at random. Block breaks, I see and hear the animation, but nothing happens and tree log is still where it was, along with the entire tree.
It happens randomly but quite often - sometimes it works as intended on the first go, but more so it requires 2-3 attempts, which is annoying because of additional time spent cutting (and I don't like the "normal" speed for the whole tree, it feels cheaty to me). Tool durability and hunger isn't consumed when this bug appears.
Here's a screenshot of cutting options.
And also of my current mod list.
I've tried to pinpoint the cause to something, maybe block difference (being on higher/lower Y coord than the log being cut), or the tool type, durability, but it's none of these things, or at least none of them seem to have an effect on how often this bug appears. Could it be that it's just some random slight desync in Minecraft's internal workings that causes this? I've got no idea unfortunately.
Minecraft version
1.17.1
Fabric API version
0.37.1
Mod version
2.12.2
Relevant log output
No response
There could be a desync but seems kinda weird. Else it'd be happening with all the blocks. Even in single player there's actually a server and client part. Just that you host the server yourself.
The mention in the config description is a problem that happens if the configs on each end are different. Like the client says this block is broken in .5s, while the server it is in 1s. In your case this issue shouldn't happen are the client and server have the same mods with the same config.
I did change a tiny thing related to breaking speed in #180 maybe you can try the jar there and see if it helps or not, but I doubt it would.
I'll try to reproduce it.
The above stackstrace should be fixed in latest version already (#180).
[19:30:52] [Server thread/FATAL]: Error executing task on Server
java.util.ConcurrentModificationException: null
at Not Enough Crashes deobfuscated stack trace.(1.17+build.13) ~[?:?]
at java.util.HashMap.compute(HashMap.java:1321) ~[?:?]
at net.minecraft.block.AbstractBlock.handler$zli000$calcBlockBreakingDelta(AbstractBlock:532) ~[?:?]
at net.minecraft.block.AbstractBlock.calcBlockBreakingDelta(AbstractBlock:378) ~[?:?]
at net.minecraft.block.AbstractBlock$AbstractBlockState.calcBlockBreakingDelta(AbstractBlock:794) ~[?:?]
at net.minecraft.server.network.ServerPlayerInteractionManager.processBlockBreakingAction(ServerPlayerInteractionManager:168) ~[?:?]
at net.minecraft.server.network.ServerPlayNetworkHandler.onPlayerAction(ServerPlayNetworkHandler:1029) ~[?:?]
at net.minecraft.network.packet.c2s.play.PlayerActionC2SPacket.apply(PlayerActionC2SPacket:34) ~[?:?]
at net.minecraft.network.packet.c2s.play.PlayerActionC2SPacket.apply(PlayerActionC2SPacket:8) ~[?:?]
at net.minecraft.network.NetworkThreadUtils.method_11072(NetworkThreadUtils:21) ~[?:?]
at net.minecraft.server.ServerTask.run(ServerTask:18) ~[?:?]
at net.minecraft.util.thread.ThreadExecutor.executeTask(ThreadExecutor:151) ~[?:?]
at net.minecraft.util.thread.ReentrantThreadExecutor.executeTask(ReentrantThreadExecutor:23) ~[?:?]
at net.minecraft.server.MinecraftServer.executeTask(MinecraftServer:783) ~[intermediary-1.17.jar:?]
at net.minecraft.server.MinecraftServer.executeTask(MinecraftServer:167) ~[intermediary-1.17.jar:?]
at net.minecraft.util.thread.ThreadExecutor.runTask(ThreadExecutor:125) ~[?:?]
at net.minecraft.server.MinecraftServer.method_20415(MinecraftServer:765) ~[intermediary-1.17.jar:?]
at net.minecraft.server.MinecraftServer.runTask(MinecraftServer:759) ~[intermediary-1.17.jar:?]
at net.minecraft.util.thread.ThreadExecutor.runTasks(ThreadExecutor:134) ~[?:?]
at net.minecraft.server.MinecraftServer.method_16208(MinecraftServer:744) ~[intermediary-1.17.jar:?]
at net.minecraft.server.MinecraftServer.runServer(MinecraftServer:696) ~[intermediary-1.17.jar:?]
at net.minecraft.server.MinecraftServer.method_29739(MinecraftServer:274) ~[intermediary-1.17.jar:?]
at java.lang.Thread.run(Thread.java:831) [?:?]
^This is what logs say every time a tree fails to break when you complete breaking of block.
I have it configured to calculate time and damage of entire tree upon breaking 1 block.
Damage: 1
Speed multiplicand: 1.0
I've tested the newest release (2.12.3) in a creative world, but using /gamemode survival today. Went through 3 iron axes worth of durability (didn't have time for more sadly) on different types of trees, both vanilla and modded - Traverse to be specific, as well as different sizes of trees - 2x2 giant ones etc., and this particular issue didn't seem to appear even once. I think it can be safely marked as fixed.
Thank you for fixing it :) I really enjoy using your mod!