Corgam Posted April 9, 2020 Posted April 9, 2020 (edited) 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, 2020 by Corgam Quote
poopoodice Posted April 10, 2020 Posted April 10, 2020 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. 1 Quote
Corgam Posted April 11, 2020 Author Posted April 11, 2020 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. Quote
Corgam Posted April 11, 2020 Author Posted April 11, 2020 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! Quote
Recommended Posts
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.