miner
miner copied to clipboard
Adding Newer RaspberryJuice functionality
Hi Folks,
I've been using this a lot recently. For my needs it was constraining that I could not spawn entities. This is supported in the newer versions of raspberryjuice https://dev.bukkit.org/projects/raspberryjuice/files/2496319
I have successfully added a function to add entities, wrapping your internal functions. I'd be happy to help you add this if you decided you were happy to shift to the newer version of RaspberryJuice.
Tom
Cool! It looks like there’s lots of new stuff: https://github.com/zhuowei/RaspberryJuice
Did someone say individual based model represented in Minecraft?! Yes please!
Looks like we have
-
world.getPlayerId( player_name)
-
world.getPlayerName( player_id)
-
world.getEntityTypes()
-
world.spawnEntity(x,y,z,type)
-
setDirection
,setRotation
,setPitch
-
setSign(x,y,z,block type id,data,line1,line2,line3,line4)
I’ve got all of this working except setSign
.
For setSign()
, we can create a standing sign with:
mc_send(merge_data("world.setSign", 117, 3, 85, 63, 4, "Hello"))
It should be that you can create a "wall" sign with the following, but I can't figure out how to get it to work.
mc_send(merge_data("world.setSign", 117, 3, 85, 68, 4, "Hello"))
Great stuff.
Are you able to set multiple lines of text to the sign? ie
mc_send(merge_data("world.setSign", 117, 3, 85, 63, 4, "line1", "line2", "line3", "line4"))
Perhaps the wall sign can only spawn on a wall, and only when the orientation of the sign you are placing matches the orientation of the wall
Yes, I could send multiple lines. the setSign()
function I added takes a text
argument that is a vector of character strings, one per line. One complication is I can't see how to have commas in the text, because the API uses commas as separators between arguments, so they end up breaking up the text into separate lines.
Regarding the wall sign, I agree that it seems like you need a wall to place the sign onto, and that you need to get the orientation right. But I spent a bunch of time experimenting with it and couldn't successfully place a wall sign.