Class MenuBlock
java.lang.Object
io.github.thebusybiscuit.slimefun5.api.items.SlimefunItem
com.github.relativobr.supreme.libs.guizhanlib.slimefun.machines.MenuBlock
- All Implemented Interfaces:
io.github.thebusybiscuit.slimefun5.core.attributes.Placeable
- Direct Known Subclasses:
EnergyGenerator
@ParametersAreNonnullByDefault
public abstract class MenuBlock
extends io.github.thebusybiscuit.slimefun5.api.items.SlimefunItem
A
MenuBlock is a SlimefunItem with MenuBlockPreset.
Vendored Java-8-safe port of GuizhanLib 0.9.0's MenuBlock (itself "Modified from
InfinityLib"): the upstream jar is class-file version 60 (Java 16) and cannot be read by a
Java-8 javac as a compile dependency, so this single Slimefun-facing class Supreme depended on
is vendored directly instead. Only the API package was migrated (slimefun4 -> slimefun5); the
logic is unchanged from upstream.
-
Field Summary
Fields inherited from class io.github.thebusybiscuit.slimefun5.api.items.SlimefunItem
addon, disenchantable, enchantable, hidden, recipeOutput, useableInWorkbench -
Constructor Summary
ConstructorsConstructorDescriptionMenuBlock(io.github.thebusybiscuit.slimefun5.api.items.ItemGroup itemGroup, io.github.thebusybiscuit.slimefun5.api.items.SlimefunItemStack item, io.github.thebusybiscuit.slimefun5.api.recipes.RecipeType recipeType, org.bukkit.inventory.ItemStack[] recipe) Constructor ofMenuBlock. -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract int[]protected int[]getInputSlots(me.mrCookieSlime.Slimefun.api.inventory.DirtyChestMenu menu, org.bukkit.inventory.ItemStack item) protected abstract int[]protected final int[]getTransportSlots(me.mrCookieSlime.Slimefun.api.inventory.DirtyChestMenu menu, me.mrCookieSlime.Slimefun.api.item_transport.ItemTransportFlow flow, org.bukkit.inventory.ItemStack item) protected voidonBreak(org.bukkit.event.block.BlockBreakEvent e, me.mrCookieSlime.Slimefun.api.inventory.BlockMenu menu) protected voidonNewInstance(me.mrCookieSlime.Slimefun.api.inventory.BlockMenu menu, org.bukkit.block.Block b) protected voidonPlace(org.bukkit.event.block.BlockPlaceEvent e, org.bukkit.block.Block b) final voidprotected abstract voidsetup(me.mrCookieSlime.Slimefun.api.inventory.BlockMenuPreset preset) Methods inherited from class io.github.thebusybiscuit.slimefun5.api.items.SlimefunItem
addItemHandler, addItemSetting, addOfficialWikipage, bakeTranslatedDisplay, callItemHandler, canUse, decorateBakedTemplate, equals, error, getAddon, getBlockTicker, getById, getByItem, getByItem, getDrops, getDrops, getGuideType, 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, register, sendDeprecationWarning, setGuideType, setHidden, setItemGroup, setRecipe, setRecipeOutput, setRecipeType, setResearch, setUseableInWorkbench, setWikiText, toString, warnMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface io.github.thebusybiscuit.slimefun5.core.attributes.Placeable
useVanillaBlockBreaking
-
Constructor Details
-
MenuBlock
public MenuBlock(io.github.thebusybiscuit.slimefun5.api.items.ItemGroup itemGroup, io.github.thebusybiscuit.slimefun5.api.items.SlimefunItemStack item, io.github.thebusybiscuit.slimefun5.api.recipes.RecipeType recipeType, org.bukkit.inventory.ItemStack[] recipe) Constructor ofMenuBlock. Add events on break and place
-
-
Method Details
-
postRegister
public final void postRegister()- Overrides:
postRegisterin classio.github.thebusybiscuit.slimefun5.api.items.SlimefunItem
-
setup
protected abstract void setup(me.mrCookieSlime.Slimefun.api.inventory.BlockMenuPreset preset) -
getTransportSlots
@Nonnull protected final int[] getTransportSlots(me.mrCookieSlime.Slimefun.api.inventory.DirtyChestMenu menu, me.mrCookieSlime.Slimefun.api.item_transport.ItemTransportFlow flow, org.bukkit.inventory.ItemStack item) -
getInputSlots
protected int[] getInputSlots(me.mrCookieSlime.Slimefun.api.inventory.DirtyChestMenu menu, org.bukkit.inventory.ItemStack item) -
getInputSlots
protected abstract int[] getInputSlots() -
getOutputSlots
protected abstract int[] getOutputSlots() -
onNewInstance
protected void onNewInstance(me.mrCookieSlime.Slimefun.api.inventory.BlockMenu menu, org.bukkit.block.Block b) -
onBreak
protected void onBreak(org.bukkit.event.block.BlockBreakEvent e, me.mrCookieSlime.Slimefun.api.inventory.BlockMenu menu) -
onPlace
protected void onPlace(org.bukkit.event.block.BlockPlaceEvent e, org.bukkit.block.Block b)
-