Mirror von
https://github.com/GeyserMC/Geyser.git
synchronisiert 2024-12-25 07:40:10 +01:00
Use non-Jitpack MCPL
Dieser Commit ist enthalten in:
Ursprung
3298cdbc3c
Commit
5b5ac3024f
@ -184,7 +184,7 @@ public class GeyserItemStack {
|
||||
|
||||
public SlotDisplay asSlotDisplay() {
|
||||
if (isEmpty()) {
|
||||
return new EmptySlotDisplay();
|
||||
return EmptySlotDisplay.INSTANCE;
|
||||
}
|
||||
return new ItemStackSlotDisplay(this.getItemStack());
|
||||
}
|
||||
|
@ -56,6 +56,19 @@ public final class TagRegistryPopulator {
|
||||
private static final Gson GSON = new GsonBuilder().create(); // temporary
|
||||
|
||||
public static void populate() {
|
||||
Hash.Strategy<int[]> hashStrategy = new Hash.Strategy<>() {
|
||||
// Necessary so arrays can actually be compared
|
||||
@Override
|
||||
public int hashCode(int[] o) {
|
||||
return Arrays.hashCode(o);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(int[] a, int[] b) {
|
||||
return Arrays.equals(a, b);
|
||||
}
|
||||
};
|
||||
|
||||
List<ObjectIntPair<String>> paletteVersions = List.of(
|
||||
ObjectIntPair.of("1_20_80", Bedrock_v671.CODEC.getProtocolVersion()),
|
||||
ObjectIntPair.of("1_21_0", Bedrock_v685.CODEC.getProtocolVersion()),
|
||||
@ -77,18 +90,7 @@ public final class TagRegistryPopulator {
|
||||
throw new AssertionError("Unable to load Bedrock runtime item IDs", e);
|
||||
}
|
||||
|
||||
Object2ObjectMap<int[], String> javaItemsToBedrockTag = new Object2ObjectOpenCustomHashMap<>(new Hash.Strategy<>() {
|
||||
// Necessary so arrays can actually be compared
|
||||
@Override
|
||||
public int hashCode(int[] o) {
|
||||
return Arrays.hashCode(o);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(int[] a, int[] b) {
|
||||
return Arrays.equals(a, b);
|
||||
}
|
||||
});
|
||||
Object2ObjectMap<int[], String> javaItemsToBedrockTag = new Object2ObjectOpenCustomHashMap<>(hashStrategy);
|
||||
|
||||
for (var entry : bedrockTags.entrySet()) {
|
||||
List<String> value = entry.getValue();
|
||||
|
@ -214,6 +214,7 @@ import org.geysermc.mcprotocollib.protocol.packet.common.serverbound.Serverbound
|
||||
import org.geysermc.mcprotocollib.protocol.packet.handshake.serverbound.ClientIntentionPacket;
|
||||
import org.geysermc.mcprotocollib.protocol.packet.ingame.serverbound.ServerboundChatCommandSignedPacket;
|
||||
import org.geysermc.mcprotocollib.protocol.packet.ingame.serverbound.ServerboundChatPacket;
|
||||
import org.geysermc.mcprotocollib.protocol.packet.ingame.serverbound.ServerboundClientTickEndPacket;
|
||||
import org.geysermc.mcprotocollib.protocol.packet.ingame.serverbound.player.ServerboundPlayerAbilitiesPacket;
|
||||
import org.geysermc.mcprotocollib.protocol.packet.ingame.serverbound.player.ServerboundPlayerActionPacket;
|
||||
import org.geysermc.mcprotocollib.protocol.packet.ingame.serverbound.player.ServerboundUseItemPacket;
|
||||
|
@ -15,7 +15,7 @@ protocol-common = "3.0.0.Beta5-20241022.154658-14"
|
||||
protocol-codec = "3.0.0.Beta5-20241022.154658-14"
|
||||
raknet = "1.0.0.CR3-20240416.144209-1"
|
||||
minecraftauth = "4.1.1"
|
||||
mcprotocollib = "1.21.2-SNAPSHOT"
|
||||
mcprotocollib = "1.21.2-20241103.011758-1"
|
||||
adventure = "4.14.0"
|
||||
adventure-platform = "4.3.0"
|
||||
junit = "5.9.2"
|
||||
@ -121,8 +121,7 @@ guava = { group = "com.google.guava", name = "guava", version.ref = "guava" }
|
||||
gson = { group = "com.google.code.gson", name = "gson", version.ref = "gson" }
|
||||
junit = { group = "org.junit.jupiter", name = "junit-jupiter", version.ref = "junit" }
|
||||
minecraftauth = { group = "net.raphimc", name = "MinecraftAuth", version.ref = "minecraftauth" }
|
||||
#mcprotocollib = { group = "org.geysermc.mcprotocollib", name = "protocol", version.ref = "mcprotocollib" }
|
||||
mcprotocollib = { group = "com.github.geysermc", name = "mcprotocollib", version = "feature~1.21.2-SNAPSHOT"}
|
||||
mcprotocollib = { group = "org.geysermc.mcprotocollib", name = "protocol", version.ref = "mcprotocollib" }
|
||||
raknet = { group = "org.cloudburstmc.netty", name = "netty-transport-raknet", version.ref = "raknet" }
|
||||
terminalconsoleappender = { group = "net.minecrell", name = "terminalconsoleappender", version.ref = "terminalconsoleappender" }
|
||||
velocity-api = { group = "com.velocitypowered", name = "velocity-api", version.ref = "velocity" }
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren