Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

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

 

....................... :-\

 

Learn how to use "for" loops.

Don't follow a "tutorial" that doesn't explain the stuff.

  • Author

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?

You are supposed to write code, not expect it from a machine or other program.

If you find it too hard, take a break and try something else.

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

  • Author

Thanks for the help :D

 

I made a really nooby mistake, I was checking if the block I'm placing is block id 30(x + 0, y + 0, z + 0) *facepalms*

 

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...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.