mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-02 13:07:06 +01:00
c9fd745840
Upstream has released updates that appears to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: ff0672ca SPIGOT-5211: Add Raid API CraftBukkit Changes:96bc85f0
SPIGOT-5298: Remove unexplained 0.1 drop chance offset6ed8a189
SPIGOT-5290: Invulnerable and/or Marker armor stand triggers EntityDamageEvent631eaeb0
SPIGOT-5297: PlayerBedLeaveEvent.getBed() returns player location8d4bc541
SPIGOT-5293: Sponge behaviour differs from Vanillae91fd75e
SPIGOT-5291: Missing event for ravagers trampling cropscbdd7139
SPIGOT-5211: Add Raid APIedd8fdfb
SPIGOT-5287: Fix rare CME generating new chunks3fc97f08
SPIGOT-5265: FireworkExplodeEvent only fired when rockets explode in air Spigot Changes: 065a3734 Rebuild patches a5961826 SPIGOT-5286: tick-inactive-villagers invokes the AI for NoAI villagers
45 lines
2 KiB
Diff
45 lines
2 KiB
Diff
From 2f2e638edbbacbf9356bc1679b56ac781e14df12 Mon Sep 17 00:00:00 2001
|
|
From: Zach Brown <zach.brown@destroystokyo.com>
|
|
Date: Sat, 18 Feb 2017 19:29:58 -0600
|
|
Subject: [PATCH] Do not let armorstands drown
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/EntityArmorStand.java b/src/main/java/net/minecraft/server/EntityArmorStand.java
|
|
index 3e78b152f..9e6633a1b 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityArmorStand.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityArmorStand.java
|
|
@@ -810,5 +810,10 @@ public class EntityArmorStand extends EntityLiving {
|
|
super.move(moveType, vec3d);
|
|
}
|
|
}
|
|
+
|
|
+ @Override
|
|
+ public boolean canBreatheUnderwater() { // Skips a bit of damage handling code, probably a micro-optimization
|
|
+ return true;
|
|
+ }
|
|
// Paper end
|
|
}
|
|
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
|
index 79edb3b3c..a016cbb21 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
|
@@ -223,6 +223,7 @@ public abstract class EntityLiving extends Entity {
|
|
super.a(d0, flag, iblockdata, blockposition);
|
|
}
|
|
|
|
+ public boolean canBreatheUnderwater() { return this.cm(); } // Paper - OBFHELPER
|
|
public boolean cm() {
|
|
return this.getMonsterType() == EnumMonsterType.UNDEAD;
|
|
}
|
|
@@ -262,7 +263,7 @@ public abstract class EntityLiving extends Entity {
|
|
|
|
if (this.isAlive()) {
|
|
if (this.a(TagsFluid.WATER) && this.world.getType(new BlockPosition(this.locX, this.locY + (double) this.getHeadHeight(), this.locZ)).getBlock() != Blocks.BUBBLE_COLUMN) {
|
|
- if (!this.cm() && !MobEffectUtil.c(this) && !flag1) {
|
|
+ if (!this.canBreatheUnderwater() && !MobEffectUtil.c(this) && !flag1) { // Paper - use OBFHELPER so it can be overridden
|
|
this.setAirTicks(this.l(this.getAirTicks()));
|
|
if (this.getAirTicks() == -20) {
|
|
this.setAirTicks(0);
|
|
--
|
|
2.23.0
|
|
|