Jump to content

Help with using idPicked?


Flenix
 Share

Recommended Posts

Hey guys,

 

I have a metadata-based block, whcih has 4 blocks with 4 different rotations. So, meta 0-3 is block 1 rotation 1-4, meta 4-7 is block 2 rotation 1-4 etc.

 

Now, I want to set it up so I can use the pick block key (middle click) and get block 1 rotation 1 for meta 0-3, block 2 rotation 1 for 4-7 and so on - I don't want to get the extra rotated blocks.

 

Can anyone guide me on how I'd go about doing this? It's one of the last things until I can release the beta of my mod so really want to get it sorted! :)

width=463 height=200

http://s13.postimg.org/z9mlly2av/siglogo.png[/img]

My mods (Links coming soon)

Cities | Roads | Remula | SilvaniaMod | MoreStats

Link to comment
Share on other sites

That didn't work, but pointed me in the right direction. Because my base metas are 0, 4, 8 and 12 your thing didn't work - it was giving me 0-3.

Using this worked (for anyone interested)

 

    public int damageDropped(int meta)
    {
    	if (meta == 0 || meta == 1 || meta == 2 || meta == 3) {
    		return 0;
    	}
    	if (meta == 4 || meta == 5 || meta == 6 || meta == 7) {
    		return 4;
    	}
    	if (meta == 8 || meta == 9 || meta == 10 || meta == 11) {
    		return 8;
    	} else
	return 12;
    }

width=463 height=200

http://s13.postimg.org/z9mlly2av/siglogo.png[/img]

My mods (Links coming soon)

Cities | Roads | Remula | SilvaniaMod | MoreStats

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

 Share



×
×
  • Create New...

Important Information

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