Posted April 9, 20205 yr Hi, I think it's a quick and simple question, but I want to know what's the best way to do it, I want do create a block, on which you need to click 3 times with an item before converting it into different block, where do I store the amount of clicks I have already clicked? Do I create a tile entity and store it there (if yes, how do I do it?) , or should I store it as one of the states of the block? Cheers Edited April 11, 20205 yr by Corgam
April 10, 20205 yr 10 hours ago, Corgam said: Hi, I think it's a quick and simple question, but I want to know what's the best way to do it, I want do create a block, on which you need to click 3 times with an item before converting it into different block, where do I store the amount of clicks I have already clicked? Do I create a tile entity and store it there (if yes, how do I do it?) , or should I store it as one of the states of the block? Cheers You can do it in both ways, but I'll say block state if that's the only thing you want to do.
April 11, 20205 yr Author What if I want to have a random amout of clicks needed for a block to change? To give some context, I want to create a chisable block, that you need to click 3-5 times with chisel, before it converts to chiseled version of it.
April 11, 20205 yr Author 2 hours ago, diesieben07 said: Make a block state property for your block that holds an int from 0-5. When placing the block set this value to a random number between 3-5. When clicked with a chisel, decrement the number and only chisel when it reaches 0. I did exactly what you wrote. Everything works as I wanted. Thanks!
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.