Add support for Minecraft 1.13 and 1.13-pre3 to pre10 (protocols 385 to 393).
Add clientbound.login.PluginRequestPacket and serverbound.login.PluginResponsePacket.
This commit is contained in:
1 parent
745aa054b0
commit
adc8d15ddc
19 files changed
+258
-48
No files matched your search
@@ -110,12 +110,17 @@ class Packet(object):
|
||||
str = type(self).__name__
|
||||
if self.id is not None:
|
||||
str = '0x%02X %s' % (self.id, str)
|
||||
if self.definition is not None:
|
||||
str = '%s(%s)' % (str, ', '.join(
|
||||
'%s=%s' % (a, self.field_string(a))
|
||||
for d in self.definition for a in d))
|
||||
fields = self.fields
|
||||
if fields is not None:
|
||||
str = '%s(%s)' % (str, ', '.join('%s=%s' %
|
||||
(a, self.field_string(a)) for a in fields))
|
||||
return str
|
||||
|
||||
@property
|
||||
def fields(self):
|
||||
""" An iterable of the names of the packet's fields, or None. """
|
||||
return (field for defn in self.definition for field in defn)
|
||||
|
||||
def field_string(self, field):
|
||||
""" The string representation of the value of a the given named field
|
||||
of this packet. Override to customise field value representation.
|
||||
|
||||
Reference in new issue
Block a user