Class DisplaySource
java.lang.Object
com.simibubi.create.api.behaviour.display.DisplaySource
- Direct Known Subclasses:
BoilerDisplaySource,ComputerDisplaySource,SingleLineDisplaySource,StationSummaryDisplaySource,ValueListDisplaySource
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final SimpleRegistry.Multi<net.minecraft.world.level.block.Block, DisplaySource> static final SimpleRegistry.Multi<net.minecraft.world.level.block.entity.BlockEntityType<?>, DisplaySource> static final List<net.minecraft.network.chat.MutableComponent> static final net.minecraft.network.chat.MutableComponentstatic final net.minecraft.network.chat.MutableComponent -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <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.static @Nullable DisplaySourceget(@Nullable net.minecraft.resources.ResourceLocation id) Get the DisplaySource with the given ID, accounting for legacy names.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.protected final net.minecraft.resources.ResourceLocationgetId()net.minecraft.network.chat.ComponentgetName()intprotected StringvoidinitConfigurationWidgets(DisplayLinkContext context, ModularGuiLineBuilder builder, boolean isFirstLine) voidloadFlapDisplayLayout(DisplayLinkContext context, FlapDisplayBlockEntity flapDisplay, FlapDisplayLayout layout) voidloadFlapDisplayLayout(DisplayLinkContext context, FlapDisplayBlockEntity flapDisplay, FlapDisplayLayout layout, int lineIndex) voidonSignalReset(DisplayLinkContext context) voidpopulateData(DisplayLinkContext context) provideFlapDisplayText(DisplayLinkContext context, DisplayTargetStats stats) abstract List<net.minecraft.network.chat.MutableComponent> provideText(DisplayLinkContext context, DisplayTargetStats stats) booleanvoidtransferData(DisplayLinkContext context, DisplayTarget activeTarget, int line)
-
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
-
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
-
onSignalReset
-
populateData
-
getPassiveRefreshTicks
public int getPassiveRefreshTicks() -
shouldPassiveReset
public boolean shouldPassiveReset() -
getId
protected final net.minecraft.resources.ResourceLocation getId() -
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.
-