From 3820e119542293a2b89b3682aa01ae66c05dc369 Mon Sep 17 00:00:00 2001 From: JozsefA Date: Thu, 11 Feb 2021 02:26:30 -0800 Subject: [PATCH] get it working again --- .../simibubi/create/foundation/mixin/RenderInLayerMixin.java | 2 +- .../com/simibubi/create/foundation/render/BufferedModel.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/simibubi/create/foundation/mixin/RenderInLayerMixin.java b/src/main/java/com/simibubi/create/foundation/mixin/RenderInLayerMixin.java index 9073923dc..ba05ba4e1 100644 --- a/src/main/java/com/simibubi/create/foundation/mixin/RenderInLayerMixin.java +++ b/src/main/java/com/simibubi/create/foundation/mixin/RenderInLayerMixin.java @@ -20,7 +20,7 @@ public class RenderInLayerMixin { * layer-correct custom rendering. RenderWorldLast is not refined enough for rendering world objects. * This should probably be a forge event. */ - @Inject(at = @At(value = "TAIL"), method = "renderLayer") + @Inject(at = @At(value = "INVOKE", target = "Lnet/minecraft/profiler/IProfiler;endSection()V", ordinal = 1), method = "renderLayer") private void renderLayer(RenderType type, MatrixStack stack, double cameraX, double cameraY, double cameraZ, CallbackInfo ci) { FastRenderDispatcher.renderLayer(type, stack, (float) cameraX, (float) cameraY, (float) cameraZ); } diff --git a/src/main/java/com/simibubi/create/foundation/render/BufferedModel.java b/src/main/java/com/simibubi/create/foundation/render/BufferedModel.java index 2df3d68ae..bad1df4d9 100644 --- a/src/main/java/com/simibubi/create/foundation/render/BufferedModel.java +++ b/src/main/java/com/simibubi/create/foundation/render/BufferedModel.java @@ -88,12 +88,12 @@ public abstract class BufferedModel extends TemplateBuffer { } protected void setupAttributes() { - getModelFormat().informAttributes(0); int numAttributes = getTotalShaderAttributeCount(); for (int i = 0; i <= numAttributes; i++) { GL20.glEnableVertexAttribArray(i); } + getModelFormat().informAttributes(0); } public void delete() {