mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-15 20:23:53 -07:00
Add methods to change entity physics (#10334)
This commit is contained in:
@@ -39,6 +39,7 @@ 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>
|
||||
Co-authored-by: maxcom1 <46265094+maxcom1@users.noreply.github.com>
|
||||
|
||||
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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
@@ -678,18 +679,28 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
}
|
||||
// Paper end
|
||||
+
|
||||
+ // Paper start - move up invisibility
|
||||
+ // Paper start - missing entity api
|
||||
+ @Override
|
||||
+ public boolean isInvisible() {
|
||||
+ public boolean isInvisible() { // Paper - moved up from LivingEntity
|
||||
+ return this.getHandle().isInvisible();
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void setInvisible(boolean invisible) {
|
||||
+ public void setInvisible(boolean invisible) { // Paper - moved up from LivingEntity
|
||||
+ this.getHandle().persistentInvisibility = invisible;
|
||||
+ this.getHandle().setSharedFlag(Entity.FLAG_INVISIBLE, invisible);
|
||||
+ }
|
||||
+ // Paper end - move up invisibility
|
||||
+
|
||||
+ @Override
|
||||
+ public void setNoPhysics(boolean noPhysics) {
|
||||
+ this.getHandle().noPhysics = noPhysics;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean hasNoPhysics() {
|
||||
+ return this.getHandle().noPhysics;
|
||||
+ }
|
||||
+ // Paper end - missing entity api
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftFireball.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftFireball.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
|
Reference in New Issue
Block a user