29 lines
1.4 KiB
Diff
29 lines
1.4 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: lexikiq <noellekiq@gmail.com>
|
|
Date: Fri, 18 Jun 2021 03:18:47 -0400
|
|
Subject: [PATCH] Add UnsafeValues#canPlaceItemOn
|
|
|
|
|
|
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
|
|
index b92255a9c87620f46adb140689b1cd328a476d61..3ed52d016314c01293530fa760fa5faaf59586ed 100644
|
|
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
|
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
|
@@ -245,4 +245,17 @@ public interface UnsafeValues {
|
|
*/
|
|
void setBiomeKey(RegionAccessor accessor, int x, int y, int z, NamespacedKey biomeKey);
|
|
// Paper end
|
|
+
|
|
+ // Parchment start
|
|
+ /**
|
|
+ * Determines if this item can be placed on a block. Must be run synchronously.
|
|
+ * Factors in player location, blocking events, hitboxes, and more.
|
|
+ * @param item item to test
|
|
+ * @param player optional player placing the block
|
|
+ * @param block block that is being placed against
|
|
+ * @param face cardinal direction
|
|
+ * @return if the item can be placed
|
|
+ */
|
|
+ java.util.concurrent.CompletableFuture<Boolean> canPlaceItemOn(@org.jetbrains.annotations.NotNull ItemStack item, @org.jetbrains.annotations.Nullable gg.projecteden.parchment.OptionalHumanEntity player, @org.jetbrains.annotations.NotNull org.bukkit.block.Block block, @org.jetbrains.annotations.NotNull org.bukkit.block.BlockFace face);
|
|
+ // Parchment end
|
|
}
|