mirror of
https://github.com/PaperMC/Paper.git
synced 2025-07-31 12:12:08 -07:00
Move invisible setting up to entities (#10346)
This commit is contained in:
@@ -10,6 +10,7 @@ Co-authored-by: SoSeDiK <mrsosedik@gmail.com>
|
||||
Co-authored-by: booky10 <boooky10@gmail.com>
|
||||
Co-authored-by: Amin <amin.haddou@frg.wwschool.de>
|
||||
Co-authored-by: TrollyLoki <trollyloki@gmail.com>
|
||||
Co-authored-by: FireInstall <kettnerl@hu-berlin.de>
|
||||
|
||||
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 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ 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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Entity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Entity.java
|
||||
@@ -0,0 +0,0 @@ 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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Fireball.java
|
||||
@@ -541,6 +573,22 @@ diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/o
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
@@ -0,0 +0,0 @@ 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);
|
||||
|
||||
/**
|
||||
@@ -0,0 +0,0 @@ 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
|
||||
@@ -0,0 +0,0 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
||||
void clearActiveItem();
|
||||
// Paper end
|
||||
|
Reference in New Issue
Block a user