mirror of
https://github.com/Suiranoil/SkinRestorer.git
synced 2026-01-16 04:42:12 +00:00
backport to 1.19.1
This commit is contained in:
@@ -9,11 +9,25 @@ import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
public record SkinValue(@NotNull String provider, @Nullable String argument, @Nullable SkinVariant variant,
|
||||
@Nullable Property value, @Nullable Property originalValue) implements GsonPostProcessable {
|
||||
public final class SkinValue implements GsonPostProcessable {
|
||||
|
||||
public static final SkinValue EMPTY = new SkinValue(EmptySkinProvider.PROVIDER_NAME, null, null, null);
|
||||
|
||||
private @NotNull String provider;
|
||||
private @Nullable String argument;
|
||||
private @Nullable SkinVariant variant;
|
||||
private @Nullable Property value;
|
||||
private @Nullable Property originalValue;
|
||||
|
||||
public SkinValue(@NotNull String provider, @Nullable String argument, @Nullable SkinVariant variant,
|
||||
@Nullable Property value, @Nullable Property originalValue) {
|
||||
this.provider = provider;
|
||||
this.argument = argument;
|
||||
this.variant = variant;
|
||||
this.value = value;
|
||||
this.originalValue = originalValue;
|
||||
}
|
||||
|
||||
public SkinValue(String provider, String argument, SkinVariant variant, Property value) {
|
||||
this(provider, argument, variant, value, null);
|
||||
}
|
||||
@@ -38,4 +52,23 @@ public record SkinValue(@NotNull String provider, @Nullable String argument, @Nu
|
||||
public void gsonPostProcess() {
|
||||
Objects.requireNonNull(this.provider);
|
||||
}
|
||||
|
||||
public @NotNull String provider() {
|
||||
return provider;
|
||||
}
|
||||
|
||||
public @Nullable String argument() {
|
||||
return argument;
|
||||
}
|
||||
|
||||
public @Nullable SkinVariant variant() {
|
||||
return variant;}
|
||||
|
||||
public @Nullable Property value() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public @Nullable Property originalValue() {
|
||||
return originalValue;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,8 +44,8 @@ public final class PlayerUtils {
|
||||
PlayerList playerList = serverLevel.getServer().getPlayerList();
|
||||
ChunkMap chunkMap = serverLevel.getChunkSource().chunkMap;
|
||||
|
||||
playerList.broadcastAll(new ClientboundPlayerInfoRemovePacket(List.of(player.getUUID())));
|
||||
playerList.broadcastAll(ClientboundPlayerInfoUpdatePacket.createPlayerInitializing(Collections.singleton(player)));
|
||||
playerList.broadcastAll(new ClientboundPlayerInfoPacket(ClientboundPlayerInfoPacket.Action.REMOVE_PLAYER, player));
|
||||
playerList.broadcastAll(new ClientboundPlayerInfoPacket(ClientboundPlayerInfoPacket.Action.ADD_PLAYER, player));
|
||||
|
||||
var trackedEntity = (TrackedEntityAccessorInvoker) ((ChunkMapAccessor) chunkMap).getEntityMap().get(player.getId());
|
||||
if (trackedEntity != null) {
|
||||
@@ -73,7 +73,7 @@ public final class PlayerUtils {
|
||||
player.gameMode.getPreviousGameModeForPlayer(),
|
||||
player.getLevel().isDebug(),
|
||||
player.getLevel().isFlat(),
|
||||
(byte) 3,
|
||||
true,
|
||||
player.getLastDeathLocation()
|
||||
)
|
||||
);
|
||||
|
||||
@@ -3,9 +3,9 @@ group=net.lionarius
|
||||
java_version=17
|
||||
|
||||
# Common
|
||||
minecraft_version=1.19.3
|
||||
minecraft_version_list=1.19.3
|
||||
minecraft_version_range=[1.19.3,1.19.4)
|
||||
minecraft_version=1.19.1
|
||||
minecraft_version_list=1.19.1,1.19.2
|
||||
minecraft_version_range=[1.19.1,1.19.3)
|
||||
mod_id=skinrestorer
|
||||
mod_name=SkinRestorer
|
||||
mod_version=2.3.0
|
||||
@@ -21,18 +21,18 @@ description=A server-side mod for managing skins.
|
||||
mineskin_client_version=3.0.1-SNAPSHOT
|
||||
|
||||
# ParchmentMC mappings, see https://parchmentmc.org/docs/getting-started#choose-a-version for new versions
|
||||
parchment_minecraft=1.19.3
|
||||
parchment_version=2023.06.25
|
||||
parchment_minecraft=1.19.2
|
||||
parchment_version=2022.11.27
|
||||
|
||||
# Fabric, see https://fabricmc.net/develop/ for new versions
|
||||
fabric_loader_version=0.15.0
|
||||
fabric_optional_dependencies=
|
||||
|
||||
# Forge, see https://files.minecraftforge.net/net/minecraftforge/forge/ for new versions
|
||||
forge_version=44.0.0
|
||||
forge_loader_version_range=[44,)
|
||||
forge_version=42.0.0
|
||||
forge_loader_version_range=[42,)
|
||||
# Forge sometimes skips minor minecraft versions (like 1.20.5)
|
||||
forge_minecraft_version=1.19.3
|
||||
forge_minecraft_version=1.19.1
|
||||
|
||||
# NeoForge, see https://projects.neoforged.net/neoforged/neoforge for new versions
|
||||
neoforge_version=20.2.3-beta
|
||||
|
||||
Reference in New Issue
Block a user