mirror of
https://github.com/GTMEGA/EndlessIDs.git
synced 2026-11-24 10:34:29 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2ba9772cca | ||
|
|
a780cde306 | ||
|
|
58fb32809c | ||
|
|
012ecc02af |
No files matched your search
@@ -10,7 +10,7 @@ permissions:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
release-tags:
|
release-tags:
|
||||||
uses: FalsePattern/fpgradle-workflows/.github/workflows/release-tags.yml@master
|
uses: FalsePattern/fpgradle-workflows/.github/workflows/release-tags-2.yml@master
|
||||||
with:
|
with:
|
||||||
workspace: "setupCIWorkspace"
|
workspace: "setupCIWorkspace"
|
||||||
secrets:
|
secrets:
|
||||||
|
|||||||
+5
-4
@@ -1,5 +1,5 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id("com.falsepattern.fpgradle-mc") version ("4.0.2")
|
id("com.falsepattern.fpgradle-mc") version "4.1.0"
|
||||||
}
|
}
|
||||||
|
|
||||||
group = "com.falsepattern"
|
group = "com.falsepattern"
|
||||||
@@ -36,6 +36,7 @@ minecraft_fp {
|
|||||||
}
|
}
|
||||||
curseforge {
|
curseforge {
|
||||||
projectId = "665730"
|
projectId = "665730"
|
||||||
|
side = Both
|
||||||
dependencies {
|
dependencies {
|
||||||
required("fplib")
|
required("fplib")
|
||||||
required("chunkapi")
|
required("chunkapi")
|
||||||
@@ -64,9 +65,9 @@ repositories {
|
|||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
// region Our deps
|
// region Our deps
|
||||||
implementationSplit("com.falsepattern:falsepatternlib-mc1.7.10:1.12.0")
|
implementationSplit("com.falsepattern:falsepatternlib-mc1.7.10:1.12.2")
|
||||||
compileOnly("it.unimi.dsi:fastutil:8.5.16")
|
compileOnly("it.unimi.dsi:fastutil:8.5.18")
|
||||||
implementationSplit("com.falsepattern:chunkapi-mc1.7.10:0.8.0")
|
implementationSplit("com.falsepattern:chunkapi-mc1.7.10:0.8.3")
|
||||||
// endregion
|
// endregion
|
||||||
|
|
||||||
// region maintained mods
|
// region maintained mods
|
||||||
|
|||||||
Vendored
BIN
Binary file not shown.
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-9.5.1-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-9.7.0-bin.zip
|
||||||
networkTimeout=10000
|
networkTimeout=10000
|
||||||
retries=0
|
retries=0
|
||||||
retryBackOffMs=500
|
retryBackOffMs=500
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
#
|
#
|
||||||
# Gradle start up script for POSIX generated by Gradle.
|
# gradlew start up script for POSIX generated by Gradle.
|
||||||
#
|
#
|
||||||
# Important for running:
|
# Important for running:
|
||||||
#
|
#
|
||||||
@@ -29,7 +29,7 @@
|
|||||||
# bash, then to run this script, type that shell name before the whole
|
# bash, then to run this script, type that shell name before the whole
|
||||||
# command line, like:
|
# command line, like:
|
||||||
#
|
#
|
||||||
# ksh Gradle
|
# ksh gradlew
|
||||||
#
|
#
|
||||||
# Busybox and similar reduced shells will NOT work, because this script
|
# Busybox and similar reduced shells will NOT work, because this script
|
||||||
# requires all of these POSIX shell features:
|
# requires all of these POSIX shell features:
|
||||||
|
|||||||
Vendored
+2
-2
@@ -19,7 +19,7 @@
|
|||||||
@if "%DEBUG%"=="" @echo off
|
@if "%DEBUG%"=="" @echo off
|
||||||
@rem ##########################################################################
|
@rem ##########################################################################
|
||||||
@rem
|
@rem
|
||||||
@rem Gradle startup script for Windows
|
@rem gradlew startup script for Windows
|
||||||
@rem
|
@rem
|
||||||
@rem ##########################################################################
|
@rem ##########################################################################
|
||||||
|
|
||||||
@@ -72,7 +72,7 @@ echo location of your Java installation. 1>&2
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
@rem Execute Gradle
|
@rem Execute gradlew
|
||||||
@rem endlocal doesn't take effect until after the line is parsed and variables are expanded
|
@rem endlocal doesn't take effect until after the line is parsed and variables are expanded
|
||||||
@rem which allows us to clear the local environment before executing the java command
|
@rem which allows us to clear the local environment before executing the java command
|
||||||
endlocal & "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* & call :exitWithErrorLevel
|
endlocal & "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* & call :exitWithErrorLevel
|
||||||
|
|||||||
@@ -42,8 +42,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.8.0,);" +
|
dependencies = "required-after:chunkapi@[0.8.3,);" +
|
||||||
"required-after:falsepatternlib@[1.12.0,);" +
|
"required-after:falsepatternlib@[1.12.2,);" +
|
||||||
"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];
|
||||||
|
|||||||
@@ -80,18 +80,18 @@ public class EndlessIDsCore implements IFMLLoadingPlugin, IEarlyMixinLoader {
|
|||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
val exceptions = (Set<String>) field.get(cl);
|
val exceptions = (Set<String>) field.get(cl);
|
||||||
if (exceptions.contains("code.elix_x.coremods")) {
|
if (exceptions.contains("code.elix_x.coremods")) {
|
||||||
EndlessIDsTransformer.logger.info("AntiIDConflict detected!");
|
Share.logger.info("AntiIDConflict detected!");
|
||||||
EndlessIDsTransformer.logger.info("Removing ASM protections so that we can fix its code.");
|
Share.logger.info("Removing ASM protections so that we can fix its code.");
|
||||||
exceptions.remove("code.elix_x.coremods");
|
exceptions.remove("code.elix_x.coremods");
|
||||||
exceptions.add("code.elix_x.coremods.antiidconflict.core");
|
exceptions.add("code.elix_x.coremods.antiidconflict.core");
|
||||||
exceptions.add("code.elix_x.coremods.antiidconflict.ByteCodeTester");
|
exceptions.add("code.elix_x.coremods.antiidconflict.ByteCodeTester");
|
||||||
}
|
}
|
||||||
return new String[]{EndlessIDsTransformer.class.getName()};
|
return new String[]{Tags.GROUPNAME + ".asm.EndlessIDsTransformer" };
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void loudCrash(String message) {
|
private static void loudCrash(String message) {
|
||||||
for (int i = 0; i < 100; i++) {
|
for (int i = 0; i < 100; i++) {
|
||||||
EndlessIDsTransformer.logger.fatal(message);
|
Share.logger.fatal(message);
|
||||||
}
|
}
|
||||||
val err = new Error(message);
|
val err = new Error(message);
|
||||||
err.setStackTrace(new StackTraceElement[0]);
|
err.setStackTrace(new StackTraceElement[0]);
|
||||||
|
|||||||
@@ -22,7 +22,6 @@
|
|||||||
|
|
||||||
package com.falsepattern.endlessids.asm;
|
package com.falsepattern.endlessids.asm;
|
||||||
|
|
||||||
import com.falsepattern.endlessids.Tags;
|
|
||||||
import com.falsepattern.endlessids.asm.transformer.DevFixer;
|
import com.falsepattern.endlessids.asm.transformer.DevFixer;
|
||||||
import com.falsepattern.endlessids.asm.transformer.FmlRegistry;
|
import com.falsepattern.endlessids.asm.transformer.FmlRegistry;
|
||||||
import com.falsepattern.endlessids.asm.transformer.GameDataAccelerator;
|
import com.falsepattern.endlessids.asm.transformer.GameDataAccelerator;
|
||||||
@@ -33,14 +32,11 @@ import com.falsepattern.endlessids.config.GeneralConfig;
|
|||||||
import com.falsepattern.lib.turboasm.MergeableTurboTransformer;
|
import com.falsepattern.lib.turboasm.MergeableTurboTransformer;
|
||||||
import com.falsepattern.lib.turboasm.TurboClassTransformer;
|
import com.falsepattern.lib.turboasm.TurboClassTransformer;
|
||||||
import lombok.val;
|
import lombok.val;
|
||||||
import org.apache.logging.log4j.LogManager;
|
|
||||||
import org.apache.logging.log4j.Logger;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class EndlessIDsTransformer extends MergeableTurboTransformer {
|
public class EndlessIDsTransformer extends MergeableTurboTransformer {
|
||||||
public static final Logger logger = LogManager.getLogger(Tags.MODNAME + " ASM");
|
|
||||||
|
|
||||||
private static List<TurboClassTransformer> transformers() {
|
private static List<TurboClassTransformer> transformers() {
|
||||||
val result = new ArrayList<TurboClassTransformer>();
|
val result = new ArrayList<TurboClassTransformer>();
|
||||||
|
|||||||
@@ -0,0 +1,33 @@
|
|||||||
|
/*
|
||||||
|
* EndlessIDs
|
||||||
|
*
|
||||||
|
* Copyright (C) 2022-2026 FalsePattern, The MEGA Team
|
||||||
|
* All Rights Reserved
|
||||||
|
*
|
||||||
|
* The above copyright notice, this permission notice and the word "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, only version 3 of the License.
|
||||||
|
*
|
||||||
|
* 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 Lesser 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.asm;
|
||||||
|
|
||||||
|
import com.falsepattern.endlessids.Tags;
|
||||||
|
import org.apache.logging.log4j.LogManager;
|
||||||
|
import org.apache.logging.log4j.Logger;
|
||||||
|
|
||||||
|
public final class Share {
|
||||||
|
public static final Logger logger = LogManager.getLogger(Tags.MODNAME + " ASM");
|
||||||
|
|
||||||
|
private Share() {}
|
||||||
|
}
|
||||||
@@ -22,9 +22,9 @@
|
|||||||
|
|
||||||
package com.falsepattern.endlessids.asm.transformer;
|
package com.falsepattern.endlessids.asm.transformer;
|
||||||
|
|
||||||
|
import com.falsepattern.endlessids.asm.Share;
|
||||||
import com.falsepattern.endlessids.Tags;
|
import com.falsepattern.endlessids.Tags;
|
||||||
import com.falsepattern.endlessids.asm.AsmTransformException;
|
import com.falsepattern.endlessids.asm.AsmTransformException;
|
||||||
import com.falsepattern.endlessids.asm.EndlessIDsTransformer;
|
|
||||||
import com.falsepattern.endlessids.config.GeneralConfig;
|
import com.falsepattern.endlessids.config.GeneralConfig;
|
||||||
import com.falsepattern.lib.turboasm.ClassNodeHandle;
|
import com.falsepattern.lib.turboasm.ClassNodeHandle;
|
||||||
import com.falsepattern.lib.turboasm.TurboClassTransformer;
|
import com.falsepattern.lib.turboasm.TurboClassTransformer;
|
||||||
@@ -64,7 +64,7 @@ public class GameDataAccelerator implements TurboClassTransformer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static void transformError(MethodNode method) {
|
private static void transformError(MethodNode method) {
|
||||||
EndlessIDsTransformer.logger.error("Could not add caching code to GameData." + method.name + method.desc);
|
Share.logger.error("Could not add caching code to GameData.{}{}", method.name, method.desc);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void transformRegisterBlock(MethodNode method) {
|
private void transformRegisterBlock(MethodNode method) {
|
||||||
|
|||||||
-1
@@ -24,7 +24,6 @@ package com.falsepattern.endlessids.asm.transformer;
|
|||||||
|
|
||||||
import com.falsepattern.endlessids.Tags;
|
import com.falsepattern.endlessids.Tags;
|
||||||
import com.falsepattern.endlessids.asm.EndlessIDsCore;
|
import com.falsepattern.endlessids.asm.EndlessIDsCore;
|
||||||
import com.falsepattern.endlessids.asm.EndlessIDsTransformer;
|
|
||||||
import com.falsepattern.lib.turboasm.ClassNodeHandle;
|
import com.falsepattern.lib.turboasm.ClassNodeHandle;
|
||||||
import com.falsepattern.lib.turboasm.TurboClassTransformer;
|
import com.falsepattern.lib.turboasm.TurboClassTransformer;
|
||||||
import lombok.val;
|
import lombok.val;
|
||||||
|
|||||||
+15
-6
@@ -22,9 +22,9 @@
|
|||||||
|
|
||||||
package com.falsepattern.endlessids.asm.transformer.chunk;
|
package com.falsepattern.endlessids.asm.transformer.chunk;
|
||||||
|
|
||||||
|
import com.falsepattern.endlessids.asm.Share;
|
||||||
import com.falsepattern.endlessids.Tags;
|
import com.falsepattern.endlessids.Tags;
|
||||||
import com.falsepattern.endlessids.asm.EndlessIDsCore;
|
import com.falsepattern.endlessids.asm.EndlessIDsCore;
|
||||||
import com.falsepattern.endlessids.asm.EndlessIDsTransformer;
|
|
||||||
import com.falsepattern.lib.turboasm.BytePatternMatcher;
|
import com.falsepattern.lib.turboasm.BytePatternMatcher;
|
||||||
import com.falsepattern.lib.turboasm.ClassNodeHandle;
|
import com.falsepattern.lib.turboasm.ClassNodeHandle;
|
||||||
import com.falsepattern.lib.turboasm.TurboClassTransformer;
|
import com.falsepattern.lib.turboasm.TurboClassTransformer;
|
||||||
@@ -45,7 +45,10 @@ import org.objectweb.asm.tree.MethodInsnNode;
|
|||||||
import org.objectweb.asm.tree.MethodNode;
|
import org.objectweb.asm.tree.MethodNode;
|
||||||
import org.objectweb.asm.tree.VarInsnNode;
|
import org.objectweb.asm.tree.VarInsnNode;
|
||||||
|
|
||||||
|
import net.minecraft.launchwrapper.Launch;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.function.BiFunction;
|
import java.util.function.BiFunction;
|
||||||
@@ -186,22 +189,28 @@ public class ChunkProviderSuperPatcher implements TurboClassTransformer {
|
|||||||
private static final BytePatternMatcher getBiomeArrayMethodMatcher;
|
private static final BytePatternMatcher getBiomeArrayMethodMatcher;
|
||||||
|
|
||||||
static {
|
static {
|
||||||
|
var chunk = new ArrayList<String>(4);
|
||||||
if (EndlessIDsCore.deobfuscated) {
|
if (EndlessIDsCore.deobfuscated) {
|
||||||
CLASS_BiomeGenBase = new String[]{"net/minecraft/world/biome/BiomeGenBase"};
|
CLASS_BiomeGenBase = new String[]{"net/minecraft/world/biome/BiomeGenBase"};
|
||||||
CLASS_IChunkProvider = new String[]{"net/minecraft/world/chunk/IChunkProvider"};
|
CLASS_IChunkProvider = new String[]{"net/minecraft/world/chunk/IChunkProvider"};
|
||||||
CLASS_ChunkProviderGenerate = new String[]{"net/minecraft/world/gen/ChunkProviderGenerate"};
|
CLASS_ChunkProviderGenerate = new String[]{"net/minecraft/world/gen/ChunkProviderGenerate"};
|
||||||
CLASS_Chunk = new String[]{"net/minecraft/world/chunk/Chunk"};
|
chunk.add("net/minecraft/world/chunk/Chunk");
|
||||||
FIELD_biomeID = new String[]{"biomeID"};
|
FIELD_biomeID = new String[]{"biomeID"};
|
||||||
METHOD_getBiomeArray = new String[]{"getBiomeArray"};
|
METHOD_getBiomeArray = new String[]{"getBiomeArray"};
|
||||||
} else {
|
} else {
|
||||||
CLASS_BiomeGenBase = new String[]{"ahu", "net/minecraft/world/biome/BiomeGenBase"};
|
CLASS_BiomeGenBase = new String[]{"ahu", "net/minecraft/world/biome/BiomeGenBase"};
|
||||||
CLASS_IChunkProvider = new String[]{"apu", "net/minecraft/world/chunk/IChunkProvider"};
|
CLASS_IChunkProvider = new String[]{"apu", "net/minecraft/world/chunk/IChunkProvider"};
|
||||||
CLASS_ChunkProviderGenerate = new String[]{"aqz", "net/minecraft/world/gen/ChunkProviderGenerate"};
|
CLASS_ChunkProviderGenerate = new String[]{"aqz", "net/minecraft/world/gen/ChunkProviderGenerate"};
|
||||||
CLASS_Chunk = new String[]{"apx", "net/minecraft/world/chunk/Chunk"};
|
chunk.add("apx");
|
||||||
|
chunk.add("net/minecraft/world/chunk/Chunk");
|
||||||
FIELD_biomeID = new String[]{"ay", "field_76756_M"};
|
FIELD_biomeID = new String[]{"ay", "field_76756_M"};
|
||||||
METHOD_getBiomeArray = new String[]{"m", "func_76605_m"};
|
METHOD_getBiomeArray = new String[]{"m", "func_76605_m"};
|
||||||
}
|
}
|
||||||
|
val chunkExtraSpool = Launch.blackboard.get("endlessids_spool_CLASS_Chunk_interop");
|
||||||
|
if (chunkExtraSpool instanceof String[]) {
|
||||||
|
chunk.addAll(Arrays.asList((String[]) chunkExtraSpool));
|
||||||
|
}
|
||||||
|
CLASS_Chunk = chunk.toArray(new String[0]);
|
||||||
chunkClassMatcher = new BytePatternMatcher(CLASS_Chunk, BytePatternMatcher.Mode.Equals);
|
chunkClassMatcher = new BytePatternMatcher(CLASS_Chunk, BytePatternMatcher.Mode.Equals);
|
||||||
getBiomeArrayMethodMatcher = new BytePatternMatcher(METHOD_getBiomeArray, BytePatternMatcher.Mode.Equals);
|
getBiomeArrayMethodMatcher = new BytePatternMatcher(METHOD_getBiomeArray, BytePatternMatcher.Mode.Equals);
|
||||||
}
|
}
|
||||||
@@ -456,7 +465,7 @@ public class ChunkProviderSuperPatcher implements TurboClassTransformer {
|
|||||||
val memory = findTheTarget(method, cn);
|
val memory = findTheTarget(method, cn);
|
||||||
if (memory != null) {
|
if (memory != null) {
|
||||||
patched = true;
|
patched = true;
|
||||||
EndlessIDsTransformer.logger.debug("[ChunkProvider patcher]: Match found in method " + method.name);
|
Share.logger.debug("[ChunkProvider patcher]: Match found in method {}", method.name);
|
||||||
val insnList = method.instructions;
|
val insnList = method.instructions;
|
||||||
for (val node : method.localVariables) {
|
for (val node : method.localVariables) {
|
||||||
if (node.desc.equals("[B") && node.index == memory.biomeArrayIndex) {
|
if (node.desc.equals("[B") && node.index == memory.biomeArrayIndex) {
|
||||||
@@ -473,7 +482,7 @@ public class ChunkProviderSuperPatcher implements TurboClassTransformer {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!patched) {
|
if (!patched) {
|
||||||
EndlessIDsTransformer.logger.debug("[ChunkProvider patcher]: No matches found in class! This is not explicitly " +
|
Share.logger.debug("[ChunkProvider patcher]: No matches found in class! This is not explicitly " +
|
||||||
"an error, because the patch might be applied by a mixin instead!");
|
"an error, because the patch might be applied by a mixin instead!");
|
||||||
}
|
}
|
||||||
return patched;
|
return patched;
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"always": {
|
"always": {
|
||||||
"common": [
|
"common": [
|
||||||
"it.unimi.dsi:fastutil:8.5.16"
|
"it.unimi.dsi:fastutil:8.5.18"
|
||||||
],
|
],
|
||||||
"client": [],
|
"client": [],
|
||||||
"server": []
|
"server": []
|
||||||
|
|||||||
Reference in new issue
Block a user