Skip to content

Commit

Permalink
1.21 port
Browse files Browse the repository at this point in the history
  • Loading branch information
Gaz492 committed Jun 14, 2024
1 parent bef47a9 commit 916eec2
Show file tree
Hide file tree
Showing 45 changed files with 99 additions and 502 deletions.
8 changes: 4 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id 'fabric-loom' version '1.5-SNAPSHOT' apply(false)
id 'fabric-loom' version '1.6-SNAPSHOT' apply(false)
id "me.modmuss50.mod-publish-plugin" version "0.4.5"
}

Expand All @@ -17,7 +17,7 @@ subprojects {
archivesName = "${mod_name}-${project.name}"
}

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

jar {
Expand Down Expand Up @@ -53,11 +53,11 @@ subprojects {
tasks.withType(JavaCompile).configureEach {

it.options.encoding = 'UTF-8'
it.options.getRelease().set(17)
it.options.getRelease().set(21)
}

processResources {
filesMatching(['pack.mcmeta', 'fabric.mod.json','META-INF/mods.toml', 'mods.toml', '*.mixins.json']) {
filesMatching(['pack.mcmeta', 'fabric.mod.json','META-INF/neoforge.mods.toml', 'mods.toml', '*.mixins.json']) {
expand project.properties
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
package dev.wuffs.bcc.screen;
package dev.wuffs.bcc.client.screen;

import dev.wuffs.bcc.Constants;
import dev.wuffs.bcc.data.BetterStatus;
import dev.wuffs.bcc.data.BetterStatusServerHolder;
import net.minecraft.ChatFormatting;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiGraphics;
import net.minecraft.client.gui.screens.multiplayer.JoinMultiplayerScreen;
import net.minecraft.network.chat.Component;
import net.minecraft.resources.ResourceLocation;

import java.util.Arrays;
import java.util.stream.Collectors;

import static dev.wuffs.bcc.CommonClass.comparePingData;

public class BCCMultiplayerAddon {
private static final ResourceLocation ICON_SHEET = new ResourceLocation(Constants.MOD_ID, "textures/gui/icons.png");
private static final ResourceLocation ICON_SHEET = ResourceLocation.fromNamespaceAndPath(Constants.MOD_ID, "textures/gui/icons.png");

public static void drawBCCChecker(JoinMultiplayerScreen gui, BetterStatus pingData, GuiGraphics guiGraphics, int x, int y, int width, int relativeMouseX, int relativeMouseY) {
int idx;
Expand All @@ -39,7 +37,13 @@ public static void drawBCCChecker(JoinMultiplayerScreen gui, BetterStatus pingDa


if (relativeMouseX > width - 15 && relativeMouseX < width && relativeMouseY > 10 && relativeMouseY < 26) {
gui.setToolTip(Arrays.stream(tooltip.split("\n")).map(Component::literal).collect(Collectors.toList()));
// var parts = tooltip.split("\n");
// var component = Component.empty();
// for (String part : parts) {
// component = component.append(Component.literal(part));
// }

gui.setTooltipForNextRenderPass(Minecraft.getInstance().font.split(Component.literal(tooltip), 370));
}
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package dev.wuffs.bcc.mixin;

import dev.wuffs.bcc.screen.BCCMultiplayerAddon;
import dev.wuffs.bcc.client.screen.BCCMultiplayerAddon;
import dev.wuffs.bcc.contract.ServerDataExtension;
import dev.wuffs.bcc.data.BetterStatus;
import dev.wuffs.bcc.data.BetterStatusServerHolder;
Expand Down
4 changes: 4 additions & 0 deletions fabric/src/main/resources/assets/bcc-old/lang/en_us.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"bcc.gui.tooltip.compatible_server": "§3Server: %s\n§2Client (You): %s",
"bcc.gui.tooltip.incompatible_server": "§6You are not running the same version\n§6of the modpack as the server :(\n \n§4Server: %s\n§4Client (You): %s"
}
4 changes: 4 additions & 0 deletions fabric/src/main/resources/assets/bcc-old/lang/fr_fr.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"bcc.gui.tooltip.compatible_server": "§3Serveur: %s\n§2Client (Vous): %s",
"bcc.gui.tooltip.incompatible_server": "§6Vous n'utilisez pas la même version du modpack que le serveur :(\n \n§4Serveur: %s\n§4Client (Vous): %s"
}
4 changes: 4 additions & 0 deletions fabric/src/main/resources/assets/bcc-old/lang/ru_ru.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"bcc.gui.tooltip.compatible_server": "§3Сервер: %s\n§2Клиент (Ты): %s",
"bcc.gui.tooltip.incompatible_server": "§6Ты не запускаешь туже версию\n§6модпака как и сервер :(\n \n§4Сервер: %s\n§4Клиент (Ты): %s"
}
4 changes: 4 additions & 0 deletions fabric/src/main/resources/assets/bcc-old/lang/tr_tr.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"bcc.gui.tooltip.compatible_server": "§3Sunucu: %s\n§2İstemci (Sen): %s",
"bcc.gui.tooltip.incompatible_server": "§6Sunucuyla aynı mod paketi\n§6sürümünü kullanmıyorsun :(\n \n§4Sunucu: %s\n§4İstemci (Sen): %s"
}
4 changes: 4 additions & 0 deletions fabric/src/main/resources/assets/bcc-old/lang/zh_cn.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"bcc.gui.tooltip.compatible_server": "§3服务器版本: %s\n§2您的客户端版本: %s",
"bcc.gui.tooltip.incompatible_server": "§6您的客户端版本与服务器版本不匹配:(\n \n§4服务器版本: %s\n§4您的客户端版本: %s"
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions fabric/src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
"depends": {
"fabricloader": ">=0.15",
"fabric": "*",
"minecraft": "1.20.4",
"java": ">=17"
"minecraft": "1.21",
"java": ">=21"
},
"suggests": {
"another-mod": "*"
Expand Down
121 changes: 0 additions & 121 deletions forge/build.gradle

This file was deleted.

64 changes: 0 additions & 64 deletions forge/src/main/java/dev/wuffs/bcc/BCCForge.java

This file was deleted.

33 changes: 0 additions & 33 deletions forge/src/main/java/dev/wuffs/bcc/Config.java

This file was deleted.

This file was deleted.

Loading

0 comments on commit 916eec2

Please sign in to comment.