2017-03-25 06:22:02 +01:00
|
|
|
From 58d1a2e017efc84ff949c59e8c422535020ce4a7 Mon Sep 17 00:00:00 2001
|
2016-06-19 08:14:58 +02: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-03-25 04:18:58 +01:00
|
|
|
index 04861f146..dc96bd7f4 100644
|
2016-06-19 08:14:58 +02:00
|
|
|
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
|
|
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
2017-03-25 04:18:58 +01:00
|
|
|
@@ -354,4 +354,9 @@ public class PaperWorldConfig {
|
2016-07-29 03:54:48 +02:00
|
|
|
delayChunkUnloadsBy *= 1000;
|
|
|
|
}
|
2016-06-19 08:14:58 +02: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-03-25 04:18:58 +01:00
|
|
|
index ec901150d..b8ac99e5d 100644
|
2016-06-19 08:14:58 +02:00
|
|
|
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
2017-01-02 08:05:02 +01:00
|
|
|
@@ -1690,6 +1690,7 @@ public abstract class EntityLiving extends Entity {
|
2016-06-19 08:14:58 +02:00
|
|
|
this.motY = 0.30000001192092896D;
|
|
|
|
}
|
2016-11-17 03:23:38 +01:00
|
|
|
} else if (this.cH()) {
|
|
|
|
+ if (world.paperConfig.elytraHitWallDamage) { // Paper start - Toggleable Elytra Wall Damage
|
2016-06-19 08:14:58 +02:00
|
|
|
if (this.motY > -0.5D) {
|
|
|
|
this.fallDistance = 1.0F;
|
|
|
|
}
|
2017-01-02 08:05:02 +01:00
|
|
|
@@ -1739,6 +1740,7 @@ public abstract class EntityLiving extends Entity {
|
2016-06-19 08:14:58 +02:00
|
|
|
this.damageEntity(DamageSource.FLY_INTO_WALL, f7);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
+ } // Paper end - Elyta Wall Damage if statement
|
|
|
|
|
|
|
|
if (this.onGround && !this.world.isClientSide) {
|
|
|
|
if (getFlag(7) && !CraftEventFactory.callToggleGlideEvent(this, false).isCancelled()) // CraftBukkit
|
|
|
|
--
|
2017-03-25 04:18:58 +01:00
|
|
|
2.12.0.windows.1
|
2016-06-19 08:14:58 +02:00
|
|
|
|