diff options
author | bartimaeusnek <33183715+bartimaeusnek@users.noreply.github.com> | 2019-06-02 15:18:24 +0200 |
---|---|---|
committer | bartimaeusnek <33183715+bartimaeusnek@users.noreply.github.com> | 2019-06-02 15:18:24 +0200 |
commit | dc0268bde0747c8371e1944c88d6454e7931fc0c (patch) | |
tree | b4cbccb4a412a1dde35673afeb6fad77cfc92999 /src/main | |
parent | fc3c78ee94729fd57582e86fe2b0b9190df17924 (diff) | |
download | GT5-Unofficial-dc0268bde0747c8371e1944c88d6454e7931fc0c.tar.gz GT5-Unofficial-dc0268bde0747c8371e1944c88d6454e7931fc0c.tar.bz2 GT5-Unofficial-dc0268bde0747c8371e1944c88d6454e7931fc0c.zip |
Added config options
-removed broken IC2 recipes
Signed-off-by: bartimaeusnek <33183715+bartimaeusnek@users.noreply.github.com>
Former-commit-id: 430abd84eab9bd6ec4f0cfc1c376c8afa81fb7f5
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/com/github/bartimaeusnek/bartworks/MainMod.java | 8 | ||||
-rw-r--r-- | src/main/java/com/github/bartimaeusnek/bartworks/client/ClientEventHandler/TooltipEventHandler.java (renamed from src/main/java/com/github/bartimaeusnek/bartworks/client/ClientEventHandler/ClientEventHandler.java) | 4 | ||||
-rw-r--r-- | src/main/java/com/github/bartimaeusnek/bartworks/common/configs/ConfigHandler.java | 37 | ||||
-rw-r--r-- | src/main/java/com/github/bartimaeusnek/bartworks/system/material/WerkstoffLoader.java | 35 | ||||
-rw-r--r-- | src/main/java/com/github/bartimaeusnek/bartworks/system/oregen/BW_WorldGenRoss128b.java | 23 | ||||
-rw-r--r-- | src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/UniversalTeleportType.java | 21 | ||||
-rw-r--r-- | src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/planets/ross128b/ChunkProviderRoss128b.java | 3 | ||||
-rw-r--r-- | src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/solarsystems/Ross128SolarSystem.java | 2 |
8 files changed, 94 insertions, 39 deletions
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/MainMod.java b/src/main/java/com/github/bartimaeusnek/bartworks/MainMod.java index da330424ee..8bc304e41d 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/MainMod.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/MainMod.java @@ -25,7 +25,7 @@ package com.github.bartimaeusnek.bartworks; import com.github.bartimaeusnek.bartworks.API.API_REFERENCE; import com.github.bartimaeusnek.bartworks.API.BioObjectAdder; -import com.github.bartimaeusnek.bartworks.client.ClientEventHandler.ClientEventHandler; +import com.github.bartimaeusnek.bartworks.client.ClientEventHandler.TooltipEventHandler; import com.github.bartimaeusnek.bartworks.client.creativetabs.BioTab; import com.github.bartimaeusnek.bartworks.client.creativetabs.GT2Tab; import com.github.bartimaeusnek.bartworks.client.creativetabs.bartworksTab; @@ -128,8 +128,8 @@ public final class MainMod { @Mod.EventHandler public void init(FMLInitializationEvent init) { - if (FMLCommonHandler.instance().getSide().isClient() && ConfigHandler.BioLab) - MinecraftForge.EVENT_BUS.register(new ClientEventHandler()); + if (FMLCommonHandler.instance().getSide().isClient() && ConfigHandler.tooltips) + MinecraftForge.EVENT_BUS.register(new TooltipEventHandler()); if (FMLCommonHandler.instance().getSide().isServer()) MinecraftForge.EVENT_BUS.register(new ServerEventHandler()); new LoaderRegistry().run(); @@ -141,7 +141,6 @@ public final class MainMod { else WerkstoffLoader.INSTANCE.runInit(); } - } @Mod.EventHandler @@ -160,6 +159,7 @@ public final class MainMod { @Mod.EventHandler public void onServerStarted(FMLServerStartedEvent event) { OreDictHandler.adaptCacheForWorld(); + WerkstoffLoader.removeIC2Recipes(); if (eicMap == null) { eicMap = new GT_Recipe.GT_Recipe_Map(new HashSet(GT_Recipe.GT_Recipe_Map.sImplosionRecipes.mRecipeList.size()), "gt.recipe.electricimplosioncompressor", "Electric Implosion Compressor", (String) null, "gregtech:textures/gui/basicmachines/Default", 1, 2, 1, 0, 1, "", 1, "", true, true); recipeLoop: diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/client/ClientEventHandler/ClientEventHandler.java b/src/main/java/com/github/bartimaeusnek/bartworks/client/ClientEventHandler/TooltipEventHandler.java index f4c155d246..72c0db2735 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/client/ClientEventHandler/ClientEventHandler.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/client/ClientEventHandler/TooltipEventHandler.java @@ -51,13 +51,13 @@ import java.util.HashMap; import java.util.List; @SideOnly(Side.CLIENT) -public class ClientEventHandler { +public class TooltipEventHandler { @SideOnly(Side.CLIENT) @SubscribeEvent(priority = EventPriority.HIGHEST) public void getTooltip(ItemTooltipEvent event) { - if (event.itemStack == null || event.itemStack.getItem() == null) + if (event == null || event.itemStack == null || event.itemStack.getItem() == null) return; if (TooltipCache.getTooltip(event.itemStack).isEmpty()) { diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/configs/ConfigHandler.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/configs/ConfigHandler.java index 92aeef9c3f..c52c56b8c8 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/configs/ConfigHandler.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/configs/ConfigHandler.java @@ -29,27 +29,42 @@ import net.minecraftforge.common.config.Configuration; import java.util.Arrays; public class ConfigHandler { + private static final int IDU = 10 * 8 + 5; - public static int IDOffset = 12600; - public static boolean teslastaff; - public static long energyPerCell = 1000000L; - public static boolean newStuff = true; - public static boolean BioLab = true; public static Configuration c; - public static boolean DEHPDirectSteam; + + public static int IDOffset = 12600; public static int megaMachinesMax = 256; public static int mbWaterperSec = 150; public static int ross128BID = -64; public static int ross128BAID = -63; + public static int ross128btier = 3; + public static int ross128batier = 3; + public static int landerType = 3; + public static int ross128bRuinChance = 512; + + public static long energyPerCell = 1000000L; + + public static boolean newStuff = true; + public static boolean BioLab = true; public static boolean Ross128Enabled = true; - public static boolean debugLog; + + public static boolean DEHPDirectSteam; + public static boolean teslastaff; public static boolean experimentalThreadedLoader; public static boolean GTNH; public static boolean ezmode; - public static boolean[] enabledPatches ; + + //One-Side-Only + public static boolean debugLog; + public static boolean tooltips = true; + public static boolean[] enabledPatches; + + public ConfigHandler(Configuration C) { ConfigHandler.c = C; + ConfigHandler.tooltips = ConfigHandler.c.get("System", "BartWorksToolTips", true, "If you wish to enable extra tooltips").getBoolean(true); ConfigHandler.IDOffset = ConfigHandler.c.get("System", "ID Offset", 12600, "ID Offset for this mod. This Mod uses " + ConfigHandler.IDU + " IDs. DO NOT CHANGE IF YOU DONT KNOW WHAT THIS IS").getInt(12600); ConfigHandler.energyPerCell = ConfigHandler.c.get("Multiblocks", "energyPerLESUCell", 1000000, "This will set Up the Energy per LESU Cell", 1000000, Integer.MAX_VALUE).getInt(1000000); ConfigHandler.ezmode = ConfigHandler.c.get("System", "Mode switch", false, "If GTNH is Loaded, this will enable easy recipes, if not, it will enable harder recipes.").getBoolean(false); @@ -74,9 +89,11 @@ public class ConfigHandler { ConfigHandler.ross128BID = ConfigHandler.c.get("CrossMod Interactions", "DimID - Ross128b", -64, "The Dim ID for Ross128b").getInt(-64); ConfigHandler.ross128BAID = ConfigHandler.c.get("CrossMod Interactions", "DimID - Ross128ba", -63, "The Dim ID for Ross128ba (Ross128b's Moon)").getInt(-63); - + ConfigHandler.ross128btier = ConfigHandler.c.get("CrossMod Interactions", "Rocket Tier - Ross128b", 3, "The Rocket Tier for Ross128b").getInt(3); + ConfigHandler.ross128batier = ConfigHandler.c.get("CrossMod Interactions", "Rocket Tier - Ross128ba", 3, "The Rocket Tier for Ross128a").getInt(3); + ConfigHandler.ross128bRuinChance = ConfigHandler.c.get("CrossMod Interactions", "Ruin Chance - Ross128b", 512, "Higher Values mean lesser Ruins.").getInt(512); ConfigHandler.Ross128Enabled = ConfigHandler.c.get("CrossMod Interactions", "Galacticraft - Activate Ross128 System", true, "If the Ross128 System should be activated").getBoolean(true); - + ConfigHandler.landerType = ConfigHandler.c.get("CrossMod Interactions", "LanderType", 3, "1 = Moon Lander, 2 = Landing Balloons, 3 = Asteroid Lander").getInt(3); ConfigHandler.setUpComments(); if (ConfigHandler.c.hasChanged()) diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/WerkstoffLoader.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/WerkstoffLoader.java index 0570627797..cfbc3956d7 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/WerkstoffLoader.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/WerkstoffLoader.java @@ -45,20 +45,19 @@ import gregtech.api.interfaces.ISubTagContainer; import gregtech.api.objects.GT_MultiTexture; import gregtech.api.objects.GT_RenderedTexture; import gregtech.api.objects.ItemData; -import gregtech.api.util.GT_LanguageManager; -import gregtech.api.util.GT_ModHandler; -import gregtech.api.util.GT_OreDictUnificator; -import gregtech.api.util.GT_Recipe; +import gregtech.api.util.*; +import ic2.api.recipe.IRecipeInput; +import ic2.api.recipe.RecipeInputOreDict; +import ic2.api.recipe.RecipeOutput; +import ic2.api.recipe.Recipes; import net.minecraft.block.Block; import net.minecraft.block.material.Material; +import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.oredict.OreDictionary; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; +import java.util.*; import static gregtech.api.enums.OrePrefixes.*; @@ -608,12 +607,32 @@ public class WerkstoffLoader implements Runnable { GameRegistry.registerTileEntity(BW_MetaGeneratedOreTE.class, "bw.blockoresTE"); WerkstoffLoader.BWOres = new BW_MetaGenerated_Ores(Material.rock, BW_MetaGeneratedOreTE.class, "bw.blockores"); GameRegistry.registerBlock(WerkstoffLoader.BWOres, BW_MetaGeneratedOre_Item.class, "bw.blockores.01"); + runGTItemDataRegistrator(); + } + + public static void runGTItemDataRegistrator(){ for (Werkstoff werkstoff : Werkstoff.werkstoffHashSet) { if (werkstoff.getGenerationFeatures().hasOres()) GT_OreDictUnificator.setItemData(new ItemStack(WerkstoffLoader.BWOres,1,werkstoff.getmID()), new ItemData(ore,Materials._NULL)); } } + public static void removeIC2Recipes() { + try { + Set<Map.Entry<IRecipeInput, RecipeOutput>> remset = new HashSet<>(); + for (Map.Entry<IRecipeInput, RecipeOutput> curr : Recipes.macerator.getRecipes().entrySet()) { + if (curr.getKey() instanceof RecipeInputOreDict) { + if (((RecipeInputOreDict) curr.getKey()).input.equalsIgnoreCase("oreNULL")) { + remset.add(curr); + } + } + } + Recipes.macerator.getRecipes().entrySet().removeAll(remset); + }catch (Exception e){ + e.printStackTrace(); + } + } + private void runAdditionalOreDict(){ if (ConfigHandler.experimentalThreadedLoader){ for (Werkstoff werkstoff : Werkstoff.werkstoffHashSet) { diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/oregen/BW_WorldGenRoss128b.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/oregen/BW_WorldGenRoss128b.java index 6037349a51..7442a9a769 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/system/oregen/BW_WorldGenRoss128b.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/oregen/BW_WorldGenRoss128b.java @@ -33,7 +33,8 @@ import net.minecraft.world.World; import net.minecraftforge.fluids.FluidRegistry; import static com.github.bartimaeusnek.crossmod.galacticraft.GalacticraftProxy.uo_dimensionList; - +import static gregtech.api.enums.Materials.*; +import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.*; public class BW_WorldGenRoss128b extends BW_OreLayer { @@ -46,16 +47,16 @@ public class BW_WorldGenRoss128b extends BW_OreLayer { } public static void init_OresRoss128() { - new BW_WorldGenRoss128b("ore.mix.ross128.Thorianit", true, 30, 60, 17, 1, 16, WerkstoffLoader.Thorianit, Materials.Uraninite, Materials.Lepidolite, Materials.Spodumene); - new BW_WorldGenRoss128b("ore.mix.ross128.carbon", true, 5, 25, 5, 4, 12, Materials.Graphite, Materials.Diamond, Materials.Coal, Materials.Graphite); - new BW_WorldGenRoss128b("ore.mix.ross128.bismuth", true, 5, 80, 30, 1, 16, WerkstoffLoader.Bismuthinit, Materials.Stibnite, Materials.Bismuth, WerkstoffLoader.Bismutite); - new BW_WorldGenRoss128b("ore.mix.ross128.TurmalinAlkali", true, 5, 80, 15, 4, 48, WerkstoffLoader.Olenit, WerkstoffLoader.FluorBuergerit, WerkstoffLoader.ChromoAluminoPovondrait, WerkstoffLoader.VanadioOxyDravit); - new BW_WorldGenRoss128b("ore.mix.ross128.Roquesit", true, 30, 50, 3, 1, 12, WerkstoffLoader.Arsenopyrite, WerkstoffLoader.Ferberite, WerkstoffLoader.Loellingit, WerkstoffLoader.Roquesit); - new BW_WorldGenRoss128b("ore.mix.ross128.Tungstate", true, 5, 40, 10, 4, 14, WerkstoffLoader.Ferberite, WerkstoffLoader.Huebnerit, WerkstoffLoader.Loellingit, Materials.Scheelite); - new BW_WorldGenRoss128b("ore.mix.ross128.CopperSulfits", true, 40, 70, 80, 3, 24, WerkstoffLoader.Djurleit, WerkstoffLoader.Bornite, WerkstoffLoader.Wittichenit, Materials.Tetrahedrite); - new BW_WorldGenRoss128b("ore.mix.ross128.Forsterit", true, 20, 90, 50, 2, 32, WerkstoffLoader.Forsterit, WerkstoffLoader.Fayalit, WerkstoffLoader.DescloiziteCUVO4, WerkstoffLoader.DescloiziteZNVO4); - new BW_WorldGenRoss128b("ore.mix.ross128.Hedenbergit", true, 20, 90, 50, 2, 32, WerkstoffLoader.Hedenbergit, WerkstoffLoader.Fayalit, WerkstoffLoader.DescloiziteCUVO4, WerkstoffLoader.DescloiziteZNVO4); - new BW_WorldGenRoss128b("ore.mix.ross128.RedZircon", true, 10, 80, 40, 3, 24, WerkstoffLoader.Fayalit,WerkstoffLoader.FuchsitAL , WerkstoffLoader.RedZircon,WerkstoffLoader.FuchsitCR); + new BW_WorldGenRoss128b("ore.mix.ross128.Thorianit", true, 30, 60, 17, 1, 16, Thorianit, Uraninite, Lepidolite, Spodumene); + new BW_WorldGenRoss128b("ore.mix.ross128.carbon", true, 5, 25, 5, 4, 12, Graphite, Diamond, Coal, Graphite); + new BW_WorldGenRoss128b("ore.mix.ross128.bismuth", true, 5, 80, 30, 1, 16, Bismuthinit, Stibnite, Bismuth, Bismutite); + new BW_WorldGenRoss128b("ore.mix.ross128.TurmalinAlkali", true, 5, 80, 15, 4, 48, Olenit, FluorBuergerit, ChromoAluminoPovondrait, VanadioOxyDravit); + new BW_WorldGenRoss128b("ore.mix.ross128.Roquesit", true, 30, 50, 3, 1, 12, Arsenopyrite, Ferberite, Loellingit, Roquesit); + new BW_WorldGenRoss128b("ore.mix.ross128.Tungstate", true, 5, 40, 10, 4, 14, Ferberite, Huebnerit, Loellingit, Scheelite); + new BW_WorldGenRoss128b("ore.mix.ross128.CopperSulfits", true, 40, 70, 80, 3, 24, Djurleit, Bornite, Wittichenit, Tetrahedrite); + new BW_WorldGenRoss128b("ore.mix.ross128.Forsterit", true, 20, 90, 50, 2, 32, Forsterit, Fayalit, DescloiziteCUVO4, DescloiziteZNVO4); + new BW_WorldGenRoss128b("ore.mix.ross128.Hedenbergit", true, 20, 90, 50, 2, 32, Hedenbergit, Fayalit, DescloiziteCUVO4, DescloiziteZNVO4); + new BW_WorldGenRoss128b("ore.mix.ross128.RedZircon", true, 10, 80, 40, 3, 24, Fayalit,FuchsitAL , RedZircon,FuchsitCR); } public static void init_undergroundFluidsRoss128() { diff --git a/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/UniversalTeleportType.java b/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/UniversalTeleportType.java index 742cee9a10..22e95e6d02 100644 --- a/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/UniversalTeleportType.java +++ b/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/UniversalTeleportType.java @@ -22,9 +22,13 @@ package com.github.bartimaeusnek.crossmod.galacticraft; +import com.github.bartimaeusnek.bartworks.common.configs.ConfigHandler; import micdoodle8.mods.galacticraft.api.vector.Vector3; import micdoodle8.mods.galacticraft.api.world.ITeleportType; +import micdoodle8.mods.galacticraft.core.entities.EntityLander; +import micdoodle8.mods.galacticraft.core.entities.EntityLanderBase; import micdoodle8.mods.galacticraft.core.entities.player.GCPlayerStats; +import micdoodle8.mods.galacticraft.planets.asteroids.entities.EntityEntryPod; import micdoodle8.mods.galacticraft.planets.mars.entities.EntityLandingBalloons; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayerMP; @@ -66,9 +70,22 @@ public class UniversalTeleportType implements ITeleportType { player.capabilities.isFlying = false; } - EntityLandingBalloons entityLandingBalloons = new EntityLandingBalloons(player); + EntityLanderBase elb; + + switch (ConfigHandler.landerType){ + case 1: + elb = new EntityLander(player); + break; + case 2: + elb = new EntityLandingBalloons(player); + break; + default: + elb = new EntityEntryPod(player); + break; + } + if (!newWorld.isRemote) { - newWorld.spawnEntityInWorld(entityLandingBalloons); + newWorld.spawnEntityInWorld(elb); } GCPlayerStats.get(player).teleportCooldown = 10; } diff --git a/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/planets/ross128b/ChunkProviderRoss128b.java b/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/planets/ross128b/ChunkProviderRoss128b.java index 0e7f7e28d1..483b8f5cf7 100644 --- a/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/planets/ross128b/ChunkProviderRoss128b.java +++ b/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/planets/ross128b/ChunkProviderRoss128b.java @@ -22,6 +22,7 @@ package com.github.bartimaeusnek.crossmod.galacticraft.planets.ross128b; +import com.github.bartimaeusnek.bartworks.common.configs.ConfigHandler; import com.github.bartimaeusnek.bartworks.system.oregen.BW_WordGenerator; import com.github.bartimaeusnek.bartworks.system.worldgen.MapGenRuins; import com.github.bartimaeusnek.crossmod.thaumcraft.util.ThaumcraftHandler; @@ -121,7 +122,7 @@ public class ChunkProviderRoss128b extends ChunkProviderGenerate { int z1; if (biomegenbase != BiomeGenBase.ocean && biomegenbase != BiomeGenBase.deepOcean && biomegenbase != BiomeGenBase.river && biomegenbase != BiomeGenBase.frozenOcean && biomegenbase != BiomeGenBase.frozenRiver - && this.rand.nextInt(512) == 0) { + && this.rand.nextInt(ConfigHandler.ross128bRuinChance) == 0) { x1 = k + this.rand.nextInt(16) + 3; y1 = this.rand.nextInt(256); z1 = l + this.rand.nextInt(16) + 3; diff --git a/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/solarsystems/Ross128SolarSystem.java b/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/solarsystems/Ross128SolarSystem.java index 7f9befe058..1634ca0f75 100644 --- a/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/solarsystems/Ross128SolarSystem.java +++ b/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/solarsystems/Ross128SolarSystem.java @@ -65,7 +65,7 @@ public class Ross128SolarSystem { Ross128SolarSystem.Ross128b.setRelativeOrbitTime(0.65F); Ross128SolarSystem.Ross128b.atmosphere.addAll(Arrays.asList(IAtmosphericGas.OXYGEN, IAtmosphericGas.NITROGEN, IAtmosphericGas.ARGON)); Ross128SolarSystem.Ross128b.setDimensionInfo(ConfigHandler.ross128BID, WorldProviderRoss128b.class); - Ross128SolarSystem.Ross128b.setTierRequired(3); + Ross128SolarSystem.Ross128b.setTierRequired(ConfigHandler.ross128btier); Ross128SolarSystem.Ross128ba = new Moon("Ross128ba").setParentPlanet(Ross128SolarSystem.Ross128b); Ross128SolarSystem.Ross128ba.setRelativeDistanceFromCenter(new CelestialBody.ScalableDistance(10f, 15f)).setRelativeOrbitTime(1 / 0.01F); |