9
0
mirror of https://github.com/Samsuik/Sakura.git synced 2025-12-22 00:09:20 +00:00
Files
SakuraMC/patches/server/0021-Entity-pushed-by-fluid-API.patch
Samsuik 8491db8c0a Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@9aea240 Properly lookup plugin classes when looked up by spark
PaperMC/Paper@7e91a2c Update the bundled spark version
PaperMC/Paper@3a47518 Deprecate more Timings things for removal (#11126)
PaperMC/Paper@aa36ae6 Fix EntityUnleashEvent cancellation on distance cause (#11131)
PaperMC/Paper@73a863b Fix horse inventories indices (#11139)
PaperMC/Paper@5512af7 [ci skip] remove timings from issue templates (#11127)
PaperMC/Paper@5a5035b Fix a couple of ItemMeta related NPEs (#11149)
PaperMC/Paper@e1462a9 Bump MCUtils#asyncExecutor core size
PaperMC/Paper@645a677 Make max interaction range configurable (#11164)
PaperMC/Paper@66165f7 Fix PickupStatus getting reset (#11154)
PaperMC/Paper@dcbd99d Fix Owen's typos (#11179)
PaperMC/Paper@f82bea6 Add argument for FinePosition to brig API (#11094)
PaperMC/Paper@694b120 Remove Entity tracker field
PaperMC/Paper@f774787 Copy missed changes to chunk system from Folia
PaperMC/Paper@50bdfc3 Null check tracker in Entity#resendPossiblyDesyncedEntityData
PaperMC/Paper@3234b20 Do not allow chunk unloading outside of the regular tick loop
PaperMC/Paper@0246a9d Add mob bucket items to item id to entity map in DataConverter
PaperMC/Paper@438863c Shutdown L4J cordially if the server stops before it's even started (#11172)
PaperMC/Paper@100d75a Don't entirely die just because a plugin jar was bad
PaperMC/Paper@227544c Move TickThread changes from Moonrise patch to MCUtils
PaperMC/Paper@67d414a Allow plugin aliases to override vanilla commands (#11186)
PaperMC/Paper@58c7ea3 Preserve command node when re-registering modern commands through old API (#11184)
PaperMC/Paper@0a1be9a Make loadChunksForMoveAsync use new chunk system load calls
PaperMC/Paper@df3b654 ConcurrentUtil: Fix concurrent long map resize chain pull function
PaperMC/Paper@5a5c3a4 Remove chunk unload trace debug
PaperMC/Paper@7e44684 Fix wrong assumption about locale being null in the login phase (#11204)
PaperMC/Paper@042f15f [ci skip] chore: fix incorrect commit hash in PR builds (#11198)
PaperMC/Paper@4e6a2a1 Check for block type in SculkSensorBlock#canActivate
2024-08-09 20:10:59 +01:00

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 cf21159ebba4c1a2943dfe4d4d0202bd619fa172..3a37f80b4289dc58d4fc66947dd5d9818b7ee8d6 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -603,6 +603,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();
@@ -4167,7 +4168,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 cd789c235acf740ec29c30b180e7fbe1a140caa9..f837748105540ae77b718590f1387168e6c906ac 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
@@ -203,6 +203,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();