26.2-snap-4

This commit is contained in:
gnembon committed 2026-04-22 16:46:37 +02:00
1 parent a0f7031d54
commit cabaa075dd
3 files changed
+25 -8

No files matched your search

+2 -2
View File
@@ -7,8 +7,8 @@ org.gradle.configuration-cache=false
# Fabric Properties # Fabric Properties
# check https://fabricmc.net/develop/ # check https://fabricmc.net/develop/
minecraft_version=26.2-snapshot-3 minecraft_version=26.2-snapshot-4
loader_version=0.18.6 loader_version=0.19.2
loom_version=1.15-SNAPSHOT loom_version=1.15-SNAPSHOT
# Mod Properties # Mod Properties
@@ -52,10 +52,15 @@ public class LevelRenderer_scarpetRenderMixin
@Inject(method = "render", at = @At( @Inject(method = "render", at = @At(
value = "INVOKE", value = "INVOKE",
target = "Lnet/minecraft/client/renderer/LevelRenderer;addLateDebugPass(Lcom/mojang/blaze3d/framegraph/FrameGraphBuilder;Lnet/minecraft/client/renderer/state/level/CameraRenderState;Lcom/mojang/blaze3d/buffers/GpuBufferSlice;Lorg/joml/Matrix4fc;)V",
//target = "Lnet/minecraft/client/renderer/LevelRenderer;addAlwaysOnTopPass(Lcom/mojang/blaze3d/framegraph/FrameGraphBuilder;Lcom/mojang/blaze3d/buffers/GpuBufferSlice;)V",
//target = "Lnet/minecraft/client/renderer/LevelRenderer;submitFeatures(Lnet/minecraft/client/renderer/state/level/LevelRenderState;Lnet/minecraft/client/renderer/SubmitNodeCollector;Z)V",
target = "Lnet/minecraft/client/renderer/LevelRenderer;addMainPass(Lcom/mojang/blaze3d/framegraph/FrameGraphBuilder;Lcom/mojang/blaze3d/buffers/GpuBufferSlice;Lnet/minecraft/client/renderer/state/level/LevelRenderState;Lnet/minecraft/util/profiling/ProfilerFiller;Lnet/minecraft/client/renderer/chunk/ChunkSectionsToRender;)V",
//target = "Lnet/minecraft/client/renderer/LevelRenderer;addLateDebugPass(Lcom/mojang/blaze3d/framegraph/FrameGraphBuilder;Lnet/minecraft/client/renderer/state/level/CameraRenderState;Lcom/mojang/blaze3d/buffers/GpuBufferSlice;Lorg/joml/Matrix4fc;)V",
shift = At.Shift.AFTER shift = At.Shift.AFTER
)) ))
private void renderScarpetThinsLate(GraphicsResourceAllocator resourceAllocator, DeltaTracker deltaTracker, boolean renderOutline, CameraRenderState cameraState, Matrix4fc modelViewMatrix, GpuBufferSlice terrainFog, Vector4f fogColor, boolean shouldRenderSky, CallbackInfo ci, @Local FrameGraphBuilder frameGraphBuilder) private void renderScarpetThingsLate(GraphicsResourceAllocator resourceAllocator, DeltaTracker deltaTracker, boolean renderOutline, CameraRenderState cameraState, Matrix4fc modelViewMatrix, GpuBufferSlice terrainFog, Vector4f fogColor, boolean shouldRenderSky, CallbackInfo ci, @Local FrameGraphBuilder frameGraphBuilder)
//private void renderScarpetThinsLate(GraphicsResourceAllocator resourceAllocator, DeltaTracker deltaTracker, boolean renderOutline, CameraRenderState cameraState, Matrix4fc modelViewMatrix, GpuBufferSlice terrainFog, Vector4f fogColor, boolean shouldRenderSky, CallbackInfo ci, @Local FrameGraphBuilder frameGraphBuilder)
{ {
// in normal circumstances we want to render shapes at the very end so it appears correctly behind stuff. // in normal circumstances we want to render shapes at the very end so it appears correctly behind stuff.
// we might actually not need to play with render hooks here. // we might actually not need to play with render hooks here.
@@ -8,6 +8,7 @@ import com.mojang.blaze3d.pipeline.RenderTarget;
import com.mojang.blaze3d.systems.RenderSystem; import com.mojang.blaze3d.systems.RenderSystem;
import com.mojang.blaze3d.vertex.ByteBufferBuilder; import com.mojang.blaze3d.vertex.ByteBufferBuilder;
import com.mojang.blaze3d.vertex.PoseStack; import com.mojang.blaze3d.vertex.PoseStack;
import com.mojang.blaze3d.vertex.VertexConsumer;
import com.mojang.blaze3d.vertex.VertexFormat; import com.mojang.blaze3d.vertex.VertexFormat;
import com.mojang.blaze3d.vertex.VertexFormat.Mode; import com.mojang.blaze3d.vertex.VertexFormat.Mode;
import com.mojang.math.Axis; import com.mojang.math.Axis;
@@ -23,6 +24,7 @@ import net.minecraft.client.Camera;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.Font; import net.minecraft.client.gui.Font;
import net.minecraft.client.gui.components.debug.DebugScreenEntries; import net.minecraft.client.gui.components.debug.DebugScreenEntries;
import net.minecraft.client.gui.font.TextRenderable;
import net.minecraft.client.multiplayer.ClientLevel; import net.minecraft.client.multiplayer.ClientLevel;
import net.minecraft.client.renderer.MultiBufferSource; import net.minecraft.client.renderer.MultiBufferSource;
import net.minecraft.client.renderer.RenderBuffers; import net.minecraft.client.renderer.RenderBuffers;
@@ -198,13 +200,13 @@ public class ShapesRenderer
normal.render(matrices, bufferSource, cameraa.cameraRenderState, matrix4f); normal.submit(client.gameRenderer.featureRenderDispatcher().getSubmitNodeStorage(), cameraa.cameraRenderState, false);
bufferSource.uploadAndDraw(); bufferSource.uploadAndDraw();
if (false) { if (false) {
final RenderTarget mainRenderTarget = Minecraft.getInstance().gameRenderer.mainRenderTarget(); final RenderTarget mainRenderTarget = Minecraft.getInstance().gameRenderer.mainRenderTarget();
RenderSystem.getDevice().createCommandEncoder().clearDepthTexture(mainRenderTarget.getDepthTexture(), 1.0); RenderSystem.getDevice().createCommandEncoder().clearDepthTexture(mainRenderTarget.getDepthTexture(), 1.0);
onTop.render(matrices, bufferSource, cameraa.cameraRenderState, matrix4f); onTop.submit(client.gameRenderer.featureRenderDispatcher().getSubmitNodeStorage(), cameraa.cameraRenderState, true);
bufferSource.uploadAndDraw(); bufferSource.uploadAndDraw();
RenderSystem.getDevice().createCommandEncoder().clearDepthTexture(Minecraft.getInstance().gameRenderer.mainRenderTarget().getDepthTexture(), 1.0); RenderSystem.getDevice().createCommandEncoder().clearDepthTexture(Minecraft.getInstance().gameRenderer.mainRenderTarget().getDepthTexture(), 1.0);
@@ -577,8 +579,18 @@ public class ShapesRenderer
// text doesn't appear if backgroud is set // text doesn't appear if backgroud is set
///script run draw_shape('label', 100, 'pos', [200, 100, 200], 'text', 'Hewwo World!', 'color', 0xffffffff, 'fill', 0x33333333) ///script run draw_shape('label', 100, 'pos', [200, 100, 200], 'text', 'Hewwo World!', 'color', 0xffffffff, 'fill', 0x33333333)
textRenderer.drawInBatch(shape.value, text_x, 0.0F, shape.textcolor, false, matrices.last().pose(), immediate, Font.DisplayMode.SEE_THROUGH, shape.textbck, 15728880); //textRenderer.drawInBatch(shape.value, text_x, 0.0F, shape.textcolor, false, matrices.last().pose(), immediate, Font.DisplayMode.SEE_THROUGH, shape.textbck, 15728880);
immediate.uploadAndDraw();
final Font.PreparedText preparedText = textRenderer.prepareText(shape.value.getVisualOrderText(), text_x, 0.0F, shape.textcolor, false, false,0);
preparedText.visit(new Font.GlyphVisitor() {
@Override
public void acceptRenderable(final TextRenderable renderable) {
final VertexConsumer buffer = immediate.getBuffer(renderable.renderType(Font.DisplayMode.NORMAL));
renderable.render(matrices.last().pose(), buffer, LightCoordsUtil.FULL_BRIGHT, false);
}
});
immediate.uploadAndDraw();
//} //}
matrices.popPose(); matrices.popPose();
////RenderSystem.enableCull(); ////RenderSystem.enableCull();