Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 11/15/19 in all areas

  1. After scouring the rendering code, I found that the problem was because the vertices weren't sorted in relation to the player's view, and that I could return true from TileEntity#shouldRenderInPass() during pass #1 instead of pass #0 to opt-in to the vertex sorting. The transparency now works perfectly.
    1 point
  2. Unless it does more than I think it does, I suspect your block should use a FastTESR instead of a TileEntitySpecialRenderer, and in fact, that might make it easier to solve the problem. I think what's happening is that the vertices (and by extension, the quads) aren't being rendered in the correct order. Minecraft sorts the vertices into the correct order under certain conditions, so that transparency looks right, but it doesn't do that for TESRs because it never gets its hands on your BufferBuilder (whereas all FastTESRs share a BufferBuilder within their shared Tessellator). It does, however, sort the FastTESRs' batched vertex buffer, which is why you could make things easier by switching over. If you do end up using a FastTESR, you should opt-in to the vertex-sorting render pass by returning true from TileEntity#shouldRenderInPass() during pass #1 instead of pass #0. Otherwise, you should be able to sort the vertices within the TESR yourself, by using BufferBuilder#sortVertexData(), passing in the (x, y, z) coordinates of the player's eyeballs.
    1 point
  3. You can get the Entity that caused the death by using livingDeathEventObject.getSource().getTrueSource(), and go from there.
    1 point
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.