-
Notifications
You must be signed in to change notification settings - Fork 21
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
1 parent
40ce286
commit 865f5df
Showing
8 changed files
with
140 additions
and
2 deletions.
There are no files selected for viewing
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
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
23 changes: 23 additions & 0 deletions
23
src/main/java/io/github/itzispyder/clickcrystals/mixins/CameraMixin.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,23 @@ | ||
package io.github.itzispyder.clickcrystals.mixins; | ||
|
||
import io.github.itzispyder.clickcrystals.modules.Module; | ||
import io.github.itzispyder.clickcrystals.modules.modules.NoGameOverlay; | ||
import net.minecraft.client.render.Camera; | ||
import net.minecraft.client.render.CameraSubmersionType; | ||
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 for the camera or player screen perspectives | ||
*/ | ||
@Mixin(Camera.class) | ||
public abstract class CameraMixin { | ||
|
||
@Inject(method = "getSubmersionType", at = @At("RETURN"), cancellable = true) | ||
public void getSubmersionType(CallbackInfoReturnable<CameraSubmersionType> cir) { | ||
Module noOverlay = Module.get(NoGameOverlay.class); | ||
if (noOverlay.isEnabled()) cir.setReturnValue(CameraSubmersionType.NONE); | ||
} | ||
} |
43 changes: 43 additions & 0 deletions
43
src/main/java/io/github/itzispyder/clickcrystals/mixins/GameHudMixin.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,43 @@ | ||
package io.github.itzispyder.clickcrystals.mixins; | ||
|
||
import io.github.itzispyder.clickcrystals.modules.Module; | ||
import io.github.itzispyder.clickcrystals.modules.modules.NoGameOverlay; | ||
import net.minecraft.client.gui.hud.InGameHud; | ||
import net.minecraft.entity.Entity; | ||
import net.minecraft.util.Identifier; | ||
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 for the in game hud | ||
*/ | ||
@Mixin(InGameHud.class) | ||
public abstract class GameHudMixin { | ||
|
||
@Inject(method = "renderSpyglassOverlay", at = @At("HEAD"), cancellable = true) | ||
public void renderSpyglassOverlay(float scale, CallbackInfo ci) { | ||
Module noOverlay = Module.get(NoGameOverlay.class); | ||
if (noOverlay.isEnabled()) ci.cancel(); | ||
} | ||
|
||
@Inject(method = "renderPortalOverlay", at = @At("HEAD"), cancellable = true) | ||
public void renderPortalOverlay(float scale, CallbackInfo ci) { | ||
Module noOverlay = Module.get(NoGameOverlay.class); | ||
if (noOverlay.isEnabled()) ci.cancel(); | ||
} | ||
|
||
@Inject(method = "renderVignetteOverlay", at = @At("HEAD"), cancellable = true) | ||
public void renderVignetteOverlay(Entity entity, CallbackInfo ci) { | ||
Module noOverlay = Module.get(NoGameOverlay.class); | ||
if (noOverlay.isEnabled()) ci.cancel(); | ||
} | ||
|
||
@Inject(method = "renderOverlay", at = @At("HEAD"), cancellable = true) | ||
public void renderOverlay(Identifier texture, float opacity, CallbackInfo ci) { | ||
if (!texture.getPath().contains("pumpkinblur")) return; | ||
Module noOverlay = Module.get(NoGameOverlay.class); | ||
if (noOverlay.isEnabled()) ci.cancel(); | ||
} | ||
} |
37 changes: 37 additions & 0 deletions
37
src/main/java/io/github/itzispyder/clickcrystals/mixins/GameOverlayMixin.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,37 @@ | ||
package io.github.itzispyder.clickcrystals.mixins; | ||
|
||
import io.github.itzispyder.clickcrystals.modules.Module; | ||
import io.github.itzispyder.clickcrystals.modules.modules.NoGameOverlay; | ||
import net.minecraft.client.MinecraftClient; | ||
import net.minecraft.client.gui.hud.InGameOverlayRenderer; | ||
import net.minecraft.client.texture.Sprite; | ||
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 for rendering in game overlays | ||
*/ | ||
@Mixin(InGameOverlayRenderer.class) | ||
public abstract class GameOverlayMixin { | ||
|
||
@Inject(method = "renderFireOverlay", at = @At("HEAD"), cancellable = true) | ||
private static void renderFireOverlay(MinecraftClient client, MatrixStack matrices, CallbackInfo ci) { | ||
Module noOverlay = Module.get(NoGameOverlay.class); | ||
if (noOverlay.isEnabled()) ci.cancel(); | ||
} | ||
|
||
@Inject(method = "renderUnderwaterOverlay", at = @At("HEAD"), cancellable = true) | ||
private static void renderUnderwaterOverlay(MinecraftClient client, MatrixStack matrices, CallbackInfo ci) { | ||
Module noOverlay = Module.get(NoGameOverlay.class); | ||
if (noOverlay.isEnabled()) ci.cancel(); | ||
} | ||
|
||
@Inject(method = "renderInWallOverlay", at = @At("HEAD"), cancellable = true) | ||
private static void renderInWallOverlay(Sprite sprite, MatrixStack matrices, CallbackInfo ci) { | ||
Module noOverlay = Module.get(NoGameOverlay.class); | ||
if (noOverlay.isEnabled()) ci.cancel(); | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
src/main/java/io/github/itzispyder/clickcrystals/modules/modules/NoGameOverlay.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,23 @@ | ||
package io.github.itzispyder.clickcrystals.modules.modules; | ||
|
||
import io.github.itzispyder.clickcrystals.modules.Module; | ||
|
||
/** | ||
* NoGameOverlay module | ||
*/ | ||
public class NoGameOverlay extends Module { | ||
|
||
public NoGameOverlay() { | ||
super("NoGameOverlay","See clearly under water and lava, and in blocks! No more overlays!"); | ||
} | ||
|
||
@Override | ||
protected void onEnable() { | ||
|
||
} | ||
|
||
@Override | ||
protected void onDisable() { | ||
|
||
} | ||
} |
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