mirror of
https://github.com/Samsuik/Sakura.git
synced 2025-12-22 16:29:16 +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 ca96bec3333b59b620a657c3c0d153e4596a5459..51388b968a96fef99e0db250a55266ebde03d903 100644
|
|
--- a/src/main/java/me/samsuik/sakura/explosion/special/SpecialisedExplosion.java
|
|
+++ b/src/main/java/me/samsuik/sakura/explosion/special/SpecialisedExplosion.java
|
|
@@ -206,6 +206,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 280308766cd41924e209d5816c047ceae0ec1085..2bc39d43c161dcbc2a8ff88fff7409d0c41fd588 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;
|