mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-02 04:56:50 +01:00
27 lines
952 B
Diff
27 lines
952 B
Diff
|
From 9ea913497512111e043bb0007d0765a9003ce979 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 Velocity
|
||
|
|
||
|
|
||
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||
|
index 65a77dc..abac59c 100644
|
||
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||
|
@@ -178,9 +178,9 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||
|
}
|
||
|
|
||
|
public void setVelocity(Vector vel) {
|
||
|
- entity.motX = vel.getX();
|
||
|
- entity.motY = vel.getY();
|
||
|
- entity.motZ = vel.getZ();
|
||
|
+ entity.motX = Math.max( vel.getX(), 0.001 );
|
||
|
+ entity.motY = Math.max( vel.getY(), 0.001 );
|
||
|
+ entity.motZ = Math.max( vel.getZ(), 0.001 );
|
||
|
entity.velocityChanged = true;
|
||
|
}
|
||
|
|
||
|
--
|
||
|
1.8.1.2
|
||
|
|