diff options
author | Riley Park <[email protected]> | 2024-05-15 17:06:59 -0700 |
---|---|---|
committer | GitHub <[email protected]> | 2024-05-15 17:06:59 -0700 |
commit | f17519338bc589c045e0b32bfc37e048b23544d5 (patch) | |
tree | e50182ec698b4a9de8f366f485ee089b1901bbd9 /patches/server/0045-Disable-explosion-knockback.patch | |
parent | 3fc93581bb876e8149b2ca423375a98f5ca12d27 (diff) | |
download | Paper-f17519338bc589c045e0b32bfc37e048b23544d5.tar.gz Paper-f17519338bc589c045e0b32bfc37e048b23544d5.zip |
Expose server build information (#10729)
* Expose server build information
* squash patches
* final tweaks
---------
Co-authored-by: Jake Potrebic <[email protected]>
Co-authored-by: masmc05 <[email protected]>
Diffstat (limited to 'patches/server/0045-Disable-explosion-knockback.patch')
-rw-r--r-- | patches/server/0045-Disable-explosion-knockback.patch | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/patches/server/0045-Disable-explosion-knockback.patch b/patches/server/0045-Disable-explosion-knockback.patch new file mode 100644 index 0000000000..01f044f93e --- /dev/null +++ b/patches/server/0045-Disable-explosion-knockback.patch @@ -0,0 +1,28 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Sudzzy <[email protected]> +Date: Wed, 2 Mar 2016 14:48:03 -0600 +Subject: [PATCH] Disable explosion knockback + + +diff --git a/src/main/java/net/minecraft/world/level/Explosion.java b/src/main/java/net/minecraft/world/level/Explosion.java +index 8faa868787d63663cf844a9a6782a13405b30372..da9a9b235d1c8bcab3762134d69dcb112470e55d 100644 +--- a/src/main/java/net/minecraft/world/level/Explosion.java ++++ b/src/main/java/net/minecraft/world/level/Explosion.java +@@ -284,7 +284,7 @@ public class Explosion { + if (entity instanceof LivingEntity) { + LivingEntity entityliving = (LivingEntity) entity; + +- d13 = ProtectionEnchantment.getExplosionKnockbackAfterDampener(entityliving, d12); ++ d13 = entity instanceof Player && level.paperConfig().environment.disableExplosionKnockback ? 0 : ProtectionEnchantment.getExplosionKnockbackAfterDampener(entityliving, d12); // Paper - Option to disable explosion knockback + } else { + d13 = d12; + } +@@ -309,7 +309,7 @@ public class Explosion { + if (entity instanceof Player) { + Player entityhuman = (Player) entity; + +- if (!entityhuman.isSpectator() && (!entityhuman.isCreative() || !entityhuman.getAbilities().flying)) { ++ if (!entityhuman.isSpectator() && (!entityhuman.isCreative() || !entityhuman.getAbilities().flying) && !level.paperConfig().environment.disableExplosionKnockback) { // Paper - Option to disable explosion knockback + this.hitPlayers.put(entityhuman, vec3d1); + } + } |