mirror of
https://github.com/Samsuik/Sakura.git
synced 2025-12-22 00:09:20 +00:00
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@dc3ef2a Fix vanilla components not being translated (#9893) PaperMC/Paper@7e15d97 Remove no longer needed diff from adventure patch PaperMC/Paper@f1820dc Fix incorrect border collision detection PaperMC/Paper@de04cbc Updated Upstream (Bukkit/CraftBukkit) (#10034) PaperMC/Paper@ff26d54 send sound and particle packets immediately even if off main (#10033) PaperMC/Paper@e3140fb hotfix spawning item/xp in wrong spot PaperMC/Paper@0b95298 Make worldborder collisions consistent with Vanilla PaperMC/Paper@47b2c18 Don't fire the drop event on player deaths (#10046) PaperMC/Paper@8c007d9 properly read and store sus effect duration (#10050) PaperMC/Paper@5385b21 [ci skip] Make test results viewable in-browser and downloadable (#10055) PaperMC/Paper@086ca61 Fix world border edge collision (#10053) PaperMC/Paper@45e01a2 Use correct max stack size in crafter (#10057) PaperMC/Paper@d11a588 Remove duplicate code in chunk tick iteration (#10056) PaperMC/Paper@b4c9e7e add missing Experimental annotations (#10012)
51 lines
1.9 KiB
Diff
51 lines
1.9 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] isPushedByFluid API
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
|
index 8733e11bdfdb355928a332c20ed94bb57c57045f..8ff5e03e35cea60a53711d058f103e3b8569c170 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
|
@@ -679,6 +679,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
|
discard();
|
|
}
|
|
// Sakura end
|
|
+ public boolean pushedByFluid = true; // Sakura
|
|
|
|
public boolean isLegacyTrackingEntity = false;
|
|
|
|
@@ -4231,7 +4232,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
|
}
|
|
|
|
public boolean isPushedByFluid() {
|
|
- return true;
|
|
+ return pushedByFluid; // Sakura
|
|
}
|
|
|
|
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 1727e932ac6b9ca09b5df96f9547ff125114e15a..9ce5bb9f15501a17a13e0d13874ff992d5df8a52 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
|
@@ -200,6 +200,18 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
|
return this.entity.isInWater();
|
|
}
|
|
|
|
+ // Sakura start
|
|
+ @Override
|
|
+ public boolean isPushedByFluid() {
|
|
+ return getHandle().isPushedByFluid();
|
|
+ }
|
|
+
|
|
+ @Override
|
|
+ public void setPushedByFluid(boolean push) {
|
|
+ getHandle().pushedByFluid = push;
|
|
+ }
|
|
+ // Sakura end
|
|
+
|
|
@Override
|
|
public World getWorld() {
|
|
return this.entity.level().getWorld();
|