public static void renderGhostBlock(IBlockState state, BlockPos position, Color color, boolean noDepth, float partialTicks)
{
if(!(state.getBlock() instanceof BlockLiquid) && !(state.getBlock() instanceof BlockFluidBase))
{
renderGhostModel(Minecraft.getMinecraft().getBlockRendererDispatcher().getModelForState(state), position, color, noDepth, partialTicks);
return;
}
GlStateManager.enableBlend();
GL11.glBlendFunc(GL11.GL_ONE, GL11.GL_ONE_MINUS_DST_COLOR);
BufferBuilder vb;
if(noDepth)
{
GlStateManager.depthFunc(519);
vb = prepRenderBlockDepth(partialTicks, true);
}
else
vb = prepRender(partialTicks, true);
vb.begin(7, DefaultVertexFormats.BLOCK);
World world = Minecraft.getMinecraft().world;
Minecraft.getMinecraft().getBlockRendererDispatcher().renderBlock(state, position.add(0, noDepth ? 500 : 0, 0), world, vb);
for(int i = 0; i < vb.getVertexCount(); i++)
vb.putColorMultiplier(color.getRed() / 255f, color.getGreen() / 255f, color.getBlue() / 255f, i);
vb.color(1, 1, 1, 0.1f);
postRender();
GlStateManager.disableBlend();
GlStateManager.depthFunc(515);
}
HarshenClientUtils.java 文件源码
java
阅读 24
收藏 0
点赞 0
评论 0
项目:harshencastle
作者:
评论列表
文章目录