Updated Upstream (Bukkit/CraftBukkit), deprecate SentientNPC API

Upstream has added the equivalent of our SentientNPC API, with exception to the EnderDragon.

We've added Mob to the EnderDragon, and our SentientNPC API should behave the same.

Vex#getOwner has been deprecated and a replacement Vex#getSummoner has been added using Mob.

However, since 1.13 is not production ready, SentientNPC API is subject for removal in 1.13.1 since
1.13 API is not compatible with 1.12.

Please move to the Mob interface ASAP.

This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
c5ab54d8 Expand GameRule API
ab9a606c Improve entity hierarchy by adding Mob interface.

CraftBukkit Changes:
29e75648 Expand GameRule API
50e6858b Improve entity hierarchy by adding Mob interface.
0e1d79b4 Correct error in previous patch
This commit is contained in:
Aikar 2018-08-10 22:13:00 -04:00
parent c2c18b2b7f
commit f835a91d15
No known key found for this signature in database
GPG Key ID: 401ADFC9891FAAFE
62 changed files with 212 additions and 368 deletions

View File

@ -1,4 +1,4 @@
From 4179a14fc2e28427ea851b91888e8073831bcfc3 Mon Sep 17 00:00:00 2001
From 3b79b7a3816fa3f16c83f2eff8e1c4ae0bf7250e Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Sat, 10 Jun 2017 16:59:40 -0500
Subject: [PATCH] Fix upstream javadoc warnings and errors
@ -6,7 +6,7 @@ Subject: [PATCH] Fix upstream javadoc warnings and errors
Upstream still refuses to use Java 8 with the API so they are likely unaware these are even issues.
diff --git a/src/main/java/org/bukkit/NamespacedKey.java b/src/main/java/org/bukkit/NamespacedKey.java
index 43239f84..fe8d3468 100644
index 43239f844..fe8d34685 100644
--- a/src/main/java/org/bukkit/NamespacedKey.java
+++ b/src/main/java/org/bukkit/NamespacedKey.java
@@ -38,8 +38,8 @@ public final class NamespacedKey {
@ -21,10 +21,10 @@ index 43239f84..fe8d3468 100644
*/
@Deprecated
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index d461c382..4e07af2e 100644
index e2559c024..9f3d805c2 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
@@ -1308,6 +1308,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
@@ -1341,6 +1341,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
* @param count the number of particles
* @param data the data to use for the particle or null,
* the type of this depends on {@link Particle#getDataType()}
@ -32,7 +32,7 @@ index d461c382..4e07af2e 100644
*/
public <T> void spawnParticle(Particle particle, Location location, int count, T data);
@@ -1323,6 +1324,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
@@ -1356,6 +1357,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
* @param count the number of particles
* @param data the data to use for the particle or null,
* the type of this depends on {@link Particle#getDataType()}
@ -40,7 +40,7 @@ index d461c382..4e07af2e 100644
*/
public <T> void spawnParticle(Particle particle, double x, double y, double z, int count, T data);
@@ -1372,6 +1374,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
@@ -1405,6 +1407,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
* @param offsetZ the maximum random offset on the Z axis
* @param data the data to use for the particle or null,
* the type of this depends on {@link Particle#getDataType()}
@ -48,7 +48,7 @@ index d461c382..4e07af2e 100644
*/
public <T> void spawnParticle(Particle particle, Location location, int count, double offsetX, double offsetY, double offsetZ, T data);
@@ -1391,6 +1394,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
@@ -1424,6 +1427,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
* @param offsetZ the maximum random offset on the Z axis
* @param data the data to use for the particle or null,
* the type of this depends on {@link Particle#getDataType()}
@ -56,7 +56,7 @@ index d461c382..4e07af2e 100644
*/
public <T> void spawnParticle(Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, T data);
@@ -1446,6 +1450,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
@@ -1479,6 +1483,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
* particle used (normally speed)
* @param data the data to use for the particle or null,
* the type of this depends on {@link Particle#getDataType()}
@ -64,7 +64,7 @@ index d461c382..4e07af2e 100644
*/
public <T> void spawnParticle(Particle particle, Location location, int count, double offsetX, double offsetY, double offsetZ, double extra, T data);
@@ -1467,6 +1472,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
@@ -1500,6 +1505,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
* particle used (normally speed)
* @param data the data to use for the particle or null,
* the type of this depends on {@link Particle#getDataType()}
@ -73,7 +73,7 @@ index d461c382..4e07af2e 100644
public <T> void spawnParticle(Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra, T data);
diff --git a/src/main/java/org/bukkit/entity/AbstractHorse.java b/src/main/java/org/bukkit/entity/AbstractHorse.java
index 10757454..6d5410ea 100644
index 107574546..6d5410eab 100644
--- a/src/main/java/org/bukkit/entity/AbstractHorse.java
+++ b/src/main/java/org/bukkit/entity/AbstractHorse.java
@@ -22,7 +22,7 @@ public interface AbstractHorse extends Animals, Vehicle, InventoryHolder, Tameab
@ -86,7 +86,7 @@ index 10757454..6d5410ea 100644
*/
@Deprecated
diff --git a/src/main/java/org/bukkit/entity/Guardian.java b/src/main/java/org/bukkit/entity/Guardian.java
index 98af0563..ec6890ae 100644
index 98af0563c..ec6890ae6 100644
--- a/src/main/java/org/bukkit/entity/Guardian.java
+++ b/src/main/java/org/bukkit/entity/Guardian.java
@@ -12,7 +12,7 @@ public interface Guardian extends Monster {
@ -99,7 +99,7 @@ index 98af0563..ec6890ae 100644
*/
@Deprecated
diff --git a/src/main/java/org/bukkit/entity/Horse.java b/src/main/java/org/bukkit/entity/Horse.java
index cfce8fa5..8660070b 100644
index cfce8fa57..8660070bb 100644
--- a/src/main/java/org/bukkit/entity/Horse.java
+++ b/src/main/java/org/bukkit/entity/Horse.java
@@ -151,7 +151,7 @@ public interface Horse extends AbstractHorse {
@ -112,7 +112,7 @@ index cfce8fa5..8660070b 100644
*/
@Deprecated
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 98c6039b..7c008237 100644
index 98c6039b9..7c008237a 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -456,7 +456,7 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline
@ -205,7 +205,7 @@ index 98c6039b..7c008237 100644
public <T> void spawnParticle(Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra, T data);
diff --git a/src/main/java/org/bukkit/entity/Skeleton.java b/src/main/java/org/bukkit/entity/Skeleton.java
index 2a02ab85..e33d00b3 100644
index 2a02ab855..e33d00b30 100644
--- a/src/main/java/org/bukkit/entity/Skeleton.java
+++ b/src/main/java/org/bukkit/entity/Skeleton.java
@@ -15,6 +15,7 @@ public interface Skeleton extends Monster {
@ -217,7 +217,7 @@ index 2a02ab85..e33d00b3 100644
*/
@Deprecated
diff --git a/src/main/java/org/bukkit/entity/Zombie.java b/src/main/java/org/bukkit/entity/Zombie.java
index cf53ea22..62923379 100644
index cf53ea22f..629233796 100644
--- a/src/main/java/org/bukkit/entity/Zombie.java
+++ b/src/main/java/org/bukkit/entity/Zombie.java
@@ -29,14 +29,14 @@ public interface Zombie extends Monster {
@ -238,7 +238,7 @@ index cf53ea22..62923379 100644
*/
@Deprecated
diff --git a/src/main/java/org/bukkit/event/player/PlayerLoginEvent.java b/src/main/java/org/bukkit/event/player/PlayerLoginEvent.java
index de4fb37f..f1de2af6 100644
index de4fb37f3..f1de2af6e 100644
--- a/src/main/java/org/bukkit/event/player/PlayerLoginEvent.java
+++ b/src/main/java/org/bukkit/event/player/PlayerLoginEvent.java
@@ -24,6 +24,7 @@ public class PlayerLoginEvent extends PlayerEvent {
@ -258,7 +258,7 @@ index de4fb37f..f1de2af6 100644
public PlayerLoginEvent(final Player player, String hostname, final InetAddress address, final Result result, final String message, final InetAddress realAddress) { // Spigot
this(player, hostname, address, realAddress); // Spigot
diff --git a/src/main/java/org/bukkit/inventory/Merchant.java b/src/main/java/org/bukkit/inventory/Merchant.java
index c8e68570..45431b36 100644
index c8e68570f..45431b360 100644
--- a/src/main/java/org/bukkit/inventory/Merchant.java
+++ b/src/main/java/org/bukkit/inventory/Merchant.java
@@ -32,7 +32,7 @@ public interface Merchant {
@ -280,7 +280,7 @@ index c8e68570..45431b36 100644
void setRecipe(int i, MerchantRecipe recipe) throws IndexOutOfBoundsException;
diff --git a/src/main/java/org/bukkit/potion/Potion.java b/src/main/java/org/bukkit/potion/Potion.java
index 1413b361..b4a8051c 100644
index 1413b361b..b4a8051cc 100644
--- a/src/main/java/org/bukkit/potion/Potion.java
+++ b/src/main/java/org/bukkit/potion/Potion.java
@@ -78,6 +78,7 @@ public class Potion {
@ -292,7 +292,7 @@ index 1413b361..b4a8051c 100644
*/
@Deprecated
diff --git a/src/main/java/org/bukkit/potion/PotionBrewer.java b/src/main/java/org/bukkit/potion/PotionBrewer.java
index 40f8d12b..33d19228 100644
index 40f8d12b9..33d192287 100644
--- a/src/main/java/org/bukkit/potion/PotionBrewer.java
+++ b/src/main/java/org/bukkit/potion/PotionBrewer.java
@@ -34,6 +34,8 @@ public interface PotionBrewer {
@ -305,7 +305,7 @@ index 40f8d12b..33d19228 100644
*/
public Collection<PotionEffect> getEffects(PotionType type, boolean upgraded, boolean extended);
diff --git a/src/main/java/org/bukkit/potion/PotionType.java b/src/main/java/org/bukkit/potion/PotionType.java
index 034421a7..f1a54c23 100644
index 034421a76..f1a54c23c 100644
--- a/src/main/java/org/bukkit/potion/PotionType.java
+++ b/src/main/java/org/bukkit/potion/PotionType.java
@@ -68,6 +68,7 @@ public enum PotionType {
@ -335,7 +335,7 @@ index 034421a7..f1a54c23 100644
*/
@Deprecated
diff --git a/src/main/java/org/bukkit/scoreboard/Team.java b/src/main/java/org/bukkit/scoreboard/Team.java
index ab71f3c3..358ea386 100644
index ab71f3c31..358ea386b 100644
--- a/src/main/java/org/bukkit/scoreboard/Team.java
+++ b/src/main/java/org/bukkit/scoreboard/Team.java
@@ -84,7 +84,7 @@ public interface Team {

View File

@ -1,4 +1,4 @@
From 58d01b2ff0aba651fd07c05986a36772ed13b46f Mon Sep 17 00:00:00 2001
From 883ac3334bba303050fbf07799feee0d56cea5c7 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Tue, 29 Aug 2017 23:58:48 -0400
Subject: [PATCH] Expand World.spawnParticle API and add Builder
@ -10,7 +10,7 @@ This adds a new Builder API which is much friendlier to use.
diff --git a/src/main/java/com/destroystokyo/paper/ParticleBuilder.java b/src/main/java/com/destroystokyo/paper/ParticleBuilder.java
new file mode 100644
index 00000000..2bccc409
index 000000000..2bccc4098
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/ParticleBuilder.java
@@ -0,0 +1,365 @@
@ -380,7 +380,7 @@ index 00000000..2bccc409
+ }
+}
diff --git a/src/main/java/org/bukkit/Particle.java b/src/main/java/org/bukkit/Particle.java
index 4d0acaf5..0ae85d85 100644
index 4d0acaf5b..0ae85d855 100644
--- a/src/main/java/org/bukkit/Particle.java
+++ b/src/main/java/org/bukkit/Particle.java
@@ -21,8 +21,8 @@ public enum Particle {
@ -410,10 +410,10 @@ index 4d0acaf5..0ae85d85 100644
* Options which can be applied to redstone dust particles - a particle
* color and size.
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index 49d2cc45..fd3a63fa 100644
index cf5bd1540..a7964fb1e 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
@@ -1676,7 +1676,31 @@ public interface World extends PluginMessageRecipient, Metadatable {
@@ -1709,7 +1709,31 @@ public interface World extends PluginMessageRecipient, Metadatable {
* the type of this depends on {@link Particle#getDataType()}
* @param <T> Type
*/

View File

@ -1,4 +1,4 @@
From ea3a8f5ed1c5ca4b73d03342500ca257864570f7 Mon Sep 17 00:00:00 2001
From 271f251dfa394ddcfa8ff6364ab1eeabfc84aa89 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sat, 16 Jun 2018 13:41:00 -0400
Subject: [PATCH] Add SentientNPC Interface to Entities
@ -14,10 +14,10 @@ This interface lets you identify NPC entities capable of sentience, and able to
diff --git a/src/main/java/com/destroystokyo/paper/entity/SentientNPC.java b/src/main/java/com/destroystokyo/paper/entity/SentientNPC.java
new file mode 100644
index 00000000..7e393254
index 000000000..cb8de4629
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/entity/SentientNPC.java
@@ -0,0 +1,57 @@
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2018 Daniel Ennis (Aikar) MIT License
+ *
@ -43,112 +43,68 @@ index 00000000..7e393254
+
+package com.destroystokyo.paper.entity;
+
+import org.bukkit.entity.LivingEntity;
+import org.bukkit.entity.Mob;
+
+
+/**
+ * Used to determine ACTUAL Living NPC's. Spigot mistakenly inversed the conditions for LivingEntity, and
+ * used LivingEntity for Insentient Entities, and named the actual EntityLiving class EntityInsentient.
+ *
+ * This should of all been inversed on the implementation side. To make matters worse, Spigot never
+ * exposed the differentiator that there are entities with AI that are not sentient/alive such as
+ * Armor stands and Players are the only things that do not implement the REAL EntityLiving class (named Insentient internally)
+ *
+ * This interface lets you identify NPC entities capable of sentience, and able to move about and react to the world.
+ * @deprecated Upstream has added this API. Use {@link Mob}. Will be removed in 1.13.1
+ */
+public interface SentientNPC extends LivingEntity {
+
+ /**
+ * Instructs this Creature to set the specified LivingEntity as its
+ * target.
+ * <p>
+ * Hostile creatures may attack their target, and friendly creatures may
+ * follow their target.
+ *
+ * @param target New LivingEntity to target, or null to clear the target
+ */
+ public void setTarget(LivingEntity target);
+
+ /**
+ * Gets the current target of this Creature
+ *
+ * @return Current target of this creature, or null if none exists
+ */
+ public LivingEntity getTarget();
+@Deprecated
+public interface SentientNPC extends Mob {
+}
diff --git a/src/main/java/org/bukkit/entity/Ambient.java b/src/main/java/org/bukkit/entity/Ambient.java
index 779e3897..ef548fb4 100644
index 613830a74..4ad71c825 100644
--- a/src/main/java/org/bukkit/entity/Ambient.java
+++ b/src/main/java/org/bukkit/entity/Ambient.java
@@ -3,4 +3,5 @@ package org.bukkit.entity;
@@ -3,4 +3,4 @@ package org.bukkit.entity;
/**
* Represents an ambient mob
*/
-public interface Ambient extends LivingEntity {}
+public interface Ambient extends LivingEntity, com.destroystokyo.paper.entity.SentientNPC { // Paper
+}
diff --git a/src/main/java/org/bukkit/entity/ComplexLivingEntity.java b/src/main/java/org/bukkit/entity/ComplexLivingEntity.java
index f74411c3..1f00923e 100644
--- a/src/main/java/org/bukkit/entity/ComplexLivingEntity.java
+++ b/src/main/java/org/bukkit/entity/ComplexLivingEntity.java
@@ -6,7 +6,7 @@ import java.util.Set;
* Represents a complex living entity - one that is made up of various smaller
* parts
*/
-public interface ComplexLivingEntity extends LivingEntity {
+public interface ComplexLivingEntity extends LivingEntity, com.destroystokyo.paper.entity.SentientNPC { // Paper
/**
* Gets a list of parts that belong to this complex entity
*
-public interface Ambient extends Mob {}
+public interface Ambient extends Mob, com.destroystokyo.paper.entity.SentientNPC {} // Paper {}
diff --git a/src/main/java/org/bukkit/entity/Creature.java b/src/main/java/org/bukkit/entity/Creature.java
index f223f55b..bbfb248e 100644
index 6c9c5e85e..c796c4dc2 100644
--- a/src/main/java/org/bukkit/entity/Creature.java
+++ b/src/main/java/org/bukkit/entity/Creature.java
@@ -4,7 +4,7 @@ package org.bukkit.entity;
@@ -4,4 +4,4 @@ package org.bukkit.entity;
* Represents a Creature. Creatures are non-intelligent monsters or animals
* which have very simple abilities.
*/
-public interface Creature extends LivingEntity {
+public interface Creature extends LivingEntity, com.destroystokyo.paper.entity.SentientNPC { // Paper
-public interface Creature extends Mob {}
+public interface Creature extends Mob, com.destroystokyo.paper.entity.SentientNPC {} // Paper
diff --git a/src/main/java/org/bukkit/entity/EnderDragon.java b/src/main/java/org/bukkit/entity/EnderDragon.java
index 4ea0e44e7..8f200e6c4 100644
--- a/src/main/java/org/bukkit/entity/EnderDragon.java
+++ b/src/main/java/org/bukkit/entity/EnderDragon.java
@@ -3,7 +3,7 @@ package org.bukkit.entity;
/**
* Represents an Ender Dragon
*/
-public interface EnderDragon extends ComplexLivingEntity {
+public interface EnderDragon extends ComplexLivingEntity, com.destroystokyo.paper.entity.SentientNPC { // Paper
/**
* Instructs this Creature to set the specified LivingEntity as its
@@ -15,12 +15,12 @@ public interface Creature extends LivingEntity {
*
* @param target New LivingEntity to target, or null to clear the target
*/
- public void setTarget(LivingEntity target);
+ //public void setTarget(LivingEntity target); // Paper - moved to SentientNPC
/**
* Gets the current target of this Creature
*
* @return Current target of this creature, or null if none exists
*/
- public LivingEntity getTarget();
+ //public LivingEntity getTarget(); // Paper - moved to SentientNPC
}
* Represents a phase or action that an Ender Dragon can perform.
diff --git a/src/main/java/org/bukkit/entity/Flying.java b/src/main/java/org/bukkit/entity/Flying.java
index 4f16a26c..207e9922 100644
index 580ce18bf..45840ee1f 100644
--- a/src/main/java/org/bukkit/entity/Flying.java
+++ b/src/main/java/org/bukkit/entity/Flying.java
@@ -3,4 +3,6 @@ package org.bukkit.entity;
@@ -3,4 +3,4 @@ package org.bukkit.entity;
/**
* Represents a Flying Entity.
*/
-public interface Flying extends LivingEntity {}
+public interface Flying extends LivingEntity, com.destroystokyo.paper.entity.SentientNPC { // Paper
+
+}
-public interface Flying extends Mob {}
+public interface Flying extends Mob, com.destroystokyo.paper.entity.SentientNPC {} // Paper
diff --git a/src/main/java/org/bukkit/entity/Slime.java b/src/main/java/org/bukkit/entity/Slime.java
index 0d87d203..d4eee19c 100644
index 1119e26e2..46d03d29d 100644
--- a/src/main/java/org/bukkit/entity/Slime.java
+++ b/src/main/java/org/bukkit/entity/Slime.java
@@ -3,7 +3,7 @@ package org.bukkit.entity;
/**
* Represents a Slime.
*/
-public interface Slime extends LivingEntity {
+public interface Slime extends LivingEntity, com.destroystokyo.paper.entity.SentientNPC { // Paper
-public interface Slime extends Mob {
+public interface Slime extends Mob, com.destroystokyo.paper.entity.SentientNPC { // Paper
/**
* @return The size of the slime

View File

@ -1,15 +1,15 @@
From 9701c04abd7b6530433049cf90502e7569f70ab0 Mon Sep 17 00:00:00 2001
From a3edf0217f3ee13041788a8800b618804700be4b Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 4 Jul 2018 15:29:21 -0400
Subject: [PATCH] Vex#getOwner API
Subject: [PATCH] Vex#getSummoner API
Get's the NPC that summoned this Vex
Get's the Mob that summoned this Vex
diff --git a/src/main/java/org/bukkit/entity/Vex.java b/src/main/java/org/bukkit/entity/Vex.java
index a2f2fcae..540135c3 100644
index a2f2fcaec..734683763 100644
--- a/src/main/java/org/bukkit/entity/Vex.java
+++ b/src/main/java/org/bukkit/entity/Vex.java
@@ -1,6 +1,13 @@
@@ -1,6 +1,18 @@
package org.bukkit.entity;
+import com.destroystokyo.paper.entity.SentientNPC;
@ -21,8 +21,13 @@ index a2f2fcae..540135c3 100644
+public interface Vex extends Monster {
+ /**
+ * @return What Entity (most likely an Evoker, but not guaranteed) summoned this Vex
+ * @deprecated Use {@link #getSummoner()}
+ */
+ SentientNPC getOwner(); // Paper
+ @Deprecated
+ default SentientNPC getOwner() { return (SentientNPC) getSummoner(); } // Paper
+
+ Mob getSummoner(); // Paper
+
+}
--
2.18.0

View File

@ -0,0 +1,22 @@
From de1ddd9370ca64acffbc01d5346ccc1ec13d720d Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Fri, 10 Aug 2018 22:08:34 -0400
Subject: [PATCH] Make EnderDragon extend Mob
diff --git a/src/main/java/org/bukkit/entity/EnderDragon.java b/src/main/java/org/bukkit/entity/EnderDragon.java
index 8f200e6c4..dad0b3141 100644
--- a/src/main/java/org/bukkit/entity/EnderDragon.java
+++ b/src/main/java/org/bukkit/entity/EnderDragon.java
@@ -3,7 +3,7 @@ package org.bukkit.entity;
/**
* Represents an Ender Dragon
*/
-public interface EnderDragon extends ComplexLivingEntity, com.destroystokyo.paper.entity.SentientNPC { // Paper
+public interface EnderDragon extends ComplexLivingEntity, com.destroystokyo.paper.entity.SentientNPC, org.bukkit.entity.Mob { // Paper - add Mob
/**
* Represents a phase or action that an Ender Dragon can perform.
--
2.18.0

View File

@ -1,4 +1,4 @@
From 0202a335eb1fefb24399d469f9e6e29b7e94d8a9 Mon Sep 17 00:00:00 2001
From 60f343f96680e16473292b298dac3b712c6ad852 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 30 Mar 2016 19:36:20 -0400
Subject: [PATCH] MC Dev fixes
@ -58,19 +58,6 @@ index 002da2a191..9f3aa24590 100644
++this.g.d;
}
diff --git a/src/main/java/net/minecraft/server/BlockRedstoneComparator.java b/src/main/java/net/minecraft/server/BlockRedstoneComparator.java
index 1697e19e7a..699a9bea6a 100644
--- a/src/main/java/net/minecraft/server/BlockRedstoneComparator.java
+++ b/src/main/java/net/minecraft/server/BlockRedstoneComparator.java
@@ -67,7 +67,7 @@ public class BlockRedstoneComparator extends BlockDiodeAbstract implements ITile
@Nullable
private EntityItemFrame a(World world, EnumDirection enumdirection, BlockPosition blockposition) {
- List list = world.a(EntityItemFrame.class, new AxisAlignedBB((double) blockposition.getX(), (double) blockposition.getY(), (double) blockposition.getZ(), (double) (blockposition.getX() + 1), (double) (blockposition.getY() + 1), (double) (blockposition.getZ() + 1)), (entityitemframe) -> {
+ List list = world.a(EntityItemFrame.class, new AxisAlignedBB((double) blockposition.getX(), (double) blockposition.getY(), (double) blockposition.getZ(), (double) (blockposition.getX() + 1), (double) (blockposition.getY() + 1), (double) (blockposition.getZ() + 1)), (Predicate<EntityItemFrame>)(entityitemframe) -> { // Paper - Fix compile issue
return entityitemframe != null && entityitemframe.getDirection() == enumdirection;
});
diff --git a/src/main/java/net/minecraft/server/ChunkSection.java b/src/main/java/net/minecraft/server/ChunkSection.java
index 650ef14758..35aea4829f 100644
--- a/src/main/java/net/minecraft/server/ChunkSection.java

View File

@ -1,4 +1,4 @@
From 15087609882f8372870b8dfe7f6cf033071fc532 Mon Sep 17 00:00:00 2001
From decdf8c2fb732471cb74652271e9ad351d74a207 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sat, 18 Jun 2016 23:22:12 -0400
Subject: [PATCH] Delay Chunk Unloads based on Player Movement
@ -150,10 +150,10 @@ index 7dae87199e..b6efd8506b 100644
this.methodProfiler.a(() -> {
return String.valueOf(TileEntityTypes.a(tileentity.C()));
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index e3e45ed48a..d4851dd2a6 100644
index 907791a5f1..579e783d11 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -1577,7 +1577,7 @@ public class CraftWorld implements World {
@@ -1616,7 +1616,7 @@ public class CraftWorld implements World {
ChunkProviderServer cps = world.getChunkProviderServer();
for (net.minecraft.server.Chunk chunk : cps.chunks.values()) {
// If in use, skip it

View File

@ -1,4 +1,4 @@
From d15bc5a9b6f530852b89e1a8c53597c7652d8580 Mon Sep 17 00:00:00 2001
From f40dfd47e9dbb7f53a4f297fb8aa39e285a17d71 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Tue, 15 Aug 2017 22:29:12 -0400
Subject: [PATCH] Expand World.spawnParticle API and add Builder
@ -37,10 +37,10 @@ index 5d5f6f6328..d506503e93 100644
if (this.a(entityplayer, false, d0, d1, d2, packetplayoutworldparticles)) {
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index b3756074b5..62638d4e25 100644
index 5cadee4ae0..aa8b237faf 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -1572,13 +1572,17 @@ public class CraftWorld implements World {
@@ -1611,13 +1611,17 @@ public class CraftWorld implements World {
spawnParticle(particle, location.getX(), location.getY(), location.getZ(), count, offsetX, offsetY, offsetZ, extra, data);
}

View File

@ -1,165 +0,0 @@
From 08a589cb3acd47ab831c3c1e1236821f94b86de0 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sun, 1 Jul 2018 22:06:29 -0400
Subject: [PATCH] Add SentientNPC Interface to Entities
Used to determine ACTUAL Living NPC's. Spigot mistakenly inversed the conditions for LivingEntity, and
used LivingEntity for Insentient Entities, and named the actual EntityLiving class EntityInsentient.
This should of all been inversed on the implementation side. To make matters worse, Spigot never
exposed the differentiator that there are entities with AI that are not sentient/alive such as
Armor stands and Players are the only things that do not implement the REAL EntityLiving class (named Insentient internally)
This interface lets you identify NPC entities capable of sentience, and able to move about and react to the world.
diff --git a/src/main/java/com/destroystokyo/paper/entity/CraftSentientNPC.java b/src/main/java/com/destroystokyo/paper/entity/CraftSentientNPC.java
new file mode 100644
index 0000000000..a60ba13495
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/entity/CraftSentientNPC.java
@@ -0,0 +1,25 @@
+package com.destroystokyo.paper.entity;
+
+import net.minecraft.server.EntityInsentient;
+import org.bukkit.craftbukkit.entity.CraftLivingEntity;
+import org.bukkit.entity.LivingEntity;
+
+public interface CraftSentientNPC <T extends EntityInsentient> extends SentientNPC {
+ T getHandle();
+
+ default public void setTarget(LivingEntity target) {
+ T entity = getHandle();
+ if (target == null) {
+ entity.setGoalTarget(null, null, false);
+ } else if (target instanceof CraftLivingEntity) {
+ entity.setGoalTarget(((CraftLivingEntity) target).getHandle(), null, false);
+ }
+ }
+
+ default public LivingEntity getTarget() {
+ if (getHandle().getGoalTarget() == null) return null;
+
+ return (CraftLivingEntity) getHandle().getGoalTarget().getBukkitEntity();
+ }
+
+}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftAmbient.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftAmbient.java
index 086980e76d..ccce080ab8 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftAmbient.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftAmbient.java
@@ -1,11 +1,12 @@
package org.bukkit.craftbukkit.entity;
+import com.destroystokyo.paper.entity.CraftSentientNPC;
import net.minecraft.server.EntityAmbient;
import org.bukkit.craftbukkit.CraftServer;
import org.bukkit.entity.Ambient;
import org.bukkit.entity.EntityType;
-public class CraftAmbient extends CraftLivingEntity implements Ambient {
+public class CraftAmbient extends CraftLivingEntity implements Ambient, CraftSentientNPC { // Paper
public CraftAmbient(CraftServer server, EntityAmbient entity) {
super(server, entity);
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftComplexLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftComplexLivingEntity.java
index cc115cc368..3a4e6f0c7e 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftComplexLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftComplexLivingEntity.java
@@ -1,17 +1,19 @@
package org.bukkit.craftbukkit.entity;
+import com.destroystokyo.paper.entity.CraftSentientNPC;
+import net.minecraft.server.EntityInsentient;
import net.minecraft.server.EntityLiving;
import org.bukkit.craftbukkit.CraftServer;
import org.bukkit.entity.ComplexLivingEntity;
-public abstract class CraftComplexLivingEntity extends CraftLivingEntity implements ComplexLivingEntity {
+public abstract class CraftComplexLivingEntity extends CraftLivingEntity implements ComplexLivingEntity, CraftSentientNPC { // Paper
public CraftComplexLivingEntity(CraftServer server, EntityLiving entity) {
super(server, entity);
}
@Override
- public EntityLiving getHandle() {
- return (EntityLiving) entity;
+ public EntityInsentient getHandle() { // Paper
+ return (EntityInsentient) entity; // Paper
}
@Override
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftCreature.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftCreature.java
index 09d42141fb..30004e5e8c 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftCreature.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftCreature.java
@@ -1,16 +1,18 @@
package org.bukkit.craftbukkit.entity;
+import com.destroystokyo.paper.entity.CraftSentientNPC;
import net.minecraft.server.EntityCreature;
import org.bukkit.craftbukkit.CraftServer;
import org.bukkit.entity.Creature;
import org.bukkit.entity.LivingEntity;
-public class CraftCreature extends CraftLivingEntity implements Creature {
+public class CraftCreature extends CraftLivingEntity implements Creature, CraftSentientNPC { // Paper
public CraftCreature(CraftServer server, EntityCreature entity) {
super(server, entity);
}
- public void setTarget(LivingEntity target) {
+ // Paper start - move down to SentientNPC
+ /*public void setTarget(LivingEntity target) {
EntityCreature entity = getHandle();
if (target == null) {
entity.setGoalTarget(null, null, false);
@@ -23,7 +25,8 @@ public class CraftCreature extends CraftLivingEntity implements Creature {
if (getHandle().getGoalTarget() == null) return null;
return (CraftLivingEntity) getHandle().getGoalTarget().getBukkitEntity();
- }
+ }*/
+ // Paper end
@Override
public EntityCreature getHandle() {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftFlying.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftFlying.java
index f374c7b880..9e6f523bf1 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftFlying.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftFlying.java
@@ -1,10 +1,11 @@
package org.bukkit.craftbukkit.entity;
+import com.destroystokyo.paper.entity.CraftSentientNPC;
import net.minecraft.server.EntityFlying;
import org.bukkit.craftbukkit.CraftServer;
import org.bukkit.entity.Flying;
-public class CraftFlying extends CraftLivingEntity implements Flying {
+public class CraftFlying extends CraftLivingEntity implements Flying, CraftSentientNPC { // Paper
public CraftFlying(CraftServer server, EntityFlying entity) {
super(server, entity);
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftSlime.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftSlime.java
index 6bf30c834c..3768b9573a 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftSlime.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftSlime.java
@@ -1,5 +1,6 @@
package org.bukkit.craftbukkit.entity;
+import com.destroystokyo.paper.entity.CraftSentientNPC;
import net.minecraft.server.EntitySlime;
import org.bukkit.craftbukkit.CraftServer;
@@ -7,7 +8,7 @@ import org.bukkit.entity.EntityType;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Slime;
-public class CraftSlime extends CraftLivingEntity implements Slime {
+public class CraftSlime extends CraftLivingEntity implements Slime, CraftSentientNPC { // Paper
public CraftSlime(CraftServer server, EntitySlime entity) {
super(server, entity);
--
2.18.0

View File

@ -1,4 +1,4 @@
From 4be68b5417b29394d592ed9f100bddcf5e72277d Mon Sep 17 00:00:00 2001
From 221ad974750f94575bb9169f2174a6ea9ec2fef9 Mon Sep 17 00:00:00 2001
From: Brokkonaut <hannos17@gmx.de>
Date: Sat, 30 Jun 2018 05:45:39 +0200
Subject: [PATCH] Improve ProjectileHitEvent to include the BlockFace where the

View File

@ -1,4 +1,4 @@
From 4ff1afe950dede0cd610bf97923f15bbcd7afd44 Mon Sep 17 00:00:00 2001
From 4778b7ea0c0515b083658bc3310e75c84c6887e0 Mon Sep 17 00:00:00 2001
From: BillyGalbreath <Blake.Galbreath@GMail.com>
Date: Fri, 22 Jun 2018 10:38:31 -0500
Subject: [PATCH] Add config to disable ender dragon legacy check

View File

@ -1,11 +1,11 @@
From 5e80c475af8206d99c10f11d62f64e30f2ffb94f Mon Sep 17 00:00:00 2001
From 2db064a175637c05e67c6b63f212c3ce50d3e1ee Mon Sep 17 00:00:00 2001
From: Brokkonaut <hannos17@gmx.de>
Date: Tue, 3 Jul 2018 16:08:14 +0200
Subject: [PATCH] Implement World.getEntity(UUID) API
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 23f0d5cb7d..54a605f9b9 100644
index dee9c01e77..654e7cdfa2 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -752,6 +752,14 @@ public class CraftWorld implements World {

View File

@ -1,4 +1,4 @@
From 5d76dfe88bc7b828b9a61752e550e413645fd08f Mon Sep 17 00:00:00 2001
From e1efd932d76924b1ac36bbd9ea7f64a9474e4cef Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Tue, 3 Jul 2018 21:56:23 -0400
Subject: [PATCH] InventoryCloseEvent Reason API

View File

@ -1,4 +1,4 @@
From aa8a90ef5eb5cca3f80f32372e57e32ef42d595c Mon Sep 17 00:00:00 2001
From 679d49837ab776c02a12d6e1a93206606520080b Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 4 Jul 2018 03:39:51 -0400
Subject: [PATCH] Avoid Chunk Lookups for Entity/TileEntity Current Chunk

View File

@ -1,4 +1,4 @@
From 7df9641c274ac790438bf2172cdf02d8dcfb9624 Mon Sep 17 00:00:00 2001
From 5705ddf5f4e423bef566a802eb60759d24ea8de1 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 4 Jul 2018 15:22:06 -0400
Subject: [PATCH] Configurable Bed Search Radius

View File

@ -1,7 +1,7 @@
From 1b4118e0e938196c4d6cfc58a94580714127b813 Mon Sep 17 00:00:00 2001
From 65b79177e208a769352174caf4a4c377bf144534 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 4 Jul 2018 15:30:22 -0400
Subject: [PATCH] Vex#getOwner API
Subject: [PATCH] Vex#getSummoner API
Get's the NPC that summoned this Vex
@ -18,25 +18,28 @@ index 80403473c8..36f8c315b5 100644
return this.b;
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftVex.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftVex.java
index 787a41e015..5d5658136c 100644
index 787a41e015..927ed9a9a8 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftVex.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftVex.java
@@ -1,5 +1,7 @@
@@ -1,8 +1,10 @@
package org.bukkit.craftbukkit.entity;
+import com.destroystokyo.paper.entity.SentientNPC;
+import net.minecraft.server.EntityInsentient;
import net.minecraft.server.EntityVex;
import org.bukkit.craftbukkit.CraftServer;
import org.bukkit.entity.EntityType;
+import org.bukkit.entity.Mob;
import org.bukkit.entity.Vex;
public class CraftVex extends CraftMonster implements Vex {
@@ -16,6 +18,13 @@ public class CraftVex extends CraftMonster implements Vex {
return (EntityVex) super.getHandle();
}
+ // Paper start
+ public SentientNPC getOwner() {
+ public Mob getSummoner() {
+ EntityInsentient owner = getHandle().getOwner();
+ return owner != null ? (SentientNPC) owner.getBukkitEntity() : null;
+ return owner != null ? (Mob) owner.getBukkitEntity() : null;
+ }
+ // Paper end
+

View File

@ -1,4 +1,4 @@
From f1b5e30bf792b0fcaae09cd0a6c22a3e51188e76 Mon Sep 17 00:00:00 2001
From 8089c06f056dfa1024a675cca101536679379a2f Mon Sep 17 00:00:00 2001
From: Minecrell <minecrell@minecrell.net>
Date: Fri, 13 Jul 2018 14:54:43 +0200
Subject: [PATCH] Refresh player inventory when cancelling

View File

@ -1,4 +1,4 @@
From 4be5975af24a20284578325f9598757ac8e1de7d Mon Sep 17 00:00:00 2001
From 824c5696960b503feb9de1abea56665fd9daabd7 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Thu, 19 Jul 2018 01:05:00 -0400
Subject: [PATCH] Don't change the Entity Random seed for squids

View File

@ -1,4 +1,4 @@
From 4e6eb81a70dc35d842ff8937311d7c5a55cc75bb Mon Sep 17 00:00:00 2001
From 0b3286a2f8d6a1e584132c98cc882edbdbc045b5 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Thu, 19 Jul 2018 01:08:05 -0400
Subject: [PATCH] Re-add vanilla entity warnings for duplicates

View File

@ -1,4 +1,4 @@
From 9519f6cc764272dafbe7c8ccd336be8f039712c3 Mon Sep 17 00:00:00 2001
From f2169f630da6dee6fe001e160ac9c7802f26258c Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Thu, 19 Jul 2018 01:23:00 -0400
Subject: [PATCH] Don't process despawn if entity is in a chunk scheduled for

View File

@ -1,4 +1,4 @@
From b91850e15408ce5836f52498593015d311ab3ed1 Mon Sep 17 00:00:00 2001
From d1c13d0946fc2ae99baa7ba2d5a7a97e49ebe0ff Mon Sep 17 00:00:00 2001
From: Hugo Manrique <hugmanrique@gmail.com>
Date: Mon, 16 Jul 2018 12:42:20 +0200
Subject: [PATCH] Avoid item merge if stack size above max stack size

View File

@ -1,4 +1,4 @@
From 34f4d5718d450dd805c09424efc680518c916db7 Mon Sep 17 00:00:00 2001
From 5086970e5888c6c57f9cf7c49c5d682c60e6a67f Mon Sep 17 00:00:00 2001
From: Minecrell <minecrell@minecrell.net>
Date: Tue, 17 Jul 2018 16:42:17 +0200
Subject: [PATCH] Use asynchronous Log4j 2 loggers

View File

@ -1,4 +1,4 @@
From 5aacc5e50fdefecde0b50294c1649b134b03c127 Mon Sep 17 00:00:00 2001
From 871e7ad9a8470149c08aa94e53d521ae16ec7aa2 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()

View File

@ -1,4 +1,4 @@
From a99895fc43c41d8ec5e6cbe9a3ba41829fad6870 Mon Sep 17 00:00:00 2001
From bc734010ef31a9093bc265f2be31acfae3933af0 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sat, 21 Jul 2018 08:25:40 -0400
Subject: [PATCH] Add Debug Entities option to debug dupe uuid issues

View File

@ -1,4 +1,4 @@
From 8831a7a29b006b6669d1641a57cab2267f31be82 Mon Sep 17 00:00:00 2001
From df132de1040b328a574f3e2bce351d7bfb2d7766 Mon Sep 17 00:00:00 2001
From: BillyGalbreath <Blake.Galbreath@GMail.com>
Date: Sat, 21 Jul 2018 01:51:27 -0500
Subject: [PATCH] EnderDragon Events

View File

@ -1,4 +1,4 @@
From d5fa9f005964a2b6c72f72f804dfa4d2f94caae5 Mon Sep 17 00:00:00 2001
From 4cc922d68ece12295ec360bcb317d19169f0bf74 Mon Sep 17 00:00:00 2001
From: BillyGalbreath <Blake.Galbreath@GMail.com>
Date: Sat, 21 Jul 2018 01:59:59 -0500
Subject: [PATCH] PlayerElytraBoostEvent

View File

@ -1,4 +1,4 @@
From cafeea8266c8558075d3efb4d9758f664e884df4 Mon Sep 17 00:00:00 2001
From fda69eaf809ad4ff5d4ca6049727b82cb0119938 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

View File

@ -1,11 +1,11 @@
From 35783dd499e0ca36931e371b18f56a03414bb1e0 Mon Sep 17 00:00:00 2001
From 1af69e8c1ce59acaeac3354b1117135675e903ef Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sat, 21 Jul 2018 16:55:04 -0400
Subject: [PATCH] Add async chunk load API
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 54a605f9b9..f4dc7e4ac6 100644
index 654e7cdfa2..512b457e10 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -156,6 +156,27 @@ public class CraftWorld implements World {

View File

@ -1,4 +1,4 @@
From 6aece268010bb66538ac901004a4723293fed632 Mon Sep 17 00:00:00 2001
From 88eeebc428981910419ea1d2409c2b86f31aef4f Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sat, 21 Apr 2018 11:21:48 -0400
Subject: [PATCH] Configurable Allowance of Permanent Chunk Loaders

View File

@ -1,4 +1,4 @@
From 1831ba9a8382cd486200bf502041b587e1b83da6 Mon Sep 17 00:00:00 2001
From 0168c3fb663c71d47314428a7fa2e686c2d9f910 Mon Sep 17 00:00:00 2001
From: Techcable <Techcable@outlook.com>
Date: Wed, 30 Nov 2016 20:56:58 -0600
Subject: [PATCH] Speedup BlockPos by fixing inlining

View File

@ -1,4 +1,4 @@
From b57811ddf6cad35a978efa7e457152a3546ec806 Mon Sep 17 00:00:00 2001
From 4056bf53bae443cb843da8ad7b8a0dc7927b4a3d Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sun, 22 Jul 2018 21:21:41 -0400
Subject: [PATCH] Don't save Proto Chunks

View File

@ -1,4 +1,4 @@
From 9c353373373975d32ebe850456c5eba4d3b1cb95 Mon Sep 17 00:00:00 2001
From 2720feea57f8841d8dcc99e884bc9b948b80f0b3 Mon Sep 17 00:00:00 2001
From: Andrew Steinborn <git@steinborn.me>
Date: Mon, 23 Jul 2018 13:08:19 -0400
Subject: [PATCH] Optimize RegistryID.c()

View File

@ -1,4 +1,4 @@
From ee07497ef4bca2d22e4f8dfa6b8d98d5c8b83b21 Mon Sep 17 00:00:00 2001
From 9d410de6f1e204c4c0bc29e27e56aa2248bf20f7 Mon Sep 17 00:00:00 2001
From: Hugo Manrique <hugmanrique@gmail.com>
Date: Mon, 23 Jul 2018 12:57:39 +0200
Subject: [PATCH] Option to prevent armor stands from doing entity lookups

View File

@ -1,4 +1,4 @@
From 8d0e648fd512c24ca2bd4ae7454aeea400f10c17 Mon Sep 17 00:00:00 2001
From 89692da6f2aa8a27f1e53fb901890b590f84c1aa Mon Sep 17 00:00:00 2001
From: Hugo Manrique <hugmanrique@gmail.com>
Date: Mon, 23 Jul 2018 14:22:26 +0200
Subject: [PATCH] Vanished players don't have rights

View File

@ -1,4 +1,4 @@
From fda8059a53d601af423ce122c823c21d32c359ff Mon Sep 17 00:00:00 2001
From 58232527da5cfef622e6c0dbbd9df9ca88c7f412 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Mon, 23 Jul 2018 19:13:06 -0400
Subject: [PATCH] Thread Safe Iteration of Chunk Scheduler

View File

@ -1,4 +1,4 @@
From 5cbd36d62762550418ec853d7dda2fbd865e5575 Mon Sep 17 00:00:00 2001
From f213c595ea36e2936111b4a2e68ad183208d1f0d Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Mon, 23 Jul 2018 22:18:31 -0400
Subject: [PATCH] Mark chunk dirty anytime entities change to guarantee it

View File

@ -1,4 +1,4 @@
From 7f0811889bd2f657478e6ab5390369a9105f4f17 Mon Sep 17 00:00:00 2001
From f1edc0289d2b308fd8c73f64b58c8946913b6af5 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Mon, 23 Jul 2018 22:44:23 -0400
Subject: [PATCH] Add some Debug to Chunk Entity slices

View File

@ -1,4 +1,4 @@
From 2f984c6405cb18c32b1be885586269bad0a36bbe Mon Sep 17 00:00:00 2001
From 3f17ec5d00f8b665bd1d1ded6821d3dcc1eafde6 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Mon, 23 Jul 2018 23:40:04 -0400
Subject: [PATCH] Optimize Region File Cache

View File

@ -1,4 +1,4 @@
From d5c713111cdb3557021204293bbbf25e1867c679 Mon Sep 17 00:00:00 2001
From dad3c99488eaf5ef540bfd4c1de8e161ab5ebbb7 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 25 Jul 2018 01:21:05 -0400
Subject: [PATCH] repair bad rcon.ip settings temporarily

View File

@ -1,4 +1,4 @@
From a1ebbc58e252b9294afd2dd8557ebf1ddfcbad7e Mon Sep 17 00:00:00 2001
From 80d772279b2c0c80e6e1c6bc790ce53eafb3d127 Mon Sep 17 00:00:00 2001
From: Anthony MacAllister <anthonymmacallister@gmail.com>
Date: Thu, 26 Jul 2018 15:30:03 -0400
Subject: [PATCH] EntityTransformedEvent

View File

@ -1,4 +1,4 @@
From b35aab417fa86d548c90ca1426c50321466a2f68 Mon Sep 17 00:00:00 2001
From 2912fb59c837b423ee607b068fbbbcbc258d7615 Mon Sep 17 00:00:00 2001
From: BillyGalbreath <Blake.Galbreath@GMail.com>
Date: Fri, 27 Jul 2018 22:36:31 -0500
Subject: [PATCH] SkeletonHorse Additions

View File

@ -1,4 +1,4 @@
From 8f7833aafc25460c7d84db690eeeeed35cf0d662 Mon Sep 17 00:00:00 2001
From 0defa946320b46d507524d447a71b1e7581cf645 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Thu, 26 Jul 2018 00:11:12 -0400
Subject: [PATCH] Prevent Saving Bad entities to chunks

View File

@ -1,4 +1,4 @@
From aeb97616ee5f98448d04f6a61ec3209299a93a23 Mon Sep 17 00:00:00 2001
From 8eb9f1f3fa7924ec6fc84d4b18153c32faaee00f Mon Sep 17 00:00:00 2001
From: Hugo Manrique <hugmanrique@gmail.com>
Date: Thu, 26 Jul 2018 14:10:23 +0200
Subject: [PATCH] Don't call getItemMeta on hasItemMeta

View File

@ -1,4 +1,4 @@
From 3801ecdcf2c8ecd45b5a8689ee0368365fb7bda1 Mon Sep 17 00:00:00 2001
From fa3c3a5b10ac97ba9c7d813621b31a9510e5bb01 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sat, 28 Jul 2018 12:09:20 -0400
Subject: [PATCH] Always process chunk removal in removeEntity

View File

@ -1,4 +1,4 @@
From 7c85d9fd4a96d659e3cffce2bd80eb3432c5be3a Mon Sep 17 00:00:00 2001
From 165b2ca3d92767a2a413b8bb49c19f462c48049b Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sat, 28 Jul 2018 12:18:27 -0400
Subject: [PATCH] Ignore Dead Entities in entityList iteration
@ -71,7 +71,7 @@ index ff0112c52a..82f4f00a76 100644
if (entity instanceof EntityInsentient) {
EntityInsentient entityinsentient = (EntityInsentient) entity;
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index f4dc7e4ac6..8923df898f 100644
index 512b457e10..051e840507 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -660,6 +660,7 @@ public class CraftWorld implements World {

View File

@ -1,4 +1,4 @@
From 6a67e26019ad94f74dc2f1a9d6b92cf4930f8f68 Mon Sep 17 00:00:00 2001
From 9bff4a5559678d038a09f40de52e945652283fda Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sun, 29 Jul 2018 11:58:05 -0400
Subject: [PATCH] Always process chunk registration after moving

View File

@ -1,4 +1,4 @@
From 6474e903c1e6963f0bde42ec166c51c6d7f91c83 Mon Sep 17 00:00:00 2001
From 7ac466f46eef301c130375deddd07c63e396e77e Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sun, 29 Jul 2018 15:48:50 -0400
Subject: [PATCH] Provide option to use a versioned world folder for testing

View File

@ -1,4 +1,4 @@
From 24e2d607bc3e0037cf02ff59d705e4143e11b327 Mon Sep 17 00:00:00 2001
From fd544f44ec3ea69345539647175ca4f392dab08e Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sun, 29 Jul 2018 22:58:47 -0400
Subject: [PATCH] MC-111480: Start Entity ID's at 1

View File

@ -1,4 +1,4 @@
From 62062d51dc14fc95198b6edded0c255d2285dea2 Mon Sep 17 00:00:00 2001
From bb74cd20c9ff5d58520c15efae6774047afda322 Mon Sep 17 00:00:00 2001
From: willies952002 <admin@domnian.com>
Date: Thu, 26 Jul 2018 02:25:46 -0400
Subject: [PATCH] Implement Expanded ArmorStand API

View File

@ -1,4 +1,4 @@
From 30f58491e4db22f80a13caf4b02932c04fc9cf50 Mon Sep 17 00:00:00 2001
From 259073abd3c6dd5d4a3434c920db539e73f956cc Mon Sep 17 00:00:00 2001
From: BillyGalbreath <Blake.Galbreath@GMail.com>
Date: Fri, 20 Jul 2018 23:37:03 -0500
Subject: [PATCH] AnvilDamageEvent

View File

@ -1,4 +1,4 @@
From 248bcfe53b0112bd22daa062b8cf3c9dc2a4dec1 Mon Sep 17 00:00:00 2001
From 8974da202977345cc91552b465f0bf7512bdce78 Mon Sep 17 00:00:00 2001
From: willies952002 <admin@domnian.com>
Date: Mon, 30 Jul 2018 02:42:49 -0400
Subject: [PATCH] World EntityHuman Lookup Optimizations

View File

@ -1,4 +1,4 @@
From 869bac2d45c873bc19de02ec97c09a8a4ffa67ec Mon Sep 17 00:00:00 2001
From bb8c25d88fb656ac344c762bbeab2537aff796b0 Mon Sep 17 00:00:00 2001
From: Mark Vainomaa <mikroskeem@mikroskeem.eu>
Date: Mon, 16 Jul 2018 00:05:05 +0300
Subject: [PATCH] Add TNTPrimeEvent

View File

@ -1,4 +1,4 @@
From cd05d2802f3933e758c93d505af2372ac02472d8 Mon Sep 17 00:00:00 2001
From a118ceac94cfcd9814c85880f46ae0a08e4e4fb7 Mon Sep 17 00:00:00 2001
From: Shane Freeder <theboyetronic@gmail.com>
Date: Sun, 29 Jul 2018 05:02:15 +0100
Subject: [PATCH] Break up and make tab spam limits configurable

View File

@ -1,4 +1,4 @@
From f16f6209402ab43846255aabbbce6e4dbfca6197 Mon Sep 17 00:00:00 2001
From 9798b5841235ed96bf6725d8e672296d92e6f066 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Tue, 31 Jul 2018 19:32:57 -0500
Subject: [PATCH] Make portal teleportation adjustment math more accurate

View File

@ -1,11 +1,11 @@
From c0a59687fae964076d0e6aa85de5e88395269ee2 Mon Sep 17 00:00:00 2001
From f78970cd7bd76c58a9b27d56f68d832c4f512f7e Mon Sep 17 00:00:00 2001
From: BillyGalbreath <Blake.Galbreath@GMail.com>
Date: Thu, 2 Aug 2018 08:44:35 -0500
Subject: [PATCH] Add hand to bucket events
diff --git a/src/main/java/net/minecraft/server/EntityCow.java b/src/main/java/net/minecraft/server/EntityCow.java
index b2010ffa6..3493c4c44 100644
index b2010ffa6f..3493c4c44d 100644
--- a/src/main/java/net/minecraft/server/EntityCow.java
+++ b/src/main/java/net/minecraft/server/EntityCow.java
@@ -65,7 +65,7 @@ public class EntityCow extends EntityAnimal {
@ -18,7 +18,7 @@ index b2010ffa6..3493c4c44 100644
if (event.isCancelled()) {
return false;
diff --git a/src/main/java/net/minecraft/server/ItemBucket.java b/src/main/java/net/minecraft/server/ItemBucket.java
index 2c36c3990..b38ee2853 100644
index 2c36c3990e..b38ee28532 100644
--- a/src/main/java/net/minecraft/server/ItemBucket.java
+++ b/src/main/java/net/minecraft/server/ItemBucket.java
@@ -37,7 +37,7 @@ public class ItemBucket extends Item {
@ -67,7 +67,7 @@ index 2c36c3990..b38ee2853 100644
((EntityPlayer) entityhuman).playerConnection.sendPacket(new PacketPlayOutBlockChange(world, blockposition)); // SPIGOT-4238: needed when looking through entity
// TODO: inventory not updated
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index 140ddae0d..9037a1233 100644
index 140ddae0d7..9037a1233a 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -168,6 +168,20 @@ public class CraftEventFactory {

View File

@ -1,11 +1,11 @@
From aed96565d2565b8718348d9f2a869e48ee319ef9 Mon Sep 17 00:00:00 2001
From 4676b5f04e3fe5a120830eda2d70990e9babf5ea Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Fri, 3 Aug 2018 00:04:54 -0400
Subject: [PATCH] MC-135506: Experience should save as Integers
diff --git a/src/main/java/net/minecraft/server/EntityExperienceOrb.java b/src/main/java/net/minecraft/server/EntityExperienceOrb.java
index b8bfc7577..13299ad10 100644
index b8bfc75771..13299ad102 100644
--- a/src/main/java/net/minecraft/server/EntityExperienceOrb.java
+++ b/src/main/java/net/minecraft/server/EntityExperienceOrb.java
@@ -205,14 +205,14 @@ public class EntityExperienceOrb extends Entity {

View File

@ -1,4 +1,4 @@
From 35f5865d3457adf2d280dc4e7c94864a63d46dc3 Mon Sep 17 00:00:00 2001
From 05ba2bf241db3c4bc3e3d41d47723e9a260f5203 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Fri, 3 Aug 2018 22:47:46 -0400
Subject: [PATCH] Entity add to world fixes
@ -14,7 +14,7 @@ Fix this by differing entity add to world for all entities at the same time
the original entity is dead, overwrite it as the logic does for unloaod queued entities.
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index e510940ab..db8fbc006 100644
index e510940ab3..db8fbc006d 100644
--- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -902,6 +902,7 @@ public class Chunk implements IChunkAccess {
@ -41,7 +41,7 @@ index e510940ab..db8fbc006 100644
// CraftBukkit start
org.bukkit.Server server = this.world.getServer();
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index b0053e5e6..004c3ec47 100644
index b0053e5e63..004c3ec474 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -1069,6 +1069,7 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
@ -70,7 +70,7 @@ index b0053e5e6..004c3ec47 100644
}
this.entityList.add(entity);
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 7a9f28421..6412715b7 100644
index 7a9f28421b..6412715b78 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -992,7 +992,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {

View File

@ -1,4 +1,4 @@
From dadb22cbfff595f7260cec7213f04b13e7be3e2a Mon Sep 17 00:00:00 2001
From 8bf0e1d042523d99dcf185bfd7bb17df0639536b Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Tue, 22 Nov 2016 00:40:42 -0500
Subject: [PATCH] Fix client rendering skulls from same user
@ -12,7 +12,7 @@ This allows the client to render multiple skull textures from the same user,
for when different skins were used when skull was made.
diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java
index e52014fd8..da11ec167 100644
index e52014fd8f..da11ec1672 100644
--- a/src/main/java/net/minecraft/server/ItemStack.java
+++ b/src/main/java/net/minecraft/server/ItemStack.java
@@ -44,7 +44,7 @@ public final class ItemStack {
@ -25,7 +25,7 @@ index e52014fd8..da11ec167 100644
private EntityItemFrame i;
private ShapeDetectorBlock j;
diff --git a/src/main/java/net/minecraft/server/PacketDataSerializer.java b/src/main/java/net/minecraft/server/PacketDataSerializer.java
index d04afceb7..b0e8ffc4b 100644
index d04afceb70..b0e8ffc4b1 100644
--- a/src/main/java/net/minecraft/server/PacketDataSerializer.java
+++ b/src/main/java/net/minecraft/server/PacketDataSerializer.java
@@ -251,6 +251,15 @@ public class PacketDataSerializer extends ByteBuf {
@ -62,7 +62,7 @@ index d04afceb7..b0e8ffc4b 100644
}
// CraftBukkit end
diff --git a/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java b/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java
index 1aa36156a..c5f0b8530 100644
index 1aa36156a8..c5f0b85309 100644
--- a/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java
+++ b/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java
@@ -38,6 +38,7 @@ public class PacketPlayOutMapChunk implements Packet<PacketListenerPlayOut> {
@ -83,7 +83,7 @@ index 1aa36156a..c5f0b8530 100644
}
diff --git a/src/main/java/net/minecraft/server/TileEntitySkull.java b/src/main/java/net/minecraft/server/TileEntitySkull.java
index 85fd8dab6..16a5537ce 100644
index 85fd8dab60..16a5537ce0 100644
--- a/src/main/java/net/minecraft/server/TileEntitySkull.java
+++ b/src/main/java/net/minecraft/server/TileEntitySkull.java
@@ -143,9 +143,37 @@ public class TileEntitySkull extends TileEntity /*implements ITickable*/ { // Pa

View File

@ -1,11 +1,11 @@
From 69c3c09719b232951281ab08e3e5185f86cb0eae Mon Sep 17 00:00:00 2001
From 1981048ec72af6199d70617eebd09d24f9e06e94 Mon Sep 17 00:00:00 2001
From: miclebrick <miclebrick@outlook.com>
Date: Wed, 8 Aug 2018 15:30:52 -0400
Subject: [PATCH] Add 5 second short dumps to watchdog
diff --git a/src/main/java/org/spigotmc/WatchdogThread.java b/src/main/java/org/spigotmc/WatchdogThread.java
index 57a4748a3..815c3e664 100644
index 57a4748a30..815c3e6649 100644
--- a/src/main/java/org/spigotmc/WatchdogThread.java
+++ b/src/main/java/org/spigotmc/WatchdogThread.java
@@ -13,8 +13,10 @@ public class WatchdogThread extends Thread

View File

@ -0,0 +1,36 @@
From 3d87918c9a23077f04961192f14a0ba3f7850f8e Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Fri, 10 Aug 2018 22:11:49 -0400
Subject: [PATCH] Make EnderDragon implement Mob
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftComplexLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftComplexLivingEntity.java
index cc115cc368..4947249da2 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftComplexLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftComplexLivingEntity.java
@@ -1,17 +1,18 @@
package org.bukkit.craftbukkit.entity;
+import net.minecraft.server.EntityInsentient;
import net.minecraft.server.EntityLiving;
import org.bukkit.craftbukkit.CraftServer;
import org.bukkit.entity.ComplexLivingEntity;
-public abstract class CraftComplexLivingEntity extends CraftLivingEntity implements ComplexLivingEntity {
- public CraftComplexLivingEntity(CraftServer server, EntityLiving entity) {
+public abstract class CraftComplexLivingEntity extends CraftMob implements ComplexLivingEntity { // Paper
+ public CraftComplexLivingEntity(CraftServer server, EntityInsentient entity) { // Paper
super(server, entity);
}
@Override
- public EntityLiving getHandle() {
- return (EntityLiving) entity;
+ public EntityInsentient getHandle() { // Paper
+ return (EntityInsentient) entity; // Paper
}
@Override
--
2.18.0

@ -1 +1 @@
Subproject commit 6875ad8bb890376913d9141b955c996444fbe94c
Subproject commit c5ab54d8912abadb0426ca9acd701732aa4c6e33

@ -1 +1 @@
Subproject commit eb36029f1cc9e4dffaa757da980c7d100cf86605
Subproject commit 29e75648741b877c06165d82241b6b3a417474f6