Update 1.19.4 (#233)

This commit is contained in:
Soda5601
2023-03-19 00:29:06 +08:00
committed by GitHub
parent e33ecf441e
commit 29509947c6
50 changed files with 271 additions and 238 deletions

View File

@@ -1,27 +1,21 @@
package anticope.rejects.mixin;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import org.spongepowered.asm.mixin.injection.At;
import net.minecraft.entity.Entity;
import net.minecraft.entity.LivingEntity;
import anticope.rejects.events.TeleportParticleEvent;
import meteordevelopment.meteorclient.MeteorClient;
import meteordevelopment.meteorclient.utils.Utils;
import net.minecraft.entity.LivingEntity;
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.callback.CallbackInfo;
import static meteordevelopment.meteorclient.MeteorClient.mc;
@Mixin(LivingEntity.class)
public class LivingEntityMixin {
@Inject(method = "handleStatus", at = @At("HEAD"), cancellable = true)
@Inject(method = "handleStatus", at = @At("HEAD"))
private void onHandleStatus(byte status, CallbackInfo ci) {
if ((Object) this instanceof Entity thisPlayer) {
if ((Object) thisPlayer == mc.player && status == 46 && Utils.canUpdate()) {
MeteorClient.EVENT_BUS.post(TeleportParticleEvent.get(thisPlayer.getX(), thisPlayer.getY(), thisPlayer.getZ()));
}
if ((Object) this == mc.player && status == 46) {
MeteorClient.EVENT_BUS.post(TeleportParticleEvent.get(mc.player.getX(), mc.player.getY(), mc.player.getZ()));
}
}
}

View File

@@ -0,0 +1,17 @@
package anticope.rejects.mixin;
import anticope.rejects.events.OffGroundSpeedEvent;
import meteordevelopment.meteorclient.MeteorClient;
import net.minecraft.entity.player.PlayerEntity;
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.callback.CallbackInfoReturnable;
@Mixin(PlayerEntity.class)
public class PlayerEntityMixin {
@Inject(method = "getOffGroundSpeed", at = @At("RETURN"), cancellable = true)
private void onGetOffGroundSpeed(CallbackInfoReturnable<Float> cir) {
cir.setReturnValue(MeteorClient.EVENT_BUS.post(OffGroundSpeedEvent.get(cir.getReturnValueF())).speed);
}
}

View File

@@ -9,7 +9,7 @@ import org.spongepowered.asm.mixin.injection.ModifyVariable;
@Mixin(TexturedRenderLayers.class)
public class TexturedRenderLayersMixin {
@ModifyVariable(method = "getChestTexture(Lnet/minecraft/block/entity/BlockEntity;Lnet/minecraft/block/enums/ChestType;Z)Lnet/minecraft/client/util/SpriteIdentifier;", at = @At("LOAD"), ordinal = 0)
@ModifyVariable(method = "getChestTextureId(Lnet/minecraft/block/entity/BlockEntity;Lnet/minecraft/block/enums/ChestType;Z)Lnet/minecraft/client/util/SpriteIdentifier;", at = @At("LOAD"), ordinal = 0)
private static boolean chrsitmas(boolean christmas) {
Rendering rendering = Modules.get().get(Rendering.class);
if (rendering != null && rendering.chistmas())