From 98a0ca6df251d7fc1070b1ffb6fa43da950f4280 Mon Sep 17 00:00:00 2001 From: Alkalus Date: Wed, 23 Aug 2017 08:39:36 +1000 Subject: % More Reactor Work. $ None of my items give the radiation de-buff when in creative any more. --- src/Java/gtPlusPlus/core/item/base/BaseItemComponent.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/Java/gtPlusPlus/core/item') diff --git a/src/Java/gtPlusPlus/core/item/base/BaseItemComponent.java b/src/Java/gtPlusPlus/core/item/base/BaseItemComponent.java index 4731581d83..35f1942040 100644 --- a/src/Java/gtPlusPlus/core/item/base/BaseItemComponent.java +++ b/src/Java/gtPlusPlus/core/item/base/BaseItemComponent.java @@ -187,7 +187,11 @@ public class BaseItemComponent extends Item{ @Override public void onUpdate(final ItemStack iStack, final World world, final Entity entityHolding, final int p_77663_4_, final boolean p_77663_5_) { if (this.componentMaterial != null){ - EntityUtils.applyRadiationDamageToEntity(this.componentMaterial.vRadiationLevel, world, entityHolding); + if (entityHolding instanceof EntityPlayer){ + if (!((EntityPlayer) entityHolding).capabilities.isCreativeMode){ + EntityUtils.applyRadiationDamageToEntity(this.componentMaterial.vRadiationLevel, world, entityHolding); + } + } } } -- cgit From a39d264c0d3014fea0f73d20618093268420faaa Mon Sep 17 00:00:00 2001 From: Alkalus Date: Wed, 23 Aug 2017 15:24:35 +1000 Subject: + Added LFTR block recipes. + Added LFTR Control Circuit. $ Changed Material logging. Fixes #126. --- src/Java/gtPlusPlus/GTplusplus.java | 6 ++ src/Java/gtPlusPlus/core/item/ModItems.java | 6 ++ src/Java/gtPlusPlus/core/item/base/CoreItem.java | 20 +++++++ src/Java/gtPlusPlus/core/material/Material.java | 64 ++++++++++----------- .../core/material/gregtech/CustomGTMaterials.java | 6 +- .../core/recipe/RECIPES_MachineComponents.java | 16 ++---- .../gtPlusPlus/core/recipe/RECIPES_Machines.java | 57 ++++++++++++++---- src/Java/gtPlusPlus/core/recipe/common/CI.java | 10 ++++ src/Java/gtPlusPlus/core/util/Utils.java | 4 +- .../miscutils/textures/items/itemCircuitLFTR.png | Bin 0 -> 181 bytes 10 files changed, 133 insertions(+), 56 deletions(-) create mode 100644 src/resources/assets/miscutils/textures/items/itemCircuitLFTR.png (limited to 'src/Java/gtPlusPlus/core/item') diff --git a/src/Java/gtPlusPlus/GTplusplus.java b/src/Java/gtPlusPlus/GTplusplus.java index bd64028027..bd79aeb764 100644 --- a/src/Java/gtPlusPlus/GTplusplus.java +++ b/src/Java/gtPlusPlus/GTplusplus.java @@ -31,6 +31,7 @@ import gtPlusPlus.core.handler.Recipes.RegistrationHandler; import gtPlusPlus.core.handler.events.LoginEventHandler; import gtPlusPlus.core.item.general.RF2EU_Battery; import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.material.gregtech.CustomGTMaterials; import gtPlusPlus.core.util.Utils; import gtPlusPlus.core.util.item.ItemUtils; import gtPlusPlus.core.util.reflect.ReflectionUtils; @@ -207,6 +208,11 @@ public class GTplusplus implements ActionListener { FMLCommonHandler.instance().bus().register(new LoginEventHandler()); Utils.LOG_INFO("Login Handler Initialized"); + //Early load materials + try { + CustomGTMaterials.run(); + } catch (Throwable t){} + if (CORE.configSwitches.enableOldGTcircuits && CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK){ removeCircuitRecipeMap(); //Bye shitty recipes. } diff --git a/src/Java/gtPlusPlus/core/item/ModItems.java b/src/Java/gtPlusPlus/core/item/ModItems.java index 3a242ea10b..fbfb8ed1fa 100644 --- a/src/Java/gtPlusPlus/core/item/ModItems.java +++ b/src/Java/gtPlusPlus/core/item/ModItems.java @@ -217,6 +217,8 @@ public final class ModItems { public static Item itemCoalCoke; + public static CoreItem itemCircuitLFTR; + @@ -480,6 +482,10 @@ public final class ModItems { dustLi2BeF4 = ItemUtils.generateSpecialUseDusts("Li2BeF4", "Li2BeF4 Fuel Compound", Utils.rgbtoHexValue(255, 255, 255))[0]; //https://en.wikipedia.org/wiki/FLiBe fluidFLiBeSalt = FluidUtils.generateFluid("Li2BeF4", "Li2BeF4", 7430, new short[]{255, 255, 255, 100}); + //LFTR Control Circuit + itemCircuitLFTR = new CoreItem("itemCircuitLFTR", ""+EnumChatFormatting.GREEN+"Thorium Reactor Control Circuit", AddToCreativeTab.tabMisc, 1, 0, "Helps your LFTR not explode", EnumRarity.epic, EnumChatFormatting.GREEN, false, null); + + //Zirconium //Cinter Pellet. itemZirconiumChlorideCinterPellet = new CoreItem("itemZirconiumPellet", "Zirconium Pellet ["+StringUtils.subscript("ZrCl4")+"]", tabMisc).setTextureName(CORE.MODID + ":itemShard"); diff --git a/src/Java/gtPlusPlus/core/item/base/CoreItem.java b/src/Java/gtPlusPlus/core/item/base/CoreItem.java index 62fc5c0160..951d2050f5 100644 --- a/src/Java/gtPlusPlus/core/item/base/CoreItem.java +++ b/src/Java/gtPlusPlus/core/item/base/CoreItem.java @@ -132,6 +132,26 @@ public class CoreItem extends Item GameRegistry.registerItem(this, unlocalizedName); } + //6 + /* + * Name, Tab, Stack, Dmg, Description, Rarity, Text Colour, Effect + */ + public CoreItem(final String unlocalizedName, final String displayName, final CreativeTabs creativeTab, final int stackSize, final int maxDmg, final String description, final EnumRarity regRarity, final EnumChatFormatting colour, final boolean Effect, final ItemStack OverrideItem) + { + this.setUnlocalizedName(unlocalizedName); + this.itemName = displayName; + this.setTextureName(CORE.MODID + ":" + unlocalizedName); + this.setCreativeTab(creativeTab); + this.setMaxStackSize(stackSize); + this.setMaxDamage(maxDmg); + this.rarity = regRarity; + this.itemDescription = description; + this.descColour = colour; + this.hasEffect = Effect; + this.turnsInto = OverrideItem; + GameRegistry.registerItem(this, unlocalizedName); + } + @SuppressWarnings({ "unchecked", "rawtypes" }) @Override public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) { diff --git a/src/Java/gtPlusPlus/core/material/Material.java b/src/Java/gtPlusPlus/core/material/Material.java index c7d50c55b2..d4d306d5af 100644 --- a/src/Java/gtPlusPlus/core/material/Material.java +++ b/src/Java/gtPlusPlus/core/material/Material.java @@ -228,11 +228,11 @@ public class Material { this.vChemicalFormula = this.getToolTip(chemicalSymbol, OrePrefixes.dust.mMaterialAmount / M, true); } else if (!this.vChemicalSymbol.equals("")){ - Utils.LOG_MACHINE_INFO("materialInput is null, using a valid chemical symbol."); + Utils.LOG_WARNING("materialInput is null, using a valid chemical symbol."); this.vChemicalFormula = this.vChemicalSymbol; } else{ - Utils.LOG_MACHINE_INFO("MaterialInput == null && chemicalSymbol probably equals nothing"); + Utils.LOG_WARNING("MaterialInput == null && chemicalSymbol probably equals nothing"); this.vChemicalFormula = "??"; } @@ -268,13 +268,13 @@ public class Material { } } - Utils.LOG_MACHINE_INFO("Creating a Material instance for "+materialName); - Utils.LOG_MACHINE_INFO("Formula: "+this.vChemicalFormula + " Smallest Stack: "+this.smallestStackSizeWhenProcessing+" Smallest Ratio:"+ratio); - Utils.LOG_MACHINE_INFO("Protons: "+this.vProtons); - Utils.LOG_MACHINE_INFO("Neutrons: "+this.vNeutrons); - Utils.LOG_MACHINE_INFO("Mass: "+this.vMass+"/units"); - Utils.LOG_MACHINE_INFO("Melting Point: "+this.meltingPointC+"C."); - Utils.LOG_MACHINE_INFO("Boiling Point: "+this.boilingPointC+"C."); + Utils.LOG_WARNING("Creating a Material instance for "+materialName); + Utils.LOG_WARNING("Formula: "+this.vChemicalFormula + " Smallest Stack: "+this.smallestStackSizeWhenProcessing+" Smallest Ratio:"+ratio); + Utils.LOG_WARNING("Protons: "+this.vProtons); + Utils.LOG_WARNING("Neutrons: "+this.vNeutrons); + Utils.LOG_WARNING("Mass: "+this.vMass+"/units"); + Utils.LOG_WARNING("Melting Point: "+this.meltingPointC+"C."); + Utils.LOG_WARNING("Boiling Point: "+this.boilingPointC+"C."); } public final String getLocalizedName(){ @@ -428,21 +428,21 @@ public class Material { if (!this.vMaterialInput.isEmpty()){ final ItemStack[] temp = new ItemStack[this.vMaterialInput.size()]; for (int i=0;i tempInput){ if (tempInput != null){ if (!tempInput.isEmpty()){ - Utils.LOG_MACHINE_INFO("length: "+tempInput.size()); - Utils.LOG_MACHINE_INFO("(inputs != null): "+(tempInput != null)); - //Utils.LOG_MACHINE_INFO("length: "+inputs.length); + Utils.LOG_WARNING("length: "+tempInput.size()); + Utils.LOG_WARNING("(inputs != null): "+(tempInput != null)); + //Utils.LOG_WARNING("length: "+inputs.length); final long[] tempRatio = new long[tempInput.size()]; for (int x=0;x0 ? this.vMaterialInput.size() : 1); - Utils.LOG_MACHINE_INFO("Dividing "+meltingPoint+" / "+divisor+" to get average melting point."); + Utils.LOG_WARNING("Dividing "+meltingPoint+" / "+divisor+" to get average melting point."); meltingPoint = (meltingPoint/divisor); return meltingPoint; } diff --git a/src/Java/gtPlusPlus/core/material/gregtech/CustomGTMaterials.java b/src/Java/gtPlusPlus/core/material/gregtech/CustomGTMaterials.java index 1d8927e87a..2b9cec5ff1 100644 --- a/src/Java/gtPlusPlus/core/material/gregtech/CustomGTMaterials.java +++ b/src/Java/gtPlusPlus/core/material/gregtech/CustomGTMaterials.java @@ -39,9 +39,13 @@ public class CustomGTMaterials { public static Materials Geikielite = materialBuilder(1234, TextureSet.SET_SHINY, new int[]{1,2,3}, "Geikielite", Dyes.dyeBlack, Arrays.asList(new MaterialStack(Titanium, 1), new MaterialStack(Magnesium, 1), new MaterialStack(Oxygen, 3))); public static Materials Zirconolite = materialBuilder(1235, TextureSet.SET_METALLIC, new int[]{1,2,3}, "Zirconolite", Dyes.dyeBlack, Arrays.asList(new MaterialStack(Calcium, 1), new MaterialStack(Zirconium, 1), new MaterialStack(Titanium, 2), new MaterialStack(Oxygen, 7))); + public static final void run(){ + Utils.LOG_INFO("Trying to initialise custom materials."); + } + private final static boolean registerMaterial(Materials r){ Custom_GT_Materials.add(r); - Utils.LOG_INFO("Registered new Gregtech material - "+r.mName); + Utils.LOG_INFO("[Custom] Registered new Gregtech material - "+r.mName); return true; } diff --git a/src/Java/gtPlusPlus/core/recipe/RECIPES_MachineComponents.java b/src/Java/gtPlusPlus/core/recipe/RECIPES_MachineComponents.java index c6d03b345b..fb3aa64564 100644 --- a/src/Java/gtPlusPlus/core/recipe/RECIPES_MachineComponents.java +++ b/src/Java/gtPlusPlus/core/recipe/RECIPES_MachineComponents.java @@ -93,10 +93,6 @@ public class RECIPES_MachineComponents { public static String smallGearTier9 = "gearGtSmallOsmium"; public static String smallGearTier10 = "gearGtSmallNeutronium"; - //Crafting Tools - public static String craftingToolWrench = "craftingToolWrench"; - public static String craftingToolScrewdriver = "craftingToolScrewdriver"; - public static final void RECIPES_LOAD(){ Utils.LOG_INFO("Loading Recipes for the Various Circuits and Machine components."); if (!CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK){ @@ -135,22 +131,22 @@ public class RECIPES_MachineComponents { //Electric Pump RecipeUtils.addShapedGregtechRecipe( cableTier7, rotorTier7, itemRubberRing, - craftingToolScrewdriver, pipeTier7, craftingToolWrench, + CI.craftingToolScrewdriver, pipeTier7, CI.craftingToolWrench, itemRubberRing, CI.electricMotor_LuV, cableTier7, CI.electricPump_LuV); RecipeUtils.addShapedGregtechRecipe( cableTier8, rotorTier8, itemRubberRing, - craftingToolScrewdriver, pipeTier8, craftingToolWrench, + CI.craftingToolScrewdriver, pipeTier8, CI.craftingToolWrench, itemRubberRing, CI.electricMotor_ZPM, cableTier8, CI.electricPump_ZPM); RecipeUtils.addShapedGregtechRecipe( cableTier9, rotorTier9, itemRubberRing, - craftingToolScrewdriver, pipeTier9, craftingToolWrench, + CI.craftingToolScrewdriver, pipeTier9, CI.craftingToolWrench, itemRubberRing, CI.electricMotor_UV, cableTier9, CI.electricPump_UV); RecipeUtils.addShapedGregtechRecipe( cableTier10, rotorTier10, itemRubberRing, - craftingToolScrewdriver, pipeTier10, craftingToolWrench, + CI.craftingToolScrewdriver, pipeTier10, CI.craftingToolWrench, itemRubberRing, CI.electricMotor_MAX, cableTier10, CI.electricPump_MAX); @@ -301,7 +297,7 @@ public class RECIPES_MachineComponents { RecipeUtils.addShapedGregtechRecipe( cableTier0, rotorTier0, itemRubberRing, - craftingToolScrewdriver, pipeTier0, craftingToolWrench, + CI.craftingToolScrewdriver, pipeTier0, CI.craftingToolWrench, itemRubberRing, CI.electricMotor_ULV, cableTier0, CI.electricPump_ULV); @@ -350,7 +346,7 @@ public class RECIPES_MachineComponents { CI.electricMotor_MAX); RecipeUtils.addShapedGregtechRecipe( cableTier10, rotorTier10, itemRubberRing, - craftingToolScrewdriver, pipeTier10, craftingToolWrench, + CI.craftingToolScrewdriver, pipeTier10, CI.craftingToolWrench, itemRubberRing, CI.electricMotor_MAX, cableTier10, CI.electricPump_MAX); RecipeUtils.addShapedGregtechRecipe( diff --git a/src/Java/gtPlusPlus/core/recipe/RECIPES_Machines.java b/src/Java/gtPlusPlus/core/recipe/RECIPES_Machines.java index effff15171..1818666e63 100644 --- a/src/Java/gtPlusPlus/core/recipe/RECIPES_Machines.java +++ b/src/Java/gtPlusPlus/core/recipe/RECIPES_Machines.java @@ -74,8 +74,13 @@ public class RECIPES_Machines { //Thermal Boiler public static ItemStack RECIPE_ThermalBoilerController; public static ItemStack RECIPE_ThermalBoilerCasing; - - + + //Thorium Reactor + public static ItemStack RECIPE_LFTRController; + public static ItemStack RECIPE_LFTROuterCasing; + public static ItemStack RECIPE_LFTRInnerCasing; + + //Buffer Cores public static ItemStack RECIPE_BufferCore_ULV = ItemUtils.getItemStack("miscutils:item.itemBufferCore1", 1); public static ItemStack RECIPE_BufferCore_LV = ItemUtils.getItemStack("miscutils:item.itemBufferCore2", 1); @@ -222,7 +227,7 @@ public class RECIPES_Machines { private static void runModRecipes(){ if (LoadedMods.Gregtech){ - + //Computer Cube RecipeUtils.addShapedGregtechRecipe( CI.getDataOrb(),ItemList.Cover_Screen.get(1),"circuitMaster", @@ -756,7 +761,7 @@ public class RECIPES_Machines { "plateTitanium",CI.machineHull_EV,"plateTitanium", RECIPE_TesseractTerminal); } - + if (CORE.configSwitches.enableMachine_SimpleWasher){ ItemStack plateWrought = ItemUtils.getItemStackOfAmountFromOreDict("plateWroughtIron", 1); ItemStack washerPipe; @@ -773,7 +778,7 @@ public class RECIPES_Machines { plateWrought, CI.machineCasing_ULV, plateWrought, GregtechItemList.SimpleDustWasher.get(1)); } - + if (CORE.configSwitches.enableMachine_Pollution){ RecipeUtils.addShapedGregtechRecipe( "plateCarbon", "plateCarbon", "plateCarbon", @@ -781,39 +786,67 @@ public class RECIPES_Machines { "plateCarbon", "plateCarbon", "plateCarbon", ItemUtils.simpleMetaStack(ModItems.itemAirFilter, 0, 1)); } - + if (CORE.configSwitches.enableMachine_ThermalBoiler){ RECIPE_ThermalBoilerController = GregtechItemList.GT4_Thermal_Boiler.get(1); RECIPE_ThermalBoilerCasing = GregtechItemList.Casing_ThermalContainment.get(4); ItemStack centrifugeHV = ItemList.Machine_HV_Centrifuge.get(1); - + RecipeUtils.addShapedGregtechRecipe( "craftingGeothermalGenerator", centrifugeHV, "craftingGeothermalGenerator", "gearTitanium", "circuitElite", "gearTitanium", "craftingGeothermalGenerator", centrifugeHV, "craftingGeothermalGenerator", RECIPE_ThermalBoilerController); - + RecipeUtils.addShapedGregtechRecipe( "craftingGeothermalGenerator", centrifugeHV, "craftingGeothermalGenerator", "gearTungstenSteel", "circuitElite", "gearTungstenSteel", "craftingGeothermalGenerator", centrifugeHV, "craftingGeothermalGenerator", RECIPE_ThermalBoilerController); - + RecipeUtils.addShapedGregtechRecipe( "plateStainlessSteel", "plateStainlessSteel", "plateStainlessSteel", "circuitAdvanced", CI.machineCasing_HV, "circuitAdvanced", "plateStainlessSteel", "plateStainlessSteel", "plateStainlessSteel", RECIPE_ThermalBoilerCasing); - + //Lava Filter Recipe GT_Values.RA.addAssemblerRecipe(ItemUtils.getItemStackWithMeta(LoadedMods.IndustrialCraft2, "IC2:itemPartCarbonMesh", "RawCarbonMesh", 0, 8), GT_Values.NI, ItemUtils.getSimpleStack(ModItems.itemLavaFilter), 80*20, 16); } - + if (CORE.configSwitches.enableMultiblock_LiquidFluorideThoriumReactor){ - } + //Thorium Reactor + RECIPE_LFTRController = GregtechItemList.ThoriumReactor.get(1); + RECIPE_LFTRInnerCasing = GregtechItemList.Casing_Reactor_II.get(1); //Zeron + RECIPE_LFTROuterCasing = GregtechItemList.Casing_Reactor_I.get(1); //Hastelloy + + ItemStack controlCircuit = ItemUtils.getSimpleStack(ModItems.itemCircuitLFTR); + RecipeUtils.addShapedGregtechRecipe( + controlCircuit, "cableGt12NaquadahAlloy", controlCircuit, + "plateDoubleHastelloyN", ItemList.Cover_Screen.get(1), "plateDoubleHastelloyN", + "plateThorium232", CI.machineCasing_UV, "plateThorium232", + RECIPE_LFTRController); + RecipeUtils.addShapedGregtechRecipe( + "plateDoubleZeron100", CI.craftingToolScrewdriver, "plateDoubleZeron100", + "gearTalonite", CI.fieldGenerator_ULV, "gearTalonite", + "plateDoubleZeron100", CI.craftingToolHammer_Hard, "plateDoubleZeron100", + RECIPE_LFTRInnerCasing); + ItemStack IC2HeatPlate = ItemUtils.getCorrectStacktype("IC2:ic2.reactorPlatingHeat", 1); + RecipeUtils.addShapedGregtechRecipe( + "plateDoubleHastelloyN", IC2HeatPlate, "plateDoubleHastelloyN", + IC2HeatPlate, "frameGtHastelloyC276", IC2HeatPlate, + "plateDoubleHastelloyN", IC2HeatPlate, "plateDoubleHastelloyN", + RECIPE_LFTROuterCasing); + + //LFTR Control Circuit + ItemStack circuitT5 = ItemList.Circuit_Master.get(1); + GT_Values.RA.addAssemblerRecipe(circuitT5, CI.fieldGenerator_MV, controlCircuit, 240*20, 240); + + } + } Utils.LOG_INFO("Done loading recipes for the Various machine blocks."); } } \ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/recipe/common/CI.java b/src/Java/gtPlusPlus/core/recipe/common/CI.java index 37f9dca0e6..46f7f6e0e9 100644 --- a/src/Java/gtPlusPlus/core/recipe/common/CI.java +++ b/src/Java/gtPlusPlus/core/recipe/common/CI.java @@ -143,6 +143,16 @@ public class CI { public static String[] component_Plate; public static String[] component_Rod; public static String[] component_Ingot; + + //Crafting Tools + public static String craftingToolWrench = "craftingToolWrench"; + public static String craftingToolHammer_Hard = "craftingToolHardHammer"; + public static String craftingToolHammer_Soft = "craftingToolSoftHammer"; + public static String craftingToolScrewdriver = "craftingToolScrewdriver"; + public static String craftingToolFile = "craftingToolFile"; + public static String craftingToolKnife = "craftingToolKnife"; + public static String craftingToolCrowbar = "craftingToolCrowbar"; + public static String craftingToolWireCutter = "craftingToolWirecutter"; public static void Init(){ diff --git a/src/Java/gtPlusPlus/core/util/Utils.java b/src/Java/gtPlusPlus/core/util/Utils.java index 471fcadb62..0653420e5b 100644 --- a/src/Java/gtPlusPlus/core/util/Utils.java +++ b/src/Java/gtPlusPlus/core/util/Utils.java @@ -22,6 +22,7 @@ import gtPlusPlus.core.proxy.ClientProxy; import gtPlusPlus.core.util.fluid.FluidUtils; import gtPlusPlus.core.util.item.ItemUtils; import gtPlusPlus.core.util.math.MathUtils; +import gtPlusPlus.core.util.reflect.ReflectionUtils; import ic2.core.Ic2Items; import ic2.core.init.InternalName; import ic2.core.item.resources.ItemCell; @@ -179,7 +180,8 @@ public class Utils { //Non-Dev Comments public static void LOG_MACHINE_INFO(final String s){ if (CORE.configSwitches.MACHINE_INFO || ClientProxy.playerName.toLowerCase().contains("draknyte1")){ - modLogger.info("Machine Info: "+s); + String name1 = gtPlusPlus.core.util.reflect.ReflectionUtils.getMethodName(2); + modLogger.info("Machine Info: "+s+" | "+name1); } } diff --git a/src/resources/assets/miscutils/textures/items/itemCircuitLFTR.png b/src/resources/assets/miscutils/textures/items/itemCircuitLFTR.png new file mode 100644 index 0000000000..723f62e278 Binary files /dev/null and b/src/resources/assets/miscutils/textures/items/itemCircuitLFTR.png differ -- cgit From 434912367696b7a07ba988daac5c5d6e7036425d Mon Sep 17 00:00:00 2001 From: Alkalus Date: Wed, 23 Aug 2017 16:05:21 +1000 Subject: % Tweaked LFTR circuit tooltip colour. $ Fixed LFTR Texture colouring issue. --- src/Java/gtPlusPlus/core/item/ModItems.java | 2 +- .../machines/multi/GregtechMTE_NuclearReactor.java | 34 ++++++++++++++++------ 2 files changed, 26 insertions(+), 10 deletions(-) (limited to 'src/Java/gtPlusPlus/core/item') diff --git a/src/Java/gtPlusPlus/core/item/ModItems.java b/src/Java/gtPlusPlus/core/item/ModItems.java index fbfb8ed1fa..ec32b0bb9f 100644 --- a/src/Java/gtPlusPlus/core/item/ModItems.java +++ b/src/Java/gtPlusPlus/core/item/ModItems.java @@ -483,7 +483,7 @@ public final class ModItems { fluidFLiBeSalt = FluidUtils.generateFluid("Li2BeF4", "Li2BeF4", 7430, new short[]{255, 255, 255, 100}); //LFTR Control Circuit - itemCircuitLFTR = new CoreItem("itemCircuitLFTR", ""+EnumChatFormatting.GREEN+"Thorium Reactor Control Circuit", AddToCreativeTab.tabMisc, 1, 0, "Helps your LFTR not explode", EnumRarity.epic, EnumChatFormatting.GREEN, false, null); + itemCircuitLFTR = new CoreItem("itemCircuitLFTR", ""+EnumChatFormatting.GREEN+"Thorium Reactor Control Circuit", AddToCreativeTab.tabMisc, 1, 0, "Helps your LFTR not explode", EnumRarity.epic, EnumChatFormatting.DARK_GREEN, false, null); //Zirconium diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMTE_NuclearReactor.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMTE_NuclearReactor.java index 012e751e88..a84d1d61ec 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMTE_NuclearReactor.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMTE_NuclearReactor.java @@ -108,11 +108,22 @@ public class GregtechMTE_NuclearReactor extends GT_MetaTileEntity_MultiBlockBase @Override public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { - if (aSide == aFacing) { - return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[TAE.GTPP_INDEX(12)], - new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_REPLICATOR_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_REPLICATOR)}; + if (!aBaseMetaTileEntity.isActive() || this.mEfficiency < 500){ + if (aSide == aFacing) { + return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[TAE.GTPP_INDEX(12)], + new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_REPLICATOR_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_REPLICATOR)}; + } + return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[TAE.GTPP_INDEX(12)]}; + } + else if(aBaseMetaTileEntity.isActive() && this.mEfficiency >= 500){ + if (aSide == aFacing) { + return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[TAE.GTPP_INDEX(13)], + new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_REPLICATOR_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_REPLICATOR)}; + } + return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[TAE.GTPP_INDEX(13)]}; } return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[TAE.GTPP_INDEX(12)]}; + } @Override @@ -301,7 +312,7 @@ public class GregtechMTE_NuclearReactor extends GT_MetaTileEntity_MultiBlockBase this.mHardHammer = true; this.mSolderingTool = true; this.mCrowbar = true; - this.turnCasingActive(true); + this.turnCasingActive(false); Utils.LOG_INFO("Multiblock Formed."); return true; } @@ -344,27 +355,27 @@ public class GregtechMTE_NuclearReactor extends GT_MetaTileEntity_MultiBlockBase //TODO if (this.mDynamoHatches != null) { for (final GT_MetaTileEntity_Hatch_Dynamo hatch : this.mDynamoHatches) { - hatch.mMachineBlock = status ? (byte) TAE.GTPP_INDEX(12) : (byte) TAE.GTPP_INDEX(13); + hatch.mMachineBlock = status ? (byte) TAE.GTPP_INDEX(13) : (byte) TAE.GTPP_INDEX(12); } } if (this.mMufflerHatches != null) { for (final GT_MetaTileEntity_Hatch_Muffler hatch : this.mMufflerHatches) { - hatch.mMachineBlock = status ? (byte) TAE.GTPP_INDEX(12) : (byte) TAE.GTPP_INDEX(13); + hatch.mMachineBlock = status ? (byte) TAE.GTPP_INDEX(13) : (byte) TAE.GTPP_INDEX(12); } } if (this.mOutputHatches != null) { for (final GT_MetaTileEntity_Hatch_Output hatch : this.mOutputHatches) { - hatch.mMachineBlock = status ? (byte) TAE.GTPP_INDEX(12) : (byte) TAE.GTPP_INDEX(13); + hatch.mMachineBlock = status ? (byte) TAE.GTPP_INDEX(13) : (byte) TAE.GTPP_INDEX(12); } } if (this.mInputHatches != null) { for (final GT_MetaTileEntity_Hatch_Input hatch : this.mInputHatches) { - hatch.mMachineBlock = status ? (byte) TAE.GTPP_INDEX(12) : (byte) TAE.GTPP_INDEX(13); + hatch.mMachineBlock = status ? (byte) TAE.GTPP_INDEX(13) : (byte) TAE.GTPP_INDEX(12); } } if (this.mMaintenanceHatches != null) { for (final GT_MetaTileEntity_Hatch_Maintenance hatch : this.mMaintenanceHatches) { - hatch.mMachineBlock = status ? (byte) TAE.GTPP_INDEX(12) : (byte) TAE.GTPP_INDEX(13); + hatch.mMachineBlock = status ? (byte) TAE.GTPP_INDEX(13) : (byte) TAE.GTPP_INDEX(12); } } return true; @@ -618,9 +629,11 @@ public class GregtechMTE_NuclearReactor extends GT_MetaTileEntity_MultiBlockBase if (this.mEfficiency >= 500){ this.boostEu = true; + this.turnCasingActive(true); } else { this.boostEu = false; + this.turnCasingActive(false); } @@ -636,6 +649,9 @@ public class GregtechMTE_NuclearReactor extends GT_MetaTileEntity_MultiBlockBase } } + else { + this.turnCasingActive(false); + } super.onPostTick(aBaseMetaTileEntity, aTick); } -- cgit