30 lines
1.6 KiB
Diff
30 lines
1.6 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 a491dc40093e19b8d1900443ad613223fd7f3119..fa22e21eb7299f601649af515b9e554e050b1ae1 100644
|
|
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
|
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
|
@@ -312,4 +312,18 @@ public interface UnsafeValues {
|
|
@NotNull java.util.List<net.kyori.adventure.text.Component> computeTooltipLines(@NotNull ItemStack itemStack, @NotNull io.papermc.paper.inventory.tooltip.TooltipContext tooltipContext, @Nullable org.bukkit.entity.Player player); // Paper - expose itemstack tooltip lines
|
|
|
|
ItemStack createEmptyStack(); // Paper - proxy ItemStack
|
|
+
|
|
+ // 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
|
|
+
|
|
}
|