3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-15 11:00:06 +01:00
Dieser Commit ist enthalten in:
Shane Freeder 2018-07-28 03:38:13 +01:00
Ursprung 4eec0c9b27
Commit f7d02b2518
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: A3F61EA5A085289C
15 geänderte Dateien mit 45 neuen und 84 gelöschten Zeilen

Datei anzeigen

@ -1,14 +1,14 @@
From 3b79ccc01c8f6b19bf814b9e52598581701b2539 Mon Sep 17 00:00:00 2001
From 159d7089d7b7173190d8b6453c0aea61acfc0ae5 Mon Sep 17 00:00:00 2001
From: kashike <kashike@vq.lc>
Date: Thu, 3 Mar 2016 02:18:39 -0600
Subject: [PATCH] Be a bit more informative in maxHealth exception
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index 13100e5d21..1620d9a74e 100644
index ae402a2bf4..9079f5e903 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -97,7 +97,10 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
@@ -98,7 +98,10 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
public void setHealth(double health) {
health = (float) health;
if ((health < 0) || (health > getMaxHealth())) {

Datei anzeigen

@ -1,4 +1,4 @@
From cdec1c94f32c30d5af8e5eeb755a84c5984218b7 Mon Sep 17 00:00:00 2001
From ab2fb84cb4d0a1c63cb6d445067c98e9b7e45877 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Tue, 8 Mar 2016 23:25:45 -0500
Subject: [PATCH] Disable Scoreboards for non players by default
@ -11,7 +11,7 @@ So avoid looking up scoreboards and short circuit to the "not on a team"
logic which is most likely to be true.
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index 4a2d29674..2b25da046 100644
index 4a2d296746..2b25da0465 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -193,4 +193,9 @@ public class PaperWorldConfig {
@ -25,10 +25,10 @@ index 4a2d29674..2b25da046 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 1870930f6..085f95dfe 100644
index b2f6bca8aa..22cd9c7d82 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -2258,6 +2258,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@@ -2259,6 +2259,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@Nullable
public ScoreboardTeamBase be() {
@ -37,7 +37,7 @@ index 1870930f6..085f95dfe 100644
}
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index 574883462..dd48c6af0 100644
index 574883462d..dd48c6af0c 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -537,6 +537,7 @@ public abstract class EntityLiving extends Entity {

Datei anzeigen

@ -1,14 +1,14 @@
From 6ed7bec1024ce7726a7feed2ca16e3b80ef3df07 Mon Sep 17 00:00:00 2001
From 268f500c4d2b68c8a7a6e967496e1bf6b9479eee Mon Sep 17 00:00:00 2001
From: mrapple <tony@oc.tc>
Date: Sun, 25 Nov 2012 13:43:39 -0600
Subject: [PATCH] Add methods for working with arrows stuck in living entities
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index 1620d9a74e..506d0d4e48 100644
index 9079f5e903..b25ce0c58f 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -509,4 +509,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
@@ -507,4 +507,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
public boolean isCollidable() {
return getHandle().collides;
}

Datei anzeigen

@ -1,4 +1,4 @@
From aba15fcba7f9d46fd103d2e8776d4732d800902c Mon Sep 17 00:00:00 2001
From 79c5df24897ee9bcc76d84977c071ed6b6107afb Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Tue, 22 Mar 2016 00:55:23 -0400
Subject: [PATCH] Don't teleport dead entities
@ -7,10 +7,10 @@ Had some issue with this in past, and this is the vanilla logic.
Potentially an old CB change that's no longer needed.
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index dd47797724..a465f1cf79 100644
index 063750cd5f..f69d544a51 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -2575,7 +2575,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@@ -2576,7 +2576,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
}
public Entity teleportTo(Location exit, boolean portal) {

Datei anzeigen

@ -1,4 +1,4 @@
From bdbe4b6446ba17c498e8264ffa94016fab151b25 Mon Sep 17 00:00:00 2001
From c020ce32ff52a05209704308ac8442396d630d53 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Wed, 6 Apr 2016 01:04:23 -0500
Subject: [PATCH] Option to use vanilla per-world scoreboard coloring on names
@ -19,10 +19,10 @@ index 667a0dde8c..b6ef1d4378 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index a465f1cf79..76934f81a8 100644
index f69d544a51..c11e9a1bf1 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -2270,6 +2270,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@@ -2271,6 +2271,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
return this.getFlag(5);
}

Datei anzeigen

@ -1,4 +1,4 @@
From 2db9bc4cb7cbdc0975948534bb83eef4ce4bdc6d Mon Sep 17 00:00:00 2001
From 049322e249bcc1b9347e23a99bc781f8fa146b29 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Sun, 22 May 2016 20:20:55 -0500
Subject: [PATCH] Optional TNT doesn't move in water
@ -32,7 +32,7 @@ index a3823408ca..41e73b3409 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 1f41c1ded1..d35c0437f3 100644
index 7768698ec6..f8eda1c3e0 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -1191,6 +1191,12 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@ -48,7 +48,7 @@ index 1f41c1ded1..d35c0437f3 100644
return this.isInWater() || this.q();
}
@@ -2736,6 +2742,11 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@@ -2737,6 +2743,11 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
}
public boolean bw() {

Datei anzeigen

@ -1,14 +1,14 @@
From 60f41c74b9da92c99db52fdbb77e577b5cd83bf1 Mon Sep 17 00:00:00 2001
From dbe597643719f35822ae46e6e32feb03333214b3 Mon Sep 17 00:00:00 2001
From: BillyGalbreath <Blake.Galbreath@GMail.com>
Date: Mon, 31 Jul 2017 01:49:48 -0500
Subject: [PATCH] LivingEntity#setKiller
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index bd2d90349e..524cfd99b7 100644
index b25ce0c58f..71b9b45f10 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -255,6 +255,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
@@ -253,6 +253,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
return getHandle().killer == null ? null : (Player) getHandle().killer.getBukkitEntity();
}

Datei anzeigen

@ -1,4 +1,4 @@
From 6010e68f2c3d4733a78baede40dd80d456bff758 Mon Sep 17 00:00:00 2001
From 071a95c07fb5f705384223310947d7a6c2031f69 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sun, 10 Jun 2018 20:04:42 -0400
Subject: [PATCH] Properly remove entities on dimension teleport
@ -22,10 +22,10 @@ requirement, but plugins (such as my own) use this method to
trigger a "reload" of the entity on the client.
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index bd232b31e4..af7b91b479 100644
index 472c48bef7..efcc215ed3 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -2606,7 +2606,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@@ -2607,7 +2607,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
}
// CraftBukkit end */

