Mangonels / AntiXrayHeuristicsIssues

For tracking issues with AXH
2 stars 0 forks source link

[BUG] Getting errors in console. #3

Closed MidnightSugar closed 4 years ago

MidnightSugar commented 4 years ago

Server system: Paper Minecraft version: 1.15.1 Steps to reproduce the issue: Unsure at this point. Maybe the error can give some clues? Error log:


java.lang.IllegalArgumentException: Cannot measure distance between Main and ResourceWorld
at org.bukkit.Location.distanceSquared(Location.java:510) ~[patched_1.15.1.jar:git-Paper-42]
at org.bukkit.Location.distance(Location.java:493) ~[patched_1.15.1.jar:git-Paper-42]
at es.mithrandircraft.antixrayheuristics.AntiXrayHeuristics.UpdateMiningSession(AntiXrayHeuristics.java:263) ~[?:?]
at es.mithrandircraft.antixrayheuristics.AntiXrayHeuristics.BBEventAnalyzer(AntiXrayHeuristics.java:376) ~[?:?]
at es.mithrandircraft.antixrayheuristics.events.BlockBreakEv.blockBreakEvent(BlockBreakEv.java:24) ~[?:?]
at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor203.execute(Unknown Source) ~[?:?]
at org.bukkit.plugin.EventExecutor.lambda$create$1(EventExecutor.java:69) ~[patched_1.15.1.jar:git-Paper-42]
at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:80) ~[patched_1.15.1.jar:git-Paper-42]
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[patched_1.15.1.jar:git-Paper-42]
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:545) ~[patched_1.15.1.jar:git-Paper-42]
at net.minecraft.server.v1_15_R1.PlayerInteractManager.breakBlock(PlayerInteractManager.java:313) ~[patched_1.15.1.jar:git-Paper-42]
at net.minecraft.server.v1_15_R1.PlayerInteractManager.a(PlayerInteractManager.java:272) ~[patched_1.15.1.jar:git-Paper-42]
at net.minecraft.server.v1_15_R1.PlayerInteractManager.a(PlayerInteractManager.java:240) ~[patched_1.15.1.jar:git-Paper-42]
at net.minecraft.server.v1_15_R1.PlayerConnection.a(PlayerConnection.java:1319) ~[patched_1.15.1.jar:git-Paper-42]
at net.minecraft.server.v1_15_R1.PacketPlayInBlockDig.a(SourceFile:40) ~[patched_1.15.1.jar:git-Paper-42]
at net.minecraft.server.v1_15_R1.PacketPlayInBlockDig.a(SourceFile:10) ~[patched_1.15.1.jar:git-Paper-42]
at net.minecraft.server.v1_15_R1.PlayerConnectionUtils.lambda$ensureMainThread$0(PlayerConnectionUtils.java:23) ~[patched_1.15.1.jar:git-Paper-42]
at net.minecraft.server.v1_15_R1.TickTask.run(SourceFile:18) ~[patched_1.15.1.jar:git-Paper-42]
at net.minecraft.server.v1_15_R1.IAsyncTaskHandler.executeTask(IAsyncTaskHandler.java:136) ~[patched_1.15.1.jar:git-Paper-42]
at net.minecraft.server.v1_15_R1.IAsyncTaskHandlerReentrant.executeTask(SourceFile:23) ~[patched_1.15.1.jar:git-Paper-42]
at net.minecraft.server.v1_15_R1.IAsyncTaskHandler.executeNext(IAsyncTaskHandler.java:109) ~[patched_1.15.1.jar:git-Paper-42]
at net.minecraft.server.v1_15_R1.MinecraftServer.aZ(MinecraftServer.java:1037) ~[patched_1.15.1.jar:git-Paper-42]
at net.minecraft.server.v1_15_R1.MinecraftServer.executeNext(MinecraftServer.java:1030) ~[patched_1.15.1.jar:git-Paper-42]
at net.minecraft.server.v1_15_R1.IAsyncTaskHandler.awaitTasks(IAsyncTaskHandler.java:119) ~[patched_1.15.1.jar:git-Paper-42]
at net.minecraft.server.v1_15_R1.MinecraftServer.sleepForTick(MinecraftServer.java:1014) ~[patched_1.15.1.jar:git-Paper-42]
at net.minecraft.server.v1_15_R1.MinecraftServer.run(MinecraftServer.java:937) ~[patched_1.15.1.jar:git-Paper-42]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_212] ```
**Link to config.yml file on gist.github.com:** https://gist.github.com/MidnightSugar/000c52b3148bb6ec9d6d68dc218e1f9f
Mangonels commented 4 years ago

I had this reported on the discussion section. But it's nice that it got reported here (where it should be)

Just 2 things:

MidnightSugar commented 4 years ago

In the week I have had it the error has happened 88 times, and to 4 different people. I don't run a super large server, maybe 7-10 on at time a usually.

The first time it happened I had to disable the automatic inventory deletion feature because after it spammed console with these errors, it gave a false positive and deleted their inventory.

MidnightSugar commented 4 years ago

I have found a way to easily reproduce this error:

  1. Spawn in a bunch of diamond ore in two different worlds.
  2. Mine a bunch of diamond ore in one world, switch worlds, then start mining diamond in the second world.
Mangonels commented 4 years ago

Hey. That makes a lot of sense. The plugin is probably trying to compare distances between two diferent worlds. I'll take a look at it when I can. It's probably easy to fix.

Mangonels commented 4 years ago

Good news. I was actually intrigued enough by this error that I got to fix it in a few minutes. Try this build out: https://www.dropbox.com/s/ax70diyyfvo8zu2/AntiXrayHeuristics-1.3.1.jar?dl=0

Let me know if it fixes your issue.

Mangonels commented 4 years ago

I'm considering this matter solved. Since I've tested this on my own server and it doesn't seem to cause any issues. + Reopen if you encounter any problems.