Jump to content

[1.7.2][solved]dying a block


denbukki

Recommended Posts

The easiest method to archive it would be to create 16 sub blocks using metadata such as the wool Blocks and use onBlockActivated to change that metadata when you use a dye on the Block. You just have to create 16 different Textures for every color.

PM's regarding modding questions should belong in the Modder Support sub-forum and won't be answered.

Link to comment
Share on other sites

Ore you could use a custom block renderer so you don't need to make 16 different textures.

Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support.

 

1.12 -> 1.13 primer by williewillus.

 

1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support.

 

http://www.howoldisminecraft1710.today/

Link to comment
Share on other sites

You literally copy-pasted that code from the BlockWool class. I be you don't even understand a quarter of it. Most of the things you don't even need.

Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support.

 

1.12 -> 1.13 primer by williewillus.

 

1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support.

 

http://www.howoldisminecraft1710.today/

Link to comment
Share on other sites

Hey, I'm pretty new to Java and modding, but I think you can't make a block with changing Textures, (I tried that and its changing the textures for EVREY block, not only the one you clicked (but I'm probably just doing sth. wrong ^^)) so, however, I think it's a lot smarter to just make diffrent Blocks for every colour, wool and the furnace do the same thing too, then just check in the onBlockActivated() method, what the block was clicked with (I'm not too sure how you do that) and set a new Block with the right colour to the old position...

hope that wasn't confusing and i could help :)

Link to comment
Share on other sites

Hey, I'm pretty new to Java and modding, but I think you can't make a block with changing Textures, (I tried that and its changing the textures for EVREY block, not only the one you clicked (but I'm probably just doing sth. wrong ^^)) so, however, I think it's a lot smarter to just make diffrent Blocks for every colour, wool and the furnace do the same thing too, then just check in the onBlockActivated() method, what the block was clicked with (I'm not too sure how you do that) and set a new Block with the right colour to the old position...

hope that wasn't confusing and i could help :)

well what you just said i was already doing so. but still thanks for trying to help

 

Link to comment
Share on other sites

Everyone is repeating themselves >.>

 

And a metadata block is the best way to go... Unless of course your block has special functionality depending on the color?

We all stuff up sometimes... But I seem to be at the bottom of that pot.

Link to comment
Share on other sites

Everyone is repeating themselves >.>

 

And a metadata block is the best way to go... Unless of course your block has special functionality depending on the color?

@Kwibble just repeating this in case he doesn't understand (you obviously understand)

 

and if it had a special functionality you'd have to make separate blocks (at you level of knowledge)

Link to comment
Share on other sites

  • 4 weeks later...

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.

Announcements



×
×
  • Create New...

Important Information

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