Yatopia/patches/server/0028-EMC-Tweak-Explosions.patch
2020-02-26 20:12:29 +01:00

51 lines
2.2 KiB
Diff

From 98858d2ce483f4a2e84896fcd68dc18af00a90c8 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 20 Jun 2018 22:35:39 -0400
Subject: [PATCH] EMC Tweak Explosions
---
src/main/java/net/minecraft/server/Explosion.java | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/main/java/net/minecraft/server/Explosion.java b/src/main/java/net/minecraft/server/Explosion.java
index a353f3d5..b1ac7d10 100644
--- a/src/main/java/net/minecraft/server/Explosion.java
+++ b/src/main/java/net/minecraft/server/Explosion.java
@@ -97,6 +97,7 @@ public class Explosion {
int i;
int j;
+ if (this.a || this.b != Effect.NONE) { // EMC - don't run block processing if neither flag is set
for (int k = 0; k < 16; ++k) {
for (i = 0; i < 16; ++i) {
for (j = 0; j < 16; ++j) {
@@ -141,6 +142,7 @@ public class Explosion {
}
}
}
+ } // EMC - don't run block processing if neither flag is set
this.blocks.addAll(set);
float f3 = this.size * 2.0F;
@@ -155,7 +157,7 @@ public class Explosion {
List<Entity> list = this.world.getEntities(this.source, new AxisAlignedBB((double) i, (double) l, (double) j1, (double) j, (double) i1, (double) k1), new com.google.common.base.Predicate<Entity>() {
@Override
public boolean apply(Entity entity) {
- return IEntitySelector.canAITarget().test(entity) && !entity.dead;
+ return IEntitySelector.canAITarget().test(entity) && !entity.dead && !(entity instanceof EntityItem); // EMC
}
});
// Paper end
@@ -219,7 +221,7 @@ public class Explosion {
boolean flag1 = this.b != Explosion.Effect.NONE;
if (flag) {
- if (this.size >= 2.0F && flag1) {
+ if (this.size >= 2.0F/* && flag1*/) { // EMC - don't care about block breaks flag for animation
this.world.addParticle(Particles.EXPLOSION_EMITTER, this.posX, this.posY, this.posZ, 1.0D, 0.0D, 0.0D);
} else {
this.world.addParticle(Particles.EXPLOSION, this.posX, this.posY, this.posZ, 1.0D, 0.0D, 0.0D);
--
2.25.1.windows.1