first commit
This commit is contained in:
commit
536e567348
25 files changed
+953
No files matched your search
@@ -0,0 +1,8 @@
|
||||
package net.kanawo.emcbuilder;
|
||||
|
||||
public class ClientProxy extends CommonProxy {
|
||||
|
||||
// Override CommonProxy methods here, if you want a different behaviour on the client (e.g. registering renders).
|
||||
// Don't forget to call the super methods as well.
|
||||
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package net.kanawo.emcbuilder;
|
||||
|
||||
import cpw.mods.fml.common.event.FMLInitializationEvent;
|
||||
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
|
||||
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
||||
import cpw.mods.fml.common.event.FMLServerStartingEvent;
|
||||
|
||||
public class CommonProxy {
|
||||
|
||||
// preInit "Run before anything else. Read your config, create blocks, items, etc, and register them with the
|
||||
// GameRegistry." (Remove if not needed)
|
||||
public void preInit(FMLPreInitializationEvent event) {
|
||||
Config.synchronizeConfiguration(event.getSuggestedConfigurationFile());
|
||||
|
||||
EMCBuilder.LOG.info(Config.greeting);
|
||||
EMCBuilder.LOG.info("I am EMCBuilder at version " + Tags.VERSION);
|
||||
}
|
||||
|
||||
// load "Do your mod setup. Build whatever data structures you care about. Register recipes." (Remove if not needed)
|
||||
public void init(FMLInitializationEvent event) {}
|
||||
|
||||
// postInit "Handle interaction with other mods, complete your setup based on this." (Remove if not needed)
|
||||
public void postInit(FMLPostInitializationEvent event) {}
|
||||
|
||||
// register server commands in this event handler (Remove if not needed)
|
||||
public void serverStarting(FMLServerStartingEvent event) {}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package net.kanawo.emcbuilder;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import net.minecraftforge.common.config.Configuration;
|
||||
|
||||
public class Config {
|
||||
|
||||
public static String greeting = "Hello World";
|
||||
|
||||
public static void synchronizeConfiguration(File configFile) {
|
||||
Configuration configuration = new Configuration(configFile);
|
||||
|
||||
greeting = configuration.getString("greeting", Configuration.CATEGORY_GENERAL, greeting, "How shall I greet?");
|
||||
|
||||
if (configuration.hasChanged()) {
|
||||
configuration.save();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
package net.kanawo.emcbuilder;
|
||||
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
import cpw.mods.fml.common.Mod;
|
||||
import cpw.mods.fml.common.SidedProxy;
|
||||
import cpw.mods.fml.common.event.FMLInitializationEvent;
|
||||
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
|
||||
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
||||
import cpw.mods.fml.common.event.FMLServerStartingEvent;
|
||||
|
||||
@Mod(modid = EMCBuilder.MODID, version = "1.0.0", name = "EMCBuilder", acceptedMinecraftVersions = "[1.7.10]")
|
||||
public class EMCBuilder {
|
||||
|
||||
public static final String MODID = "emcbuilder";
|
||||
public static final Logger LOG = LogManager.getLogger(MODID);
|
||||
|
||||
@SidedProxy(clientSide = "net.kanawo.emcbuilder.ClientProxy", serverSide = "net.kanawo.emcbuilder.CommonProxy")
|
||||
public static CommonProxy proxy;
|
||||
|
||||
@Mod.EventHandler
|
||||
// preInit "Run before anything else. Read your config, create blocks, items, etc, and register them with the
|
||||
// GameRegistry." (Remove if not needed)
|
||||
public void preInit(FMLPreInitializationEvent event) {
|
||||
proxy.preInit(event);
|
||||
}
|
||||
|
||||
@Mod.EventHandler
|
||||
// load "Do your mod setup. Build whatever data structures you care about. Register recipes." (Remove if not needed)
|
||||
public void init(FMLInitializationEvent event) {
|
||||
proxy.init(event);
|
||||
}
|
||||
|
||||
@Mod.EventHandler
|
||||
// postInit "Handle interaction with other mods, complete your setup based on this." (Remove if not needed)
|
||||
public void postInit(FMLPostInitializationEvent event) {
|
||||
proxy.postInit(event);
|
||||
}
|
||||
|
||||
@Mod.EventHandler
|
||||
// register server commands in this event handler (Remove if not needed)
|
||||
public void serverStarting(FMLServerStartingEvent event) {
|
||||
proxy.serverStarting(event);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) [year] [fullname]
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"modListVersion": 2,
|
||||
"modList": [{
|
||||
"modid": "${modId}",
|
||||
"name": "${modName}",
|
||||
"description": "An example mod for Minecraft 1.7.10 with Forge focused on a stable setup.",
|
||||
"version": "${modVersion}",
|
||||
"mcversion": "${minecraftVersion}",
|
||||
"url": "https://github.com/SinTh0r4s/MyMod",
|
||||
"updateUrl": "",
|
||||
"authorList": ["SinTho0r4s"],
|
||||
"credits": "",
|
||||
"logoFile": "",
|
||||
"screenshots": [],
|
||||
"parent": "",
|
||||
"requiredMods": [],
|
||||
"dependencies": [],
|
||||
"dependants": [],
|
||||
"useDependencyInformation": false
|
||||
}]
|
||||
}
|
||||
Reference in new issue
Block a user