From 3c976950d3dbf2d23c050cb5b39371e8aa52c247 Mon Sep 17 00:00:00 2001 From: spiralhalo Date: Sat, 27 May 2023 22:01:43 +0700 Subject: [PATCH] Style fixes --- .../java/grondag/canvas/compat/FlywheelHolder.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/main/java/grondag/canvas/compat/FlywheelHolder.java b/src/main/java/grondag/canvas/compat/FlywheelHolder.java index c3aa75585..b5ed97c39 100644 --- a/src/main/java/grondag/canvas/compat/FlywheelHolder.java +++ b/src/main/java/grondag/canvas/compat/FlywheelHolder.java @@ -34,10 +34,7 @@ import com.jozufozu.flywheel.event.ReloadRenderersEvent; import com.jozufozu.flywheel.event.RenderLayerEvent; import com.jozufozu.flywheel.fabric.event.FlywheelEvents; -import net.fabricmc.fabric.api.event.Event; -import net.fabricmc.loader.api.FabricLoader; -import com.mojang.blaze3d.systems.RenderSystem; import com.mojang.blaze3d.vertex.PoseStack; import net.minecraft.client.Camera; @@ -48,6 +45,9 @@ import net.minecraft.client.renderer.culling.Frustum; import net.minecraft.world.level.block.entity.BlockEntity; +import net.fabricmc.fabric.api.event.Event; +import net.fabricmc.loader.api.FabricLoader; + import io.vram.frex.api.renderloop.WorldRenderContext; import grondag.canvas.CanvasMod; @@ -117,8 +117,9 @@ public void refresh(ClientLevel level) { @Override public boolean handleBEChunkRebuild(BlockEntity be) { if (Backend.canUseInstancing(be.getLevel())) { - if (InstancedRenderRegistry.canInstance(be.getType())) + if (InstancedRenderRegistry.canInstance(be.getType())) { InstancedRenderDispatcher.getBlockEntities(be.getLevel()).queueAdd(be); + } return !InstancedRenderRegistry.shouldSkipRender(be); } @@ -209,7 +210,7 @@ private static void closeHandler(Throwable e) { public interface FlywheelHandler { void beginFrame(ClientLevel level, Camera camera, Frustum frustum); - default void renderLayer(WorldRenderContext ctx, RenderType type) { + default void renderLayer(WorldRenderContext ctx, RenderType type) { final var cam = ctx.camera().getPosition(); renderLayer(ctx.worldRenderer(), type, ctx.poseStack(), cam.x, cam.y, cam.z); } @@ -226,7 +227,7 @@ public void beginFrame(ClientLevel level, Camera camera, Frustum frustum) { } @Override - public void renderLayer(WorldRenderContext ctx, RenderType type) { + public void renderLayer(WorldRenderContext ctx, RenderType type) { } @Override