mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-20 01:47:42 +01:00
Updated Upstream (Paper & Tuinity)
Upstream has released updates that appear to apply and compile correctly Paper Changes:b33b63908eSupport complex components in written book builder (#6337)bfb3d42b44Optimize entity tracker passenger checks (#6361)399710ff79Add reobf mappings patch for MinecraftServer#getLootTables (#6368)25cd8aba9fConfig option for Piglins guarding chests (#4829)80650e8936Added EntityItemDamageEvent (#4928) Tuinity Changes:8e7cc4dc96Do not submit profile lookups to worldgen threads
This commit is contained in:
42
patches/server/0238-Toggle-for-kinetic-damage.patch
Normal file
42
patches/server/0238-Toggle-for-kinetic-damage.patch
Normal file
@@ -0,0 +1,42 @@
|
||||
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 04e32a71cd97710b8193711fb691cc08e5460daf..5d10acb75a6d92694055ade8de5b9e11db566533 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -2779,7 +2779,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 0cb6779f0da78830564b7d30ac2c1e018b9a0861..6e0c228e6171ce0acc3ee2a85527785a2e1204fb 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
@@ -137,12 +137,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;
|
||||
Reference in New Issue
Block a user