Added wither vanilla invulnerability API (#9124)
This commit is contained in:
parent
1edfefdef8
commit
9daa019d6c
2 changed files with 39 additions and 4 deletions
|
@ -35,6 +35,7 @@ Co-authored-by: Nassim Jahnke <nassim@njahnke.dev>
|
|||
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
|
||||
Co-authored-by: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Co-authored-by: SoSeDiK <mrsosedik@gmail.com>
|
||||
Co-authored-by: booky10 <boooky10@gmail.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 f80a6ad7638453348ee82ea00b166a3aac029142..a08c00b8c0488d18be5e182f7892e5ab71d12247 100644
|
||||
|
@ -1204,10 +1205,10 @@ index 08c55cb00c8ff3c39dd99c64227d5d60abee2a51..6ecdc4bf1f6b8f0363e667135ba46343
|
|||
public void increaseAnger(Entity entity, int increase) {
|
||||
Preconditions.checkArgument(entity != null, "Entity cannot be null");
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftWither.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftWither.java
|
||||
index 8c32f70ec0defa5c67f2d02d13116e27de5de76d..dab37db550a33a18f02d2404a4d6f44db7d1322b 100644
|
||||
index 8c32f70ec0defa5c67f2d02d13116e27de5de76d..1a21d30620f13a48976da5ead7edab201ea68b21 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftWither.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftWither.java
|
||||
@@ -73,4 +73,31 @@ public class CraftWither extends CraftMonster implements Wither, com.destroystok
|
||||
@@ -73,4 +73,36 @@ public class CraftWither extends CraftMonster implements Wither, com.destroystok
|
||||
|
||||
this.getHandle().setInvulnerableTicks(ticks);
|
||||
}
|
||||
|
@ -1237,5 +1238,10 @@ index 8c32f70ec0defa5c67f2d02d13116e27de5de76d..dab37db550a33a18f02d2404a4d6f44d
|
|||
+ public void setCanTravelThroughPortals(boolean value) {
|
||||
+ getHandle().setCanTravelThroughPortals(value);
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void enterInvulnerabilityPhase() {
|
||||
+ this.getHandle().makeInvulnerable();
|
||||
+ }
|
||||
+ // Paper end
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue