mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-03 23:07:40 +01:00
SPIGOT-5751: Clarify behaviour of block drop-related API methods
By: Lars Dormans <lars.dormans@live.nl>
This commit is contained in:
parent
036d0b41dd
commit
f8ce884be6
@ -376,7 +376,8 @@ public interface Block extends Metadatable {
|
||||
PistonMoveReaction getPistonMoveReaction();
|
||||
|
||||
/**
|
||||
* Breaks the block and spawns items as if a player had digged it
|
||||
* Breaks the block and spawns items as if a player had digged it regardless
|
||||
* of the tool.
|
||||
*
|
||||
* @return true if the block was destroyed
|
||||
*/
|
||||
@ -389,7 +390,7 @@ public interface Block extends Metadatable {
|
||||
* @param tool The tool or item in hand used for digging
|
||||
* @return true if the block was destroyed
|
||||
*/
|
||||
boolean breakNaturally(@NotNull ItemStack tool);
|
||||
boolean breakNaturally(@Nullable ItemStack tool);
|
||||
|
||||
/**
|
||||
* Returns a list of items which would drop by destroying this block
|
||||
@ -407,7 +408,7 @@ public interface Block extends Metadatable {
|
||||
* @return a list of dropped items for this type of block
|
||||
*/
|
||||
@NotNull
|
||||
Collection<ItemStack> getDrops(@NotNull ItemStack tool);
|
||||
Collection<ItemStack> getDrops(@Nullable ItemStack tool);
|
||||
|
||||
/**
|
||||
* Returns a list of items which would drop by the entity destroying this
|
||||
|
Loading…
Reference in New Issue
Block a user