mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-22 17:07:34 +01:00
Update upstream B/CB
This commit is contained in:
parent
adab11a1f7
commit
04d2d38581
@ -1,4 +1,4 @@
|
|||||||
From bafc92cd32e071029e7b2737dbff78255953084d Mon Sep 17 00:00:00 2001
|
From be3a8fec9af1e3d9ee43646c8572b98cf80721b4 Mon Sep 17 00:00:00 2001
|
||||||
From: Byteflux <byte@byteflux.net>
|
From: Byteflux <byte@byteflux.net>
|
||||||
Date: Mon, 29 Feb 2016 17:50:31 -0600
|
Date: Mon, 29 Feb 2016 17:50:31 -0600
|
||||||
Subject: [PATCH] Entity Origin API
|
Subject: [PATCH] Entity Origin API
|
||||||
@ -25,10 +25,10 @@ index 0144bef9..fbff9860 100644
|
|||||||
+ // Paper end
|
+ // Paper end
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/org/bukkit/entity/FallingBlock.java b/src/main/java/org/bukkit/entity/FallingBlock.java
|
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
|
--- a/src/main/java/org/bukkit/entity/FallingBlock.java
|
||||||
+++ b/src/main/java/org/bukkit/entity/FallingBlock.java
|
+++ b/src/main/java/org/bukkit/entity/FallingBlock.java
|
||||||
@@ -59,4 +59,13 @@ public interface FallingBlock extends Entity {
|
@@ -59,4 +59,15 @@ public interface FallingBlock extends Entity {
|
||||||
* @param hurtEntities whether entities will be damaged by this block.
|
* @param hurtEntities whether entities will be damaged by this block.
|
||||||
*/
|
*/
|
||||||
void setHurtEntities(boolean hurtEntities);
|
void setHurtEntities(boolean hurtEntities);
|
||||||
@ -40,13 +40,15 @@ index bc56fa22..360e1493 100644
|
|||||||
+ * @deprecated replaced by {@link Entity#getOrigin()}
|
+ * @deprecated replaced by {@link Entity#getOrigin()}
|
||||||
+ */
|
+ */
|
||||||
+ @Deprecated
|
+ @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
|
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
|
--- a/src/main/java/org/bukkit/entity/TNTPrimed.java
|
||||||
+++ b/src/main/java/org/bukkit/entity/TNTPrimed.java
|
+++ b/src/main/java/org/bukkit/entity/TNTPrimed.java
|
||||||
@@ -35,4 +35,13 @@ public interface TNTPrimed extends Explosive {
|
@@ -35,4 +35,15 @@ public interface TNTPrimed extends Explosive {
|
||||||
* @return the source of this primed TNT
|
* @return the source of this primed TNT
|
||||||
*/
|
*/
|
||||||
public Entity getSource();
|
public Entity getSource();
|
||||||
@ -58,8 +60,10 @@ index 3ce322d9..69df487b 100644
|
|||||||
+ * @deprecated replaced by {@link Entity#getOrigin()}
|
+ * @deprecated replaced by {@link Entity#getOrigin()}
|
||||||
+ */
|
+ */
|
||||||
+ @Deprecated
|
+ @Deprecated
|
||||||
+ public org.bukkit.Location getSourceLoc();
|
+ default org.bukkit.Location getSourceLoc() {
|
||||||
|
+ return this.getOrigin();
|
||||||
|
+ }
|
||||||
}
|
}
|
||||||
--
|
--
|
||||||
2.13.0
|
2.13.0.windows.1
|
||||||
|
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
From cfbb5c43d1d8d555373e69582230686d6986197b Mon Sep 17 00:00:00 2001
|
From faad34788f2009a9c7fa129c5151fd843db8c942 Mon Sep 17 00:00:00 2001
|
||||||
From: Byteflux <byte@byteflux.net>
|
From: Byteflux <byte@byteflux.net>
|
||||||
Date: Tue, 1 Mar 2016 23:45:08 -0600
|
Date: Tue, 1 Mar 2016 23:45:08 -0600
|
||||||
Subject: [PATCH] Entity Origin API
|
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
|
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
|
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||||
@@ -149,6 +149,7 @@ public abstract class Entity implements ICommandListener {
|
@@ -149,6 +149,7 @@ public abstract class Entity implements ICommandListener {
|
||||||
@ -51,7 +51,7 @@ index 7ced523cd..2892f31f0 100644
|
|||||||
NBTTagList nbttaglist = new NBTTagList();
|
NBTTagList nbttaglist = new NBTTagList();
|
||||||
double[] adouble1 = adouble;
|
double[] adouble1 = adouble;
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityFallingBlock.java b/src/main/java/net/minecraft/server/EntityFallingBlock.java
|
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
|
--- a/src/main/java/net/minecraft/server/EntityFallingBlock.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityFallingBlock.java
|
+++ b/src/main/java/net/minecraft/server/EntityFallingBlock.java
|
||||||
@@ -267,6 +267,14 @@ public class EntityFallingBlock extends Entity {
|
@@ -267,6 +267,14 @@ public class EntityFallingBlock extends Entity {
|
||||||
@ -101,7 +101,7 @@ index bc6383669..ca9eb2f3b 100644
|
|||||||
if (i >= 0 && i < this.list.size()) {
|
if (i >= 0 && i < this.list.size()) {
|
||||||
NBTBase nbtbase = (NBTBase) this.list.get(i);
|
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
|
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
|
--- a/src/main/java/net/minecraft/server/World.java
|
||||||
+++ b/src/main/java/net/minecraft/server/World.java
|
+++ b/src/main/java/net/minecraft/server/World.java
|
||||||
@@ -1023,6 +1023,12 @@ public abstract class World implements IBlockAccess {
|
@@ -1023,6 +1023,12 @@ public abstract class World implements IBlockAccess {
|
||||||
@ -118,10 +118,10 @@ index 3d114cfea..d207092ed 100644
|
|||||||
flag = true;
|
flag = true;
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
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
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||||
@@ -738,4 +738,12 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
@@ -743,4 +743,12 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||||
return spigot;
|
return spigot;
|
||||||
}
|
}
|
||||||
// Spigot end
|
// Spigot end
|
||||||
@ -132,38 +132,6 @@ index 6375b5c40..87813d59c 100644
|
|||||||
+ Location origin = getHandle().origin;
|
+ Location origin = getHandle().origin;
|
||||||
+ return origin == null ? null : origin.clone();
|
+ 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
|
|
||||||
@@ -65,4 +65,11 @@ 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
|
|
||||||
@@ -65,4 +65,11 @@ public class CraftTNTPrimed extends CraftEntity implements TNTPrimed {
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
+
|
|
||||||
+ // Paper start
|
|
||||||
+ @Override
|
|
||||||
+ public org.bukkit.Location getSourceLoc() {
|
|
||||||
+ return getOrigin();
|
|
||||||
+ }
|
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
}
|
}
|
||||||
--
|
--
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
From 3ae56f998b55e3a503566891a5006dfd11c3dbd5 Mon Sep 17 00:00:00 2001
|
From 3f6390e4802628e43e7f954ff1d99ef07868b7f3 Mon Sep 17 00:00:00 2001
|
||||||
From: Joseph Hirschfeld <joe@ibj.io>
|
From: Joseph Hirschfeld <joe@ibj.io>
|
||||||
Date: Thu, 3 Mar 2016 02:48:12 -0600
|
Date: Thu, 3 Mar 2016 02:48:12 -0600
|
||||||
Subject: [PATCH] Add velocity warnings
|
Subject: [PATCH] Add velocity warnings
|
||||||
@ -17,21 +17,23 @@ index 1381d234e..00208ff45 100644
|
|||||||
private final class BooleanWrapper {
|
private final class BooleanWrapper {
|
||||||
private boolean value = true;
|
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
|
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
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||||
@@ -237,12 +237,44 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
@@ -239,12 +239,44 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||||
}
|
public void setVelocity(Vector velocity) {
|
||||||
|
Preconditions.checkArgument(velocity != null, "velocity");
|
||||||
public void setVelocity(Vector vel) {
|
velocity.checkFinite();
|
||||||
|
+
|
||||||
+ // Paper start - Warn server owners when plugins try to set super high velocities
|
+ // Paper start - Warn server owners when plugins try to set super high velocities
|
||||||
+ if (!(this instanceof org.bukkit.entity.Projectile) && isUnsafeVelocity(vel)) {
|
+ 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 (" + vel.getX() + "," + vel.getY() + "," + vel.getZ() + ").");
|
+ 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
|
+ // Paper end
|
||||||
entity.motX = vel.getX();
|
+
|
||||||
entity.motY = vel.getY();
|
entity.motX = velocity.getX();
|
||||||
entity.motZ = vel.getZ();
|
entity.motY = velocity.getY();
|
||||||
|
entity.motZ = velocity.getZ();
|
||||||
entity.velocityChanged = true;
|
entity.velocityChanged = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -54,8 +56,6 @@ index 87813d59c..0a05da58f 100644
|
|||||||
+
|
+
|
||||||
+ if (x > 4 || x < -4 || y > 4 || y < -4 || z > 4 || z < -4) {
|
+ if (x > 4 || x < -4 || y > 4 || y < -4 || z > 4 || z < -4) {
|
||||||
+ return true;
|
+ return true;
|
||||||
+ } else if (x != x || y != y || z != z) { // NaN check
|
|
||||||
+ return true;
|
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ return false;
|
+ return false;
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit 80c927a7496c4a4c0085ca84668ea458a03e055e
|
Subproject commit 07d5ea1600d6183a8f8136b2a5b8b6bb1d2e674e
|
@ -1 +1 @@
|
|||||||
Subproject commit e13d1196863d5dcfea3d17b79238427dfb2c61b2
|
Subproject commit 921ba53556066ee16cb212e564ee9403fb6a73ff
|
Loading…
Reference in New Issue
Block a user