public class BlockOre extends BlockNeedsTool
ItemType.Context
ADJACENT, 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, warnMaterialData
getContext, getId, getMaterial, getMaxStackSize, rightClickAir, setId, setMaterial, setMaxStackSize, setPlaceAs, setPlaceAs, toString
public 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)
BlockType
getDrops
in class BlockNeedsTool
block
- 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)
BlockType
getMinedDrops
in class BlockType
block
- The block.protected MaterialMatcher getNeededMiningTool(GlowBlock block)
getNeededMiningTool
in class BlockNeedsTool
Copyright © 2021. All rights reserved.