2018-07-04 07:55:24 +00:00
|
|
|
From 516394ea692192adfd455d9671c2bc9427e9c4c0 Mon Sep 17 00:00:00 2001
|
2016-06-19 06:14:58 +00: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
|
2018-07-04 07:55:24 +00:00
|
|
|
index e35e72e8b..1b9eb7f45 100644
|
2016-06-19 06:14:58 +00:00
|
|
|
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
|
|
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
2018-05-30 20:31:55 +00:00
|
|
|
@@ -358,4 +358,9 @@ public class PaperWorldConfig {
|
|
|
|
private void skipEntityTickingInChunksScheduledForUnload() {
|
2018-05-30 20:38:27 +00:00
|
|
|
skipEntityTickingInChunksScheduledForUnload = getBoolean("skip-entity-ticking-in-chunks-scheduled-for-unload", skipEntityTickingInChunksScheduledForUnload);
|
2016-06-19 06:14:58 +00: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
|
2018-07-04 07:55:24 +00:00
|
|
|
index 4b6bb38ae..dda6219a7 100644
|
2016-06-19 06:14:58 +00:00
|
|
|
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
2018-03-26 00:06:44 +00:00
|
|
|
@@ -1739,6 +1739,7 @@ public abstract class EntityLiving extends Entity {
|
2016-06-19 06:14:58 +00:00
|
|
|
this.motY = 0.30000001192092896D;
|
|
|
|
}
|
2017-06-08 14:16:51 +00:00
|
|
|
} else if (this.cP()) {
|
2016-11-17 02:23:38 +00:00
|
|
|
+ if (world.paperConfig.elytraHitWallDamage) { // Paper start - Toggleable Elytra Wall Damage
|
2016-06-19 06:14:58 +00:00
|
|
|
if (this.motY > -0.5D) {
|
|
|
|
this.fallDistance = 1.0F;
|
|
|
|
}
|
2018-03-26 00:06:44 +00:00
|
|
|
@@ -1788,6 +1789,7 @@ public abstract class EntityLiving extends Entity {
|
2017-05-14 18:05:01 +00:00
|
|
|
this.damageEntity(DamageSource.FLY_INTO_WALL, f8);
|
2016-06-19 06:14:58 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
+ } // Paper end - Elyta Wall Damage if statement
|
|
|
|
|
|
|
|
if (this.onGround && !this.world.isClientSide) {
|
|
|
|
if (getFlag(7) && !CraftEventFactory.callToggleGlideEvent(this, false).isCancelled()) // CraftBukkit
|
|
|
|
--
|
2018-07-04 07:55:24 +00:00
|
|
|
2.18.0
|
2016-06-19 06:14:58 +00:00
|
|
|
|