@Environment(value=CLIENT) public class EntityRenderDispatcher extends Object
Modifier and Type | Field and 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 and Description |
---|
EntityRenderDispatcher(TextureManager textureManager,
ItemRenderer itemRenderer,
ReloadableResourceManager reloadableResourceManager,
TextRenderer textRenderer,
GameOptions gameOptions) |
Modifier and Type | Method and 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> |
getLight(E entity,
float tickDelta) |
<T extends Entity> |
getRenderer(T entity) |
Quaternion |
getRotation() |
double |
getSquaredDistanceToCamera(double x,
double y,
double z) |
double |
getSquaredDistanceToCamera(Entity entity) |
TextRenderer |
getTextRenderer() |
private <T extends Entity> |
register(EntityType<T> entityType,
EntityRenderer<? super T> entityRenderer) |
private void |
registerRenderers(ItemRenderer itemRenderer,
ReloadableResourceManager reloadableResourceManager) |
<E extends Entity> |
render(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> |
shouldRender(E entity,
Frustum frustum,
double x,
double y,
double z) |
boolean |
shouldRenderHitboxes() |
private static final RenderLayer SHADOW_LAYER
private final Map<EntityType<?>,EntityRenderer<?>> renderers
private final Map<String,PlayerEntityRenderer> modelRenderers
private final PlayerEntityRenderer playerRenderer
private final TextRenderer textRenderer
public final TextureManager textureManager
private World world
public Camera camera
private Quaternion rotation
public Entity targetedEntity
public final GameOptions gameOptions
private boolean renderShadows
private boolean renderHitboxes
public EntityRenderDispatcher(TextureManager textureManager, ItemRenderer itemRenderer, ReloadableResourceManager reloadableResourceManager, TextRenderer textRenderer, GameOptions gameOptions)
public <E extends Entity> int getLight(E entity, float tickDelta)
private <T extends Entity> void register(EntityType<T> entityType, EntityRenderer<? super T> entityRenderer)
private void registerRenderers(ItemRenderer itemRenderer, ReloadableResourceManager reloadableResourceManager)
public <T extends Entity> EntityRenderer<? super T> getRenderer(T entity)
public void setRotation(Quaternion rotation)
public void setRenderShadows(boolean value)
public void setRenderHitboxes(boolean value)
public boolean shouldRenderHitboxes()
public <E extends Entity> boolean shouldRender(E entity, Frustum frustum, double x, double y, double z)
public <E extends Entity> void render(E entity, double x, double y, double z, float yaw, float tickDelta, MatrixStack matrices, VertexConsumerProvider vertexConsumers, int light)
private void renderHitbox(MatrixStack matrices, VertexConsumer vertices, Entity entity, float tickDelta)
private void drawBox(MatrixStack matrix, VertexConsumer vertices, Entity entity, float red, float green, float blue)
private void renderFire(MatrixStack matrices, VertexConsumerProvider vertexConsumers, Entity entity)
private static void drawFireVertex(MatrixStack.Entry entry, VertexConsumer vertices, float x, float y, float z, float u, float v)
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)
private static void drawShadowVertex(MatrixStack.Entry entry, VertexConsumer vertices, float alpha, float x, float y, float z, float u, float v)
public double getSquaredDistanceToCamera(Entity entity)
public double getSquaredDistanceToCamera(double x, double y, double z)
public Quaternion getRotation()
public TextRenderer getTextRenderer()