mirror of
https://github.com/Xiao-MoMi/craft-engine.git
synced 2025-12-28 03:19:14 +00:00
初步添加playerinfo所需的类
This commit is contained in:
@@ -37,4 +37,6 @@ public interface PacketIds {
|
||||
int clientboundSetObjectivePacket();
|
||||
|
||||
int clientboundLevelChunkWithLightPacket();
|
||||
|
||||
int clientboundPlayerInfoUpdatePacket();
|
||||
}
|
||||
|
||||
@@ -94,4 +94,9 @@ public class PacketIds1_20 implements PacketIds {
|
||||
public int clientboundLevelChunkWithLightPacket() {
|
||||
return PacketIdFinder.clientboundByClazz(Reflections.clazz$ClientboundLevelChunkWithLightPacket);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int clientboundPlayerInfoUpdatePacket() {
|
||||
return PacketIdFinder.clientboundByClazz(Reflections.clazz$clientboundplayer);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -93,4 +93,9 @@ public class PacketIds1_20_5 implements PacketIds {
|
||||
public int clientboundLevelChunkWithLightPacket() {
|
||||
return PacketIdFinder.clientboundByName("minecraft:level_chunk_with_light");
|
||||
}
|
||||
|
||||
@Override
|
||||
public int clientboundPlayerInfoUpdatePacket() {
|
||||
return PacketIdFinder.clientboundByName("minecraft:player_info_update");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1745,6 +1745,12 @@ public class Reflections {
|
||||
)
|
||||
);
|
||||
|
||||
public static final Class<?> clazz$ClientboundPlayerInfoUpdatePacket = requireNonNull(
|
||||
ReflectionUtils.getClazz(
|
||||
BukkitReflectionUtils.assembleMCClass("network.protocol.game.ClientboundPlayerInfoUpdatePacket")
|
||||
)
|
||||
);
|
||||
|
||||
public static final Field field$ClientboundLevelChunkWithLightPacket$chunkData = requireNonNull(
|
||||
ReflectionUtils.getDeclaredField(
|
||||
clazz$ClientboundLevelChunkWithLightPacket, clazz$ClientboundLevelChunkPacketData, 0
|
||||
|
||||
Reference in New Issue
Block a user