-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
94 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
package net.deltamine.ru; | ||
|
||
import com.sun.jna.platform.win32.Guid; | ||
import net.deltamine.ru.pack.Pack; | ||
import net.minecraft.client.Minecraft; | ||
import net.minecraftforge.client.MinecraftForgeClient; | ||
import net.minecraftforge.common.MinecraftForge; | ||
import net.minecraftforge.fml.common.Loader; | ||
import net.minecraftforge.fml.common.Mod; | ||
import net.minecraftforge.fml.common.event.FMLInitializationEvent; | ||
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent; | ||
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; | ||
import net.minecraftforge.fml.relauncher.libraries.ModList; | ||
|
||
import java.lang.management.ManagementFactory; | ||
import java.util.UUID; | ||
import java.util.logging.Logger; | ||
|
||
@Mod(modid = Lore.ID, name = Lore.NAME, version = Lore.VERSION) | ||
public class Core { | ||
|
||
@Mod.Instance | ||
public static Core instance; | ||
|
||
org.apache.logging.log4j.Logger LOGGER; | ||
|
||
@Mod.EventHandler | ||
public void preInit(FMLPreInitializationEvent event) { | ||
LOGGER = event.getModLog(); | ||
|
||
Minecraft minecraft = Minecraft.getMinecraft(); | ||
|
||
String defaultPack = minecraft.mcDefaultResourcePack.getPackName(); | ||
|
||
if(defaultPack != "MinecraftFont") { | ||
LOGGER.warn("Default resource pack was compromised! Please, ensure you using stable edition of pack!"); | ||
} | ||
} | ||
|
||
@Mod.EventHandler | ||
public void init(FMLInitializationEvent event) { | ||
UUID uuid = UUID.randomUUID(); | ||
|
||
LOGGER.info("Current session UUID (non-player): " + uuid); | ||
} | ||
|
||
@Mod.EventHandler | ||
public void PostInit(FMLPostInitializationEvent event) { | ||
String processName = "NULL"; | ||
|
||
if(Loader.isModLoaded("It's the little things") == true) { | ||
String processFullname = ManagementFactory.getRuntimeMXBean().getName(); | ||
|
||
processName = processFullname.split("@")[1]; | ||
} | ||
|
||
if(processName != "NULL") { | ||
|
||
switch(processName) { | ||
case "Magicae": LOGGER.info("Force-code Version: " + Pack.MAGICAE); | ||
case "Fabrica": LOGGER.info("Force-code Version: " + Pack.FABRICA); | ||
case "Statera": LOGGER.info("Force-code Version: " + Pack.STATERA); | ||
case "Insula": LOGGER.info("Force-code Version: " + Pack.INSULA); | ||
case "Odyssea": LOGGER.info("Force-code Version: " + Pack.ODYSSEA); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package net.deltamine.ru; | ||
|
||
public class Lore { | ||
|
||
public static final String ID = "sulfrum"; | ||
public static final String NAME = "Sulfrum"; | ||
public static final String VERSION = "2.4.1"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package net.deltamine.ru.pack; | ||
|
||
public class Pack { | ||
|
||
public static final String MAGICAE = "v0.2.0.3"; | ||
public static final String FABRICA = "v0.2.0.3"; | ||
public static final String STATERA = "v0.2.0.3"; | ||
public static final String INSULA = "v0.2.0.3"; | ||
public static final String ODYSSEA = "v0.2.0.3"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters