Compare commits

...
30 Commits
Author SHA1 Message Date
FalsePattern 9a8a38a4a5 Extended Planets compat
#234
2025-06-04 12:53:43 +02:00
FalsePattern 3af6751f3c improved pattern matcher for biome super patcher 2025-06-04 12:52:06 +02:00
FalsePattern 35b658a29b Factorization compat
#235 #170
2025-06-04 12:01:49 +02:00
FalsePattern 28352b8c17 The Mists of RioV compat
#238
2025-06-04 11:55:45 +02:00
FalsePattern 267d1c4170 make potion ID extension safer but a bit more wasteful
#239
2025-06-04 11:38:09 +02:00
FalsePattern 4fdd2cbcaf fix hbm ntm compat typo
#240
2025-06-04 10:48:55 +02:00
FalsePattern 27b21e8de7 fix compat with a weird UndergroundBiomes fork
#241
2025-06-04 10:43:26 +02:00
FalsePattern d01ede5147 switch to gradle plugin portal fpgradle release 2025-06-01 17:23:48 +02:00
FalsePattern 9dc46e54f3 better ars magica 2 compat fix 2025-05-02 16:27:50 +02:00
FalsePattern a61359086b fix compat with Ars Magica 2 2025-04-14 20:50:07 +02:00
FalsePattern ee8a836413 remove obsolete NTM compat code 2024-12-25 23:17:00 +01:00
FalsePattern 3b53b9fcef update buildscript and gradle 2024-12-25 23:00:36 +01:00
FalsePattern 70fc4dcf8c update deps, categorize maintained/unmaintained mods 2024-12-25 22:55:38 +01:00
FalsePattern e8e77766c4 fixed crash with HBM NTM nukes 2024-12-23 15:37:52 +01:00
FalsePattern 4d221c864b bump gradle and buildscript 2024-12-09 19:13:38 +01:00
FalsePattern 55dbe6f4b9 update to chunkapi 0.6 2024-12-09 19:12:56 +01:00
FalsePattern 1ea745c8a4 eid$ prefix for SubChunkBlockHook 2024-12-09 19:05:00 +01:00
FalsePattern 85c7e8ad25 update buildscript 2024-11-14 21:25:53 +01:00
FalsePattern a9e8554f18 lmao how did i manage to mess this up 2024-11-14 21:22:04 +01:00
FalsePattern 27ca556182 thaumcraft potion ID extension (#208) 2024-10-10 09:37:06 +02:00
FalsePattern 2c96f817d7 update buildscript 2024-10-10 09:36:17 +02:00
FalsePattern 95c380a5b1 and another 2024-09-20 15:41:32 +02:00
FalsePattern ed7507a58e another RTG crash fix 2024-09-13 21:59:18 +02:00
FalsePattern c31e218197 RTG crash fix
(hopefully) resolves #185 and #189
2024-09-13 16:36:48 +02:00
FalsePattern 5ad71c29c2 bump fplib version 2024-09-13 16:35:10 +02:00
FalsePattern 684d419465 update gradle 2024-09-13 16:34:33 +02:00
FalsePattern c7067c7d72 update buildscript 2024-09-13 16:32:35 +02:00
FalsePattern f57bd9c353 pinhole mixin linter fixes 2024-08-06 23:47:01 +02:00
FalsePattern 38caffb85d Climate Control compat (#185 , #189) 2024-08-06 23:46:32 +02:00
FalsePattern 6a10291318 update buildscript 2024-08-06 22:34:34 +02:00
52 changed files with 1557 additions and 241 deletions

No files matched your search

+4
View File
@@ -46,6 +46,7 @@ This mod also contains patches for the following mods:
- Biome Wand - Biome Wand
- BuildCraft - BuildCraft
- ChromatiCraft - ChromatiCraft
- Climate Control
- Compact Machines - Compact Machines
- CoFH Lib - CoFH Lib
- Dark World - Dark World
@@ -55,8 +56,10 @@ This mod also contains patches for the following mods:
- Enderlicious - Enderlicious
- Enhanced Biomes - Enhanced Biomes
- Erebus - Erebus
- Extended Planets
- Extra Planets - Extra Planets
- Extra Utilities - Extra Utilities
- Factorization
- Futurepack - Futurepack
- GalactiCraft - GalactiCraft
- Highlands - Highlands
@@ -75,6 +78,7 @@ This mod also contains patches for the following mods:
- Realistic World Generation - Realistic World Generation
- Thaumcraft - Thaumcraft
- The Lord of the Rings Mod: Legacy - The Lord of the Rings Mod: Legacy
- The Mists of RioV
- ThutCore/ThutMods - ThutCore/ThutMods
- Tropicraft - Tropicraft
- Twilight Forest - Twilight Forest
+48 -30
View File
@@ -1,5 +1,5 @@
plugins { plugins {
id("fpgradle-minecraft") version ("0.6.1") id("com.falsepattern.fpgradle-mc") version ("0.17.1")
} }
group = "com.falsepattern" group = "com.falsepattern"
@@ -29,7 +29,7 @@ minecraft_fp {
} }
publish { publish {
changelog = "https://github.com/GTMEGA/EndlessIDs/releases/tag/{version}" changelog = "https://github.com/GTMEGA/EndlessIDs/releases/tag/$version"
maven { maven {
repoUrl = "https://mvn.falsepattern.com/releases/" repoUrl = "https://mvn.falsepattern.com/releases/"
repoName = "mavenpattern" repoName = "mavenpattern"
@@ -56,23 +56,38 @@ minecraft_fp {
repositories { repositories {
cursemavenEX() cursemavenEX()
modrinthEX()
exclusive(mavenpattern(), "com.falsepattern") exclusive(mavenpattern(), "com.falsepattern")
exclusive(ivy("https://mvn.falsepattern.com/releases/mirror/", "[orgPath]/[artifact]-[revision].[ext]"), "mirror", "mirror.micdoodle") exclusive(ivy("mavenpattern_mirror", "https://mvn.falsepattern.com/releases/mirror/", "[orgPath]/[artifact]-[revision].[ext]"), "mirror", "mirror.micdoodle")
exclusive(ivy("https://github.com/", "[orgPath]/releases/download/[revision]/[artifact]-[revision].[ext]"), "CannibalVox.DimDoors") exclusive(ivy("github", "https://github.com/", "[orgPath]/releases/download/[revision]/[artifact]-[revision].[ext]"), "CannibalVox.DimDoors")
} }
dependencies { dependencies {
////////////////Our dependencies//////////////// // region Our deps
implementationSplit("com.falsepattern:falsepatternlib-mc1.7.10:1.4.0") implementationSplit("com.falsepattern:falsepatternlib-mc1.7.10:1.5.5")
implementation("it.unimi.dsi:fastutil:8.5.13") implementation("it.unimi.dsi:fastutil:8.5.15")
implementationSplit("com.falsepattern:chunkapi-mc1.7.10:0.5.1") implementationSplit("com.falsepattern:chunkapi-mc1.7.10:0.6.0")
// endregion
////////////////Patched mods//////////////// // region maintained mods
//DragonAPI V33b
compileOnly(deobfCurse("dragonapi-235591:4722480"))
//Immersive Cavegen 1.2g hotfix5
compileOnly(deobfCurse("immersivecavegen-521557:4723376"))
//Hbm's Nuclear Tech Mod 1.0.27X5188
compileOnly(deobfCurse("hbm-ntm-235439:6017897"))
// endregion
// region unmaintained mods
//AbyssalCraft 1.9.1.3-FINAL //AbyssalCraft 1.9.1.3-FINAL
compileOnly(deobfCurse("abyssalcraft-53686:2311135")) compileOnly(deobfCurse("abyssalcraft-53686:2311135"))
//Advanced Rocketry //Advanced Rocketry 1.4.0-32
compileOnly(deobfCurse("advancedrocketry-236542:2985057")) compileOnly(deobfCurse("advancedrocketry-236542:2985057"))
//Alternate Terrain Generation 0.12.0 //Alternate Terrain Generation 0.12.0
@@ -84,9 +99,6 @@ dependencies {
//Anti ID Conflict 1.3.5 //Anti ID Conflict 1.3.5
compileOnly(deobfCurse("antiidconflict-246288:2308279")) compileOnly(deobfCurse("antiidconflict-246288:2308279"))
// //ArchaicFix 0.2.0
// compileOnly("com.github.embeddedt:ArchaicFix:0.2.0:dev")
//Atum 0.6.77 //Atum 0.6.77
compileOnly(deobfCurse("atum-59621:2256356")) compileOnly(deobfCurse("atum-59621:2256356"))
@@ -98,11 +110,14 @@ dependencies {
//Biome Wand 1.1.9 //Biome Wand 1.1.9
//Source: https://spacechase0.com/wp-content/uploads/2014/10/1.7.10-Biome-Wand-1.1.9.jar //Source: https://spacechase0.com/wp-content/uploads/2014/10/1.7.10-Biome-Wand-1.1.9.jar
compileOnly(rfg.deobf("mirror:1.7.10-Biome-Wand:1.1.9")) compileOnly(deobf("mirror:1.7.10-Biome-Wand:1.1.9"))
//Buildcraft 7.1.24 //Buildcraft 7.1.24
compileOnly(deobfCurse("buildcraft-61811:3538651")) compileOnly(deobfCurse("buildcraft-61811:3538651"))
//Climate Control 0.8.2
compileOnly(deobfCurse("climatecontrol-76544:2359685"))
//CoFH Lib 1.2.1-185 //CoFH Lib 1.2.1-185
compileOnly(deobfCurse("cofh-lib-220333:2388748")) compileOnly(deobfCurse("cofh-lib-220333:2388748"))
@@ -114,10 +129,7 @@ dependencies {
//DimDoors 2.2.5-test9 //DimDoors 2.2.5-test9
//Source: https://github.com/CannibalVox/DimDoors/releases/download/2.2.5-test9/DimensionalDoors-2.2.5-test9.jar //Source: https://github.com/CannibalVox/DimDoors/releases/download/2.2.5-test9/DimensionalDoors-2.2.5-test9.jar
compileOnly(rfg.deobf("CannibalVox.DimDoors:DimensionalDoors:2.2.5-test9")) compileOnly(deobf("CannibalVox.DimDoors:DimensionalDoors:2.2.5-test9"))
//DragonAPI V32a
compileOnly(deobfCurse("dragonapi-235591:4611379"))
//Dynamic Surroundings 1.0.6.4 //Dynamic Surroundings 1.0.6.4
compileOnly(deobfCurse("dynamicsurrounding-238891:2642381")) compileOnly(deobfCurse("dynamicsurrounding-238891:2642381"))
@@ -126,33 +138,37 @@ dependencies {
compileOnly(deobfCurse("enderlicious-508777:3504111")) compileOnly(deobfCurse("enderlicious-508777:3504111"))
//Enhanced Biomes 2.5 //Enhanced Biomes 2.5
compileOnly(rfg.deobf("mirror:enhancedbiomes:2.5")) compileOnly(deobf("mirror:enhancedbiomes:2.5"))
//Erebus 0.4.7 //Erebus 0.4.7
compileOnly(deobfCurse("theerebus-220698:2305035")) compileOnly(deobfCurse("theerebus-220698:2305035"))
//Extended Planets 0.4.2
//Source: https://www.mcmod.cn/class/1301.html
compileOnly(deobf("mirror:ExtendedPlanets:0.4.2"))
//Extra Planets 2.1.4 //Extra Planets 2.1.4
compileOnly(deobfCurse("extraplanets-241291:3214413")) compileOnly(deobfCurse("extraplanets-241291:3214413"))
//Extra Utilities 1.2.12 //Extra Utilities 1.2.12
compileOnly(deobfCurse("extrautilities-225561:2264384")) compileOnly(deobfCurse("extrautilities-225561:2264384"))
//Factorization 0.8.109
compileOnly(deobfModrinth("factorization:0.8.109"))
//Futurepack v18.7 //Futurepack v18.7
compileOnly(deobfCurse("futurepack-237333:2263966")) compileOnly(deobfCurse("futurepack-237333:2263966"))
//Galacticraft Core 3.0.12.504 //Galacticraft Core 3.0.12.504
//micdoodle8.com went down //micdoodle8.com went down
compileOnly(rfg.deobf("mirror.micdoodle:GalacticraftCore:1.7-3.0.12.504")) compileOnly(deobf("mirror.micdoodle:GalacticraftCore:1.7-3.0.12.504"))
//Galacticraft Planets 3.0.12.504 //Galacticraft Planets 3.0.12.504
compileOnly(rfg.deobf("mirror.micdoodle:Galacticraft-Planets:1.7-3.0.12.504")) compileOnly(deobf("mirror.micdoodle:Galacticraft-Planets:1.7-3.0.12.504"))
//Highlands 2.2.3 //Highlands 2.2.3
compileOnly(deobfCurse("highlands-221226:2227924")) compileOnly(deobfCurse("highlands-221226:2227924"))
//Immersive Cavegen 1.2g
compileOnly(deobfCurse("immersivecavegen-521557:3649411"))
//Industrial Revolution by Redstone Rebooted 1.1.1 //Industrial Revolution by Redstone Rebooted 1.1.1
compileOnly(deobfCurse("industrialrevolutionbyredstonerebooted-241812:2538035")) compileOnly(deobfCurse("industrialrevolutionbyredstonerebooted-241812:2538035"))
@@ -177,9 +193,6 @@ dependencies {
//Nostalgic World Generation 1.0.0 //Nostalgic World Generation 1.0.0
compileOnly(deobfCurse("nostalgiagenerator-927053:4816167")) compileOnly(deobfCurse("nostalgiagenerator-927053:4816167"))
//Hbm's Nuclear Tech Mod 1.0.27X5027
compileOnly(deobfCurse("hbm-ntm-235439:5534354"))
//RandomThings 2.2.4 //RandomThings 2.2.4
compileOnly(deobfCurse("randomthings-59816:2225310")) compileOnly(deobfCurse("randomthings-59816:2225310"))
@@ -192,14 +205,17 @@ dependencies {
//Thaumcraft 4.2.3.5 //Thaumcraft 4.2.3.5
compileOnly(deobfCurse("thaumcraft-223628:2227552")) compileOnly(deobfCurse("thaumcraft-223628:2227552"))
//The Mists of RioV 2.5.2
compileOnly(deobfCurse("the-mists-of-riov-222477:2389797"))
//ThutCore 2.0 //ThutCore 2.0
//Only available on dropbox //Only available on dropbox
compileOnly(rfg.deobf("mirror:thutcore:2.0")) compileOnly(deobf("mirror:thutcore:2.0"))
//Tropicraft 6.0.5 //Tropicraft 6.0.5
//This is from a mirror file, because the file on curseforge is a zip containing other files too. //This is from a mirror file, because the file on curseforge is a zip containing other files too.
//Source: https://www.curseforge.com/minecraft/mc-mods/tropicraft/files/2353906 //Source: https://www.curseforge.com/minecraft/mc-mods/tropicraft/files/2353906
compileOnly(rfg.deobf("mirror:tropicraft:6.0.5")) compileOnly(deobf("mirror:tropicraft:6.0.5"))
//Twilight Forest 2.3.8 //Twilight Forest 2.3.8
compileOnly(deobfCurse("twilightforest-227639:3039937")) compileOnly(deobfCurse("twilightforest-227639:3039937"))
@@ -213,10 +229,12 @@ dependencies {
//WorldEdit 6.1.1 //WorldEdit 6.1.1
compileOnly(deobfCurse("worldedit-225608:2309699")) compileOnly(deobfCurse("worldedit-225608:2309699"))
// endregion
////////////////Dependencies for patched mods//////////////// ////////////////Dependencies for patched mods////////////////
//SpaceCore 0.7.14 //SpaceCore 0.7.14
//needed by: Biome Wand //needed by: Biome Wand
//Source: http://spacechase0.com/files/mcmod/1.7.10-SpaceCore-0.7.14.jar //Source: http://spacechase0.com/files/mcmod/1.7.10-SpaceCore-0.7.14.jar
compileOnly(rfg.deobf("mirror:1.7.10-SpaceCore:0.7.14")) compileOnly(deobf("mirror:1.7.10-SpaceCore:0.7.14"))
} }
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-8.8-bin.zip distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.1-bin.zip
networkTimeout=10000 networkTimeout=10000
validateDistributionUrl=true validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
Vendored
+6 -4
View File
@@ -15,6 +15,8 @@
# 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
#
############################################################################## ##############################################################################
# #
@@ -84,7 +86,7 @@ done
# 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) # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
# 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
@@ -112,7 +114,7 @@ case "$( uname )" in #(
NONSTOP* ) nonstop=true ;; NONSTOP* ) nonstop=true ;;
esac esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar CLASSPATH="\\\"\\\""
# Determine the Java command to use to start the JVM. # Determine the Java command to use to start the JVM.
@@ -203,7 +205,7 @@ fi
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Collect all arguments for the java command: # Collect all arguments for the java command:
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, # * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# and any embedded shellness will be escaped. # 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 # * 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. # treated as '${Hostname}' itself on the command line.
@@ -211,7 +213,7 @@ DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
set -- \ set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \ "-Dorg.gradle.appname=$APP_BASE_NAME" \
-classpath "$CLASSPATH" \ -classpath "$CLASSPATH" \
org.gradle.wrapper.GradleWrapperMain \ -jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
"$@" "$@"
# Stop when "xargs" is not available. # Stop when "xargs" is not available.
Vendored
+4 -2
View File
@@ -13,6 +13,8 @@
@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 ##########################################################################
@@ -68,11 +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 set CLASSPATH=
@rem Execute Gradle @rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
:end :end
@rem End local scope for the variables with windows NT shell @rem End local scope for the variables with windows NT shell
+2 -28
View File
@@ -1,31 +1,5 @@
pluginManagement { plugins {
repositories { id("org.gradle.toolchains.foojay-resolver-convention") version("0.9.0")
maven {
url = uri("https://mvn.falsepattern.com/fpgradle/")
name = "fpgradle"
content {
includeModule("com.gtnewhorizons", "retrofuturagradle")
includeModule("com.falsepattern", "fpgradle-plugin")
includeModule("fpgradle-minecraft", "fpgradle-minecraft.gradle.plugin")
}
}
maven {
url = uri("https://mvn.falsepattern.com/releases/")
name = "mavenpattern"
content {
includeGroup("com.falsepattern")
}
}
maven {
url = uri("https://mvn.falsepattern.com/jitpack/")
name = "jitpack"
content {
includeModule("io.github.LegacyModdingMC.MappingGenerator", "MappingGenerator")
}
}
mavenCentral()
gradlePluginPortal()
}
} }
rootProject.name = "EndlessIDs" rootProject.name = "EndlessIDs"
@@ -43,8 +43,8 @@ import cpw.mods.fml.common.event.FMLPreInitializationEvent;
version = Tags.VERSION, version = Tags.VERSION,
name = Tags.MODNAME, name = Tags.MODNAME,
acceptedMinecraftVersions = "[1.7.10]", acceptedMinecraftVersions = "[1.7.10]",
dependencies = "required-after:chunkapi@[0.5.0,0.6.0);" + dependencies = "required-after:chunkapi@[0.6.0,);" +
"required-after:falsepatternlib@[1.4.0,);" + "required-after:falsepatternlib@[1.5.5,);" +
"after:antiidconflict") "after:antiidconflict")
public class EndlessIDs { public class EndlessIDs {
public static final byte[] ZERO_LENGTH_BIOME_ARRAY_PLACEHOLDER = new byte[0]; public static final byte[] ZERO_LENGTH_BIOME_ARRAY_PLACEHOLDER = new byte[0];
@@ -97,7 +97,13 @@ import java.util.function.Supplier;
* //state 8 * //state 8
* ILOAD k * ILOAD k
* //state 9 * //state 9
* //Branch X | Y
* //X:
* ALOAD abyte * ALOAD abyte
* //Y:
* ALOAD <something else>
* GETFIELD classname.fieldname : [Lnet/minecraft/world/biome/BiomeGenBase;
* //Join X | Y
* //state 10 * //state 10
* ARRAYLENGTH * ARRAYLENGTH
* //state 11 * //state 11
@@ -160,6 +166,7 @@ public class ChunkProviderSuperPatcher implements TurboClassTransformer {
private static State<AbstractInsnNode> STATE7 = null; private static State<AbstractInsnNode> STATE7 = null;
private static State<AbstractInsnNode> STATE8 = null; private static State<AbstractInsnNode> STATE8 = null;
private static State<AbstractInsnNode> STATE9 = null; private static State<AbstractInsnNode> STATE9 = null;
private static State<AbstractInsnNode> STATE9_Y = null;
private static State<AbstractInsnNode> STATE10 = null; private static State<AbstractInsnNode> STATE10 = null;
private static State<AbstractInsnNode> STATE11 = null; private static State<AbstractInsnNode> STATE11 = null;
private static State<AbstractInsnNode> STATE12 = null; private static State<AbstractInsnNode> STATE12 = null;
@@ -256,7 +263,10 @@ public class ChunkProviderSuperPatcher implements TurboClassTransformer {
STATE9 = casting(VarInsnNode.class, (insn, memory) -> STATE9 = casting(VarInsnNode.class, (insn, memory) ->
insn.getOpcode() == Opcodes.ALOAD insn.getOpcode() == Opcodes.ALOAD
&& insn.var == memory.biomeArrayIndex && insn.var == memory.biomeArrayIndex
? STATE10 : STATE0); ? STATE10 : STATE9_Y);
STATE9_Y = casting(FieldInsnNode.class, insn ->
insn.getOpcode() == Opcodes.GETFIELD && anyMatch(insn.desc, CLASS_BiomeGenBase, "[L", ";") ? STATE10: STATE0);
STATE10 = casting(InsnNode.class, (insn) -> insn.getOpcode() == Opcodes.ARRAYLENGTH ? STATE11 : STATE0); STATE10 = casting(InsnNode.class, (insn) -> insn.getOpcode() == Opcodes.ARRAYLENGTH ? STATE11 : STATE0);
@@ -27,13 +27,15 @@ import com.falsepattern.chunk.api.ArrayUtil;
import com.falsepattern.chunk.api.DataManager; import com.falsepattern.chunk.api.DataManager;
import com.falsepattern.endlessids.Tags; import com.falsepattern.endlessids.Tags;
import com.falsepattern.endlessids.mixin.helpers.SubChunkBlockHook; import com.falsepattern.endlessids.mixin.helpers.SubChunkBlockHook;
import com.falsepattern.endlessids.util.DataUtil;
import lombok.val; import lombok.val;
import lombok.var; import lombok.var;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable; import org.jetbrains.annotations.Nullable;
import net.minecraft.block.Block;
import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.network.PacketBuffer;
import net.minecraft.network.play.server.S23PacketBlockChange;
import net.minecraft.world.chunk.Chunk; import net.minecraft.world.chunk.Chunk;
import net.minecraft.world.chunk.NibbleArray; import net.minecraft.world.chunk.NibbleArray;
import net.minecraft.world.chunk.storage.ExtendedBlockStorage; import net.minecraft.world.chunk.storage.ExtendedBlockStorage;
@@ -44,7 +46,7 @@ import static com.falsepattern.endlessids.constants.ExtendedConstants.blocksPerS
import static com.falsepattern.endlessids.util.DataUtil.*; import static com.falsepattern.endlessids.util.DataUtil.*;
//NOTE: Also change the save logic in MapWriter mod if changing this //NOTE: Also change the save logic in MapWriter mod if changing this
public class BlockIDManager implements DataManager.PacketDataManager, DataManager.SubChunkDataManager { public class BlockIDManager implements DataManager.PacketDataManager, DataManager.SubChunkDataManager, DataManager.BlockPacketDataManager {
@Override @Override
public String domain() { public String domain() {
@@ -73,24 +75,24 @@ public class BlockIDManager implements DataManager.PacketDataManager, DataManage
} }
val subChunk = (SubChunkBlockHook) subChunkList[i]; val subChunk = (SubChunkBlockHook) subChunkList[i];
storageFlags |= subChunk.getBlockMask() << (i * 2); storageFlags |= subChunk.eid$getBlockMask() << (i * 2);
val b1 = subChunk.getB1(); val b1 = subChunk.eid$getB1();
data.put(b1); data.put(b1);
val b2Low = subChunk.getB2Low(); val b2Low = subChunk.eid$getB2Low();
if (b2Low == null) { if (b2Low == null) {
continue; continue;
} }
data.put(b2Low.data); data.put(b2Low.data);
val b2High = subChunk.getB2High(); val b2High = subChunk.eid$getB2High();
if (b2High == null) { if (b2High == null) {
continue; continue;
} }
data.put(b2High.data); data.put(b2High.data);
val b3 = subChunk.getB3(); val b3 = subChunk.eid$getB3();
if (b3 != null) { if (b3 != null) {
data.put(b3); data.put(b3);
} }
@@ -108,36 +110,36 @@ public class BlockIDManager implements DataManager.PacketDataManager, DataManage
} }
val subChunk = (SubChunkBlockHook) subChunkList[i]; val subChunk = (SubChunkBlockHook) subChunkList[i];
val storageFlag = (storageFlags >>> (i * 2)) & 3; val storageFlag = (storageFlags >>> (i * 2)) & 3;
val b1 = subChunk.getB1(); val b1 = subChunk.eid$getB1();
buffer.get(b1); buffer.get(b1);
if (storageFlag == 0b00) { if (storageFlag == 0b00) {
subChunk.setB2Low(null); subChunk.eid$setB2Low(null);
subChunk.setB2High(null); subChunk.eid$setB2High(null);
subChunk.setB3(null); subChunk.eid$setB3(null);
continue; continue;
} }
var b2Low = subChunk.getB2Low(); var b2Low = subChunk.eid$getB2Low();
if (b2Low == null) { if (b2Low == null) {
b2Low = subChunk.createB2Low(); b2Low = subChunk.eid$createB2Low();
} }
buffer.get(b2Low.data); buffer.get(b2Low.data);
if (storageFlag == 0b01) { if (storageFlag == 0b01) {
subChunk.setB2High(null); subChunk.eid$setB2High(null);
subChunk.setB3(null); subChunk.eid$setB3(null);
continue; continue;
} }
var b2High = subChunk.getB2High(); var b2High = subChunk.eid$getB2High();
if (b2High == null) { if (b2High == null) {
b2High = subChunk.createB2High(); b2High = subChunk.eid$createB2High();
} }
buffer.get(b2High.data); buffer.get(b2High.data);
if (storageFlag == 0b10) { if (storageFlag == 0b10) {
subChunk.setB3(null); subChunk.eid$setB3(null);
continue; continue;
} }
var b3 = subChunk.getB3(); var b3 = subChunk.eid$getB3();
if (b3 == null) { if (b3 == null) {
b3 = subChunk.createB3(); b3 = subChunk.eid$createB3();
} }
buffer.get(b3); buffer.get(b3);
} }
@@ -152,10 +154,10 @@ public class BlockIDManager implements DataManager.PacketDataManager, DataManage
@Override @Override
public void writeSubChunkToNBT(Chunk chunk, ExtendedBlockStorage subChunkVanilla, NBTTagCompound nbt) { public void writeSubChunkToNBT(Chunk chunk, ExtendedBlockStorage subChunkVanilla, NBTTagCompound nbt) {
val subChunk = (SubChunkBlockHook) subChunkVanilla; val subChunk = (SubChunkBlockHook) subChunkVanilla;
val b1 = subChunk.getB1(); val b1 = subChunk.eid$getB1();
val b2Low = subChunk.getB2Low(); val b2Low = subChunk.eid$getB2Low();
val b2High = subChunk.getB2High(); val b2High = subChunk.eid$getB2High();
val b3 = subChunk.getB3(); val b3 = subChunk.eid$getB3();
nbt.setByteArray("Blocks", b1); nbt.setByteArray("Blocks", b1);
if (b2Low != null) { if (b2Low != null) {
nbt.setByteArray("Add", b2Low.data); nbt.setByteArray("Add", b2Low.data);
@@ -184,9 +186,9 @@ public class BlockIDManager implements DataManager.PacketDataManager, DataManage
b2L[nI] |= (byte) (((s & 0x0F00) >>> 8) << mI); b2L[nI] |= (byte) (((s & 0x0F00) >>> 8) << mI);
b2H[nI] |= (byte) (((s & 0xF000) >>> 12) << mI); b2H[nI] |= (byte) (((s & 0xF000) >>> 12) << mI);
} }
subChunk.setB1(b1); subChunk.eid$setB1(b1);
subChunk.setB2Low(new NibbleArray(b2L, 4)); subChunk.eid$setB2Low(new NibbleArray(b2L, 4));
subChunk.setB2High(new NibbleArray(b2H, 4)); subChunk.eid$setB2High(new NibbleArray(b2H, 4));
} }
@Override @Override
@@ -202,10 +204,10 @@ public class BlockIDManager implements DataManager.PacketDataManager, DataManage
final byte[] b2High = nbt.hasKey("BlocksB2Hi") ? nbt.getByteArray("BlocksB2Hi") : null; final byte[] b2High = nbt.hasKey("BlocksB2Hi") ? nbt.getByteArray("BlocksB2Hi") : null;
final byte[] b3 = nbt.hasKey("BlocksB3") ? nbt.getByteArray("BlocksB3") : null; final byte[] b3 = nbt.hasKey("BlocksB3") ? nbt.getByteArray("BlocksB3") : null;
subChunk.setB1(ensureSubChunkByteArray(b1)); subChunk.eid$setB1(ensureSubChunkByteArray(b1));
subChunk.setB2Low(ensureSubChunkNibbleArray(b2Low)); subChunk.eid$setB2Low(ensureSubChunkNibbleArray(b2Low));
subChunk.setB2High(ensureSubChunkNibbleArray(b2High)); subChunk.eid$setB2High(ensureSubChunkNibbleArray(b2High));
subChunk.setB3(ensureSubChunkByteArray(b3)); subChunk.eid$setB3(ensureSubChunkByteArray(b3));
} }
@Override @Override
@@ -213,10 +215,10 @@ public class BlockIDManager implements DataManager.PacketDataManager, DataManage
val from = (SubChunkBlockHook) fromVanilla; val from = (SubChunkBlockHook) fromVanilla;
val to = (SubChunkBlockHook) toVanilla; val to = (SubChunkBlockHook) toVanilla;
to.setB1(ArrayUtil.copyArray(from.getB1(), to.getB1())); to.eid$setB1(ArrayUtil.copyArray(from.eid$getB1(), to.eid$getB1()));
to.setB2Low(ArrayUtil.copyArray(from.getB2Low(), to.getB2Low())); to.eid$setB2Low(ArrayUtil.copyArray(from.eid$getB2Low(), to.eid$getB2Low()));
to.setB2High(ArrayUtil.copyArray(from.getB2High(), to.getB2High())); to.eid$setB2High(ArrayUtil.copyArray(from.eid$getB2High(), to.eid$getB2High()));
to.setB3(ArrayUtil.copyArray(from.getB3(), to.getB3())); to.eid$setB3(ArrayUtil.copyArray(from.eid$getB3(), to.eid$getB3()));
} }
@Override @Override
@@ -238,4 +240,24 @@ public class BlockIDManager implements DataManager.PacketDataManager, DataManage
public @Nullable String versionChangeMessage(String priorVersion) { public @Nullable String versionChangeMessage(String priorVersion) {
return null; return null;
} }
@Override
public void writeBlockToPacket(Chunk chunk, int x, int y, int z, S23PacketBlockChange packet) {
}
@Override
public void readBlockFromPacket(Chunk chunk, int x, int y, int z, S23PacketBlockChange packet) {
}
@Override
public void writeBlockPacketToBuffer(S23PacketBlockChange packet, PacketBuffer buffer) {
buffer.writeInt(Block.getIdFromBlock(packet.field_148883_d));
}
@Override
public void readBlockPacketFromBuffer(S23PacketBlockChange packet, PacketBuffer buffer) {
packet.field_148883_d = Block.getBlockById(buffer.readInt());
}
} }
@@ -34,6 +34,8 @@ import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable; import org.jetbrains.annotations.Nullable;
import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.network.PacketBuffer;
import net.minecraft.network.play.server.S23PacketBlockChange;
import net.minecraft.world.chunk.Chunk; import net.minecraft.world.chunk.Chunk;
import net.minecraft.world.chunk.NibbleArray; import net.minecraft.world.chunk.NibbleArray;
import net.minecraft.world.chunk.storage.ExtendedBlockStorage; import net.minecraft.world.chunk.storage.ExtendedBlockStorage;
@@ -43,7 +45,7 @@ import java.nio.ByteBuffer;
import static com.falsepattern.endlessids.constants.ExtendedConstants.blocksPerSubChunk; import static com.falsepattern.endlessids.constants.ExtendedConstants.blocksPerSubChunk;
//NOTE: Also change the save logic in MapWriter mod if changing this //NOTE: Also change the save logic in MapWriter mod if changing this
public class BlockMetaManager implements DataManager.PacketDataManager, DataManager.SubChunkDataManager { public class BlockMetaManager implements DataManager.PacketDataManager, DataManager.SubChunkDataManager, DataManager.BlockPacketDataManager {
@Override @Override
public String domain() { public String domain() {
@@ -72,18 +74,18 @@ public class BlockMetaManager implements DataManager.PacketDataManager, DataMana
} }
val subChunk = (SubChunkBlockHook) subChunkList[i]; val subChunk = (SubChunkBlockHook) subChunkList[i];
storageFlags |= subChunk.getMetadataMask() << (i * 2); storageFlags |= subChunk.eid$getMetadataMask() << (i * 2);
val m1Low = subChunk.getM1Low(); val m1Low = subChunk.eid$getM1Low();
data.put(m1Low.data); data.put(m1Low.data);
val m1High = subChunk.getM1High(); val m1High = subChunk.eid$getM1High();
if (m1High == null) { if (m1High == null) {
continue; continue;
} }
data.put(m1High.data); data.put(m1High.data);
val m2 = subChunk.getM2(); val m2 = subChunk.eid$getM2();
if (m2 != null) { if (m2 != null) {
data.put(m2); data.put(m2);
} }
@@ -101,25 +103,25 @@ public class BlockMetaManager implements DataManager.PacketDataManager, DataMana
} }
val subChunk = (SubChunkBlockHook) subChunkList[i]; val subChunk = (SubChunkBlockHook) subChunkList[i];
val storageFlag = (storageFlags >>> (i * 2)) & 3; val storageFlag = (storageFlags >>> (i * 2)) & 3;
val m1Low = subChunk.getM1Low(); val m1Low = subChunk.eid$getM1Low();
buffer.get(m1Low.data); buffer.get(m1Low.data);
if (storageFlag == 0b01) { if (storageFlag == 0b01) {
subChunk.setM1High(null); subChunk.eid$setM1High(null);
subChunk.setM2(null); subChunk.eid$setM2(null);
continue; continue;
} }
var m1High = subChunk.getM1High(); var m1High = subChunk.eid$getM1High();
if (m1High == null) { if (m1High == null) {
m1High = subChunk.createM1High(); m1High = subChunk.eid$createM1High();
} }
buffer.get(m1High.data); buffer.get(m1High.data);
if (storageFlag == 0b10) { if (storageFlag == 0b10) {
subChunk.setM2(null); subChunk.eid$setM2(null);
continue; continue;
} }
var m2 = subChunk.getM2(); var m2 = subChunk.eid$getM2();
if (m2 == null) { if (m2 == null) {
m2 = subChunk.createM2(); m2 = subChunk.eid$createM2();
} }
buffer.get(m2); buffer.get(m2);
} }
@@ -133,9 +135,9 @@ public class BlockMetaManager implements DataManager.PacketDataManager, DataMana
@Override @Override
public void writeSubChunkToNBT(Chunk chunk, ExtendedBlockStorage subChunkVanilla, NBTTagCompound nbt) { public void writeSubChunkToNBT(Chunk chunk, ExtendedBlockStorage subChunkVanilla, NBTTagCompound nbt) {
val subChunk = (SubChunkBlockHook) subChunkVanilla; val subChunk = (SubChunkBlockHook) subChunkVanilla;
val m1Low = subChunk.getM1Low(); val m1Low = subChunk.eid$getM1Low();
val m1High = subChunk.getM1High(); val m1High = subChunk.eid$getM1High();
val m2 = subChunk.getM2(); val m2 = subChunk.eid$getM2();
nbt.setByteArray("Data", m1Low.data); nbt.setByteArray("Data", m1Low.data);
if (m1High != null) { if (m1High != null) {
nbt.setByteArray("Data1High", m1High.data); nbt.setByteArray("Data1High", m1High.data);
@@ -161,9 +163,9 @@ public class BlockMetaManager implements DataManager.PacketDataManager, DataMana
m1High[nI] |= (byte) (((s & 0x00F0) >>> 4) << mI); m1High[nI] |= (byte) (((s & 0x00F0) >>> 4) << mI);
m2[i] = (byte) ((s & 0xFF00) >>> 8); m2[i] = (byte) ((s & 0xFF00) >>> 8);
} }
subChunk.setM1Low(new NibbleArray(m1Low, 4)); subChunk.eid$setM1Low(new NibbleArray(m1Low, 4));
subChunk.setM1High(new NibbleArray(m1High, 4)); subChunk.eid$setM1High(new NibbleArray(m1High, 4));
subChunk.setM2(m2); subChunk.eid$setM2(m2);
} }
@Override @Override
@@ -178,9 +180,9 @@ public class BlockMetaManager implements DataManager.PacketDataManager, DataMana
final byte[] m1High = nbt.hasKey("Data1High") ? nbt.getByteArray("Data1High") : null; final byte[] m1High = nbt.hasKey("Data1High") ? nbt.getByteArray("Data1High") : null;
final byte[] m2 = nbt.hasKey("Data2") ? nbt.getByteArray("Data2") : null; final byte[] m2 = nbt.hasKey("Data2") ? nbt.getByteArray("Data2") : null;
subChunk.setM1Low(DataUtil.ensureSubChunkNibbleArray(m1Low)); subChunk.eid$setM1Low(DataUtil.ensureSubChunkNibbleArray(m1Low));
subChunk.setM1High(DataUtil.ensureSubChunkNibbleArray(m1High)); subChunk.eid$setM1High(DataUtil.ensureSubChunkNibbleArray(m1High));
subChunk.setM2(DataUtil.ensureSubChunkByteArray(m2)); subChunk.eid$setM2(DataUtil.ensureSubChunkByteArray(m2));
} }
@Override @Override
@@ -188,9 +190,9 @@ public class BlockMetaManager implements DataManager.PacketDataManager, DataMana
val from = (SubChunkBlockHook) fromVanilla; val from = (SubChunkBlockHook) fromVanilla;
val to = (SubChunkBlockHook) toVanilla; val to = (SubChunkBlockHook) toVanilla;
to.setM1Low(ArrayUtil.copyArray(from.getM1Low(), to.getM1Low())); to.eid$setM1Low(ArrayUtil.copyArray(from.eid$getM1Low(), to.eid$getM1Low()));
to.setM1High(ArrayUtil.copyArray(from.getM1High(), to.getM1High())); to.eid$setM1High(ArrayUtil.copyArray(from.eid$getM1High(), to.eid$getM1High()));
to.setM2(ArrayUtil.copyArray(from.getM2(), to.getM2())); to.eid$setM2(ArrayUtil.copyArray(from.eid$getM2(), to.eid$getM2()));
} }
@Override @Override
@@ -212,4 +214,24 @@ public class BlockMetaManager implements DataManager.PacketDataManager, DataMana
public @Nullable String versionChangeMessage(String priorVersion) { public @Nullable String versionChangeMessage(String priorVersion) {
return null; return null;
} }
@Override
public void writeBlockToPacket(Chunk chunk, int x, int y, int z, S23PacketBlockChange packet) {
}
@Override
public void readBlockFromPacket(Chunk chunk, int x, int y, int z, S23PacketBlockChange packet) {
}
@Override
public void writeBlockPacketToBuffer(S23PacketBlockChange packet, PacketBuffer buffer) {
buffer.writeShort(packet.field_148884_e & 0xFFFF);
}
@Override
public void readBlockPacketFromBuffer(S23PacketBlockChange packet, PacketBuffer buffer) {
packet.field_148884_e = buffer.readUnsignedShort();
}
} }
@@ -0,0 +1,32 @@
/*
* EndlessIDs
*
* Copyright (C) 2022-2024 FalsePattern
* All Rights Reserved
*
* The above copyright notice, this permission notice and the words "MEGA"
* shall be included in all copies or substantial portions of the Software.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.falsepattern.endlessids.mixin.helpers;
public interface IHBMBiomeSyncPacket {
void eid$setBiome(short biome);
short eid$getBiome();
void eid$setBiomeArray(short[] biomeArray);
short[] eid$getBiomeArray();
}
@@ -24,5 +24,5 @@
package com.falsepattern.endlessids.mixin.helpers; package com.falsepattern.endlessids.mixin.helpers;
public interface IS1DPacketEntityEffectMixin { public interface IS1DPacketEntityEffectMixin {
int getIDExtended(); int endlessids$getIDExtended();
} }
@@ -26,47 +26,53 @@ package com.falsepattern.endlessids.mixin.helpers;
import net.minecraft.world.chunk.NibbleArray; import net.minecraft.world.chunk.NibbleArray;
public interface SubChunkBlockHook { public interface SubChunkBlockHook {
byte[] getB1(); byte[] eid$getB1();
void setB1(byte[] data); void eid$setB1(byte[] data);
NibbleArray getB2Low(); NibbleArray eid$getB2Low();
void setB2Low(NibbleArray data); void eid$setB2Low(NibbleArray data);
NibbleArray createB2Low(); NibbleArray eid$createB2Low();
NibbleArray getB2High(); NibbleArray eid$getB2High();
void setB2High(NibbleArray data); void eid$setB2High(NibbleArray data);
NibbleArray createB2High(); NibbleArray eid$createB2High();
byte[] getB3(); byte[] eid$getB3();
void setB3(byte[] data); void eid$setB3(byte[] data);
byte[] createB3(); byte[] eid$createB3();
int getMetadataMask(); int eid$getBlockMask();
int getBlockMask(); int eid$getID(int x, int y, int z);
int getID(int x, int y, int z); void eid$setID(int x, int y, int z, int id);
NibbleArray getM1Low(); NibbleArray eid$getM1Low();
void setM1Low(NibbleArray m1Low); void eid$setM1Low(NibbleArray m1Low);
NibbleArray getM1High(); NibbleArray eid$getM1High();
void setM1High(NibbleArray m1High); void eid$setM1High(NibbleArray m1High);
NibbleArray createM1High(); NibbleArray eid$createM1High();
byte[] getM2(); byte[] eid$getM2();
void setM2(byte[] m2); void eid$setM2(byte[] m2);
byte[] createM2(); byte[] eid$createM2();
int eid$getMetadataMask();
int eid$getMetadata(int x, int y, int z);
void eid$setMetadata(int x, int y, int z, int id);
} }
@@ -31,6 +31,8 @@ import org.spongepowered.asm.mixin.Overwrite;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.biome.BiomeGenBase; import net.minecraft.world.biome.BiomeGenBase;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
@Mixin(value = BiomeWandItem.class, @Mixin(value = BiomeWandItem.class,
remap = false) remap = false)
@@ -39,6 +41,7 @@ public abstract class BiomeWandItemMixin {
* @author FalsePattern * @author FalsePattern
* @reason Biome ID extension * @reason Biome ID extension
*/ */
@SideOnly(Side.CLIENT)
@Overwrite @Overwrite
public int getColorFromItemStack(ItemStack stack, int pass) { public int getColorFromItemStack(ItemStack stack, int pass) {
NBTTagCompound tag = stack.getTagCompound(); NBTTagCompound tag = stack.getTagCompound();
@@ -47,7 +47,7 @@ public abstract class NetHandlerPlayClientMixin {
at = @At("HEAD"), at = @At("HEAD"),
require = 1) require = 1)
private void grabID(S1DPacketEntityEffect packetIn, CallbackInfo ci) { private void grabID(S1DPacketEntityEffect packetIn, CallbackInfo ci) {
theID = ((IS1DPacketEntityEffectMixin) packetIn).getIDExtended(); theID = ((IS1DPacketEntityEffectMixin) packetIn).endlessids$getIDExtended();
} }
@Redirect(method = "handleEntityEffect", @Redirect(method = "handleEntityEffect",
@@ -78,9 +78,14 @@ public abstract class BiomesManagerMixin {
return ExtendedConstants.biomeIDCount; return ExtendedConstants.biomeIDCount;
} }
@ModifyConstant(method = {"preinit", "setUpBiomesFolder"}, @ModifyConstant(method = "preinit",
constant = {@Constant(stringValue = "\\biomes"), @Constant(stringValue = "\\main.cfg")}) constant = @Constant(stringValue = "\\biomes"))
private static String fixPaths(String original) { private static String fixPaths1(String original) {
return AIDCStringFixer.fixString(original);
}
@ModifyConstant(method = "setUpBiomesFolder",
constant = @Constant(stringValue = "\\main.cfg"))
private static String fixPaths2(String original) {
return AIDCStringFixer.fixString(original); return AIDCStringFixer.fixString(original);
} }
@@ -43,14 +43,14 @@ public abstract class AdvancedRocketryMixin {
@Constant(intValue = 118, ordinal = 0), @Constant(intValue = 118, ordinal = 0),
@Constant(intValue = 119, ordinal = 0)}, @Constant(intValue = 119, ordinal = 0)},
require = 10) require = 10)
private static int shiftBiomeIDsUp(int constant) { private int shiftBiomeIDsUp(int constant) {
return constant + 9000; return constant + 9000;
} }
@ModifyConstant(method = "preInit", @ModifyConstant(method = "preInit",
constant = @Constant(intValue = -2), constant = @Constant(intValue = -2),
require = 1) require = 1)
private static int changeDefaultDimID(int constant) { private int changeDefaultDimID(int constant) {
return -5613; return -5613;
} }
} }
@@ -0,0 +1,42 @@
/*
* EndlessIDs
*
* Copyright (C) 2022-2024 FalsePattern
* All Rights Reserved
*
* The above copyright notice, this permission notice and the words "MEGA"
* shall be included in all copies or substantial portions of the Software.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.falsepattern.endlessids.mixin.mixins.common.biome.climatecontrol.api;
import climateControl.api.BiomeSettings;
import com.falsepattern.endlessids.constants.ExtendedConstants;
import com.falsepattern.endlessids.constants.VanillaConstants;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.Constant;
import org.spongepowered.asm.mixin.injection.ModifyConstant;
@Mixin(BiomeSettings.class)
public abstract class BiomeSettingsMixin {
@ModifyConstant(method = "nameDefaultClimates",
remap = false,
constant = @Constant(intValue = VanillaConstants.biomeIDMask),
require = 1)
private int extendBiomes(int constant) {
return ExtendedConstants.biomeIDMask;
}
}
@@ -0,0 +1,42 @@
/*
* EndlessIDs
*
* Copyright (C) 2022-2024 FalsePattern
* All Rights Reserved
*
* The above copyright notice, this permission notice and the words "MEGA"
* shall be included in all copies or substantial portions of the Software.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.falsepattern.endlessids.mixin.mixins.common.biome.climatecontrol.api;
import climateControl.api.ClimateControlRules;
import com.falsepattern.endlessids.constants.ExtendedConstants;
import com.falsepattern.endlessids.constants.VanillaConstants;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.Constant;
import org.spongepowered.asm.mixin.injection.ModifyConstant;
@Mixin(ClimateControlRules.class)
public abstract class ClimateControlRulesMixin {
@ModifyConstant(method = "<init>",
remap = false,
constant = @Constant(intValue = VanillaConstants.biomeIDCount),
require = 4)
private int extendBiomes(int constant) {
return ExtendedConstants.biomeIDCount;
}
}
@@ -0,0 +1,41 @@
/*
* EndlessIDs
*
* Copyright (C) 2022-2024 FalsePattern
* All Rights Reserved
*
* The above copyright notice, this permission notice and the words "MEGA"
* shall be included in all copies or substantial portions of the Software.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.falsepattern.endlessids.mixin.mixins.common.biome.climatecontrol.customGenLayer;
import climateControl.customGenLayer.ConfirmBiome;
import com.falsepattern.endlessids.constants.ExtendedConstants;
import com.falsepattern.endlessids.constants.VanillaConstants;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.Constant;
import org.spongepowered.asm.mixin.injection.ModifyConstant;
@Mixin(ConfirmBiome.class)
public abstract class ConfirmBiomeMixin {
@ModifyConstant(method = "getInts",
constant = @Constant(intValue = VanillaConstants.biomeIDMask),
require = 1)
private int extendBiomes(int constant) {
return ExtendedConstants.biomeIDMask;
}
}
@@ -0,0 +1,47 @@
/*
* EndlessIDs
*
* Copyright (C) 2022-2024 FalsePattern
* All Rights Reserved
*
* The above copyright notice, this permission notice and the words "MEGA"
* shall be included in all copies or substantial portions of the Software.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.falsepattern.endlessids.mixin.mixins.common.biome.climatecontrol.customGenLayer;
import climateControl.customGenLayer.GenLayerBiomeByClimate;
import com.falsepattern.endlessids.constants.ExtendedConstants;
import com.falsepattern.endlessids.constants.VanillaConstants;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.Constant;
import org.spongepowered.asm.mixin.injection.ModifyConstant;
@Mixin(GenLayerBiomeByClimate.class)
public abstract class GenLayerBiomeByClimateMixin {
@ModifyConstant(method = "getInts",
constant = @Constant(intValue = VanillaConstants.biomeIDCount),
require = 1)
private int extendBiomes1(int constant) {
return ExtendedConstants.biomeIDCount;
}
@ModifyConstant(method = "getInts",
constant = @Constant(intValue = VanillaConstants.biomeIDMask),
require = 1)
private int extendBiomes2(int constant) {
return ExtendedConstants.biomeIDMask;
}
}
@@ -0,0 +1,41 @@
/*
* EndlessIDs
*
* Copyright (C) 2022-2024 FalsePattern
* All Rights Reserved
*
* The above copyright notice, this permission notice and the words "MEGA"
* shall be included in all copies or substantial portions of the Software.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.falsepattern.endlessids.mixin.mixins.common.biome.climatecontrol.customGenLayer;
import climateControl.customGenLayer.GenLayerBiomeByTaggedClimate;
import com.falsepattern.endlessids.constants.ExtendedConstants;
import com.falsepattern.endlessids.constants.VanillaConstants;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.Constant;
import org.spongepowered.asm.mixin.injection.ModifyConstant;
@Mixin(GenLayerBiomeByTaggedClimate.class)
public abstract class GenLayerBiomeByTaggedClimateMixin {
@ModifyConstant(method = "getInts",
constant = @Constant(intValue = VanillaConstants.biomeIDMask),
require = 1)
private int extendBiomes(int constant) {
return ExtendedConstants.biomeIDMask;
}
}
@@ -0,0 +1,41 @@
/*
* EndlessIDs
*
* Copyright (C) 2022-2024 FalsePattern
* All Rights Reserved
*
* The above copyright notice, this permission notice and the words "MEGA"
* shall be included in all copies or substantial portions of the Software.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.falsepattern.endlessids.mixin.mixins.common.biome.climatecontrol.customGenLayer;
import climateControl.customGenLayer.GenLayerDefineClimate;
import com.falsepattern.endlessids.constants.ExtendedConstants;
import com.falsepattern.endlessids.constants.VanillaConstants;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.Constant;
import org.spongepowered.asm.mixin.injection.ModifyConstant;
@Mixin(GenLayerDefineClimate.class)
public abstract class GenLayerDefineClimateMixin {
@ModifyConstant(method = "getInts",
constant = @Constant(intValue = VanillaConstants.biomeIDMask),
require = 1)
private int extendBiomes(int constant) {
return ExtendedConstants.biomeIDMask;
}
}
@@ -0,0 +1,41 @@
/*
* EndlessIDs
*
* Copyright (C) 2022-2024 FalsePattern
* All Rights Reserved
*
* The above copyright notice, this permission notice and the words "MEGA"
* shall be included in all copies or substantial portions of the Software.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.falsepattern.endlessids.mixin.mixins.common.biome.climatecontrol.customGenLayer;
import climateControl.customGenLayer.GenLayerLowlandRiverMix;
import com.falsepattern.endlessids.constants.ExtendedConstants;
import com.falsepattern.endlessids.constants.VanillaConstants;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.Constant;
import org.spongepowered.asm.mixin.injection.ModifyConstant;
@Mixin(GenLayerLowlandRiverMix.class)
public abstract class GenLayerLowlandRiverMixMixin {
@ModifyConstant(method = "getInts",
constant = @Constant(intValue = VanillaConstants.biomeIDMask),
require = 3)
private int extendBiomes(int constant) {
return ExtendedConstants.biomeIDMask;
}
}
@@ -0,0 +1,41 @@
/*
* EndlessIDs
*
* Copyright (C) 2022-2024 FalsePattern
* All Rights Reserved
*
* The above copyright notice, this permission notice and the words "MEGA"
* shall be included in all copies or substantial portions of the Software.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.falsepattern.endlessids.mixin.mixins.common.biome.climatecontrol.customGenLayer;
import climateControl.customGenLayer.GenLayerSmoothCoast;
import com.falsepattern.endlessids.constants.ExtendedConstants;
import com.falsepattern.endlessids.constants.VanillaConstants;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.Constant;
import org.spongepowered.asm.mixin.injection.ModifyConstant;
@Mixin(GenLayerSmoothCoast.class)
public abstract class GenLayerSmoothCoastMixin {
@ModifyConstant(method = "getInts",
constant = @Constant(intValue = VanillaConstants.biomeIDCount),
require = 1)
private int extendBiomes(int constant) {
return ExtendedConstants.biomeIDCount;
}
}
@@ -0,0 +1,47 @@
/*
* EndlessIDs
*
* Copyright (C) 2022-2024 FalsePattern
* All Rights Reserved
*
* The above copyright notice, this permission notice and the words "MEGA"
* shall be included in all copies or substantial portions of the Software.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.falsepattern.endlessids.mixin.mixins.common.biome.climatecontrol.customGenLayer;
import climateControl.customGenLayer.GenLayerSubBiome;
import com.falsepattern.endlessids.constants.ExtendedConstants;
import com.falsepattern.endlessids.constants.VanillaConstants;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.Constant;
import org.spongepowered.asm.mixin.injection.ModifyConstant;
@Mixin(GenLayerSubBiome.class)
public abstract class GenLayerSubBiomeMixin {
@ModifyConstant(method = "getInts",
constant = @Constant(intValue = VanillaConstants.biomeIDCount),
require = 1)
private int extendBiomes1(int constant) {
return ExtendedConstants.biomeIDCount;
}
@ModifyConstant(method = "getInts",
constant = @Constant(intValue = 128),
require = 1)
private int extendBiomes2(int constant) {
return ExtendedConstants.biomeIDCount - 128;
}
}
@@ -0,0 +1,48 @@
/*
* EndlessIDs
*
* Copyright (C) 2022-2024 FalsePattern
* All Rights Reserved
*
* The above copyright notice, this permission notice and the words "MEGA"
* shall be included in all copies or substantial portions of the Software.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.falsepattern.endlessids.mixin.mixins.common.biome.climatecontrol.genLayerPack;
import climateControl.genLayerPack.GenLayerHills;
import com.falsepattern.endlessids.constants.ExtendedConstants;
import com.falsepattern.endlessids.constants.VanillaConstants;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.Constant;
import org.spongepowered.asm.mixin.injection.ModifyConstant;
@Mixin(GenLayerHills.class)
public abstract class GenLayerHillsMixin {
@ModifyConstant(method = "getInts",
constant = @Constant(intValue = VanillaConstants.biomeIDMask),
require = 1)
private int extendBiomes1(int constant) {
return ExtendedConstants.biomeIDMask;
}
@ModifyConstant(method = "getInts",
constant = @Constant(intValue = 128,
ordinal = 0),
require = 1)
private int extendBiomes2(int constant) {
return ExtendedConstants.biomeIDCount - 128;
}
}
@@ -0,0 +1,42 @@
/*
* EndlessIDs
*
* Copyright (C) 2022-2024 FalsePattern
* All Rights Reserved
*
* The above copyright notice, this permission notice and the words "MEGA"
* shall be included in all copies or substantial portions of the Software.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.falsepattern.endlessids.mixin.mixins.common.biome.climatecontrol.genLayerPack;
import climateControl.genLayerPack.GenLayerPack;
import com.falsepattern.endlessids.constants.ExtendedConstants;
import com.falsepattern.endlessids.constants.VanillaConstants;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.Constant;
import org.spongepowered.asm.mixin.injection.ModifyConstant;
@Mixin(GenLayerPack.class)
public abstract class GenLayerPackMixin {
@ModifyConstant(method = {"isBiomeOceanic", "isOceanic"},
remap = false,
constant = @Constant(intValue = VanillaConstants.biomeIDMask),
require = 2)
private static int extendBiomes(int constant) {
return ExtendedConstants.biomeIDMask;
}
}
@@ -0,0 +1,41 @@
/*
* EndlessIDs
*
* Copyright (C) 2022-2024 FalsePattern
* All Rights Reserved
*
* The above copyright notice, this permission notice and the words "MEGA"
* shall be included in all copies or substantial portions of the Software.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.falsepattern.endlessids.mixin.mixins.common.biome.climatecontrol.genLayerPack;
import climateControl.genLayerPack.GenLayerSmooth;
import com.falsepattern.endlessids.constants.ExtendedConstants;
import com.falsepattern.endlessids.constants.VanillaConstants;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.Constant;
import org.spongepowered.asm.mixin.injection.ModifyConstant;
@Mixin(GenLayerSmooth.class)
public abstract class GenLayerSmoothMixin {
@ModifyConstant(method = "getInts",
constant = @Constant(intValue = VanillaConstants.biomeIDMask),
require = 2)
private int extendBiomes(int constant) {
return ExtendedConstants.biomeIDMask;
}
}
@@ -0,0 +1,41 @@
/*
* EndlessIDs
*
* Copyright (C) 2022-2024 FalsePattern
* All Rights Reserved
*
* The above copyright notice, this permission notice and the words "MEGA"
* shall be included in all copies or substantial portions of the Software.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.falsepattern.endlessids.mixin.mixins.common.biome.climatecontrol.genLayerPack;
import climateControl.genLayerPack.GenLayerVoronoiZoom;
import com.falsepattern.endlessids.constants.ExtendedConstants;
import com.falsepattern.endlessids.constants.VanillaConstants;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.Constant;
import org.spongepowered.asm.mixin.injection.ModifyConstant;
@Mixin(GenLayerVoronoiZoom.class)
public abstract class GenLayerVoronoiZoomMixin {
@ModifyConstant(method = "getInts",
constant = @Constant(intValue = VanillaConstants.biomeIDMask),
require = 2)
private int extendBiomes(int constant) {
return ExtendedConstants.biomeIDMask;
}
}
@@ -0,0 +1,41 @@
/*
* EndlessIDs
*
* Copyright (C) 2022-2024 FalsePattern
* All Rights Reserved
*
* The above copyright notice, this permission notice and the words "MEGA"
* shall be included in all copies or substantial portions of the Software.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.falsepattern.endlessids.mixin.mixins.common.biome.climatecontrol.genLayerPack;
import climateControl.genLayerPack.GenLayerZoom;
import com.falsepattern.endlessids.constants.ExtendedConstants;
import com.falsepattern.endlessids.constants.VanillaConstants;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.Constant;
import org.spongepowered.asm.mixin.injection.ModifyConstant;
@Mixin(GenLayerZoom.class)
public abstract class GenLayerZoomMixin {
@ModifyConstant(method = "getInts",
constant = @Constant(intValue = VanillaConstants.biomeIDCount),
require = 6)
private int extendBiomes(int constant) {
return ExtendedConstants.biomeIDCount;
}
}
@@ -0,0 +1,42 @@
/*
* EndlessIDs
*
* Copyright (C) 2022-2024 FalsePattern
* All Rights Reserved
*
* The above copyright notice, this permission notice and the words "MEGA"
* shall be included in all copies or substantial portions of the Software.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.falsepattern.endlessids.mixin.mixins.common.biome.climatecontrol.generator;
import climateControl.generator.AbstractWorldGenerator;
import com.falsepattern.endlessids.constants.ExtendedConstants;
import com.falsepattern.endlessids.constants.VanillaConstants;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.Constant;
import org.spongepowered.asm.mixin.injection.ModifyConstant;
@Mixin(AbstractWorldGenerator.class)
public abstract class AbstractWorldGeneratorMixin {
@ModifyConstant(method = "setRules",
remap = false,
constant = @Constant(intValue = VanillaConstants.biomeIDCount),
require = 1)
private int extendBiomes(int constant) {
return ExtendedConstants.biomeIDCount;
}
}
@@ -0,0 +1,42 @@
/*
* EndlessIDs
*
* Copyright (C) 2022-2024 FalsePattern
* All Rights Reserved
*
* The above copyright notice, this permission notice and the words "MEGA"
* shall be included in all copies or substantial portions of the Software.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.falsepattern.endlessids.mixin.mixins.common.biome.climatecontrol.generator;
import climateControl.generator.BiomeSwapper;
import com.falsepattern.endlessids.constants.ExtendedConstants;
import com.falsepattern.endlessids.constants.VanillaConstants;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.Constant;
import org.spongepowered.asm.mixin.injection.ModifyConstant;
@Mixin(BiomeSwapper.class)
public abstract class BiomeSwapperMixin {
@ModifyConstant(method = "<init>",
remap = false,
constant = @Constant(intValue = VanillaConstants.biomeIDCount),
require = 2)
private int extendBiomes(int constant) {
return ExtendedConstants.biomeIDCount;
}
}
@@ -0,0 +1,42 @@
/*
* EndlessIDs
*
* Copyright (C) 2022-2024 FalsePattern
* All Rights Reserved
*
* The above copyright notice, this permission notice and the words "MEGA"
* shall be included in all copies or substantial portions of the Software.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.falsepattern.endlessids.mixin.mixins.common.biome.climatecontrol.generator;
import climateControl.generator.SubBiomeChooser;
import com.falsepattern.endlessids.constants.ExtendedConstants;
import com.falsepattern.endlessids.constants.VanillaConstants;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.Constant;
import org.spongepowered.asm.mixin.injection.ModifyConstant;
@Mixin(SubBiomeChooser.class)
public abstract class SubBiomeChooserMixin {
@ModifyConstant(method = "<init>",
remap = false,
constant = @Constant(intValue = VanillaConstants.biomeIDCount),
require = 1)
private int extendBiomes(int constant) {
return ExtendedConstants.biomeIDCount;
}
}
@@ -0,0 +1,47 @@
/*
* EndlessIDs
*
* Copyright (C) 2022-2024 FalsePattern
* All Rights Reserved
*
* The above copyright notice, this permission notice and the words "MEGA"
* shall be included in all copies or substantial portions of the Software.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.falsepattern.endlessids.mixin.mixins.common.biome.extendedplanets;
import ExtendedPlanets.dimension.other.ChunkProviderOcean;
import com.falsepattern.endlessids.mixin.helpers.BiomePatchHelper;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Redirect;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.chunk.Chunk;
@Mixin(ChunkProviderOcean.class)
public abstract class ChunkProviderOceanMixin {
@Shadow(remap = false) private BiomeGenBase[] biomesForGeneration;
@Redirect(method = "provideChunk",
at = @At(value = "INVOKE",
target = "Lnet/minecraft/world/chunk/Chunk;getBiomeArray()[B"),
require = 1)
private byte[] setBiomesTweaked(Chunk instance) {
return BiomePatchHelper.getBiomeArrayTweaked(instance, biomesForGeneration);
}
}
@@ -0,0 +1,44 @@
/*
* EndlessIDs
*
* Copyright (C) 2022-2024 FalsePattern
* All Rights Reserved
*
* The above copyright notice, this permission notice and the words "MEGA"
* shall be included in all copies or substantial portions of the Software.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.falsepattern.endlessids.mixin.mixins.common.biome.factorization;
import com.falsepattern.endlessids.mixin.helpers.BiomePatchHelper;
import factorization.fzds.HammerChunkProvider;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Redirect;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.chunk.Chunk;
@Mixin(HammerChunkProvider.class)
public abstract class HammerChunkProviderMixin {
@Redirect(method = "provideChunk",
at = @At(value = "INVOKE",
target = "Lnet/minecraft/world/chunk/Chunk;getBiomeArray()[B"),
require = 1)
private byte[] setBiomesTweaked(Chunk instance) {
return BiomePatchHelper.getBiomeArrayTweaked(instance, i -> BiomeGenBase.plains);
}
}
@@ -48,19 +48,19 @@ import java.util.Random;
public abstract class MessagePaintBiomeMixin { public abstract class MessagePaintBiomeMixin {
@Shadow @Shadow
private int posZ; int posZ;
@Shadow @Shadow
private int posX; int posX;
@Shadow @Shadow
private int biomeID; int biomeID;
@Shadow @Shadow
private int dimensionID; int dimensionID;
@Shadow @Shadow
private int posY; int posY;
/** /**
* @author FalsePattern * @author FalsePattern
@@ -23,16 +23,31 @@
package com.falsepattern.endlessids.mixin.mixins.common.biome.rtg; package com.falsepattern.endlessids.mixin.mixins.common.biome.rtg;
import com.falsepattern.endlessids.constants.ExtendedConstants;
import com.falsepattern.endlessids.constants.VanillaConstants;
import com.falsepattern.endlessids.mixin.helpers.BiomePatchHelper; import com.falsepattern.endlessids.mixin.helpers.BiomePatchHelper;
import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow; import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Constant;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.ModifyConstant;
import org.spongepowered.asm.mixin.injection.Redirect; import org.spongepowered.asm.mixin.injection.Redirect;
import org.spongepowered.asm.mixin.injection.Slice;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import rtg.util.CellNoise;
import rtg.util.OpenSimplexNoise;
import rtg.world.biome.RTGBiomeProvider;
import rtg.world.biome.realistic.RealisticBiomeBase;
import rtg.world.gen.ChunkProviderRTG; import rtg.world.gen.ChunkProviderRTG;
import net.minecraft.block.Block;
import net.minecraft.world.World;
import net.minecraft.world.biome.BiomeGenBase; import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.chunk.Chunk; import net.minecraft.world.chunk.Chunk;
import java.util.Random;
@Mixin(value = ChunkProviderRTG.class, @Mixin(value = ChunkProviderRTG.class,
remap = false) remap = false)
public abstract class ChunkProviderRTGMixin { public abstract class ChunkProviderRTGMixin {
@@ -42,6 +57,20 @@ public abstract class ChunkProviderRTGMixin {
@Shadow @Shadow
private int[] xyinverted; private int[] xyinverted;
@Shadow private long worldSeed;
@Shadow private World worldObj;
@Shadow protected RTGBiomeProvider cmr;
@Shadow private Random mapRand;
@Shadow private OpenSimplexNoise simplex;
@Shadow private CellNoise cell;
@Shadow private float[] borderNoise;
@Redirect(method = "provideChunk", @Redirect(method = "provideChunk",
at = @At(value = "INVOKE", at = @At(value = "INVOKE",
target = "Lnet/minecraft/world/chunk/Chunk;getBiomeArray()[B", target = "Lnet/minecraft/world/chunk/Chunk;getBiomeArray()[B",
@@ -61,4 +90,51 @@ public abstract class ChunkProviderRTGMixin {
private void removeUnnecessarySet(Chunk chunk, byte[] bytes) { private void removeUnnecessarySet(Chunk chunk, byte[] bytes) {
} }
@ModifyConstant(method = "provideChunk",
constant = @Constant(intValue = 256,
ordinal = 0),
slice = @Slice(from = @At(value = "INVOKE",
target = "Lrtg/world/gen/ChunkProviderRTG;generateTerrain(Lrtg/world/biome/RTGBiomeProvider;II[Lnet/minecraft/block/Block;[B[Lrtg/world/biome/realistic/RealisticBiomeBase;[F)V",
shift = At.Shift.AFTER)),
require = 1)
private int noDefaultLoop(int constant) {
return 0;
}
@Redirect(method = "provideChunk",
at = @At(value = "INVOKE",
target = "Lrtg/world/gen/ChunkProviderRTG;generateTerrain(Lrtg/world/biome/RTGBiomeProvider;II[Lnet/minecraft/block/Block;[B[Lrtg/world/biome/realistic/RealisticBiomeBase;[F)V"),
require = 1)
private void injectTheFunny(ChunkProviderRTG instance,
RTGBiomeProvider cmr,
int cx,
int cy,
Block[] blocks,
byte[] metadata,
RealisticBiomeBase[] biomes,
float[] noise) {
instance.generateTerrain(cmr, cx, cy, blocks, metadata, biomes, noise);
for (int ci = 0; ci < 256; ci++) {
int biomeID = biomes[ci].baseBiome.biomeID;
RealisticBiomeBase.getBiome(biomeID).generateMapGen(blocks, metadata, worldSeed, worldObj, cmr, mapRand, cx, cy, simplex, cell, noise);
}
}
@Inject(method = "<init>",
at = @At(value = "RETURN"),
require = 1)
private void extendBorderNoise(World world, long l, CallbackInfo ci) {
this.borderNoise = new float[ExtendedConstants.biomeIDCount];
}
@ModifyConstant(method = "doPopulate",
constant = @Constant(intValue = VanillaConstants.biomeIDCount,
ordinal = 0),
slice = @Slice(from = @At(value = "INVOKE",
target = "Lrtg/world/biome/realistic/RealisticBiomeBase;rDecorateClay(Lnet/minecraft/world/World;Ljava/util/Random;IIFII)V")),
require = 1)
private int allBorderNoise(int constant) {
return ExtendedConstants.biomeIDCount;
}
} }
@@ -0,0 +1,41 @@
/*
* EndlessIDs
*
* Copyright (C) 2022-2024 FalsePattern
* All Rights Reserved
*
* The above copyright notice, this permission notice and the words "MEGA"
* shall be included in all copies or substantial portions of the Software.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.falsepattern.endlessids.mixin.mixins.common.biome.rtg;
import com.falsepattern.endlessids.constants.ExtendedConstants;
import com.falsepattern.endlessids.constants.VanillaConstants;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.Constant;
import org.spongepowered.asm.mixin.injection.ModifyConstant;
import rtg.world.biome.WorldChunkManagerRTG;
@Mixin(WorldChunkManagerRTG.class)
public abstract class WorldChunkManagerRTGMixin {
@ModifyConstant(method = "getRainfall",
constant = @Constant(intValue = VanillaConstants.biomeIDMask),
require = 2)
private int extendBiomes(int constant) {
return ExtendedConstants.biomeIDMask;
}
}
@@ -0,0 +1,47 @@
/*
* EndlessIDs
*
* Copyright (C) 2022-2024 FalsePattern
* All Rights Reserved
*
* The above copyright notice, this permission notice and the words "MEGA"
* shall be included in all copies or substantial portions of the Software.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.falsepattern.endlessids.mixin.mixins.common.biome.tmor;
import com.falsepattern.endlessids.mixin.helpers.BiomePatchHelper;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Redirect;
import sheenrox82.RioV.src.world.chunk.ChunkProviderSanctuatite;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.chunk.Chunk;
@Mixin(ChunkProviderSanctuatite.class)
public abstract class ChunkProviderSanctuatiteMixin {
@Shadow(remap = false) private BiomeGenBase[] biomesForGeneration;
@Redirect(method = "provideChunk",
at = @At(value = "INVOKE",
target = "Lnet/minecraft/world/chunk/Chunk;getBiomeArray()[B"),
require = 1)
private byte[] setBiomesTweaked(Chunk instance) {
return BiomePatchHelper.getBiomeArrayTweaked(instance, biomesForGeneration);
}
}
@@ -38,6 +38,6 @@ public abstract class ChunkRadiationHandlerPRISMMixin {
target = "Lnet/minecraft/world/chunk/storage/ExtendedBlockStorage;getBlockLSBArray()[B"), target = "Lnet/minecraft/world/chunk/storage/ExtendedBlockStorage;getBlockLSBArray()[B"),
require = 1) require = 1)
private byte[] extendLSBArray(ExtendedBlockStorage instance) { private byte[] extendLSBArray(ExtendedBlockStorage instance) {
return ((SubChunkBlockHook)instance).getB1(); return ((SubChunkBlockHook)instance).eid$getB1();
} }
} }
@@ -38,6 +38,6 @@ public abstract class ChunkRadiationHandlerPRISM_SubChunkMixin {
target = "Lnet/minecraft/world/chunk/storage/ExtendedBlockStorage;getBlockLSBArray()[B"), target = "Lnet/minecraft/world/chunk/storage/ExtendedBlockStorage;getBlockLSBArray()[B"),
require = 1) require = 1)
private byte[] extendLSBArray(ExtendedBlockStorage instance) { private byte[] extendLSBArray(ExtendedBlockStorage instance) {
return ((SubChunkBlockHook)instance).getB1(); return ((SubChunkBlockHook)instance).eid$getB1();
} }
} }
@@ -50,7 +50,7 @@ public abstract class BiomeUndergroundDecoratorMixin {
private byte[] returnLSB(ExtendedBlockStorage subChunkVanilla) { private byte[] returnLSB(ExtendedBlockStorage subChunkVanilla) {
SubChunkBlockHook subChunk = (SubChunkBlockHook) subChunkVanilla; SubChunkBlockHook subChunk = (SubChunkBlockHook) subChunkVanilla;
this.subChunk = subChunk; this.subChunk = subChunk;
return subChunk.getB1(); return subChunk.eid$getB1();
} }
@Redirect(method = {"replaceChunkOres(IILnet/minecraft/world/World;)V", @Redirect(method = {"replaceChunkOres(IILnet/minecraft/world/World;)V",
@@ -70,7 +70,7 @@ public abstract class BiomeUndergroundDecoratorMixin {
remap = true), remap = true),
require = 2) require = 2)
private int returnRestOfID(NibbleArray instance, int x, int y, int z) { private int returnRestOfID(NibbleArray instance, int x, int y, int z) {
val id = subChunk.getID(x, y, z) >>> 8; val id = subChunk.eid$getID(x, y, z) >>> 8;
subChunk = null; subChunk = null;
return id; return id;
} }
@@ -65,7 +65,7 @@ public abstract class ExtendedBlockStorageMixin implements SubChunkBlockHook {
private NibbleArray m1High; private NibbleArray m1High;
private byte[] m2; private byte[] m2;
public int getID(int x, int y, int z) { public int eid$getID(int x, int y, int z) {
int index = y << 8 | z << 4 | x; int index = y << 8 | z << 4 | x;
int id = blockLSBArray[index] & 0xFF; int id = blockLSBArray[index] & 0xFF;
if (blockMSBArray != null) { if (blockMSBArray != null) {
@@ -80,19 +80,19 @@ public abstract class ExtendedBlockStorageMixin implements SubChunkBlockHook {
return id; return id;
} }
private void setID(int x, int y, int z, int id) { public void eid$setID(int x, int y, int z, int id) {
int index = y << 8 | z << 4 | x; int index = y << 8 | z << 4 | x;
blockLSBArray[index] = (byte) (id & 0xFF); blockLSBArray[index] = (byte) (id & 0xFF);
if (id > 0xFF) { if (id > 0xFF) {
if (blockMSBArray == null) { if (blockMSBArray == null) {
createB2Low(); eid$createB2Low();
} }
if (id > 0xFFF) { if (id > 0xFFF) {
if (b2High == null) { if (b2High == null) {
createB2High(); eid$createB2High();
} }
if (id > 0xFFFF && b3 == null) { if (id > 0xFFFF && b3 == null) {
createB3(); eid$createB3();
} }
} }
} }
@@ -113,7 +113,7 @@ public abstract class ExtendedBlockStorageMixin implements SubChunkBlockHook {
*/ */
@Overwrite @Overwrite
public Block getBlockByExtId(int x, int y, int z) { public Block getBlockByExtId(int x, int y, int z) {
return Block.getBlockById(getID(x, y, z)); return Block.getBlockById(eid$getID(x, y, z));
} }
/** /**
@@ -138,7 +138,7 @@ public abstract class ExtendedBlockStorageMixin implements SubChunkBlockHook {
} }
int blockID = Hooks.getIdFromBlockWithCheck(newBlock, oldBlock); int blockID = Hooks.getIdFromBlockWithCheck(newBlock, oldBlock);
setID(x, y, z, blockID); eid$setID(x, y, z, blockID);
} }
/** /**
@@ -166,10 +166,10 @@ public abstract class ExtendedBlockStorageMixin implements SubChunkBlockHook {
blockMetadataArray.set(x, y, z, meta & 0xF); blockMetadataArray.set(x, y, z, meta & 0xF);
if (meta > 0xF) { if (meta > 0xF) {
if (m1High == null) { if (m1High == null) {
createM1High(); eid$createM1High();
} }
if (meta > 0xFF && m2 == null) { if (meta > 0xFF && m2 == null) {
createM2(); eid$createM2();
} }
} }
if (m1High != null) { if (m1High != null) {
@@ -180,6 +180,16 @@ public abstract class ExtendedBlockStorageMixin implements SubChunkBlockHook {
} }
} }
@Override
public int eid$getMetadata(int x, int y, int z) {
return getExtBlockMetadata(x, y, z);
}
@Override
public void eid$setMetadata(int x, int y, int z, int id) {
setExtBlockMetadata(x, y, z, id);
}
@Redirect(method = "removeInvalidBlocks", @Redirect(method = "removeInvalidBlocks",
at = @At(value = "INVOKE", at = @At(value = "INVOKE",
target = "Lnet/minecraft/world/chunk/storage/ExtendedBlockStorage;getBlockByExtId(III)Lnet/minecraft/block/Block;"), target = "Lnet/minecraft/world/chunk/storage/ExtendedBlockStorage;getBlockByExtId(III)Lnet/minecraft/block/Block;"),
@@ -202,102 +212,102 @@ public abstract class ExtendedBlockStorageMixin implements SubChunkBlockHook {
} }
@Override @Override
public byte[] getB1() { public byte[] eid$getB1() {
return blockLSBArray; return blockLSBArray;
} }
@Override @Override
public void setB1(byte[] data) { public void eid$setB1(byte[] data) {
blockLSBArray = data; blockLSBArray = data;
} }
@Override @Override
public NibbleArray getB2Low() { public NibbleArray eid$getB2Low() {
return blockMSBArray; return blockMSBArray;
} }
@Override @Override
public void setB2Low(NibbleArray data) { public void eid$setB2Low(NibbleArray data) {
blockMSBArray = data; blockMSBArray = data;
} }
@Override @Override
public NibbleArray createB2Low() { public NibbleArray eid$createB2Low() {
return (blockMSBArray = new NibbleArray(blocksPerSubChunk, 4)); return (blockMSBArray = new NibbleArray(blocksPerSubChunk, 4));
} }
@Override @Override
public NibbleArray getB2High() { public NibbleArray eid$getB2High() {
return b2High; return b2High;
} }
@Override @Override
public void setB2High(NibbleArray data) { public void eid$setB2High(NibbleArray data) {
b2High = data; b2High = data;
} }
@Override @Override
public NibbleArray createB2High() { public NibbleArray eid$createB2High() {
return (b2High = new NibbleArray(blocksPerSubChunk, 4)); return (b2High = new NibbleArray(blocksPerSubChunk, 4));
} }
@Override @Override
public byte[] getB3() { public byte[] eid$getB3() {
return b3; return b3;
} }
@Override @Override
public void setB3(byte[] data) { public void eid$setB3(byte[] data) {
b3 = data; b3 = data;
} }
@Override @Override
public byte[] createB3() { public byte[] eid$createB3() {
return b3 = new byte[blocksPerSubChunk]; return b3 = new byte[blocksPerSubChunk];
} }
@Override @Override
public NibbleArray getM1Low() { public NibbleArray eid$getM1Low() {
return blockMetadataArray; return blockMetadataArray;
} }
@Override @Override
public void setM1Low(NibbleArray m1Low) { public void eid$setM1Low(NibbleArray m1Low) {
blockMetadataArray = m1Low; blockMetadataArray = m1Low;
} }
@Override @Override
public NibbleArray getM1High() { public NibbleArray eid$getM1High() {
return m1High; return m1High;
} }
@Override @Override
public void setM1High(NibbleArray m1High) { public void eid$setM1High(NibbleArray m1High) {
this.m1High = m1High; this.m1High = m1High;
} }
@Override @Override
public NibbleArray createM1High() { public NibbleArray eid$createM1High() {
return (m1High = new NibbleArray(blocksPerSubChunk, 4)); return (m1High = new NibbleArray(blocksPerSubChunk, 4));
} }
@Override @Override
public byte[] getM2() { public byte[] eid$getM2() {
return m2; return m2;
} }
@Override @Override
public void setM2(byte[] m2) { public void eid$setM2(byte[] m2) {
this.m2 = m2; this.m2 = m2;
} }
@Override @Override
public byte[] createM2() { public byte[] eid$createM2() {
return (m2 = new byte[blocksPerSubChunk]); return (m2 = new byte[blocksPerSubChunk]);
} }
@Override @Override
public int getBlockMask() { public int eid$getBlockMask() {
if (blockMSBArray == null) { if (blockMSBArray == null) {
return 0b00; return 0b00;
} }
@@ -311,7 +321,7 @@ public abstract class ExtendedBlockStorageMixin implements SubChunkBlockHook {
} }
@Override @Override
public int getMetadataMask() { public int eid$getMetadataMask() {
if (m1High == null) { if (m1High == null) {
return 0b01; return 0b01;
} }
@@ -57,6 +57,15 @@ public abstract class S0FPacketSpawnMobMixin {
return 0; return 0;
} }
@Redirect(method = "readPacketData",
at = @At(value = "FIELD",
target = "Lnet/minecraft/network/play/server/S0FPacketSpawnMob;field_149040_b:I",
ordinal = 0),
require = 1)
private void noReadByte2(S0FPacketSpawnMob instance, int value) {
}
@Inject(method = "readPacketData", @Inject(method = "readPacketData",
at = @At(value = "INVOKE", at = @At(value = "INVOKE",
target = "Lnet/minecraft/network/PacketBuffer;readByte()B", target = "Lnet/minecraft/network/PacketBuffer;readByte()B",
@@ -0,0 +1,198 @@
/*
* EndlessIDs
*
* Copyright (C) 2022-2024 FalsePattern
* All Rights Reserved
*
* The above copyright notice, this permission notice and the words "MEGA"
* shall be included in all copies or substantial portions of the Software.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.falsepattern.endlessids.mixin.mixins.common.potion.thaumcraft;
import com.falsepattern.endlessids.Tags;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Overwrite;
import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.Unique;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import thaumcraft.api.potions.PotionFluxTaint;
import thaumcraft.api.potions.PotionVisExhaust;
import thaumcraft.common.Thaumcraft;
import thaumcraft.common.config.Config;
import thaumcraft.common.lib.potions.PotionBlurredVision;
import thaumcraft.common.lib.potions.PotionDeathGaze;
import thaumcraft.common.lib.potions.PotionInfectiousVisExhaust;
import thaumcraft.common.lib.potions.PotionSunScorned;
import thaumcraft.common.lib.potions.PotionThaumarhia;
import thaumcraft.common.lib.potions.PotionUnnaturalHunger;
import thaumcraft.common.lib.potions.PotionWarpWard;
import net.minecraft.potion.Potion;
import net.minecraftforge.common.config.Configuration;
import java.io.File;
@Mixin(value = Config.class,
remap = false)
public abstract class ConfigMixin {
@Shadow public static Configuration config;
@Shadow public static int potionTaintPoisonID;
@Shadow public static int potionVisExhaustID;
@Shadow public static int potionInfVisExhaustID;
@Shadow public static int potionUnHungerID;
@Shadow public static int potionWarpWardID;
@Shadow public static int potionDeathGazeID;
@Shadow public static int potionBlurredID;
@Shadow public static int potionSunScornedID;
@Shadow public static int potionThaumarhiaID;
@Shadow
public static void save() {
}
/**
* @author FalsePattern
* @reason ID Extension, flatten recursion
*/
@Overwrite
static int getNextPotionId(int id) {
boolean next = true;
while (next) {
next = false;
if (id <= 0 || id >= Potion.potionTypes.length || Potion.potionTypes[id] != null) {
++id;
if (id < Potion.potionTypes.length) {
next = true;
} else {
id = -1;
}
}
}
return id;
}
@Unique
private static final String EID$CATEGORY_POTION_IDS = "Potion_IDs";
@Inject(method = "initialize",
at = @At(value = "INVOKE",
target = "Lnet/minecraftforge/common/config/Configuration;load()V"),
require = 1)
private static void addPotionIDsCategory(File file, CallbackInfo ci) {
config.addCustomCategoryComment(EID$CATEGORY_POTION_IDS, "Potion IDs (extended by " + Tags.MODNAME + ")");
}
@Unique
private static int eid$tryGetPotionFromConfigOrAuto(String name, int id) {
id = getNextPotionId(id);
return config.get(EID$CATEGORY_POTION_IDS, name, id).getInt();
}
@Inject(method = "initPotions",
at = @At("HEAD"),
cancellable = true,
require = 1)
private static void endlessIDsInitPotions(CallbackInfo ci) {
ci.cancel();
int id = 1000;
id = eid$tryGetPotionFromConfigOrAuto("potion_1_flux_taint", id);
if (id >= 0) {
potionTaintPoisonID = id;
PotionFluxTaint.instance = new PotionFluxTaint(potionTaintPoisonID, true, 0x663377);
PotionFluxTaint.init();
Thaumcraft.log.info("Initializing PotionFluxTaint with id {}", id);
}
id = eid$tryGetPotionFromConfigOrAuto("potion_2_vis_exhaust", id);
if (id >= 0) {
potionVisExhaustID = id;
PotionVisExhaust.instance = new PotionVisExhaust(potionVisExhaustID, true, 0x664477);
PotionVisExhaust.init();
Thaumcraft.log.info("Initializing PotionVisExhaust with id {}", id);
}
id = eid$tryGetPotionFromConfigOrAuto("potion_3_infectious_vis_exhaust", id);
if (id >= 0) {
potionInfVisExhaustID = id;
PotionInfectiousVisExhaust.instance = new PotionInfectiousVisExhaust(potionInfVisExhaustID, true, 0x665577);
PotionInfectiousVisExhaust.init();
Thaumcraft.log.info("Initializing PotionInfectiousVisExhaust with id {}", id);
}
id = eid$tryGetPotionFromConfigOrAuto("potion_4_unnatural_hunger", id);
if (id >= 0) {
potionUnHungerID = id;
PotionUnnaturalHunger.instance = new PotionUnnaturalHunger(potionUnHungerID, true, 0x446633);
PotionUnnaturalHunger.init();
Thaumcraft.log.info("Initializing PotionUnnaturalHunger with id {}", id);
}
id = eid$tryGetPotionFromConfigOrAuto("potion_5_warp_ward", id);
if (id >= 0) {
potionWarpWardID = id;
PotionWarpWard.instance = new PotionWarpWard(potionWarpWardID, false, 0xe0f2f7);
PotionWarpWard.init();
Thaumcraft.log.info("Initializing PotionWarpWard with id {}", id);
}
id = eid$tryGetPotionFromConfigOrAuto("potion_6_death_gaze", id);
if (id >= 0) {
potionDeathGazeID = id;
PotionDeathGaze.instance = new PotionDeathGaze(potionDeathGazeID, true, 0x664433);
PotionDeathGaze.init();
Thaumcraft.log.info("Initializing PotionDeathGaze with id {}", id);
}
id = eid$tryGetPotionFromConfigOrAuto("potion_7_blurred_vision", id);
if (id >= 0) {
potionBlurredID = id;
PotionBlurredVision.instance = new PotionBlurredVision(potionBlurredID, true, 0x808080);
PotionBlurredVision.init();
Thaumcraft.log.info("Initializing PotionBlurredVision with id {}", id);
}
id = eid$tryGetPotionFromConfigOrAuto("potion_8_sun_scorned", id);
if (id >= 0) {
potionSunScornedID = id;
PotionSunScorned.instance = new PotionSunScorned(potionSunScornedID, true, 0xf8d86a);
PotionSunScorned.init();
Thaumcraft.log.info("Initializing PotionSunScorned with id {}", id);
}
id = eid$tryGetPotionFromConfigOrAuto("potion_9_thaumarhia", id);
if (id >= 0) {
potionThaumarhiaID = id;
PotionThaumarhia.instance = new PotionThaumarhia(potionThaumarhiaID, true, 0x664477);
PotionThaumarhia.init();
Thaumcraft.log.info("Initializing PotionThaumarhia with id {}", id);
}
save();
}
}
@@ -26,15 +26,17 @@ package com.falsepattern.endlessids.mixin.mixins.common.potion.vanilla.network;
import com.falsepattern.endlessids.mixin.helpers.IS1DPacketEntityEffectMixin; import com.falsepattern.endlessids.mixin.helpers.IS1DPacketEntityEffectMixin;
import com.llamalad7.mixinextras.injector.wrapoperation.Operation; import com.llamalad7.mixinextras.injector.wrapoperation.Operation;
import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation; import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation;
import io.netty.buffer.ByteBuf; import lombok.val;
import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Redirect; import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import net.minecraft.network.PacketBuffer; import net.minecraft.network.PacketBuffer;
import net.minecraft.network.play.server.S1DPacketEntityEffect; import net.minecraft.network.play.server.S1DPacketEntityEffect;
import net.minecraft.potion.PotionEffect; import net.minecraft.potion.PotionEffect;
//Yes, this is wasteful, but other mods also touch these classes, so this is the most robust way to do this unfortunately
@Mixin(value = S1DPacketEntityEffect.class) @Mixin(value = S1DPacketEntityEffect.class)
public abstract class S1DPacketEntityEffectMixin implements IS1DPacketEntityEffectMixin { public abstract class S1DPacketEntityEffectMixin implements IS1DPacketEntityEffectMixin {
private int idExtended; private int idExtended;
@@ -44,32 +46,31 @@ public abstract class S1DPacketEntityEffectMixin implements IS1DPacketEntityEffe
target = "Lnet/minecraft/potion/PotionEffect;getPotionID()I"), target = "Lnet/minecraft/potion/PotionEffect;getPotionID()I"),
require = 1) require = 1)
private int getPotionID(PotionEffect effect, Operation<Integer> original) { private int getPotionID(PotionEffect effect, Operation<Integer> original) {
idExtended = original.call(effect); val id = original.call(effect);
return -1; idExtended = id;
if (id <= 127) {
return id;
} else {
return -1;
}
} }
@Redirect(method = "readPacketData", @Inject(method = "readPacketData",
at = @At(value = "INVOKE", at = @At("RETURN"),
target = "Lnet/minecraft/network/PacketBuffer;readByte()B", require = 1)
ordinal = 0), private void networkReadPacketData(PacketBuffer data, CallbackInfo ci) {
require = 1) idExtended = data.readInt();
private byte networkReadPacketData(PacketBuffer instance) {
idExtended = instance.readInt();
return -1;
} }
@Redirect(method = "writePacketData", @Inject(method = "writePacketData",
at = @At(value = "INVOKE", at = @At("RETURN"),
target = "Lnet/minecraft/network/PacketBuffer;writeByte(I)Lio/netty/buffer/ByteBuf;",
ordinal = 0),
require = 1) require = 1)
private ByteBuf networkWritePacketData(PacketBuffer instance, int p_writeByte_1_) { private void networkWritePacketData(PacketBuffer data, CallbackInfo ci) {
instance.writeInt(idExtended); data.writeInt(idExtended);
return null;
} }
@Override @Override
public int getIDExtended() { public int endlessids$getIDExtended() {
return this.idExtended; return this.idExtended;
} }
} }
@@ -23,30 +23,21 @@
package com.falsepattern.endlessids.mixin.mixins.common.potion.vanilla.network; package com.falsepattern.endlessids.mixin.mixins.common.potion.vanilla.network;
import io.netty.buffer.ByteBuf;
import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow; import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.Redirect;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import net.minecraft.network.PacketBuffer; import net.minecraft.network.PacketBuffer;
import net.minecraft.network.play.server.S1EPacketRemoveEntityEffect; import net.minecraft.network.play.server.S1EPacketRemoveEntityEffect;
//Yes, this is wasteful, but other mods also touch these classes, so this is the most robust way to do this unfortunately
@Mixin(S1EPacketRemoveEntityEffect.class) @Mixin(S1EPacketRemoveEntityEffect.class)
public abstract class S1EPacketRemoveEntityEffectMixin { public abstract class S1EPacketRemoveEntityEffectMixin {
@Shadow @Shadow
private int field_149078_b; private int field_149078_b;
@Redirect(method = "readPacketData",
at = @At(value = "INVOKE",
target = "Lnet/minecraft/network/PacketBuffer;readUnsignedByte()S"),
require = 1)
private short dontReadByte(PacketBuffer instance) {
return 0;
}
@Inject(method = "readPacketData", @Inject(method = "readPacketData",
at = @At("RETURN"), at = @At("RETURN"),
require = 1) require = 1)
@@ -54,16 +45,8 @@ public abstract class S1EPacketRemoveEntityEffectMixin {
field_149078_b = buf.readInt(); field_149078_b = buf.readInt();
} }
@Redirect(method = "writePacketData",
at = @At(value = "INVOKE",
target = "Lnet/minecraft/network/PacketBuffer;writeByte(I)Lio/netty/buffer/ByteBuf;"),
require = 1)
private ByteBuf dontWriteByte(PacketBuffer instance, int p_writeByte_1_) {
return null;
}
@Inject(method = "writePacketData", @Inject(method = "writePacketData",
at = @At(value = "RETURN"), at = @At("RETURN"),
require = 1) require = 1)
private void writeNewData(PacketBuffer buf, CallbackInfo ci) { private void writeNewData(PacketBuffer buf, CallbackInfo ci) {
buf.writeInt(field_149078_b); buf.writeInt(field_149078_b);
@@ -32,6 +32,7 @@ import lombok.RequiredArgsConstructor;
import java.util.List; import java.util.List;
import java.util.function.Predicate; import java.util.function.Predicate;
import static com.falsepattern.endlessids.mixin.plugin.TargetedMod.AM2;
import static com.falsepattern.lib.mixin.IMixin.PredicateHelpers.avoid; import static com.falsepattern.lib.mixin.IMixin.PredicateHelpers.avoid;
import static com.falsepattern.lib.mixin.IMixin.PredicateHelpers.condition; import static com.falsepattern.lib.mixin.IMixin.PredicateHelpers.condition;
import static com.falsepattern.lib.mixin.IMixin.PredicateHelpers.require; import static com.falsepattern.lib.mixin.IMixin.PredicateHelpers.require;
@@ -85,6 +86,25 @@ public enum Mixin implements IMixin {
//region Buildcraft //region Buildcraft
BuildcraftEnergyMixin(Side.COMMON, condition(() -> GeneralConfig.extendBiome).and(require(TargetedMod.BUILDCRAFT)), "biome.buildcraft.BuildcraftEnergyMixin"), BuildcraftEnergyMixin(Side.COMMON, condition(() -> GeneralConfig.extendBiome).and(require(TargetedMod.BUILDCRAFT)), "biome.buildcraft.BuildcraftEnergyMixin"),
//endregion Buildcraft //endregion Buildcraft
//region ClimateControl
ClimateControl_api_BiomeSettingsMixin(Side.COMMON, condition(() -> GeneralConfig.extendBiome).and(require(TargetedMod.CLIMATECONTROL)), "biome.climatecontrol.api.BiomeSettingsMixin"),
ClimateControl_api_ClimateControlRulesMixin(Side.COMMON, condition(() -> GeneralConfig.extendBiome).and(require(TargetedMod.CLIMATECONTROL)), "biome.climatecontrol.api.ClimateControlRulesMixin"),
ClimateControl_customGenLayer_ConfirmBiomeMixin(Side.COMMON, condition(() -> GeneralConfig.extendBiome).and(require(TargetedMod.CLIMATECONTROL)), "biome.climatecontrol.customGenLayer.ConfirmBiomeMixin"),
ClimateControl_customGenLayer_GenLayerBiomeByClimateMixin(Side.COMMON, condition(() -> GeneralConfig.extendBiome).and(require(TargetedMod.CLIMATECONTROL)), "biome.climatecontrol.customGenLayer.GenLayerBiomeByClimateMixin"),
ClimateControl_customGenLayer_GenLayerBiomeByTaggedClimateMixin(Side.COMMON, condition(() -> GeneralConfig.extendBiome).and(require(TargetedMod.CLIMATECONTROL)), "biome.climatecontrol.customGenLayer.GenLayerBiomeByTaggedClimateMixin"),
ClimateControl_customGenLayer_GenLayerDefineClimateMixin(Side.COMMON, condition(() -> GeneralConfig.extendBiome).and(require(TargetedMod.CLIMATECONTROL)), "biome.climatecontrol.customGenLayer.GenLayerDefineClimateMixin"),
ClimateControl_customGenLayer_GenLayerLowlandRiverMixMixin(Side.COMMON, condition(() -> GeneralConfig.extendBiome).and(require(TargetedMod.CLIMATECONTROL)), "biome.climatecontrol.customGenLayer.GenLayerLowlandRiverMixMixin"),
ClimateControl_customGenLayer_GenLayerSmoothCoastMixin(Side.COMMON, condition(() -> GeneralConfig.extendBiome).and(require(TargetedMod.CLIMATECONTROL)), "biome.climatecontrol.customGenLayer.GenLayerSmoothCoastMixin"),
ClimateControl_customGenLayer_GenLayerSubBiomeMixin(Side.COMMON, condition(() -> GeneralConfig.extendBiome).and(require(TargetedMod.CLIMATECONTROL)), "biome.climatecontrol.customGenLayer.GenLayerSubBiomeMixin"),
ClimateControl_generator_AbstractWorldGeneratorMixin(Side.COMMON, condition(() -> GeneralConfig.extendBiome).and(require(TargetedMod.CLIMATECONTROL)), "biome.climatecontrol.generator.AbstractWorldGeneratorMixin"),
ClimateControl_generator_BiomeSwapperMixin(Side.COMMON, condition(() -> GeneralConfig.extendBiome).and(require(TargetedMod.CLIMATECONTROL)), "biome.climatecontrol.generator.BiomeSwapperMixin"),
ClimateControl_generator_SubBiomeChooserMixin(Side.COMMON, condition(() -> GeneralConfig.extendBiome).and(require(TargetedMod.CLIMATECONTROL)), "biome.climatecontrol.generator.SubBiomeChooserMixin"),
ClimateControl_genLayerPack_GenLayerHillsMixin(Side.COMMON, condition(() -> GeneralConfig.extendBiome).and(require(TargetedMod.CLIMATECONTROL)), "biome.climatecontrol.genLayerPack.GenLayerHillsMixin"),
ClimateControl_genLayerPack_GenLayerPackMixin(Side.COMMON, condition(() -> GeneralConfig.extendBiome).and(require(TargetedMod.CLIMATECONTROL)), "biome.climatecontrol.genLayerPack.GenLayerPackMixin"),
ClimateControl_genLayerPack_GenLayerSmoothMixin(Side.COMMON, condition(() -> GeneralConfig.extendBiome).and(require(TargetedMod.CLIMATECONTROL)), "biome.climatecontrol.genLayerPack.GenLayerSmoothMixin"),
ClimateControl_genLayerPack_GenLayerVoronoiZoomMixin(Side.COMMON, condition(() -> GeneralConfig.extendBiome).and(require(TargetedMod.CLIMATECONTROL)), "biome.climatecontrol.genLayerPack.GenLayerVoronoiZoomMixin"),
ClimateControl_genLayerPack_GenLayerZoomMixin(Side.COMMON, condition(() -> GeneralConfig.extendBiome).and(require(TargetedMod.CLIMATECONTROL)), "biome.climatecontrol.genLayerPack.GenLayerZoomMixin"),
//endregion ClimateControl
//region CompactMachines //region CompactMachines
CMCubeToolsMixin(Side.COMMON, condition(() -> GeneralConfig.extendBiome).and(require(TargetedMod.COMPACTMACHINES)), "biome.compactmachines.CubeToolsMixin"), CMCubeToolsMixin(Side.COMMON, condition(() -> GeneralConfig.extendBiome).and(require(TargetedMod.COMPACTMACHINES)), "biome.compactmachines.CubeToolsMixin"),
//endregion CompactMachines //endregion CompactMachines
@@ -115,12 +135,18 @@ public enum Mixin implements IMixin {
//region Erebus //region Erebus
ErebusModBiomesMixin(Side.COMMON, condition(() -> GeneralConfig.extendBiome).and(require(TargetedMod.EREBUS)), "biome.erebus.ModBiomesMixin"), ErebusModBiomesMixin(Side.COMMON, condition(() -> GeneralConfig.extendBiome).and(require(TargetedMod.EREBUS)), "biome.erebus.ModBiomesMixin"),
//endregion Erebus //endregion Erebus
//region Extended Planets
ChunkProviderOceanMixin(Side.COMMON, condition(() -> GeneralConfig.extendBiome).and(require(TargetedMod.EXTENDEDPLANETS)), "biome.extendedplanets.ChunkProviderOceanMixin"),
//endregion
//region ExtraPlanets //region ExtraPlanets
ExtraPlanetsConfigMixin(Side.COMMON, condition(() -> GeneralConfig.extendBiome).and(require(TargetedMod.EXTRAPLANETS)), "biome.extraplanets.ConfigMixin"), ExtraPlanetsConfigMixin(Side.COMMON, condition(() -> GeneralConfig.extendBiome).and(require(TargetedMod.EXTRAPLANETS)), "biome.extraplanets.ConfigMixin"),
//endregion ExtraPlanets //endregion ExtraPlanets
//region ExtraUtilities //region ExtraUtilities
ChunkProviderEndOfTimeMixin(Side.COMMON, condition(() -> GeneralConfig.extendBiome).and(require(TargetedMod.EXTRAUTILITIES)), "biome.extrautilities.ChunkProviderEndOfTimeMixin"), ChunkProviderEndOfTimeMixin(Side.COMMON, condition(() -> GeneralConfig.extendBiome).and(require(TargetedMod.EXTRAUTILITIES)), "biome.extrautilities.ChunkProviderEndOfTimeMixin"),
//endregion ExtraUtilities //endregion ExtraUtilities
//region Factorization
HammerChunkProviderMixin(Side.COMMON, condition(() -> GeneralConfig.extendBiome).and(require(TargetedMod.FACTORIZATION)), "biome.factorization.HammerChunkProviderMixin"),
//endregion
//region Futurepack //region Futurepack
FuturepackBiomeGenSpaceMixin(Side.COMMON, condition(() -> GeneralConfig.extendBiome).and(require(TargetedMod.FUTUREPACK)), "biome.futurepack.BiomeGenSpaceMixin"), FuturepackBiomeGenSpaceMixin(Side.COMMON, condition(() -> GeneralConfig.extendBiome).and(require(TargetedMod.FUTUREPACK)), "biome.futurepack.BiomeGenSpaceMixin"),
//endregion Futurepack //endregion Futurepack
@@ -173,6 +199,7 @@ public enum Mixin implements IMixin {
//region RTG //region RTG
RTGChunkProviderRTGMixin(Side.COMMON, condition(() -> GeneralConfig.extendBiome).and(require(TargetedMod.RTG)), "biome.rtg.ChunkProviderRTGMixin"), RTGChunkProviderRTGMixin(Side.COMMON, condition(() -> GeneralConfig.extendBiome).and(require(TargetedMod.RTG)), "biome.rtg.ChunkProviderRTGMixin"),
RTGLandscapeGeneratorMixin(Side.COMMON, condition(() -> GeneralConfig.extendBiome).and(require(TargetedMod.RTG)), "biome.rtg.LandscapeGeneratorMixin"), RTGLandscapeGeneratorMixin(Side.COMMON, condition(() -> GeneralConfig.extendBiome).and(require(TargetedMod.RTG)), "biome.rtg.LandscapeGeneratorMixin"),
RTGWorldChunkManagerRTGMixin(Side.COMMON, condition(() -> GeneralConfig.extendBiome).and(require(TargetedMod.RTG)), "biome.rtg.WorldChunkManagerRTGMixin"),
//endregion RTG //endregion RTG
//region RWG //region RWG
RWGChunkGeneratorRealisticMixin(Side.COMMON, condition(() -> GeneralConfig.extendBiome).and(require(TargetedMod.RWG)), "biome.rwg.ChunkGeneratorRealisticMixin"), RWGChunkGeneratorRealisticMixin(Side.COMMON, condition(() -> GeneralConfig.extendBiome).and(require(TargetedMod.RWG)), "biome.rwg.ChunkGeneratorRealisticMixin"),
@@ -185,6 +212,9 @@ public enum Mixin implements IMixin {
//region ThutCore //region ThutCore
ThutVector3Mixin(Side.COMMON, condition(() -> GeneralConfig.extendBiome).and(require(TargetedMod.THUTCORE)), "biome.thut.Vector3Mixin"), ThutVector3Mixin(Side.COMMON, condition(() -> GeneralConfig.extendBiome).and(require(TargetedMod.THUTCORE)), "biome.thut.Vector3Mixin"),
//endregion ThutCore //endregion ThutCore
//region The Mists of RioV
ChunkProviderSanctuatiteMixin(Side.COMMON, condition(() -> GeneralConfig.extendBiome).and(require(TargetedMod.TMOR)), "biome.tmor.ChunkProviderSanctuatiteMixin"),
//endregion
//region Tropicraft //region Tropicraft
GenLayerTropiVoronoiZoomMixin(Side.COMMON, condition(() -> GeneralConfig.extendBiome).and(require(TargetedMod.TROPICRAFT)), "biome.tropicraft.GenLayerTropiVoronoiZoomMixin"), GenLayerTropiVoronoiZoomMixin(Side.COMMON, condition(() -> GeneralConfig.extendBiome).and(require(TargetedMod.TROPICRAFT)), "biome.tropicraft.GenLayerTropiVoronoiZoomMixin"),
//endregion Tropicraft //endregion Tropicraft
@@ -217,7 +247,7 @@ public enum Mixin implements IMixin {
//endregion DragonAPI //endregion DragonAPI
//region HBM's Nuclear Tech Nod //region HBM's Nuclear Tech Nod
NTMChunkRadiationHandlerPRISMMixin(Side.COMMON, condition(() -> GeneralConfig.extendBlockItem).and(require(TargetedMod.HBM_NTM)), "blockitem.ntm.ChunkRadiationHandlerPRISMMixin"), NTMChunkRadiationHandlerPRISMMixin(Side.COMMON, condition(() -> GeneralConfig.extendBlockItem).and(require(TargetedMod.HBM_NTM)), "blockitem.ntm.ChunkRadiationHandlerPRISMMixin"),
NTMChunkRadiationHandlerPRISM_SubChunkMixin(Side.COMMON, condition(() -> GeneralConfig.extendBlockItem).and(require(TargetedMod.HBM_NTM)), "blockitem.ntm.ChunkRadiationHandlerPRISMMixin"), NTMChunkRadiationHandlerPRISM_SubChunkMixin(Side.COMMON, condition(() -> GeneralConfig.extendBlockItem).and(require(TargetedMod.HBM_NTM)), "blockitem.ntm.ChunkRadiationHandlerPRISM_SubChunkMixin"),
//endregion HBM's Nuclear Tech Nod //endregion HBM's Nuclear Tech Nod
//region Matter Overdrive //region Matter Overdrive
MOInventoryMixin(Side.COMMON, condition(() -> GeneralConfig.extendBlockItem).and(require(TargetedMod.MATTEROVERDRIVE).or(require(TargetedMod.MATTERMEGADRIVE))), "blockitem.matteroverdrive.InventoryMixin"), MOInventoryMixin(Side.COMMON, condition(() -> GeneralConfig.extendBlockItem).and(require(TargetedMod.MATTEROVERDRIVE).or(require(TargetedMod.MATTERMEGADRIVE))), "blockitem.matteroverdrive.InventoryMixin"),
@@ -251,9 +281,12 @@ public enum Mixin implements IMixin {
//region vanilla //region vanilla
PotionEffectMixin(Side.COMMON, condition(() -> GeneralConfig.extendPotion), "potion.vanilla.PotionEffectMixin"), PotionEffectMixin(Side.COMMON, condition(() -> GeneralConfig.extendPotion), "potion.vanilla.PotionEffectMixin"),
PotionMixin(Side.COMMON, condition(() -> GeneralConfig.extendPotion), "potion.vanilla.PotionMixin"), PotionMixin(Side.COMMON, condition(() -> GeneralConfig.extendPotion), "potion.vanilla.PotionMixin"),
S1DPacketEntityEffectMixin(Side.COMMON, condition(() -> GeneralConfig.extendPotion), "potion.vanilla.network.S1DPacketEntityEffectMixin"), S1DPacketEntityEffectMixin(Side.COMMON, condition(() -> GeneralConfig.extendPotion).and(avoid(AM2)), "potion.vanilla.network.S1DPacketEntityEffectMixin"),
S1EPacketRemoveEntityEffectMixin(Side.COMMON, condition(() -> GeneralConfig.extendPotion), "potion.vanilla.network.S1EPacketRemoveEntityEffectMixin"), S1EPacketRemoveEntityEffectMixin(Side.COMMON, condition(() -> GeneralConfig.extendPotion).and(avoid(AM2)), "potion.vanilla.network.S1EPacketRemoveEntityEffectMixin"),
//endregion vanilla //endregion vanilla
//region Thaumcraft
common_potion_Thaumcraft_ConfigMixin(Side.COMMON, condition(() -> GeneralConfig.extendPotion).and(require(TargetedMod.THAUMCRAFT)), "potion.thaumcraft.ConfigMixin"),
//endregion Thaumcraft
//endregion potion //endregion potion
//region entity //region entity
//region vanilla //region vanilla
@@ -279,7 +312,7 @@ public enum Mixin implements IMixin {
//endregion blockitem //endregion blockitem
//region potion //region potion
//region vanilla //region vanilla
NetHandlerPlayClientMixinPotion(Side.CLIENT, condition(() -> GeneralConfig.extendPotion), "potion.vanilla.NetHandlerPlayClientMixin"), NetHandlerPlayClientMixinPotion(Side.CLIENT, condition(() -> GeneralConfig.extendPotion).and(avoid(AM2)), "potion.vanilla.NetHandlerPlayClientMixin"),
//endregion vanilla //endregion vanilla
//endregion potion //endregion potion
//endregion client //endregion client
@@ -36,12 +36,14 @@ public enum TargetedMod implements ITargetedMod {
ABYSSALCRAFT("AbyssalCraft", false, contains("abyssalcraft-")), ABYSSALCRAFT("AbyssalCraft", false, contains("abyssalcraft-")),
AROCKETRY("Advanced Rocketry", false, contains("advancedrocketry-")), AROCKETRY("Advanced Rocketry", false, contains("advancedrocketry-")),
ATG("Alternate Terrain Generation", false, contains("atg")), ATG("Alternate Terrain Generation", false, contains("atg")),
AM2("Ars Magica 2", false, contains("am2").or(contains("arsmagica2"))),
ANTIQUEATLAS("Antique Atlas", false, contains("antiqueatlas")), ANTIQUEATLAS("Antique Atlas", false, contains("antiqueatlas")),
ANTIIDCONFLICT("Anti ID Conflict", false, contains("antiidconflict")), ANTIIDCONFLICT("Anti ID Conflict", false, contains("antiidconflict")),
BOP("Biomes O' Plenty", false, contains("biomesoplenty-")), BOP("Biomes O' Plenty", false, contains("biomesoplenty-")),
BIOMETWEAKER("Biome Tweaker", false, contains("biometweaker-")), BIOMETWEAKER("Biome Tweaker", false, contains("biometweaker-")),
BIOMEWAND("Biome Wand", false, contains("biome-wand")), BIOMEWAND("Biome Wand", false, contains("biome-wand")),
BUILDCRAFT("BuildCraft", false, contains("buildcraft-").and(contains("compat").negate())), BUILDCRAFT("BuildCraft", false, contains("buildcraft-").and(contains("compat").negate())),
CLIMATECONTROL("Climate Control", false, contains("climatecontrol-")),
COFHLIB("CoFH Lib", false, contains("cofhlib-")), COFHLIB("CoFH Lib", false, contains("cofhlib-")),
COMPACTMACHINES("Compact Machines", false, contains("compactmachines-")), COMPACTMACHINES("Compact Machines", false, contains("compactmachines-")),
DARKWORLD("Dark World", false, contains("darkworld-")), DARKWORLD("Dark World", false, contains("darkworld-")),
@@ -50,8 +52,10 @@ public enum TargetedMod implements ITargetedMod {
EB("Enhanced Biomes", false, contains("Enhanced Biomes").or(contains("enhancedbiomes"))), EB("Enhanced Biomes", false, contains("Enhanced Biomes").or(contains("enhancedbiomes"))),
ENDERLICIOUS("Enderlicious", false, contains("enderlicious-")), ENDERLICIOUS("Enderlicious", false, contains("enderlicious-")),
EREBUS("The Erebus", false, contains("theerebus")), EREBUS("The Erebus", false, contains("theerebus")),
EXTENDEDPLANETS("Extended Planets", false, contains("extendedplanets-")),
EXTRAPLANETS("Extra Planets", false, contains("extraplanets-")), EXTRAPLANETS("Extra Planets", false, contains("extraplanets-")),
EXTRAUTILITIES("Extra Utilities", false, contains("extrautilities-")), EXTRAUTILITIES("Extra Utilities", false, contains("extrautilities-")),
FACTORIZATION("Factorization", false, contains("factorization-")),
FUTUREPACK("Futurepack", false, contains("futurepack")), FUTUREPACK("Futurepack", false, contains("futurepack")),
GALACTICRAFTCORE("GalactiCraftCore", false, contains("galacticraftcore")), GALACTICRAFTCORE("GalactiCraftCore", false, contains("galacticraftcore")),
GALAXYSPACE("GalaxySpace", false, contains("galaxyspace-")), GALAXYSPACE("GalaxySpace", false, contains("galaxyspace-")),
@@ -73,9 +77,10 @@ public enum TargetedMod implements ITargetedMod {
RWG("Realistic World Gen", false, contains("rwg-")), RWG("Realistic World Gen", false, contains("rwg-")),
THAUMCRAFT("Thaumcraft", false, contains("thaumcraft")), THAUMCRAFT("Thaumcraft", false, contains("thaumcraft")),
THUTCORE("ThutCore", false, contains("thutcore-").or(contains("thutmods-"))), THUTCORE("ThutCore", false, contains("thutcore-").or(contains("thutmods-"))),
TMOR("The Mists Of RioV", false, contains("the mists of riov-").or(contains("the-mists-of-riov-"))),
TROPICRAFT("Tropicraft", false, contains("tropicraft-")), TROPICRAFT("Tropicraft", false, contains("tropicraft-")),
TWILIGHTFOREST("Twilight Forest", false, contains("twilightforest")), TWILIGHTFOREST("Twilight Forest", false, contains("twilightforest")),
UBC("Underground Biomes Constructs", false, contains("undergroundbiomesconstructs-")), UBC("Underground Biomes Constructs", false, contains("undergroundbiomesconstructs-").or(contains("undergroundbiomes-"))),
WITCHERY("Witchery", false, contains("witchery-")), WITCHERY("Witchery", false, contains("witchery-")),
WORLDEDIT("WorldEdit", false, contains("worldedit-")), WORLDEDIT("WorldEdit", false, contains("worldedit-")),
; ;
+1 -1
View File
@@ -6,7 +6,7 @@
"dependencies": { "dependencies": {
"always": { "always": {
"common": [ "common": [
"it.unimi.dsi:fastutil:8.5.13" "it.unimi.dsi:fastutil:8.5.15"
], ],
"client": [], "client": [],
"server": [] "server": []