Skip to content

Commit

Permalink
Style fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
spiralhalo committed May 27, 2023
1 parent 9a9c41b commit 3c97695
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/main/java/grondag/canvas/compat/FlywheelHolder.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -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);
}
Expand Down Expand Up @@ -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);
}
Expand All @@ -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
Expand Down

0 comments on commit 3c97695

Please sign in to comment.