mirror of
https://github.com/Suiranoil/SkinRestorer.git
synced 2026-01-16 04:42:12 +00:00
Compare commits
30 Commits
1.19.4-mul
...
515b3f10c1
| Author | SHA1 | Date | |
|---|---|---|---|
|
515b3f10c1
|
|||
|
24b956a91c
|
|||
|
905fd9d851
|
|||
|
7849aa9be2
|
|||
|
4dd1c0d386
|
|||
|
bdaf27e68a
|
|||
|
0bd8526f43
|
|||
|
45c438b03e
|
|||
|
c8aa805289
|
|||
|
7958f26acf
|
|||
|
ee0bca8cef
|
|||
|
6c96dcfd4a
|
|||
|
16da52c460
|
|||
|
474f601cc3
|
|||
|
2d3f94c88a
|
|||
|
ff43c18634
|
|||
|
945ce667be
|
|||
|
bd983e10ec
|
|||
|
4afd93e8bf
|
|||
|
c9bf691544
|
|||
|
e4b03a9989
|
|||
|
034d4863b7
|
|||
|
c36eb4db8c
|
|||
|
768125d11d
|
|||
|
e16fbffa5c
|
|||
|
b67ea1bb29
|
|||
|
eeb405dd96
|
|||
|
3509b2e63c
|
|||
|
17e2d1a7c3
|
|||
|
4fb3972416
|
@@ -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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,11 +39,11 @@ public final class Translation {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static MutableComponent translatableWithFallback(String key) {
|
public static MutableComponent translatableWithFallback(String key) {
|
||||||
return Component.translatableWithFallback(key, Translation.get(key));
|
return Component.translatable(Translation.get(key));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static MutableComponent translatableWithFallback(String key, Object... args) {
|
public static MutableComponent translatableWithFallback(String key, Object... args) {
|
||||||
return Component.translatableWithFallback(key, Translation.get(key), args);
|
return Component.translatable(Translation.get(key), args);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void reloadTranslations() {
|
public static void reloadTranslations() {
|
||||||
|
|||||||
@@ -44,12 +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 ClientboundBundlePacket(
|
playerList.broadcastAll(new ClientboundPlayerInfoPacket(ClientboundPlayerInfoPacket.Action.REMOVE_PLAYER, player));
|
||||||
List.of(
|
playerList.broadcastAll(new ClientboundPlayerInfoPacket(ClientboundPlayerInfoPacket.Action.ADD_PLAYER, player));
|
||||||
new ClientboundPlayerInfoRemovePacket(List.of(player.getUUID())),
|
|
||||||
ClientboundPlayerInfoUpdatePacket.createPlayerInitializing(Collections.singleton(player))
|
|
||||||
)
|
|
||||||
));
|
|
||||||
|
|
||||||
var trackedEntity = ((ChunkMapAccessor) chunkMap).getEntityMap().get(player.getId());
|
var trackedEntity = ((ChunkMapAccessor) chunkMap).getEntityMap().get(player.getId());
|
||||||
if (trackedEntity != null) {
|
if (trackedEntity != null) {
|
||||||
@@ -77,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=45.0.0
|
forge_version=42.0.0
|
||||||
forge_loader_version_range=[45,)
|
forge_loader_version_range=[42,)
|
||||||
# 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.4
|
forge_minecraft_version=1.19.1
|
||||||
|
|||||||
@@ -3,9 +3,9 @@ group=net.lionarius
|
|||||||
java_version=17
|
java_version=17
|
||||||
|
|
||||||
# Common
|
# Common
|
||||||
minecraft_version=1.19.4
|
minecraft_version=1.19.1
|
||||||
minecraft_version_list=1.19.4
|
minecraft_version_list=1.19.1,1.19.2
|
||||||
minecraft_version_range=[1.19.4,1.20)
|
minecraft_version_range=[1.19.1,1.19.2]
|
||||||
mod_id=skinrestorer
|
mod_id=skinrestorer
|
||||||
mod_name=SkinRestorer
|
mod_name=SkinRestorer
|
||||||
mod_version=2.4.3
|
mod_version=2.4.3
|
||||||
@@ -21,8 +21,8 @@ description=A server-side mod for managing skins.
|
|||||||
mineskin_client_version=3.0.6-SNAPSHOT
|
mineskin_client_version=3.0.6-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.4
|
parchment_minecraft=1.19.2
|
||||||
parchment_version=2023.06.26
|
parchment_version=2022.11.27
|
||||||
|
|
||||||
# Publishing
|
# Publishing
|
||||||
curseforge_id=443823
|
curseforge_id=443823
|
||||||
|
|||||||
Reference in New Issue
Block a user