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

Update to 1.21.4 #43

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
id 'com.github.johnrengelman.shadow' version '8.1.1'
id 'fabric-loom' version '1.7-SNAPSHOT'
id 'fabric-loom' version '1.8-SNAPSHOT'
id "com.modrinth.minotaur" version "2.+"
}

Expand Down
8 changes: 4 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
org.gradle.jvmargs=-Xmx2G

minecraft_version=1.21.3
loader_version=0.16.7
minecraft_version=1.21.4
loader_version=0.16.9
#parchment_version=2024.05.01 # TODO: update when available
fabric_version=0.106.1+1.21.3
modmenu_version=12.0.0-beta.1
fabric_version=0.110.5+1.21.4
modmenu_version=13.0.0-beta.1
configurate_version=4.1.2

maven_group=org.purpurmc.purpur.client
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.10-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
1 change: 0 additions & 1 deletion src/main/java/org/purpurmc/purpur/client/PurpurClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ public void onInitializeClient() {
ClientConfigurationNetworking.send(new ServerboundPurpurClientHelloPayload());
});


if (getConfig().useWindowTitle) {
Minecraft.getInstance().execute(this::updateTitle);
}
Expand Down
11 changes: 4 additions & 7 deletions src/main/java/org/purpurmc/purpur/client/gui/SplashTexture.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import java.io.IOException;
import java.io.InputStream;
import net.minecraft.client.renderer.texture.SimpleTexture;
import net.minecraft.client.renderer.texture.TextureContents;
import net.minecraft.client.resources.metadata.texture.TextureMetadataSection;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.server.packs.resources.ResourceManager;
Expand All @@ -17,13 +18,9 @@ public SplashTexture() {
}

@Override
protected TextureImage getTextureImage(ResourceManager resourceManager) {
TextureImage data;
try (InputStream in = PurpurClient.class.getResourceAsStream("/assets/purpurclient/textures/splash.png")) {
data = new TextureImage(new TextureMetadataSection(true, true), NativeImage.read(in));
} catch (IOException e) {
return new TextureImage(e);
public TextureContents loadContents(ResourceManager resourceManager) throws IOException {
try (InputStream inputStream = PurpurClient.class.getResourceAsStream("/assets/purpurclient/textures/splash.png")) {
return new TextureContents(NativeImage.read(inputStream), new TextureMetadataSection(true, true));
}
return data;
}
}
18 changes: 11 additions & 7 deletions src/main/java/org/purpurmc/purpur/client/gui/screen/MobScreen.java
Original file line number Diff line number Diff line change
Expand Up @@ -261,14 +261,18 @@ public boolean mouseDragged(double mouseX, double mouseY, int button, double del
// mouse was already down from previous screen, ignore
return false;
}
if (button == 0) {
this.previewYaw -= (float) (mouseX - this.mouseDownX);
this.previewPitch -= (float) (mouseY - this.mouseDownY);
clampYawPitch();
} else if (button == 1) {
this.previewX += (mouseX - this.mouseDownX);
this.previewY += (mouseY - this.mouseDownY);
if (mouseDownX != 0 && mouseDownY != 0) {
// only move if the mouse wasn't just dragged
if (button == 0) {
this.previewYaw -= (float) (mouseX - this.mouseDownX);
this.previewPitch -= (float) (mouseY - this.mouseDownY);
clampYawPitch();
} else if (button == 1) {
this.previewX += mouseX - this.mouseDownX;
this.previewY += mouseY - this.mouseDownY;
}
}

this.mouseDownX = mouseX;
this.mouseDownY = mouseY;
return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import net.minecraft.network.chat.Component;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.util.Mth;
import org.jetbrains.annotations.NotNull;
import org.purpurmc.purpur.client.config.options.DoubleOption;

public class DoubleButton extends AbstractWidget implements Tickable {
Expand Down Expand Up @@ -127,7 +128,7 @@ public void updateWidgetNarration(NarrationElementOutput builder) {
}

@Override
public Component getMessage() {
public @NotNull Component getMessage() {
return this.option.text();
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package org.purpurmc.purpur.client.mixin;

import com.mojang.blaze3d.systems.RenderSystem;
import com.mojang.blaze3d.vertex.DefaultVertexFormat;
import com.mojang.blaze3d.vertex.VertexFormat;
import net.minecraft.client.renderer.RenderStateShard;
import net.minecraft.client.renderer.RenderType;
import net.minecraft.client.renderer.texture.TextureManager;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.util.ARGB;

import net.minecraft.util.TriState;
import org.purpurmc.purpur.client.PurpurClient;
import org.purpurmc.purpur.client.gui.SplashTexture;
Expand Down Expand Up @@ -69,8 +69,8 @@ public abstract class MixinLoadingOverlay {
);

@Inject(method = "registerTextures", at = @At("HEAD"))
private static void registerTextures(Minecraft client, CallbackInfo ci) {
client.getTextureManager().register(SplashTexture.SPLASH, new SplashTexture());
private static void registerTextures(TextureManager textureManager, CallbackInfo ci) {
textureManager.registerAndLoad(SplashTexture.SPLASH, new SplashTexture());
}

@Inject(method = "render", at = @At("HEAD"), cancellable = true)
Expand Down