mirror of
https://github.com/GeyserMC/Geyser.git
synced 2024-12-22 22:45:04 +01:00
Use non-Jitpack MCPL
This commit is contained in:
parent
3298cdbc3c
commit
5b5ac3024f
4 changed files with 18 additions and 16 deletions
|
@ -184,7 +184,7 @@ public class GeyserItemStack {
|
||||||
|
|
||||||
public SlotDisplay asSlotDisplay() {
|
public SlotDisplay asSlotDisplay() {
|
||||||
if (isEmpty()) {
|
if (isEmpty()) {
|
||||||
return new EmptySlotDisplay();
|
return EmptySlotDisplay.INSTANCE;
|
||||||
}
|
}
|
||||||
return new ItemStackSlotDisplay(this.getItemStack());
|
return new ItemStackSlotDisplay(this.getItemStack());
|
||||||
}
|
}
|
||||||
|
|
|
@ -56,6 +56,19 @@ public final class TagRegistryPopulator {
|
||||||
private static final Gson GSON = new GsonBuilder().create(); // temporary
|
private static final Gson GSON = new GsonBuilder().create(); // temporary
|
||||||
|
|
||||||
public static void populate() {
|
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(
|
List<ObjectIntPair<String>> paletteVersions = List.of(
|
||||||
ObjectIntPair.of("1_20_80", Bedrock_v671.CODEC.getProtocolVersion()),
|
ObjectIntPair.of("1_20_80", Bedrock_v671.CODEC.getProtocolVersion()),
|
||||||
ObjectIntPair.of("1_21_0", Bedrock_v685.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);
|
throw new AssertionError("Unable to load Bedrock runtime item IDs", e);
|
||||||
}
|
}
|
||||||
|
|
||||||
Object2ObjectMap<int[], String> javaItemsToBedrockTag = new Object2ObjectOpenCustomHashMap<>(new Hash.Strategy<>() {
|
Object2ObjectMap<int[], String> javaItemsToBedrockTag = new Object2ObjectOpenCustomHashMap<>(hashStrategy);
|
||||||
// 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);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
for (var entry : bedrockTags.entrySet()) {
|
for (var entry : bedrockTags.entrySet()) {
|
||||||
List<String> value = entry.getValue();
|
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.handshake.serverbound.ClientIntentionPacket;
|
||||||
import org.geysermc.mcprotocollib.protocol.packet.ingame.serverbound.ServerboundChatCommandSignedPacket;
|
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.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.ServerboundPlayerAbilitiesPacket;
|
||||||
import org.geysermc.mcprotocollib.protocol.packet.ingame.serverbound.player.ServerboundPlayerActionPacket;
|
import org.geysermc.mcprotocollib.protocol.packet.ingame.serverbound.player.ServerboundPlayerActionPacket;
|
||||||
import org.geysermc.mcprotocollib.protocol.packet.ingame.serverbound.player.ServerboundUseItemPacket;
|
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"
|
protocol-codec = "3.0.0.Beta5-20241022.154658-14"
|
||||||
raknet = "1.0.0.CR3-20240416.144209-1"
|
raknet = "1.0.0.CR3-20240416.144209-1"
|
||||||
minecraftauth = "4.1.1"
|
minecraftauth = "4.1.1"
|
||||||
mcprotocollib = "1.21.2-SNAPSHOT"
|
mcprotocollib = "1.21.2-20241103.011758-1"
|
||||||
adventure = "4.14.0"
|
adventure = "4.14.0"
|
||||||
adventure-platform = "4.3.0"
|
adventure-platform = "4.3.0"
|
||||||
junit = "5.9.2"
|
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" }
|
gson = { group = "com.google.code.gson", name = "gson", version.ref = "gson" }
|
||||||
junit = { group = "org.junit.jupiter", name = "junit-jupiter", version.ref = "junit" }
|
junit = { group = "org.junit.jupiter", name = "junit-jupiter", version.ref = "junit" }
|
||||||
minecraftauth = { group = "net.raphimc", name = "MinecraftAuth", version.ref = "minecraftauth" }
|
minecraftauth = { group = "net.raphimc", name = "MinecraftAuth", version.ref = "minecraftauth" }
|
||||||
#mcprotocollib = { group = "org.geysermc.mcprotocollib", name = "protocol", version.ref = "mcprotocollib" }
|
mcprotocollib = { group = "org.geysermc.mcprotocollib", name = "protocol", version.ref = "mcprotocollib" }
|
||||||
mcprotocollib = { group = "com.github.geysermc", name = "mcprotocollib", version = "feature~1.21.2-SNAPSHOT"}
|
|
||||||
raknet = { group = "org.cloudburstmc.netty", name = "netty-transport-raknet", version.ref = "raknet" }
|
raknet = { group = "org.cloudburstmc.netty", name = "netty-transport-raknet", version.ref = "raknet" }
|
||||||
terminalconsoleappender = { group = "net.minecrell", name = "terminalconsoleappender", version.ref = "terminalconsoleappender" }
|
terminalconsoleappender = { group = "net.minecrell", name = "terminalconsoleappender", version.ref = "terminalconsoleappender" }
|
||||||
velocity-api = { group = "com.velocitypowered", name = "velocity-api", version.ref = "velocity" }
|
velocity-api = { group = "com.velocitypowered", name = "velocity-api", version.ref = "velocity" }
|
||||||
|
|
Loading…
Reference in a new issue