mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-30 16:19:03 +01:00
6e88b4fa1e
* Add API to get the collision shape of a block before it's placed * Tweak API documentation * Clarify behavior * Rebase * Rebase
31 lines
1.3 KiB
Diff
31 lines
1.3 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: TrollyLoki <trollyloki@gmail.com>
|
|
Date: Wed, 11 Oct 2023 00:45:54 -0400
|
|
Subject: [PATCH] Add API to get the collision shape of a block before it's
|
|
placed
|
|
|
|
|
|
diff --git a/src/main/java/org/bukkit/block/data/BlockData.java b/src/main/java/org/bukkit/block/data/BlockData.java
|
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
|
--- a/src/main/java/org/bukkit/block/data/BlockData.java
|
|
+++ b/src/main/java/org/bukkit/block/data/BlockData.java
|
|
@@ -0,0 +0,0 @@ public interface BlockData extends Cloneable {
|
|
*/
|
|
boolean isFaceSturdy(@NotNull BlockFace face, @NotNull BlockSupport support);
|
|
|
|
+ // Paper start
|
|
+ /**
|
|
+ * Calculates the collision shape this block data would have at a particular location.
|
|
+ * <p>
|
|
+ * This does not take into account any block updates that may occur if the block was to be actually placed in the world.
|
|
+ *
|
|
+ * @param location the location to calculate the collision shape at
|
|
+ *
|
|
+ * @return a {@link org.bukkit.util.VoxelShape} representing the collision shape of this block data.
|
|
+ */
|
|
+ @NotNull org.bukkit.util.VoxelShape getCollisionShape(@NotNull Location location);
|
|
+ // Paper end
|
|
+
|
|
/**
|
|
* Gets the material that a player would use to place this block.
|
|
* <p>
|