StaffBlockStateRenderer

@Environment(value = EnvType.CLIENT)
public abstract class StaffBlockStateRenderer implements IStaffItemRenderer(source)

A base class for rendering a BlockState at a specific position and scale.

Inheritors

Constructors

Types

Link copied to clipboard
@Environment(value = EnvType.CLIENT)
public final class Transformation implements RenderContext.QuadTransform

A RenderContext.QuadTransform, which scales each quad to scale, and then offsets them by offset.

Properties

Link copied to clipboard
private final Vector3fc offset

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

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 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.

Link copied to clipboard
public abstract Vector3fc getOffset()

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

Link copied to clipboard
public abstract Float getScale()

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

Link copied to clipboard
protected final static Void throwInvalidRenderTypeException(BlockState state)