Compare commits

..
24 Commits
Author SHA1 Message Date
Guillaume Mercier 74dc712460 remove deprecated endpoints
will publish a pre-tag and create integration PRs shortly
2026-01-30 20:07:39 -05:00
Guillaume Mercier 3f8beb3c68 add disabled example file 2026-01-30 20:06:37 -05:00
Guillaume Mercier d3d42d2ff5 Update README.md 2026-01-28 13:48:51 -05:00
Guillaume Mercier 4ebaff3cf9 readme 2nd pass 2026-01-28 12:40:12 -05:00
Guillaume Mercier 494da5c633 fix typos
also shortened the max line length of comments in readme examples so it doesn't go off screen
when you look at it on github when the readme is fully expanded.
2026-01-28 11:28:55 -05:00
Guillaume Mercier 3b03d62751 copy paste errors are funny. 2026-01-27 21:31:28 -05:00
Guillaume Mercier 99f6158e46 Add proper examples to readme.
and it's done!
2026-01-27 21:30:27 -05:00
Guillaume Mercier 2b56022599 spotless apply 2026-01-27 17:50:27 -05:00
Guillaume Mercier 8fec8f2a8a properly handle the result of TE NBT transformers. 2026-01-27 17:49:46 -05:00
Guillaume Mercier 3868d131a7 any mentions of nuke dummies, add new interfaces that better serve good practices. 2026-01-27 16:46:05 -05:00
Guillaume Mercier 78e3f792b7 replacement -> transformer refactor 2026-01-24 11:17:29 -05:00
Guillaume Mercier ccb579f386 spotless bad 2026-01-23 18:46:40 -05:00
Guillaume Mercier 9672270b1e isolate simple transformations to own file + more doc + cleanup 2026-01-23 17:59:04 -05:00
Guillaume Mercier d20a5fe43f doc cleanup 2026-01-23 16:00:38 -05:00
Guillaume Mercier bc3d26e9b2 transformer optimisations and improve public API clarity. 2026-01-23 15:51:34 -05:00
Guillaume Mercier 0fb3c220fb Speedup simple transformers by caching meta map into lambda capture. 2026-01-23 10:17:35 -05:00
Guillaume Mercier b81f3d5b52 spotless apply 2026-01-21 14:02:36 -05:00
Guillaume Mercier bd30015bbd add stack handlers for item -> item+meta 2026-01-21 13:53:47 -05:00
Guillaume Mercier 1f5a792ceb add helper functions to api to stream development 2026-01-20 18:06:33 -05:00
Guillaume Mercier 5c524c2461 typo fix 2026-01-20 13:29:28 -05:00
Guillaume Mercier 6d58c41dd8 move internal stuff to a non-api endpoint and clean-up added structures 2026-01-20 13:27:50 -05:00
Guillaume Mercier 5d4b657868 Move dummy item creation to the load complete event. 2026-01-20 13:07:23 -05:00
Guillaume Mercier 36de68e5ab add dummy item auto-creation 2026-01-20 11:00:33 -05:00
Guillaume Mercier 4d2c1ba3fc Add support for multiple mods remapping the same item/block/tile entity. 2026-01-19 11:52:40 -05:00
9 changed files with 19 additions and 62 deletions

No files matched your search