Datei anzeigen

@ -1,11 +1,11 @@
From b8fa6ff3c7fec9b9e738a30b035ac02f99458639 Mon Sep 17 00:00:00 2001
From 30427ff32f5721e52b627144cc6ef04a04a06954 Mon Sep 17 00:00:00 2001
From: BillyGalbreath <Blake.Galbreath@GMail.com>
Date: Sat, 16 Jun 2018 01:18:16 -0500
Subject: [PATCH] Make shield blocking delay configurable
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index 3467da7c8..ddb5ced79 100644
index 3467da7c8e..ddb5ced79d 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -409,4 +409,9 @@ public class PaperWorldConfig {
@ -19,7 +19,7 @@ index 3467da7c8..ddb5ced79 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index 999a02cad..eaab10a14 100644
index 999a02cad3..eaab10a146 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -2664,7 +2664,7 @@ public abstract class EntityLiving extends Entity {
@ -49,10 +49,10 @@ index 999a02cad..eaab10a14 100644
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index 524cfd99b..a6f847e31 100644
index 71b9b45f10..d7344809ec 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -530,5 +530,15 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
@@ -528,5 +528,15 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
public void setArrowsStuck(int arrows) {
getHandle().setArrowCount(arrows);
}

Datei anzeigen

@ -1,4 +1,4 @@
From 7c7021b4de845573adde324dc039be0522406181 Mon Sep 17 00:00:00 2001
From f29840c3c49b3e5d1441e230900c9f18e47e8571 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Fri, 29 Jun 2018 00:21:28 -0400
Subject: [PATCH] LivingEntity Hand Raised/Item Use API
@ -32,10 +32,10 @@ index 4455dc4891..8be1ba5269 100644
return this.isHandRaised() ? this.activeItem.k() - this.cX() : 0;
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index a6f847e313..768bce1411 100644
index d7344809ec..e199d08377 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -540,5 +540,25 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
@@ -538,5 +538,25 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
public void setShieldBlockingDelay(int delay) {
getHandle().setShieldBlockingDelay(delay);
}

Datei anzeigen

@ -1,4 +1,4 @@
From 732dd355da4ae3f7b45a261d2a3b34535026bd81 Mon Sep 17 00:00:00 2001
From ef1d00a30055a00851d00235596c71cc9b7a4777 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Thu, 19 Jul 2018 01:13:28 -0400
Subject: [PATCH] add more information to Entity.toString()
@ -6,10 +6,10 @@ Subject: [PATCH] add more information to Entity.toString()
UUID, ticks lived, valid, dead
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index af7b91b47..a2101d44f 100644
index efcc215ed3..5a003c8203 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -2505,7 +2505,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@@ -2506,7 +2506,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
}
public String toString() {

Datei anzeigen

@ -1,4 +1,4 @@
From 7a0a0416714c5b37aebde624c0c621c0b9c5612c Mon Sep 17 00:00:00 2001
From a034c787c361a89d9679e0936d3151ff3d84d06f Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sat, 21 Jul 2018 14:27:34 -0400
Subject: [PATCH] Duplicate UUID Resolve Option
@ -33,7 +33,7 @@ But for those who are ok with leaving this inconsistent behavior, you may use WA
It is recommended you regenerate the entities, as these were legit entities, and deserve your love.
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index 7bd7aa0d9..ba6d5b7ff 100644
index 7bd7aa0d94..ba6d5b7ff5 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -430,4 +430,40 @@ public class PaperWorldConfig {
@ -78,7 +78,7 @@ index 7bd7aa0d9..ba6d5b7ff 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index b37fa3829..95c6812d7 100644
index 3ac115ff65..4728ded917 100644
--- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -1,5 +1,10 @@
@ -145,10 +145,10 @@ index b37fa3829..95c6812d7 100644
this.world.a((Collection) entityslice);
}
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index b308f4416..b6d6d4f37 100644
index 4ea52f9c59..2217ca9737 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -2734,6 +2734,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@@ -2735,6 +2735,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
});
}
@ -157,7 +157,7 @@ index b308f4416..b6d6d4f37 100644
this.uniqueID = uuid;
this.au = this.uniqueID.toString();
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 747d99dbe..7a9f28421 100644
index 747d99dbe6..7a9f28421b 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -40,7 +40,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {

Datei anzeigen

@ -1,39 +0,0 @@
From c39c439f6c3d365e43d812d3cfe4ce7d42b35b2b Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Fri, 22 Apr 2016 18:20:05 -0500
Subject: [PATCH] Vehicle Event Cancellation Changes
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 85358902ff..98d67d9a17 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -96,7 +96,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
public boolean j; public boolean blocksEntitySpawning() { return j; } // Paper - OBFHELPER
public final List<Entity> passengers;
protected int k;
- private Entity ax;
+ private Entity ax;public void setVehicle(Entity entity) { this.ax = entity; } // Paper - OBFHELPER
public boolean attachedToPlayer;
public World world;
public double lastX;
@@ -2141,6 +2141,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
throw new IllegalStateException("Use x.stopRiding(y), not y.removePassenger(x)");
} else {
// CraftBukkit start
+ entity.setVehicle(this); // Paper - Set the vehicle back for the event
CraftEntity craft = (CraftEntity) entity.getBukkitEntity().getVehicle();
Entity orig = craft == null ? null : craft.getHandle();
if (getBukkitEntity() instanceof Vehicle && entity.getBukkitEntity() instanceof LivingEntity) {
@@ -2163,6 +2164,8 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
return;
}
// Spigot end
+
+ entity.setVehicle(null); // Paper - fix EntityDismountEvent cancellable
this.passengers.remove(entity);
entity.k = 60;
}
--
2.18.0

@ -1 +1 @@
Subproject commit 4b00823222b633f1776cdc12da55b2e0f88371e2
Subproject commit e3c21decb0bff39ec2e4bb3c95a6554ea3755609

@ -1 +1 @@
Subproject commit f68f5a82539faf7fb36f64bd72731e35d3e57cc3
Subproject commit 69774b3e4419d3213023b46dc791214bd39f48d6