Add a logger to CommonSnow.kt, and rename it to Snowy.kt.
This commit is contained in:
		
							parent
							
								
									0135d1b6ed
								
							
						
					
					
						commit
						3b55558ca4
					
				@ -1,7 +0,0 @@
 | 
				
			|||||||
package fr.username404.snowygui
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
abstract class CommonSnow {
 | 
					 | 
				
			||||||
    fun atInit() {
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
							
								
								
									
										13
									
								
								common/src/main/kotlin/fr/username404/snowygui/Snowy.kt
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								common/src/main/kotlin/fr/username404/snowygui/Snowy.kt
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,13 @@
 | 
				
			|||||||
 | 
					package fr.username404.snowygui
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import org.apache.logging.log4j.LogManager
 | 
				
			||||||
 | 
					import org.apache.logging.log4j.Logger
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					abstract class Snowy {
 | 
				
			||||||
 | 
					    companion object {
 | 
				
			||||||
 | 
					        val logs: Logger = LogManager.getLogger("Snowy")
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    fun atInit() {
 | 
				
			||||||
 | 
					        logs.info("Init point of SnowyGUI hit.")
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@ -1,8 +1,8 @@
 | 
				
			|||||||
package fr.username404.snowygui.fabric
 | 
					package fr.username404.snowygui.fabric
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import fr.username404.snowygui.CommonSnow
 | 
					import fr.username404.snowygui.Snowy
 | 
				
			||||||
import net.fabricmc.api.ClientModInitializer
 | 
					import net.fabricmc.api.ClientModInitializer
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class FabricInit: CommonSnow(), ClientModInitializer {
 | 
					class FabricInit: Snowy(), ClientModInitializer {
 | 
				
			||||||
    override fun onInitializeClient() = atInit()
 | 
					    override fun onInitializeClient() = atInit()
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@ -1,6 +1,6 @@
 | 
				
			|||||||
package fr.username404.snowygui.forge
 | 
					package fr.username404.snowygui.forge
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import fr.username404.snowygui.CommonSnow
 | 
					import fr.username404.snowygui.Snowy
 | 
				
			||||||
import fr.username404.snowygui.config.SnowyConfigScreen
 | 
					import fr.username404.snowygui.config.SnowyConfigScreen
 | 
				
			||||||
import net.minecraftforge.fml.ExtensionPoint
 | 
					import net.minecraftforge.fml.ExtensionPoint
 | 
				
			||||||
import net.minecraftforge.fml.ModLoadingContext
 | 
					import net.minecraftforge.fml.ModLoadingContext
 | 
				
			||||||
@ -9,7 +9,7 @@ import java.util.function.BiFunction
 | 
				
			|||||||
import java.util.function.Supplier
 | 
					import java.util.function.Supplier
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@Mod("snowygui")
 | 
					@Mod("snowygui")
 | 
				
			||||||
class ForgeInit: CommonSnow() {
 | 
					class ForgeInit: Snowy() {
 | 
				
			||||||
    init {
 | 
					    init {
 | 
				
			||||||
        atInit()
 | 
					        atInit()
 | 
				
			||||||
        ModLoadingContext.get().registerExtensionPoint(
 | 
					        ModLoadingContext.get().registerExtensionPoint(
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user