1.15.2 - Updated Upstream (Bukkit/CraftBukkit)
Upstream has released updates that appears to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: 149527f7 SPIGOT-5782: Set Arrow Launched From Crossbow CraftBukkit Changes: be6aaf04 SPIGOT-5782: Set Arrow Launched From Crossbow 833da9c4 SPIGOT-5799: InventoryCloseEvent fires after PlayerQuitEvent 26c0084f SPIGOT-5675, SPIGOT-5798, MC-149563: Fix tracking of entities across dimensions 7f3e7c3f SPIGOT-5797: Zombie(Villagers) Instant Convert based on their lifetime
This commit is contained in:
parent
70df8f2716
commit
ec9fa36908
|
@ -5,10 +5,10 @@ Subject: [PATCH] Arrow pickup rule API
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/entity/AbstractArrow.java b/src/main/java/org/bukkit/entity/AbstractArrow.java
|
diff --git a/src/main/java/org/bukkit/entity/AbstractArrow.java b/src/main/java/org/bukkit/entity/AbstractArrow.java
|
||||||
index 88cebc004feeef65a594939a7e865b445432a83e..b2bf62a50177e612369993f8ed340d456c3c2fc8 100644
|
index 5b50a4e10e8ace8cc53ad3c8d7c3185f88d5c8db..e8e56e89e32d84af0639fe2e9b0eeabd747b6007 100644
|
||||||
--- a/src/main/java/org/bukkit/entity/AbstractArrow.java
|
--- a/src/main/java/org/bukkit/entity/AbstractArrow.java
|
||||||
+++ b/src/main/java/org/bukkit/entity/AbstractArrow.java
|
+++ b/src/main/java/org/bukkit/entity/AbstractArrow.java
|
||||||
@@ -127,4 +127,38 @@ public interface AbstractArrow extends Projectile {
|
@@ -141,4 +141,38 @@ public interface AbstractArrow extends Projectile {
|
||||||
*/
|
*/
|
||||||
CREATIVE_ONLY
|
CREATIVE_ONLY
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Expose Arrow getItemStack
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/entity/AbstractArrow.java b/src/main/java/org/bukkit/entity/AbstractArrow.java
|
diff --git a/src/main/java/org/bukkit/entity/AbstractArrow.java b/src/main/java/org/bukkit/entity/AbstractArrow.java
|
||||||
index b2bf62a50177e612369993f8ed340d456c3c2fc8..6cb38d412c89a85ef6c1d98f32338d22bd2c2795 100644
|
index e8e56e89e32d84af0639fe2e9b0eeabd747b6007..b1d8007eed489aa061c1a6813bcdafc101231e56 100644
|
||||||
--- a/src/main/java/org/bukkit/entity/AbstractArrow.java
|
--- a/src/main/java/org/bukkit/entity/AbstractArrow.java
|
||||||
+++ b/src/main/java/org/bukkit/entity/AbstractArrow.java
|
+++ b/src/main/java/org/bukkit/entity/AbstractArrow.java
|
||||||
@@ -129,6 +129,14 @@ public interface AbstractArrow extends Projectile {
|
@@ -143,6 +143,14 @@ public interface AbstractArrow extends Projectile {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Paper start
|
// Paper start
|
||||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Custom replacement for eaten items
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||||
index 591bf14a6270a67e0bf705a90869c1223b9b36fd..8d14e6aced932176600936c5c8b7cb5ae44819e3 100644
|
index e763bf1a6486134fe222865d207359c8b868c008..e8e14ac6c6fcf5375976dfbe9ed97ad4619bfbee 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||||
@@ -2899,9 +2899,10 @@ public abstract class EntityLiving extends Entity {
|
@@ -2900,9 +2900,10 @@ public abstract class EntityLiving extends Entity {
|
||||||
this.b(this.activeItem, 16);
|
this.b(this.activeItem, 16);
|
||||||
// CraftBukkit start - fire PlayerItemConsumeEvent
|
// CraftBukkit start - fire PlayerItemConsumeEvent
|
||||||
ItemStack itemstack;
|
ItemStack itemstack;
|
||||||
|
@ -20,7 +20,7 @@ index 591bf14a6270a67e0bf705a90869c1223b9b36fd..8d14e6aced932176600936c5c8b7cb5a
|
||||||
world.getServer().getPluginManager().callEvent(event);
|
world.getServer().getPluginManager().callEvent(event);
|
||||||
|
|
||||||
if (event.isCancelled()) {
|
if (event.isCancelled()) {
|
||||||
@@ -2916,9 +2917,20 @@ public abstract class EntityLiving extends Entity {
|
@@ -2917,9 +2918,20 @@ public abstract class EntityLiving extends Entity {
|
||||||
itemstack = this.activeItem.a(this.world, this);
|
itemstack = this.activeItem.a(this.world, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ Subject: [PATCH] handle NaN health/absorb values and repair bad data
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||||
index 8d14e6aced932176600936c5c8b7cb5ae44819e3..07c8f38f86a9d1eed95ccddb4c97892b555faf59 100644
|
index e8e14ac6c6fcf5375976dfbe9ed97ad4619bfbee..d6ef12f1d65e8ab8b1c41bcf06f022f3193df15f 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||||
@@ -496,7 +496,13 @@ public abstract class EntityLiving extends Entity {
|
@@ -496,7 +496,13 @@ public abstract class EntityLiving extends Entity {
|
||||||
|
@ -34,7 +34,7 @@ index 8d14e6aced932176600936c5c8b7cb5ae44819e3..07c8f38f86a9d1eed95ccddb4c97892b
|
||||||
// CraftBukkit start - Handle scaled health
|
// CraftBukkit start - Handle scaled health
|
||||||
if (this instanceof EntityPlayer) {
|
if (this instanceof EntityPlayer) {
|
||||||
org.bukkit.craftbukkit.entity.CraftPlayer player = ((EntityPlayer) this).getBukkitEntity();
|
org.bukkit.craftbukkit.entity.CraftPlayer player = ((EntityPlayer) this).getBukkitEntity();
|
||||||
@@ -2742,7 +2752,7 @@ public abstract class EntityLiving extends Entity {
|
@@ -2743,7 +2753,7 @@ public abstract class EntityLiving extends Entity {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setAbsorptionHearts(float f) {
|
public void setAbsorptionHearts(float f) {
|
||||||
|
|
|
@ -57,7 +57,7 @@ index b0740965a42a3931807fab88ab63077175b1c3b7..6b1a914d2f57182da0279cf4d2f9751d
|
||||||
packetdataserializer.a(this.c);
|
packetdataserializer.a(this.c);
|
||||||
packetdataserializer.a(this.d);
|
packetdataserializer.a(this.d);
|
||||||
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
|
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
|
||||||
index 43b4649bfd22ab9ab7f1f10388dca2789ef362d9..aeb0a77d9aaf3877310528286a481f71fd5a4290 100644
|
index c0c774d17b81109eaaea2ad726629eca902cfd6c..0f09cacf6d67dab5bc7962f19fcf3eba85ada4ff 100644
|
||||||
--- a/src/main/java/net/minecraft/server/PlayerList.java
|
--- a/src/main/java/net/minecraft/server/PlayerList.java
|
||||||
+++ b/src/main/java/net/minecraft/server/PlayerList.java
|
+++ b/src/main/java/net/minecraft/server/PlayerList.java
|
||||||
@@ -72,6 +72,7 @@ public abstract class PlayerList {
|
@@ -72,6 +72,7 @@ public abstract class PlayerList {
|
||||||
|
@ -83,7 +83,7 @@ index 43b4649bfd22ab9ab7f1f10388dca2789ef362d9..aeb0a77d9aaf3877310528286a481f71
|
||||||
PlayerList.LOGGER.info("{}[{}] logged in with entity id {} at ([{}]{}, {}, {})", entityplayer.getDisplayName().getString(), s1, entityplayer.getId(), entityplayer.world.worldData.getName(), entityplayer.locX(), entityplayer.locY(), entityplayer.locZ());
|
PlayerList.LOGGER.info("{}[{}] logged in with entity id {} at ([{}]{}, {}, {})", entityplayer.getDisplayName().getString(), s1, entityplayer.getId(), entityplayer.world.worldData.getName(), entityplayer.locX(), entityplayer.locY(), entityplayer.locZ());
|
||||||
}
|
}
|
||||||
@@ -392,6 +400,16 @@ public abstract class PlayerList {
|
@@ -392,6 +400,16 @@ public abstract class PlayerList {
|
||||||
entityplayer.playerTick();// SPIGOT-924
|
entityplayer.playerTick(); // SPIGOT-924
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
||||||
+ // Paper start - Remove from collideRule team if needed
|
+ // Paper start - Remove from collideRule team if needed
|
||||||
|
|
|
@ -19,10 +19,10 @@ index 9c52e31f4cf1e64a37c65c021da219fc26dda137..33ce9a500430a01650e69a3568c8b03d
|
||||||
+ }
|
+ }
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||||
index c5c0fc3877fa6c8602e4468d5702612d986891f9..8f6fe004a40b693d1a9945dcab0625c5e9346c01 100644
|
index f5da67fd8908f027835b837a8b847e27c3638790..1a1d608f5acfc92e3e55e53f63c9da6ab0aa6a0a 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||||
@@ -3001,7 +3001,7 @@ public abstract class EntityLiving extends Entity {
|
@@ -3002,7 +3002,7 @@ public abstract class EntityLiving extends Entity {
|
||||||
if (this.isHandRaised() && !this.activeItem.isEmpty()) {
|
if (this.isHandRaised() && !this.activeItem.isEmpty()) {
|
||||||
Item item = this.activeItem.getItem();
|
Item item = this.activeItem.getItem();
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@ index c5c0fc3877fa6c8602e4468d5702612d986891f9..8f6fe004a40b693d1a9945dcab0625c5
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -3240,4 +3240,15 @@ public abstract class EntityLiving extends Entity {
|
@@ -3241,4 +3241,15 @@ public abstract class EntityLiving extends Entity {
|
||||||
public void broadcastItemBreak(EnumHand enumhand) {
|
public void broadcastItemBreak(EnumHand enumhand) {
|
||||||
this.broadcastItemBreak(enumhand == EnumHand.MAIN_HAND ? EnumItemSlot.MAINHAND : EnumItemSlot.OFFHAND);
|
this.broadcastItemBreak(enumhand == EnumHand.MAIN_HAND ? EnumItemSlot.MAINHAND : EnumItemSlot.OFFHAND);
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,7 @@ Subject: [PATCH] LivingEntity Hand Raised/Item Use API
|
||||||
How long an entity has raised hands to charge an attack or use an item
|
How long an entity has raised hands to charge an attack or use an item
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||||
index c1e6792e0d75647108127bcf43bdc9e7bf18aea3..a4051c1f0cdcf179e7afe60d301982412da7ed64 100644
|
index 2a567dca19034ed9071ef09b5371eabb5fff557c..d604728db71d4e61a11fb1ccb7f02b6f6b914a51 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||||
@@ -112,7 +112,7 @@ public abstract class EntityLiving extends Entity {
|
@@ -112,7 +112,7 @@ public abstract class EntityLiving extends Entity {
|
||||||
|
@ -18,7 +18,7 @@ index c1e6792e0d75647108127bcf43bdc9e7bf18aea3..a4051c1f0cdcf179e7afe60d30198241
|
||||||
protected int bl;
|
protected int bl;
|
||||||
protected int bm;
|
protected int bm;
|
||||||
private BlockPosition bE;
|
private BlockPosition bE;
|
||||||
@@ -2979,10 +2979,12 @@ public abstract class EntityLiving extends Entity {
|
@@ -2980,10 +2980,12 @@ public abstract class EntityLiving extends Entity {
|
||||||
return this.activeItem;
|
return this.activeItem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -88,7 +88,7 @@ index 88692d9eaea57a4d172d537a6cf2a3bffe058d54..f35d23340665ab323732915efc0c0ad7
|
||||||
this.m();
|
this.m();
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||||
index ab9ab7a88dde29ac141753e1f1e9c0ff87d199cd..eb53d8bb5c36482c39afeb6c324a620d2c7b21fb 100644
|
index a357b6167405be4034cf3dad4124827e04278366..0c9e46a8973436a4438730a49986c88f12829be1 100644
|
||||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||||
@@ -2040,7 +2040,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
@@ -2040,7 +2040,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||||
|
@ -101,15 +101,15 @@ index ab9ab7a88dde29ac141753e1f1e9c0ff87d199cd..eb53d8bb5c36482c39afeb6c324a620d
|
||||||
this.player.m();
|
this.player.m();
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
|
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
|
||||||
index 1800a6c86b2150b8183acdce3a7f6daa1c9a350b..b69cff40922ba2d1a44c11bcae86f9439130ad96 100644
|
index 46ea6d8e487d0c051780b0bdb06622e515cd987f..950afb131bbea53e46393fa19b0bfbb9d5c647f5 100644
|
||||||
--- a/src/main/java/net/minecraft/server/PlayerList.java
|
--- a/src/main/java/net/minecraft/server/PlayerList.java
|
||||||
+++ b/src/main/java/net/minecraft/server/PlayerList.java
|
+++ b/src/main/java/net/minecraft/server/PlayerList.java
|
||||||
@@ -390,7 +390,7 @@ public abstract class PlayerList {
|
@@ -390,7 +390,7 @@ public abstract class PlayerList {
|
||||||
entityplayer.a(StatisticList.LEAVE_GAME);
|
entityplayer.a(StatisticList.LEAVE_GAME);
|
||||||
|
|
||||||
// CraftBukkit start - Quitting must be before we do final save of data, in case plugins need to modify it
|
// CraftBukkit start - Quitting must be before we do final save of data, in case plugins need to modify it
|
||||||
- org.bukkit.craftbukkit.event.CraftEventFactory.handleInventoryCloseEvent(entityplayer);
|
- entityplayer.closeInventory();
|
||||||
+ org.bukkit.craftbukkit.event.CraftEventFactory.handleInventoryCloseEvent(entityplayer, org.bukkit.event.inventory.InventoryCloseEvent.Reason.DISCONNECT); // Paper
|
+ entityplayer.closeInventory(org.bukkit.event.inventory.InventoryCloseEvent.Reason.DISCONNECT); // Paper
|
||||||
|
|
||||||
PlayerQuitEvent playerQuitEvent = new PlayerQuitEvent(cserver.getPlayer(entityplayer), "\u00A7e" + entityplayer.getName() + " left the game");
|
PlayerQuitEvent playerQuitEvent = new PlayerQuitEvent(cserver.getPlayer(entityplayer), "\u00A7e" + entityplayer.getName() + " left the game");
|
||||||
cserver.getPluginManager().callEvent(playerQuitEvent);
|
cserver.getPluginManager().callEvent(playerQuitEvent);
|
||||||
|
@ -168,27 +168,30 @@ index f5c722644a1955c9bc68c89fdbb84526f9bbb7a0..368f786300573ff24a8dc46d96a6fb6b
|
||||||
|
|
||||||
// Check if the fromWorld and toWorld are the same.
|
// Check if the fromWorld and toWorld are the same.
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||||
index 3a897cf5903539e1099f1a9ec98f1e157437fee0..6ca6ba46d0dd511072f518baa3aae6dc8281ef66 100644
|
index b9e011256f0c8f67808ebebb5e9dc63d3358849f..4a76402c01dfe6525bae8728da2dde6e5d673765 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||||
@@ -1301,8 +1301,19 @@ public class CraftEventFactory {
|
@@ -1301,12 +1301,22 @@ public class CraftEventFactory {
|
||||||
return event;
|
return event;
|
||||||
}
|
}
|
||||||
|
|
||||||
+ // Paper start
|
+ // Paper start
|
||||||
+
|
|
||||||
+ /**
|
+ /**
|
||||||
+ * Incase plugins hooked into this or Spigot adds a new inventory close event. Prefer to pass a reason
|
+ * Incase plugins hooked into this or Spigot adds a new inventory close event. Prefer to pass a reason
|
||||||
+ * @param human
|
+ * @param human
|
||||||
+ */
|
+ */
|
||||||
+ @Deprecated
|
+ @Deprecated
|
||||||
public static void handleInventoryCloseEvent(EntityHuman human) {
|
public static void handleInventoryCloseEvent(EntityHuman human) {
|
||||||
- InventoryCloseEvent event = new InventoryCloseEvent(human.activeContainer.getBukkitView());
|
|
||||||
+ handleInventoryCloseEvent(human, org.bukkit.event.inventory.InventoryCloseEvent.Reason.UNKNOWN);
|
+ handleInventoryCloseEvent(human, org.bukkit.event.inventory.InventoryCloseEvent.Reason.UNKNOWN);
|
||||||
+ }
|
+ }
|
||||||
+ public static void handleInventoryCloseEvent(EntityHuman human, org.bukkit.event.inventory.InventoryCloseEvent.Reason reason) {
|
+ public static void handleInventoryCloseEvent(EntityHuman human, org.bukkit.event.inventory.InventoryCloseEvent.Reason reason) {
|
||||||
+ InventoryCloseEvent event = new InventoryCloseEvent(human.activeContainer.getBukkitView(), reason);
|
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
|
// SPIGOT-5799 - no need to fire for when no inventory open
|
||||||
|
if (human.activeContainer == human.defaultContainer) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
- InventoryCloseEvent event = new InventoryCloseEvent(human.activeContainer.getBukkitView());
|
||||||
|
+ InventoryCloseEvent event = new InventoryCloseEvent(human.activeContainer.getBukkitView(), reason); // Paper
|
||||||
human.world.getServer().getPluginManager().callEvent(event);
|
human.world.getServer().getPluginManager().callEvent(event);
|
||||||
human.activeContainer.transferTo(human.defaultContainer, human.getBukkitEntity());
|
human.activeContainer.transferTo(human.defaultContainer, human.getBukkitEntity());
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add ray tracing methods to LivingEntity
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||||
index 990aea604d02db723193722ed692c3a3725f987d..93625dea9ca6a13f311dd5ecc5c0d09060c418c8 100644
|
index 0c3a776e207d84943fd90482a650d0c74b5ca65d..516631b4f4b8d7a9dd5d9d558d199f71d0d7ced6 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||||
@@ -3257,6 +3257,23 @@ public abstract class EntityLiving extends Entity {
|
@@ -3258,6 +3258,23 @@ public abstract class EntityLiving extends Entity {
|
||||||
this.broadcastItemBreak(enumhand == EnumHand.MAIN_HAND ? EnumItemSlot.MAINHAND : EnumItemSlot.OFFHAND);
|
this.broadcastItemBreak(enumhand == EnumHand.MAIN_HAND ? EnumItemSlot.MAINHAND : EnumItemSlot.OFFHAND);
|
||||||
}
|
}
|
||||||
// Paper start
|
// Paper start
|
||||||
|
|
|
@ -6,10 +6,10 @@ Subject: [PATCH] Set Zombie last tick at start of drowning process
|
||||||
Fixes GH-1887
|
Fixes GH-1887
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java
|
diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java
|
||||||
index 2d4f8aac8fac1c414d18593c79f767202c757af2..8635d4f40ca153819e0fda014d7ea3795f86b940 100644
|
index d64c03f006af1c829862d02d1fc4fde007dd9a5b..e8b9a21baf74645cc07cd9daf741bf9f65deff08 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityZombie.java
|
--- a/src/main/java/net/minecraft/server/EntityZombie.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityZombie.java
|
+++ b/src/main/java/net/minecraft/server/EntityZombie.java
|
||||||
@@ -169,6 +169,7 @@ public class EntityZombie extends EntityMonster {
|
@@ -168,6 +168,7 @@ public class EntityZombie extends EntityMonster {
|
||||||
++this.bC;
|
++this.bC;
|
||||||
if (this.bC >= 600) {
|
if (this.bC >= 600) {
|
||||||
this.startDrownedConversion(300);
|
this.startDrownedConversion(300);
|
||||||
|
|
|
@ -66,10 +66,10 @@ index 3d44188e68df31d188f25820000e2c39aa5b6ce0..9368c4afa7bbb336894d73069b3c0858
|
||||||
return 0.0F;
|
return 0.0F;
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||||
index c7c248f63f8cfef6d6b095a926028c519ec3ffd4..aecd5011cbe8c6f78be436084621f4c31cdac23a 100644
|
index 347d4abdecddf0c92f81b2958fbaccc22cf16b26..0a31f2e931bba74ecda40c3792718a530acec3af 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||||
@@ -3310,6 +3310,37 @@ public abstract class EntityLiving extends Entity {
|
@@ -3311,6 +3311,37 @@ public abstract class EntityLiving extends Entity {
|
||||||
return world.rayTrace(raytrace);
|
return world.rayTrace(raytrace);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Prevent consuming the wrong itemstack
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||||
index aecd5011cbe8c6f78be436084621f4c31cdac23a..24594aa0e9b8741811acfc9f84f4db7552832bd2 100644
|
index 0a31f2e931bba74ecda40c3792718a530acec3af..576c9c6ae4339951d4ec9fffa69c7f860d82b33f 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||||
@@ -2896,10 +2896,13 @@ public abstract class EntityLiving extends Entity {
|
@@ -2897,10 +2897,13 @@ public abstract class EntityLiving extends Entity {
|
||||||
this.datawatcher.set(EntityLiving.ao, (byte) j);
|
this.datawatcher.set(EntityLiving.ao, (byte) j);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@ index aecd5011cbe8c6f78be436084621f4c31cdac23a..24594aa0e9b8741811acfc9f84f4db75
|
||||||
this.activeItem = itemstack;
|
this.activeItem = itemstack;
|
||||||
this.bl = itemstack.k();
|
this.bl = itemstack.k();
|
||||||
if (!this.world.isClientSide) {
|
if (!this.world.isClientSide) {
|
||||||
@@ -2975,6 +2978,7 @@ public abstract class EntityLiving extends Entity {
|
@@ -2976,6 +2979,7 @@ public abstract class EntityLiving extends Entity {
|
||||||
this.clearActiveItem();
|
this.clearActiveItem();
|
||||||
} else {
|
} else {
|
||||||
if (!this.activeItem.isEmpty() && this.isHandRaised()) {
|
if (!this.activeItem.isEmpty() && this.isHandRaised()) {
|
||||||
|
@ -32,7 +32,7 @@ index aecd5011cbe8c6f78be436084621f4c31cdac23a..24594aa0e9b8741811acfc9f84f4db75
|
||||||
this.b(this.activeItem, 16);
|
this.b(this.activeItem, 16);
|
||||||
// CraftBukkit start - fire PlayerItemConsumeEvent
|
// CraftBukkit start - fire PlayerItemConsumeEvent
|
||||||
ItemStack itemstack;
|
ItemStack itemstack;
|
||||||
@@ -3005,8 +3009,8 @@ public abstract class EntityLiving extends Entity {
|
@@ -3006,8 +3010,8 @@ public abstract class EntityLiving extends Entity {
|
||||||
this.a(this.getRaisedHand(), itemstack);
|
this.a(this.getRaisedHand(), itemstack);
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
this.dH();
|
this.dH();
|
||||||
|
|
|
@ -7,7 +7,7 @@ When the server is lagging, players will wait longer when eating.
|
||||||
Change to also use a time check instead if it passes.
|
Change to also use a time check instead if it passes.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||||
index aada8d3b08b437f81f68f8e988412c1071287d54..252b3c59294a75618622950286969f5e656da85a 100644
|
index 4f9255c0bc2ff46f34072846d2b0dc2e97f05db4..0ec0ddb7d0e3f25820fe064d75916407cb579eae 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||||
@@ -113,7 +113,7 @@ public abstract class EntityLiving extends Entity {
|
@@ -113,7 +113,7 @@ public abstract class EntityLiving extends Entity {
|
||||||
|
@ -19,7 +19,7 @@ index aada8d3b08b437f81f68f8e988412c1071287d54..252b3c59294a75618622950286969f5e
|
||||||
protected int bm;
|
protected int bm;
|
||||||
private BlockPosition bE;
|
private BlockPosition bE;
|
||||||
private DamageSource bF;
|
private DamageSource bF;
|
||||||
@@ -2847,6 +2847,10 @@ public abstract class EntityLiving extends Entity {
|
@@ -2848,6 +2848,10 @@ public abstract class EntityLiving extends Entity {
|
||||||
return ((Byte) this.datawatcher.get(EntityLiving.ao) & 2) > 0 ? EnumHand.OFF_HAND : EnumHand.MAIN_HAND;
|
return ((Byte) this.datawatcher.get(EntityLiving.ao) & 2) > 0 ? EnumHand.OFF_HAND : EnumHand.MAIN_HAND;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@ index aada8d3b08b437f81f68f8e988412c1071287d54..252b3c59294a75618622950286969f5e
|
||||||
private void o() {
|
private void o() {
|
||||||
if (this.isHandRaised()) {
|
if (this.isHandRaised()) {
|
||||||
if (ItemStack.d(this.b(this.getRaisedHand()), this.activeItem)) {
|
if (ItemStack.d(this.b(this.getRaisedHand()), this.activeItem)) {
|
||||||
@@ -2855,7 +2859,14 @@ public abstract class EntityLiving extends Entity {
|
@@ -2856,7 +2860,14 @@ public abstract class EntityLiving extends Entity {
|
||||||
this.b(this.activeItem, 5);
|
this.b(this.activeItem, 5);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -46,7 +46,7 @@ index aada8d3b08b437f81f68f8e988412c1071287d54..252b3c59294a75618622950286969f5e
|
||||||
this.q();
|
this.q();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -2905,7 +2916,10 @@ public abstract class EntityLiving extends Entity {
|
@@ -2906,7 +2917,10 @@ public abstract class EntityLiving extends Entity {
|
||||||
|
|
||||||
if (!itemstack.isEmpty() && !this.isHandRaised() || forceUpdate) { // Paper use override flag
|
if (!itemstack.isEmpty() && !this.isHandRaised() || forceUpdate) { // Paper use override flag
|
||||||
this.activeItem = itemstack;
|
this.activeItem = itemstack;
|
||||||
|
@ -58,7 +58,7 @@ index aada8d3b08b437f81f68f8e988412c1071287d54..252b3c59294a75618622950286969f5e
|
||||||
if (!this.world.isClientSide) {
|
if (!this.world.isClientSide) {
|
||||||
this.c(1, true);
|
this.c(1, true);
|
||||||
this.c(2, enumhand == EnumHand.OFF_HAND);
|
this.c(2, enumhand == EnumHand.OFF_HAND);
|
||||||
@@ -2929,7 +2943,10 @@ public abstract class EntityLiving extends Entity {
|
@@ -2930,7 +2944,10 @@ public abstract class EntityLiving extends Entity {
|
||||||
}
|
}
|
||||||
} else if (!this.isHandRaised() && !this.activeItem.isEmpty()) {
|
} else if (!this.isHandRaised() && !this.activeItem.isEmpty()) {
|
||||||
this.activeItem = ItemStack.a;
|
this.activeItem = ItemStack.a;
|
||||||
|
@ -70,7 +70,7 @@ index aada8d3b08b437f81f68f8e988412c1071287d54..252b3c59294a75618622950286969f5e
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3051,7 +3068,10 @@ public abstract class EntityLiving extends Entity {
|
@@ -3052,7 +3069,10 @@ public abstract class EntityLiving extends Entity {
|
||||||
}
|
}
|
||||||
|
|
||||||
this.activeItem = ItemStack.a;
|
this.activeItem = ItemStack.a;
|
||||||
|
|
|
@ -272,15 +272,15 @@ index ea6b310e8e4741c8bb301e5bc586faca8bea5e06..6bdaaf8daef15cd7c11943254e412e0e
|
||||||
list.stream().map((playerchunk) -> {
|
list.stream().map((playerchunk) -> {
|
||||||
CompletableFuture completablefuture;
|
CompletableFuture completablefuture;
|
||||||
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
|
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
|
||||||
index 611dea90200fe346915d66317e21d94154381e97..5428f306340acb92b93fe133b827173b646e5d4c 100644
|
index 80f1c41062de9251343c3d9be4e076315cdbf88d..4d4912a38ad0bf38a42ac8fed0ad4c1eecaf63a5 100644
|
||||||
--- a/src/main/java/net/minecraft/server/PlayerList.java
|
--- a/src/main/java/net/minecraft/server/PlayerList.java
|
||||||
+++ b/src/main/java/net/minecraft/server/PlayerList.java
|
+++ b/src/main/java/net/minecraft/server/PlayerList.java
|
||||||
@@ -400,7 +400,7 @@ public abstract class PlayerList {
|
@@ -400,7 +400,7 @@ public abstract class PlayerList {
|
||||||
cserver.getPluginManager().callEvent(playerQuitEvent);
|
cserver.getPluginManager().callEvent(playerQuitEvent);
|
||||||
entityplayer.getBukkitEntity().disconnect(playerQuitEvent.getQuitMessage());
|
entityplayer.getBukkitEntity().disconnect(playerQuitEvent.getQuitMessage());
|
||||||
|
|
||||||
- entityplayer.playerTick();// SPIGOT-924
|
- entityplayer.playerTick(); // SPIGOT-924
|
||||||
+ if (server.isMainThread()) entityplayer.playerTick();// SPIGOT-924 // Paper - don't tick during emergency shutdowns (Watchdog)
|
+ if (server.isMainThread()) entityplayer.playerTick(); // SPIGOT-924 // Paper - don't tick during emergency shutdowns (Watchdog)
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
||||||
// Paper start - Remove from collideRule team if needed
|
// Paper start - Remove from collideRule team if needed
|
||||||
|
|
|
@ -97,7 +97,7 @@ index 4be93d12dbe12511628fd97af52d5cf78da17eaa..6dd4303c1c211ac4b0bb542ea96cc150
|
||||||
this.minecraftServer.getMethodProfiler().enter("keepAlive");
|
this.minecraftServer.getMethodProfiler().enter("keepAlive");
|
||||||
// Paper Start - give clients a longer time to respond to pings as per pre 1.12.2 timings
|
// Paper Start - give clients a longer time to respond to pings as per pre 1.12.2 timings
|
||||||
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
|
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
|
||||||
index 1c7aac029ae01afa127ca386278a4ff8520e3674..d7a9ec78db5994259bd6de289a8b4996349b2559 100644
|
index d9fff5836e6f4b8a14fea1db66c5a89b43b2b952..628327e1e39299bbe64dff042d0187a9f79203a8 100644
|
||||||
--- a/src/main/java/net/minecraft/server/PlayerList.java
|
--- a/src/main/java/net/minecraft/server/PlayerList.java
|
||||||
+++ b/src/main/java/net/minecraft/server/PlayerList.java
|
+++ b/src/main/java/net/minecraft/server/PlayerList.java
|
||||||
@@ -16,6 +16,7 @@ import java.util.Map;
|
@@ -16,6 +16,7 @@ import java.util.Map;
|
||||||
|
@ -221,14 +221,14 @@ index 1c7aac029ae01afa127ca386278a4ff8520e3674..d7a9ec78db5994259bd6de289a8b4996
|
||||||
ServerStatisticManager serverstatisticmanager = (ServerStatisticManager) entityplayer.getStatisticManager(); // CraftBukkit
|
ServerStatisticManager serverstatisticmanager = (ServerStatisticManager) entityplayer.getStatisticManager(); // CraftBukkit
|
||||||
|
|
||||||
@@ -414,7 +468,7 @@ public abstract class PlayerList {
|
@@ -414,7 +468,7 @@ public abstract class PlayerList {
|
||||||
org.bukkit.craftbukkit.event.CraftEventFactory.handleInventoryCloseEvent(entityplayer, org.bukkit.event.inventory.InventoryCloseEvent.Reason.DISCONNECT); // Paper
|
entityplayer.closeInventory(org.bukkit.event.inventory.InventoryCloseEvent.Reason.DISCONNECT); // Paper
|
||||||
|
|
||||||
PlayerQuitEvent playerQuitEvent = new PlayerQuitEvent(cserver.getPlayer(entityplayer), "\u00A7e" + entityplayer.getName() + " left the game");
|
PlayerQuitEvent playerQuitEvent = new PlayerQuitEvent(cserver.getPlayer(entityplayer), "\u00A7e" + entityplayer.getName() + " left the game");
|
||||||
- cserver.getPluginManager().callEvent(playerQuitEvent);
|
- cserver.getPluginManager().callEvent(playerQuitEvent);
|
||||||
+ if (entityplayer.didPlayerJoinEvent) cserver.getPluginManager().callEvent(playerQuitEvent); // Paper - if we disconnected before join ever fired, don't fire quit
|
+ if (entityplayer.didPlayerJoinEvent) cserver.getPluginManager().callEvent(playerQuitEvent); // Paper - if we disconnected before join ever fired, don't fire quit
|
||||||
entityplayer.getBukkitEntity().disconnect(playerQuitEvent.getQuitMessage());
|
entityplayer.getBukkitEntity().disconnect(playerQuitEvent.getQuitMessage());
|
||||||
|
|
||||||
if (server.isMainThread()) entityplayer.playerTick();// SPIGOT-924 // Paper - don't tick during emergency shutdowns (Watchdog)
|
if (server.isMainThread()) entityplayer.playerTick(); // SPIGOT-924 // Paper - don't tick during emergency shutdowns (Watchdog)
|
||||||
@@ -466,6 +520,13 @@ public abstract class PlayerList {
|
@@ -466,6 +520,13 @@ public abstract class PlayerList {
|
||||||
// this.p.remove(uuid);
|
// this.p.remove(uuid);
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit b2f1908c59d22a693ee7ef10f480081436145251
|
Subproject commit 149527f7b10f992ef22186e85f13ded96ab76a63
|
|
@ -1 +1 @@
|
||||||
Subproject commit 8ea9b1386bc7f131c3df3ed0b87b49a5a3e811ba
|
Subproject commit be6aaf046eed614b0034ec42d5ef5e6f7de16ff0
|
Loading…
Reference in New Issue