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@52a0590 Updated Upstream (Bukkit/CraftBukkit) (#11543) PaperMC/Paper@5c0930d Fix fix recipe iterator patch PaperMC/Paper@1de0130 re-add a dispense fix patch PaperMC/Paper@16d7d73 bunch more general fixes PaperMC/Paper@a5d7426 Correctly support RecipeChoice.empty (#11550) PaperMC/Paper@85c870e Correct update cursor (#11554) PaperMC/Paper@d19be64 Fix NPE with spark when CraftServer is not init yet (#11558) PaperMC/Paper@92131ad Decrease dead entity teleport warning (#11559) PaperMC/Paper@a6df4c8 Handle corrupt light data gracefully PaperMC/Paper@ce0a041 [ci skip] Rebuild patches PaperMC/Paper@c6aa61e Updated Upstream (Bukkit/CraftBukkit/Spigot) (#11561) PaperMC/Paper@93b435d [ci skip] better instructions for patch apply conflict (#11568) PaperMC/Paper@42a1901 Correctly adopt upstream item EAR fix (#11582) PaperMC/Paper@fcb6c72 Correctly pass velocity native compressor (#11509) PaperMC/Paper@99f4bb2 Fix infinite fireworks (#11592) (#11594)
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 b3eea40ba5315e1dd4ea7b2a5a61c53b63e909dc..de6a81d222cd5fef81be87c188b5a726710202f7 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
|
@@ -665,6 +665,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();
|
|
@@ -4482,7 +4483,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 179886dcbda29c5cdb7dbd43e44951ae38d9df96..d0da1b34fe10be266f5b711e5755f07521e0bf08 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();
|