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

I know that tickable things are obviously a lot more performance-intensive than, say, static blocks. I'm working on the way trees generate, and one approach I'm considering involves each tree having an associated tickable tileentity. In it's generated state, the only thing the update does is check a boolean property in the blockstate at its position and then return (the condition will only be true after the player interacts with the tree in some way). Will this simple check, but executed every tick for every tree, have a significant impact on performance? The other alternative is to have two different blocks which look and function the same except for tileentities - generate the one that has no tileentity, and turn it into the one with a tileentity when it's needed. But that would mean duplicating things and would be kind of confusing and illogical. I just don't really know how to judge the performance effects of things like this, so if anyone has input I'm all ears.

  • Author
15 minutes ago, diesieben07 said:

You can have a TileEntity based on the block state. You don't need two blocks, you can just return false from hasTileEntity for block states that should not have a TE.

:$ Ohh, thanks. So if I do that, then the TE will be created when the blockstate changes to the TE-requiring state, and removed when it changes back? Do I need to do anything manually to make sure it happens correctly?

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.