Groups store their types again

- Fix crash rendering breaking overlay
This commit is contained in:
Jozufozu 2021-12-07 23:40:46 -08:00
parent a3476fd54c
commit 4041897d29
2 changed files with 6 additions and 4 deletions

View File

@ -19,7 +19,7 @@ parchment_version = 2021.10.31
# dependency versions
registrate_version = MC1.18-1.0.21
flywheel_version = 1.18-0.3.0.3
flywheel_version = 1.18-0.3.0.4
jei_version = 9.0.0.40
# curseforge information

View File

@ -3,12 +3,14 @@ package com.simibubi.create.content.contraptions.components.structureMovement.re
import com.jozufozu.flywheel.backend.material.instancing.InstancedMaterialGroup;
import com.jozufozu.flywheel.backend.material.instancing.InstancingEngine;
import net.minecraft.client.renderer.RenderType;
public class ContraptionGroup<P extends ContraptionProgram> extends InstancedMaterialGroup<P> {
private final RenderedContraption contraption;
public ContraptionGroup(RenderedContraption contraption, InstancingEngine<P> owner) {
super(owner);
public ContraptionGroup(RenderedContraption contraption, InstancingEngine<P> owner, RenderType type) {
super(owner, type);
this.contraption = contraption;
}
@ -19,6 +21,6 @@ public class ContraptionGroup<P extends ContraptionProgram> extends InstancedMat
}
public static <P extends ContraptionProgram> InstancingEngine.GroupFactory<P> forContraption(RenderedContraption c) {
return (materialManager) -> new ContraptionGroup<>(c, materialManager);
return (materialManager, type) -> new ContraptionGroup<>(c, materialManager, type);
}
}