public class BlockOre extends BlockNeedsTool
ItemType.ContextADJACENT, drops, placeSound, SIDES| Constructor and Description |
|---|
BlockOre(org.bukkit.Material dropType,
MaterialMatcher neededTool)
Creates an ore block type that drops 1 item with a block data or damage value of 0, when
mined without a Fortune-enchanted tool.
|
BlockOre(org.bukkit.Material dropType,
MaterialMatcher neededTool,
int data)
Creates an ore block type that drops 1 item when mined without a Fortune-enchanted tool.
|
BlockOre(org.bukkit.Material dropType,
MaterialMatcher neededTool,
int data,
int count)
Creates an ore block type that drops a fixed number of items when mined without a
Fortune-enchanted tool.
|
BlockOre(org.bukkit.Material dropType,
MaterialMatcher neededTool,
int data,
int minCount,
int maxCount)
Creates an ore block type.
|
| Modifier and Type | Method and Description |
|---|---|
Collection<org.bukkit.inventory.ItemStack> |
getDrops(GlowBlock block,
org.bukkit.inventory.ItemStack tool)
Get the items that will be dropped by digging the block.
|
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) |
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, warnMaterialDatagetContext, getId, getMaterial, getMaxStackSize, rightClickAir, setId, setMaterial, setMaxStackSize, setPlaceAs, setPlaceAs, toStringpublic BlockOre(org.bukkit.Material dropType,
MaterialMatcher neededTool,
int data,
int minCount,
int maxCount)
dropType - the item this drops when mined without a Silk Touch--enchanted toolneededTool - the tool(s) that can mine this blockdata - the block data or damage value for the dropped itemminCount - the minimum number of items to drop, when mined without a Fortune-enchanted
toolmaxCount - the maximum number of items to drop, when mined without a Fortune-enchanted
toolpublic BlockOre(org.bukkit.Material dropType,
MaterialMatcher neededTool,
int data,
int count)
dropType - the item this drops when mined without a Silk Touch--enchanted toolneededTool - the tool(s) that can mine this blockdata - the block data or damage value for the dropped itemcount - the number of items to drop, when mined without a Fortune-enchanted toolpublic BlockOre(org.bukkit.Material dropType,
MaterialMatcher neededTool,
int data)
dropType - the item this drops when mined without a Silk Touch--enchanted toolneededTool - the tool(s) that can mine this blockdata - the block data or damage value for the dropped itempublic BlockOre(org.bukkit.Material dropType,
MaterialMatcher neededTool)
dropType - the item this drops when mined without a Silk Touch--enchanted toolneededTool - the tool(s) that can mine this blockpublic Collection<org.bukkit.inventory.ItemStack> getDrops(GlowBlock block, org.bukkit.inventory.ItemStack tool)
BlockTypegetDrops in class BlockNeedsToolblock - The block being dug.tool - The tool used or null if fists or no tool was used.public Collection<org.bukkit.inventory.ItemStack> getMinedDrops(GlowBlock block)
BlockTypegetMinedDrops in class BlockTypeblock - The block.protected MaterialMatcher getNeededMiningTool(GlowBlock block)
getNeededMiningTool in class BlockNeedsToolCopyright © 2021. All rights reserved.