9
0
mirror of https://github.com/BX-Team/DivineMC.git synced 2025-12-19 14:59:25 +00:00
Files
DivineMC/divinemc-server/paper-patches/features/0012-Paper-PR-Player-standing-on-position-API.patch
NONPLAYT 03d9aa7325 Updated Upstream (Purpur)
Upstream has released updates that appear to apply and compile correctly

Purpur Changes:
PurpurMC/Purpur@eca78060 Updated Upstream (Paper)
PurpurMC/Purpur@e4e9cfdf Updated Upstream (Paper)
PurpurMC/Purpur@3de2fc7d Updated Upstream (Paper)
PurpurMC/Purpur@09f547de add `mob-griefing-override` config options (#1661)
PurpurMC/Purpur@1dd9bd0c Updated Upstream (Paper)
2025-05-21 21:32:34 +03:00

32 lines
1.4 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: NONPLAYT <76615486+NONPLAYT@users.noreply.github.com>
Date: Sun, 23 Mar 2025 16:53:16 +0300
Subject: [PATCH] Paper PR: Player standing on position API
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
index 5ffa1f81a2b9c35bb4632f06f88bd0bc1e2f5815..b8755d050230261097e82f064f3fbff2e57e21f2 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
@@ -1334,6 +1334,20 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
return this.entity.get(io.papermc.paper.datacomponent.PaperDataComponentType.bukkitToMinecraft(type)) != null;
}
+ // Paper start - Player standing on position API
+ @Override
+ public org.bukkit.block.Block getMovementAffectingBlock() {
+ return CraftBlock.at(this.getHandle().level(), this.getHandle().getBlockPosBelowThatAffectsMyMovement());
+ }
+
+ @Override
+ public org.bukkit.block.Block getSupportingBlock() {
+ return this.getHandle().mainSupportingBlockPos
+ .map((pos) -> CraftBlock.at(this.getHandle().level(), pos))
+ .orElse(null);
+ }
+ // Paper end - Player standing on position API
+
// Purpur start - Ridables
@Override
public org.bukkit.entity.Player getRider() {