Add aliases for Enums in Packet Definitions
This commit is contained in:
1 parent
aeaf7b5bcb
commit
4ba6a40df6
1 file changed
+22
-1
@@ -77,6 +77,15 @@ class JoinGamePacket(Packet):
|
|||||||
{'reduced_debug_info': Boolean}
|
{'reduced_debug_info': Boolean}
|
||||||
])
|
])
|
||||||
|
|
||||||
|
# JoinGamePacket.Difficulty is an alias for Difficulty
|
||||||
|
Difficulty = Difficulty
|
||||||
|
|
||||||
|
# JoinGamePacket.Gamemode is an alias for Gamemode
|
||||||
|
Gamemode = Gamemode
|
||||||
|
|
||||||
|
# JoinGamePacket.Dimension is an alias for Dimension
|
||||||
|
Dimension = Dimension
|
||||||
|
|
||||||
|
|
||||||
class ServerDifficultyPacket(Packet):
|
class ServerDifficultyPacket(Packet):
|
||||||
@staticmethod
|
@staticmethod
|
||||||
@@ -88,9 +97,12 @@ class ServerDifficultyPacket(Packet):
|
|||||||
|
|
||||||
packet_name = 'server difficulty'
|
packet_name = 'server difficulty'
|
||||||
get_definition = staticmethod(lambda context: [
|
get_definition = staticmethod(lambda context: [
|
||||||
{'difficulty': UnsignedByte}
|
{'difficulty_enum': UnsignedByte}
|
||||||
])
|
])
|
||||||
|
|
||||||
|
# ServerDifficultyPacket.Difficulty is an alias for Difficulty
|
||||||
|
Difficulty = Difficulty
|
||||||
|
|
||||||
|
|
||||||
class ChatMessagePacket(Packet):
|
class ChatMessagePacket(Packet):
|
||||||
@staticmethod
|
@staticmethod
|
||||||
@@ -221,6 +233,15 @@ class RespawnPacket(Packet):
|
|||||||
{'level_type': String}
|
{'level_type': String}
|
||||||
])
|
])
|
||||||
|
|
||||||
|
# RespawnPacket.Difficulty is an alias for Difficulty.
|
||||||
|
Difficulty = Difficulty
|
||||||
|
|
||||||
|
# RespawnPacket.Dimension is an alias for Dimension.
|
||||||
|
Dimension = Dimension
|
||||||
|
|
||||||
|
# RespawnPacket.Gamemode is an alias for Gamemode.
|
||||||
|
Gamemode = Gamemode
|
||||||
|
|
||||||
|
|
||||||
class PluginMessagePacket(AbstractPluginMessagePacket):
|
class PluginMessagePacket(AbstractPluginMessagePacket):
|
||||||
@staticmethod
|
@staticmethod
|
||||||
|
|||||||
Reference in new issue
Block a user