Posted October 25, 20222 yr 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.
October 25, 20222 yr 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 October 25, 20222 yr 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.
October 25, 20222 yr 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.
October 25, 20222 yr 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.