Class CargoMeter

java.lang.Object
io.github.pylonmc.rebar.block.RebarBlock
io.github.pylonmc.pylon.content.machines.cargo.CargoMeter
All Implemented Interfaces:
io.github.pylonmc.rebar.block.base.RebarBreakHandler, io.github.pylonmc.rebar.block.base.RebarCargoBlock, io.github.pylonmc.rebar.block.base.RebarDirectionalBlock, io.github.pylonmc.rebar.block.base.RebarEntityHolderBlock, io.github.pylonmc.rebar.block.base.RebarInventoryBlock, io.github.pylonmc.rebar.block.base.RebarLogisticBlock, io.github.pylonmc.rebar.block.base.RebarNoVanillaInventoryBlock, io.github.pylonmc.rebar.block.base.RebarTickingBlock, io.github.pylonmc.rebar.block.base.RebarVanillaInventoryBlock, io.github.pylonmc.rebar.block.base.RebarVirtualInventoryBlock, net.kyori.adventure.key.Keyed, org.bukkit.Keyed

public class CargoMeter extends io.github.pylonmc.rebar.block.RebarBlock implements io.github.pylonmc.rebar.block.base.RebarDirectionalBlock, io.github.pylonmc.rebar.block.base.RebarInventoryBlock, io.github.pylonmc.rebar.block.base.RebarVirtualInventoryBlock, io.github.pylonmc.rebar.block.base.RebarCargoBlock, io.github.pylonmc.rebar.block.base.RebarTickingBlock
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
     
    class 
     

    Nested classes/interfaces inherited from class io.github.pylonmc.rebar.block.RebarBlock

    io.github.pylonmc.rebar.block.RebarBlock.Companion

    Nested classes/interfaces inherited from interface io.github.pylonmc.rebar.block.base.RebarCargoBlock

    io.github.pylonmc.rebar.block.base.RebarCargoBlock.Companion

    Nested classes/interfaces inherited from interface io.github.pylonmc.rebar.block.base.RebarDirectionalBlock

    io.github.pylonmc.rebar.block.base.RebarDirectionalBlock.Companion

    Nested classes/interfaces inherited from interface io.github.pylonmc.rebar.block.base.RebarInventoryBlock

    io.github.pylonmc.rebar.block.base.RebarInventoryBlock.Companion

    Nested classes/interfaces inherited from interface io.github.pylonmc.rebar.block.base.RebarTickingBlock

    io.github.pylonmc.rebar.block.base.RebarTickingBlock.Companion

    Nested classes/interfaces inherited from interface io.github.pylonmc.rebar.block.base.RebarVirtualInventoryBlock

    io.github.pylonmc.rebar.block.base.RebarVirtualInventoryBlock.Companion
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    final io.github.pylonmc.rebar.item.builder.ItemStackBuilder
     
    final io.github.pylonmc.rebar.item.builder.ItemStackBuilder
     
    final int
     
    static final org.bukkit.NamespacedKey
     
    final int
     
    static final org.bukkit.NamespacedKey
     
    final io.github.pylonmc.rebar.item.builder.ItemStackBuilder
     
    final io.github.pylonmc.rebar.item.builder.ItemStackBuilder
     
    final io.github.pylonmc.rebar.item.builder.ItemStackBuilder
     
    final io.github.pylonmc.rebar.item.builder.ItemStackBuilder
     
    final int
     

    Fields inherited from class io.github.pylonmc.rebar.block.RebarBlock

    Companion

    Fields inherited from interface io.github.pylonmc.rebar.block.base.RebarCargoBlock

    Companion

    Fields inherited from interface io.github.pylonmc.rebar.block.base.RebarDirectionalBlock

    Companion

    Fields inherited from interface io.github.pylonmc.rebar.block.base.RebarInventoryBlock

    Companion

    Fields inherited from interface io.github.pylonmc.rebar.block.base.RebarTickingBlock

    Companion

    Fields inherited from interface io.github.pylonmc.rebar.block.base.RebarVirtualInventoryBlock

    Companion
  • Constructor Summary

    Constructors
    Constructor
    Description
    CargoMeter(@NotNull org.bukkit.block.Block block, @NotNull io.github.pylonmc.rebar.block.context.BlockCreateContext context)
     
    CargoMeter(@NotNull org.bukkit.block.Block block, @NotNull org.bukkit.persistence.PersistentDataContainer pdc)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    @NotNull xyz.xenondevs.invui.gui.Gui
     
    static Duration
    getDuration(int numberOfMeasurements)
     
    @NotNull Map<String, xyz.xenondevs.invui.inventory.VirtualInventory>
     
    @Nullable io.github.pylonmc.rebar.waila.WailaDisplay
    getWaila(@NotNull org.bukkit.entity.Player player)
     
    void
     
    void
     
    void
    write(@NotNull org.bukkit.persistence.PersistentDataContainer pdc)
     

    Methods inherited from class io.github.pylonmc.rebar.block.RebarBlock

    getBlock, getBlockTextureEntity, getBlockTextureItem, getBlockTextureProperties, getDefaultItem, getDefaultWailaTranslationKey, getDisableBlockTextureEntity, getDropItem, getKey, getLoreTranslationKey, getNameTranslationKey, getPickItem, getRebarBlock, getRebarBlockKeyKey, getRebarBlockPositionKey, getRebarBlockTextureEntityKey, getSchema, getSettings, isVanillaBlock, postLoad, refreshBlockTextureItem, register, scheduleBlockTextureItemRefresh, setDisableBlockTextureEntity, setupBlockTexture, writeDebugInfo

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.bukkit.Keyed

    getKey, key

    Methods inherited from interface io.github.pylonmc.rebar.block.base.RebarBreakHandler

    postBreak, preBreak

    Methods inherited from interface io.github.pylonmc.rebar.block.base.RebarCargoBlock

    addCargoLogisticGroup, getCargoLogisticGroup, getCargoLogisticGroups, getCargoTransferRate, onDuctConnected, onDuctDisconnected, removeCargoLogisticGroup, setCargoTransferRate, tickCargo, tickCargoFace, updateDirectlyConnectedFaces

    Methods inherited from interface io.github.pylonmc.rebar.block.base.RebarDirectionalBlock

    getFacing, setFacing

    Methods inherited from interface io.github.pylonmc.rebar.block.base.RebarEntityHolderBlock

    addEntity, addEntity, areAllHeldEntitiesLoaded, getBlock, getHeldEntities, getHeldEntity, getHeldEntity, getHeldEntityOrThrow, getHeldEntityOrThrow, getHeldEntityUuid, getHeldEntityUuidOrThrow, getHeldRebarEntity, getHeldRebarEntity, getHeldRebarEntityOrThrow, isHeldEntityPresent, tryRemoveAllEntities, tryRemoveEntity, whenHeldRebarEntityLoads, whenHeldRebarEntityLoads

    Methods inherited from interface io.github.pylonmc.rebar.block.base.RebarInventoryBlock

    getGuiTitle

    Methods inherited from interface io.github.pylonmc.rebar.block.base.RebarLogisticBlock

    createLogisticGroup, createLogisticGroup, createLogisticGroup, createLogisticGroup, getBlock, getLogisticGroup, getLogisticGroupOrThrow, getLogisticGroups

    Methods inherited from interface io.github.pylonmc.rebar.block.base.RebarNoVanillaInventoryBlock

    onInventoryOpen, onItemMoveFrom, onItemMoveTo

    Methods inherited from interface io.github.pylonmc.rebar.block.base.RebarTickingBlock

    getTickInterval, isAsync, setAsync, setTickInterval

    Methods inherited from interface io.github.pylonmc.rebar.block.base.RebarVirtualInventoryBlock

    onBreak
  • Field Details

    • MEASUREMENTS_KEY

      public static final org.bukkit.NamespacedKey MEASUREMENTS_KEY
    • NUMBER_OF_MEASUREMENTS_KEY

      public static final org.bukkit.NamespacedKey NUMBER_OF_MEASUREMENTS_KEY
    • transferRate

      public final int transferRate
    • minNumberOfMeasurements

      public final int minNumberOfMeasurements
    • maxNumberOfMeasurements

      public final int maxNumberOfMeasurements
    • mainStack

      public final io.github.pylonmc.rebar.item.builder.ItemStackBuilder mainStack
    • side1Stack

      public final io.github.pylonmc.rebar.item.builder.ItemStackBuilder side1Stack
    • side2Stack

      public final io.github.pylonmc.rebar.item.builder.ItemStackBuilder side2Stack
    • inputStack

      public final io.github.pylonmc.rebar.item.builder.ItemStackBuilder inputStack
    • outputStack

      public final io.github.pylonmc.rebar.item.builder.ItemStackBuilder outputStack
    • projectorStack

      public final io.github.pylonmc.rebar.item.builder.ItemStackBuilder projectorStack
  • Constructor Details

    • CargoMeter

      public CargoMeter(@NotNull @NotNull org.bukkit.block.Block block, @NotNull @NotNull io.github.pylonmc.rebar.block.context.BlockCreateContext context)
    • CargoMeter

      public CargoMeter(@NotNull @NotNull org.bukkit.block.Block block, @NotNull @NotNull org.bukkit.persistence.PersistentDataContainer pdc)
  • Method Details

    • write

      public void write(@NotNull @NotNull org.bukkit.persistence.PersistentDataContainer pdc)
      Overrides:
      write in class io.github.pylonmc.rebar.block.RebarBlock
    • postInitialise

      public void postInitialise()
      Overrides:
      postInitialise in class io.github.pylonmc.rebar.block.RebarBlock
    • createGui

      @NotNull public @NotNull xyz.xenondevs.invui.gui.Gui createGui()
      Specified by:
      createGui in interface io.github.pylonmc.rebar.block.base.RebarInventoryBlock
    • tick

      public void tick()
      Specified by:
      tick in interface io.github.pylonmc.rebar.block.base.RebarTickingBlock
    • getWaila

      @Nullable public @Nullable io.github.pylonmc.rebar.waila.WailaDisplay getWaila(@NotNull @NotNull org.bukkit.entity.Player player)
      Overrides:
      getWaila in class io.github.pylonmc.rebar.block.RebarBlock
    • getVirtualInventories

      @NotNull public @NotNull Map<String, xyz.xenondevs.invui.inventory.VirtualInventory> getVirtualInventories()
      Specified by:
      getVirtualInventories in interface io.github.pylonmc.rebar.block.base.RebarVirtualInventoryBlock
    • getDuration

      public static Duration getDuration(int numberOfMeasurements)