Skip to content
This repository has been archived by the owner on Dec 17, 2023. It is now read-only.

Commit

Permalink
Update to 1.19.2
Browse files Browse the repository at this point in the history
  • Loading branch information
IzzelAliz committed Oct 6, 2022
1 parent 74c5b76 commit 6c708e1
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 14 deletions.
21 changes: 16 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ apply plugin: 'net.minecraftforge.gradle'
apply plugin: 'org.spongepowered.mixin'

group = 'io.izzel.lightfall'
version = '1.0.3'
version = '1.1.0'
archivesBaseName = 'lightfallclient'

java.toolchain.languageVersion = JavaLanguageVersion.of(17)

minecraft {
mappings channel: 'official', version: "1.18.2"
mappings channel: 'official', version: "1.19.2"
runs {
client {
workingDirectory project.file('run')
Expand All @@ -45,12 +45,13 @@ repositories {
}

dependencies {
minecraft 'net.minecraftforge:forge:1.18.2-40.1.0'
minecraft 'net.minecraftforge:forge:1.19.2-43.1.1'
annotationProcessor 'org.spongepowered:mixin:0.8.5:processor'
}

mixin {
add sourceSets.main, 'mixins.lightfall.refmap.json'
config 'mixins.lightfall.json'
}

processResources {
Expand All @@ -61,5 +62,15 @@ processResources {
}

jar {
manifest.attributes MixinConfigs: 'mixins.lightfall.json'
}
manifest.attributes([
"Specification-Title" : "lightfallclient",
//"Specification-Vendor": "mirror authors",
"Specification-Version" : "1", // We are version 1 of ourselves
"Implementation-Title" : project.name,
"Implementation-Version" : project.jar.archiveVersion,
//"Implementation-Vendor": "mirror authors",
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
])
}

jar.finalizedBy('reobfJar')
5 changes: 3 additions & 2 deletions src/main/java/io/izzel/lightfall/client/LightfallClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import net.minecraftforge.fml.IExtensionPoint;
import net.minecraftforge.fml.ModLoadingContext;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.network.NetworkConstants;
import net.minecraftforge.network.NetworkEvent;
import net.minecraftforge.network.NetworkRegistry;
import net.minecraftforge.registries.GameData;
Expand All @@ -32,7 +33,7 @@ public class LightfallClient {
public LightfallClient() {
DistExecutor.safeRunWhenOn(Dist.CLIENT, () -> ClientSetup::registerChannel);
ModLoadingContext.get().registerExtensionPoint(IExtensionPoint.DisplayTest.class,
() -> new IExtensionPoint.DisplayTest(() -> "", (a, b) -> true));
() -> new IExtensionPoint.DisplayTest(() -> NetworkConstants.IGNORESERVERONLY, (a, b) -> true));
}

public static class ClientSetup {
Expand Down Expand Up @@ -65,7 +66,7 @@ private static void handleReset(NetworkEvent.ServerCustomPayloadEvent event) {
var netHandler = new ClientHandshakePacketListenerImpl(netManager, client, new JoinMultiplayerScreen(new TitleScreen()), screen::setComponent);
((ClientLoginNetHandlerBridge) netHandler).bridge$reusePlayHandler((ClientPacketListener) netManager.getPacketListener());
netManager.setListener(netHandler);
});
}).join();
context.setPacketHandled(true);
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
package io.izzel.lightfall.client.gui;

import com.mojang.blaze3d.vertex.PoseStack;
import net.minecraft.client.GameNarrator;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.chat.NarratorChatListener;
import net.minecraft.client.gui.components.Button;
import net.minecraft.client.gui.screens.Screen;
import net.minecraft.client.gui.screens.TitleScreen;
import net.minecraft.client.gui.screens.multiplayer.JoinMultiplayerScreen;
import net.minecraft.network.Connection;
import net.minecraft.network.chat.CommonComponents;
import net.minecraft.network.chat.Component;
import net.minecraft.network.chat.TranslatableComponent;
import org.jetbrains.annotations.NotNull;

public class LightfallHandshakeScreen extends Screen {
Expand All @@ -19,7 +18,7 @@ public class LightfallHandshakeScreen extends Screen {
private Component component;

public LightfallHandshakeScreen(Connection netManager) {
super(NarratorChatListener.NO_TITLE);
super(GameNarrator.NO_TITLE);
this.networkManager = netManager;
}

Expand All @@ -41,7 +40,7 @@ protected void init() {
new Button(this.width / 2 - 100, this.height / 4 + 120 + 12, 200, 20, CommonComponents.GUI_CANCEL,
button -> {
if (this.networkManager.isConnected()) {
this.networkManager.disconnect(new TranslatableComponent("connect.aborted"));
this.networkManager.disconnect(Component.translatable("connect.aborted"));
}
this.minecraft.setScreen(new JoinMultiplayerScreen(new TitleScreen()));
}
Expand All @@ -55,7 +54,7 @@ public void setComponent(Component component) {

public void render(@NotNull PoseStack poseStack, int p_96531_, int p_96532_, float p_96533_) {
this.renderDirtBackground(0);
drawCenteredString(poseStack, this.font, component != null ? component : new TranslatableComponent("connect.connecting"),
drawCenteredString(poseStack, this.font, component != null ? component : Component.translatable("connect.connecting"),
this.width / 2, this.height / 2 - 50, 16777215);
super.render(poseStack, p_96531_, p_96532_, p_96533_);
}
Expand Down
1 change: 0 additions & 1 deletion src/main/resources/META-INF/MANIFEST.MF

This file was deleted.

2 changes: 1 addition & 1 deletion src/main/resources/META-INF/mods.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# The name of the mod loader type to load - for regular FML @Mod mods it should be javafml
modLoader = "javafml" #mandatory
# A version range to match for said mod loader - for regular FML @Mod it will be the forge version
loaderVersion = "[28,)" #mandatory (26 is current forge version)
loaderVersion = "[42,)" #mandatory (26 is current forge version)
license="MIT License"
# A list of mods - how many allowed here is determined by the individual mod loader
[[mods]] #mandatory
Expand Down

0 comments on commit 6c708e1

Please sign in to comment.