From 8a515c7a9f83ca0fe29098d50bc7cab30e137d35 Mon Sep 17 00:00:00 2001 From: BlueWeabo <76872108+BlueWeabo@users.noreply.github.com> Date: Tue, 13 Dec 2022 23:10:17 +0200 Subject: 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 * 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 Co-authored-by: Jason Mitchell Co-authored-by: Martin Robertz Co-authored-by: GTNH-Colen <54497873+GTNH-Colen@users.noreply.github.com> Co-authored-by: Sampsa --- src/main/java/gregtech/api/enums/GT_Values.java | 3 +++ src/main/java/gregtech/api/enums/ItemList.java | 9 ++++++++- src/main/java/gregtech/api/enums/Materials.java | 10 ++++++++-- src/main/java/gregtech/api/enums/OrePrefixes.java | 13 ++++++++++-- src/main/java/gregtech/api/enums/TextureSet.java | 11 +++++++++-- src/main/java/gregtech/api/enums/Textures.java | 24 ++++++++++++++--------- 6 files changed, 54 insertions(+), 16 deletions(-) (limited to 'src/main/java/gregtech/api/enums') 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 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() -- cgit