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:
  • Constructor Details

  • Method Details

    • getMachineProcessor

      public MachineProcessor<FuelOperation> getMachineProcessor()
      Description copied from interface: MachineProcessHolder
      This method returns our MachineProcessor instance.
      Specified by:
      getMachineProcessor in interface MachineProcessHolder<FuelOperation>
      Returns:
      Our MachineProcessor
    • updateInventory

      protected void updateInventory(@Nonnull BlockMenu menu, @Nonnull org.bukkit.block.Block b)
    • getReactorMode

      @Nonnull protected ReactorMode getReactorMode(@Nonnull org.bukkit.Location l)
    • extraTick

      public abstract void extraTick(@Nonnull org.bukkit.Location l)
    • getCoolant

      @Nullable public abstract org.bukkit.inventory.ItemStack getCoolant()
      This method returns the ItemStack that is required to cool this Reactor. If it returns null, then no cooling is required.
      Returns:
      The ItemStack required to cool this Reactor
    • getFuelIcon

      @Nonnull public abstract org.bukkit.inventory.ItemStack getFuelIcon()
      This method returns the displayed icon above the fuel input slot. It should reflect the ItemStack used to power the reactor. This method does not determine the fuel input, only the icon.
      Returns:
      The ItemStack used as the fuel icon for this Reactor.
    • needsCooling

      protected final boolean needsCooling()
      This method returns whether this Reactor requires as some form of coolant. It is a not-null check performed on getCoolant()
      Returns:
      Whether this Reactor requires cooling
    • getInputSlots

      public int[] getInputSlots()
      Description copied from interface: InventoryBlock
      This method returns an Array of slots that serve as the input for the Inventory of this block.
      Specified by:
      getInputSlots in interface InventoryBlock
      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
      This method returns an Array of slots that serve as the output for the Inventory of this block.
      Specified by:
      getOutputSlots in interface InventoryBlock
      Returns:
      The output slots for the Inventory of this block
    • getGeneratedOutput

      public int getGeneratedOutput(org.bukkit.Location l, SlimefunBlockData data)
      Description copied from interface: EnergyNetProvider
      This method returns how much energy this EnergyNetProvider provides to the EnergyNet. 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 interface EnergyNetProvider
      Parameters:
      l - The Location of this EnergyNetProvider
      data - The stored block data
      Returns:
      The generated output energy of this EnergyNetProvider.
    • willExplode

      public boolean willExplode(org.bukkit.Location l, SlimefunBlockData data)
      Description copied from interface: EnergyNetProvider
      This method returns whether the given Location is going to explode on the next tick.
      Specified by:
      willExplode in interface EnergyNetProvider
      Parameters:
      l - The Location of this EnergyNetProvider
      data - The stored block data
      Returns:
      Whether or not this Location will explode.
    • getAccessPort

      @Nullable protected BlockMenu getAccessPort(BlockMenu menu, @Nonnull org.bukkit.Location l)