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@9c45038 Return null in getRegistry(Class) for unknown type (#11422) PaperMC/Paper@d611754 Disable pretty printing for advancement saving (#11419) PaperMC/Paper@5bcb2ff Correctly launch WindCharges (#11418) PaperMC/Paper@593faf4 Create TileStateInventoryHolder (#11420) PaperMC/Paper@1ed64f8 Update launchProjectile API (#11300) PaperMC/Paper@78feecb Deprecate BlockType#isInteractable (#11427) PaperMC/Paper@1cb2bf4 Add velocity forwarding secret env override (#10127) PaperMC/Paper@81d9448 Add ItemStack array serialization methods (#10387) PaperMC/Paper@2f50b87 Fixup command precprocess cancellation (#11424) PaperMC/Paper@540deb7 Fix Color Particle API (#10895) PaperMC/Paper@e8297c4 Expand out datapack API (#10828) PaperMC/Paper@4514c71 Only call EntityPortalExitEvent if entity is actually in a portal PaperMC/Paper@acdd6d3 make MenuType implement FeatureDependant PaperMC/Paper@9b1ee0d Add missing key files and cleanup registry definition order PaperMC/Paper@1bc02e6 Fix tag lifecycle event handlers not disabling /reload
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 ba13fcd0c01dc2c4068017fa0c008016640c4c8b..232132951856f244bcbf978709bef98da2f8827d 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();
|
|
@@ -4169,7 +4170,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();
|