31 lines
1.6 KiB
Diff
31 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 0857a65ecbc36e0e4b8a7d0cda52be35f238f660..1a3151814ef669db1c8530c7afaa810be99ca267 100644
|
|
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
|
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
|
@@ -282,4 +282,19 @@ public interface UnsafeValues {
|
|
// Paper end - lifecycle event API
|
|
|
|
@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
|
|
+
|
|
+ // 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
|
|
+
|
|
+
|
|
}
|