geforkt von Mirrors/Paper
Update upstream B/CB
Dieser Commit ist enthalten in:
Ursprung
9cf2e3b3dc
Commit
74ffc20767
@ -25,7 +25,7 @@ index 0144bef9..fbff9860 100644
|
||||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/entity/FallingBlock.java b/src/main/java/org/bukkit/entity/FallingBlock.java
|
||||
index bc56fa22..360e1493 100644
|
||||
index bc56fa22..ad2cd13e 100644
|
||||
--- a/src/main/java/org/bukkit/entity/FallingBlock.java
|
||||
+++ b/src/main/java/org/bukkit/entity/FallingBlock.java
|
||||
@@ -0,0 +0,0 @@ public interface FallingBlock extends Entity {
|
||||
@ -40,10 +40,12 @@ index bc56fa22..360e1493 100644
|
||||
+ * @deprecated replaced by {@link Entity#getOrigin()}
|
||||
+ */
|
||||
+ @Deprecated
|
||||
+ public org.bukkit.Location getSourceLoc();
|
||||
+ default org.bukkit.Location getSourceLoc() {
|
||||
+ return this.getOrigin();
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/entity/TNTPrimed.java b/src/main/java/org/bukkit/entity/TNTPrimed.java
|
||||
index 3ce322d9..69df487b 100644
|
||||
index fcd0a9b2..2abef57c 100644
|
||||
--- a/src/main/java/org/bukkit/entity/TNTPrimed.java
|
||||
+++ b/src/main/java/org/bukkit/entity/TNTPrimed.java
|
||||
@@ -0,0 +0,0 @@ public interface TNTPrimed extends Explosive {
|
||||
@ -58,6 +60,8 @@ index 3ce322d9..69df487b 100644
|
||||
+ * @deprecated replaced by {@link Entity#getOrigin()}
|
||||
+ */
|
||||
+ @Deprecated
|
||||
+ public org.bukkit.Location getSourceLoc();
|
||||
+ default org.bukkit.Location getSourceLoc() {
|
||||
+ return this.getOrigin();
|
||||
+ }
|
||||
}
|
||||
--
|
@ -17,21 +17,23 @@ index 1381d234e..00208ff45 100644
|
||||
private final class BooleanWrapper {
|
||||
private boolean value = true;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
index 87813d59c..0a05da58f 100644
|
||||
index c39281247..a664c145d 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
@@ -0,0 +0,0 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||
}
|
||||
|
||||
public void setVelocity(Vector vel) {
|
||||
public void setVelocity(Vector velocity) {
|
||||
Preconditions.checkArgument(velocity != null, "velocity");
|
||||
velocity.checkFinite();
|
||||
+
|
||||
+ // Paper start - Warn server owners when plugins try to set super high velocities
|
||||
+ if (!(this instanceof org.bukkit.entity.Projectile) && isUnsafeVelocity(vel)) {
|
||||
+ CraftServer.excessiveVelEx = new Exception("Excessive velocity set detected: tried to set velocity of entity " + entity.getName() + " id #" + getEntityId() + " to (" + vel.getX() + "," + vel.getY() + "," + vel.getZ() + ").");
|
||||
+ if (!(this instanceof org.bukkit.entity.Projectile) && isUnsafeVelocity(velocity)) {
|
||||
+ CraftServer.excessiveVelEx = new Exception("Excessive velocity set detected: tried to set velocity of entity " + entity.getName() + " id #" + getEntityId() + " to (" + velocity.getX() + "," + velocity.getY() + "," + velocity.getZ() + ").");
|
||||
+ }
|
||||
+ // Paper end
|
||||
entity.motX = vel.getX();
|
||||
entity.motY = vel.getY();
|
||||
entity.motZ = vel.getZ();
|
||||
+
|
||||
entity.motX = velocity.getX();
|
||||
entity.motY = velocity.getY();
|
||||
entity.motZ = velocity.getZ();
|
||||
entity.velocityChanged = true;
|
||||
}
|
||||
|
||||
@ -54,8 +56,6 @@ index 87813d59c..0a05da58f 100644
|
||||
+
|
||||
+ if (x > 4 || x < -4 || y > 4 || y < -4 || z > 4 || z < -4) {
|
||||
+ return true;
|
||||
+ } else if (x != x || y != y || z != z) { // NaN check
|
||||
+ return true;
|
||||
+ }
|
||||
+
|
||||
+ return false;
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Entity Origin API
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index 7ced523cd..2892f31f0 100644
|
||||
index d4fc6c4a2..41aaf61ad 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -0,0 +0,0 @@ public abstract class Entity implements ICommandListener {
|
||||
@ -51,7 +51,7 @@ index 7ced523cd..2892f31f0 100644
|
||||
NBTTagList nbttaglist = new NBTTagList();
|
||||
double[] adouble1 = adouble;
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityFallingBlock.java b/src/main/java/net/minecraft/server/EntityFallingBlock.java
|
||||
index 0fd29b17e..18e7cf2ad 100644
|
||||
index edc22d6c3..70a196461 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityFallingBlock.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityFallingBlock.java
|
||||
@@ -0,0 +0,0 @@ public class EntityFallingBlock extends Entity {
|
||||
@ -101,7 +101,7 @@ index bc6383669..ca9eb2f3b 100644
|
||||
if (i >= 0 && i < this.list.size()) {
|
||||
NBTBase nbtbase = (NBTBase) this.list.get(i);
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index 3d114cfea..d207092ed 100644
|
||||
index 4fc95c86b..aa820465d 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -0,0 +0,0 @@ public abstract class World implements IBlockAccess {
|
||||
@ -118,7 +118,7 @@ index 3d114cfea..d207092ed 100644
|
||||
flag = true;
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
index 6375b5c40..87813d59c 100644
|
||||
index ce773218c..c39281247 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
@@ -0,0 +0,0 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||
@ -132,38 +132,6 @@ index 6375b5c40..87813d59c 100644
|
||||
+ Location origin = getHandle().origin;
|
||||
+ return origin == null ? null : origin.clone();
|
||||
+ }
|
||||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftFallingBlock.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftFallingBlock.java
|
||||
index b0a7f6392..56666f1f8 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftFallingBlock.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftFallingBlock.java
|
||||
@@ -0,0 +0,0 @@ public class CraftFallingBlock extends CraftEntity implements FallingBlock {
|
||||
// Second field for EntityFallingBlock
|
||||
getHandle().ticksLived = value;
|
||||
}
|
||||
+
|
||||
+ // Paper start
|
||||
+ @Override
|
||||
+ public org.bukkit.Location getSourceLoc() {
|
||||
+ return getOrigin();
|
||||
+ }
|
||||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftTNTPrimed.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftTNTPrimed.java
|
||||
index c493c9c0c..93843aa50 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftTNTPrimed.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftTNTPrimed.java
|
||||
@@ -0,0 +0,0 @@ public class CraftTNTPrimed extends CraftEntity implements TNTPrimed {
|
||||
|
||||
return null;
|
||||
}
|
||||
+
|
||||
+ // Paper start
|
||||
+ @Override
|
||||
+ public org.bukkit.Location getSourceLoc() {
|
||||
+ return getOrigin();
|
||||
+ }
|
||||
+ // Paper end
|
||||
}
|
||||
--
|
@ -1 +1 @@
|
||||
Subproject commit 80c927a7496c4a4c0085ca84668ea458a03e055e
|
||||
Subproject commit 07d5ea1600d6183a8f8136b2a5b8b6bb1d2e674e
|
@ -1 +1 @@
|
||||
Subproject commit e13d1196863d5dcfea3d17b79238427dfb2c61b2
|
||||
Subproject commit 921ba53556066ee16cb212e564ee9403fb6a73ff
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren