aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorbartimaeusnek <33183715+bartimaeusnek@users.noreply.github.com>2019-04-09 20:13:26 +0200
committerbartimaeusnek <33183715+bartimaeusnek@users.noreply.github.com>2019-04-09 20:13:26 +0200
commitd90b05bafacee6bf091702e182f94e3c6794b84e (patch)
tree7244051cdd2816bbc933afeb9cdd5afea3071993 /src/main
parentde65fb804ee3473faabee38539b0d91ad6b6a471 (diff)
downloadGT5-Unofficial-d90b05bafacee6bf091702e182f94e3c6794b84e.tar.gz
GT5-Unofficial-d90b05bafacee6bf091702e182f94e3c6794b84e.tar.bz2
GT5-Unofficial-d90b05bafacee6bf091702e182f94e3c6794b84e.zip
removed Taint Biome due to buggyness
and i dont like it >:( Signed-off-by: bartimaeusnek <33183715+bartimaeusnek@users.noreply.github.com> Former-commit-id: 50a98b3d394b8d0480a691c0d33fb008bbcd7cab
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/com/github/bartimaeusnek/crossmod/BartWorksCrossmod.java6
-rw-r--r--src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/planets/ross128/world/worldprovider/ChunkProviderRoss128b.java6
-rw-r--r--src/main/java/com/github/bartimaeusnek/crossmod/thaumcraft/CustomAspects.java36
-rw-r--r--src/main/java/com/github/bartimaeusnek/crossmod/thaumcraft/util/ThaumcraftHandler.java44
4 files changed, 89 insertions, 3 deletions
diff --git a/src/main/java/com/github/bartimaeusnek/crossmod/BartWorksCrossmod.java b/src/main/java/com/github/bartimaeusnek/crossmod/BartWorksCrossmod.java
index 9cefea1a7d..cd420afdcb 100644
--- a/src/main/java/com/github/bartimaeusnek/crossmod/BartWorksCrossmod.java
+++ b/src/main/java/com/github/bartimaeusnek/crossmod/BartWorksCrossmod.java
@@ -23,6 +23,7 @@
package com.github.bartimaeusnek.crossmod;
import com.github.bartimaeusnek.crossmod.galacticraft.GalacticraftProxy;
+import com.github.bartimaeusnek.crossmod.thaumcraft.CustomAspects;
import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.event.FMLInitializationEvent;
@@ -48,11 +49,10 @@ public class BartWorksCrossmod {
@Mod.EventHandler
public void preInit(FMLPreInitializationEvent preinit) {
-
-
if (Loader.isModLoaded("GalacticraftCore"))
GalacticraftProxy.preInit(preinit);
-
+ if (Loader.isModLoaded("Thaumcraft"))
+ new CustomAspects();
}
@Mod.EventHandler
diff --git a/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/planets/ross128/world/worldprovider/ChunkProviderRoss128b.java b/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/planets/ross128/world/worldprovider/ChunkProviderRoss128b.java
index 0476e4356c..956810dd7f 100644
--- a/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/planets/ross128/world/worldprovider/ChunkProviderRoss128b.java
+++ b/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/planets/ross128/world/worldprovider/ChunkProviderRoss128b.java
@@ -23,6 +23,8 @@
package com.github.bartimaeusnek.crossmod.galacticraft.planets.ross128.world.worldprovider;
import com.github.bartimaeusnek.crossmod.galacticraft.planets.ross128.world.oregen.BW_WordGenerator;
+import com.github.bartimaeusnek.crossmod.thaumcraft.util.ThaumcraftHandler;
+import cpw.mods.fml.common.Loader;
import gregtech.api.objects.XSTR;
import net.minecraft.block.Block;
import net.minecraft.block.BlockFalling;
@@ -77,6 +79,10 @@ public class ChunkProviderRoss128b extends ChunkProviderGenerate {
} else if (biomeGenBase.biomeID == BiomeGenBase.mushroomIslandShore.biomeID) {
this.biomesForGeneration[i] = BiomeGenBase.stoneBeach;
}
+ if (Loader.isModLoaded("Thaumcraft")) {
+ if (ThaumcraftHandler.isTaintBiome(biomeGenBase.biomeID))
+ this.biomesForGeneration[i] = BiomeGenBase.taiga;
+ }
}
this.replaceBlocksForBiome(p_73154_1_, p_73154_2_, ablock, abyte, this.biomesForGeneration);
this.caveGenerator.func_151539_a(this, this.worldObj, p_73154_1_, p_73154_2_, ablock);
diff --git a/src/main/java/com/github/bartimaeusnek/crossmod/thaumcraft/CustomAspects.java b/src/main/java/com/github/bartimaeusnek/crossmod/thaumcraft/CustomAspects.java
new file mode 100644
index 0000000000..bb419228d1
--- /dev/null
+++ b/src/main/java/com/github/bartimaeusnek/crossmod/thaumcraft/CustomAspects.java
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2019 bartimaeusnek
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+package com.github.bartimaeusnek.crossmod.thaumcraft;
+
+//import com.github.bartimaeusnek.bartworks.MainMod;
+//import net.minecraft.util.ResourceLocation;
+//import thaumcraft.api.aspects.Aspect;
+//
+//import static thaumcraft.api.aspects.Aspect.*;
+
+public class CustomAspects {
+// final static Aspect TRADE = new Aspect("Artis",0x00FF00,new Aspect[]{EXCHANGE, MAN},new ResourceLocation(MainMod.MOD_ID+":Aspects/Artis.png"),1);
+// final static Aspect UNIVERSE = new Aspect("Universum",0x0000FF,new Aspect[]{MAGIC, ELDRITCH},new ResourceLocation(MainMod.MOD_ID+":Aspects/Universum.png"),1);
+// final static Aspect SCIENCE = new Aspect("Scientia",0x00FFFF,new Aspect[]{MAN, UNIVERSE},new ResourceLocation(MainMod.MOD_ID+":Aspects/Scientia.png"),1);
+
+}
diff --git a/src/main/java/com/github/bartimaeusnek/crossmod/thaumcraft/util/ThaumcraftHandler.java b/src/main/java/com/github/bartimaeusnek/crossmod/thaumcraft/util/ThaumcraftHandler.java
new file mode 100644
index 0000000000..a3cc19b41c
--- /dev/null
+++ b/src/main/java/com/github/bartimaeusnek/crossmod/thaumcraft/util/ThaumcraftHandler.java
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2019 bartimaeusnek
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+package com.github.bartimaeusnek.crossmod.thaumcraft.util;
+
+import net.minecraft.world.biome.BiomeGenBase;
+
+public class ThaumcraftHandler {
+ private ThaumcraftHandler(){}
+
+ public static Integer taintBiomeID = null;
+
+ public static boolean isTaintBiome(int biomeID){
+ if (taintBiomeID == null) {
+ try {
+ BiomeGenBase TaintBiome = (BiomeGenBase) Class.forName("thaumcraft.common.lib.world.ThaumcraftWorldGenerator").getField("biomeTaint").get(null);
+ return biomeID == (taintBiomeID = TaintBiome.biomeID);
+ } catch (ClassCastException | ClassNotFoundException | NoSuchFieldException | IllegalAccessException e) {
+ e.printStackTrace();
+ return false;
+ }
+ }
+ return biomeID == taintBiomeID;
+ }
+}