2022-07-31 20:41:56 +02:00
|
|
|
/*
|
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
|
|
|
|
2022-06-10 02:53:23 +02:00
|
|
|
import com.falsepattern.lib.internal.proxy.CommonProxy;
|
2022-07-31 20:41:56 +02:00
|
|
|
import lombok.Getter;
|
|
|
|
|
import org.apache.logging.log4j.LogManager;
|
|
|
|
|
import org.apache.logging.log4j.Logger;
|
2022-07-25 19:33:39 +02:00
|
|
|
|
2022-07-31 20:41:56 +02:00
|
|
|
import net.minecraft.launchwrapper.Launch;
|
|
|
|
|
import cpw.mods.fml.common.Mod;
|
|
|
|
|
import cpw.mods.fml.common.SidedProxy;
|
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-31 20:28:37 +02:00
|
|
|
import cpw.mods.fml.common.network.NetworkRegistry;
|
|
|
|
|
import cpw.mods.fml.common.network.simpleimpl.SimpleNetworkWrapper;
|
2022-07-25 19:33:39 +02:00
|
|
|
|
2022-05-06 13:39:00 +02:00
|
|
|
/**
|
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!
|
2022-05-06 13:39:00 +02:00
|
|
|
*/
|
2022-06-10 02:53:23 +02:00
|
|
|
@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",
|
2022-06-10 02:53:23 +02:00
|
|
|
acceptableRemoteVersions = "*")
|
|
|
|
|
public class FalsePatternLib {
|
2022-06-10 12:43:03 +02:00
|
|
|
public static final String UPDATE_URL = "https://falsepattern.com/mc/versions.json";
|
2022-07-31 20:28:37 +02:00
|
|
|
public static final SimpleNetworkWrapper NETWORK = NetworkRegistry.INSTANCE.newSimpleChannel(Tags.MODID);
|
2022-06-10 12:43:03 +02:00
|
|
|
|
2022-07-31 20:41:56 +02:00
|
|
|
@Getter
|
|
|
|
|
private static final Logger log = LogManager.getLogger(Tags.MODNAME);
|
2022-01-10 02:35:24 +01:00
|
|
|
|
2022-07-31 20:41:56 +02:00
|
|
|
@Getter
|
|
|
|
|
private static final boolean developerEnvironment = (boolean) Launch.blackboard.get("fml.deobfuscatedEnvironment");
|
2022-01-10 02:35:24 +01:00
|
|
|
|
2022-07-31 20:41:56 +02:00
|
|
|
@SidedProxy(clientSide = Tags.GROUPNAME + ".internal.proxy.ClientProxy",
|
|
|
|
|
serverSide = Tags.GROUPNAME + ".internal.proxy.CommonProxy")
|
2022-06-10 02:53:23 +02:00
|
|
|
private static CommonProxy proxy;
|
2022-06-10 00:09:13 +02:00
|
|
|
|
2022-01-10 02:35:24 +01:00
|
|
|
public FalsePatternLib() {
|
2022-05-06 13:47:53 +02:00
|
|
|
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);
|
|
|
|
|
}
|
|
|
|
|
|
2022-06-10 02:53:23 +02:00
|
|
|
@Mod.EventHandler
|
2022-06-10 00:09:13 +02:00
|
|
|
public void preInit(FMLPreInitializationEvent e) {
|
2022-06-10 02:53:23 +02:00
|
|
|
proxy.preInit(e);
|
2022-06-10 00:09:13 +02:00
|
|
|
}
|
|
|
|
|
|
2022-06-10 02:53:23 +02:00
|
|
|
@Mod.EventHandler
|
2022-06-09 20:14:11 +02:00
|
|
|
public void postInit(FMLPostInitializationEvent e) {
|
2022-06-10 02:53:23 +02:00
|
|
|
proxy.postInit(e);
|
2022-05-07 19:45:43 +02:00
|
|
|
}
|
|
|
|
|
|
2022-01-10 02:35:24 +01:00
|
|
|
}
|