mirror of
https://github.com/PaperMC/Paper.git
synced 2025-02-11 18:11:55 +01:00
Cleanup disable explosion knockback patch (#9858)
This commit is contained in:
parent
8222e33a11
commit
c7b9f77124
@ -4,31 +4,6 @@ Date: Wed, 2 Mar 2016 14:48:03 -0600
|
|||||||
Subject: [PATCH] Disable explosion knockback
|
Subject: [PATCH] Disable explosion knockback
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
|
||||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
|
||||||
@@ -0,0 +0,0 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
+ boolean knockbackCancelled = this.level().paperConfig().environment.disableExplosionKnockback && source.is(DamageTypeTags.IS_EXPLOSION) && this instanceof net.minecraft.world.entity.player.Player; // Paper - Disable explosion knockback
|
|
||||||
if (flag1) {
|
|
||||||
if (flag) {
|
|
||||||
this.level().broadcastEntityEvent(this, (byte) 29);
|
|
||||||
} else {
|
|
||||||
+ if (!knockbackCancelled) // Paper - Disable explosion knockback
|
|
||||||
this.level().broadcastDamageEvent(this, source);
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -0,0 +0,0 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
+ if (knockbackCancelled) this.level().broadcastEntityEvent(this, (byte) 2); // Paper - Disable explosion knockback
|
|
||||||
if (this.isDeadOrDying()) {
|
|
||||||
if (!this.checkTotemDeathProtection(source)) {
|
|
||||||
SoundEvent soundeffect = this.getDeathSound();
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/Explosion.java b/src/main/java/net/minecraft/world/level/Explosion.java
|
diff --git a/src/main/java/net/minecraft/world/level/Explosion.java b/src/main/java/net/minecraft/world/level/Explosion.java
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/Explosion.java
|
--- a/src/main/java/net/minecraft/world/level/Explosion.java
|
||||||
|
@ -82,7 +82,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
@Override
|
@Override
|
||||||
public float getBukkitYaw() {
|
public float getBukkitYaw() {
|
||||||
@@ -0,0 +0,0 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
@@ -0,0 +0,0 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||||
if (knockbackCancelled) this.level().broadcastEntityEvent(this, (byte) 2); // Paper - Disable explosion knockback
|
|
||||||
if (this.isDeadOrDying()) {
|
if (this.isDeadOrDying()) {
|
||||||
if (!this.checkTotemDeathProtection(source)) {
|
if (!this.checkTotemDeathProtection(source)) {
|
||||||
- SoundEvent soundeffect = this.getDeathSound();
|
- SoundEvent soundeffect = this.getDeathSound();
|
||||||
|
Loading…
Reference in New Issue
Block a user