mirror of
https://github.com/Samsuik/Sakura.git
synced 2025-12-30 20:29:14 +00:00
Start on updating 1.21.4
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
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 8ddcbb5f5ea867d3bce207ba25f93a940f78a93b..06cbe3ac6adf0d91a185e365a056b29ee54380e6 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/ServerExplosion.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/ServerExplosion.java
|
||||
@@ -748,7 +748,12 @@ public class ServerExplosion implements Explosion {
|
||||
// Paper end - knockback events
|
||||
}
|
||||
// CraftBukkit end
|
||||
- entity.push(vec3d);
|
||||
+ // Sakura start - set entity impulse on explosion
|
||||
+ // Wait for upstream to change the push method to be more sane.
|
||||
+ // entity.push(vec3d);
|
||||
+ entity.hasImpulse = true;
|
||||
+ entity.setDeltaMovement(entity.getDeltaMovement().add(vec3d));
|
||||
+ // Sakura end - set entity impulse on explosion
|
||||
if (entity instanceof Player) {
|
||||
Player entityhuman = (Player) entity;
|
||||
|
||||
Reference in New Issue
Block a user