aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/api/enums/TextureSet.java
AgeCommit message (Collapse)Author
2024-09-05Add superdense plates (#3050)Mary
Co-authored-by: Martin Robertz <dream-master@gmx.net> Co-authored-by: boubou19 <miisterunknown@gmail.com>
2024-05-22Implementation: Raw Ore Items as Ore Drops (#2502)Ethryan
* testing * Fix textures * Adding Drops, still need to add furnace recipe * Need to fix the multiple smelting recipes. otherwise stuff works. * part 2 * Remove wip block code I added * Moved it to a new processing file * Fix Oredict and add a stone dust chance output. And added a config option for fortune bonus. * Finally got Spotless to work * fix config system set it in gregtech config with oredropbehaviour in gregtech.cfg * Added new option and an option that returns it to the old behaviour. * Moved the raw ores to meta3 since meta1 was full. (MetaID range fix) * Fixing the MBM to only process small ores with fortune. * New config option * try to fix the recipes not working on Zeta * Implement Caedis Fortune fix * Added comment * Spotless * Fix stone dust amount from macerator * Adding Raw ore to the OreFactory (Untested) * spotless * Update this to actually drop the amount number of stack, instead of the stack set to the amount * New Random function for fortune and shapeless crushing recipes for the raw ores. * Fix * Actually make the block per dimension. * Fix an () issue. And make this actually work ingame. and not just randomly. * Change back drops Ned to look into Silk Touch more * Enable Silk Touch * Wth Spotless?, THIS made you complain?
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-04-10Update spotless config to 0.2.2Raven Szewczyk
2023-01-30[ci skip] spotlessApply with the new settingsJason Mitchell
2023-01-25EOH materials + Allow materials to pick their processing tier (#1671)Connor-Colenso
* Begin addition of tiered material manipulation * Dwarf matter * Add hardcoded EU tiers for wider usage. * New material images etc * Nugget processing tiers * Move iron nugget to wrought iron smelting to the correct place * Add white dwarf shapes * Add white dwarf shapes * Additional retiering options for EU consumption on material part generation * White dwarf matter complete * Tier neutronium processing at ZPM * Spotless * More adjustments * Renaming files * Add new overlays for magneto material and more name adjustments * Add no recipes subtag * Spotless + name adjustment * Undo isCustom to maintain potential public variable references in addons. * Undo isCustom to maintain potential public variable references in addons. * Fix fluid registry corruption. * Add rotor EU override * Add rotor EU override * Make neutronium mass more reasonable * Add proper time adjustments to rotor (probably an old oversight) * Adjust enums to use VP rather than recalculate * Fix typos on EU usage * spotlessApply (#1672) Co-authored-by: Connor-Colenso <52056774+Connor-Colenso@users.noreply.github.com> Co-authored-by: GitHub GTNH Actions <> * Change setProcessingMaterialTierEU to accept long. * Small fix * Add space and time materials * Add new forge hammer support * Update tooltip * Expand laser engraver slots. * spotlessApply (#1673) Co-authored-by: Connor-Colenso <52056774+Connor-Colenso@users.noreply.github.com> Co-authored-by: GitHub GTNH Actions <> * Reserve texture page. * Modernise GT circuit usage * Add oversight in assembler frame recipe * Add missing MHDCSM overlay textures * Remove small and tiny MHDCSM dusts * Fix error in ingot texture * Fix NO_RECIPES not applying to frame boxes * Restore missing ingot * Add rod handles for materials * Fix frame box auto generating with NO_RECIPEs tag * recipe * Spotless * Add MOD_ID_GTPP as modid * spotlessApply (#1675) Co-authored-by: Connor-Colenso <52056774+Connor-Colenso@users.noreply.github.com> Co-authored-by: GitHub GTNH Actions <> * Remove smelting spacetime from furnace (why does this exist?) * Recipes + new storage blocks for materials * Bedrockium LuV -> EV * SpaceTime UMV -> UIV * TranscendentMetal UIV -> UEV * MagnetoThingy and dward mats UXV -> UMV * update buildscript * yeet magic number that could be * spotlessApply * Make the nanite tier 3, colen request * Up nanite tier * Comment * Change name * Change name Co-authored-by: GTNH-Colen <54497873+GTNH-Colen@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: adam riondy <adampoplol@gmail.com> Co-authored-by: boubou19 <miisterunknown@gmail.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-09-09fix false GaiaSpirit texture not found warnings (#1359)Glease
2022-09-07revert to spritesheet for block textures for gaia spirit (#1351)Glease
* revert to spritesheet for block textures for gaia spirit also removed now-unused transcendent metal block textures * Spotless apply for branch fix/animated-material-texture-fix for #1351 (#1352) Co-authored-by: Glease <4586901+Glease@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-08-27Update buildscript & apply spotless (#1306)Raven Szewczyk
* Update dependencies * Update buildscript, apply spotless
2022-07-30Botania Materials with custom textures (#1168)Connor-Colenso
* Move materials to new class and remove some old comments. * Move materials to new class and remove some old comments. * New mat textures * RGB Fixes * Change material stats Co-authored-by: GTNH-Colen <54497873+GTNH-Colen@users.noreply.github.com>
2022-06-23Plasma forge fixes (#1086)Connor-Colenso
* Basis of changes. * Fix item stack and fluid vanishing. * Add new plasma forge UI, change tooltip and fix recipe map. * Fix corrupted fluid registry. * Fix fluids in recipes. Items still need adjusting. * Working. * Liquid spacetime and rename multi to D.T.P.S. so it can fit in GUI properly. * Make animation of spacetime fluid slower. * Fix recipe map (again). * Remove screwdriver junk. Clean up code slightly. * More cleaning. * Comments * Add hatch limitations and add some additional information. Also update NEI GUI. * Add proper recipes and change SpaceTime to a fluid not a gas. * Remove depreciated coil check (since I stole the IDs). * Remove depreciated coil check (since I stole the IDs). Add more comments. * Change temp of SpaceTime. * Add catalyst recipes + support for 16:16 fusion recipes. * Add comments. * Scala fix maybe? * Change plasma forge GUI. * Uncap temperature of materials. (Short -> Int) * Add chunkloading support (when multi is active). * Fix NEI merge issues. * fix used ids in kevlar * Add fluid support for laser engraver. * fix sh***t (cherry picked from commit 01851c100c52fd8292028cf6dda2cb136c617afc) * Add new intermediate materials to facilitate crafting. Also fix fusion typo. * Fix heat/fluid quantity display to be formatted correctly. * Change recipes to be more balanced. * Change residue fluid texture. * Restore better naming for multiblock. * Fix recipe typo. * Fix text not wrapping in multi controller. * Give laser engraver internal fluid storage. * Add IMC NEI support. * Update material properties. * Remove old dev comments. * Fix NEI texture. * Update/fix plasma forge recipes. * Increase max hatch count. * Increase max hatch count and fix mixing energy hatches. Plus quick check for processing time. * Fix spacetime recipe. * Update spacetime textures and add new item textures. * Remove manual spacetime fluid addition. * Add custom fluid texture override ability. * Update infinity and spacetime to use new custom fluid override texture. * Depreciate old recipe adding methods. * Refactor GT NEI handler. * Remove unnecessary import. * Remove debug comment. * Clean up auto generated fluid code. * Fix NPE and add a few comments. * Refactor GT NEI handler. * Update NEI GUIs. * More NEI fixes. * Update LCR NEI GUI. * Update error message. Co-authored-by: GTNH-Colen <54497873+GTNH-Colen@users.noreply.github.com> Co-authored-by: Martin Robertz <dream-master@gmx.net>
2022-06-19Custom animated material support (#1081)Connor-Colenso
* Add custom texture ability for items. * Fix warning. * Add custom texture for infinity. Co-authored-by: GTNH-Colen <54497873+GTNH-Colen@users.noreply.github.com>
2021-05-24feat(glow): iconset machines glow supportLéa Gris
- Add glow support for all sides and states of iconset machines (same as with basicmachines). Automated code cleanup with IDEA of: - Optiimise all imports (remove unused, sort) - Reorder all modifiers to the canonical preferred order (as stated in the Java Language Specification) - Add all missing @Override annotations
2021-04-27fix(textfiles): add missing neline at end of filesLéa Gris
git and diff tools will complain if text file does not end with a newline. Fixed all text files in the repository with Linux bash shell: ```sh git ls-files -z | while IFS= read -rd '' f; do mime="$(file --brief --mime "$f")"; if [ -z "${mime##text/*}" ]; then tail -c1 "$f" | read -r _ || printf '\n' >>"$f"; fi; done ```
2020-04-10Void miner adjustments (#262)bartimaeusnek
* Added all Ores to Voidminer in DeepDark + removed Infinity Ore Signed-off-by: bartimaeusnek <33183715+bartimaeusnek@users.noreply.github.com> * renormalize line endings Signed-off-by: bartimaeusnek <33183715+bartimaeusnek@users.noreply.github.com>
2020-03-16Refactored TextureSet.javabartimaeusnek
Signed-off-by: bartimaeusnek <33183715+bartimaeusnek@users.noreply.github.com>
2018-10-21Add new item: CasingDream-Master
2017-11-13GT6 styled pipesAntifluxfield
2016-09-22MORE string var changesMuramasa
2016-06-21experimental branchDream-Master
2016-06-21reverse commitDream-Master
2016-06-21even with Blood asp experimental branchDream-Master
2016-06-21remove allDream-Master
2015-10-21Reformat codeShawn Buckley
2015-10-18Move source directoryShawn Buckley