Update to Meteor-Rejects to 1.21.10
Some checks failed
Java CI with Gradle / build (push) Has been cancelled
Some checks failed
Java CI with Gradle / build (push) Has been cancelled
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
package anticope.rejects.mixin;
|
||||
|
||||
import net.minecraft.client.network.ClientPlayerEntity;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Mutable;
|
||||
import org.spongepowered.asm.mixin.gen.Accessor;
|
||||
|
||||
@Mixin(ClientPlayerEntity.class)
|
||||
public interface ClientPlayerEntityAccessor {
|
||||
@Mutable
|
||||
@Accessor("ticksSinceLastPositionPacketSent")
|
||||
void setTicksSinceLastPositionPacketSent(int ticks);
|
||||
}
|
||||
@@ -13,6 +13,6 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
public class ClientPlayerInteractionManagerMixin {
|
||||
@Inject(method = "stopUsingItem", at = @At("HEAD"))
|
||||
public void onStopUsingItem(PlayerEntity player, CallbackInfo ci) {
|
||||
MeteorClient.EVENT_BUS.post(StopUsingItemEvent.get(player.getInventory().getMainHandStack()));
|
||||
MeteorClient.EVENT_BUS.post(StopUsingItemEvent.get(player.getMainHandStack()));
|
||||
}
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
package anticope.rejects.mixin;
|
||||
|
||||
import anticope.rejects.modules.Rendering;
|
||||
import meteordevelopment.meteorclient.systems.modules.Modules;
|
||||
|
||||
import net.minecraft.client.render.entity.feature.Deadmau5FeatureRenderer;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Redirect;
|
||||
|
||||
@Mixin(Deadmau5FeatureRenderer.class)
|
||||
public class Deadmau5FeatureRendererMixin {
|
||||
@Redirect(method = "render", at = @At(value = "INVOKE", target = "Ljava/lang/String;equals(Ljava/lang/Object;)Z"))
|
||||
private boolean redirectAllow(String s, Object name){
|
||||
Rendering renderingModule = Modules.get().get(Rendering.class);
|
||||
if (renderingModule != null && renderingModule.deadmau5EarsEnabled()) return true;
|
||||
return name.equals(s);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package anticope.rejects.mixin;
|
||||
|
||||
import anticope.rejects.modules.Rendering;
|
||||
import meteordevelopment.meteorclient.systems.modules.Modules;
|
||||
import net.minecraft.client.network.AbstractClientPlayerEntity;
|
||||
import net.minecraft.client.render.VertexConsumerProvider;
|
||||
import net.minecraft.client.render.entity.feature.Deadmau5FeatureRenderer;
|
||||
import net.minecraft.client.util.math.MatrixStack;
|
||||
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;
|
||||
|
||||
@Mixin(Deadmau5FeatureRenderer.class)
|
||||
public class Deadmau5FeatureRendererMixin {
|
||||
@Inject(method = "render(Lnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/render/VertexConsumerProvider;ILnet/minecraft/client/network/AbstractClientPlayerEntity;FFFFFF)V", at = @At("HEAD"), cancellable = true)
|
||||
private void onRender(MatrixStack matrices, VertexConsumerProvider vertexConsumers, int light, AbstractClientPlayerEntity player, float limbAngle, float limbDistance, float tickDelta, float animationProgress, float headYaw, float headPitch, CallbackInfo ci) {
|
||||
Rendering renderingModule = Modules.get().get(Rendering.class);
|
||||
if (renderingModule != null && !renderingModule.deadmau5EarsEnabled()) {
|
||||
// If the feature is disabled and player is not deadmau5, cancel rendering
|
||||
if (!player.getName().getString().equals("deadmau5")) {
|
||||
ci.cancel();
|
||||
}
|
||||
}
|
||||
// If the feature is enabled, allow rendering for everyone (don't cancel)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package anticope.rejects.mixin;
|
||||
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.gen.Accessor;
|
||||
|
||||
@Mixin(PlayerInventory.class)
|
||||
public interface PlayerInventoryAccessor {
|
||||
@Accessor("selectedSlot")
|
||||
int getSelectedSlot();
|
||||
|
||||
@Accessor("selectedSlot")
|
||||
void setSelectedSlot(int slot);
|
||||
}
|
||||
@@ -14,4 +14,11 @@ public interface PlayerMoveC2SPacketAccessor {
|
||||
@Mutable
|
||||
@Accessor("z")
|
||||
void setZ(double z);
|
||||
}
|
||||
|
||||
@Mutable
|
||||
@Accessor("y")
|
||||
void setY(double y);
|
||||
|
||||
@Accessor("y")
|
||||
double getY();
|
||||
}
|
||||
@@ -9,11 +9,17 @@ import org.spongepowered.asm.mixin.injection.ModifyVariable;
|
||||
|
||||
@Mixin(TexturedRenderLayers.class)
|
||||
public class TexturedRenderLayersMixin {
|
||||
@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) {
|
||||
@ModifyVariable(
|
||||
method = "getChestTextureId",
|
||||
at = @At("HEAD"),
|
||||
ordinal = 0,
|
||||
argsOnly = true
|
||||
)
|
||||
private static boolean christmas(boolean christmas) {
|
||||
Rendering rendering = Modules.get().get(Rendering.class);
|
||||
if (rendering != null && rendering.chistmas())
|
||||
if (rendering != null && rendering.chistmas()) {
|
||||
return true;
|
||||
}
|
||||
return christmas;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
package anticope.rejects.mixin.meteor.modules;
|
||||
|
||||
import anticope.rejects.modules.ShieldBypass;
|
||||
// import anticope.rejects.modules.ShieldBypass;
|
||||
import anticope.rejects.utils.RejectsUtils;
|
||||
import meteordevelopment.meteorclient.events.Cancellable;
|
||||
import meteordevelopment.meteorclient.events.world.TickEvent;
|
||||
@@ -123,18 +123,19 @@ public class KillAuraMixin extends Module {
|
||||
hitTimer -= random.nextInt(randomDelayMax.get());
|
||||
}
|
||||
|
||||
@Inject(method = "attack", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/network/ClientPlayerInteractionManager;attackEntity(Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/entity/Entity;)V"), cancellable = true)
|
||||
private void onHit(Entity target, CallbackInfo info) {
|
||||
ShieldBypass shieldBypass = Modules.get().get(ShieldBypass.class);
|
||||
if (shieldBypass.isActive()) {
|
||||
Cancellable dummyEvent = new Cancellable();
|
||||
shieldBypass.bypass(target, dummyEvent);
|
||||
if (dummyEvent.isCancelled()) {
|
||||
hitTimer = 0;
|
||||
info.cancel();
|
||||
}
|
||||
}
|
||||
}
|
||||
// ShieldBypass desabilitado temporariamente
|
||||
// @Inject(method = "attack", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/network/ClientPlayerInteractionManager;attackEntity(Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/entity/Entity;)V"), cancellable = true)
|
||||
// private void onHit(Entity target, CallbackInfo info) {
|
||||
// ShieldBypass shieldBypass = Modules.get().get(ShieldBypass.class);
|
||||
// if (shieldBypass.isActive()) {
|
||||
// Cancellable dummyEvent = new Cancellable();
|
||||
// shieldBypass.bypass(target, dummyEvent);
|
||||
// if (dummyEvent.isCancelled()) {
|
||||
// hitTimer = 0;
|
||||
// info.cancel();
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
private double randomOffset() {
|
||||
return Math.random() * 4 - 2;
|
||||
|
||||
Reference in New Issue
Block a user