Skip to content

Commit

Permalink
Port to Minecraft 1.21
Browse files Browse the repository at this point in the history
  • Loading branch information
EnnuiL committed Jun 11, 2024
1 parent a5c6be4 commit 6734e16
Show file tree
Hide file tree
Showing 28 changed files with 75 additions and 41 deletions.
7 changes: 7 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ base {

repositories {
mavenCentral()
mavenLocal()
maven {
name = 'TerraformersMC'
url = 'https://maven.terraformersmc.com/releases'
Expand Down Expand Up @@ -59,19 +60,25 @@ loom {
sourceSet('main')
}
}

mixin {
useLegacyMixinAp = false
}

accessWidenerPath = file('src/main/resources/ok_zoomer.accesswidener')
}

// All the dependencies are declared at gradle/libs.version.toml and referenced with "libs.<id>"
// See https://docs.gradle.org/current/userguide/platforms.html for information on how version catalogs work.
dependencies {
minecraft libs.minecraft
mappings loom.officialMojangMappings()
/*
mappings(loom.layered {
it.parchment libs.parchment
it.officialMojangMappings()
})
*/
modImplementation libs.quilt.loader

modImplementation libs.fabric.api
Expand Down
17 changes: 9 additions & 8 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
# The latest versions are available at https://quiltmc.org/en/usage/latest-versions/
[versions]
minecraft = "1.20.6"
parchment = "2024.04.14"
minecraft = "1.21-rc1"
parchment = "2024.06.02"

quilt_loom = "1.6.7"
quilt_loader = "0.26.0-beta.2"
quilt_loom = "1.6.8"
quilt_loader = "0.26.0"

fabric_api = "0.99.0+1.20.6"
libzoomer = "0.9.0+1.20.6"
fabric_api = "0.100.0+1.21"
libzoomer = "0.9.1+1.21-rc1"
wrench_wrapper = "a29721e25d" # 0.1.0+1.20.4
modmenu = "10.0.0-beta.1"
modmenu = "11.0.0-beta.1"

[libraries]
minecraft = { module = "com.mojang:minecraft", version.ref = "minecraft" }
parchment = { module = "org.parchmentmc.data:parchment-1.20.4", version.ref = "parchment" }
quilt_loader = { module = "org.quiltmc:quilt-loader", version.ref = "quilt_loader" }

fabric_api = { module = "net.fabricmc.fabric-api:fabric-api", version.ref = "fabric_api" }
libzoomer = { module = "maven.modrinth:libzoomer", version.ref = "libzoomer" }
#libzoomer = { module = "maven.modrinth:libzoomer", version.ref = "libzoomer" }
libzoomer = { module = "io.github.ennuil:LibZoomer", version.ref = "libzoomer" }
wrench_wrapper = { module = "com.github.Up-Mods:wrench_wrapper", version.ref = "wrench_wrapper" }
modmenu = { module = "com.terraformersmc:modmenu", version.ref = "modmenu" }

Expand Down
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.7-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
2 changes: 1 addition & 1 deletion gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@

// This class is responsible for registering the commands and packets
public class OkZoomerClientMod implements ClientModInitializer {
public static final String MOD_ID = "ok_zoomer";

@Override
public void onInitializeClient() {
// Initialize the config
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import io.github.ennuil.libzoomer.api.transitions.SmoothTransitionMode;
import io.github.ennuil.ok_zoomer.OkZoomerClientMod;
import io.github.ennuil.ok_zoomer.config.ConfigEnums.CinematicCameraOptions;
import io.github.ennuil.ok_zoomer.utils.ModUtils;
import io.github.ennuil.ok_zoomer.utils.ZoomUtils;
import io.github.ennuil.ok_zoomer.zoom.LinearTransitionMode;
import io.github.ennuil.ok_zoomer.zoom.MultipliedCinematicCameraMouseModifier;
Expand All @@ -17,7 +18,7 @@
import net.minecraft.resources.ResourceLocation;

public class OkZoomerConfigManager {
public static final OkZoomerConfig CONFIG = WrenchWrapper.create(OkZoomerClientMod.MOD_ID, "config", OkZoomerConfig.class);
public static final OkZoomerConfig CONFIG = WrenchWrapper.create(ModUtils.MOD_NAMESPACE, "config", OkZoomerConfig.class);

public OkZoomerConfigManager() {
// On initialization, configure our zoom instance
Expand Down Expand Up @@ -45,9 +46,9 @@ public static void configureZoomInstance() {
// Sets zoom overlay
// TODO - Restore the "Use Spyglass Texture" option as a "Use Custom Texture" option
// You won't do it without a nice placeholder texture though (that isn't Michael lmfao)
var overlayTextureId = new ResourceLocation(
var overlayTextureId = ResourceLocation.parse(
CONFIG.features.zoomOverlay.value() == ConfigEnums.ZoomOverlays.SPYGLASS
? "textures/misc/spyglass_scope.png"
? "minecraft:textures/misc/spyglass_scope.png"
: "ok_zoomer:textures/misc/zoom_overlay.png");

ZoomUtils.ZOOMER_ZOOM.setZoomOverlay(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
import io.github.ennuil.ok_zoomer.config.metadata.WidgetSize;
import io.github.ennuil.ok_zoomer.config.screen.components.LabelledEditBox;
import io.github.ennuil.ok_zoomer.config.screen.components.OkZoomerAbstractSelectionList;
import io.github.ennuil.ok_zoomer.utils.ModUtils;
import io.github.ennuil.ok_zoomer.utils.ZoomUtils;
import it.unimi.dsi.fastutil.objects.ObjectArraySet;
import it.unimi.dsi.fastutil.objects.Reference2ObjectArrayMap;
import net.minecraft.client.gui.GuiGraphics;
import net.minecraft.client.gui.components.AbstractWidget;
import net.minecraft.client.gui.components.Button;
import net.minecraft.client.gui.components.CycleButton;
Expand Down Expand Up @@ -43,8 +43,8 @@ public class OkZoomerConfigScreen extends Screen {
private AbstractWidget buttonBuffer = null;

public OkZoomerConfigScreen(Screen parent) {
super(ConfigTextUtils.getConfigTitle(new ResourceLocation("ok_zoomer", "config")));
this.configId = new ResourceLocation("ok_zoomer", "config");
super(ConfigTextUtils.getConfigTitle(ModUtils.id("config")));
this.configId = ModUtils.id("config");
this.parent = parent;
this.newValues = new Reference2ObjectArrayMap<>();
this.invalidValues = new ObjectArraySet<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@

@ClientOnly
public class OkZoomerAbstractSelectionList extends AbstractContainerWidget {
private static final ResourceLocation SCROLLER_SPRITE = new ResourceLocation("minecraft", "widget/scroller");
private static final ResourceLocation SCROLLER_BACKGROUND_SPRITE = new ResourceLocation("minecraft", "widget/scroller_background");
private static final ResourceLocation MENU_LIST_BACKGROUND = new ResourceLocation("minecraft", "textures/gui/menu_list_background.png");
private static final ResourceLocation INWORLD_MENU_LIST_BACKGROUND = new ResourceLocation("minecraft", "textures/gui/inworld_menu_list_background.png");
private static final ResourceLocation SCROLLER_SPRITE = ResourceLocation.withDefaultNamespace("widget/scroller");
private static final ResourceLocation SCROLLER_BACKGROUND_SPRITE = ResourceLocation.withDefaultNamespace("widget/scroller_background");
private static final ResourceLocation MENU_LIST_BACKGROUND = ResourceLocation.withDefaultNamespace("textures/gui/menu_list_background.png");
private static final ResourceLocation INWORLD_MENU_LIST_BACKGROUND = ResourceLocation.withDefaultNamespace("textures/gui/inworld_menu_list_background.png");

private final Minecraft minecraft;
private final List<Entry> children;
Expand Down Expand Up @@ -671,7 +671,9 @@ private ServerEffectEntry(Component serverEffect) {

@Override
public void render(GuiGraphics graphics, int x, int y, int rowWidth, int mouseX, int mouseY, float delta) {
this.lines = this.serverEffect.renderCentered(graphics, x + rowWidth / 2, y + 4, 9, CommonColors.WHITE) - y + 3;
this.serverEffect.renderCentered(graphics, x + rowWidth / 2, y + 4, 9, CommonColors.WHITE);
// TODO - With a more rational mind, discover if this math is correct; if not, fix it
this.lines = (this.serverEffect.getLineCount() * 9) + 7;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
public class RegisterCommands {
public static void registerCommands(CommandDispatcher<FabricClientCommandSource> dispatcher, CommandBuildContext registryAccess) {
dispatcher.register(
ClientCommandManager.literal(OkZoomerClientMod.MOD_ID).executes(ctx -> {
ClientCommandManager.literal("ok_zoomer").executes(ctx -> {
ZoomUtils.setOpenCommandScreen(true);
return 0;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,15 @@ private void zoomerOnMouseScroll(CallbackInfo ci, @Local(ordinal = 2) int k) {
@Inject(
method = "onPress",
at = @At(value = "INVOKE", target = "Lnet/minecraft/client/KeyMapping;set(Lcom/mojang/blaze3d/platform/InputConstants$Key;Z)V"),
cancellable = true,
locals = LocalCapture.CAPTURE_FAILHARD
cancellable = true
)
private void zoomerOnMouseButton(long window, int button, int action, int modifiers, CallbackInfo ci, boolean bl, int i) {
private void zoomerOnMouseButton(long window, int button, int action, int modifiers, CallbackInfo ci, @Local boolean bl, @Local(ordinal = 3) int i) {
if (OkZoomerConfigManager.CONFIG.features.zoomScrolling.value()) {
if (OkZoomerConfigManager.CONFIG.features.zoomMode.value() == ZoomModes.PERSISTENT && !ZoomKeyBinds.ZOOM_KEY.isDown()) {
return;
}

if (button == GLFW.GLFW_MOUSE_BUTTON_MIDDLE && bl && ZoomKeyBinds.ZOOM_KEY.isDown()) {
if (i == GLFW.GLFW_MOUSE_BUTTON_MIDDLE && bl && ZoomKeyBinds.ZOOM_KEY.isDown()) {
if (OkZoomerConfigManager.CONFIG.tweaks.resetZoomWithMouse.value()) {
ZoomUtils.resetZoomDivisor(true);
ci.cancel();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package io.github.ennuil.ok_zoomer.packets.payloads;

import io.github.ennuil.ok_zoomer.packets.ZoomPackets;
import io.github.ennuil.ok_zoomer.utils.ModUtils;
import io.github.ennuil.ok_zoomer.utils.ZoomUtils;
import net.fabricmc.fabric.api.client.networking.v1.ClientConfigurationNetworking;
import net.minecraft.network.FriendlyByteBuf;
Expand All @@ -12,7 +13,7 @@

public record AcknowledgeModPacket(boolean unrestricted) implements CustomPacketPayload {
public static final StreamCodec<FriendlyByteBuf, AcknowledgeModPacket> STREAM_CODEC = CustomPacketPayload.codec(AcknowledgeModPacket::write, AcknowledgeModPacket::new);
public static final CustomPacketPayload.Type<AcknowledgeModPacket> TYPE = CustomPacketPayload.createType("ok_zoomer:acknowledge_mod");
public static final CustomPacketPayload.Type<AcknowledgeModPacket> TYPE = new Type<>(ModUtils.id("acknowledge_mod"));

public AcknowledgeModPacket(FriendlyByteBuf buffer) {
this(buffer.readBoolean());
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package io.github.ennuil.ok_zoomer.packets.payloads;

import io.github.ennuil.ok_zoomer.packets.ZoomPackets;
import io.github.ennuil.ok_zoomer.utils.ModUtils;
import io.github.ennuil.ok_zoomer.utils.ZoomUtils;
import net.fabricmc.fabric.api.client.networking.v1.ClientConfigurationNetworking;
import net.minecraft.network.FriendlyByteBuf;
Expand All @@ -11,7 +12,7 @@

public record DisableZoomPacket() implements CustomPacketPayload {
public static final StreamCodec<FriendlyByteBuf, DisableZoomPacket> STREAM_CODEC = CustomPacketPayload.codec(DisableZoomPacket::write, DisableZoomPacket::new);
public static final CustomPacketPayload.Type<DisableZoomPacket> TYPE = CustomPacketPayload.createType("ok_zoomer:disable_zoom");
public static final CustomPacketPayload.Type<DisableZoomPacket> TYPE = new Type<>(ModUtils.id(("disable_zoom")));

public DisableZoomPacket(FriendlyByteBuf buf) {
this();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package io.github.ennuil.ok_zoomer.packets.payloads;

import io.github.ennuil.ok_zoomer.packets.ZoomPackets;
import io.github.ennuil.ok_zoomer.utils.ModUtils;
import io.github.ennuil.ok_zoomer.utils.ZoomUtils;
import net.fabricmc.fabric.api.client.networking.v1.ClientConfigurationNetworking;
import net.minecraft.network.FriendlyByteBuf;
Expand All @@ -11,7 +12,7 @@

public record DisableZoomScrollingPacket() implements CustomPacketPayload {
public static final StreamCodec<FriendlyByteBuf, DisableZoomScrollingPacket> STREAM_CODEC = CustomPacketPayload.codec(DisableZoomScrollingPacket::write, DisableZoomScrollingPacket::new);
public static final CustomPacketPayload.Type<DisableZoomScrollingPacket> TYPE = CustomPacketPayload.createType("ok_zoomer:disable_zoom_scrolling");
public static final CustomPacketPayload.Type<DisableZoomScrollingPacket> TYPE = new Type<>(ModUtils.id("disable_zoom_scrolling"));

public DisableZoomScrollingPacket(FriendlyByteBuf buf) {
this();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package io.github.ennuil.ok_zoomer.packets.payloads;

import io.github.ennuil.ok_zoomer.packets.ZoomPackets;
import io.github.ennuil.ok_zoomer.utils.ModUtils;
import io.github.ennuil.ok_zoomer.utils.ZoomUtils;
import net.fabricmc.fabric.api.client.networking.v1.ClientConfigurationNetworking;
import net.minecraft.network.FriendlyByteBuf;
Expand All @@ -11,7 +12,7 @@

public record ForceClassicModePacket() implements CustomPacketPayload {
public static final StreamCodec<FriendlyByteBuf, ForceClassicModePacket> STREAM_CODEC = CustomPacketPayload.codec(ForceClassicModePacket::write, ForceClassicModePacket::new);
public static final CustomPacketPayload.Type<ForceClassicModePacket> TYPE = CustomPacketPayload.createType("ok_zoomer:force_classic_mode");
public static final CustomPacketPayload.Type<ForceClassicModePacket> TYPE = new Type<>(ModUtils.id("force_classic_mode"));

public ForceClassicModePacket(FriendlyByteBuf buf) {
this();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package io.github.ennuil.ok_zoomer.packets.payloads;

import io.github.ennuil.ok_zoomer.packets.ZoomPackets;
import io.github.ennuil.ok_zoomer.utils.ModUtils;
import io.github.ennuil.ok_zoomer.utils.ZoomUtils;
import net.fabricmc.fabric.api.client.networking.v1.ClientConfigurationNetworking;
import net.minecraft.network.FriendlyByteBuf;
Expand All @@ -10,7 +11,7 @@

public record ForceSpyglassOverlayPacket() implements CustomPacketPayload {
public static final StreamCodec<FriendlyByteBuf, ForceSpyglassOverlayPacket> STREAM_CODEC = CustomPacketPayload.codec(ForceSpyglassOverlayPacket::write, ForceSpyglassOverlayPacket::new);
public static final CustomPacketPayload.Type<ForceSpyglassOverlayPacket> TYPE = CustomPacketPayload.createType("ok_zoomer:force_spyglass_overlay");
public static final CustomPacketPayload.Type<ForceSpyglassOverlayPacket> TYPE = new Type<>(ModUtils.id("force_spyglass_overlay"));

public ForceSpyglassOverlayPacket(FriendlyByteBuf buf) {
this();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package io.github.ennuil.ok_zoomer.packets.payloads;

import io.github.ennuil.ok_zoomer.packets.ZoomPackets;
import io.github.ennuil.ok_zoomer.utils.ModUtils;
import io.github.ennuil.ok_zoomer.utils.ZoomUtils;
import net.fabricmc.fabric.api.client.networking.v1.ClientConfigurationNetworking;
import net.minecraft.network.FriendlyByteBuf;
Expand All @@ -10,7 +11,7 @@

public record ForceSpyglassPacket(boolean requireItem, boolean replaceZoom) implements CustomPacketPayload {
public static final StreamCodec<FriendlyByteBuf, ForceSpyglassPacket> STREAM_CODEC = CustomPacketPayload.codec(ForceSpyglassPacket::write, ForceSpyglassPacket::new);
public static final CustomPacketPayload.Type<ForceSpyglassPacket> TYPE = CustomPacketPayload.createType("ok_zoomer:force_spyglass");
public static final CustomPacketPayload.Type<ForceSpyglassPacket> TYPE = new Type<>(ModUtils.id("force_spyglass"));

public ForceSpyglassPacket(FriendlyByteBuf buf) {
this(buf.readBoolean(), buf.readBoolean());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import io.github.ennuil.ok_zoomer.config.OkZoomerConfigManager;
import io.github.ennuil.ok_zoomer.packets.ZoomPackets;
import io.github.ennuil.ok_zoomer.utils.ModUtils;
import io.github.ennuil.ok_zoomer.utils.ZoomUtils;
import net.fabricmc.fabric.api.client.networking.v1.ClientConfigurationNetworking;
import net.minecraft.network.FriendlyByteBuf;
Expand All @@ -12,7 +13,7 @@

public record ForceZoomDivisorPacket(double max, double min) implements CustomPacketPayload {
public static final StreamCodec<FriendlyByteBuf, ForceZoomDivisorPacket> STREAM_CODEC = CustomPacketPayload.codec(ForceZoomDivisorPacket::write, ForceZoomDivisorPacket::new);
public static final CustomPacketPayload.Type<ForceZoomDivisorPacket> TYPE = CustomPacketPayload.createType("ok_zoomer:force_zoom_divisor");
public static final CustomPacketPayload.Type<ForceZoomDivisorPacket> TYPE = new Type<>(ModUtils.id("force_zoom_divisor"));

public ForceZoomDivisorPacket(FriendlyByteBuf buf) {
this(buf.readDouble(), buf.readableBytes() >= 8 ? buf.readDouble() : buf.getDouble(0));
Expand Down
11 changes: 11 additions & 0 deletions src/main/java/io/github/ennuil/ok_zoomer/utils/ModUtils.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package io.github.ennuil.ok_zoomer.utils;

import net.minecraft.resources.ResourceLocation;

public class ModUtils {
public static final String MOD_NAMESPACE = "ok_zoomer";

public static ResourceLocation id(String path) {
return new ResourceLocation(MOD_NAMESPACE, ResourceLocation.assertValidPath(MOD_NAMESPACE, path));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,6 @@ public static void setOpenCommandScreen(boolean openCommandScreen) {
}

public static ResourceLocation id(String path) {
return new ResourceLocation(OkZoomerClientMod.MOD_ID, path);
return ModUtils.id(path);
}
}
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
package io.github.ennuil.ok_zoomer.zoom;

import io.github.ennuil.libzoomer.api.TransitionMode;
import io.github.ennuil.ok_zoomer.utils.ModUtils;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.util.Mth;

// The implementation of the linear transition
public class LinearTransitionMode implements TransitionMode {
private static final ResourceLocation TRANSITION_ID = new ResourceLocation("ok_zoomer:linear_transition");
private static final ResourceLocation TRANSITION_ID = ModUtils.id("linear_transition");
private boolean active;
private final double minimumLinearStep;
private final double maximumLinearStep;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
package io.github.ennuil.ok_zoomer.zoom;

import io.github.ennuil.libzoomer.api.MouseModifier;
import io.github.ennuil.ok_zoomer.utils.ModUtils;
import net.minecraft.client.Minecraft;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.util.SmoothDouble;

// The implementation of the multiplied cinematic camera
public class MultipliedCinematicCameraMouseModifier implements MouseModifier {
private static final ResourceLocation MODIFIER_ID = new ResourceLocation("ok_zoomer:multiplied_cinematic_camera");
private static final ResourceLocation MODIFIER_ID = ModUtils.id("multiplied_cinematic_camera");
private final Minecraft minecraft;
private final SmoothDouble cursorXZoomSmoother = new SmoothDouble();
private final SmoothDouble cursorYZoomSmoother = new SmoothDouble();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@
import io.github.ennuil.libzoomer.api.ZoomOverlay;
import io.github.ennuil.ok_zoomer.config.ConfigEnums.ZoomTransitionOptions;
import io.github.ennuil.ok_zoomer.config.OkZoomerConfigManager;
import io.github.ennuil.ok_zoomer.utils.ModUtils;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiGraphics;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.util.Mth;

// Implements the zoom overlay
public class ZoomerZoomOverlay implements ZoomOverlay {
private static final ResourceLocation OVERLAY_ID = new ResourceLocation("ok_zoomer:zoom_overlay");
private static final ResourceLocation OVERLAY_ID = ModUtils.id("zoom_overlay");
private final ResourceLocation textureId;
private boolean active;
private final Minecraft minecraft;
Expand Down Expand Up @@ -42,7 +43,7 @@ public void renderOverlay(GuiGraphics graphics) {
RenderSystem.depthMask(false);
RenderSystem.enableBlend();
RenderSystem.blendFuncSeparate(GlStateManager.SourceFactor.ZERO, GlStateManager.DestFactor.ONE_MINUS_SRC_COLOR, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO);
float lerpedOverlayAlpha = Mth.lerp(this.minecraft.getFrameTime(), this.lastZoomOverlayAlpha, this.zoomOverlayAlpha);
float lerpedOverlayAlpha = Mth.lerp(this.minecraft.getTimer().getGameTimeDeltaPartialTick(true), this.lastZoomOverlayAlpha, this.zoomOverlayAlpha);
RenderSystem.setShaderColor(lerpedOverlayAlpha, lerpedOverlayAlpha, lerpedOverlayAlpha, 1.0F);
graphics.blit(this.textureId, 0, 0, -90, 0.0F, 0.0F, graphics.guiWidth(), graphics.guiHeight(), graphics.guiWidth(), graphics.guiHeight());
RenderSystem.depthMask(true);
Expand Down
Loading

0 comments on commit 6734e16

Please sign in to comment.