@Environment(value=CLIENT) public class ItemFrameEntityRenderer extends EntityRenderer<ItemFrameEntity>
Modifier and Type | Field and Description |
---|---|
private MinecraftClient |
client |
private ItemRenderer |
itemRenderer |
private static ModelIdentifier |
MAP_FRAME |
private static ModelIdentifier |
NORMAL_FRAME |
dispatcher, shadowOpacity, shadowRadius
Constructor and Description |
---|
ItemFrameEntityRenderer(EntityRenderDispatcher dispatcher,
ItemRenderer itemRenderer) |
Modifier and Type | Method and Description |
---|---|
Vec3d |
getPositionOffset(ItemFrameEntity itemFrameEntity,
float float2) |
Identifier |
getTexture(ItemFrameEntity itemFrameEntity) |
protected boolean |
hasLabel(ItemFrameEntity itemFrameEntity)
Determines whether the passed entity should render with a nameplate above its head.
|
void |
render(ItemFrameEntity itemFrameEntity,
float float2,
float float3,
MatrixStack matrixStack,
VertexConsumerProvider vertexConsumerProvider,
int int2) |
protected void |
renderLabelIfPresent(ItemFrameEntity itemFrameEntity,
Text text,
MatrixStack matrixStack,
VertexConsumerProvider vertexConsumerProvider,
int int2) |
getBlockLight, getFontRenderer, getLight, getRenderManager, method_27950, shouldRender
private static final ModelIdentifier NORMAL_FRAME
private static final ModelIdentifier MAP_FRAME
private final MinecraftClient client
private final ItemRenderer itemRenderer
public ItemFrameEntityRenderer(EntityRenderDispatcher dispatcher, ItemRenderer itemRenderer)
public void render(ItemFrameEntity itemFrameEntity, float float2, float float3, MatrixStack matrixStack, VertexConsumerProvider vertexConsumerProvider, int int2)
render
in class EntityRenderer<ItemFrameEntity>
public Vec3d getPositionOffset(ItemFrameEntity itemFrameEntity, float float2)
getPositionOffset
in class EntityRenderer<ItemFrameEntity>
public Identifier getTexture(ItemFrameEntity itemFrameEntity)
getTexture
in class EntityRenderer<ItemFrameEntity>
protected boolean hasLabel(ItemFrameEntity itemFrameEntity)
EntityRenderer
Checks for a custom nametag on living entities, and for teams/team visibilities for players.
hasLabel
in class EntityRenderer<ItemFrameEntity>
protected void renderLabelIfPresent(ItemFrameEntity itemFrameEntity, Text text, MatrixStack matrixStack, VertexConsumerProvider vertexConsumerProvider, int int2)
renderLabelIfPresent
in class EntityRenderer<ItemFrameEntity>