Files
FalsePatternLib/src/main/java/com/falsepattern/lib/internal/FalsePatternLib.java
T

77 lines
2.6 KiB
Java
Raw Normal View History

2022-07-30 15:21:11 +02:00
/**
* Copyright (C) 2022 FalsePattern
* All Rights Reserved
*
* The above copyright notice, this permission notice and the word "SNEED"
* shall be included in all copies or substantial portions of the Software.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
2022-05-06 13:40:42 +02:00
package com.falsepattern.lib.internal;
2022-01-10 02:35:24 +01:00
import com.falsepattern.lib.internal.proxy.CommonProxy;
2022-07-25 19:33:39 +02:00
import cpw.mods.fml.common.*;
2022-07-30 23:26:25 +02:00
import cpw.mods.fml.common.event.FMLConstructionEvent;
2022-06-09 20:14:11 +02:00
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
2022-07-25 19:33:39 +02:00
import lombok.Getter;
2022-07-25 19:33:39 +02:00
2022-01-10 02:35:24 +01:00
import net.minecraft.launchwrapper.Launch;
2022-07-25 19:33:39 +02:00
2022-01-10 02:35:24 +01:00
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
/**
2022-06-08 16:01:06 +02:00
* Utility class used by FalsePatternLib's internal code. This can change between versions without notice, so do not use
* this in your code!
*/
@Mod(modid = Tags.MODID,
name = Tags.MODNAME,
version = Tags.VERSION,
acceptedMinecraftVersions = "[1.7.10]",
2022-07-30 23:26:25 +02:00
guiFactory = Tags.GROUPNAME + ".internal.config.LibraryGuiFactory",
acceptableRemoteVersions = "*")
public class FalsePatternLib {
public static final String UPDATE_URL = "https://falsepattern.com/mc/versions.json";
2022-06-08 16:01:06 +02:00
@Getter private static final Logger log = LogManager.getLogger(Tags.MODNAME);
2022-01-10 02:35:24 +01:00
2022-06-08 16:01:06 +02:00
@Getter private static final boolean developerEnvironment =
(boolean) Launch.blackboard.get("fml.deobfuscatedEnvironment");
2022-01-10 02:35:24 +01:00
@SidedProxy(clientSide = Tags.GROUPNAME + ".internal.proxy.ClientProxy", serverSide = Tags.GROUPNAME + ".internal.proxy.CommonProxy")
private static CommonProxy proxy;
2022-01-10 02:35:24 +01:00
public FalsePatternLib() {
log.info("Version " + Tags.VERSION + " initialized!");
2022-01-10 02:35:24 +01:00
}
2022-07-30 23:26:25 +02:00
@Mod.EventHandler
public void construct(FMLConstructionEvent e) {
proxy.construct(e);
}
@Mod.EventHandler
public void preInit(FMLPreInitializationEvent e) {
proxy.preInit(e);
}
@Mod.EventHandler
2022-06-09 20:14:11 +02:00
public void postInit(FMLPostInitializationEvent e) {
proxy.postInit(e);
2022-05-07 19:45:43 +02:00
}
2022-01-10 02:35:24 +01:00
}