Fix time keyframe lines rendering below timeline

This commit is contained in:
Jonas Herzig
2024-06-25 10:30:43 +02:00
parent d70e41006d
commit 2b2ab2ba8b
3 changed files with 21 additions and 10 deletions

View File

@@ -22,6 +22,7 @@ import de.johni0702.minecraft.gui.utils.lwjgl.vector.Vector2f;
import net.minecraft.client.render.BufferBuilder;
import net.minecraft.client.render.Tessellator;
import net.minecraft.client.render.VertexFormats;
import net.minecraft.client.util.math.MatrixStack;
import org.apache.commons.lang3.tuple.Pair;
import de.johni0702.minecraft.gui.utils.lwjgl.Point;
import de.johni0702.minecraft.gui.utils.lwjgl.ReadableDimension;
@@ -169,9 +170,10 @@ public class GuiKeyframeTimeline extends AbstractGuiTimeline<GuiKeyframeTimeline
// And finally another vertical bit (the timeline is already crammed enough, so only the border)
Vector2f p4 = new Vector2f(keyframeTimelineLeft + positionXKeyframeTimeline, keyframeTimelineTop + BORDER_TOP);
emitLine(buffer, p1, p2, color);
emitLine(buffer, p2, p3, color);
emitLine(buffer, p3, p4, color);
MatrixStack matrixStack = renderer.getMatrixStack();
emitLine(matrixStack, buffer, p1, p2, color);
emitLine(matrixStack, buffer, p2, p3, color);
emitLine(matrixStack, buffer, p3, p4, color);
//#if MC>=11700
//$$ RenderSystem.setShader(GameRenderer::getRenderTypeLinesShader);