Class EntityRenderDispatcher
java.lang.Object
net.minecraft.client.render.entity.EntityRenderDispatcher
@Environment(CLIENT) public class EntityRenderDispatcher extends Object
-
Field Summary
Fields Modifier and Type Field Description Camera
camera
GameOptions
gameOptions
private Map<String,PlayerEntityRenderer>
modelRenderers
private PlayerEntityRenderer
playerRenderer
private Map<EntityType<?>,EntityRenderer<?>>
renderers
private boolean
renderHitboxes
private boolean
renderShadows
private Quaternion
rotation
private static RenderLayer
SHADOW_LAYER
Entity
targetedEntity
private TextRenderer
textRenderer
TextureManager
textureManager
private World
world
-
Constructor Summary
Constructors Constructor Description EntityRenderDispatcher(TextureManager textureManager, ItemRenderer itemRenderer, ReloadableResourceManager reloadableResourceManager, TextRenderer textRenderer, GameOptions gameOptions)
-
Method Summary
Modifier and Type Method Description void
configure(World world, Camera camera, Entity target)
private void
drawBox(MatrixStack matrix, VertexConsumer vertices, Entity entity, float red, float green, float blue)
private static void
drawFireVertex(MatrixStack.Entry entry, VertexConsumer vertices, float x, float y, float z, float u, float v)
private static void
drawShadowVertex(MatrixStack.Entry entry, VertexConsumer vertices, float alpha, float x, float y, float z, float u, float v)
<E extends Entity>
intgetLight(E entity, float tickDelta)
<T extends Entity>
EntityRenderer<? super T>getRenderer(T entity)
Quaternion
getRotation()
double
getSquaredDistanceToCamera(double x, double y, double z)
double
getSquaredDistanceToCamera(Entity entity)
TextRenderer
getTextRenderer()
private <T extends Entity>
voidregister(EntityType<T> entityType, EntityRenderer<? super T> entityRenderer)
private void
registerRenderers(ItemRenderer itemRenderer, ReloadableResourceManager reloadableResourceManager)
<E extends Entity>
voidrender(E entity, double x, double y, double z, float yaw, float tickDelta, MatrixStack matrices, VertexConsumerProvider vertexConsumers, int light)
private void
renderFire(MatrixStack matrices, VertexConsumerProvider vertexConsumers, Entity entity)
private void
renderHitbox(MatrixStack matrices, VertexConsumer vertices, Entity entity, float tickDelta)
private static void
renderShadow(MatrixStack matrices, VertexConsumerProvider vertexConsumers, Entity entity, float opacity, float tickDelta, WorldView world, float radius)
private static void
renderShadowPart(MatrixStack.Entry entry, VertexConsumer vertices, WorldView world, BlockPos pos, double x, double y, double z, float radius, float opacity)
void
setRenderHitboxes(boolean value)
void
setRenderShadows(boolean value)
void
setRotation(Quaternion rotation)
void
setWorld(World world)
<E extends Entity>
booleanshouldRender(E entity, Frustum frustum, double x, double y, double z)
boolean
shouldRenderHitboxes()
-
Field Details
-
SHADOW_LAYER
-
renderers
-
modelRenderers
-
playerRenderer
-
textRenderer
-
textureManager
-
world
-
camera
-
rotation
-
targetedEntity
-
gameOptions
-
renderShadows
private boolean renderShadows -
renderHitboxes
private boolean renderHitboxes
-
-
Constructor Details
-
EntityRenderDispatcher
public EntityRenderDispatcher(TextureManager textureManager, ItemRenderer itemRenderer, ReloadableResourceManager reloadableResourceManager, TextRenderer textRenderer, GameOptions gameOptions)
-
-
Method Details
-
getLight
-
register
private <T extends Entity> void register(EntityType<T> entityType, EntityRenderer<? super T> entityRenderer) -
registerRenderers
private void registerRenderers(ItemRenderer itemRenderer, ReloadableResourceManager reloadableResourceManager) -
getRenderer
-
configure
-
setRotation
-
setRenderShadows
public void setRenderShadows(boolean value) -
setRenderHitboxes
public void setRenderHitboxes(boolean value) -
shouldRenderHitboxes
public boolean shouldRenderHitboxes() -
shouldRender
-
render
public <E extends Entity> void render(E entity, double x, double y, double z, float yaw, float tickDelta, MatrixStack matrices, VertexConsumerProvider vertexConsumers, int light) -
renderHitbox
private void renderHitbox(MatrixStack matrices, VertexConsumer vertices, Entity entity, float tickDelta) -
drawBox
private void drawBox(MatrixStack matrix, VertexConsumer vertices, Entity entity, float red, float green, float blue) -
renderFire
private void renderFire(MatrixStack matrices, VertexConsumerProvider vertexConsumers, Entity entity) -
drawFireVertex
private static void drawFireVertex(MatrixStack.Entry entry, VertexConsumer vertices, float x, float y, float z, float u, float v) -
renderShadow
private static void renderShadow(MatrixStack matrices, VertexConsumerProvider vertexConsumers, Entity entity, float opacity, float tickDelta, WorldView world, float radius) -
renderShadowPart
private static void renderShadowPart(MatrixStack.Entry entry, VertexConsumer vertices, WorldView world, BlockPos pos, double x, double y, double z, float radius, float opacity) -
drawShadowVertex
private static void drawShadowVertex(MatrixStack.Entry entry, VertexConsumer vertices, float alpha, float x, float y, float z, float u, float v) -
setWorld
-
getSquaredDistanceToCamera
-
getSquaredDistanceToCamera
public double getSquaredDistanceToCamera(double x, double y, double z) -
getRotation
-
getTextRenderer
-