Class AbstractMachineBlock
java.lang.Object
io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem
net.guizhanss.guizhanlib.slimefun.machines.MenuBlock
net.guizhanss.guizhanlib.slimefun.machines.TickingMenuBlock
net.guizhanss.guizhanlib.slimefun.machines.AbstractMachineBlock
- 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
FieldsFields inherited from class io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem
addon, disenchantable, enchantable, hidden, recipeOutput, useableInWorkbench -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractMachineBlock(io.github.thebusybiscuit.slimefun4.api.items.ItemGroup itemGroup, io.github.thebusybiscuit.slimefun4.api.items.SlimefunItemStack item, io.github.thebusybiscuit.slimefun4.api.recipes.RecipeType recipeType, org.bukkit.inventory.ItemStack[] recipe) -
Method Summary
Modifier and TypeMethodDescriptionfinal intfinal io.github.thebusybiscuit.slimefun4.core.networks.energy.EnergyNetComponentTypeprotected abstract org.bukkit.inventory.ItemStackprotected abstract intprotected abstract booleanprocess(org.bukkit.block.Block b, me.mrCookieSlime.Slimefun.api.inventory.BlockMenu menu) final voidregister(io.github.thebusybiscuit.slimefun4.api.SlimefunAddon addon) voidsetEnergyCapacity(int energyCapacity) voidsetEnergyPerTick(int energyPerTick) protected voidtick(org.bukkit.block.Block b, me.mrCookieSlime.Slimefun.api.inventory.BlockMenu menu) Methods inherited from class net.guizhanss.guizhanlib.slimefun.machines.TickingMenuBlock
getTickCount, isSync, uniqueTickMethods inherited from class net.guizhanss.guizhanlib.slimefun.machines.MenuBlock
getInputSlots, getInputSlots, getOutputSlots, getTransportSlots, onBreak, onNewInstance, onPlace, postRegister, setupMethods inherited from class io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem
addItemHandler, addItemSetting, addOfficialWikipage, callItemHandler, canUse, equals, error, getAddon, getBlockTicker, getById, getByItem, 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, isTicking, isUseableInWorkbench, load, preRegister, sendDeprecationWarning, setHidden, setItemGroup, setRecipe, setRecipeOutput, setRecipeType, setResearch, setUseableInWorkbench, toString, warnMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface io.github.thebusybiscuit.slimefun4.core.attributes.EnergyNetComponent
addCharge, getCharge, getCharge, isChargeable, removeCharge, setChargeMethods inherited from interface io.github.thebusybiscuit.slimefun4.core.attributes.ItemAttribute
getIdMethods inherited from interface io.github.thebusybiscuit.slimefun4.core.attributes.Placeable
useVanillaBlockBreaking
-
Field Details
-
energyPerTick
protected int energyPerTick -
energyCapacity
protected int energyCapacity
-
-
Constructor Details
-
AbstractMachineBlock
@ParametersAreNonnullByDefault protected 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, org.bukkit.inventory.ItemStack[] recipe)
-
-
Method Details
-
tick
@ParametersAreNonnullByDefault protected void tick(org.bukkit.block.Block b, me.mrCookieSlime.Slimefun.api.inventory.BlockMenu menu) - Specified by:
tickin classTickingMenuBlock
-
process
protected abstract boolean process(org.bukkit.block.Block b, me.mrCookieSlime.Slimefun.api.inventory.BlockMenu menu) -
getStatusSlot
protected abstract int getStatusSlot() -
getNoEnergyItem
protected abstract org.bukkit.inventory.ItemStack getNoEnergyItem() -
getCapacity
public final int getCapacity()- Specified by:
getCapacityin interfaceio.github.thebusybiscuit.slimefun4.core.attributes.EnergyNetComponent
-
getEnergyComponentType
@Nonnull public final io.github.thebusybiscuit.slimefun4.core.networks.energy.EnergyNetComponentType getEnergyComponentType()- Specified by:
getEnergyComponentTypein interfaceio.github.thebusybiscuit.slimefun4.core.attributes.EnergyNetComponent
-
register
public final void register(@Nonnull io.github.thebusybiscuit.slimefun4.api.SlimefunAddon addon) - Overrides:
registerin classio.github.thebusybiscuit.slimefun4.api.items.SlimefunItem
-
setEnergyPerTick
public void setEnergyPerTick(int energyPerTick) -
setEnergyCapacity
public void setEnergyCapacity(int energyCapacity)
-