aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/api/0298-Missing-Entity-API.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/api/0298-Missing-Entity-API.patch')
-rw-r--r--patches/api/0298-Missing-Entity-API.patch52
1 files changed, 50 insertions, 2 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