mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-18 17:07:43 +01:00
43 lines
2.5 KiB
Diff
43 lines
2.5 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: 12emin34 <macanovic.emin@gmail.com>
|
|
Date: Wed, 4 Aug 2021 11:44:26 +0200
|
|
Subject: [PATCH] Toggle for kinetic damage
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
|
index ad3ef0b1f3d6d00a0aca909812127b09302e5a8c..4ed72b06786505f61502772bba973b12c2076be0 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
|
@@ -2792,7 +2792,11 @@ public abstract class LivingEntity extends Entity {
|
|
|
|
if (f4 > 0.0F) {
|
|
this.playSound(this.getFallDamageSound((int) f4), 1.0F, 1.0F);
|
|
- this.hurt(DamageSource.FLY_INTO_WALL, f4);
|
|
+ // Purpur start
|
|
+ if (level.purpurConfig.elytraKineticDamage) {
|
|
+ this.hurt(DamageSource.FLY_INTO_WALL, f4);
|
|
+ }
|
|
+ // Purpur end
|
|
}
|
|
}
|
|
|
|
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
index 7f0c784d7d37519336cedcac9353665c9f0d4140..86d0ff5ca456df5f1d59f26e7bf5201f6ba59cb0 100644
|
|
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
@@ -138,12 +138,14 @@ public class PurpurWorldConfig {
|
|
public boolean elytraIgnoreUnbreaking = false;
|
|
public int elytraDamagePerFireworkBoost = 0;
|
|
public int elytraDamagePerTridentBoost = 0;
|
|
+ public boolean elytraKineticDamage = true;
|
|
private void elytraSettings() {
|
|
elytraDamagePerSecond = getInt("gameplay-mechanics.elytra.damage-per-second", elytraDamagePerSecond);
|
|
elytraDamageMultiplyBySpeed = getDouble("gameplay-mechanics.elytra.damage-multiplied-by-speed", elytraDamageMultiplyBySpeed);
|
|
elytraIgnoreUnbreaking = getBoolean("gameplay-mechanics.elytra.ignore-unbreaking", elytraIgnoreUnbreaking);
|
|
elytraDamagePerFireworkBoost = getInt("gameplay-mechanics.elytra.damage-per-boost.firework", elytraDamagePerFireworkBoost);
|
|
elytraDamagePerTridentBoost = getInt("gameplay-mechanics.elytra.damage-per-boost.trident", elytraDamagePerTridentBoost);
|
|
+ elytraKineticDamage = getBoolean("gameplay-mechanics.elytra.kinetic-damage", elytraKineticDamage);
|
|
}
|
|
|
|
public int entityLifeSpan = 0;
|