Package net.glowstone.block.blocktype
Class BlockSkull
java.lang.Object
net.glowstone.block.itemtype.ItemType
net.glowstone.block.blocktype.BlockType
net.glowstone.block.blocktype.BlockSkull
-
Nested Class Summary
Nested classes/interfaces inherited from class net.glowstone.block.itemtype.ItemType
ItemType.Context
-
Field Summary
Fields inherited from class net.glowstone.block.blocktype.BlockType
ADJACENT, drops, placeSound, SIDES, soundGroup
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
afterPlace
(GlowPlayer player, GlowBlock block, org.bukkit.inventory.ItemStack holding, GlowBlockState oldState) Called after a block has been placed by a player.boolean
canPlaceAt
(GlowPlayer player, GlowBlock block, org.bukkit.block.BlockFace against) Check whether the block can be placed at the given location.static boolean
canRotate
(org.bukkit.material.Skull skull) createBlockEntity
(GlowChunk chunk, int cx, int cy, int cz) Create a new block entity at the given location.@NotNull Collection<org.bukkit.inventory.ItemStack>
Get the items that will be dropped by digging the block.static org.bukkit.SkullType
getType
(int id) Returns the SkullType with the given ID.static byte
getType
(org.bukkit.SkullType type) void
placeBlock
(GlowPlayer player, GlowBlockState state, org.bukkit.block.BlockFace face, org.bukkit.inventory.ItemStack holding, org.bukkit.util.Vector clickedLoc) Called when a block is placed to calculate what the block will become.Methods inherited from class net.glowstone.block.blocktype.BlockType
afterDestroy, blockDestroy, blockInteract, canAbsorb, canOverride, canTickRandomly, getCastedBlockData, getMinedDrops, getOppositeBlockFace, getPlaceAs, getPlaceSound, getPulseTickSpeed, getSoundGroup, isPulseOnce, leftClickBlock, onBlockChanged, onEntityStep, onNearBlockChanged, onRedstoneUpdate, receivePulse, requestPulse, rightClickBlock, setDrops, setPlaceSound, updateBlock, updatePhysics, updatePhysicsAfterEvent, warnMaterialData
Methods inherited from class net.glowstone.block.itemtype.ItemType
getContext, getMaterial, getMaterials, getMaxStackSize, rightClickAir, setMaterial, setMaxStackSize, setPlaceAs, setPlaceAs, toString
-
Constructor Details
-
BlockSkull
public BlockSkull()
-
-
Method Details
-
getType
public static org.bukkit.SkullType getType(int id) Returns the SkullType with the given ID.- Parameters:
id
- the ID to look up- Returns:
- the skull type
-
getType
public static byte getType(org.bukkit.SkullType type) -
canRotate
public static boolean canRotate(org.bukkit.material.Skull skull) -
canPlaceAt
Description copied from class:BlockType
Check whether the block can be placed at the given location.- Overrides:
canPlaceAt
in classBlockType
- Parameters:
player
- The player who placed the block.block
- The location the block is being placed at.against
- The face the block is being placed against.- Returns:
- Whether the placement is valid.
-
placeBlock
public void placeBlock(GlowPlayer player, GlowBlockState state, org.bukkit.block.BlockFace face, org.bukkit.inventory.ItemStack holding, org.bukkit.util.Vector clickedLoc) Description copied from class:BlockType
Called when a block is placed to calculate what the block will become.- Overrides:
placeBlock
in classBlockType
- Parameters:
player
- the player who placed the blockstate
- the BlockState to editface
- the face off which the block is being placedholding
- the ItemStack that was being heldclickedLoc
- where in the block the click occurred
-
createBlockEntity
Description copied from class:BlockType
Create a new block entity at the given location.- Overrides:
createBlockEntity
in classBlockType
- Parameters:
chunk
- The chunk to create the block entity at.cx
- The x coordinate in the chunk.cy
- The y coordinate in the chunk.cz
- The z coordinate in the chunk.- Returns:
- The new BlockEntity, or null if no block entity is used.
-
afterPlace
public void afterPlace(GlowPlayer player, GlowBlock block, org.bukkit.inventory.ItemStack holding, GlowBlockState oldState) Description copied from class:BlockType
Called after a block has been placed by a player.- Overrides:
afterPlace
in classBlockType
- Parameters:
player
- the player who placed the blockblock
- the block that was placedholding
- the the ItemStack that was being heldoldState
- The old block state before the block was placed.
-
getDrops
@NotNull public @NotNull Collection<org.bukkit.inventory.ItemStack> getDrops(GlowBlock block, org.bukkit.inventory.ItemStack tool) Description copied from class:BlockType
Get the items that will be dropped by digging the block.
-