|
11 | 11 | import java.util.ArrayList; |
12 | 12 | import java.util.Comparator; |
13 | 13 | import java.util.List; |
14 | | -import java.util.Map; |
15 | | -import java.util.concurrent.ConcurrentHashMap; |
16 | | -import java.util.concurrent.ConcurrentLinkedDeque; |
17 | | -import net.minecraft.core.BlockPos; |
18 | | -import net.minecraft.core.registries.BuiltInRegistries; |
19 | | -import net.minecraft.network.protocol.Packet; |
20 | | -import net.minecraft.network.protocol.game.ClientboundBlockUpdatePacket; |
21 | | -import net.minecraft.network.protocol.game.ClientboundSectionBlocksUpdatePacket; |
22 | | -import net.minecraft.world.level.block.state.BlockState; |
| 14 | +import java.util.Map; |
| 15 | +import java.util.concurrent.ConcurrentHashMap; |
| 16 | +import java.util.concurrent.ConcurrentLinkedDeque; |
| 17 | +import net.minecraft.core.BlockPos; |
| 18 | +import net.minecraft.core.registries.BuiltInRegistries; |
| 19 | +import net.minecraft.network.protocol.Packet; |
| 20 | +import net.minecraft.network.protocol.game.ClientboundBlockUpdatePacket; |
| 21 | +import net.minecraft.network.protocol.game.ClientboundSectionBlocksUpdatePacket; |
| 22 | +import net.minecraft.world.level.block.state.BlockState; |
23 | 23 | import net.minecraft.world.phys.AABB; |
24 | 24 | import net.minecraft.world.phys.Vec3; |
25 | 25 | import net.wurstclient.Category; |
@@ -58,10 +58,10 @@ public final class PlayerSonarHack extends Hack |
58 | 58 | private final SliderSetting tracerThickness = |
59 | 59 | new SliderSetting("Tracer thickness", 2, 0.5, 10, 0.1, |
60 | 60 | ValueDisplay.DECIMAL.withSuffix("px")); |
61 | | - private final CheckboxSetting detectRedstoneInteraction = |
62 | | - new CheckboxSetting("Detect redstone interaction", |
63 | | - "Also score powered/open/triggered/lit toggles as weaker hints.", |
64 | | - true); |
| 61 | + private final CheckboxSetting detectRedstoneInteraction = |
| 62 | + new CheckboxSetting("Detect redstone interaction", |
| 63 | + "Also score powered/open/triggered/lit toggles as weaker hints.", |
| 64 | + true); |
65 | 65 | private final CheckboxSetting chatAlerts = |
66 | 66 | new CheckboxSetting("Chat alerts", |
67 | 67 | "Show chat alerts when a block-change signal is detected.", true); |
@@ -93,10 +93,10 @@ public PlayerSonarHack() |
93 | 93 | setCategory(Category.RENDER); |
94 | 94 | addSetting(showBoxes); |
95 | 95 | addSetting(onlyBeyondPlayerEspRange); |
96 | | - addSetting(showTracers); |
97 | | - addSetting(tracerThickness); |
98 | | - addSetting(detectRedstoneInteraction); |
99 | | - addSetting(chatAlerts); |
| 96 | + addSetting(showTracers); |
| 97 | + addSetting(tracerThickness); |
| 98 | + addSetting(detectRedstoneInteraction); |
| 99 | + addSetting(chatAlerts); |
100 | 100 | addSetting(markerLifetimeSec); |
101 | 101 | addSetting(maxMarkers); |
102 | 102 | addSetting(placeColor); |
@@ -139,12 +139,12 @@ public void onReceivedPacket(PacketInputEvent event) |
139 | 139 | return; |
140 | 140 | } |
141 | 141 |
|
142 | | - if(packet instanceof ClientboundSectionBlocksUpdatePacket deltaUpdate) |
143 | | - { |
144 | | - deltaUpdate.runUpdates(this::handleBlockChange); |
145 | | - return; |
146 | | - } |
147 | | - } |
| 142 | + if(packet instanceof ClientboundSectionBlocksUpdatePacket deltaUpdate) |
| 143 | + { |
| 144 | + deltaUpdate.runUpdates(this::handleBlockChange); |
| 145 | + return; |
| 146 | + } |
| 147 | + } |
148 | 148 |
|
149 | 149 | private void handleBlockChange(BlockPos pos, BlockState newState) |
150 | 150 | { |
@@ -227,7 +227,7 @@ private boolean hasInteractiveFlip(BlockState oldState, BlockState newState) |
227 | 227 | return false; |
228 | 228 | } |
229 | 229 |
|
230 | | - private String getBlockId(BlockState state) |
| 230 | + private String getBlockId(BlockState state) |
231 | 231 | { |
232 | 232 | if(state == null) |
233 | 233 | return "minecraft:air"; |
@@ -390,14 +390,14 @@ public void onRender(PoseStack matrixStack, float partialTicks) |
390 | 390 |
|
391 | 391 | private int getColorForKind(String kind) |
392 | 392 | { |
393 | | - return switch(kind) |
394 | | - { |
395 | | - case "PLACE" -> placeColor.getColorI(220); |
396 | | - case "BREAK" -> breakColor.getColorI(220); |
397 | | - case "REDSTONE" -> redstoneColor.getColorI(220); |
398 | | - default -> placeColor.getColorI(220); |
399 | | - }; |
400 | | - } |
| 393 | + return switch(kind) |
| 394 | + { |
| 395 | + case "PLACE" -> placeColor.getColorI(220); |
| 396 | + case "BREAK" -> breakColor.getColorI(220); |
| 397 | + case "REDSTONE" -> redstoneColor.getColorI(220); |
| 398 | + default -> placeColor.getColorI(220); |
| 399 | + }; |
| 400 | + } |
401 | 401 |
|
402 | 402 | private boolean isBeyondPlayerEspRange(BlockPos pos) |
403 | 403 | { |
|
0 commit comments