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

Adding Newer RaspberryJuice functionality #19

Open
AugustT opened this issue Feb 11, 2019 · 8 comments
Open

Adding Newer RaspberryJuice functionality #19

AugustT opened this issue Feb 11, 2019 · 8 comments

Comments

@AugustT
Copy link

AugustT commented Feb 11, 2019

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

@kbroman
Copy link
Owner

kbroman commented Feb 11, 2019

Cool! It looks like there’s lots of new stuff: https://github.com/zhuowei/RaspberryJuice

@AugustT
Copy link
Author

AugustT commented Feb 11, 2019

Did someone say individual based model represented in Minecraft?! Yes please!

@kbroman
Copy link
Owner

kbroman commented Feb 11, 2019

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)

@kbroman
Copy link
Owner

kbroman commented Feb 11, 2019

I’ve got all of this working except setSign.

@kbroman
Copy link
Owner

kbroman commented Feb 12, 2019

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"))

@AugustT
Copy link
Author

AugustT commented Feb 12, 2019

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

@kbroman
Copy link
Owner

kbroman commented Feb 12, 2019

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.

@kbroman
Copy link
Owner

kbroman commented Feb 12, 2019

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.

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