geforkt von Mirrors/Paper
e74e4584d6
Fixes #1131
46 Zeilen
2.2 KiB
Diff
46 Zeilen
2.2 KiB
Diff
From 358cce0396af34c1ddee7fa64cdf6467549d49fd Mon Sep 17 00:00:00 2001
|
|
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
|
|
index 5367fead..3aa6f89e 100644
|
|
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
@@ -358,4 +358,9 @@ public class PaperWorldConfig {
|
|
private void skipEntityTickingInChunksScheduledForUnload() {
|
|
skipEntityTickingInChunksScheduledForUnload = getBoolean("settings.skip-entity-ticking-in-chunks-scheduled-for-unload", skipEntityTickingInChunksScheduledForUnload);
|
|
}
|
|
+
|
|
+ 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
|
|
index 4b6bb38a..dda6219a 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
|
@@ -1739,6 +1739,7 @@ public abstract class EntityLiving extends Entity {
|
|
this.motY = 0.30000001192092896D;
|
|
}
|
|
} else if (this.cP()) {
|
|
+ if (world.paperConfig.elytraHitWallDamage) { // Paper start - Toggleable Elytra Wall Damage
|
|
if (this.motY > -0.5D) {
|
|
this.fallDistance = 1.0F;
|
|
}
|
|
@@ -1788,6 +1789,7 @@ public abstract class EntityLiving extends Entity {
|
|
this.damageEntity(DamageSource.FLY_INTO_WALL, f8);
|
|
}
|
|
}
|
|
+ } // Paper end - Elyta Wall Damage if statement
|
|
|
|
if (this.onGround && !this.world.isClientSide) {
|
|
if (getFlag(7) && !CraftEventFactory.callToggleGlideEvent(this, false).isCancelled()) // CraftBukkit
|
|
--
|
|
2.17.0
|
|
|