public class RenderGlobal extends java.lang.Object implements IWorldEventListener, IResourceManagerReloadListener
Modifier and Type | Class and Description |
---|---|
(package private) class |
RenderGlobal.ContainerLocalRenderInformation |
Constructor and Description |
---|
RenderGlobal(Minecraft mcIn) |
Modifier and Type | Method and Description |
---|---|
static void |
addChainedFilledBoxVertices(BufferBuilder builder,
double p_189693_1_,
double p_189693_3_,
double p_189693_5_,
double p_189693_7_,
double p_189693_9_,
double p_189693_11_,
float red,
float green,
float blue,
float alpha) |
void |
broadcastSound(int soundID,
BlockPos pos,
int data) |
private int |
calculateParticleLevel(boolean p_190572_1_) |
private void |
cleanupDamagedBlocks(java.util.Iterator<DestroyBlockProgress> iteratorIn) |
void |
createBindEntityOutlineFbs(int width,
int height) |
void |
deleteAllDisplayLists() |
void |
drawBlockDamageTexture(Tessellator tessellatorIn,
BufferBuilder bufferBuilderIn,
Entity entityIn,
float partialTicks) |
static void |
drawBoundingBox(BufferBuilder buffer,
double minX,
double minY,
double minZ,
double maxX,
double maxY,
double maxZ,
float red,
float green,
float blue,
float alpha) |
static void |
drawBoundingBox(double minX,
double minY,
double minZ,
double maxX,
double maxY,
double maxZ,
float red,
float green,
float blue,
float alpha) |
static void |
drawSelectionBoundingBox(AxisAlignedBB box,
float red,
float green,
float blue,
float alpha) |
void |
drawSelectionBox(EntityPlayer player,
RayTraceResult movingObjectPositionIn,
int execute,
float partialTicks) |
private void |
fixTerrainFrustum(double x,
double y,
double z) |
private void |
generateSky() |
private void |
generateSky2() |
private void |
generateStars() |
java.lang.String |
getDebugInfoEntities() |
java.lang.String |
getDebugInfoRenders() |
private RenderChunk |
getRenderChunkOffset(BlockPos playerPos,
RenderChunk renderChunkBase,
EnumFacing facing) |
protected int |
getRenderedChunks() |
protected org.lwjgl.util.vector.Vector3f |
getViewVector(Entity entityIn,
double partialTicks) |
private java.util.Set<EnumFacing> |
getVisibleFacings(BlockPos pos) |
boolean |
hasCloudFog(double x,
double y,
double z,
float partialTicks) |
boolean |
hasNoChunkUpdates() |
private boolean |
isOutlineActive(Entity entityIn,
Entity viewer,
ICamera camera) |
protected boolean |
isRenderEntityOutlines() |
void |
loadRenderers() |
void |
makeEntityOutlineShader() |
void |
markBlockRangeForRenderUpdate(int x1,
int y1,
int z1,
int x2,
int y2,
int z2) |
private void |
markBlocksForUpdate(int minX,
int minY,
int minZ,
int maxX,
int maxY,
int maxZ,
boolean updateImmediately) |
void |
notifyBlockUpdate(World worldIn,
BlockPos pos,
IBlockState oldState,
IBlockState newState,
int flags) |
void |
notifyLightSet(BlockPos pos) |
void |
onEntityAdded(Entity entityIn) |
void |
onEntityRemoved(Entity entityIn) |
void |
onResourceManagerReload(IResourceManager resourceManager) |
void |
playEvent(EntityPlayer player,
int type,
BlockPos blockPosIn,
int data) |
void |
playRecord(SoundEvent soundIn,
BlockPos pos) |
void |
playSoundToAllNearExcept(EntityPlayer player,
SoundEvent soundIn,
SoundCategory category,
double x,
double y,
double z,
float volume,
float pitch) |
private void |
postRenderDamagedBlocks() |
private void |
preRenderDamagedBlocks() |
private void |
renderBlockLayer(BlockRenderLayer blockLayerIn) |
int |
renderBlockLayer(BlockRenderLayer blockLayerIn,
double partialTicks,
int pass,
Entity entityIn) |
void |
renderClouds(float partialTicks,
int pass,
double p_180447_3_,
double p_180447_5_,
double p_180447_7_) |
private void |
renderCloudsFancy(float partialTicks,
int pass,
double x,
double y,
double z) |
void |
renderEntities(Entity renderViewEntity,
ICamera camera,
float partialTicks) |
void |
renderEntityOutlineFramebuffer() |
static void |
renderFilledBox(AxisAlignedBB aabb,
float red,
float green,
float blue,
float alpha) |
static void |
renderFilledBox(double minX,
double minY,
double minZ,
double maxX,
double maxY,
double maxZ,
float red,
float green,
float blue,
float alpha) |
private void |
renderSky(BufferBuilder bufferBuilderIn,
float posY,
boolean reverseX) |
void |
renderSky(float partialTicks,
int pass) |
private void |
renderSkyEnd() |
private void |
renderStars(BufferBuilder bufferBuilderIn) |
void |
renderWorldBorder(Entity entityIn,
float partialTicks) |
void |
sendBlockBreakProgress(int breakerId,
BlockPos pos,
int progress) |
void |
setDisplayListEntitiesDirty() |
private void |
setPartying(World p_193054_1_,
BlockPos pos,
boolean p_193054_3_) |
void |
setupTerrain(Entity viewEntity,
double partialTicks,
ICamera camera,
int frameCount,
boolean playerSpectator) |
void |
setWorldAndLoadRenderers(WorldClient worldClientIn) |
private void |
spawnParticle(EnumParticleTypes particleIn,
double xCoord,
double yCoord,
double zCoord,
double xSpeed,
double ySpeed,
double zSpeed,
int... parameters) |
void |
spawnParticle(int id,
boolean ignoreRange,
boolean p_190570_3_,
double x,
double y,
double z,
double xSpeed,
double ySpeed,
double zSpeed,
int... parameters) |
void |
spawnParticle(int particleID,
boolean ignoreRange,
double xCoord,
double yCoord,
double zCoord,
double xSpeed,
double ySpeed,
double zSpeed,
int... parameters) |
private Particle |
spawnParticle0(int particleID,
boolean ignoreRange,
boolean minParticles,
double xCoord,
double yCoord,
double zCoord,
double xSpeed,
double ySpeed,
double zSpeed,
int... parameters) |
private Particle |
spawnParticle0(int particleID,
boolean ignoreRange,
double xCoord,
double yCoord,
double zCoord,
double xSpeed,
double ySpeed,
double zSpeed,
int... parameters) |
protected void |
stopChunkUpdates() |
void |
updateChunks(long finishTimeNano) |
void |
updateClouds() |
private void |
updateDestroyBlockIcons() |
void |
updateTileEntities(java.util.Collection<TileEntity> tileEntitiesToRemove,
java.util.Collection<TileEntity> tileEntitiesToAdd) |
private static final org.apache.logging.log4j.Logger LOGGER
private static final ResourceLocation MOON_PHASES_TEXTURES
private static final ResourceLocation SUN_TEXTURES
private static final ResourceLocation CLOUDS_TEXTURES
private static final ResourceLocation END_SKY_TEXTURES
private static final ResourceLocation FORCEFIELD_TEXTURES
private final Minecraft mc
private final TextureManager renderEngine
private final RenderManager renderManager
private WorldClient world
private java.util.Set<RenderChunk> chunksToUpdate
private java.util.List<RenderGlobal.ContainerLocalRenderInformation> renderInfos
private final java.util.Set<TileEntity> setTileEntities
private ViewFrustum viewFrustum
private int starGLCallList
private int glSkyList
private int glSkyList2
private final VertexFormat vertexBufferFormat
private VertexBuffer starVBO
private VertexBuffer skyVBO
private VertexBuffer sky2VBO
private int cloudTickCounter
private final java.util.Map<java.lang.Integer,DestroyBlockProgress> damagedBlocks
private final TextureAtlasSprite[] destroyBlockIcons
private Framebuffer entityOutlineFramebuffer
private ShaderGroup entityOutlineShader
private double frustumUpdatePosX
private double frustumUpdatePosY
private double frustumUpdatePosZ
private int frustumUpdatePosChunkX
private int frustumUpdatePosChunkY
private int frustumUpdatePosChunkZ
private double lastViewEntityX
private double lastViewEntityY
private double lastViewEntityZ
private double lastViewEntityPitch
private double lastViewEntityYaw
private ChunkRenderDispatcher renderDispatcher
private ChunkRenderContainer renderContainer
private int renderDistanceChunks
private int renderEntitiesStartupCounter
private int countEntitiesTotal
private int countEntitiesRendered
private int countEntitiesHidden
private boolean debugFixTerrainFrustum
private ClippingHelper debugFixedClippingHelper
private final org.lwjgl.util.vector.Vector4f[] debugTerrainMatrix
private final Vector3d debugTerrainFrustumPosition
private boolean vboEnabled
IRenderChunkFactory renderChunkFactory
private double prevRenderSortX
private double prevRenderSortY
private double prevRenderSortZ
private boolean displayListEntitiesDirty
private boolean entityOutlinesRendered
private final java.util.Set<BlockPos> setLightUpdates
public RenderGlobal(Minecraft mcIn)
public void onResourceManagerReload(IResourceManager resourceManager)
onResourceManagerReload
in interface IResourceManagerReloadListener
private void updateDestroyBlockIcons()
public void makeEntityOutlineShader()
public void renderEntityOutlineFramebuffer()
protected boolean isRenderEntityOutlines()
private void generateSky2()
private void generateSky()
private void renderSky(BufferBuilder bufferBuilderIn, float posY, boolean reverseX)
private void generateStars()
private void renderStars(BufferBuilder bufferBuilderIn)
public void setWorldAndLoadRenderers(@Nullable WorldClient worldClientIn)
public void loadRenderers()
protected void stopChunkUpdates()
public void createBindEntityOutlineFbs(int width, int height)
public void renderEntities(Entity renderViewEntity, ICamera camera, float partialTicks)
public java.lang.String getDebugInfoRenders()
protected int getRenderedChunks()
public java.lang.String getDebugInfoEntities()
public void setupTerrain(Entity viewEntity, double partialTicks, ICamera camera, int frameCount, boolean playerSpectator)
private java.util.Set<EnumFacing> getVisibleFacings(BlockPos pos)
@Nullable private RenderChunk getRenderChunkOffset(BlockPos playerPos, RenderChunk renderChunkBase, EnumFacing facing)
private void fixTerrainFrustum(double x, double y, double z)
protected org.lwjgl.util.vector.Vector3f getViewVector(Entity entityIn, double partialTicks)
public int renderBlockLayer(BlockRenderLayer blockLayerIn, double partialTicks, int pass, Entity entityIn)
private void renderBlockLayer(BlockRenderLayer blockLayerIn)
private void cleanupDamagedBlocks(java.util.Iterator<DestroyBlockProgress> iteratorIn)
public void updateClouds()
private void renderSkyEnd()
public void renderSky(float partialTicks, int pass)
public void renderClouds(float partialTicks, int pass, double p_180447_3_, double p_180447_5_, double p_180447_7_)
public boolean hasCloudFog(double x, double y, double z, float partialTicks)
private void renderCloudsFancy(float partialTicks, int pass, double x, double y, double z)
public void updateChunks(long finishTimeNano)
public void renderWorldBorder(Entity entityIn, float partialTicks)
private void preRenderDamagedBlocks()
private void postRenderDamagedBlocks()
public void drawBlockDamageTexture(Tessellator tessellatorIn, BufferBuilder bufferBuilderIn, Entity entityIn, float partialTicks)
public void drawSelectionBox(EntityPlayer player, RayTraceResult movingObjectPositionIn, int execute, float partialTicks)
public static void drawSelectionBoundingBox(AxisAlignedBB box, float red, float green, float blue, float alpha)
public static void drawBoundingBox(double minX, double minY, double minZ, double maxX, double maxY, double maxZ, float red, float green, float blue, float alpha)
public static void drawBoundingBox(BufferBuilder buffer, double minX, double minY, double minZ, double maxX, double maxY, double maxZ, float red, float green, float blue, float alpha)
public static void renderFilledBox(AxisAlignedBB aabb, float red, float green, float blue, float alpha)
public static void renderFilledBox(double minX, double minY, double minZ, double maxX, double maxY, double maxZ, float red, float green, float blue, float alpha)
public static void addChainedFilledBoxVertices(BufferBuilder builder, double p_189693_1_, double p_189693_3_, double p_189693_5_, double p_189693_7_, double p_189693_9_, double p_189693_11_, float red, float green, float blue, float alpha)
private void markBlocksForUpdate(int minX, int minY, int minZ, int maxX, int maxY, int maxZ, boolean updateImmediately)
public void notifyBlockUpdate(World worldIn, BlockPos pos, IBlockState oldState, IBlockState newState, int flags)
notifyBlockUpdate
in interface IWorldEventListener
public void notifyLightSet(BlockPos pos)
notifyLightSet
in interface IWorldEventListener
public void markBlockRangeForRenderUpdate(int x1, int y1, int z1, int x2, int y2, int z2)
markBlockRangeForRenderUpdate
in interface IWorldEventListener
public void playRecord(@Nullable SoundEvent soundIn, BlockPos pos)
playRecord
in interface IWorldEventListener
public void playSoundToAllNearExcept(@Nullable EntityPlayer player, SoundEvent soundIn, SoundCategory category, double x, double y, double z, float volume, float pitch)
playSoundToAllNearExcept
in interface IWorldEventListener
public void spawnParticle(int particleID, boolean ignoreRange, double xCoord, double yCoord, double zCoord, double xSpeed, double ySpeed, double zSpeed, int... parameters)
spawnParticle
in interface IWorldEventListener
public void spawnParticle(int id, boolean ignoreRange, boolean p_190570_3_, double x, double y, double z, double xSpeed, double ySpeed, double zSpeed, int... parameters)
spawnParticle
in interface IWorldEventListener
private void spawnParticle(EnumParticleTypes particleIn, double xCoord, double yCoord, double zCoord, double xSpeed, double ySpeed, double zSpeed, int... parameters)
@Nullable private Particle spawnParticle0(int particleID, boolean ignoreRange, double xCoord, double yCoord, double zCoord, double xSpeed, double ySpeed, double zSpeed, int... parameters)
@Nullable private Particle spawnParticle0(int particleID, boolean ignoreRange, boolean minParticles, double xCoord, double yCoord, double zCoord, double xSpeed, double ySpeed, double zSpeed, int... parameters)
private int calculateParticleLevel(boolean p_190572_1_)
public void onEntityAdded(Entity entityIn)
onEntityAdded
in interface IWorldEventListener
public void onEntityRemoved(Entity entityIn)
onEntityRemoved
in interface IWorldEventListener
public void deleteAllDisplayLists()
public void broadcastSound(int soundID, BlockPos pos, int data)
broadcastSound
in interface IWorldEventListener
public void playEvent(EntityPlayer player, int type, BlockPos blockPosIn, int data)
playEvent
in interface IWorldEventListener
public void sendBlockBreakProgress(int breakerId, BlockPos pos, int progress)
sendBlockBreakProgress
in interface IWorldEventListener
public boolean hasNoChunkUpdates()
public void setDisplayListEntitiesDirty()
public void updateTileEntities(java.util.Collection<TileEntity> tileEntitiesToRemove, java.util.Collection<TileEntity> tileEntitiesToAdd)