diff --git a/.gitignore b/.gitignore index 1319d28..432c68e 100644 --- a/.gitignore +++ b/.gitignore @@ -20,4 +20,6 @@ build # other eclipse run -classes \ No newline at end of file + +# Files from Forge MDK +forge*changelog.txt \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index 2b3df89..27b23a6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,7 +3,6 @@ jdk: - openjdk8 before_install: chmod +x gradlew -install: "./gradlew setupCIWorkspace -s" script: "./gradlew build -s" deploy: diff --git a/build.gradle b/build.gradle index 9fe07fc..56d7e8a 100644 --- a/build.gradle +++ b/build.gradle @@ -1,61 +1,95 @@ buildscript { repositories { + maven { url = 'https://files.minecraftforge.net/maven' } jcenter() - maven { url = "https://files.minecraftforge.net/maven" } + mavenCentral() } dependencies { - classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT' + classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '3.+', changing: true } } -apply plugin: 'net.minecraftforge.gradle.forge' -//Only edit below this line, the above code adds and enables the necessary things for Forge to be setup. +apply plugin: 'net.minecraftforge.gradle' +// Only edit below this line, the above code adds and enables the necessary things for Forge to be setup. +apply plugin: 'eclipse' +apply plugin: 'maven-publish' - -version = "1.12.2-1.0.0" +version = "1.14.4-1.0.0" group = "network.pxl8.stonecatalysts" archivesBaseName = "stonecatalysts" -sourceCompatibility = targetCompatibility = '1.8' // Need this here so eclipse task generates correctly. -compileJava { - sourceCompatibility = targetCompatibility = '1.8' -} +sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8' // Need this here so eclipse task generates correctly. minecraft { - version = "1.12.2-14.23.5.2847" - runDir = "run" - - // the mappings can be changed at any time, and must be in the following format. - // snapshot_YYYYMMDD snapshot are built nightly. - // stable_# stables are built at the discretion of the MCP team. - // Use non-default mappings at your own risk. they may not always work. - // simply re-run your setup task after changing the mappings to update your workspace. - mappings = "snapshot_20171003" - // makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable. + mappings channel: 'snapshot', version: '20190719-1.14.3' + + runs { + client { + workingDirectory project.file('run') + + property 'forge.logging.console.level', 'debug' + + mods { + examplemod { + source sourceSets.main + } + } + } + + server { + workingDirectory project.file('run') + + property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP' + + property 'forge.logging.console.level', 'debug' + + mods { + examplemod { + source sourceSets.main + } + } + } + + data { + workingDirectory project.file('run') + + property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP' + + property 'forge.logging.console.level', 'debug' + + args '--mod', 'examplemod', '--all', '--output', file('src/generated/resources/') + + mods { + examplemod { + source sourceSets.main + } + } + } + } } repositories { - + maven { + name = "CurseForge" + url = "https://minecraft.curseforge.com/api/maven/" + } } dependencies { + minecraft 'net.minecraftforge:forge:1.14.4-28.2.0' + compileOnly "quark:Quark:r2.0:210" } -processResources { - // this will ensure that this task is redone when the versions change. - inputs.property "version", project.version - inputs.property "mcversion", project.minecraft.version - - // replace stuff in mcmod.info, nothing else - from(sourceSets.main.resources.srcDirs) { - include 'mcmod.info' - - // replace version and mcversion - expand 'version':project.version, 'mcversion':project.minecraft.version +jar { + manifest { + attributes([ + "Specification-Title": "stonecatalysts", + "Specification-Vendor": "pxl8", + "Specification-Version": "1", // We are version 1 of ourselves + "Implementation-Title": project.name, + "Implementation-Version": "${version}", + "Implementation-Vendor" : "pxl8", + "Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ") + ]) } - - // copy everything else except the mcmod.info - from(sourceSets.main.resources.srcDirs) { - exclude 'mcmod.info' - } -} +} \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index 659b74c..878bf1f 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1 +1,4 @@ -org.gradle.jvmargs=-Xmx3G \ No newline at end of file +# 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. +org.gradle.jvmargs=-Xmx3G +org.gradle.daemon=false \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 30d399d..7a3265e 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index e18cba7..949819d 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,5 @@ -#Mon Sep 14 12:28:28 PDT 2015 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-2.14-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-4.9-bin.zip diff --git a/gradlew b/gradlew index 91a7e26..cccdd3d 100644 --- a/gradlew +++ b/gradlew @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env sh ############################################################################## ## @@ -6,20 +6,38 @@ ## ############################################################################## -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS="" +# Attempt to set APP_HOME +# Resolve links: $0 may be a link +PRG="$0" +# Need this for relative symlinks. +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/" >/dev/null +APP_HOME="`pwd -P`" +cd "$SAVED" >/dev/null APP_NAME="Gradle" APP_BASE_NAME=`basename "$0"` +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS="" + # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD="maximum" -warn ( ) { +warn () { echo "$*" } -die ( ) { +die () { echo echo "$*" echo @@ -30,6 +48,7 @@ die ( ) { cygwin=false msys=false darwin=false +nonstop=false case "`uname`" in CYGWIN* ) cygwin=true @@ -40,31 +59,11 @@ case "`uname`" in MINGW* ) msys=true ;; + NONSTOP* ) + nonstop=true + ;; esac -# For Cygwin, ensure paths are in UNIX format before anything is touched. -if $cygwin ; then - [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"` -fi - -# Attempt to set APP_HOME -# Resolve links: $0 may be a link -PRG="$0" -# Need this for relative symlinks. -while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi -done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >&- -APP_HOME="`pwd -P`" -cd "$SAVED" >&- - CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar # Determine the Java command to use to start the JVM. @@ -90,7 +89,7 @@ location of your Java installation." fi # Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then +if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then MAX_FD_LIMIT=`ulimit -H -n` if [ $? -eq 0 ] ; then if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then @@ -114,6 +113,7 @@ fi if $cygwin ; then APP_HOME=`cygpath --path --mixed "$APP_HOME"` CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + JAVACMD=`cygpath --unix "$JAVACMD"` # We build the pattern for arguments to be converted via cygpath ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` @@ -154,11 +154,19 @@ if $cygwin ; then esac fi -# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules -function splitJvmOpts() { - JVM_OPTS=("$@") +# Escape application args +save () { + for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done + echo " " } -eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS -JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" +APP_ARGS=$(save "$@") + +# Collect all arguments for the java command, following the shell quoting and substitution rules +eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" + +# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong +if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then + cd "$(dirname "$0")" +fi -exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" +exec "$JAVACMD" "$@" diff --git a/gradlew.bat b/gradlew.bat index 8a0b282..f955316 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -8,14 +8,14 @@ @rem Set local scope for the variables with windows NT shell if "%OS%"=="Windows_NT" setlocal -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS= - set DIRNAME=%~dp0 if "%DIRNAME%" == "" set DIRNAME=. set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS= + @rem Find java.exe if defined JAVA_HOME goto findJavaFromJavaHome @@ -46,10 +46,9 @@ echo location of your Java installation. goto fail :init -@rem Get command-line arguments, handling Windowz variants +@rem Get command-line arguments, handling Windows variants if not "%OS%" == "Windows_NT" goto win9xME_args -if "%@eval[2+2]" == "4" goto 4NT_args :win9xME_args @rem Slurp the command line arguments. @@ -60,11 +59,6 @@ set _SKIP=2 if "x%~1" == "x" goto execute set CMD_LINE_ARGS=%* -goto execute - -:4NT_args -@rem Get arguments from the 4NT Shell from JP Software -set CMD_LINE_ARGS=%$ :execute @rem Setup the command line diff --git a/src/main/java/network/pxl8/stonecatalysts/StoneCatalysts.java b/src/main/java/network/pxl8/stonecatalysts/StoneCatalysts.java index 9613469..abc5830 100644 --- a/src/main/java/network/pxl8/stonecatalysts/StoneCatalysts.java +++ b/src/main/java/network/pxl8/stonecatalysts/StoneCatalysts.java @@ -1,33 +1,27 @@ package network.pxl8.stonecatalysts; +import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.fml.ModLoadingContext; import net.minecraftforge.fml.common.Mod; -import net.minecraftforge.fml.common.SidedProxy; -import net.minecraftforge.fml.common.event.FMLInitializationEvent; -import net.minecraftforge.fml.common.event.FMLPostInitializationEvent; -import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; +import net.minecraftforge.fml.config.ModConfig; +import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent; +import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext; +import net.minecraftforge.fml.loading.FMLPaths; +import network.pxl8.stonecatalysts.config.Configuration; import network.pxl8.stonecatalysts.lib.LibMeta; -import network.pxl8.stonecatalysts.proxy.Proxy; -@Mod(modid = LibMeta.MOD_ID, version = LibMeta.VERSION, acceptableRemoteVersions = "*") +@Mod("stonecatalysts") public class StoneCatalysts { - @Mod.Instance - public static StoneCatalysts instance; + public StoneCatalysts() { + FMLJavaModLoadingContext.get().getModEventBus().addListener(this::setup); - @SidedProxy(clientSide = LibMeta.CLIENT_PROXY, serverSide = LibMeta.SERVER_PROXY, modId = LibMeta.MOD_ID) - private static Proxy proxy; + MinecraftForge.EVENT_BUS.register(this); - @Mod.EventHandler - public void preInit(FMLPreInitializationEvent event) { - proxy.preInit(); + ModLoadingContext.get().registerConfig(ModConfig.Type.COMMON, Configuration.COMMON_CONFIG); + Configuration.loadConfig(Configuration.COMMON_CONFIG, FMLPaths.CONFIGDIR.get().resolve("stonecatalysts-common.toml")); } - @Mod.EventHandler - public void init(FMLInitializationEvent event) { - proxy.init(); - } - - @Mod.EventHandler - public void postInit(FMLPostInitializationEvent event) { - proxy.postInit(); + private void setup(final FMLCommonSetupEvent event) { + LibMeta.LOG.debug("StoneCatalysts"); } } diff --git a/src/main/java/network/pxl8/stonecatalysts/config/Conf.java b/src/main/java/network/pxl8/stonecatalysts/config/Conf.java deleted file mode 100644 index 294318c..0000000 --- a/src/main/java/network/pxl8/stonecatalysts/config/Conf.java +++ /dev/null @@ -1,34 +0,0 @@ -package network.pxl8.stonecatalysts.config; - -import net.minecraftforge.common.config.Config; -import net.minecraftforge.common.config.ConfigManager; -import net.minecraftforge.fml.client.event.ConfigChangedEvent; -import net.minecraftforge.fml.common.Mod; -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; -import network.pxl8.stonecatalysts.lib.LibMeta; - -@Config(modid = LibMeta.MOD_ID, name = LibMeta.MOD_ID) -public class Conf { - public static BaseConf base_config = new BaseConf(); - public static CompatConf compat_config = new CompatConf(); - - public static class BaseConf { - @Config.Comment({"Replace stone generation (Lava over Water) with the corresponding catalyst"}) - public Boolean REPLACE_STONE = true; - @Config.Comment({"Replace cobble generation (Water into Flowing Lava) with the corresponding catalyst"}) - public Boolean REPLACE_COBBLE = true; - } - - public static class CompatConf { - @Config.Comment({"Adds quark stones (Basalt, Marble, Limestone, Slate, Jasper) as catalysts"}) - public Boolean QUARK_COMPAT = true; - } - - @Mod.EventBusSubscriber - public static class ConfigSync { - @SubscribeEvent - public static void onConfigChanged(ConfigChangedEvent.OnConfigChangedEvent event){ - if (event.getModID().equals(LibMeta.MOD_ID)) { ConfigManager.sync(LibMeta.MOD_ID, Config.Type.INSTANCE); } - } - } -} diff --git a/src/main/java/network/pxl8/stonecatalysts/config/Configuration.java b/src/main/java/network/pxl8/stonecatalysts/config/Configuration.java new file mode 100644 index 0000000..410f159 --- /dev/null +++ b/src/main/java/network/pxl8/stonecatalysts/config/Configuration.java @@ -0,0 +1,52 @@ +package network.pxl8.stonecatalysts.config; + +import com.electronwill.nightconfig.core.file.CommentedFileConfig; +import com.electronwill.nightconfig.core.io.WritingMode; +import net.minecraftforge.common.ForgeConfigSpec; +import net.minecraftforge.fml.common.Mod; +import network.pxl8.stonecatalysts.lib.LibMeta; + +import java.nio.file.Path; + +@Mod.EventBusSubscriber +public class Configuration { + private static final ForgeConfigSpec.Builder COMMON_BUILDER = new ForgeConfigSpec.Builder(); + public static ForgeConfigSpec COMMON_CONFIG; + + public static ForgeConfigSpec.BooleanValue REPLACE_STONE; + public static ForgeConfigSpec.BooleanValue REPLACE_COBBLE; + + public static ForgeConfigSpec.BooleanValue ENABLE_QUARK_COMPAT; + + static { + COMMON_BUILDER.push("base_config"); + setupBaseConfig(); + COMMON_BUILDER.push("compat_config"); + setupCompatConfig(); + COMMON_CONFIG = COMMON_BUILDER.build(); + } + + private static void setupBaseConfig() { + REPLACE_STONE = COMMON_BUILDER.comment("Replace stone generation (Lava over Water) with the corresponding catalyst") + .define("REPLACE_STONE", true); + REPLACE_COBBLE = COMMON_BUILDER.comment("Replace cobble generation (Water into Flowing Lava) with the corresponding catalyst") + .define("REPLACE_COBBLE", true); + COMMON_BUILDER.pop(); + } + + private static void setupCompatConfig() { + ENABLE_QUARK_COMPAT = COMMON_BUILDER.comment("Adds quark stones (Basalt, Marble, Limestone, Slate, Jasper) as catalysts") + .define("ENABLE_QUARK_COMPAT", true); + COMMON_BUILDER.pop(); + } + + public static void loadConfig(ForgeConfigSpec spec, Path path) { + final CommentedFileConfig configData = CommentedFileConfig.builder(path) + .sync() + .autosave() + .writingMode(WritingMode.REPLACE) + .build(); + configData.load(); + spec.setConfig(configData); + } +} diff --git a/src/main/java/network/pxl8/stonecatalysts/event/StoneGen.java b/src/main/java/network/pxl8/stonecatalysts/event/StoneGen.java index 52b8248..28f7ef0 100644 --- a/src/main/java/network/pxl8/stonecatalysts/event/StoneGen.java +++ b/src/main/java/network/pxl8/stonecatalysts/event/StoneGen.java @@ -1,16 +1,18 @@ package network.pxl8.stonecatalysts.event; import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; -import net.minecraft.init.Blocks; +import net.minecraft.block.BlockState; +import net.minecraft.block.Blocks; import net.minecraft.util.math.BlockPos; import net.minecraftforge.event.world.BlockEvent; -import net.minecraftforge.fml.common.Loader; +import net.minecraftforge.eventbus.api.SubscribeEvent; +import net.minecraftforge.fml.ModList; import net.minecraftforge.fml.common.Mod; -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; -import network.pxl8.stonecatalysts.config.Conf; -import network.pxl8.stonecatalysts.lib.LibTools; +import network.pxl8.stonecatalysts.config.Configuration; +import network.pxl8.stonecatalysts.lib.LibMeta; +import vazkii.quark.world.module.NewStoneTypesModule; + @Mod.EventBusSubscriber public class StoneGen { @@ -21,32 +23,32 @@ public static void genStone(BlockEvent.FluidPlaceBlockEvent event) { Block oldBlock = event.getOriginalState().getBlock(); Block newBlock = event.getNewState().getBlock(); - if (Conf.base_config.REPLACE_STONE && oldBlock.equals(Blocks.WATER) && newBlock.equals(Blocks.STONE)) { - IBlockState catalyst = event.getWorld().getBlockState(new BlockPos(x, y - 2, z)); + if (Configuration.REPLACE_STONE.get() && oldBlock.equals(Blocks.WATER) && newBlock.equals(Blocks.STONE)) { + BlockState catalyst = event.getWorld().getBlockState(new BlockPos(x, y - 1, z)); doReplacements(event, catalyst); } - if (Conf.base_config.REPLACE_COBBLE && oldBlock.equals(Blocks.FLOWING_LAVA) && newBlock.equals(Blocks.COBBLESTONE)) { - IBlockState catalyst = event.getWorld().getBlockState(new BlockPos(x, y - 1, z)); + if (Configuration.REPLACE_COBBLE.get() && oldBlock.equals(Blocks.LAVA) && newBlock.equals(Blocks.COBBLESTONE)) { + BlockState catalyst = event.getWorld().getBlockState(new BlockPos(x, y - 1, z)); doReplacements(event, catalyst); } } - private static void replaceBlock(BlockEvent.FluidPlaceBlockEvent event, IBlockState catalyst, String replace) { - if (catalyst.equals(LibTools.getStateFromString(replace))) { event.setNewState(LibTools.getStateFromString(replace)); } + private static void replaceBlock(BlockEvent.FluidPlaceBlockEvent event, BlockState catalyst, BlockState replace) { + if (catalyst.equals(replace)) { event.setNewState(replace); } } - private static void doReplacements(BlockEvent.FluidPlaceBlockEvent event, IBlockState catalyst) { - replaceBlock(event, catalyst, "minecraft:stone/1"); - replaceBlock(event, catalyst, "minecraft:stone/3"); - replaceBlock(event, catalyst, "minecraft:stone/5"); - - if(Loader.isModLoaded("quark") && Conf.compat_config.QUARK_COMPAT) { - replaceBlock(event, catalyst, "quark:basalt"); - replaceBlock(event, catalyst, "quark:marble"); - replaceBlock(event, catalyst, "quark:limestone"); - replaceBlock(event, catalyst, "quark:slate"); - replaceBlock(event, catalyst, "quark:jasper"); + private static void doReplacements(BlockEvent.FluidPlaceBlockEvent event, BlockState catalyst) { + replaceBlock(event, catalyst, Blocks.GRANITE.getDefaultState()); + replaceBlock(event, catalyst, Blocks.DIORITE.getDefaultState()); + replaceBlock(event, catalyst, Blocks.ANDESITE.getDefaultState()); + + if(ModList.get().isLoaded("quark") && Configuration.ENABLE_QUARK_COMPAT.get()) { + replaceBlock(event, catalyst, NewStoneTypesModule.marbleBlock.getDefaultState()); + replaceBlock(event, catalyst, NewStoneTypesModule.limestoneBlock.getDefaultState()); + replaceBlock(event, catalyst, NewStoneTypesModule.jasperBlock.getDefaultState()); + replaceBlock(event, catalyst, NewStoneTypesModule.slateBlock.getDefaultState()); + replaceBlock(event, catalyst, NewStoneTypesModule.basaltBlock.getDefaultState()); } } } diff --git a/src/main/java/network/pxl8/stonecatalysts/lib/LibMeta.java b/src/main/java/network/pxl8/stonecatalysts/lib/LibMeta.java index 7ec38d0..289afc1 100644 --- a/src/main/java/network/pxl8/stonecatalysts/lib/LibMeta.java +++ b/src/main/java/network/pxl8/stonecatalysts/lib/LibMeta.java @@ -5,10 +5,6 @@ public class LibMeta { public static final String MOD_ID = "stonecatalysts"; - public static final String VERSION = "1.0.0"; public static final Logger LOG = LogManager.getLogger(MOD_ID); - - public static final String CLIENT_PROXY = "network.pxl8.stonecatalysts.proxy.ClientProxy"; - public static final String SERVER_PROXY = "network.pxl8.stonecatalysts.proxy.CommonProxy"; } diff --git a/src/main/java/network/pxl8/stonecatalysts/lib/LibTools.java b/src/main/java/network/pxl8/stonecatalysts/lib/LibTools.java index c68eda7..09a995f 100644 --- a/src/main/java/network/pxl8/stonecatalysts/lib/LibTools.java +++ b/src/main/java/network/pxl8/stonecatalysts/lib/LibTools.java @@ -1,19 +1,5 @@ package network.pxl8.stonecatalysts.lib; -import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; - public class LibTools { - public static IBlockState getStateFromString(String block) { - String[] blockSplit = block.split("/"); - IBlockState blockState = null; - - if (blockSplit.length == 2) { - blockState = Block.getBlockFromName(blockSplit[0]).getStateFromMeta(Integer.parseInt(blockSplit[1])); - } else if (blockSplit.length == 1) { - blockState = Block.getBlockFromName(blockSplit[0]).getDefaultState(); - } - return blockState; - } } diff --git a/src/main/java/network/pxl8/stonecatalysts/proxy/ClientProxy.java b/src/main/java/network/pxl8/stonecatalysts/proxy/ClientProxy.java deleted file mode 100644 index d449b8a..0000000 --- a/src/main/java/network/pxl8/stonecatalysts/proxy/ClientProxy.java +++ /dev/null @@ -1,15 +0,0 @@ -package network.pxl8.stonecatalysts.proxy; - -public class ClientProxy extends CommonProxy{ - @Override - public void preInit() { - } - - @Override - public void init() { - } - - @Override - public void postInit() { - } -} diff --git a/src/main/java/network/pxl8/stonecatalysts/proxy/CommonProxy.java b/src/main/java/network/pxl8/stonecatalysts/proxy/CommonProxy.java deleted file mode 100644 index 26f2367..0000000 --- a/src/main/java/network/pxl8/stonecatalysts/proxy/CommonProxy.java +++ /dev/null @@ -1,15 +0,0 @@ -package network.pxl8.stonecatalysts.proxy; - -public class CommonProxy implements Proxy { - @Override - public void preInit() { - } - - @Override - public void init() { - } - - @Override - public void postInit() { - } -} diff --git a/src/main/java/network/pxl8/stonecatalysts/proxy/Proxy.java b/src/main/java/network/pxl8/stonecatalysts/proxy/Proxy.java deleted file mode 100644 index af1a2bc..0000000 --- a/src/main/java/network/pxl8/stonecatalysts/proxy/Proxy.java +++ /dev/null @@ -1,7 +0,0 @@ -package network.pxl8.stonecatalysts.proxy; - -public interface Proxy { - void preInit(); - void init(); - void postInit(); -} diff --git a/src/main/resources/META-INF/mods.toml b/src/main/resources/META-INF/mods.toml new file mode 100644 index 0000000..3c89376 --- /dev/null +++ b/src/main/resources/META-INF/mods.toml @@ -0,0 +1,44 @@ +# The name of the mod loader type to load - for regular FML @Mod mods it should be javafml +modLoader="javafml" +# A version range to match for said mod loader - for regular FML @Mod it will be the forge version +loaderVersion="[28,)" +# A URL to refer people to when problems occur with this mod +issueTrackerURL="https://github.com/Pxl-8/StoneCatalysts/issues/" +# A list of mods - how many allowed here is determined by the individual mod loader +[[mods]] +# The modid of the mod +modId="stonecatalysts" +# The version number of the mod - there's a few well known ${} variables useable here or just hardcode it +version="${file.jarVersion}" + # A display name for the mod +displayName="StoneCatalysts" +# A URL to query for updates for this mod. See the JSON update specification +#updateJSONURL="https://pxl8.network/mods" +# A URL for the "homepage" for this mod, displayed in the mod UI +#displayURL="https://mods.pxl8.network/ColouredChat" +displayURL="https://www.curseforge.com/minecraft/mc-mods/stonecatalysts" +# A file name (in the root of the mod JAR) containing a logo for display +logoFile="stonecatalysts.png" +# A text field displayed in the mod UI +credits=''' +The pxl8 community, for being mostly cool +Hatsune Miku for making minecraft +''' +# A text field displayed in the mod UI +authors="uberifix" +# The description text for the mod (multi line!) +description=''' +Generate additional stone types with stone gens using a catalyst +''' +# A dependency - use the . to indicate dependency for a specific modid. Dependencies are optional. +[[dependencies.forge]] + # the modid of the dependency + modId="forge" + # Does this dependency have to exist - if not, ordering below must be specified + mandatory=true + # The version range of the dependency + versionRange="[28,)" + # An ordering relationship for the dependency - BEFORE or AFTER required if the relationship is not mandatory + ordering="NONE" + # Side this dependency is applied on - BOTH, CLIENT or SERVER + side="BOTH" \ No newline at end of file diff --git a/src/main/resources/mcmod.info b/src/main/resources/mcmod.info deleted file mode 100644 index 1c11b5c..0000000 --- a/src/main/resources/mcmod.info +++ /dev/null @@ -1,16 +0,0 @@ -[ - { - "modid": "stonecatalysts", - "name": "StoneCatalysts", - "description": "Generate additional stone types with stone gens using a catalyst", - "version": "${version}", - "mcversion": "${mcversion}", - "url": "", - "updateUrl": "", - "authorList": ["uberifix"], - "credits": "\nThe pxl8 community, for being mostly cool \nHatsune Miku for making minecraft", - "logoFile": "stonecatalysts.png", - "screenshots": [], - "dependencies": [] - } -] \ No newline at end of file diff --git a/src/main/resources/pack.mcmeta b/src/main/resources/pack.mcmeta index 5d5668a..697d60e 100644 --- a/src/main/resources/pack.mcmeta +++ b/src/main/resources/pack.mcmeta @@ -1,6 +1,6 @@ { "pack": { "description": "stonecatalysts", - "pack_format": 3 + "pack_format": 4 } } \ No newline at end of file