aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--patches/api/0298-Missing-Entity-API.patch52
-rw-r--r--patches/api/0323-Add-Raw-Byte-Entity-Serialization.patch4
-rw-r--r--patches/api/0329-Entity-powdered-snow-API.patch4
-rw-r--r--patches/api/0339-Freeze-Tick-Lock-API.patch8
-rw-r--r--patches/api/0368-Collision-API.patch4
-rw-r--r--patches/api/0380-Add-LivingEntity-swingHand-EquipmentSlot-convenience.patch4
-rw-r--r--patches/api/0381-Add-entity-knockback-API.patch4
-rw-r--r--patches/api/0388-ItemStack-damage-API.patch4
-rw-r--r--patches/api/0395-Add-Sneaking-API-for-Entities.patch6
-rw-r--r--patches/api/0401-Add-Entity-Body-Yaw-API.patch8
-rw-r--r--patches/api/0412-Folia-scheduler-and-owned-region-API.patch4
-rw-r--r--patches/api/0421-API-for-an-entity-s-scoreboard-name.patch4
-rw-r--r--patches/api/0426-Expand-Pose-API.patch4
-rw-r--r--patches/server/0586-Missing-Entity-API.patch42
-rw-r--r--patches/server/0627-Add-Raw-Byte-Entity-Serialization.patch9
-rw-r--r--patches/server/0677-Entity-powdered-snow-API.patch7
-rw-r--r--patches/server/0772-Collision-API.patch9
-rw-r--r--patches/server/0798-Add-entity-knockback-API.patch4
-rw-r--r--patches/server/0816-ItemStack-damage-API.patch4
-rw-r--r--patches/server/0817-Friction-API.patch4
-rw-r--r--patches/server/0843-Add-Entity-Body-Yaw-API.patch10
-rw-r--r--patches/server/0910-API-for-an-entity-s-scoreboard-name.patch4
22 files changed, 144 insertions, 59 deletions
diff --git a/patches/api/0298-Missing-Entity-API.patch b/patches/api/0298-Missing-Entity-API.patch
index 33d18a3ebe..1a3f1b5e63 100644
--- a/patches/api/0298-Missing-Entity-API.patch
+++ b/patches/api/0298-Missing-Entity-API.patch
@@ -10,6 +10,7 @@ Co-authored-by: SoSeDiK <[email protected]>
Co-authored-by: booky10 <[email protected]>
Co-authored-by: Amin <[email protected]>
Co-authored-by: TrollyLoki <[email protected]>
+Co-authored-by: FireInstall <[email protected]>
diff --git a/src/main/java/io/papermc/paper/entity/SchoolableFish.java b/src/main/java/io/papermc/paper/entity/SchoolableFish.java
new file mode 100644
@@ -414,6 +415,37 @@ index 9e7f42caab1204036f4203354c115fd40c6def92..138d2530de2410f4a9424dabd3e5ce0c
+ int getLifetimeTicks();
+ // Paper end
}
+diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java
+index d68ccecaadcf7a906058e66a750f4cfce5dd7b3f..efe812b4d47df6f8b5ba54ec4526f3dcd20f180f 100644
+--- a/src/main/java/org/bukkit/entity/Entity.java
++++ b/src/main/java/org/bukkit/entity/Entity.java
+@@ -283,6 +283,26 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
+ */
+ boolean isFrozen();
+
++ // Paper start - move invisibility up to Entity
++ /**
++ * Sets whether the entity is invisible or not.
++ * <p>
++ * This setting is undefined for non-living entities like boats or paintings.
++ * Non-living entities that are marked as invisible through this method may e.g. only hide their shadow.
++ * To hide such entities from players completely, see {@link Player#hideEntity(org.bukkit.plugin.Plugin, Entity)}.
++ *
++ * @param invisible If the entity is invisible
++ */
++ void setInvisible(boolean invisible);
++
++ /**
++ * Gets whether the entity is invisible or not.
++ *
++ * @return Whether the entity is invisible
++ */
++ boolean isInvisible();
++ // Paper end - move invisibility up to Entity
++
+ /**
+ * Mark the entity's removal.
+ *
diff --git a/src/main/java/org/bukkit/entity/Fireball.java b/src/main/java/org/bukkit/entity/Fireball.java
index 7a44707f2307dc4dbfea4de3f4baf3cc0490dc93..d0e82102425e54274be9c4769634d754319d6196 100644
--- a/src/main/java/org/bukkit/entity/Fireball.java
@@ -538,10 +570,26 @@ index 6b3c9bef9a8a34ddc6ff42cf358541a2665bf5e3..9c618a27d590f186f29c5d9094fc565e
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
-index b1fb059fc2249814c9e509c219da2aed84d34fe0..6e6b80843a8669b422f93e98343e1da9f8546ee7 100644
+index b1fb059fc2249814c9e509c219da2aed84d34fe0..ff89fc699b7aaba982c59ace4effaffc5285ca17 100644
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
-@@ -1016,6 +1016,57 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
+@@ -960,6 +960,7 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
+ *
+ * @param invisible If the entity is invisible
+ */
++ @Override // Paper - move invisibility up to Entity
+ public void setInvisible(boolean invisible);
+
+ /**
+@@ -967,6 +968,7 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
+ *
+ * @return Whether the entity is invisible
+ */
++ @Override // Paper - move invisibility up to Entity
+ public boolean isInvisible();
+
+ // Paper start
+@@ -1016,6 +1018,57 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
void clearActiveItem();
// Paper end
diff --git a/patches/api/0323-Add-Raw-Byte-Entity-Serialization.patch b/patches/api/0323-Add-Raw-Byte-Entity-Serialization.patch
index 6c33be9317..f378113a44 100644
--- a/patches/api/0323-Add-Raw-Byte-Entity-Serialization.patch
+++ b/patches/api/0323-Add-Raw-Byte-Entity-Serialization.patch
@@ -24,10 +24,10 @@ index 434fde52986ba07d7209ff47483f74fe31e8ebe7..0c7204e390f44b649fc26cd46152abeb
* Creates and returns the next EntityId available.
* <p>
diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java
-index d68ccecaadcf7a906058e66a750f4cfce5dd7b3f..2e2c8d7d2e2c27e2f1264a267d589b2c790f366b 100644
+index efe812b4d47df6f8b5ba54ec4526f3dcd20f180f..a09640dce6f61f808f516f5569e08e9e6a2f2b53 100644
--- a/src/main/java/org/bukkit/entity/Entity.java
+++ b/src/main/java/org/bukkit/entity/Entity.java
-@@ -891,5 +891,32 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
+@@ -911,5 +911,32 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
*/
@Deprecated
@NotNull Set<Player> getTrackedPlayers();
diff --git a/patches/api/0329-Entity-powdered-snow-API.patch b/patches/api/0329-Entity-powdered-snow-API.patch
index d31b58855c..b5b1dbedbd 100644
--- a/patches/api/0329-Entity-powdered-snow-API.patch
+++ b/patches/api/0329-Entity-powdered-snow-API.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Entity powdered snow API
diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java
-index 2e2c8d7d2e2c27e2f1264a267d589b2c790f366b..bdc2bbeddc47587334a8e92f5e0728f3c50218f6 100644
+index a09640dce6f61f808f516f5569e08e9e6a2f2b53..336cd1830182d4aac0fc7b5be629da4fc78c5cf8 100644
--- a/src/main/java/org/bukkit/entity/Entity.java
+++ b/src/main/java/org/bukkit/entity/Entity.java
-@@ -918,5 +918,12 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
+@@ -938,5 +938,12 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
* @return Whether the entity was successfully spawned.
*/
public boolean spawnAt(@NotNull Location location, @NotNull org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason reason);
diff --git a/patches/api/0339-Freeze-Tick-Lock-API.patch b/patches/api/0339-Freeze-Tick-Lock-API.patch
index 8d16a0e1d3..ae7c328cc6 100644
--- a/patches/api/0339-Freeze-Tick-Lock-API.patch
+++ b/patches/api/0339-Freeze-Tick-Lock-API.patch
@@ -5,12 +5,12 @@ Subject: [PATCH] Freeze Tick Lock API
diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java
-index bdc2bbeddc47587334a8e92f5e0728f3c50218f6..e1fe5d93eb7a1f96954d907dbbe0758f25bd1ce7 100644
+index 336cd1830182d4aac0fc7b5be629da4fc78c5cf8..5be7daff9077f35aa1d3abf747f7d147a1532b55 100644
--- a/src/main/java/org/bukkit/entity/Entity.java
+++ b/src/main/java/org/bukkit/entity/Entity.java
-@@ -283,6 +283,26 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
- */
- boolean isFrozen();
+@@ -303,6 +303,26 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
+ boolean isInvisible();
+ // Paper end - move invisibility up to Entity
+ // Paper start - Freeze Tick Lock API
+ /**
diff --git a/patches/api/0368-Collision-API.patch b/patches/api/0368-Collision-API.patch
index fc4f5486d9..61881abf50 100644
--- a/patches/api/0368-Collision-API.patch
+++ b/patches/api/0368-Collision-API.patch
@@ -25,10 +25,10 @@ index 44ee56a5956cc17194c767a0c1071a2abffe818a..43dd6c59cceba12f27e6b265acc3ad97
// Paper end
}
diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java
-index 948d6a08ff459afd5d4d5b151c41d94d1d5847b6..4ea16c106cfab12ebc753781fb7f406330c3f25c 100644
+index 82c9e07a059bc481d877c7fbb2fbf866bf607017..7ab1ffa2fa7a99ddf32f60ce4b48680eae698da9 100644
--- a/src/main/java/org/bukkit/entity/Entity.java
+++ b/src/main/java/org/bukkit/entity/Entity.java
-@@ -968,4 +968,26 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
+@@ -988,4 +988,26 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
*/
boolean isInPowderedSnow();
// Paper end
diff --git a/patches/api/0380-Add-LivingEntity-swingHand-EquipmentSlot-convenience.patch b/patches/api/0380-Add-LivingEntity-swingHand-EquipmentSlot-convenience.patch
index 6d0cf289d9..38a3a4452c 100644
--- a/patches/api/0380-Add-LivingEntity-swingHand-EquipmentSlot-convenience.patch
+++ b/patches/api/0380-Add-LivingEntity-swingHand-EquipmentSlot-convenience.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Add LivingEntity#swingHand(EquipmentSlot) convenience method
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
-index d083cffe0b61642bf4c4ea0fecc529090702042f..ab6ba48c76271f60fc51f758ff823e45be4bce93 100644
+index 41ca8fea2aede178bdbe87c05588bce4f2faf8e6..aa20ec645476b2cbb0330c206f163094aebf238e 100644
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
-@@ -1201,5 +1201,23 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
+@@ -1203,5 +1203,23 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
*/
@Deprecated
void setHurtDirection(float hurtDirection);
diff --git a/patches/api/0381-Add-entity-knockback-API.patch b/patches/api/0381-Add-entity-knockback-API.patch
index 56310d9bef..cf91cd8304 100644
--- a/patches/api/0381-Add-entity-knockback-API.patch
+++ b/patches/api/0381-Add-entity-knockback-API.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Add entity knockback API
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
-index ab6ba48c76271f60fc51f758ff823e45be4bce93..21ddbe3399b1b4a4d51c5a752fa72c5d8832b415 100644
+index aa20ec645476b2cbb0330c206f163094aebf238e..70953573a7bcfa682dbaeaa8e3db0c847b254fdd 100644
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
-@@ -1219,5 +1219,17 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
+@@ -1221,5 +1221,17 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
this.swingOffHand();
}
}
diff --git a/patches/api/0388-ItemStack-damage-API.patch b/patches/api/0388-ItemStack-damage-API.patch
index f0444dae84..f2c4cc4355 100644
--- a/patches/api/0388-ItemStack-damage-API.patch
+++ b/patches/api/0388-ItemStack-damage-API.patch
@@ -8,10 +8,10 @@ to simulate damage done to an itemstack and all
the logic associated with damaging them
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
-index 21ddbe3399b1b4a4d51c5a752fa72c5d8832b415..cb5ba5d115406d12a2af0811fcfbf510f836b03b 100644
+index 70953573a7bcfa682dbaeaa8e3db0c847b254fdd..041ff387a0f9e8037e2834118ef241ddb8970907 100644
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
-@@ -1231,5 +1231,52 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
+@@ -1233,5 +1233,52 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
* @param directionZ The relative z position of the knockback source direction
*/
void knockback(double strength, double directionX, double directionZ);
diff --git a/patches/api/0395-Add-Sneaking-API-for-Entities.patch b/patches/api/0395-Add-Sneaking-API-for-Entities.patch
index 224f784208..70178866ab 100644
--- a/patches/api/0395-Add-Sneaking-API-for-Entities.patch
+++ b/patches/api/0395-Add-Sneaking-API-for-Entities.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Add Sneaking API for Entities
diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java
-index 4ea16c106cfab12ebc753781fb7f406330c3f25c..b6f7aae6cd7d4364caf89c46e55c65961f8dae91 100644
+index 7ab1ffa2fa7a99ddf32f60ce4b48680eae698da9..e0e93cb945202890387c1dc3c32927525e40296c 100644
--- a/src/main/java/org/bukkit/entity/Entity.java
+++ b/src/main/java/org/bukkit/entity/Entity.java
-@@ -779,6 +779,25 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
+@@ -799,6 +799,25 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
@NotNull
Pose getPose();
@@ -35,7 +35,7 @@ index 4ea16c106cfab12ebc753781fb7f406330c3f25c..b6f7aae6cd7d4364caf89c46e55c6596
* Get the category of spawn to which this entity belongs.
*
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
-index 8a862dbf093ca0812aa1ce8def1e650380c303d0..bfa5a218576c9db147da75ec39cf8a8f6e9f6157 100644
+index e855cddf37c453ea3f8f0f4fc21dd2358258e28d..6afced1da637e4162972b0ff1f6c9cf42c256a02 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -417,6 +417,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
diff --git a/patches/api/0401-Add-Entity-Body-Yaw-API.patch b/patches/api/0401-Add-Entity-Body-Yaw-API.patch
index ebcecf2aca..8d0776b93e 100644
--- a/patches/api/0401-Add-Entity-Body-Yaw-API.patch
+++ b/patches/api/0401-Add-Entity-Body-Yaw-API.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Add Entity Body Yaw API
diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java
-index b6f7aae6cd7d4364caf89c46e55c65961f8dae91..04cf35bce80d5940dec2913ca74a0678be3c1c57 100644
+index e0e93cb945202890387c1dc3c32927525e40296c..18a2f82ecf9ca3ecb80053666d0de192e5185531 100644
--- a/src/main/java/org/bukkit/entity/Entity.java
+++ b/src/main/java/org/bukkit/entity/Entity.java
-@@ -986,6 +986,43 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
+@@ -1006,6 +1006,43 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
* @return true if in powdered snow.
*/
boolean isInPowderedSnow();
@@ -53,10 +53,10 @@ index b6f7aae6cd7d4364caf89c46e55c65961f8dae91..04cf35bce80d5940dec2913ca74a0678
// Paper start - Collision API
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
-index b9f98279789fe26181aa9c7aa253877d916034be..2dbb61df25967739c5a8308d6d89be20136816ba 100644
+index 3a26b3c40f877a454c3c76b68b86776f05950002..b7b87b2962eabcf2e8864335e4da22c0b9da8e5c 100644
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
-@@ -1278,5 +1278,21 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
+@@ -1280,5 +1280,21 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
* @param amount the amount of damage to do
*/
void damageItemStack(org.bukkit.inventory.@NotNull EquipmentSlot slot, int amount);
diff --git a/patches/api/0412-Folia-scheduler-and-owned-region-API.patch b/patches/api/0412-Folia-scheduler-and-owned-region-API.patch
index 8d194d5375..71062196c9 100644
--- a/patches/api/0412-Folia-scheduler-and-owned-region-API.patch
+++ b/patches/api/0412-Folia-scheduler-and-owned-region-API.patch
@@ -769,10 +769,10 @@ index d433a9d2fe0bb487865fec33307cc4c45af475a0..f819de247080d58803a2851a4cab28d2
+ // Paper end - Folia region threading API
}
diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java
-index 04cf35bce80d5940dec2913ca74a0678be3c1c57..ef202ad243884c4254f45be760c42abf653cbc8e 100644
+index 18a2f82ecf9ca3ecb80053666d0de192e5185531..a5602bf27965a8aac97aa5279a23e785729a4921 100644
--- a/src/main/java/org/bukkit/entity/Entity.java
+++ b/src/main/java/org/bukkit/entity/Entity.java
-@@ -1046,4 +1046,15 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
+@@ -1066,4 +1066,15 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
*/
boolean wouldCollideUsing(@NotNull BoundingBox boundingBox);
// Paper end - Collision API
diff --git a/patches/api/0421-API-for-an-entity-s-scoreboard-name.patch b/patches/api/0421-API-for-an-entity-s-scoreboard-name.patch
index 7be05d7421..85895ba202 100644
--- a/patches/api/0421-API-for-an-entity-s-scoreboard-name.patch
+++ b/patches/api/0421-API-for-an-entity-s-scoreboard-name.patch
@@ -7,10 +7,10 @@ Was obtainable through different methods, but you had to use different
methods depending on the implementation of Entity you were working with.
diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java
-index ef202ad243884c4254f45be760c42abf653cbc8e..d6e6d7140de4588f6b9469988749bccbe848f3ef 100644
+index a5602bf27965a8aac97aa5279a23e785729a4921..cbea8b9088fff5f08a47f6b26d7554d00710eb9f 100644
--- a/src/main/java/org/bukkit/entity/Entity.java
+++ b/src/main/java/org/bukkit/entity/Entity.java
-@@ -1057,4 +1057,15 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
+@@ -1077,4 +1077,15 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
*/
@NotNull io.papermc.paper.threadedregions.scheduler.EntityScheduler getScheduler();
// Paper end - Folia schedulers
diff --git a/patches/api/0426-Expand-Pose-API.patch b/patches/api/0426-Expand-Pose-API.patch
index 7548f51038..b016f55d9b 100644
--- a/patches/api/0426-Expand-Pose-API.patch
+++ b/patches/api/0426-Expand-Pose-API.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Expand Pose API
diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java
-index d6e6d7140de4588f6b9469988749bccbe848f3ef..d9929d9311e4b2b0ae13a8f6f13563257263f298 100644
+index cbea8b9088fff5f08a47f6b26d7554d00710eb9f..252ae4b7a002b34533988e0a574a24af8573a125 100644
--- a/src/main/java/org/bukkit/entity/Entity.java
+++ b/src/main/java/org/bukkit/entity/Entity.java
-@@ -796,6 +796,42 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
+@@ -816,6 +816,42 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
* @param sneak true if the entity should be sneaking
*/
void setSneaking(boolean sneak);
diff --git a/patches/server/0586-Missing-Entity-API.patch b/patches/server/0586-Missing-Entity-API.patch
index 501d3329dd..b2f850af74 100644
--- a/patches/server/0586-Missing-Entity-API.patch
+++ b/patches/server/0586-Missing-Entity-API.patch
@@ -29,6 +29,7 @@ public net.minecraft.world.entity.animal.AbstractSchoolingFish schoolSize
public net.minecraft.world.entity.animal.Rabbit moreCarrotTicks
public net.minecraft.world.entity.AreaEffectCloud ownerUUID
public net.minecraft.world.entity.animal.MushroomCow stewEffects
+public net.minecraft.world.entity.Entity FLAG_INVISIBLE
Co-authored-by: Nassim Jahnke <[email protected]>
Co-authored-by: Jake Potrebic <[email protected]>
@@ -37,6 +38,7 @@ Co-authored-by: SoSeDiK <[email protected]>
Co-authored-by: booky10 <[email protected]>
Co-authored-by: Amin <[email protected]>
Co-authored-by: TrollyLoki <[email protected]>
+Co-authored-by: FireInstall <[email protected]>
diff --git a/src/main/java/com/destroystokyo/paper/entity/ai/MobGoalHelper.java b/src/main/java/com/destroystokyo/paper/entity/ai/MobGoalHelper.java
index 8117578ced94aa6bf01871f6526a388385c4adf2..59699c59fdfc611177fdb3136f84ab539b17d9c9 100644
@@ -667,6 +669,28 @@ index fc0f0e841dc974d080e1abb9bbafb5165801131f..d657fd2c507a5b215aeab0a5f3e9c2ee
+ }
+ // Paper end
}
+diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+index 07158732dd6a5b7d622b7f2ea10ca87b50365b8a..dd1ca63d2d6e4c8606c28380f81b79b7ee211a35 100644
+--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
++++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+@@ -1078,4 +1078,17 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
+ return set;
+ }
+ // Paper end
++
++ // Paper start - move up invisibility
++ @Override
++ public boolean isInvisible() {
++ return this.getHandle().isInvisible();
++ }
++
++ @Override
++ public void setInvisible(boolean invisible) {
++ this.getHandle().persistentInvisibility = invisible;
++ this.getHandle().setSharedFlag(Entity.FLAG_INVISIBLE, invisible);
++ }
++ // Paper end - move up invisibility
+ }
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftFireball.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftFireball.java
index 73cb7aa01af3eed71b05b1a539f082b26dcd8d60..e1a2f0924da6ebcdf332040f922226af5d8a2d45 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftFireball.java
@@ -761,12 +785,22 @@ index 2cec61a1bb050c1ef81c5fc3d0afafe9ff29d459..97fa4e1e70203194bd939618b2fad926
+ // 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 9ce82b203e37ff1f5a7618fe864ed7616bd8d52e..9a7a670c1e99674e8a554342165b7b77001083fc 100644
+index 9ce82b203e37ff1f5a7618fe864ed7616bd8d52e..6218f15194b7ae0b17f7f1dab78b1337779edb27 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
-@@ -913,6 +913,22 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
- this.getHandle().persistentInvisibility = invisible;
- this.getHandle().setSharedFlag(5, invisible);
+@@ -905,14 +905,29 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
+
+ @Override
+ public boolean isInvisible() {
+- return this.getHandle().isInvisible();
++ return super.isInvisible(); // Paper - move invisibility up to Entity - diff on change
+ }
+
+ @Override
+ public void setInvisible(boolean invisible) {
+- this.getHandle().persistentInvisibility = invisible;
+- this.getHandle().setSharedFlag(5, invisible);
++ super.setInvisible(invisible); // Paper - move invisibility up to Entity
}
+ // Paper start
+ @Override
diff --git a/patches/server/0627-Add-Raw-Byte-Entity-Serialization.patch b/patches/server/0627-Add-Raw-Byte-Entity-Serialization.patch
index 436c536f74..b57a9d9bb2 100644
--- a/patches/server/0627-Add-Raw-Byte-Entity-Serialization.patch
+++ b/patches/server/0627-Add-Raw-Byte-Entity-Serialization.patch
@@ -7,7 +7,7 @@ Subject: [PATCH] Add Raw Byte Entity Serialization
public net.minecraft.world.entity.Entity setLevel(Lnet/minecraft/world/level/Level;)V
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
-index 822666e1199e0851136d88b2b556d8d17843d902..e6ef67a7a2eab5314c95e751895b4d4ce71c91b8 100644
+index 7dbbf0884b70acb37c3400364736fa8f6b68c964..5dce3d38ecd7b7639f02f3e1e92f3723f4a42c39 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -2078,6 +2078,15 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
@@ -27,10 +27,10 @@ index 822666e1199e0851136d88b2b556d8d17843d902..e6ef67a7a2eab5314c95e751895b4d4c
return this.isPassenger() ? false : this.saveAsPassenger(nbt);
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
-index 07158732dd6a5b7d622b7f2ea10ca87b50365b8a..411e2eed16d5b774900fc12f5ad782ab229dde97 100644
+index 08d63e104ddc079af6349b6b3665cadae1c619ad..6a31fb773798e911e731c35e2d52eb1073ed9f07 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
-@@ -1077,5 +1077,15 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
+@@ -1077,6 +1077,16 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
}
return set;
}
@@ -45,7 +45,8 @@ index 07158732dd6a5b7d622b7f2ea10ca87b50365b8a..411e2eed16d5b774900fc12f5ad782ab
+ return !this.entity.valid && this.entity.level().addFreshEntity(this.entity, reason);
+ }
// Paper end
- }
+
+ // Paper start - move up invisibility
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
index 609b103cb9af3b0554bf1116306874fe98c8534c..3f582c5653e13875cce4ef8ecd279d8a3d2b2dc2 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
diff --git a/patches/server/0677-Entity-powdered-snow-API.patch b/patches/server/0677-Entity-powdered-snow-API.patch
index 9976726fc5..e06e388df9 100644
--- a/patches/server/0677-Entity-powdered-snow-API.patch
+++ b/patches/server/0677-Entity-powdered-snow-API.patch
@@ -7,10 +7,10 @@ Subject: [PATCH] Entity powdered snow API
public net.minecraft.world.entity.monster.Skeleton inPowderSnowTime
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
-index 411e2eed16d5b774900fc12f5ad782ab229dde97..71f9b7bbbabae9291fdb9f902f3f69c13e715c0e 100644
+index 6a31fb773798e911e731c35e2d52eb1073ed9f07..6a8251ae85f192925493b3e084c0e53820a9be97 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
-@@ -1087,5 +1087,10 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
+@@ -1087,6 +1087,11 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
this.entity.setRot(location.getYaw(), location.getPitch());
return !this.entity.valid && this.entity.level().addFreshEntity(this.entity, reason);
}
@@ -20,7 +20,8 @@ index 411e2eed16d5b774900fc12f5ad782ab229dde97..71f9b7bbbabae9291fdb9f902f3f69c1
+ return getHandle().isInPowderSnow || getHandle().wasInPowderSnow; // depending on the location in the entity "tick" either could be needed.
+ }
// Paper end
- }
+
+ // Paper start - move up invisibility
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftSkeleton.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftSkeleton.java
index a0ea54181de6c6685deef265cbe9f66aabbca42b..6f98da9be6aef35e3b5c940188b872459a383c8e 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftSkeleton.java
diff --git a/patches/server/0772-Collision-API.patch b/patches/server/0772-Collision-API.patch
index c4952054b5..da2d02ef43 100644
--- a/patches/server/0772-Collision-API.patch
+++ b/patches/server/0772-Collision-API.patch
@@ -22,13 +22,14 @@ index fbcf1320ef9c1817b24aa8724cd6cf07319c20b9..5680e9772a2d90e997d2d0aacdda9edd
// Paper end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
-index 9ea189c26c6a5fae84bcc7ed098426d8c001cd5e..b7fceba1c7138a5c1d78bf058c9f2d32dbc1d292 100644
+index a47e8994b52576d88fa90b7a86cbe0fb7493fa6d..3cdc8787c6a481da6cb294208eebce0636a58d4f 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
-@@ -1125,4 +1125,19 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
- return getHandle().isInPowderSnow || getHandle().wasInPowderSnow; // depending on the location in the entity "tick" either could be needed.
+@@ -1138,4 +1138,20 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
+ this.getHandle().setSharedFlag(Entity.FLAG_INVISIBLE, invisible);
}
- // Paper end
+ // Paper end - move up invisibility
++
+ // Paper start - Collision API
+ @Override
+ public boolean collidesAt(@org.jetbrains.annotations.NotNull Location location) {
diff --git a/patches/server/0798-Add-entity-knockback-API.patch b/patches/server/0798-Add-entity-knockback-API.patch
index 7086303073..afe4ca229a 100644
--- a/patches/server/0798-Add-entity-knockback-API.patch
+++ b/patches/server/0798-Add-entity-knockback-API.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Add entity knockback API
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
-index e559af05c58b7d9c940cea9f48c0f4bd0aad756c..cb585a82e52697d84f3da25a150b663c8c286f58 100644
+index 354c32f67d06228477c723f7e4dbe27116e59a9b..4363f55707101362c1df60b73ab23d3d4c9c0675 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
-@@ -1073,5 +1073,11 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
+@@ -1072,5 +1072,11 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
}
throw new IllegalArgumentException(entityCategory + " is an unrecognized entity category");
}
diff --git a/patches/server/0816-ItemStack-damage-API.patch b/patches/server/0816-ItemStack-damage-API.patch
index 933e8cf6e8..9525df8c4c 100644
--- a/patches/server/0816-ItemStack-damage-API.patch
+++ b/patches/server/0816-ItemStack-damage-API.patch
@@ -11,10 +11,10 @@ the logic associated with damaging them
public net.minecraft.world.entity.LivingEntity entityEventForEquipmentBreak(Lnet/minecraft/world/entity/EquipmentSlot;)B
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
-index cb585a82e52697d84f3da25a150b663c8c286f58..7ba726584ce4a58654b8a8b9604f0cca762b3f42 100644
+index 4363f55707101362c1df60b73ab23d3d4c9c0675..ed436eed7617665e77627dd05d17b8e5a7366f25 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
-@@ -1074,6 +1074,53 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
+@@ -1073,6 +1073,53 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
throw new IllegalArgumentException(entityCategory + " is an unrecognized entity category");
}
diff --git a/patches/server/0817-Friction-API.patch b/patches/server/0817-Friction-API.patch
index cb41b035bb..c7825d86c1 100644
--- a/patches/server/0817-Friction-API.patch
+++ b/patches/server/0817-Friction-API.patch
@@ -133,10 +133,10 @@ index 1a291dd8a287db30e71dcb315599fc4b038764c4..30d62ee4d5cd2ddacb8783b5bbbf475d
public int getHealth() {
return this.getHandle().health;
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
-index 7ba726584ce4a58654b8a8b9604f0cca762b3f42..d7492b969750fddca8bf09fdf2e91b146db03dc4 100644
+index ed436eed7617665e77627dd05d17b8e5a7366f25..e8ef40fed546608d995fd31dc8a9721c00537749 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
-@@ -1121,6 +1121,18 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
+@@ -1120,6 +1120,18 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
});
}
diff --git a/patches/server/0843-Add-Entity-Body-Yaw-API.patch b/patches/server/0843-Add-Entity-Body-Yaw-API.patch
index 1131f49d45..526a085ebb 100644
--- a/patches/server/0843-Add-Entity-Body-Yaw-API.patch
+++ b/patches/server/0843-Add-Entity-Body-Yaw-API.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] Add Entity Body Yaw API
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
-index 69dc7d9cc9ebd681d842099e2de521fd11ff5242..ba915f1b3cd00c8afe39ece9c9e68737673777f5 100644
+index 034bfd80ea7d1958eba3e057010379bf4b3661c9..dbb463e8aabe4afce6e119f0d91caff96911384d 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
@@ -1136,6 +1136,31 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
@@ -38,13 +38,13 @@ index 69dc7d9cc9ebd681d842099e2de521fd11ff5242..ba915f1b3cd00c8afe39ece9c9e68737
+ return this.entity.getBukkitYaw();
+ }
// Paper end
- // Paper start - Collision API
- @Override
+
+ // Paper start - move up invisibility
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
-index d7492b969750fddca8bf09fdf2e91b146db03dc4..3302d8e9b7c2c48b20dd257f4699b263d3bc52dc 100644
+index e8ef40fed546608d995fd31dc8a9721c00537749..fbe1d5051f8767db240e4d0c256f4a1088c4339c 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
-@@ -1113,6 +1113,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
+@@ -1112,6 +1112,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
this.damageItemStack0(this.getHandle().getItemBySlot(nmsSlot), amount, nmsSlot);
}
diff --git a/patches/server/0910-API-for-an-entity-s-scoreboard-name.patch b/patches/server/0910-API-for-an-entity-s-scoreboard-name.patch
index 1df4442214..a93b609b72 100644
--- a/patches/server/0910-API-for-an-entity-s-scoreboard-name.patch
+++ b/patches/server/0910-API-for-an-entity-s-scoreboard-name.patch
@@ -7,10 +7,10 @@ Was obtainable through different methods, but you had to use different
methods depending on the implementation of Entity you were working with.
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
-index 282a1cebc0cdb6253d024dd399ef794335883662..fec2f96cfc42559c44d5d2e907d0706c674dfda7 100644
+index 1de3a2ed64dcd222bc90d3917c08e12af56450b4..fd7a3176cdd07f50e4e56d98827672042cdf5944 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
-@@ -1192,4 +1192,11 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
+@@ -1206,4 +1206,11 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
return !this.getHandle().level().noCollision(this.getHandle(), aabb);
}
// Paper end - Collision API