Skip to content

Commit

Permalink
Added main files of project
Browse files Browse the repository at this point in the history
  • Loading branch information
Falcion committed Jan 25, 2021
1 parent 6535cf4 commit 90cf745
Show file tree
Hide file tree
Showing 6 changed files with 94 additions and 8 deletions.
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ apply plugin: 'net.minecraftforge.gradle'
apply plugin: 'eclipse'
apply plugin: 'maven-publish'

version = '2.4.1b'
group = 'com.falcion.mortem' // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = 'mortem'
version = '2.4.1'
group = 'net.deltamine.ru' // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = 'sulfrum'

sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8' // Need this here so eclipse task generates correctly.

Expand Down
68 changes: 68 additions & 0 deletions src/main/java/net/deltamine/ru/Core.java
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);
}
}
}
}
8 changes: 8 additions & 0 deletions src/main/java/net/deltamine/ru/Lore.java
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";
}
10 changes: 10 additions & 0 deletions src/main/java/net/deltamine/ru/pack/Pack.java
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";
}
8 changes: 4 additions & 4 deletions src/main/resources/mcmod.info
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[
{
"modid": "mortem",
"name": "Mortem",
"description": "PID-Logger and database implementer for Minecraft.",
"version": "2.4.1b",
"modid": "sulfrum",
"name": "Sulfrum",
"description": "GID-generator and force-code debugger for Minecraft",
"version": "2.4.1",
"mcversion": "1.12.2",
"url": "",
"updateUrl": "",
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/pack.mcmeta
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"pack": {
"description": "Mortem resources",
"description": "Sulfrum's resources",
"pack_format": 3,
"_comment": "A pack_format of 3 should be used starting with Minecraft 1.11. All resources, including language files, should be lowercase (eg: en_us.lang). A pack_format of 2 will load your mod resources with LegacyV2Adapter, which requires language files to have uppercase letters (eg: en_US.lang)."
}
Expand Down

0 comments on commit 90cf745

Please sign in to comment.