java.lang.Object
io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem
net.guizhanss.guizhanlib.slimefun.machines.MenuBlock
All Implemented Interfaces:
io.github.thebusybiscuit.slimefun4.core.attributes.Placeable
Direct Known Subclasses:
TickingMenuBlock

@ParametersAreNonnullByDefault public abstract class MenuBlock extends io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem
A MenuBlock is a SlimefunItem with MenuBlockPreset.

Modified from InfinityLib

Author:
Mooy1, ybw0014
  • Field Summary

    Fields inherited from class io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem

    addon, disenchantable, enchantable, hidden, recipeOutput, useableInWorkbench
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    MenuBlock(io.github.thebusybiscuit.slimefun4.api.items.ItemGroup itemGroup, io.github.thebusybiscuit.slimefun4.api.items.SlimefunItemStack item, io.github.thebusybiscuit.slimefun4.api.recipes.RecipeType recipeType, ItemStack[] recipe)
    Constructor of MenuBlock.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected abstract int[]
     
    protected int[]
    getInputSlots(me.mrCookieSlime.Slimefun.api.inventory.DirtyChestMenu menu, ItemStack item)
     
    protected abstract int[]
     
    protected final int[]
    getTransportSlots(me.mrCookieSlime.Slimefun.api.inventory.DirtyChestMenu menu, me.mrCookieSlime.Slimefun.api.item_transport.ItemTransportFlow flow, ItemStack item)
     
    protected void
    onBreak(BlockBreakEvent e, me.mrCookieSlime.Slimefun.api.inventory.BlockMenu menu)
     
    protected void
    onNewInstance(me.mrCookieSlime.Slimefun.api.inventory.BlockMenu menu, Block b)
     
    protected void
     
    final void
     
    protected abstract void
    setup(me.mrCookieSlime.Slimefun.api.inventory.BlockMenuPreset preset)
     

    Methods inherited from class io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem

    addItemHandler, addItemSetting, addOfficialWikipage, addWikiPage, callItemHandler, canUse, disable, enable, equals, error, getAddon, getBlockTicker, getById, getByItem, getDrops, getDrops, getHandlers, getId, getItem, getItemGroup, getItemName, getItemSetting, getItemSettings, getRecipe, getRecipeOutput, getRecipeType, getResearch, getState, getWikipage, hashCode, hasResearch, info, isDisabled, isDisabledIn, isDisenchantable, isEnchantable, isHidden, isItem, isItemStackImmutable, isTicking, isUseableInWorkbench, load, loadDataByDefault, 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

    • MenuBlock

      @ParametersAreNonnullByDefault protected MenuBlock(io.github.thebusybiscuit.slimefun4.api.items.ItemGroup itemGroup, io.github.thebusybiscuit.slimefun4.api.items.SlimefunItemStack item, io.github.thebusybiscuit.slimefun4.api.recipes.RecipeType recipeType, ItemStack[] recipe)
      Constructor of MenuBlock. Add events on break and place
      Parameters:
      itemGroup - the ItemGroup of this MenuBlock
      item - the SlimefunItemStack of this MenuBlock
      recipeType - the RecipeType of this MenuBlock
      recipe - the recipe of this MenuBlock
  • Method Details

    • postRegister

      public final void postRegister()
      Overrides:
      postRegister in class io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem
    • setup

      @ParametersAreNonnullByDefault protected abstract void setup(me.mrCookieSlime.Slimefun.api.inventory.BlockMenuPreset preset)
    • getTransportSlots

      @ParametersAreNonnullByDefault @Nonnull protected final int[] getTransportSlots(me.mrCookieSlime.Slimefun.api.inventory.DirtyChestMenu menu, me.mrCookieSlime.Slimefun.api.item_transport.ItemTransportFlow flow, ItemStack item)
    • getInputSlots

      @ParametersAreNonnullByDefault protected int[] getInputSlots(me.mrCookieSlime.Slimefun.api.inventory.DirtyChestMenu menu, ItemStack item)
    • getInputSlots

      protected abstract int[] getInputSlots()
    • getOutputSlots

      protected abstract int[] getOutputSlots()
    • onNewInstance

      @ParametersAreNonnullByDefault protected void onNewInstance(me.mrCookieSlime.Slimefun.api.inventory.BlockMenu menu, Block b)
    • onBreak

      @ParametersAreNonnullByDefault protected void onBreak(BlockBreakEvent e, me.mrCookieSlime.Slimefun.api.inventory.BlockMenu menu)
    • onPlace

      @ParametersAreNonnullByDefault protected void onPlace(BlockPlaceEvent e, Block b)