From 9f2dcc56353b754c8560c27c58bfb8e473dba214 Mon Sep 17 00:00:00 2001 From: tterrag Date: Sun, 29 Mar 2020 14:21:22 -0400 Subject: [PATCH] Port most remaining instances of manual lightmap modification --- .../com/simibubi/create/ClientEvents.java | 10 ++-- .../AnalogLeverTileEntityRenderer.java | 3 +- .../contraptions/redstone/ContactBlock.java | 3 +- .../deforester/DeforesterItemRenderer.java | 31 ++++++------- .../client/SymmetryWandItemRenderer.java | 31 +++++-------- .../zapper/ZapperItemRenderer.java | 17 ++++--- .../blockzapper/BlockzapperItemRenderer.java | 46 ++++++++----------- .../TerrainzapperItemRenderer.java | 34 +++++++------- .../logistics/block/diodes/LatchBlock.java | 4 +- .../schematics/client/SchematicHandler.java | 13 ++---- .../schematics/client/tools/DeployTool.java | 17 +++---- .../client/tools/ISchematicTool.java | 8 +++- .../client/tools/PlacementToolBase.java | 12 +++-- .../client/tools/SchematicToolBase.java | 22 ++++----- src/main/resources/META-INF/mods.toml | 6 +-- 15 files changed, 120 insertions(+), 137 deletions(-) diff --git a/src/main/java/com/simibubi/create/ClientEvents.java b/src/main/java/com/simibubi/create/ClientEvents.java index 7f962fce6..ac1b10b86 100644 --- a/src/main/java/com/simibubi/create/ClientEvents.java +++ b/src/main/java/com/simibubi/create/ClientEvents.java @@ -19,6 +19,7 @@ import com.simibubi.create.modules.curiosities.zapper.terrainzapper.TerrainZappe import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.IRenderTypeBuffer; +import net.minecraft.client.renderer.texture.OverlayTexture; import net.minecraft.item.ItemStack; import net.minecraft.util.text.ITextComponent; import net.minecraftforge.api.distmarker.Dist; @@ -70,7 +71,7 @@ public class ClientEvents { public static void onRenderWorld(RenderWorldLastEvent event) { MatrixStack ms = event.getMatrixStack(); IRenderTypeBuffer buffer = Minecraft.getInstance().getBufferBuilders().getEntityVertexConsumers(); - CreateClient.schematicHandler.render(ms, buffer); + CreateClient.schematicHandler.render(ms, buffer, 0xF000F0, OverlayTexture.DEFAULT_UV); CreateClient.schematicAndQuillHandler.render(ms, buffer); CreateClient.schematicHologram.render(ms, buffer); KineticDebugger.renderSourceOutline(ms, buffer); @@ -83,11 +84,12 @@ public class ClientEvents { if (event.getType() != ElementType.HOTBAR) return; - onRenderHotbar(); + onRenderHotbar(new MatrixStack(), Minecraft.getInstance().getBufferBuilders().getEntityVertexConsumers(), + 0xF000F0, OverlayTexture.DEFAULT_UV); } - public static void onRenderHotbar() { - CreateClient.schematicHandler.renderOverlay(); + public static void onRenderHotbar(MatrixStack ms, IRenderTypeBuffer buffer, int light, int overlay) { + CreateClient.schematicHandler.renderOverlay(ms, buffer, light, overlay); } @SubscribeEvent diff --git a/src/main/java/com/simibubi/create/modules/contraptions/redstone/AnalogLeverTileEntityRenderer.java b/src/main/java/com/simibubi/create/modules/contraptions/redstone/AnalogLeverTileEntityRenderer.java index 639724ef2..0aefe5f86 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/redstone/AnalogLeverTileEntityRenderer.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/redstone/AnalogLeverTileEntityRenderer.java @@ -1,6 +1,7 @@ package com.simibubi.create.modules.contraptions.redstone; import com.mojang.blaze3d.matrix.MatrixStack; +import com.mojang.blaze3d.vertex.IVertexBuilder; import com.simibubi.create.AllBlockPartials; import com.simibubi.create.foundation.block.SafeTileEntityRenderer; import com.simibubi.create.foundation.utility.AngleHelper; @@ -29,7 +30,7 @@ public class AnalogLeverTileEntityRenderer extends SafeTileEntityRenderer