diff options
| author | BlueWeabo <76872108+BlueWeabo@users.noreply.github.com> | 2022-12-13 23:10:17 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-12-13 22:10:17 +0100 |
| commit | 8a515c7a9f83ca0fe29098d50bc7cab30e137d35 (patch) | |
| tree | f8d8ae0ef341bc629a7ef12ad46da3c21a19b011 /src/main/java | |
| parent | c702937ba0bf2e3f6cc8e2c37a2d5a7453a74926 (diff) | |
| download | GT5-Unofficial-8a515c7a9f83ca0fe29098d50bc7cab30e137d35.tar.gz GT5-Unofficial-8a515c7a9f83ca0fe29098d50bc7cab30e137d35.tar.bz2 GT5-Unofficial-8a515c7a9f83ca0fe29098d50bc7cab30e137d35.zip | |
Nanite material and circuit board multi for later tiers (#1513)
* Base work for ModularUI compat
* Remove useless interface
* Add almost all the widgets
* Invert method
* Refactor NEI stack placement positions
* NEI handlers on ModularUI
* Add some more docs
* AdvDebugStructureWriter
* Fix NEI progressbar not working
* PrimitiveBlastFurnace
* clean
* derp
* clean
* spotlessApply
* Boilers
* Buffers
* clean
* N by N slots containers
* Fix boilers not having bucket interaction
Put opening UI to individual MetaTEs
* Maintenance Hatch
* clean
* spotlessApply
* Add dependency
* IndustrialApiary
* Adapt to ModularUI change
* Base work for covers & fix crash with MP
* Fix crash with server
* Rewrite base work for covers
* Send initial cover data on cover GUI open
so that the time of showing incorrect data will be eliminated
* Covers part 1
* Rename package: ModularUI -> modularui
* Rename class: GT_UIInfo -> GT_UIInfos
* Fix build
* Covers part2
* Fix missing client check with tile UI & fix title overlap
* CoverTabLine
* Move cover window creators to inner class
* Fix crash with null base TE
* Close GUI when tile is broken
* Color cover window with tile colorization
* add nanites as a material
* spotless
* start the work on the nanites multi
* spotless
* Change signature of addUIWidgets
* FluidFilter cover, FluidDisplaySlotWidget, BasicTank, BasicGenerator, Output Hatch, MicrowaveEnergyTransmitter, Teleporter, DigitalChest, DigitalTank
* Add title tab
* Move package: modularui -> modularui/widget
* add controller recipe and new casing
* add prefix and the casing and controller to the item list
* add nano forge controller to its item
* add nanites to PreLoad
* Programmed circuit + IConfigurationCircuitSupport
* clean
* add nano forge multi - complete with some recipes
* new nanite textures
* Apply spotless
* fix nanites not registering, remove recipe lock on the nano forge, other small fixed
no clue why they didn't want to register in run2.
* VolumetricFlask
* Remove integrated circuit overlay from recipe input slots
* Input Hatch & Quadruple Input Hatch
* Multiblock
* Deprecate old cover GUI
* BasicMachines
* Finish BasicMachine & NEI
* Expand DTPF NEI to 9 slots
* Fix ME input bus on MP
* Move AESlotWidget to public class
* Move GT_Recipe_Map constructors with mNEIUnificateOutput to setter method
* Move SteamTexture.Variant to outer enum
* Switch to remote repository
* oops
* Update MUI
* Update MUI
* Minor refactor for change amount buttons
* the start of a new multi, tooltip WIP
* Display items and fluids that exceed usual count
* blah
* use +=, why didn't I do this
* add tier 2 and tier 3. add some more checks
* Update MUI
* Move ModularUI to Base (#1510)
* Move ModularUI to Base
* Move most of the ModularUI functionality to `BaseTileEntity` (and `CoverableTileEntity`)
* `CommonMetaTileEntity` delegates ato the MetaTileEntity
* Added several interfaces (with defaults) to indicate if a tile/metatile override/implement certain behaviors.
* Moved `IConfigurationCircuitSupport` interface such that it will work with BaseTileEntity or a MetaTileEntity
* Address reviews
Co-authored-by: miozune <miozune@gmail.com>
* Update MUI
* make a single shape rotatable by 90 degrees
* Minor changes to NEI
* more shapes, more mechanics
* Return :facepalm:
* IGetTabIconSet override
* Some more changes to NEI
* Merge texture getter interfaces to new class GUITextureSet
* Remove BBF structure picture as it's auto-buildable now
* Make unified title tab style of texture angular
* Expose some boiler texture getters for addon
* Fix crash with cover GUI on pipe
* small changes
* Lower the number of recipe per page for DTPF & update MUI
* Update MUI
* Fix crash with middle-clicking slot on circuit selection GUI
* Fix circuit selection window not syncing item from base machine
* Merge GT_NEI_AssLineHandler into GT_NEI_DefaultHandler
* Update MUI
* Add in TecTech multi message
* Allow changing the way of binding player inventory
* Update MUI
* Update MUI
* Update MUI
* Update MUI
* Update MUI
* Make MUI non-transitive to allow addons to use their own version
* Force enable mixin
* Format fluid amount tooltip
* Add GUITextureSet.STEAM
* Add guard against null ModularWindow creation
* Add constructors for Muffler Hatch with inventory
* Fix output slot on digital chest and tank allowing insertion
* Don't log null ModularWindow
* add a new material, add some recipes, continue the work on the PCB factory. The first recipe is in!
* oops spotless
* update bs
* rename casings
* make material generate plates
* add recipes to the pcb factory
* nei handling
* do some more work on the multi
* fixes to recipes.
* Update build-and-test.yml
* starter work on the PCBFactory GUI. recipe check fully working
* finish gui work
* spotless
thank god drafts don't generate spotless PRs
* final touches. tooltip tomorrow
* fix typos. and finish PCB multi.
* spotless
* changes for requests
* make consumed amount a constant
* fix recipes oopsie
* Remove unused textures
* Add nanites
* fixing recipes
* Fix NEI not showing
* Make nanites share texture
* actually fix recipes and use 2 new lenses
* finally circuits work in recipe
* Add trans metal block
* add default offsets
* spotless
* make parallels actually work
* Downscale nanite texture to 64x64
* improve PCB Factory GUI
* finish fixing gui, fix offsets on cooler, apply a new formula for duration
* Clean up PCB Factory tooltip
* Spotless
* Fix typo in Naquadah
* make sure the roughness multiplier actually slows down the recipe XD
* add a smaller limit to the roughness multipler.... lets not allow for 10x board prodction oops
* fix cooler tier 2 using wrong block in its center, fix controller texture on tier 3
* update mui and uodate the button texture
* fix one button and prevent null arrays
* remove some math. a small rework on recipes
* fix and off by 1
* save the change? never heard of it
* fix tier 3 not forming
* Nano forge tooltip
* hopefully fix nano forge. fix neutroni nanite wrong tier in recipe
* try 2 to fix structure check
* fix nano forge not forming
* fix nano forge data stick. we need better error messages
* do some fixes.
* its 12am, typos....
* never coding at midnight again
* try 2 to fix nano forge and pcb factory
* fix nano and pcb factory not working. address some reviews
* do syncing between client and server. fix recipes asking too much power with multiple upgrades
Co-authored-by: miozune <miozune@gmail.com>
Co-authored-by: Jason Mitchell <mitchej@gmail.com>
Co-authored-by: Martin Robertz <dream-master@gmx.net>
Co-authored-by: GTNH-Colen <54497873+GTNH-Colen@users.noreply.github.com>
Co-authored-by: Sampsa <sampo.vanninen@aalto.fi>
Diffstat (limited to 'src/main/java')
29 files changed, 2641 insertions, 29 deletions
diff --git a/src/main/java/gregtech/api/enums/GT_Values.java b/src/main/java/gregtech/api/enums/GT_Values.java index 41e506273d..a65b79d42d 100644 --- a/src/main/java/gregtech/api/enums/GT_Values.java +++ b/src/main/java/gregtech/api/enums/GT_Values.java @@ -507,4 +507,7 @@ public class GT_Values { + EnumChatFormatting.BOLD + "a" + EnumChatFormatting.DARK_GREEN + EnumChatFormatting.BOLD + "6" + EnumChatFormatting.GREEN + EnumChatFormatting.BOLD + "0" + EnumChatFormatting.AQUA + EnumChatFormatting.BOLD + "0" + EnumChatFormatting.DARK_AQUA + EnumChatFormatting.BOLD + "0"; + + public static final String AuthorBlueWeabo = "Author: " + EnumChatFormatting.BLUE + EnumChatFormatting.BOLD + "Blue" + + EnumChatFormatting.AQUA + EnumChatFormatting.BOLD + "Weabo"; } diff --git a/src/main/java/gregtech/api/enums/ItemList.java b/src/main/java/gregtech/api/enums/ItemList.java index 0ca7ac06b4..3ebc0aa8eb 100644 --- a/src/main/java/gregtech/api/enums/ItemList.java +++ b/src/main/java/gregtech/api/enums/ItemList.java @@ -1684,6 +1684,7 @@ public enum ItemList implements IItemContainer { OreDrill4, PyrolyseOven, OilCracker, + NanoForge, Crop_Drop_UUMBerry, Crop_Drop_UUABerry, Empty_Board_Basic, @@ -1959,7 +1960,13 @@ public enum ItemList implements IItemContainer { Superconducting_Magnet_Solenoid_UHV, Superconducting_Magnet_Solenoid_UEV, Superconducting_Magnet_Solenoid_UIV, - Superconducting_Magnet_Solenoid_UMV; + Superconducting_Magnet_Solenoid_UMV, + RadiantNaquadahAlloyCasing, + PCBFactory, + BasicPhotolithographicFrameworkCasing, + ReinforcedPhotolithographicFrameworkCasing, + RadiationProofPhotolithographicFrameworkCasing, + InfinityCooledCasing; public static final ItemList[] DYE_ONLY_ITEMS = { diff --git a/src/main/java/gregtech/api/enums/Materials.java b/src/main/java/gregtech/api/enums/Materials.java index a205aa2be0..768dd1fa6f 100644 --- a/src/main/java/gregtech/api/enums/Materials.java +++ b/src/main/java/gregtech/api/enums/Materials.java @@ -891,7 +891,7 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { public static Materials SpaceTime = new Materials( 588, new TextureSet("spacetime", true) , 320.0F, 4*2621440, 25, 1|2|64|128, 255, 255, 255, 0, "SpaceTime" , "SpaceTime" , -1, -1, 0, 0, false, true, 2, 1, 1, Dyes._NULL , Collections.singletonList(new TC_AspectStack(TC_Aspects.AQUA, 1))); public static Materials TranscendentMetal = new Materials( 581, TextureSet.SET_METALLIC , 290.0F, 3*2621440, 22, 1|2|64|128, 50, 50, 50,0, "TranscendentMetal" , "Transcendent Metal" , -1, -1, 0, 3000, true, true, 200, 1000, 1000, Dyes.dyeBlack , Collections.singletonList(new TC_AspectStack(TC_Aspects.AQUA, 1))).disableAutoGeneratedBlastFurnaceRecipes().disableAutoGeneratedVacuumFreezerRecipe(); - + public static Materials EnrichedHolmium = new Materials(582, TextureSet.SET_METALLIC, 1.0F, 0, 2, 18, 100, 1|2|4|16, 255, 255, "EnrichedHolmium", "Enriched Holmium", -1, -1, 0, 3000, true, false, 200, 1, 1, Dyes.dyePurple); // spotless:on static { @@ -1973,6 +1973,7 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { SuperconductorUMVBase.mChemicalFormula = "?\u2086Or\u2083(Hy⚶)\u2081\u2081(((CW)\u2087Ti\u2083)\u2083???)\u2085۞\u2082"; Diatomite.mChemicalFormula = "(SiO\u2082)\u2088Fe\u2082O\u2083(Al\u2082O\u2083)"; + EnrichedHolmium.mChemicalFormula = "Nq+Ho"; } private static void initSubTags() { @@ -2226,7 +2227,8 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { SuperconductorUMVBase, Quantium, RedstoneAlloy, - Bedrockium); + Bedrockium, + EnrichedHolmium); SubTag.FOOD.addTo( MeatRaw, @@ -3299,4 +3301,8 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { public static Materials getGtMaterialFromFluid(Fluid fluid) { return FLUID_MAP.get(fluid); } + + public ItemStack getNanite(int amount) { + return GT_OreDictUnificator.get(OrePrefixes.nanite, this, amount); + } } diff --git a/src/main/java/gregtech/api/enums/OrePrefixes.java b/src/main/java/gregtech/api/enums/OrePrefixes.java index 46bf1ce408..e8e6e102f7 100644 --- a/src/main/java/gregtech/api/enums/OrePrefixes.java +++ b/src/main/java/gregtech/api/enums/OrePrefixes.java @@ -3171,7 +3171,8 @@ public enum OrePrefixes { -1, 64, -1), - beeComb("Bee Combs", "", "", true, false, true, false, false, false, false, false, false, false, 0, -1, 64, -1); + beeComb("Bee Combs", "", "", true, false, true, false, false, false, false, false, false, false, 0, -1, 64, -1), + nanite("Nanites", "", " Nanites", true, true, true, false, false, false, false, false, false, false, 0, -1, 64, 50); public static final ImmutableList<OrePrefixes> CELL_TYPES = ImmutableList.of( cell, @@ -3326,6 +3327,13 @@ public enum OrePrefixes { stickLong.mGeneratedItems.add(Materials.Blaze); + nanite.mGeneratedItems.add(Materials.Carbon); + nanite.mGeneratedItems.add(Materials.Gold); + nanite.mGeneratedItems.add(Materials.Iron); + nanite.mGeneratedItems.add(Materials.Copper); + nanite.mGeneratedItems.add(Materials.Silver); + nanite.mGeneratedItems.add(Materials.TranscendentMetal); + nanite.mGeneratedItems.add(Materials.Neutronium); // ----- dust.mGeneratedItems.addAll(dustPure.mGeneratedItems); @@ -3547,7 +3555,8 @@ public enum OrePrefixes { OrePrefixes.crateGtIngot, OrePrefixes.crateGtGem, OrePrefixes.crateGtPlate, - OrePrefixes.itemCasing)); + OrePrefixes.itemCasing, + OrePrefixes.nanite)); /** * Yes this Value can be changed to add Bits for the MetaGenerated-Item-Check. */ diff --git a/src/main/java/gregtech/api/enums/TextureSet.java b/src/main/java/gregtech/api/enums/TextureSet.java index 6bf6908734..7b8940a70a 100644 --- a/src/main/java/gregtech/api/enums/TextureSet.java +++ b/src/main/java/gregtech/api/enums/TextureSet.java @@ -187,7 +187,7 @@ public class TextureSet { "/toolHeadScrewdriver", "/toolHeadBuzzSaw", "/toolHeadSoldering", - aTextVoidDir, + "/nanites", "/wireFine", "/gearGtSmall", "/rotor", @@ -318,7 +318,14 @@ public class TextureSet { if (IS_BLOCK_TEXTURE[i] == TextureType.BLOCK) { mTextures[i] = new Textures.BlockIcons.CustomIcon(aTextMatIconDir + aSetName + SUFFIXES[i]); } else { - mTextures[i] = new Textures.ItemIcons.CustomIcon(aTextMatIconDir + aSetName + SUFFIXES[i]); + // Check nanites folder for nanites texture to avoid copy pasting large file multiple times. + // Exemption for CUSTOM textures so they can be overriden as normal by placing nanite image in + // their respective folder. + if (SUFFIXES[i].equals("/nanites") && (!aSetName.contains("CUSTOM"))) { + mTextures[i] = new Textures.ItemIcons.CustomIcon(aTextMatIconDir + "NANITES" + SUFFIXES[i]); + } else { + mTextures[i] = new Textures.ItemIcons.CustomIcon(aTextMatIconDir + aSetName + SUFFIXES[i]); + } } } } diff --git a/src/main/java/gregtech/api/enums/Textures.java b/src/main/java/gregtech/api/enums/Textures.java index 89d7ee6a1f..0a9ff078b4 100644 --- a/src/main/java/gregtech/api/enums/Textures.java +++ b/src/main/java/gregtech/api/enums/Textures.java @@ -250,6 +250,7 @@ public class Textures { MACHINE_CASING_RHODIUM_PALLADIUM, MACHINE_CASING_IRIDIUM, MACHINE_CASING_MAGICAL, + MACHINE_CASING_RADIANT_NAQUADAH_ALLOY, MACHINE_CASING_FIREBOX_TITANIUM, MACHINE_CASING_FUSION_COIL, @@ -1117,6 +1118,7 @@ public class Textures { MARBLE_COBBLE, BLOCK_NICKELALUMINIUM, BLOCK_SILICONSG, + BLOCK_TRANSCENDENTMETAL, MARBLE_COBBLE_MOSSY, MARBLE_BRICKS, @@ -1305,7 +1307,11 @@ public class Textures { UIV_SIDE_CYCLOTRON_SOLENOID, UMV_SIDE_CYCLOTRON_SOLENOID, ZPM_TOP_CYCLOTRON_SOLENOID, - ZPM_SIDE_CYCLOTRON_SOLENOID; + ZPM_SIDE_CYCLOTRON_SOLENOID, + MACHINE_CASING_PCB_TIER_1, + MACHINE_CASING_PCB_TIER_2, + MACHINE_CASING_PCB_TIER_3, + INFINITY_COOLED_CASING; /** * Icon for Fresh CFoam @@ -1850,15 +1856,15 @@ public class Textures { BLOCK_TERRACRYSTAL }, STORAGE_BLOCKS11 = + {BLOCK_TOPAZ, BLOCK_VINTEUM, BLOCK_YELLOWGARNET, BLOCK_NETHERSTAR, BLOCK_CHARCOAL, BLOCK_BLAZE}, + STORAGE_BLOCKS12 = { - BLOCK_TOPAZ, - BLOCK_VINTEUM, - BLOCK_YELLOWGARNET, - BLOCK_NETHERSTAR, - BLOCK_CHARCOAL, - BLOCK_BLAZE, - }, - STORAGE_BLOCKS12 = {BLOCK_CRYOLITE, BLOCK_SILICONSG, BLOCK_NICKELALUMINIUM, BLOCK_SPACETIME}; + BLOCK_CRYOLITE, + BLOCK_SILICONSG, + BLOCK_NICKELALUMINIUM, + BLOCK_SPACETIME, + BLOCK_TRANSCENDENTMETAL + }; public static final ITexture[] HIDDEN_TEXTURE = { TextureFactory.builder().addIcon(HIDDEN_FACE).stdOrient().build() diff --git a/src/main/java/gregtech/api/gui/modularui/GT_UITextures.java b/src/main/java/gregtech/api/gui/modularui/GT_UITextures.java index 76b4874838..b82876d5cf 100644 --- a/src/main/java/gregtech/api/gui/modularui/GT_UITextures.java +++ b/src/main/java/gregtech/api/gui/modularui/GT_UITextures.java @@ -189,8 +189,9 @@ public class GT_UITextures { public static final SteamTexture TAB_TITLE_ANGULAR_STEAM = SteamTexture.adaptableTexture(MODID, "gui/tab/title_angular_%s", 28, 28, 4); - public static final UITexture BUTTON_STANDARD = UITexture.fullImage(MODID, "gui/button/standard"); - public static final UITexture BUTTON_STANDARD_TOGGLE = UITexture.fullImage(MODID, "gui/button/standard_toggle"); + public static final UITexture BUTTON_STANDARD = AdaptableUITexture.of(MODID, "gui/button/standard", 18, 18, 1); + public static final UITexture BUTTON_STANDARD_TOGGLE = + AdaptableUITexture.of(MODID, "gui/button/standard_toggle", 18, 18, 1); public static final UITexture BUTTON_COVER_NORMAL = UITexture.fullImage(MODID, "gui/button/cover_normal"); public static final UITexture BUTTON_COVER_NORMAL_HOVERED = UITexture.fullImage(MODID, "gui/button/cover_normal_hovered"); diff --git a/src/main/java/gregtech/api/interfaces/internal/IGT_RecipeAdder.java b/src/main/java/gregtech/api/interfaces/internal/IGT_RecipeAdder.java index 8bb10d8580..2dd5ab9fa0 100644 --- a/src/main/java/gregtech/api/interfaces/internal/IGT_RecipeAdder.java +++ b/src/main/java/gregtech/api/interfaces/internal/IGT_RecipeAdder.java @@ -1278,4 +1278,49 @@ public interface IGT_RecipeAdder { int[] aChances, int aDuration, int aEUt); + + /** + * Add a Nano Forge Recipe. The Nano Forge's main use is to make nanites/nanorobots. + * Tier 1 Nano Forge - Can make partly biological, partly metal nanites + * TIer 2 Nano Forge - Can make mostly metal nanites with some biological aspects + * TIer 3 Nano Forge - Can make nanites entierly out of metal + * + * @param aInputs = must not be null + * @param aFluidInputs = can be null + * @param aOutputs = must not be null, the nanite or other output + * @param aFluidOutputs = can be null + * @param aChances = can be null + * @param aDuration + * @param aEUt + * @param aSpecialValue = defines the tier of nano forge required. + * + */ + boolean addNanoForgeRecipe( + ItemStack[] aInputs, + FluidStack[] aFluidInputs, + ItemStack[] aOutputs, + FluidStack[] aFluidOutputs, + int[] aChances, + int aDuration, + int aEUt, + int aSpecialValue); + + /** + * Add a Board Manufacturer Recipe. The Board Manufacturer's main use is to make the circuit boards + * needed to make circuits. + * + * @param aInputs = must not be null + * @param aFluidInputs = must not be null + * @param aOutputs = must not be null + * @param aDuration + * @param aEUt + * @param aSpecialValue = defines the tier of the board manufacturer required. + */ + boolean addPCBFactoryRecipe( + ItemStack[] aInputs, + FluidStack[] aFluidInputs, + ItemStack[] aOutputs, + int aDuration, + int aEUt, + int aSpecialValue); } diff --git a/src/main/java/gregtech/api/util/GT_LanguageManager.java b/src/main/java/gregtech/api/util/GT_LanguageManager.java index 1d6d794542..1b2d566fd0 100644 --- a/src/main/java/gregtech/api/util/GT_LanguageManager.java +++ b/src/main/java/gregtech/api/util/GT_LanguageManager.java @@ -479,6 +479,17 @@ public class GT_LanguageManager { addStringLocalization("Interaction_DESCRIPTION_Index_333", "OR Gate"); addStringLocalization("Interaction_DESCRIPTION_Index_334", "NOR Gate"); addStringLocalization("Interaction_DESCRIPTION_Index_335", "Gate Mode"); + addStringLocalization("Interaction_DESCRIPTION_Index_336", "PCB Factory Tier: "); + addStringLocalization("Interaction_DESCRIPTION_Index_337", "Upgrade Required: "); + addStringLocalization("Interaction_DESCRIPTION_Index_338", "Bio"); + addStringLocalization("Interaction_DESCRIPTION_Index_339", "Bio Upgrade Enabled"); + addStringLocalization("Interaction_DESCRIPTION_Index_339.1", "Bio Upgrade Disabled"); + addStringLocalization("Interaction_DESCRIPTION_Index_340", "Rotate Bio Upgrade 90 Degrees Enabled"); + addStringLocalization("Interaction_DESCRIPTION_Index_340.1", "Rotate Bio Upgrade 90 Degrees Disabled"); + addStringLocalization("Interaction_DESCRIPTION_Index_341", "OC Tier 1 Enabled"); + addStringLocalization("Interaction_DESCRIPTION_Index_341.1", "OC Tier 1 Disabled"); + addStringLocalization("Interaction_DESCRIPTION_Index_342", "OC Tier 2 Enabled"); + addStringLocalization("Interaction_DESCRIPTION_Index_342.1", "OC Tier 2 Disabled"); addStringLocalization("Interaction_DESCRIPTION_Index_500", "Fitting: Loose - More Flow"); addStringLocalization("Interaction_DESCRIPTION_Index_501", "Fitting: Tight - More Efficiency"); addStringLocalization("Interaction_DESCRIPTION_Index_502", "Mining chunk loading enabled"); diff --git a/src/main/java/gregtech/api/util/GT_OreDictUnificator.java b/src/main/java/gregtech/api/util/GT_OreDictUnificator.java index 75ca3a7141..bf554e57df 100644 --- a/src/main/java/gregtech/api/util/GT_OreDictUnificator.java +++ b/src/main/java/gregtech/api/util/GT_OreDictUnificator.java @@ -118,6 +118,14 @@ public class GT_OreDictUnificator { return get(aPrefix.get(aMaterial), aReplacement, aAmount, false, true); } + public static ItemStack get(OrePrefixes aPrefix, Object aMaterial, long aAmount, boolean aNoInvalidAmounts) { + // if (Materials.mDefaultComponents.contains(aPrefix) && !aPrefix.mDynamicItems.contains((Materials)aMaterial)) + // aPrefix.mDynamicItems.add((Materials) aMaterial); + if (OrePrefixes.mPreventableComponents.contains(aPrefix) && aPrefix.mDisabledItems.contains(aMaterial)) + return null; + return get(aPrefix.get(aMaterial), null, aAmount, false, aNoInvalidAmounts); + } + public static ItemStack get( Object aName, ItemStack aReplacement, diff --git a/src/main/java/gregtech/api/util/GT_PCBFactoryManager.java b/src/main/java/gregtech/api/util/GT_PCBFactoryManager.java new file mode 100644 index 0000000000..1543a9d2a6 --- /dev/null +++ b/src/main/java/gregtech/api/util/GT_PCBFactoryManager.java @@ -0,0 +1,22 @@ +package gregtech.api.util; + +import com.google.common.collect.HashBiMap; +import gregtech.api.enums.Materials; + +public class GT_PCBFactoryManager { + private static final HashBiMap<Materials, Integer> mPlasticTiers = HashBiMap.create(); + public static int mTiersOfPlastics = 0; + + public static void addPlasticTier(Materials aMaterial, int aTier) { + mPlasticTiers.put(aMaterial, aTier); + mTiersOfPlastics++; + } + + public static int getPlasticTier(Materials aMaterial) { + return mPlasticTiers.get(aMaterial); + } + + public static Materials getPlasticMaterialFromTier(int aTier) { + return mPlasticTiers.inverse().get(aTier); + } +} diff --git a/src/main/java/gregtech/api/util/GT_Recipe.java b/src/main/java/gregtech/api/util/GT_Recipe.java index 09cc850ecd..b2506c63ad 100644 --- a/src/main/java/gregtech/api/util/GT_Recipe.java +++ b/src/main/java/gregtech/api/util/GT_Recipe.java @@ -2428,6 +2428,48 @@ public class GT_Recipe implements Comparable<GT_Recipe> { (GT_Recipe_Map_LargeBoilerFakeFuels) new GT_Recipe_Map_LargeBoilerFakeFuels() .setProgressBar(GT_UITextures.PROGRESSBAR_ARROW, ProgressBar.Direction.RIGHT); + public static final GT_Recipe_Map sNanoForge = new GT_Recipe_Map( + new HashSet<>(10), + "gt.recipe.nanoforge", + "Nano Forge", + null, + RES_PATH_GUI + "basicmachines/LCRNEI", + 6, + 2, + 2, + 1, + 1, + "Tier: ", + 1, + "", + false, + true) + .useModularUI(true) + .setUsualFluidInputCount(1) + .setSlotOverlay(false, false, true, GT_UITextures.OVERLAY_SLOT_LENS) + .setProgressBar(GT_UITextures.PROGRESSBAR_ASSEMBLE, ProgressBar.Direction.RIGHT); + + public static final GT_Recipe_Map sPCBFactory = new GT_Recipe_Map( + new HashSet<>(10), + "gt.recipe.pcbfactory", + "PCB Factory", + null, + RES_PATH_GUI + "basicmachines/LCRNEI", + 6, + 9, + 3, + 1, + 1, + E, + 0, + E, + true, + true) + .useModularUI(true) + .setUsualFluidInputCount(3) + .setUsualFluidOutputCount(0) + .setProgressBar(GT_UITextures.PROGRESSBAR_ASSEMBLE, ProgressBar.Direction.RIGHT); + /** * HashMap of Recipes based on their Items */ diff --git a/src/main/java/gregtech/api/util/GT_Utility.java b/src/main/java/gregtech/api/util/GT_Utility.java index a4cea9ed2f..da98e97f8e 100644 --- a/src/main/java/gregtech/api/util/GT_Utility.java +++ b/src/main/java/gregtech/api/util/GT_Utility.java @@ -4301,6 +4301,11 @@ public class GT_Utility { return signal; } + public static ItemStack getNaniteAsCatalyst(Materials material) { + ItemStack aItem = material.getNanite(1); + return new ItemStack(aItem.getItem(), 0, aItem.getItemDamage()); + } + @AutoValue public abstract static class ItemId { /** This method copies NBT, as it is mutable. */ diff --git a/src/main/java/gregtech/common/GT_RecipeAdder.java b/src/main/java/gregtech/common/GT_RecipeAdder.java index 488ac0a5fb..ee056ddebd 100644 --- a/src/main/java/gregtech/common/GT_RecipeAdder.java +++ b/src/main/java/gregtech/common/GT_RecipeAdder.java @@ -3318,6 +3318,46 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return true; } + @Override + public boolean addNanoForgeRecipe( + ItemStack[] aInputs, + FluidStack[] aFluidInputs, + ItemStack[] aOutputs, + FluidStack[] aFluidOutputs, + int[] aChances, + int aDuration, + int aEUt, + int aSpecialValue) { + if (aInputs == null || aOutputs == null || aSpecialValue == 0) return false; + + GT_Recipe.GT_Recipe_Map.sNanoForge.addRecipe(new GT_Recipe( + false, aInputs, aOutputs, null, aChances, aFluidInputs, aFluidOutputs, aDuration, aEUt, aSpecialValue)); + return true; + } + + @Override + public boolean addPCBFactoryRecipe( + ItemStack[] aInputs, + FluidStack[] aFluidInputs, + ItemStack[] aOutputs, + int aDuration, + int aEUt, + int aSpecialValue) { + + if (aInputs == null || aFluidInputs == null || aOutputs == null) { + return false; + } + + if (aSpecialValue <= 0 || aEUt < 0 || aDuration < 0) { + return false; + } + + GT_Recipe.GT_Recipe_Map.sPCBFactory.addRecipe(new GT_Recipe( + false, aInputs, aOutputs, null, null, aFluidInputs, null, aDuration, aEUt, aSpecialValue)); + + return true; + } + private boolean areItemsAndFluidsBothNull(ItemStack[] items, FluidStack[] fluids) { boolean itemsNull = true; if (items != null) { diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Casings8.java b/src/main/java/gregtech/common/blocks/GT_Block_Casings8.java index 65583eaa28..ae67f52730 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Casings8.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Casings8.java @@ -18,7 +18,7 @@ public class GT_Block_Casings8 extends GT_Block_Casings_Abstract { // WATCH OUT FOR TEXTURE ID's public GT_Block_Casings8() { - super(GT_Item_Casings8.class, "gt.blockcasings8", GT_Material_Casings.INSTANCE, 10); + super(GT_Item_Casings8.class, "gt.blockcasings8", GT_Material_Casings.INSTANCE, 15); /* * DO NOT USE INDEX 15 ! * USED HERE: https://github.com/GTNewHorizons/Electro-Magic-Tools/pull/17 @@ -37,6 +37,14 @@ public class GT_Block_Casings8 extends G |
