Fix time keyframe lines rendering below timeline
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -254,7 +254,7 @@ public class PathPreviewRenderer extends EventRegistrations {
|
||||
buffer.begin(GL11.GL_LINES, VertexFormats.POSITION_COLOR);
|
||||
//#endif
|
||||
|
||||
emitLine(buffer, Vector3f.sub(pos1, view, null), Vector3f.sub(pos2, view, null), color);
|
||||
emitLine(new MatrixStack(), buffer, Vector3f.sub(pos1, view, null), Vector3f.sub(pos2, view, null), color);
|
||||
|
||||
//#if MC>=11700
|
||||
//$$ RenderSystem.setShader(GameRenderer::getRenderTypeLinesShader);
|
||||
@@ -350,7 +350,7 @@ public class PathPreviewRenderer extends EventRegistrations {
|
||||
buffer.begin(GL11.GL_LINES, VertexFormats.POSITION_COLOR);
|
||||
//#endif
|
||||
|
||||
emitLine(buffer, new Vector3f(0, 0, 0), new Vector3f(0, 0, 2), 0x00ff00aa);
|
||||
emitLine(new MatrixStack(), buffer, new Vector3f(0, 0, 0), new Vector3f(0, 0, 2), 0x00ff00aa);
|
||||
|
||||
//#if MC>=11700
|
||||
//$$ RenderSystem.applyModelViewMatrix();
|
||||
|
||||
Reference in New Issue
Block a user