Skip to content

Commit

Permalink
Bake a 0.8.1
Browse files Browse the repository at this point in the history
  • Loading branch information
EnnuiL committed May 19, 2024
1 parent 0ee749e commit 6d30d51
Show file tree
Hide file tree
Showing 9 changed files with 37 additions and 32 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2020-2023 Ennui Langeweile
Copyright (c) 2020 Ennui Langeweile

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
3 changes: 3 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ loom {
sourceSet('testmod')
}
}
mixin {
useLegacyMixinAp = false
}
}

// All the dependencies are declared at gradle/libs.version.toml and referenced with "libs.<id>"
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ org.gradle.jvmargs = -Xmx1G
org.gradle.parallel = true

# Mod Properties
version = 0.8.0
version = 0.8.1
maven_group = io.github.ennuil
archives_base_name = libzoomer

Expand Down
9 changes: 5 additions & 4 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
[versions]
# The latest versions are available at https://lambdaurora.dev/tools/import_quilt.html
minecraft = "1.20.1"
quilt_mappings = "1.20.1+build.23"
quilt_loader = "0.22.1-beta.4"

quilted_fabric_api = "7.4.0+0.90.0-1.20.1"
quilt_loom = "1.6.7"
quilt_loader = "0.25.0"

quilted_fabric_api = "7.5.0+0.91.0-1.20.1"

[libraries]
minecraft = { module = "com.mojang:minecraft", version.ref = "minecraft" }
Expand All @@ -17,4 +18,4 @@ quilted_fabric_api = { module = "org.quiltmc.quilted-fabric-api:quilted-fabric-a
[bundles]

[plugins]
quilt_loom = { id = "org.quiltmc.loom", version = "1.4.+" }
quilt_loom = { id = "org.quiltmc.loom", version.ref = "quilt_loom" }
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
20 changes: 10 additions & 10 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute

echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo. 1>&2
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2

goto fail

Expand All @@ -57,11 +57,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe

if exist "%JAVA_EXE%" goto execute

echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo. 1>&2
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2

goto fail

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.gui.GuiGraphics;
import net.minecraft.client.render.RenderLayer;
import net.minecraft.util.CommonColors;
import net.minecraft.util.Identifier;
import net.minecraft.util.math.MathHelper;

Expand Down Expand Up @@ -48,19 +49,19 @@ public boolean cancelOverlayRendering() {
public void renderOverlay(GuiGraphics graphics) {
int scaledWidth = graphics.getScaledWindowWidth();
int scaledHeight = graphics.getScaledWindowHeight();
float f = (float) Math.min(scaledWidth, scaledHeight);
float h = Math.min((float) scaledWidth / f, (float) scaledHeight / f) * scale;
int i = MathHelper.floor(f * h);
int j = MathHelper.floor(f * h);
int k = (scaledWidth - i) / 2;
int l = (scaledHeight - j) / 2;
int m = k + i;
int n = l + j;
graphics.drawTexture(textureId, k, l, -90, 0.0F, 0.0F, i, j, i, j);
graphics.fill(RenderLayer.getGuiOverlay(), 0, n, scaledWidth, scaledHeight, -90, 0xFF000000);
graphics.fill(RenderLayer.getGuiOverlay(), 0, 0, scaledWidth, l, -90, 0xFF000000);
graphics.fill(RenderLayer.getGuiOverlay(), 0, l, k, n, -90, 0xFF000000);
graphics.fill(RenderLayer.getGuiOverlay(), m, l, scaledWidth, n, -90, 0xFF000000);
float smallerLength = (float) Math.min(scaledWidth, scaledHeight);
float scaledSmallerLength = Math.min((float) scaledWidth / smallerLength, (float) scaledHeight / smallerLength) * scale;
int width = MathHelper.floor(smallerLength * scaledSmallerLength);
int height = MathHelper.floor(smallerLength * scaledSmallerLength);
int x = (scaledWidth - width) / 2;
int y = (scaledHeight - height) / 2;
int borderX = x + width;
int borderY = y + height;
graphics.drawTexture(textureId, x, y, -90, 0.0F, 0.0F, width, height, width, height);
graphics.fill(RenderLayer.getGuiOverlay(), 0, borderY, scaledWidth, scaledHeight, -90, CommonColors.BLACK);
graphics.fill(RenderLayer.getGuiOverlay(), 0, 0, scaledWidth, y, -90, CommonColors.BLACK);
graphics.fill(RenderLayer.getGuiOverlay(), 0, y, x, borderY, -90, CommonColors.BLACK);
graphics.fill(RenderLayer.getGuiOverlay(), borderX, y, scaledWidth, borderY, -90, CommonColors.BLACK);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
import net.minecraft.util.Identifier;

/**
* An utility class whose sole purpose is to hold the spyglass tag
* An utility class whose sole purpose is to hold the spyglass tag.
*/
public class SpyglassHelper {
/**
* The spyglass tag, which is used internally in order to unhardcode behavior specific to vanilla spyglasses
* The spyglass tag, which is used internally in order to unhardcode behavior specific to vanilla spyglasses.
*/
public static final TagKey<Item> SPYGLASSES = QuiltTagKey.of(
RegistryKeys.ITEM, new Identifier("libzoomer", "spyglasses"), TagType.CLIENT_FALLBACK
Expand Down

0 comments on commit 6d30d51

Please sign in to comment.