Class TBlockStateElement
java.lang.Object
com.thecsdev.common.scene.Node<TElement>
com.thecsdev.commonmc.api.client.gui.TElement
com.thecsdev.commonmc.api.client.gui.misc.TBlockStateElement
- All Implemented Interfaces:
INode<TElement>, INodeBounded<TElement,Bounds2i>, INodeRenderable<TElement, TGuiGraphics>, Iterable<TElement>, Collection<TElement>
-
Field Summary
Fields inherited from class TElement
eInitialized -
Constructor Summary
ConstructorsConstructorDescriptionTBlockStateElement(@Nullable net.minecraft.world.level.block.state.BlockState blockState) -
Method Summary
Modifier and TypeMethodDescriptionfinal NotNullProperty<net.minecraft.world.level.block.state.BlockState> Returns theNotNullPropertyholding theBlockStatethat is to be rendered by thisTBlockStateElement.static final booleanisAir(@NotNull net.minecraft.world.level.block.Block block) Returnstrueif aBlockis an instance ofAirBlock.final voidrenderCallback(@NotNull TGuiGraphics pencil) Callback method that is invoked when thisNodeis being rendered.final BooleanPropertyIf set totrue, theBlockState's corresponding defaultItemStackwill be rendered where possible (similar toTItemStackElement).Methods inherited from class TElement
addRel, boundsProperty, clearAndInit, clipsDescendantsProperty, contextMenuProperty, dragEndCallback, dragStartCallback, findElementAt, focusableProperty, focusGainedCallback, focusLostCallback, forEachVisible, getBaseType, getBounds, getClient, getContentBounds, getCursor, getSelf, getTooltip, hoverableProperty, hoverGainedCallback, hoverLostCallback, initCallback, inputCallback, invalidateTooltipCache, isFocusable, isFocused, isHoverable, isHovered, isHoveredOrFocused, isVisible, move, moveChildren, moveTo, postRenderCallback, removeRel, screenProperty, setBounds, setBounds, setBounds, showContextMenu, tickCallback, tooltipProperty, toString, visiblePropertyMethods inherited from class Node
add, addAll, childAddedCallback, childRemovedCallback, clear, contains, containsAll, equals, findChild, findParent, findSibling, forEach, get, getFirst, getLast, getParent, hashCode, indexOf, isEmpty, iterator, parentProperty, remove, remove, remove, removeAll, retainAll, rootProperty, size, toArray, toArray
-
Constructor Details
-
TBlockStateElement
public TBlockStateElement() -
TBlockStateElement
public TBlockStateElement(@Nullable @Nullable net.minecraft.world.level.block.state.BlockState blockState)
-
-
Method Details
-
blockStateProperty
Returns theNotNullPropertyholding theBlockStatethat is to be rendered by thisTBlockStateElement. -
renderItemStackProperty
If set totrue, theBlockState's corresponding defaultItemStackwill be rendered where possible (similar toTItemStackElement). Otherwise, only theBlockState's sprite will be rendered. -
renderCallback
Description copied from interface:INodeRenderableCallback method that is invoked when thisNodeis being rendered.- Specified by:
renderCallbackin interfaceINodeRenderable<TElement, TGuiGraphics>- Overrides:
renderCallbackin classTElement- Parameters:
pencil- The rendering context.
-
isAir
public static final boolean isAir(@NotNull @NotNull net.minecraft.world.level.block.Block block) Returnstrueif aBlockis an instance ofAirBlock. This includes regular air, cave air, and void air.Note: This does NOT include structure void, as that is not air.
-