mirror of
https://github.com/GTNewHorizons/Avaritia.git
synced 2026-11-19 11:49:35 +00:00
Infinity Armor upwards and downward speed update
This commit is contained in:
1 parent
37ea9bfa78
commit
fcb3cef9cd
1 file changed
+11
-3
@@ -320,9 +320,7 @@ public class ItemArmorInfinity extends ItemArmor implements ICosmicRenderItem, I
|
||||
boolean sneaking = player.isSneaking();
|
||||
player.stepHeight = sneaking ? 0.5f : 1.0f;
|
||||
|
||||
float speed = 0.15f * (flying ? 1.1f : 1.0f)
|
||||
// * (swimming ? 1.2f : 1.0f)
|
||||
* (sneaking ? 0.1f : 1.0f);
|
||||
float speed = 0.15f * (flying ? 1.1f : 1.0f) * (sneaking ? 0.1f : 1.0f);
|
||||
|
||||
if (player.moveForward > 0f) {
|
||||
player.moveFlying(0f, 1f, speed);
|
||||
@@ -333,6 +331,16 @@ public class ItemArmorInfinity extends ItemArmor implements ICosmicRenderItem, I
|
||||
if (player.moveStrafing != 0f) {
|
||||
player.moveFlying(1f, 0f, speed * 0.5f * Math.signum(player.moveStrafing));
|
||||
}
|
||||
|
||||
// +50% speed up and down when flying
|
||||
|
||||
if (flying) {
|
||||
if (player.motionY > 0) {
|
||||
player.motionY *= 1.5;
|
||||
} else if (player.motionY < 0) {
|
||||
player.motionY *= 1.5;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
playersWithFoot.remove(key);
|
||||
|
||||
Reference in new issue
Block a user