Skip to content

Commit 75a74b5

Browse files
committed
25w06a
1 parent b9561d7 commit 75a74b5

File tree

7 files changed

+35
-12
lines changed

7 files changed

+35
-12
lines changed

protocol/src/main/java/org/geysermc/mcprotocollib/protocol/codec/MinecraftCodec.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,8 +218,8 @@
218218

219219
public class MinecraftCodec {
220220
public static final PacketCodec CODEC = PacketCodec.builder()
221-
.protocolVersion((1 << 30) | 232)
222-
.minecraftVersion("25w05a")
221+
.protocolVersion((1 << 30) | 233)
222+
.minecraftVersion("25w06a")
223223
.state(ProtocolState.HANDSHAKE, MinecraftPacketRegistry.builder()
224224
.registerServerboundPacket(ClientIntentionPacket.class, ClientIntentionPacket::new)
225225
)

protocol/src/main/java/org/geysermc/mcprotocollib/protocol/codec/MinecraftTypes.java

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -666,6 +666,24 @@ public static void writePigVariant(ByteBuf buf, Holder<PigVariant> variantHolder
666666
});
667667
}
668668

669+
public static Holder<Key> readChickenVariant(ByteBuf buf) {
670+
if (buf.readBoolean()) {
671+
return Holder.ofId(MinecraftTypes.readVarInt(buf));
672+
} else {
673+
return Holder.ofCustom(MinecraftTypes.readResourceLocation(buf));
674+
}
675+
}
676+
677+
public static void writeChickenVariant(ByteBuf buf, Holder<Key> variant) {
678+
if (variant.isId()) {
679+
buf.writeBoolean(true);
680+
MinecraftTypes.writeVarInt(buf, variant.id());
681+
} else {
682+
buf.writeBoolean(false);
683+
MinecraftTypes.writeResourceLocation(buf, variant.custom());
684+
}
685+
}
686+
669687
public static Holder<PaintingVariant> readPaintingVariant(ByteBuf buf) {
670688
return MinecraftTypes.readHolder(buf, input -> {
671689
return new PaintingVariant(MinecraftTypes.readVarInt(input), MinecraftTypes.readVarInt(input), MinecraftTypes.readResourceLocation(input),

protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/entity/metadata/MetadataTypes.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ public class MetadataTypes {
5252
public static final OptionalIntMetadataType OPTIONAL_VARINT = register(id -> new OptionalIntMetadataType(id, ObjectEntityMetadata::new));
5353
public static final MetadataType<Pose> POSE = register(id -> new MetadataType<>(id, MinecraftTypes::readPose, MinecraftTypes::writePose, ObjectEntityMetadata::new));
5454
public static final IntMetadataType CAT_VARIANT = register(id -> new IntMetadataType(id, MinecraftTypes::readVarInt, MinecraftTypes::writeVarInt, IntEntityMetadata::new));
55+
public static final IntMetadataType CHICKEN_VARIANT = register(id -> new IntMetadataType(id, MinecraftTypes::readVarInt, MinecraftTypes::writeVarInt, IntEntityMetadata::new));
5556
public static final IntMetadataType COW_VARIANT = register(id -> new IntMetadataType(id, MinecraftTypes::readVarInt, MinecraftTypes::writeVarInt, IntEntityMetadata::new));
5657
public static final MetadataType<Holder<WolfVariant>> WOLF_VARIANT = register(id -> new MetadataType<>(id, MinecraftTypes::readWolfVariant, MinecraftTypes::writeWolfVariant, ObjectEntityMetadata::new));
5758
public static final IntMetadataType FROG_VARIANT = register(id -> new IntMetadataType(id, MinecraftTypes::readVarInt, MinecraftTypes::writeVarInt, IntEntityMetadata::new));

protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/item/component/DataComponentTypes.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ public class DataComponentTypes {
111111
public static final IntComponentType RABBIT_VARIANT = register(id -> new IntComponentType(id, "rabbit/variant", MinecraftTypes::readVarInt, MinecraftTypes::writeVarInt, IntDataComponent::new));
112112
public static final DataComponentType<Holder<PigVariant>> PIG_VARIANT = register(id -> new DataComponentType<>(id, "pig/variant", MinecraftTypes::readPigVariant, MinecraftTypes::writePigVariant, ObjectDataComponent::new));
113113
public static final IntComponentType COW_VARIANT = register(id -> new IntComponentType(id, "cow/variant", MinecraftTypes::readVarInt, MinecraftTypes::writeVarInt, IntDataComponent::new));
114+
public static final DataComponentType<Holder<Key>> CHICKEN_VARIANT = register(id -> new DataComponentType<>(id, "chicken/variant", MinecraftTypes::readChickenVariant, MinecraftTypes::writeChickenVariant, ObjectDataComponent::new));
114115
public static final IntComponentType FROG_VARIANT = register(id -> new IntComponentType(id, "frog/variant", MinecraftTypes::readVarInt, MinecraftTypes::writeVarInt, IntDataComponent::new));
115116
public static final IntComponentType HORSE_VARIANT = register(id -> new IntComponentType(id, "horse/variant", MinecraftTypes::readVarInt, MinecraftTypes::writeVarInt, IntDataComponent::new));
116117
public static final DataComponentType<Holder<PaintingVariant>> PAINTING_VARIANT = register(id -> new DataComponentType<>(id, "painting/variant", MinecraftTypes::readPaintingVariant, MinecraftTypes::writePaintingVariant, ObjectDataComponent::new));

protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/level/sound/BuiltinSound.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,8 @@ public enum BuiltinSound implements Sound {
234234
ITEM_BUNDLE_INSERT("item.bundle.insert"),
235235
ITEM_BUNDLE_INSERT_FAIL("item.bundle.insert_fail"),
236236
ITEM_BUNDLE_REMOVE_ONE("item.bundle.remove_one"),
237+
BLOCK_CACTUS_FLOWER_BREAK("block.cactus_flower.break"),
238+
BLOCK_CACTUS_FLOWER_PLACE("block.cactus_flower.place"),
237239
BLOCK_CAKE_ADD_CANDLE("block.cake.add_candle"),
238240
BLOCK_CALCITE_BREAK("block.calcite.break"),
239241
BLOCK_CALCITE_STEP("block.calcite.step"),
@@ -539,6 +541,7 @@ public enum BuiltinSound implements Sound {
539541
BLOCK_FENCE_GATE_CLOSE("block.fence_gate.close"),
540542
BLOCK_FENCE_GATE_OPEN("block.fence_gate.open"),
541543
ITEM_FIRECHARGE_USE("item.firecharge.use"),
544+
BLOCK_FIREFLY_BUSH_IDLE("block.firefly_bush.idle"),
542545
ENTITY_FIREWORK_ROCKET_BLAST("entity.firework_rocket.blast"),
543546
ENTITY_FIREWORK_ROCKET_BLAST_FAR("entity.firework_rocket.blast_far"),
544547
ENTITY_FIREWORK_ROCKET_LARGE_BLAST("entity.firework_rocket.large_blast"),

protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/ClientboundBlockEventPacket.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,16 @@ public class ClientboundBlockEventPacket implements MinecraftPacket {
3939
// Do we really want these hardcoded values?
4040
private static final int NOTE_BLOCK = 109;
4141
private static final int STICKY_PISTON = 128;
42-
private static final int PISTON = 136;
43-
private static final int MOB_SPAWNER = 183;
44-
private static final int CHEST = 186;
45-
private static final int ENDER_CHEST = 366;
46-
private static final int TRAPPED_CHEST = 435;
47-
private static final int END_GATEWAY = 632;
48-
private static final int SHULKER_BOX_LOWER = 642;
49-
private static final int SHULKER_BOX_HIGHER = 658;
50-
private static final int BELL = 812;
51-
private static final int DECORATED_POT = 1088;
42+
private static final int PISTON = 138;
43+
private static final int MOB_SPAWNER = 185;
44+
private static final int CHEST = 188;
45+
private static final int ENDER_CHEST = 369;
46+
private static final int TRAPPED_CHEST = 438;
47+
private static final int END_GATEWAY = 635;
48+
private static final int SHULKER_BOX_LOWER = 645;
49+
private static final int SHULKER_BOX_HIGHER = 661;
50+
private static final int BELL = 815;
51+
private static final int DECORATED_POT = 1091;
5252
private static final Logger log = LoggerFactory.getLogger(ClientboundBlockEventPacket.class);
5353

5454
private final @NonNull Vector3i position;
43 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)