From 143071f60e2666eff9a8645d8546303105fc4084 Mon Sep 17 00:00:00 2001 From: bartimaeusnek <33183715+bartimaeusnek@users.noreply.github.com> Date: Sat, 25 May 2019 21:37:30 +0200 Subject: fixed thorianit exploit +fixed yttrium oxide recipe +added thorium leaf recipe Signed-off-by: bartimaeusnek <33183715+bartimaeusnek@users.noreply.github.com> Former-commit-id: 1a76d7dcfa80617e9be58f914e3aeb01ba223e83 --- .../bartimaeusnek/bartworks/neiHandler/NEI_BW_Config.java | 13 ++++++++++++- .../bartworks/system/material/WerkstoffLoader.java | 3 ++- .../material/processingLoaders/AdditionalRecipes.java | 7 ++++++- 3 files changed, 20 insertions(+), 3 deletions(-) (limited to 'src/main/java/com') diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/neiHandler/NEI_BW_Config.java b/src/main/java/com/github/bartimaeusnek/bartworks/neiHandler/NEI_BW_Config.java index 39aae565bf..d760f09cea 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/neiHandler/NEI_BW_Config.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/neiHandler/NEI_BW_Config.java @@ -22,15 +22,24 @@ package com.github.bartimaeusnek.bartworks.neiHandler; +import codechicken.nei.api.API; import codechicken.nei.api.IConfigureNEI; import com.github.bartimaeusnek.bartworks.MainMod; +import com.github.bartimaeusnek.bartworks.common.loaders.FluidLoader; +import com.github.bartimaeusnek.bartworks.common.loaders.ItemRegistry; import com.github.bartimaeusnek.bartworks.util.BWRecipes; +import cpw.mods.fml.common.Optional; +import net.minecraft.item.ItemStack; +@Optional.Interface(iface = "codechicken.nei.api.API", modid = "NotEnoughItems") public class NEI_BW_Config implements IConfigureNEI { public static boolean sIsAdded = true; public void loadConfig() { + API.hideItem(new ItemStack(ItemRegistry.TAB)); + API.hideItem(new ItemStack(FluidLoader.bioFluidBlock)); + API.hideItem(new ItemStack(ItemRegistry.bw_fake_glasses)); sIsAdded = false; new BW_NEI_OreHandler(); new BW_NEI_BioVatHandler(BWRecipes.instance.getMappingsFor(BWRecipes.BACTERIALVATBYTE)); @@ -38,11 +47,13 @@ public class NEI_BW_Config implements IConfigureNEI { sIsAdded = true; } + @Optional.Method(modid = "NotEnoughItems") public String getName() { return "BartWorks NEI Plugin"; } + @Optional.Method(modid = "NotEnoughItems") public String getVersion() { return MainMod.APIVERSION; } -} +} \ No newline at end of file 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 4d94bfa75b..0570627797 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 @@ -292,8 +292,9 @@ public class WerkstoffLoader implements Runnable { public static final Werkstoff Thorianit = new Werkstoff( new short[]{0x30, 0x30, 0x30, 0}, "Thorianite", + new Werkstoff.Stats().setElektrolysis(true), Werkstoff.Types.COMPOUND, - new Werkstoff.GenerationFeatures().addChemicalRecipes(), + new Werkstoff.GenerationFeatures(), 18, TextureSet.SET_METALLIC, Arrays.asList(Materials.Thorium), diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/processingLoaders/AdditionalRecipes.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/processingLoaders/AdditionalRecipes.java index 667d44342e..799522d347 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/processingLoaders/AdditionalRecipes.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/processingLoaders/AdditionalRecipes.java @@ -26,6 +26,7 @@ import com.github.bartimaeusnek.bartworks.common.loaders.ItemRegistry; import com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader; import com.github.bartimaeusnek.bartworks.util.BW_Util; import gregtech.api.enums.GT_Values; +import gregtech.api.enums.ItemList; import gregtech.api.enums.Materials; import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Utility; @@ -38,9 +39,12 @@ public class AdditionalRecipes implements Runnable { @Override public void run() { - GT_Values.RA.addChemicalRecipe(Materials.Yttrium.getDust(2), GT_Utility.getIntegratedCircuit(11),Materials.Oxygen.getGas(3000),null, WerkstoffLoader.YttriumOxide.get(dust),64, BW_Util.getMachineVoltageFromTier(4)); + //Cubic Circonia + GT_Values.RA.addChemicalRecipe(Materials.Yttrium.getDust(2), GT_Utility.getIntegratedCircuit(11),Materials.Oxygen.getGas(3000),null, WerkstoffLoader.YttriumOxide.get(dust,5),64, BW_Util.getMachineVoltageFromTier(4)); GT_Recipe.GT_Recipe_Map.sBlastRecipes.addRecipe(false, new ItemStack[]{WerkstoffLoader.Zirconium.get(dust,10), WerkstoffLoader.YttriumOxide.get(dust)}, new ItemStack[]{WerkstoffLoader.YttriumOxide.get(dust), WerkstoffLoader.Zirconia.get(gemFlawed, 40)}, (Object) null, (int[]) null, new FluidStack[]{Materials.Oxygen.getGas(20000)}, null, 14400, BW_Util.getMachineVoltageFromTier(4), 2953); + //Thorium/Yttrium Glas GT_Values.RA.addBlastRecipe(WerkstoffLoader.YttriumOxide.get(dustSmall,2),WerkstoffLoader.Thorianit.get(dustSmall,2),Materials.Glass.getMolten(144),null,new ItemStack(ItemRegistry.bw_glasses[0],1,12),null,800,BW_Util.getMachineVoltageFromTier(5),3663); + //Thorianit recipes GT_Values.RA.addSifterRecipe(WerkstoffLoader.Thorianit.get(crushedPurified), new ItemStack[]{ WerkstoffLoader.Thorianit.get(dust), @@ -55,6 +59,7 @@ public class AdditionalRecipes implements Runnable { ); GT_Values.RA.addChemicalRecipe(WerkstoffLoader.Thorianit.get(dust),Materials.Aluminium.getDust(1),Materials.Thorium.getDust(1),1000); GT_Values.RA.addChemicalRecipe(WerkstoffLoader.Thorianit.get(dust),Materials.Magnesium.getDust(1),Materials.Thorium.getDust(1),1000); + GT_Values.RA.addChemicalRecipe(WerkstoffLoader.Thorianit.get(crushed), ItemList.Crop_Drop_Thorium.get(9),Materials.Water.getFluid(1000),Materials.Thorium.getMolten(144),WerkstoffLoader.Thorianit.get(crushedPurified,4),96,24); } } -- cgit From fc3c78ee94729fd57582e86fe2b0b9190df17924 Mon Sep 17 00:00:00 2001 From: bartimaeusnek <33183715+bartimaeusnek@users.noreply.github.com> Date: Mon, 27 May 2019 01:35:24 +0200 Subject: fixed 45% empty space Signed-off-by: bartimaeusnek <33183715+bartimaeusnek@users.noreply.github.com> Former-commit-id: 7be7d38b1d9160b2c4ee9411259bf3b04d582b1e --- .../bartimaeusnek/bartworks/system/oregen/BW_OreLayer.java | 12 +++++++----- .../bartworks/system/oregen/BW_WordGenerator.java | 9 +++++++-- .../bartworks/system/oregen/BW_WorldGenRoss128b.java | 12 ++++++------ 3 files changed, 20 insertions(+), 13 deletions(-) (limited to 'src/main/java/com') diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/oregen/BW_OreLayer.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/oregen/BW_OreLayer.java index d5d13aea13..1c4ffbb8cb 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/system/oregen/BW_OreLayer.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/oregen/BW_OreLayer.java @@ -106,6 +106,8 @@ public abstract class BW_OreLayer extends GT_Worldgen { int cX = aChunkX - aRandom.nextInt(this.mSize); int eX = aChunkX + 16 + aRandom.nextInt(this.mSize); + boolean wasPlaced = false; + for (int tX = cX; tX <= eX; ++tX) { int cZ = aChunkZ - aRandom.nextInt(this.mSize); int eZ = aChunkZ + 16 + aRandom.nextInt(this.mSize); @@ -115,25 +117,25 @@ public abstract class BW_OreLayer extends GT_Worldgen { if (this.mSecondaryMeta > 0) { for (i = tMinY - 1; i < tMinY + 2; ++i) { if (aRandom.nextInt(Math.max(1, Math.max(MathHelper.abs_int(cZ - tZ), MathHelper.abs_int(eZ - tZ)) / this.mDensity)) == 0 || aRandom.nextInt(Math.max(1, Math.max(MathHelper.abs_int(cX - tX), MathHelper.abs_int(eX - tX)) / this.mDensity)) == 0) { - this.setOreBlock(aWorld, tX, i, tZ, this.mSecondaryMeta, false); + wasPlaced = this.setOreBlock(aWorld, tX, i, tZ, this.mSecondaryMeta, false); } } } if (this.mBetweenMeta > 0 && (aRandom.nextInt(Math.max(1, Math.max(MathHelper.abs_int(cZ - tZ), MathHelper.abs_int(eZ - tZ)) / this.mDensity)) == 0 || aRandom.nextInt(Math.max(1, Math.max(MathHelper.abs_int(cX - tX), MathHelper.abs_int(eX - tX)) / this.mDensity)) == 0)) { - this.setOreBlock(aWorld, tX, tMinY + 2 + aRandom.nextInt(2), tZ, this.mBetweenMeta, false); + wasPlaced = this.setOreBlock(aWorld, tX, tMinY + 2 + aRandom.nextInt(2), tZ, this.mBetweenMeta, false); } if (this.mPrimaryMeta > 0) { for (i = tMinY + 3; i < tMinY + 6; ++i) { if (aRandom.nextInt(Math.max(1, Math.max(MathHelper.abs_int(cZ - tZ), MathHelper.abs_int(eZ - tZ)) / this.mDensity)) == 0 || aRandom.nextInt(Math.max(1, Math.max(MathHelper.abs_int(cX - tX), MathHelper.abs_int(eX - tX)) / this.mDensity)) == 0) { - this.setOreBlock(aWorld, tX, i, tZ, this.mPrimaryMeta, false); + wasPlaced = this.setOreBlock(aWorld, tX, i, tZ, this.mPrimaryMeta, false); } } } if (this.mSporadicMeta > 0 && (aRandom.nextInt(Math.max(1, Math.max(MathHelper.abs_int(cZ - tZ), MathHelper.abs_int(eZ - tZ)) / this.mDensity)) == 0 || aRandom.nextInt(Math.max(1, Math.max(MathHelper.abs_int(cX - tX), MathHelper.abs_int(eX - tX)) / this.mDensity)) == 0)) { - this.setOreBlock(aWorld, tX, tMinY - 1 + aRandom.nextInt(7), tZ, this.mSporadicMeta, false); + wasPlaced = this.setOreBlock(aWorld, tX, tMinY - 1 + aRandom.nextInt(7), tZ, this.mSporadicMeta, false); } } } @@ -142,7 +144,7 @@ public abstract class BW_OreLayer extends GT_Worldgen { MainMod.LOGGER.info("Generated Orevein: " + this.mWorldGenName + " " + aChunkX + " " + aChunkZ); } - return true; + return wasPlaced; } } diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/oregen/BW_WordGenerator.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/oregen/BW_WordGenerator.java index 907f1eeaff..2cc26fe8cc 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/system/oregen/BW_WordGenerator.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/oregen/BW_WordGenerator.java @@ -104,9 +104,14 @@ public class BW_WordGenerator implements IWorldGenerator { tRandomWeight -= tWorldGen.mWeight; if (tRandomWeight <= 0) { try { - if (tWorldGen.executeWorldgen(this.mWorld, random, "", this.mDimensionType, xCenter, zCenter, this.mChunkGenerator, this.mChunkProvider)) { - temp = false; + boolean placed; + int attempts = 0; + do{ + placed = tWorldGen.executeWorldgen(this.mWorld, random, "", this.mDimensionType, xCenter, zCenter, this.mChunkGenerator, this.mChunkProvider); + ++attempts; } + while ((!placed) && attempts < 25); + temp = false; break; } catch (Throwable e) { e.printStackTrace(GT_Log.err); 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 95a69f00b0..6037349a51 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 @@ -49,13 +49,13 @@ public class BW_WorldGenRoss128b extends BW_OreLayer { 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, 200, 15, 4, 48, WerkstoffLoader.Olenit, WerkstoffLoader.FluorBuergerit, WerkstoffLoader.ChromoAluminoPovondrait, WerkstoffLoader.VanadioOxyDravit); - new BW_WorldGenRoss128b("ore.mix.ross128.Roquesit", true, 5, 250, 3, 1, 12, WerkstoffLoader.Arsenopyrite, WerkstoffLoader.Ferberite, WerkstoffLoader.Loellingit, WerkstoffLoader.Roquesit); - new BW_WorldGenRoss128b("ore.mix.ross128.Tungstate", true, 5, 250, 10, 4, 14, WerkstoffLoader.Ferberite, WerkstoffLoader.Huebnerit, WerkstoffLoader.Loellingit, Materials.Scheelite); + 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, 180, 50, 2, 32, WerkstoffLoader.Forsterit, WerkstoffLoader.Fayalit, WerkstoffLoader.DescloiziteCUVO4, WerkstoffLoader.DescloiziteZNVO4); - new BW_WorldGenRoss128b("ore.mix.ross128.Hedenbergit", true, 20, 180, 50, 2, 32, WerkstoffLoader.Hedenbergit, WerkstoffLoader.Fayalit, WerkstoffLoader.DescloiziteCUVO4, WerkstoffLoader.DescloiziteZNVO4); - new BW_WorldGenRoss128b("ore.mix.ross128.RedZircon", true, 10, 40, 40, 3, 24, WerkstoffLoader.Fayalit,WerkstoffLoader.FuchsitAL , WerkstoffLoader.RedZircon,WerkstoffLoader.FuchsitCR); + 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); } public static void init_undergroundFluidsRoss128() { -- cgit 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/java/com') 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 From ea461ff484bab83c577f481ad21a5c3a2b949acc Mon Sep 17 00:00:00 2001 From: bartimaeusnek <33183715+bartimaeusnek@users.noreply.github.com> Date: Mon, 3 Jun 2019 01:58:17 +0200 Subject: fixed DEHP recipe Signed-off-by: bartimaeusnek <33183715+bartimaeusnek@users.noreply.github.com> Former-commit-id: f33e956d64f45ddac25a7570fa23cdb954ca6864 --- .../bartworks/common/loaders/RecipeLoader.java | 13 ++++++++++++- .../bartworks/system/material/WerkstoffLoader.java | 9 +++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) (limited to 'src/main/java/com') diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/RecipeLoader.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/RecipeLoader.java index ffcddc4706..7174c2176b 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/RecipeLoader.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/RecipeLoader.java @@ -234,7 +234,18 @@ public class RecipeLoader implements Runnable { } ); else - GT_Values.RA.addAssemblylineRecipe(ItemList.Pump_IV.get(1L), 72000, new ItemStack[]{ItemList.Pump_IV.get(16), GT_OreDictUnificator.get(OrePrefixes.pipeLarge, Materials.Ultimate, 32L), GT_OreDictUnificator.get(OrePrefixes.gearGt, Materials.HSSE, 32L), ItemList.Field_Generator_LuV.get(8)}, new FluidStack[]{Materials.SolderingAlloy.getMolten(32 * 144), Materials.Polytetrafluoroethylene.getMolten(32 * 144)}, ItemRegistry.dehp, 5000, BW_Util.getMachineVoltageFromTier(6)); + GT_Values.RA.addAssemblylineRecipe(ItemList.Pump_IV.get(1L), 72000, + new ItemStack[]{ + ItemList.Pump_IV.get(16), + GT_OreDictUnificator.get(OrePrefixes.pipeLarge, Materials.Ultimate, 32L), + GT_OreDictUnificator.get(OrePrefixes.gearGt, Materials.HSSE, 16L), + GT_OreDictUnificator.get(OrePrefixes.gearGt, Materials.HSSE, 16L), + ItemList.Field_Generator_LuV.get(8) + }, + new FluidStack[]{ + Materials.SolderingAlloy.getMolten(32 * 144), + Materials.Polytetrafluoroethylene.getMolten(32 * 144) + }, ItemRegistry.dehp, 5000, BW_Util.getMachineVoltageFromTier(6)); GT_Values.RA.addAssemblerRecipe(GT_ModHandler.getModItem("gregtech", "gt.blockmachines", 64, 1000), GT_Utility.getIntegratedCircuit(17), Materials.SolderingAlloy.getMolten(9216), ItemRegistry.megaMachines[0], 72000, BW_Util.getMachineVoltageFromTier(3)); GT_Values.RA.addAssemblerRecipe(GT_ModHandler.getModItem("gregtech", "gt.blockmachines", 64, 1002), GT_Utility.getIntegratedCircuit(17), Materials.SolderingAlloy.getMolten(9216), ItemRegistry.megaMachines[1], 72000, BW_Util.getMachineVoltageFromTier(3)); 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 cfbc3956d7..3f9113f07f 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 @@ -460,6 +460,15 @@ public class WerkstoffLoader implements Runnable { 30, TextureSet.SET_METALLIC ); +// public static final Werkstoff BismuthTellurite = new Werkstoff( +// new short[]{0,64,0,0}, +// "Bismuth Tellurite", +// new Werkstoff.Stats().setElektrolysis(true).setToxic(true), +// Werkstoff.Types.COMPOUND, +// new Werkstoff.GenerationFeatures().disable().onlyDust().addChemicalRecipes(), +// 31, +// TextureSet.SET_METALLIC +// ); public static HashMap items = new HashMap<>(); public static Block BWOres; -- cgit