Allow double-speed creative flight

This commit is contained in:
NotAlexNoyle committed 2026-07-22 19:27:42 -04:00
1 parent 867ad1519a
commit 507eca9ad7
1 file changed
+9 -2
@@ -69,7 +69,7 @@ public class ModelFlying {
*/
private boolean scaleSlowfallingEffect = false;
/**
/**
* Allow an extra amount to ascend speed, scaling with the riptiding effect
* level.
*/
@@ -118,6 +118,14 @@ public class ModelFlying {
scaleLevitationEffect(defaults.getScaleLevitationEffect()); // Config?
scaleSlowfallingEffect(defaults.getScaleSlowfallingEffect());
scaleRiptidingEffect(defaults.getScaleRiptidingEffect());
// Only the resolved creative game-mode model gets the extra allowance.
// The first creative model is the defaults template; doubling that would
// also leak into survival/adventure allow-flight models.
if ("gamemode.creative".equals(id) && defaults.getId() != null) {
horizontalModSpeed(horizontalModSpeed * 2.0);
verticalAscendModSpeed(verticalAscendModSpeed * 2.0);
}
}
/**
@@ -216,7 +224,6 @@ public class ModelFlying {
return scaleRiptidingEffect;
}
public ModelFlying horizontalModSpeed(double horizontalModSpeed) {
checkLocked();
this.horizontalModSpeed = horizontalModSpeed;