2017-06-19 09:36:55 +08:00
|
|
|
From a5e58644e7ecfb1d71ad0c9a2ca9744fe93ccd6b Mon Sep 17 00:00:00 2001
|
2016-06-19 14:14:58 +08:00
|
|
|
From: Jadon Fowler <jadonflower@gmail.com>
|
|
|
|
Date: Sat, 18 Jun 2016 23:13:59 -0700
|
|
|
|
Subject: [PATCH] Toggleable Elytra Wall Damage
|
|
|
|
|
|
|
|
Instead of calculating the damage taken from hitting a wall, you can
|
|
|
|
disable it in the config.
|
|
|
|
|
|
|
|
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
2017-06-19 09:36:55 +08:00
|
|
|
index ef60c15b..cec9ea74 100644
|
2016-06-19 14:14:58 +08:00
|
|
|
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
|
|
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
2017-05-15 02:05:01 +08:00
|
|
|
@@ -355,4 +355,9 @@ public class PaperWorldConfig {
|
2016-07-29 09:54:48 +08:00
|
|
|
delayChunkUnloadsBy *= 1000;
|
|
|
|
}
|
2016-06-19 14:14:58 +08:00
|
|
|
}
|
|
|
|
+
|
|
|
|
+ public boolean elytraHitWallDamage = true;
|
|
|
|
+ private void elytraHitWallDamage() {
|
|
|
|
+ elytraHitWallDamage = getBoolean("elytra-hit-wall-damage", true);
|
|
|
|
+ }
|
|
|
|
}
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
2017-06-19 09:36:55 +08:00
|
|
|
index 3d1897d6..e50f7a3c 100644
|
2016-06-19 14:14:58 +08:00
|
|
|
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
2017-05-15 02:05:01 +08:00
|
|
|
@@ -1731,6 +1731,7 @@ public abstract class EntityLiving extends Entity {
|
2016-06-19 14:14:58 +08:00
|
|
|
this.motY = 0.30000001192092896D;
|
|
|
|
}
|
2017-06-08 22:16:51 +08:00
|
|
|
} else if (this.cP()) {
|
2016-11-17 10:23:38 +08:00
|
|
|
+ if (world.paperConfig.elytraHitWallDamage) { // Paper start - Toggleable Elytra Wall Damage
|
2016-06-19 14:14:58 +08:00
|
|
|
if (this.motY > -0.5D) {
|
|
|
|
this.fallDistance = 1.0F;
|
|
|
|
}
|
2017-05-15 02:05:01 +08:00
|
|
|
@@ -1780,6 +1781,7 @@ public abstract class EntityLiving extends Entity {
|
|
|
|
this.damageEntity(DamageSource.FLY_INTO_WALL, f8);
|
2016-06-19 14:14:58 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
+ } // Paper end - Elyta Wall Damage if statement
|
|
|
|
|
|
|
|
if (this.onGround && !this.world.isClientSide) {
|
|
|
|
if (getFlag(7) && !CraftEventFactory.callToggleGlideEvent(this, false).isCancelled()) // CraftBukkit
|
|
|
|
--
|
2017-06-19 09:36:55 +08:00
|
|
|
2.13.1.windows.2
|
2016-06-19 14:14:58 +08:00
|
|
|
|