mirror of
https://github.com/Samsuik/Sakura.git
synced 2025-12-21 15:59:26 +00:00
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@3ea95ef Do not access world state to see if we can see a Player PaperMC/Paper@71c84c8 Updated Upstream (Bukkit/CraftBukkit/Spigot) (#10277) PaperMC/Paper@e3bc4c4 Make debug mode print current configuration phase PaperMC/Paper@d0ebfbb Fix corrupted plugin.yml breaking plugin loading (#10279) PaperMC/Paper@681bbff Fix spawnreason saving
51 lines
2.0 KiB
Diff
51 lines
2.0 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 d6afc7308698f41760938841967df3706d197082..94d7a8568ffe9ecedcb3a9a6c2f42d8c4562d472 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
|
@@ -714,6 +714,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
|
}
|
|
}
|
|
// Sakura end - cannon entity merging
|
|
+ public boolean pushedByFluid = true; // Sakura - entity pushed by fluid api
|
|
|
|
public Entity(EntityType<?> type, Level world) {
|
|
this.id = Entity.ENTITY_COUNTER.incrementAndGet();
|
|
@@ -4252,7 +4253,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 0b5a31477e3b76833fb97a455842316193663c8e..080d3adf1ffaa1cdd71a01706a89505ef7bc4a10 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
|
@@ -201,6 +201,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();
|