Rebuild porting patches
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
-def JDK = "21";
|
||||
-def majorMc = "1.21.6";
|
||||
-def modLoaders = "neoforge|fabric|quilt|paper";
|
||||
-def supportedMc = "25w17a";
|
||||
-def supportedMc = "25w19a";
|
||||
-def reltype = "experimental";
|
||||
+def JDK = "17";
|
||||
+def majorMc = "1.18.2";
|
||||
|
@@ -1,14 +1,18 @@
|
||||
--- a/Common/src/main/java/com/hypherionmc/craterlib/utils/ChatUtils.java
|
||||
+++ b/Common/src/main/java/com/hypherionmc/craterlib/utils/ChatUtils.java
|
||||
@@ -1,7 +1,5 @@
|
||||
@@ -1,11 +1,6 @@
|
||||
package com.hypherionmc.craterlib.utils;
|
||||
|
||||
-import com.google.gson.JsonElement;
|
||||
-import com.google.gson.JsonParseException;
|
||||
-import com.hypherionmc.craterlib.core.platform.CommonPlatform;
|
||||
-import com.hypherionmc.craterlib.core.platform.ModloaderEnvironment;
|
||||
import com.hypherionmc.craterlib.nojang.resources.ResourceIdentifier;
|
||||
-import com.mojang.serialization.JsonOps;
|
||||
import lombok.Getter;
|
||||
import me.hypherionmc.mcdiscordformatter.discord.DiscordSerializer;
|
||||
@@ -13,55 +11,40 @@
|
||||
import me.hypherionmc.mcdiscordformatter.minecraft.MinecraftSerializer;
|
||||
@@ -16,65 +11,40 @@
|
||||
import net.minecraft.ChatFormatting;
|
||||
import net.minecraft.SharedConstants;
|
||||
import net.minecraft.Util;
|
||||
@@ -18,7 +22,9 @@
|
||||
-import net.minecraft.core.HolderLookup;
|
||||
-import net.minecraft.core.RegistryAccess;
|
||||
import net.minecraft.network.chat.Component;
|
||||
-import net.minecraft.network.chat.ComponentSerialization;
|
||||
import net.minecraft.network.chat.Style;
|
||||
-import net.minecraft.util.StrictJsonParser;
|
||||
+import net.minecraft.network.chat.TextComponent;
|
||||
+import net.minecraft.network.chat.TranslatableComponent;
|
||||
|
||||
@@ -33,16 +39,26 @@
|
||||
private static final MiniMessage miniMessage = MiniMessage.miniMessage();
|
||||
|
||||
public static Component adventureToMojang(net.kyori.adventure.text.Component inComponent) {
|
||||
final String serialised = adventureSerializer.serialize(inComponent);
|
||||
- return Component.Serializer.fromJson(serialised, getRegistryLookup());
|
||||
- final JsonElement serialised = adventureSerializer.serializeToTree(inComponent);
|
||||
-
|
||||
- // FUCK YOU MOJANG. SERIOUSLY. FUCK OFF WITH THIS SHIT
|
||||
- return ComponentSerialization.CODEC
|
||||
- .parse(getRegistryLookup().createSerializationContext(JsonOps.INSTANCE), serialised)
|
||||
- .getOrThrow(JsonParseException::new);
|
||||
+ final String serialised = adventureSerializer.serialize(inComponent);
|
||||
+ return Component.Serializer.fromJson(serialised);
|
||||
}
|
||||
|
||||
public static net.kyori.adventure.text.Component mojangToAdventure(Component inComponent) {
|
||||
try {
|
||||
- final String serialised = Component.Serializer.toJson(inComponent, getRegistryLookup());
|
||||
- // FUCK YOU MOJANG. SERIOUSLY. FUCK OFF WITH THIS SHIT
|
||||
- final JsonElement serialised = ComponentSerialization.CODEC
|
||||
- .encodeStart(JsonOps.INSTANCE, inComponent)
|
||||
- .getOrThrow(JsonParseException::new);
|
||||
-
|
||||
- return adventureSerializer.deserializeFromTree(serialised);
|
||||
+ final String serialised = Component.Serializer.toJson(inComponent);
|
||||
return adventureSerializer.deserialize(serialised);
|
||||
+ return adventureSerializer.deserialize(serialised);
|
||||
} catch (Exception e) {
|
||||
return net.kyori.adventure.text.Component.text(inComponent.getString());
|
||||
}
|
||||
@@ -70,7 +86,7 @@
|
||||
}
|
||||
|
||||
public static String strip(String inString, String... toStrip) {
|
||||
@@ -90,7 +73,7 @@
|
||||
@@ -103,7 +73,7 @@
|
||||
}
|
||||
|
||||
public static net.kyori.adventure.text.Component resolve(String component, boolean formatted) {
|
||||
@@ -79,7 +95,7 @@
|
||||
if (formatted) {
|
||||
returnVal = MinecraftSerializer.INSTANCE.serialize(component);
|
||||
}
|
||||
@@ -118,7 +101,7 @@
|
||||
@@ -131,7 +101,7 @@
|
||||
if (identifier == null)
|
||||
return net.kyori.adventure.text.Component.text("Unknown");
|
||||
|
||||
|
@@ -52,7 +52,7 @@
|
||||
- }
|
||||
-
|
||||
- ServerPlayNetworking.registerGlobalReceiver(holder.getType(),
|
||||
- (ServerPlayNetworking.PlayPayloadHandler<CommonPacketWrapper<T>>) (payload, context) -> context.player().server.execute(() ->
|
||||
- (ServerPlayNetworking.PlayPayloadHandler<CommonPacketWrapper<T>>) (payload, context) -> context.player().getServer().execute(() ->
|
||||
- holder.handler().accept(
|
||||
- new PacketContext<>(BridgedPlayer.of(context.player()), payload.packet(), side))));
|
||||
+ if (CHANNELS.get(holder.messageType()) == null) {
|
||||
|
@@ -1,11 +1,12 @@
|
||||
--- a/NeoForge/src/main/java/com/hypherionmc/craterlib/common/NeoForgeCompatHelper.java
|
||||
+++ /dev/null
|
||||
@@ -1,60 +1,0 @@
|
||||
@@ -1,61 +1,0 @@
|
||||
-package com.hypherionmc.craterlib.common;
|
||||
-
|
||||
-import com.hypherionmc.craterlib.core.platform.CompatUtils;
|
||||
-import com.hypherionmc.craterlib.core.platform.ModloaderEnvironment;
|
||||
-import com.hypherionmc.craterlib.nojang.world.entity.player.BridgedPlayer;
|
||||
-import net.kyori.adventure.text.Component;
|
||||
-import redstonedubstep.mods.vanishmod.VanishUtil;
|
||||
-import team.creative.playerrevive.api.IBleeding;
|
||||
-import team.creative.playerrevive.server.PlayerReviveServer;
|
||||
|
@@ -2,7 +2,7 @@
|
||||
+++ /dev/null
|
||||
@@ -1,78 +1,0 @@
|
||||
-plugins {
|
||||
- id "io.papermc.paperweight.userdev" version "1.7.3"
|
||||
- id "io.papermc.paperweight.userdev" version "2.0.0-beta.17"
|
||||
- id "xyz.jpenilla.run-paper" version "2.3.0"
|
||||
-}
|
||||
-
|
||||
@@ -59,7 +59,7 @@
|
||||
-compileTestJava.enabled = false
|
||||
-
|
||||
-tasks.assemble {
|
||||
- dependsOn(tasks.reobfJar)
|
||||
- dependsOn(tasks.shadowJar)
|
||||
-}
|
||||
-
|
||||
-publisher {
|
||||
|
@@ -1,12 +1,13 @@
|
||||
--- a/Paper/src/main/java/com/hypherionmc/craterlib/common/PaperCompatHelper.java
|
||||
+++ /dev/null
|
||||
@@ -1,102 +1,0 @@
|
||||
@@ -1,103 +1,0 @@
|
||||
-package com.hypherionmc.craterlib.common;
|
||||
-
|
||||
-import com.hypherionmc.craterlib.core.platform.CompatUtils;
|
||||
-import com.hypherionmc.craterlib.core.platform.ModloaderEnvironment;
|
||||
-import com.hypherionmc.craterlib.nojang.world.entity.player.BridgedPlayer;
|
||||
-import com.hypherionmc.craterlib.utils.ChatUtils;
|
||||
-import net.kyori.adventure.text.Component;
|
||||
-import org.bukkit.Bukkit;
|
||||
-import org.bukkit.entity.Player;
|
||||
-import org.bukkit.metadata.MetadataValue;
|
||||
|
@@ -33,7 +33,7 @@
|
||||
-
|
||||
- @Override
|
||||
- public String getGameVersion() {
|
||||
- return SharedConstants.getCurrentVersion().getName();
|
||||
- return SharedConstants.getCurrentVersion().name();
|
||||
- }
|
||||
-
|
||||
- @Override
|
||||
|
@@ -1,6 +1,13 @@
|
||||
--- a/build.gradle
|
||||
+++ b/build.gradle
|
||||
@@ -8,21 +8,15 @@
|
||||
@@ -3,26 +3,20 @@
|
||||
id 'com.github.johnrengelman.shadow' version '8.1.1' apply false
|
||||
id "xyz.wagyourtail.unimined" version "1.3.9" apply false
|
||||
id "com.hypherionmc.modutils.modpublisher" version "2.1.6"
|
||||
- id "com.hypherionmc.modutils.orion" version "1.0.28"
|
||||
- id "com.hypherionmc.modutils.orion.origami" version "1.0.28" apply false
|
||||
+ id "com.hypherionmc.modutils.orion" version "1.0.24"
|
||||
+ id "com.hypherionmc.modutils.orion.origami" version "1.0.24" apply false
|
||||
id 'maven-publish'
|
||||
}
|
||||
|
||||
|
@@ -4,13 +4,13 @@
|
||||
mod_name=CraterLib
|
||||
|
||||
# Shared
|
||||
-minecraft_version=25w17a
|
||||
-minecraft_version=1.21.6
|
||||
+minecraft_version=1.18.2
|
||||
project_group=com.hypherionmc.craterlib
|
||||
|
||||
# Fabric
|
||||
-fabric_loader=0.16.13
|
||||
-fabric_api=0.119.10+1.21.6
|
||||
-fabric_api=0.126.0+1.21.6
|
||||
+fabric_loader=0.15.11
|
||||
+fabric_api=0.76.0+1.18.2
|
||||
|
||||
|
9
patches/1.18.2/gradle/wrapper/gradle-wrapper.properties.patch
vendored
Normal file
9
patches/1.18.2/gradle/wrapper/gradle-wrapper.properties.patch
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
--- a/gradle/wrapper/gradle-wrapper.properties
|
||||
+++ b/gradle/wrapper/gradle-wrapper.properties
|
||||
@@ -1,5 +1,5 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
-distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-bin.zip
|
||||
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
@@ -5,8 +5,8 @@
|
||||
}
|
||||
|
||||
-rootProject.name = 'CraterLib'
|
||||
-include("Common", "Fabric"/*, "NeoForge"*/)
|
||||
-//include 'Paper'
|
||||
-include("Common", "Fabric", "NeoForge")
|
||||
-include 'Paper'
|
||||
-
|
||||
+rootProject.name = 'CraterLib-1.18.2'
|
||||
+include("Common", "Fabric", "Forge")
|
||||
|
Reference in New Issue
Block a user