Skip to content

Commit

Permalink
update NG and move RenderSystem calls around
Browse files Browse the repository at this point in the history
  • Loading branch information
IchHabeHunger54 committed Dec 23, 2024
1 parent c3fd255 commit 90a5078
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
pluginManagement {
plugins {
id("net.neoforged.gradle.userdev") version "7.0.167"
id("net.neoforged.gradle.userdev") version "7.0.171"
id("com.github.minecraftschurlimods.helperplugin") version "1.15"
}
repositories {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,10 @@ public final class ClipboardReadOnlyRenderer {

public static void render(PoseStack pose, MultiBufferSource bufferSource, ClipboardContent data, int width, int height) {
pose.pushPose();
RenderSystem.enableDepthTest();
blit(pose, BACKGROUND, 0, 0, 0, 0, width, height, 256, 256);
pose.translate(0, 0, -0.01);
RenderSystem.disableDepthTest();
pose.translate(0, 0, 0);
drawText(pose, bufferSource, data.title(), 29, 2, 72, 8);
ClipboardContent.Page page = data.pages().get(data.active());
for (int i = 0; i < ClipboardContent.MAX_LINES; i++) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import com.github.minecraftschurlimods.bibliocraft.client.ClipboardReadOnlyRenderer;
import com.github.minecraftschurlimods.bibliocraft.content.clipboard.ClipboardBlockEntity;
import com.github.minecraftschurlimods.bibliocraft.util.ClientUtil;
import com.mojang.blaze3d.systems.RenderSystem;
import com.mojang.blaze3d.vertex.PoseStack;
import com.mojang.math.Axis;
import net.minecraft.client.renderer.MultiBufferSource;
Expand All @@ -12,7 +11,6 @@
public class ClipboardBER implements BlockEntityRenderer<ClipboardBlockEntity> {
@Override
public void render(ClipboardBlockEntity blockEntity, float partialTick, PoseStack stack, MultiBufferSource buffer, int light, int overlay) {
RenderSystem.enableDepthTest();
stack.pushPose();
ClientUtil.setupCenteredBER(stack, blockEntity);
stack.mulPose(Axis.XP.rotationDegrees(180));
Expand All @@ -22,6 +20,5 @@ public void render(ClipboardBlockEntity blockEntity, float partialTick, PoseStac
stack.scale(scale, scale, 0);
ClipboardReadOnlyRenderer.render(stack, buffer, blockEntity.getContent(), 128, 148);
stack.popPose();
RenderSystem.disableDepthTest();
}
}

0 comments on commit 90a5078

Please sign in to comment.