mirror of
https://github.com/GTMEGA/EndlessIDs.git
synced 2026-11-24 10:34:29 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9a8a38a4a5 | ||
|
|
3af6751f3c | ||
|
|
35b658a29b | ||
|
|
28352b8c17 | ||
|
|
267d1c4170 | ||
|
|
4fdd2cbcaf | ||
|
|
27b21e8de7 | ||
|
|
d01ede5147 | ||
|
|
9dc46e54f3 | ||
|
|
a61359086b |
No files matched your search
@@ -56,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
|
||||||
@@ -76,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
|
||||||
|
|||||||
+14
-3
@@ -1,5 +1,5 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id("fpgradle-minecraft") version ("0.10.0")
|
id("com.falsepattern.fpgradle-mc") version ("0.17.1")
|
||||||
}
|
}
|
||||||
|
|
||||||
group = "com.falsepattern"
|
group = "com.falsepattern"
|
||||||
@@ -56,9 +56,10 @@ 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 {
|
||||||
@@ -142,12 +143,19 @@ dependencies {
|
|||||||
//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"))
|
||||||
|
|
||||||
@@ -197,6 +205,9 @@ 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(deobf("mirror:thutcore:2.0"))
|
compileOnly(deobf("mirror:thutcore:2.0"))
|
||||||
|
|||||||
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-8.12-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
|
||||||
|
|||||||
@@ -114,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.
|
||||||
@@ -205,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.
|
||||||
@@ -213,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
+2
-2
@@ -70,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
|
||||||
|
|||||||
+1
-31
@@ -1,35 +1,5 @@
|
|||||||
pluginManagement {
|
|
||||||
repositories {
|
|
||||||
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()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
id("org.gradle.toolchains.foojay-resolver-convention") version("0.8.0")
|
id("org.gradle.toolchains.foojay-resolver-convention") version("0.9.0")
|
||||||
}
|
}
|
||||||
|
|
||||||
rootProject.name = "EndlessIDs"
|
rootProject.name = "EndlessIDs"
|
||||||
+11
-1
@@ -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);
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -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();
|
||||||
}
|
}
|
||||||
+1
-1
@@ -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",
|
||||||
|
|||||||
+47
@@ -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);
|
||||||
|
}
|
||||||
|
}
|
||||||
+44
@@ -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);
|
||||||
|
}
|
||||||
|
}
|
||||||
+47
@@ -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);
|
||||||
|
}
|
||||||
|
}
|
||||||
+21
-20
@@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+2
-19
@@ -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;
|
||||||
@@ -134,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
|
||||||
@@ -205,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
|
||||||
@@ -237,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"),
|
||||||
@@ -271,8 +281,8 @@ 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
|
//region Thaumcraft
|
||||||
common_potion_Thaumcraft_ConfigMixin(Side.COMMON, condition(() -> GeneralConfig.extendPotion).and(require(TargetedMod.THAUMCRAFT)), "potion.thaumcraft.ConfigMixin"),
|
common_potion_Thaumcraft_ConfigMixin(Side.COMMON, condition(() -> GeneralConfig.extendPotion).and(require(TargetedMod.THAUMCRAFT)), "potion.thaumcraft.ConfigMixin"),
|
||||||
@@ -302,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,6 +36,7 @@ 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-")),
|
||||||
@@ -51,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-")),
|
||||||
@@ -74,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-")),
|
||||||
;
|
;
|
||||||
|
|||||||
Reference in new issue
Block a user