mirror of
https://github.com/Samsuik/Sakura.git
synced 2025-12-22 08:19:26 +00:00
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@f4741f2 Expose particle status client option (#11573) PaperMC/Paper@7e789e8 Prevent duplicate/superfluous BlockPhysicsEvent (#11609) PaperMC/Paper@afb5b13 Replace SimpleRandom with (Simple)ThreadUnsafeRandom PaperMC/Paper@d38624b Do not call modifyEntityTrackingRange on own range
51 lines
2.1 KiB
Diff
51 lines
2.1 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Samsuik <40902469+Samsuik@users.noreply.github.com>
|
|
Date: Fri, 13 Oct 2023 20:02:04 +0100
|
|
Subject: [PATCH] Entity pushed by fluid API
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
|
index 12ab6b6ff6444da963f3e1160bf779f7fdb72c48..cc31ee0d9ab13fd08dc33b6757173682883a2ac5 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
|
@@ -622,6 +622,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
|
}
|
|
}
|
|
// Sakura end - merge cannon entities
|
|
+ public boolean pushedByFluid = true; // Sakura - entity pushed by fluid api
|
|
|
|
public Entity(EntityType<?> type, Level world) {
|
|
this.id = Entity.ENTITY_COUNTER.incrementAndGet();
|
|
@@ -4446,7 +4447,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
|
}
|
|
|
|
public boolean isPushedByFluid() {
|
|
- return true;
|
|
+ return this.pushedByFluid; // Sakura - entity pushed by fluid api
|
|
}
|
|
|
|
public static double getViewScale() {
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
|
index ddabaed899c755925ad8618b78c33dacaf2126ac..83de2011a8b448b463bcd96e4a8ee8933590de58 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
|
@@ -204,6 +204,18 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
|
return this.entity.isInWater();
|
|
}
|
|
|
|
+ // Sakura start - entity pushed by fluid api
|
|
+ @Override
|
|
+ public boolean isPushedByFluid() {
|
|
+ return this.getHandle().isPushedByFluid();
|
|
+ }
|
|
+
|
|
+ @Override
|
|
+ public void setPushedByFluid(boolean push) {
|
|
+ this.getHandle().pushedByFluid = push;
|
|
+ }
|
|
+ // Sakura end - entity pushed by fluid api
|
|
+
|
|
@Override
|
|
public World getWorld() {
|
|
return this.entity.level().getWorld();
|