@@ -10,7 +10,10 @@ import net.ccbluex.liquidbounce.features.module.Module
1010import net.ccbluex.liquidbounce.features.module.Category
1111import net.ccbluex.liquidbounce.utils.block.BlockUtils.collideBlock
1212import net.ccbluex.liquidbounce.utils.block.block
13+ import net.ccbluex.liquidbounce.utils.movement.MovementUtils
14+ import net.ccbluex.liquidbounce.utils.timing.MSTimer
1315import net.minecraft.block.BlockLiquid
16+ import net.minecraft.client.settings.GameSettings
1417import net.minecraft.block.material.Material
1518import net.minecraft.init.Blocks
1619import net.minecraft.network.play.client.C03PacketPlayer
@@ -20,20 +23,60 @@ import org.lwjgl.input.Keyboard
2023
2124object Jesus : Module(" Jesus" , Category .MOVEMENT , Category .SubCategory .MOVEMENT_MAIN ,Keyboard .KEY_J ) {
2225
23- val mode by choices(" Mode" , arrayOf(" Vanilla" , " NCP" , " AAC" , " AAC3.3.11" , " AACFly" , " Spartan" , " Dolphin" ), " NCP" )
26+ val mode by choices(
27+ " Mode" ,
28+ arrayOf(
29+ " Vanilla" , " NCP" , " AAC" , " AAC3.3.11" , " AAC4.2.1" , " AACFly" , " Spartan" ,
30+ " Matrix" , " Jump" , " Legit" , " SilentYPort" , " Twillight" , " Vulcan" , " Dolphin"
31+ ),
32+ " NCP"
33+ )
2434 private val aacFly by float(" AACFlyMotion" , 0.5f , 0.1f .. 1f ) { mode == " AACFly" }
35+ private val jumpMotion by float(" Jump-Motion" , 0.5f , 0.1f .. 1f ) { mode == " Jump" }
36+ private val silentYPortUp by float(" SilentYPort-Up" , 0.1f , 0f .. 0.5f ) { mode == " SilentYPort" }
37+ private val silentYPortDown by float(" SilentYPort-Down" , 0.1f , 0f .. 0.5f ) { mode == " SilentYPort" }
38+ private val silentYPortSpeedModify by float(" SilentYPort-SpeedModify" , 1.0f , 0f .. 1.5f ) {
39+ mode == " SilentYPort"
40+ }
41+ private val silentYPortSpoofGround by boolean(" SilentYPort-SpoofGround" , false ) { mode == " SilentYPort" }
42+ private val silentYPortConvertGround by boolean(" SilentYPort-ConvertGround" , true ) { mode == " SilentYPort" }
43+ private val silentYPortConvertDelay by int(" SilentYPort-ConvertDelay" , 1000 , 0 .. 2000 ) {
44+ mode == " SilentYPort" && silentYPortConvertGround
45+ }
2546
2647 private val noJump by boolean(" NoJump" , false )
2748
2849 private var nextTick = false
50+ private var silentYPortNextTick = false
51+ private val silentYPortTimer = MSTimer ()
52+ private var vulcanStep = 0
53+
54+ private fun isLiquidBlock (bb : AxisAlignedBB = mc.thePlayer.entityBoundingBox): Boolean {
55+ return collideBlock(bb) { it is BlockLiquid }
56+ }
57+
58+ override fun onEnable () {
59+ nextTick = false
60+ silentYPortNextTick = false
61+ vulcanStep = 0
62+ silentYPortTimer.reset()
63+ }
64+
65+ override fun onDisable () {
66+ mc.thePlayer?.let {
67+ mc.gameSettings.keyBindJump.pressed = GameSettings .isKeyDown(mc.gameSettings.keyBindJump)
68+ }
69+ }
2970
3071 val onUpdate = handler<UpdateEvent > {
3172 val thePlayer = mc.thePlayer
3273
3374 if (thePlayer == null || thePlayer.isSneaking) return @handler
3475
76+ mc.gameSettings.keyBindJump.pressed = GameSettings .isKeyDown(mc.gameSettings.keyBindJump)
77+
3578 when (mode.lowercase()) {
36- " ncp" , " vanilla " -> if (collideBlock(thePlayer.entityBoundingBox) { it is BlockLiquid } && thePlayer.isInsideOfMaterial(
79+ " ncp" -> if (collideBlock(thePlayer.entityBoundingBox) { it is BlockLiquid } && thePlayer.isInsideOfMaterial(
3780 Material .air
3881 ) && ! thePlayer.isSneaking) thePlayer.motionY = 0.08
3982
@@ -59,6 +102,17 @@ object Jesus : Module("Jesus", Category.MOVEMENT, Category.SubCategory.MOVEMENT_
59102 if (thePlayer.hurtTime != 0 ) thePlayer.onGround = false
60103 }
61104
105+ " aac4.2.1" -> {
106+ val blockPos = thePlayer.position.down()
107+ if (! thePlayer.onGround && blockPos.block == Blocks .water || thePlayer.isInWater) {
108+ thePlayer.motionY * = 0.0
109+ thePlayer.jumpMovementFactor = 0.08f
110+ if (thePlayer.fallDistance <= 0 && thePlayer.isInWater) {
111+ mc.gameSettings.keyBindJump.pressed = true
112+ }
113+ }
114+ }
115+
62116 " spartan" -> if (thePlayer.isInWater) {
63117 if (thePlayer.isCollidedHorizontally) {
64118 thePlayer.motionY + = 0.15
@@ -78,6 +132,23 @@ object Jesus : Module("Jesus", Category.MOVEMENT, Category.SubCategory.MOVEMENT_
78132 thePlayer.motionZ * = 1.085
79133 }
80134
135+ " matrix" -> if (thePlayer.isInWater) {
136+ mc.gameSettings.keyBindJump.pressed = false
137+ if (thePlayer.isCollidedHorizontally) {
138+ thePlayer.motionY = 0.09
139+ return @handler
140+ }
141+ val block = BlockPos (thePlayer.posX, thePlayer.posY + 1 , thePlayer.posZ).block
142+ val blockUp = BlockPos (thePlayer.posX, thePlayer.posY + 1.1 , thePlayer.posZ).block
143+ if (blockUp is BlockLiquid ) {
144+ thePlayer.motionY = 0.1
145+ } else if (block is BlockLiquid ) {
146+ thePlayer.motionY = 0.0
147+ }
148+ thePlayer.motionX * = 1.15
149+ thePlayer.motionZ * = 1.15
150+ }
151+
81152 " aac3.3.11" -> if (thePlayer.isInWater) {
82153 thePlayer.motionX * = 1.17
83154 thePlayer.motionZ * = 1.17
@@ -87,14 +158,50 @@ object Jesus : Module("Jesus", Category.MOVEMENT, Category.SubCategory.MOVEMENT_
87158 thePlayer.motionY + = 0.04
88159 }
89160
161+ " jump" -> if (thePlayer.position.down().block == Blocks .water && thePlayer.onGround) {
162+ thePlayer.motionY = jumpMotion.toDouble()
163+ }
164+
165+ " silentyport" -> if (thePlayer.onGround && isLiquidBlock(
166+ AxisAlignedBB (
167+ thePlayer.entityBoundingBox.maxX,
168+ thePlayer.entityBoundingBox.maxY,
169+ thePlayer.entityBoundingBox.maxZ,
170+ thePlayer.entityBoundingBox.minX,
171+ thePlayer.entityBoundingBox.minY - 0.015626 ,
172+ thePlayer.entityBoundingBox.minZ
173+ )
174+ )
175+ ) {
176+ thePlayer.motionX * = silentYPortSpeedModify.toDouble()
177+ thePlayer.motionZ * = silentYPortSpeedModify.toDouble()
178+ }
179+
180+ " twillight" -> if (thePlayer.isInWater) {
181+ thePlayer.motionX * = 1.04
182+ thePlayer.motionZ * = 1.04
183+ MovementUtils .strafe()
184+ }
185+
186+ " vulcan" -> if (isLiquidBlock() && thePlayer.isInsideOfMaterial(Material .air)) {
187+ thePlayer.motionY = 0.08
188+ }
189+
90190 " dolphin" -> if (thePlayer.isInWater) thePlayer.motionY + = 0.03999999910593033
91191 }
92192 }
93193
94194 val onMove = handler<MoveEvent > { event ->
95- if (" aacfly" == mode.lowercase() && mc.thePlayer.isInWater) {
96- event.y = aacFly.toDouble()
97- mc.thePlayer.motionY = aacFly.toDouble()
195+ when (mode.lowercase()) {
196+ " aacfly" -> if (mc.thePlayer.isInWater) {
197+ event.y = aacFly.toDouble()
198+ mc.thePlayer.motionY = aacFly.toDouble()
199+ }
200+
201+ " twillight" -> if (mc.thePlayer.isInWater) {
202+ event.y = 0.01
203+ mc.thePlayer.motionY = 0.01
204+ }
98205 }
99206 }
100207
@@ -104,7 +211,7 @@ object Jesus : Module("Jesus", Category.MOVEMENT, Category.SubCategory.MOVEMENT_
104211
105212 if (event.block is BlockLiquid && ! collideBlock(mc.thePlayer.entityBoundingBox) { it is BlockLiquid } && ! mc.thePlayer.isSneaking) {
106213 when (mode.lowercase()) {
107- " ncp" , " vanilla " -> event.boundingBox = AxisAlignedBB .fromBounds(
214+ " vanilla " , " ncp" , " jump " , " silentyport " , " vulcan " -> event.boundingBox = AxisAlignedBB .fromBounds(
108215 event.x.toDouble(),
109216 event.y.toDouble(),
110217 event.z.toDouble(),
@@ -119,13 +226,13 @@ object Jesus : Module("Jesus", Category.MOVEMENT, Category.SubCategory.MOVEMENT_
119226 val onPacket = handler<PacketEvent > { event ->
120227 val thePlayer = mc.thePlayer
121228
122- if (thePlayer == null || mode != " NCP " )
229+ if (thePlayer == null || event.packet !is C03PacketPlayer )
123230 return @handler
124231
125- if (event.packet is C03PacketPlayer ) {
126- val packetPlayer = event.packet
232+ val packetPlayer = event.packet
127233
128- if (collideBlock(
234+ when (mode.lowercase()) {
235+ " ncp" -> if (collideBlock(
129236 AxisAlignedBB .fromBounds(
130237 thePlayer.entityBoundingBox.maxX,
131238 thePlayer.entityBoundingBox.maxY,
@@ -137,7 +244,61 @@ object Jesus : Module("Jesus", Category.MOVEMENT, Category.SubCategory.MOVEMENT_
137244 ) { it is BlockLiquid }
138245 ) {
139246 nextTick = ! nextTick
140- if (nextTick) packetPlayer.y - = 0.001
247+ if (nextTick) {
248+ packetPlayer.y - = 0.001
249+ }
250+ }
251+
252+ " silentyport" -> if (thePlayer.onGround && isLiquidBlock(
253+ AxisAlignedBB (
254+ thePlayer.entityBoundingBox.maxX,
255+ thePlayer.entityBoundingBox.maxY,
256+ thePlayer.entityBoundingBox.maxZ,
257+ thePlayer.entityBoundingBox.minX,
258+ thePlayer.entityBoundingBox.minY - 0.01 ,
259+ thePlayer.entityBoundingBox.minZ
260+ )
261+ )
262+ ) {
263+ silentYPortNextTick = ! silentYPortNextTick
264+ packetPlayer.y = thePlayer.posY + if (silentYPortNextTick) {
265+ silentYPortUp.toDouble()
266+ } else {
267+ - silentYPortDown.toDouble()
268+ }
269+
270+ if (silentYPortConvertGround && ! silentYPortSpoofGround && silentYPortTimer.hasTimePassed(silentYPortConvertDelay.toLong())) {
271+ packetPlayer.onGround = true
272+ silentYPortTimer.reset()
273+ } else {
274+ packetPlayer.onGround = silentYPortSpoofGround
275+ }
276+ }
277+
278+ " vulcan" -> if (isLiquidBlock(
279+ AxisAlignedBB (
280+ thePlayer.entityBoundingBox.maxX,
281+ thePlayer.entityBoundingBox.maxY,
282+ thePlayer.entityBoundingBox.maxZ,
283+ thePlayer.entityBoundingBox.minX,
284+ thePlayer.entityBoundingBox.minY - 0.01 ,
285+ thePlayer.entityBoundingBox.minZ
286+ )
287+ )
288+ ) {
289+ vulcanStep++
290+ packetPlayer.onGround = false
291+ when (vulcanStep) {
292+ 1 -> packetPlayer.y + = 0.08232659236482401
293+ 2 -> packetPlayer.y + = 0.13927999979019162
294+ 3 -> packetPlayer.y + = 0.16542399994277950
295+ 4 -> packetPlayer.y + = 0.11427136035293574
296+ 5 -> packetPlayer.y + = 0.04194693730418576
297+ 6 -> {
298+ packetPlayer.y + = 0.01236341326161235
299+ vulcanStep = 0
300+ }
301+ }
141302 }
142303 }
143304 }
0 commit comments