diff options
| author | HacktheTime <l4bg0jb7@duck.com> | 2023-10-04 20:38:16 +0200 | 
|---|---|---|
| committer | HacktheTime <l4bg0jb7@duck.com> | 2023-10-04 20:38:16 +0200 | 
| commit | 354abd2073e2b4f0d4be274fcb9639702dd292c2 (patch) | |
| tree | b3fee02f594c6088902650803841f41fc9c02e14 | |
| parent | a4aabb5cbd29fda0f8c6aeac867602528e4fd618 (diff) | |
| download | BBsentials-354abd2073e2b4f0d4be274fcb9639702dd292c2.tar.gz BBsentials-354abd2073e2b4f0d4be274fcb9639702dd292c2.tar.bz2 BBsentials-354abd2073e2b4f0d4be274fcb9639702dd292c2.zip | |
bug fixes
14 files changed, 133 insertions, 44 deletions
| diff --git a/run/saves/temp/DIM-1/data/raids.dat b/run/saves/temp/DIM-1/data/raids.datBinary files differ index 4be59f0..639bec4 100644 --- a/run/saves/temp/DIM-1/data/raids.dat +++ b/run/saves/temp/DIM-1/data/raids.dat diff --git a/run/saves/temp/DIM1/data/raids_end.dat b/run/saves/temp/DIM1/data/raids_end.datBinary files differ index 4be59f0..639bec4 100644 --- a/run/saves/temp/DIM1/data/raids_end.dat +++ b/run/saves/temp/DIM1/data/raids_end.dat diff --git a/run/saves/temp/advancements/4fa1228c-8dd6-47c4-8fe3-b04b580311b8.json b/run/saves/temp/advancements/4fa1228c-8dd6-47c4-8fe3-b04b580311b8.json index b587a48..92d3076 100644 --- a/run/saves/temp/advancements/4fa1228c-8dd6-47c4-8fe3-b04b580311b8.json +++ b/run/saves/temp/advancements/4fa1228c-8dd6-47c4-8fe3-b04b580311b8.json @@ -179,5 +179,107 @@      },      "done": true    }, -  "DataVersion": 3465 +  "minecraft:story/lava_bucket": { +    "criteria": { +      "lava_bucket": "2023-09-30 12:05:15 +0200" +    }, +    "done": true +  }, +  "minecraft:recipes/combat/bow": { +    "criteria": { +      "has_string": "2023-09-30 12:05:15 +0200" +    }, +    "done": true +  }, +  "minecraft:recipes/redstone/redstone_torch": { +    "criteria": { +      "has_redstone": "2023-09-30 12:05:15 +0200" +    }, +    "done": true +  }, +  "minecraft:recipes/tools/clock": { +    "criteria": { +      "has_redstone": "2023-09-30 12:05:15 +0200" +    }, +    "done": true +  }, +  "minecraft:recipes/redstone/dropper": { +    "criteria": { +      "has_redstone": "2023-09-30 12:05:15 +0200" +    }, +    "done": true +  }, +  "minecraft:recipes/tools/fishing_rod": { +    "criteria": { +      "has_string": "2023-09-30 12:05:15 +0200" +    }, +    "done": true +  }, +  "minecraft:recipes/redstone/trapped_chest": { +    "criteria": { +      "has_tripwire_hook": "2023-09-30 12:05:15 +0200" +    }, +    "done": true +  }, +  "minecraft:recipes/building_blocks/white_wool_from_string": { +    "criteria": { +      "has_string": "2023-09-30 12:05:15 +0200" +    }, +    "done": true +  }, +  "minecraft:recipes/redstone/redstone_block": { +    "criteria": { +      "has_redstone": "2023-09-30 12:05:15 +0200" +    }, +    "done": true +  }, +  "minecraft:recipes/redstone/tripwire_hook": { +    "criteria": { +      "has_string": "2023-09-30 12:05:15 +0200" +    }, +    "done": true +  }, +  "minecraft:recipes/combat/crossbow": { +    "criteria": { +      "has_string": "2023-09-30 12:05:15 +0200" +    }, +    "done": true +  }, +  "minecraft:recipes/decorations/candle": { +    "criteria": { +      "has_string": "2023-09-30 12:05:15 +0200" +    }, +    "done": true +  }, +  "minecraft:recipes/redstone/note_block": { +    "criteria": { +      "has_redstone": "2023-09-30 12:05:15 +0200" +    }, +    "done": true +  }, +  "minecraft:recipes/redstone/target": { +    "criteria": { +      "has_redstone": "2023-09-30 12:05:15 +0200" +    }, +    "done": true +  }, +  "minecraft:recipes/decorations/loom": { +    "criteria": { +      "has_string": "2023-09-30 12:05:15 +0200" +    }, +    "done": true +  }, +  "minecraft:recipes/tools/compass": { +    "criteria": { +      "has_redstone": "2023-09-30 12:05:15 +0200" +    }, +    "done": true +  }, +  "minecraft:recipes/redstone/piston": { +    "criteria": { +      "has_redstone": "2023-09-30 12:05:15 +0200" +    }, +    "done": true +  }, +  "DataVersion": 3578  }
\ No newline at end of file diff --git a/run/saves/temp/level.dat_old b/run/saves/temp/level.dat_oldBinary files differ index 0a3b43a..e9fae31 100644 --- a/run/saves/temp/level.dat_old +++ b/run/saves/temp/level.dat_old diff --git a/run/saves/temp/playerdata/4fa1228c-8dd6-47c4-8fe3-b04b580311b8.dat b/run/saves/temp/playerdata/4fa1228c-8dd6-47c4-8fe3-b04b580311b8.datBinary files differ index 352d4c3..eacdf58 100644 --- a/run/saves/temp/playerdata/4fa1228c-8dd6-47c4-8fe3-b04b580311b8.dat +++ b/run/saves/temp/playerdata/4fa1228c-8dd6-47c4-8fe3-b04b580311b8.dat diff --git a/run/saves/temp/playerdata/4fa1228c-8dd6-47c4-8fe3-b04b580311b8.dat_old b/run/saves/temp/playerdata/4fa1228c-8dd6-47c4-8fe3-b04b580311b8.dat_oldBinary files differ index 352d4c3..510143a 100644 --- a/run/saves/temp/playerdata/4fa1228c-8dd6-47c4-8fe3-b04b580311b8.dat_old +++ b/run/saves/temp/playerdata/4fa1228c-8dd6-47c4-8fe3-b04b580311b8.dat_old diff --git a/run/saves/temp/region/r.-1.0.mca b/run/saves/temp/region/r.-1.0.mcaBinary files differ index aca25c0..536d239 100644 --- a/run/saves/temp/region/r.-1.0.mca +++ b/run/saves/temp/region/r.-1.0.mca diff --git a/run/saves/temp/region/r.0.0.mca b/run/saves/temp/region/r.0.0.mcaBinary files differ index 96a9a52..a29f63a 100644 --- a/run/saves/temp/region/r.0.0.mca +++ b/run/saves/temp/region/r.0.0.mca diff --git a/src/main/java/de/hype/bbsentials/chat/Chat.java b/src/main/java/de/hype/bbsentials/chat/Chat.java index 73c2ad5..454b637 100644 --- a/src/main/java/de/hype/bbsentials/chat/Chat.java +++ b/src/main/java/de/hype/bbsentials/chat/Chat.java @@ -167,6 +167,7 @@ public class Chat {      //Handle in client      public Text handleInClient(Text messageOriginal) {          String message = messageOriginal.getString().trim(); +        String messageUnformatted = message.replaceAll("§.","");          if (getConfig().messageFromAlreadyReported(message) && getPlayerNameFromMessage(message) != " " && getPlayerNameFromMessage(message) != "") {              System.out.println("Message: " + message);              sendPrivateMessageToSelfBase(Formatting.RED + "B: " + message); @@ -295,7 +296,7 @@ public class Chat {              else if (message.contains("[OPEN MENU]") || message.contains("[YES]")) {                  setChatPromtId(messageOriginal.toString());              } -            else if (message.startsWith("BUFF! You splashed yourself with")){ +            else if (messageUnformatted.startsWith("BUFF! You splashed yourself with")){                  if (splashStatusUpdateListener!=null){                      splashStatusUpdateListener.setStatus(SplashUpdatePacket.STATUS_SPLASHING);                  } diff --git a/src/main/java/de/hype/bbsentials/client/BBsentials.java b/src/main/java/de/hype/bbsentials/client/BBsentials.java index ee7c6b1..63dc8f1 100644 --- a/src/main/java/de/hype/bbsentials/client/BBsentials.java +++ b/src/main/java/de/hype/bbsentials/client/BBsentials.java @@ -46,6 +46,7 @@ public class BBsentials implements ClientModInitializer {      /**       * Checks if still connected to the Server. +     *       * @return true if it connected; false if old connection is kept.       */      public static boolean conditionalReconnectToBBserver() { @@ -233,7 +234,12 @@ public class BBsentials implements ClientModInitializer {          KeyBinding craftKeyBind = new KeyBinding("Craft", InputUtil.Type.KEYSYM, GLFW.GLFW_KEY_V, "BBsentials");          KeyBindingHelper.registerKeyBinding(craftKeyBind);          ClientTickEvents.END_CLIENT_TICK.register(client -> { -            if (craftKeyBind.wasPressed()) Chat.sendCommand("/craft"); +            if (craftKeyBind.wasPressed()) MinecraftClient.getInstance().getNetworkHandler().sendChatMessage("/craft"); +        }); +        KeyBinding petKeyBind = new KeyBinding("Open Pet Menu", InputUtil.Type.KEYSYM,  -1, "BBsentials"); +        KeyBindingHelper.registerKeyBinding(petKeyBind); +        ClientTickEvents.END_CLIENT_TICK.register(client -> { +            if (petKeyBind.wasPressed()) MinecraftClient.getInstance().getNetworkHandler().sendChatMessage("/pets");          });          for (int i = 1; i <= 9; i++) {              KeyBinding ecPageKeyBind = new KeyBinding("Ender Chest Page " + i, InputUtil.Type.KEYSYM, GLFW.GLFW_KEY_KP_1 + (i - 1), "BBsentials"); diff --git a/src/main/java/de/hype/bbsentials/client/DebugThread.java b/src/main/java/de/hype/bbsentials/client/DebugThread.java index fe5e583..3c853c2 100644 --- a/src/main/java/de/hype/bbsentials/client/DebugThread.java +++ b/src/main/java/de/hype/bbsentials/client/DebugThread.java @@ -10,7 +10,7 @@ public class DebugThread implements Runnable {      @Override      public void run() { -        loop(); +         loop();          //place a breakpoint for only this thread here.      } diff --git a/src/main/java/de/hype/bbsentials/client/SplashStatusUpdateListener.java b/src/main/java/de/hype/bbsentials/client/SplashStatusUpdateListener.java index 2463c79..95caab8 100644 --- a/src/main/java/de/hype/bbsentials/client/SplashStatusUpdateListener.java +++ b/src/main/java/de/hype/bbsentials/client/SplashStatusUpdateListener.java @@ -55,8 +55,8 @@ public class SplashStatusUpdateListener implements Runnable {      public void setStatus(String newStatus) {          this.newStatus = newStatus;          if (newStatus.equals(SplashUpdatePacket.STATUS_SPLASHING)) { +            splashed=true;              executionService.schedule(() -> { -                splashed=true;                  setStatus(SplashUpdatePacket.STATUS_DONE);                  splashLobby = false;              }, 1, TimeUnit.MINUTES); diff --git a/src/main/java/de/hype/bbsentials/communication/BBsentialConnection.java b/src/main/java/de/hype/bbsentials/communication/BBsentialConnection.java index e6e5096..acaed15 100644 --- a/src/main/java/de/hype/bbsentials/communication/BBsentialConnection.java +++ b/src/main/java/de/hype/bbsentials/communication/BBsentialConnection.java @@ -261,36 +261,6 @@ public class BBsentialConnection {                      }                      sendPacket(new RequestConnectPacket(MinecraftClient.getInstance().player.getUuid().toString().replace("-", ""), BBsentials.getConfig().getApiKey(), BBsentials.getConfig().getApiVersion(), AuthenticationConstants.DATABASE));                  } -                else if (message.contains("H-potdurations?")) { -                    sendHiddenMessage("?potduration " + getPotTime()); -                } -//            else if (message.startsWith("H-reconnect")) { -//                Chat.sendPrivateMessageToSelf("§4BBserver-online is going to restart soon. You will be automatically reconnected.\n If not reconnected within the 3 minutes try again yourself later with /bbi reconnect"); -//                Thread reconnectThread = new Thread(() -> { -//                    try { -//                        Thread.sleep((long) ((30 * 1000) + (Math.random() * 30 * 1000))); -//                    } catch (InterruptedException e) { -//                        e.printStackTrace(); -//                    } -//                    BBsentials.connectToBBserver(); -//                    if (!socket.isConnected()) { -//                        try { -//                            Thread.sleep((long) ((30 * 1000) + (Math.random() * 30 * 1000))); -//                        } catch (InterruptedException e) { -//                            e.printStackTrace(); -//                        } -//                        BBsentials.connectToBBserver(); -//                    } -//                }); -//                reconnectThread.start(); -//            } -                else if (message.startsWith("H-hype")) { -                    String[] arguments = message.replace("H-hype", "").trim().split(" "); - -                } -                if (BBsentials.getConfig().isDetailedDevModeEnabled()) { -                    Chat.sendPrivateMessageToSelfDebug("BBDev-r: " + message); -                }              }              else {                  Chat.sendPrivateMessageToSelfSuccess("BB: " + message); @@ -345,6 +315,7 @@ public class BBsentialConnection {      public void onSplashNotifyPacket(SplashNotifyPacket packet) {          int waitTime;          if (packet.splasherUsername.equals(config.getUsername())) { +            Chat.sendPrivateMessageToSelfInfo("The Splash Update Statuses will be updatet automatically for you. If you need to do something manually go into Discord Splash Dashboard");              SplashStatusUpdateListener splashStatusUpdateListener = new SplashStatusUpdateListener(this, packet);              BBsentials.splashStatusUpdateListener = splashStatusUpdateListener;              executionService.execute(splashStatusUpdateListener); @@ -387,7 +358,7 @@ public class BBsentialConnection {      }      public void onMiningEventPacket(MiningEventPacket packet) { -        if (config.toDisplayConfig.getValue("disableAll")) { +        if (!config.toDisplayConfig.getValue("disableAll")) {              //its will returns false cause disabled is checked already before.              if (config.toDisplayConfig.blockChEvents && packet.island.equals(Islands.CRYSTAL_HOLLOWS)) return;              if (packet.event.equals(MiningEvents.RAFFLE)) { @@ -492,15 +463,22 @@ public class BBsentialConnection {          else if (packet.command.equals(InternalCommandPacket.CRASH)) {              Chat.sendPrivateMessageToSelfFatal("BB: Stopping in 10 seconds.");              if (!packet.parameters[0].isEmpty()) Chat.sendPrivateMessageToSelfFatal("Reason: " + packet.parameters[0]); -            playsound(SoundEvents.BLOCK_ANVIL_BREAK); -            for (int i = 0; i < 10; i++) { -                int finalI = i; -                executionService.schedule(() -> Chat.sendPrivateMessageToSelfFatal("BB: Time till crash: " + finalI), i, TimeUnit.SECONDS); -            } -            throw new RuntimeException("BBsentials: Crash triggered"); +            Thread crashThread = new Thread(() -> { +                playsound(SoundEvents.BLOCK_ANVIL_BREAK); +                for (int i = 10; i >= 0; i--) { +                    Chat.sendPrivateMessageToSelfFatal("BB: Time till crash: " + i); +                    try { +                        Thread.sleep(1000); +                    } catch (InterruptedException ignored) { +                    } +                } +                System.exit(69); +            }); +            crashThread.start();          }          else if (packet.command.equals(InternalCommandPacket.INSTACRASH)) { -            throw new RuntimeException("BBsentials: InstaCrash triggered"); +            System.out.println("BBsentials: InstaCrash triggered"); +            System.exit(69);          }      } diff --git a/src/main/java/de/hype/bbsentials/packets/PacketUtils.java b/src/main/java/de/hype/bbsentials/packets/PacketUtils.java index 8dcd4d7..35ac13a 100644 --- a/src/main/java/de/hype/bbsentials/packets/PacketUtils.java +++ b/src/main/java/de/hype/bbsentials/packets/PacketUtils.java @@ -113,7 +113,9 @@ public class PacketUtils {                  if (BBsentials.getConfig().isDetailedDevModeEnabled()) Chat.sendPrivateMessageToSelfDebug(packetName+":"+rawJson);                  tryToProcessPacket(packet, rawJson);                  return true; -            } catch (Throwable t) { +            }catch (RuntimeException e){ +                throw e; +            }catch (Exception t) {                  showError(t, "Could not process packet '" + packetName + "' from " + EnviromentPacketConfig.notEnviroment);              }          } | 
