Class VanillaInventoryDropHandler<T extends BlockState & InventoryHolder>
java.lang.Object
io.github.thebusybiscuit.slimefun4.core.handlers.BlockBreakHandler
io.github.thebusybiscuit.slimefun4.implementation.handlers.VanillaInventoryDropHandler<T>
- Type Parameters:
T
- The type ofBlockState
andInventoryHolder
we are dealing with
- All Implemented Interfaces:
ItemHandler
public class VanillaInventoryDropHandler<T extends BlockState & InventoryHolder>
extends BlockBreakHandler
This is an implementation of
BlockBreakHandler
which is suited for any SlimefunItem
that uses the vanilla Inventory
from the BlockState
.
The default behaviour is the following:
| Broken by... | Behaviour | | ------------ | ------------------------ | | Player | Drop inventory contents. | | Android | Not allowed. | | Explosions | Delete contents. |
- Author:
- TheBusyBiscuit
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected Inventory
getInventory
(T inventoryHolder) void
onPlayerBreak
(BlockBreakEvent e, ItemStack item, List<ItemStack> drops) Methods inherited from class io.github.thebusybiscuit.slimefun4.core.handlers.BlockBreakHandler
getIdentifier, isAndroidAllowed, isExplosionAllowed, onAndroidBreak, onExplode
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.github.thebusybiscuit.slimefun4.api.items.ItemHandler
validate
-
Constructor Details
-
VanillaInventoryDropHandler
- Parameters:
blockStateClass
- The class of the block'sBlockState
-
-
Method Details
-
onPlayerBreak
@ParametersAreNonnullByDefault public void onPlayerBreak(BlockBreakEvent e, ItemStack item, List<ItemStack> drops) - Specified by:
onPlayerBreak
in classBlockBreakHandler
-
getInventory
-