aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/api/gui
AgeCommit message (Collapse)Author
2024-01-05Merge MuTEMaster into Master (#2431)BlueWeabo
* Fix MuTE structure check and power intake (#1975) * Fixed casing lists being cleared for every checked structure piece * Fixed power being taken from any side BUT the right one * ACP Structure - Rebased (#1978) * Added 2nd structure tier to ACR and make complex parallels depend on it * Added tier 3 to 8 structure pieces to ACR * Added disclaimer * Renamed ACR to ACP because MV CR already is named ACR * Add autopush functionality to MuTE (#1976) - fix conflict * Working auto push * Revert wildcard import * Addresssed reviews * Fix reference issue * Minor MuTE fixes - Rebased (#1983) * Fixed ACP recipe map * Fixed controller side being used instead of part side when accessing tanks * Fix Structure not forming (#1984) * fix cables not connecting * fix structure and don't store controller * Add missing tooltips (#1981) * Add missing tooltips * Address blue's change * Distillation MuTE (#1989) * Started work on DT MuTE * Renamed methods so they also make sense when used horizontally * MuTE Upgrade Casings - Rebased (#1988) - fix conflict * Added cleanroom upgrade casing * Added inventory and tank upgrades * Added tooltips to mute casings * Added power upgrades * Set player UUID when placing MuTE * MuTE fixes (#1991) * Fixed pipes not connectable to MuTE casings * Fixed not all things being renamed to ACP * Fix running in obf * fix for real yo * Add a Generic Processing Logic and extract methods - Rebased (#1992) * add a generic processing logic * calculate tier in another method * calculate power logic in another method * Add Layered Coke Foundry (#1995) * Add the Foundry class and call it * Foundry name correction * Buildable stackable structure * Fixed min stacks and added motor casings * checkMachine override for custom checking * Working checkMachine for all stacks, and recipes * Fix getOutputFluids * Change recipe processing to GenericProcessingLogic * Change inventoryName to protected for override * Override checkRecipe for multis that consume EU * Rename class and add inner walls to multi * Structure update and other fixes * Fix processing logic being static * MuTE inventory upgrade logic (#2082) * Catch potential NPE * Don't load name when it doesn't exist * Potentially cause weird non-replicatable issue where registry ends up with different key * Use proper block removal method * Validate index before using it * Don't open controller GUI from inventory upgrade * semi-working concept * sync the ID of the inventory upgrade to correctly remove it later * remove unneeded boolean --------- Co-authored-by: BlueWeabo <76872108+BlueWeabo@users.noreply.github.com> * fixed layeredCokeBattery checkMachine to prevent 'already in building state' (#2099) * MuTE casing structure element (#2105) - fix conflict * Added class containing MuTE relevant structure elements * Migrate MuTE to new structure element * Formatting fix * Use int array instead of int hashmap, since its expected these arrays will never get long enough to be faster as hashmap * Delete old code * Cache MuTEs for non-instance specific actions (#2109) * Introduce map of cached TEs, which are used to perform actions that don't require a specific instance of the TE. This prevents constant creation of new TEs * Remove static modifier from map of cached TEs * First Modular Upgrade Casings Implementation (#2142) * Base support for Heater MUCs - Define Heater upgrade casings; - Create the 5 tiers of Heaters; - Add method to increase and decrease count. * Refactor the cache of MUCs in structure - Change the way that each MUC is counted: since there will be several types, the integer that counted heaters is now a hashmap that divides all MUCs based on their type and tier, to be counted separately from each other. * Add Insulator MUC - Add second MUC type (insulator) to test alongside heaters on the Layered Coke Battery. * Fix MUC count reset * Refactor MUC implementation into subclass - Move the new methods and hashmap away from the base classes, and onto a s specific one that won't be used by unrelated multiblocks. * Remove empty lines * Refactor MUC implementations into subclasses * Requested fixes in StackableModularController * Change hashmap keys to an enum * Hashmap getter for load order purposes - Added a getter that generates the default value for the hashmap if it is null, due to problems with load order; * Apply spotless * NotNull annotations * More Additions to MUCs and the LCB (#2215) * Fix old LCB multi name in some locations * Refactor mucMap and override checkRecipe - Refactor mucMap to an array of primitive integers instead of the wrapper type, for ease of use with other methods such as stream; - Override checkRecipe for custom recipe behavior on MUC multis, to be implemented in a future commit; * First implementation of bonuses and MUC requirements - Change EU/t and recipe duration of this multi based on the count of different MUCs in the multi; - Fail the structure check based on the count of each of the allowed MUCs. * Parallel count implementation - Calculate parallels based on the count of base MUCs, the cheapest option amongst the possibilities, in this case heaters; - Added more abstract methods to require specific values from the multi classes. * Fix parallel count and processing - Fixed the handling of parallels by pointing to the corrent maxParallel variable in ProcessingLogic. * Test of parallels with additional amp input * Structure fix for the intended LCB - Changed MUC placements to match what I intended at the beginning, to better test the multi. * One more comment * Remove checkRecipe override * Refactor Item and Fluid to be in separate logic classes (#2178) - fix conflict * basics of inventory logic * mostly working item logic * working nbt saving/loading * fluid handler * FluidSlotHandler WIP * fluid handler mostly working * remove fluid handler from gt5u * prepare for conversion * use correct imports * spotless * more controller logic * spotless * final refactor. migration next * spotless * add more methods to logic classes * convert almost everything to use new Logic * spotless * make mute casing mode an int * allow pump cover to work with FluidInventoryLogic * pumps work * spotless * make item inventory logic work with every item input thing * rework Fluid Inventory Logic to work with all fluid inputs * spotless * address annotation reviews * finish off todos * missed to dos * cleanup Coke oven will get a new GUI when i get to it * address review * prevent npes from ControllerXXXLogic * null checks * remove accidentally added methods * fix missed return * fixes after rebase - fix conflict * Laser Engraver Multi. (#2223) - fix conflict * saving............. * clean up * savin * Small fixes + Adding back stuff, Crashes you and spams logs. * fix stack overflow * Fixes * Fixes --------- Co-authored-by: BlueWeabo <76872108+BlueWeabo@users.noreply.github.com> * Add TickableTask (#2216) * Add autopush functionality to MuTE (#1976) * Working auto push * Revert wildcard import * Addresssed reviews * Fix reference issue * MuTE Upgrade Casings (#1988) * Added cleanroom upgrade casing * Added inventory and tank upgrades * Added tooltips to mute casings * Added power upgrades * Set player UUID when placing MuTE * Add a Generic Processing Logic and extract methods (#1992) * add a generic processing logic * calculate tier in another method * calculate power logic in another method * MuTE inventory upgrade logic (#2082) * Catch potential NPE * Don't load name when it doesn't exist * Potentially cause weird non-replicatable issue where registry ends up with different key * Use proper block removal method * Validate index before using it * Don't open controller GUI from inventory upgrade * semi-working concept * sync the ID of the inventory upgrade to correctly remove it later * remove unneeded boolean --------- Co-authored-by: BlueWeabo <76872108+BlueWeabo@users.noreply.github.com> * MuTE casing structure element (#2105) * Added class containing MuTE relevant structure elements * Migrate MuTE to new structure element * Formatting fix * Use int array instead of int hashmap, since its expected these arrays will never get long enough to be faster as hashmap * Delete old code * Refactor Item and Fluid to be in separate logic classes (#2178) * basics of inventory logic * mostly working item logic * working nbt saving/loading * fluid handler * FluidSlotHandler WIP * fluid handler mostly working * remove fluid handler from gt5u * prepare for conversion * use correct imports * spotless * more controller logic * spotless * final refactor. migration next * spotless * add more methods to logic classes * convert almost everything to use new Logic * spotless * make mute casing mode an int * allow pump cover to work with FluidInventoryLogic * pumps work * spotless * make item inventory logic work with every item input thing * rework Fluid Inventory Logic to work with all fluid inputs * spotless * address annotation reviews * finish off todos * missed to dos * cleanup Coke oven will get a new GUI when i get to it * address review * prevent npes from ControllerXXXLogic * null checks * Base work * PollutionTask * move package * Fix generics * Internal -> OverrideOnly * rebase fix * Ducttape addPollution --------- Co-authored-by: Maxim <maxim235@gmx.de> Co-authored-by: BlueWeabo <ilia.iliev2005@gmail.com> Co-authored-by: BlueWeabo <76872108+BlueWeabo@users.noreply.github.com> * Rework a bit of ProcessingLogic to fit MuTEs (#2283) - fix conflicts * Add a way to enable or disable the crafting buffer on GPL multiblocks (#2218) * add a way to enable or disable the crafting buffer on GPL multiblocks * don't register the hatch either * fix Refractory Capsule (#2219) * Fix PAs overclocking ulv recipes too much (#2220) * fix PAs overclocking ulv recipes too much * make sure we save the returned value * Fix Digital Tank capacity for Fluid Storage Monitor (#2217) * Fix Digital Tank capacity for Fluid Storage Monitor * Annotations * Blacklist AE2FC drop and packet, and Chisel stones from Recycler (#2222) * Fix recycler blacklist being sensitive to NBT * Blacklist AE2FC drop and packet, and Chisel stones * fix class loader issue * Add detailed logging for ME hatches (#2224) * Fix overclock calculator calculating eu/t use for ulv recipe wrong on certain parallel (#2225) * fix overclock calculator calculating eu/t use for ulv recipe wrong on certain parallel * make formula into its own method * Fix drilling rigs, plants and concrete backfiller to fail with multiple energy hatches (#2227) * max-1-energy-hatch-in-drilling-rigs.-plants-and-concrete-backfiller * spotlessApply (#2228) Co-authored-by: GitHub GTNH Actions <> * revert --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * clear stale crafting input bus list (#2233) * add ability to remove item data and use it for clay (#2229) * Update buildscript (#2232) * Fix server crash with RecipeFilter (#2231) * Fix server crash with RecipeFilter * Make client send filtered machines to server * Use mUniqueIdentifier * Fix a NPE w/ injecting into super/quantum chests (#2234) When simulating an injection, if the stackSize > chest's capacity, it causes a NPE when the internal chest is empty. Also fixes a potential bug when void overflow is set; the chest should return null in such a scenario regardless of simulation/modulation. * Fix lag caused by getRecipeMap for PA (#2236) * Experimental fix to prevent infinite loop in Grid destruction (#2235) Co-authored-by: Firenoo <49818773+firenoo@users.noreply.github.com> * Fix ME Output Bus and Crafting Input Bus overflow when save/load (#2238) * Remove fire display from singleblock generator (#2240) * Fix some output slots allowing insertion (#2230) * fix overlay zfighting by disable depth test (#2226) * Crafting input - Optimize isEmpty check to reduce lag (#2239) * Optimize isEmpty check * rearrage * remove broken hsla recipe (#2241) * Correct PCB Factory Energy Hatch description (#2237) * Correct PCB Factory Energy Hatch description Changes the PCB factory description (the one seen when holding shift) which currently says "Energy Hatches: 1+" I believe this is incorrect and that the correct description is 1-2 energy hatches or 1 TT energy hatch. I believe the PCB factory uses this, which checks for 1-2 or 1 TT: public boolean checkExoticAndNormalEnergyHatches() { if (mExoticEnergyHatches.isEmpty() && mEnergyHatches.isEmpty()) { return false; } if (!mExoticEnergyHatches.isEmpty()) { if (!mEnergyHatches.isEmpty()) { return false; } if (mExoticEnergyHatches.size() != 1) { return false; } } return mEnergyHatches.size() <= 2; } * gradlew spotlessApply * Correct file name on resource pack guide (#2242) * Fix GT_RecipeConstants.Fuel (#2243) * Update text (#2246) * Fix startup tier for fusion NEI (#2249) * Update the conditionals buttons and tooltips on covers to reflect their actual effects (#2244) * Update redstone buttons and tooltips to better reflect actual use * Spotless Apply * Update GT_Cover_FluidRegulator.java * Update GT_Cover_FluidRegulator.java * Typo fix, Icon Improved and interactive blocking ui - Fixed a typo in the world machine - Fixed double button situation for conveyor belts. - There was never any issue, the testing methodology gave me invalid results. - Conveyor behaviour is in line with all the other covers affected by this PR/Branch. - Updated icon for the machine state to be a miniature machine controller cover. - Made the block/allow input section more interactive in order to better reflect the actual effect of these buttons. - In import mode, it actually blocks the machine from outputting from that side. * typos I can't write to save myself sometimes * Better text alignment - Better text alignment * fix typos I swear I can't write to save myself. --------- Co-authored-by: Martin Robertz <dream-master@gmx.net> * Fix Orichalcum and Shadowiron smelting (#2251) * fix orichalcum and shadowiron smelting * add Alduorite and Chrysotile * Fix tier display for Fusion NEI header (#2250) * fix ulv recipes being broken again when under 1 tick calculation is taken (#2254) * change way to fix zfighting (#2253) * Crafting input hatches QoLs (#2200) * Fixes + Detect Inventory Slot Changes * support rename + check for updates * add back onChangeListener + fix npe * ICustomNameObject TileEntity * Fix NPEs * Use IInterfaceTerminalSupport * fix * register * dep * spotless * General Crafting Input Hatch QoL fixes (#2212) * feat: refactor naming && include circuit and catalyst in default name * feat: add 4 more slot to solve my ocd * fix: formatting * feat: migrate from 4x8 to 4x9 * spotlessApply (#2213) Co-authored-by: GitHub GTNH Actions <> * QoLs * 9 manual items * spotless * feat: open master GUI when used, without holding a data-stick (#2221) * fix destpos * optimize empty check * Fix error when fluidInventory.size() == 0 If the fluidInventory size is 0, there is no element to get. Add a check for it. * name in waila + fix int overflow * unnecssary super * update deps --------- Co-authored-by: Fox_white <39846845+foxwhite25@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Firenoo <49818773+firenoo@users.noreply.github.com> Co-authored-by: Martin Robertz <dream-master@gmx.net> * Use real stack limit (#2256) * Fix incorrect data stick behaviors for hatches (#2257) * Fix pcb factory not applying its roughness multiplier when it doesn't OC (#2258) * fix PCB Factory not applying its roughness multiplier when it doesn't do any overclocks * spotless * Remove duplicate obsidian long rod (#2259) * disable gt obsidian long rod * cleaner code * Add hazmat to ThaumicBoots (#2260) * Add hazmat to ThaumicBoots does what it says * fixed * fix item names (#2263) * Fix renaming recipe check might ignore NBT equality (#2261) * Fix GPL ignoring if the recipe is allowed to be cached (#2262) * Added bricked blast furnace recipe progress to waila. (#2265) * Added bricked blast furnace recipe progress to waila. * fixed formatting issues. * Fix cutter recipes not being added (#2271) * add processing task * clean up item logic host * temporary fix for GT_StructrureMuTE * use j9+ feature on pollution task * prepare complex parallel logic for transition * feature to ProcessingLogicHost * fix up multiblock bases * add processing logic for each multi to prepare for transition * spotless * removed debug text from wailaBody of GT_MetaTileEntity_Hatch_CraftingInput_ME (#2272) * Proper recipe selection for output overflow in LCR and other multiblocks (#2247) * Implement Stream<FindRecipeResult> findRecipesWithResult for GT_RecipeMap * Change ProcessingLogic.process to actually use new findRecipesWithResult * Change ProcessingLogic.process to start finding something only for OUTPUT_FULL result * Refactor ProcessingLogic.process to make logic more readable * Replace while with for loop, remove NOT_FOUND return in end of findRecipesWithResult * Apply spotless * Make findRecipe use findRecipes, add annotation to GT_Recipe and FindRecipeResult for processRecipe and make method protected, replace wildcard imports * Remake isRecipeWithOutputFullFound * Add @Nonnull to methods * Apply spotless * Remove Stream version of findRecipeWithResult, replace with predicate one. Add GT_Predicated_Recipe_Map class for utilizing this method. Changes some existent recipe maps to inherit from base class. * Remove GT_Predicated_Recipe_Map, add Predicate directly to GT_Recipe_Map#findRecipeWithResult. Add AdvancedRecipeValidatorPredicate and FindRecipeWithAdvancedValidatorResult to allow store validation calculations for further use and proper errors displaying. * Fix InsufficientVoltage errors * Changes according to review comments. Integrate FindRecipeWithAdvancedValidatorResult to FindRecipeResult, rename AdvancedRecipeValidatorPredicate, encapsulate AdvancedRecipeValidatorPredicate fields, fixes some typos, etc * Moves InsufficientVoltage check to GT_ParallelHelper. Removes FindRecipeResult#State#INSUFFICIENT_VOLTAGE * Return an old findRecipeWithResult * Renames things, call old methods for singleblocks * Renames things, makes FindRecipeResult ctor private * Apply spotless * Move RecipeValidator, fix comments typos * update deps * fix up complex processing logic * add a getter for voiding mode * fix getAccessibleSlotsFromSide being wrong sometimes * allow for subtraction of a specific item * use long for amount * add a setter for machine host * initial work on finding recipes and input consumption * Deprecate PA by removing its controller recipe (#2273) * Restore PA controller recipe (#2276) * Restore PA controller recipe * Remove duplicated recipe * Add optional description to input hatch constructors (#2278) * mini fix (#2204) * [chore] Bump fallback version to 44 (#2274) * find recipe in theory working * add some helper methods to inventory logics * update deps * use collect not toList * fix loading crash * fix complex processing logic using wrong find recipe * fix up everything and get recipe finding working * annotate and clean up methods * spotless * save things to nbt * input separation for mutes and fully working processing * apply mute mode on processing logic * clean up overrides --------- Co-authored-by: chochem <40274384+chochem@users.noreply.github.com> Co-authored-by: miozune <miozune@gmail.com> Co-authored-by: Pxx500 <81298696+Pxx500@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Glease <4586901+Glease@users.noreply.github.com> Co-authored-by: firenoo <49818773+firenoo@users.noreply.github.com> Co-authored-by: Martin Robertz <dream-master@gmx.net> Co-authored-by: Harry <harryyunull@gmail.com> Co-authored-by: Eraldoe <Eraldoe@users.noreply.github.com> Co-authored-by: Jakub <53441451+kuba6000@users.noreply.github.com> Co-authored-by: Connor-Colenso <52056774+Connor-Colenso@users.noreply.github.com> Co-authored-by: Guillaume Mercier <C0bra5@users.noreply.github.com> Co-authored-by: Fox_white <39846845+foxwhite25@users.noreply.github.com> Co-authored-by: Alastors <78517796+Alastors@users.noreply.github.com> Co-authored-by: Kyium <43573052+Kyium@users.noreply.github.com> Co-authored-by: SKProCH <29896317+SKProCH@users.noreply.github.com> Co-authored-by: Sampsa <69092953+S4mpsa@users.noreply.github.com> Co-authored-by: Jaiden Baker <jaidencolebaker@gmail.com> * address minecraft's reviews from #2283 * Refactor MuTE processing logic (#2301) -fix conflicts * Fix void protection for mutes (#2298) - fix conflicts * initial variables * implement working void protection on items and fluids * Adds a Simple PowerOutput task and cleans up some of the code. (#2303) * create a power output task which can be used for dynamos * refactor the controllers and clean up * add some documentation to power logic * make a wireless network manager class instead of using an interface * clean up and add documentation. * setAmperage to setMaxAmperage * fix comment * remove IGlobalWirelessEnergy usage * getAmperage -> getMaxAmperage * add todo for future * Cleanup MuTEMaster code (#2282) * exit early * spotless * better side checking * make if blocks mutually exclusive * more exit early * convert nested ternary operators into if blocks * remove dead code * collapse nested if blocks * add todo to break verylong condition into much smaller ones * spotless apply * collapsing nested if blocks and more exit early * spotless apply * extract try/catch block to its own utility method * break down this unreadable condition * boolean magic (1/5) * boolean magic (2/5) Also corrected some logic on the player null check, we want it to be non null * boolean magic (3/5) * boolean magic (4/5) * boolean magic (5/5) * remove todo * Fix logic --------- Co-authored-by: Jason Mitchell <jason@puzzle.io> Co-authored-by: BlueWeabo <76872108+BlueWeabo@users.noreply.github.com> * Clean up a lil bit and fix some issues with MuTEs (#2316) * clean up fixes * actual fix and remove useless if * Rework MuTEGUI structure (#2429) - fix conflicts` Merged to rebase MuTEMaster and fix any non-compile errors and game not launching in there * some docs on a few methods * innitial GUI class * try to implement guis * almost working - fix comflict * add UIBuildContext to getGUI method * make it compile * sketch gui - fix conflict * compile and spotless * add config option to enabling MuTEs * Spotless apply for branch feature/MuTEMaster for #2431 (#2432) spotlessApply Co-authored-by: GitHub GTNH Actions <> * address reviews on broken processing logic * spotless * fix doc and review --------- Co-authored-by: Maxim <maxim235@gmx.de> Co-authored-by: RIONDY 'POPlol333' Adam <76914762+POPlol333@users.noreply.github.com> Co-authored-by: Jason Mitchell <mitchej@gmail.com> Co-authored-by: Daniel Mendes <70096037+Steelux8@users.noreply.github.com> Co-authored-by: kstvr32 <109012629+kstvr32@users.noreply.github.com> Co-authored-by: TheEpicGamer274 <102255081+TheEpicGamer274@users.noreply.github.com> Co-authored-by: miozune <miozune@gmail.com> Co-authored-by: chochem <40274384+chochem@users.noreply.github.com> Co-authored-by: Pxx500 <81298696+Pxx500@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Glease <4586901+Glease@users.noreply.github.com> Co-authored-by: firenoo <49818773+firenoo@users.noreply.github.com> Co-authored-by: Martin Robertz <dream-master@gmx.net> Co-authored-by: Harry <harryyunull@gmail.com> Co-authored-by: Eraldoe <Eraldoe@users.noreply.github.com> Co-authored-by: Jakub <53441451+kuba6000@users.noreply.github.com> Co-authored-by: Connor-Colenso <52056774+Connor-Colenso@users.noreply.github.com> Co-authored-by: Guillaume Mercier <C0bra5@users.noreply.github.com> Co-authored-by: Fox_white <39846845+foxwhite25@users.noreply.github.com> Co-authored-by: Alastors <78517796+Alastors@users.noreply.github.com> Co-authored-by: Kyium <43573052+Kyium@users.noreply.github.com> Co-authored-by: SKProCH <29896317+SKProCH@users.noreply.github.com> Co-authored-by: Sampsa <69092953+S4mpsa@users.noreply.github.com> Co-authored-by: Jaiden Baker <jaidencolebaker@gmail.com> Co-authored-by: boubou19 <miisterunknown@gmail.com> Co-authored-by: Jason Mitchell <jason@puzzle.io>
2023-12-29Cleanup deprecation (#2416)miozune
* Remove isValidMetaTileEntity and filterValidMetaTileEntities * Remove OUTPUT_FULL * Remove calclavia oredict * Remove unused GT_GUIColorOverride constructor * Remove getItemGridPositions * Remove unused tool classes * Remove unused GT_Runnable_Sound constructors * Remove unused cover constructors * Remove getBasicOutput() * Remove unused GT_MetaTileEntity_GasTurbine constructors * Remove ImplosionCompressorRecipes#addImplosionRecipe * Remove mOutputItem1 & mOutputItem2 * Remove GT_MetaTileEntity_Miner#moveOneDown & #getFakePlayer * Remove unused GT_Worldgen_GT_Ore_Layer constructor * Remove GT_ModReference * Remove deprecated BaseMetaTileEntity#receiveMetaTileEntityData * Remove deprecated cover variables * Remove deprecated GT_CoverBehaviorBase#isCoverPlaceable * Remove unused variables from GT_MachineRecipeLoader * Remove #getCalcificationOutput * Remove IC2_Fuel_Can_Empty and IC2_Fuel_Can_Filled * Remove deprecated #polluteEnvironment() * Remove FluidDisplaySlotWidget
2023-12-24Rework the UI of singleblock pumps. (#2420)Abdiel Kavash
Change singleblock pumps to be machines, not tanks. Rework the UI of the pump.
2023-12-03Refactor RecipeMap (#2345)miozune
* Remove deprecated and unused things * Move recipemap subclasses * Move GT_Recipe_Map to outside and rename to RecipeMap * Move recipemap instances to separated class & remove prepending s * Remove useless GT_Recipe constructors * Always use ModularUI * Rename IGT_RecipeMap -> IRecipeMap * Add RecipeMapBuilder * Remove more deprecated and unused things * Fix RecipeMap type parameters * Use multimap for recipe index * Fix bending recipe error in dev env * Remove mUniqueIdentifier * Update AE2FC * Less edgy texture for NEI recipe background * Add replicator fluid output slot for NEI and machine GUI * Fix fluid fuels not having fuel value in large boilers * Remove GT_RectHandler and NEI_TransferRectHost * Remove RecipeMapHandler * Move NEI energy description from RecipeMapFrontend to Power * Refactor the way to filter fusion recipes * Check restriction for some properties * Remove showVoltageAmperage * Make Power accept GT_Recipe * Fix NPE * Move NEI duration description to Power from Frontend * Directly implement IRecipeProcessingAwareHatch for GT_MetaTileEntity_Hatch_InputBus_ME * Make Power integrated with GT_OverclockCalculator * Rename Power -> OverclockDescriber * Don't modify recipe find logic until postload finishes * Reformat reserved MTE ids * Fix check for too few inputs on recipe addition * Move replicator logic to backend * Stop un-hiding assline recipes * Allow setting custom recipe comparator & implement for fusion * Update AE2FC * Rename getRecipeList and getRecipes -> getRecipeMap * Automatically register recipe catalysts * Cleanup the way to detect recipe collision * Make use of BasicUIProperties for basic machines * Make use of BasicUIProperties for UIHelper * Rename specialHandler -> recipeTransformer * Add way to automatically register handler info * Add recipe category * Add some APIs for addons * Rename blastRecipes -> blastFurnaceRecipes * Remove GT_MetaTileEntity_BasicMachine_GT_Recipe#mSharedTank and #mRequiresFluidForFiltering * Don't require setting duration and EU/t for fuel recipes * Don't require setting EU/t for primitive blast furnace recipes * Revert change to addMultiblockChemicalRecipe * Fix large boiler general desc recipe not being added * Hide duration and EU/t from large boiler * Cleanup recipe stacktrace draw * Extend metadata usage of recipe builder to recipe itself * Implement metadata handling & NEI comparator for PCB factory * Some rename around NEIRecipeInfo * Some toString implementations * Add more APIs for addons & some rename * Infer handler icon from recipe catalyst if one is not set * Also shrink recipe title when OC is not used * Remove rare earth centrifuge recipe * Use metadata for replicator backend * Adjust geothermal generator output slot * Allow having multiple transferrects * Store recipemap reference in backend * Rename vacuumRecipes -> vacuumFreezerRecipes * Add config to tweak visibility of recipe categories * Remove mHideRecyclingRecipes in favor of recipe category config * Fix typo fluidSolidfierRecipes -> fluidSolidifierRecipes * Refactor findRecipe and ProcessingLogic to use Stream * Fix BBF handler icon & remove bronze blast furnace * Add fluent API for findRecipe * Add way to stop adding progressbar * Change arg order for special texture * Avoid overwriting interesting failure with NO_RECIPE * Some changes for FuelBackend * Set space project icon * Remove localization from TT * Remove CNC recipe adder * Move recipe extractor from AE2FC * Minor internal change for ProcessingLogic#applyRecipe * More javadoc on #getAvailableRecipeMaps * Better implementation of #ofSupplier * Move replicator exponent config to GT_Proxy * Remove RC & IC2 macerator handling * Rename StreamUtil -> GT_StreamUtil * Refactor code around RecipeMetadataStorage * Revise #compileRecipe javadoc * Switch extreme diesel recipe loader to downstream recipe map * Optimize #reMap * Rename reload -> reloadNEICache * Minor tweak for drawEnergyInfo * a bit more doc * Adjust recipe catalysts * Add toString implementation for GT_Fluid for debug * Minor revision for OilCrackerBackend * Index replicator recipes by material --------- Co-authored-by: Glease <4586901+Glease@users.noreply.github.com>
2023-10-13Fix Stocking Bus bug (#2326)miozune
* Shut down machine with message if stocking bus fail to extract items * Better way to handle message persistent on shutdown * Minor cleanup * Allow more localizations * Add network status display * Fix auto-pull mode accepting shift insert * Remove workaround for issue with multiple ME buses in a multiblock * Some tweak for appearance * Correct inconsistent variable naming in GT_UITextures * Update .gitignore * Fix typo * Remove isScheduledForResetCheckRecipeResult by using persistsOnShutdown * Apply "cannot set slot" tooltip for empty slots too
2023-10-09Allows covers to be configured to tick more slowly (#2307)querns
* Right clicking covers with a jackhammer will now make them tick more slowly * Interim commit, switching tasks * Finishes tick rate button in cover UIs * Change tick rate multiplier to a tick rate addition * Missed one number in the multiplier -> addition conversion * Hold Ctrl to adjust tick rate by 5 steps per click, move button closer to corner of cover GUI * Adjust how holding Ctrl computes tick rate change, remove gray formatting option for tick rate formatter * Cover tick rate addition can now be prevented per-cover-behavior, minor code tweaks
2023-09-22Cleanup GT_MetaTileEntity_BasicMachine (#2268)miozune
* Remove unused machines * Add some Javadoc * Remove some unused constructors * Use ResourceLocation and SpecialEffects for newMetaEntity * Remove some non-ModularUI code * Remove mGUIParameterA and mGUIParameterB * Remove mGUIName and mNEIName * Use nonnull string * updateBuildScript
2023-09-09Request drill changes, eliminates recipe info in drill GUI (#2285)querns
2023-09-08Adds status messages, action buttons to UI of multiblock drills (#2270)querns
* Adds several UI elements to multiblock drills * Spotless * Adds formatNumbers calls in places where it'd been missed * Eliminate wildcard import * Add @NotNull annotations to new fields and methods
2023-08-23Update the conditionals buttons and tooltips on covers to reflect their ↵Guillaume Mercier
actual effects (#2244) * Update redstone buttons and tooltips to better reflect actual use * Spotless Apply * Update GT_Cover_FluidRegulator.java * Update GT_Cover_FluidRegulator.java * Typo fix, Icon Improved and interactive blocking ui - Fixed a typo in the world machine - Fixed double button situation for conveyor belts. - There was never any issue, the testing methodology gave me invalid results. - Conveyor behaviour is in line with all the other covers affected by this PR/Branch. - Updated icon for the machine state to be a miniature machine controller cover. - Made the block/allow input section more interactive in order to better reflect the actual effect of these buttons. - In import mode, it actually blocks the machine from outputting from that side. * typos I can't write to save myself sometimes * Better text alignment - Better text alignment * fix typos I swear I can't write to save myself. --------- Co-authored-by: Martin Robertz <dream-master@gmx.net>
2023-07-28Less hostile user interfaces (Buffer/Filter/Input bus) (#2165)Yannick Marcotte-Gourde
* Made Emit Energy button a CycleButtonWidget * Made Emit Redstone button a CycleButtonWidget * Made Invert Redstone button a CycleButtonWidget * Made Stocking Mode button a CycleButtonWidget * Spotless apply * Made Invert Filter button a CycleButtonWidget * public bInvertFilter -> protected invertFilter * Deduplicated filter code * Made Allow NBT button a CycleButtonWidget * Made Ignore NBT button a CycleButtonWidget * public bNBTAllowed -> private allowNbt * public bNBTAllowed -> private ignoreNbt * Grey extended tooltips * Don't hardcode multiline tooltips * Document hidden functionality * Cleaned numeric constants * Fixed string constant declaration * Named constants in filter * Unify filter redstone behavior * Fix cover filter mode being inverted so that the displayed mode is the active one * Less magic numbers * Allow right clicking recipe filter * Display only machine type in recipe filter and cycle through compatible machines * Buffer tooltips show output voltage to clarify their role as passthroughs * Added more info to Emit EU/Redstone buttons * Added Sorting mode button to buffers/filters * Added Sorting mode button and stack limit button to input buses * Don't cycle prefixes when clicking with itemstack * Fixed tooltips to work off of the inventory * Fix RecipeFilter losing filter * Support multiblock machines * Use ModularUi syncers to sync state with client Thanks minecraft7771! * Grey text for recipe filter helper text * AnimatedTooltipHandler -> EnumChatFormatting * Explicited RecipeFilter filter building * Specify color for empty slot tooltip * Don't cache new uses of GT5U.MBTT.MachineType. Also corrected MachineType::description * Removed unused getItemExtraTooltip * Multiple returns in getItemStackMachineRecipeMap
2023-07-24Add Crafting Input Buffer (ME) (#2160)Harry
* Crafting input buffer * persist data * rename and stuff * no more waiting for multis to start * rearrange ui * spotless * fixes * refactor * Crafting Input Slave * getCrafterIcon * crafting input bus * spotless * Update GT_MetaTileEntity_MultiBlockBase.java * Update GT_Loader_MetaTileEntities.java * Update GT_Loader_MetaTileEntities.java * Update GT_MetaTileEntity_MultiBlockBase.java * Update GT_MetaTileEntity_MultiBlockBase.java * Update GT_Loader_MetaTileEntities.java --------- Co-authored-by: Martin Robertz <dream-master@gmx.net>
2023-06-15Move away from SlotWidget for circuit selection window (#2083)miozune
* Fix crash on MP * Move away from SlotWidget for circuit selection window
2023-06-05Code cleanup (#2040)chill
* remove redundant suppressions * prettify commented code * improve comments The integer comment contradicted the code, so I deleted it. * delete commented-out code * update bitwise int flip from XOR to the dedicated tilda operator The flip was a 32-bit XOR, which is an int-flip. That XOR was replaced with an equivalent tilda operator. * convert a field to inline This field was used only once, so put it straight to where it is used. * remove fluid fix since no-one uses Forge version 1355 or earlier * unwrap switches where fitting In some places, we suppress IntelliJ's inspection RedundantLabeledSwitchRuleCodeBlock - we don't want to unwrap some of the suggested cases because we want to keep the consistency in a switch statement for the sake of readability. * fuse "collect" into Stream API * fix javadocs * remove unnecessary public modifiers from an interface Members of an interface are public by default. * move common parts outside of if * suppress OverrideOnly warning in a javadoc * remove unused lock * suppress warnings about unchecked casts These warnings require non-trivial fixes that are yet to arrive. For now, let's suppress them to reduce the warning-bloat. * remove outdated comment * remove final modifier from private methods Because they are private, it is hard to accidentally overwrite them. Therefore, the final modifier is redundant in this case. * refactor getIcon The first 'if' doesn't cover only tMeta == 9 && mConnectedMachineTextures, therefore the second if can be unrolled. The last switch is redundant because all tMeta values are covered by switches, but let's keep SOLID_STEEL as a fallback just in case. * explain what the casings are and why block casings are split * suppress switch-to-if suggestion * remove unnecessary null check The null is handled in doGenerateItem() * address redundant local variables * rename variables in onTick * suppress warning about accessing static member via instance * rephrase exception * rephrase javadoc * address field-can-be-final warnings * remove empty methods * enum cannot inherit, so protected is redundant * remove redundant throws * update imports to be not wildcard * remove unnecessary try-catch * update for loop * remove redundant code in order to use the diamond operator * update instanceof to use pattern variables * replace blank lines with <p> in javadocs * fix dangling javadocs * suppress warning about unreachable methods in javadocs * remove redundant operation * add the descriptions of parameters in javadocs Also fix javadocs along the way. * relax returned type in javadoc That was done in order to make the docs reflect the code more often. Otherwise, people may forget to change the returned type again with another change. * make long conversion explicit Integer multiplication can give a wrong result if one of the parts is not explicitly cast to long. Let's cast one of the parts where applicable. * remove unary plus * simplify unary minus * use addAll instead of forEach,add It was suggested by IntelliJ to replace the iteration with a bulk operation to improve performance. * replace .asList with .singletonList for consistency * simplify toArray calls Explanation from IntelliJ: There are two styles to convert a collection to an array: * A pre-sized array, for example, c.toArray(new String[c.size()]) * An empty array, for example, c.toArray(new String[0]) In older Java versions, using a pre-sized array was recommended, as the reflection call necessary to create an array of proper size was quite slow. However, since late updates of OpenJDK 6, this call was intrinsified, making the performance of the empty array version the same, and sometimes even better, compared to the pre-sized version. Also, passing a pre-sized array is dangerous for a concurrent or synchronized collection as a data race is possible between the size and toArray calls. This may result in extra nulls at the end of the array if the collection was concurrently shrunk during the operation. * split StringBuilder append Explanation by IntelliJ: Reports String concatenation used as the argument to appends. Such calls may profitably be turned into chained append calls on the existing StringBuilder saving the cost of an extra StringBuilder allocation. This inspection ignores compile-time evaluated String concatenations, in which case the conversion would only worsen performance. * annotate overriding methods with @Nonnull where needed The method that was overridden has @Nonnull so the method that is overriding should also have @Nonnull. * remove set adding itself to itself * remove null check because findField either works or blows up cpw.mods.fml.relauncher.ReflectionHelper::findField either returns a non-null value or throws a RuntimeException, so no need to check of null. * remove slot comparison with tInventory.length slot max value is 127 when tInventory.length is set to 256, which results in that the condition is always true and unnecessary. * remove aOutput2 null check As GT_Values.NI is null, there is no need to check aOutput2 for null again * suppress the suggestion to delete tMeta < 13 mConnectedMachineTextures can change, so tMeta range is not guaranteed * remove aCoverVariable % 3 < 2 the if above already limits the result of % 3 to "2", so the condition "less than 2" is always false. * unwrap "if" because bonus is unchanged Unwrap if because even if the bonus is a variable, it hasn't been changed for the past 8 years and is unlikely to be changed in the future. * reformat javadoc * improve ignoring an exception Make them either more clear or concise * fixup fix typo * update deprecated calls of newInstance() * remove testing BaseMetaTileEntity GregTech_API.constructBaseMetaTileEntity() checks the creation by itself, logging and throwing a runtime error if failed. * unwrap hatch-fill for do_SolarSalt To reach this branch, do_coolant needs to be false and we need to still be in the function, which means that do_SolarSalt was set to true in the previous top-tier "if". * remove always-false input-bus checks of MTE PlasmaForge size() is non-negative, and the values it is compared to are final and 0. * length and size are non-negative Therefore, there's no need to check their negativity * aOutput is guaranteed to be positive * tThereWasARecipe is always false when reached in its first occurrence * convert an assert into if Only tStack 2 is checked for null because if it isn't null then tStack1 also isn't null based on the "if" above. Also IntelliJ was sure that tStack is not null for some reason. On a side note, assertions work only either with a specified flag or in debug runs. Therefore, it is dangerous to rely on them. * simplify stone-gravel-cobble if tBlock != Blocks.stone because of the if at the start of the method. for the last else-if, tBlock == Blocks.gravel because of the check slightly above the change. * interDimensional is always true because of the first if * convert an example to javadoc * remove always-false statements * replace referential string equality with equals If we compare strings by "==", we compare references to them, which is not what we usually want. I wasn't sure if String Pool works here, so I played it save with equals(). * use Automatic Resource Management for AutoCloseable ByteBufOutputStream * add todo to swap from sleep to event bus * null is checked by instanceof * merge switch branches * add a TODO to use clamp() * new String declaration is redundant * use getOrDefault for a map * replace StringBuilder with concatenation where fitting Using a StringBuilder to concatenate two string will not make the program faster or more understandable, so I swapped it to concatenation. * remove unnecessary continue * flip if * remove redundant returns * unwrap ifs It's checked at the top "if" that aType == IItemRenderer.ItemRenderType.INVENTORY, so all aType.equals(IItemRenderer.ItemRenderType.INVENTORY below are always true. * remove checking all GT VERSIONs except the API one * remove version check from GT_Mod and delete respective VERSION fields Aside from GregTech_API.VERSION, these fields are not used anywhere in the project, so only GregTech_API.VERSION was kept. The idea and the usage check were done by miozune.
2023-05-28make private fields final where possible (#2028)chill
2023-05-28Add new mode for void protection & implement it for more multis (#2024)miozune
* Void protection improvements * Rename methods: isXXXButtonEnabled -> supportsXXX * Adjust texture for forbidden * Add MultiBlockFeatureSupportDumpers * Fix oversight in PCBFactory * Revert void protection support for PA * Rename class: ControllerWithButtons -> ControllerWithOptionalFeatures
2023-05-01bs+saMartin Robertz
2023-04-23Forge direction (#1895)Jason Mitchell
* ForgeDirection Also refactor the clusterfuck that was `getCoordinateScan` Co-authored by: Jason Mitchell <mitchej@gmail.com> * Fix rendering of Frame Boxes Frame boxes needed their own implementation of getTexture with int connexion mask, which is returning an error texture for the MetaTileEntity, because pipes (FrameBox **is** a pipe) do use this method to return different textures based on connexion status. --------- Co-authored-by: Léa Gris <lea.gris@noiraude.net>
2023-04-10Update spotless config to 0.2.2Raven Szewczyk
2023-04-04Modid work (#1833)boubou19
* add all mods founds in NHCore * depracte old strings * add ars magica 2 * more enum work * use a switch * spotless * more mod id rework * more mod id rework * more mod id rework * should be last * spotless * rename to make more sense * add path attribute * add getResourcePath to enum * spotless
2023-04-01Jabel, Generic injection and mostly automatic code cleanup (#1829)Raven Szewczyk
* Enable Jabel&Generic injection, fix type error caused by this * add missing <> * Infer generic types automatically * Parametrize cast types * Use enhanced for loops * Unnecessary boxing * Unnecessary unboxing * Use Objects.equals * Explicit type can be replaced with `<>` * Collapse identical catch blocks * Add SafeVarargs where applicable * Anonymous type can be replaced with lambda * Use List.sort directly * Lambda can be a method reference * Statement lambda can be an expression lambda * Use string switches * Instanceof pattern matching * Text block can be used * Migrate to enhanced switch * Java style array declarations * Unnecessary toString() * More unnecessary String conversions * Unnecessary modifiers * Unnecessary semicolons * Fix duplicate conditions * Extract common code from if branches * Replace switches with ifs for 1-2 cases * Inner class may be static * Minor performance issues * Replace string appending in loops with string builders * Fix IntelliJ using the wrong empty list method * Use Long.compare * Generic arguments: getSubItems * Generic arguments: getSubBlocks * Raw types warnings * Fix remaining missing generics * Too weak variable type leads to unnecessary cast * Redundant type casts * Redundant array length check * Redundant vararg arrays * Manual min/max implementations * A couple missed inspections * Goodbye explosion power ternary ladder * Apply spotless * Get rid of the other two big ternary ladders * Binary search explosion power * Don't overcomplicate things
2023-04-01update spotless formatting (#1827)boubou19
2023-03-30Implementation of A more useful Lava Boiler (#1814)Léa Gris
* Fix Missing null/empty checks on boilers base class Would cause a deadlock on empty boilers unable to start, as it tried to transfer null or empty FuildStack. * Fix Sound coordinates so it can be centered on block * WIP Lava Boiler Improuvements * :spotlessapply * Add GUI slot block background textures * Restrict ash slot to remove items only (disallow inserting items there) * Finalize GUI and Obsidian Production mechanic * Fix still output Obisidian from cooled Lava even when no more Lava available * Lava Boiler Textures: Improves GUI and TOP - Fluid slot now has Steam themed textures - Item slot block background gets a smaller icon that hides behind actual item blocks - Boiler TOP is now a drain texture instead of pump * Add null check
2023-03-18Revert "Revert "merge master (#1800)""Martin Robertz
This reverts commit 4159f36223a936528f43eaa4439281478a4314c2.
2023-03-18Revert "merge master (#1800)"Martin Robertz
This reverts commit dafbaf22fd6bef1112143b80d35eae9c60880dfc.
2023-03-17Auto-stock for stocking input bus (#1790)MadMan310
* Add auto-stock for stocking input bus * Add GUI support for autostock and min input limiting. * Added support for copy+pasting config w/ data sticks * typo * correct order * fixes * update branch (#1795) * Send cover data immediately when cover is placed (#1791) * migrate ore prefixes from gt++ and bw (#1792) OrePrefixes are used in switch case a lot and this prevents it from being a valid EnumHelper target. Under the hood for huge enum switch cases, javac will generate a synthetic class with a synthetic static final int[] field to hold switch map. If the OrePrefixes is ever extended, said switch map will be smaller than actual and cause ArrayIndexOutOfBoundException. This moves all addon added ore prefixes back to main mod. This also cleans up the obnoxious comment blocks created by spotless. * Fix advanced external transmitter cover (#1793) * change tpv back to 4k * Revert "change tpv back to 4k" This reverts commit 3560a670e3d697b26014f6320e344867953684e7. * change Tungstensteel to 4k * Add regulator abilities to Steam Valve (#1785) * fix: fix Steam Valve not being configurable * Revert "fix: fix Steam Valve not being configurable" This reverts commit 505d9e273b48315fde154490e116d58fed46ffaf. * feat: add steam regulator * feat: add superheated steam to steam valve * update bs * update to subversion 42 --------- Co-authored-by: miozune <miozune@gmail.com> Co-authored-by: Glease <4586901+Glease@users.noreply.github.com> Co-authored-by: Matej Dipčár <492666@mail.muni.cz> Co-authored-by: Martin Robertz <dream-master@gmx.net> Co-authored-by: NexusNull <p.wellershaus@googlemail.com> * fix --------- Co-authored-by: miozune <miozune@gmail.com> Co-authored-by: Glease <4586901+Glease@users.noreply.github.com> Co-authored-by: Matej Dipčár <492666@mail.muni.cz> Co-authored-by: Martin Robertz <dream-master@gmx.net> Co-authored-by: NexusNull <p.wellershaus@googlemail.com>
2023-02-26Enhanced multiblock GUIs (#1767)Maxim
* Added more buttons to multiblock GUI * Migrated PA to new GUI * Migrated Nano Forge to new GUI * Migrated PCB Factory to new GUI * Reband void protection to void excess to match GTPP logic * Adjust fusion reactor GUI size * Added statics for new NBT keys * Added getters for button status * Rename methods to reflect that they are about void excess, not the opposite * Added button textures
2023-02-26Add a completely new system for late/endgame content (#1754)BlueWeabo
* basic work * typo fixes * make an enum folder * location enums * space project manager * implement the space project teams * commands * move things around and new things * upgrade work * requirement work * if possible use an upgrades values * cleanup * more helpers in command * fix AOOBE * fix world saved data * builder for requirements * add command autocomplete * fix command npe * mark world saved data dirty * switch to saving to json string. this is fine * fix npe * fix files not saving correctly. serialization * spotless * part 1 of fixing json saving * working json file saving * rename fields * full implementation of SP_Upgrade * fixes * cleanup * texture prep * documentation part 1 * documentation part 2 and rework of json saving * fix the missed conversions * set texture when copying * more interface usage and fixes * rework saving. * Added rudimentary NEI handler for projects * Revert "Added rudimentary NEI handler for projects" This reverts commit 6d8210e25b27fee7dc1865d1afa91708a8d9b875. * address NPEs * some textures * higher quality textures, put in the moon as a temp texture * add a check to create a team if one smt weird happens * command work * add ability to localize the space bodies * Added disabled button and toggle button * Added possibility to not render the original stacksize of item stacks in NEI * Added NEI handler * Fixes item count on tooltip always rendering as 1 * Fix refactor * 5 new body textures * fix misspelled texture name --------- Co-authored-by: minecraft7771 <maxim235@gmx.de>
2023-01-30[ci skip] spotlessApply with the new settingsJason Mitchell
2023-01-20MTE Inventory updates (#1496)Jason Mitchell
* MTE Inventory updates * Separate Input/Output inventory * Use a LinkedHashMap to ensure inventory orders are deterministic * Input/Output work on either Input/Output inventories * MTE Inventory * Add GT_Packet_MultiTileEntity * More dyanmic packet with packetFeatures * Add IMTE_HasModes for MultiBlockPart * Help with MTE Inventory (#1613) * convert inventory to use ItemStackHandler * Update MUI * inventories * move Iteminventory to its own method Co-authored-by: miozune <miozune@gmail.com> * Update MUI * Update MUI * Add IMultiBlockPart * Mte fluid inventory (#1639) * first work on fluid inventory * make gui work with numbers not dividable by 4 * use math.min * add outputfluids saving * actually working * Update MUI Co-authored-by: miozune <miozune@gmail.com> * Ticking Covers! * Parts now register covers with the controller * Controllers now tick covers on parts * Break cover ticking out into `tickCoverAtSide` Fix some inventory methods on MultiBlockController * Filter on tickable covers * Improve GUIs for MTEs (#1650) * working controller GUI * locked inventory selection work * input and output locking of inventories Co-authored-by: miozune <miozune@gmail.com> * spotless * CoverInfo refactor (#1654) * Add `CoverInfo` and deprecate the old fields to hold cover information * Disable MTE registration * Fix NPE - Return EMPTY_INFO for SIDE_UNKNOWN Temporarily add back old NBT saving in case of a revert so covers aren't lost. * Actually save the old NBT data, instead of empty Co-authored-by: BlueWeabo <76872108+BlueWeabo@users.noreply.github.com> Co-authored-by: miozune <miozune@gmail.com>
2022-12-28Allow resource packs to override individual progressbar textures (#1596)miozune
* Allow resource packs to override individual progressbar textures * spell: every + singular * Fix potential crash on server with FallbackableSteamTexture
2022-12-23add NEI handler for ic2 fuel rods (#1580)Glease
* add NEI handler for ic2 fuel rods Signed-off-by: Glease <4586901+Glease@users.noreply.github.com> * fix typo Signed-off-by: Glease <4586901+Glease@users.noreply.github.com> * rename variable to cover up the original intention Signed-off-by: Glease <4586901+Glease@users.noreply.github.com> Signed-off-by: Glease <4586901+Glease@users.noreply.github.com>
2022-12-17another attempt at lag fixing (#1556)Glease
* another attempt at lag fixing Signed-off-by: Glease <4586901+Glease@users.noreply.github.com> * fix tests Signed-off-by: Glease <4586901+Glease@users.noreply.github.com> * fix tests 2/2 Signed-off-by: Glease <4586901+Glease@users.noreply.github.com> * address review Signed-off-by: Glease <4586901+Glease@users.noreply.github.com> * get rid of GT_Test Signed-off-by: Glease <4586901+Glease@users.noreply.github.com> Signed-off-by: Glease <4586901+Glease@users.noreply.github.com>
2022-12-13Nanite material and circuit board multi for later tiers (#1513)BlueWeabo
* 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>
2022-11-25Rewrite GUIs with ModularUI (#1381)miozune
* 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 * Change signature of addUIWidgets * FluidFilter cover, FluidDisplaySlotWidget, BasicTank, BasicGenerator, Output Hatch, MicrowaveEnergyTransmitter, Teleporter, DigitalChest, DigitalTank * Add title tab * Move package: modularui -> modularui/widget * Programmed circuit + IConfigurationCircuitSupport * clean * 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 * Display items and fluids that exceed usual count * blah * use +=, why didn't I do this * 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 * Minor changes to NEI * 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 * 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 default implementation for IHasWorldObjectAndCoords#openGUI * Make openGTTileEntityUI accept MultiTE & cleanup Co-authored-by: Jason Mitchell <mitchej@gmail.com>
2022-10-22fix client side not reading amount of fluid from correct slot (#1480)Glease
2022-09-23Add new icon for the analog modeMatej Dipčár
2022-09-23Implement all advanced receiver modesMatej Dipčár
2022-09-23Add Advanced Wireless Redstone CoversMatej Dipčár
2022-09-11Use pre-defined methods to draw tooltips in GT_GUIContainer_DigitalTank (#1374)Alexdoru
* use pre defined methods to draw tooltip in GT_GUIContainer_DigitalTank * introduce private static final fields for string tooltip names
2022-09-09Move GT Tank button position (#1363)くぁーりぃ
* move digital tank button position * spotless * spotlessApply (#1364) Co-authored-by: くぁーりぃ <39122497+Quarri6343@users.noreply.github.com> Co-authored-by: GitHub GTNH Actions <> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2022-09-02Add Drag-And-Drop support for digital tank (#1333)miozune
* Add Drag-And-Drop support for digital tank * lockedFluidName is null in old save
2022-09-01Super Tank Fluid Locking Fix (#1332)くぁーりぃ
* fix bugs * spotless * add null check
2022-09-01Digitalize Super Tank part 2 (#1331)くぁーりぃ
* fix super tank pipe connecting issue * Add fifth button and fix translation key * apply spotless * fix
2022-08-29Digitalize Super Tank (#1318)くぁーりぃ
* add new GUI * make gui interactable * make later three buttons actually function * add auto output feature * do localization * apply spotless * spotless pt.2
2022-08-27Update buildscript & apply spotless (#1306)Raven Szewczyk
* Update dependencies * Update buildscript, apply spotless
2022-08-23Refactored built-in integrated circuit support (#1284)repo-alt
* Refactored built-in integrated circuit support Added built-in integrated circuit to input buses * fix spacing
2022-08-20Some fixes for the new input bus (#1278)repo-alt
* Fix a circuit slot position "Borrow" item size rendering from AE2 * Add existing type check
2022-08-15Overriding GUI colors with .mcmeta (#1261)Albi
* Implemented gui textcolor override with .mcmeta files * cleanup * Added shared class to reduce code duplication * Moved #drawLine back to GT_NEI_DefaultHandler
2022-08-12Added means of customizing GUI colors for resource packs (#1203)Albi
* Added means of customizing GUI colors through lang file * Color values are now stored in json file instead of the lang file * Made json only load upon resource reload and ensured server compatibility Co-authored-by: Martin Robertz <dream-master@gmx.net>