Update BlockChange packets to 1.16.2
This commit is contained in:
@@ -6,7 +6,7 @@ import re
|
||||
from optparse import OptionParser
|
||||
|
||||
from custom.managers import DataManager, ChunksManager
|
||||
from custom.networking.packets.clientbound.play import chunk_data
|
||||
from custom.networking.packets.clientbound.play import chunk_data, block_change_packet
|
||||
|
||||
import minecraft.networking.packets
|
||||
|
||||
@@ -15,6 +15,8 @@ def get_packets(old_get_packets):
|
||||
print('Monkey-patched.')
|
||||
packets = func(context)
|
||||
packets.add(chunk_data.ChunkDataPacket)
|
||||
packets.add(block_change_packet.BlockChangePacket)
|
||||
packets.add(block_change_packet.MultiBlockChangePacket)
|
||||
return packets
|
||||
return lambda x: wrapper(old_get_packets, x)
|
||||
|
||||
@@ -124,18 +126,12 @@ def main():
|
||||
print("Message (%s): %s" % (
|
||||
chat_packet.field_string('position'), chat_packet.json_data))
|
||||
|
||||
#chunks = ChunksManager(mcdata)
|
||||
#chunks.register(connection)
|
||||
chunks = ChunksManager(mcdata)
|
||||
chunks.register(connection)
|
||||
|
||||
connection.register_packet_listener(
|
||||
print_chat, clientbound.play.ChatMessagePacket)
|
||||
|
||||
def handle_chunk(chunk_packet):
|
||||
print(chunk_packet)
|
||||
|
||||
def register(self, connection):
|
||||
connection.register_packet_listener(handle_chunk, chunk_data.ChunkDataPacket)
|
||||
|
||||
connection.connect()
|
||||
|
||||
while True:
|
||||
|
||||
Reference in New Issue
Block a user