update 1.19.2 packetid
This commit is contained in:
40
data/packetid/generator/Main.java
Normal file
40
data/packetid/generator/Main.java
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
package me.tnze;
|
||||||
|
|
||||||
|
import it.unimi.dsi.fastutil.ints.Int2ObjectMap;
|
||||||
|
import net.minecraft.network.ConnectionProtocol;
|
||||||
|
import net.minecraft.network.protocol.Packet;
|
||||||
|
import net.minecraft.network.protocol.PacketFlow;
|
||||||
|
|
||||||
|
public class Main {
|
||||||
|
|
||||||
|
public static void main(String[] args) throws Exception {
|
||||||
|
handlePackets(ConnectionProtocol.LOGIN.getPacketsByIds(PacketFlow.CLIENTBOUND));
|
||||||
|
System.out.println();
|
||||||
|
handlePackets(ConnectionProtocol.LOGIN.getPacketsByIds(PacketFlow.SERVERBOUND));
|
||||||
|
System.out.println();
|
||||||
|
System.out.println();
|
||||||
|
handlePackets(ConnectionProtocol.STATUS.getPacketsByIds(PacketFlow.CLIENTBOUND));
|
||||||
|
System.out.println();
|
||||||
|
handlePackets(ConnectionProtocol.STATUS.getPacketsByIds(PacketFlow.SERVERBOUND));
|
||||||
|
System.out.println();
|
||||||
|
System.out.println();
|
||||||
|
handlePackets(ConnectionProtocol.PLAY.getPacketsByIds(PacketFlow.CLIENTBOUND));
|
||||||
|
System.out.println();
|
||||||
|
handlePackets(ConnectionProtocol.PLAY.getPacketsByIds(PacketFlow.SERVERBOUND));
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void handlePackets(Int2ObjectMap<Class<? extends Packet<?>>> packets) {
|
||||||
|
for (int i = 0; i < packets.size(); i++) {
|
||||||
|
Class<? extends Packet<?>> c = packets.get(i);
|
||||||
|
String className = c.getSimpleName();
|
||||||
|
if (className.endsWith("Packet"))
|
||||||
|
className = className.substring(0, className.length() - "Packet".length());
|
||||||
|
else {
|
||||||
|
String superClassName = c.getSuperclass().getSimpleName();
|
||||||
|
if (superClassName.endsWith("Packet"))
|
||||||
|
className = superClassName.substring(0, superClassName.length() - "Packet".length()) + className;
|
||||||
|
}
|
||||||
|
System.out.println(className);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -51,8 +51,10 @@ const (
|
|||||||
ClientboundContainerSetData
|
ClientboundContainerSetData
|
||||||
ClientboundContainerSetSlot
|
ClientboundContainerSetSlot
|
||||||
ClientboundCooldown
|
ClientboundCooldown
|
||||||
|
ClientboundCustomChatCompletions
|
||||||
ClientboundCustomPayload
|
ClientboundCustomPayload
|
||||||
ClientboundCustomSound
|
ClientboundCustomSound
|
||||||
|
ClientboundDeleteChat
|
||||||
ClientboundDisconnect
|
ClientboundDisconnect
|
||||||
ClientboundEntityEvent
|
ClientboundEntityEvent
|
||||||
ClientboundExplode
|
ClientboundExplode
|
||||||
@ -78,6 +80,7 @@ const (
|
|||||||
ClientboundPing
|
ClientboundPing
|
||||||
ClientboundPlaceGhostRecipe
|
ClientboundPlaceGhostRecipe
|
||||||
ClientboundPlayerAbilities
|
ClientboundPlayerAbilities
|
||||||
|
ClientboundPlayerChatHeader
|
||||||
ClientboundPlayerChat
|
ClientboundPlayerChat
|
||||||
ClientboundPlayerCombatEnd
|
ClientboundPlayerCombatEnd
|
||||||
ClientboundPlayerCombatEnter
|
ClientboundPlayerCombatEnter
|
||||||
@ -142,6 +145,7 @@ const (
|
|||||||
ServerboundAcceptTeleportation = iota
|
ServerboundAcceptTeleportation = iota
|
||||||
ServerboundBlockEntityTagQuery
|
ServerboundBlockEntityTagQuery
|
||||||
ServerboundChangeDifficulty
|
ServerboundChangeDifficulty
|
||||||
|
ServerboundChatAck
|
||||||
ServerboundChatCommand
|
ServerboundChatCommand
|
||||||
ServerboundChat
|
ServerboundChat
|
||||||
ServerboundChatPreview
|
ServerboundChatPreview
|
||||||
|
Reference in New Issue
Block a user