Jump to content

[1.6.4] .getBlockId Help


Xcox123

Recommended Posts

Hey, I'm making a multiblock with the .getBlockId method. It all compiles beautifully, however, how do I set where my "main" block is(the one I right click). I understand how the method works okay, but the tutorial I followed didn't explain how to set the "main" block. I understand how this is probally basic java, however I don't understand. I want my main block to be as showed - where S is the other blocks, and M is the "main" block:

SSS

SSS

SSS

/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\

SSS

SSS

SMS

/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\

SSS

SSS

SSS

/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\

in 3D layered order.

My code is like so: http://paste.ofcode.org/a6Cj9u63iQWkQ9yqDyAHxS

 

Link to comment
Share on other sites

Yeah. To be honest though, the tutorial that I followed (

) used his own multiblock maker program. It's the only one that I can find that works, only the program doesn't work! The code I got is based of pausing the video and finding a pattern in the code, so I can understand why he didn't explain it. However, can someone explain how to solve it?
Link to comment
Share on other sites

You shouldn't use programs (generators) to get code.

You need to do it manually.

 

Loops are statements that you call that sets a value until it is stopped by an integer you set.

 

Example:

for (int i = 0; i < 30; i++) {
     world.setBlock(x + i, y, z);
}

//It adds world.setBlock (however many times you put as that integer, in this case 30).

Link to comment
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
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  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.

×
×
  • Create New...

Important Information

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