Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…ion-builder into master
  • Loading branch information
SuperHarmony910 committed Aug 27, 2020
2 parents 760605f + 7173960 commit b7146ff
Show file tree
Hide file tree
Showing 4 changed files with 124 additions and 0 deletions.
39 changes: 39 additions & 0 deletions java-files/iceCream/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand All @@ -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.
Expand All @@ -43,7 +53,11 @@ minecraft {
property 'forge.logging.console.level', 'debug'

mods {
<<<<<<< HEAD
examplemod {
=======
iceCream {
>>>>>>> 71739602558be75a6ca6cdae05a8fa2a12ea4b50
source sourceSets.main
}
}
Expand All @@ -59,7 +73,11 @@ minecraft {
property 'forge.logging.console.level', 'debug'

mods {
<<<<<<< HEAD
examplemod {
=======
iceCream {
>>>>>>> 71739602558be75a6ca6cdae05a8fa2a12ea4b50
source sourceSets.main
}
}
Expand All @@ -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
}
}
Expand Down Expand Up @@ -115,20 +140,34 @@ dependencies {
jar {
manifest {
attributes([
<<<<<<< HEAD
"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")
=======
"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')

Expand Down
4 changes: 4 additions & 0 deletions java-files/iceCream/gradle.properties
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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);
}
}
36 changes: 36 additions & 0 deletions java-files/iceCream/src/main/resources/META-INF/mods.toml
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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 <here>
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
Expand All @@ -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]"
Expand Down

0 comments on commit b7146ff

Please sign in to comment.