Skip to content

Commit

Permalink
Merge branch 'master' into highwaybuilder-changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Wide-Cat authored Jan 7, 2025
2 parents 2c6eff1 + 2a853b2 commit 2904ce9
Show file tree
Hide file tree
Showing 66 changed files with 806 additions and 871 deletions.
7 changes: 4 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
id "fabric-loom" version "1.8-SNAPSHOT"
id "fabric-loom" version "1.9-SNAPSHOT"
id "maven-publish"
id "com.github.johnrengelman.shadow" version "8.1.1"
id "com.gradleup.shadow" version "8.3.5"
}

base {
Expand Down Expand Up @@ -60,7 +60,8 @@ dependencies {
modCompileOnly("maven.modrinth:sodium:${project.sodium_version}") { transitive = false }
modCompileOnly("maven.modrinth:lithium:${project.lithium_version}") { transitive = false }
modCompileOnly("maven.modrinth:iris:${project.iris_version}") { transitive = false }
modCompileOnly("de.florianmichael:ViaFabricPlus:${project.viafabricplus_version}") { transitive = false }
modCompileOnly("com.viaversion:viafabricplus:${project.viafabricplus_version}") { transitive = false }
modCompileOnly("com.viaversion:viafabricplus-api:${project.viafabricplus_version}") { transitive = false }

// Baritone (https://github.com/MeteorDevelopment/baritone)
modCompileOnly "meteordevelopment:baritone:${project.baritone_version}-SNAPSHOT"
Expand Down
18 changes: 9 additions & 9 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
org.gradle.jvmargs=-Xmx2G

# Fabric (https://fabricmc.net/develop)
minecraft_version=1.21.3
yarn_mappings=1.21.3+build.2
minecraft_version=1.21.4
yarn_mappings=1.21.4+build.7
loader_version=0.16.9
fapi_version=0.108.0+1.21.3
fapi_version=0.114.0+1.21.4

# Mod Properties
mod_version=0.5.9
mod_version=0.6.0
maven_group=meteordevelopment
archives_base_name=meteor-client

# Dependency Versions

# Baritone (https://github.com/MeteorDevelopment/baritone)
baritone_version=1.21.3
baritone_version=1.21.4

# Sodium (https://github.com/CaffeineMC/sodium-fabric)
sodium_version=mc1.21.3-0.6.0-fabric
sodium_version=mc1.21.4-0.6.6-fabric

# Lithium (https://github.com/CaffeineMC/lithium-fabric)
lithium_version=mc1.21.3-0.14.2
lithium_version=mc1.21.4-0.14.3-fabric

# Iris (https://github.com/IrisShaders/Iris)
iris_version=1.8.0+1.21.3-fabric
iris_version=1.8.5+1.21.4-fabric

# Orbit (https://github.com/MeteorDevelopment/orbit)
orbit_version=0.2.4
Expand All @@ -41,7 +41,7 @@ reflections_version=0.10.2
netty_version=4.1.90.Final

# ViaFabricPlus (https://github.com/ViaVersion/ViaFabricPlus)
viafabricplus_version=3.5.1
viafabricplus_version=4.0.0

# WaybackAuthLib (https://github.com/FlorianMichael/WaybackAuthLib)
waybackauthlib_version=1.0.1
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
16 changes: 10 additions & 6 deletions src/main/java/meteordevelopment/meteorclient/MeteorClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import meteordevelopment.meteorclient.gui.tabs.Tabs;
import meteordevelopment.meteorclient.systems.Systems;
import meteordevelopment.meteorclient.systems.config.Config;
import meteordevelopment.meteorclient.systems.hud.screens.HudEditorScreen;
import meteordevelopment.meteorclient.systems.modules.Categories;
import meteordevelopment.meteorclient.systems.modules.Modules;
import meteordevelopment.meteorclient.systems.modules.misc.DiscordPresence;
Expand Down Expand Up @@ -172,13 +173,16 @@ private void toggleGui() {

@EventHandler(priority = EventPriority.LOWEST)
private void onOpenScreen(OpenScreenEvent event) {
boolean hideHud = GuiThemes.get().hideHUD();

if (hideHud) {
if (event.screen instanceof WidgetScreen) {
if (!wasWidgetScreen) wasHudHiddenRoot = mc.options.hudHidden;

if (event.screen instanceof WidgetScreen) mc.options.hudHidden = true;
else if (!wasHudHiddenRoot) mc.options.hudHidden = false;
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.options.hudHidden = !(event.screen instanceof HudEditorScreen);
}
} else {
if (wasWidgetScreen) mc.options.hudHidden = wasHudHiddenRoot;
wasHudHiddenRoot = mc.options.hudHidden;
}

wasWidgetScreen = event.screen instanceof WidgetScreen;
Expand Down
5 changes: 2 additions & 3 deletions src/main/java/meteordevelopment/meteorclient/asm/Asm.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

package meteordevelopment.meteorclient.asm;

import meteordevelopment.meteorclient.asm.transformers.GameRendererTransformer;
import meteordevelopment.meteorclient.MeteorClient;
import meteordevelopment.meteorclient.asm.transformers.PacketInflaterTransformer;
import net.fabricmc.loader.api.FabricLoader;
import org.objectweb.asm.ClassReader;
Expand Down Expand Up @@ -41,7 +41,6 @@ public static void init() {
if (INSTANCE != null) return;

INSTANCE = new Asm(System.getProperty("meteor.asm.export") != null);
INSTANCE.add(new GameRendererTransformer());
INSTANCE.add(new PacketInflaterTransformer());
}

Expand Down Expand Up @@ -76,7 +75,7 @@ private void export(String name, byte[] bytes) {
new File(path.toUri()).getParentFile().mkdirs();
Files.write(path, bytes);
} catch (IOException e) {
e.printStackTrace();
MeteorClient.LOG.error("Failed to export transformer '{}': ", name, e);
}
}
}
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public void build(LiteralArgumentBuilder<CommandSource> builder) {
.then(argument("direction", DirectionArgumentType.create())
.executes(context -> {
mc.player.setPitch(context.getArgument("direction", Direction.class).getVector().getY() * -90);
mc.player.setYaw(context.getArgument("direction", Direction.class).asRotation());
mc.player.setYaw(context.getArgument("direction", Direction.class).getPositiveHorizontalDegrees());

return SINGLE_SUCCESS;
}))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ public void build(LiteralArgumentBuilder<CommandSource> builder) {
// Vehicle version
// For each 10 blocks, send a vehicle move packet with no delta
for (int packetNumber = 0; packetNumber < (packetsRequired - 1); packetNumber++) {
mc.player.networkHandler.sendPacket(new VehicleMoveC2SPacket(mc.player.getVehicle()));
mc.player.networkHandler.sendPacket(VehicleMoveC2SPacket.fromVehicle(mc.player.getVehicle()));
}
// Now send the final vehicle move packet
mc.player.getVehicle().setPosition(mc.player.getVehicle().getX(), mc.player.getVehicle().getY() + blocks, mc.player.getVehicle().getZ());
mc.player.networkHandler.sendPacket(new VehicleMoveC2SPacket(mc.player.getVehicle()));
mc.player.networkHandler.sendPacket(VehicleMoveC2SPacket.fromVehicle(mc.player.getVehicle()));
} else {
// No vehicle version
// For each 10 blocks, send a player move packet with no delta
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@

package meteordevelopment.meteorclient.events.entity;

import net.minecraft.entity.vehicle.BoatEntity;
import net.minecraft.entity.vehicle.AbstractBoatEntity;

public class BoatMoveEvent {
private static final BoatMoveEvent INSTANCE = new BoatMoveEvent();

public BoatEntity boat;
public AbstractBoatEntity boat;

public static BoatMoveEvent get(BoatEntity entity) {
public static BoatMoveEvent get(AbstractBoatEntity entity) {
INSTANCE.boat = entity;
return INSTANCE;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@

import meteordevelopment.meteorclient.events.Cancellable;
import meteordevelopment.meteorclient.mixininterface.IEntityRenderState;
import net.minecraft.client.item.ItemModelManager;
import net.minecraft.client.render.VertexConsumerProvider;
import net.minecraft.client.render.entity.state.ItemEntityRenderState;
import net.minecraft.client.render.item.ItemRenderer;
import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.entity.ItemEntity;

Expand All @@ -22,17 +22,17 @@ public class RenderItemEntityEvent extends Cancellable {
public MatrixStack matrixStack;
public VertexConsumerProvider vertexConsumerProvider;
public int light;
public ItemRenderer itemRenderer;
public ItemModelManager itemModelManager;

public static RenderItemEntityEvent get(ItemEntityRenderState renderState, float tickDelta, MatrixStack matrixStack, VertexConsumerProvider vertexConsumerProvider, int light, ItemRenderer itemRenderer) {
public static RenderItemEntityEvent get(ItemEntityRenderState renderState, float tickDelta, MatrixStack matrixStack, VertexConsumerProvider vertexConsumerProvider, int light, ItemModelManager itemModelManager) {
INSTANCE.setCancelled(false);
INSTANCE.itemEntity = (ItemEntity) ((IEntityRenderState) renderState).meteor$getEntity();
INSTANCE.renderState = renderState;
INSTANCE.tickDelta = tickDelta;
INSTANCE.matrixStack = matrixStack;
INSTANCE.vertexConsumerProvider = vertexConsumerProvider;
INSTANCE.light = light;
INSTANCE.itemRenderer = itemRenderer;
INSTANCE.itemModelManager = itemModelManager;
return INSTANCE;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import meteordevelopment.meteorclient.systems.modules.Modules;
import meteordevelopment.meteorclient.systems.modules.movement.BoatFly;
import net.minecraft.entity.vehicle.AbstractBoatEntity;
import net.minecraft.entity.vehicle.BoatEntity;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.injection.At;
Expand All @@ -28,7 +27,7 @@ public abstract class AbstractBoatEntityMixin {

@Inject(method = "tick", at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/vehicle/AbstractBoatEntity;move(Lnet/minecraft/entity/MovementType;Lnet/minecraft/util/math/Vec3d;)V"))
private void onTickInvokeMove(CallbackInfo info) {
if ((Object) this instanceof BoatEntity boatEntity) {
if ((Object) this instanceof AbstractBoatEntity boatEntity) {
MeteorClient.EVENT_BUS.post(BoatMoveEvent.get(boatEntity));
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
import com.llamalad7.mixinextras.injector.ModifyExpressionValue;
import meteordevelopment.meteorclient.systems.modules.Modules;
import meteordevelopment.meteorclient.systems.modules.render.NoRender;
import net.minecraft.client.render.block.entity.SignBlockEntityRenderer;
import net.minecraft.client.render.block.entity.AbstractSignBlockEntityRenderer;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;

@Mixin(SignBlockEntityRenderer.class)
public abstract class SignBlockEntityRendererMixin {
@Mixin(AbstractSignBlockEntityRenderer.class)
public abstract class AbstractSignBlockEntityRendererMixin {
@ModifyExpressionValue(method = "renderText", at = @At(value = "CONSTANT", args = {"intValue=4", "ordinal=1"}))
private int loopTextLengthProxy(int i) {
if (Modules.get().get(NoRender.class).noSignText()) return 0;
Expand Down
Loading

0 comments on commit 2904ce9

Please sign in to comment.