diff options
author | NotAPenguin <michiel.vandeginste@gmail.com> | 2024-08-03 23:21:44 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-03 23:21:44 +0200 |
commit | b65ace37de4f585b8089ad413ee877b792da11ca (patch) | |
tree | 2e0445785c5008df15151f729da148fb70dbc21d /src/main/java/gregtech/api | |
parent | e180e49fc6305f71b1f1b18141b946f794a7012b (diff) | |
download | GT5-Unofficial-b65ace37de4f585b8089ad413ee877b792da11ca.tar.gz GT5-Unofficial-b65ace37de4f585b8089ad413ee877b792da11ca.tar.bz2 GT5-Unofficial-b65ace37de4f585b8089ad413ee877b792da11ca.zip |
Waterline rework (#2577)
* Add barebones PurificationPlant class
* Make simple 3x3 structure to form purification plant
* Add base purification unit class and dummy sifter unit MTE
* Make sifter unit form
* Fix accidental wildcard import
* Implement basic linking of units to controller using data stick
* Make linking more robust, save bidirectional links, add scanner output
* add linking range, error message and unregister old controller when re-linking
* Add link status of purification units to waila body
* Disable maintenance issues on purification plant units
* spotless
* Check structure of linked purification units in main controller
* Remove all star imports
* Small refactor to avoid updating status from main controller
* spotless
* Attempt to document current code
* Convert some comments to javadoc
* Implement basic processing cycle, sync it with linked purification units
* Make water purification plant drain power
* Calculate power drain from active units and remove controller power drain
* spotless
* Add very barebones recipemap
* Fix recipemap name in lang file
* spotless
* Fix purification unit recipemap name
* spotless
* more sane amount of max fluid outputs
* add some item outputs to sifter unit
* Very simple recipe processing, may be buggy
* spotless
* Implement recipe failure
* Implement void protection for purification units
* spotless
* buff item output odds slightly
* Add WIP grade 1 structure
* spotless
* Store base success chance in recipe metadata and display it in NEI
* Fill sifter plant with water
* Add comment
* Allow construction sifter unit in survival
* Implement water boost
* Fix water boost allowing output chance to go over 100%
* Implement failed recipes outputting lower tier water
* Fix typo
* Fix deformed purification unit still drawing power
* Slightly refactor recipe check so base class can read result
* Create empty ModularUI container for purification plant
* The great gui struggle part 1
* More gui struggles, we have a button now
* Adjust button text and size
* gui wars: the rise of the sync
* gui wars: a new hope
* fix the sync
* is pengu old enough to know exceeder?
* Fix being able to link the same unit multiple times
* Sync status string to client
* Sign sifter with my name
* Show status somewhat properly
* Adjust sifter base chance and structure
* Fully implement sifter unit
* More tooltip refactoring
* Add structure info to sifter tooltip.
* nitpicking tooltips
* Adding sound to Purification Plant Main Unit.
* fix star imports
* Add basic coagulator unit, add recipemap for it
* Write coagulator tooltip
* comma nitpicking
* more tooltip work
* small refactor to purification plant controller
* start work on custom recipemap frontend
* Fully implement coagulator
* Update structure requirements in tooltips
* Move controller text in structure tooltips to be consistent
* fix NPE on world load
* Add base ph adjustment unit MTE
* Add info to main controller and energy hatch check
* Fixing tooltip of Main Controller & Energy/Exotic Hatch check.
* Create full pH adjustment structure
* disallow any voiding on purification unit
* Small custom RecipeMap frontend for ph adjustment
* Generate random initial pH value
* Implement inserting NaOH and HCl to adjust pH
* Add easter egg
* Implement pH sensor hatch
* Properly consume HCl and round pH value to 2 digits
* Write ph adjustment unit tooltip
* Tooltip nitpicking
* Try to fix some structurelib hints
* More trying to fix hints
* Add industrial strength concrete casing block
* Add water loop sound to the game
* Document random initial pH in tooltip
* Add glass material base
* Fix spotless formatting in Textures docs because I cannot take it anymore
* Add glass texture
* Try adding transparent glass
* Transparent glass working
* Create pH resistant glass and update pH structure to use it
* Create full structure for main purification plant
* Create custom water purification casing block
* Properly balance ferrous wastewater reprocessing and reduce input by a factor 10
* Add pH factor to NEI tooltip and fix coagulator structure
* Structure tooltip for Purification Plant base
* Add GT_Block_Glass2 and properly set maxMeta
* Add Tinted Industrial Glass blocks
* Fix BlockCasing9 not showing custom tooltip
* Register tinted glass as EV glass
* Add sterile water plant casing and revert tooltip change
* Mention required water in sifter tooltip
* Add more textures and casings
* Add more textures, sounds and add structure info for pH adjustment
* Rename sifter unit to clarifier
* Rename coagulation unit to flocculation unit
* Add activated carbon line
* Fix unintended activated carbon recipe
* Add activated carbon filter
* Add polyaluminium chloride + solution
* Add new custom textures by @BlueHero233
* Wip recipe page with new background for flocculation
* Fix flocculation background image mostly
* Finally aligned the slots
* angery mumbles
* Finish flocculation recipe page
* All the recipe pages!
* Add new reworked textures
* Fix ph adjustment being t3 instead of t4
* Fix invisible casing
* apply chembalance to polyaluminium chloride properly
* Fix ferrous wastewater -> flocculation waste liquid
* Move flocculation to grade 3
* create ozonation unit with placeholder blocks
* add new blocks for ozonation with placeholder textures
* Add water to ozonation structure
* Create ozone gas material
* Add ozone recipe
* Add textures for ozone unit
* Add sound loop for ozonation
* fix
* implement ozonation mechanics
* Finalize ozonation tooltip
* Create dummy plasma heater multi
* Update textures for plasma heater
* Add grade 5 recipemap
* Add hatches to plasma heater multi
* Add basic plasma heating unit variables
* Implement plasma heating unit mechanics
* Add plasma heater tooltip
* Add structure info to plasma heater tooltip
* fix ozonation tooltip, add frontend
* Fix positioning on ozonation tooltip and fix plasma heater crash
* Add UV treatment MTE and structure without textures
* Revert accidental addition of debug dependencies
* Add initial version of uv unit textures
* update naquadria casing, add water color gradient
* Some minor cleanup and added docs
* Create lens housing bus
* Add lens bus to UV treatment unit
* Add lens indicator hatch
* Merge GT_MetaGeneratedItem_03.java
* Add lens indicator hatch
* Add the lens cycle, uv treatment recipe map and fix eut of flocculation recipe
* Implement lens swapping mechanic
* Clean up first lens swap
* Fix uv recipemap lang and move lens cycle to recipe
* Write uv treatment tooltip
* Add sounds for uv and plasma steps
* Create empty degasifier class
* Create temporary debug structure for degasifier
* set temp casing index for degasifier
* create degasifier control hatch
* create slightly less temporary but still temporary structure for degasifier
* Start impl of degasifier
* fix fluid consumption and nbt loading of degasifier
* Degasifier implementation should work now
* Rename and reformat some things and start work on degasser tooltiop
* give last bit much lower chance of being on to avoid cheesing
* Finish degasifier tooltip
* Integrate some deleno lore
* hopefully fix all moved casing meta ids after merge
* Create finalized degasser structure
* Integrate more deleno lore
* Add even more lore
* Create placeholder particle catalysts and fetch particle items from gt++
* Fix wrong casing and recipemap localization
* Create parallel config menu
* refactor purification recipecheck slightly
* implement parallel amount on water i/o and power
* add tooltip info about parallel config
* fix text
* update block names in structure tooltips
* create structure tooltip for degasser
* create textureless quark catalyst items
* add the purple glass
* fix lore typos
* fix some casing indices
* remove concrete floor from water plant and reword tooltip
* fix main plant structure and add placeholder structure for t8 step
* fix structurecheck for main plant and add random catalyst generation for t8
* implement basic mechanics for particle extractor (wip)
* Create plasma heater frontend
* implement final mechanics and bugfixes for particle extractor
* add recipes for re-aligning quark catalysts
* add simple recipes for catalyst alignment
* initial replacement of purified water in engraver recipes
* add purified water to all wafer cutting recipes
* fix purified water amounts
* buff quark cyclotron recipe again
* extract t8 unit casings into their own icons
* Write initial tooltip for t8 module
* add purified water to mask recipes
* Add recipe comparator to show low tier purified water recipes first
* add min casing check to waterline multis
* buff ozone production
* update t8 structure
* make purified water optional again for naq wafers
* Fix blockrenderer for purification plant
* fix nei previews
* fix nei
* really fix nei this time
* add t8 lore
* fix hatch recipe locking blocking automation on some steps
* try to solve weirdness with grade 3 recipe
* fix issues with recipecheck
* fix missing null check
* make ph sensor use a strict inequality check
* fix min casings on t5
* significantly nerf purified water usage for beamline masks
* disable void protection for waterline
* small adjustments to t6 unit
* more small adjustments to t6 unit to prevent easy automation cheese
* fix degasser redstone output and missing return statement
* remove water QFT catalyst recipes
---------
Co-authored-by: Tianyou Mei <meitianyou94@gmail.com>
Co-authored-by: OlliedeLeeuw <ollie.riemersma@xs4all.nl>
Co-authored-by: Ollie_de_Leeuw <154506304+OlliedeLeeuw@users.noreply.github.com>
Co-authored-by: Martin Robertz <dream-master@gmx.net>
Diffstat (limited to 'src/main/java/gregtech/api')
18 files changed, 941 insertions, 17 deletions
diff --git a/src/main/java/gregtech/api/GregTech_API.java b/src/main/java/gregtech/api/GregTech_API.java index f252a12965..e82c5952ee 100644 --- a/src/main/java/gregtech/api/GregTech_API.java +++ b/src/main/java/gregtech/api/GregTech_API.java @@ -297,6 +297,8 @@ public class GregTech_API { sBlockCasings8, sBlockCasings9, sBlockCasings10, sBlockCasings11, sSolenoidCoilCasings; public static Block sBlockLongDistancePipes; public static Block sDroneRender; + public static Block sBlockGlass1; + public static Block sBlockTintedGlass; public static Block sLaserRender; /** * Getting assigned by the Config diff --git a/src/main/java/gregtech/api/enums/GT_Values.java b/src/main/java/gregtech/api/enums/GT_Values.java index 74c392ce67..b0e48a46bb 100644 --- a/src/main/java/gregtech/api/enums/GT_Values.java +++ b/src/main/java/gregtech/api/enums/GT_Values.java @@ -678,6 +678,13 @@ public class GT_Values { + "Gold"; public static final String AuthorVolence = "Author: " + EnumChatFormatting.AQUA + "Volence"; + public static final String AuthorNotAPenguin = "Author: " + EnumChatFormatting.WHITE + + EnumChatFormatting.BOLD + + "Not" + + EnumChatFormatting.AQUA + + EnumChatFormatting.BOLD + + "APenguin"; + // 7.5F comes from GT_Tool_Turbine_Large#getBaseDamage() given huge turbines are the most efficient now. public static double getMaxPlasmaTurbineEfficiencyFromMaterial(Materials material) { return (5F + (7.5F + material.mToolQuality)) / 10.0; diff --git a/src/main/java/gregtech/api/enums/ItemList.java b/src/main/java/gregtech/api/enums/ItemList.java index d1c30a0935..1f5d223a6b 100644 --- a/src/main/java/gregtech/api/enums/ItemList.java +++ b/src/main/java/gregtech/api/enums/ItemList.java @@ -1152,7 +1152,16 @@ public enum ItemList implements IItemContainer { Machine_Multi_ImplosionCompressor, Machine_Multi_VacuumFreezer, Machine_Multi_Furnace, - + Machine_Multi_PurificationPlant, + Machine_Multi_PurificationUnitClarifier, + Machine_Multi_PurificationUnitFlocculator, + Machine_Multi_PurificationUnitPhAdjustment, + Machine_Multi_PurificationUnitOzonation, + Machine_Multi_PurificationUnitPlasmaHeater, + Machine_Multi_PurificationUnitUVTreatment, + Machine_Multi_PurificationUnitDegasifier, + Machine_Multi_PurificationUnitParticleExtractor, + Hatch_DegasifierControl, Machine_LV_AlloySmelter, Machine_MV_AlloySmelter, Machine_HV_AlloySmelter, @@ -2031,7 +2040,41 @@ public enum ItemList implements IItemContainer { TierdDrone1, TierdDrone2, Hatch_DroneDownLink, - Casing_Shielded_Accelerator; + Hatch_pHSensor, + Hatch_LensHousing, + Hatch_LensIndicator, + ActivatedCarbonFilterMesh, + BlockIndustrialStrengthConcrete, + GlassPHResistant, + GlassTintedIndustrialWhite, + GlassTintedIndustrialLightGray, + GlassTintedIndustrialGray, + GlassTintedIndustrialBlack, + BlockIndustrialWaterPlantCasing, + BlockSterileWaterPlantCasing, + BlockFlocculationCasing, + BlockNaquadahReinforcedWaterPlantCasing, + BlockExtremeCorrosionResistantCasing, + BlockHighPressureResistantCasing, + BlockOzoneCasing, + BlockPlasmaHeatingCasing, + BlockNaquadriaReinforcedWaterPlantCasing, + GlassUVResistant, + BlockUltraVioletLaserEmitter, + Quark_Catalyst_Housing, + Quark_Creation_Catalyst_Up, + Quark_Creation_Catalyst_Down, + Quark_Creation_Catalyst_Strange, + Quark_Creation_Catalyst_Charm, + Quark_Creation_Catalyst_Bottom, + Quark_Creation_Catalyst_Top, + Quark_Creation_Catalyst_Unaligned, + Casing_Shielded_Accelerator, + GlassOmniPurposeInfinityFused, + GlassQuarkContainment, + BlockQuarkPipe, + BlockQuarkReleaseChamber, + BlockQuarkContainmentCasing; public static final ItemList[] DYE_ONLY_ITEMS = { Color_00, Color_01, Color_02, Color_03, Color_04, Color_05, Color_06, Color_07, Color_08, Color_09, Color_10, Color_11, Color_12, Color_13, Color_14, Color_15 }, diff --git a/src/main/java/gregtech/api/enums/Materials.java b/src/main/java/gregtech/api/enums/Materials.java index f8f6f4636e..2435e1aad7 100644 --- a/src/main/java/gregtech/api/enums/Materials.java +++ b/src/main/java/gregtech/api/enums/Materials.java @@ -150,14 +150,15 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { public static Materials Ytterbium = new Materials( 77, TextureSet.SET_SHINY , 1.0F, 0, 2, 1|2 |8 |32 , 44, 199, 80, 0, "Ytterbium" , "Ytterbium" , 0, 0, 1097, 1097, true, false, 4, 1, 1, Dyes._NULL , Element.Yb , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.RADIO, 1))); public static Materials Yttrium = new Materials( 45, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1|2 |8 |32 , 220, 250, 220, 0, "Yttrium" , "Yttrium" , 0, 0, 1799, 1799, true, false, 4, 1, 1, Dyes._NULL , Element.Y , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.RADIO, 1))); public static Materials Zinc = new Materials( 36, TextureSet.SET_METALLIC , 1.0F, 0, 1, 1|2 |8 |32 , 250, 240, 240, 0, "Zinc" , "Zinc" , 0, 0, 692, 0, false, false, 2, 1, 1, Dyes.dyeWhite , Element.Zn , Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.SANO, 1))); - public static Materials Grade1PurifiedWater = new Materials( 554, TextureSet.SET_FLUID , 1.0F, 0, 2, 16 , 0, 0, 255, 0, "Grade1PurifiedWater" , "Grade 1 Purified Water" , 0, 0, 273, 0, false, true, 2, 1, 1, Dyes.dyeBlue , Collections.singletonList(new TC_AspectStack(TC_Aspects.AQUA, 1))).setHasCorrespondingFluid(true); - public static Materials Grade2PurifiedWater = new Materials( 555, TextureSet.SET_FLUID , 1.0F, 0, 2, 16 , 0, 0, 250, 0, "Grade2PurifiedWater" , "Grade 2 Purified Water" , 0, 0, 273, 0, false, true, 2, 1, 1, Dyes.dyeBlue , Collections.singletonList(new TC_AspectStack(TC_Aspects.AQUA, 1))).setHasCorrespondingFluid(true); - public static Materials Grade3PurifiedWater = new Materials( 556, TextureSet.SET_FLUID , 1.0F, 0, 2, 16 , 0, 0, 245, 0, "Grade3PurifiedWater" , "Grade 3 Purified Water" , 0, 0, 273, 0, false, true, 2, 1, 1, Dyes.dyeBlue , Collections.singletonList(new TC_AspectStack(TC_Aspects.AQUA, 1))).setHasCorrespondingFluid(true); - public static Materials Grade4PurifiedWater = new Materials( 557, TextureSet.SET_FLUID , 1.0F, 0, 2, 16 , 0, 0, 240, 0, "Grade4PurifiedWater" , "Grade 4 Purified Water" , 0, 0, 273, 0, false, true, 2, 1, 1, Dyes.dyeBlue , Collections.singletonList(new TC_AspectStack(TC_Aspects.AQUA, 1))).setHasCorrespondingFluid(true); - public static Materials Grade5PurifiedWater = new Materials( 558, TextureSet.SET_FLUID , 1.0F, 0, 2, 16 , 0, 0, 235, 0, "Grade5PurifiedWater" , "Grade 5 Purified Water" , 0, 0, 273, 0, false, true, 2, 1, 1, Dyes.dyeBlue , Collections.singletonList(new TC_AspectStack(TC_Aspects.AQUA, 1))).setHasCorrespondingFluid(true); - public static Materials Grade6PurifiedWater = new Materials( 559, TextureSet.SET_FLUID , 1.0F, 0, 2, 16 , 0, 0, 230, 0, "Grade6PurifiedWater" , "Grade 6 Purified Water" , 0, 0, 273, 0, false, true, 2, 1, 1, Dyes.dyeBlue , Collections.singletonList(new TC_AspectStack(TC_Aspects.AQUA, 1))).setHasCorrespondingFluid(true); - public static Materials Grade7PurifiedWater = new Materials( 560, TextureSet.SET_FLUID , 1.0F, 0, 2, 16 , 0, 0, 225, 0, "Grade7PurifiedWater" , "Grade 7 Purified Water" , 0, 0, 273, 0, false, true, 2, 1, 1, Dyes.dyeBlue , Collections.singletonList(new TC_AspectStack(TC_Aspects.AQUA, 1))).setHasCorrespondingFluid(true); - public static Materials Grade8PurifiedWater = new Materials( 561, TextureSet.SET_FLUID , 1.0F, 0, 2, 16 , 0, 0, 220, 0, "Grade8PurifiedWater" , "Grade 8 Purified Water" , 0, 0, 273, 0, false, true, 2, 1, 1, Dyes.dyeBlue , Collections.singletonList(new TC_AspectStack(TC_Aspects.AQUA, 1))).setHasCorrespondingFluid(true); + public static Materials Grade1PurifiedWater = new Materials( 554, TextureSet.SET_FLUID , 1.0F, 0, 2, 16 , 34, 35, 52, 0, "Grade1PurifiedWater" , "Grade 1 Purified Water" , 0, 0, 273, 0, false, true, 2, 1, 1, Dyes.dyeBlue , Collections.singletonList(new TC_AspectStack(TC_Aspects.AQUA, 1))).setHasCorrespondingFluid(true); + public static Materials Grade2PurifiedWater = new Materials( 555, TextureSet.SET_FLUID , 1.0F, 0, 2, 16 , 42, 41, 77, 0, "Grade2PurifiedWater" , "Grade 2 Purified Water" , 0, 0, 273, 0, false, true, 2, 1, 1, Dyes.dyeBlue , Collections.singletonList(new TC_AspectStack(TC_Aspects.AQUA, 1))).setHasCorrespondingFluid(true); + public static Materials Grade3PurifiedWater = new Materials( 556, TextureSet.SET_FLUID , 1.0F, 0, 2, 16 , 49, 47, 103, 0, "Grade3PurifiedWater" , "Grade 3 Purified Water" , 0, 0, 273, 0, false, true, 2, 1, 1, Dyes.dyeBlue , Collections.singletonList(new TC_AspectStack(TC_Aspects.AQUA, 1))).setHasCorrespondingFluid(true); + public static Materials Grade4PurifiedWater = new Materials( 557, TextureSet.SET_FLUID , 1.0F, 0, 2, 16 , 54, 53, 132, 0, "Grade4PurifiedWater" , "Grade 4 Purified Water" , 0, 0, 273, 0, false, true, 2, 1, 1, Dyes.dyeBlue , Collections.singletonList(new TC_AspectStack(TC_Aspects.AQUA, 1))).setHasCorrespondingFluid(true); + public static Materials Grade5PurifiedWater = new Materials( 558, TextureSet.SET_FLUID , 1.0F, 0, 2, 16 , 58, 58, 161, 0, "Grade5PurifiedWater" , "Grade 5 Purified Water" , 0, 0, 273, 0, false, true, 2, 1, 1, Dyes.dyeBlue , Collections.singletonList(new TC_AspectStack(TC_Aspects.AQUA, 1))).setHasCorrespondingFluid(true); + public static Materials Grade6PurifiedWater = new Materials( 559, TextureSet.SET_FLUID , 1.0F, 0, 2, 16 , 61, 64, 191, 0, "Grade6PurifiedWater" , "Grade 6 Purified Water" , 0, 0, 273, 0, false, true, 2, 1, 1, Dyes.dyeBlue , Collections.singletonList(new TC_AspectStack(TC_Aspects.AQUA, 1))).setHasCorrespondingFluid(true); + public static Materials Grade7PurifiedWater = new Materials( 560, TextureSet.SET_FLUID , 1.0F, 0, 2, 16 , 63, 70, 221, 0, "Grade7PurifiedWater" , "Grade 7 Purified Water" , 0, 0, 273, 0, false, true, 2, 1, 1, Dyes.dyeBlue , Collections.singletonList(new TC_AspectStack(TC_Aspects.AQUA, 1))).setHasCorrespondingFluid(true); + public static Materials Grade8PurifiedWater = new Materials( 561, TextureSet.SET_FLUID , 1.0F, 0, 2, 16 , 63, 76, 253, 0, "Grade8PurifiedWater" , "Grade 8 Purified Water" , 0, 0, 273, 0, false, true, 2, 1, 1, Dyes.dyeBlue , Collections.singletonList(new TC_AspectStack(TC_Aspects.AQUA, 1))).setHasCorrespondingFluid(true); + public static Materials FlocculationWasteLiquid = new Materials(562, TextureSet.SET_FLUID, 1.0f, 0, 2, 16, 61, 58, 82, 0, "FlocculationWasteLiquid", "Flocculation Waste Liquid", 0, 0, 273, 0, false, true, 2, 1, 1, Dyes.dyeBlue , Collections.singletonList(new TC_AspectStack(TC_Aspects.AQUA, 1))).setHasCorrespondingFluid(true); //GT++ materials @@ -946,6 +947,55 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { public static Materials TengamAttuned = new MaterialBuilder(112, TextureSet.SET_MAGNETIC, "Attuned Tengam") .addDustItems().addGearItems().addMetalItems().addToolHeadItems().setAspects(Arrays.asList(new TC_AspectStack(TC_Aspects.MAGNETO, 4), new TC_AspectStack(TC_Aspects.ELECTRUM, 1))).setColor(Dyes.dyeLime).setName("TengamAttuned") .setRGB(213, 255, 128).constructMaterial().setProcessingMaterialTierEU(TierEU.RECIPE_UV); public static Materials TengamRaw = new MaterialBuilder(110, TextureSet.SET_ROUGH, "Raw Tengam") .addOreItems() .setAspects(Arrays.asList(new TC_AspectStack(TC_Aspects.MAGNETO, 1), new TC_AspectStack(TC_Aspects.ELECTRUM, 4))).setColor(Dyes.dyeLime).setName("TengamRaw") .setRGB(160, 191, 96).constructMaterial().setProcessingMaterialTierEU(TierEU.RECIPE_UV); + // Activated Carbon Line + public static Materials ActivatedCarbon = new MaterialBuilder(563, TextureSet.SET_DULL, "Activated Carbon") + .addDustItems() + .setRGB(20, 20, 20) + .setName("ActivatedCarbon") + .setOreValue(0) + .setMaterialList(new MaterialStack(Carbon, 1)) + .constructMaterial() + .disableAutoGeneratedRecycleRecipes(); + public static Materials PreActivatedCarbon = new MaterialBuilder(564, TextureSet.SET_DULL, "Pre-Activated Carbon") + .addDustItems() + .setRGB(15, 51, 65) + .setName("PreActivatedCarbon") + .setOreValue(0) + .setMaterialList(new MaterialStack(Carbon, 1), new MaterialStack(PhosphoricAcid, 1)) + .constructMaterial() + .disableAutoGeneratedRecycleRecipes(); + public static Materials DirtyActivatedCarbon = new MaterialBuilder(565, TextureSet.SET_DULL, "Dirty Activated Carbon") + .addDustItems() + .setRGB(110, 110, 110) + .setName("carbonactivateddirty") // don't change this to the more sensible name or a centrifuge recipe appears + .setOreValue(0) + .setMaterialList(new MaterialStack(Carbon, 1), new MaterialStack(PhosphoricAcid, 1)) + .constructMaterial() + .disableAutoGeneratedRecycleRecipes(); + + // Advanced glue uses id 567?? ok + public static Materials PolyAluminiumChloride = new MaterialBuilder(566, TextureSet.SET_FLUID, "Polyaluminium Chloride") + .addFluid() + .addCell() + .setRGB(252, 236, 5) + .setName("PolyaluminiumChloride") + .constructMaterial(); + + public static Materials Ozone = new MaterialBuilder(568, TextureSet.SET_FLUID, "Ozone") + .addGas() + .addCell() + .setRGB(190, 244, 250) + .setName("Ozone") + .setMaterialList(new MaterialStack(Oxygen, 3)) + .constructMaterial(); + + public static Materials StableBaryonicMatter = new MaterialBuilder(569, TextureSet.SET_FLUID, "Stabilised Baryonic Matter") + .addFluid() + .addCell() + .setRGB(20, 10, 20) + .setName("StableBaryonicMatter") + .constructMaterial(); + // spotless:on static { @@ -1949,11 +1999,13 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { Grade6PurifiedWater.mChemicalFormula = "H\u2082O"; Grade7PurifiedWater.mChemicalFormula = "H\u2082O"; Grade8PurifiedWater.mChemicalFormula = "H\u2082O"; + FlocculationWasteLiquid.mChemicalFormula = "Al\u2082(OH)\u2083??Cl\u2083"; TengamRaw.mChemicalFormula = ""; TengamPurified.mChemicalFormula = "M"; TengamAttuned.mChemicalFormula = "M"; MaterialsUEVplus.ExcitedDTSC.mChemicalFormula = "[-Stellar-Stellar-]"; MaterialsUEVplus.DimensionallyTranscendentStellarCatalyst.mChemicalFormula = "Stellar"; + PolyAluminiumChloride.mChemicalFormula = "Al\u2082(OH)\u2083Cl\u2083"; } private static void initSubTags() { diff --git a/src/main/java/gregtech/api/enums/MetaTileEntityIDs.java b/src/main/java/gregtech/api/enums/MetaTileEntityIDs.java index b34c5d79f0..78bc31ec57 100644 --- a/src/main/java/gregtech/api/enums/MetaTileEntityIDs.java +++ b/src/main/java/gregtech/api/enums/MetaTileEntityIDs.java @@ -684,6 +684,19 @@ public enum MetaTileEntityIDs { INDUSTRIAL_APIARY(9399), Drone_Centre(9400), DroneDownLink(9401), + PURIFICATION_PLANT_CONTROLLER(9402), + PURIFICATION_UNIT_CLARIFIER(9403), + PURIFICATION_UNIT_OZONATION(9404), + PURIFICATION_UNIT_FLOCCULATOR(9405), + PURIFICATION_UNIT_PH_ADJUSTMENT(9406), + HATCH_PH_SENSOR(9407), + PURIFICATION_UNIT_PLASMA_HEATER(9408), + PURIFICATION_UNIT_UV_TREATMENT(9409), + HATCH_LENS_HOUSING(9410), + HATCH_LENS_INDICATOR(9411), + PURIFICATION_UNIT_DEGASIFIER(9412), + HATCH_DEGASIFIER_CONTROL(9413), + PURIFICATION_UNIT_PARTICLE_EXTRACTOR(9414), sofc1(13101), sofc2(13102), tfft(13104), diff --git a/src/main/java/gregtech/api/enums/SoundResource.java b/src/main/java/gregtech/api/enums/SoundResource.java index 54a2162541..712c1b5016 100644 --- a/src/main/java/gregtech/api/enums/SoundResource.java +++ b/src/main/java/gregtech/api/enums/SoundResource.java @@ -63,6 +63,12 @@ public enum SoundResource { GT_MACHINES_WATER_PUMP_LOOP(234, GregTech.ID, "machines.WaterPumpLoop"), GT_MACHINES_STEAM_CENTRIFUGE_LOOP(235, GregTech.ID, "machines.SteamCentrifugeLoop"), + GT_MACHINES_PURIFICATIONPLANT_LOOP(233, GregTech.ID, "machines.PurificationPlantLoop"), + GT_MACHINES_PURIFICATION_PH_LOOP(234, GregTech.ID, "machines.PurificationPhLoop"), + GT_MACHINES_COAGULATION_LOOP(235, GregTech.ID, "machines.PurificationCoagulationLoop"), + GT_MACHINES_OZONATION_LOOP(236, GregTech.ID, "machines.PurificationOzonationLoop"), + GT_MACHINES_PURIFICATION_PLASMA_LOOP(237, "machines.PurificationPlasmaLoop"), + GUI_BUTTON_DOWN(-1, GregTech.ID, "gui.buttonDown"), GUI_BUTTON_UP(-1, GregTech.ID, "gui.buttonUp"), diff --git a/src/main/java/gregtech/api/enums/Textures.java b/src/main/java/gregtech/api/enums/Textures.java index b190d60d00..300f2281ae 100644 --- a/src/main/java/gregtech/api/enums/Textures.java +++ b/src/main/java/gregtech/api/enums/Textures.java @@ -1346,6 +1346,8 @@ public class Textures { OVERLAY_ME_CRAFTING_HATCH_ACTIVE, OVERLAY_ME_FLUID_HATCH, OVERLAY_ME_FLUID_HATCH_ACTIVE, + OVERLAY_HATCH_PH_SENSOR, + OVERLAY_HATCH_PH_SENSOR_GLOW, STRUCTURE_MARK, @@ -1404,7 +1406,29 @@ public class Textures { LARGETURBINE_NEW_EMPTY6, LARGETURBINE_NEW_EMPTY7, LARGETURBINE_NEW_EMPTY8, - LARGETURBINE_NEW_EMPTY9,; + LARGETURBINE_NEW_EMPTY9, + INDUSTRIAL_STRENGTH_CONCRETE, + GLASS_PH_RESISTANT, + GLASS_TINTED_INDUSTRIAL_WHITE, + GLASS_TINTED_INDUSTRIAL_LIGHT_GRAY, + GLASS_TINTED_INDUSTRIAL_GRAY, + GLASS_TINTED_INDUSTRIAL_BLACK, + MACHINE_CASING_INDUSTRIAL_WATER_PLANT, + WATER_PLANT_CONCRETE_CASING, + MACHINE_CASING_FLOCCULATION, + MACHINE_CASING_NAQUADAH_REINFORCED_WATER_PLANT, + MACHINE_CASING_EXTREME_CORROSION_RESISTANT, + MACHINE_CASING_HIGH_PRESSURE_RESISTANT, + MACHINE_CASING_OZONE, + MACHINE_CASING_PLASMA_HEATER, + NAQUADRIA_REINFORCED_WATER_PLANT_CASING, + UV_BACKLIGHT_STERILIZER_CASING, + NEUTRONIUM_COATED_UV_RESISTANT_GLASS, + OMNI_PURPOSE_INFINITY_FUSED_GLASS, + GLASS_QUARK_CONTAINMENT, + BLOCK_QUARK_PIPE, + BLOCK_QUARK_RELEASE_CHAMBER, + BLOCK_QUARK_CONTAINMENT_CASING,; /** * Icon for Fresh CFoam 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 100c39ea1a..b456026dbd 100644 --- a/src/main/java/gregtech/api/gui/modularui/GT_UITextures.java +++ b/src/main/java/gregtech/api/gui/modularui/GT_UITextures.java @@ -26,7 +26,8 @@ public class GT_UITextures { .of(GregTech.ID, "gui/background/text_field_light_gray", 61, 12, 1); public static final AdaptableUITexture BACKGROUND_NEI_SINGLE_RECIPE = AdaptableUITexture .of(GregTech.ID, "gui/background/nei_single_recipe.png", 64, 64, 2); - + public static final UITexture BACKGROUND_FLOCCULATION_RECIPE = UITexture + .fullImage(GregTech.ID, "gui/background/flocculation_recipe.png"); public static final SteamTexture SLOT_ITEM_STEAM = SteamTexture.fullImage(GregTech.ID, "gui/slot/item_%s"); public static final SteamTexture SLOT_FLUID_STEAM = SteamTexture.fullImage(GregTech.ID, "gui/slot/fluid_%s"); public static final AdaptableUITexture SLOT_DARK_GRAY = AdaptableUITexture @@ -205,6 +206,14 @@ public class GT_UITextures { public static final UITexture PROGRESSBAR_SLICE = UITexture.fullImage(GregTech.ID, "gui/progressbar/slice"); public static final UITexture PROGRESSBAR_STORED_EU = UITexture.fullImage(GregTech.ID, "gui/progressbar/stored_eu"); public static final UITexture PROGRESSBAR_WIREMILL = UITexture.fullImage(GregTech.ID, "gui/progressbar/wiremill"); + public static final UITexture PROGRESSBAR_FLOCCULATION = UITexture + .fullImage(GregTech.ID, "gui/progressbar/flocculation"); + public static final UITexture PROGRESSBAR_CLARIFIER = UITexture.fullImage(GregTech.ID, "gui/progressbar/clarifier"); + public static final UITexture PROGRESSBAR_PH_NEUTRALIZATION = UITexture + .fullImage(GregTech.ID, "gui/progressbar/phneutralization"); + public static final UITexture PROGRESSBAR_OZONATION = UITexture.fullImage(GregTech.ID, "gui/progressbar/ozonation"); + public static final UITexture PROGRESSBAR_PLASMA_HEATER = UITexture + .fullImage(GregTech.ID, "gui/progressbar/water_plasma_heater"); public static FallbackableUITexture fallbackableProgressbar(String name, UITexture fallback) { return new FallbackableUITexture(UITexture.fullImage(GregTech.ID, "gui/progressbar/" + name), fallback); diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_InputBus.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_InputBus.java index f4c4eb6a14..089aec53e0 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_InputBus.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_InputBus.java @@ -302,11 +302,18 @@ public class GT_MetaTileEntity_Hatch_InputBus extends GT_MetaTileEntity_Hatch buildContext.addCloseListener(() -> uiButtonCount = 0); addSortStacksButton(builder); addOneStackLimitButton(builder); - switch (mTier) { - case 0 -> getBaseMetaTileEntity().add1by1Slot(builder); - case 1 -> getBaseMetaTileEntity().add2by2Slots(builder); - case 2 -> getBaseMetaTileEntity().add3by3Slots(builder); - default -> getBaseMetaTileEntity().add4by4Slots(builder); + // Remove one for ghost circuit slot + int slotCount = getSizeInventory(); + if (allowSelectCircuit()) { + slotCount = slotCount - 1; + } + // We do this to decouple slot count from tier in here, since there is no reason to do so. + switch (slotCount) { + case 1 -> getBaseMetaTileEntity().add1by1Slot(builder); + case 4 -> getBaseMetaTileEntity().add2by2Slots(builder); + case 9 -> getBaseMetaTileEntity().add3by3Slots(builder); + case 16 -> getBaseMetaTileEntity().add4by4Slots(builder); + default -> {} } } diff --git a/src/main/java/gregtech/api/recipe/RecipeMaps.java b/src/main/java/gregtech/api/recipe/RecipeMaps.java index c42b8725b4..6d614d27d0 100644 --- a/src/main/java/gregtech/api/recipe/RecipeMaps.java +++ b/src/main/java/gregtech/api/recipe/RecipeMaps.java @@ -59,12 +59,18 @@ import gregtech.api.recipe.maps.LargeNEIFrontend; import gregtech.api.recipe.maps.MicrowaveBackend; import gregtech.api.recipe.maps.OilCrackerBackend; import gregtech.api.recipe.maps.PrinterBackend; +import gregtech.api.recipe.maps.PurificationUnitClarifierFrontend; +import gregtech.api.recipe.maps.PurificationUnitFlocculatorFrontend; +import gregtech.api.recipe.maps.PurificationUnitOzonationFrontend; +import gregtech.api.recipe.maps.PurificationUnitPhAdjustmentFrontend; +import gregtech.api.recipe.maps.PurificationUnitPlasmaHeaterFrontend; import gregtech.api.recipe.maps.RecyclerBackend; import gregtech.api.recipe.maps.ReplicatorBackend; import gregtech.api.recipe.maps.SpaceProjectFrontend; import gregtech.api.recipe.maps.TranscendentPlasmaMixerFrontend; import gregtech.api.recipe.maps.UnpackagerBackend; import gregtech.api.recipe.metadata.PCBFactoryTierKey; +import gregtech.api.recipe.metadata.PurificationPlantBaseChanceKey; import gregtech.api.util.GT_Config; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_OreDictUnificator; @@ -72,6 +78,7 @@ import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_RecipeConstants; import gregtech.api.util.GT_RecipeMapUtil; import gregtech.api.util.GT_Utility; +import gregtech.common.tileentities.machines.multi.purification.PurifiedWaterHelpers; import gregtech.nei.formatter.FuelSpecialValueFormatter; import gregtech.nei.formatter.FusionSpecialValueFormatter; import gregtech.nei.formatter.HeatingCoilSpecialValueFormatter; @@ -297,6 +304,22 @@ public final class RecipeMaps { .slotOverlays( (index, isFluid, isOutput, isSpecial) -> !isFluid && !isOutput && index != 0 ? GT_UITextures.OVERLAY_SLOT_LENS : null) + // Add a simple ordering so lower tier purified water is displayed first, otherwise it gets really confusing + .neiRecipeComparator((a, b) -> { + // Find lens, if no lens was present we can use the default comparator + if (a.mInputs.length > 1 && b.mInputs.length > 1) { + ItemStack firstLens = a.mInputs[1]; + ItemStack secondLens = b.mInputs[1]; + // Find purified water/any fluid, if none was present simply use the lens to compare + if (ItemStack.areItemStacksEqual(firstLens, secondLens) && a.mFluidInputs.length > 0 + && b.mFluidInputs.length > 0) { + return Comparator + .<GT_Recipe, Integer>comparing(r -> PurifiedWaterHelpers.getWaterTier(r.mFluidInputs[0])) + .compare(a, b); + } + } + return a.compareTo(b); + }) .recipeConfigFile("laserengraving", FIRST_ITEM_OUTPUT) .build(); public static final RecipeMap<RecipeMapBackend> mixerRecipes = RecipeMapBuilder.of("gt.recipe.mixer") @@ -1149,6 +1172,78 @@ public final class RecipeMaps { .<GT_Recipe, Integer>comparing(recipe -> recipe.getMetadataOrDefault(PCBFactoryTierKey.INSTANCE, 1)) .thenComparing(GT_Recipe::compareTo)) .build(); + public static final RecipeMap<RecipeMapBackend> purificationClarifierRecipes = RecipeMapBuilder + .of("gt.recipe.purificationplantclarifier") + .maxIO(1, 4, 1, 1) + .minInputs(0, 1) + .frontend(PurificationUnitClarifierFrontend::new) + .disableOptimize() + .build(); + public static final RecipeMap<RecipeMapBackend> purificationOzonationRecipes = RecipeMapBuilder + .of("gt.recipe.purificationplantozonation") + .maxIO(0, 4, 2, 1) + .minInputs(0, 2) + .progressBar(GT_UITextures.PROGRESSBAR_BATH) + .neiRecipeComparator( + Comparator + .<GT_Recipe, Float>comparing( + recipe -> recipe.getMetadataOrDefault(PurificationPlantBaseChanceKey.INSTANCE, 0.0f)) + .thenComparing(GT_Recipe::compareTo)) + .frontend(PurificationUnitOzonationFrontend::new) + .disableOptimize() + .build(); + public static final RecipeMap<RecipeMapBackend> purificationFlocculationRecipes = RecipeMapBuilder + .of("gt.recipe.purificationplantflocculation") + .maxIO(0, 3, 2, 2) + .minInputs(0, 1) + .progressBar(GT_UITextures.PROGRESSBAR_BATH) + .neiRecipeComparator( + Comparator + .<GT_Recipe, Float>comparing( + recipe -> recipe.getMetadataOrDefault(PurificationPlantBaseChanceKey.INSTANCE, 0.0f)) + .thenComparing(GT_Recipe::compareTo)) + .frontend(PurificationUnitFlocculatorFrontend::new) + .disableOptimize() + .build(); + + public static final RecipeMap<RecipeMapBackend> purificationPhAdjustmentRecipes = RecipeMapBuilder + .of("gt.recipe.purificationplantphadjustment") + .maxIO(0, 0, 1, 1) + .minInputs(0, 1) + .progressBar(GT_UITextures.PROGRESSBAR_MIXER) + .frontend(PurificationUnitPhAdjustmentFrontend::new) + .disableOptimize() + .build(); + + public static final RecipeMap<RecipeMapBackend> purificationPlasmaHeatingRecipes = RecipeMapBuilder + .of("gt.recipe.purificationplantplasmaheating") + .maxIO(0, 0, 1, 1) + .minInputs(0, 1) + .progressBar(GT_UITextures.PROGRESSBAR_BOILER_HEAT) + .frontend(PurificationUnitPlasmaHeaterFrontend::new) + .disableOptimize() + .build(); + public static final RecipeMap<RecipeMapBackend> purificationUVTreatmentRecipes = RecipeMapBuilder + .of("gt.recipe.purificationplantuvtreatment") + .maxIO(0, 0, 1, 1) + .minInputs(0, 1) + .progressBar(GT_UITextures.PROGRESSBAR_ARROW) + .disableOptimize() + .build(); + public static final RecipeMap<RecipeMapBackend> purificationDegasifierRecipes = RecipeMapBuilder + .of("gt.recipe.purificationplantdegasifier") + .maxIO(0, 3, 1, 2) + .minInputs(0, 1) + .progressBar(GT_UITextures.PROGRESSBAR_ARROW) + .disableOptimize() + .build(); + public static final RecipeMap<RecipeMapBackend> purificationParticleExtractionRecipes = RecipeMapBuilder + .of("gt.recipe.purificationplantquarkextractor") + .maxIO(2, 1, 1, 2) + .minInputs(0, 1) + .progressBar(GT_UITextures.PROGRESSBAR_ARROW) + .disableOptimize() + .build(); public static final RecipeMap<RecipeMapBackend> ic2NuclearFakeRecipes = RecipeMapBuilder.of("gt.recipe.ic2nuke") .maxIO(1, 1, 0, 0) .minInputs(1, 0) diff --git a/src/main/java/gregtech/api/recipe/maps/PurificationUnitClarifierFrontend.java b/src/main/java/gregtech/api/recipe/maps/PurificationUnitClarifierFrontend.java new file mode 100644 index 0000000000..c7dad7ea3a --- /dev/null +++ b/src/main/java/gregtech/api/recipe/maps/PurificationUnitClarifierFrontend.java @@ -0,0 +1,72 @@ +package gregtech.api.recipe.maps; + +import java.util.ArrayList; +import java.util.List; + +import javax.annotation.ParametersAreNonnullByDefault; + +import com.gtnewhorizons.modularui.api.drawable.FallbackableUITexture; +import com.gtnewhorizons.modularui.api.math.Pos2d; +import com.gtnewhorizons.modularui.api.math.Size; + +import codechicken.nei.PositionedStack; +import gregtech.api.enums.ItemList; +import gregtech.api.gui.modularui.GT_UITextures; +import gregtech.api.recipe.BasicUIPropertiesBuilder; +import gregtech.api.recipe.NEIRecipePropertiesBuilder; +import gregtech.api.util.MethodsReturnNonnullByDefault; +import gregtech.common.gui.modularui.UIHelper; +import gregtech.common.tileentities.machines.multi.purification.GT_MetaTileEntity_PurificationUnitClarifier; +import gregtech.nei.GT_NEI_DefaultHandler; + +@ParametersAreNonnullByDefault +@MethodsReturnNonnullByDefault +public class PurificationUnitClarifierFrontend extends PurificationUnitRecipeMapFrontend { + + public PurificationUnitClarifierFrontend(BasicUIPropertiesBuilder uiPropertiesBuilder, + NEIRecipePropertiesBuilder neiPropertiesBuilder) { + super( + 80, + uiPropertiesBuilder.logoPos(new Pos2d(160, 100)) + .progressBarTexture(new FallbackableUITexture(GT_UITextures.PROGRESSBAR_CLARIFIER)) + .logoPos(new Pos2d(152, 90)), + neiPropertiesBuilder.recipeBackgroundSize(new Size(170, 120))); + } + + @Override + public List<Pos2d> getFluidInputPositions(int fluidInputCount) { + ArrayList<Pos2d> positions = new ArrayList<>(); + positions.add(new Pos2d(6, 7)); + return positions; + } + + @Override + public List<Pos2d> getFluidOutputPositions(int fluidOutputCount) { + ArrayList<Pos2d> positions = new ArrayList<>(); + positions.add(new Pos2d(154, 7)); + return positions; + } + + @Override + public List<Pos2d> getItemInputPositions(int itemInputCount) { + ArrayList<Pos2d> positions = new ArrayList<>(); + positions.add(new Pos2d(79, 43)); + return positions; + } + + @Override + public List<Pos2d> getItemOutputPositions(int itemOutputCount) { + return UIHelper.getGridPositions(itemOutputCount, 136, 43, 2, 2); + } + + @Override + public void drawNEIOverlays(GT_NEI_DefaultHandler.CachedDefaultRecipe neiCachedRecipe) { + super.drawNEIOverlays(neiCachedRecipe); + + for (PositionedStack stack : neiCachedRecipe.mInputs) { + if (stack.item.isItemEqual(ItemList.ActivatedCarbonFilterMesh.get(1))) { + drawNEIOverlayText((int) (GT_MetaTileEntity_PurificationUnitClarifier.FILTER_DAMAGE_RATE) + "%", stack); + } + } + } +} diff --git a/src/main/java/gregtech/api/recipe/maps/PurificationUnitFlocculatorFrontend.java b/src/main/java/gregtech/api/recipe/maps/PurificationUnitFlocculatorFrontend.java new file mode 100644 index 0000000000..9366237b67 --- /dev/null +++ b/src/main/java/gregtech/api/recipe/maps/PurificationUnitFlocculatorFrontend.java @@ -0,0 +1,99 @@ +package gregtech.api.recipe.maps; + +import java.util.ArrayList; +import java.util.List; + +import javax.annotation.ParametersAreNonnullByDefault; + +import net.minecraft.item.ItemStack; + +import org.jetbrains.annotations.NotNull; + +import com.gtnewhorizons.modularui.api.drawable.FallbackableUITexture; +import com.gtnewhorizons.modularui.api.math.Pos2d; +import com.gtnewhorizons.modularui.api.math.Size; + +import codechicken.nei.PositionedStack; +import gregtech.api.enums.Materials; +import gregtech.api.gui.modularui.GT_UITextures; +import gregtech.api.recipe.BasicUIPropertiesBuilder; +import gregtech.api.recipe.NEIRecipePropertiesBuilder; +import gregtech.api.util.GT_Utility; +import gregtech.api.util.MethodsReturnNonnullByDefault; +import gregtech.common.gui.modularui.UIHelper; +import gregtech.common.tileentities.machines.multi.purification.GT_MetaTileEntity_PurificationUnitFlocculation; +import gregtech.nei.GT_NEI_DefaultHandler; + +@ParametersAreNonnullByDefault +@MethodsReturnNonnullByDefault +public class PurificationUnitFlocculatorFrontend extends PurificationUnitRecipeMapFrontend { + + public PurificationUnitFlocculatorFrontend(BasicUIPropertiesBuilder uiPropertiesBuilder, + NEIRecipePropertiesBuilder neiPropertiesBuilder) { + super( + 80, + uiPropertiesBuilder.logoPos(new Pos2d(160, 100)) + .progressBarTexture(new FallbackableUITexture(GT_UITextures.PROGRESSBAR_FLOCCULATION)) + .logoPos(new Pos2d(152, 100)), + neiPropertiesBuilder.recipeBackgroundSize(new Size(170, 120))); + } + + @Override + public List<Pos2d> getFluidInputPositions(int fluidInputCount) { + ArrayList<Pos2d> positions = new ArrayList<>(); + positions.add(new Pos2d(9, 39)); + return positions; + } + + @Override + public List<Pos2d> getFluidOutputPositions(int fluidOutputCount) { + ArrayList<Pos2d> positions = new ArrayList<>(); + positions.add(new Pos2d(151, 39)); + return positions; + } + + @Override + public List<Pos2d> getItemOutputPositions(int itemOutputCount) { + return UIHelper.getGridPositions(itemOutputCount, 115, 80, 3, 1); + } + + @Override + @NotNull + public List<String> handleNEIItemTooltip(ItemStack stack, List<String> currentTip, + GT_NEI_DefaultHandler.CachedDefaultRecipe neiCachedRecipe) { + if (stack + .isItemEqual(GT_Utility.getFluidDisplayStack(Materials.PolyAluminiumChloride.getFluid(1000L), false))) { + currentTip.add("Consumed during operation"); + currentTip.add( + "+" + GT_MetaTileEntity_PurificationUnitFlocculation.SUCCESS_PER_LEVEL + + "%/" + + GT_MetaTileEntity_PurificationUnitFlocculation.INPUT_CHEMICAL_PER_LEVEL + + "L"); + } else if (stack + .isItemEqual(GT_Utility.getFluidDisplayStack(Materials.FlocculationWasteLiquid.getFluid(1000L), false))) { + currentTip.add("Returned in amount equivalent to consumed flocculant."); + } + return super.handleNEIItemTooltip(stack, currentTip, neiCachedRecipe); + } + + @Override + public void drawNEIOverlays(GT_NEI_DefaultHandler.CachedDefaultRecipe neiCachedRecipe) { + super.drawNEIOverlays(neiCachedRecipe); + + // Display flocculation chemical + neiCachedRecipe.mInputs.add( + new PositionedStack( + GT_Utility.getFluidDisplayStack(Materials.PolyAluminiumChloride.getFluid(100000L), true), + 5, + -1, + false)); + + // Display waste output + neiCachedRecipe.mOutputs.add( + new PositionedStack( + GT_Utility.getFluidDisplayStack(Materials.FlocculationWasteLiquid.getFluid(100000L), true), + 147, + 48, + false)); + } +} diff --git a/src/main/java/gregtech/api/recipe/maps/PurificationUnitOzonationFrontend.java b/src/main/java/gregtech/api/recipe/maps/PurificationUnitOzonationFrontend.java new file mode 100644 index 0000000000..cdfd41b78c --- /dev/null +++ b/src/main/java/gregtech/api/recipe/maps/PurificationUnitOzonationFrontend.java @@ -0,0 +1,51 @@ +package gregtech.api.recipe.maps; + +import java.util.ArrayList; +import java.util.List; + +import javax.annotation.ParametersAreNonnullByDefault; + +import com.gtnewhorizons.modularui.api.drawable.FallbackableUITexture; +import com.gtnewhorizons.modularui.api.math.Pos2d; +import com.gtnewhorizons.modularui.api.math.Size; + +import gregtech.api.gui.modularui.GT_UITextures; +import gregtech.api.recipe.BasicUIPropertiesBuilder; +import gregtech.api.recipe.NEIRecipePropertiesBuilder; +import gregtech.api.util.MethodsReturnNonnullByDefault; +import gregtech.common.gui.modularui.UIHelper; + +@ParametersAreNonnullByDefault +@MethodsReturnNonnullByDefault +public class PurificationUnitOzonationFrontend extends PurificationUnitRecipeMapFrontend { + + public PurificationUnitOzonationFrontend(BasicUIPropertiesBuilder uiPropertiesBuilder, + NEIRecipePropertiesBuilder neiPropertiesBuilder) { + super( + 120, + uiPropertiesBuilder.logoPos(new Pos2d(160, 100)) + .progressBarTexture(new FallbackableUITexture(GT_UITextures.PROGRESSBAR_OZONATION)) + .logoPos(new Pos2d(152, 97)), + neiPropertiesBuilder.recipeBackgroundSize(new Size(170, 180))); + } + + @Override + public List<Pos2d> getFluidInputPositions(int fluidInputCount) { + ArrayList<Pos2d> positions = new ArrayList<>(); + positions.add(new Pos2d(79, 100)); + positions.add(new Pos2d(27, 77)); + return positions; + } + + @Override + public List<Pos2d> getItemOutputPositions(int itemOutputCount) { + return UIHelper.getGridPositions(itemOutputCount, 131, 26, 2); + } + + @Override + public List<Pos2d> getFluidOutputPositions(int fluidOutputCount) { + ArrayList<Pos2d> positions = new ArrayList<>(); + positions.add(new Pos2d(131, 97)); + return positions; + } +} diff --git a/src/main/java/gregtech/api/recipe/maps/PurificationUnitPhAdjustmentFrontend.java b/src/main/java/gregtech/api/recipe/maps/PurificationUnitPhAdjustmentFrontend.java new file mode 100644 index 0000000000..7e9eded675 --- /dev/null +++ b/src/main/java/gregtech/api/recipe/maps/PurificationUnitPhAdjustmentFrontend.java @@ -0,0 +1,79 @@ +package gregtech.api.recipe.maps; + +import java.util.ArrayList; +import java.util.List; + +import javax.annotation.ParametersAreNonnullByDefault; + +import net.minecraft.item.ItemStack; + +import org.jetbrains.annotations.NotNull; + +import com.gtnewhorizons.modularui.api.drawable.FallbackableUITexture; +import com.gtnewhorizons.modularui.api.math.Pos2d; +import com.gtnewhorizons.modularui.api.math.Size; + +import codechicken.nei.PositionedStack; +import gregtech.api.enums.Materials; +import gregtech.api.gui.modularui.GT_UITextures; +import gregtech.api.recipe.BasicUIPropertiesBuilder; +import gregtech.api.recipe.NEIRecipePropertiesBuilder; +import gregtech.api.util.GT_Utility; +import gregtech.api.util.MethodsReturnNonnullByDefault; +import gregtech.common.tileentities.machines.multi.purification.GT_MetaTileEntity_PurificationUnitPhAdjustment; +import gregtech.nei.GT_NEI_DefaultHandler; + +@ParametersAreNonnullByDefault +@MethodsReturnNonnullByDefault +public class PurificationUnitPhAdjustmentFrontend extends PurificationUnitRecipeMapFrontend { + + public PurificationUnitPhAdjustmentFrontend(BasicUIPropertiesBuilder uiPropertiesBuilder, + NEIRecipePropertiesBuilder neiPropertiesBuilder) { + super( + 80, + uiPropertiesBuilder.logoPos(new Pos2d(160, 100)) + .progressBarTexture(new FallbackableUITexture(GT_UITextures.PROGRESSBAR_PH_NEUTRALIZATION)) + .logoPos(new Pos2d(152, 90)), + neiPropertiesBuilder.recipeBackgroundSize(new Size(170, 120))); + } + + @Override + public List<Pos2d> getFluidInputPositions(int fluidInputCount) { + ArrayList<Pos2d> positions = new ArrayList<>(); + positions.add(new Pos2d(42, 44)); + return positions; + } + + @Override + public List<Pos2d> getFluidOutputPositions(int fluidOutputCount) { + ArrayList<Pos2d> positions = new ArrayList<>(); + positions.add(new Pos2d(116, 44)); + return positions; + } + + @Override + @NotNull + public List<String> handleNEIItemTooltip(ItemStack stack, List<String> currentTip, + GT_NEI_DefaultHandler.CachedDefaultRecipe neiCachedRecipe) { + // Add pH adjustment values + if (stack.isItemEqual(Materials.SodiumHydroxide.getDust(1))) { + currentTip + .add("+" + GT_MetaTileEntity_PurificationUnitPhAdjustment.PH_PER_ALKALINE_DUST * 64 + " pH/stack"); + } else + if (stack.isItemEqual(GT_Utility.getFluidDisplayStack(Materials.HydrochloricAcid.getFluid(1000L), false))) { + currentTip.add(GT_MetaTileEntity_PurificationUnitPhAdjustment.PH_PER_10_ACID_LITER * 100 + " pH/1000L"); + } + return super.handleNEIItemTooltip(stack, currentTip, neiCachedRecipe); + } + + @Override + public void drawNEIOverlays(GT_NEI_DefaultHandler.CachedDefaultRecipe neiCachedRecipe) { + neiCachedRecipe.mInputs.add(new PositionedStack(Materials.SodiumHydroxide.getDust(64), 3, 1, false)); + neiCachedRecipe.mInputs.add( + new PositionedStack( + GT_Utility.getFluidDisplayStack(Materials.HydrochloricAcid.getFluid(1000L), true), + 147, + 1, + false)); + } +} diff --git a/src/main/java/gregtech/api/recipe/maps/PurificationUnitPlasmaHeaterFrontend.java b/src/main/java/gregtech/api/recipe/maps/PurificationUnitPlasmaHeaterFrontend.java new file mode 100644 index 0000000000..5c63353b98 --- /dev/null +++ b/src/main/java/gregtech/api/recipe/maps/PurificationUnitPlasmaHeaterFrontend.java @@ -0,0 +1,59 @@ +package gregtech.api.recipe.maps; + +import java.util.ArrayList; +import java.util.List; + +import javax.annotation.ParametersAreNonnullByDefault; + +import com.gtnewhorizons.modularui.api.drawable.FallbackableUITexture; +import com.gtnewhorizons.modularui.api.math.Pos2d; +import com.gtnewhorizons.modularui.api.math.Size; + +import codechicken.nei.PositionedStack; +import gregtech.api.enums.Materials; +import gregtech.api.gui.modularui.GT_UITextures; +import gregtech.api.recipe.BasicUIPropertiesBuilder; +import gregtech.api.recipe.NEIRecipePropertiesBuilder; +import gregtech.api.util.GT_Utility; +import gregtech.api.util.MethodsReturnNonnullByDefault; +import gregtech.nei.GT_NEI_DefaultHandler; + +@ParametersAreNonnullByDefault +@MethodsReturnNonnullByDefault +public class PurificationUnitPlasmaHeaterFrontend extends PurificationUnitRecipeMapFrontend { + + public PurificationUnitPlasmaHeaterFrontend(BasicUIPropertiesBuilder uiPropertiesBuilder, + NEIRecipePropertiesBuilder neiPropertiesBuilder) { + super( + 120, + uiPropertiesBuilder.logoPos(new Pos2d(152, 90)) + .progressBarTexture(new FallbackableUITexture(GT_UITextures.PROGRESSBAR_PLASMA_HEATER)), + neiPropertiesBuilder.recipeBackgroundSize(new Size(170, 120))); + } + + @Override + public List<Pos2d> getFluidInputPositions(int fluidInputCount) { + ArrayList<Pos2d> positions = new ArrayList<>(); + positions.add(new Pos2d(30, 83)); + return positions; + } + + @Override + public List<Pos2d> getFluidOutputPositions(int fluidOutputCount) { + ArrayList<Pos2d> positions = new ArrayList<>(); + positions.add(new Pos2d(111, 82)); + return positions; + } + + @Override + public void drawNEIOverlays(GT_NEI_DefaultHandler.CachedDefaultRecipe neiCachedRecipe) { + neiCachedRecipe.mInputs.add( + new PositionedStack(GT_Utility.getFluidDisplayStack(Materials.Helium.getPlasma(10L), true), 26, 53, false)); + neiCachedRecipe.mInputs.add( + new PositionedStack( + GT_Utility.getFluidDisplayStack(Materials.SuperCoolant.getFluid(100L), true), + 107, + 52, + false)); + } +} diff --git a/src/main/java/gregtech/api/recipe/maps/PurificationUnitRecipeMapFrontend.java b/src/main/java/gregtech/api/recipe/maps/PurificationUnitRecipeMapFrontend.java new file mode 100644 index 0000000000..849c392cdb --- /dev/null +++ b/src/main/java/gregtech/api/recipe/maps/PurificationUnitRecipeMapFrontend.java @@ -0,0 +1,124 @@ +package gregtech.api.recipe.maps; + +import java.util.function.Supplier; + +import javax.annotation.ParametersAreNonnullByDefault; + +import org.apache.commons.lang3.tuple.Pair; + +import com.gtnewhorizons.modularui.api.ModularUITextures; +import com.gtnewhorizons.modularui.api.drawable.IDrawable; +import com.gtnewhorizons.modularui.api.drawable.UITexture; +import com.gtnewhorizons.modularui.api.forge.IItemHandlerModifiable; +import com.gtnewhorizons.modularui.api.math.Pos2d; +import com.gtnewhorizons.modularui.api.math.Size; +import com.gtnewhorizons.modularui.api.screen.ModularWindow; +import com.gtnewhorizons.modularui.common.widget.DrawableWidget; +import com.gtnewhorizons.modularui.common.widget.ProgressBar; +import com.gtnewhorizons.modularui.common.widget.SlotWidget; + +import gregtech.api.enums.SteamVariant; +import gregtech.api.recipe.BasicUIPropertiesBuilder; +import gregtech.api.recipe.NEIRecipePropertiesBuilder; +import gregtech.api.recipe.RecipeMapFrontend; +import gregtech.api.util.MethodsReturnNonnullByDefault; +import gregtech.common.gui.modularui.UIHelper; + +// Makes some small changes to the default recipe frontend to display custom backgrounds and progress bars +@ParametersAreNonnullByDefault +@MethodsReturnNonnullByDefault +public class PurificationUnitRecipeMapFrontend extends RecipeMapFrontend { + + private final int overlayHeight; + private static final Pos2d realProgressBarPos = new Pos2d(3, 3); + + public PurificationUnitRecipeMapFrontend(int overlayHeight, BasicUIPropertiesBuilder uiPropertiesBuilder, + NEIRecipePropertiesBuilder neiPropertiesBuilder) { + super( + uiPropertiesBuilder.progressBarSize(new Size(0, 0)) + .progressBarPos(new Pos2d(0, 0)), + neiPropertiesBuilder); + this.overlayHeight = overlayHeight; + } + + @Override + public void addProgressBar(ModularWindow.Builder builder, Supplier<Float> progressSupplier, Pos2d windowOffset) { + assert uiProperties.progressBarTexture != null; + UITexture texture = uiProperties.progressBarTexture.get(); + builder.widget( + new ProgressBar().setTexture(texture, 170) + .setDirection(uiProperties.progressBarDirection) + .setProgress(progressSupplier) + .setSynced(false, false) + .setPos(realProgressBarPos.add(windowOffset)) + .setSize(new Size(170, overlayHeight))); + } + + @Override + public ModularWindow.Builder createNEITemplate(IItemHandlerModifiable itemInputsInventory, + IItemHandlerModifiable itemOutputsInventory, IItemHandlerModifiable specialSlotInventory, + IItemHandlerModifiable fluidInputsInventory, IItemHandlerModifiable fluidOutputsInventory, + Supplier<Float> progressSupplier, Pos2d windowOffset) { + // Override regular createNEITemplate method, so we can remove the background texture with the ugly border. + ModularWindow.Builder builder = ModularWindow.builder(neiProperties.recipeBackgroundSize); + + // First draw progress bar in background + if (uiProperties.useProgressBar) { + addProgressBar(builder, progressSupplier, windowOffset); + } + + UIHelper.forEachSlots( + (i, backgrounds, pos) -> builder.widget( + SlotWidget.phantom(itemInputsInventory, i) + .setBackground(backgrounds) + .setPos(pos) + .setSize(18, 18)), + (i, backgrounds, pos) -> builder.widget( + SlotWidget.phantom(itemOutputsInventory, i) + .setBackground(backgrounds) + .setPos(pos) + .setSize(18, 18)), + (i, backgrounds, pos) -> { + if (uiProperties.useSpecialSlot) builder.widget( + SlotWidget.phantom(specialSlotInventory, 0) + .setBackground(backgrounds) + .setPos(pos) + .setSize(18, 18)); + }, + (i, backgrounds, pos) -> builder.widget( + SlotWidget.phantom(fluidInputsInventory, i) + .setBackground(backgrounds) + .setPos(pos) + .setSize(18, 18)), + (i, backgrounds, pos) -> builder.widget( + SlotWidget.phantom(fluidOutputsInventory, i) + .setBackground(backgrounds) + .setPos(pos) + .setSize(18, 18)), + ModularUITextures.ITEM_SLOT, + ModularUITextures.FLUID_SLOT, + uiProperties, + uiProperties.maxItemInputs, + uiProperties.maxItemOutputs, + uiProperties.maxFluidInputs, + uiProperties.maxFluidOutputs, + SteamVariant.NONE, + windowOffset); + + addGregTechLogo(builder, windowOffset); + + for (Pair<IDrawable, Pair<Size, Pos2d>> specialTexture : uiProperties.specialTextures) { + builder.widget( + new DrawableWidget().setDrawable(specialTexture.getLeft()) + .setSize( + specialTexture.getRight() + .getLeft()) + .setPos( + specialTexture.getRight() + .getRight() + .add(windowOffset))); + } + + return builder; + } +} diff --git a/src/main/java/gregtech/api/recipe/metadata/PurificationPlantBaseChanceKey.java b/src/main/java/gregtech/api/recipe/metadata/PurificationPlantBaseChanceKey.java new file mode 100644 index 0000000000..8884ff51f4 --- /dev/null +++ b/src/main/java/gregtech/api/recipe/metadata/PurificationPlantBaseChanceKey.java @@ -0,0 +1,28 @@ +package gregtech.api.recipe.metadata; + +import javax.annotation.Nullable; +import javax.annotation.ParametersAreNonnullByDefault; + +import gregtech.api.recipe.RecipeMetadataKey; +import gregtech.api.util.MethodsReturnNonnullByDefault; +import gregtech.nei.RecipeDisplayInfo; + +/** + * Base success chance for Purification Plant recipes + */ +@ParametersAreNonnullByDefault +@MethodsReturnNonnullByDefault +public class PurificationPlantBaseChanceKey extends RecipeMetadataKey<Float> { + + public static final PurificationPlantBaseChanceKey INSTANCE = new PurificationPlantBaseChanceKey(); + + private PurificationPlantBaseChanceKey() { + super(Float.class, "purification_plant_base_chance"); + } + + @Override + public void drawInfo(RecipeDisplayInfo recipeInfo, @Nullable Object value) { + double chance = cast(value, 0.0f); + recipeInfo.drawText("Base success chance: " + chance + "%"); + } +} diff --git a/src/main/java/gregtech/api/util/GT_RecipeConstants.java b/src/main/java/gregtech/api/util/GT_RecipeConstants.java index 0828112fc7..592881f039 100644 --- a/src/main/java/gregtech/api/util/GT_RecipeConstants.java +++ b/src/main/java/gregtech/api/util/GT_RecipeConstants.java @@ -13,6 +13,10 @@ import net.minecraft.init.Items; import net.minecraft.item.ItemStack; import net.minecraftforge.fluids.FluidStack; +import com.elisis.gtnhlanth.common.item.MaskList; +import com.elisis.gtnhlanth.common.item.PhotolithographicMask; +import com.elisis.gtnhlanth.common.register.LanthItemList; + import cpw.mods.fml.common.registry.GameRegistry; import gregtech.api.enums.ItemList; import gregtech.api.enums.Materials; @@ -21,6 +25,8 @@ import gregtech.api.recipe.RecipeCategories; import gregtech.api.recipe.RecipeMaps; import gregtech.api.recipe.RecipeMetadataKey; import gregtech.api.recipe.metadata.SimpleRecipeMetadataKey; +import gregtech.common.items.GT_MetaGenerated_Item_03; +import gregtech.common.items.ID_MetaItem_03; // this class is intended to be import-static-ed on every recipe script // so take care to not put unrelated stuff here! @@ -232,6 +238,154 @@ public class GT_RecipeConstants { }); /** + * Adds an engraver recipe that might use purified water. Still added to the regular recipemap if it ends up not + * needing it. + */ + public static final IRecipeMap WaferEngravingRecipes = IRecipeMap.newRecipeMap(builder -> { + // spotless:off + enum Wafer{ + Naquadah, + Europium, + Americium, + // Beamline masks + MaskT1, + MaskT2, + MaskT3, + } + // spotless:on + // Find the wafer used + Wafer wafer = null; + PhotolithographicMask t1Item = (PhotolithographicMask) LanthItemList.maskMap.get(MaskList.BLANK1); + PhotolithographicMask t2Item = (PhotolithographicMask) LanthItemList.maskMap.get(MaskList.BLANK2); + PhotolithographicMask t3Item = (PhotolithographicMask) LanthItemList.maskMap.get(MaskList.BLANK3); + for (ItemStack input : builder.getItemInputsBasic()) { + if (input.getItem() instanceof GT_MetaGenerated_Item_03) { + int meta = input.getItemDamage() - 32000; + // Check if this input item is indicating a wafer recipe we want to modify + if (meta == ID_MetaItem_03.Circuit_Silicon_Wafer3.ID) wafer = Wafer.Naquadah; + else if (meta == ID_MetaItem_03.Circuit_Silicon_Wafer4.ID) wafer = Wafer.Europium; + else if (meta == ID_MetaItem_03.Circuit_Silicon_Wafer5.ID) wafer = Wafer.Americium; + } + + // Now look for beamline masks + if (input.getItem() instanceof PhotolithographicMask mask) { + String spectrum = mask.getDescSpectrum(); + if (spectrum.equals(t1Item.getDescSpectrum())) wafer = Wafer.MaskT1; + else if (spectrum.equals(t2Item.getDescSpectrum())) wafer = Wafer.MaskT2; + else if (spectrum.equals(t3Item.getDescSpectrum())) wafer = Wafer.MaskT3; + } + + // Found a wafer, stop checking inputs + if (wafer != null) break; + } + + int recipeTime = builder.duration; + // Bonus for using purified water of a higher tier than necessary + int halfBoostedRecipeTime = (int) (recipeTime * 0.75); + int boostedRecipeTime = (int) (recipeTime * 0.5); + + // If this recipe does not use a wafer, exit without modifying it. + if (wafer == null) return builder.addTo(RecipeMaps.laserEngraverRecipes); + switch (wafer) { + case Naquadah -> { + ArrayList<ItemStack> items = new ArrayList<>(Arrays.asList(builder.getItemInputsBasic())); + items.add(GT_Utility.getIntegratedCircuit(1)); + ItemStack[] inputItemsWithC1 = items.toArray(new ItemStack[] {}); + + ArrayList<ItemStack> items2 = new ArrayList<>(Arrays.asList(builder.getItemInputsBasic())); + items2.add(GT_Utility.getIntegratedCircuit(2)); + ItemStack[] itemsWithC2 = items2.toArray(new ItemStack[] {}); + // Naquadah wafers can use grade 1-2 purified water for a bonus + return GT_Utility.concat( + builder.copy() + .itemInputs(inputItemsWithC1) + .addTo(RecipeMaps.laserEngraverRecipes), + builder.copy() + .itemInputs(itemsWithC2) + .fluidInputs(Materials.Grade1PurifiedWater.getFluid(100L)) + .duration(halfBoostedRecipeTime) + .addTo(RecipeMaps.laserEngraverRecipes), + builder.copy() + .itemInputs(itemsWithC2) + .fluidInputs(Materials.Grade2PurifiedWater.getFluid(100L)) + .duration(boostedRecipeTime) + .addTo(RecipeMaps.laserEngraverRecipes)); + } + case Europium -> { + // Require purified water for europium wafers, at least grade 3 + return GT_Utility.concat( + builder.copy() + .fluidInputs(Materials.Grade3PurifiedWater.getFluid(100L)) + .duration(recipeTime) + .addTo(RecipeMaps.laserEngraverRecipes), + builder.copy() + .fluidInputs(Materials.Grade4PurifiedWater.getFluid(100L)) + .duration(boostedRecipeTime) + .addTo(RecipeMaps.laserEngraverRecipes)); + } + case Americium -> { + // Require purified water for americium wafers, at least grade 5 + return GT_Utility.concat( + builder.copy() + .fluidInputs(Materials.Grade5PurifiedWater.getFluid(100L)) + .duration(recipeTime) + .addTo(RecipeMaps.laserEngraverRecipes), + builder.copy() + .fluidInputs(Materials.Grade6PurifiedWater.getFluid(100L)) + .duration(boostedRecipeTime) + .addTo(RecipeMaps.laserEngraverRecipes)); + } + // Masks require much more purified water because they can make many wafers at once + case MaskT1 -> { + // T1 masks require grade 1, 2 or 3 purified water + return GT_Utility.concat( + builder.copy() + .fluidInputs(Materials.Grade1PurifiedWater.getFluid(32000L)) + .duration(recipeTime) + .addTo(RecipeMaps.laserEngraverRecipes), + builder.copy() + .fluidInputs(Materials.Grade2PurifiedWater.getFluid(32000L)) + .duration(halfBoostedRecipeTime) + .addTo(RecipeMaps.laserEngraverRecipes), + builder.copy() + .fluidInputs(Materials.Grade3PurifiedWater.getFluid(32000L)) + .duration(boostedRecipeTime) + .addTo(RecipeMaps.laserEngraverRecipes)); + } + case MaskT2 -> { + // T2 masks require grade 4 or 5 purified water + return GT_Utility.concat( + builder.copy() + .fluidInputs(Materials.Grade4PurifiedWater.getFluid(32000L)) + .duration(recipeTime) + .addTo(RecipeMaps.laserEngraverRecipes), + builder.copy() + .fluidInputs(Materials.Grade5PurifiedWater.getFluid(32000L)) + .duration(boostedRecipeTime) + .addTo(RecipeMaps.laserEngraverRecipes)); + } + case MaskT3 -> { + // T3 masks require grade 6, 7 or 8 purified water + return GT_Utility.concat( + builder.copy() + .fluidInputs(Materials.Grade6PurifiedWater.getFluid(32000L)) + .duration(recipeTime) + .addTo(RecipeMaps.laserEngraverRecipes), + builder.copy() + .fluidInputs(Materials.Grade7PurifiedWater.getFluid(32000L)) + .duration(halfBoostedRecipeTime) + .addTo(RecipeMaps.laserEngraverRecipes), + builder.copy() + .fluidInputs(Materials.Grade8PurifiedWater.getFluid(32000L)) + .duration(boostedRecipeTime) + .addTo(RecipeMaps.laserEngraverRecipes)); + } + } + + throw new RuntimeException("Unreachable code reached in Laser Engraver Recipe Transformer"); + }); + + /** * The one and only :tm: assline recipe adder. * Uses {@link #RESEARCH_ITEM} metadata as research item, and {@link #RESEARCH_TIME} metadata as research time, unit * in ticks. |