Skip to content

Commit

Permalink
Revert "1.20.4 update (MeteorDevelopment#4249)"
Browse files Browse the repository at this point in the history
This reverts commit b0a927b.
  • Loading branch information
MineGame159 committed Dec 8, 2023
1 parent b0a927b commit 4cc4104
Show file tree
Hide file tree
Showing 57 changed files with 360 additions and 332 deletions.
23 changes: 9 additions & 14 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ dependencies {
modCompileOnly("maven.modrinth:indium:${project.indium_version}") { transitive = false }

// Baritone (https://github.com/MeteorDevelopment/baritone)
modCompileOnly "meteordevelopment:baritone:${project.baritone_version}-SNAPSHOT"
modCompileOnly "meteordevelopment:baritone:${project.minecraft_version}-SNAPSHOT"

// Libraries
library "meteordevelopment:orbit:${project.orbit_version}"
Expand All @@ -67,6 +67,8 @@ dependencies {
library "org.reflections:reflections:${project.reflections_version}"
library("io.netty:netty-handler-proxy:${project.netty_version}") { transitive = false }
library("io.netty:netty-codec-socks:${project.netty_version}") { transitive = false }
library "io.github.llamalad7:mixinextras-fabric:${project.mixin_extras_version}"
annotationProcessor "io.github.llamalad7:mixinextras-fabric:${project.mixin_extras_version}"
library "de.florianmichael:WaybackAuthLib:1.0.0"

// Launch sub project
Expand Down Expand Up @@ -94,24 +96,17 @@ shadowJar {
}

processResources {
def propertyMap = [
"version" : project.version,
"devbuild" : project.findProperty("devbuild") ?: "",
"commit" : project.findProperty("commit") ?: "",
"minecraft_version": project.minecraft_version,
"loader_version" : project.loader_version
]

inputs.properties(propertyMap)
filesMatching("fabric.mod.json") {
expand(propertyMap)
expand "version": project.version,
"devbuild": project.findProperty("devbuild") ?: "",
"commit": project.findProperty("commit") ?: "",
"minecraft_version": project.minecraft_version,
"loader_version": project.loader_version
}
}

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

manifest {
attributes("Main-Class": "meteordevelopment.meteorclient.Main")
Expand Down
21 changes: 10 additions & 11 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,30 +1,26 @@
org.gradle.jvmargs=-Xmx2G

# Fabric (https://fabricmc.net/develop)
# TODO: when updating to 1.21, revert "minecraft": ["1.20.3", "1.20.4"] to "minecraft": "${minecraft_version}"
minecraft_version=1.20.4
yarn_mappings=1.20.4+build.1
loader_version=0.15.0
fapi_version=0.91.1+1.20.4
minecraft_version=1.20.2
yarn_mappings=1.20.2+build.4
loader_version=0.14.24
fapi_version=0.90.4+1.20.2

# Mod Properties
mod_version=0.5.6
mod_version=0.5.5
maven_group=meteordevelopment
archives_base_name=meteor-client

# Dependency Versions

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

# Sodium (https://github.com/CaffeineMC/sodium-fabric)
sodium_version=mc1.20.3-0.5.4
sodium_version=mc1.20.2-0.5.3

# Lithium (https://github.com/CaffeineMC/lithium-fabric)
lithium_version=mc1.20.2-0.12.0

# Iris (https://github.com/IrisShaders/Iris)
iris_version=1.6.12+1.20.3
iris_version=1.6.10+1.20.2

# Orbit (https://github.com/MeteorDevelopment/orbit)
orbit_version=0.2.3
Expand All @@ -41,5 +37,8 @@ reflections_version=0.10.2
# Netty (https://github.com/netty/netty)
netty_version=4.1.90.Final

# Mixin Extras (https://github.com/LlamaLad7/MixinExtras)
mixin_extras_version=0.2.0

# Indium (https://github.com/comp500/Indium)
indium_version=1.0.27+mc1.20.1
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public String parse(StringReader reader) throws CommandSyntaxException {

@Override
public <S> CompletableFuture<Suggestions> listSuggestions(CommandContext<S> context, SuggestionsBuilder builder) {
return suggestMatching(FakePlayerManager.stream().map(fakePlayerEntity -> fakePlayerEntity.getName().getString()), builder);
return suggestMatching(FakePlayerManager.stream().map(FakePlayerEntity::getEntityName), builder);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public PlayerEntity parse(StringReader reader) throws CommandSyntaxException {
PlayerEntity playerEntity = null;

for (PlayerEntity p : mc.world.getPlayers()) {
if (p.getName().getString().equalsIgnoreCase(argument)) {
if (p.getEntityName().equalsIgnoreCase(argument)) {
playerEntity = p;
break;
}
Expand All @@ -53,7 +53,7 @@ public PlayerEntity parse(StringReader reader) throws CommandSyntaxException {

@Override
public <S> CompletableFuture<Suggestions> listSuggestions(CommandContext<S> context, SuggestionsBuilder builder) {
return CommandSource.suggestMatching(mc.world.getPlayers().stream().map(abstractClientPlayerEntity -> abstractClientPlayerEntity.getName().getString()), builder);
return CommandSource.suggestMatching(mc.world.getPlayers().stream().map(PlayerEntity::getEntityName), builder);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public void build(LiteralArgumentBuilder<CommandSource> builder) {
}

FakePlayerManager.remove(fp);
info("Removed Fake Player %s.".formatted(fp.getName().getString()));
info("Removed Fake Player %s.".formatted(fp.getEntityName()));

return SINGLE_SUCCESS;
})
Expand All @@ -67,7 +67,7 @@ public void build(LiteralArgumentBuilder<CommandSource> builder) {
builder.then(literal("list")
.executes(context -> {
info("--- Fake Players ((highlight)%s(default)) ---", FakePlayerManager.count());
FakePlayerManager.forEach(fp -> ChatUtils.info("(highlight)%s".formatted(fp.getName().getString())));
FakePlayerManager.forEach(fp -> ChatUtils.info("(highlight)%s".formatted(fp.getEntityName())));
return SINGLE_SUCCESS;
})
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ else if (swarm.isWorker()) {
Swarm swarm = Modules.get().get(Swarm.class);
if (swarm.isActive()) {
if (swarm.isHost()) {
swarm.host.sendMessage(context.getInput() + " " + mc.player.getName().getString());
swarm.host.sendMessage(context.getInput() + " " + mc.player.getEntityName());
}
else if (swarm.isWorker()) {
error("The follow host command must be used by the host.");
Expand All @@ -124,7 +124,7 @@ else if (swarm.isWorker()) {
swarm.host.sendMessage(context.getInput());
}
else if (swarm.isWorker() && playerEntity != null) {
PathManagers.get().follow(entity -> entity.getName().getString().equalsIgnoreCase(playerEntity.getName().getString()));
PathManagers.get().follow(entity -> entity.getEntityName().equalsIgnoreCase(playerEntity.getEntityName()));
}
}
else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public static void init() {
public static void postInit() {
if (FILE.exists()) {
try {
NbtCompound tag = NbtIo.read(FILE.toPath());
NbtCompound tag = NbtIo.read(FILE);

if (tag != null) select(tag.getString("currentTheme"));
} catch (IOException e) {
Expand Down Expand Up @@ -82,7 +82,7 @@ public static void select(String name) {
File file = new File(THEMES_FOLDER, get().name + ".nbt");

if (file.exists()) {
NbtCompound tag = NbtIo.read(file.toPath());
NbtCompound tag = NbtIo.read(file);
if (tag != null) get().fromTag(tag);
}
} catch (IOException e) {
Expand Down Expand Up @@ -116,7 +116,7 @@ private static void saveTheme() {
NbtCompound tag = get().toTag();

THEMES_FOLDER.mkdirs();
NbtIo.write(tag, new File(THEMES_FOLDER, get().name + ".nbt").toPath());
NbtIo.write(tag, new File(THEMES_FOLDER, get().name + ".nbt"));
} catch (IOException e) {
e.printStackTrace();
}
Expand All @@ -129,7 +129,7 @@ private static void saveGlobal() {
tag.putString("currentTheme", get().name);

FOLDER.mkdirs();
NbtIo.write(tag, FILE.toPath());
NbtIo.write(tag, FILE);
} catch (IOException e) {
e.printStackTrace();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@

import java.util.List;

import static meteordevelopment.meteorclient.MeteorClient.mc;

public class WItemWithLabel extends WHorizontalList {
private ItemStack itemStack;
private String name;
Expand All @@ -40,13 +38,13 @@ private String getStringToAppend() {
if (itemStack.getItem() == Items.POTION) {
List<StatusEffectInstance> effects = PotionUtil.getPotion(itemStack).getEffects();

if (!effects.isEmpty()) {
if (effects.size() > 0) {
str += " ";

StatusEffectInstance effect = effects.get(0);
if (effect.getAmplifier() > 0) str += "%d ".formatted(effect.getAmplifier() + 1);
if (effect.getAmplifier() > 0) str += effect.getAmplifier() + 1 + " ";

str += "(%s)".formatted(StatusEffectUtil.getDurationText(effect, 1, mc.world.getTickManager().getTickRate()).getString());
str += "(" + StatusEffectUtil.getDurationText(effect, 1).getString() + ")";
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@
import net.minecraft.client.gui.screen.Screen;
import net.minecraft.client.gui.screen.ingame.BookEditScreen;
import net.minecraft.client.gui.widget.ButtonWidget;
import net.minecraft.nbt.*;
import net.minecraft.nbt.NbtCompound;
import net.minecraft.nbt.NbtIo;
import net.minecraft.nbt.NbtList;
import net.minecraft.nbt.NbtString;
import net.minecraft.text.Text;
import org.lwjgl.glfw.GLFW;
import org.spongepowered.asm.mixin.Final;
Expand Down Expand Up @@ -84,7 +87,7 @@ private void onInit(CallbackInfo info) {
DataInputStream in = new DataInputStream(new ByteArrayInputStream(bytes));

try {
NbtCompound tag = NbtIo.readCompressed(in, NbtTagSizeTracker.ofUnlimitedBytes());
NbtCompound tag = NbtIo.readCompressed(in);

NbtList listTag = tag.getList("pages", 8).copy();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

@Mixin(CapeFeatureRenderer.class)
public class CapeFeatureRendererMixin {
@ModifyExpressionValue(method = "render(Lnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/render/VertexConsumerProvider;ILnet/minecraft/client/network/AbstractClientPlayerEntity;FFFFFF)V", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/util/SkinTextures;capeTexture()Lnet/minecraft/util/Identifier;"))
@ModifyExpressionValue(method = "render", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/util/SkinTextures;capeTexture()Lnet/minecraft/util/Identifier;"))
private Identifier modifyCapeTexture(Identifier original, MatrixStack matrixStack, VertexConsumerProvider vertexConsumerProvider, int i, AbstractClientPlayerEntity abstractClientPlayerEntity, float f, float g, float h, float j, float k, float l) {
Identifier id = Capes.get(abstractClientPlayerEntity);
return id == null ? original : id;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import meteordevelopment.meteorclient.MeteorClient;
import meteordevelopment.meteorclient.events.world.ServerConnectBeginEvent;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.gui.screen.multiplayer.ConnectScreen;
import net.minecraft.client.gui.screen.ConnectScreen;
import net.minecraft.client.network.ServerAddress;
import net.minecraft.client.network.ServerInfo;
import org.spongepowered.asm.mixin.Mixin;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import meteordevelopment.meteorclient.systems.modules.Modules;
import meteordevelopment.meteorclient.systems.modules.misc.AutoReconnect;
import net.minecraft.client.gui.screen.multiplayer.ConnectScreen;
import net.minecraft.client.gui.screen.ConnectScreen;
import net.minecraft.client.gui.screen.DisconnectedScreen;
import net.minecraft.client.gui.screen.Screen;
import net.minecraft.client.gui.screen.TitleScreen;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public ElytraFeatureRendererMixin(FeatureRendererContext<T, M> context) {
super(context);
}

@ModifyExpressionValue(method = "render(Lnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/render/VertexConsumerProvider;ILnet/minecraft/entity/LivingEntity;FFFFFF)V", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/util/SkinTextures;capeTexture()Lnet/minecraft/util/Identifier;"))
@ModifyExpressionValue(method = "render", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/util/SkinTextures;capeTexture()Lnet/minecraft/util/Identifier;"))
private Identifier modifyCapeTexture(Identifier original, MatrixStack matrixStack, VertexConsumerProvider vertexConsumerProvider, int i, T livingEntity, float f, float g, float h, float j, float k, float l) {
if (!(livingEntity instanceof AbstractClientPlayerEntity playerEntity)) return original;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public abstract class GameRendererMixin {
@Unique private Renderer3D renderer;

@Inject(method = "renderWorld", at = @At(value = "INVOKE_STRING", target = "Lnet/minecraft/util/profiler/Profiler;swap(Ljava/lang/String;)V", args = { "ldc=hand" }), locals = LocalCapture.CAPTURE_FAILEXCEPTION)
private void onRenderWorld(float tickDelta, long limitTime, MatrixStack matrices, CallbackInfo ci, boolean bl, Camera camera, Entity entity, MatrixStack matrixStack, double d, float f, float g, Matrix4f matrix4f, Matrix3f matrix3f) {
private void onRenderWorld(float tickDelta, long limitTime, MatrixStack matrices, CallbackInfo info, boolean bl, Camera camera, MatrixStack matrixStack, double d, float f, float g, Matrix4f matrix4f, Matrix3f matrix3f) {
if (!Utils.canUpdate()) return;

client.getProfiler().push(MeteorClient.MOD_ID + "_render");
Expand Down Expand Up @@ -169,7 +169,7 @@ private void renderHand(MatrixStack matrices, Camera camera, float tickDelta, Ca
info.cancel();
}

@ModifyConstant(method = "updateTargetedEntity", constant = @Constant(doubleValue = 6))
@ModifyConstant(method = "updateTargetedEntity", constant = @Constant(doubleValue = 3))
private double updateTargetedEntityModifySurvivalReach(double d) {
return Modules.get().get(Reach.class).entityReach();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.scoreboard.AbstractTeam;
import net.minecraft.scoreboard.Team;
import org.jetbrains.annotations.Nullable;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
Expand Down Expand Up @@ -67,8 +66,8 @@ public float changePitch(float oldValue, LivingEntity entity) {

// Player model rendering in main menu

@ModifyExpressionValue(method = "hasLabel(Lnet/minecraft/entity/LivingEntity;)Z", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/network/ClientPlayerEntity;getScoreboardTeam()Lnet/minecraft/scoreboard/Team;"))
private Team hasLabelClientPlayerEntityGetScoreboardTeamProxy(Team team) {
@ModifyExpressionValue(method = "hasLabel(Lnet/minecraft/entity/LivingEntity;)Z", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/network/ClientPlayerEntity;getScoreboardTeam()Lnet/minecraft/scoreboard/AbstractTeam;"))
private AbstractTeam hasLabelClientPlayerEntityGetScoreboardTeamProxy(AbstractTeam team) {
return (mc.player == null) ? null : team;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ public class RaycastContextMixin implements IRaycastContext {
@Shadow @Final @Mutable private Vec3d end;
@Shadow @Final @Mutable private RaycastContext.ShapeType shapeType;
@Shadow @Final @Mutable private RaycastContext.FluidHandling fluid;
@Shadow @Final @Mutable private ShapeContext shapeContext;
@Shadow @Final @Mutable private ShapeContext entityPosition;

@Override
public void set(Vec3d start, Vec3d end, RaycastContext.ShapeType shapeType, RaycastContext.FluidHandling fluidHandling, Entity entity) {
this.start = start;
this.end = end;
this.shapeType = shapeType;
this.fluid = fluidHandling;
this.shapeContext = ShapeContext.of(entity);
this.entityPosition = ShapeContext.of(entity);
}
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/*
* This file is part of the Meteor Client distribution (https://github.com/MeteorDevelopment/meteor-client).
* Copyright (c) Meteor Development.
*/

package meteordevelopment.meteorclient.mixin;

import net.minecraft.registry.SimpleRegistry;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Redirect;

import java.util.function.Supplier;

@Mixin(SimpleRegistry.class)
public class SimpleRegistryMixin<T> {
@Redirect(method = "<init>(Lnet/minecraft/registry/RegistryKey;Lcom/mojang/serialization/Lifecycle;Z)V", at = @At(value = "INVOKE", target = "Lnet/minecraft/Bootstrap;ensureBootstrapped(Ljava/util/function/Supplier;)V"))
private void idk(Supplier<String> callerGetter) {
// TODO: Probably extremely retarded but seems to work
// nothing :trolla:
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

@Mixin(value = ChunkAwareBlockCollisionSweeper.class)
public abstract class ChunkAwareBlockCollisionSweeperMixin {
@Redirect(method = "computeNext()Lnet/minecraft/util/shape/VoxelShape;", at = @At(value = "INVOKE", target = "Lnet/minecraft/block/BlockState;getCollisionShape(Lnet/minecraft/world/BlockView;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/ShapeContext;)Lnet/minecraft/util/shape/VoxelShape;"))
@Redirect(method = "computeNext", at = @At(value = "INVOKE", target = "Lnet/minecraft/block/BlockState;getCollisionShape(Lnet/minecraft/world/BlockView;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/ShapeContext;)Lnet/minecraft/util/shape/VoxelShape;"))
private VoxelShape onComputeNextCollisionBox(BlockState state, BlockView world, BlockPos pos, ShapeContext context) {
VoxelShape shape = state.getCollisionShape(world, pos, context);

Expand Down
Loading

0 comments on commit 4cc4104

Please sign in to comment.