mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-01 17:01:56 +01:00
Merge pull request #342 from phase/master
Toggleable Elytra Wall Damage
This commit is contained in:
commit
2d5bf3c88c
1 changed files with 43 additions and 0 deletions
43
Spigot-Server-Patches/Toggleable-Elytra-Wall-Damage.patch
Normal file
43
Spigot-Server-Patches/Toggleable-Elytra-Wall-Damage.patch
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
From 0000000000000000000000000000000000000000 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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
|
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||||
|
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||||
|
@@ -0,0 +0,0 @@ public class PaperWorldConfig {
|
||||||
|
private void isHopperPushBased() {
|
||||||
|
isHopperPushBased = getBoolean("hopper.push-based", true);
|
||||||
|
}
|
||||||
|
+
|
||||||
|
+ 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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
|
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
||||||
|
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||||
|
@@ -0,0 +0,0 @@ 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;
|
||||||
|
}
|
||||||
|
@@ -0,0 +0,0 @@ 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
|
||||||
|
--
|
Loading…
Reference in a new issue