Skip to content

Commit 398798b

Browse files
author
Doogie13
committed
make code better lol
1 parent 36aebfb commit 398798b

3 files changed

Lines changed: 15 additions & 3 deletions

File tree

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
org.gradle.jvmargs=-Xmx3G
22
modGroup=com.lambda
3-
modVersion=1.0
3+
modVersion=1.1
44
kotlin_version=1.5.20
55
kotlinx_coroutines_version=1.5.0-RC
66
org.gradle.parallel=true

src/main/kotlin/LongJump.kt

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,27 @@ internal object LongJump : PluginModule(
1313
private val farSpeed by setting("Speed", 1.0f, 0.0f..10.0f, 0.1f, description = "Long Jump Factor")
1414
private val disableOnRubberband by setting("Rubberband disable", false)
1515

16+
var has = false;
17+
1618
init {
19+
20+
onEnable {
21+
has = false
22+
}
23+
1724
safeListener<PlayerTravelEvent> {
1825

19-
if (mc.player.motionY == 0.0030162615090425808) {
26+
if (mc.player.motionY <= 0 && !has) {
27+
28+
has = true
2029

2130
mc.player.jumpMovementFactor = farSpeed
2231

2332
}
2433

34+
if (mc.player.onGround)
35+
has = false
36+
2537
if (LagNotifier.paused && disableOnRubberband) {
2638

2739
disable()

src/main/resources/plugin_info.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "LongJump",
3-
"version": "1.0",
3+
"version": "1.1",
44
"authors": [
55
"Doogie13"
66
],

0 commit comments

Comments
 (0)