2016-10-21 23:08:34 +02:00
|
|
|
From c43b955acf98710d223232875e3b0586090c60a5 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
|
2016-08-28 01:41:58 +02:00
|
|
|
index b4d76e5..fb67306 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
|
2016-08-28 01:41:58 +02:00
|
|
|
@@ -372,4 +372,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
|
2016-07-29 03:54:48 +02:00
|
|
|
index c0c60a7..8c98a19 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
|
|
|
|
@@ -1615,6 +1615,7 @@ public abstract class EntityLiving extends Entity {
|
|
|
|
this.motY = 0.30000001192092896D;
|
|
|
|
}
|
|
|
|
} else if (this.cG()) {
|
|
|
|
+ if(world.paperConfig.elytraHitWallDamage) { // Paper start - Toggleable Elytra Wall Damage
|
|
|
|
if (this.motY > -0.5D) {
|
|
|
|
this.fallDistance = 1.0F;
|
|
|
|
}
|
|
|
|
@@ -1664,6 +1665,7 @@ public abstract class EntityLiving extends Entity {
|
|
|
|
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
|
|
|
|
--
|
2016-10-21 22:42:49 +02:00
|
|
|
2.9.3
|
2016-06-19 08:14:58 +02:00
|
|
|
|