mirror of
https://github.com/Miasmusa/Shadow.git
synced 2024-11-14 19:04:54 -05:00
hah
This commit is contained in:
parent
0d1e20b433
commit
15cabbc4b3
23 changed files with 85 additions and 41 deletions
|
@ -0,0 +1,44 @@
|
|||
/*
|
||||
* Copyright (c) Shadow client, 0x150, Saturn5VFive 2022. All rights reserved.
|
||||
*/
|
||||
|
||||
package net.shadow.client.feature.module.impl.crash;
|
||||
|
||||
import net.minecraft.client.util.math.MatrixStack;
|
||||
import net.shadow.client.feature.module.Module;
|
||||
import net.shadow.client.feature.module.ModuleType;
|
||||
|
||||
public class LoominaCrash extends Module {
|
||||
|
||||
public LoominaCrash() {
|
||||
super("Loomina", "make infinitely big items with a loom", ModuleType.CRASH);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void tick() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void enable() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void disable() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getContext() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onWorldRender(MatrixStack matrices) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onHudRender() {
|
||||
|
||||
}
|
||||
}
|
|
@ -18,7 +18,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
|||
public abstract class AEntityRendererMixin<T extends Entity> {
|
||||
|
||||
@Inject(method = "renderLabelIfPresent", at = @At("HEAD"), cancellable = true)
|
||||
public void atomic_renderEntityLabel(T entity, Text text, MatrixStack matrices, VertexConsumerProvider vertexConsumers, int light, CallbackInfo ci) {
|
||||
public void renderEntityLabel(T entity, Text text, MatrixStack matrices, VertexConsumerProvider vertexConsumers, int light, CallbackInfo ci) {
|
||||
if (entity.getCustomName() != null && entity.getCustomName().equals(Text.of("DoNotRenderThisUsernamePlease"))) {
|
||||
ci.cancel();
|
||||
}
|
||||
|
|
|
@ -42,7 +42,7 @@ public abstract class AGenericContainerScreenMixin {
|
|||
}
|
||||
|
||||
@Inject(method = "tick", at = @At("HEAD"))
|
||||
public void atomic_preTick(CallbackInfo ci) {
|
||||
public void preTick(CallbackInfo ci) {
|
||||
if (!ModuleRegistry.getByClass(InventoryWalk.class).isEnabled()) {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
|||
@Mixin(InGameHud.class)
|
||||
public abstract class AInGameHudMixin extends DrawableHelper {
|
||||
@Inject(method = "render", at = @At("RETURN"))
|
||||
public void atomic_postRender(MatrixStack matrices, float tickDelta, CallbackInfo ci) {
|
||||
public void postRender(MatrixStack matrices, float tickDelta, CallbackInfo ci) {
|
||||
AccurateFrameRateCounter.globalInstance.recordFrame();
|
||||
MSAAFramebuffer.use(MSAAFramebuffer.MAX_SAMPLES, () -> {
|
||||
for (Module module : ModuleRegistry.getModules()) {
|
||||
|
|
|
@ -21,7 +21,7 @@ public class BlockEntityRenderDispatcherMixin {
|
|||
|
||||
@Inject(method = "render(Lnet/minecraft/block/entity/BlockEntity;FLnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/render/VertexConsumerProvider;)V", at = @At("HEAD"),
|
||||
cancellable = true)
|
||||
public <E extends BlockEntity> void atomic_preRender(E blockEntity, float tickDelta, MatrixStack matrix, VertexConsumerProvider vertexConsumerProvider, CallbackInfo ci) {
|
||||
public <E extends BlockEntity> void preRender(E blockEntity, float tickDelta, MatrixStack matrix, VertexConsumerProvider vertexConsumerProvider, CallbackInfo ci) {
|
||||
if (Events.fireEvent(EventType.BLOCK_ENTITY_RENDER, new BlockEntityRenderEvent(matrix, blockEntity))) {
|
||||
ci.cancel();
|
||||
}
|
||||
|
|
|
@ -22,14 +22,14 @@ import java.util.Objects;
|
|||
public class BlockMixin {
|
||||
|
||||
@Inject(method = "shouldDrawSide", at = @At("HEAD"), cancellable = true)
|
||||
private static void atomic_overwriteShouldDrawSide(BlockState state, BlockView world, BlockPos pos, Direction side, BlockPos blockPos, CallbackInfoReturnable<Boolean> cir) {
|
||||
private static void overwriteShouldDrawSide(BlockState state, BlockView world, BlockPos pos, Direction side, BlockPos blockPos, CallbackInfoReturnable<Boolean> cir) {
|
||||
if (Objects.requireNonNull(ModuleRegistry.getByClass(XRAY.class)).isEnabled()) {
|
||||
cir.setReturnValue(XRAY.blocks.contains(state.getBlock()));
|
||||
}
|
||||
}
|
||||
|
||||
@Inject(method = "isTranslucent", at = @At("HEAD"), cancellable = true)
|
||||
public void atomic_overwriteIsTranslucent(BlockState state, BlockView world, BlockPos pos, CallbackInfoReturnable<Boolean> cir) {
|
||||
public void overwriteIsTranslucent(BlockState state, BlockView world, BlockPos pos, CallbackInfoReturnable<Boolean> cir) {
|
||||
if (Objects.requireNonNull(ModuleRegistry.getByClass(XRAY.class)).isEnabled()) {
|
||||
cir.setReturnValue(!XRAY.blocks.contains(state.getBlock()));
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@ import java.util.Random;
|
|||
public class BlockRenderManagerMixin {
|
||||
|
||||
@Inject(method = "renderBlock", at = @At("HEAD"), cancellable = true)
|
||||
public void atomic_dispatchRenderBlock(BlockState state, BlockPos pos, BlockRenderView world, MatrixStack matrix, VertexConsumer vertexConsumer, boolean cull, Random random, CallbackInfoReturnable<Boolean> cir) {
|
||||
public void dispatchRenderBlock(BlockState state, BlockPos pos, BlockRenderView world, MatrixStack matrix, VertexConsumer vertexConsumer, boolean cull, Random random, CallbackInfoReturnable<Boolean> cir) {
|
||||
if (Events.fireEvent(EventType.BLOCK_RENDER, new BlockRenderingEvent(matrix, pos, state))) {
|
||||
cir.setReturnValue(true);
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@ import java.net.InetSocketAddress;
|
|||
public class ClientConnection1Mixin {
|
||||
|
||||
@Inject(method = "initChannel(Lio/netty/channel/Channel;)V", at = @At("HEAD"))
|
||||
public void atomic_applyProxy(Channel channel, CallbackInfo ci) {
|
||||
public void applyProxy(Channel channel, CallbackInfo ci) {
|
||||
ProxyManagerScreen.Proxy currentProxy = ProxyManagerScreen.currentProxy;
|
||||
if (currentProxy != null) {
|
||||
if (currentProxy.socks4()) {
|
||||
|
|
|
@ -22,21 +22,21 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
|||
public class ClientConnectionMixin {
|
||||
|
||||
@Inject(method = "handlePacket", at = @At("HEAD"), cancellable = true)
|
||||
private static <T extends PacketListener> void atomic_dispatchPacketGet(Packet<T> packet, PacketListener listener, CallbackInfo ci) {
|
||||
private static <T extends PacketListener> void dispatchPacketGet(Packet<T> packet, PacketListener listener, CallbackInfo ci) {
|
||||
if (Events.fireEvent(EventType.PACKET_RECEIVE, new PacketEvent(packet))) {
|
||||
ci.cancel();
|
||||
}
|
||||
}
|
||||
|
||||
@Inject(method = "exceptionCaught", at = @At("HEAD"), cancellable = true)
|
||||
public void atomic_catchException(ChannelHandlerContext context, Throwable ex, CallbackInfo ci) {
|
||||
public void catchException(ChannelHandlerContext context, Throwable ex, CallbackInfo ci) {
|
||||
if (ModuleRegistry.getByClass(AntiPacketKick.class).isEnabled()) {
|
||||
ci.cancel();
|
||||
}
|
||||
}
|
||||
|
||||
@Inject(method = "send(Lnet/minecraft/network/Packet;)V", cancellable = true, at = @At("HEAD"))
|
||||
public void atomic_dispatchPacketSend(Packet<?> packet, CallbackInfo ci) {
|
||||
public void dispatchPacketSend(Packet<?> packet, CallbackInfo ci) {
|
||||
if (Events.fireEvent(EventType.PACKET_SEND, new PacketEvent(packet))) {
|
||||
ci.cancel();
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@ import java.util.Objects;
|
|||
@Mixin(ClientPlayerEntity.class)
|
||||
public class ClientPlayerEntityMixin {
|
||||
@Inject(method = "tick", at = @At("HEAD"))
|
||||
public void atomic_preTick(CallbackInfo ci) {
|
||||
public void preTick(CallbackInfo ci) {
|
||||
Utils.TickManager.tick();
|
||||
if (!ConfigManager.enabled) {
|
||||
ConfigManager.enableModules();
|
||||
|
@ -38,12 +38,12 @@ public class ClientPlayerEntityMixin {
|
|||
}
|
||||
|
||||
@Redirect(method = "updateNausea", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/screen/Screen;shouldPause()Z"))
|
||||
public boolean atomic_overwriteIsPauseScreen(Screen screen) {
|
||||
public boolean overwriteIsPauseScreen(Screen screen) {
|
||||
return Objects.requireNonNull(ModuleRegistry.getByClass(PortalGUI.class)).isEnabled() || screen.shouldPause();
|
||||
}
|
||||
|
||||
@Inject(method = "pushOutOfBlocks", at = @At("HEAD"), cancellable = true)
|
||||
public void atomic_preventPushOutFromBlocks(double x, double z, CallbackInfo ci) {
|
||||
public void preventPushOutFromBlocks(double x, double z, CallbackInfo ci) {
|
||||
if (Objects.requireNonNull(ModuleRegistry.getByClass(Freecam.class)).isEnabled() || Objects.requireNonNull(ModuleRegistry.getByClass(NoPush.class))
|
||||
.isEnabled() || Objects.requireNonNull(ModuleRegistry.getByClass(Phase.class)).isEnabled()) {
|
||||
ci.cancel();
|
||||
|
|
|
@ -22,7 +22,7 @@ public class ClientPlayerInteractionManagerMixin {
|
|||
|
||||
@Redirect(method = "updateBlockBreakingProgress",
|
||||
at = @At(value = "FIELD", target = "Lnet/minecraft/client/network/ClientPlayerInteractionManager;blockBreakingCooldown:I", opcode = Opcodes.GETFIELD, ordinal = 0))
|
||||
public int atomic_overwriteCooldown(ClientPlayerInteractionManager clientPlayerInteractionManager) {
|
||||
public int overwriteCooldown(ClientPlayerInteractionManager clientPlayerInteractionManager) {
|
||||
int cd = this.blockBreakingCooldown;
|
||||
return Objects.requireNonNull(ModuleRegistry.getByClass(NoBreakDelay.class)).isEnabled() ? 0 : cd;
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ public class Deadmau5FeatureRendererMixin {
|
|||
|
||||
@Redirect(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 = "Ljava/lang/String;equals(Ljava/lang/Object;)Z"))
|
||||
boolean atomic_overwriteNameMatcher(String s, Object anObject) {
|
||||
boolean overwriteNameMatcher(String s, Object anObject) {
|
||||
if (ModuleRegistry.getByClass(MouseEars.class).isEnabled()) {
|
||||
return true;
|
||||
}
|
||||
|
@ -27,7 +27,7 @@ public class Deadmau5FeatureRendererMixin {
|
|||
|
||||
@Redirect(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/network/AbstractClientPlayerEntity;hasSkinTexture()Z"))
|
||||
boolean atomic_overwriteSkinTexture(AbstractClientPlayerEntity abstractClientPlayerEntity) {
|
||||
boolean overwriteSkinTexture(AbstractClientPlayerEntity abstractClientPlayerEntity) {
|
||||
if (ModuleRegistry.getByClass(MouseEars.class).isEnabled()) {
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@ public abstract class EntityMixin {
|
|||
}
|
||||
|
||||
@Redirect(method = "updateVelocity", at = @At(value = "INVOKE", target = "net/minecraft/entity/Entity.getYaw()F"))
|
||||
float atomic_overwriteFreelookYaw(Entity instance) {
|
||||
float overwriteFreelookYaw(Entity instance) {
|
||||
return instance.equals(ShadowMain.client.player) && ModuleRegistry.getByClass(FreeLook.class).isEnabled() ? ModuleRegistry.getByClass(FreeLook.class).newyaw : instance.getYaw();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
|||
public class EntityRenderDispatcherMixin {
|
||||
|
||||
@Inject(method = "render", at = @At("HEAD"), cancellable = true)
|
||||
public <E extends Entity> void atomic_dispatchEntityRender(E entity, double x, double y, double z, float yaw, float tickDelta, MatrixStack matrices, VertexConsumerProvider vertexConsumers, int light, CallbackInfo ci) {
|
||||
public <E extends Entity> void dispatchEntityRender(E entity, double x, double y, double z, float yaw, float tickDelta, MatrixStack matrices, VertexConsumerProvider vertexConsumers, int light, CallbackInfo ci) {
|
||||
if (Events.fireEvent(EventType.ENTITY_RENDER, new EntityRenderEvent(matrices, entity))) {
|
||||
ci.cancel();
|
||||
}
|
||||
|
|
|
@ -39,7 +39,7 @@ public class GameRendererMixin {
|
|||
private boolean dis;
|
||||
|
||||
@Inject(at = @At(value = "FIELD", target = "Lnet/minecraft/client/render/GameRenderer;renderHand:Z", opcode = Opcodes.GETFIELD, ordinal = 0), method = "renderWorld")
|
||||
void atomic_dispatchWorldRender(float tickDelta, long limitTime, MatrixStack matrix, CallbackInfo ci) {
|
||||
void dispatchWorldRender(float tickDelta, long limitTime, MatrixStack matrix, CallbackInfo ci) {
|
||||
if (vb) {
|
||||
ShadowMain.client.options.bobView = true;
|
||||
vb = false;
|
||||
|
@ -76,12 +76,12 @@ public class GameRendererMixin {
|
|||
}
|
||||
|
||||
@Inject(at = @At("HEAD"), method = "renderWorld")
|
||||
private void atomic_preRenderWorld(float tickDelta, long limitTime, MatrixStack matrix, CallbackInfo ci) {
|
||||
private void preRenderWorld(float tickDelta, long limitTime, MatrixStack matrix, CallbackInfo ci) {
|
||||
dis = true;
|
||||
}
|
||||
|
||||
@Inject(at = @At("HEAD"), method = "bobView", cancellable = true)
|
||||
private void atomic_stopCursorBob(MatrixStack matrices, float f, CallbackInfo ci) {
|
||||
private void stopCursorBob(MatrixStack matrices, float f, CallbackInfo ci) {
|
||||
if (ShadowMain.client.options.bobView && dis) {
|
||||
vb = true;
|
||||
ShadowMain.client.options.bobView = false;
|
||||
|
@ -91,7 +91,7 @@ public class GameRendererMixin {
|
|||
}
|
||||
|
||||
@Redirect(at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/Entity;raycast(DFZ)Lnet/minecraft/util/hit/HitResult;"), method = "updateTargetedEntity")
|
||||
HitResult atomic_replaceFreelookHitResult(Entity instance, double maxDistance, float tickDelta, boolean includeFluids) {
|
||||
HitResult replaceFreelookHitResult(Entity instance, double maxDistance, float tickDelta, boolean includeFluids) {
|
||||
if (ModuleRegistry.getByClass(FreeLook.class).isEnabled()) {
|
||||
Vec3d vec3d = instance.getCameraPosVec(tickDelta);
|
||||
Vec3d vec3d2 = Utils.Math.getRotationVector(Rotations.getClientPitch(), Rotations.getClientYaw());
|
||||
|
@ -103,7 +103,7 @@ public class GameRendererMixin {
|
|||
}
|
||||
|
||||
@Inject(method = "getFov", at = @At("RETURN"), cancellable = true)
|
||||
public void atomic_overwriteFov(Camera camera, float tickDelta, boolean changingFov, CallbackInfoReturnable<Double> cir) {
|
||||
public void overwriteFov(Camera camera, float tickDelta, boolean changingFov, CallbackInfoReturnable<Double> cir) {
|
||||
double zv = ModuleRegistry.getByClass(Zoom.class).getZoomValue(cir.getReturnValue());
|
||||
cir.setReturnValue(zv);
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@ import java.util.List;
|
|||
public class ItemStackMixin {
|
||||
|
||||
@Inject(method = "getTooltip", at = @At("RETURN"), cancellable = true)
|
||||
void atomic_dispatchTooltipRender(PlayerEntity player, TooltipContext context, CallbackInfoReturnable<List<Text>> cir) {
|
||||
void dispatchTooltipRender(PlayerEntity player, TooltipContext context, CallbackInfoReturnable<List<Text>> cir) {
|
||||
List<Text> cval = cir.getReturnValue();
|
||||
LoreQueryEvent event = new LoreQueryEvent((ItemStack) (Object) this, cval);
|
||||
Events.fireEvent(EventType.LORE_QUERY, event);
|
||||
|
|
|
@ -28,7 +28,7 @@ public class KeyboardMixin {
|
|||
private MinecraftClient client;
|
||||
|
||||
@Inject(method = "onKey", at = @At("RETURN"))
|
||||
void atomic_postKeyPressed(long window, int key, int scancode, int action, int modifiers, CallbackInfo ci) {
|
||||
void postKeyPressed(long window, int key, int scancode, int action, int modifiers, CallbackInfo ci) {
|
||||
if (window == this.client.getWindow()
|
||||
.getHandle() && ShadowMain.client.currentScreen == null && System.currentTimeMillis() - ShadowMain.lastScreenChange > 10) { // make sure we are in game and the screen has been there for at least 10 ms
|
||||
if (ShadowMain.client.player == null || ShadowMain.client.world == null) {
|
||||
|
|
|
@ -28,7 +28,7 @@ import java.util.Objects;
|
|||
@Mixin(LivingEntity.class)
|
||||
public class LivingEntityMixin {
|
||||
@Inject(method = "onAttacking", at = @At("HEAD"))
|
||||
public void atomic_setLastAttacked(Entity target, CallbackInfo ci) {
|
||||
public void setLastAttacked(Entity target, CallbackInfo ci) {
|
||||
if (this.equals(ShadowMain.client.player) && target instanceof LivingEntity entity) {
|
||||
AttackManager.registerLastAttacked(entity);
|
||||
}
|
||||
|
@ -39,7 +39,7 @@ public class LivingEntityMixin {
|
|||
// instance.setVelocity(x,y,z);
|
||||
// }
|
||||
@Inject(method = "canWalkOnFluid", at = @At("HEAD"), cancellable = true)
|
||||
public void atomic_overwriteCanWalkOnFluid(FluidState fluidState, CallbackInfoReturnable<Boolean> cir) {
|
||||
public void overwriteCanWalkOnFluid(FluidState fluidState, CallbackInfoReturnable<Boolean> cir) {
|
||||
if (ShadowMain.client.player == null) {
|
||||
return;
|
||||
}
|
||||
|
@ -53,7 +53,7 @@ public class LivingEntityMixin {
|
|||
}
|
||||
|
||||
@Redirect(method = "travel", at = @At(value = "INVOKE", target = "net/minecraft/entity/LivingEntity.hasStatusEffect(Lnet/minecraft/entity/effect/StatusEffect;)Z"))
|
||||
boolean atomic_stopLevitationEffect(LivingEntity instance, StatusEffect effect) {
|
||||
boolean stopLevitationEffect(LivingEntity instance, StatusEffect effect) {
|
||||
if (instance.equals(ShadowMain.client.player) && ModuleRegistry.getByClass(NoLevitation.class).isEnabled() && effect == StatusEffects.LEVITATION) {
|
||||
return false;
|
||||
} else {
|
||||
|
@ -62,7 +62,7 @@ public class LivingEntityMixin {
|
|||
}
|
||||
|
||||
@Inject(method = "pushAwayFrom", at = @At("HEAD"), cancellable = true)
|
||||
public void atomic_cancelPush(Entity entity, CallbackInfo ci) {
|
||||
public void cancelPush(Entity entity, CallbackInfo ci) {
|
||||
if (this.equals(ShadowMain.client.player)) {
|
||||
if (Objects.requireNonNull(ModuleRegistry.getByClass(NoPush.class)).isEnabled()) {
|
||||
ci.cancel();
|
||||
|
@ -71,7 +71,7 @@ public class LivingEntityMixin {
|
|||
}
|
||||
|
||||
@Redirect(method = "jump", at = @At(value = "INVOKE", target = "net/minecraft/entity/LivingEntity.getYaw()F"))
|
||||
private float atomic_overwriteFreelookYaw(LivingEntity instance) {
|
||||
private float overwriteFreelookYaw(LivingEntity instance) {
|
||||
if (instance.equals(ShadowMain.client.player) && ModuleRegistry.getByClass(FreeLook.class).isEnabled()) {
|
||||
return ModuleRegistry.getByClass(FreeLook.class).newyaw;
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@ public class LivingEntityRendererMixin {
|
|||
|
||||
@ModifyVariable(method = "render(Lnet/minecraft/entity/LivingEntity;FFLnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/render/VertexConsumerProvider;I)V", ordinal = 2,
|
||||
at = @At(value = "STORE", ordinal = 0))
|
||||
public float atomic_overwriteYaw(float oldValue, LivingEntity le) {
|
||||
public float overwriteYaw(float oldValue, LivingEntity le) {
|
||||
if (Rotations.isEnabled() && le.equals(ShadowMain.client.player)) {
|
||||
return Rotations.getClientYaw();
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ public class LivingEntityRendererMixin {
|
|||
|
||||
@ModifyVariable(method = "render(Lnet/minecraft/entity/LivingEntity;FFLnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/render/VertexConsumerProvider;I)V", ordinal = 3,
|
||||
at = @At(value = "STORE", ordinal = 0))
|
||||
public float atomic_overwriteHeadYaw(float oldValue, LivingEntity le) {
|
||||
public float overwriteHeadYaw(float oldValue, LivingEntity le) {
|
||||
if (le.equals(ShadowMain.client.player) && Rotations.isEnabled()) {
|
||||
return Rotations.getClientYaw();
|
||||
}
|
||||
|
@ -35,7 +35,7 @@ public class LivingEntityRendererMixin {
|
|||
|
||||
@ModifyVariable(method = "render(Lnet/minecraft/entity/LivingEntity;FFLnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/render/VertexConsumerProvider;I)V", ordinal = 5,
|
||||
at = @At(value = "STORE", ordinal = 3))
|
||||
public float atomic_overwritePitch(float oldValue, LivingEntity le) {
|
||||
public float overwritePitch(float oldValue, LivingEntity le) {
|
||||
if (le.equals(ShadowMain.client.player) && Rotations.isEnabled()) {
|
||||
return Rotations.getClientPitch();
|
||||
}
|
||||
|
|
|
@ -32,17 +32,17 @@ public class MinecraftClientMixin {
|
|||
}
|
||||
|
||||
@Inject(method = "<init>", at = @At("TAIL"))
|
||||
void atomic_postInit(RunArgs args, CallbackInfo ci) {
|
||||
void postInit(RunArgs args, CallbackInfo ci) {
|
||||
ShadowMain.INSTANCE.postWindowInit();
|
||||
}
|
||||
|
||||
@Inject(method = "setScreen", at = @At("HEAD"))
|
||||
void atomic_preSetScreen(Screen screen, CallbackInfo ci) {
|
||||
void preSetScreen(Screen screen, CallbackInfo ci) {
|
||||
ShadowMain.lastScreenChange = System.currentTimeMillis();
|
||||
}
|
||||
|
||||
@Redirect(method = "handleInputEvents", at = @At(value = "FIELD", opcode = Opcodes.GETFIELD, target = "Lnet/minecraft/client/MinecraftClient;itemUseCooldown:I"))
|
||||
public int atomic_replaceItemUseCooldown(MinecraftClient minecraftClient) {
|
||||
public int replaceItemUseCooldown(MinecraftClient minecraftClient) {
|
||||
if (Objects.requireNonNull(ModuleRegistry.getByClass(FastUse.class)).isEnabled()) {
|
||||
return 0;
|
||||
} else {
|
||||
|
|
|
@ -18,7 +18,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
|||
public class MouseMixin {
|
||||
|
||||
@Inject(method = "onMouseButton", at = @At("HEAD"), cancellable = true)
|
||||
public void atomic_dispatchMouseEvent(long window, int button, int action, int mods, CallbackInfo ci) {
|
||||
public void dispatchMouseEvent(long window, int button, int action, int mods, CallbackInfo ci) {
|
||||
if (window == ShadowMain.client.getWindow().getHandle()) {
|
||||
if (Events.fireEvent(EventType.MOUSE_EVENT, new MouseEvent(button, action))) {
|
||||
ci.cancel();
|
||||
|
|
|
@ -23,7 +23,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
|||
@Mixin(PlayerEntity.class)
|
||||
public class PlayerEntityMixin {
|
||||
@Redirect(method = "tick", at = @At(value = "FIELD", target = "Lnet/minecraft/entity/player/PlayerEntity;noClip:Z", opcode = Opcodes.PUTFIELD))
|
||||
void atomic_tickNoClip(PlayerEntity playerEntity, boolean value) {
|
||||
void tickNoClip(PlayerEntity playerEntity, boolean value) {
|
||||
PlayerNoClipQueryEvent q = new PlayerNoClipQueryEvent(playerEntity);
|
||||
Events.fireEvent(EventType.NOCLIP_QUERY, q);
|
||||
playerEntity.noClip = q.getNoClip();
|
||||
|
@ -39,7 +39,7 @@ public class PlayerEntityMixin {
|
|||
}
|
||||
|
||||
@Inject(method = "jump", at = @At("RETURN"))
|
||||
void atomic_applyLongJump(CallbackInfo ci) {
|
||||
void applyLongJump(CallbackInfo ci) {
|
||||
if (!this.equals(ShadowMain.client.player)) {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
|||
public class SharedConstantsMixin {
|
||||
|
||||
@Inject(method = "isValidChar", at = @At("HEAD"), cancellable = true)
|
||||
private static void atomic_replaceValidChar(char chr, CallbackInfoReturnable<Boolean> cir) {
|
||||
private static void replaceValidChar(char chr, CallbackInfoReturnable<Boolean> cir) {
|
||||
if (ModuleRegistry.getByClass(AllowFormatCodes.class).isEnabled() && chr == '§') {
|
||||
cir.setReturnValue(true);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue