mirror of
https://github.com/GTMEGA/EndlessIDs.git
synced 2026-11-24 10:34:29 +00:00
Compare commits
7
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
71ead0785e | ||
|
|
4aca859012 | ||
|
|
ff0dce66f5 | ||
|
|
9a3126d7f9 | ||
|
|
7ff89947ea | ||
|
|
39e6b70922 | ||
|
|
bbe23d663d |
No files matched your search
@@ -23,7 +23,9 @@ This mod also contains patches for the following mods:
|
||||
- Atum
|
||||
- Biomes O' Plenty
|
||||
- Biome Wand
|
||||
- BuildCraft
|
||||
- ChromatiCraft
|
||||
- Compact Machines
|
||||
- CoFH Lib
|
||||
- Dark World
|
||||
- DragonAPI
|
||||
@@ -40,6 +42,7 @@ This mod also contains patches for the following mods:
|
||||
- More Fun Quicksand Mod
|
||||
- Nature's Compass
|
||||
- Netherlicious
|
||||
- Random Things
|
||||
- Realistic Terrain Generation
|
||||
- Thaumcraft
|
||||
- Tropicraft
|
||||
|
||||
+66
-45
@@ -1,4 +1,4 @@
|
||||
//version: 1656003793falsepattern29
|
||||
//version: 1656003793falsepattern34
|
||||
/*
|
||||
DO NOT CHANGE THIS FILE!
|
||||
|
||||
@@ -24,7 +24,7 @@ buildscript {
|
||||
mavenLocal()
|
||||
maven {
|
||||
name = "forge"
|
||||
url = "https://maven.minecraftforge.net"
|
||||
url = "https://mvn.falsepattern.com/forge"
|
||||
}
|
||||
maven {
|
||||
name = "sonatype"
|
||||
@@ -36,11 +36,11 @@ buildscript {
|
||||
}
|
||||
maven {
|
||||
name = "jitpack"
|
||||
url = "https://jitpack.falsepattern.com/"
|
||||
url = "https://mvn.falsepattern.com/jitpack/"
|
||||
}
|
||||
maven {
|
||||
name = "mavenpattern"
|
||||
url = "https://maven.falsepattern.com/"
|
||||
url = "https://mvn.falsepattern.com/releases/"
|
||||
}
|
||||
}
|
||||
dependencies {
|
||||
@@ -120,6 +120,7 @@ propertyDefaultIfUnset("mavenArtifactId", "")
|
||||
propertyDefaultIfUnset("hasMixinDeps", false)
|
||||
propertyDefaultIfUnset("mixinPreinitConfig", "")
|
||||
propertyDefaultIfUnset("remapStubs", false)
|
||||
propertyDefaultIfUnset("useObsoleteSpongeMixins", false)
|
||||
|
||||
propertyDefaultIfUnset("remoteMappings", "https://raw.githubusercontent.com/MinecraftForge/FML/1.7.10/conf/")
|
||||
propertyDefaultIfUnset("mappingsChannel", "stable")
|
||||
@@ -271,51 +272,67 @@ repositories {
|
||||
url = "https://gregtech.overminddl1.com/"
|
||||
}
|
||||
if(usesMixins.toBoolean() || hasMixinDeps.toBoolean()) {
|
||||
maven {
|
||||
name = "sponge"
|
||||
url = "https://sponge.falsepattern.com/"
|
||||
if (useObsoleteSpongeMixins.toBoolean()) {
|
||||
maven {
|
||||
name = "sponge"
|
||||
url = "https://mvn.falsepattern.com/sponge"
|
||||
}
|
||||
}
|
||||
maven {
|
||||
url = "https://jitpack.falsepattern.com/"
|
||||
url = "https://mvn.falsepattern.com/jitpack"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
if(usesMixins.toBoolean()) {
|
||||
annotationProcessor("org.ow2.asm:asm-debug-all:5.0.3")
|
||||
annotationProcessor("com.google.guava:guava:24.1.1-jre")
|
||||
annotationProcessor("com.google.code.gson:gson:2.8.6")
|
||||
annotationProcessor("org.spongepowered:mixin:0.8-20200110.181151-15")
|
||||
// using 0.8 to workaround a issue in 0.7 which fails mixin application
|
||||
compile("org.spongepowered:mixin:0.7.11-20180703.121122-1") {
|
||||
// Mixin includes a lot of dependencies that are too up-to-date
|
||||
exclude module: "launchwrapper"
|
||||
exclude module: "guava"
|
||||
exclude module: "gson"
|
||||
exclude module: "commons-io"
|
||||
exclude module: "log4j-core"
|
||||
if (useObsoleteSpongeMixins.toBoolean()) {
|
||||
annotationProcessor("org.ow2.asm:asm-debug-all:5.0.3")
|
||||
annotationProcessor("com.google.guava:guava:24.1.1-jre")
|
||||
annotationProcessor("com.google.code.gson:gson:2.8.6")
|
||||
annotationProcessor("org.spongepowered:mixin:0.8-20200110.181151-15")
|
||||
// using 0.8 to workaround a issue in 0.7 which fails mixin application
|
||||
compile("org.spongepowered:mixin:0.7.11-20180703.121122-1") {
|
||||
// Mixin includes a lot of dependencies that are too up-to-date
|
||||
exclude module: "launchwrapper"
|
||||
exclude module: "guava"
|
||||
exclude module: "gson"
|
||||
exclude module: "commons-io"
|
||||
exclude module: "log4j-core"
|
||||
}
|
||||
compile("com.github.GTNewHorizons:SpongeMixins:1.3.3:dev")
|
||||
} else {
|
||||
compile("com.github.tox1cozZ:mixin-booter-legacy:1.1.2")
|
||||
annotationProcessor("com.github.tox1cozZ:mixin-booter-legacy:1.1.2:processor")
|
||||
}
|
||||
compile("com.github.GTNewHorizons:SpongeMixins:1.3.3:dev")
|
||||
}
|
||||
if(hasMixinDeps.toBoolean()) {
|
||||
runtime("org.spongepowered:mixin:0.7.11-20180703.121122-1") {
|
||||
// Mixin includes a lot of dependencies that are too up-to-date
|
||||
exclude module: "launchwrapper"
|
||||
exclude module: "guava"
|
||||
exclude module: "gson"
|
||||
exclude module: "commons-io"
|
||||
exclude module: "log4j-core"
|
||||
if (useObsoleteSpongeMixins.toBoolean()) {
|
||||
runtime("org.spongepowered:mixin:0.7.11-20180703.121122-1") {
|
||||
// Mixin includes a lot of dependencies that are too up-to-date
|
||||
exclude module: "launchwrapper"
|
||||
exclude module: "guava"
|
||||
exclude module: "gson"
|
||||
exclude module: "commons-io"
|
||||
exclude module: "log4j-core"
|
||||
}
|
||||
runtime("com.github.GTNewHorizons:SpongeMixins:1.3.3:dev")
|
||||
} else {
|
||||
runtime("com.github.tox1cozZ:mixin-booter-legacy:1.1.2")
|
||||
}
|
||||
runtime("com.github.GTNewHorizons:SpongeMixins:1.3.3:dev")
|
||||
}
|
||||
}
|
||||
|
||||
apply from: 'dependencies.gradle'
|
||||
|
||||
def mixinDir = new File(project.buildDir, 'mixins')
|
||||
if (!mixinDir.exists()) {
|
||||
mixinDir.mkdirs()
|
||||
}
|
||||
def mixingConfigRefMap = "mixins." + modId + ".refmap.json"
|
||||
def refMap = "${tasks.compileJava.temporaryDir}" + File.separator + mixingConfigRefMap
|
||||
def mixinSrg = "${tasks.reobf.temporaryDir}" + File.separator + "mixins.srg"
|
||||
def srgFile = new File(project.buildDir, 'srgs/mcp-srg.srg')
|
||||
def mixinSrg = new File(mixinDir, "${mixingConfigRefMap}.srg")
|
||||
def mixinRefMap = new File(mixinDir, mixingConfigRefMap)
|
||||
|
||||
task generateAssets {
|
||||
if(usesMixins.toBoolean()) {
|
||||
@@ -383,18 +400,14 @@ reobf {
|
||||
}
|
||||
}
|
||||
|
||||
afterEvaluate {
|
||||
if(usesMixins.toBoolean()) {
|
||||
tasks.compileJava {
|
||||
options.compilerArgs += [
|
||||
"-AreobfSrgFile=${tasks.reobf.srg}",
|
||||
"-AoutSrgFile=${mixinSrg}",
|
||||
"-AoutRefMapFile=${refMap}",
|
||||
// Elan: from what I understand they are just some linter configs so you get some warning on how to properly code
|
||||
"-XDenableSunApiLintControl",
|
||||
"-XDignore.symbol.file"
|
||||
]
|
||||
}
|
||||
if(usesMixins.toBoolean()) {
|
||||
tasks.compileJava {
|
||||
options.compilerArgs += [
|
||||
'-Xlint:-processing',
|
||||
"-AreobfSrgFile=${srgFile}",
|
||||
"-AoutSrgFile=${mixinSrg}",
|
||||
"-AoutRefMapFile=${mixinRefMap}"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -476,7 +489,7 @@ processResources {
|
||||
}
|
||||
|
||||
if(usesMixins.toBoolean()) {
|
||||
from refMap
|
||||
from mixinRefMap
|
||||
}
|
||||
|
||||
// copy everything else that's not the mcmod.info
|
||||
@@ -586,6 +599,14 @@ task apiJar(type: Jar) {
|
||||
getArchiveClassifier().set('api')
|
||||
}
|
||||
|
||||
task copySrgs(type: Copy, dependsOn: 'genSrgs') {
|
||||
from plugins.getPlugin('forge').delayedFile('{SRG_DIR}')
|
||||
include '**/*.srg'
|
||||
into layout.buildDirectory.file('srgs')
|
||||
}
|
||||
|
||||
compileJava.dependsOn(copySrgs)
|
||||
|
||||
artifacts {
|
||||
archives sourcesJar
|
||||
archives devJar
|
||||
@@ -694,7 +715,7 @@ task updateBuildScript {
|
||||
}
|
||||
}
|
||||
|
||||
if (!skipBuildScriptUpdateCheck.toBoolean() && isNewBuildScriptVersionAvailable(projectDir.toString())) {
|
||||
if (!project.getGradle().startParameter.isOffline() && !skipBuildScriptUpdateCheck.toBoolean() && isNewBuildScriptVersionAvailable(projectDir.toString())) {
|
||||
if (autoUpdateBuildScript.toBoolean()) {
|
||||
performBuildScriptUpdate(projectDir.toString())
|
||||
} else {
|
||||
|
||||
+18
-5
@@ -3,8 +3,12 @@ static def curse(curseDep) {
|
||||
}
|
||||
|
||||
def deobfCurse(curseDep) {
|
||||
String curseMaven = "https://cursemaven.com/" //Use https://cursemaven.falsepattern.com/ if this is down
|
||||
return deobfMaven(curseMaven, curse(curseDep))
|
||||
try {
|
||||
return deobfMaven("https://cursemaven.com/", curse(curseDep))
|
||||
} catch (Exception ignored) {
|
||||
println("Failed to get dep " + curseDep + " from cursemaven. Grabbing from mirror.")
|
||||
return deobfMaven("https://mvn.falsepattern.com/cursemaven/", curse(curseDep))
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
@@ -15,7 +19,7 @@ dependencies {
|
||||
}
|
||||
annotationProcessor("org.projectlombok:lombok:1.18.22")
|
||||
|
||||
compile("com.falsepattern:falsepatternlib-mc1.7.10:0.9.2:dev")
|
||||
compile("com.falsepattern:falsepatternlib-mc1.7.10:0.10.5:dev")
|
||||
|
||||
////////////////Patched mods////////////////
|
||||
|
||||
@@ -31,8 +35,8 @@ dependencies {
|
||||
//Anti ID Conflict 1.3.5
|
||||
compile(deobfCurse("antiidconflict-246288:2308279"))
|
||||
|
||||
//ArchaicFix snapshot
|
||||
compileOnly("com.github.embeddedt:ArchaicFix:be8666cb2dbf2e0a8b799e88cef3c0d12e5d4911:dev")
|
||||
// //ArchaicFix 0.2.0
|
||||
// compileOnly("com.github.embeddedt:ArchaicFix:0.2.0:dev")
|
||||
|
||||
//Atum 0.6.77
|
||||
compile(deobfCurse("atum-59621:2256356"))
|
||||
@@ -47,9 +51,15 @@ dependencies {
|
||||
//Mirrored at: https://maven.falsepattern.com/mirror/mirror/1.7.10-Biome-Wand-1.1.9.jar
|
||||
compile(deobf("https://spacechase0.com/wp-content/uploads/2014/10/1.7.10-Biome-Wand-1.1.9.jar"))
|
||||
|
||||
//Buildcraft 7.1.24
|
||||
compile(deobfCurse("buildcraft-61811:3538651"))
|
||||
|
||||
//CoFH Lib 1.2.1-185
|
||||
compile(deobfCurse("cofh-lib-220333:2388748"))
|
||||
|
||||
//CompactMachines 1.21
|
||||
compileOnly(deobfCurse("compactmachines-224218:2268575"))
|
||||
|
||||
//Dark World 0.2
|
||||
compile(deobfCurse("darkworld-225075:2225172"))
|
||||
|
||||
@@ -99,6 +109,9 @@ dependencies {
|
||||
//Netherlicious 3.2.3
|
||||
compile(deobfCurse("netherlicious-385860:3858031"))
|
||||
|
||||
//RandomThings 2.2.4
|
||||
compileOnly(deobfCurse("randomthings-59816:2225310"))
|
||||
|
||||
//Realistic Terrain Generation 1.1.1.7
|
||||
compile(deobfCurse("rtg-237989:2521557"))
|
||||
|
||||
|
||||
+6
-1
@@ -14,7 +14,7 @@ modGroup = com.falsepattern.endlessids
|
||||
#
|
||||
|
||||
# The server to upload the artifacts to
|
||||
repositoryURL = https://maven.falsepattern.com
|
||||
repositoryURL = https://mvn.falsepattern.com/releases
|
||||
|
||||
# What name is the login information inside ~/.m2/settings.xml stored under
|
||||
# (see https://gist.github.com/FalsePattern/82d93e3cfab01f671cc5f4a95931cfe3 for an example)
|
||||
@@ -70,6 +70,11 @@ mixinPlugin = mixin.plugin.MixinPlugin
|
||||
mixinsPackage = mixin.mixins
|
||||
# Specify a preinit mixin here. Preinit mixins should be used very rarely, if at all, so this mixin config will not be managed by the buildscript, only included.
|
||||
mixinPreinitConfig =
|
||||
# By default, the buildscript uses mixin-booter-legacy for mixins. You can force the buildscript to use the obsolete SpongeMixins
|
||||
# library using this setting.
|
||||
# MixinBooterLegacy provides Mixins 0.8.2
|
||||
# SpongeMixins provides Mixins 0.7.11 on the official version, and Mixins 0.7.12 on the nh version
|
||||
useObsoleteSpongeMixins = false
|
||||
# Specify the core mod entry class if you use a core mod. This class must implement IFMLLoadingPlugin!
|
||||
# This parameter is for legacy compatibility only
|
||||
# Example value: coreModClass = asm.FMLPlugin + modGroup = com.myname.mymodid -> com.myname.mymodid.asm.FMLPlugin
|
||||
|
||||
+3
-3
@@ -3,17 +3,17 @@
|
||||
repositories {
|
||||
maven {
|
||||
name = "cursemaven"
|
||||
url = "https://cursemaven.falsepattern.com/"
|
||||
url = "https://mvn.falsepattern.com/cursemaven/"
|
||||
content {
|
||||
includeGroup "curse.maven"
|
||||
}
|
||||
}
|
||||
maven {
|
||||
name = "mavenpattern"
|
||||
url = "https://maven.falsepattern.com/"
|
||||
url = "https://mvn.falsepattern.com/releases/"
|
||||
}
|
||||
maven {
|
||||
name = "jitpack"
|
||||
url = "https://jitpack.falsepattern.com/"
|
||||
url = "https://mvn.falsepattern.com/jitpack/"
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,6 @@
|
||||
package com.falsepattern.endlessids;
|
||||
|
||||
import com.falsepattern.endlessids.asm.IETransformer;
|
||||
import com.falsepattern.endlessids.config.GeneralConfig;
|
||||
import com.falsepattern.lib.config.ConfigException;
|
||||
import com.falsepattern.lib.config.ConfigurationManager;
|
||||
import lombok.SneakyThrows;
|
||||
import lombok.val;
|
||||
|
||||
@@ -23,13 +20,6 @@ import static cpw.mods.fml.relauncher.IFMLLoadingPlugin.TransformerExclusions;
|
||||
@TransformerExclusions({"com.falsepattern.endlessids.asm"})
|
||||
@DependsOn("falsepatternlib")
|
||||
public class IEPlugin implements IFMLLoadingPlugin {
|
||||
static {
|
||||
try {
|
||||
ConfigurationManager.registerConfig(GeneralConfig.class);
|
||||
} catch (ConfigException e) {
|
||||
System.err.println("Failed to load EndlessIDs config. Using defaults.");
|
||||
}
|
||||
}
|
||||
|
||||
public IEPlugin() {
|
||||
super();
|
||||
|
||||
@@ -3,17 +3,12 @@ package com.falsepattern.endlessids.config;
|
||||
import com.falsepattern.endlessids.Tags;
|
||||
import com.falsepattern.endlessids.constants.ExtendedConstants;
|
||||
import com.falsepattern.lib.config.Config;
|
||||
import com.falsepattern.lib.config.ConfigException;
|
||||
import com.falsepattern.lib.config.ConfigurationManager;
|
||||
|
||||
@Config(modid = Tags.MODID, category = "darkworld")
|
||||
public class DarkWorldIDConfig {
|
||||
static {
|
||||
try {
|
||||
ConfigurationManager.registerConfig(DarkWorldIDConfig.class);
|
||||
} catch (ConfigException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
ConfigurationManager.selfInit();
|
||||
}
|
||||
@Config.Comment("Original: 100")
|
||||
@Config.RangeInt(min = 40, max = ExtendedConstants.biomeIDCount - 1)
|
||||
|
||||
@@ -3,17 +3,12 @@ package com.falsepattern.endlessids.config;
|
||||
import com.falsepattern.endlessids.Tags;
|
||||
import com.falsepattern.endlessids.constants.ExtendedConstants;
|
||||
import com.falsepattern.lib.config.Config;
|
||||
import com.falsepattern.lib.config.ConfigException;
|
||||
import com.falsepattern.lib.config.ConfigurationManager;
|
||||
|
||||
@Config(modid = Tags.MODID, category = "futurepack")
|
||||
public class FuturepackIDConfig {
|
||||
static {
|
||||
try {
|
||||
ConfigurationManager.registerConfig(FuturepackIDConfig.class);
|
||||
} catch (ConfigException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
ConfigurationManager.selfInit();
|
||||
}
|
||||
@Config.Comment("Original: 97")
|
||||
@Config.RangeInt(min = 40, max = ExtendedConstants.biomeIDCount - 1)
|
||||
|
||||
@@ -2,16 +2,23 @@ package com.falsepattern.endlessids.config;
|
||||
|
||||
import com.falsepattern.endlessids.Tags;
|
||||
import com.falsepattern.lib.config.Config;
|
||||
import com.falsepattern.lib.config.ConfigurationManager;
|
||||
|
||||
@Config(modid = Tags.MODID)
|
||||
public class GeneralConfig {
|
||||
public static boolean catchUnregisteredBlocks = false;
|
||||
static {
|
||||
ConfigurationManager.selfInit();
|
||||
}
|
||||
@Config.DefaultBoolean(false)
|
||||
public static boolean catchUnregisteredBlocks;
|
||||
|
||||
@Config.Comment("Remove invalid (corrupted) blocks from the game.")
|
||||
public static boolean removeInvalidBlocks = false;
|
||||
@Config.DefaultBoolean(false)
|
||||
public static boolean removeInvalidBlocks;
|
||||
|
||||
@Config.Comment("Extend DataWatcher IDs. Vanilla limit is 31, new limit is 127.")
|
||||
public static boolean extendDataWatcher = false;
|
||||
@Config.DefaultBoolean(false)
|
||||
public static boolean extendDataWatcher;
|
||||
|
||||
@Config.Comment(
|
||||
"Setting this value greater than 0 will reduce RAM usage, at the cost of less available Block IDs.\n" +
|
||||
@@ -21,5 +28,6 @@ public class GeneralConfig {
|
||||
"(0: 16M, 1: 8M, 2: 4M, 3: 2M, 4: 1M, 5: 512K, 6: 256K, 7: 128K, 8: 64K, 9: 32K, 10: 16K, 11: 8K, 12: 4K)\n")
|
||||
@Config.RangeInt(min = 0,
|
||||
max = 12)
|
||||
public static int countCorrectionBits = 0;
|
||||
@Config.DefaultInt(0)
|
||||
public static int countCorrectionBits;
|
||||
}
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
package com.falsepattern.endlessids.mixin.mixins.common.antiidconflict;
|
||||
|
||||
import code.elix_x.coremods.antiidconflict.AntiIdConflictBase;
|
||||
import org.spongepowered.asm.lib.Opcodes;
|
||||
import org.objectweb.asm.Opcodes;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Shadow;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
package com.falsepattern.endlessids.mixin.mixins.common.buildcraft;
|
||||
|
||||
import buildcraft.BuildCraftEnergy;
|
||||
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(value = BuildCraftEnergy.class,
|
||||
remap = false)
|
||||
public abstract class BuildcraftEnergyMixin {
|
||||
@ModifyConstant(method = "findUnusedBiomeID",
|
||||
constant = @Constant(intValue = VanillaConstants.biomeIDCount),
|
||||
require = 1)
|
||||
private int extendIDs(int constant) {
|
||||
return ExtendedConstants.biomeIDCount;
|
||||
}
|
||||
}
|
||||
+52
@@ -0,0 +1,52 @@
|
||||
package com.falsepattern.endlessids.mixin.mixins.common.compactmachines;
|
||||
|
||||
import com.falsepattern.endlessids.mixin.helpers.IChunkMixin;
|
||||
import com.falsepattern.endlessids.mixin.stubpackage.org.dave.CompactMachines.tileentity.TileEntityMachine;
|
||||
import org.dave.CompactMachines.handler.ConfigurationHandler;
|
||||
import org.dave.CompactMachines.machines.tools.CubeTools;
|
||||
import org.dave.CompactMachines.utility.WorldUtils;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Overwrite;
|
||||
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.world.WorldServer;
|
||||
import net.minecraft.world.biome.BiomeGenBase;
|
||||
import net.minecraft.world.chunk.Chunk;
|
||||
import net.minecraftforge.common.BiomeDictionary;
|
||||
|
||||
@Mixin(value = CubeTools.class,
|
||||
remap = false)
|
||||
public abstract class CubeToolsMixin {
|
||||
|
||||
/**
|
||||
* @author FalsePattern
|
||||
* @reason getBiomeArray fix
|
||||
*/
|
||||
@Overwrite
|
||||
public static void setCubeBiome(int coords, BiomeGenBase biome) {
|
||||
WorldServer machineWorld = MinecraftServer.getServer().worldServerForDimension(ConfigurationHandler.dimensionId);
|
||||
Chunk chunk = machineWorld.getChunkFromBlockCoords(coords * ConfigurationHandler.cubeDistance, 0);
|
||||
if (chunk != null && chunk.isChunkLoaded) {
|
||||
short[] biomeArray = ((IChunkMixin)chunk).getBiomeShortArray();
|
||||
for(int x = 0; x < 15; ++x) {
|
||||
for(int z = 0; z < 15; ++z) {
|
||||
biomeArray[z << 4 | x] = (short)biome.biomeID;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @author FalsePattern
|
||||
* @reason getBiomeArray fix
|
||||
*/
|
||||
@Overwrite
|
||||
public static BiomeGenBase getMachineBiome(TileEntityMachine machine) {
|
||||
short[] biomeArray = ((IChunkMixin)machine.getWorldObj().getChunkFromBlockCoords(machine.xCoord, machine.zCoord)).getBiomeShortArray();
|
||||
int biomeId = biomeArray[(machine.zCoord & 15) << 4 | machine.xCoord & 15];
|
||||
return biomeId > 0 && biomeId < BiomeGenBase.getBiomeGenArray().length && BiomeDictionary.isBiomeRegistered(biomeId)
|
||||
? BiomeGenBase.getBiome(biomeId)
|
||||
: WorldUtils.getBiomeByName(ConfigurationHandler.defaultBiome);
|
||||
}
|
||||
}
|
||||
+63
@@ -0,0 +1,63 @@
|
||||
package com.falsepattern.endlessids.mixin.mixins.common.randomthings;
|
||||
|
||||
import com.falsepattern.endlessids.mixin.helpers.IChunkMixin;
|
||||
import lumien.randomthings.Items.ItemBiomeCapsule;
|
||||
import lumien.randomthings.Items.ItemBiomePainter;
|
||||
import lumien.randomthings.Items.ModItems;
|
||||
import lumien.randomthings.Network.Messages.MessagePaintBiome;
|
||||
import lumien.randomthings.Network.PacketHandler;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Overwrite;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.chunk.Chunk;
|
||||
|
||||
@Mixin(ItemBiomePainter.class)
|
||||
public abstract class ItemBiomePainterMixin {
|
||||
/**
|
||||
* @author FalsePattern
|
||||
* @reason getBiomeArray fix
|
||||
*/
|
||||
@Overwrite
|
||||
public boolean onItemUse(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, int par4, int par5, int par6, int par7, float par8, float par9, float par10) {
|
||||
if (!par2EntityPlayer.inventory.hasItem(ModItems.biomeCapsule)) {
|
||||
return false;
|
||||
} else if (par3World.isRemote) {
|
||||
return true;
|
||||
} else {
|
||||
for(int i = 0; i < par2EntityPlayer.inventory.getSizeInventory(); ++i) {
|
||||
ItemStack is = par2EntityPlayer.inventory.getStackInSlot(i);
|
||||
if (is != null && is.getItem() instanceof ItemBiomeCapsule && is.getItemDamage() != 0) {
|
||||
NBTTagCompound nbt = is.stackTagCompound;
|
||||
if (nbt == null) {
|
||||
nbt = is.stackTagCompound = new NBTTagCompound();
|
||||
}
|
||||
|
||||
int charges = nbt.getInteger("charges");
|
||||
if (charges > 0 || par2EntityPlayer.capabilities.isCreativeMode) {
|
||||
Chunk c = par3World.getChunkFromBlockCoords(par4, par6);
|
||||
int biomeID = is.getItemDamage() - 1;
|
||||
short[] biomeArray = ((IChunkMixin)c).getBiomeShortArray(); //changed
|
||||
if ((biomeArray[(par6 & 15) << 4 | par4 & 15] & 255) != biomeID) {
|
||||
biomeArray[(par6 & 15) << 4 | par4 & 15] = (short)(biomeID & 0xFFFF); //changed
|
||||
((IChunkMixin)c).setBiomeShortArray(biomeArray); //changed
|
||||
if (!par2EntityPlayer.capabilities.isCreativeMode) {
|
||||
nbt.setInteger("charges", charges - 1);
|
||||
par2EntityPlayer.inventoryContainer.detectAndSendChanges();
|
||||
}
|
||||
|
||||
PacketHandler.INSTANCE.sendToDimension(new MessagePaintBiome(par4, par5, par6, par3World.provider.dimensionId, biomeID), par3World.provider.dimensionId);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
+64
@@ -0,0 +1,64 @@
|
||||
package com.falsepattern.endlessids.mixin.mixins.common.randomthings;
|
||||
|
||||
import com.falsepattern.endlessids.mixin.helpers.IChunkMixin;
|
||||
import lumien.randomthings.Items.ItemBiomeCapsule;
|
||||
import lumien.randomthings.Network.Messages.MessagePaintBiome;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Overwrite;
|
||||
import org.spongepowered.asm.mixin.Shadow;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.particle.EntityFX;
|
||||
import net.minecraft.client.particle.EntitySmokeFX;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.world.biome.BiomeGenBase;
|
||||
import net.minecraft.world.chunk.Chunk;
|
||||
import cpw.mods.fml.common.network.simpleimpl.MessageContext;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.util.Random;
|
||||
|
||||
@Mixin(value = MessagePaintBiome.class,
|
||||
remap = false)
|
||||
public abstract class MessagePaintBiomeMixin {
|
||||
|
||||
@Shadow private int posZ;
|
||||
|
||||
@Shadow private int posX;
|
||||
|
||||
@Shadow private int biomeID;
|
||||
|
||||
@Shadow private int dimensionID;
|
||||
|
||||
@Shadow private int posY;
|
||||
|
||||
/**
|
||||
* @author FalsePattern
|
||||
* @reason getBiomeArray fix
|
||||
*/
|
||||
@Overwrite
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void onMessage(MessageContext ctx) {
|
||||
EntityPlayer player = Minecraft.getMinecraft().thePlayer;
|
||||
if (player != null && player.worldObj.provider.dimensionId == this.dimensionID) {
|
||||
Chunk c = player.worldObj.getChunkFromBlockCoords(this.posX, this.posZ);
|
||||
short[] biomeArray = ((IChunkMixin)c).getBiomeShortArray(); //changed
|
||||
biomeArray[(this.posZ & 15) << 4 | this.posX & 15] = (short)(this.biomeID & 0xFFFF); //changed
|
||||
((IChunkMixin)c).setBiomeShortArray(biomeArray); //changed
|
||||
Minecraft.getMinecraft().thePlayer.worldObj.markBlocksDirtyVertical(this.posX, this.posZ, 0, player.worldObj.getActualHeight());
|
||||
BiomeGenBase biome = BiomeGenBase.getBiome(this.biomeID);
|
||||
int colorInt = ItemBiomeCapsule.getColorForBiome(biome);
|
||||
Random rng = new Random();
|
||||
Color color = new Color(colorInt);
|
||||
|
||||
for(int i = 0; i < 64; ++i) {
|
||||
EntityFX smoke = new EntitySmokeFX(player.worldObj, (float)this.posX + rng.nextFloat(), (float)this.posY + rng.nextFloat(), (float)this.posZ + rng.nextFloat(), 0.0, 0.0, 0.0);
|
||||
smoke.setRBGColorF(0.003921569F * (float)color.getRed(), 0.003921569F * (float)color.getGreen(), 0.003921569F * (float)color.getBlue());
|
||||
Minecraft.getMinecraft().effectRenderer.addEffect(smoke);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -93,9 +93,15 @@ public enum Mixin implements IMixin {
|
||||
BiomeWandItemMixin(Side.COMMON, require(TargetedMod.BIOMEWAND), "biomewand.BiomeWandItemMixin"),
|
||||
//endregion Biome Wand->common
|
||||
//endregion Biome Wand
|
||||
//region Buildcraft
|
||||
BuildcraftEnergyMixin(Side.COMMON, require(TargetedMod.BUILDCRAFT), "buildcraft.BuildcraftEnergyMixin"),
|
||||
//endregion Buildcraft
|
||||
//region CoFHLib->common
|
||||
CoFHLibCofhBlockHelperMixin(Side.COMMON, require(TargetedMod.COFHLIB), "cofhlib.BlockHelperMixin"),
|
||||
//endregion CoFHLib->common
|
||||
//region CompactMachines->common
|
||||
CMCubeToolsMixin(Side.COMMON, require(TargetedMod.COMPACTMACHINES), "compactmachines.CubeToolsMixin"),
|
||||
//endregion CompactMachines->common
|
||||
//region DarkWorld->common
|
||||
DarkWorldModBiomesMixin(Side.COMMON, require(TargetedMod.DARKWORLD), "darkworld.ModBiomesMixin"),
|
||||
//endregion DarkWorld->common
|
||||
@@ -159,6 +165,10 @@ public enum Mixin implements IMixin {
|
||||
NetherliciousBiomeConfigurationMixin(Side.COMMON, require(TargetedMod.NETHERLICIOUS),
|
||||
"netherlicious.BiomeConfigurationMixin"),
|
||||
//endregion Netherlicious->common
|
||||
//region RandomThings->common
|
||||
ItemBiomePainterMixin(Side.COMMON, require(TargetedMod.RANDOMTHINGS), "randomthings.ItemBiomePainterMixin"),
|
||||
MessagePaintBiomeMixin(Side.COMMON, require(TargetedMod.RANDOMTHINGS), "randomthings.MessagePaintBiomeMixin"),
|
||||
//endregion RandomThings->common
|
||||
//region RTG->common
|
||||
RTGChunkProviderRTGMixin(Side.COMMON, require(TargetedMod.RTG), "rtg.ChunkProviderRTGMixin"),
|
||||
RTGLandscapeGeneratorMixin(Side.COMMON, require(TargetedMod.RTG), "rtg.LandscapeGeneratorMixin"),
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
package com.falsepattern.endlessids.mixin.plugin;
|
||||
|
||||
import com.falsepattern.endlessids.config.DarkWorldIDConfig;
|
||||
import com.falsepattern.endlessids.config.FuturepackIDConfig;
|
||||
import com.falsepattern.lib.config.ConfigException;
|
||||
import com.falsepattern.lib.config.ConfigurationManager;
|
||||
import com.falsepattern.lib.mixin.ITargetedMod;
|
||||
import lombok.Getter;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
@@ -22,7 +18,9 @@ public enum TargetedMod implements ITargetedMod {
|
||||
BOP("Biomes O' Plenty", true, startsWith("biomesoplenty-")),
|
||||
BIOMETWEAKER("Biome Tweaker", true, startsWith("biometweaker-")),
|
||||
BIOMEWAND("Biome Wand", true, startsWith("1.7.10-biome-wand-").or(startsWith("biome-wand"))),
|
||||
BUILDCRAFT("BuildCraft", true, startsWith("buildcraft-")),
|
||||
COFHLIB("CoFH Lib", true, startsWith("cofhlib-")),
|
||||
COMPACTMACHINES("Compact Machines", true, startsWith("compactmachines-")),
|
||||
DARKWORLD("Dark World", true, startsWith("darkworld-")),
|
||||
DRAGONAPI("DragonAPI", false, startsWith("dragonapi")),
|
||||
EB("Enhanced Biomes", true, startsWith("Enhanced Biomes").or(startsWith("enhancedbiomes"))),
|
||||
@@ -37,6 +35,7 @@ public enum TargetedMod implements ITargetedMod {
|
||||
MFQM("More Fun Quicksand Mod", true, startsWith("morefunquicksandmod-")),
|
||||
NATURESCOMPASS("Nature's Compass", true, startsWith("naturescompass")),
|
||||
NETHERLICIOUS("Netherlicious", true, startsWith("netherlicious-")),
|
||||
RANDOMTHINGS("Random Things", true, startsWith("randomthings-")),
|
||||
RTG("Realistic Terrain Generation", true, startsWith("rtg-")),
|
||||
THAUMCRAFT("Thaumcraft", true, startsWith("thaumcraft")),
|
||||
TROPICRAFT("Tropicraft", true, startsWith("tropicraft-")),
|
||||
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
package com.falsepattern.endlessids.mixin.stubpackage.org.dave.CompactMachines.tileentity;
|
||||
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class TileEntityMachine {
|
||||
public World getWorldObj()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
public int xCoord;
|
||||
public int zCoord;
|
||||
}
|
||||
Reference in new issue
Block a user