Class Reactor
java.lang.Object
io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem
io.github.thebusybiscuit.slimefun4.implementation.items.electric.AbstractEnergyProvider
io.github.thebusybiscuit.slimefun4.implementation.items.electric.reactors.Reactor
- All Implemented Interfaces:
EnergyNetComponent
,EnergyNetProvider
,HologramOwner
,ItemAttribute
,MachineProcessHolder<FuelOperation>
,Placeable
,RecipeDisplayItem
,InventoryBlock
- Direct Known Subclasses:
NetherStarReactor
,NuclearReactor
public abstract class Reactor
extends AbstractEnergyProvider
implements HologramOwner, MachineProcessHolder<FuelOperation>
The abstract
Reactor
class is very similar to AGenerator
but is
exclusively used for Reactors.- Author:
- John000708, AlexLander123, TheBusyBiscuit
- See Also:
-
Field Summary
Fields inherited from class io.github.thebusybiscuit.slimefun4.implementation.items.electric.AbstractEnergyProvider
fuelTypes
Fields inherited from class io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem
addon, disenchantable, enchantable, hidden, recipeOutput, useableInWorkbench
-
Constructor Summary
ModifierConstructorDescriptionprotected
Reactor
(ItemGroup itemGroup, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe) -
Method Summary
Modifier and TypeMethodDescriptionabstract void
protected BlockMenu
abstract ItemStack
int[]
abstract ItemStack
This method returns the displayed icon above the fuel input slot.int[]
int
getGeneratedOutput
(Location l, Config data) This method returns how much energy thisEnergyNetProvider
provides to theEnergyNet
.int[]
This method returns ourMachineProcessor
instance.int[]
protected ReactorMode
protected final boolean
This method returns whether thisReactor
requires as some form of coolant.protected void
updateInventory
(BlockMenu menu, Block b) boolean
willExplode
(Location l, Config data) This method returns whether the givenLocation
is going to explode on the next tick.Methods inherited from class io.github.thebusybiscuit.slimefun4.implementation.items.electric.AbstractEnergyProvider
getDisplayRecipes, getEnergyComponentType, getEnergyProduction, getFuelTypes, getInventoryTitle, getLabelLocalPath, getProgressBar, registerDefaultFuelTypes, registerFuel
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.EnergyNetComponent
addCharge, getCapacity, getCharge, getCharge, isChargeable, removeCharge, setCharge
Methods inherited from interface io.github.thebusybiscuit.slimefun4.core.attributes.HologramOwner
getHologramOffset, removeHologram, updateHologram
Methods inherited from interface me.mrCookieSlime.Slimefun.Objects.SlimefunItem.interfaces.InventoryBlock
createPreset, createPreset
Methods inherited from interface io.github.thebusybiscuit.slimefun4.core.attributes.ItemAttribute
getId
Methods inherited from interface io.github.thebusybiscuit.slimefun4.core.attributes.Placeable
useVanillaBlockBreaking
Methods inherited from interface io.github.thebusybiscuit.slimefun4.core.attributes.RecipeDisplayItem
getRecipeSectionLabel
-
Constructor Details
-
Reactor
@ParametersAreNonnullByDefault protected Reactor(ItemGroup itemGroup, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe)
-
-
Method Details
-
getMachineProcessor
Description copied from interface:MachineProcessHolder
This method returns ourMachineProcessor
instance.- Specified by:
getMachineProcessor
in interfaceMachineProcessHolder<FuelOperation>
- Returns:
- Our
MachineProcessor
-
updateInventory
-
getReactorMode
-
extraTick
-
getCoolant
-
getFuelIcon
This method returns the displayed icon above the fuel input slot. It should reflect theItemStack
used to power the reactor. This method does not determine the fuel input, only the icon. -
needsCooling
protected final boolean needsCooling()This method returns whether thisReactor
requires as some form of coolant. It is a not-null check performed ongetCoolant()
- Returns:
- Whether this
Reactor
requires cooling
-
getInputSlots
public int[] getInputSlots()Description copied from interface:InventoryBlock
- Specified by:
getInputSlots
in interfaceInventoryBlock
- Returns:
- The input slots for the
Inventory
of this block
-
getFuelSlots
public int[] getFuelSlots() -
getCoolantSlots
@Nonnull public int[] getCoolantSlots() -
getOutputSlots
public int[] getOutputSlots()Description copied from interface:InventoryBlock
- Specified by:
getOutputSlots
in interfaceInventoryBlock
- Returns:
- The output slots for the
Inventory
of this block
-
getGeneratedOutput
Description copied from interface:EnergyNetProvider
This method returns how much energy thisEnergyNetProvider
provides to theEnergyNet
. We call this method on every tick, so make sure to keep it light and fast. Stored energy does not have to be handled in here.- Specified by:
getGeneratedOutput
in interfaceEnergyNetProvider
- Parameters:
l
- TheLocation
of thisEnergyNetProvider
data
- The stored block data- Returns:
- The generated output energy of this
EnergyNetProvider
.
-
willExplode
Description copied from interface:EnergyNetProvider
This method returns whether the givenLocation
is going to explode on the next tick.- Specified by:
willExplode
in interfaceEnergyNetProvider
- Parameters:
l
- TheLocation
of thisEnergyNetProvider
data
- The stored block data- Returns:
- Whether or not this
Location
will explode.
-
getAccessPort
-