mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@eda3d53 [ci skip] Improve PlayerChatEvent Deprecation Message (#9956) PaperMC/Paper@e1cd9e5 Update paperweight to 1.5.10 and Gradle to 8.4 (#9957) PaperMC/Paper@96d5e6c Code Generation for TypedKeys (#9233) PaperMC/Paper@ed753d3 Re-add missing vanilla safeMode arg PaperMC/Paper@334b2f2 Fix max nearby entities class check (#9967) PaperMC/Paper@faa2f47 Lazily create LootContext for criterions (#9969) PaperMC/Paper@8280211 Fix yaw being ignored for first spawn pos (#9959) PaperMC/Paper@8eac3e1 Don't fire EntityPotionEffectEvent during worldgen (#9965) PaperMC/Paper@0b20f94 Updated Upstream (Bukkit/CraftBukkit/Spigot) (#9953) PaperMC/Paper@f9938d3 Fix plugin bootstrap dependency tree population (#9963) PaperMC/Paper@b37bbcf Use ? super in Consumer/Predicate API (#9939)
38 lines
2.3 KiB
Diff
38 lines
2.3 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 a75f8b72632cab7b9f2c5c6e0cacebe8fe572691..47b9bc6ae22243c523dc3a72c13dc335a17999b9 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
|
@@ -2934,6 +2934,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
|
|
|
if (f3 > 0.0F) {
|
|
this.playSound(this.getFallDamageSound((int) f3), 1.0F, 1.0F);
|
|
+ if (level().purpurConfig.elytraKineticDamage) // Purpur
|
|
this.hurt(this.damageSources().flyIntoWall(), f3);
|
|
}
|
|
}
|
|
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
|
index 5f48af20f046bf516ecaf0dfd9fd2b0fc209c1ad..19563349b4dab54b840a1d089521d1b5b21353ef 100644
|
|
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
|
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
|
@@ -182,12 +182,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;
|