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

Im using the getTickerHelper method to create blockentities right now but im wondering if there is a more efficient way to do it. Im looking at some mods’ code and am seeing a whole bunch of custom made interfaces but do t understand why. So if some people could give an example or point me in the right way id appreciate it.

It's just an interface implement it how you like.

I think you will find a lot of mods were written a while ago, when handling a block entity's ticks required different code.

Instead of rewriting all their code, they probably just wrote some "glue code" that let them use the old code with the new way.

 

Personally I liked the old school way where the BlockEntity just implemented a tick() method.

You can see Immersive Engineering kind of emulating that here:

https://github.com/BluSunrize/ImmersiveEngineering/blob/1.18.2/src/main/java/blusunrize/immersiveengineering/common/blocks/ticking/IEServerTickableBE.java

Edited by warjort

Boilerplate:

If you don't post your logs/debug.log we can't help you. For curseforge you need to enable the forge debug.log in its minecraft settings. You should also post your crash report if you have one.

If there is no error in the log file and you don't have a crash report then post the launcher_log.txt from the minecraft folder. Again for curseforge this will be in your curseforge/minecraft/Install

Large files should be posted to a file sharing site like https://gist.github.com  You should also read the support forum sticky post.

The issue with the old school way was you get people referencing client classes in their BlockEntity for the client side ticks.

Which would then cause crashes on a dedicated server.

Boilerplate:

If you don't post your logs/debug.log we can't help you. For curseforge you need to enable the forge debug.log in its minecraft settings. You should also post your crash report if you have one.

If there is no error in the log file and you don't have a crash report then post the launcher_log.txt from the minecraft folder. Again for curseforge this will be in your curseforge/minecraft/Install

Large files should be posted to a file sharing site like https://gist.github.com  You should also read the support forum sticky post.

  • Author

Thanks for the reply! I noticed the interfaces were for their mod but dont know where to start. I think i need more java knowledge to use the custom interfaces. Right now i do just use the tick() method but am worried about performance drops especially with large amounts of them. Would there be any intermediate alternatives or places you could point me to for more knowledge on how to do this?

 

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.