Skip to content

Commit 2cd6e42

Browse files
committed
Remove TridentFlight (sry Kamigen)
1 parent c83511f commit 2cd6e42

File tree

5 files changed

+20
-97
lines changed

5 files changed

+20
-97
lines changed

common/src/main/java/com/lambda/mixin/items/TridentMixin.java

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,27 @@
1111
public class TridentMixin {
1212
// Forge doesn't support the @ModityArgs annotation, so we have to chain multiple @ModifyArg
1313
@ModifyArg(method = "onStoppedUsing", at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/player/PlayerEntity;addVelocity(DDD)V"), index = 0)
14-
private double modifyVelocity0(double velocity) { return TridentBoost.INSTANCE.isEnabled() ? velocity * TridentBoost.INSTANCE.getTridentSpeed() : velocity; }
14+
private double modifyVelocity0(double velocity) {
15+
return TridentBoost.INSTANCE.isEnabled() ? velocity * TridentBoost.getTridentSpeed() : velocity;
16+
}
1517

1618
@ModifyArg(method = "onStoppedUsing", at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/player/PlayerEntity;addVelocity(DDD)V"), index = 1)
17-
private double modifyVelocity1(double velocity) { return TridentBoost.INSTANCE.isEnabled() ? velocity * TridentBoost.INSTANCE.getTridentSpeed() : velocity; }
19+
private double modifyVelocity1(double velocity) {
20+
return TridentBoost.INSTANCE.isEnabled() ? velocity * TridentBoost.getTridentSpeed() : velocity;
21+
}
1822

1923
@ModifyArg(method = "onStoppedUsing", at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/player/PlayerEntity;addVelocity(DDD)V"), index = 2)
20-
private double modifyVelocity2(double velocity) { return TridentBoost.INSTANCE.isEnabled() ? velocity * TridentBoost.INSTANCE.getTridentSpeed() : velocity; }
24+
private double modifyVelocity2(double velocity) {
25+
return TridentBoost.INSTANCE.isEnabled() ? velocity * TridentBoost.getTridentSpeed() : velocity;
26+
}
2127

2228
@ModifyExpressionValue(method = {"onStoppedUsing", "use"}, at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/player/PlayerEntity;isTouchingWaterOrRain()Z"))
23-
private boolean modifyIsTouchingWaterOrRain(boolean original) { return TridentBoost.INSTANCE.isEnabled() ? TridentBoost.INSTANCE.getForceUse() : original; }
29+
private boolean modifyIsTouchingWaterOrRain(boolean original) {
30+
return TridentBoost.INSTANCE.isEnabled() && TridentBoost.getForceUse() || original;
31+
}
32+
33+
@ModifyArg(method = "onStoppedUsing", at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/player/PlayerEntity;useRiptide(I)V"))
34+
private int modifyRiptide(int riptide) {
35+
return TridentBoost.INSTANCE.isEnabled() ? TridentBoost.getDelay() : riptide;
36+
}
2437
}

common/src/main/java/com/lambda/mixin/world/WorldMixin.java

Lines changed: 0 additions & 17 deletions
This file was deleted.

common/src/main/kotlin/com/lambda/module/modules/movement/TridentBoost.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ object TridentBoost : Module(
88
description = "Boosts you with tridents",
99
defaultTags = setOf(ModuleTag.MOVEMENT)
1010
) {
11-
val tridentSpeed by setting("Speed Factor", 2.0, 0.1..3.0, 0.1, description = "Speed factor of the trident boost")
12-
val forceUse by setting("Force Use", true, description = "Try to use the trident outside of water or rain")
11+
@JvmStatic val tridentSpeed by setting("Speed Factor", 1.0, 0.1..3.0, 0.1, description = "Speed factor of the trident boost")
12+
@JvmStatic val forceUse by setting("Force Use", true, description = "Try to use the trident outside of water or rain")
1313
}

common/src/main/kotlin/com/lambda/module/modules/movement/TridentFlight.kt

Lines changed: 0 additions & 72 deletions
This file was deleted.

common/src/main/resources/lambda.mixins.common.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@
3131
"render.RenderLayersMixin",
3232
"render.RenderTickCounterMixin",
3333
"render.VertexBufferMixin",
34-
"render.WorldRendererMixin",
35-
"world.WorldMixin"
34+
"render.WorldRendererMixin"
3635
],
3736
"injectors": {
3837
"defaultRequire": 1

0 commit comments

Comments
 (0)