All Implemented Interfaces:
org.kingdoms.abstraction.LandOperator, FuelContainer

public class Extractor extends Structure implements FuelContainer
  • Constructor Details

  • Method Details

    • getLastCollected

      public long getLastCollected()
    • setLastCollected

      public void setLastCollected(long lastCollected)
    • getLastCollector

      public UUID getLastCollector()
    • setLastCollector

      public void setLastCollector(UUID lastCollector)
    • setCollected

      public void setCollected(long collected)
    • getFuel

      public double getFuel()
      Specified by:
      getFuel in interface FuelContainer
    • setFuel

      public void setFuel(double fuel)
      Specified by:
      setFuel in interface FuelContainer
    • getMaxFuel

      public double getMaxFuel()
      Specified by:
      getMaxFuel in interface FuelContainer
    • remove

      public KingdomItemBreakEvent<?> remove(org.kingdoms.events.items.KingdomItemRemoveContext context)
      Overrides:
      remove in class Structure
    • estimateRemaining

      public Pair<Long,Long> estimateRemaining()
      Estimates the remaining resource points this extractor can generate with the fuel it has left.
      • It considers external fuel sources such as hoppers if possible.
      • It ignores the capcity of the extractor.
      • It ignores the fuel.enabled option.
      Returns:
      The key represents the resource points it can generate and the value represenets the time in ms until it runs out of fuel and
    • getCollectedResourcePoints

      public long getCollectedResourcePoints()
    • getAttachedHoppers

      public CompletableFuture<List<org.bukkit.block.Hopper>> getAttachedHoppers()
    • getTotalFuelFromAttachedHoppers

      public long getTotalFuelFromAttachedHoppers()
    • fillFuelFromAttachedHoppers

      public void fillFuelFromAttachedHoppers()
    • getEdits

      public MessageBuilder getEdits(Kingdom kingdom)
      Overrides:
      getEdits in class Structure
    • getMaxFuel

      public double getMaxFuel(Kingdom kingdom, int level)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class KingdomItem<StructureStyle>
    • collect

      public long collect(@Nullable KingdomPlayer kp)
    • collect

      public long collect(@Nullable UUID id)
    • serialize

      public void serialize(SerializationContext<org.kingdoms.data.database.dataprovider.SectionableDataSetter> context)
      Overrides:
      serialize in class Structure
    • getTags

      public Pair<org.bukkit.inventory.ItemStack,NBTTagCompound> getTags()
      Overrides:
      getTags in class Structure
    • setDataFromNBT

      public void setDataFromNBT(NBTTagCompound tag)
      Overrides:
      setDataFromNBT in class Structure