mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-01-08 16:30:30 +00:00
Draw in-hand pocket computers with blending
It might be worth switching to RenderTypes here, rather than a pure Tesselator, but this'll do for now. Fixes Zundrel/cc-tweaked-fabric#20.
This commit is contained in:
parent
17a9329207
commit
a6fcfb6af2
@ -115,6 +115,7 @@ public final class ItemPocketRenderer extends ItemMapLikeRenderer
|
|||||||
|
|
||||||
private static void renderFrame( Matrix4f transform, ComputerFamily family, int colour, int width, int height )
|
private static void renderFrame( Matrix4f transform, ComputerFamily family, int colour, int width, int height )
|
||||||
{
|
{
|
||||||
|
RenderSystem.enableBlend();
|
||||||
Minecraft.getInstance().getTextureManager()
|
Minecraft.getInstance().getTextureManager()
|
||||||
.bindTexture( colour != -1 ? ComputerBorderRenderer.BACKGROUND_COLOUR : ComputerBorderRenderer.getTexture( family ) );
|
.bindTexture( colour != -1 ? ComputerBorderRenderer.BACKGROUND_COLOUR : ComputerBorderRenderer.getTexture( family ) );
|
||||||
|
|
||||||
@ -133,7 +134,6 @@ public final class ItemPocketRenderer extends ItemMapLikeRenderer
|
|||||||
|
|
||||||
private static void renderLight( Matrix4f transform, int colour, int width, int height )
|
private static void renderLight( Matrix4f transform, int colour, int width, int height )
|
||||||
{
|
{
|
||||||
RenderSystem.enableBlend();
|
|
||||||
RenderSystem.disableTexture();
|
RenderSystem.disableTexture();
|
||||||
|
|
||||||
float r = ((colour >>> 16) & 0xFF) / 255.0f;
|
float r = ((colour >>> 16) & 0xFF) / 255.0f;
|
||||||
|
Loading…
Reference in New Issue
Block a user