Jump to content
  • Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal
  • 0
hpf3

getting required id and metadata for setBlock from getBlockId and getBlockMetadata

Question

the world.getMetadata() function from the debug card seems to be giving a string like minecraft:oak_stairs[facing=east,half=bottom,shape=straight] instead of a number which is what setBlock claims to need.

github of my project is at https://github.com/hpf3/open-computers-structure-scanner i am currently working on its construction componnent(though i will most likely have to make changes to its scanning too)

Link to post
Share on other sites

1 answer to this question

Recommended Posts

  • 0

As you can see in the second image, the block isn't really 2 blocks straight above the computer. This is because the getX/Y/Z functions return the computer's block position + 0.5 for some reason. Just saying that in case you didn't know, because I definitely didn't :huh:

I hope I could help.

testing.png

testing_2.png

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.