Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mcpi requesterror. #64

Open
JamesParkerStrand opened this issue Dec 21, 2022 · 2 comments
Open

mcpi requesterror. #64

JamesParkerStrand opened this issue Dec 21, 2022 · 2 comments

Comments

@JamesParkerStrand
Copy link

I am trying to use the spawn entity function and it's not working. here is the code.

from mine import *

mc = Minecraft()

mc.spawnEntity(10,10,10,VILLAGER)

Here's the error I am getting

Traceback (most recent call last):
  File "C:\Users\Name\AppData\Roaming\.minecraft\mcpipy\camera.py", line 13, in <module>
    mc.spawnEntity(10,10,10,VILLAGER)
  File "C:\Users\Name\AppData\Roaming\.minecraft\mcpipy\mcpi\minecraft.py", line 264, in spawnEntity
    return int(self.conn.sendReceive("world.spawnEntity", args))
  File "C:\Users\Name\AppData\Roaming\.minecraft\mcpipy\mcpi\connection.py", line 134, in sendReceive
    return self.receive()
  File "C:\Users\Name\AppData\Roaming\.minecraft\mcpipy\mcpi\connection.py", line 128, in receive
    raise RequestError("%s failed"%self.lastSent.strip())
mcpi.connection.RequestError: world.spawnEntity(10,10,10,Villager) failed

Is there anything I can do to resolve this error?

@arpruss
Copy link
Owner

arpruss commented Dec 21, 2022

The entity goes before the coordinates.

@JamesParkerStrand
Copy link
Author

The entity goes before the coordinates.

Thanks, it worked

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants