mirror of
https://github.com/Suiranoil/SkinRestorer.git
synced 2026-01-16 04:42:12 +00:00
Compare commits
9 Commits
24b956a91c
...
1.19-multi
| Author | SHA1 | Date | |
|---|---|---|---|
|
42f9103f72
|
|||
|
e4b03a9989
|
|||
|
4af85d2c6c
|
|||
|
c36eb4db8c
|
|||
|
90e4e2c2c9
|
|||
|
1f265a0802
|
|||
|
e16fbffa5c
|
|||
|
b67ea1bb29
|
|||
|
17e2d1a7c3
|
@@ -128,7 +128,7 @@ public final class SkinCommand {
|
|||||||
boolean save,
|
boolean save,
|
||||||
boolean setByOperator
|
boolean setByOperator
|
||||||
) {
|
) {
|
||||||
src.sendSystemMessage(Translation.translatableWithFallback(Translation.COMMAND_SKIN_LOADING_KEY));
|
src.sendSuccess(Translation.translatableWithFallback(Translation.COMMAND_SKIN_LOADING_KEY), false);
|
||||||
|
|
||||||
SkinRestorer.setSkinAsync(src.getServer(), targets, context, save).thenAccept(result -> {
|
SkinRestorer.setSkinAsync(src.getServer(), targets, context, save).thenAccept(result -> {
|
||||||
if (result.isError()) {
|
if (result.isError()) {
|
||||||
|
|||||||
@@ -9,11 +9,25 @@ import org.jetbrains.annotations.Nullable;
|
|||||||
|
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
public record SkinValue(@NotNull String provider, @Nullable String argument, @Nullable SkinVariant variant,
|
public final class SkinValue implements GsonPostProcessable {
|
||||||
@Nullable Property value, @Nullable Property originalValue) implements GsonPostProcessable {
|
|
||||||
|
|
||||||
public static final SkinValue EMPTY = new SkinValue(EmptySkinProvider.PROVIDER_NAME, null, null, null);
|
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) {
|
public SkinValue(String provider, String argument, SkinVariant variant, Property value) {
|
||||||
this(provider, argument, variant, value, null);
|
this(provider, argument, variant, value, null);
|
||||||
}
|
}
|
||||||
@@ -38,4 +52,23 @@ public record SkinValue(@NotNull String provider, @Nullable String argument, @Nu
|
|||||||
public void gsonPostProcess() {
|
public void gsonPostProcess() {
|
||||||
Objects.requireNonNull(this.provider);
|
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();
|
PlayerList playerList = serverLevel.getServer().getPlayerList();
|
||||||
ChunkMap chunkMap = serverLevel.getChunkSource().chunkMap;
|
ChunkMap chunkMap = serverLevel.getChunkSource().chunkMap;
|
||||||
|
|
||||||
playerList.broadcastAll(new ClientboundPlayerInfoRemovePacket(List.of(player.getUUID())));
|
playerList.broadcastAll(new ClientboundPlayerInfoPacket(ClientboundPlayerInfoPacket.Action.REMOVE_PLAYER, player));
|
||||||
playerList.broadcastAll(ClientboundPlayerInfoUpdatePacket.createPlayerInitializing(Collections.singleton(player)));
|
playerList.broadcastAll(new ClientboundPlayerInfoPacket(ClientboundPlayerInfoPacket.Action.ADD_PLAYER, player));
|
||||||
|
|
||||||
var trackedEntity = (TrackedEntityAccessorInvoker) ((ChunkMapAccessor) chunkMap).getEntityMap().get(player.getId());
|
var trackedEntity = (TrackedEntityAccessorInvoker) ((ChunkMapAccessor) chunkMap).getEntityMap().get(player.getId());
|
||||||
if (trackedEntity != null) {
|
if (trackedEntity != null) {
|
||||||
@@ -73,7 +73,7 @@ public final class PlayerUtils {
|
|||||||
player.gameMode.getPreviousGameModeForPlayer(),
|
player.gameMode.getPreviousGameModeForPlayer(),
|
||||||
player.getLevel().isDebug(),
|
player.getLevel().isDebug(),
|
||||||
player.getLevel().isFlat(),
|
player.getLevel().isFlat(),
|
||||||
(byte) 3,
|
true,
|
||||||
player.getLastDeathLocation()
|
player.getLastDeathLocation()
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# Forge, see https://files.minecraftforge.net/net/minecraftforge/forge/ for new versions
|
# Forge, see https://files.minecraftforge.net/net/minecraftforge/forge/ for new versions
|
||||||
forge_version=44.0.0
|
forge_version=41.0.1
|
||||||
forge_loader_version_range=[44,)
|
forge_loader_version_range=[41,)
|
||||||
# Forge sometimes skips minor minecraft versions (like 1.20.5)
|
# Forge sometimes skips minor minecraft versions (like 1.20.5)
|
||||||
forge_minecraft_version=1.19.3
|
forge_minecraft_version=1.19
|
||||||
|
|||||||
@@ -3,9 +3,9 @@ group=net.lionarius
|
|||||||
java_version=17
|
java_version=17
|
||||||
|
|
||||||
# Common
|
# Common
|
||||||
minecraft_version=1.19.3
|
minecraft_version=1.19
|
||||||
minecraft_version_list=1.19.3
|
minecraft_version_list=1.19
|
||||||
minecraft_version_range=[1.19.3,1.19.4)
|
minecraft_version_range=[1.19,1.19.1)
|
||||||
mod_id=skinrestorer
|
mod_id=skinrestorer
|
||||||
mod_name=SkinRestorer
|
mod_name=SkinRestorer
|
||||||
mod_version=2.3.2
|
mod_version=2.3.2
|
||||||
@@ -21,8 +21,8 @@ description=A server-side mod for managing skins.
|
|||||||
mineskin_client_version=3.0.1-SNAPSHOT
|
mineskin_client_version=3.0.1-SNAPSHOT
|
||||||
|
|
||||||
# ParchmentMC mappings, see https://parchmentmc.org/docs/getting-started#choose-a-version for new versions
|
# ParchmentMC mappings, see https://parchmentmc.org/docs/getting-started#choose-a-version for new versions
|
||||||
parchment_minecraft=1.19.3
|
parchment_minecraft=1.19.2
|
||||||
parchment_version=2023.06.25
|
parchment_version=2022.11.27
|
||||||
|
|
||||||
# Publishing
|
# Publishing
|
||||||
curseforge_id=443823
|
curseforge_id=443823
|
||||||
|
|||||||
Reference in New Issue
Block a user