public class BlockRandomDrops extends BlockNeedsTool
BlockOre
).ItemType.Context
ADJACENT, drops, placeSound, SIDES
Constructor and Description |
---|
BlockRandomDrops(org.bukkit.Material dropType,
int maxDrops)
Creates a block type that drops a random number of items that's at least 1, with block-data
or damage value 0, and can be broken with no tool.
|
BlockRandomDrops(org.bukkit.Material dropType,
int minDrops,
int maxDrops)
Creates a block type that drops a random number of items with block-data or damage value 0
when broken, and can be broken with no tool.
|
BlockRandomDrops(org.bukkit.Material dropType,
int data,
int minDrops,
int maxDrops)
Creates a block type that drops a random number of items when broken, and can be broken with
no tool.
|
BlockRandomDrops(org.bukkit.Material dropType,
int data,
int minDrops,
int maxDrops,
MaterialMatcher neededTool)
Creates a block type that drops a random number of items when broken.
|
Modifier and Type | Method and Description |
---|---|
Collection<org.bukkit.inventory.ItemStack> |
getMinedDrops(GlowBlock block)
Get the items that would be dropped if the block was successfully mined.
|
protected MaterialMatcher |
getNeededMiningTool(GlowBlock block) |
getDrops
afterDestroy, afterPlace, blockDestroy, blockInteract, canAbsorb, canOverride, canPlaceAt, canTickRandomly, createBlockEntity, getOppositeBlockFace, getPlaceAs, getPlaceSound, getPulseTickSpeed, isPulseOnce, leftClickBlock, onBlockChanged, onEntityStep, onNearBlockChanged, onRedstoneUpdate, placeBlock, receivePulse, requestPulse, rightClickBlock, setDrops, setPlaceSound, updateBlock, updatePhysics, updatePhysicsAfterEvent, warnMaterialData
getContext, getId, getMaterial, getMaxStackSize, rightClickAir, setId, setMaterial, setMaxStackSize, setPlaceAs, setPlaceAs, toString
public BlockRandomDrops(org.bukkit.Material dropType, int data, int minDrops, int maxDrops, MaterialMatcher neededTool)
dropType
- the item to drop when brokendata
- the block-data or damage value for the dropped itemminDrops
- the minimum number of items to drop when brokenmaxDrops
- the maximum number of items to drop when brokenneededTool
- the tool(s) that can break this block, or null if no tool is neededpublic BlockRandomDrops(org.bukkit.Material dropType, int data, int minDrops, int maxDrops)
dropType
- the item to drop when brokendata
- the block-data or damage value for the dropped itemminDrops
- the minimum number of items to drop when brokenmaxDrops
- the maximum number of items to drop when brokenpublic BlockRandomDrops(org.bukkit.Material dropType, int minDrops, int maxDrops)
dropType
- the item to drop when brokenminDrops
- the minimum number of items to drop when brokenmaxDrops
- the maximum number of items to drop when brokenpublic BlockRandomDrops(org.bukkit.Material dropType, int maxDrops)
dropType
- the item to drop when brokenmaxDrops
- the maximum number of items to drop when brokenpublic Collection<org.bukkit.inventory.ItemStack> getMinedDrops(GlowBlock block)
BlockType
getMinedDrops
in class BlockType
block
- The block.protected MaterialMatcher getNeededMiningTool(GlowBlock block)
getNeededMiningTool
in class BlockNeedsTool
Copyright © 2021. All rights reserved.