Jump to content
  • Home
  • Files
  • Docs
  • Merch
Topics
  • All Content

  • This Topic
  • This Forum

  • Advanced Search
  • Existing user? Sign In  

    Sign In



    • Not recommended on shared computers


    • Forgot your password?

  • Sign Up
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • [1.6.4] .getBlockId Help
1.13 Update Notes for Mod Creators
Sign in to follow this  
Followers 0
Xcox123

[1.6.4] .getBlockId Help

By Xcox123, May 29, 2014 in Modder Support

  • Reply to this topic
  • Start new topic

Recommended Posts

Xcox123    1

Xcox123

Xcox123    1

  • Stone Miner
  • Xcox123
  • Members
  • 1
  • 96 posts
Posted May 29, 2014

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

 

  • Quote

Share this post


Link to post
Share on other sites

GotoLink    381

GotoLink

GotoLink    381

  • World Shaper
  • GotoLink
  • Members
  • 381
  • 2012 posts
Posted May 29, 2014

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

 

Learn how to use "for" loops.

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

  • Quote

Share this post


Link to post
Share on other sites

Xcox123    1

Xcox123

Xcox123    1

  • Stone Miner
  • Xcox123
  • Members
  • 1
  • 96 posts
Posted May 29, 2014

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?
  • Quote

Share this post


Link to post
Share on other sites

Xcox123    1

Xcox123

Xcox123    1

  • Stone Miner
  • Xcox123
  • Members
  • 1
  • 96 posts
Posted May 29, 2014

Sorry for bumping, but been stuck with this for an hour now, still no luck  :-\

  • Quote

Share this post


Link to post
Share on other sites

GotoLink    381

GotoLink

GotoLink    381

  • World Shaper
  • GotoLink
  • Members
  • 381
  • 2012 posts
Posted May 29, 2014

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.

  • Quote

Share this post


Link to post
Share on other sites

coolboy4531    66

coolboy4531

coolboy4531    66

  • Dragon Slayer
  • coolboy4531
  • Members
  • 66
  • 584 posts
Posted May 30, 2014

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

  • Quote

Share this post


Link to post
Share on other sites

Xcox123    1

Xcox123

Xcox123    1

  • Stone Miner
  • Xcox123
  • Members
  • 1
  • 96 posts
Posted May 30, 2014

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*

 

  • Quote

Share this post


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.

Guest
Reply to this topic...

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

  • Insert image from URL
×
  • Desktop
  • Tablet
  • Phone
Sign in to follow this  
Followers 0
Go To Topic Listing



  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • BattleDash
      Get all players connected to a bungee server

      By BattleDash · Posted 41 minutes ago

      Hello all, I'm trying to make a mod that can tell you all the players on a bungee server you're connected to, I've never worked with Forge before and this API is very abstract to me compared to plugin development which is what I normally do. Does anyone know how I would go about getting a list of Player Entities of every player on the network you're connected to?
    • Draco18s
      Trouble getting contents of a Chest

      By Draco18s · Posted 1 hour ago

      It isn't merged, so it won't work yet.
    • saxon564
      [1.14.4] [UNSOLVED] Server Thread Freezes After Entity Explodes

      By saxon564 · Posted 2 hours ago

      Does anyone else have any thoughts as to what might be causing this issue?
    • diesieben07
      [1.12.2] How can I close GUI in Forge?

      By diesieben07 · Posted 2 hours ago

      You cannot call Minecraft methods from a separate thread. You need to wait a tick using ClientTickEvent.
    • bismuth210
      [1.12.2] Killing fireworks in unloaded chunks

      By bismuth210 · Posted 2 hours ago

      I'm creating a custom gamemode using forge in which players get teleported around regularly. I've run into a problem when I do the following:   I spawn a firework rocket near a player I teleport the player to a different location I wait a couple of seconds (or minutes) I teleport the player back to the same location as in step 1. Doing this will show the firework spawned in step 1 in step 4, despite significant time having passed in 3. This video shows what I mean:   I suspect the reason for why this happens is because once I teleport the player somewhere else, the chunk with the firework is no longer loaded and doesn't get updated.   Is there a simple way for me to simply "get rid" of all active fireworks shortly before teleporting players so that this doesn't occur? Or do I really have to forcibly keep all chunks loaded? To be more clear: I don't want to disable fireworks all together, but I don't want remnants of old fireworks showing up when I teleport players. "Killing" all firework rockets when I teleport a player would work fine, but I don't know if/how I can do that.   I've tried using /kill @e[type=!player] But that doesn't work for firework rockets apparently.
  • Topics

    • BattleDash
      0
      Get all players connected to a bungee server

      By BattleDash
      Started 41 minutes ago

    • MattNL
      5
      Trouble getting contents of a Chest

      By MattNL
      Started 12 hours ago

    • saxon564
      12
      [1.14.4] [UNSOLVED] Server Thread Freezes After Entity Explodes

      By saxon564
      Started Friday at 05:11 AM

    • Filip4223
      5
      [1.12.2] How can I close GUI in Forge?

      By Filip4223
      Started 3 hours ago

    • bismuth210
      0
      [1.12.2] Killing fireworks in unloaded chunks

      By bismuth210
      Started 2 hours ago

  • Who's Online (See full list)

    • EmerProd
    • Elrol_Arrowsend
    • Oliviafrostpaw
    • Yanny7
    • BattleDash
    • DragonITA
    • vaartis
    • Choonster
    • no namezzzz
    • imacatlolol
    • Cerandior
    • M1ntcraft3r
    • AntonBespoiasov
    • loordgek
    • ROMVoid
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • [1.6.4] .getBlockId Help
  • Theme
  • Contact Us
  • Discord

Copyright © 2019 ForgeDevelopment LLC · Ads by Curse Powered by Invision Community