mirror of
https://github.com/WiIIiam278/HuskSync.git
synced 2025-12-19 14:59:21 +00:00
feat: add support for Paper 1.21.5
This commit is contained in:
3
.github/workflows/ci.yml
vendored
3
.github/workflows/ci.yml
vendored
@@ -61,6 +61,7 @@ jobs:
|
||||
paper
|
||||
paper
|
||||
paper
|
||||
paper
|
||||
fabric
|
||||
fabric
|
||||
fabric
|
||||
@@ -68,6 +69,7 @@ jobs:
|
||||
Paper 1.20.1
|
||||
Paper 1.21.1
|
||||
Paper 1.21.4
|
||||
Paper 1.21.5
|
||||
Fabric 1.20.1
|
||||
Fabric 1.21.1
|
||||
Fabric 1.21.4
|
||||
@@ -75,6 +77,7 @@ jobs:
|
||||
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.4.jar
|
||||
target/HuskSync-Bukkit-${{ env.version_name }}+mc.1.21.5.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.4.jar
|
||||
4
.github/workflows/release.yml
vendored
4
.github/workflows/release.yml
vendored
@@ -43,6 +43,7 @@ jobs:
|
||||
paper-1.20.1
|
||||
paper-1.21.1
|
||||
paper-1.21.4
|
||||
paper-1.21.5
|
||||
fabric-1.20.1
|
||||
fabric-1.21.1
|
||||
fabric-1.21.4
|
||||
@@ -50,6 +51,7 @@ jobs:
|
||||
paper
|
||||
paper
|
||||
paper
|
||||
paper
|
||||
fabric
|
||||
fabric
|
||||
fabric
|
||||
@@ -57,6 +59,7 @@ jobs:
|
||||
Paper 1.20.1
|
||||
Paper 1.21.1
|
||||
Paper 1.21.4
|
||||
Paper 1.21.5
|
||||
Fabric 1.20.1
|
||||
Fabric 1.21.1
|
||||
Fabric 1.21.4
|
||||
@@ -64,6 +67,7 @@ jobs:
|
||||
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.4.jar
|
||||
target/HuskSync-Bukkit-${{ github.event.release.tag_name }}+mc.1.21.5.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.4.jar
|
||||
21
README.md
21
README.md
@@ -46,16 +46,17 @@
|
||||
## Compatibility
|
||||
HuskSync supports the following [compatible versions](https://william278.net/docs/husksync/compatibility) of Minecraft. Since v3.7, you must download the correct version of HuskSync for your server:
|
||||
|
||||
| Minecraft | Latest HuskSync | Java Version | Platforms | Support Status |
|
||||
|:---------------:|:---------------:|:------------:|:--------------|:-----------------------------|
|
||||
| 1.21.4 | _latest_ | 21 | Paper, Fabric | ✅ **Active Release** |
|
||||
| 1.21.3 | 3.7.1 | 21 | Paper, Fabric | 🗃️ Archived (December 2024) |
|
||||
| 1.21.1 | _latest_ | 21 | Paper, Fabric | ✅ **November 2025** (LTS) |
|
||||
| 1.20.6 | 3.6.8 | 17 | Paper | 🗃️ Archived (October 2024) |
|
||||
| 1.20.4 | 3.6.8 | 17 | Paper | 🗃️ Archived (July 2024) |
|
||||
| 1.20.1 | _latest_ | 17 | Paper, Fabric | ✅ **November 2025** (LTS) |
|
||||
| 1.17.1 - 1.19.4 | 3.6.8 | 17 | Paper | 🗃️ Archived |
|
||||
| 1.16.5 | 3.2.1 | 16 | Paper | 🗃️ Archived |
|
||||
| Minecraft | Latest HuskSync | Java Version | Platforms | Support Status |
|
||||
|:---------------:|:---------------:|:------------:|:--------------|:------------------------------|
|
||||
| 1.21.5 | _latest_ | 21 | Paper | ✅ **Active Release** |
|
||||
| 1.21.4 | _latest_ | 21 | Paper, Fabric | ✅ **November 2025** (Non-LTS) |
|
||||
| 1.21.3 | 3.7.1 | 21 | Paper, Fabric | 🗃️ Archived (December 2024) |
|
||||
| 1.21.1 | _latest_ | 21 | Paper, Fabric | ✅ **November 2025** (LTS) |
|
||||
| 1.20.6 | 3.6.8 | 17 | Paper | 🗃️ Archived (October 2024) |
|
||||
| 1.20.4 | 3.6.8 | 17 | Paper | 🗃️ Archived (July 2024) |
|
||||
| 1.20.1 | _latest_ | 17 | Paper, Fabric | ✅ **November 2025** (LTS) |
|
||||
| 1.17.1 - 1.19.4 | 3.6.8 | 17 | Paper | 🗃️ Archived |
|
||||
| 1.16.5 | 3.2.1 | 16 | Paper | 🗃️ Archived |
|
||||
|
||||
HuskSync is primarily developed against the latest release. Old Minecraft versions are allocated a support channel based on popularity, mod support, etc:
|
||||
|
||||
|
||||
3
bukkit/1.21.5/gradle.properties
Normal file
3
bukkit/1.21.5/gradle.properties
Normal file
@@ -0,0 +1,3 @@
|
||||
minecraft_version_numeric=12105
|
||||
minecraft_api_version=1.21
|
||||
paper_api_version=1.21.5-R0.1-SNAPSHOT
|
||||
@@ -8,8 +8,8 @@ plugins {
|
||||
dependencies {
|
||||
implementation project(path: ':common')
|
||||
|
||||
implementation 'net.william278.uniform:uniform-bukkit:1.3.1'
|
||||
implementation 'net.william278.uniform:uniform-paper:1.3.1'
|
||||
implementation 'net.william278.uniform:uniform-bukkit:1.3.3'
|
||||
implementation 'net.william278.uniform:uniform-paper:1.3.3'
|
||||
implementation 'net.william278.toilet:toilet-bukkit:1.0.12'
|
||||
implementation 'net.william278:mpdbdataconverter:1.0.1'
|
||||
implementation 'net.william278:hsldataconverter:1.0'
|
||||
|
||||
@@ -350,7 +350,8 @@ public class BukkitHuskSync extends JavaPlugin implements HuskSync, BukkitTask.S
|
||||
case "1.20.5", "1.20.6" -> DataFixerUtil.VERSION1_20_5;
|
||||
case "1.21", "1.21.1" -> DataFixerUtil.VERSION1_21;
|
||||
case "1.21.2", "1.21.3" -> DataFixerUtil.VERSION1_21_2;
|
||||
case "1.21.4" -> 4189/*DataFixerUtil.VERSION1_21_4*/;
|
||||
case "1.21.4" -> 4189;
|
||||
case "1.21.5" -> DataFixerUtil.VERSION1_21_5;
|
||||
default -> DataFixerUtil.getCurrentVersion();
|
||||
};
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ dependencies {
|
||||
|
||||
compileOnlyApi 'net.william278.toilet:toilet-common:1.0.12'
|
||||
|
||||
compileOnly 'net.william278.uniform:uniform-common:1.3.1'
|
||||
compileOnly 'net.william278.uniform:uniform-common:1.3.3'
|
||||
compileOnly 'com.mojang:brigadier:1.1.8'
|
||||
compileOnly 'org.projectlombok:lombok:1.18.38'
|
||||
compileOnly 'org.jetbrains:annotations:26.0.2'
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
HuskSync supports the following versions of Minecraft. Since v3.7, you must download the correct version of HuskSync for your server:
|
||||
|
||||
| Minecraft | Latest HuskSync | Java Version | Platforms | Support Status |
|
||||
|:---------------:|:---------------:|:------------:|:--------------|:-----------------------------|
|
||||
| 1.21.4 | _latest_ | 21 | Paper, Fabric | ✅ **Active Release** |
|
||||
| 1.21.3 | 3.7.1 | 21 | Paper, Fabric | 🗃️ Archived (December 2024) |
|
||||
| 1.21.1 | _latest_ | 21 | Paper, Fabric | ✅ **November 2025** (LTS) |
|
||||
| 1.20.6 | 3.6.8 | 17 | Paper | 🗃️ Archived (October 2024) |
|
||||
| 1.20.4 | 3.6.8 | 17 | Paper | 🗃️ Archived (July 2024) |
|
||||
| 1.20.1 | _latest_ | 17 | Paper, Fabric | ✅ **November 2025** (LTS) |
|
||||
| 1.17.1 - 1.19.4 | 3.6.8 | 17 | Paper | 🗃️ Archived |
|
||||
| 1.16.5 | 3.2.1 | 16 | Paper | 🗃️ Archived |
|
||||
| Minecraft | Latest HuskSync | Java Version | Platforms | Support Status |
|
||||
|:---------------:|:---------------:|:------------:|:--------------|:------------------------------|
|
||||
| 1.21.5 | _latest_ | 21 | Paper | ✅ **Active Release** |
|
||||
| 1.21.4 | _latest_ | 21 | Paper, Fabric | ✅ **November 2025** (Non-LTS) |
|
||||
| 1.21.3 | 3.7.1 | 21 | Paper, Fabric | 🗃️ Archived (December 2024) |
|
||||
| 1.21.1 | _latest_ | 21 | Paper, Fabric | ✅ **November 2025** (LTS) |
|
||||
| 1.20.6 | 3.6.8 | 17 | Paper | 🗃️ Archived (October 2024) |
|
||||
| 1.20.4 | 3.6.8 | 17 | Paper | 🗃️ Archived (July 2024) |
|
||||
| 1.20.1 | _latest_ | 17 | Paper, Fabric | ✅ **November 2025** (LTS) |
|
||||
| 1.17.1 - 1.19.4 | 3.6.8 | 17 | Paper | 🗃️ Archived |
|
||||
| 1.16.5 | 3.2.1 | 16 | Paper | 🗃️ Archived |
|
||||
|
||||
HuskSync is primarily developed against the latest release. Old Minecraft versions are allocated a support channel based on popularity, mod support, etc:
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ dependencies {
|
||||
modImplementation include("net.kyori:adventure-platform-fabric:${fabric_adventure_platform_version}")
|
||||
modImplementation include("me.lucko:fabric-permissions-api:${fabric_permissions_api_version}")
|
||||
modImplementation include("eu.pb4:sgui:${fabric_sgui_version}")
|
||||
modImplementation include("net.william278.uniform:uniform-fabric:1.3.1+${project.name}")
|
||||
modImplementation include("net.william278.uniform:uniform-fabric:1.3.3+${project.name}")
|
||||
modImplementation include("net.william278.toilet:toilet-fabric:1.0.12+${project.name}")
|
||||
modImplementation "net.fabricmc.fabric-api:fabric-api:${fabric_api_version}"
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ import net.fabricmc.api.DedicatedServerModInitializer;
|
||||
import net.fabricmc.fabric.api.event.lifecycle.v1.ServerLifecycleEvents;
|
||||
import net.fabricmc.loader.api.FabricLoader;
|
||||
import net.fabricmc.loader.api.ModContainer;
|
||||
//#if MC==12104
|
||||
//#if MC>=12104
|
||||
import net.kyori.adventure.platform.modcommon.MinecraftServerAudiences;
|
||||
//#else
|
||||
//$$ import net.kyori.adventure.platform.fabric.FabricServerAudiences;
|
||||
@@ -100,6 +100,7 @@ public class FabricHuskSync implements DedicatedServerModInitializer, HuskSync,
|
||||
private static final int VERSION1_21_1 = 3955;
|
||||
private static final int VERSION1_21_3 = 4082;
|
||||
private static final int VERSION1_21_4 = 4189; // Current
|
||||
private static final int VERSION1_21_5 = 4323;
|
||||
|
||||
private final TreeMap<Identifier, Serializer<? extends Data>> serializers = Maps.newTreeMap(
|
||||
SerializerRegistry.DEPENDENCY_ORDER_COMPARATOR
|
||||
@@ -116,7 +117,7 @@ public class FabricHuskSync implements DedicatedServerModInitializer, HuskSync,
|
||||
private MinecraftServer minecraftServer;
|
||||
private boolean disabling;
|
||||
private Gson gson;
|
||||
//#if MC==12104
|
||||
//#if MC>=12104
|
||||
private MinecraftServerAudiences audiences;
|
||||
//#else
|
||||
//$$ private FabricServerAudiences audiences;
|
||||
@@ -167,7 +168,7 @@ public class FabricHuskSync implements DedicatedServerModInitializer, HuskSync,
|
||||
|
||||
private void onEnable() {
|
||||
// Audiences
|
||||
//#if MC==12104
|
||||
//#if MC>=12104
|
||||
this.audiences = MinecraftServerAudiences.of(minecraftServer);
|
||||
//#else
|
||||
//$$ this.audiences = FabricServerAudiences.of(minecraftServer);
|
||||
@@ -387,7 +388,10 @@ public class FabricHuskSync implements DedicatedServerModInitializer, HuskSync,
|
||||
case "1.21", "1.21.1" -> VERSION1_21_1;
|
||||
case "1.21.2", "1.21.3" -> VERSION1_21_3;
|
||||
case "1.21.4" -> VERSION1_21_4;
|
||||
//#if MC==12104
|
||||
case "1.21.5" -> VERSION1_21_5;
|
||||
//#if MC==12105
|
||||
//$$ default -> VERSION1_21_5;
|
||||
//#elseif MC==12104
|
||||
default -> VERSION1_21_4;
|
||||
//#elseif MC==12101
|
||||
//$$ default -> VERSION1_21_1;
|
||||
|
||||
@@ -54,7 +54,7 @@ import net.william278.husksync.FabricHuskSync;
|
||||
import net.william278.husksync.HuskSync;
|
||||
import net.william278.husksync.adapter.Adaptable;
|
||||
import net.william278.husksync.config.Settings.SynchronizationSettings.AttributeSettings;
|
||||
//#if MC==12104
|
||||
//#if MC>=12104
|
||||
import net.william278.husksync.mixins.HungerManagerMixin;
|
||||
//#endif
|
||||
import net.william278.husksync.user.FabricUser;
|
||||
@@ -178,7 +178,7 @@ public abstract class FabricData implements Data {
|
||||
@Override
|
||||
public void apply(@NotNull FabricUser user, @NotNull FabricHuskSync plugin) throws IllegalStateException {
|
||||
final ServerPlayerEntity player = user.getPlayer();
|
||||
//#if MC==12104
|
||||
//#if MC>=12104
|
||||
player.playerScreenHandler.getCraftingInput().clear();
|
||||
//#else
|
||||
//$$ player.playerScreenHandler.clearCraftingSlots();
|
||||
@@ -513,7 +513,7 @@ public abstract class FabricData implements Data {
|
||||
// Apply teleport
|
||||
try {
|
||||
player.dismountVehicle();
|
||||
//#if MC==12104
|
||||
//#if MC>=12104
|
||||
player.teleport(target, x, y, z, Set.of(), yaw, pitch, true);
|
||||
//#else
|
||||
//$$ player.teleport(target, x, y, z, yaw, pitch);
|
||||
@@ -804,7 +804,7 @@ public abstract class FabricData implements Data {
|
||||
@NotNull
|
||||
public static FabricData.Hunger adapt(@NotNull ServerPlayerEntity player) {
|
||||
final HungerManager hunger = player.getHungerManager();
|
||||
//#if MC==12104
|
||||
//#if MC>=12104
|
||||
float exhaustion = ((HungerManagerMixin) hunger).getExhaustion();
|
||||
//#else
|
||||
//$$ float exhaustion = hunger.getExhaustion();
|
||||
@@ -823,7 +823,7 @@ public abstract class FabricData implements Data {
|
||||
final HungerManager hunger = player.getHungerManager();
|
||||
hunger.setFoodLevel(foodLevel);
|
||||
hunger.setSaturationLevel(saturation);
|
||||
//#if MC==12104
|
||||
//#if MC>=12104
|
||||
((HungerManagerMixin) hunger).setExhaustion(exhaustion);
|
||||
//#else
|
||||
//$$ hunger.setExhaustion(exhaustion);
|
||||
|
||||
@@ -228,7 +228,7 @@ public abstract class FabricSerializer {
|
||||
@Nullable
|
||||
private NbtCompound encodeNbt(@NotNull ItemStack item, @NotNull DynamicRegistryManager registryManager) {
|
||||
try {
|
||||
//#if MC==12104
|
||||
//#if MC>=12104
|
||||
return (NbtCompound) item.toNbt(registryManager);
|
||||
//#elseif MC==12101
|
||||
//$$ return (NbtCompound) item.encode(registryManager);
|
||||
|
||||
@@ -126,7 +126,7 @@ public class FabricEventListener extends EventListener implements LockedHandler
|
||||
return (cancelPlayerEvent(player.getUuid())) ? ActionResult.FAIL : ActionResult.PASS;
|
||||
}
|
||||
|
||||
//#if MC==12104
|
||||
//#if MC>=12104
|
||||
private ActionResult handleItemInteract(PlayerEntity player, World world, Hand hand) {
|
||||
return (cancelPlayerEvent(player.getUuid())) ? ActionResult.FAIL : ActionResult.PASS;
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
//#if MC==12104
|
||||
//#if MC>=12104
|
||||
package net.william278.husksync.mixins;
|
||||
|
||||
import net.minecraft.entity.player.HungerManager;
|
||||
|
||||
@@ -36,7 +36,7 @@ public class ServerWorldMixin {
|
||||
@Shadow
|
||||
private MinecraftServer server;
|
||||
|
||||
//#if MC==12104
|
||||
//#if MC>=12104
|
||||
@Inject(method = "savePersistentState", at = @At("HEAD"))
|
||||
//#else
|
||||
//$$ @Inject(method = "saveLevel", at = @At("HEAD"))
|
||||
|
||||
@@ -25,7 +25,7 @@ import eu.pb4.sgui.api.elements.GuiElementInterface;
|
||||
import eu.pb4.sgui.api.gui.SimpleGui;
|
||||
import me.lucko.fabric.api.permissions.v0.Permissions;
|
||||
import net.kyori.adventure.audience.Audience;
|
||||
//#if MC==12104
|
||||
//#if MC>=12104
|
||||
import net.kyori.adventure.platform.modcommon.MinecraftServerAudiences;
|
||||
//#else
|
||||
//$$ import net.kyori.adventure.platform.fabric.FabricServerAudiences;
|
||||
@@ -107,7 +107,7 @@ public class FabricUser extends OnlineUser implements FabricUserDataHolder {
|
||||
this.editable = editable;
|
||||
|
||||
// Set title, items
|
||||
//#if MC==12104
|
||||
//#if MC>=12104
|
||||
this.setTitle(((MinecraftServerAudiences) plugin.getAudiences()).asNative(title.toComponent()));
|
||||
//#else
|
||||
//$$ this.setTitle(((FabricServerAudiences) plugin.getAudiences()).toNative(title.toComponent()));
|
||||
|
||||
Reference in New Issue
Block a user