Skip to content

Commit

Permalink
Use batched RenderType for better machine BER performance (#845)
Browse files Browse the repository at this point in the history
  • Loading branch information
Technici4n authored Aug 24, 2024
1 parent e1895f7 commit 4d88838
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
import java.util.IdentityHashMap;
import net.minecraft.client.renderer.LevelRenderer;
import net.minecraft.client.renderer.MultiBufferSource;
import net.minecraft.client.renderer.RenderType;
import net.minecraft.client.renderer.Sheets;
import net.minecraft.client.renderer.block.BlockModelShaper;
import net.minecraft.client.renderer.block.model.BakedQuad;
import net.minecraft.client.renderer.blockentity.BlockEntityRenderer;
Expand Down Expand Up @@ -105,7 +105,7 @@ public void render(T entity, float tickDelta, PoseStack matrices, MultiBufferSou

MachineModelClientData data = entity.getMachineModelData();
if (data.isActive) {
VertexConsumer vc = vcp.getBuffer(RenderType.cutout());
VertexConsumer vc = vcp.getBuffer(Sheets.cutoutBlockSheet());

for (Direction d : Direction.values()) {
BakedQuad quad = getCachedQuad(data, d);
Expand Down

0 comments on commit 4d88838

Please sign in to comment.