public static class TumblestoneBlockEvent.PreBlockBroke extends TumblestoneBlockEvent
TumblestoneBlockEvent.PostBlockBroke, TumblestoneBlockEvent.PostBlockDestroy, TumblestoneBlockEvent.PostCooldownEnd, TumblestoneBlockEvent.PostGrow, TumblestoneBlockEvent.PreBlockBroke, TumblestoneBlockEvent.PreBlockDestroy, TumblestoneBlockEvent.PreCooldownEnd, TumblestoneBlockEvent.PreGrow| Constructor and Description |
|---|
PreBlockBroke(net.minecraft.world.World level,
net.minecraft.block.BlockState state,
net.minecraft.util.math.BlockPos pos,
net.minecraft.entity.player.PlayerEntity player,
net.minecraft.item.ItemStack itemStack,
java.util.List<net.minecraft.item.ItemStack> drops)
The basic constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
addDrops(java.util.List<net.minecraft.item.ItemStack> items)
Adds drops to the event
|
void |
clearDrops()
Removes all the drops
|
java.util.List<net.minecraft.item.ItemStack> |
getDrops()
The drops from the block
|
net.minecraft.item.ItemStack |
getItemStack()
Gets the item used in their MAIN_HAND
|
net.minecraft.entity.player.PlayerEntity |
getPlayer()
The player breaking the block
|
getPos, getState, getWorldpublic PreBlockBroke(net.minecraft.world.World level,
net.minecraft.block.BlockState state,
net.minecraft.util.math.BlockPos pos,
net.minecraft.entity.player.PlayerEntity player,
net.minecraft.item.ItemStack itemStack,
java.util.List<net.minecraft.item.ItemStack> drops)
state - The block statepos - The position of the blockplayer - The playeritemStack - The item in MAIN_HANDdrops - The player dropspublic net.minecraft.entity.player.PlayerEntity getPlayer()
public net.minecraft.item.ItemStack getItemStack()
public java.util.List<net.minecraft.item.ItemStack> getDrops()
public void addDrops(java.util.List<net.minecraft.item.ItemStack> items)
items - The drops being addedpublic void clearDrops()