Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix render in 1.17 fabulous. #6

Merged
merged 2 commits into from
Jul 7, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file modified gradlew
100644 → 100755
Empty file.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package me.fallenbreath.pistorder.mixins;

import com.mojang.blaze3d.systems.RenderSystem;
import me.fallenbreath.pistorder.impl.Pistorder;
import net.minecraft.client.render.Camera;
import net.minecraft.client.render.GameRenderer;
Expand All @@ -15,17 +16,18 @@
@Mixin(WorldRenderer.class)
public abstract class WorldRendererMixin
{
// just like onRenderWorldLast in malilib
@Inject(
method = "render",
at = @At(
value = "INVOKE",
ordinal = 1,
target = "Lnet/minecraft/client/render/WorldRenderer;renderWeather(Lnet/minecraft/client/render/LightmapTextureManager;FDDD)V"
)
)
/**
* The way this.client.debugRenderer gets rendered in {@link WorldRenderer#render}
*/
@Inject(method = "render", at = @At(value = "RETURN"))
private void renderPistorder(MatrixStack matrices, float tickDelta, long limitTime, boolean renderBlockOutline, Camera camera, GameRenderer gameRenderer, LightmapTextureManager lightmapTextureManager, Matrix4f matrix4f, CallbackInfo ci)
{
MatrixStack matrixStack = RenderSystem.getModelViewStack();
matrixStack.push();
matrixStack.method_34425(matrices.peek().getModel());
RenderSystem.applyModelViewMatrix();
Pistorder.getInstance().render(tickDelta);
matrixStack.pop();
RenderSystem.applyModelViewMatrix();
}
}