Collect and equip armor supplies
This commit is contained in:
1 parent
c97e836380
commit
9c0db4e4b0
4 files changed
+111
-6
No files matched your search
@@ -137,6 +137,21 @@ class TestInventoryDrain(unittest.TestCase):
|
||||
self.assertEqual(payload.get_writable(), bytes.fromhex(
|
||||
'0307002a00010000'))
|
||||
|
||||
def test_player_inventory_quick_move_uses_window_zero(self):
|
||||
connection = FakeConnection()
|
||||
game = Game.__new__(Game)
|
||||
game.g = Munch(
|
||||
connection=connection, window=None,
|
||||
inventory_state_ids={0: 12},
|
||||
)
|
||||
|
||||
self.assertTrue(game.quick_move_inventory_slot(10))
|
||||
packet = connection.packets[0][0]
|
||||
self.assertIsInstance(packet, ContainerClickQuickMovePacket)
|
||||
self.assertEqual((packet.container_id, packet.state_id, packet.slot),
|
||||
(0, 12, 10))
|
||||
self.assertIsInstance(connection.packets[1][0], ClientTickEnd)
|
||||
|
||||
def test_open_window_packet_decodes_container_metadata(self):
|
||||
# window id, menu type, empty anonymous-NBT title
|
||||
packet = ContainerOpenPacket()
|
||||
|
||||
Reference in new issue
Block a user