Class DisplayTarget
java.lang.Object
com.simibubi.create.api.behaviour.display.DisplayTarget
- Direct Known Subclasses:
DisplayBoardTarget,LecternDisplayTarget,SignDisplayTarget,SingleLineDisplayTarget
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final SimpleRegistry<net.minecraft.world.level.block.Block, DisplayTarget> static final SimpleRegistry<net.minecraft.world.level.block.entity.BlockEntityType<?>, DisplayTarget> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract voidacceptText(int line, List<net.minecraft.network.chat.MutableComponent> text, DisplayLinkContext context) static <B extends net.minecraft.world.level.block.Block,P>
com.tterrag.registrate.util.nullness.NonNullUnaryOperator<com.tterrag.registrate.builders.BlockBuilder<B, P>> displayTarget(com.tterrag.registrate.util.entry.RegistryEntry<DisplayTarget, ? extends DisplayTarget> target) Utility for use with Registrate builders.static @Nullable DisplayTargetget(@Nullable net.minecraft.resources.ResourceLocation id) Get the DisplayTarget with the given ID, accounting for legacy names.static @Nullable DisplayTargetget(net.minecraft.world.level.LevelAccessor level, net.minecraft.core.BlockPos pos) Get the DisplayTarget applicable to the given location, or null if there isn't one.net.minecraft.network.chat.ComponentgetLineOptionText(int line) net.minecraft.world.phys.AABBgetMultiblockBounds(net.minecraft.world.level.LevelAccessor level, net.minecraft.core.BlockPos pos) booleanisReserved(int line, net.minecraft.world.level.block.entity.BlockEntity target, DisplayLinkContext context) abstract DisplayTargetStatsprovideStats(DisplayLinkContext context) booleanstatic voidreserve(int line, net.minecraft.world.level.block.entity.BlockEntity target, DisplayLinkContext context)
-
Field Details
-
BY_BLOCK
-
BY_BLOCK_ENTITY
public static final SimpleRegistry<net.minecraft.world.level.block.entity.BlockEntityType<?>,DisplayTarget> BY_BLOCK_ENTITY
-
-
Constructor Details
-
DisplayTarget
public DisplayTarget()
-
-
Method Details
-
acceptText
public abstract void acceptText(int line, List<net.minecraft.network.chat.MutableComponent> text, DisplayLinkContext context) -
provideStats
-
getMultiblockBounds
public net.minecraft.world.phys.AABB getMultiblockBounds(net.minecraft.world.level.LevelAccessor level, net.minecraft.core.BlockPos pos) -
getLineOptionText
public net.minecraft.network.chat.Component getLineOptionText(int line) -
reserve
public static void reserve(int line, net.minecraft.world.level.block.entity.BlockEntity target, DisplayLinkContext context) -
isReserved
public boolean isReserved(int line, net.minecraft.world.level.block.entity.BlockEntity target, DisplayLinkContext context) -
requiresComponentSanitization
public boolean requiresComponentSanitization() -
displayTarget
public static <B extends net.minecraft.world.level.block.Block,P> com.tterrag.registrate.util.nullness.NonNullUnaryOperator<com.tterrag.registrate.builders.BlockBuilder<B,P>> displayTarget(com.tterrag.registrate.util.entry.RegistryEntry<DisplayTarget, ? extends DisplayTarget> target) Utility for use with Registrate builders. Creates a builder transformer that will register the given DisplayTarget to a block when ready. -
get
@Nullable public static @Nullable DisplayTarget get(@Nullable @Nullable net.minecraft.resources.ResourceLocation id) Get the DisplayTarget with the given ID, accounting for legacy names. -
get
@Nullable public static @Nullable DisplayTarget get(net.minecraft.world.level.LevelAccessor level, net.minecraft.core.BlockPos pos) Get the DisplayTarget applicable to the given location, or null if there isn't one.
-