mirror of
https://github.com/GeyserMC/MCProtocolLib.git
synced 2024-11-24 08:08:20 -05:00
This commit is contained in:
parent
2b3d8cbec1
commit
1702924c95
3 changed files with 35 additions and 16 deletions
|
@ -210,9 +210,9 @@ import org.geysermc.mcprotocollib.protocol.packet.status.serverbound.Serverbound
|
|||
|
||||
public class MinecraftCodec {
|
||||
public static final PacketCodec CODEC = PacketCodec.builder()
|
||||
.protocolVersion((1 << 30) | 210)
|
||||
.protocolVersion((1 << 30) | 211)
|
||||
.helper(MinecraftCodecHelper::new)
|
||||
.minecraftVersion("24w38a")
|
||||
.minecraftVersion("24w39a")
|
||||
.state(ProtocolState.HANDSHAKE, MinecraftPacketRegistry.builder()
|
||||
.registerServerboundPacket(ClientIntentionPacket.class, ClientIntentionPacket::new)
|
||||
)
|
||||
|
|
|
@ -3,47 +3,56 @@ package org.geysermc.mcprotocollib.protocol.data.game.entity.type;
|
|||
import lombok.Getter;
|
||||
|
||||
public enum EntityType {
|
||||
ACACIA_BOAT,
|
||||
ACACIA_CHEST_BOAT,
|
||||
ALLAY,
|
||||
AREA_EFFECT_CLOUD,
|
||||
ARMADILLO,
|
||||
ARMOR_STAND,
|
||||
ARROW(true),
|
||||
AXOLOTL,
|
||||
BAMBOO_CHEST_RAFT,
|
||||
BAMBOO_RAFT,
|
||||
BAT,
|
||||
BEE,
|
||||
BIRCH_BOAT,
|
||||
BIRCH_CHEST_BOAT,
|
||||
BLAZE,
|
||||
BLOCK_DISPLAY,
|
||||
BOAT,
|
||||
BOGGED,
|
||||
BREEZE,
|
||||
BREEZE_WIND_CHARGE(true),
|
||||
CAMEL,
|
||||
CAT,
|
||||
CAVE_SPIDER,
|
||||
CHEST_BOAT,
|
||||
CHERRY_BOAT,
|
||||
CHERRY_CHEST_BOAT,
|
||||
CHEST_MINECART,
|
||||
CHICKEN,
|
||||
COD,
|
||||
COMMAND_BLOCK_MINECART,
|
||||
COW,
|
||||
CREEPER,
|
||||
DARK_OAK_BOAT,
|
||||
DARK_OAK_CHEST_BOAT,
|
||||
DOLPHIN,
|
||||
DONKEY,
|
||||
DRAGON_FIREBALL(true),
|
||||
DROWNED,
|
||||
EGG(true),
|
||||
ELDER_GUARDIAN,
|
||||
END_CRYSTAL,
|
||||
ENDER_DRAGON,
|
||||
ENDER_PEARL(true),
|
||||
ENDERMAN,
|
||||
ENDERMITE,
|
||||
ENDER_DRAGON,
|
||||
ENDER_PEARL(true),
|
||||
END_CRYSTAL,
|
||||
EVOKER,
|
||||
EVOKER_FANGS,
|
||||
EXPERIENCE_BOTTLE(true),
|
||||
EXPERIENCE_ORB,
|
||||
EYE_OF_ENDER,
|
||||
FALLING_BLOCK,
|
||||
FIREBALL(true),
|
||||
FIREWORK_ROCKET(true),
|
||||
FOX,
|
||||
FROG,
|
||||
|
@ -64,18 +73,23 @@ public enum EntityType {
|
|||
ITEM,
|
||||
ITEM_DISPLAY,
|
||||
ITEM_FRAME,
|
||||
OMINOUS_ITEM_SPAWNER,
|
||||
FIREBALL(true),
|
||||
JUNGLE_BOAT,
|
||||
JUNGLE_CHEST_BOAT,
|
||||
LEASH_KNOT,
|
||||
LIGHTNING_BOLT,
|
||||
LLAMA,
|
||||
LLAMA_SPIT(true),
|
||||
MAGMA_CUBE,
|
||||
MANGROVE_BOAT,
|
||||
MANGROVE_CHEST_BOAT,
|
||||
MARKER,
|
||||
MINECART,
|
||||
MOOSHROOM,
|
||||
MULE,
|
||||
OAK_BOAT,
|
||||
OAK_CHEST_BOAT,
|
||||
OCELOT,
|
||||
OMINOUS_ITEM_SPAWNER,
|
||||
PAINTING,
|
||||
PANDA,
|
||||
PARROT,
|
||||
|
@ -99,11 +113,13 @@ public enum EntityType {
|
|||
SLIME,
|
||||
SMALL_FIREBALL(true),
|
||||
SNIFFER,
|
||||
SNOW_GOLEM,
|
||||
SNOWBALL(true),
|
||||
SNOW_GOLEM,
|
||||
SPAWNER_MINECART,
|
||||
SPECTRAL_ARROW(true),
|
||||
SPIDER,
|
||||
SPRUCE_BOAT,
|
||||
SPRUCE_CHEST_BOAT,
|
||||
SQUID,
|
||||
STRAY,
|
||||
STRIDER,
|
||||
|
|
|
@ -11,17 +11,20 @@ import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket;
|
|||
@With
|
||||
@AllArgsConstructor
|
||||
public class ClientboundSetTimePacket implements MinecraftPacket {
|
||||
private final long worldAge;
|
||||
private final long time;
|
||||
private final long gameTime;
|
||||
private final long dayTime;
|
||||
private final boolean tickDayTime;
|
||||
|
||||
public ClientboundSetTimePacket(ByteBuf in, MinecraftCodecHelper helper) {
|
||||
this.worldAge = in.readLong();
|
||||
this.time = in.readLong();
|
||||
this.gameTime = in.readLong();
|
||||
this.dayTime = in.readLong();
|
||||
this.tickDayTime = in.readBoolean();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void serialize(ByteBuf out, MinecraftCodecHelper helper) {
|
||||
out.writeLong(this.worldAge);
|
||||
out.writeLong(this.time);
|
||||
out.writeLong(this.gameTime);
|
||||
out.writeLong(this.dayTime);
|
||||
out.writeBoolean(this.tickDayTime);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue