gregtech.api.enums.Materials Java Examples
The following examples show how to use
gregtech.api.enums.Materials.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: BacteriaRegistry.java From NewHorizonsCoreMod with GNU General Public License v3.0 | 6 votes |
private void runAdditionalFuelRecipes(){ //XenoxRecycleRecipe GT_Values.RA.addDistillationTowerRecipe( DelutedXenoxene.getFluid(1000), new FluidStack[]{ Xenoxene.getFluid(250), RadoxLight.getGas(750) }, Ash.getDust(1), 600, BW_Util.getMachineVoltageFromTier(8) ); //LightRadox + Nq -> Enriched Naquadah condensation int aChance, int aDuration, int aEUt, boolean aCleanroom GT_Values.RA.addAutoclaveSpaceRecipe(Materials.Naquadah.getDust(1), GT_Values.NI, RadoxLight.getGas(2000),Materials.NaquadahEnriched.getDust(3),10000,350,BW_Util.getMachineVoltageFromTier(5),false); //super heavy -> heavy radox conversion GT_Values.RA.addCentrifugeRecipe(null,null,RadoxSuperHeavy.getFluid(1000),RadoxHeavy.getFluid(2000),null,null,null,null,null,null,null,60000, BW_Util.getMachineVoltageFromTier(8)); //heavy radox + Nq+ -> Nq* GT_Values.RA.addAutoclaveSpaceRecipe(Materials.NaquadahEnriched.getDust(1), GT_Values.NI,RadoxHeavy.getFluid(4000),Materials.Naquadria.getDust(3),10000,350,BW_Util.getMachineVoltageFromTier(7),false); }
Example #2
Source File: LuVTierEnhancer.java From bartworks with MIT License | 6 votes |
private static void rewriteAsslineRecipes(ItemStack stack, OrePrefixes[] LuVMaterialsGenerated, GT_Recipe.GT_Recipe_AssemblyLine recipe){ for (OrePrefixes prefixes : LuVMaterialsGenerated) { if (LuVTierEnhancer.doStacksCointainAndReplace(recipe.mInputs, stack, false)) { LuVTierEnhancer.doStacksCointainAndReplace(recipe.mInputs, GT_OreDictUnificator.get(prefixes, Materials.Chrome, 1), true, WerkstoffLoader.LuVTierMaterial.get(prefixes)); LuVTierEnhancer.doStacksCointainAndReplace(new Object[]{recipe.mOutput}, GT_OreDictUnificator.get(prefixes, Materials.Chrome, 1), true, WerkstoffLoader.LuVTierMaterial.get(prefixes)); } if (LuVTierEnhancer.doStacksCointainAndReplace(new Object[]{recipe.mOutput}, stack, false)) { LuVTierEnhancer.doStacksCointainAndReplace(recipe.mInputs, GT_OreDictUnificator.get(prefixes, Materials.Chrome, 1), true, WerkstoffLoader.LuVTierMaterial.get(prefixes)); LuVTierEnhancer.doStacksCointainAndReplace(new Object[]{recipe.mOutput}, GT_OreDictUnificator.get(prefixes, Materials.Chrome, 1), true, WerkstoffLoader.LuVTierMaterial.get(prefixes)); } } if (LuVTierEnhancer.doStacksCointainAndReplace(recipe.mInputs, stack, false)) { LuVTierEnhancer.doStacksCointainAndReplace(recipe.mFluidInputs, Materials.Chrome.getMolten(1), true, WerkstoffLoader.LuVTierMaterial.getMolten(1).getFluid()); } if (LuVTierEnhancer.doStacksCointainAndReplace(new Object[]{recipe.mOutput}, stack, false)) { LuVTierEnhancer.doStacksCointainAndReplace(recipe.mFluidInputs, Materials.Chrome.getMolten(1), true, WerkstoffLoader.LuVTierMaterial.getMolten(1).getFluid()); } }
Example #3
Source File: BWAtmosphereManager.java From bartworks with MIT License | 6 votes |
private static boolean addGCGasToWorld(int worldID, IAtmosphericGas gas, int aNumber, int aMaxNumber){ if (gas.equals(IAtmosphericGas.CO2)) { BWAtmosphereManager.addGasToWorld(worldID, Materials.CarbonDioxide, BWAtmosphereManager.COEFFICIENT_MAP.get(aMaxNumber)[aNumber]); return true; } String name = gas.toString(); name = name.substring(0,1)+name.substring(1).toLowerCase(Locale.US); ISubTagContainer mat = Materials.get(name); if (mat == Materials._NULL){ mat = WerkstoffLoader.getWerkstoff(name); } if (mat == Werkstoff.default_null_Werkstoff){ return false; } BWAtmosphereManager.addGasToWorld(worldID, mat, BWAtmosphereManager.COEFFICIENT_MAP.get(aMaxNumber)[aNumber]); return true; }
Example #4
Source File: LuVTierEnhancer.java From bartworks with MIT License | 6 votes |
private static void rewriteMachineRecipes(ItemStack stack, OrePrefixes[] LuVMaterialsGenerated, GT_Recipe recipe){ for (OrePrefixes prefixes : LuVMaterialsGenerated) { if (LuVTierEnhancer.doStacksCointainAndReplace(recipe.mInputs, stack, false)) { LuVTierEnhancer.doStacksCointainAndReplace(recipe.mInputs, GT_OreDictUnificator.get(prefixes, Materials.Chrome, 1), true, WerkstoffLoader.LuVTierMaterial.get(prefixes)); LuVTierEnhancer.doStacksCointainAndReplace(recipe.mOutputs, GT_OreDictUnificator.get(prefixes, Materials.Chrome, 1), true, WerkstoffLoader.LuVTierMaterial.get(prefixes)); } if (LuVTierEnhancer.doStacksCointainAndReplace(recipe.mOutputs, stack, false)) { LuVTierEnhancer.doStacksCointainAndReplace(recipe.mInputs, GT_OreDictUnificator.get(prefixes, Materials.Chrome, 1), true, WerkstoffLoader.LuVTierMaterial.get(prefixes)); LuVTierEnhancer.doStacksCointainAndReplace(recipe.mOutputs, GT_OreDictUnificator.get(prefixes, Materials.Chrome, 1), true, WerkstoffLoader.LuVTierMaterial.get(prefixes)); } } if (LuVTierEnhancer.doStacksCointainAndReplace(recipe.mInputs, stack, false)) { LuVTierEnhancer.doStacksCointainAndReplace(recipe.mFluidInputs, Materials.Chrome.getMolten(1), true, WerkstoffLoader.LuVTierMaterial.getMolten(1).getFluid()); LuVTierEnhancer.doStacksCointainAndReplace(recipe.mFluidOutputs, Materials.Chrome.getMolten(1), true, WerkstoffLoader.LuVTierMaterial.getMolten(1).getFluid()); } if (LuVTierEnhancer.doStacksCointainAndReplace(recipe.mOutputs, stack, false)) { LuVTierEnhancer.doStacksCointainAndReplace(recipe.mFluidInputs, Materials.Chrome.getMolten(1), true, WerkstoffLoader.LuVTierMaterial.getMolten(1).getFluid()); LuVTierEnhancer.doStacksCointainAndReplace(recipe.mFluidOutputs, Materials.Chrome.getMolten(1), true, WerkstoffLoader.LuVTierMaterial.getMolten(1).getFluid()); } }
Example #5
Source File: CircuitImprintLoader.java From bartworks with MIT License | 6 votes |
private static void handleCircuitRecipeRebuilding(GT_Recipe circuitRecipe, HashSet<GT_Recipe> toRem, HashSet<GT_Recipe> toAdd) { ItemStack[] outputs = circuitRecipe.mOutputs; String name = getTypeFromOreDict(outputs); if (name.contains("Circuit") || name.contains("circuit")) { CircuitImprintLoader.recipeTagMap.put(CircuitImprintLoader.getTagFromStack(outputs[0]), circuitRecipe.copy()); if (circuitRecipe.mFluidInputs[0].isFluidEqual(Materials.SolderingAlloy.getMolten(0))) { GT_Recipe newRecipe = CircuitImprintLoader.reBuildRecipe(circuitRecipe); if (newRecipe != null) BWRecipes.instance.getMappingsFor(BWRecipes.CIRCUITASSEMBLYLINE).addRecipe(newRecipe); addCutoffRecipeToSets(toRem,toAdd,circuitRecipe); } else { if (circuitRecipe.mEUt > BW_Util.getTierVoltage(ConfigHandler.cutoffTier)) toRem.add(circuitRecipe); } } }
Example #6
Source File: GT_Loader_Wires.java From NewHorizonsCoreMod with GNU General Public License v3.0 | 6 votes |
private static void makeWires(Materials aMaterial, int aStartID, long aLossInsulated, long aLoss, long aAmperage, long aVoltage, boolean aInsulatable, boolean aAutoInsulated) { String displayName = GT_LanguageManager.i18nPlaceholder ? "%material" : aMaterial.mDefaultLocalName; GT_OreDictUnificator.registerOre(OrePrefixes.wireGt01, aMaterial, new GT_MetaPipeEntity_Cable(aStartID + 0, "wire." + aMaterial.mName.toLowerCase() + ".01", "1x " + displayName + " Wire", 0.125F, aMaterial, aLoss, 1L * aAmperage, aVoltage, false, !aAutoInsulated).getStackForm(1L)); GT_OreDictUnificator.registerOre(OrePrefixes.wireGt02, aMaterial, new GT_MetaPipeEntity_Cable(aStartID + 1, "wire." + aMaterial.mName.toLowerCase() + ".02", "2x " + displayName + " Wire", 0.25F, aMaterial, aLoss, 2L * aAmperage, aVoltage, false, !aAutoInsulated).getStackForm(1L)); GT_OreDictUnificator.registerOre(OrePrefixes.wireGt04, aMaterial, new GT_MetaPipeEntity_Cable(aStartID + 2, "wire." + aMaterial.mName.toLowerCase() + ".04", "4x " + displayName + " Wire", 0.375F, aMaterial, aLoss, 4L * aAmperage, aVoltage, false, !aAutoInsulated).getStackForm(1L)); GT_OreDictUnificator.registerOre(OrePrefixes.wireGt08, aMaterial, new GT_MetaPipeEntity_Cable(aStartID + 3, "wire." + aMaterial.mName.toLowerCase() + ".08", "8x " + displayName + " Wire", 0.5F, aMaterial, aLoss, 8L * aAmperage, aVoltage, false, !aAutoInsulated).getStackForm(1L)); GT_OreDictUnificator.registerOre(OrePrefixes.wireGt12, aMaterial, new GT_MetaPipeEntity_Cable(aStartID + 4, "wire." + aMaterial.mName.toLowerCase() + ".12", "12x " + displayName + " Wire", 0.625F, aMaterial, aLoss, 12L * aAmperage, aVoltage, false, !aAutoInsulated).getStackForm(1L)); GT_OreDictUnificator.registerOre(OrePrefixes.wireGt16, aMaterial, new GT_MetaPipeEntity_Cable(aStartID + 5, "wire." + aMaterial.mName.toLowerCase() + ".16", "16x " + displayName + " Wire", 0.75F, aMaterial, aLoss, 16L * aAmperage, aVoltage, false, !aAutoInsulated).getStackForm(1L)); if (aInsulatable) { GT_OreDictUnificator.registerOre(OrePrefixes.cableGt01, aMaterial, new GT_MetaPipeEntity_Cable(aStartID + 6, "cable." + aMaterial.mName.toLowerCase() + ".01", "1x " + displayName + " Cable", 0.25F, aMaterial, aLossInsulated, 1L * aAmperage, aVoltage, true, false).getStackForm(1L)); GT_OreDictUnificator.registerOre(OrePrefixes.cableGt02, aMaterial, new GT_MetaPipeEntity_Cable(aStartID + 7, "cable." + aMaterial.mName.toLowerCase() + ".02", "2x " + displayName + " Cable", 0.375F, aMaterial, aLossInsulated, 2L * aAmperage, aVoltage, true, false).getStackForm(1L)); GT_OreDictUnificator.registerOre(OrePrefixes.cableGt04, aMaterial, new GT_MetaPipeEntity_Cable(aStartID + 8, "cable." + aMaterial.mName.toLowerCase() + ".04", "4x " + displayName + " Cable", 0.5F, aMaterial, aLossInsulated, 4L * aAmperage, aVoltage, true, false).getStackForm(1L)); GT_OreDictUnificator.registerOre(OrePrefixes.cableGt08, aMaterial, new GT_MetaPipeEntity_Cable(aStartID + 9, "cable." + aMaterial.mName.toLowerCase() + ".08", "8x " + displayName + " Cable", 0.625F, aMaterial, aLossInsulated, 8L * aAmperage, aVoltage, true, false).getStackForm(1L)); GT_OreDictUnificator.registerOre(OrePrefixes.cableGt12, aMaterial, new GT_MetaPipeEntity_Cable(aStartID + 10, "cable." + aMaterial.mName.toLowerCase() + ".12", "12x " + displayName + " Cable", 0.75F, aMaterial, aLossInsulated, 12L * aAmperage, aVoltage, true, false).getStackForm(1L)); GT_OreDictUnificator.registerOre(OrePrefixes.cableGt16, aMaterial, new GT_MetaPipeEntity_Cable(aStartID + 11, "cable." + aMaterial.mName.toLowerCase() + ".16", "16x " + displayName + " Cable", 0.875F, aMaterial, aLossInsulated, 16L * aAmperage, aVoltage, true, false).getStackForm(1L)); } }
Example #7
Source File: PlatinumSludgeOverHaul.java From bartworks with MIT License | 6 votes |
@SuppressWarnings("deprecation") private static void replaceHVCircuitMaterials(){ GT_Values.RA.addMixerRecipe(Materials.Redstone.getDust(1),Materials.Electrum.getDust(1),GT_Utility.getIntegratedCircuit(1),null,null,null,Materials.Nikolite.getDust(8),1800,120); for (GT_Recipe recipe : GT_Recipe.GT_Recipe_Map.sCircuitAssemblerRecipes.mRecipeList){ if (recipe.mEUt > 512) continue; if (BW_Util.checkStackAndPrefix(recipe.mOutputs[0])) { for (int i = 0; i < recipe.mInputs.length; i++) { ItemStack stack = recipe.mInputs[i]; ItemData ass = GT_OreDictUnificator.getAssociation(stack); if (BW_Util.checkStackAndPrefix(stack) && ass.mMaterial.mMaterial.equals(Materials.Platinum)) { recipe.mInputs[i] = GT_OreDictUnificator.get(ass.mPrefix,Materials.BlueAlloy,stack.stackSize); } } } } }
Example #8
Source File: GT_TileEntity_Windmill.java From bartworks with MIT License | 5 votes |
public boolean recipe_fallback(ItemStack aStack) { //sight... fallback to the macerator recipes GT_Recipe.GT_Recipe_Map tMap = GT_Recipe.GT_Recipe_Map.sMaceratorRecipes; GT_Recipe tRecipe = tMap.findRecipe(this.getBaseMetaTileEntity(), false, false, V[1], null, aStack); if (tRecipe == null) return false; if (tRecipe.getOutput(0) != null) { aStack.stackSize--; this.mOutputItems[0] = tRecipe.getOutput(0); if (new XSTR().nextInt(2) == 0) { if (tRecipe.getOutput(1) != null) this.mOutputItems[1] = tRecipe.getOutput(1); else if (!BW_Util.checkStackAndPrefix(this.mOutputItems[0]) || !( BW_Util.checkStackAndPrefix(this.mOutputItems[0]) && GT_OreDictUnificator.getAssociation(this.mOutputItems[0]).mMaterial.mMaterial.mSubTags.contains(SubTag.METAL) || BW_Util.checkStackAndPrefix(this.mOutputItems[0]) && GT_OreDictUnificator.getAssociation(this.mOutputItems[0]).mMaterial.mMaterial.mSubTags.contains(SubTag.CRYSTAL) || BW_Util.checkStackAndPrefix(this.mOutputItems[0]) && GT_OreDictUnificator.getAssociation(this.mOutputItems[0]).mMaterial.mMaterial.mSubTags.contains(SubTag.CRYSTALLISABLE) ) || BW_Util.checkStackAndPrefix(this.mOutputItems[0]) && GT_OreDictUnificator.getAssociation(this.mOutputItems[0]).mMaterial.mMaterial == Materials.Flint || BW_Util.checkStackAndPrefix(this.mOutputItems[0]) && GT_OreDictUnificator.getAssociation(this.mOutputItems[0]).mMaterial.mMaterial == Materials.Sugar || BW_Util.checkStackAndPrefix(this.mOutputItems[0]) && GT_OreDictUnificator.getAssociation(this.mOutputItems[0]).mMaterial.mMaterial == Materials.Wheat || BW_Util.checkStackAndPrefix(this.mOutputItems[0]) && GT_OreDictUnificator.getAssociation(this.mOutputItems[0]).mMaterial.mMaterial == Materials.Wood || BW_Util.checkStackAndPrefix(this.mOutputItems[0]) && GT_OreDictUnificator.getAssociation(this.mOutputItems[0]).mMaterial.mMaterial == Materials.Clay || BW_Util.checkStackAndPrefix(this.mOutputItems[0]) && GT_OreDictUnificator.getAssociation(this.mOutputItems[0]).mMaterial.mMaterial == Materials.Ash || BW_Util.checkStackAndPrefix(this.mOutputItems[0]) && GT_OreDictUnificator.getAssociation(this.mOutputItems[0]).mMaterial.mMaterial == Materials.Snow || BW_Util.checkStackAndPrefix(this.mOutputItems[0]) && GT_OreDictUnificator.getAssociation(this.mOutputItems[0]).mMaterial.mMaterial == Materials.Stone || BW_Util.checkStackAndPrefix(this.mOutputItems[0]) && GT_OreDictUnificator.getAssociation(this.mOutputItems[0]).mMaterial.mMaterial == Materials.MeatRaw || BW_Util.checkStackAndPrefix(this.mOutputItems[0]) && GT_OreDictUnificator.getAssociation(this.mOutputItems[0]).mMaterial.mMaterial == Materials.MeatCooked ) this.mOutputItems[1] = tRecipe.getOutput(0); } } this.mMaxProgresstime = (tRecipe.mDuration * 2 * 100); return true; }
Example #9
Source File: GT5OreSmallHelper.java From GTNEIOrePlugin with MIT License | 5 votes |
public GT5OreSmallHelper() { checkExtraSupport(); ItemStack stack; Materials material; short meta; for (GT_Worldgen worldGen : GregTech_API.sWorldgenList) if (worldGen.mWorldGenName.startsWith("ore.small.") && worldGen instanceof GT_Worldgen_GT_Ore_SmallPieces) { GT_Worldgen_GT_Ore_SmallPieces worldGenSmallPieces = (GT_Worldgen_GT_Ore_SmallPieces)worldGen; meta = worldGenSmallPieces.mMeta; material = GregTech_API.sGeneratedMaterials[meta]; mapOreSmallWrapper.put(worldGen.mWorldGenName, new OreSmallWrapper(worldGenSmallPieces)); if (!mapOreMetaToOreDrops.keySet().contains(meta)) { List<ItemStack> stackList = new ArrayList<ItemStack>(); stack = GT_OreDictUnificator.get(OrePrefixes.gemExquisite, material, GT_OreDictUnificator.get(OrePrefixes.gem, material, 1L), 1L); if (stack != null && !mapOreDropUnlocalizedNameToOreMeta.keySet().contains(stack.getUnlocalizedName())) {mapOreDropUnlocalizedNameToOreMeta.put(stack.getUnlocalizedName(), meta);stackList.add(stack);} stack = GT_OreDictUnificator.get(OrePrefixes.gemFlawless, material, GT_OreDictUnificator.get(OrePrefixes.gem, material, 1L), 1L); if (stack != null && !mapOreDropUnlocalizedNameToOreMeta.keySet().contains(stack.getUnlocalizedName())) {mapOreDropUnlocalizedNameToOreMeta.put(stack.getUnlocalizedName(), meta);stackList.add(stack);} stack = GT_OreDictUnificator.get(OrePrefixes.gem, material, 1L); if (stack != null && !mapOreDropUnlocalizedNameToOreMeta.keySet().contains(stack.getUnlocalizedName())) {mapOreDropUnlocalizedNameToOreMeta.put(stack.getUnlocalizedName(), meta);stackList.add(stack);} stack = GT_OreDictUnificator.get(OrePrefixes.gemFlawed, material, GT_OreDictUnificator.get(OrePrefixes.crushed, material, 1L), 1L); if (stack != null && !mapOreDropUnlocalizedNameToOreMeta.keySet().contains(stack.getUnlocalizedName())) {mapOreDropUnlocalizedNameToOreMeta.put(stack.getUnlocalizedName(), meta);stackList.add(stack);} stack = GT_OreDictUnificator.get(OrePrefixes.crushed, material, 1L); if (stack != null && !mapOreDropUnlocalizedNameToOreMeta.keySet().contains(stack.getUnlocalizedName())) {mapOreDropUnlocalizedNameToOreMeta.put(stack.getUnlocalizedName(), meta);stackList.add(stack);} stack = GT_OreDictUnificator.get(OrePrefixes.gemChipped, material, GT_OreDictUnificator.get(OrePrefixes.dustImpure, material, 1L), 1L); if (stack != null && !mapOreDropUnlocalizedNameToOreMeta.keySet().contains(stack.getUnlocalizedName())) {mapOreDropUnlocalizedNameToOreMeta.put(stack.getUnlocalizedName(), meta);stackList.add(stack);} stack = GT_OreDictUnificator.get(OrePrefixes.dustImpure, material, 1L); if (stack != null && !mapOreDropUnlocalizedNameToOreMeta.keySet().contains(stack.getUnlocalizedName())) {mapOreDropUnlocalizedNameToOreMeta.put(stack.getUnlocalizedName(), meta);stackList.add(stack);} oreSmallList.add(new ItemStack(GregTech_API.sBlockOres1, 1, meta+16000)); mapOreMetaToOreDrops.put(meta, stackList); } } }
Example #10
Source File: BartWorksMaterials.java From NewHorizonsCoreMod with GNU General Public License v3.0 | 5 votes |
public static Materials getBartWorksMaterialByVarName(String name) { Materials materials = Materials._NULL; try { materials = WerkstoffAPI.getWerkstoff(name).getBridgeMaterial(); } catch (NoSuchFieldException | IllegalAccessException exception) { exception.printStackTrace(); } return materials; }
Example #11
Source File: FluidLoader.java From bartworks with MIT License | 5 votes |
public static void run() { FluidLoader.renderID = RenderingRegistry.getNextAvailableRenderId(); short[] rgb = new short[3]; Arrays.fill(rgb, (short) 255); FluidLoader.ff = new GT_Fluid("BWfakeFluid", "molten.autogenerated", rgb); FluidLoader.fulvicAcid = FluidLoader.createAndRegisterFluid("Fulvic Acid", new Color(20, 20, 20)); FluidLoader.heatedfulvicAcid = FluidLoader.createAndRegisterFluid("Heated Fulvic Acid", new Color(40, 20, 20),720); FluidLoader.Kerogen = FluidLoader.createAndRegisterFluid("Kerogen", new Color(85, 85, 85)); FluidLoader.BioLabFluidMaterials = new Fluid[]{ new GT_Fluid("FluorecentdDNA", "molten.autogenerated", new short[]{125, 50, 170, 0}), new GT_Fluid("EnzymesSollution", "molten.autogenerated", new short[]{240, 200, 125, 0}), new GT_Fluid("Penicillin", "molten.autogenerated", new short[]{255, 255, 255, 0}), new GT_Fluid("Polymerase", "molten.autogenerated", new short[]{110, 180, 110, 0}), }; FluidLoader.BioLabFluidCells = new ItemStack[FluidLoader.BioLabFluidMaterials.length]; for (int i = 0; i < FluidLoader.BioLabFluidMaterials.length; i++) { FluidRegistry.registerFluid(FluidLoader.BioLabFluidMaterials[i]); FluidLoader.BioLabFluidCells[i] = ItemFluidCell.getUniversalFluidCell(new FluidStack(FluidLoader.BioLabFluidMaterials[i], 1000)); } // BioCulture.BIO_CULTURE_ARRAY_LIST.get(0).setFluid(new GT_Fluid("_NULL", "molten.autogenerated", BW_Util.splitColorToRBGArray(BioCulture.BIO_CULTURE_ARRAY_LIST.get(0).getColorRGB()))); FluidStack dnaFluid = LoaderReference.gendustry ? FluidRegistry.getFluidStack("liquiddna", 100) : Materials.Biomass.getFluid(100L); for (BioCulture B : BioCulture.BIO_CULTURE_ARRAY_LIST) { if (B.isBreedable()) { B.setFluid(new GT_Fluid(B.getName().replaceAll(" ", "").toLowerCase() + "fluid", "molten.autogenerated", new short[]{(short) B.getColor().getRed(), (short) B.getColor().getBlue(), (short) B.getColor().getGreen()})); FluidRegistry.registerFluid(B.getFluid()); GT_LanguageManager.addStringLocalization(B.getFluid().getUnlocalizedName(), B.getLocalisedName()+" Fluid"); GT_Values.RA.addCentrifugeRecipe(GT_Utility.getIntegratedCircuit(10),GT_Values.NI,new FluidStack(B.getFluid(),1000),dnaFluid,GT_Values.NI,GT_Values.NI,GT_Values.NI,GT_Values.NI,GT_Values.NI,GT_Values.NI,null,500,120); } } FluidLoader.bioFluidBlock = new BioFluidBlock(); GameRegistry.registerBlock(FluidLoader.bioFluidBlock, "coloredFluidBlock"); GameRegistry.registerTileEntity(BWTileEntityDimIDBridge.class, "bwTEDimIDBridge"); if (SideReference.Side.Client) { RenderingRegistry.registerBlockHandler(RendererSwitchingColorFluid.instance); RenderingRegistry.registerBlockHandler(RendererGlasBlock.instance); } }
Example #12
Source File: BWRecipes.java From bartworks with MIT License | 5 votes |
public boolean addTrimmedBacterialVatRecipe(ItemStack[] aInputs, BioCulture aCulture, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, int aDuration, int aEUt, Materials material, @Nonnegative int glasTier, int aSpecialValue, boolean exactSv) { byte gTier = (byte) glasTier; int aSievert = 0; if (material.getProtons() >= 83 || material.getProtons() == 61 || material.getProtons() == 43) aSievert += material.getProtons(); aSievert = aSievert << 1; aSievert = aSievert | (exactSv ? 1 : 0); aSievert = aSievert << 2; aSievert = aSievert | specialToByte(aSpecialValue); aSievert = aSievert << 4; aSievert = aSievert | gTier; return sBacteriaVat.addRecipe(new BacteriaVatRecipe(true, aInputs, null, BioItemList.getPetriDish(aCulture), new int[]{}, aFluidInputs, aFluidOutputs, aDuration, aEUt, aSievert)) != null; }
Example #13
Source File: GT_Loader_Wires.java From NewHorizonsCoreMod with GNU General Public License v3.0 | 5 votes |
private void registerWires() { boolean bEC = !GT_Mod.gregtechproxy.mHardcoreCables; // ID Range: 1200 - 4100 // Free IDs: 2030 - 4100 // =================================================================================================== // Make wires // =================================================================================================== //Takes 20!!! slots per wire makeWires(Materials.ElectrumFlux, 1900, 1L, 2L, 3L, GT_Values.V[8], true, false); makeWires(Materials.Bedrockium, 11310, bEC ? 1L : 16L, bEC ? 32L : 64L, 2L, GT_Values.V[9], true, false); makeWires(Materials.Draconium, 11330, bEC ? 4L : 16L, bEC ? 32L : 64L, 8L, GT_Values.V[10], true, false); makeWires(Materials.NetherStar, 11350, bEC ? 4L : 16L, bEC ? 16L : 32L, 4L, GT_Values.V[11], true, false); makeWires(Materials.Quantium, 11370, bEC ? 4L : 16L, bEC ? 16L : 32L, 2L, GT_Values.V[12], false, false); makeWires(Materials.BlackPlutonium, 11390, bEC ? 4L : 16L, bEC ? 16L : 32L, 1L, GT_Values.V[13], false, false); makeWires(Materials.DraconiumAwakened, 11410, bEC ? 4L : 16L, bEC ? 16L : 32L, 1L, GT_Values.V[14], false, false); makeWires(Materials.Infinity, 11430, 1L, 1L, 8192L, GT_Values.V[15], false, true); /** ID SPACE RESERVED: to 11800, FOR WIRES makeWires(Materials.???, 1920, 4L, 8L, 8L, gregtech.api.enums.GT_Values.V[8], true, false); 2000 and 2010 are used for RedAlloy and Super Conductor **/ }
Example #14
Source File: BW_Util.java From bartworks with MIT License | 5 votes |
public static int calculateSv(Materials materials) { for (BioVatLogicAdder.MaterialSvPair pair : BioVatLogicAdder.RadioHatch.getMaSv()) { if (pair.getMaterials().equals(materials)) return pair.getSievert(); } return (int) (materials.getProtons() == 43L ? (materials.equals(Materials.NaquadahEnriched) ? 140 : materials.equals(Materials.Naquadria) ? 150 : materials.equals(Materials.Naquadah) ? 130 : 43) : materials.getProtons()); }
Example #15
Source File: GT_Container_CircuitProgrammer.java From bartworks with MIT License | 5 votes |
@Override public void setInventorySlotContents(int slotNR, ItemStack itemStack) { if (itemStack != null && itemStack.getItem() != null && itemStack.getItem().equals(GT_Utility.getIntegratedCircuit(0).getItem())) { this.Slot = BW_Util.setStackSize(itemStack.copy(),1); itemStack.stackSize--; this.tag = this.toBind.getTagCompound(); this.tag.setBoolean("HasChip", true); this.tag.setByte("ChipConfig", (byte) itemStack.getItemDamage()); this.toBind.setTagCompound(this.tag); this.Player.inventory.setInventorySlotContents(this.Player.inventory.currentItem, this.toBind); if (!this.Player.isClientWorld()) MainMod.BW_Network_instance.sendToServer(new CircuitProgrammerPacket(this.Player.worldObj.provider.dimensionId, this.Player.getEntityId(), true, (byte) itemStack.getItemDamage())); } else if (BW_Util.checkStackAndPrefix(itemStack) && GT_OreDictUnificator.getAssociation(itemStack).mPrefix.equals(OrePrefixes.circuit) && GT_OreDictUnificator.getAssociation(itemStack).mMaterial.mMaterial.equals(Materials.Basic)) { this.Slot = GT_Utility.getIntegratedCircuit(0); this.Slot.stackSize = 1; itemStack.stackSize--; this.tag = this.toBind.getTagCompound(); this.tag.setBoolean("HasChip", true); this.tag.setByte("ChipConfig", (byte) 0); this.toBind.setTagCompound(this.tag); this.Player.inventory.setInventorySlotContents(this.Player.inventory.currentItem, this.toBind); if (!this.Player.isClientWorld()) MainMod.BW_Network_instance.sendToServer(new CircuitProgrammerPacket(this.Player.worldObj.provider.dimensionId, this.Player.getEntityId(), true, (byte) 0)); }/* else if (GT_Utility.isStackValid(itemStack) && itemStack.getItem() instanceof Circuit_Programmer) { ForgeHooks.onPlayerTossEvent(Player, itemStack, false); this.closeInventory(); Player.closeScreen(); }*/ else { ForgeHooks.onPlayerTossEvent(this.Player, itemStack, false); this.tag = this.toBind.getTagCompound(); this.tag.setBoolean("HasChip", false); this.toBind.setTagCompound(this.tag); this.Player.inventory.setInventorySlotContents(this.Player.inventory.currentItem, this.toBind); if (!this.Player.isClientWorld()) MainMod.BW_Network_instance.sendToServer(new CircuitProgrammerPacket(this.Player.worldObj.provider.dimensionId, this.Player.getEntityId(), false, (byte) 0)); } }
Example #16
Source File: BioObjectAdder.java From bartworks with MIT License | 5 votes |
/** * If you get NPE's related to BioCultures (most likely because of Load Order or creating BioCultures after the postinit Phase) execute this. */ public static void regenerateBioFluids() { FluidStack dnaFluid = LoaderReference.gendustry ? FluidRegistry.getFluidStack("liquiddna", 100) : Materials.Biomass.getFluid(100L); for (BioCulture B : BioCulture.BIO_CULTURE_ARRAY_LIST) { if (B.getFluidNotSet()) { B.setFluid(new GT_Fluid(B.getName().replaceAll(" ", "").toLowerCase() + "fluid", "molten.autogenerated", new short[]{(short) B.getColor().getRed(), (short) B.getColor().getBlue(), (short) B.getColor().getGreen()})); if (!FluidRegistry.registerFluid(B.getFluid())) new Exception("FAILED TO REGISTER FLUID FOR: " + B.getName()).printStackTrace(); GT_Values.RA.addCentrifugeRecipe(GT_Utility.getIntegratedCircuit(10),GT_Values.NI,new FluidStack(B.getFluid(),1000),dnaFluid,GT_Values.NI,GT_Values.NI,GT_Values.NI,GT_Values.NI,GT_Values.NI,GT_Values.NI,null,500,120); } } }
Example #17
Source File: BWRecipes.java From bartworks with MIT License | 5 votes |
@Deprecated public boolean addBacterialVatRecipe(ItemStack[] aInputs, ItemStack[] aOutputs, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, int aDuration, int aEUt, Materials material, boolean exactSv) { int aSievert = 0; if (material.getProtons() >= 83 || material.getProtons() == 61 || material.getProtons() == 43) aSievert += calculateSv(material); aSievert = aSievert << 1; aSievert = aSievert | (exactSv ? 1 : 0); aSievert = aSievert << 6; return sBacteriaVat.addRecipe(new BacteriaVatRecipe(false, aInputs, aOutputs, null, new int[]{}, aFluidInputs, aFluidOutputs, aDuration, aEUt, aSievert)) != null; }
Example #18
Source File: GT_CustomLoader.java From NewHorizonsCoreMod with GNU General Public License v3.0 | 5 votes |
AdvancedGTMaterials(Object pCircuit, Object pHeatingCoil, Materials pCable, Object pCoilWire, Object pGem, Object pPowerGem, Object glass, Materials pPlateMaterial, Materials pPipe) { _mCircuit = pCircuit; _mHeatingCoil = pHeatingCoil; _mCoilWire = pCoilWire; _mMachineCable = OrePrefixes.cableGt01.get(pCable); _mMachineCable4 = OrePrefixes.cableGt04.get(pCable); _mGem = pGem; _mPowerGem = pPowerGem; _mPlate = OrePrefixes.plate.get(pPlateMaterial); _mReinfGlass = glass; _mPipe = OrePrefixes.pipeMedium.get(pPipe); _mPipeL = OrePrefixes.pipeLarge.get(pPipe); }
Example #19
Source File: GT_Loader_ItemPipes.java From NewHorizonsCoreMod with GNU General Public License v3.0 | 5 votes |
private static void generateItemPipes(Materials aMaterial, String name, String displayName, int startID, int baseInvSlots){ GT_OreDictUnificator.registerOre(OrePrefixes.pipeTiny.get(aMaterial), new GT_MetaPipeEntity_Item(startID, "GT_Pipe_" + name + "_Tiny", "Tiny " + displayName + " Item Pipe", 0.25F, aMaterial, baseInvSlots / 4, 131072 / baseInvSlots, false).getStackForm(1L)); GT_OreDictUnificator.registerOre(OrePrefixes.pipeSmall.get(aMaterial), new GT_MetaPipeEntity_Item(startID + 1, "GT_Pipe_" + name + "_Small", "Small " + displayName + " Item Pipe", 0.375F,aMaterial, baseInvSlots / 2, 65536 / baseInvSlots, false).getStackForm(1L)); GT_OreDictUnificator.registerOre(OrePrefixes.pipeMedium.get(aMaterial), new GT_MetaPipeEntity_Item(startID + 2, "GT_Pipe_" + name, displayName + " Item Pipe", 0.50F, aMaterial, baseInvSlots, 32768 / baseInvSlots, false).getStackForm(1L)); GT_OreDictUnificator.registerOre(OrePrefixes.pipeLarge.get(aMaterial), new GT_MetaPipeEntity_Item(startID + 3, "GT_Pipe_" + name + "_Large", "Large " + displayName + " Item Pipe", 0.75F, aMaterial, baseInvSlots * 2, 16384 / baseInvSlots, false).getStackForm(1L)); GT_OreDictUnificator.registerOre(OrePrefixes.pipeHuge.get(aMaterial), new GT_MetaPipeEntity_Item(startID + 4, "GT_Pipe_" + name + "_Huge", "Huge " + displayName + " Item Pipe", 0.875F,aMaterial, baseInvSlots * 4, 8192 / baseInvSlots, false).getStackForm(1L)); GT_OreDictUnificator.registerOre(OrePrefixes.pipeRestrictiveTiny.get(aMaterial), new GT_MetaPipeEntity_Item(startID + 5, "GT_Pipe_Restrictive_" + name + "_Tiny", "Tiny Restrictive " + displayName + " Item Pipe", 0.25F, aMaterial, baseInvSlots / 4, 13107200/ baseInvSlots, true ).getStackForm(1L)); GT_OreDictUnificator.registerOre(OrePrefixes.pipeRestrictiveSmall.get(aMaterial), new GT_MetaPipeEntity_Item(startID + 6, "GT_Pipe_Restrictive_" + name + "_Small","Small Restrictive " + displayName + " Item Pipe", 0.375F,aMaterial, baseInvSlots / 2, 6553600 / baseInvSlots, true ).getStackForm(1L)); GT_OreDictUnificator.registerOre(OrePrefixes.pipeRestrictiveMedium.get(aMaterial), new GT_MetaPipeEntity_Item(startID + 7, "GT_Pipe_Restrictive_" + name, "Restrictive " + displayName + " Item Pipe", 0.50F, aMaterial, baseInvSlots, 3276800 / baseInvSlots, true ).getStackForm(1L)); GT_OreDictUnificator.registerOre(OrePrefixes.pipeRestrictiveLarge.get(aMaterial), new GT_MetaPipeEntity_Item(startID + 8, "GT_Pipe_Restrictive_" + name + "_Large","Large Restrictive " + displayName + " Item Pipe", 0.75F, aMaterial, baseInvSlots * 2, 1638400 / baseInvSlots, true ).getStackForm(1L)); GT_OreDictUnificator.registerOre(OrePrefixes.pipeRestrictiveHuge.get(aMaterial), new GT_MetaPipeEntity_Item(startID + 9, "GT_Pipe_Restrictive_" + name + "_Huge", "Huge Restrictive " + displayName + " Item Pipe", 0.875F,aMaterial, baseInvSlots * 4, 819200 / baseInvSlots, true ).getStackForm(1L)); }
Example #20
Source File: GT_TileEntity_THTR.java From bartworks with MIT License | 5 votes |
@Override public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { super.onPostTick(aBaseMetaTileEntity, aTick); if (aBaseMetaTileEntity.isServerSide()){ if (this.HeliumSupply < GT_TileEntity_THTR.HELIUM_NEEDED){ for (FluidStack fluidStack : this.getStoredFluids()){ if (fluidStack.isFluidEqual(Materials.Helium.getGas(1000))) { while (this.HeliumSupply < GT_TileEntity_THTR.HELIUM_NEEDED && fluidStack.amount > 0) { this.HeliumSupply++; fluidStack.amount--; } } } } for (ItemStack itemStack : this.getStoredInputs()) { if (GT_Utility.areStacksEqual(itemStack, new ItemStack(GT_TileEntity_THTR.THTRMaterials.aTHTR_Materials, 1, 3))) { if (this.BISOPeletSupply + this.TRISOPeletSupply < 675000) { while (this.BISOPeletSupply + this.TRISOPeletSupply < 675000 && itemStack.stackSize > 0) { itemStack.stackSize--; this.TRISOPeletSupply++; } this.updateSlots(); } } else if (GT_Utility.areStacksEqual(itemStack, new ItemStack(GT_TileEntity_THTR.THTRMaterials.aTHTR_Materials, 1, 1))) { if (this.BISOPeletSupply + this.TRISOPeletSupply < 675000) { while (this.BISOPeletSupply + this.TRISOPeletSupply < 675000 && itemStack.stackSize > 0) { itemStack.stackSize--; this.BISOPeletSupply++; } this.updateSlots(); } } } } }
Example #21
Source File: GT_TileEntity_THTR.java From bartworks with MIT License | 5 votes |
public static void registerTHR_Recipes(){ GT_Values.RA.addCentrifugeRecipe( Materials.Thorium.getDust(1),GT_Values.NI,GT_Values.NF,GT_Values.NF, Materials.Thorium.getDustSmall(2),Materials.Thorium.getDustSmall(1), WerkstoffLoader.Thorium232.get(OrePrefixes.dustTiny,1),WerkstoffLoader.Thorium232.get(OrePrefixes.dustTiny,1), WerkstoffLoader.Thorium232.get(OrePrefixes.dustTiny,1),Materials.Lutetium.getDustTiny(1), new int[]{1600,1500,200,200,50,50}, 10000, BW_Util.getMachineVoltageFromTier(4)); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ GT_OreDictUnificator.get(OrePrefixes.plateDense,Materials.Lead,6), GT_OreDictUnificator.get(OrePrefixes.frameGt,Materials.TungstenSteel,1) }, Materials.Concrete.getMolten(1296), new ItemStack(GregTech_API.sBlockCasings3,1,12), 40, BW_Util.getMachineVoltageFromTier(5) ); GT_Values.RA.addMixerRecipe(WerkstoffLoader.Thorium232.get(OrePrefixes.dust,10),Materials.Uranium235.getDust(1),GT_Utility.getIntegratedCircuit(1),null,null,null,new ItemStack(GT_TileEntity_THTR.THTRMaterials.aTHTR_Materials),400,30); GT_Values.RA.addFormingPressRecipe(new ItemStack(GT_TileEntity_THTR.THTRMaterials.aTHTR_Materials),Materials.Graphite.getDust(64),new ItemStack(GT_TileEntity_THTR.THTRMaterials.aTHTR_Materials,1,4),40,30); ItemStack[] pellets = new ItemStack[6]; Arrays.fill(pellets,new ItemStack(GT_TileEntity_THTR.THTRMaterials.aTHTR_Materials,64,1)); GT_Recipe.GT_Recipe_Map.sCentrifugeRecipes.addRecipe(false,new ItemStack[]{new ItemStack(GT_TileEntity_THTR.THTRMaterials.aTHTR_Materials,1,4),GT_Utility.getIntegratedCircuit(17)}, pellets,null,null,null,null,24000,30,0); GT_Values.RA.addFormingPressRecipe(new ItemStack(GT_TileEntity_THTR.THTRMaterials.aTHTR_Materials,1,4),Materials.Silicon.getDust(64),new ItemStack(GT_TileEntity_THTR.THTRMaterials.aTHTR_Materials,1,2),40,30); GT_Values.RA.addFormingPressRecipe(new ItemStack(GT_TileEntity_THTR.THTRMaterials.aTHTR_Materials,1,2),Materials.Graphite.getDust(64),new ItemStack(GT_TileEntity_THTR.THTRMaterials.aTHTR_Materials,1,5),40,30); pellets = new ItemStack[6]; Arrays.fill(pellets,new ItemStack(GT_TileEntity_THTR.THTRMaterials.aTHTR_Materials,64,3)); GT_Recipe.GT_Recipe_Map.sCentrifugeRecipes.addRecipe(false,new ItemStack[]{new ItemStack(GT_TileEntity_THTR.THTRMaterials.aTHTR_Materials,1,5),GT_Utility.getIntegratedCircuit(17)}, pellets,null,null,null,null,48000,30,0); GT_Recipe.GT_Recipe_Map.sCentrifugeRecipes.addRecipe(false,new ItemStack[]{new ItemStack(GT_TileEntity_THTR.THTRMaterials.aTHTR_Materials,1,6),GT_Utility.getIntegratedCircuit(17)}, new ItemStack[]{new ItemStack(GT_TileEntity_THTR.THTRMaterials.aTHTR_Materials,64,8)},null,null,null,null,48000,30,0); GT_Recipe.GT_Recipe_Map.sCentrifugeRecipes.addRecipe(false,new ItemStack[]{new ItemStack(GT_TileEntity_THTR.THTRMaterials.aTHTR_Materials,1,7),GT_Utility.getIntegratedCircuit(17)}, new ItemStack[]{new ItemStack(GT_TileEntity_THTR.THTRMaterials.aTHTR_Materials,64,9)},null,null,null,null,48000,30,0); GT_Recipe.GT_Recipe_Map.sCentrifugeRecipes.addRecipe(false,new ItemStack[]{new ItemStack(GT_TileEntity_THTR.THTRMaterials.aTHTR_Materials,1,8)},new ItemStack[]{Materials.Lutetium.getDustSmall(2)},null,null,null,null,1200,30,0); GT_Recipe.GT_Recipe_Map.sCentrifugeRecipes.addRecipe(false,new ItemStack[]{new ItemStack(GT_TileEntity_THTR.THTRMaterials.aTHTR_Materials,1,9)},new ItemStack[]{Materials.Lutetium.getDustSmall(4)},null,null,null,null,1200,30,0); }
Example #22
Source File: GTPPRecipeLoader.java From NewHorizonsCoreMod with GNU General Public License v3.0 | 5 votes |
@Override public void run() { GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Ball.get(0L), new FluidStack(FluidRegistry.getFluid("ender"), 250), new ItemStack(Items.ender_pearl, 1, 0), 100, 30); //MK4 GT_Values.RA.addFusionReactorRecipe(Materials.Plutonium241.getMolten(144), Materials.Helium.getGas(1000), ELEMENT.getInstance().CURIUM.getFluid(144), 96, 98304, 500000000); GT_Values.RA.addFusionReactorRecipe(ELEMENT.getInstance().CURIUM.getFluid(144), Materials.Helium.getPlasma(144), ELEMENT.getInstance().CALIFORNIUM.getFluid(144), 128, 196608, 750000000); GT_Values.RA.addFusionReactorRecipe(Materials.Plutonium241.getMolten(144), Materials.Calcium.getPlasma(144), Materials.Flerovium.getMolten(144), 160, 196608, 1000000000); }
Example #23
Source File: BWGTMetaItems.java From bartworks with MIT License | 5 votes |
@Override public IIconContainer getIconContainer(int aMetaData) { if (this.orePrefixes.mTextureIndex == -1) return getIconContainerBartWorks(aMetaData); if (aMetaData > 1000 && hasList) return NoMetaValue.get(aMetaData-1001).mIconSet.mTextures[this.orePrefixes.mTextureIndex]; if (aMetaData < 0 || aMetaData > Materials.values().length || Materials.values()[(short) aMetaData] == null) return null; return Materials.values()[(short) aMetaData].mIconSet.mTextures[this.orePrefixes.mTextureIndex]; }
Example #24
Source File: BWGTMetaItems.java From bartworks with MIT License | 5 votes |
protected IIconContainer getIconContainerBartWorks(int aMetaData) { if (SideReference.Side.Client) { if (aMetaData > 1000 && hasList) return PrefixTextureLinker.texMap.get(this.orePrefixes).get(NoMetaValue.get(aMetaData-1001).mIconSet); return PrefixTextureLinker.texMap.get(this.orePrefixes).get(Materials.values()[(short) aMetaData].mIconSet); } return null; }
Example #25
Source File: GTMetaItemEnhancer.java From bartworks with MIT License | 5 votes |
private static void addFluidData(Materials m, ItemStack container, Item filled,int amount, int it, boolean empty){ Fluid f = m.getFluid(1) != null ? m.getFluid(1).getFluid() : m.getGas(1).getFluid(); final FluidContainerRegistry.FluidContainerData emptyData = new FluidContainerRegistry.FluidContainerData(new FluidStack(f, amount), new ItemStack(filled, 1, it), container); FluidContainerRegistry.registerFluidContainer(emptyData); GT_Utility.addFluidContainerData(emptyData); GT_Values.RA.addFluidCannerRecipe(container, new ItemStack(filled, 1, it), new FluidStack(f, amount), GT_Values.NF); GT_Values.RA.addFluidCannerRecipe(new ItemStack(filled, 1, it), empty ? GT_Values.NI : container, GT_Values.NF, new FluidStack(f, amount)); }
Example #26
Source File: LuVTierEnhancer.java From bartworks with MIT License | 5 votes |
private static void rewriteCraftingRecipes(List<IRecipe> bufferedRecipeList, OrePrefixes[] LuVMaterialsGenerated, Predicate recipeFilter){ for (OrePrefixes prefixes : LuVMaterialsGenerated) { Consumer recipeAction = obj -> LuVTierEnhancer.doStacksCointainAndReplace(((GT_Shaped_Recipe) obj).getInput(), GT_OreDictUnificator.get(prefixes, Materials.Chrome, 1), true, WerkstoffLoader.LuVTierMaterial.get(prefixes)); CraftingManager.getInstance().getRecipeList().stream().filter(recipeFilter).forEach(recipeAction); bufferedRecipeList.stream().filter(recipeFilter).forEach(recipeAction); } }
Example #27
Source File: LuVTierEnhancer.java From bartworks with MIT License | 5 votes |
private static void replaceOsmiridiumInLuVRecipes() { Consumer<GT_Recipe> replace = gt_recipe -> gt_recipe.mInputs = replaceArrayWith( gt_recipe.mInputs, Materials.Osmiridium, WerkstoffLoader.Ruridit ); GT_Recipe.GT_Recipe_AssemblyLine.sAssemblylineRecipes.stream() .filter(recipe_assemblyLine -> recipe_assemblyLine.mEUt <= 6000) .forEach(recipe_assemblyLine -> recipe_assemblyLine.mInputs = replaceArrayWith( recipe_assemblyLine.mInputs, Materials.Osmiridium, WerkstoffLoader.Ruridit ) ); GT_Recipe.GT_Recipe_Map.sAssemblerRecipes.mRecipeList.stream() .filter(gt_recipe -> gt_recipe.mEUt < BW_Util.getTierVoltage(6) && !BW_Util.checkStackAndPrefix(gt_recipe.mOutputs[0]) ) .forEach(replace); GT_Recipe.GT_Recipe_Map.sAssemblylineVisualRecipes.mRecipeList.stream() .filter(gt_recipe -> gt_recipe.mEUt <= 6000) .forEach(replace); }
Example #28
Source File: LuVTierEnhancer.java From bartworks with MIT License | 5 votes |
private static ItemStack[] replaceArrayWith(ItemStack[] stackArray, Materials source, Werkstoff target) { for (int i = 0; i < stackArray.length; i++) { ItemStack stack = stackArray[i]; if (!BW_Util.checkStackAndPrefix(stack)) continue; stackArray[i] = replaceStackWith(stack, source, target); } return stackArray; }
Example #29
Source File: LuVTierEnhancer.java From bartworks with MIT License | 5 votes |
private static ItemStack replaceStackWith(ItemStack stack, Materials source, Werkstoff target) { ItemData ass = GT_OreDictUnificator.getAssociation(stack); if (ass.mMaterial.mMaterial.equals(source)) if (target.hasItemType(ass.mPrefix)) stack = target.get(ass.mPrefix, stack.stackSize); return stack; }
Example #30
Source File: PlatinumSludgeOverHaul.java From bartworks with MIT License | 5 votes |
private static boolean materialsContains(Materials one, ISubTagContainer other) { if (one == null || one.mMaterialList == null || one.mMaterialList.isEmpty()) return false; for (MaterialStack stack : one.mMaterialList) if (stack.mMaterial.equals(other)) return true; return false; }