Class DisplaySource

java.lang.Object
com.simibubi.create.api.behaviour.display.DisplaySource
Direct Known Subclasses:
BoilerDisplaySource, ComputerDisplaySource, SingleLineDisplaySource, StationSummaryDisplaySource, ValueListDisplaySource

public abstract class DisplaySource extends Object
  • Field Details

    • BY_BLOCK

      public static final SimpleRegistry.Multi<net.minecraft.world.level.block.Block,DisplaySource> BY_BLOCK
    • BY_BLOCK_ENTITY

      public static final SimpleRegistry.Multi<net.minecraft.world.level.block.entity.BlockEntityType<?>,DisplaySource> BY_BLOCK_ENTITY
    • EMPTY

      public static final List<net.minecraft.network.chat.MutableComponent> EMPTY
    • EMPTY_LINE

      public static final net.minecraft.network.chat.MutableComponent EMPTY_LINE
    • WHITESPACE

      public static final net.minecraft.network.chat.MutableComponent WHITESPACE
  • Constructor Details

    • DisplaySource

      public DisplaySource()
  • Method Details

    • provideText

      public abstract List<net.minecraft.network.chat.MutableComponent> provideText(DisplayLinkContext context, DisplayTargetStats stats)
    • transferData

      public void transferData(DisplayLinkContext context, DisplayTarget activeTarget, int line)
    • onSignalReset

      public void onSignalReset(DisplayLinkContext context)
    • populateData

      public void populateData(DisplayLinkContext context)
    • getPassiveRefreshTicks

      public int getPassiveRefreshTicks()
    • shouldPassiveReset

      public boolean shouldPassiveReset()
    • getId

      protected final net.minecraft.resources.ResourceLocation getId()
    • getTranslationKey

      protected String getTranslationKey()
    • getName

      public net.minecraft.network.chat.Component getName()
    • loadFlapDisplayLayout

      public void loadFlapDisplayLayout(DisplayLinkContext context, FlapDisplayBlockEntity flapDisplay, FlapDisplayLayout layout, int lineIndex)
    • loadFlapDisplayLayout

      public void loadFlapDisplayLayout(DisplayLinkContext context, FlapDisplayBlockEntity flapDisplay, FlapDisplayLayout layout)
    • provideFlapDisplayText

      public List<List<net.minecraft.network.chat.MutableComponent>> provideFlapDisplayText(DisplayLinkContext context, DisplayTargetStats stats)
    • initConfigurationWidgets

      public void initConfigurationWidgets(DisplayLinkContext context, ModularGuiLineBuilder builder, boolean isFirstLine)
    • displaySource

      public static <B extends net.minecraft.world.level.block.Block, P> com.tterrag.registrate.util.nullness.NonNullUnaryOperator<com.tterrag.registrate.builders.BlockBuilder<B,P>> displaySource(com.tterrag.registrate.util.entry.RegistryEntry<DisplaySource,? extends DisplaySource> source)
      Utility for use with Registrate builders. Creates a builder transformer that will register the given DisplaySource to a block when ready.
    • get

      @Nullable public static @Nullable DisplaySource get(@Nullable @Nullable net.minecraft.resources.ResourceLocation id)
      Get the DisplaySource with the given ID, accounting for legacy names.
    • getAll

      public static List<DisplaySource> getAll(net.minecraft.world.level.LevelAccessor level, net.minecraft.core.BlockPos pos)
      Get all DisplaySources applicable to the block at the given location, checking both the Block and BlockEntity. Returns an empty list if none are present, not null.