File tree Expand file tree Collapse file tree 3 files changed +10
-7
lines changed
common/src/main/kotlin/com/lambda
fabric/src/main/kotlin/com/lambda/fabric
forge/src/main/kotlin/com/lambda/forge Expand file tree Collapse file tree 3 files changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ import net.minecraft.util.math.BlockPos
1919import org.apache.logging.log4j.LogManager
2020import org.apache.logging.log4j.Logger
2121import java.awt.Color
22+ import java.lang.Thread.sleep
2223import java.util.*
2324
2425
@@ -46,9 +47,10 @@ object Lambda {
4647 .registerTypeAdapter(Optional ::class .java, OptionalSerializer )
4748 .create()
4849
49- fun initialize () {
50+ fun initialize (onRender : () -> Unit = {} ) {
5051 recordRenderCall {
5152 Loader .initialize()
53+ onRender()
5254 }
5355 }
5456}
Original file line number Diff line number Diff line change @@ -10,9 +10,9 @@ import net.minecraft.registry.Registries
1010
1111object LambdaFabric : ClientModInitializer {
1212 override fun onInitializeClient () {
13- Lambda .initialize()
14- LOG .info( " $MOD_NAME Fabric $VERSION initialized. " )
15-
16- Registries . REGISTRIES .forEach( AgnosticRegistries ::dump)
13+ Lambda .initialize {
14+ Registries . REGISTRIES .forEach( AgnosticRegistries ::dump )
15+ LOG .info( " $MOD_NAME Fabric $VERSION initialized. " )
16+ }
1717 }
1818}
Original file line number Diff line number Diff line change @@ -22,8 +22,9 @@ import thedarkcolour.kotlinforforge.forge.MOD_BUS
2222object LambdaForge {
2323 @SubscribeEvent
2424 fun onClient (event : FMLClientSetupEvent ) {
25- Lambda .initialize()
26- LOG .info(" $MOD_NAME Forge $VERSION initialized." )
25+ Lambda .initialize {
26+ LOG .info(" $MOD_NAME Forge $VERSION initialized." )
27+ }
2728 }
2829
2930 // Forge forces the user to user their event in order to interact with registries.
You can’t perform that action at this time.
0 commit comments