+4 -4
View File
@@ -10,7 +10,7 @@ runtime. Allowing developers to replace, migrate or modify game elements based o
3. **ItemStack Transformers**: Replace or Modify items. 3. **ItemStack Transformers**: Replace or Modify items.
4. **Simple Replacement API**: Efficiently replace or remap large amounts of blocks and items at scale without incurring any noticeable performance impact. 4. **Simple Replacement API**: Efficiently replace or remap large amounts of blocks and items at scale without incurring any noticeable performance impact.
5. **Missing Mapping Replacement API**: A set of API endpoints to register actions to be taken when FML detects a missing mapping for a given ID. 5. **Missing Mapping Replacement API**: A set of API endpoints to register actions to be taken when FML detects a missing mapping for a given ID.
6. **Numeric ID Identification for Removed Content**: A way to identify the ID of any content that has ceased to exist. 6. **Numeric ID Identification for Removed Content**: A way to identify the Id of any content that has ceased to exist.
## Examples ## Examples
@@ -248,7 +248,7 @@ let you register "Simple Transformations".
When applicable, we recommend using these endpoints as they will generally result in a faster execution time than if you When applicable, we recommend using these endpoints as they will generally result in a faster execution time than if you
were to implement your own handler. Another advantage is that multiple, completely distinct, mods can now target the were to implement your own handler. Another advantage is that multiple, completely distinct, mods can now target the
same item ID for a simple transformation with zero impact to compatibility. same item id for a simple transformation with zero impact to compatibility.
Simple Transformers can be used to perform one of 4 types of transformations: Simple Transformers can be used to perform one of 4 types of transformations:
1. Some block or item with any meta or damage value -> some block or item, preserving the meta or damage value. 1. Some block or item with any meta or damage value -> some block or item, preserving the meta or damage value.
@@ -285,7 +285,7 @@ Simple Transformers can be used to perform one of 4 types of transformations:
> >
> When registering block or item conversions, Postea will automatically detect if the given item or block has a block or > When registering block or item conversions, Postea will automatically detect if the given item or block has a block or
> item counterpart (respectively) and register an appropriate simple transformation. You can disable this behaviour by > item counterpart (respectively) and register an appropriate simple transformation. You can disable this behaviour by
> adding a `true` argument to end of all simple transformation endpoints. > adding a `false` argument to end of all simple transformation endpoints.
> [!NOTE] > [!NOTE]
> >
@@ -476,7 +476,7 @@ public abstract class FMLReMappingExample {
public static void postLoad() { public static void postLoad() {
// this only works when the thing you're replacing with has never been registered to a world's // this only works when the thing you're replacing with has never been registered to a world's
// ID map. If you try to run this with a block that already exists (eg good old dirt), FML // id map. If you try to run this with a block that already exists (eg good old dirt), FML
// error out and you that your world is corrupted beyond repair, and advise you to undo what // error out and you that your world is corrupted beyond repair, and advise you to undo what
// ever you just did. // ever you just did.
// //
+2 -2
View File
@@ -1,8 +1,8 @@
dependencies { dependencies {
api("com.github.GTNewHorizons:GTNHLib:0.9.31:dev") api("com.github.GTNewHorizons:GTNHLib:0.6.38:dev")
compileOnly('com.github.GTNewHorizons:NotEnoughIds:2.1.10:dev') compileOnly('com.github.GTNewHorizons:NotEnoughIds:2.1.10:dev')
compileOnly('com.falsepattern:chunkapi-mc1.7.10:0.6.0:dev') compileOnly('com.falsepattern:chunkapi-mc1.7.10:0.6.0:dev')
compileOnly('com.falsepattern:endlessids-mc1.7.10:1.6.0:dev') compileOnly('com.falsepattern:endlessids-mc1.7.10:1.6.0:dev')
compileOnly("com.github.GTNewHorizons:NotEnoughItems:2.8.71-GTNH:dev") { transitive = false } compileOnly("com.github.GTNewHorizons:NotEnoughItems:2.8.48-GTNH:dev") { transitive = false }
} }
+4 -39
View File
@@ -39,33 +39,9 @@ remoteMappings = https\://raw.githubusercontent.com/MinecraftForge/FML/1.7.10/co
# `./gradlew runClient --username=AnotherPlayer`, or configuring this command in your IDE. # `./gradlew runClient --username=AnotherPlayer`, or configuring this command in your IDE.
developmentEnvironmentUserName = Developer developmentEnvironmentUserName = Developer
# Enables modern Java syntax support. Valid values: # Enables using modern Java syntax (up to version 17) via Jabel, while still targeting JVM 8.
# - false: No modern syntax, Java 8 only # See https://github.com/bsideup/jabel for details on how this works.
# - jabel: Jabel syntax-only support, compiles to J8 bytecode enableModernJavaSyntax = true
# - jvmDowngrader: Full modern Java via JVM Downgrader (syntax + stdlib APIs)
# - modern: Native modern Java bytecode, no downgrading
enableModernJavaSyntax = jabel
# If set, ignores the above setting and compiles with the given toolchain. This may cause unexpected issues,
# and should *not* be used in most situations. -1 disables this.
# forceToolchainVersion = -1
# Target JVM version for JVM Downgrader bytecode downgrading.
# Only used when enableModernJavaSyntax = jvmDowngrader
# downgradeTargetVersion = 8
# Comma-separated list of Java versions for multi-release jar support (JVM Downgrader only).
# Classes will be available in META-INF/versions/N/ for each version N in this list.
# Default: "21,25" (J25+ gets native classes, J21-24 gets partial downgrade, J8-20 gets full downgrade).
# jvmDowngraderMultiReleaseVersions = 21,25
# Specifies how JVM Downgrader API stubs are provided. Options:
# - shade: Shade minimized stubs into the jar
# - gtnhlib: GTNHLib provides stubs at runtime (adds version constraint)
# - external: Another dependency provides stubs (no constraint, no warning)
# - (empty): Warning reminding you to configure stubs
# Note: 'shade' option requires you to verify license compliance, see: https://github.com/unimined/JvmDowngrader/blob/main/LICENSE.md
# jvmDowngraderStubsProvider =
# Enables injecting missing generics into the decompiled source code for a better coding experience. # 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. # Turns most publicly visible List, Map, etc. into proper List<E>, Map<K, V> types.
@@ -120,9 +96,7 @@ usesMixinDebug = true
# 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. The package must exist or # Specify the package that contains all of your Mixins. You may only place Mixins in this package or the build will fail!
# the build will fail. If you have a package property defined in your mixins.<modid>.json,
# it must match with this or the build will fail.
mixinsPackage = mixins mixinsPackage = mixins
# 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!
@@ -198,12 +172,6 @@ curseForgeRelations =
# projects. New projects should not use this parameter. # projects. New projects should not use this parameter.
# customArchiveBaseName = # customArchiveBaseName =
# Optional parameter to customize the default working directory used by the runClient* tasks. Relative to the project directory.
# runClientWorkingDirectory = run/client
# Optional parameter to customize the default working directory used by the runServer* tasks. Relative to the project directory.
# runServerWorkingDirectory = run/server
# Optional parameter to have the build automatically fail if an illegal version is used. # Optional parameter to have the build automatically fail if an illegal version is used.
# This can be useful if you e.g. only want to allow versions in the form of '1.1.xxx'. # This can be useful if you e.g. only want to allow versions in the form of '1.1.xxx'.
# The check is ONLY performed if the version is a git tag. # The check is ONLY performed if the version is a git tag.
@@ -233,6 +201,3 @@ curseForgeRelations =
# This is meant to be set in $HOME/.gradle/gradle.properties. # This is meant to be set in $HOME/.gradle/gradle.properties.
# ideaCheckSpotlessOnBuild = true # ideaCheckSpotlessOnBuild = true
# Non-GTNH properties
org.gradle.configuration-cache = true
org.gradle.parallel = true
-12
View File
@@ -1,12 +0,0 @@
#This file is generated by updateDaemonJvm
toolchainUrl.FREE_BSD.AARCH64=https\://api.foojay.io/disco/v3.0/ids/4945f00643ec68e7c7a6b66f90124f89/redirect
toolchainUrl.FREE_BSD.X86_64=https\://api.foojay.io/disco/v3.0/ids/93aeea858331bd6bb00ba94759830234/redirect
toolchainUrl.LINUX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/4945f00643ec68e7c7a6b66f90124f89/redirect
toolchainUrl.LINUX.X86_64=https\://api.foojay.io/disco/v3.0/ids/b41931cf1e70bc8e08d7dd19c343ef00/redirect
toolchainUrl.MAC_OS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/46949723aaa20c7b64d7ecfed7207034/redirect
toolchainUrl.MAC_OS.X86_64=https\://api.foojay.io/disco/v3.0/ids/d6690dfd71c4c91e08577437b5b2beb0/redirect
toolchainUrl.UNIX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/4945f00643ec68e7c7a6b66f90124f89/redirect
toolchainUrl.UNIX.X86_64=https\://api.foojay.io/disco/v3.0/ids/b41931cf1e70bc8e08d7dd19c343ef00/redirect
toolchainUrl.WINDOWS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/1e91f45234d88a64dafb961c93ddc75a/redirect
toolchainUrl.WINDOWS.X86_64=https\://api.foojay.io/disco/v3.0/ids/552c7bffe0370c66410a51c55985b511/redirect
toolchainVersion=25
Binary file not shown.
+1 -1
View File
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-9.3.1-bin.zip distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
networkTimeout=10000 networkTimeout=10000
validateDistributionUrl=true validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
Vendored
+5 -2
View File
@@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
# #
# Copyright © 2015 the original authors. # Copyright © 2015-2021 the original authors.
# #
# Licensed under the Apache License, Version 2.0 (the "License"); # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License. # you may not use this file except in compliance with the License.
@@ -114,6 +114,7 @@ case "$( uname )" in #(
NONSTOP* ) nonstop=true ;; NONSTOP* ) nonstop=true ;;
esac esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM. # Determine the Java command to use to start the JVM.
@@ -171,6 +172,7 @@ fi
# For Cygwin or MSYS, switch paths to Windows format before running java # For Cygwin or MSYS, switch paths to Windows format before running java
if "$cygwin" || "$msys" ; then if "$cygwin" || "$msys" ; then
APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
JAVACMD=$( cygpath --unix "$JAVACMD" ) JAVACMD=$( cygpath --unix "$JAVACMD" )
@@ -210,7 +212,8 @@ DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
set -- \ set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \ "-Dorg.gradle.appname=$APP_BASE_NAME" \
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \ -classpath "$CLASSPATH" \
org.gradle.wrapper.GradleWrapperMain \
"$@" "$@"
# Stop when "xargs" is not available. # Stop when "xargs" is not available.
Vendored
+2 -1
View File
@@ -70,10 +70,11 @@ goto fail
:execute :execute
@rem Setup the command line @rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle @rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
:end :end
@rem End local scope for the variables with windows NT shell @rem End local scope for the variables with windows NT shell
+1 -1
View File
@@ -17,7 +17,7 @@ pluginManagement {
} }
plugins { plugins {
id 'com.gtnewhorizons.gtnhsettingsconvention' version '2.0.20' id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.41'
} }