get it working again

This commit is contained in:
JozsefA 2021-02-11 02:26:30 -08:00
parent 02114b1d9a
commit 3820e11954
2 changed files with 2 additions and 2 deletions

View file

@ -20,7 +20,7 @@ public class RenderInLayerMixin {
* layer-correct custom rendering. RenderWorldLast is not refined enough for rendering world objects. * layer-correct custom rendering. RenderWorldLast is not refined enough for rendering world objects.
* This should probably be a forge event. * 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) { 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); FastRenderDispatcher.renderLayer(type, stack, (float) cameraX, (float) cameraY, (float) cameraZ);
} }

View file

@ -88,12 +88,12 @@ public abstract class BufferedModel extends TemplateBuffer {
} }
protected void setupAttributes() { protected void setupAttributes() {
getModelFormat().informAttributes(0);
int numAttributes = getTotalShaderAttributeCount(); int numAttributes = getTotalShaderAttributeCount();
for (int i = 0; i <= numAttributes; i++) { for (int i = 0; i <= numAttributes; i++) {
GL20.glEnableVertexAttribArray(i); GL20.glEnableVertexAttribArray(i);
} }
getModelFormat().informAttributes(0);
} }
public void delete() { public void delete() {