From 255b78e02c619907e2a9a217376ba833def3e913 Mon Sep 17 00:00:00 2001 From: Joe Sorensen Date: Wed, 15 Mar 2023 08:36:55 -0600 Subject: [PATCH] tiny one line change to fix writing packets not working (#290) ## Description With component division, the WritePacket trait was pub(crate), which disallowed writing packets outside of valence. This 1 line PR fixes that. ## Test Plan It might be a good idea to include examples/tests that use packet writing to catch this, but it's most likely not strictly necessary. --- crates/valence/src/packet.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/valence/src/packet.rs b/crates/valence/src/packet.rs index 671c6f5..5b903ac 100644 --- a/crates/valence/src/packet.rs +++ b/crates/valence/src/packet.rs @@ -5,7 +5,7 @@ use valence_protocol::codec::{encode_packet, encode_packet_compressed, PacketEnc use valence_protocol::Packet; /// Types that can have packets written to them. -pub(crate) trait WritePacket { +pub trait WritePacket { /// Writes a packet to this object. Encoding errors are typically logged and /// discarded. fn write_packet<'a>(&mut self, packet: &impl Packet<'a>);