Skip to content

Commit

Permalink
Upstream mod to Minecraft 1.20.1
Browse files Browse the repository at this point in the history
  • Loading branch information
qualterz committed Jun 17, 2023
1 parent e90c452 commit 69e4bd6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ org.gradle.jvmargs=-Xmx2G

# Fabric Properties
# check these on https://fabricmc.net/develop
minecraft_version=1.19.4
yarn_mappings=1.19.4+build.1
loader_version=0.14.17
minecraft_version=1.20.1
yarn_mappings=1.20.1+build.2
loader_version=0.14.21

#Fabric api
fabric_version=0.76.0+1.19.4
fabric_version=0.83.1+1.20.1


# Mod Properties
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
import me.qualterz.minecraft.lookaround.ProjectionUtils;

import net.minecraft.client.MinecraftClient;
import net.minecraft.client.gui.DrawContext;
import net.minecraft.client.gui.hud.InGameHud;
import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.util.math.Vec3d;

import org.spongepowered.asm.mixin.Mixin;
Expand All @@ -24,7 +24,7 @@ public class InGameHudMixin {
private double offsetCrosshairY;

@Inject(method = "renderCrosshair", at = @At("HEAD"), cancellable = true)
private void onRenderCrosshairBegin(MatrixStack matrices, CallbackInfo ci)
private void onRenderCrosshairBegin(DrawContext context, CallbackInfo ci)
{
camera = LookaroundMod.getInstance().getCameraState();

Expand Down Expand Up @@ -60,7 +60,7 @@ private void onRenderCrosshairBegin(MatrixStack matrices, CallbackInfo ci)
}
}

@ModifyArgs(method = "renderCrosshair", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/hud/InGameHud;drawTexture(Lnet/minecraft/client/util/math/MatrixStack;IIIIII)V"))
@ModifyArgs(method = "renderCrosshair", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/DrawContext;drawTexture(Lnet/minecraft/util/Identifier;IIIIII)V"))
private void modifyDrawTextureArgs(Args args)
{
if (camera.doTransition || camera.doLock) {
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"depends": {
"fabricloader": ">=0.14.7",
"fabric": ">=0.55.1",
"minecraft": ">=1.19.3",
"minecraft": ">=1.20.1",
"java": ">=17"
}
}

0 comments on commit 69e4bd6

Please sign in to comment.