Compare commits

..
5 Commits
Author SHA1 Message Date
kuba6000 8fcb36d394 Fix shaped recipe 2023-05-07 20:33:59 +02:00
kuba6000 f9db90268e Forgot about quotes 2023-05-07 20:17:11 +02:00
kuba6000 e7cd5e602d Fix error stacks 2023-05-07 20:15:22 +02:00
kuba6000 65e1f469ae Force normal parsing 2023-05-07 20:07:19 +02:00
kuba6000 7fe4150afc magic 2023-04-30 23:06:42 +02:00
25 changed files with 1899 additions and 205 deletions

No files matched your search

+51
View File
@@ -0,0 +1,51 @@
#!/usr/bin/env bash
# bashsupport disable=BP5006 # Global environment variables
RUNDIR="run" \
CRASH="crash-reports" \
SERVERLOG="server.log"
# enable nullglob to get 0 results when no match rather than the pattern
shopt -s nullglob
# store matches in array
crash_reports=("$RUNDIR/$CRASH/crash"*.txt)
# if array not empty there are crash_reports
if [ "${#crash_reports[@]}" -gt 0 ]; then
# get the latest crash_report from array
latest_crash_report="${crash_reports[-1]}"
{
printf 'Latest crash report detected %s:\n' "${latest_crash_report##*/}"
cat "$latest_crash_report"
} >&2
exit 1
fi
if grep --quiet --fixed-strings 'Fatal errors were detected' "$SERVERLOG"; then
{
printf 'Fatal errors detected:\n'
cat server.log
} >&2
exit 1
fi
if grep --quiet --fixed-strings 'The state engine was in incorrect state ERRORED and forced into state SERVER_STOPPED' \
"$SERVERLOG"; then
{
printf 'Server force stopped:'
cat server.log
} >&2
exit 1
fi
if ! grep --quiet --perl-regexp --only-matching '.+Done \(.+\)\! For help, type "help" or "\?"' "$SERVERLOG"; then
{
printf 'Server did not finish startup:'
cat server.log
} >&2
exit 1
fi
printf 'No crash reports detected'
exit 0
-1
View File
@@ -33,4 +33,3 @@ src/main/resources/mixins.*.json
/src/test/generated/ /src/test/generated/
.DS_Store .DS_Store
classes classes
layout.json
+1475 -3
View File
File diff suppressed because it is too large. Load diff
+1 -1
View File
@@ -7,7 +7,7 @@ plugins {
java { java {
toolchain { toolchain {
languageVersion.set(JavaLanguageVersion.of(8)) languageVersion.set(JavaLanguageVersion.of(8))
vendor.set(JvmVendorSpec.AZUL) vendor.set(JvmVendorSpec.ADOPTIUM)
} }
} }
+2 -2
View File
@@ -1,5 +1,5 @@
dependencies { dependencies {
shadowImplementation("com.github.GTNewHorizons:ZenScript:1.0.0-GTNH") shadowImplementation("com.github.GTNewHorizons:ZenScript:1.0.0-GTNH")
implementation("com.github.GTNewHorizons:NotEnoughItems:2.7.34-GTNH:dev") implementation("net.industrial-craft:industrialcraft-2:2.2.828-experimental:dev")
compileOnly("net.industrial-craft:industrialcraft-2:2.2.828-experimental:dev") implementation("com.github.GTNewHorizons:NotEnoughItems:2.3.45-GTNH:dev")
} }
+25 -148
View File
@@ -1,203 +1,80 @@
# ExampleMod tag to use as Blowdryer (Spotless, etc.) settings version, leave empty to disable.
# LOCAL to test local config updates.
gtnh.settings.blowdryerTag = 0.2.0
# Human-readable mod name, available for mcmod.info population.
modName = MineTweaker 3 modName = MineTweaker 3
# Case-sensitive identifier string, available for mcmod.info population and used for automatic mixin JSON generation. # This is a case-sensitive string to identify your mod. Convention is to use lower case.
# Conventionally lowercase.
modId = MineTweaker3 modId = MineTweaker3
# Root package of the mod, used to find various classes in other properties,
# mcmod.info substitution, enabling assertions in run tasks, etc.
modGroup = minetweaker modGroup = minetweaker
# Whether to use modGroup as the maven publishing group. # WHY is there no version field?
# Due to a history of using JitPack, the default is com.github.GTNewHorizons for all mods. # The build script relies on git to provide a version via tags. It is super easy and will enable you to always know the
useModGroupForPublishing = false # code base or your binary. Check out this tutorial: https://blog.mattclemente.com/2017/10/13/versioning-with-git-tags/
# Updates your build.gradle and settings.gradle automatically whenever an update is available. # Will update your build.gradle automatically whenever an update is available
autoUpdateBuildScript = false autoUpdateBuildScript = false
# Version of Minecraft to target
minecraftVersion = 1.7.10 minecraftVersion = 1.7.10
# Version of Minecraft Forge to target
forgeVersion = 10.13.4.1614 forgeVersion = 10.13.4.1614
# Specify an MCP channel for dependency deobfuscation and the deobfParams task. # Select a username for testing your mod with breakpoints. You may leave this empty for a random username each time you
channel = stable # restart Minecraft in development. Choose this dependent on your mod:
# Do you need consistent player progressing (for example Thaumcraft)? -> Select a name
# Specify an MCP mappings version for dependency deobfuscation and the deobfParams task. # Do you need to test how your custom blocks interacts with a player that is not the owner? -> leave name empty
mappingsVersion = 12
# Defines other MCP mappings for dependency deobfuscation.
remoteMappings = https\://raw.githubusercontent.com/MinecraftForge/FML/1.7.10/conf/
# Select a default username for testing your mod. You can always override this per-run by running
# `./gradlew runClient --username=AnotherPlayer`, or configuring this command in your IDE.
developmentEnvironmentUserName = Developer developmentEnvironmentUserName = Developer
# Enables using modern Java syntax (up to version 17) via Jabel, while still targeting JVM 8. # Generate a class with String fields for the mod id, name, version and group name named with the fields below
# See https://github.com/bsideup/jabel for details on how this works.
enableModernJavaSyntax = false
# Enables injecting missing generics into the decompiled source code for a better coding experience.
# Turns most publicly visible List, Map, etc. into proper List<E>, Map<K, V> types.
enableGenericInjection = false
# Generate a class with a String field for the mod version named as defined below.
# If generateGradleTokenClass is empty or not missing, no such class will be generated.
# If gradleTokenVersion is empty or missing, the field will not be present in the class.
generateGradleTokenClass = minetweaker.mc1710.Tags generateGradleTokenClass = minetweaker.mc1710.Tags
# Name of the token containing the project's current version to generate/replace.
gradleTokenVersion = MOD_VERSION
# [DEPRECATED] Mod ID replacement token.
gradleTokenModId = gradleTokenModId =
# [DEPRECATED] Mod name replacement token.
gradleTokenModName = gradleTokenModName =
gradleTokenVersion = MOD_VERSION
# [DEPRECATED] Mod Group replacement token.
gradleTokenGroupName = gradleTokenGroupName =
# [DEPRECATED] # [DEPRECATED]
# Multiple source files can be defined here by providing a comma-separated list: Class1.java,Class2.java,Class3.java # Multiple source files can be defined here by providing a comma-seperated list: Class1.java,Class2.java,Class3.java
# public static final String VERSION = "GRADLETOKEN_VERSION"; # public static final String VERSION = "GRADLETOKEN_VERSION";
# The string's content will be replaced with your mod's version when compiled. You should use this to specify your mod's # The string's content will be replaced with your mod's version when compiled. You should use this to specify your mod's
# version in @Mod([...], version = VERSION, [...]). # version in @Mod([...], version = VERSION, [...])
# Leave these properties empty to skip individual token replacements. # Leave these properties empty to skip individual token replacements
replaceGradleTokenInFile = replaceGradleTokenInFile =
# In case your mod provides an API for other mods to implement you may declare its package here. Otherwise, you can # In case your mod provides an API for other mods to implement you may declare its package here. Otherwise, you can
# leave this property empty. # leave this property empty.
# Example value: (apiPackage = api) + (modGroup = com.myname.mymodid) -> com.myname.mymodid.api # Example value: apiPackage = api + modGroup = com.myname.mymodid -> com.myname.mymodid.api
apiPackage = apiPackage =
# Specify the configuration file for Forge's access transformers here. It must be placed into /src/main/resources/META-INF/ # Specify the configuration file for Forge's access transformers here. It must be placed into /src/main/resources/META-INF/
# There can be multiple files in a space-separated list. # Example value: mymodid_at.cfg
# Example value: mymodid_at.cfg nei_at.cfg
accessTransformersFile = accessTransformersFile =
# Provides setup for Mixins if enabled. If you don't know what mixins are: Keep it disabled! # Provides setup for Mixins if enabled. If you don't know what mixins are: Keep it disabled!
usesMixins = false usesMixins = false
# Adds some debug arguments like verbose output and export
# Set to a non-empty string to configure mixins in a separate source set under src/VALUE, instead of src/main.
# This can speed up compile times thanks to not running the mixin annotation processor on all input sources.
# Mixin classes will have access to "main" classes, but not the other way around.
separateMixinSourceSet =
# Adds some debug arguments like verbose output and class export.
usesMixinDebug = false usesMixinDebug = false
# Specify the location of your implementation of IMixinConfigPlugin. Leave it empty otherwise. # Specify the location of your implementation of IMixinConfigPlugin. Leave it empty otherwise.
mixinPlugin = mixinPlugin =
# Specify the package that contains all of your Mixins. You may only place Mixins in this package or the build will fail! # Specify the package that contains all of your Mixins. You may only place Mixins in this package or the build will fail!
mixinsPackage = mixinsPackage =
# Specify the core mod entry class if you use a core mod. This class must implement IFMLLoadingPlugin! # Specify the core mod entry class if you use a core mod. This class must implement IFMLLoadingPlugin!
# This parameter is for legacy compatibility only # This parameter is for legacy compatibility only
# Example value: (coreModClass = asm.FMLPlugin) + (modGroup = com.myname.mymodid) -> com.myname.mymodid.asm.FMLPlugin # Example value: coreModClass = asm.FMLPlugin + modGroup = com.myname.mymodid -> com.myname.mymodid.asm.FMLPlugin
coreModClass = coreModClass =
# If your project is only a consolidation of mixins or a core mod and does NOT contain a 'normal' mod ( = some class # If your project is only a consolidation of mixins or a core mod and does NOT contain a 'normal' mod ( = some class
# that is annotated with @Mod) you want this to be true. When in doubt: leave it on false! # that is annotated with @Mod) you want this to be true. When in doubt: leave it on false!
containsMixinsAndOrCoreModOnly = false containsMixinsAndOrCoreModOnly = false
# Enables Mixins even if this mod doesn't use them, useful if one of the dependencies uses mixins. # If enabled, you may use 'shadowCompile' for dependencies. They will be integrated in your jar. It is your
forceEnableMixins = false # responsibility check the licence and request permission for distribution, if required.
# If enabled, you may use 'shadowCompile' for dependencies. They will be integrated into your jar. It is your
# responsibility to check the license and request permission for distribution if required.
usesShadowedDependencies = true usesShadowedDependencies = true
# If disabled, won't remove unused classes from shaded dependencies. Some libraries use reflection to access
# If disabled, won't remove unused classes from shadowed dependencies. Some libraries use reflection to access
# their own classes, making the minimization unreliable. # their own classes, making the minimization unreliable.
minimizeShadowedDependencies = false minimizeShadowedDependencies = false
# If disabled, won't rename the shadowed classes. # If disabled, won't rename the shadowed classes.
relocateShadowedDependencies = false relocateShadowedDependencies = false
# Adds CurseMaven, Modrinth, and some more well-known 1.7.10 repositories. # Adds the GTNH maven, CurseMaven, IC2/Player maven, and some more well-known 1.7.10 repositories
includeWellKnownRepositories = true includeWellKnownRepositories = true
# A list of repositories to exclude from the includeWellKnownRepositories setting. Should be a space separated # Optional parameter to customize the produced artifacts. Use this to preserver artifact naming when migrating older
# list of strings, with the acceptable keys being(case does not matter):
# cursemaven
# modrinth
excludeWellKnownRepositories =
# Change these to your Maven coordinates if you want to publish to a custom Maven repository instead of the default GTNH Maven.
# Authenticate with the MAVEN_USER and MAVEN_PASSWORD environment variables.
# If you need a more complex setup disable maven publishing here and add a publishing repository to addon.gradle.
usesMavenPublishing = true
# Maven repository to publish the mod to.
# mavenPublishUrl = https\://nexus.gtnewhorizons.com/repository/releases/
# Publishing to Modrinth requires you to set the MODRINTH_TOKEN environment variable to your current Modrinth API token.
#
# The project's ID on Modrinth. Can be either the slug or the ID.
# Leave this empty if you don't want to publish to Modrinth.
modrinthProjectId =
# The project's relations on Modrinth. You can use this to refer to other projects on Modrinth.
# Syntax: scope1-type1:name1;scope2-type2:name2;...
# Where scope can be one of [required, optional, incompatible, embedded],
# type can be one of [project, version],
# and the name is the Modrinth project or version slug/id of the other mod.
# Example: required-project:fplib;optional-project:gasstation;incompatible-project:gregtech
# Note: GTNH Mixins is automatically set as a required dependency if usesMixins = true
modrinthRelations =
# Publishing to CurseForge requires you to set the CURSEFORGE_TOKEN environment variable to one of your CurseForge API tokens.
#
# The project's numeric ID on CurseForge. You can find this in the About Project box.
# Leave this empty if you don't want to publish on CurseForge.
curseForgeProjectId =
# The project's relations on CurseForge. You can use this to refer to other projects on CurseForge.
# Syntax: type1:name1;type2:name2;...
# Where type can be one of [requiredDependency, embeddedLibrary, optionalDependency, tool, incompatible],
# and the name is the CurseForge project slug of the other mod.
# Example: requiredDependency:railcraft;embeddedLibrary:cofhlib;incompatible:buildcraft
# Note: UniMixins is automatically set as a required dependency if usesMixins = true.
curseForgeRelations =
# Optional parameter to customize the produced artifacts. Use this to preserve artifact naming when migrating older
# projects. New projects should not use this parameter. # projects. New projects should not use this parameter.
customArchiveBaseName = CraftTweaker customArchiveBaseName = CraftTweaker
# Optional parameter to have the build automatically fail if an illegal version is used. # Optional parameter to prevent the source code from being published
# This can be useful if you e.g. only want to allow versions in the form of '1.1.xxx'. # noPublishedSources =
# The check is ONLY performed if the version is a git tag.
# Note: the specified string must be escaped, so e.g. 1\\.1\\.\\d+ instead of 1\.1\.\d+
# versionPattern =
# Uncomment to prevent the source code from being published.
# noPublishedSources = true
# Uncomment this to disable Spotless checks.
# This should only be uncommented to keep it easier to sync with upstream/other forks.
# That is, if there is no other active fork/upstream, NEVER change this.
# disableSpotless = true
# Uncomment this to disable Checkstyle checks (currently wildcard import check).
disableCheckstyle = true
# Override the IDEA build type. Valid values are: "" (leave blank, do not override), "idea" (force use native IDEA build), "gradle"
# (force use delegated build).
# This is meant to be set in $HOME/.gradle/gradle.properties.
# e.g. add "systemProp.org.gradle.project.ideaOverrideBuildType=idea" will override the build type to be native build.
# WARNING: If you do use this option, it will overwrite whatever you have in your existing projects. This might not be what you want!
# Usually there is no need to uncomment this here as other developers do not necessarily use the same build type as you.
# ideaOverrideBuildType = idea
# Whether IDEA should run spotless checks when pressing the Build button.
# This is meant to be set in $HOME/.gradle/gradle.properties.
# ideaCheckSpotlessOnBuild = true
Binary file not shown.
+1 -2
View File
@@ -1,7 +1,6 @@
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
networkTimeout=10000 networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
Vendored
+13 -20
View File
@@ -15,8 +15,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
# #
# SPDX-License-Identifier: Apache-2.0
#
############################################################################## ##############################################################################
# #
@@ -57,7 +55,7 @@
# Darwin, MinGW, and NonStop. # Darwin, MinGW, and NonStop.
# #
# (3) This script is generated from the Groovy template # (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project. # within the Gradle project.
# #
# You can find Gradle at https://github.com/gradle/gradle/. # You can find Gradle at https://github.com/gradle/gradle/.
@@ -85,8 +83,10 @@ done
# This is normally unused # This is normally unused
# shellcheck disable=SC2034 # shellcheck disable=SC2034
APP_BASE_NAME=${0##*/} APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Use the maximum available, or set MAX_FD != -1 to use that value. # Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum MAX_FD=maximum
@@ -133,13 +133,10 @@ location of your Java installation."
fi fi
else else
JAVACMD=java JAVACMD=java
if ! command -v java >/dev/null 2>&1 which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
then
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 Please set the JAVA_HOME variable in your environment to match the
location of your Java installation." location of your Java installation."
fi
fi fi
# Increase the maximum file descriptors if we can. # Increase the maximum file descriptors if we can.
@@ -147,7 +144,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #( case $MAX_FD in #(
max*) max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC2039,SC3045 # shellcheck disable=SC3045
MAX_FD=$( ulimit -H -n ) || MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit" warn "Could not query maximum file descriptor limit"
esac esac
@@ -155,7 +152,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
'' | soft) :;; #( '' | soft) :;; #(
*) *)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC2039,SC3045 # shellcheck disable=SC3045
ulimit -n "$MAX_FD" || ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD" warn "Could not set maximum file descriptor limit to $MAX_FD"
esac esac
@@ -200,15 +197,11 @@ if "$cygwin" || "$msys" ; then
done done
fi fi
# Collect all arguments for the java command;
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. # * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' # shell script including quotes and variable substitutions, so put them in
# double quotes to make sure that they get re-expanded; and
# Collect all arguments for the java command: # * put everything else in single quotes, so that it's not re-expanded.
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# and any embedded shellness will be escaped.
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
# treated as '${Hostname}' itself on the command line.
set -- \ set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \ "-Dorg.gradle.appname=$APP_BASE_NAME" \
Vendored
+10 -12
View File
@@ -13,8 +13,6 @@
@rem See the License for the specific language governing permissions and @rem See the License for the specific language governing permissions and
@rem limitations under the License. @rem limitations under the License.
@rem @rem
@rem SPDX-License-Identifier: Apache-2.0
@rem
@if "%DEBUG%"=="" @echo off @if "%DEBUG%"=="" @echo off
@rem ########################################################################## @rem ##########################################################################
@@ -45,11 +43,11 @@ set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1 %JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute if %ERRORLEVEL% equ 0 goto execute
echo. 1>&2 echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo. 1>&2 echo.
echo Please set the JAVA_HOME variable in your environment to match the 1>&2 echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation. 1>&2 echo location of your Java installation.
goto fail goto fail
@@ -59,11 +57,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto execute if exist "%JAVA_EXE%" goto execute
echo. 1>&2 echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo. 1>&2 echo.
echo Please set the JAVA_HOME variable in your environment to match the 1>&2 echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation. 1>&2 echo location of your Java installation.
goto fail goto fail
+7
View File
@@ -1,4 +1,11 @@
// Add any additional repositories for your dependencies here // Add any additional repositories for your dependencies here
repositories { repositories {
maven {
name = "GTNH Maven"
url = "http://jenkins.usrv.eu:8081/nexus/content/groups/public/"
}
maven {
url "https://cursemaven.com"
}
} }
+10 -5
View File
@@ -4,10 +4,10 @@ pluginManagement {
maven { maven {
// RetroFuturaGradle // RetroFuturaGradle
name "GTNH Maven" name "GTNH Maven"
url "https://nexus.gtnewhorizons.com/repository/public/" url "http://jenkins.usrv.eu:8081/nexus/content/groups/public/"
allowInsecureProtocol = true
mavenContent { mavenContent {
includeGroup("com.gtnewhorizons") includeGroup("com.gtnewhorizons.retrofuturagradle")
includeGroupByRegex("com\\.gtnewhorizons\\..+")
} }
} }
gradlePluginPortal() gradlePluginPortal()
@@ -17,7 +17,12 @@ pluginManagement {
} }
plugins { plugins {
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.37' id 'com.diffplug.blowdryerSetup' version '1.6.0'
id 'org.gradle.toolchains.foojay-resolver-convention' version '0.4.0' // Provides java toolchains
} }
blowdryerSetup {
repoSubfolder 'gtnhShared'
github('GTNewHorizons/ExampleMod1.7.10', 'tag', '0.2.0')
//devLocal '.' // Use this when testing config updates locally
}
@@ -6,10 +6,20 @@ import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method; import java.lang.reflect.Method;
import java.lang.reflect.Modifier; import java.lang.reflect.Modifier;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays;
import java.util.List; import java.util.List;
import java.util.Objects;
import java.util.function.Function;
import java.util.logging.Level; import java.util.logging.Level;
import java.util.logging.Logger; import java.util.logging.Logger;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraftforge.fluids.FluidStack;
import org.apache.logging.log4j.LogManager;
import cpw.mods.fml.common.registry.GameRegistry;
import minetweaker.annotations.BracketHandler; import minetweaker.annotations.BracketHandler;
import minetweaker.annotations.ModOnly; import minetweaker.annotations.ModOnly;
import minetweaker.api.client.IClient; import minetweaker.api.client.IClient;
@@ -17,8 +27,13 @@ import minetweaker.api.compat.*;
import minetweaker.api.event.IEventManager; import minetweaker.api.event.IEventManager;
import minetweaker.api.formatting.IFormatter; import minetweaker.api.formatting.IFormatter;
import minetweaker.api.game.IGame; import minetweaker.api.game.IGame;
import minetweaker.api.item.IIngredient;
import minetweaker.api.item.IItemStack;
import minetweaker.api.item.IngredientItem;
import minetweaker.api.mods.ILoadedMods; import minetweaker.api.mods.ILoadedMods;
import minetweaker.api.oredict.IOreDict; import minetweaker.api.oredict.IOreDict;
import minetweaker.api.oredict.IOreDictEntry;
import minetweaker.api.oredict.IngredientOreDict;
import minetweaker.api.recipes.IFurnaceManager; import minetweaker.api.recipes.IFurnaceManager;
import minetweaker.api.recipes.IRecipeManager; import minetweaker.api.recipes.IRecipeManager;
import minetweaker.api.server.IServer; import minetweaker.api.server.IServer;
@@ -50,6 +65,166 @@ import stanhebben.zenscript.type.natives.JavaMethod;
*/ */
public class MineTweakerAPI { public class MineTweakerAPI {
private static final org.apache.logging.log4j.Logger TRANSLATORLOGGER = LogManager
.getLogger("[SCRIPTS TO CODE TRANSLATOR]");
public static void info(String log) {
TRANSLATORLOGGER.info(log);
}
public static String convertStack(ItemStack stack) {
if (stack == null) return "null";
GameRegistry.UniqueIdentifier itemIdentifier = GameRegistry.findUniqueIdentifierFor(stack.getItem());
int meta = stack.getItemDamage();
int size = stack.stackSize;
NBTTagCompound tagCompound = stack.stackTagCompound;
if (tagCompound == null || tagCompound.hasNoTags()) {
return "getModItem(\"" + itemIdentifier.modId
+ "\", \""
+ itemIdentifier.name
+ "\", "
+ size
+ ", "
+ meta
+ ", missing)";
} else {
return "createItemStack(\"" + itemIdentifier.modId
+ "\", \""
+ itemIdentifier.name
+ "\", "
+ size
+ ", "
+ meta
+ ", "
+ "\""
+ tagCompound.toString().replace("\"", "\\\"")
+ "\""
+ ", missing)";
}
}
public static String convertStack(IIngredient ingredient) {
Object internal = ingredient.getInternal();
if (internal instanceof ItemStack) return convertStack((ItemStack) internal);
else return "ERRORSTACK";
}
public static String convertStackOrOre(IIngredient ingredient) {
Object internal = ingredient.getInternal();
if (internal instanceof ItemStack) return convertStack((ItemStack) internal);
else if (internal instanceof String) return "\"" + (String) internal + "\"";
else return "ERRORSTACK";
}
public static String convertArrayInLine(Object[] arr) {
StringBuilder arrayString = new StringBuilder();
for (int i = 0, arrLength = arr.length; i < arrLength; i++) {
Object o = arr[i];
if (o instanceof String) arrayString.append("\"").append((String) o).append("\"");
else if (o instanceof Character) arrayString.append("'").append((char) o).append("'");
else if (o instanceof ItemStack) arrayString.append(convertStack((ItemStack) o));
else if (o instanceof IItemStack || o instanceof IngredientItem)
arrayString.append(convertStack((IIngredient) o));
else if (o instanceof IOreDictEntry)
arrayString.append("\"").append((String) ((IOreDictEntry) o).getInternal()).append("\"");
else if (o instanceof IngredientOreDict)
arrayString.append("\"").append((String) ((IngredientOreDict) o).getInternal()).append("\"");
else if (o == null) arrayString.append("null");
else arrayString.append(o);
if (i + 1 < arrLength) arrayString.append(", ");
}
return arrayString.toString();
}
public static String convert2DArrayInLine(Object[][] arr) {
StringBuilder arrayString = new StringBuilder();
for (int i = 0, arrLength = arr.length; i < arrLength; i++) {
for (int j = 0, jarrLength = arr[i].length; j < jarrLength; j++) {
Object o = arr[i][j];
if (o instanceof String) arrayString.append("\"").append((String) o).append("\"");
else if (o instanceof Character) arrayString.append("'").append((char) o).append("'");
else if (o instanceof ItemStack) arrayString.append(convertStack((ItemStack) o));
else if (o instanceof IItemStack || o instanceof IngredientItem)
arrayString.append(convertStack((IIngredient) o));
else if (o instanceof IOreDictEntry)
arrayString.append("\"").append((String) ((IOreDictEntry) o).getInternal()).append("\"");
else if (o instanceof IngredientOreDict)
arrayString.append("\"").append((String) ((IngredientOreDict) o).getInternal()).append("\"");
else if (o == null) arrayString.append("null");
else arrayString.append(o);
if (i + 1 < arrLength || j + 1 < jarrLength) arrayString.append(", ");
}
}
return arrayString.toString();
}
public static void logGTRecipe(ItemStack[] itemInputs, ItemStack[] itemOutputs, int[] chances,
FluidStack[] fluidInputs, FluidStack[] fluidOutputs, int duration, int eut, Integer specialValue,
String recipeMapVariable) {
StringBuilder builder = new StringBuilder("GT_Values.RA.stdBuilder()");
Function<ItemStack[], ItemStack[]> isAllObjectsNullItemStack = arr -> {
if (arr == null || arr.length == 0 || Arrays.stream(arr).allMatch(Objects::isNull)) return null;
return Arrays.stream(arr).filter(Objects::nonNull).toArray(ItemStack[]::new);
};
Function<FluidStack[], FluidStack[]> isAllObjectsNullFluidStack = arr -> {
if (arr == null || arr.length == 0 || Arrays.stream(arr).allMatch(Objects::isNull)) return null;
return Arrays.stream(arr).filter(Objects::nonNull).toArray(FluidStack[]::new);
};
itemInputs = isAllObjectsNullItemStack.apply(itemInputs);
itemOutputs = isAllObjectsNullItemStack.apply(itemOutputs);
fluidInputs = isAllObjectsNullFluidStack.apply(fluidInputs);
fluidOutputs = isAllObjectsNullFluidStack.apply(fluidOutputs);
if (itemInputs == null || itemInputs.length == 0) builder.append(".noItemInputs()");
else builder.append(".itemInputs(").append(convertArrayInLine(itemInputs)).append(")");
if (itemOutputs == null || itemOutputs.length == 0) builder.append(".noItemOutputs()");
else builder.append(".itemOutputs(").append(convertArrayInLine(itemOutputs)).append(")");
if (chances != null && chances.length > 0) builder.append(".outputChances(")
.append(convertArrayInLine(Arrays.stream(chances).boxed().toArray(Integer[]::new))).append(")");
if (fluidInputs == null || fluidInputs.length == 0) builder.append(".noFluidInputs()");
else builder.append(".fluidInputs(").append(convertArrayInLine(fluidInputs)).append(")");
if (fluidOutputs == null || fluidOutputs.length == 0) builder.append(".noFluidOutputs()");
else builder.append(".fluidOutputs(").append(convertArrayInLine(fluidOutputs)).append(")");
builder.append(".duration(").append(duration).append(")");
builder.append(".eut(").append(eut).append(")");
if (specialValue != null) builder.append(".specialValue(").append(specialValue.intValue()).append(")");
builder.append(".addTo(").append(recipeMapVariable).append(");");
info(builder.toString());
}
public static void logGTRecipe(ItemStack[] itemInputs, ItemStack[] itemOutputs, FluidStack[] fluidInputs,
FluidStack[] fluidOutputs, int duration, int eut, String recipeMapVariable) {
logGTRecipe(itemInputs, itemOutputs, null, fluidInputs, fluidOutputs, duration, eut, null, recipeMapVariable);
}
public static void logGTRecipe(ItemStack[] itemInputs, ItemStack[] itemOutputs, int[] chances,
FluidStack[] fluidInputs, FluidStack[] fluidOutputs, int duration, int eut, String recipeMapVariable) {
logGTRecipe(
itemInputs,
itemOutputs,
chances,
fluidInputs,
fluidOutputs,
duration,
eut,
null,
recipeMapVariable);
}
public static void logGTRecipe(ItemStack[] itemInputs, ItemStack[] itemOutputs, FluidStack[] fluidInputs,
FluidStack[] fluidOutputs, int duration, int eut, int specialValue, String recipeMapVariable) {
logGTRecipe(
itemInputs,
itemOutputs,
null,
fluidInputs,
fluidOutputs,
duration,
eut,
specialValue,
recipeMapVariable);
}
public static final String[] COLOR_NAMES = { "White", "Orange", "Magenta", "Light Blue", "Yellow", "Lime", "Pink", public static final String[] COLOR_NAMES = { "White", "Orange", "Magenta", "Light Blue", "Yellow", "Lime", "Pink",
"Gray", "Light Gray", "Cyan", "Purple", "Blue", "Brown", "Green", "Red", "Black" }; "Gray", "Light Gray", "Cyan", "Purple", "Blue", "Brown", "Green", "Red", "Black" };
private static IJEIRecipeRegistry ijeiRecipeRegistry = new DummyJEIRecipeRegistry(); private static IJEIRecipeRegistry ijeiRecipeRegistry = new DummyJEIRecipeRegistry();
@@ -51,7 +51,9 @@ public class MCFurnaceManager implements IFurnaceManager {
} }
} }
if (toRemove.isEmpty()) {} else { if (toRemove.isEmpty()) {
MineTweakerAPI.logWarning("No furnace recipes for " + output.toString());
} else {
MineTweakerAPI.apply(new RemoveAction(toRemove, toRemoveValues)); MineTweakerAPI.apply(new RemoveAction(toRemove, toRemoveValues));
} }
} }
@@ -110,6 +112,7 @@ public class MCFurnaceManager implements IFurnaceManager {
public void apply() { public void apply() {
for (ItemStack item : items) { for (ItemStack item : items) {
FurnaceRecipes.smelting().getSmeltingList().remove(item); FurnaceRecipes.smelting().getSmeltingList().remove(item);
MineTweakerAPI.info("GT_ModHandler.removeFurnaceSmelting(" + MineTweakerAPI.convertStack(item) + ");");
} }
} }
@@ -159,6 +162,11 @@ public class MCFurnaceManager implements IFurnaceManager {
public void apply() { public void apply() {
for (ItemStack inputStack : input) { for (ItemStack inputStack : input) {
FurnaceRecipes.smelting().func_151394_a(inputStack, output, (float) xp); FurnaceRecipes.smelting().func_151394_a(inputStack, output, (float) xp);
MineTweakerAPI.info(
"GT_ModHandler.addSmeltingRecipe(" + MineTweakerAPI.convertStack(inputStack)
+ ", "
+ MineTweakerAPI.convertStack(output)
+ ");");
} }
} }
@@ -201,6 +209,11 @@ public class MCFurnaceManager implements IFurnaceManager {
@Override @Override
public void apply() { public void apply() {
FuelTweaker.INSTANCE.addFuelPattern(pattern); FuelTweaker.INSTANCE.addFuelPattern(pattern);
MineTweakerAPI.info(
"GT_ModHandler.setFuelValue(" + MineTweakerAPI.convertStack(pattern.getPattern())
+ ", "
+ pattern.getValue()
+ ");");
} }
@Override @Override
@@ -208,6 +208,7 @@ public class MCGame implements IGame {
} else { } else {
added = false; added = false;
} }
MineTweakerAPI.info(key + "=" + text);
} }
@Override @Override
@@ -271,6 +271,11 @@ public class MCOreDictEntry implements IOreDictEntry {
@Override @Override
public void apply() { public void apply() {
OreDictionary.registerOre(id, item); OreDictionary.registerOre(id, item);
MineTweakerAPI.info(
"OreDictionary.registerOre(\"" + OreDictionary.getOreName(id)
+ "\", "
+ MineTweakerAPI.convertStack(item)
+ ");");
} }
@Override @Override
@@ -316,6 +316,17 @@ public final class MCRecipeManager implements IRecipeManager {
toRemove = find(); toRemove = find();
removeRecipes(toRemove); removeRecipes(toRemove);
for (Pair<IIngredient, Boolean> output : outputs) {
if (output.getKey().getInternal() instanceof String) MineTweakerAPI
.info("removeRecipeByOreOutputDelayed(\"" + ((String) output.getKey().getInternal()) + "\")");
else MineTweakerAPI.info(
"GT_ModHandler.removeRecipeByOutputDelayed(" + MineTweakerAPI.convertStack(output.getKey())
+ ", "
+ (output.getValue() ? "false" : "true")
+ ", false, true);");
}
} }
@Override @Override
@@ -440,6 +451,14 @@ public final class MCRecipeManager implements IRecipeManager {
toRemove = find(); toRemove = find();
MineTweakerAPI.logInfo("Removing " + toRemove.size() + " Shapeless recipes."); MineTweakerAPI.logInfo("Removing " + toRemove.size() + " Shapeless recipes.");
super.removeRecipes(toRemove); super.removeRecipes(toRemove);
if (ingredients == null || ingredients.length == 0)
MineTweakerAPI.info("removeRecipeShapeless(" + MineTweakerAPI.convertStackOrOre(output) + ");");
else MineTweakerAPI.info(
"removeRecipeShapeless(" + MineTweakerAPI.convertStackOrOre(output)
+ ", "
+ MineTweakerAPI.convertArrayInLine(ingredients)
+ ");");
} }
@Override @Override
@@ -554,6 +573,21 @@ public final class MCRecipeManager implements IRecipeManager {
MineTweakerAPI.logInfo(toRemove.size() + " removed"); MineTweakerAPI.logInfo(toRemove.size() + " removed");
super.removeRecipes(toRemove); super.removeRecipes(toRemove);
if (ingredients == null || ingredients.length == 0)
MineTweakerAPI.info("removeRecipeShaped(" + MineTweakerAPI.convertStackOrOre(output) + ");");
else MineTweakerAPI.info(
"removeRecipeShaped(" + MineTweakerAPI.convertStackOrOre(output)
+ ", new Object[]{"
+ MineTweakerAPI.convertArrayInLine(ingredients[0])
+ "}"
+ (ingredients.length >= 2
? (", new Object[]{" + MineTweakerAPI.convertArrayInLine(ingredients[1]) + "}")
: ", new Object[0]")
+ (ingredients.length >= 3
? (", new Object[]{" + MineTweakerAPI.convertArrayInLine(ingredients[2]) + "}")
: ", new Object[0]")
+ ");");
} }
@Override @Override
@@ -658,17 +692,50 @@ public final class MCRecipeManager implements IRecipeManager {
private static class ActionAddShapedRecipe extends ActionBaseAddRecipe { private static class ActionAddShapedRecipe extends ActionBaseAddRecipe {
IItemStack aOutput;
IIngredient[][] aIngredients;
boolean aMirrored;
public ActionAddShapedRecipe(IItemStack output, IIngredient[][] ingredients, IRecipeFunction function, public ActionAddShapedRecipe(IItemStack output, IIngredient[][] ingredients, IRecipeFunction function,
IRecipeAction action, boolean mirrored) { IRecipeAction action, boolean mirrored) {
super(new ShapedRecipe(output, ingredients, function, action, mirrored), output, true); super(new ShapedRecipe(output, ingredients, function, action, mirrored), output, true);
aOutput = output;
aIngredients = ingredients;
aMirrored = mirrored;
}
@Override
public void apply() {
super.apply();
MineTweakerAPI.info(
"addShapedRecipe(" + MineTweakerAPI.convertStack(aOutput)
+ ", new Object[] {"
+ MineTweakerAPI.convert2DArrayInLine(aIngredients)
+ "});");
} }
} }
private static class ActionAddShapelessRecipe extends ActionBaseAddRecipe { private static class ActionAddShapelessRecipe extends ActionBaseAddRecipe {
IItemStack aOutput;
IIngredient[] aIngredients;
public ActionAddShapelessRecipe(IItemStack output, IIngredient[] ingredients, IRecipeFunction function, public ActionAddShapelessRecipe(IItemStack output, IIngredient[] ingredients, IRecipeFunction function,
IRecipeAction action) { IRecipeAction action) {
super(new ShapelessRecipe(output, ingredients, function, action), output, false); super(new ShapelessRecipe(output, ingredients, function, action), output, false);
aOutput = output;
aIngredients = ingredients;
}
@Override
public void apply() {
super.apply();
MineTweakerAPI.info(
"addShapelessCraftingRecipe(" + MineTweakerAPI.convertStack(aOutput)
+ ", new Object[] { "
+ MineTweakerAPI.convertArrayInLine(aIngredients)
+ " });");
} }
} }
@@ -719,7 +786,7 @@ public final class MCRecipeManager implements IRecipeManager {
recipes.removeIf(recipesToUndo::contains); recipes.removeIf(recipesToUndo::contains);
} }
int commonPoolParallelism = getCommonPoolParallelism(); int commonPoolParallelism = getCommonPoolParallelism();
if (commonPoolParallelism <= 1) { if (true) {
// if thread == 1, then we have parallel overhead but doesn't have parallel speedup. // if thread == 1, then we have parallel overhead but doesn't have parallel speedup.
// never do this // never do this
recipesToRemove.forEach(ActionBaseRemoveRecipes::apply); recipesToRemove.forEach(ActionBaseRemoveRecipes::apply);
@@ -144,7 +144,7 @@ public class MCServer extends AbstractServer {
@Override @Override
public int compareTo(Object o) { public int compareTo(Object o) {
return this.getCommandName().compareTo(((ICommand) o).getCommandName()); return 0;
} }
} }
@@ -1,7 +1,6 @@
package minetweaker.mods.ic2.crops; package minetweaker.mods.ic2.crops;
import ic2.api.crops.CropCard; import ic2.api.crops.CropCard;
import minetweaker.annotations.ModOnly;
import stanhebben.zenscript.annotations.ZenCaster; import stanhebben.zenscript.annotations.ZenCaster;
import stanhebben.zenscript.annotations.ZenClass; import stanhebben.zenscript.annotations.ZenClass;
import stanhebben.zenscript.annotations.ZenGetter; import stanhebben.zenscript.annotations.ZenGetter;
@@ -14,7 +13,6 @@ import stanhebben.zenscript.annotations.ZenMethod;
* *
*/ */
@ZenClass("mods.ic2.Crop") @ZenClass("mods.ic2.Crop")
@ModOnly("IC2")
public class Crop { public class Crop {
private CropCard cc; private CropCard cc;
@@ -1,6 +1,5 @@
package minetweaker.mods.ic2.crops; package minetweaker.mods.ic2.crops;
import minetweaker.annotations.ModOnly;
import minetweaker.api.item.IItemStack; import minetweaker.api.item.IItemStack;
import stanhebben.zenscript.annotations.ZenClass; import stanhebben.zenscript.annotations.ZenClass;
import stanhebben.zenscript.annotations.ZenGetter; import stanhebben.zenscript.annotations.ZenGetter;
@@ -13,7 +12,6 @@ import stanhebben.zenscript.annotations.ZenSetter;
* *
*/ */
@ZenClass("mods.ic2.GrowthRequirements") @ZenClass("mods.ic2.GrowthRequirements")
@ModOnly("IC2")
public class GrowthRequirements { public class GrowthRequirements {
private int minNutrients; private int minNutrients;
@@ -9,7 +9,6 @@ import cpw.mods.fml.relauncher.SideOnly;
import ic2.api.crops.CropCard; import ic2.api.crops.CropCard;
import ic2.api.crops.ICropTile; import ic2.api.crops.ICropTile;
import minetweaker.MineTweakerAPI; import minetweaker.MineTweakerAPI;
import minetweaker.annotations.ModOnly;
import minetweaker.api.item.IItemStack; import minetweaker.api.item.IItemStack;
import minetweaker.api.minecraft.MineTweakerMC; import minetweaker.api.minecraft.MineTweakerMC;
import stanhebben.zenscript.annotations.ZenClass; import stanhebben.zenscript.annotations.ZenClass;
@@ -30,7 +29,6 @@ import stanhebben.zenscript.annotations.ZenSetter;
* *
*/ */
@ZenClass("mods.ic2.SyntheticCrop") @ZenClass("mods.ic2.SyntheticCrop")
@ModOnly("IC2")
public class SyntheticCrop extends CropCard { public class SyntheticCrop extends CropCard {
private String name; private String name;
@@ -4,6 +4,8 @@ import static minetweaker.api.minecraft.MineTweakerMC.getIItemStack;
import static minetweaker.api.minecraft.MineTweakerMC.getItemStack; import static minetweaker.api.minecraft.MineTweakerMC.getItemStack;
import static minetweaker.api.minecraft.MineTweakerMC.getItemStacks; import static minetweaker.api.minecraft.MineTweakerMC.getItemStacks;
import net.minecraft.item.ItemStack;
import ic2.api.recipe.RecipeOutput; import ic2.api.recipe.RecipeOutput;
import ic2.api.recipe.Recipes; import ic2.api.recipe.Recipes;
import minetweaker.MineTweakerAPI; import minetweaker.MineTweakerAPI;
@@ -44,7 +46,22 @@ public class Compressor {
Recipes.compressor, Recipes.compressor,
getItemStacks(output), getItemStacks(output),
null, null,
new IC2RecipeInput(ingredient))); new IC2RecipeInput(ingredient)) {
@Override
public void apply() {
super.apply();
MineTweakerAPI.logGTRecipe(
new ItemStack[] { new IC2RecipeInput(ingredient).getInputs().get(0) },
new ItemStack[] { getItemStack(output) },
null,
null,
300,
2,
"sCompressorRecipes");
}
});
} }
} }
@@ -9,6 +9,8 @@ import static minetweaker.api.minecraft.MineTweakerMC.getIItemStack;
import static minetweaker.api.minecraft.MineTweakerMC.getItemStack; import static minetweaker.api.minecraft.MineTweakerMC.getItemStack;
import static minetweaker.api.minecraft.MineTweakerMC.getItemStacks; import static minetweaker.api.minecraft.MineTweakerMC.getItemStacks;
import net.minecraft.item.ItemStack;
import ic2.api.recipe.RecipeOutput; import ic2.api.recipe.RecipeOutput;
import ic2.api.recipe.Recipes; import ic2.api.recipe.Recipes;
import minetweaker.MineTweakerAPI; import minetweaker.MineTweakerAPI;
@@ -49,7 +51,22 @@ public class Extractor {
Recipes.extractor, Recipes.extractor,
getItemStacks(output), getItemStacks(output),
null, null,
new IC2RecipeInput(ingredient))); new IC2RecipeInput(ingredient)) {
@Override
public void apply() {
super.apply();
MineTweakerAPI.logGTRecipe(
new ItemStack[] { new IC2RecipeInput(ingredient).getInputs().get(0) },
new ItemStack[] { getItemStack(output) },
null,
null,
300,
2,
"sExtractorRecipes");
}
});
} }
} }
@@ -74,6 +74,7 @@ public class NEI {
@Override @Override
public void apply() { public void apply() {
API.addItemListEntry(item); API.addItemListEntry(item);
MineTweakerAPI.info("API.addItemListEntry(" + MineTweakerAPI.convertStack(item) + ");");
} }
@Override @Override
@@ -113,6 +114,7 @@ public class NEI {
@Override @Override
public void apply() { public void apply() {
API.hideItem(stack); API.hideItem(stack);
MineTweakerAPI.info("API.hideItem(" + MineTweakerAPI.convertStack(stack) + ");");
} }
@Override @Override
@@ -154,6 +156,7 @@ public class NEI {
@Override @Override
public void apply() { public void apply() {
API.setOverrideName(item, name); API.setOverrideName(item, name);
MineTweakerAPI.info("API.setOverrideName(" + MineTweakerAPI.convertStack(item) + ", \"" + name + "\");");
} }
@Override @Override
@@ -172,6 +172,7 @@ public class MTTweaker implements ITweaker {
} }
if (wereStuck.size() > 0) { if (wereStuck.size() > 0) {
MineTweakerAPI.logWarning(Integer.toString(wereStuck.size()) + " modifications were stuck");
for (IUndoableAction action : wereStuck) { for (IUndoableAction action : wereStuck) {
MineTweakerAPI.logInfo("Stuck: " + action.describe()); MineTweakerAPI.logInfo("Stuck: " + action.describe());
} }