From 4d12c78f8943f51cf02b32830404b2bbf431d534 Mon Sep 17 00:00:00 2001 From: ice_iix Date: Sat, 27 Jun 2020 17:44:52 -0700 Subject: [PATCH] Add new GenerateStructure packet --- protocol/src/protocol/packet.rs | 6 ++++++ protocol/src/protocol/versions/v1_16_1.rs | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/protocol/src/protocol/packet.rs b/protocol/src/protocol/packet.rs index 162779a..3477a0e 100644 --- a/protocol/src/protocol/packet.rs +++ b/protocol/src/protocol/packet.rs @@ -207,6 +207,12 @@ state_packets!( field target_id: i32 =, field ty: u8 =, } + /// Sent when Generate is pressed on the Jigsaw Block interface. + packet GenerateStructure { + field location: Position =, + field levels: VarInt =, + field keep_jigsaws: bool =, + } /// KeepAliveServerbound is sent by a client as a response to a /// KeepAliveClientbound. If the client doesn't reply the server /// may disconnect the client. diff --git a/protocol/src/protocol/versions/v1_16_1.rs b/protocol/src/protocol/versions/v1_16_1.rs index 7d6664b..40b6be8 100644 --- a/protocol/src/protocol/versions/v1_16_1.rs +++ b/protocol/src/protocol/versions/v1_16_1.rs @@ -23,7 +23,7 @@ protocol_packet_ids!( 0x0c => EditBook 0x0d => QueryEntityNBT 0x0e => UseEntity_Sneakflag - //0x0f => GenerateStructure // TODO + 0x0f => GenerateStructure 0x10 => KeepAliveServerbound_i64 0x11 => LockDifficulty 0x12 => PlayerPosition