Цитата: OlegON ➤ Сообщение вида "не работает" не дает ровно никакой другой информации.
Ошибка описана ниже, возможно дело в том, что сервер Spigot устарел
( Error, this build is outdated. Please download a new build as per instructions from spigotmc org )
*** Оригинальная ошибка ***
from mcpi.minecraft import Minecraft
mc = Minecraft.create()
mc.player.setTilePos(0, 120, 0)
Traceback (most recent call last):
File "<pyshell#2>", line 1, in <module>
mc.player.setTilePos(0, 120, 0)
File "C:\Users\os\AppData\Local\Programs\Python\Python310\lib\site-packages\mcpi\minecraft.py", line 72, in setTilePos
return CmdPositioner.setTilePos(self, [], args)
File "C:\Users\os\AppData\Local\Programs\Python\Python310\lib\site-packages\mcpi\minecraft.py", line 46, in setTilePos
self.conn.send(self.pkg + b".setTile", id, intFloor(*args))
File "C:\Users\os\AppData\Local\Programs\Python\Python310\lib\site-packages\mcpi\minecraft.py", line 22, in intFloor
return [int(math.floor(x)) for x in flatten(args)]
File "C:\Users\os\AppData\Local\Programs\Python\Python310\lib\site-packages\mcpi\minecraft.py", line 22, in <listcomp>
return [int(math.floor(x)) for x in flatten(args)]
File "C:\Users\os\AppData\Local\Programs\Python\Python310\lib\site-packages\mcpi\util.py", line 5, in flatten
if isinstance(e, collections.Iterable) and not isinstance(e, str):
AttributeError: module 'collections' has no attribute 'Iterable'
Почти такая же ошибка появляется, если просто попытаться вывести сообщение в консоль майнкрафта с помощью команды
from mcpi.minecraft import Minecraft
mc = Minecraft.create()
mc.postToChat( "Hello world" )
Traceback (most recent call last):
File "<pyshell#3>", line 1, in <module>
mc.postToChat( "Hello world" )
File "C:\Users\os\AppData\Local\Programs\Python\Python310\lib\site-packages\mcpi\minecraft.py", line 163, in postToChat
self.conn.send(b"chat.post", msg)
File "C:\Users\os\AppData\Local\Programs\Python\Python310\lib\site-packages\mcpi\connection.py", line 39, in send
s = b"".join([f, b"(", flatten_parameters_to_bytestring(data), b")", b"\n"])
File "C:\Users\os\AppData\Local\Programs\Python\Python310\lib\site-packages\mcpi\util.py", line 10, in flatten_parameters_to_bytestring
return b",".join(map(_misc_to_bytes, flatten(l)))
File "C:\Users\os\AppData\Local\Programs\Python\Python310\lib\site-packages\mcpi\util.py", line 5, in flatten
if isinstance(e, collections.Iterable) and not isinstance(e, str):
AttributeError: module 'collections' has no attribute 'Iterable'