aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/api/multitileentity/machine
AgeCommit message (Collapse)Author
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-22MuTE overhaul and ACR (#1883)Maxim
* complex controller start * Added methods to get input fluids and items * Added logic to complex parallel mute * Added ACR and fixed many, many, many, many bugs * Added void protection setting to checkRecipe * do not init nbt, if mteID and mteRegistry are the same * Improved GUI design * Force structure check when pressing power switch * ACR Textures * Added T1 structure * Added perfect OC * Added WAILA * fix mutes resetting their nbt * Fix ACR GUI * fix npe * Added void protection for MuTEs * Fixed ACR starting recipe while another one is ongoing * nbt saving * maybe fix structure breaking * Fix complex machine disabling on startup * correctly update input tanks * move casings over * Changed logic of casings to change mode and facing in one go by sneaking * Fixed the casing target not resetting * Added side only annotations * don't leave it empty * Added power logic and tiered blocks to ACR * Change facing to wrench side if casing mode is currently none * lasers anyone? * Added ACR item chaining * Remove unncessary item lists * Use HashSet for process whitelists * Optimize list capacities * Fix potential recipe voiding bug * Rename methods for consistancy * Fix NPE * Duct tape fix structure check * allow MuTEs to connect to cables * Added separate tank inventories for input separation (#1887) * Fixed unregistering tank function * Fixed input busses not being automatable * Added fluid chaining * Fixed saving of input tanks * Forbid inventory registering with empty name * Display all input tanks in controller GUI * Fixed fluid hatch GUI height * Reset casing lists when checking the structure * Make inventory GUI size consistant * Make use of the tooltip cache * rename thing clean up * Forgot to put tooltip into map * Added tooltip to ACR * Reset whitelists when one whitelist window was opened * Refined scanner string * Fixed progress times * Fixed MuTE not consuming fluids * Properly register controller inventories * switch to ForgeDirection * switch to new Renderer * Added missing contains check on registerInventory * Fixed output tanks not registering * Fixed upgrade tank loading * fix machines not having active/inactive textures * fix overlays not loading correctly * Don't register controller directly * Remove magic strings all * fix active not setting to inactive * allow glow * item renderer * fix glow * MuTE improved hatch GUI and fluid output locking (#1889) * Allow output hatches to be fluid locked * Reworked hatch GUI * Check target before trying to open GUI * Make ACR GUI easier to look at * fix covers not rendering on mutes * fix covers not displaying above the item/fluid in/out * new folder texture structure * Reduce network traffic caused by covers * Fixed WAILA fluid locking display * Don't save everything to the itemstack NBT * Added possibility to save NBT of MuTE to its itemstack * fix textures, but make sacrifices * mah textures * Removed the need for all textures to be present * Added glow texture for active coke oven * Removed unncesssary upgrade casing textures * shorten nbt tags --------- Co-authored-by: BlueWeabo <76872108+BlueWeabo@users.noreply.github.com> Co-authored-by: Martin Robertz <dream-master@gmx.net> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-04-12Fix MuTE sound (#1878)Maxim
* Only play interrupt sound, when machine stop was due to power * Change power switch button sound to proper one
2023-04-10Update spotless config to 0.2.2Raven Szewczyk
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-04-01Implement Power Logic, Pollution Logic and Processing Logic for MuTEs and ↵BlueWeabo
many other things (#1823) * update bs 2 * fuel consumption and energy implementation. clean up * don't register XD * some clean up * coke oven work * semi-working coke oven somehow i broke the activating of the multiblock * power logic * PowerLogic * clean up, saving loading nbt * small cleanup and pollution * pollution working :P * Energy mostly working, wallsharing * processing logic * fix npe and deregister * review requests * missed one * remove extra 0
2023-02-07Mte inventory block (#1692)BlueWeabo
MTE Inventory Upgrade * inventories saved to nbt in controller * bump up ModularUI to fix labels * inventory renaming * fix inventories not syncing * more nbt saving and loading * unregister inventory on block break * example of a block being made from the same class * clear UpgradeCasing list every structure check * fix inventory halving to 0 * sync inventory name for upgrade block * switch to its own method of sending client data --------- Co-authored-by: Jason Mitchell <mitchej+github@gmail.com>
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-08-27Update buildscript & apply spotless (#1306)Raven Szewczyk
* Update dependencies * Update buildscript, apply spotless
2022-08-26texture workJason Mitchell
2022-08-26WIP Texture supportJason Mitchell
2022-07-22MultiTileEntityJason Mitchell