diff --git a/build.gradle b/build.gradle index 16e1d2a..50aa708 100644 --- a/build.gradle +++ b/build.gradle @@ -1,5 +1,5 @@ plugins { - id 'fabric-loom' version '1.0-SNAPSHOT' + id 'fabric-loom' version '1.2-SNAPSHOT' id 'maven-publish' } @@ -10,16 +10,6 @@ archivesBaseName = project.archives_base_name version = project.mod_version group = project.maven_group -repositories { - // Add repositories to retrieve artifacts from in here. - // You should only use this when depending on other mods because - // Loom adds the essential maven repositories to download Minecraft and libraries from automatically. - // See https://docs.gradle.org/current/userguide/declaring_repositories.html - // for more information about repositories. - - mavenCentral() -} - dependencies { implementation 'org.apache.commons:commons-text:1.10.0' // Use the version that best suits your project @@ -31,9 +21,9 @@ dependencies { // Fabric API. This is technically optional, but you probably want it anyway. modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}" - modImplementation include("net.kyori:adventure-platform-fabric:5.8.0") // for Minecraft 1.19.4 + modImplementation include("net.kyori:adventure-platform-fabric:5.8.0") // still works on 1.20.1 - modImplementation include("net.kyori:adventure-text-serializer-legacy:4.13.1") + modImplementation include("net.kyori:adventure-text-serializer-legacy:4.14.0") modImplementation include("org.luaj:luaj-jse:3.0.1") @@ -42,11 +32,11 @@ dependencies { // modImplementation "net.fabricmc.fabric-api:fabric-api-deprecated:${project.fabric_version}" - compileOnly 'org.projectlombok:lombok:1.18.24' - annotationProcessor 'org.projectlombok:lombok:1.18.24' + compileOnly 'org.projectlombok:lombok:1.18.28' + annotationProcessor 'org.projectlombok:lombok:1.18.28' - testCompileOnly 'org.projectlombok:lombok:1.18.24' - testAnnotationProcessor 'org.projectlombok:lombok:1.18.24' + testCompileOnly 'org.projectlombok:lombok:1.18.28' + testAnnotationProcessor 'org.projectlombok:lombok:1.18.28' } processResources { @@ -62,32 +52,8 @@ tasks.withType(JavaCompile).configureEach { it.options.release = 17 } -java { - // Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task - // if it is present. - // If you remove this line, sources will not be generated. - withSourcesJar() -} - jar { from("LICENSE") { rename { "${it}_${project.archivesBaseName}"} } } - -// configure the maven publication -publishing { - publications { - mavenJava(MavenPublication) { - from components.java - } - } - - // See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing. - repositories { - // Add repositories to publish to here. - // Notice: This block does NOT have the same function as the block in the top level. - // The repositories here will be used for publishing your artifact, not for - // retrieving dependencies. - } -} diff --git a/gradle.properties b/gradle.properties index 2416e6f..c3aff69 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,9 +4,9 @@ org.gradle.parallel=true # Fabric Properties # check these on https://fabricmc.net/develop - minecraft_version=1.19.4 - yarn_mappings=1.19.4+build.2 - loader_version=0.14.19 + minecraft_version=1.20.1 + yarn_mappings=1.20.1+build.9 + loader_version=0.14.21 # Mod Properties mod_version = 1.0.1 @@ -14,5 +14,5 @@ org.gradle.parallel=true archives_base_name = chipmunkmod # Dependencies - fabric_version=0.81.1+1.19.4 + fabric_version=0.84.0+1.20.1 diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 943f0cb..033e24c 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index f398c33..62f495d 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,7 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip networkTimeout=10000 +validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index 65dcd68..fcb6fca 100755 --- a/gradlew +++ b/gradlew @@ -85,9 +85,6 @@ done APP_BASE_NAME=${0##*/} APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' - # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum @@ -133,10 +130,13 @@ location of your Java installation." fi else JAVACMD=java - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + if ! command -v java >/dev/null 2>&1 + then + die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_HOME variable in your environment to match the location of your Java installation." + fi fi # Increase the maximum file descriptors if we can. @@ -144,7 +144,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then case $MAX_FD in #( max*) # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 + # shellcheck disable=SC3045 MAX_FD=$( ulimit -H -n ) || warn "Could not query maximum file descriptor limit" esac @@ -152,7 +152,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then '' | soft) :;; #( *) # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 + # shellcheck disable=SC3045 ulimit -n "$MAX_FD" || warn "Could not set maximum file descriptor limit to $MAX_FD" esac @@ -197,6 +197,10 @@ if "$cygwin" || "$msys" ; then done fi + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + # Collect all arguments for the java command; # * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of # shell script including quotes and variable substitutions, so put them in diff --git a/src/main/java/land/chipmunk/chipmunkmod/commands/UsernameCommand.java b/src/main/java/land/chipmunk/chipmunkmod/commands/UsernameCommand.java index 39eed34..f91a413 100644 --- a/src/main/java/land/chipmunk/chipmunkmod/commands/UsernameCommand.java +++ b/src/main/java/land/chipmunk/chipmunkmod/commands/UsernameCommand.java @@ -56,7 +56,7 @@ public class UsernameCommand { final ServerInfo info = client.getCurrentServerEntry(); client.world.disconnect(); client.disconnect(); - ConnectScreen.connect(new MultiplayerScreen(new TitleScreen()), client, ServerAddress.parse(info.address), info); + ConnectScreen.connect(new MultiplayerScreen(new TitleScreen()), client, ServerAddress.parse(info.address), info, false); return Command.SINGLE_SUCCESS; } diff --git a/src/main/java/land/chipmunk/chipmunkmod/mixin/KeyboardMixin.java b/src/main/java/land/chipmunk/chipmunkmod/mixin/KeyboardMixin.java index 639bc66..dc86edd 100644 --- a/src/main/java/land/chipmunk/chipmunkmod/mixin/KeyboardMixin.java +++ b/src/main/java/land/chipmunk/chipmunkmod/mixin/KeyboardMixin.java @@ -1,11 +1,17 @@ package land.chipmunk.chipmunkmod.mixin; import land.chipmunk.chipmunkmod.testclient.modules.antip2w.DelayPacketsModule; +import land.chipmunk.chipmunkmod.testclient.modules.utility.GuiMoveModule; import net.minecraft.client.Keyboard; +import net.minecraft.client.MinecraftClient; +import net.minecraft.client.gui.screen.Screen; import org.lwjgl.glfw.GLFW; +import org.objectweb.asm.Opcodes; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; +import org.spongepowered.asm.mixin.injection.Redirect; +import org.spongepowered.asm.mixin.injection.Slice; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; @Mixin(Keyboard.class) @@ -20,4 +26,20 @@ public class KeyboardMixin { ci.cancel(); } } + + // Don't @ me. It half-works + @Redirect(method = "onKey(JIIII)V", + at = @At(value = "FIELD", target = "Lnet/minecraft/client/MinecraftClient;currentScreen:Lnet/minecraft/client/gui/screen/Screen;", opcode = Opcodes.GETFIELD), + slice = @Slice( + from = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/screen/Screen;wrapScreenError(Ljava/lang/Runnable;Ljava/lang/String;Ljava/lang/String;)V"), + to = @At(value = "INVOKE", target = "Lnet/minecraft/client/util/InputUtil;fromKeyCode(II)Lnet/minecraft/client/util/InputUtil$Key;") + ) + ) + private Screen currentScreen(MinecraftClient instance) { + if (GuiMoveModule.instance.isEnabled) { + return null; + } else { + return instance.currentScreen; + } + } } diff --git a/src/main/java/land/chipmunk/chipmunkmod/mixin/TitleScreenMixin.java b/src/main/java/land/chipmunk/chipmunkmod/mixin/TitleScreenMixin.java index 8c734c3..122e9d6 100644 --- a/src/main/java/land/chipmunk/chipmunkmod/mixin/TitleScreenMixin.java +++ b/src/main/java/land/chipmunk/chipmunkmod/mixin/TitleScreenMixin.java @@ -1,6 +1,7 @@ package land.chipmunk.chipmunkmod.mixin; import land.chipmunk.chipmunkmod.testclient.gui.Gui; +import net.minecraft.client.gui.screen.SplashTextRenderer; import net.minecraft.client.gui.screen.TitleScreen; import org.jetbrains.annotations.Nullable; import org.spongepowered.asm.mixin.Mixin; @@ -11,11 +12,11 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; @Mixin(TitleScreen.class) public class TitleScreenMixin { - @Shadow @Nullable private String splashText; + private SplashTextRenderer splashText; @Inject(method = "init", at = @At("HEAD")) void testclient$initializeGui(CallbackInfo ci) { - splashText = "owo"; + splashText = new SplashTextRenderer("uwu"); if(Gui.gui == null){ Gui.initAutoRefresher(); Gui.addComponents(); diff --git a/src/main/java/land/chipmunk/chipmunkmod/testclient/gui/Gui.java b/src/main/java/land/chipmunk/chipmunkmod/testclient/gui/Gui.java index 642fee7..8f4c576 100644 --- a/src/main/java/land/chipmunk/chipmunkmod/testclient/gui/Gui.java +++ b/src/main/java/land/chipmunk/chipmunkmod/testclient/gui/Gui.java @@ -15,6 +15,7 @@ import land.chipmunk.chipmunkmod.testclient.modules.utility.AutoToolsModule; import land.chipmunk.chipmunkmod.testclient.modules.utility.BlockGuardianParticlesModule; import land.chipmunk.chipmunkmod.testclient.modules.utility.GuiMoveModule; import net.minecraft.client.MinecraftClient; +import net.minecraft.client.gui.DrawContext; import net.minecraft.client.gui.Drawable; import net.minecraft.client.gui.Element; import net.minecraft.client.gui.Selectable; @@ -79,10 +80,10 @@ public class Gui extends Screen{ }); } - public void render(MatrixStack matrices, int mouseX, int mouseY, float delta) { + public void render(DrawContext context, int mouseX, int mouseY, float delta) { // this.renderBackground(matrices); - super.render(matrices, mouseX, mouseY, delta); + super.render(context, mouseX, mouseY, delta); } public static void open() { @@ -181,7 +182,7 @@ public class Gui extends Screen{ .withModule(AutoToolsModule.instance) .withModule(AntiVoidModule.instance) .withModule(BlockGuardianParticlesModule.instance) - .withModule(new GuiMoveModule()) + .withModule(GuiMoveModule.instance) .withModule(AntiChatSpamModule.instance) .register(); new Category("OP") diff --git a/src/main/java/land/chipmunk/chipmunkmod/testclient/gui/OptionsScreen.java b/src/main/java/land/chipmunk/chipmunkmod/testclient/gui/OptionsScreen.java index 974c0e4..1d8dbd8 100644 --- a/src/main/java/land/chipmunk/chipmunkmod/testclient/gui/OptionsScreen.java +++ b/src/main/java/land/chipmunk/chipmunkmod/testclient/gui/OptionsScreen.java @@ -3,6 +3,7 @@ package land.chipmunk.chipmunkmod.testclient.gui; import land.chipmunk.chipmunkmod.testclient.gui.components.Option; import land.chipmunk.chipmunkmod.testclient.gui.components.Module; import net.minecraft.client.MinecraftClient; +import net.minecraft.client.gui.DrawContext; import net.minecraft.client.gui.screen.Screen; import net.minecraft.client.util.math.MatrixStack; @@ -21,24 +22,24 @@ public class OptionsScreen extends Screen { } @Override - public void render(MatrixStack matrices, int mouseX, int mouseY, float delta) { - fill(matrices, 40, 40, width-40, height-40, backgroundColor); + public void render(DrawContext context, int mouseX, int mouseY, float delta) { + context.fill(40, 40, width-40, height-40, backgroundColor); int textWidth = MinecraftClient.getInstance().textRenderer.getWidth(getTitle()); AtomicInteger lineY = new AtomicInteger(70); AtomicInteger textY = new AtomicInteger(50); - - drawTextWithShadow(matrices, MinecraftClient.getInstance().textRenderer, getTitle(), width/2 - textWidth/2, 50, 0xFFFFFFFF); - fill(matrices, 45, lineY.get()-1, width-45, lineY.get(), 0x33FFFFFF); + + context.drawTextWithShadow(MinecraftClient.getInstance().textRenderer, getTitle(), width/2 - textWidth/2, 50, 0xFFFFFFFF); + context.fill(45, lineY.get()-1, width-45, lineY.get(), 0x33FFFFFF); for (Option option : optionList) { lineY.addAndGet(30); - drawTextWithShadow(matrices, MinecraftClient.getInstance().textRenderer, option.name, 50, textY.addAndGet(30), 0xFFFFFFFF); - fill(matrices, 45, lineY.get()-1, width-45, lineY.get(), 0x33FFFFFF); + context.drawTextWithShadow(MinecraftClient.getInstance().textRenderer, option.name, 50, textY.addAndGet(30), 0xFFFFFFFF); + context.fill(45, lineY.get()-1, width-45, lineY.get(), 0x33FFFFFF); // drawHorizontalLine(matrices, 45, width-45, lineY.addAndGet(30), 0x33FFFFFF); option.widget.setX(width - 50 - option.widget.getWidth()); option.widget.setY(textY.get() - ((option.widget.getHeight()-9)/2)); } - super.render(matrices, mouseX, mouseY, delta); + super.render(context, mouseX, mouseY, delta); } } diff --git a/src/main/java/land/chipmunk/chipmunkmod/testclient/gui/components/Category.java b/src/main/java/land/chipmunk/chipmunkmod/testclient/gui/components/Category.java index 4dfa95a..540271c 100644 --- a/src/main/java/land/chipmunk/chipmunkmod/testclient/gui/components/Category.java +++ b/src/main/java/land/chipmunk/chipmunkmod/testclient/gui/components/Category.java @@ -4,6 +4,7 @@ import land.chipmunk.chipmunkmod.ChipmunkMod; import land.chipmunk.chipmunkmod.testclient.gui.Gui; import land.chipmunk.chipmunkmod.util.Chat; import net.minecraft.client.MinecraftClient; +import net.minecraft.client.gui.DrawContext; import net.minecraft.client.gui.widget.ButtonWidget; import net.minecraft.client.util.math.MatrixStack; import net.minecraft.text.Text; @@ -99,10 +100,10 @@ public class Category extends ButtonWidget { // } @Override - public void renderButton(MatrixStack matrices, int mouseX, int mouseY, float delta) { + public void renderButton(DrawContext context, int mouseX, int mouseY, float delta) { boolean hovered = (mouseX>=getX() && mouseY>=getY() && mouseX=getX() && mouseY>=getY() && mouseX { - WorldUtil.setBlockBreaking(world.getBlockState(pos).getBlock()); - if(instance.isEnabled) { -// Chat.send("Breaking: " + WorldUtil.getBlockBreaking().getTranslationKey()); - switchToToolFor(WorldUtil.getBlockBreaking().getDefaultState().getMaterial()); - } + if (!instance.isEnabled) return ActionResult.PASS; + final BlockState blockState = world.getBlockState(pos); + final PlayerInventory inventory = player.getInventory(); + + // If the player already has the appropriate tool, don't do anything + if (inventory.getMainHandStack().getMiningSpeedMultiplier(blockState) > 1) return ActionResult.PASS; + + for (int slot = 0; slot < 9; slot++) { + if (slot == inventory.selectedSlot) continue; // We already checked the current slot + final ItemStack item = inventory.getStack(slot); + if (item.getMiningSpeedMultiplier(blockState) > 1) { + inventory.selectedSlot = slot; + break; + } + } return ActionResult.PASS; }); } - - public static void switchToToolFor(Material material) { - /* - * 0 = none - * 1 = pickaxe - * 2 = axe - * 3 = hoe - * 4 = sword - * 5 = shovel - * 6 = shears - */ - int tool = 0; - if(Materials.pickaxe.contains(material)) tool = 1; - if(Materials.axe. contains(material)) tool = 2; - if(Materials.hoe. contains(material)) tool = 3; - if(Materials.sword. contains(material)) tool = 4; - if(Materials.shovel. contains(material)) tool = 5; - if(Materials.shears. contains(material)) tool = 6; - -// switch (tool) { -// case 0 -> Chat.send("This block has no tool."); -// case 1 -> Chat.send("This block needs a pickaxe."); -// case 2 -> Chat.send("This block needs an axe."); -// case 3 -> Chat.send("This block needs a hoe."); -// case 4 -> Chat.send("This block needs a sword."); -// case 5 -> Chat.send("This block needs a shovel."); -// case 6 -> Chat.send("This block needs shears."); -// } - switchToTool(tool); - } - public static void switchToTool(int tool) { - ArrayList tools = new ArrayList<>(); - switch(tool) { - case 0 -> {return;} - case 1 -> tools = Tools.pickaxe; - case 2 -> tools = Tools.axe; - case 3 -> tools = Tools.hoe; - case 4 -> tools = Tools.sword; - case 5 -> tools = Tools.shovel; - case 6 -> tools = Tools.shears; - } - int i = 0; - for (ItemStack itemStack : MinecraftClient.getInstance().player.getInventory().main) { - if(tools.contains(itemStack.getItem())) { -// Chat.send(i + "You have that tool!"); - if(i < 9) { - MinecraftClient.getInstance().player.getInventory().selectedSlot = i; -// Chat.send(Text.empty() -// .append("Switched to ") -// .append(itemStack.toHoverableText()) -// .append(" in slot ") -// .append(""+i) -// .append(" in your hotbar.") -// ); - } - } - // else Chat.send(MinecraftClient.getInstance().player.getInventory().main.indexOf(itemStack) + "You do not have that tool!"); - i++; - } - } - - public static class Tools { - public static final ArrayList pickaxe = new ArrayList<>(); - public static final ArrayList axe = new ArrayList<>(); - public static final ArrayList sword = new ArrayList<>(); - public static final ArrayList hoe = new ArrayList<>(); - public static final ArrayList shovel = new ArrayList<>(); - public static final ArrayList shears = new ArrayList<>(); - - public static void initialize() { - /* PICKAXE */ { - pickaxe.add(Items.NETHERITE_PICKAXE); - pickaxe.add(Items. DIAMOND_PICKAXE); - pickaxe.add(Items. GOLDEN_PICKAXE); - pickaxe.add(Items. IRON_PICKAXE); - pickaxe.add(Items. STONE_PICKAXE); - pickaxe.add(Items. WOODEN_PICKAXE); - } - /* AXE */ { - axe.add(Items.NETHERITE_AXE); - axe.add(Items. DIAMOND_AXE); - axe.add(Items. GOLDEN_AXE); - axe.add(Items. IRON_AXE); - axe.add(Items. STONE_AXE); - axe.add(Items. WOODEN_AXE); - } - /* HOE */ { - hoe.add(Items.NETHERITE_HOE); - hoe.add(Items. DIAMOND_HOE); - hoe.add(Items. GOLDEN_HOE); - hoe.add(Items. IRON_HOE); - hoe.add(Items. STONE_HOE); - hoe.add(Items. WOODEN_HOE); - } - /* SWORD */ { - sword.add(Items.NETHERITE_SWORD); - sword.add(Items. DIAMOND_SWORD); - sword.add(Items. GOLDEN_SWORD); - sword.add(Items. IRON_SWORD); - sword.add(Items. STONE_SWORD); - sword.add(Items. WOODEN_SWORD); - } - /* SHUOWEL */ { - shovel.add(Items.NETHERITE_SHOVEL); - shovel.add(Items. DIAMOND_SHOVEL); - shovel.add(Items. GOLDEN_SHOVEL); - shovel.add(Items. IRON_SHOVEL); - shovel.add(Items. STONE_SHOVEL); - shovel.add(Items. WOODEN_SHOVEL); - } - /* SHAEARS */ { - shears.add(Items.SHEARS); - } - } - - } - - public static class Materials { - public static final ArrayList pickaxe = new ArrayList<>(); - public static final ArrayList axe = new ArrayList<>(); - public static final ArrayList sword = new ArrayList<>(); - public static final ArrayList hoe = new ArrayList<>(); - public static final ArrayList shovel = new ArrayList<>(); - public static final ArrayList shears = new ArrayList<>(); - - public static void initialize() { - /* PICKAXE */ { - pickaxe.add(Material.ICE); - pickaxe.add(Material.STONE); - pickaxe.add(Material.DENSE_ICE); - pickaxe.add(Material.AMETHYST); - pickaxe.add(Material.METAL); - pickaxe.add(Material.PISTON); - pickaxe.add(Material.REDSTONE_LAMP); - pickaxe.add(Material.REPAIR_STATION); - pickaxe.add(Material.SCULK); - } - /* AXE */ { - axe.add(Material.WOOD); - axe.add(Material.NETHER_WOOD); - axe.add(Material.NETHER_SHOOTS); - } - /* HOE */ { - hoe.add(Material.MOSS_BLOCK); - hoe.add(Material.ORGANIC_PRODUCT); - hoe.add(Material.LEAVES); - } - /* SWORD */ { - sword.add(Material.BAMBOO); - sword.add(Material.BAMBOO_SAPLING); - sword.add(Material.COBWEB); - } - /* SHUOWEL */ { - shovel.add(Material.SOLID_ORGANIC); - shovel.add(Material.AGGREGATE); - } - /* SHAEARS */ { - shears.add(Material.CARPET); - shears.add(Material.WOOL); - } - } - } + + static { + registerListener(); + } } diff --git a/src/main/java/land/chipmunk/chipmunkmod/testclient/modules/utility/GuiMoveModule.java b/src/main/java/land/chipmunk/chipmunkmod/testclient/modules/utility/GuiMoveModule.java index 324c403..ea2c41d 100644 --- a/src/main/java/land/chipmunk/chipmunkmod/testclient/modules/utility/GuiMoveModule.java +++ b/src/main/java/land/chipmunk/chipmunkmod/testclient/modules/utility/GuiMoveModule.java @@ -4,11 +4,9 @@ import land.chipmunk.chipmunkmod.testclient.gui.components.Module; import net.minecraft.client.MinecraftClient; public class GuiMoveModule extends Module { + public static GuiMoveModule instance = new GuiMoveModule(); + public GuiMoveModule() { super("GUI Move"); - endTickRunnable = () -> { - if (MinecraftClient.getInstance().currentScreen != null) - MinecraftClient.getInstance().currentScreen.passEvents = true; - }; } } diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index 297c23f..8dc4866 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -30,12 +30,9 @@ ], "depends": { - "fabricloader": ">=0.14.11", + "fabricloader": ">=0.14.21", "fabric-api": "*", - "minecraft": "~1.19.3", + "minecraft": "~1.20.1", "java": ">=17" - }, - "suggests": { - "another-mod": "*" } }