|
13 | 13 | import com.mojang.brigadier.CommandDispatcher; |
14 | 14 | import com.mojang.brigadier.exceptions.CommandSyntaxException; |
15 | 15 | import com.mojang.datafixers.util.Pair; |
| 16 | +import dev.xpple.seedmapper.SeedMapper; |
16 | 17 | import dev.xpple.seedmapper.command.CommandExceptions; |
17 | 18 | import dev.xpple.seedmapper.command.CustomClientCommandSource; |
18 | 19 | import dev.xpple.seedmapper.config.Configs; |
19 | 20 | import dev.xpple.seedmapper.feature.OreTypes; |
20 | 21 | import dev.xpple.seedmapper.render.RenderManager; |
| 22 | +import dev.xpple.seedmapper.util.BaritoneIntegration; |
21 | 23 | import dev.xpple.seedmapper.util.ComponentUtils; |
22 | 24 | import dev.xpple.seedmapper.util.SeedIdentifier; |
23 | 25 | import dev.xpple.seedmapper.util.SpiralLoop; |
@@ -172,6 +174,9 @@ private static int highlightBlock(CustomClientCommandSource source, Pair<Integer |
172 | 174 | count[0] += blockOres.size(); |
173 | 175 | source.getClient().schedule(() -> { |
174 | 176 | RenderManager.drawBoxes(blockOres, colour); |
| 177 | + if (SeedMapper.BARITONE_AVAILABLE && Configs.AutoMine) { |
| 178 | + BaritoneIntegration.addGoals(blockOres); |
| 179 | + } |
175 | 180 | source.sendFeedback(Component.translatable("command.highlight.block.chunkSuccess", accent(String.valueOf(blockOres.size())), ComponentUtils.formatXZ(chunkX, chunkZ))); |
176 | 181 | }); |
177 | 182 |
|
@@ -232,6 +237,9 @@ private static int highlightOreVein(CustomClientCommandSource source, int chunkR |
232 | 237 | count[0] += positions.size(); |
233 | 238 | int colour = BLOCKS.values().stream().filter(pair -> Objects.equals(block, pair.getFirst())).findAny().orElseThrow().getSecond(); |
234 | 239 | RenderManager.drawBoxes(positions, colour); |
| 240 | + if (SeedMapper.BARITONE_AVAILABLE && Configs.AutoMine) { |
| 241 | + BaritoneIntegration.addGoals(positions); |
| 242 | + } |
235 | 243 | if (block == Cubiomes.RAW_COPPER_BLOCK() || block == Cubiomes.RAW_IRON_BLOCK()) { |
236 | 244 | source.getClient().schedule(() -> source.sendFeedback(Component.translatable("command.highlight.oreVein.rawBlocks", ComponentUtils.formatXYZCollection(positions)))); |
237 | 245 | } |
|
0 commit comments