java.lang.Object
com.simibubi.create.compat.computercraft.implementation.peripherals.SyncedPeripheral<T>
All Implemented Interfaces:
dan200.computercraft.api.peripheral.IPeripheral
Direct Known Subclasses:
CreativeMotorPeripheral, DisplayLinkPeripheral, FrogportPeripheral, NixieTubePeripheral, PackagerPeripheral, PostboxPeripheral, RedstoneRequesterPeripheral, RepackagerPeripheral, SequencedGearshiftPeripheral, SignalPeripheral, SpeedControllerPeripheral, SpeedGaugePeripheral, StationPeripheral, StickerPeripheral, StockTickerPeripheral, StressGaugePeripheral, TableClothShopPeripheral, TrackObserverPeripheral

public abstract class SyncedPeripheral<T extends SmartBlockEntity> extends Object implements dan200.computercraft.api.peripheral.IPeripheral
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final T
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    SyncedPeripheral(T blockEntity)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    attach(@NotNull dan200.computercraft.api.peripheral.IComputerAccess computer)
     
    void
    detach(@NotNull dan200.computercraft.api.peripheral.IComputerAccess computer)
     
    boolean
    equals(@Nullable dan200.computercraft.api.peripheral.IPeripheral other)
     
    protected void
     
    protected void
     
    void
     
    protected void
    queueEvent(@NotNull String event, @Nullable Object... arguments)
    Queue an event to all attached computers.

    Methods inherited from class java.lang.Object

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

    Methods inherited from interface dan200.computercraft.api.peripheral.IPeripheral

    getAdditionalTypes, getTarget, getType
  • Field Details

  • Constructor Details

    • SyncedPeripheral

      public SyncedPeripheral(T blockEntity)
  • Method Details

    • attach

      public void attach(@NotNull @NotNull dan200.computercraft.api.peripheral.IComputerAccess computer)
      Specified by:
      attach in interface dan200.computercraft.api.peripheral.IPeripheral
    • onFirstAttach

      protected void onFirstAttach()
    • detach

      public void detach(@NotNull @NotNull dan200.computercraft.api.peripheral.IComputerAccess computer)
      Specified by:
      detach in interface dan200.computercraft.api.peripheral.IPeripheral
    • onLastDetach

      protected void onLastDetach()
    • equals

      public boolean equals(@Nullable @Nullable dan200.computercraft.api.peripheral.IPeripheral other)
      Specified by:
      equals in interface dan200.computercraft.api.peripheral.IPeripheral
    • prepareComputerEvent

      public void prepareComputerEvent(@NotNull @NotNull ComputerEvent event)
    • queueEvent

      protected void queueEvent(@NotNull @NotNull String event, @Nullable @Nullable Object... arguments)
      Queue an event to all attached computers. Adds the peripheral attachment name as 1st event argument, followed by any optional arguments passed to this method.