diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 2c770e0..0000000 --- a/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -# eclipse -bin -*.launch -.settings -.metadata -.classpath -.project - -# idea -out -*.ipr -*.iws -*.iml -.idea - -# gradle -build -.gradle - -# other -eclipse -run diff --git a/Large Logo.png b/Large Logo.png new file mode 100644 index 0000000..206594f Binary files /dev/null and b/Large Logo.png differ diff --git a/README.md b/README.md index 5313c10..befd4c8 100644 --- a/README.md +++ b/README.md @@ -1,5 +1 @@ -# RandomConfigs - -A utility mod for setting default configurations, gamerules, difficulties and world borders. - -Uses [Jankson](https://github.com/falkreon/Jankson), a JSON/HJSON parser. +# Miscellaneous Files for RandomConfigs diff --git a/attackspeeds.json b/attackspeeds.json new file mode 100644 index 0000000..b997cf7 --- /dev/null +++ b/attackspeeds.json @@ -0,0 +1,26 @@ +{ + "attackSpeeds": { + //Registry name + "minecraft:iron_sword": { + //Attack speed (from 0.0 to 1024.0) + "speed": 3.0, + //Whether attacks should be disabled during the attack cooldown + //The attack cooldown will reset when an attack is attempted during the cooldown + "disableAttacksDuringAttackCooldown": true + }, + "minecraft:diamond_sword": { + "speed": 10.0, + "disableAttacksDuringAttackCooldown": false + } + }, + //Overrides RandomTweaks' attack speed configuration option + "defaultAttackSpeed": 4.0, + //Overrides RandomTweaks' "misc.disableAttacksDuringAttackCooldown" option + "disableAttacksDuringAttackCooldownByDefault": false, + //Whether to enable the /asreload command, which reloads this configuration + "asreloadCommand": true, + //Whether to enable the client-sided /asreloadclient command + "asreloadclientCommand": true, + //Whether the options in this JSON should take effect (excluding the command toggles) + "enabled": true +} diff --git a/build.gradle b/build.gradle deleted file mode 100644 index 46b54e7..0000000 --- a/build.gradle +++ /dev/null @@ -1,92 +0,0 @@ -buildscript { - repositories { - jcenter() - - maven { - url "http://files.minecraftforge.net/maven" - } - } - - dependencies { - classpath "net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT" - classpath "com.github.jengelman.gradle.plugins:shadow:2.0.0" - } -} - -apply plugin: "net.minecraftforge.gradle.forge" -apply plugin: "com.github.johnrengelman.shadow" - -version = "1.12.2-1.3.2.3" -group = "com.therandomlabs.randomconfigs" -archivesBaseName = "randomconfigs" - -sourceCompatibility = targetCompatibility = "1.8" - -repositories { - mavenCentral() -} - -dependencies { - shadow "blue.endless:jankson:1.1.0" - compile "blue.endless:jankson:1.1.0" -} - -shadowJar { - classifier = "" - relocate "blue.endless.jankson", "com.therandomlabs.randomconfigs.repackage.blue.endless.jankson" - configurations = [project.configurations.shadow] -} - -reobf { - shadowJar { - mappingType = "SEARGE" - } -} - -build.dependsOn shadowJar - -artifacts { - archives shadowJar -} - -minecraft { - version = "1.12.2-14.23.5.2822" - runDir = "run" - mappings = "stable_39" - - replace "@VERSION@", project.version - replace "@FINGERPRINT@", project.findProperty("signSHA1") -} - -processResources { - //Ensure this task is redone when the versions change - inputs.property "version", project.version - inputs.property "mcversion", project.minecraft.version - - //Replace version and mcversion in mcmod.info - from(sourceSets.main.resources.srcDirs) { - include "mcmod.info" - expand "version": project.version, "mcversion": project.minecraft.version - } -} - -jar { - manifest { - attributes "FMLAT": "randomconfigs_at.cfg" - } -} - -task signJar(type: SignJar, dependsOn: reobfJar) { - onlyIf { - project.hasProperty("keyStore") - } - - keyStore = project.findProperty("keyStore") - alias = project.findProperty("keyStoreAlias") - storePass = project.findProperty("keyStorePass") - keyPass = project.findProperty("keyStoreKeyPass") - inputFile = jar.archivePath - outputFile = jar.archivePath -} - -build.dependsOn signJar diff --git a/src/main/resources/assets/randomconfigs/defaultgamerules.json b/defaultgamerules.json similarity index 95% rename from src/main/resources/assets/randomconfigs/defaultgamerules.json rename to defaultgamerules.json index b4068dd..1b3c5a3 100644 --- a/src/main/resources/assets/randomconfigs/defaultgamerules.json +++ b/defaultgamerules.json @@ -1,5 +1,4 @@ { - /* //Top-level gamerules are set for all game modes and world types. "commandBlockOutput": { //Each gamerule has two properties: the value, and whether the value should be forced. @@ -32,6 +31,7 @@ //For an empty game mode, use: //:TYPE,TYPE,... //For example, use ":void" to specify gamerules for all Void worlds. + //On 1.16, only the "default" and "flat" world types are supported. //The following specifies gamerules for all survival worlds. "survival": { //This isn't really a gamerule. RandomConfigs uses this to determine the difficulty. @@ -46,5 +46,4 @@ "WORLD_BORDER_SIZE": 10000 } } - */ } diff --git a/gradle.properties b/gradle.properties deleted file mode 100644 index e9b9fd5..0000000 --- a/gradle.properties +++ /dev/null @@ -1,3 +0,0 @@ -# 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 diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar deleted file mode 100644 index 7a3265e..0000000 Binary files a/gradle/wrapper/gradle-wrapper.jar and /dev/null differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index 949819d..0000000 --- a/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,5 +0,0 @@ -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.9-bin.zip diff --git a/gradlew b/gradlew deleted file mode 100644 index cccdd3d..0000000 --- a/gradlew +++ /dev/null @@ -1,172 +0,0 @@ -#!/usr/bin/env sh - -############################################################################## -## -## Gradle start up script for UN*X -## -############################################################################## - -# 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 () { - echo "$*" -} - -die () { - echo - echo "$*" - echo - exit 1 -} - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -nonstop=false -case "`uname`" in - CYGWIN* ) - cygwin=true - ;; - Darwin* ) - darwin=true - ;; - MINGW* ) - msys=true - ;; - NONSTOP* ) - nonstop=true - ;; -esac - -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" - else - JAVACMD="$JAVA_HOME/bin/java" - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -else - JAVACMD="java" - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." -fi - -# Increase the maximum file descriptors if we can. -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 - MAX_FD="$MAX_FD_LIMIT" - fi - ulimit -n $MAX_FD - if [ $? -ne 0 ] ; then - warn "Could not set maximum file descriptor limit: $MAX_FD" - fi - else - warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" - fi -fi - -# For Darwin, add options to specify how the application appears in the dock -if $darwin; then - GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" -fi - -# For Cygwin, switch paths to Windows format before running java -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` - SEP="" - for dir in $ROOTDIRSRAW ; do - ROOTDIRS="$ROOTDIRS$SEP$dir" - SEP="|" - done - OURCYGPATTERN="(^($ROOTDIRS))" - # Add a user-defined pattern to the cygpath arguments - if [ "$GRADLE_CYGPATTERN" != "" ] ; then - OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" - fi - # Now convert the arguments - kludge to limit ourselves to /bin/sh - i=0 - for arg in "$@" ; do - CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` - CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option - - if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition - eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` - else - eval `echo args$i`="\"$arg\"" - fi - i=$((i+1)) - done - case $i in - (0) set -- ;; - (1) set -- "$args0" ;; - (2) set -- "$args0" "$args1" ;; - (3) set -- "$args0" "$args1" "$args2" ;; - (4) set -- "$args0" "$args1" "$args2" "$args3" ;; - (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; - esac -fi - -# Escape application args -save () { - for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done - echo " " -} -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" "$@" diff --git a/gradlew.bat b/gradlew.bat deleted file mode 100644 index f955316..0000000 --- a/gradlew.bat +++ /dev/null @@ -1,84 +0,0 @@ -@if "%DEBUG%" == "" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -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 - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto init - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto init - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:init -@rem Get command-line arguments, handling Windows variants - -if not "%OS%" == "Windows_NT" goto win9xME_args - -:win9xME_args -@rem Slurp the command line arguments. -set CMD_LINE_ARGS= -set _SKIP=2 - -:win9xME_args_slurp -if "x%~1" == "x" goto execute - -set CMD_LINE_ARGS=%* - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% - -:end -@rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega diff --git a/src/main/java/com/therandomlabs/randomconfigs/RandomConfigs.java b/src/main/java/com/therandomlabs/randomconfigs/RandomConfigs.java deleted file mode 100644 index dbdd2b6..0000000 --- a/src/main/java/com/therandomlabs/randomconfigs/RandomConfigs.java +++ /dev/null @@ -1,229 +0,0 @@ -package com.therandomlabs.randomconfigs; - -import java.io.IOException; -import java.io.InputStream; -import java.nio.charset.StandardCharsets; -import java.nio.file.Files; -import java.nio.file.NoSuchFileException; -import java.nio.file.Path; -import java.nio.file.Paths; -import java.util.Arrays; -import java.util.List; -import java.util.Scanner; -import java.util.regex.Pattern; -import blue.endless.jankson.Jankson; -import blue.endless.jankson.JsonObject; -import blue.endless.jankson.impl.SyntaxError; -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.therandomlabs.randomconfigs.attackspeeds.AttackSpeeds; -import com.therandomlabs.randomconfigs.configs.DefaultConfigs; -import com.therandomlabs.randomconfigs.gamerules.DefaultGameRules; -import net.minecraft.crash.CrashReport; -import net.minecraft.util.ReportedException; -import net.minecraftforge.fml.common.FMLCommonHandler; -import net.minecraftforge.fml.common.Loader; -import net.minecraftforge.fml.common.Mod; -import net.minecraftforge.fml.common.event.FMLConstructionEvent; -import net.minecraftforge.fml.common.event.FMLInitializationEvent; -import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; -import net.minecraftforge.fml.common.event.FMLServerStartingEvent; -import net.minecraftforge.fml.relauncher.FMLInjectionData; -import org.apache.commons.lang3.StringUtils; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; - -@Mod( - modid = RandomConfigs.MOD_ID, version = RandomConfigs.VERSION, - acceptedMinecraftVersions = RandomConfigs.ACCEPTED_MINECRAFT_VERSIONS, - acceptableRemoteVersions = RandomConfigs.ACCEPTABLE_REMOTE_VERSIONS, - updateJSON = RandomConfigs.UPDATE_JSON, - certificateFingerprint = RandomConfigs.CERTIFICATE_FINGERPRINT -) -public final class RandomConfigs { - public static final String MOD_ID = "randomconfigs"; - public static final String VERSION = "@VERSION@"; - public static final String ACCEPTED_MINECRAFT_VERSIONS = "[1.10,1.13)"; - public static final String ACCEPTABLE_REMOTE_VERSIONS = "*"; - public static final String UPDATE_JSON = - "https://raw.githubusercontent.com/TheRandomLabs/RandomConfigs/misc/versions.json"; - public static final String CERTIFICATE_FINGERPRINT = "@FINGERPRINT@"; - - public static final Logger LOGGER = LogManager.getLogger(MOD_ID); - - public static final boolean IS_CLIENT = FMLCommonHandler.instance().getSide().isClient(); - public static final String MC_VERSION_STRING = (String) FMLInjectionData.data()[4]; - public static final int MC_VERSION = Integer.parseInt(MC_VERSION_STRING.split("\\.")[1]); - - public static final boolean RANDOMTWEAKS_LOADED = Loader.isModLoaded("randomtweaks"); - - public static final Gson GSON = new GsonBuilder(). - setPrettyPrinting(). - disableHtmlEscaping(). - create(); - - public static final Path MC_DIR = Paths.get(".").toAbsolutePath().normalize(); - public static final Path CONFIG_DIR = MC_DIR.resolve("config").resolve(MOD_ID); - - public static final String NEWLINE_REGEX = "(\r\n|\r|\n)"; - public static final Pattern NEWLINE = Pattern.compile(NEWLINE_REGEX); - - @Mod.EventHandler - public static void construct(FMLConstructionEvent event) { - try { - DefaultConfigs.handle(); - } catch(IOException ex) { - crashReport("Failed to handle default configs", ex); - } - - try { - DefaultGameRules.ensureExists(); - } catch(IOException ex) { - crashReport("Failed to load default gamerules", ex); - } - } - - @Mod.EventHandler - public static void preInit(FMLPreInitializationEvent event) { - if(event.getSide().isClient()) { - AttackSpeeds.registerClientCommand(); - } - } - - @Mod.EventHandler - public static void init(FMLInitializationEvent event) { - try { - AttackSpeeds.reload(); - } catch(IOException ex) { - crashReport("Failed to load attack speeds", ex); - } - } - - @Mod.EventHandler - public static void serverStarting(FMLServerStartingEvent event) { - AttackSpeeds.registerCommand(event); - } - - public static Path getFile(String file) { - final Path path = MC_DIR.resolve(file); - - if(isParent(path, MC_DIR)) { - throw new IllegalArgumentException("Invalid path: " + file); - } - - return path; - } - - public static Path getConfig(String fileName) { - try { - Files.createDirectories(CONFIG_DIR); - } catch(IOException ex) { - crashReport("Failed to create: " + CONFIG_DIR, ex); - } - - final Path path = CONFIG_DIR.resolve(fileName).normalize(); - - if(isParent(path, CONFIG_DIR)) { - throw new IllegalArgumentException("Invalid config path: " + fileName); - } - - return path; - } - - public static String read(Path path) { - try { - return StringUtils.join(Files.readAllLines(path), System.lineSeparator()); - } catch(IOException ex) { - if(!(ex instanceof NoSuchFileException)) { - crashReport("Failed to read file: " + path, ex); - } - } - - return null; - } - - public static Path getJson(String jsonName) { - return getConfig(jsonName + ".json"); - } - - public static JsonObject readJson(Path json) { - final String raw = read(json); - - if(raw != null) { - try { - return Jankson.builder().build().load(raw); - } catch(SyntaxError ex) { - crashReport("Failed to read JSON: " + json, ex); - } - } - - return null; - } - - public static T readJson(Path json, Class clazz) { - String raw = read(json); - - if(raw != null) { - try { - final Jankson jankson = Jankson.builder().build(); - - if(clazz.isArray()) { - //Shoddy workaround until I figure out how to parse arrays with Jankson - raw = jankson.load("{\"array\":" + raw + "}").get("array").toJson(); - } else { - raw = jankson.load(raw).toJson(); - } - - return GSON.fromJson(raw, clazz); - } catch(SyntaxError ex) { - crashReport("Failed to read JSON: " + json, ex); - } - } - - return null; - } - - public static void writeJson(Path json, Object object) { - String raw; - - if(object instanceof JsonObject) { - raw = ((JsonObject) object).toJson(false, true); - } else { - raw = GSON.toJson(object); - } - - raw = raw.replaceAll(" {2}", "\t"); - - try { - Files.write(json, (raw + System.lineSeparator()).getBytes(StandardCharsets.UTF_8)); - } catch(IOException ex) { - crashReport("Failed to write to: " + json, ex); - } - } - - public static boolean isParent(Path parent, Path path) { - while((path = path.getParent()) != null) { - if(path.equals(parent)) { - return true; - } - } - - return false; - } - - public static String readString(InputStream stream) { - @SuppressWarnings("resource") - final Scanner scanner = new Scanner(stream, "UTF-8").useDelimiter("\\A"); - final String string = scanner.hasNext() ? scanner.next() : ""; - scanner.close(); - return string; - } - - public static List readLines(InputStream stream) { - return Arrays.asList(NEWLINE.split(readString(stream))); - } - - public static void crashReport(String message, Exception ex) { - throw new ReportedException(new CrashReport(message, ex)); - } -} diff --git a/src/main/java/com/therandomlabs/randomconfigs/attackspeeds/AttackSpeedConfig.java b/src/main/java/com/therandomlabs/randomconfigs/attackspeeds/AttackSpeedConfig.java deleted file mode 100644 index e069330..0000000 --- a/src/main/java/com/therandomlabs/randomconfigs/attackspeeds/AttackSpeedConfig.java +++ /dev/null @@ -1,38 +0,0 @@ -package com.therandomlabs.randomconfigs.attackspeeds; - -import java.util.HashMap; -import java.util.Map; -import net.minecraft.item.Item; -import net.minecraft.util.ResourceLocation; - -public final class AttackSpeedConfig { - public Map attackSpeeds = new HashMap<>(); - public double defaultAttackSpeed = 4.0; - public boolean disableAttacksDuringAttackCooldownByDefault; - public boolean asreloadCommand = true; - public boolean asreloadclientCommand = true; - public boolean enabled; - - public transient Map itemAttackSpeeds; - - public void ensureCorrect() { - final Map newAttackSpeeds = new HashMap<>(attackSpeeds.size()); - itemAttackSpeeds = new HashMap<>(attackSpeeds.size()); - - for(Map.Entry entry : attackSpeeds.entrySet()) { - final Item item = Item.REGISTRY.getObject(new ResourceLocation(entry.getKey())); - - if(item == null) { - continue; - } - - final ItemAttackSpeed speed = entry.getValue(); - speed.ensureCorrect(); - - newAttackSpeeds.put(item.getRegistryName().toString(), speed); - itemAttackSpeeds.put(item, speed); - } - - attackSpeeds = newAttackSpeeds; - } -} diff --git a/src/main/java/com/therandomlabs/randomconfigs/attackspeeds/AttackSpeeds.java b/src/main/java/com/therandomlabs/randomconfigs/attackspeeds/AttackSpeeds.java deleted file mode 100644 index f865492..0000000 --- a/src/main/java/com/therandomlabs/randomconfigs/attackspeeds/AttackSpeeds.java +++ /dev/null @@ -1,122 +0,0 @@ -package com.therandomlabs.randomconfigs.attackspeeds; - -import java.io.IOException; -import java.nio.file.Files; -import java.nio.file.Path; -import com.therandomlabs.randomconfigs.RandomConfigs; -import net.minecraft.entity.Entity; -import net.minecraft.entity.SharedMonsterAttributes; -import net.minecraft.entity.ai.attributes.IAttributeInstance; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraftforge.client.ClientCommandHandler; -import net.minecraftforge.event.entity.EntityJoinWorldEvent; -import net.minecraftforge.event.entity.living.LivingEvent; -import net.minecraftforge.event.entity.player.AttackEntityEvent; -import net.minecraftforge.fml.common.Mod; -import net.minecraftforge.fml.common.event.FMLServerStartingEvent; -import net.minecraftforge.fml.common.eventhandler.EventPriority; -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; -import net.minecraftforge.fml.relauncher.Side; - -@Mod.EventBusSubscriber(modid = RandomConfigs.MOD_ID) -public final class AttackSpeeds { - public static final Path JSON = RandomConfigs.getJson("attackspeeds"); - - private static AttackSpeedConfig speeds = new AttackSpeedConfig(); - - @SubscribeEvent(priority = EventPriority.HIGHEST) - public static void onEntityJoinWorld(EntityJoinWorldEvent event) { - if((!speeds.enabled && RandomConfigs.RANDOMTWEAKS_LOADED) || event.getWorld().isRemote) { - return; - } - - final Entity entity = event.getEntity(); - - if(!(entity instanceof EntityPlayer)) { - return; - } - - final IAttributeInstance attackSpeed = - ((EntityPlayer) entity).getEntityAttribute(SharedMonsterAttributes.ATTACK_SPEED); - - //If configurable attack speeds are disabled, set it to the vanilla default of 4.0 - //unless RandomTweaks is installed (see above if statement) since RandomTweaks - //has its own configurable attack speed option - attackSpeed.setBaseValue(speeds.enabled ? speeds.defaultAttackSpeed : 4.0); - } - - @SubscribeEvent - public static void onLivingUpdate(LivingEvent.LivingUpdateEvent event) { - if(!speeds.enabled) { - return; - } - - final Entity entity = event.getEntity(); - - if(entity.getEntityWorld().isRemote || !(entity instanceof EntityPlayer)) { - return; - } - - final EntityPlayer player = (EntityPlayer) entity; - final ItemStack stack = player.getHeldItem(player.getActiveHand()); - //1.10 compatibility - final Item item = stack == null ? null : stack.getItem(); - - final IAttributeInstance attackSpeed = - player.getEntityAttribute(SharedMonsterAttributes.ATTACK_SPEED); - - final ItemAttackSpeed speed = speeds.itemAttackSpeeds.get(item); - attackSpeed.setBaseValue(speed == null ? speeds.defaultAttackSpeed : speed.speed); - } - - @SubscribeEvent - public static void onPlayerAttackEntity(AttackEntityEvent event) { - final EntityPlayer player = event.getEntityPlayer(); - - if(player.getEntityWorld().isRemote || player.getCooledAttackStrength(0.5F) == 1.0F) { - return; - } - - final Item item = player.getHeldItem(player.getActiveHand()).getItem(); - final ItemAttackSpeed speed = speeds.itemAttackSpeeds.get(item); - - if(speed == null) { - if(speeds.disableAttacksDuringAttackCooldownByDefault) { - player.resetCooldown(); - event.setCanceled(true); - } - } else { - if(speed.disableAttacksDuringAttackCooldown) { - player.resetCooldown(); - event.setCanceled(true); - } - } - } - - public static AttackSpeedConfig get() { - return speeds; - } - - public static void reload() throws IOException { - if(Files.exists(JSON)) { - speeds = RandomConfigs.readJson(JSON, AttackSpeedConfig.class); - speeds.ensureCorrect(); - } - - RandomConfigs.writeJson(JSON, speeds); - } - - public static void registerClientCommand() { - if(speeds.asreloadclientCommand) { - ClientCommandHandler.instance.registerCommand(new CommandASReload(Side.CLIENT)); - } - } - - public static void registerCommand(FMLServerStartingEvent event) { - if(speeds.asreloadCommand) { - event.registerServerCommand(new CommandASReload(Side.SERVER)); - } - } -} diff --git a/src/main/java/com/therandomlabs/randomconfigs/attackspeeds/CommandASReload.java b/src/main/java/com/therandomlabs/randomconfigs/attackspeeds/CommandASReload.java deleted file mode 100644 index 98b7023..0000000 --- a/src/main/java/com/therandomlabs/randomconfigs/attackspeeds/CommandASReload.java +++ /dev/null @@ -1,77 +0,0 @@ -package com.therandomlabs.randomconfigs.attackspeeds; - -import java.io.IOException; -import com.therandomlabs.randomconfigs.RandomConfigs; -import net.minecraft.command.CommandBase; -import net.minecraft.command.CommandException; -import net.minecraft.command.ICommandSender; -import net.minecraft.server.MinecraftServer; -import net.minecraft.util.text.TextComponentString; -import net.minecraft.util.text.TextComponentTranslation; -import net.minecraftforge.fml.relauncher.Side; - -public class CommandASReload extends CommandBase { - private final boolean isClient; - - public CommandASReload(Side side) { - isClient = side.isClient(); - } - - @Override - public String getName() { - return isClient ? "asreloadclient" : "asreload"; - } - - @Override - public String getUsage(ICommandSender sender) { - if(RandomConfigs.MC_VERSION == 10) { - return isClient ? "/asreloadclient" : "/asreload"; - } - - return isClient ? "commands.asreloadclient.usage" : "/asreload"; - } - - @Override - public void execute(MinecraftServer server, ICommandSender sender, String[] args) - throws CommandException { - final boolean isServer = server != null && server.isDedicatedServer(); - - try { - AttackSpeeds.reload(); - } catch(IOException ex) { - RandomConfigs.LOGGER.error("Failed to reload attack speed configuration", ex); - - if(isServer) { - throw new CommandException( - "Failed to reload attack speed configuration: " + ex.getMessage() - ); - } - - if(RandomConfigs.MC_VERSION == 10) { - throw new CommandException( - "Failed to reload client-sided attack speed configuration: " + - ex.getMessage() - ); - } - - throw new CommandException("commands.asreloadclient.failure", ex.getMessage()); - } - - if(isServer) { - notifyCommandListener(sender, this, "Attack speed configuration reloaded!"); - } else { - if(RandomConfigs.MC_VERSION == 10) { - sender.sendMessage(new TextComponentString( - "Client-sided attack speed configuration reloaded!" - )); - } else { - sender.sendMessage(new TextComponentTranslation("commands.asreloadclient.success")); - } - } - } - - @Override - public int getRequiredPermissionLevel() { - return isClient ? 0 : 4; - } -} diff --git a/src/main/java/com/therandomlabs/randomconfigs/attackspeeds/ItemAttackSpeed.java b/src/main/java/com/therandomlabs/randomconfigs/attackspeeds/ItemAttackSpeed.java deleted file mode 100644 index d220296..0000000 --- a/src/main/java/com/therandomlabs/randomconfigs/attackspeeds/ItemAttackSpeed.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.therandomlabs.randomconfigs.attackspeeds; - -public final class ItemAttackSpeed { - public double speed = 4.0; - public boolean disableAttacksDuringAttackCooldown; - - public void ensureCorrect() { - if(speed < 0.0) { - speed = 0.0; - } else if(speed > 1024.0) { - speed = 1024.0; - } - } -} diff --git a/src/main/java/com/therandomlabs/randomconfigs/configs/ConfigSide.java b/src/main/java/com/therandomlabs/randomconfigs/configs/ConfigSide.java deleted file mode 100644 index 05f6f2f..0000000 --- a/src/main/java/com/therandomlabs/randomconfigs/configs/ConfigSide.java +++ /dev/null @@ -1,12 +0,0 @@ -package com.therandomlabs.randomconfigs.configs; - -import com.google.gson.annotations.SerializedName; - -public enum ConfigSide { - @SerializedName("client") - CLIENT, - @SerializedName("server") - SERVER, - @SerializedName("both") - BOTH -} diff --git a/src/main/java/com/therandomlabs/randomconfigs/configs/DefaultConfig.java b/src/main/java/com/therandomlabs/randomconfigs/configs/DefaultConfig.java deleted file mode 100644 index 4e0eddb..0000000 --- a/src/main/java/com/therandomlabs/randomconfigs/configs/DefaultConfig.java +++ /dev/null @@ -1,8 +0,0 @@ -package com.therandomlabs.randomconfigs.configs; - -public class DefaultConfig { - public String source; - public String destination; - public ConfigSide side; - public int version; -} diff --git a/src/main/java/com/therandomlabs/randomconfigs/configs/DefaultConfigs.java b/src/main/java/com/therandomlabs/randomconfigs/configs/DefaultConfigs.java deleted file mode 100644 index c9f89a9..0000000 --- a/src/main/java/com/therandomlabs/randomconfigs/configs/DefaultConfigs.java +++ /dev/null @@ -1,83 +0,0 @@ -package com.therandomlabs.randomconfigs.configs; - -import java.io.IOException; -import java.nio.file.Files; -import java.nio.file.Path; -import java.nio.file.Paths; -import java.nio.file.StandardCopyOption; -import com.therandomlabs.randomconfigs.RandomConfigs; - -public final class DefaultConfigs { - public static final Path DIRECTORY = RandomConfigs.getConfig("defaultconfigs"); - public static final Path JSON = RandomConfigs.getJson("defaultconfigs"); - public static final Path OLD_JSON = RandomConfigs.getJson("defaultconfigs_old"); - - private DefaultConfigs() {} - - public static void handle() throws IOException { - final DefaultConfig[] configs = RandomConfigs.readJson(JSON, DefaultConfig[].class); - - if(configs == null) { - Files.createDirectories(DIRECTORY); - return; - } - - final DefaultConfig[] oldConfigs = RandomConfigs.readJson(OLD_JSON, DefaultConfig[].class); - - Files.copy(JSON, OLD_JSON, StandardCopyOption.REPLACE_EXISTING); - - if(oldConfigs == null) { - for(DefaultConfig config : configs) { - handle(config, config.version); - } - } else { - for(DefaultConfig config : configs) { - int oldVersion = config.version; - - for(DefaultConfig oldConfig : oldConfigs) { - if(Paths.get(config.source).equals(Paths.get(oldConfig.source))) { - if(Paths.get(config.destination).equals(Paths.get(oldConfig.destination))) { - oldVersion = oldConfig.version; - } - - break; - } - } - - handle(config, oldVersion); - } - } - - RandomConfigs.writeJson(JSON, configs); - } - - public static void handle(DefaultConfig config, int oldVersion) throws IOException { - if(config.source == null) { - throw new NullPointerException("source"); - } - - if(config.destination == null) { - throw new NullPointerException("destination"); - } - - if(config.side == null) { - throw new NullPointerException("side"); - } - - if(config.side == ConfigSide.CLIENT && !RandomConfigs.IS_CLIENT) { - return; - } - - if(config.side == ConfigSide.SERVER && RandomConfigs.IS_CLIENT) { - return; - } - - final Path source = RandomConfigs.getConfig("defaultconfigs/" + config.source); - final Path destination = RandomConfigs.getFile(config.destination); - - if(config.version != oldVersion || !Files.exists(destination)) { - Files.createDirectories(destination.getParent()); - Files.copy(source, destination, StandardCopyOption.REPLACE_EXISTING); - } - } -} diff --git a/src/main/java/com/therandomlabs/randomconfigs/gamerules/DefaultGameRule.java b/src/main/java/com/therandomlabs/randomconfigs/gamerules/DefaultGameRule.java deleted file mode 100644 index 13efc8b..0000000 --- a/src/main/java/com/therandomlabs/randomconfigs/gamerules/DefaultGameRule.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.therandomlabs.randomconfigs.gamerules; - -public class DefaultGameRule { - public String key; - public String value; - public boolean forced; - - public DefaultGameRule(String key, String value, boolean forced) { - this.key = key; - this.value = value; - this.forced = forced; - } -} diff --git a/src/main/java/com/therandomlabs/randomconfigs/gamerules/DefaultGameRules.java b/src/main/java/com/therandomlabs/randomconfigs/gamerules/DefaultGameRules.java deleted file mode 100644 index 36624e7..0000000 --- a/src/main/java/com/therandomlabs/randomconfigs/gamerules/DefaultGameRules.java +++ /dev/null @@ -1,280 +0,0 @@ -package com.therandomlabs.randomconfigs.gamerules; - -import java.io.IOException; -import java.nio.file.Files; -import java.nio.file.Path; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashSet; -import java.util.List; -import java.util.Locale; -import java.util.Map; -import java.util.Set; -import blue.endless.jankson.JsonElement; -import blue.endless.jankson.JsonObject; -import blue.endless.jankson.JsonPrimitive; -import com.therandomlabs.randomconfigs.RandomConfigs; -import net.minecraft.world.DimensionType; -import net.minecraft.world.EnumDifficulty; -import net.minecraft.world.GameType; -import net.minecraft.world.World; -import net.minecraft.world.storage.WorldInfo; -import net.minecraftforge.event.world.WorldEvent; -import net.minecraftforge.fml.common.Mod; -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; - -@Mod.EventBusSubscriber(modid = RandomConfigs.MOD_ID) -public final class DefaultGameRules { - public static final String MODE_OR_WORLD_TYPE_SPECIFIC = "MODE_OR_WORLD_TYPE_SPECIFIC"; - public static final String DIFFICULTY = "DIFFICULTY"; - public static final String WORLD_BORDER_SIZE = "WORLD_BORDER_SIZE"; - - public static final Path JSON = RandomConfigs.getJson("defaultgamerules"); - - public static final List DEFAULT = RandomConfigs.readLines( - DefaultGameRules.class.getResourceAsStream( - "/assets/randomconfigs/defaultgamerules.json" - ) - ); - - private static List defaultGameRules; - - @SubscribeEvent - public static void onCreateSpawn(WorldEvent.CreateSpawnPosition event) { - final World world = event.getWorld(); - - if(world.provider.getDimensionType() != DimensionType.OVERWORLD) { - return; - } - - defaultGameRules = get(world); - - final WorldInfo worldInfo = world.getWorldInfo(); - - for(DefaultGameRule rule : defaultGameRules) { - if(rule.key.equals(DIFFICULTY)) { - try { - worldInfo.setDifficulty( - EnumDifficulty.valueOf(rule.value.toUpperCase(Locale.ENGLISH)) - ); - worldInfo.setDifficultyLocked(rule.forced); - } catch(IllegalArgumentException ex) { - RandomConfigs.LOGGER.error("Invalid difficulty: " + rule.value); - } - - continue; - } - - if(rule.key.equals(WORLD_BORDER_SIZE)) { - try { - world.getWorldBorder().setSize(Integer.parseInt(rule.value)); - } catch(NumberFormatException ex) { - RandomConfigs.LOGGER.error("Invalid world border size: " + rule.value); - } - - continue; - } - - worldInfo.gameRules.setOrCreateGameRule(rule.key, rule.value); - } - } - - @SubscribeEvent - public static void onWorldLoad(WorldEvent.Load event) { - final World world = event.getWorld(); - - if(world.isRemote) { - return; - } - - if(defaultGameRules == null) { - defaultGameRules = get(world); - } - - final WorldInfo worldInfo = world.getWorldInfo(); - final Set forced = new HashSet<>(); - - for(DefaultGameRule rule : defaultGameRules) { - if(rule.key.equals(DIFFICULTY) || rule.key.equals(WORLD_BORDER_SIZE)) { - continue; - } - - if(rule.forced) { - forced.add(rule.key); - worldInfo.gameRules.setOrCreateGameRule(rule.key, rule.value); - continue; - } - - if(!worldInfo.gameRules.hasRule(rule.key)) { - worldInfo.gameRules.setOrCreateGameRule(rule.key, rule.value); - } - } - - worldInfo.gameRules = new RCGameRules(worldInfo.gameRules, forced); - defaultGameRules = null; - } - - public static void create() throws IOException { - Files.write(JSON, DEFAULT); - } - - public static boolean exists() { - return Files.exists(JSON); - } - - public static void ensureExists() throws IOException { - if(!exists()) { - create(); - } - } - - @SuppressWarnings("Duplicates") - public static List get(int gamemode, String worldType) throws IOException { - if(!exists()) { - create(); - return Collections.emptyList(); - } - - final JsonObject json = RandomConfigs.readJson(JSON); - RandomConfigs.writeJson(JSON, json); - - final List gameRules = new ArrayList<>(); - - for(Map.Entry entry : json.entrySet()) { - final String key = entry.getKey(); - final JsonElement value = entry.getValue(); - - if(key.equals(WORLD_BORDER_SIZE)) { - gameRules.add(new DefaultGameRule(WORLD_BORDER_SIZE, value.toString(), false)); - continue; - } - - if(!(value instanceof JsonObject)) { - continue; - } - - final JsonObject object = (JsonObject) value; - - if(key.equals(MODE_OR_WORLD_TYPE_SPECIFIC)) { - getSpecific(gameRules, object, gamemode, worldType); - continue; - } - - final DefaultGameRule gameRule = get(key, object); - - if(gameRule != null) { - gameRules.add(gameRule); - } - } - - return gameRules; - } - - private static void getSpecific(List gameRules, JsonObject json, int gamemode, - String worldType) { - for(Map.Entry entry : json.entrySet()) { - final String key = entry.getKey(); - - if(!matches(key, gamemode, worldType)) { - continue; - } - - final JsonElement value = entry.getValue(); - - if(!(value instanceof JsonObject)) { - continue; - } - - get(gameRules, (JsonObject) value); - } - } - - private static boolean matches(String key, int gamemode, String worldType) { - final GameType gameType = GameType.getByID(gamemode); - final String[] split = key.split(":"); - - if(!split[0].isEmpty()) { - final String[] gamemodes = split[0].split(","); - boolean gamemodeFound = false; - - for(String mode : gamemodes) { - if(GameType.parseGameTypeWithDefault(mode, null) == gameType) { - gamemodeFound = true; - break; - } - } - - if(!gamemodeFound) { - return false; - } - } - - if(split.length > 1) { - for(String type : split[1].split(",")) { - if(type.equals(worldType)) { - return true; - } - } - - return false; - } - - return true; - } - - @SuppressWarnings("Duplicates") - private static void get(List gameRules, JsonObject json) { - for(Map.Entry entry : json.entrySet()) { - final String key = entry.getKey(); - final JsonElement value = entry.getValue(); - - if(key.equals(WORLD_BORDER_SIZE)) { - gameRules.add(new DefaultGameRule(WORLD_BORDER_SIZE, value.toString(), false)); - continue; - } - - if(!(value instanceof JsonObject)) { - continue; - } - - final DefaultGameRule gameRule = get(key, (JsonObject) value); - - if(gameRule != null) { - gameRules.add(gameRule); - } - } - } - - private static DefaultGameRule get(String key, JsonObject object) { - final JsonElement value = object.get("value"); - - if(!(value instanceof JsonPrimitive)) { - return null; - } - - final JsonElement forced = object.get("forced"); - - if(!(forced instanceof JsonPrimitive)) { - return null; - } - - return new DefaultGameRule( - key, - ((JsonPrimitive) value).asString(), - (boolean) ((JsonPrimitive) forced).getValue() - ); - } - - private static List get(World world) { - try { - return get( - world.getWorldInfo().getGameType().getID(), - world.getWorldType().getName() - ); - } catch(Exception ex) { - RandomConfigs.crashReport("Failed to read default gamerules", ex); - } - - return null; - } -} diff --git a/src/main/java/com/therandomlabs/randomconfigs/gamerules/RCGameRules.java b/src/main/java/com/therandomlabs/randomconfigs/gamerules/RCGameRules.java deleted file mode 100644 index 9ec7ebe..0000000 --- a/src/main/java/com/therandomlabs/randomconfigs/gamerules/RCGameRules.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.therandomlabs.randomconfigs.gamerules; - -import java.util.Set; -import net.minecraft.world.GameRules; - -public class RCGameRules extends GameRules { - private final Set forced; - - public RCGameRules(GameRules rules, Set forced) { - this.rules = rules.rules; - this.forced = forced; - } - - @Override - public void setOrCreateGameRule(String key, String ruleValue) { - if(!forced.contains(key)) { - super.setOrCreateGameRule(key, ruleValue); - } - } -} diff --git a/src/main/resources/META-INF/randomconfigs_at.cfg b/src/main/resources/META-INF/randomconfigs_at.cfg deleted file mode 100644 index fa37440..0000000 --- a/src/main/resources/META-INF/randomconfigs_at.cfg +++ /dev/null @@ -1,2 +0,0 @@ -public-f net.minecraft.world.GameRules field_82771_a # rules -public net.minecraft.world.storage.WorldInfo field_82577_x # gameRules diff --git a/src/main/resources/assets/randomconfigs/lang/en_us.lang b/src/main/resources/assets/randomconfigs/lang/en_us.lang deleted file mode 100644 index 06b75b4..0000000 --- a/src/main/resources/assets/randomconfigs/lang/en_us.lang +++ /dev/null @@ -1,3 +0,0 @@ -commands.asreloadclient.usage=/asreloadclient -commands.asreloadclient.failure=Failed to reload client-sided attack speed configuration: %s -commands.asreloadclient.success=Client-sided attack speed configuration reloaded! diff --git a/src/main/resources/assets/randomconfigs/logo.png b/src/main/resources/assets/randomconfigs/logo.png deleted file mode 100644 index 3e98bcd..0000000 Binary files a/src/main/resources/assets/randomconfigs/logo.png and /dev/null differ diff --git a/src/main/resources/mcmod.info b/src/main/resources/mcmod.info deleted file mode 100644 index 7fb15f7..0000000 --- a/src/main/resources/mcmod.info +++ /dev/null @@ -1,18 +0,0 @@ -[ - { - "modid": "randomconfigs", - "name": "RandomConfigs", - "description": "A utility mod for setting default configurations, gamerules, difficulties and world borders.", - "version": "${version}", - "mcversion": "${mcversion}", - "url": "https://minecraft.curseforge.com/projects/randomconfigs", - "updateUrl": "https://raw.githubusercontent.com/TheRandomLabs/RandomConfigs/misc/versions.json", - "authorList": [ - "TheRandomLabs" - ], - "credits": "", - "logoFile": "assets/randomconfigs/logo.png", - "screenshots": [], - "dependencies": [] - } -] diff --git a/src/main/resources/pack.mcmeta b/src/main/resources/pack.mcmeta deleted file mode 100644 index a250490..0000000 --- a/src/main/resources/pack.mcmeta +++ /dev/null @@ -1,6 +0,0 @@ -{ - "pack": { - "pack_format": 3, - "description": "Resources used by RandomConfigs" - } -} diff --git a/versions.json b/versions.json new file mode 100644 index 0000000..4fa51ad --- /dev/null +++ b/versions.json @@ -0,0 +1,213 @@ +{ + "homepage": "https://minecraft.curseforge.com/projects/randomconfigs", + "1.16.3": { + "1.16.2-1.4.2.2": "Initial 1.16.2 port." + }, + "1.16.2": { + "1.16.2-1.4.2.2": "Initial 1.16.2 port." + }, + "1.16.1": { + "1.16.1-1.4.2.1": "Now compatible with and requires Forge 1.16.1-32.0.67 or higher.", + "1.16.1-1.4.2.0": "Initial 1.16.1 port." + }, + "1.15.2": { + "1.15.2-1.4.2.0": "Initial 1.15.2 port." + }, + "1.14.4": { + "1.14.4-1.4.2.0": "Built with Forge 1.14.4-28.2.23.", + "1.14.4-1.4.0.0": "Ported to 1.14.4." + }, + "1.14.2": { + "1.14.2-1.3.2.3": "Ported 1.13.2-1.3.2.3 to 1.14.2." + }, + "1.13.2": { + "1.13.2-1.3.2.3": "Ported 1.12.2-1.3.2.3 to 1.13.2." + }, + "1.12.2": { + "1.12.2-1.3.2.3": "Fixed JSON deformation.", + "1.12.2-1.3.2.2": "Fixed the attack speed configuration being reset.", + "1.12.2-1.3.2.1": "Fixed 1.10 compatibility.", + "1.12.2-1.3.2.0": "Improved the attack speed configuration.", + "1.12.2-1.3.1.0": "The attack speed configuration now supports 1.10 and 1.11.", + "1.12.2-1.3.0.0": "The default gamerules JSON is now reformatted every time it is read.\nAttack speeds are now configurable for each item.", + "1.12.2-1.2.0.2": "Updated mcmod.info", + "1.12.2-1.2.0.0": "Added default difficulties.\nFixed string gamerules.", + "1.12.2-1.1.2.3": "Disabled HTML escaping in JSONs.", + "1.12.2-1.1.2.2": "Fixed the jar signature verification.", + "1.12.2-1.1.2.1": "Fixed crashes relating to the switch to Jankson.", + "1.12.2-1.1.2.0": "Switched to Jankson for JSON processing.", + "1.12.2-1.1.1.0": "Minor refactor.", + "1.12.2-1.1.0.5": "Forced gamerules are now forcibly set after a world has already been created.", + "1.12.2-1.1.0.4": "Fixed all default gamerules being forced.", + "1.12.2-1.1.0.3": "Fixed invalid information in the default default gamerules.", + "1.12.2-1.1.0.2": "Fixed a server crash.", + "1.12.2-1.1.0.1": "Hotfix.", + "1.12.2-1.1.0.0": "Added default config versions.\nAdded default gamerules.", + "1.12.2-1.0.1.0": "Hotfix.", + "1.12.2-1.0.0.0": "Initial release." + }, + "1.12.1": { + "1.12.2-1.3.2.3": "Fixed JSON deformation.", + "1.12.2-1.3.2.2": "Fixed the attack speed configuration being reset.", + "1.12.2-1.3.2.1": "Fixed 1.10 compatibility.", + "1.12.2-1.3.2.0": "Improved the attack speed configuration.", + "1.12.2-1.3.1.0": "The attack speed configuration now supports 1.10 and 1.11.", + "1.12.2-1.3.0.0": "The default gamerules JSON is now reformatted every time it is read.\nAttack speeds are now configurable for each item.", + "1.12.2-1.2.0.2": "Updated mcmod.info", + "1.12.2-1.2.0.0": "Added default difficulties.\nFixed string gamerules.", + "1.12.2-1.1.2.3": "Disabled HTML escaping in JSONs.", + "1.12.2-1.1.2.2": "Fixed the jar signature verification.", + "1.12.2-1.1.2.1": "Fixed crashes relating to the switch to Jankson.", + "1.12.2-1.1.2.0": "Switched to Jankson for JSON processing.", + "1.12.2-1.1.1.0": "Minor refactor.", + "1.12.2-1.1.0.5": "Forced gamerules are now forcibly set after a world has already been created.", + "1.12.2-1.1.0.4": "Fixed all default gamerules being forced.", + "1.12.2-1.1.0.3": "Fixed invalid information in the default default gamerules.", + "1.12.2-1.1.0.2": "Fixed a server crash.", + "1.12.2-1.1.0.1": "Hotfix.", + "1.12.2-1.1.0.0": "Added default config versions.\nAdded default gamerules.", + "1.12.2-1.0.1.0": "Hotfix.", + "1.12.2-1.0.0.0": "Initial release." + }, + "1.12": { + "1.12.2-1.3.2.3": "Fixed JSON deformation.", + "1.12.2-1.3.2.2": "Fixed the attack speed configuration being reset.", + "1.12.2-1.3.2.1": "Fixed 1.10 compatibility.", + "1.12.2-1.3.2.0": "Improved the attack speed configuration.", + "1.12.2-1.3.1.0": "The attack speed configuration now supports 1.10 and 1.11.", + "1.12.2-1.3.0.0": "The default gamerules JSON is now reformatted every time it is read.\nAttack speeds are now configurable for each item.", + "1.12.2-1.2.0.2": "Updated mcmod.info", + "1.12.2-1.2.0.0": "Added default difficulties.\nFixed string gamerules.", + "1.12.2-1.1.2.3": "Disabled HTML escaping in JSONs.", + "1.12.2-1.1.2.2": "Fixed the jar signature verification.", + "1.12.2-1.1.2.1": "Fixed crashes relating to the switch to Jankson.", + "1.12.2-1.1.2.0": "Switched to Jankson for JSON processing.", + "1.12.2-1.1.1.0": "Minor refactor.", + "1.12.2-1.1.0.5": "Forced gamerules are now forcibly set after a world has already been created.", + "1.12.2-1.1.0.4": "Fixed all default gamerules being forced.", + "1.12.2-1.1.0.3": "Fixed invalid information in the default default gamerules.", + "1.12.2-1.1.0.2": "Fixed a server crash.", + "1.12.2-1.1.0.1": "Hotfix.", + "1.12.2-1.1.0.0": "Added default config versions.\nAdded default gamerules.", + "1.12.2-1.0.1.0": "Hotfix.", + "1.12.2-1.0.0.0": "Initial release." + }, + "1.11.2": { + "1.12.2-1.3.2.3": "Fixed JSON deformation.", + "1.12.2-1.3.2.2": "Fixed the attack speed configuration being reset.", + "1.12.2-1.3.2.1": "Fixed 1.10 compatibility.", + "1.12.2-1.3.2.0": "Improved the attack speed configuration.", + "1.12.2-1.3.1.0": "The attack speed configuration now supports 1.10 and 1.11.", + "1.12.2-1.3.0.0": "The default gamerules JSON is now reformatted every time it is read.\nAttack speeds are now configurable for each item.", + "1.12.2-1.2.0.2": "Updated mcmod.info", + "1.12.2-1.2.0.0": "Added default difficulties.\nFixed string gamerules.", + "1.12.2-1.1.2.3": "Disabled HTML escaping in JSONs.", + "1.12.2-1.1.2.2": "Fixed the jar signature verification.", + "1.12.2-1.1.2.1": "Fixed crashes relating to the switch to Jankson.", + "1.12.2-1.1.2.0": "Switched to Jankson for JSON processing.", + "1.12.2-1.1.1.0": "Minor refactor.", + "1.12.2-1.1.0.5": "Forced gamerules are now forcibly set after a world has already been created.", + "1.12.2-1.1.0.4": "Fixed all default gamerules being forced.", + "1.12.2-1.1.0.3": "Fixed invalid information in the default default gamerules.", + "1.12.2-1.1.0.2": "Fixed a server crash.", + "1.12.2-1.1.0.1": "Hotfix.", + "1.12.2-1.1.0.0": "Added default config versions.\nAdded default gamerules.", + "1.12.2-1.0.1.0": "Hotfix.", + "1.12.2-1.0.0.0": "Initial release." + }, + "1.11": { + "1.12.2-1.3.2.3": "Fixed JSON deformation.", + "1.12.2-1.3.2.2": "Fixed the attack speed configuration being reset.", + "1.12.2-1.3.2.1": "Fixed 1.10 compatibility.", + "1.12.2-1.3.2.0": "Improved the attack speed configuration.", + "1.12.2-1.3.1.0": "The attack speed configuration now supports 1.10 and 1.11.", + "1.12.2-1.3.0.0": "The default gamerules JSON is now reformatted every time it is read.\nAttack speeds are now configurable for each item.", + "1.12.2-1.2.0.2": "Updated mcmod.info", + "1.12.2-1.2.0.0": "Added default difficulties.\nFixed string gamerules.", + "1.12.2-1.1.2.3": "Disabled HTML escaping in JSONs.", + "1.12.2-1.1.2.2": "Fixed the jar signature verification.", + "1.12.2-1.1.2.1": "Fixed crashes relating to the switch to Jankson.", + "1.12.2-1.1.2.0": "Switched to Jankson for JSON processing.", + "1.12.2-1.1.1.0": "Minor refactor.", + "1.12.2-1.1.0.5": "Forced gamerules are now forcibly set after a world has already been created.", + "1.12.2-1.1.0.4": "Fixed all default gamerules being forced.", + "1.12.2-1.1.0.3": "Fixed invalid information in the default default gamerules.", + "1.12.2-1.1.0.2": "Fixed a server crash.", + "1.12.2-1.1.0.1": "Hotfix.", + "1.12.2-1.1.0.0": "Added default config versions.\nAdded default gamerules.", + "1.12.2-1.0.1.0": "Hotfix.", + "1.12.2-1.0.0.0": "Initial release." + }, + "1.10.2": { + "1.12.2-1.3.2.3": "Fixed JSON deformation.", + "1.12.2-1.3.2.2": "Fixed the attack speed configuration being reset.", + "1.12.2-1.3.2.1": "Fixed 1.10 compatibility.", + "1.12.2-1.3.2.0": "Improved the attack speed configuration.", + "1.12.2-1.3.1.0": "The attack speed configuration now supports 1.10 and 1.11.", + "1.12.2-1.3.0.0": "The default gamerules JSON is now reformatted every time it is read.\nAttack speeds are now configurable for each item.", + "1.12.2-1.2.0.2": "Updated mcmod.info", + "1.12.2-1.2.0.0": "Added default difficulties.\nFixed string gamerules.", + "1.12.2-1.1.2.3": "Disabled HTML escaping in JSONs.", + "1.12.2-1.1.2.2": "Fixed the jar signature verification.", + "1.12.2-1.1.2.1": "Fixed crashes relating to the switch to Jankson.", + "1.12.2-1.1.2.0": "Switched to Jankson for JSON processing.", + "1.12.2-1.1.1.0": "Minor refactor.", + "1.12.2-1.1.0.5": "Forced gamerules are now forcibly set after a world has already been created.", + "1.12.2-1.1.0.4": "Fixed all default gamerules being forced.", + "1.12.2-1.1.0.3": "Fixed invalid information in the default default gamerules.", + "1.12.2-1.1.0.2": "Fixed a server crash.", + "1.12.2-1.1.0.1": "Hotfix.", + "1.12.2-1.1.0.0": "Added default config versions.\nAdded default gamerules.", + "1.12.2-1.0.1.0": "Hotfix.", + "1.12.2-1.0.0.0": "Initial release." + }, + "1.10": { + "1.12.2-1.3.2.3": "Fixed JSON deformation.", + "1.12.2-1.3.2.2": "Fixed the attack speed configuration being reset.", + "1.12.2-1.3.2.1": "Fixed 1.10 compatibility.", + "1.12.2-1.3.2.0": "Improved the attack speed configuration.", + "1.12.2-1.3.1.0": "The attack speed configuration now supports 1.10 and 1.11.", + "1.12.2-1.3.0.0": "The default gamerules JSON is now reformatted every time it is read.\nAttack speeds are now configurable for each item.", + "1.12.2-1.2.0.2": "Updated mcmod.info", + "1.12.2-1.2.0.0": "Added default difficulties.\nFixed string gamerules.", + "1.12.2-1.1.2.3": "Disabled HTML escaping in JSONs.", + "1.12.2-1.1.2.2": "Fixed the jar signature verification.", + "1.12.2-1.1.2.1": "Fixed crashes relating to the switch to Jankson.", + "1.12.2-1.1.2.0": "Switched to Jankson for JSON processing.", + "1.12.2-1.1.1.0": "Minor refactor.", + "1.12.2-1.1.0.5": "Forced gamerules are now forcibly set after a world has already been created.", + "1.12.2-1.1.0.4": "Fixed all default gamerules being forced.", + "1.12.2-1.1.0.3": "Fixed invalid information in the default default gamerules.", + "1.12.2-1.1.0.2": "Fixed a server crash.", + "1.12.2-1.1.0.1": "Hotfix.", + "1.12.2-1.1.0.0": "Added default config versions.\nAdded default gamerules.", + "1.12.2-1.0.1.0": "Hotfix.", + "1.12.2-1.0.0.0": "Initial release." + }, + "promos": { + "1.16.3-latest": "1.16.2-1.4.2.2", + "1.16.3-recommended": "1.16.2-1.4.2.2", + "1.16.2-latest": "1.16.2-1.4.2.2", + "1.16.2-recommended": "1.16.2-1.4.2.2", + "1.16.1-latest": "1.16.1-1.4.2.1", + "1.16.1-recommended": "1.16.1-1.4.2.1", + "1.15.2-latest": "1.15.2-1.4.2.0", + "1.15.2-recommended": "1.15.2-1.4.2.0", + "1.14.4-latest": "1.14.4-1.4.2.0", + "1.14.4-recommended": "1.14.4-1.4.2.0", + "1.14.2-latest": "1.14.2-1.3.2.3", + "1.14.2-recommended": "1.14.2-1.3.2.3", + "1.13.2-latest": "1.13.2-1.3.2.3", + "1.13.2-recommended": "1.13.2-1.3.2.3", + "1.12.2-latest": "1.12.2-1.3.2.3", + "1.12.2-recommended": "1.12.2-1.3.2.3", + "1.12.1-latest": "1.12.2-1.3.2.3", + "1.12.1-recommended": "1.12.2-1.3.2.3", + "1.12-latest": "1.12.2-1.3.2.3", + "1.12-recommended": "1.12.2-1.3.2.3", + "1.11.2-latest": "1.12.2-1.3.2.3", + "1.11-recommended": "1.12.2-1.3.2.3", + "1.10.2-latest": "1.12.2-1.3.2.3", + "1.10-recommended": "1.12.2-1.3.2.3" + } +}