mirror of
https://github.com/Samsuik/Sakura.git
synced 2025-12-22 00:09:20 +00:00
31 lines
1.7 KiB
Diff
31 lines
1.7 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Samsuik <kfian294ma4@gmail.com>
|
|
Date: Mon, 29 Jul 2024 00:18:58 +0100
|
|
Subject: [PATCH] Set entity impulse on explosion
|
|
|
|
|
|
diff --git a/src/main/java/me/samsuik/sakura/explosion/special/SpecialisedExplosion.java b/src/main/java/me/samsuik/sakura/explosion/special/SpecialisedExplosion.java
|
|
index c916d3037bd5920ec06213a9162223a124428d6b..fd98f36ca2fd7e0b5961fd89aa976dbfc7df93b8 100644
|
|
--- a/src/main/java/me/samsuik/sakura/explosion/special/SpecialisedExplosion.java
|
|
+++ b/src/main/java/me/samsuik/sakura/explosion/special/SpecialisedExplosion.java
|
|
@@ -204,6 +204,7 @@ public abstract class SpecialisedExplosion<T extends Entity> extends ServerExplo
|
|
moveZ += z;
|
|
}
|
|
|
|
+ entity.hasImpulse = true; // Sakura - set entity impulse on explosion
|
|
entity.setDeltaMovement(moveX, moveY, moveZ);
|
|
}
|
|
}
|
|
diff --git a/src/main/java/net/minecraft/world/level/ServerExplosion.java b/src/main/java/net/minecraft/world/level/ServerExplosion.java
|
|
index a9a63fa9d2c45298ebd4146e0dfeea54b6431797..f4ab7d377171bf5b9ead7ffd0e6151884bcd2968 100644
|
|
--- a/src/main/java/net/minecraft/world/level/ServerExplosion.java
|
|
+++ b/src/main/java/net/minecraft/world/level/ServerExplosion.java
|
|
@@ -748,6 +748,7 @@ public class ServerExplosion implements Explosion {
|
|
// Paper end - knockback events
|
|
}
|
|
// CraftBukkit end
|
|
+ entity.hasImpulse = true; // Sakura - set entity impulse on explosion
|
|
entity.setDeltaMovement(entity.getDeltaMovement().add(vec3d));
|
|
if (entity instanceof Player) {
|
|
Player entityhuman = (Player) entity;
|