Fix textures on contraptions

- bump flywheel build
This commit is contained in:
Jozufozu 2021-11-09 16:53:52 -08:00
parent 9597d8832f
commit e8cddfdfea
3 changed files with 7 additions and 1 deletions

View file

@ -18,7 +18,7 @@ parchment_version = 2021.10.31
# dependency versions
registrate_version = MC1.17.1-1.0.13
flywheel_version = 1.17-0.3.0.11
flywheel_version = 1.17-0.3.0.12
jei_version = 8.1.0.31
# curseforge information

View file

@ -5,6 +5,7 @@ import java.util.Collection;
import org.apache.commons.lang3.tuple.Pair;
import com.jozufozu.flywheel.backend.Backend;
import com.jozufozu.flywheel.backend.gl.error.GlError;
import com.jozufozu.flywheel.core.model.ModelUtil;
import com.jozufozu.flywheel.event.BeginFrameEvent;
import com.jozufozu.flywheel.event.GatherContextEvent;
@ -68,6 +69,8 @@ public class ContraptionRenderDispatcher {
@SubscribeEvent
public static void renderLayer(RenderLayerEvent event) {
WORLDS.get(event.getWorld()).renderLayer(event);
GlError.pollAndThrow(() -> "contraption layer: " + event.getLayer());
}
@SubscribeEvent

View file

@ -7,6 +7,7 @@ import com.jozufozu.flywheel.backend.Backend;
import com.jozufozu.flywheel.backend.gl.GlTextureUnit;
import com.jozufozu.flywheel.backend.state.RenderLayer;
import com.jozufozu.flywheel.event.RenderLayerEvent;
import com.jozufozu.flywheel.util.TextureBinder;
import com.simibubi.create.content.contraptions.components.structureMovement.Contraption;
import com.simibubi.create.foundation.render.AllProgramSpecs;
import com.simibubi.create.foundation.render.CreateContexts;
@ -40,6 +41,8 @@ public class FlwContraptionManager extends ContraptionRenderManager<RenderedCont
layer.setupRenderState();
TextureBinder.bindActiveTextures();
ContraptionProgram structureShader = CreateContexts.STRUCTURE.getProgram(AllProgramSpecs.STRUCTURE);
structureShader.bind();