mirror of
https://github.com/WiIIiam278/HuskSync.git
synced 2025-12-21 15:49:20 +00:00
feat: add support for Minecraft 1.21.6
This commit is contained in:
8
.github/workflows/ci.yml
vendored
8
.github/workflows/ci.yml
vendored
@@ -55,15 +55,19 @@ jobs:
|
|||||||
paper-1.21.1
|
paper-1.21.1
|
||||||
paper-1.21.4
|
paper-1.21.4
|
||||||
paper-1.21.5
|
paper-1.21.5
|
||||||
|
paper-1.21.6
|
||||||
fabric-1.20.1
|
fabric-1.20.1
|
||||||
fabric-1.21.1
|
fabric-1.21.1
|
||||||
fabric-1.21.4
|
fabric-1.21.4
|
||||||
fabric-1.21.5
|
fabric-1.21.5
|
||||||
|
fabric-1.21.6
|
||||||
distro-groups: |
|
distro-groups: |
|
||||||
paper
|
paper
|
||||||
paper
|
paper
|
||||||
paper
|
paper
|
||||||
paper
|
paper
|
||||||
|
paper
|
||||||
|
fabric
|
||||||
fabric
|
fabric
|
||||||
fabric
|
fabric
|
||||||
fabric
|
fabric
|
||||||
@@ -73,16 +77,20 @@ jobs:
|
|||||||
Paper 1.21.1
|
Paper 1.21.1
|
||||||
Paper 1.21.4
|
Paper 1.21.4
|
||||||
Paper 1.21.5
|
Paper 1.21.5
|
||||||
|
Paper 1.21.6
|
||||||
Fabric 1.20.1
|
Fabric 1.20.1
|
||||||
Fabric 1.21.1
|
Fabric 1.21.1
|
||||||
Fabric 1.21.4
|
Fabric 1.21.4
|
||||||
Fabric 1.21.5
|
Fabric 1.21.5
|
||||||
|
Fabric 1.21.6
|
||||||
files: |
|
files: |
|
||||||
target/HuskSync-Bukkit-${{ env.version_name }}+mc.1.20.1.jar
|
target/HuskSync-Bukkit-${{ env.version_name }}+mc.1.20.1.jar
|
||||||
target/HuskSync-Bukkit-${{ env.version_name }}+mc.1.21.1.jar
|
target/HuskSync-Bukkit-${{ env.version_name }}+mc.1.21.1.jar
|
||||||
target/HuskSync-Bukkit-${{ env.version_name }}+mc.1.21.4.jar
|
target/HuskSync-Bukkit-${{ env.version_name }}+mc.1.21.4.jar
|
||||||
target/HuskSync-Bukkit-${{ env.version_name }}+mc.1.21.5.jar
|
target/HuskSync-Bukkit-${{ env.version_name }}+mc.1.21.5.jar
|
||||||
|
target/HuskSync-Bukkit-${{ env.version_name }}+mc.1.21.6.jar
|
||||||
target/HuskSync-Fabric-${{ env.version_name }}+mc.1.20.1.jar
|
target/HuskSync-Fabric-${{ env.version_name }}+mc.1.20.1.jar
|
||||||
target/HuskSync-Fabric-${{ env.version_name }}+mc.1.21.1.jar
|
target/HuskSync-Fabric-${{ env.version_name }}+mc.1.21.1.jar
|
||||||
target/HuskSync-Fabric-${{ env.version_name }}+mc.1.21.4.jar
|
target/HuskSync-Fabric-${{ env.version_name }}+mc.1.21.4.jar
|
||||||
target/HuskSync-Fabric-${{ env.version_name }}+mc.1.21.5.jar
|
target/HuskSync-Fabric-${{ env.version_name }}+mc.1.21.5.jar
|
||||||
|
target/HuskSync-Fabric-${{ env.version_name }}+mc.1.21.6.jar
|
||||||
8
.github/workflows/release.yml
vendored
8
.github/workflows/release.yml
vendored
@@ -44,15 +44,19 @@ jobs:
|
|||||||
paper-1.21.1
|
paper-1.21.1
|
||||||
paper-1.21.4
|
paper-1.21.4
|
||||||
paper-1.21.5
|
paper-1.21.5
|
||||||
|
paper-1.21.6
|
||||||
fabric-1.20.1
|
fabric-1.20.1
|
||||||
fabric-1.21.1
|
fabric-1.21.1
|
||||||
fabric-1.21.4
|
fabric-1.21.4
|
||||||
fabric-1.21.5
|
fabric-1.21.5
|
||||||
|
fabric-1.21.6
|
||||||
distro-groups: |
|
distro-groups: |
|
||||||
paper
|
paper
|
||||||
paper
|
paper
|
||||||
paper
|
paper
|
||||||
paper
|
paper
|
||||||
|
paper
|
||||||
|
fabric
|
||||||
fabric
|
fabric
|
||||||
fabric
|
fabric
|
||||||
fabric
|
fabric
|
||||||
@@ -62,16 +66,20 @@ jobs:
|
|||||||
Paper 1.21.1
|
Paper 1.21.1
|
||||||
Paper 1.21.4
|
Paper 1.21.4
|
||||||
Paper 1.21.5
|
Paper 1.21.5
|
||||||
|
Paper 1.21.6
|
||||||
Fabric 1.20.1
|
Fabric 1.20.1
|
||||||
Fabric 1.21.1
|
Fabric 1.21.1
|
||||||
Fabric 1.21.4
|
Fabric 1.21.4
|
||||||
Fabric 1.21.5
|
Fabric 1.21.5
|
||||||
|
Fabric 1.21.6
|
||||||
files: |
|
files: |
|
||||||
target/HuskSync-Bukkit-${{ github.event.release.tag_name }}+mc.1.20.1.jar
|
target/HuskSync-Bukkit-${{ github.event.release.tag_name }}+mc.1.20.1.jar
|
||||||
target/HuskSync-Bukkit-${{ github.event.release.tag_name }}+mc.1.21.1.jar
|
target/HuskSync-Bukkit-${{ github.event.release.tag_name }}+mc.1.21.1.jar
|
||||||
target/HuskSync-Bukkit-${{ github.event.release.tag_name }}+mc.1.21.4.jar
|
target/HuskSync-Bukkit-${{ github.event.release.tag_name }}+mc.1.21.4.jar
|
||||||
target/HuskSync-Bukkit-${{ github.event.release.tag_name }}+mc.1.21.5.jar
|
target/HuskSync-Bukkit-${{ github.event.release.tag_name }}+mc.1.21.5.jar
|
||||||
|
target/HuskSync-Bukkit-${{ github.event.release.tag_name }}+mc.1.21.6.jar
|
||||||
target/HuskSync-Fabric-${{ github.event.release.tag_name }}+mc.1.20.1.jar
|
target/HuskSync-Fabric-${{ github.event.release.tag_name }}+mc.1.20.1.jar
|
||||||
target/HuskSync-Fabric-${{ github.event.release.tag_name }}+mc.1.21.1.jar
|
target/HuskSync-Fabric-${{ github.event.release.tag_name }}+mc.1.21.1.jar
|
||||||
target/HuskSync-Fabric-${{ github.event.release.tag_name }}+mc.1.21.4.jar
|
target/HuskSync-Fabric-${{ github.event.release.tag_name }}+mc.1.21.4.jar
|
||||||
target/HuskSync-Fabric-${{ github.event.release.tag_name }}+mc.1.21.5.jar
|
target/HuskSync-Fabric-${{ github.event.release.tag_name }}+mc.1.21.5.jar
|
||||||
|
target/HuskSync-Fabric-${{ github.event.release.tag_name }}+mc.1.21.6.jar
|
||||||
3
bukkit/1.21.6/gradle.properties
Normal file
3
bukkit/1.21.6/gradle.properties
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
minecraft_version_numeric=12106
|
||||||
|
minecraft_api_version=1.21
|
||||||
|
paper_api_version=1.21.6-R0.1-SNAPSHOT
|
||||||
@@ -8,9 +8,9 @@ plugins {
|
|||||||
dependencies {
|
dependencies {
|
||||||
implementation project(path: ':common')
|
implementation project(path: ':common')
|
||||||
|
|
||||||
implementation 'net.william278.uniform:uniform-bukkit:1.3.4'
|
implementation 'net.william278.uniform:uniform-bukkit:1.3.5'
|
||||||
implementation 'net.william278.uniform:uniform-paper:1.3.4'
|
implementation 'net.william278.uniform:uniform-paper:1.3.5'
|
||||||
implementation 'net.william278.toilet:toilet-bukkit:1.0.13'
|
implementation 'net.william278.toilet:toilet-bukkit:1.0.14'
|
||||||
implementation 'net.william278:mpdbdataconverter:1.0.1'
|
implementation 'net.william278:mpdbdataconverter:1.0.1'
|
||||||
implementation 'net.william278:hsldataconverter:1.0'
|
implementation 'net.william278:hsldataconverter:1.0'
|
||||||
implementation 'net.william278:mapdataapi:2.0'
|
implementation 'net.william278:mapdataapi:2.0'
|
||||||
|
|||||||
@@ -354,9 +354,11 @@ public class BukkitHuskSync extends JavaPlugin implements HuskSync, BukkitTask.S
|
|||||||
case "1.20.3", "1.20.4" -> DataFixerUtil.VERSION1_20_4;
|
case "1.20.3", "1.20.4" -> DataFixerUtil.VERSION1_20_4;
|
||||||
case "1.20.5", "1.20.6" -> DataFixerUtil.VERSION1_20_5;
|
case "1.20.5", "1.20.6" -> DataFixerUtil.VERSION1_20_5;
|
||||||
case "1.21", "1.21.1" -> DataFixerUtil.VERSION1_21;
|
case "1.21", "1.21.1" -> DataFixerUtil.VERSION1_21;
|
||||||
case "1.21.2", "1.21.3" -> DataFixerUtil.VERSION1_21_2;
|
case "1.21.2" -> DataFixerUtil.VERSION1_21_2;
|
||||||
case "1.21.4" -> 4189;
|
case "1.21.3" -> DataFixerUtil.VERSION1_21_3;
|
||||||
|
case "1.21.4" -> DataFixerUtil.VERSION1_21_4;
|
||||||
case "1.21.5" -> DataFixerUtil.VERSION1_21_5;
|
case "1.21.5" -> DataFixerUtil.VERSION1_21_5;
|
||||||
|
case "1.21.6" -> 4435;
|
||||||
default -> DataFixerUtil.getCurrentVersion();
|
default -> DataFixerUtil.getCurrentVersion();
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,15 +17,15 @@ dependencies {
|
|||||||
exclude module: 'slf4j-api'
|
exclude module: 'slf4j-api'
|
||||||
}
|
}
|
||||||
|
|
||||||
compileOnlyApi 'net.william278.toilet:toilet-common:1.0.13'
|
compileOnlyApi 'net.william278.toilet:toilet-common:1.0.14'
|
||||||
|
|
||||||
compileOnly 'net.william278.uniform:uniform-common:1.3.4'
|
compileOnly 'net.william278.uniform:uniform-common:1.3.5'
|
||||||
compileOnly 'com.mojang:brigadier:1.1.8'
|
compileOnly 'com.mojang:brigadier:1.1.8'
|
||||||
compileOnly 'org.projectlombok:lombok:1.18.38'
|
compileOnly 'org.projectlombok:lombok:1.18.38'
|
||||||
compileOnly 'org.jetbrains:annotations:26.0.2'
|
compileOnly 'org.jetbrains:annotations:26.0.2'
|
||||||
compileOnly 'net.kyori:adventure-api:4.21.0'
|
compileOnly 'net.kyori:adventure-api:4.23.0'
|
||||||
compileOnly 'net.kyori:adventure-platform-api:4.4.0'
|
compileOnly 'net.kyori:adventure-platform-api:4.4.0'
|
||||||
compileOnly "net.kyori:adventure-text-serializer-plain:4.21.0"
|
compileOnly "net.kyori:adventure-text-serializer-plain:4.23.0"
|
||||||
compileOnly 'com.google.guava:guava:33.4.8-jre'
|
compileOnly 'com.google.guava:guava:33.4.8-jre'
|
||||||
compileOnly 'com.github.plan-player-analytics:Plan:5.6.2965'
|
compileOnly 'com.github.plan-player-analytics:Plan:5.6.2965'
|
||||||
compileOnly "redis.clients:jedis:$jedis_version"
|
compileOnly "redis.clients:jedis:$jedis_version"
|
||||||
|
|||||||
7
fabric/1.21.6/gradle.properties
Normal file
7
fabric/1.21.6/gradle.properties
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
essential.defaults.loom.mappings=net.fabricmc:yarn:1.21.6+build.1:v2
|
||||||
|
|
||||||
|
fabric_loader_version=0.16.14
|
||||||
|
fabric_api_version=0.127.1+1.21.6
|
||||||
|
fabric_permissions_api_version=0.4.0
|
||||||
|
fabric_adventure_platform_version=6.5.0-SNAPSHOT
|
||||||
|
fabric_sgui_version=1.10.0+1.21.6
|
||||||
@@ -14,8 +14,8 @@ dependencies {
|
|||||||
modImplementation include("net.kyori:adventure-platform-fabric:${fabric_adventure_platform_version}")
|
modImplementation include("net.kyori:adventure-platform-fabric:${fabric_adventure_platform_version}")
|
||||||
modImplementation include("me.lucko:fabric-permissions-api:${fabric_permissions_api_version}")
|
modImplementation include("me.lucko:fabric-permissions-api:${fabric_permissions_api_version}")
|
||||||
modImplementation include("eu.pb4:sgui:${fabric_sgui_version}")
|
modImplementation include("eu.pb4:sgui:${fabric_sgui_version}")
|
||||||
modImplementation include("net.william278.uniform:uniform-fabric:1.3.4+${project.name}")
|
modImplementation include("net.william278.uniform:uniform-fabric:1.3.5+${project.name}")
|
||||||
modImplementation include("net.william278.toilet:toilet-fabric:1.0.13+${project.name}")
|
modImplementation include("net.william278.toilet:toilet-fabric:1.0.14+${project.name}")
|
||||||
modImplementation "net.fabricmc.fabric-api:fabric-api:${fabric_api_version}"
|
modImplementation "net.fabricmc.fabric-api:fabric-api:${fabric_api_version}"
|
||||||
|
|
||||||
// Manually include config deps due to the way including api deps works
|
// Manually include config deps due to the way including api deps works
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
1.21.5
|
1.21.6
|
||||||
@@ -3,13 +3,15 @@ plugins {
|
|||||||
}
|
}
|
||||||
|
|
||||||
preprocess {
|
preprocess {
|
||||||
|
def fabric12106 = createNode("1.21.6", 12106, "yarn")
|
||||||
def fabric12105 = createNode("1.21.5", 12105, "yarn")
|
def fabric12105 = createNode("1.21.5", 12105, "yarn")
|
||||||
def fabric12104 = createNode("1.21.4", 12104, "yarn")
|
def fabric12104 = createNode("1.21.4", 12104, "yarn")
|
||||||
def fabric12101 = createNode("1.21.1", 12101, "yarn")
|
def fabric12101 = createNode("1.21.1", 12101, "yarn")
|
||||||
def fabric12001 = createNode("1.20.1", 12001, "yarn")
|
def fabric12001 = createNode("1.20.1", 12001, "yarn")
|
||||||
|
|
||||||
strictExtraMappings.set(true)
|
strictExtraMappings.set(true)
|
||||||
fabric12104.link(fabric12105, null)
|
fabric12105.link(fabric12106, null)
|
||||||
fabric12101.link(fabric12105, null)
|
fabric12104.link(fabric12106, null)
|
||||||
fabric12001.link(fabric12105, null)
|
fabric12101.link(fabric12106, null)
|
||||||
|
fabric12001.link(fabric12106, null)
|
||||||
}
|
}
|
||||||
@@ -99,8 +99,9 @@ public class FabricHuskSync implements DedicatedServerModInitializer, HuskSync,
|
|||||||
private static final int VERSION1_20_5 = 3837;
|
private static final int VERSION1_20_5 = 3837;
|
||||||
private static final int VERSION1_21_1 = 3955;
|
private static final int VERSION1_21_1 = 3955;
|
||||||
private static final int VERSION1_21_3 = 4082;
|
private static final int VERSION1_21_3 = 4082;
|
||||||
private static final int VERSION1_21_4 = 4189; // Current
|
private static final int VERSION1_21_4 = 4189;
|
||||||
private static final int VERSION1_21_5 = 4323;
|
private static final int VERSION1_21_5 = 4323;
|
||||||
|
private static final int VERSION1_21_6 = 4435;
|
||||||
|
|
||||||
private final HashMap<Identifier, Serializer<? extends Data>> serializers = Maps.newHashMap();
|
private final HashMap<Identifier, Serializer<? extends Data>> serializers = Maps.newHashMap();
|
||||||
private final Map<UUID, Map<Identifier, Data>> playerCustomDataStore = Maps.newConcurrentMap();
|
private final Map<UUID, Map<Identifier, Data>> playerCustomDataStore = Maps.newConcurrentMap();
|
||||||
@@ -387,10 +388,13 @@ public class FabricHuskSync implements DedicatedServerModInitializer, HuskSync,
|
|||||||
case "1.21.2", "1.21.3" -> VERSION1_21_3;
|
case "1.21.2", "1.21.3" -> VERSION1_21_3;
|
||||||
case "1.21.4" -> VERSION1_21_4;
|
case "1.21.4" -> VERSION1_21_4;
|
||||||
case "1.21.5" -> VERSION1_21_5;
|
case "1.21.5" -> VERSION1_21_5;
|
||||||
//#if MC==12105
|
case "1.21.6" -> VERSION1_21_6;
|
||||||
|
//#if MC==12106
|
||||||
|
default -> VERSION1_21_6;
|
||||||
|
//#elseif MC==12105
|
||||||
//$$ default -> VERSION1_21_5;
|
//$$ default -> VERSION1_21_5;
|
||||||
//#elseif MC==12104
|
//#elseif MC==12104
|
||||||
default -> VERSION1_21_4;
|
//$$ default -> VERSION1_21_4;
|
||||||
//#elseif MC==12101
|
//#elseif MC==12101
|
||||||
//$$ default -> VERSION1_21_1;
|
//$$ default -> VERSION1_21_1;
|
||||||
//#elseif MC==12001
|
//#elseif MC==12001
|
||||||
|
|||||||
@@ -272,12 +272,14 @@ public abstract class FabricSerializer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
private NbtCompound encodeNbt(@NotNull ItemStack item, @NotNull DynamicRegistryManager registryManager) {
|
private NbtCompound encodeNbt(@NotNull ItemStack item, @NotNull DynamicRegistryManager reg) {
|
||||||
try {
|
try {
|
||||||
//#if MC>=12104
|
//#if MC>=12106
|
||||||
return (NbtCompound) item.toNbt(registryManager);
|
return (NbtCompound) ItemStack.CODEC.encodeStart(reg.getOps(NbtOps.INSTANCE), item).getOrThrow();
|
||||||
|
//#elseif MC>=12104
|
||||||
|
//$$ return (NbtCompound) item.toNbt(reg);
|
||||||
//#elseif MC==12101
|
//#elseif MC==12101
|
||||||
//$$ return (NbtCompound) item.encode(registryManager);
|
//$$ return (NbtCompound) item.encode(reg);
|
||||||
//#elseif MC==12001
|
//#elseif MC==12001
|
||||||
//$$ final NbtCompound compound = new NbtCompound();
|
//$$ final NbtCompound compound = new NbtCompound();
|
||||||
//$$ item.writeNbt(compound);
|
//$$ item.writeNbt(compound);
|
||||||
@@ -289,14 +291,16 @@ public abstract class FabricSerializer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
private ItemStack decodeNbt(@NotNull NbtElement item, @NotNull DynamicRegistryManager registryManager) {
|
private ItemStack decodeNbt(@NotNull NbtElement item, @NotNull DynamicRegistryManager reg) {
|
||||||
//#if MC==12001
|
//#if MC>=12106
|
||||||
|
final @Nullable ItemStack stack = ItemStack.CODEC.decode(reg.getOps(NbtOps.INSTANCE), item).getOrThrow().getFirst();
|
||||||
|
//#elseif MC>12001
|
||||||
|
//$$ final @Nullable ItemStack stack = ItemStack.fromNbt(reg, item).orElse(null);
|
||||||
|
//#elseif MC==12001
|
||||||
//$$ final @Nullable ItemStack stack = ItemStack.fromNbt((NbtCompound) item);
|
//$$ final @Nullable ItemStack stack = ItemStack.fromNbt((NbtCompound) item);
|
||||||
//#else
|
|
||||||
final @Nullable ItemStack stack = ItemStack.fromNbt(registryManager, item).orElse(null);
|
|
||||||
//#endif
|
//#endif
|
||||||
if (stack == null) {
|
if (stack == null) {
|
||||||
throw new IllegalStateException("Failed to decode item NBT (got null 'fromNbt'): (%s)".formatted(item));
|
throw new IllegalStateException("Failed to decode item NBT (decode got null): (%s)".formatted(item));
|
||||||
}
|
}
|
||||||
return stack;
|
return stack;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ org.gradle.daemon=true
|
|||||||
javaVersion=21
|
javaVersion=21
|
||||||
|
|
||||||
# Plugin metadata
|
# Plugin metadata
|
||||||
plugin_version=3.8.4
|
plugin_version=3.8.5
|
||||||
plugin_archive=husksync
|
plugin_archive=husksync
|
||||||
plugin_description=A modern, cross-server player data synchronization system
|
plugin_description=A modern, cross-server player data synchronization system
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user