From dc0268bde0747c8371e1944c88d6454e7931fc0c Mon Sep 17 00:00:00 2001 From: bartimaeusnek <33183715+bartimaeusnek@users.noreply.github.com> Date: Sun, 2 Jun 2019 15:18:24 +0200 Subject: Added config options -removed broken IC2 recipes Signed-off-by: bartimaeusnek <33183715+bartimaeusnek@users.noreply.github.com> Former-commit-id: 430abd84eab9bd6ec4f0cfc1c376c8afa81fb7f5 --- .../github/bartimaeusnek/bartworks/MainMod.java | 8 +- .../ClientEventHandler/ClientEventHandler.java | 114 --------------------- .../ClientEventHandler/TooltipEventHandler.java | 114 +++++++++++++++++++++ .../bartworks/common/configs/ConfigHandler.java | 37 +++++-- .../bartworks/system/material/WerkstoffLoader.java | 35 +++++-- .../system/oregen/BW_WorldGenRoss128b.java | 23 +++-- .../galacticraft/UniversalTeleportType.java | 21 +++- .../planets/ross128b/ChunkProviderRoss128b.java | 3 +- .../solarsystems/Ross128SolarSystem.java | 2 +- 9 files changed, 206 insertions(+), 151 deletions(-) delete mode 100644 src/main/java/com/github/bartimaeusnek/bartworks/client/ClientEventHandler/ClientEventHandler.java create mode 100644 src/main/java/com/github/bartimaeusnek/bartworks/client/ClientEventHandler/TooltipEventHandler.java (limited to 'src/main') 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/ClientEventHandler.java deleted file mode 100644 index f4c155d246..0000000000 --- a/src/main/java/com/github/bartimaeusnek/bartworks/client/ClientEventHandler/ClientEventHandler.java +++ /dev/null @@ -1,114 +0,0 @@ -/* - * 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.bartworks.client.ClientEventHandler; - -import com.github.bartimaeusnek.bartworks.API.BioVatLogicAdder; -import com.github.bartimaeusnek.bartworks.MainMod; -import com.github.bartimaeusnek.bartworks.common.blocks.BW_Blocks; -import com.github.bartimaeusnek.bartworks.system.oredict.OreDictHandler; -import com.github.bartimaeusnek.bartworks.util.BW_ColorUtil; -import com.github.bartimaeusnek.bartworks.util.ChatColorHelper; -import com.github.bartimaeusnek.bartworks.util.Pair; -import com.github.bartimaeusnek.crossmod.BartWorksCrossmod; -import cpw.mods.fml.common.Loader; -import cpw.mods.fml.common.ModContainer; -import cpw.mods.fml.common.eventhandler.EventPriority; -import cpw.mods.fml.common.eventhandler.SubscribeEvent; -import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gregtech.api.enums.GT_Values; -import net.minecraft.block.Block; -import net.minecraft.block.material.Material; -import net.minecraft.init.Blocks; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.StatCollector; -import net.minecraftforge.event.entity.player.ItemTooltipEvent; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; - -@SideOnly(Side.CLIENT) -public class ClientEventHandler { - - @SideOnly(Side.CLIENT) - @SubscribeEvent(priority = EventPriority.HIGHEST) - public void getTooltip(ItemTooltipEvent event) { - - if (event.itemStack == null || event.itemStack.getItem() == null) - return; - - if (TooltipCache.getTooltip(event.itemStack).isEmpty()) { - ItemStack tmp = event.itemStack.copy(); - Pair abstractedStack = new Pair<>(Item.getIdFromItem(tmp.getItem()), (short) tmp.getItemDamage()); - List tooAdd = new ArrayList<>(); - if (OreDictHandler.getNonBWCache().contains(abstractedStack)) { - for (Pair pair : OreDictHandler.getNonBWCache()) { - if (pair.equals(abstractedStack)) { - GameRegistry.UniqueIdentifier UI = GameRegistry.findUniqueIdentifierFor(tmp.getItem()); - if (UI == null) - UI = GameRegistry.findUniqueIdentifierFor(Block.getBlockFromItem(tmp.getItem())); - if (UI != null) { - for (ModContainer modContainer : Loader.instance().getModList()) { - if (UI.modId.equals(MainMod.MOD_ID) || UI.modId.equals(BartWorksCrossmod.MOD_ID) || UI.modId.equals("BWCore")) - break; - if (UI.modId.equals(modContainer.getModId())) { - tooAdd.add("Shared ItemStack between " + ChatColorHelper.DARKGREEN + "BartWorks" + ChatColorHelper.GRAY + " and " + ChatColorHelper.RED + modContainer.getName()); - } - } - } else - tooAdd.add("Shared ItemStack between " + ChatColorHelper.DARKGREEN + "BartWorks" + ChatColorHelper.GRAY + " and another Mod, that doesn't use the ModContainer propperly!"); - } - } - } - - final Block BLOCK = Block.getBlockFromItem(event.itemStack.getItem()); - if (BLOCK != null && BLOCK != Blocks.air) { - if (BLOCK instanceof BW_Blocks) { - TooltipCache.put(event.itemStack, tooAdd); - return; - } - final BioVatLogicAdder.BlockMetaPair PAIR = new BioVatLogicAdder.BlockMetaPair(BLOCK, (byte) event.itemStack.getItemDamage()); - final HashMap GLASSMAP = BioVatLogicAdder.BioVatGlass.getGlassMap(); - if (GLASSMAP.containsKey(PAIR)) { - int tier = GLASSMAP.get(PAIR); - tooAdd.add( - StatCollector.translateToLocal("tooltip.glas.0.name") + - " " - + BW_ColorUtil.getColorForTier(tier) + GT_Values.VN[tier] + ChatColorHelper.RESET); - } else if (BLOCK.getMaterial().equals(Material.glass)) { - tooAdd.add(StatCollector.translateToLocal("tooltip.glas.0.name") + - " " - + BW_ColorUtil.getColorForTier(3) + GT_Values.VN[3] + ChatColorHelper.RESET); - } - } - - TooltipCache.put(event.itemStack, tooAdd); - event.toolTip.addAll(tooAdd); - } else { - event.toolTip.addAll(TooltipCache.getTooltip(event.itemStack)); - } - } -} \ No newline at end of file diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/client/ClientEventHandler/TooltipEventHandler.java b/src/main/java/com/github/bartimaeusnek/bartworks/client/ClientEventHandler/TooltipEventHandler.java new file mode 100644 index 0000000000..72c0db2735 --- /dev/null +++ b/src/main/java/com/github/bartimaeusnek/bartworks/client/ClientEventHandler/TooltipEventHandler.java @@ -0,0 +1,114 @@ +/* + * 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.bartworks.client.ClientEventHandler; + +import com.github.bartimaeusnek.bartworks.API.BioVatLogicAdder; +import com.github.bartimaeusnek.bartworks.MainMod; +import com.github.bartimaeusnek.bartworks.common.blocks.BW_Blocks; +import com.github.bartimaeusnek.bartworks.system.oredict.OreDictHandler; +import com.github.bartimaeusnek.bartworks.util.BW_ColorUtil; +import com.github.bartimaeusnek.bartworks.util.ChatColorHelper; +import com.github.bartimaeusnek.bartworks.util.Pair; +import com.github.bartimaeusnek.crossmod.BartWorksCrossmod; +import cpw.mods.fml.common.Loader; +import cpw.mods.fml.common.ModContainer; +import cpw.mods.fml.common.eventhandler.EventPriority; +import cpw.mods.fml.common.eventhandler.SubscribeEvent; +import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gregtech.api.enums.GT_Values; +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.init.Blocks; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.StatCollector; +import net.minecraftforge.event.entity.player.ItemTooltipEvent; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; + +@SideOnly(Side.CLIENT) +public class TooltipEventHandler { + + @SideOnly(Side.CLIENT) + @SubscribeEvent(priority = EventPriority.HIGHEST) + public void getTooltip(ItemTooltipEvent event) { + + if (event == null || event.itemStack == null || event.itemStack.getItem() == null) + return; + + if (TooltipCache.getTooltip(event.itemStack).isEmpty()) { + ItemStack tmp = event.itemStack.copy(); + Pair abstractedStack = new Pair<>(Item.getIdFromItem(tmp.getItem()), (short) tmp.getItemDamage()); + List tooAdd = new ArrayList<>(); + if (OreDictHandler.getNonBWCache().contains(abstractedStack)) { + for (Pair pair : OreDictHandler.getNonBWCache()) { + if (pair.equals(abstractedStack)) { + GameRegistry.UniqueIdentifier UI = GameRegistry.findUniqueIdentifierFor(tmp.getItem()); + if (UI == null) + UI = GameRegistry.findUniqueIdentifierFor(Block.getBlockFromItem(tmp.getItem())); + if (UI != null) { + for (ModContainer modContainer : Loader.instance().getModList()) { + if (UI.modId.equals(MainMod.MOD_ID) || UI.modId.equals(BartWorksCrossmod.MOD_ID) || UI.modId.equals("BWCore")) + break; + if (UI.modId.equals(modContainer.getModId())) { + tooAdd.add("Shared ItemStack between " + ChatColorHelper.DARKGREEN + "BartWorks" + ChatColorHelper.GRAY + " and " + ChatColorHelper.RED + modContainer.getName()); + } + } + } else + tooAdd.add("Shared ItemStack between " + ChatColorHelper.DARKGREEN + "BartWorks" + ChatColorHelper.GRAY + " and another Mod, that doesn't use the ModContainer propperly!"); + } + } + } + + final Block BLOCK = Block.getBlockFromItem(event.itemStack.getItem()); + if (BLOCK != null && BLOCK != Blocks.air) { + if (BLOCK instanceof BW_Blocks) { + TooltipCache.put(event.itemStack, tooAdd); + return; + } + final BioVatLogicAdder.BlockMetaPair PAIR = new BioVatLogicAdder.BlockMetaPair(BLOCK, (byte) event.itemStack.getItemDamage()); + final HashMap GLASSMAP = BioVatLogicAdder.BioVatGlass.getGlassMap(); + if (GLASSMAP.containsKey(PAIR)) { + int tier = GLASSMAP.get(PAIR); + tooAdd.add( + StatCollector.translateToLocal("tooltip.glas.0.name") + + " " + + BW_ColorUtil.getColorForTier(tier) + GT_Values.VN[tier] + ChatColorHelper.RESET); + } else if (BLOCK.getMaterial().equals(Material.glass)) { + tooAdd.add(StatCollector.translateToLocal("tooltip.glas.0.name") + + " " + + BW_ColorUtil.getColorForTier(3) + GT_Values.VN[3] + ChatColorHelper.RESET); + } + } + + TooltipCache.put(event.itemStack, tooAdd); + event.toolTip.addAll(tooAdd); + } else { + event.toolTip.addAll(TooltipCache.getTooltip(event.itemStack)); + } + } +} \ No newline at end of file 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> remset = new HashSet<>(); + for (Map.Entry 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); -- cgit