Update SoundEffectPacket and UseItemPacket to 1.14; misc improvements

This commit is contained in:
joodicator committed 2019-05-13 21:58:59 +02:00
1 parent faf02acf62
commit d24b6eaded
5 files changed
+104 -43

No files matched your search

+7
View File
@@ -221,6 +221,13 @@ class TestReadWritePackets(unittest.TestCase):
self._test_read_write_packet(packet)
self._test_read_write_packet(packet2)
def test_sound_effect_packet(self):
SoundCategory = clientbound.play.SoundEffectPacket.SoundCategory
packet = clientbound.play.SoundEffectPacket(
sound_category=SoundCategory.NEUTRAL, sound_id=545,
effect_position=Vector(0.125, 300.0, 50.5), volume=0.75, pitch=1.5)
self._test_read_write_packet(packet)
def _test_read_write_packet(self, packet_in):
packet_in.context = self.context
packet_buffer = PacketBuffer()