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
fuelTypesFields inherited from class io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem
addon, disenchantable, enchantable, hidden, recipeOutput, useableInWorkbench -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedReactor(ItemGroup itemGroup, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe) -
Method Summary
Modifier and TypeMethodDescriptionabstract voidprotected BlockMenuabstract ItemStackint[]abstract ItemStackThis method returns the displayed icon above the fuel input slot.int[]intgetGeneratedOutput(Location l, Config data) This method returns how much energy thisEnergyNetProviderprovides to theEnergyNet.int[]This method returns ourMachineProcessorinstance.int[]protected ReactorModeprotected final booleanThis method returns whether thisReactorrequires as some form of coolant.protected voidupdateInventory(BlockMenu menu, Block b) booleanwillExplode(Location l, Config data) This method returns whether the givenLocationis 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, registerFuelMethods 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, 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, getCapacity, getCharge, getCharge, isChargeable, removeCharge, setChargeMethods inherited from interface io.github.thebusybiscuit.slimefun4.core.attributes.HologramOwner
getHologramOffset, removeHologram, updateHologramMethods inherited from interface me.mrCookieSlime.Slimefun.Objects.SlimefunItem.interfaces.InventoryBlock
createPreset, createPresetMethods inherited from interface io.github.thebusybiscuit.slimefun4.core.attributes.ItemAttribute
getIdMethods inherited from interface io.github.thebusybiscuit.slimefun4.core.attributes.Placeable
useVanillaBlockBreakingMethods 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:MachineProcessHolderThis method returns ourMachineProcessorinstance.- Specified by:
getMachineProcessorin interfaceMachineProcessHolder<FuelOperation>- Returns:
- Our
MachineProcessor
-
updateInventory
-
getReactorMode
-
extraTick
-
getCoolant
-
getFuelIcon
This method returns the displayed icon above the fuel input slot. It should reflect theItemStackused to power the reactor. This method does not determine the fuel input, only the icon. -
needsCooling
protected final boolean needsCooling()This method returns whether thisReactorrequires as some form of coolant. It is a not-null check performed ongetCoolant()- Returns:
- Whether this
Reactorrequires cooling
-
getInputSlots
public int[] getInputSlots()Description copied from interface:InventoryBlock- Specified by:
getInputSlotsin interfaceInventoryBlock- Returns:
- The input slots for the
Inventoryof this block
-
getFuelSlots
public int[] getFuelSlots() -
getCoolantSlots
@Nonnull public int[] getCoolantSlots() -
getOutputSlots
public int[] getOutputSlots()Description copied from interface:InventoryBlock- Specified by:
getOutputSlotsin interfaceInventoryBlock- Returns:
- The output slots for the
Inventoryof this block
-
getGeneratedOutput
Description copied from interface:EnergyNetProviderThis method returns how much energy thisEnergyNetProviderprovides 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:
getGeneratedOutputin interfaceEnergyNetProvider- Parameters:
l- TheLocationof thisEnergyNetProviderdata- The stored block data- Returns:
- The generated output energy of this
EnergyNetProvider.
-
willExplode
Description copied from interface:EnergyNetProviderThis method returns whether the givenLocationis going to explode on the next tick.- Specified by:
willExplodein interfaceEnergyNetProvider- Parameters:
l- TheLocationof thisEnergyNetProviderdata- The stored block data- Returns:
- Whether or not this
Locationwill explode.
-
getAccessPort
-