Class AbstractMachineBlock

java.lang.Object
io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem
All Implemented Interfaces:
io.github.thebusybiscuit.slimefun4.core.attributes.EnergyNetComponent, io.github.thebusybiscuit.slimefun4.core.attributes.ItemAttribute, io.github.thebusybiscuit.slimefun4.core.attributes.Placeable

@ParametersAreNonnullByDefault public abstract class AbstractMachineBlock extends TickingMenuBlock implements io.github.thebusybiscuit.slimefun4.core.attributes.EnergyNetComponent
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected int
     
    protected int
     

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

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

    Constructors
    Constructor
    Description
    AbstractMachineBlock(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)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    final int
     
    final io.github.thebusybiscuit.slimefun4.core.networks.energy.EnergyNetComponentType
     
    protected abstract ItemStack
     
    protected abstract int
     
    protected abstract boolean
    process(Block b, me.mrCookieSlime.Slimefun.api.inventory.BlockMenu menu)
     
    final void
    register(io.github.thebusybiscuit.slimefun4.api.SlimefunAddon addon)
     
    protected void
    tick(Block b, me.mrCookieSlime.Slimefun.api.inventory.BlockMenu menu)
     

    Methods inherited from class net.guizhanss.guizhanlib.slimefun.machines.TickingMenuBlock

    isSync

    Methods inherited from class net.guizhanss.guizhanlib.slimefun.machines.MenuBlock

    getInputSlots, getInputSlots, getOutputSlots, getTransportSlots, onBreak, onNewInstance, onPlace, postRegister, setup

    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, getRecipe, getRecipeOutput, getRecipeType, getResearch, getState, getWikipage, hashCode, hasResearch, info, isDisabled, isDisabledIn, isDisenchantable, isEnchantable, isHidden, isItem, isItemStackImmutable, isTicking, isUseableInWorkbench, load, preRegister, 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.EnergyNetComponent

    addCharge, getCharge, getCharge, isChargeable, removeCharge, setCharge

    Methods inherited from interface io.github.thebusybiscuit.slimefun4.core.attributes.ItemAttribute

    getId

    Methods inherited from interface io.github.thebusybiscuit.slimefun4.core.attributes.Placeable

    useVanillaBlockBreaking
  • Field Details

    • energyPerTick

      protected int energyPerTick
    • energyCapacity

      protected int energyCapacity
  • Constructor Details

    • AbstractMachineBlock

      public AbstractMachineBlock(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)
  • Method Details

    • tick

      protected void tick(Block b, me.mrCookieSlime.Slimefun.api.inventory.BlockMenu menu)
      Specified by:
      tick in class TickingMenuBlock
    • process

      protected abstract boolean process(Block b, me.mrCookieSlime.Slimefun.api.inventory.BlockMenu menu)
    • getStatusSlot

      protected abstract int getStatusSlot()
    • getNoEnergyItem

      protected abstract ItemStack getNoEnergyItem()
    • getCapacity

      public final int getCapacity()
      Specified by:
      getCapacity in interface io.github.thebusybiscuit.slimefun4.core.attributes.EnergyNetComponent
    • getEnergyComponentType

      @Nonnull public final io.github.thebusybiscuit.slimefun4.core.networks.energy.EnergyNetComponentType getEnergyComponentType()
      Specified by:
      getEnergyComponentType in interface io.github.thebusybiscuit.slimefun4.core.attributes.EnergyNetComponent
    • register

      public final void register(@Nonnull io.github.thebusybiscuit.slimefun4.api.SlimefunAddon addon)
      Overrides:
      register in class io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem