stash-finder module

stash-finder: Minecraft 26.3 cheat module, full source for every implementation (1 client: Meteor Client).

1 implementationWorld

Clients with this module

Full module source: 1 implementation

Every implementation below is the complete module file, verbatim. Expand a client to read its code.

Meteor ClientWorldsrc/main/java/meteordevelopment/meteorclient/systems/modules/world/StashFinder.javaJava · 596 lines · 22.6 KB

Searches loaded chunks for storage blocks. Saves to <your minecraft folder>/meteor-client

Settingsstorage-blocksminimum-storage-countblacklisted-support-blocksminimum-distancenotificationsnotification-moderender-tracertracer-colortracer-hide-at-distancetracer-max-distancerender-chunk-columnchunk-column-colorclear-traces-bind
StashFinder.javaJava · Minecraft 26.2 · 596 lines · 22.6 KB · complete file, verbatimOriginal ↗
1
/*
2
 * This file is part of the Meteor Client distribution (https://github.com/MeteorDevelopment/meteor-client).
3
 * Copyright (c) Meteor Development.
4
 */
5
6
package meteordevelopment.meteorclient.systems.modules.world;
7
8
import com.google.common.reflect.TypeToken;
9
import com.google.gson.Gson;
10
import com.google.gson.GsonBuilder;
11
import meteordevelopment.meteorclient.MeteorClient;
12
import meteordevelopment.meteorclient.events.render.Render3DEvent;
13
import meteordevelopment.meteorclient.events.world.ChunkDataEvent;
14
import meteordevelopment.meteorclient.events.world.TickEvent;
15
import meteordevelopment.meteorclient.gui.GuiTheme;
16
import meteordevelopment.meteorclient.gui.WindowScreen;
17
import meteordevelopment.meteorclient.gui.widgets.WWidget;
18
import meteordevelopment.meteorclient.gui.widgets.containers.WHorizontalList;
19
import meteordevelopment.meteorclient.gui.widgets.containers.WTable;
20
import meteordevelopment.meteorclient.gui.widgets.containers.WVerticalList;
21
import meteordevelopment.meteorclient.gui.widgets.pressable.WButton;
22
import meteordevelopment.meteorclient.gui.widgets.pressable.WCheckbox;
23
import meteordevelopment.meteorclient.gui.widgets.pressable.WMinus;
24
import meteordevelopment.meteorclient.pathing.PathManagers;
25
import meteordevelopment.meteorclient.settings.*;
26
import meteordevelopment.meteorclient.systems.modules.Categories;
27
import meteordevelopment.meteorclient.systems.modules.Module;
28
import meteordevelopment.meteorclient.utils.Utils;
29
import meteordevelopment.meteorclient.utils.misc.Keybind;
30
import meteordevelopment.meteorclient.utils.misc.text.RunnableClickEvent;
31
import meteordevelopment.meteorclient.utils.player.ChatUtils;
32
import meteordevelopment.meteorclient.utils.render.MeteorToast;
33
import meteordevelopment.meteorclient.utils.render.RenderUtils;
34
import meteordevelopment.meteorclient.utils.render.color.SettingColor;
35
import meteordevelopment.orbit.EventHandler;
36
import net.minecraft.ChatFormatting;
37
import net.minecraft.core.BlockPos;
38
import net.minecraft.network.chat.Component;
39
import net.minecraft.network.chat.HoverEvent;
40
import net.minecraft.network.chat.MutableComponent;
41
import net.minecraft.network.chat.Style;
42
import net.minecraft.world.item.Items;
43
import net.minecraft.world.level.ChunkPos;
44
import net.minecraft.world.level.block.Block;
45
import net.minecraft.world.level.block.Blocks;
46
import net.minecraft.world.level.block.entity.*;
47
import net.minecraft.world.phys.Vec3;
48
import org.apache.commons.lang3.StringUtils;
49
50
import java.io.BufferedReader;
51
import java.io.BufferedWriter;
52
import java.io.IOException;
53
import java.nio.file.Files;
54
import java.nio.file.Path;
55
import java.util.*;
56
import java.util.function.ObjIntConsumer;
57
import java.util.function.ToIntFunction;
58
import java.util.stream.Collectors;
59
60
public class StashFinder extends Module {
61
    private final SettingGroup sgGeneral = settings.getDefaultGroup();
62
    private final SettingGroup sgRender = settings.createGroup("Render");
63
64
    private static final List<Block> DEFAULT_SUPPORT_BLOCK_BLACKLIST = List.of(
65
        Blocks.COPPER_BLOCK.weathering().oxidized(),
66
        Blocks.CUT_COPPER.weathering().oxidized(),
67
        Blocks.TUFF_BRICKS,
68
        Blocks.COPPER_BLOCK.waxed().unaffected(),
69
        Blocks.COPPER_BLOCK.waxed().oxidized(),
70
        Blocks.CUT_COPPER.waxed().oxidized(),
71
        Blocks.BARREL,
72
        Blocks.COPPER_BULB.waxed().unaffected()
73
    );
74
75
    private final Setting<List<BlockEntityType<?>>> storageBlocks = sgGeneral.add(new StorageBlockListSetting.Builder()
76
        .name("storage-blocks")
77
        .description("Select the storage blocks to search for.")
78
        .defaultValue(StorageBlockListSetting.STORAGE_BLOCKS)
79
        .build()
80
    );
81
82
    private final Setting<Integer> minimumStorageCount = sgGeneral.add(new IntSetting.Builder()
83
        .name("minimum-storage-count")
84
        .description("The minimum amount of storage blocks in a chunk to record the chunk.")
85
        .defaultValue(4)
86
        .min(1)
87
        .sliderMin(1)
88
        .build()
89
    );
90
91
    private final Setting<List<Block>> blacklistedBlocks = sgGeneral.add(new BlockListSetting.Builder()
92
        .name("blacklisted-support-blocks")
93
        .description("Blocks that prevent counting a storage block entity when it sits on them.")
94
        .defaultValue(DEFAULT_SUPPORT_BLOCK_BLACKLIST)
95
        .build()
96
    );
97
98
    private final Setting<Integer> minimumDistance = sgGeneral.add(new IntSetting.Builder()
99
        .name("minimum-distance")
100
        .description("The minimum distance you must be from spawn to record a certain chunk.")
101
        .defaultValue(0)
102
        .min(0)
103
        .sliderMax(10000)
104
        .build()
105
    );
106
107
    private final Setting<Boolean> sendNotifications = sgGeneral.add(new BoolSetting.Builder()
108
        .name("notifications")
109
        .description("Sends Minecraft notifications when new stashes are found.")
110
        .defaultValue(true)
111
        .build()
112
    );
113
114
    private final Setting<Mode> notificationMode = sgGeneral.add(new EnumSetting.Builder<Mode>()
115
        .name("notification-mode")
116
        .description("The mode to use for notifications.")
117
        .defaultValue(Mode.Both)
118
        .visible(sendNotifications::get)
119
        .build()
120
    );
121
122
    private final Setting<Boolean> renderTracer = sgRender.add(new BoolSetting.Builder()
123
        .name("render-tracer")
124
        .description("Renders a tracer to the last found stash.")
125
        .defaultValue(true)
126
        .build()
127
    );
128
129
    private final Setting<SettingColor> traceColor = sgRender.add(new ColorSetting.Builder()
130
        .name("tracer-color")
131
        .description("Color of the stash tracer.")
132
        .defaultValue(new SettingColor(255, 215, 0, 255))
133
        .visible(renderTracer::get)
134
        .build()
135
    );
136
137
    private final Setting<Integer> traceArrivalDistance = sgRender.add(new IntSetting.Builder()
138
        .name("tracer-hide-at-distance")
139
        .description("Hide the trace when you are this close to the stash.")
140
        .defaultValue(16)
141
        .min(1)
142
        .sliderMin(1)
143
        .sliderMax(50)
144
        .visible(renderTracer::get)
145
        .build()
146
    );
147
148
    private final Setting<Integer> traceMaxDistance = sgRender.add(new IntSetting.Builder()
149
        .name("tracer-max-distance")
150
        .description("Hide the trace when you are farther than this distance from the stash.")
151
        .defaultValue(2000)
152
        .min(10)
153
        .sliderMin(50)
154
        .sliderMax(10000)
155
        .visible(renderTracer::get)
156
        .build()
157
    );
158
159
    private final Setting<Boolean> renderChunkColumn = sgRender.add(new BoolSetting.Builder()
160
        .name("render-chunk-column")
161
        .description("Renders a vertical column at the center of traced chunks.")
162
        .defaultValue(false)
163
        .build()
164
    );
165
166
    private final Setting<SettingColor> traceColumnColor = sgRender.add(new ColorSetting.Builder()
167
        .name("chunk-column-color")
168
        .description("Color of the stash tracer column.")
169
        .defaultValue(new SettingColor(255, 215, 0, 100))
170
        .visible(renderChunkColumn::get)
171
        .build()
172
    );
173
174
    private final Setting<Keybind> clearTracesBind = sgRender.add(new KeybindSetting.Builder()
175
        .name("clear-traces-bind")
176
        .description("Keybind to clear all stash traces.")
177
        .defaultValue(Keybind.none())
178
        .build()
179
    );
180
181
    private static final Gson GSON = new GsonBuilder().setPrettyPrinting().create();
182
183
    private record CsvField(String name, ToIntFunction<Chunk> getter, ObjIntConsumer<Chunk> setter) {
184
        public CsvField(String name, ToIntFunction<Chunk> getter) {
185
            this(name, getter, null);
186
        }
187
    }
188
189
    private static final List<CsvField> CSV_FIELDS = List.of(
190
        new CsvField("x", c -> c.chunkPos.x()),
191
        new CsvField("z", c -> c.chunkPos.z()),
192
        new CsvField("chests", c -> c.chests, (c, v) -> c.chests = v),
193
        new CsvField("barrels", c -> c.barrels, (c, v) -> c.barrels = v),
194
        new CsvField("shulkers", c -> c.shulkers, (c, v) -> c.shulkers = v),
195
        new CsvField("enderChests", c -> c.enderChests, (c, v) -> c.enderChests = v),
196
        new CsvField("furnaces", c -> c.furnaces, (c, v) -> c.furnaces = v),
197
        new CsvField("dispensersDroppers", c -> c.dispensersDroppers, (c, v) -> c.dispensersDroppers = v),
198
        new CsvField("hoppers", c -> c.hoppers, (c, v) -> c.hoppers = v)
199
    );
200
201
    private final Map<ChunkPos, Vec3> tracerPositions = new HashMap<>();
202
    public List<Chunk> chunks = new ArrayList<>();
203
204
    public StashFinder() {
205
        super(Categories.World, "stash-finder", "Searches loaded chunks for storage blocks. Saves to <your minecraft folder>/meteor-client");
206
    }
207
208
    @Override
209
    public void onActivate() {
210
        load();
211
    }
212
213
    @EventHandler
214
    private void onTick(TickEvent.Post event) {
215
        if (!clearTracesBind.get().isPressed()) return;
216
        tracerPositions.clear();
217
    }
218
219
    @EventHandler
220
    private void onChunkData(ChunkDataEvent event) {
221
        // Check the distance.
222
        double chunkXAbs = Math.abs(event.chunk().getPos().x() * 16);
223
        double chunkZAbs = Math.abs(event.chunk().getPos().z() * 16);
224
        if (Math.sqrt(chunkXAbs * chunkXAbs + chunkZAbs * chunkZAbs) < minimumDistance.get()) return;
225
226
        Chunk chunk = new Chunk(event.chunk().getPos());
227
228
        List<Block> blockBlacklist = blacklistedBlocks.get();
229
230
        for (BlockEntity blockEntity : event.chunk().getBlockEntities().values()) {
231
            if (!storageBlocks.get().contains(blockEntity.getType())) continue;
232
233
            if (!blockBlacklist.isEmpty()) {
234
                BlockPos below = blockEntity.getBlockPos().below();
235
                if (blockBlacklist.contains(event.chunk().getBlockState(below).getBlock())) continue;
236
            }
237
238
            switch (blockEntity) {
239
                case ChestBlockEntity _ -> chunk.chests++;
240
                case BarrelBlockEntity _ -> chunk.barrels++;
241
                case ShulkerBoxBlockEntity _ -> chunk.shulkers++;
242
                case EnderChestBlockEntity _ -> chunk.enderChests++;
243
                case AbstractFurnaceBlockEntity _ -> chunk.furnaces++;
244
                case DispenserBlockEntity _ -> chunk.dispensersDroppers++;
245
                case HopperBlockEntity _ -> chunk.hoppers++;
246
                default -> {
247
                    // Do not track other block entities
248
                }
249
            }
250
        }
251
252
        if (chunk.getTotal() >= minimumStorageCount.get()) {
253
            Chunk prevChunk = null;
254
            int i = chunks.indexOf(chunk);
255
256
            if (i < 0) chunks.add(chunk);
257
            else prevChunk = chunks.set(i, chunk);
258
259
            if (renderTracer.get()) {
260
                double y = mc.player != null ? mc.player.getEyeY() : 0.0;
261
                tracerPositions.put(chunk.chunkPos, new Vec3(chunk.chunkPos.getMiddleBlockX(), y, chunk.chunkPos.getMiddleBlockZ()));
262
            }
263
264
            saveJson();
265
            saveCsv();
266
267
            if (sendNotifications.get() && (!chunk.equals(prevChunk) || !chunk.countsEqual(prevChunk))) {
268
                switch (notificationMode.get()) {
269
                    case Chat -> sendChatNotification(chunk);
270
                    case Toast -> {
271
                        MeteorToast toast = new MeteorToast.Builder(title).icon(Items.CHEST).text("Found Stash!").build();
272
                        mc.gui.toastManager().addToast(toast);
273
                    }
274
                    case Both -> {
275
                        sendChatNotification(chunk);
276
                        MeteorToast toast = new MeteorToast.Builder(title).icon(Items.CHEST).text("Found Stash!").build();
277
                        mc.gui.toastManager().addToast(toast);
278
                    }
279
                }
280
            }
281
        }
282
    }
283
284
    @Override
285
    public WWidget getWidget(GuiTheme theme) {
286
        // Sort
287
        chunks.sort(Comparator.comparingInt(value -> -value.getTotal()));
288
289
        WVerticalList list = theme.verticalList();
290
291
        // Clear buttons
292
        WHorizontalList hl = theme.horizontalList();
293
        WButton clear = hl.add(theme.button("Clear Chunks")).widget();
294
        WButton resetTracers = hl.add(theme.button("Reset Tracers")).widget();
295
296
        list.add(hl);
297
298
        WTable table = new WTable();
299
        if (!chunks.isEmpty()) list.add(table);
300
301
        clear.action = () -> {
302
            chunks.clear();
303
            table.clear();
304
            tracerPositions.clear();
305
        };
306
307
        resetTracers.action = () -> {
308
            table.clear();
309
            tracerPositions.clear();
310
            fillTable(theme, table);
311
        };
312
313
        // Chunks
314
        fillTable(theme, table);
315
316
        return list;
317
    }
318
319
    private void fillTable(GuiTheme theme, WTable table) {
320
        for (Chunk chunk : chunks) {
321
            table.add(theme.label("Pos: " + chunk.chunkPos.getMiddleBlockX() + ", " + chunk.chunkPos.getMiddleBlockZ())).padRight(10);
322
            table.add(theme.label("Total: " + chunk.getTotal())).padRight(10);
323
324
            WCheckbox visible = table.add(theme.checkbox(tracerPositions.containsKey(chunk.chunkPos))).widget();
325
            visible.action = () -> {
326
                if (visible.checked) {
327
                    double y = mc.player != null ? mc.player.getEyeY() : 0.0;
328
                    tracerPositions.put(chunk.chunkPos, new Vec3(chunk.chunkPos.getMiddleBlockX(), y, chunk.chunkPos.getMiddleBlockZ()));
329
                } else tracerPositions.remove(chunk.chunkPos);
330
            };
331
332
            WButton open = table.add(theme.button("Open")).widget();
333
            open.action = () -> mc.gui.setScreen(new ChunkScreen(theme, chunk));
334
335
            WButton gotoBtn = table.add(theme.button("Goto")).widget();
336
            gotoBtn.action = () -> PathManagers.get().moveTo(new BlockPos(chunk.chunkPos.getMiddleBlockX(), 0, chunk.chunkPos.getMiddleBlockZ()), true);
337
338
            WMinus delete = table.add(theme.minus()).widget();
339
            delete.action = () -> {
340
                if (chunks.remove(chunk)) {
341
                    tracerPositions.remove(chunk.chunkPos);
342
                    table.clear();
343
                    fillTable(theme, table);
344
345
                    saveJson();
346
                    saveCsv();
347
                }
348
            };
349
350
            table.row();
351
        }
352
    }
353
354
    private void load() {
355
        boolean loaded = false;
356
357
        // Try to load json
358
        Path jsonFile = getJsonFile();
359
        if (Files.exists(jsonFile)) {
360
            try (BufferedReader reader = Files.newBufferedReader(jsonFile)) {
361
                chunks = GSON.fromJson(reader, new TypeToken<List<Chunk>>() {
362
                }.getType());
363
                loaded = true;
364
            } catch (Exception _) {
365
                if (chunks == null) chunks = new ArrayList<>();
366
            }
367
        }
368
369
        // Try to load csv
370
        Path csvFile = getCsvFile();
371
        if (!loaded && Files.exists(csvFile)) {
372
            try (BufferedReader reader = Files.newBufferedReader(csvFile)) {
373
                reader.readLine(); // Skip header
374
375
                String line;
376
                while ((line = reader.readLine()) != null) {
377
                    String[] values = StringUtils.split(line, ',');
378
                    if (values.length != CSV_FIELDS.size()) {
379
                        throw new IllegalStateException("Invalid CSV row length: expected " + CSV_FIELDS.size() + ", got " + values.length);
380
                    }
381
382
                    Chunk chunk = new Chunk(new ChunkPos(Integer.parseInt(values[0]), Integer.parseInt(values[1])));
383
384
                    for (int i = 2; i < CSV_FIELDS.size(); i++) {
385
                        CSV_FIELDS.get(i).setter().accept(chunk, Integer.parseInt(values[i]));
386
                    }
387
388
                    chunks.add(chunk);
389
                }
390
            } catch (Exception _) {
391
                if (chunks == null) chunks = new ArrayList<>();
392
            }
393
        }
394
    }
395
396
    private void saveCsv() {
397
        try {
398
            Path csvFile = getCsvFile();
399
            Files.createDirectories(csvFile.getParent());
400
            try (BufferedWriter writer = Files.newBufferedWriter(csvFile)) {
401
                String header = CSV_FIELDS.stream()
402
                    .map(CsvField::name)
403
                    .collect(Collectors.joining(","));
404
                writer.write(header);
405
                writer.newLine();
406
                for (Chunk chunk : chunks) {
407
                    chunk.write(writer);
408
                }
409
            }
410
        } catch (IOException e) {
411
            MeteorClient.LOG.error("Error while writing the stash list to csv", e);
412
        }
413
    }
414
415
    private void saveJson() {
416
        try {
417
            Path jsonFile = getJsonFile();
418
            Files.createDirectories(jsonFile.getParent());
419
            try (BufferedWriter writer = Files.newBufferedWriter(jsonFile)) {
420
                GSON.toJson(chunks, writer);
421
            }
422
        } catch (IOException e) {
423
            MeteorClient.LOG.error("Error while writing the stash list to json", e);
424
        }
425
    }
426
427
    private Path getJsonFile() {
428
        return Path.of(MeteorClient.FOLDER.getPath(), "stashes", Utils.getFileWorldName(), "stashes.json");
429
    }
430
431
    private Path getCsvFile() {
432
        return Path.of(MeteorClient.FOLDER.getPath(), "stashes", Utils.getFileWorldName(), "stashes.csv");
433
    }
434
435
    @Override
436
    public String getInfoString() {
437
        return String.valueOf(chunks.size());
438
    }
439
440
    private void sendChatNotification(Chunk chunk) {
441
        MutableComponent coords = Component.literal(chunk.chunkPos.getMiddleBlockX() + ", " + chunk.chunkPos.getMiddleBlockZ())
442
            .setStyle(Style.EMPTY
443
                .withColor(ChatFormatting.WHITE)
444
                .applyFormat(ChatFormatting.UNDERLINE)
445
                .withHoverEvent(new HoverEvent.ShowText(Component.literal("Path to stash")))
446
                .withClickEvent(new RunnableClickEvent(() -> PathManagers.get().moveTo(new BlockPos(chunk.chunkPos.getMiddleBlockX(), 0, chunk.chunkPos.getMiddleBlockZ()), true))));
447
448
        MutableComponent message = Component.literal("Found stash at ")
449
            .withStyle(ChatFormatting.GRAY)
450
            .append(Component.literal("[").withStyle(ChatFormatting.GRAY))
451
            .append(coords)
452
            .append(Component.literal("]").withStyle(ChatFormatting.GRAY))
453
            .append(Component.literal(".").withStyle(ChatFormatting.GRAY));
454
455
        ChatUtils.sendMsg(message);
456
    }
457
458
    @EventHandler
459
    private void onRender3D(Render3DEvent event) {
460
        if (tracerPositions.isEmpty() || mc.player == null) return;
461
462
        double playerX = mc.player.getX();
463
        double playerZ = mc.player.getZ();
464
465
        tracerPositions.entrySet().removeIf(entry -> {
466
            Vec3 pos = entry.getValue();
467
            double horizontalDist = Math.hypot(pos.x - playerX, pos.z - playerZ);
468
            return horizontalDist <= traceArrivalDistance.get();
469
        });
470
471
        if (!renderTracer.get() && !renderChunkColumn.get()) return;
472
473
        for (Vec3 pos : tracerPositions.values()) {
474
            double horizontalDist = Math.hypot(pos.x - playerX, pos.z - playerZ);
475
            if (horizontalDist > traceMaxDistance.get()) continue;
476
477
            if (renderTracer.get()) {
478
                event.renderer.line(
479
                    RenderUtils.center.x, RenderUtils.center.y, RenderUtils.center.z, pos.x, mc.player.getEyeY(), pos.z, traceColor.get()
480
                );
481
            }
482
483
            if (renderChunkColumn.get()) {
484
                double x1 = pos.x - 0.5;
485
                double x2 = pos.x + 0.5;
486
                double z1 = pos.z - 0.5;
487
                double z2 = pos.z + 0.5;
488
489
                int bottomY = mc.level.getMinY();
490
                int topY = bottomY + mc.level.dimensionType().height();
491
492
                event.renderer.line(x1, bottomY, z1, x1, topY, z1, traceColumnColor.get());
493
                event.renderer.line(x1, bottomY, z2, x1, topY, z2, traceColumnColor.get());
494
                event.renderer.line(x2, bottomY, z1, x2, topY, z1, traceColumnColor.get());
495
                event.renderer.line(x2, bottomY, z2, x2, topY, z2, traceColumnColor.get());
496
            }
497
        }
498
    }
499
500
    public enum Mode {
501
        Chat,
502
        Toast,
503
        Both
504
    }
505
506
    public static class Chunk {
507
        public final ChunkPos chunkPos;
508
        public int chests, barrels, shulkers, enderChests, furnaces, dispensersDroppers, hoppers;
509
510
        public Chunk(ChunkPos chunkPos) {
511
            this.chunkPos = chunkPos;
512
        }
513
514
        public int getTotal() {
515
            return chests + barrels + shulkers + enderChests + furnaces + dispensersDroppers + hoppers;
516
        }
517
518
        public void write(BufferedWriter writer) throws IOException {
519
            String line = CSV_FIELDS.stream()
520
                .map(field -> String.valueOf(field.getter().applyAsInt(this)))
521
                .collect(Collectors.joining(","));
522
            writer.write(line);
523
            writer.newLine();
524
        }
525
526
        public boolean countsEqual(Chunk c) {
527
            if (c == null) return false;
528
            return chests == c.chests && barrels == c.barrels && shulkers == c.shulkers && enderChests == c.enderChests && furnaces == c.furnaces && dispensersDroppers == c.dispensersDroppers && hoppers == c.hoppers;
529
        }
530
531
        @Override
532
        public boolean equals(Object o) {
533
            if (this == o) return true;
534
            if (o == null || getClass() != o.getClass()) return false;
535
            Chunk chunk = (Chunk) o;
536
            return Objects.equals(chunkPos, chunk.chunkPos);
537
        }
538
539
        @Override
540
        public int hashCode() {
541
            return Objects.hash(chunkPos);
542
        }
543
    }
544
545
    private static class ChunkScreen extends WindowScreen {
546
        private final Chunk chunk;
547
548
        public ChunkScreen(GuiTheme theme, Chunk chunk) {
549
            super(theme, "Chunk at " + chunk.chunkPos.getMiddleBlockX() + ", " + chunk.chunkPos.getMiddleBlockZ());
550
551
            this.chunk = chunk;
552
        }
553
554
        @Override
555
        public void initWidgets() {
556
            WTable t = add(theme.table()).expandX().widget();
557
558
            // Total
559
            t.add(theme.label("Total:"));
560
            t.add(theme.label(chunk.getTotal() + ""));
561
            t.row();
562
563
            t.add(theme.horizontalSeparator()).expandX();
564
            t.row();
565
566
            // Separate
567
            t.add(theme.label("Chests:"));
568
            t.add(theme.label(chunk.chests + ""));
569
            t.row();
570
571
            t.add(theme.label("Barrels:"));
572
            t.add(theme.label(chunk.barrels + ""));
573
            t.row();
574
575
            t.add(theme.label("Shulkers:"));
576
            t.add(theme.label(chunk.shulkers + ""));
577
            t.row();
578
579
            t.add(theme.label("Ender Chests:"));
580
            t.add(theme.label(chunk.enderChests + ""));
581
            t.row();
582
583
            t.add(theme.label("Furnaces:"));
584
            t.add(theme.label(chunk.furnaces + ""));
585
            t.row();
586
587
            t.add(theme.label("Dispensers and droppers:"));
588
            t.add(theme.label(chunk.dispensersDroppers + ""));
589
            t.row();
590
591
            t.add(theme.label("Hoppers:"));
592
            t.add(theme.label(chunk.hoppers + ""));
593
        }
594
    }
595
}
596