InsideStaffBlockStateRenderer

@Environment(value = EnvType.CLIENT)
public abstract class InsideStaffBlockStateRenderer extends StaffBlockStateRenderer(source)

A base class for rendering a BlockState at the default position and scale (that is, "inside" the staff).

Properties

Link copied to clipboard
public final static Vector3f OFFSET

Offset of the staff's block holding space.

Link copied to clipboard
private final Vector3f offset

Gets the offset of the block state to render. Applied after scale.

Link copied to clipboard
public final static Float SCALE

Scale matching the staff's block holding space.

Link copied to clipboard
private final Float scale

Gets the scale of the block state to render. Applied before offset.

Functions

Link copied to clipboard
public final static InsideStaffBlockStateRenderer forBlockItem(BlockItem blockItem)

Returns an InsideStaffBlockStateRenderer, which always renders the default block state of the given BlockItem.

Link copied to clipboard
public final static InsideStaffBlockStateRenderer forBlockState(BlockState blockState)

Returns an InsideStaffBlockStateRenderer, which always renders the given BlockState.

Link copied to clipboard
public Vector3f getOffset()

Gets the offset of the block state to render. Applied after scale.

Link copied to clipboard
public Float getScale()

Gets the scale of the block state to render. Applied before offset.

Inherited functions

Link copied to clipboard
public Unit emitItemQuads(ItemStack staffStack, Supplier<Random> randomSupplier, RenderContext context)

Adds the model of the block added to the staff to the staff model's mesh.

Link copied to clipboard
public abstract BlockState getBlockState(ItemStack staffStack)

Gets the block state to render into the staff.