Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,6 @@ dependencies {
compileOnly(libs.sodium) { isTransitive = false }
compileOnly(libs.lithium) { isTransitive = false }
compileOnly(libs.iris) { isTransitive = false }
compileOnly(libs.viafabricplus) { isTransitive = false }
compileOnly(libs.viafabricplus.api) { isTransitive = false }

compileOnly(libs.baritone)
compileOnly(libs.modmenu)
Expand Down Expand Up @@ -199,9 +197,10 @@ tasks {

jar {
inputs.property("archivesName", archivesBaseName)
val licenseName = "LICENSE_$archivesBaseName"

from("LICENSE") {
rename { "${it}_$archivesBaseName" }
rename("LICENSE", licenseName)
}

// Include launcher classes
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
org.gradle.jvmargs=-Xmx2G
org.gradle.parallel=true
org.gradle.caching=true
org.gradle.configuration-cache=false
org.gradle.configuration-cache=true

# Mod Properties
maven_group=meteordevelopment
Expand Down
22 changes: 9 additions & 13 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
[versions]
# Fabric (https://fabricmc.net/develop)
jdk = "25"
minecraft = "26.2"
fabric-loader = "0.19.3"
fabric-api = "0.154.2+26.2"
minecraft = "26.3"
fabric-loader = "0.19.5"
fabric-api = "0.162.0+26.3"

# Plugins
# Loom (https://github.com/FabricMC/fabric-loom)
loom = "1.17-SNAPSHOT"
loom = "1.18-SNAPSHOT"
# Error Prone Plugin (https://github.com/tbroyer/gradle-errorprone-plugin)
errorprone-plugin = "5.1.1"

# Mods
# Baritone (https://github.com/MeteorDevelopment/baritone)
baritone = "26.1-SNAPSHOT"
# Sodium (https://github.com/CaffeineMC/sodium-fabric)
sodium = "mc26.2-0.9.1-fabric"
sodium = "mc26.3-0.9.2-fabric"
# Lithium (https://github.com/CaffeineMC/lithium-fabric)
lithium = "mc26.2-0.25.2-fabric"
lithium = "mc26.3-0.26.2-fabric"
# Iris (https://github.com/IrisShaders/Iris)
iris = "1.11.2+26.2-fabric"
iris = "1.11.7+26.3-fabric"
# ModMenu (https://github.com/TerraformersMC/ModMenu)
modmenu = "20.0.1"
modmenu = "21.0.0"
# Orbit (https://github.com/MeteorDevelopment/orbit)
orbit = "0.2.4"
# Starscript (https://github.com/MeteorDevelopment/starscript)
Expand All @@ -31,9 +31,7 @@ discordipc = "1.1"
# Reflections (https://github.com/ronmamo/reflections)
reflections = "0.10.2"
# Netty (https://github.com/netty/netty)
netty = "4.2.15.Final"
# ViaFabricPlus (https://github.com/ViaVersion/ViaFabricPlus)
viafabricplus = "4.6.1"
netty = "4.2.16.Final"
# WaybackAuthLib (https://github.com/florianreuth/WaybackAuthLib)
waybackauthlib = "1.1.0"
# MinecraftAuth (https://github.com/RaphiMC/MinecraftAuth)
Expand All @@ -56,8 +54,6 @@ lithium = { module = "maven.modrinth:lithium", version.ref = "lithium" }
iris = { module = "maven.modrinth:iris", version.ref = "iris" }
baritone = { module = "meteordevelopment:baritone", version.ref = "baritone" }
modmenu = { module = "maven.modrinth:modmenu", version.ref = "modmenu" }
viafabricplus = { module = "com.viaversion:viafabricplus", version.ref = "viafabricplus" }
viafabricplus-api = { module = "com.viaversion:viafabricplus-api", version.ref = "viafabricplus" }

# Libraries
orbit = { module = "meteordevelopment:orbit", version.ref = "orbit" }
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-9.6.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.8.1-bin.zip
networkTimeout=10000
retries=0
retryBackOffMs=500
Expand Down
52 changes: 41 additions & 11 deletions gradlew.bat

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 9 additions & 20 deletions src/main/java/meteordevelopment/meteorclient/MeteorClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

import meteordevelopment.meteorclient.addons.AddonManager;
import meteordevelopment.meteorclient.addons.MeteorAddon;
import meteordevelopment.meteorclient.events.game.OpenScreenEvent;
import meteordevelopment.meteorclient.events.meteor.KeyInputEvent;
import meteordevelopment.meteorclient.events.meteor.MouseClickEvent;
import meteordevelopment.meteorclient.events.world.TickEvent;
Expand All @@ -32,13 +31,13 @@
import meteordevelopment.meteorclient.utils.network.OnlinePlayers;
import meteordevelopment.orbit.EventBus;
import meteordevelopment.orbit.EventHandler;
import meteordevelopment.orbit.EventPriority;
import meteordevelopment.orbit.IEventBus;
import net.fabricmc.api.ClientModInitializer;
import net.fabricmc.loader.api.FabricLoader;
import net.fabricmc.loader.api.metadata.ModMetadata;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.screens.ChatScreen;
import net.minecraft.client.gui.screens.Screen;
import net.minecraft.resources.Identifier;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand Down Expand Up @@ -176,25 +175,15 @@ private void toggleGui() {

// Hide HUD

private boolean wasWidgetScreen, wasHudHiddenRoot;

@EventHandler(priority = EventPriority.LOWEST)
private void onOpenScreen(OpenScreenEvent event) {
if (event.screen instanceof WidgetScreen) {
if (!wasWidgetScreen) wasHudHiddenRoot = mc.gameRenderer.gameRenderState().guiRenderState.isHudHidden;
if (GuiThemes.get().hideHUD() || wasHudHiddenRoot) {
// Always show the MC HUD in the HUD editor screen since people like
// to align some items with the hotbar or chat
mc.gameRenderer.gameRenderState().guiRenderState.isHudHidden = !(event.screen instanceof HudEditorScreen)
&& !(event.screen instanceof AddHudElementScreen)
&& !(event.screen instanceof HudElementScreen);
}
} else {
if (wasWidgetScreen) mc.gameRenderer.gameRenderState().guiRenderState.isHudHidden = wasHudHiddenRoot;
wasHudHiddenRoot = mc.gameRenderer.gameRenderState().guiRenderState.isHudHidden;
}
public static boolean shouldHideHud() {
if (!GuiThemes.get().hideHUD()) return false;

Screen screen = mc.gui.screen();
if (!(screen instanceof WidgetScreen)) return false;

wasWidgetScreen = event.screen instanceof WidgetScreen;
return !(screen instanceof HudEditorScreen)
&& !(screen instanceof AddHudElementScreen)
&& !(screen instanceof HudElementScreen);
}

public static Identifier identifier(String path) {
Expand Down
4 changes: 0 additions & 4 deletions src/main/java/meteordevelopment/meteorclient/MixinPlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ public class MixinPlugin implements IMixinConfigPlugin {
public static boolean isSodiumPresent;
private static boolean isLithiumPresent;
public static boolean isIrisPresent;
private static boolean isVFPPresent;
private static boolean isBaritonePresent;

@Override
Expand All @@ -35,7 +34,6 @@ public void onLoad(String mixinPackage) {
isSodiumPresent = FabricLoader.getInstance().isModLoaded("sodium");
isLithiumPresent = FabricLoader.getInstance().isModLoaded("lithium");
isIrisPresent = FabricLoader.getInstance().isModLoaded("iris");
isVFPPresent = FabricLoader.getInstance().isModLoaded("viafabricplus");
isBaritonePresent = FabricLoader.getInstance().isModLoaded("baritone") || FabricLoader.getInstance().isModLoaded("baritone-meteor");

loaded = true;
Expand All @@ -58,8 +56,6 @@ public boolean shouldApplyMixin(String targetClassName, String mixinClassName) {
return isIndigoPresent;
} else if (mixinClassName.startsWith(mixinPackage + ".lithium")) {
return isLithiumPresent;
} else if (mixinClassName.startsWith(mixinPackage + ".viafabricplus")) {
return isVFPPresent;
} else if (mixinClassName.startsWith(mixinPackage + ".baritone")) {
return isBaritonePresent;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import java.util.List;

public abstract class Command {
protected static CommandBuildContext REGISTRY_ACCESS = Commands.createValidationContext(VanillaRegistries.createLookup());
protected static CommandBuildContext REGISTRY_ACCESS = Commands.createValidationContext(VanillaRegistries.createWorldLookup());
protected static final int SINGLE_SUCCESS = com.mojang.brigadier.Command.SINGLE_SUCCESS;
protected static final Minecraft mc = MeteorClient.mc;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public DropCommand() {
@Override
public void build(LiteralArgumentBuilder<ClientSuggestionProvider> builder) {
// Main Hand
builder.then(literal("hand").executes(_ -> drop(player -> player.drop(true))));
builder.then(literal("hand").executes(_ -> drop(player -> mc.gameMode.dropItem(player, true))));

// Offhand
builder.then(literal("offhand").executes(_ -> drop(_ -> InvUtils.drop().slotOffhand())));
Expand Down Expand Up @@ -70,9 +70,7 @@ public void build(LiteralArgumentBuilder<ClientSuggestionProvider> builder) {

// Specific item
builder.then(argument("item", ItemArgument.item(REGISTRY_ACCESS))
.executes(context -> drop(player -> {
dropItem(player, context, Integer.MAX_VALUE);
}))
.executes(context -> drop(player -> dropItem(player, context, Integer.MAX_VALUE)))
.then(argument("amount", IntegerArgumentType.integer(1))
.executes(context -> drop(player -> {
int amount = IntegerArgumentType.getInteger(context, "amount");
Expand All @@ -83,7 +81,7 @@ public void build(LiteralArgumentBuilder<ClientSuggestionProvider> builder) {

private void dropItem(LocalPlayer player, CommandContext<ClientSuggestionProvider> context, int amount) throws CommandSyntaxException {
ItemStack stack = ItemArgument.getItem(context, "item").createItemStack(1);
if (stack == null || stack.getItem() == Items.AIR) throw NO_SUCH_ITEM.create();
if (stack.getItem() == Items.AIR) throw NO_SUCH_ITEM.create();

for (int i = 0; i < player.getInventory().getContainerSize() && amount > 0; i++) {
ItemStack invStack = player.getInventory().getItem(i);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public void build(LiteralArgumentBuilder<ClientSuggestionProvider> builder) {
ItemStack stack = mc.player.getInventory().getSelectedItem();
if (stack.getItem() != Items.FILLED_MAP
|| stack.get(DataComponents.ITEM_NAME) == null
|| !stack.get(DataComponents.ITEM_NAME).getString().equals(Component.translatable("filled_map.buried_treasure").getString())) {
|| !stack.get(DataComponents.ITEM_NAME).getString().equals(Component.translatable("item.minecraft.buried_treasure_map").getString())) {
error("You need to hold a (highlight)buried treasure map(default)!");
return SINGLE_SUCCESS;
}
Expand Down Expand Up @@ -108,8 +108,8 @@ public void build(LiteralArgumentBuilder<ClientSuggestionProvider> builder) {
ItemStack stack = mc.player.getInventory().getSelectedItem();
if (stack.getItem() != Items.FILLED_MAP
|| stack.get(DataComponents.ITEM_NAME) == null
|| !stack.get(DataComponents.ITEM_NAME).getString().equals(Component.translatable("filled_map.mansion").getString())) {
error("You need to hold a (highlight)woodland explorer map(default)!");
|| !stack.get(DataComponents.ITEM_NAME).getString().equals(Component.translatable("item.minecraft.woodland_mansion_map").getString())) {
error("You need to hold a (highlight)woodland mansion map(default)!");
return SINGLE_SUCCESS;
}

Expand Down Expand Up @@ -138,7 +138,7 @@ public void build(LiteralArgumentBuilder<ClientSuggestionProvider> builder) {
ItemStack stack = mc.player.getInventory().getSelectedItem();
if (stack.getItem() == Items.FILLED_MAP
&& stack.get(DataComponents.ITEM_NAME) != null
&& stack.get(DataComponents.ITEM_NAME).getString().equals(Component.translatable("filled_map.monument").getString())) {
&& stack.get(DataComponents.ITEM_NAME).getString().equals(Component.translatable("item.minecraft.ocean_monument_map").getString())) {

MapDecorations mapDecorationsComponent = stack.get(DataComponents.MAP_DECORATIONS);
if (mapDecorationsComponent == null) {
Expand All @@ -165,7 +165,7 @@ public void build(LiteralArgumentBuilder<ClientSuggestionProvider> builder) {
if (BaritoneUtils.IS_AVAILABLE) {
Vec3 coords = findByBlockList(monumentBlocks);
if (coords == null) {
error("No monument found. Try using an (highlight)ocean explorer map(default) for more success.");
error("No monument found. Try using an (highlight)ocean monument map(default) for more success.");
return SINGLE_SUCCESS;
}
MutableComponent text = Component.literal("Monument located at ");
Expand All @@ -175,7 +175,7 @@ public void build(LiteralArgumentBuilder<ClientSuggestionProvider> builder) {
return SINGLE_SUCCESS;
}

error("Locating this structure without an (highlight)ocean explorer map(default) requires Baritone.");
error("Locating this structure without an (highlight)ocean monument map(default) requires Baritone.");
return SINGLE_SUCCESS;
}));

Expand Down
Loading
Loading