Move patches around
This commit is contained in:
42
patches/server-remapped/Do-not-let-armorstands-drown.patch
Normal file
42
patches/server-remapped/Do-not-let-armorstands-drown.patch
Normal file
@@ -0,0 +1,42 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Zach Brown <1254957+zachbr@users.noreply.github.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/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -0,0 +0,0 @@ public abstract class LivingEntity extends Entity {
|
||||
super.checkFallDamage(heightDifference, onGround, landedState, landedPosition);
|
||||
}
|
||||
|
||||
+ public boolean canBreatheUnderwater() { return this.canBreatheUnderwater(); } // Paper - OBFHELPER
|
||||
public boolean canBreatheUnderwater() {
|
||||
return this.getMobType() == MobType.UNDEAD;
|
||||
}
|
||||
@@ -0,0 +0,0 @@ public abstract class LivingEntity extends Entity {
|
||||
|
||||
if (this.isAlive()) {
|
||||
if (this.isEyeInFluid((Tag) FluidTags.WATER) && !this.level.getBlockState(new BlockPos(this.getX(), this.getEyeY(), this.getZ())).is(Blocks.BUBBLE_COLUMN)) {
|
||||
- if (!this.canBreatheUnderwater() && !MobEffectUtil.c(this) && !flag1) {
|
||||
+ if (!this.canBreatheUnderwater() && !MobEffectUtil.c(this) && !flag1) { // Paper - use OBFHELPER so it can be overridden
|
||||
this.setAirSupply(this.decreaseAirSupply(this.getAirSupply()));
|
||||
if (this.getAirSupply() == -20) {
|
||||
this.setAirSupply(0);
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
|
||||
@@ -0,0 +0,0 @@ public class ArmorStand extends LivingEntity {
|
||||
super.move(type, movement);
|
||||
}
|
||||
}
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean canBreatheUnderwater() { // Skips a bit of damage handling code, probably a micro-optimization
|
||||
+ return true;
|
||||
+ }
|
||||
// Paper end
|
||||
}
|
||||
Reference in New Issue
Block a user