-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
155 additions
and
65 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/client/java/dev/symo/finz/mixin/client/ClientPlayerInteractionManagerMixin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 0 additions & 20 deletions
20
src/client/java/dev/symo/finz/mixin/client/InputEventMixin.java
This file was deleted.
Oops, something went wrong.
31 changes: 31 additions & 0 deletions
31
src/client/java/dev/symo/finz/mixin/client/KeyBindingMixin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package dev.symo.finz.mixin.client; | ||
|
||
import dev.symo.finz.FinZClient; | ||
import dev.symo.finz.mixininterfaces.IKeyBind; | ||
import net.fabricmc.api.Environment; | ||
import net.minecraft.client.option.KeyBinding; | ||
import net.minecraft.client.util.InputUtil; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.Shadow; | ||
|
||
@Environment(net.fabricmc.api.EnvType.CLIENT) | ||
@Mixin(KeyBinding.class) | ||
public abstract class KeyBindingMixin implements IKeyBind { | ||
@Shadow | ||
private InputUtil.Key boundKey; | ||
|
||
@Override | ||
public boolean isActallyPressed() { | ||
long handle = FinZClient.mc.getWindow().getHandle(); | ||
int code = boundKey.getCode(); | ||
return InputUtil.isKeyPressed(handle, code); | ||
} | ||
|
||
@Override | ||
public void resetPressedState() { | ||
setPressed(isActallyPressed()); | ||
} | ||
|
||
@Shadow | ||
public abstract void setPressed(boolean pressed); | ||
} |
20 changes: 20 additions & 0 deletions
20
src/client/java/dev/symo/finz/mixin/client/WorldRendererMixin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package dev.symo.finz.mixin.client; | ||
|
||
import dev.symo.finz.modules.Modules; | ||
import net.minecraft.client.render.Camera; | ||
import net.minecraft.client.render.WorldRenderer; | ||
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(WorldRenderer.class) | ||
public class WorldRendererMixin { | ||
@Inject(at = @At("HEAD"), | ||
method = "hasBlindnessOrDarkness(Lnet/minecraft/client/render/Camera;)Z", | ||
cancellable = true) | ||
private void onHasBlindnessOrDarkness(Camera camera, CallbackInfoReturnable<Boolean> ci) { | ||
if (Modules.noBlindness.isEnabled()) | ||
ci.setReturnValue(false); | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
...mo/finz/tracker/BreakProgressTracker.java → ...mixininterfaces/BreakProgressTracker.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package dev.symo.finz.mixininterfaces; | ||
|
||
public interface IKeyBind { | ||
boolean isActallyPressed(); | ||
|
||
void resetPressedState(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
src/client/java/dev/symo/finz/modules/impl/AutoClicker.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package dev.symo.finz.modules.impl; | ||
|
||
import dev.symo.finz.events.listeners.TickListener; | ||
import dev.symo.finz.modules.AModule; | ||
import dev.symo.finz.util.Category; | ||
|
||
public class AutoClicker extends AModule implements TickListener { | ||
public AutoClicker() { | ||
super("Auto Clicker - Not implemented", Category.COMBAT); | ||
} | ||
|
||
@Override | ||
public void onTick() { | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package dev.symo.finz.modules.impl; | ||
|
||
import dev.symo.finz.mixininterfaces.IKeyBind; | ||
import dev.symo.finz.modules.AModule; | ||
import dev.symo.finz.util.Category; | ||
|
||
public class AutoSneak extends AModule { | ||
private boolean sneaking = false; | ||
|
||
public AutoSneak() { | ||
super("Auto Sneak", Category.MOVEMENT); | ||
} | ||
|
||
public void sneak(boolean clipping) { | ||
if (!isEnabled() || !mc.player.isOnGround()) { | ||
if (sneaking) setSneaking(false); | ||
return; | ||
} | ||
|
||
if (mc.world.isSpaceEmpty(mc.player, mc.player.getBoundingBox().stretch(0, -mc.player.getStepHeight(),0))) clipping = true; | ||
|
||
setSneaking(clipping); | ||
} | ||
|
||
private void setSneaking(boolean sneak) { | ||
if (sneak) mc.options.sneakKey.setPressed(true); | ||
else ((IKeyBind) mc.options.sneakKey).resetPressedState(); | ||
|
||
sneaking = sneak; | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
src/client/java/dev/symo/finz/modules/impl/NoBlindness.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package dev.symo.finz.modules.impl; | ||
|
||
import dev.symo.finz.modules.AModule; | ||
import dev.symo.finz.util.Category; | ||
|
||
public class NoBlindness extends AModule{ | ||
public NoBlindness() { | ||
super("No Blindness", Category.RENDER); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters