mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-08 09:17:36 +01:00
[Bleeding] Added Block.breakNaturally and Block.getDrops
By: Zeerix <zeerix@draig.de>
This commit is contained in:
parent
e0c7fc6bf5
commit
4ad64ea3f5
@ -1,9 +1,12 @@
|
||||
package org.bukkit.block;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
import org.bukkit.Chunk;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
/**
|
||||
* Represents a block. This is a live object, and only one Block may exist for
|
||||
@ -143,7 +146,6 @@ public interface Block {
|
||||
*
|
||||
* @return Location of block
|
||||
*/
|
||||
|
||||
Location getLocation();
|
||||
|
||||
/**
|
||||
@ -302,4 +304,35 @@ public interface Block {
|
||||
* @return reaction
|
||||
*/
|
||||
PistonMoveReaction getPistonMoveReaction();
|
||||
|
||||
/**
|
||||
* Breaks the block and spawns items as if a player had digged it
|
||||
*
|
||||
* @return true if the block was destroyed
|
||||
*/
|
||||
boolean breakNaturally();
|
||||
|
||||
/**
|
||||
* Breaks the block and spawns items as if a player had digged it with a specific tool
|
||||
*
|
||||
* @param tool The tool or item in hand used for digging
|
||||
* @return true if the block was destroyed
|
||||
*/
|
||||
boolean breakNaturally(ItemStack tool);
|
||||
|
||||
/**
|
||||
* Returns a list of items which would drop by destroying this block
|
||||
*
|
||||
* @return a list of dropped items for this type of block
|
||||
*/
|
||||
Collection<ItemStack> getDrops();
|
||||
|
||||
/**
|
||||
* Returns a list of items which would drop by destroying this block with a specific tool
|
||||
*
|
||||
* @param tool The tool or item in hand used for digging
|
||||
* @return a list of dropped items for this type of block
|
||||
*/
|
||||
Collection<ItemStack> getDrops(ItemStack tool);
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user