Less world holders when using Flywheel

This commit is contained in:
Jozufozu 2021-07-28 15:27:11 -07:00
parent 17421df5ce
commit ce2e2be2c2

View file

@ -202,14 +202,13 @@ public class ContraptionRenderDispatcher {
ContraptionMatrices matrices, IRenderTypeBuffer buffers) { ContraptionMatrices matrices, IRenderTypeBuffer buffers) {
World world = entity.level; World world = entity.level;
ContraptionWorldHolder holder = getWorldHolder(world, contraption);
PlacementSimulationWorld renderWorld = holder.renderWorld;
ContraptionRenderDispatcher.renderDynamic(world, renderWorld, contraption, matrices, buffers);
if (Backend.getInstance().available()) { if (Backend.getInstance().available()) {
getRenderer(world, contraption); // hack to create the RenderedContraption when using Flywheel getRenderer(world, contraption); // hack to create the RenderedContraption when using Flywheel
} }
PlacementSimulationWorld renderWorld = getWorldHolder(world, contraption).renderWorld;
ContraptionRenderDispatcher.renderDynamic(world, renderWorld, contraption, matrices, buffers);
} }
private static RenderedContraption getRenderer(World world, Contraption c) { private static RenderedContraption getRenderer(World world, Contraption c) {