mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-30 16:19:03 +01:00
Add API to get the collision shape of a block before it's placed
This commit is contained in:
parent
2fccf1c185
commit
159f98e5a7
1 changed files with 13 additions and 0 deletions
|
@ -205,6 +205,19 @@ public interface BlockData extends Cloneable {
|
||||||
*/
|
*/
|
||||||
boolean isFaceSturdy(@NotNull BlockFace face, @NotNull BlockSupport support);
|
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 color this block should appear as when rendered on a map.
|
* Gets the color this block should appear as when rendered on a map.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in a new issue