Class OutputChest
java.lang.Object
io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem
io.github.thebusybiscuit.slimefun4.implementation.items.blocks.OutputChest
- All Implemented Interfaces:
Placeable
The
OutputChest
can be used to capture the output items from a MultiBlockMachine
.- Author:
- TheBusyBiscuit
- See Also:
-
Field Summary
Fields inherited from class io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem
addon, disenchantable, enchantable, hidden, recipeOutput, useableInWorkbench
-
Constructor Summary
ConstructorDescriptionOutputChest
(ItemGroup itemGroup, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe) -
Method Summary
Modifier and TypeMethodDescriptionfindOutputChestFor
(Block b, ItemStack item) This method checks if anOutputChest
is placed next to the givenBlock
.Methods inherited from class io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem
addItemHandler, addItemSetting, addOfficialWikipage, callItemHandler, canUse, equals, error, getAddon, getBlockTicker, getById, getByItem, getDrops, getDrops, getHandlers, getId, getItem, getItemGroup, getItemName, getItemSetting, getItemSettings, getOptionalById, getOptionalByItem, getRecipe, getRecipeOutput, getRecipeType, getResearch, getState, getWikipage, hashCode, hasResearch, info, isDisabled, isDisabledIn, isDisenchantable, isEnchantable, isHidden, isItem, isItemStackImmutable, isTicking, isUseableInWorkbench, load, postRegister, preRegister, register, sendDeprecationWarning, setHidden, setItemGroup, setRecipe, setRecipeOutput, setRecipeType, setResearch, setUseableInWorkbench, toString, warn
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface io.github.thebusybiscuit.slimefun4.core.attributes.Placeable
useVanillaBlockBreaking
-
Constructor Details
-
OutputChest
@ParametersAreNonnullByDefault public OutputChest(ItemGroup itemGroup, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe)
-
-
Method Details
-
findOutputChestFor
@Nonnull public static Optional<Inventory> findOutputChestFor(@Nonnull Block b, @Nonnull ItemStack item) This method checks if anOutputChest
is placed next to the givenBlock
. The returned object is anOptional
. ThisOptional
will be empty if noOutputChest
was found or if noOutputChest
could fit theItemStack
inside. Otherwise theInventory
of theOutputChest
will be returned (as anOptional
).- Parameters:
b
- TheBlock
from which to look for an adjacentOutputChest
item
- TheItemStack
to insert- Returns:
- An
Optional
describing the result
-