Esempio n. 1
0
def command(thread):
	print 'Player Digging'
	tuxcraft_tools.minecraft_read_byte(thread.channel) # Status
	tuxcraft_tools.minecraft_read_int(thread.channel)  # X
	tuxcraft_tools.minecraft_read_byte(thread.channel) # Y
	tuxcraft_tools.minecraft_read_int(thread.channel)  # Z
	tuxcraft_tools.minecraft_read_byte(thread.channel) # Face
Esempio n. 2
0
def command(thread):
	print 'Player Block Placement'
	tuxcraft_tools.minecraft_read_int(thread.channel) # X
	tuxcraft_tools.minecraft_read_byte(thread.channel) # Y, Should be unsigned, but meh
	tuxcraft_tools.minecraft_read_int(thread.channel) # Z
	tuxcraft_tools.minecraft_read_byte(thread.channel) # Direction
	tuxcraft_tools.minecraft_read_slot(thread.channel) # Held item
	tuxcraft_tools.minecraft_read_byte(thread.channel) # Cursor X
	tuxcraft_tools.minecraft_read_byte(thread.channel) # Cursor Y
	tuxcraft_tools.minecraft_read_byte(thread.channel) # Cursor Z
Esempio n. 3
0
def command(thread):
	print 'Handshake'
	thread.ProtocolVersion = tuxcraft_tools.minecraft_read_byte(thread.channel)

	thread.Username = tuxcraft_tools.minecraft_read_string(thread.channel)
	thread.ServerHost = tuxcraft_tools.minecraft_read_string(thread.channel)
	thread.ServerPort = tuxcraft_tools.minecraft_read_int(thread.channel)
	print thread.ProtocolVersion, thread.Username, thread.ServerHost, thread.ServerPort
	#thread.channel.send( b'\xff' + tuxcraft_tools.minecraft_string(u'Du identifierade dig') )
	#time.sleep(5) # The procol docs state that this is necessery due to a bug in the client
	thread.send( b'\x01' + struct.pack('>i', 1238) + tuxcraft_tools.minecraft_string(u'default') + b'\x00\x00\x00\x00\x08' )
Esempio n. 4
0
def command(thread):
	print 'Keep Alive'
	thread.OnGround = tuxcraft_tools.minecraft_read_int(thread.channel)
	print thread.X, thread.Y, thread.Stance, thread.Z, thread.Yaw, thread.Pitch, thread.OnGround
Esempio n. 5
0
def command(thread):
	print 'Animation'
	tuxcraft_tools.minecraft_read_int(thread.channel)
	thread.Animation = tuxcraft_tools.minecraft_read_byte(thread.channel)
	print thread.Animation
Esempio n. 6
0
def command(thread):
	#print 'Entity Action'
	tuxcraft_tools.minecraft_read_int(thread.channel) #EID
	tuxcraft_tools.minecraft_read_byte(thread.channel) #Action ID