Merge pull request #14 from TargetedEntropy/auth_fix

update version and example
This commit is contained in:
TargetedEntropy 2023-03-28 17:05:20 -04:00 committed by GitHub
commit d0101b6cce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 17 additions and 5 deletions

View File

@ -151,7 +151,7 @@ def main():
options.port,
auth_token,
None,
"1.8")
"1.12.2")
if options.dump_packets:

View File

@ -7,7 +7,7 @@ from collections import OrderedDict, namedtuple
import re
# The version number of the most recent pyCraft release.
__version__ = "0.7.0"
__version__ = "0.7.1"
# This bit occurs in the protocol numbers of pre-release versions after 1.16.3.
PRE = 1 << 30

View File

@ -6,7 +6,7 @@ from minecraft.networking.packets import (
from minecraft.networking.types import (
FixedPoint, Integer, Angle, UnsignedByte, Byte, Boolean, UUID, Short,
VarInt, Double, Float, String, Enum, Difficulty, Long, Vector, Direction,
PositionAndLook, multi_attribute_alias, attribute_transform,
PositionAndLook, multi_attribute_alias, attribute_transform, NBT, Position
)
from .combat_event_packet import (
@ -22,7 +22,6 @@ from .explosion_packet import ExplosionPacket
from .sound_effect_packet import SoundEffectPacket
from .face_player_packet import FacePlayerPacket
from .join_game_and_respawn_packets import JoinGamePacket, RespawnPacket
from .tab_complete_packet import TabCompletePacket
from .destroy_entities_packet import DestroyEntitiesPacket
from .spawn_mob_packet import SpawnMobPacket
@ -58,7 +57,8 @@ def get_packets(context):
SpawnMobPacket,
BlockActionPacket,
EntityHeadLookPacket,
ResourcePackSendPacket
ResourcePackSendPacket,
NBTQueryPacket
}
if context.protocol_earlier_eq(47):
@ -533,3 +533,15 @@ class EntityHeadLookPacket(Packet):
{'entity_id': VarInt},
{'head_yaw': Angle},
]
class NBTQueryPacket(Packet):
@staticmethod
def get_id(context):
return 0x60
packet_name = 'nbt query response'
definition = [
{'transaction_id': VarInt},
{'nbt': NBT}
]