-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated to Fabric 1.20.6, added HoleESP
- Loading branch information
Showing
21 changed files
with
170 additions
and
70 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
plugins { | ||
kotlin("jvm") apply false | ||
id("fabric-loom") apply false | ||
} |
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip | ||
validateDistributionUrl=true | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
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
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
38 changes: 38 additions & 0 deletions
38
progreso-client/src/main/java/org/progreso/client/mixins/render/MixinGameRenderer.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,38 @@ | ||
package org.progreso.client.mixins.render; | ||
|
||
import com.llamalad7.mixinextras.sugar.Local; | ||
import net.minecraft.client.render.GameRenderer; | ||
import net.minecraft.client.util.math.MatrixStack; | ||
import org.joml.Matrix4f; | ||
import org.objectweb.asm.Opcodes; | ||
import org.progreso.client.Client; | ||
import org.progreso.client.events.render.Render3DEvent; | ||
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(GameRenderer.class) | ||
public abstract class MixinGameRenderer { | ||
@Inject( | ||
method = "renderWorld(FJ)V", | ||
at = @At( | ||
value = "FIELD", | ||
target = "Lnet/minecraft/client/render/GameRenderer;renderHand:Z", | ||
opcode = Opcodes.GETFIELD, | ||
ordinal = 0 | ||
) | ||
) | ||
public void renderWorldHook( | ||
float tickDelta, | ||
long limitTime, | ||
CallbackInfo ci, | ||
@Local(ordinal = 1) Matrix4f matrix4f2 | ||
) { | ||
Client.getMc().getClient().getProfiler().push("progreso_render"); | ||
MatrixStack matrixStack = new MatrixStack(); | ||
matrixStack.multiplyPositionMatrix(matrix4f2); | ||
Client.EVENT_BUS.post(new Render3DEvent(matrixStack, tickDelta)); | ||
Client.getMc().getClient().getProfiler().pop(); | ||
} | ||
} |
35 changes: 0 additions & 35 deletions
35
progreso-client/src/main/java/org/progreso/client/mixins/render/MixinWorldRenderer.java
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
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
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
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
69 changes: 69 additions & 0 deletions
69
progreso-client/src/main/kotlin/org/progreso/client/modules/render/HoleESP.kt
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,69 @@ | ||
package org.progreso.client.modules.render | ||
|
||
import net.minecraft.block.Blocks | ||
import net.minecraft.util.math.BlockPos | ||
import net.minecraft.util.math.Box | ||
import net.minecraft.util.math.Direction | ||
import org.progreso.api.module.AbstractModule | ||
import org.progreso.client.Client.Companion.mc | ||
import org.progreso.client.events.misc.TickEvent | ||
import org.progreso.client.events.render.Render3DEvent | ||
import org.progreso.client.events.safeEventListener | ||
import org.progreso.client.gui.clickgui.element.elements.ColorElement.Companion.copy | ||
import org.progreso.client.util.render.* | ||
import org.progreso.client.util.world.getBlocksInRadius | ||
import java.awt.Color | ||
|
||
@AbstractModule.AutoRegister | ||
object HoleESP : AbstractModule() { | ||
private val DEFAULT_BOX = Box(0.0, 0.0, 0.0, 1.0, 1.0, 1.0) | ||
|
||
private val radius by setting("Radius", 5, 3..25) | ||
private val color by setting("Color", Color.RED) | ||
|
||
private val holeDirections = Direction.entries.filter { it != Direction.UP } | ||
private val holes = mutableListOf<BlockPos>() | ||
|
||
init { | ||
safeEventListener<TickEvent> { | ||
holes.clear() | ||
|
||
for (pos in mc.world.getBlocksInRadius(radius, mc.player.blockPos)) { | ||
if (isHole(pos)) { | ||
holes.add(pos) | ||
} | ||
} | ||
} | ||
|
||
safeEventListener<Render3DEvent> { event -> | ||
for (pos in holes) { | ||
render3D(event.matrices) { | ||
withPosition(pos) { | ||
withColor(color.copy(50)) { | ||
drawSolidBox(DEFAULT_BOX) | ||
} | ||
|
||
withColor(color.copy(100)) { | ||
drawOutlinedBox(DEFAULT_BOX) | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
private fun isHole(pos: BlockPos): Boolean { | ||
if (!isAir(pos)) return false | ||
if (!holeDirections.map { pos.offset(it) }.all { isObsidianOrBedrock(it) }) return false | ||
if (!isAir(pos.offset(Direction.UP))) return false | ||
return true | ||
} | ||
|
||
private fun isAir(pos: BlockPos): Boolean { | ||
return mc.world.getBlockState(pos).block == Blocks.AIR | ||
} | ||
|
||
private fun isObsidianOrBedrock(pos: BlockPos): Boolean { | ||
return mc.world.getBlockState(pos).block.let { it == Blocks.OBSIDIAN || it == Blocks.BEDROCK } | ||
} | ||
} |
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
Oops, something went wrong.