diff --git a/java-files/iceCream/build.gradle b/java-files/iceCream/build.gradle index 192ba78..a16d909 100644 --- a/java-files/iceCream/build.gradle +++ b/java-files/iceCream/build.gradle @@ -13,9 +13,15 @@ apply plugin: 'net.minecraftforge.gradle' apply plugin: 'eclipse' apply plugin: 'maven-publish' +<<<<<<< HEAD version = '1.0' group = 'com.yourname.modid' // http://maven.apache.org/guides/mini/guide-naming-conventions.html archivesBaseName = 'modid' +======= +version = '0.1' +group = 'com.superharmony910.iceCream' // http://maven.apache.org/guides/mini/guide-naming-conventions.html +archivesBaseName = 'iceCream' +>>>>>>> 71739602558be75a6ca6cdae05a8fa2a12ea4b50 sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8' // Need this here so eclipse task generates correctly. @@ -27,7 +33,11 @@ minecraft { // Simply re-run your setup task after changing the mappings to update your workspace. mappings channel: 'snapshot', version: '20190719-1.14.3' // makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable. +<<<<<<< HEAD +======= + +>>>>>>> 71739602558be75a6ca6cdae05a8fa2a12ea4b50 // accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg') // Default run configurations. @@ -43,7 +53,11 @@ minecraft { property 'forge.logging.console.level', 'debug' mods { +<<<<<<< HEAD examplemod { +======= + iceCream { +>>>>>>> 71739602558be75a6ca6cdae05a8fa2a12ea4b50 source sourceSets.main } } @@ -59,7 +73,11 @@ minecraft { property 'forge.logging.console.level', 'debug' mods { +<<<<<<< HEAD examplemod { +======= + iceCream { +>>>>>>> 71739602558be75a6ca6cdae05a8fa2a12ea4b50 source sourceSets.main } } @@ -74,10 +92,17 @@ minecraft { // Recommended logging level for the console property 'forge.logging.console.level', 'debug' +<<<<<<< HEAD args '--mod', 'examplemod', '--all', '--output', file('src/generated/resources/') mods { examplemod { +======= + args '--mod', 'iceCream', '--all', '--output', file('src/main/resources/') + + mods { + iceCream { +>>>>>>> 71739602558be75a6ca6cdae05a8fa2a12ea4b50 source sourceSets.main } } @@ -115,6 +140,7 @@ dependencies { jar { manifest { attributes([ +<<<<<<< HEAD "Specification-Title": "examplemod", "Specification-Vendor": "examplemodsareus", "Specification-Version": "1", // We are version 1 of ourselves @@ -122,13 +148,26 @@ jar { "Implementation-Version": "${version}", "Implementation-Vendor" :"examplemodsareus", "Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ") +======= + "Specification-Title": "examplemod", + "Specification-Vendor": "examplemodsareus", + "Specification-Version": "1", // We are version 1 of ourselves + "Implementation-Title": project.name, + "Implementation-Version": "${version}", + "Implementation-Vendor" :"examplemodsareus", + "Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ") +>>>>>>> 71739602558be75a6ca6cdae05a8fa2a12ea4b50 ]) } } // Example configuration to allow publishing using the maven-publish task // This is the preferred method to reobfuscate your jar file +<<<<<<< HEAD jar.finalizedBy('reobfJar') +======= +jar.finalizedBy('reobfJar') +>>>>>>> 71739602558be75a6ca6cdae05a8fa2a12ea4b50 // However if you are in a multi-project build, dev time needs unobfed jar files, so you can delay the obfuscation until publishing by doing //publish.dependsOn('reobfJar') diff --git a/java-files/iceCream/gradle.properties b/java-files/iceCream/gradle.properties index 878bf1f..a71b18a 100644 --- a/java-files/iceCream/gradle.properties +++ b/java-files/iceCream/gradle.properties @@ -1,4 +1,8 @@ # Sets default memory used for gradle commands. Can be overridden by user or command line properties. # This is required to provide enough memory for the Minecraft decompilation process. +<<<<<<< HEAD org.gradle.jvmargs=-Xmx3G +======= +org.gradle.jvmargs=-Xmx2G +>>>>>>> 71739602558be75a6ca6cdae05a8fa2a12ea4b50 org.gradle.daemon=false \ No newline at end of file diff --git a/java-files/iceCream/src/main/java/com/superharmony910/iceCream/iceCream.java b/java-files/iceCream/src/main/java/com/superharmony910/iceCream/iceCream.java new file mode 100644 index 0000000..62a99f5 --- /dev/null +++ b/java-files/iceCream/src/main/java/com/superharmony910/iceCream/iceCream.java @@ -0,0 +1,45 @@ +package com.superharmony910.iceCream; + + +import net.minecraft.block.Blocks; +import net.minecraftforge.common.MinecraftForge; + +import net.minecraftforge.fml.common.Mod; +import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent; +import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent; + +import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +// The value here should match an entry in the META-INF/mods.toml file +@Mod("iceCream") +public class iceCream +{ + // Directly reference a log4j logger. + private static final Logger LOGGER = LogManager.getLogger(); + + public iceCream() { + // Register the setup method for modloading. + FMLJavaModLoadingContext.get().getModEventBus().addListener(this::setup); + // Register the enqueueIMC method for modloading + // Register the processIMC method for modloading + // Register the doClientStuff method for modloading + FMLJavaModLoadingContext.get().getModEventBus().addListener(this::doClientStuff); + + // Register ourselves for server and other game events we are interested in + MinecraftForge.EVENT_BUS.register(this); + } + + private void setup(final FMLCommonSetupEvent event) + { + // some preinit code + LOGGER.info("HELLO FROM PREINIT"); + LOGGER.info("DIRT BLOCK >> {}", Blocks.DIRT.getRegistryName()); + } + + private void doClientStuff(final FMLClientSetupEvent event) { + // do something that can only be done on the client + LOGGER.info("Got game settings {}", event.getMinecraftSupplier().get().gameSettings); + } +} diff --git a/java-files/iceCream/src/main/resources/META-INF/mods.toml b/java-files/iceCream/src/main/resources/META-INF/mods.toml index 2f84c78..f0f7633 100644 --- a/java-files/iceCream/src/main/resources/META-INF/mods.toml +++ b/java-files/iceCream/src/main/resources/META-INF/mods.toml @@ -1,14 +1,19 @@ +<<<<<<< HEAD # This is an example mods.toml file. It contains the data relating to the loading mods. # There are several mandatory fields (#mandatory), and many more that are optional (#optional). # The overall format is standard TOML format, v0.5.0. # Note that there are a couple of TOML lists in this file. # Find more information on toml format here: https://github.com/toml-lang/toml # The name of the mod loader type to load - for regular FML @Mod mods it should be javafml +======= + +>>>>>>> 71739602558be75a6ca6cdae05a8fa2a12ea4b50 modLoader="javafml" #mandatory # A version range to match for said mod loader - for regular FML @Mod it will be the forge version loaderVersion="[31,)" #mandatory This is typically bumped every Minecraft version by Forge. See our download page for lists of versions. # A URL to refer people to when problems occur with this mod issueTrackerURL="http://my.issue.tracker/" #optional +<<<<<<< HEAD # A list of mods - how many allowed here is determined by the individual mod loader [[mods]] #mandatory # The modid of the mod @@ -37,6 +42,33 @@ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed mollis lacinia magn ''' # A dependency - use the . to indicate dependency for a specific modid. Dependencies are optional. [[dependencies.examplemod]] #optional +======= + +[[mods]] #mandatory + +modId="iceCream" #mandatory +# The version number of the mod - there's a few well known ${} variables useable here or just hardcode it +version="1.15.2-0.1.0" #mandatory + +displayName="Who Wants Ice Cream?" #mandatory +# A URL to query for updates for this mod. See the JSON update specification +updateJSONURL="https://github.com/SuperHarmony910/modification-builder/tags/Ice-Creams" #optional +# A URL for the "homepage" for this mod, displayed in the mod UI +displayURL="https://github.com/SuperHarmony910/modification-builder" #optional +# A file name (in the root of the mod JAR) containing a logo for display +logoFile="examplemod.png" #optional + +credits="Thanks to TechnoVision (https://www.youtube.com/channel/UC3n-lKS-MYlunVtErgzSFZg) for the tutorial on modding!" #optional + +authors="SuperHarmony910" #optional +# The description text for the mod (multi line!) (#mandatory) +description=''' +This is the first time I've ever modded Minecraft, and after a minimal effort of questioning my little sister, +she wanted ice cream! So, +''' +# A dependency - use the . to indicate dependency for a specific modid. Dependencies are optional. +[[dependencies.iceCream]] #optional +>>>>>>> 71739602558be75a6ca6cdae05a8fa2a12ea4b50 # the modid of the dependency modId="forge" #mandatory # Does this dependency have to exist - if not, ordering below must be specified @@ -48,7 +80,11 @@ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed mollis lacinia magn # Side this dependency is applied on - BOTH, CLIENT or SERVER side="BOTH" # Here's another dependency +<<<<<<< HEAD [[dependencies.examplemod]] +======= +[[dependencies.iceCream]] +>>>>>>> 71739602558be75a6ca6cdae05a8fa2a12ea4b50 modId="minecraft" mandatory=true versionRange="[1.15.2]"