You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We just got our hands on the book "Adventures in Minecraft" by Martin O'Hanlon and want to get started.
My raspberry pi2 is too old for a raspbian OS with GUI, so we decided to go the RaspberryJuice on windows way. Turns out that wasnt updated since mincraft 1.12, so we were very glad to find your fork.
I mostly got it working. I have 2 issues.
Error #1: ValueError: invalid literal for int() with base 10: 'ed8b326e-a3d8-4f6b-bc73-97843e5465be'
When I run >>> panda = mc.spawnEntity(pos.x + 3, pos.y, pos.z , "panda")
I get the following error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\simon\AppData\Local\Programs\Python\Python37-32\lib\site-packages\mcpi\minecraft.py", line 323, in spawnEntity
return int(self.conn.sendReceive(b"world.spawnEntity", args))
ValueError: invalid literal for int() with base 10: 'ed8b326e-a3d8-4f6b-bc73-97843e5465be'
The panda does get created in front of me, but I cant do panda.setPos or anything else.
Error #2: mc.setBlock(pos.x+2, pos.y, pos.z, block.WOOL.id, 3) creates a block at the expected location without error. However, it is always a sand block , no matter what I select as block type. (not 100% sure it's sand, but it's always the same).
Any idea?
Environment I use:
juicyraspberrypie-1.18.1.jar (from the 2021 release on github)
python 3.7.9 (because I saw in your 2019 video you were using 3.7.1, so hopefully I would have a similar version)
JAVA 17, because that is the only version of Java that can do java -jar BuildTools.jar --rev 1.18.1
in the minecraft launcher I picked version 1.18.1
How I got there:
create the following directory structure:
minecraft_py
|-- build
|-- server
|------ plugins
Installed Java SDK 17 (exactly 17, not more, not less). Got it from adoptium
created a file minecraft_py/build/build.bat with the following content and run it :
@echo off
set "JAVA_HOME=C:\Users\**MYUSERNAME**\AppData\Local\Programs\Eclipse Adoptium\jdk-17.0.13.11-hotspot"
set "PATH=%JAVA_HOME%\bin;%PATH%"
java -jar BuildTools.jar --rev 1.18.1
pause
Copy the generated spigot-1.18.1.jar to minecraft_py/server and rename it spigot.jar
create the file minecraft_py/server/eula.txt with content eula=true
create the file minecraft_py/server/run.bat with the following content:
@echo off
set "JAVA_HOME=C:\**MYUSERNAME**\simon\AppData\Local\Programs\Eclipse Adoptium\jdk-17.0.13.11-hotspot"
set "PATH=%JAVA_HOME%\bin;%PATH%"
java -Xms8G -Xmx8G -jar spigot.jar
pause
start the spigot server by double-clicking run.bat
start the minecraft launcher, create a new installation, select release 1.18.1.
start a new minecraft game, pick multiplayer, "localhost"
install python 3.7.9 for windows , start IDLE.
import mcpi.minecraft as minecraft
import mcpi.block as block
mc = minecraft.Minecraft.create()
pos = mc.player.getTilePos()
panda = mc.spawnEntity(pos.x + 3, pos.y, pos.z , "panda")
mc.setBlock(pos.x + 3, pos.y + 2, pos.z, block.STONE.id)
I also tried:
edit minecraft_py/server/plugins/JuicyRaspberryPie/config.yml to have this line: pyexe: "C:\\Users\\YOURUSERNAME\\AppData\\Local\\Programs\\Python\\Python37-32\\python.exe"
Try with juicyraspberry-1.14.4, Java 11 and Python 3.7.9
Personal notes for in-game setup:
in server terminal type op YOURMINECRAFTUSERNAME
in minecraft chat type /gamemode creative
in game, disable pausing on loss of focus: hold f3, press p
in game press F3 to show location, then face east
The text was updated successfully, but these errors were encountered:
Hey friends
We just got our hands on the book "Adventures in Minecraft" by Martin O'Hanlon and want to get started.
My raspberry pi2 is too old for a raspbian OS with GUI, so we decided to go the RaspberryJuice on windows way. Turns out that wasnt updated since mincraft 1.12, so we were very glad to find your fork.
I mostly got it working. I have 2 issues.
Error #1: ValueError: invalid literal for int() with base 10: 'ed8b326e-a3d8-4f6b-bc73-97843e5465be'
When I run
>>> panda = mc.spawnEntity(pos.x + 3, pos.y, pos.z , "panda")
I get the following error:
The panda does get created in front of me, but I cant do panda.setPos or anything else.
Error #2:
mc.setBlock(pos.x+2, pos.y, pos.z, block.WOOL.id, 3)
creates a block at the expected location without error. However, it is always a sand block , no matter what I select as block type. (not 100% sure it's sand, but it's always the same).Any idea?
Environment I use:
java -jar BuildTools.jar --rev 1.18.1
How I got there:
minecraft_py
|-- build
|-- server
|------ plugins
minecraft_py/build
.minecraft_py/build/build.bat
with the following content and run it :spigot-1.18.1.jar
tominecraft_py/server
and rename itspigot.jar
minecraft_py/server/eula.txt
with contenteula=true
minecraft_py/server/run.bat
with the following content:juicyraspberrypie-1.18.1.jar
release for spigot 1.18.1 from releases here on github at https://github.com/wensheng/JuicyRaspberryPie/releases/tag/v0.3 then save it toto minecraft_py/server/plugins
run.bat
python 3.7.9
for windows , start IDLE.I also tried:
edit
minecraft_py/server/plugins/JuicyRaspberryPie/config.yml
to have this line:pyexe: "C:\\Users\\YOURUSERNAME\\AppData\\Local\\Programs\\Python\\Python37-32\\python.exe"
Try with
juicyraspberry-1.14.4
,Java 11
andPython 3.7.9
Personal notes for in-game setup:
op YOURMINECRAFTUSERNAME
/gamemode creative
hold f3, press p
F3
to show location, then face eastThe text was updated successfully, but these errors were encountered: