Skip to content

Commit

Permalink
Merged NoPush and SeeThroughBlocks into NoDebuff
Browse files Browse the repository at this point in the history
  • Loading branch information
odtheking committed May 2, 2024
1 parent 5340ce1 commit a132845
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 34 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package me.odinclient.mixin.mixins.entity;

import me.odinclient.features.impl.skyblock.NoPush;
import me.odinclient.features.impl.render.NoDebuff;
import net.minecraft.client.entity.EntityPlayerSP;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
Expand All @@ -10,6 +10,6 @@
abstract public class MixinEntityPlayerSP {
@Redirect(method = {"pushOutOfBlocks"}, at = @At(value = "FIELD", target = "Lnet/minecraft/client/entity/EntityPlayerSP;noClip:Z"))
public boolean shouldPrevent(EntityPlayerSP instance) {
return NoPush.INSTANCE.getEnabled();
return NoDebuff.INSTANCE.isNoPush();
}
}
2 changes: 1 addition & 1 deletion odinclient/src/main/kotlin/me/odinclient/ModCore.kt
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class ModCore {
SwapStonk, Arrows, ArrowAlign, CancelWrongTerms, HoverTerms, LightsDevice, SimonSays,
DioriteFucker, RelicAura, Trajectories, Ghosts, NoCarpet, NoDebuff, LockCursor,
ChocolateFactory, AutoExperiments, FarmingHitboxes, NoBlock, TermAC, Triggerbot, GhostBlocks, FreezeGame,
AbilityKeybind, EtherWarpHelper, ChestEsp, NoBreakReset, EscrowFix, TerminalMove, NoPush, SeeThroughBlocks,
AbilityKeybind, EtherWarpHelper, ChestEsp, NoBreakReset, EscrowFix, TerminalMove,
TerminalAura, AutoTerms, QueueTerms, Camera, AutoUlt
)
OdinMain.loadComplete()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ import net.minecraft.client.renderer.GlStateManager
import net.minecraft.network.play.server.S2APacketParticles
import net.minecraft.util.EnumParticleTypes
import net.minecraft.util.Vec3
import net.minecraftforge.client.event.*
import net.minecraftforge.client.event.EntityViewRenderEvent
import net.minecraftforge.client.event.RenderBlockOverlayEvent
import net.minecraftforge.client.event.RenderGameOverlayEvent
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent

object NoDebuff : Module(
Expand All @@ -23,6 +25,8 @@ object NoDebuff : Module(
private val noShieldParticles: Boolean by BooleanSetting("No Shield Particle", false, description = "Removes purple particles and wither impact hearts.")
private val antiWaterFOV: Boolean by BooleanSetting("No Water FOV", false, description = "Disable FOV change in water.")
private val noFire: Boolean by BooleanSetting("No Fire Overlay", false, description = "Disable Fire overlay on screen.")
private val noPush: Boolean by BooleanSetting("No Push", false, description = "Prevents from being pushed out of blocks.")
private val seeThroughBlocks: Boolean by BooleanSetting("See Through Blocks", false, description = "Makes blocks transparent.")

@SubscribeEvent
fun onRenderFog(event: EntityViewRenderEvent.FogDensity) {
Expand Down Expand Up @@ -62,4 +66,13 @@ object NoDebuff : Module(
fun onFire(event: RenderBlockOverlayEvent) {
if (event.overlayType == RenderBlockOverlayEvent.OverlayType.FIRE && noFire) event.isCanceled = true
}

@SubscribeEvent
fun onRenderBlockOverlay(event: RenderBlockOverlayEvent) {
if (event.overlayType == RenderBlockOverlayEvent.OverlayType.BLOCK && seeThroughBlocks) event.setCanceled(true)
}

fun isNoPush(): Boolean {
return noPush && enabled && mc.thePlayer.isSpectator && mc.thePlayer.heldItem == null
}
}

This file was deleted.

This file was deleted.

0 comments on commit a132845

Please sign in to comment.