mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-18 16:45:42 +01:00
1c49ff69f4
The hell happened here. : Fix Build 2339ac14a8e Regen the patches 89d3fcbdfaf This new system breaks a lot :(
32 lines
1.2 KiB
Diff
32 lines
1.2 KiB
Diff
From caacb61f2c1776f5d877fff024bab374ddf178f0 Mon Sep 17 00:00:00 2001
|
|
From: md_5 <md_5@live.com.au>
|
|
Date: Mon, 5 Aug 2013 20:17:20 +1000
|
|
Subject: [PATCH] Cap Minimum Player Speed
|
|
|
|
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
|
index 984bea1..bf9dd99 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
|
@@ -1178,7 +1178,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
|
public void setFlySpeed(float value) {
|
|
validateSpeed(value);
|
|
EntityPlayer player = getHandle();
|
|
- player.abilities.flySpeed = value / 2f;
|
|
+ player.abilities.flySpeed = Math.max( value, 0.0001f ) / 2f; // Spigot
|
|
player.updateAbilities();
|
|
|
|
}
|
|
@@ -1187,7 +1187,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
|
public void setWalkSpeed(float value) {
|
|
validateSpeed(value);
|
|
EntityPlayer player = getHandle();
|
|
- player.abilities.walkSpeed = value / 2f;
|
|
+ player.abilities.walkSpeed = Math.max( value, 0.0001f ) / 2f; // Spigot
|
|
player.updateAbilities();
|
|
}
|
|
|
|
--
|
|
2.1.0
|
|
|