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 ofBlockStateandInventoryHolderwe 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected InventorygetInventory(T inventoryHolder) voidonPlayerBreak(BlockBreakEvent e, ItemStack item, List<ItemStack> drops) Methods inherited from class io.github.thebusybiscuit.slimefun4.core.handlers.BlockBreakHandler
getIdentifier, isAndroidAllowed, isExplosionAllowed, onAndroidBreak, onExplodeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:
onPlayerBreakin classBlockBreakHandler
-
getInventory
-