Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

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 by Corgam

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.

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

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

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

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.