diff --git a/src/main/java/meteordevelopment/meteorclient/commands/commands/LocateCommand.java b/src/main/java/meteordevelopment/meteorclient/commands/commands/LocateCommand.java index 0f1b139813..39a2bd0d9c 100644 --- a/src/main/java/meteordevelopment/meteorclient/commands/commands/LocateCommand.java +++ b/src/main/java/meteordevelopment/meteorclient/commands/commands/LocateCommand.java @@ -69,7 +69,8 @@ public class LocateCommand extends Command { Blocks.PURPUR_SLAB, Blocks.PURPUR_STAIRS, Blocks.END_STONE_BRICKS, - Blocks.END_ROD + Blocks.END_ROD, + Blocks.MAGENTA_STAINED_GLASS ); public LocateCommand() { diff --git a/src/main/java/meteordevelopment/meteorclient/commands/commands/NotebotCommand.java b/src/main/java/meteordevelopment/meteorclient/commands/commands/NotebotCommand.java index f826c7db38..b580e8bf8d 100644 --- a/src/main/java/meteordevelopment/meteorclient/commands/commands/NotebotCommand.java +++ b/src/main/java/meteordevelopment/meteorclient/commands/commands/NotebotCommand.java @@ -5,10 +5,19 @@ package meteordevelopment.meteorclient.commands.commands; +import java.io.FileWriter; +import java.io.IOException; +import java.nio.file.Path; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + import com.mojang.brigadier.arguments.StringArgumentType; import com.mojang.brigadier.builder.LiteralArgumentBuilder; import com.mojang.brigadier.exceptions.DynamicCommandExceptionType; import com.mojang.brigadier.exceptions.SimpleCommandExceptionType; + import meteordevelopment.meteorclient.MeteorClient; import meteordevelopment.meteorclient.commands.Command; import meteordevelopment.meteorclient.commands.arguments.NotebotSongArgumentType; @@ -25,14 +34,6 @@ import net.minecraft.text.Text; import net.minecraft.util.Util; -import java.io.FileWriter; -import java.io.IOException; -import java.nio.file.Path; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - public class NotebotCommand extends Command { private final static SimpleCommandExceptionType INVALID_SONG = new SimpleCommandExceptionType(Text.literal("Invalid song.")); private final static DynamicCommandExceptionType INVALID_PATH = new DynamicCommandExceptionType(object -> Text.literal("'%s' is not a valid path.".formatted(object))); @@ -162,20 +163,19 @@ private void saveRecording(Path path) { try { MeteorClient.EVENT_BUS.unsubscribe(this); - FileWriter file = new FileWriter(path.toFile()); - for (var entry : song.entrySet()) { - int tick = entry.getKey(); - List notes = entry.getValue(); + try (FileWriter file = new FileWriter(path.toFile())) { + for (var entry : song.entrySet()) { + int tick = entry.getKey(); + List notes = entry.getValue(); - for (var note : notes) { - NoteBlockInstrument instrument = note.getInstrument(); - int noteLevel = note.getNoteLevel(); + for (var note : notes) { + NoteBlockInstrument instrument = note.getInstrument(); + int noteLevel = note.getNoteLevel(); - file.write(String.format("%d:%d:%d\n", tick, noteLevel, instrument.ordinal())); + file.write(String.format("%d:%d:%d\n", tick, noteLevel, instrument.ordinal())); + } } } - - file.close(); info("Song saved."); } catch (IOException e) { info("Couldn't create the file."); diff --git a/src/main/java/meteordevelopment/meteorclient/commands/commands/ToggleCommand.java b/src/main/java/meteordevelopment/meteorclient/commands/commands/ToggleCommand.java index 0f58000c0d..ba8852cbbe 100644 --- a/src/main/java/meteordevelopment/meteorclient/commands/commands/ToggleCommand.java +++ b/src/main/java/meteordevelopment/meteorclient/commands/commands/ToggleCommand.java @@ -17,7 +17,7 @@ public class ToggleCommand extends Command { public ToggleCommand() { - super("toggle", "Toggles a module.", "t"); + super("toggle", "Toggles a module on or off.", "t"); } @Override diff --git a/src/main/java/meteordevelopment/meteorclient/settings/EnchantmentListSetting.java b/src/main/java/meteordevelopment/meteorclient/settings/EnchantmentListSetting.java index 295d39fb77..e02ab1ff45 100644 --- a/src/main/java/meteordevelopment/meteorclient/settings/EnchantmentListSetting.java +++ b/src/main/java/meteordevelopment/meteorclient/settings/EnchantmentListSetting.java @@ -32,7 +32,7 @@ public EnchantmentListSetting(String name, String description, Set(defaultValue); } - + //ench means enchantment. @Override protected Set> parseImpl(String str) { String[] values = str.split(","); diff --git a/src/main/java/meteordevelopment/meteorclient/settings/StorageBlockListSetting.java b/src/main/java/meteordevelopment/meteorclient/settings/StorageBlockListSetting.java index 36d9b39feb..bfab5342a4 100644 --- a/src/main/java/meteordevelopment/meteorclient/settings/StorageBlockListSetting.java +++ b/src/main/java/meteordevelopment/meteorclient/settings/StorageBlockListSetting.java @@ -47,6 +47,7 @@ public class StorageBlockListSetting extends Setting>> { BlockEntityType.SHULKER_BOX, BlockEntityType.SMOKER, BlockEntityType.TRAPPED_CHEST, + BlockEntityType.Lectern, }; public static final Registry> REGISTRY = new SRegistry(); diff --git a/src/main/java/meteordevelopment/meteorclient/utils/render/color/RainbowColor.java b/src/main/java/meteordevelopment/meteorclient/utils/render/color/RainbowColor.java index 857ebe3ac2..7e95aad6ee 100644 --- a/src/main/java/meteordevelopment/meteorclient/utils/render/color/RainbowColor.java +++ b/src/main/java/meteordevelopment/meteorclient/utils/render/color/RainbowColor.java @@ -2,7 +2,7 @@ * This file is part of the Meteor Client distribution (https://github.com/MeteorDevelopment/meteor-client). * Copyright (c) Meteor Development. */ - +//jeb_ package meteordevelopment.meteorclient.utils.render.color; public class RainbowColor extends Color {