<feed xmlns='http://www.w3.org/2005/Atom'>
<title>github/GT5-Unofficial.git/src/main/java/gregtech/api/interfaces/modularui, branch master</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<link rel='alternate' type='text/html' href='https://git.nea.moe/github/GT5-Unofficial.git/'/>
<entry>
<title>The Great Renaming (#3014)</title>
<updated>2024-09-02T21:17:17+00:00</updated>
<author>
<name>NotAPenguin</name>
<email>michiel.vandeginste@gmail.com</email>
</author>
<published>2024-09-02T21:17:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.nea.moe/github/GT5-Unofficial.git/commit/?id=1b820de08a05070909a267e17f033fcf58ac8710'/>
<id>1b820de08a05070909a267e17f033fcf58ac8710</id>
<content type='text'>
* move kekztech to a single root dir

* move detrav to a single root dir

* move gtnh-lanthanides to a single root dir

* move tectech and delete some gross reflection in gt++

* remove more reflection inside gt5u

* delete more reflection in gt++

* fix imports

* move bartworks and bwcrossmod

* fix proxies

* move galactigreg and ggfab

* move gtneioreplugin

* try to fix gt++ bee loader

* apply the rename rules to BW

* apply rename rules to bwcrossmod

* apply rename rules to detrav scanner mod

* apply rename rules to galacticgreg

* apply rename rules to ggfab

* apply rename rules to goodgenerator

* apply rename rules to gtnh-lanthanides

* apply rename rules to gt++

* apply rename rules to kekztech

* apply rename rules to kubatech

* apply rename rules to tectech

* apply rename rules to gt

apply the rename rules to gt

* fix tt import

* fix mui hopefully

* fix coremod except intergalactic

* rename assline recipe class

* fix a class name i stumbled on

* rename StructureUtility to GTStructureUtility to prevent conflict with structurelib

* temporary rename of GTTooltipDataCache to old name

* fix gt client/server proxy names</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* move kekztech to a single root dir

* move detrav to a single root dir

* move gtnh-lanthanides to a single root dir

* move tectech and delete some gross reflection in gt++

* remove more reflection inside gt5u

* delete more reflection in gt++

* fix imports

* move bartworks and bwcrossmod

* fix proxies

* move galactigreg and ggfab

* move gtneioreplugin

* try to fix gt++ bee loader

* apply the rename rules to BW

* apply rename rules to bwcrossmod

* apply rename rules to detrav scanner mod

* apply rename rules to galacticgreg

* apply rename rules to ggfab

* apply rename rules to goodgenerator

* apply rename rules to gtnh-lanthanides

* apply rename rules to gt++

* apply rename rules to kekztech

* apply rename rules to kubatech

* apply rename rules to tectech

* apply rename rules to gt

apply the rename rules to gt

* fix tt import

* fix mui hopefully

* fix coremod except intergalactic

* rename assline recipe class

* fix a class name i stumbled on

* rename StructureUtility to GTStructureUtility to prevent conflict with structurelib

* temporary rename of GTTooltipDataCache to old name

* fix gt client/server proxy names</pre>
</div>
</content>
</entry>
<entry>
<title>Add duration since last shutdown (#2977)</title>
<updated>2024-08-30T17:48:23+00:00</updated>
<author>
<name>HoleFish</name>
<email>48403212+HoleFish@users.noreply.github.com</email>
</author>
<published>2024-08-30T17:48:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.nea.moe/github/GT5-Unofficial.git/commit/?id=9fee35c065e197199f57ef1df31ac303e94d1d50'/>
<id>9fee35c065e197199f57ef1df31ac303e94d1d50</id>
<content type='text'>
* machine message

* fix &amp; prass channel

* machine message

* fix &amp; prass channel

* fix machines that dont use regular onPostTick

* follow error fixes and fix hatch check

* oops

* sa

---------

Co-authored-by: Martin Robertz &lt;dream-master@gmx.net&gt;
Co-authored-by: boubou19 &lt;miisterunknown@gmail.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* machine message

* fix &amp; prass channel

* machine message

* fix &amp; prass channel

* fix machines that dont use regular onPostTick

* follow error fixes and fix hatch check

* oops

* sa

---------

Co-authored-by: Martin Robertz &lt;dream-master@gmx.net&gt;
Co-authored-by: boubou19 &lt;miisterunknown@gmail.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>Add Structure Update button (#2941)</title>
<updated>2024-08-23T16:28:22+00:00</updated>
<author>
<name>HoleFish</name>
<email>48403212+HoleFish@users.noreply.github.com</email>
</author>
<published>2024-08-23T16:28:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.nea.moe/github/GT5-Unofficial.git/commit/?id=eb34e71e22177fb2d8072522eb7f3e5401b84eea'/>
<id>eb34e71e22177fb2d8072522eb7f3e5401b84eea</id>
<content type='text'>
* trigger

* structure update button

---------

Co-authored-by: Martin Robertz &lt;dream-master@gmx.net&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* trigger

* structure update button

---------

Co-authored-by: Martin Robertz &lt;dream-master@gmx.net&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>Update multi-machines to display running mode in GUI (#2755)</title>
<updated>2024-07-25T01:14:45+00:00</updated>
<author>
<name>Mary</name>
<email>33456283+FourIsTheNumber@users.noreply.github.com</email>
</author>
<published>2024-07-25T01:14:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.nea.moe/github/GT5-Unofficial.git/commit/?id=5045736c2df49b6214c63dc78edff258ed39de0e'/>
<id>5045736c2df49b6214c63dc78edff258ed39de0e</id>
<content type='text'>
* Framework for mode text in gui

* Add getMachineModeName to all multimachines

* Changed lang file for MFE because "Electromagnetic Polarizer" and "Electromagnetic Separator" are too long and make the GUI look bad

* Removed leftover code

* Removed more leftover code... oops

* Moved logic to base class and made mode switch chat message localizable

* Merge caused spotless to fail, I guess

* Reverted logic from parent class

* ahhhh spotless</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Framework for mode text in gui

* Add getMachineModeName to all multimachines

* Changed lang file for MFE because "Electromagnetic Polarizer" and "Electromagnetic Separator" are too long and make the GUI look bad

* Removed leftover code

* Removed more leftover code... oops

* Moved logic to base class and made mode switch chat message localizable

* Merge caused spotless to fail, I guess

* Reverted logic from parent class

* ahhhh spotless</pre>
</div>
</content>
</entry>
<entry>
<title>Mode switch button (#2730)</title>
<updated>2024-07-19T16:27:40+00:00</updated>
<author>
<name>Mary</name>
<email>33456283+FourIsTheNumber@users.noreply.github.com</email>
</author>
<published>2024-07-19T16:27:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.nea.moe/github/GT5-Unofficial.git/commit/?id=1842f59eeb837edecfc31dae8a2b35fcda471b38'/>
<id>1842f59eeb837edecfc31dae8a2b35fcda471b38</id>
<content type='text'>
* Button textures. Once again I am manually pulling changes from a different branch... sorry. If you want to read the full commit history, the modeswitchgui branch has it.

* Texture enums

* Implementation in ControllerWithOptionalFeatures

* Implementation in GT_MetaTileEntity_MultiBlockBase

* Implemented into all multi-machines

* Lang changes

* Added documentation

* Added missing clear

* Quick polish changes - button base texture is standard instead of pressed, and the click noise works.

* MFE compatibility

* TurboCan compatibility

* Fix misordered icons in canner

* Removed redundant code in button

* Attempted to refactor with MachineMode enum. Also moved loadNBT and saveNBT logic to base class

* sa

* fix

(cherry picked from commit 1f14a7abf460ad114f10e8ba58b6be44b7b18d48)

* Rework machineMode into enum of IMachineMode completely

* Fixed breaking typo

* Made it stop crashing on normal multis that don't support mode switch

* Revert

* Finished revert and re-addressed changes from original review

* spotless

* Load nbt tags in correct order. Fixes backwards compat

* Check nbt key on load instead

* Run super last and make all MACHINEMODE static

---------

Co-authored-by: Martin Robertz &lt;dream-master@gmx.net&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Button textures. Once again I am manually pulling changes from a different branch... sorry. If you want to read the full commit history, the modeswitchgui branch has it.

* Texture enums

* Implementation in ControllerWithOptionalFeatures

* Implementation in GT_MetaTileEntity_MultiBlockBase

* Implemented into all multi-machines

* Lang changes

* Added documentation

* Added missing clear

* Quick polish changes - button base texture is standard instead of pressed, and the click noise works.

* MFE compatibility

* TurboCan compatibility

* Fix misordered icons in canner

* Removed redundant code in button

* Attempted to refactor with MachineMode enum. Also moved loadNBT and saveNBT logic to base class

* sa

* fix

(cherry picked from commit 1f14a7abf460ad114f10e8ba58b6be44b7b18d48)

* Rework machineMode into enum of IMachineMode completely

* Fixed breaking typo

* Made it stop crashing on normal multis that don't support mode switch

* Revert

* Finished revert and re-addressed changes from original review

* spotless

* Load nbt tags in correct order. Fixes backwards compat

* Check nbt key on load instead

* Run super last and make all MACHINEMODE static

---------

Co-authored-by: Martin Robertz &lt;dream-master@gmx.net&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>enable subclass to allow less voiding mode being set (#2191)</title>
<updated>2023-07-30T12:26:53+00:00</updated>
<author>
<name>Glease</name>
<email>4586901+Glease@users.noreply.github.com</email>
</author>
<published>2023-07-30T12:26:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.nea.moe/github/GT5-Unofficial.git/commit/?id=f983308b936c54f3331424b0d6d51d8a3b11f415'/>
<id>f983308b936c54f3331424b0d6d51d8a3b11f415</id>
<content type='text'>
* enable subclass to allow less voiding mode being set

* fix bug

* rename</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* enable subclass to allow less voiding mode being set

* fix bug

* rename</pre>
</div>
</content>
</entry>
<entry>
<title>Generic processing logic (#2096)</title>
<updated>2023-07-10T08:13:04+00:00</updated>
<author>
<name>Maxim</name>
<email>maxim235@gmx.de</email>
</author>
<published>2023-07-10T08:13:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.nea.moe/github/GT5-Unofficial.git/commit/?id=fe0387946550f89a403b09f4e8cf6e43ee8f2e8f'/>
<id>fe0387946550f89a403b09f4e8cf6e43ee8f2e8f</id>
<content type='text'>
* Added enumeration for check recipe result

* Rework processing logic to work with MTEs too

* Switched first few multiblocks to new checkRecipe method

* Applied generic logic to EBF

* Added support for long power base and applied generic processing logic to more machines

* Address some feedback

* Added more setter to further configure the processing logic

* Change internal checkRecipe to work with checkRecipeResult, to allow the injection of custom failure messages

* Suppress warning, change access

* Merge recipeMap and mapSupplier

* Move calls to setMetaTEController and setRecipeMap to base classes

* Make processingLogic final

* Make results non-null

* Rename `ProcessingLogic#checkRecipe` -&gt; `#validateRecipe`
Otherwise it's confusing with `GT_MetaTileEntity_MultiBlockBase#checkRecipe`

* oops

* Added recipe locking to generic processing logic

* Rename: getWorldObject -&gt; getIHasWorldObjectAndCoords

* Annotate missing overrides

* Renamed recipeLockableController -&gt; recipeLockableMachine

* Migrated Cleanroom

* Migrated pyrolyse oven

* Migrated driller

* Migrated charcoal pit

* Migrated DT

* Rename: controller -&gt; machine

* Make recipemaps override base `findRecipe` and mark others final

* Remove unused maps

* Add FindRecipeResult

* Remove IHasWorldObjectAndCoords parameter from findRecipe
This removes argument for printer recipemap to pass for GT_ModHandler.getAllRecipeOutput, but I don't think there's any mod that adds world-specific coloring recipe.

* Added method to set processing logic power so machines can override it on demand

* Restructure CheckRecipeResult, show voltage required and move package

* Reword: insufficient voltage -&gt; power

* Change text color: dark gray -&gt; gray

* Added findRecipeResult for insufficient heat

* Migrated PCB factory

* Fix result not being reset on shut down

* Show coil tier for heat

* clean

* Reverted migration of driller base

* Migrated TPM

* Moved getting of parallel supplier, to accomodate TPM

* Migrated power gen multiblocks

* Migrated Assembling Line

* Migrated fusion

* Migrated multi smelter

* Migrated boiler

* Migrated DTPF

* Migrated ore factory

* Migrated heat exchanger

* Make checkRecipe() final, javadoc, minor cleanup

* Fix overclock behavior with multiple hatches, javadoc, minor cleanup

* Minor fix for javadoc

* Fixed creation of OC calculator not factoring in batch mode correctly

* Make GT_ParallelHelper#setRecipe nonnull

* Rework SimpleCheckRecipeResult to not require registration

* Migrate charcoal pit and cleanroom

* Fix result not being reset when turning off machine

* Add API for BW to make recipemap sensitive to special slot on recipe search

* Migrated PA

* Migrated driller base

* Make ProcessingLogic#duration int

* Minor cleanup

* missing recipe locking for long multi

* Fix NPE

* Show crash message and turn off machine

* minor javadoc fix

* Fixed power setting for extended power base

* Integrate SingleRecipeCheck into ProcessingLogic, fix duration overflow, fix duration for batch mode, migrate PA for GT_MetaTileEntity_ExtendedPowerMultiBlockBase

* Fixed ME stocking busses

* Minor PA fixes

* Cleanup item collecting logic &amp; apply to normal multi as well

* Oversight

* Derp

* Multiple voltage instead of amperage with recipe map amperage, since usually amperage is intended for parallel, not for recipe checking

* Fix missing EU modifiers on PCB factory OC calculator

* Removed left over OC method

* Fixed duration calculation of PCB not applying roughness multiplier

* Fixed OC parameters

* Make createOverclockCalculator nonnull &amp; more nonnull annotations

* Fixed input processing voltage

* Round down voltage for other machines too

* Revert Nano Forge, return correct long voltage

* Use region / endregion

---------

Co-authored-by: miozune &lt;miozune@gmail.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Added enumeration for check recipe result

* Rework processing logic to work with MTEs too

* Switched first few multiblocks to new checkRecipe method

* Applied generic logic to EBF

* Added support for long power base and applied generic processing logic to more machines

* Address some feedback

* Added more setter to further configure the processing logic

* Change internal checkRecipe to work with checkRecipeResult, to allow the injection of custom failure messages

* Suppress warning, change access

* Merge recipeMap and mapSupplier

* Move calls to setMetaTEController and setRecipeMap to base classes

* Make processingLogic final

* Make results non-null

* Rename `ProcessingLogic#checkRecipe` -&gt; `#validateRecipe`
Otherwise it's confusing with `GT_MetaTileEntity_MultiBlockBase#checkRecipe`

* oops

* Added recipe locking to generic processing logic

* Rename: getWorldObject -&gt; getIHasWorldObjectAndCoords

* Annotate missing overrides

* Renamed recipeLockableController -&gt; recipeLockableMachine

* Migrated Cleanroom

* Migrated pyrolyse oven

* Migrated driller

* Migrated charcoal pit

* Migrated DT

* Rename: controller -&gt; machine

* Make recipemaps override base `findRecipe` and mark others final

* Remove unused maps

* Add FindRecipeResult

* Remove IHasWorldObjectAndCoords parameter from findRecipe
This removes argument for printer recipemap to pass for GT_ModHandler.getAllRecipeOutput, but I don't think there's any mod that adds world-specific coloring recipe.

* Added method to set processing logic power so machines can override it on demand

* Restructure CheckRecipeResult, show voltage required and move package

* Reword: insufficient voltage -&gt; power

* Change text color: dark gray -&gt; gray

* Added findRecipeResult for insufficient heat

* Migrated PCB factory

* Fix result not being reset on shut down

* Show coil tier for heat

* clean

* Reverted migration of driller base

* Migrated TPM

* Moved getting of parallel supplier, to accomodate TPM

* Migrated power gen multiblocks

* Migrated Assembling Line

* Migrated fusion

* Migrated multi smelter

* Migrated boiler

* Migrated DTPF

* Migrated ore factory

* Migrated heat exchanger

* Make checkRecipe() final, javadoc, minor cleanup

* Fix overclock behavior with multiple hatches, javadoc, minor cleanup

* Minor fix for javadoc

* Fixed creation of OC calculator not factoring in batch mode correctly

* Make GT_ParallelHelper#setRecipe nonnull

* Rework SimpleCheckRecipeResult to not require registration

* Migrate charcoal pit and cleanroom

* Fix result not being reset when turning off machine

* Add API for BW to make recipemap sensitive to special slot on recipe search

* Migrated PA

* Migrated driller base

* Make ProcessingLogic#duration int

* Minor cleanup

* missing recipe locking for long multi

* Fix NPE

* Show crash message and turn off machine

* minor javadoc fix

* Fixed power setting for extended power base

* Integrate SingleRecipeCheck into ProcessingLogic, fix duration overflow, fix duration for batch mode, migrate PA for GT_MetaTileEntity_ExtendedPowerMultiBlockBase

* Fixed ME stocking busses

* Minor PA fixes

* Cleanup item collecting logic &amp; apply to normal multi as well

* Oversight

* Derp

* Multiple voltage instead of amperage with recipe map amperage, since usually amperage is intended for parallel, not for recipe checking

* Fix missing EU modifiers on PCB factory OC calculator

* Removed left over OC method

* Fixed duration calculation of PCB not applying roughness multiplier

* Fixed OC parameters

* Make createOverclockCalculator nonnull &amp; more nonnull annotations

* Fixed input processing voltage

* Round down voltage for other machines too

* Revert Nano Forge, return correct long voltage

* Use region / endregion

---------

Co-authored-by: miozune &lt;miozune@gmail.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>Enable input separation by default if it's supported (#2072)</title>
<updated>2023-06-10T17:19:54+00:00</updated>
<author>
<name>miozune</name>
<email>miozune@gmail.com</email>
</author>
<published>2023-06-10T17:19:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.nea.moe/github/GT5-Unofficial.git/commit/?id=8e3c8829d737d92da5503bd34d0c51130b6b3f00'/>
<id>8e3c8829d737d92da5503bd34d0c51130b6b3f00</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Code cleanup (#2040)</title>
<updated>2023-06-05T04:51:28+00:00</updated>
<author>
<name>chill</name>
<email>chill.gtnh@outlook.com</email>
</author>
<published>2023-06-05T04:51:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.nea.moe/github/GT5-Unofficial.git/commit/?id=db089891a20e5696096907864578e39586035e6e'/>
<id>db089891a20e5696096907864578e39586035e6e</id>
<content type='text'>
* 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 &amp;&amp; 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 &lt;p&gt; 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 &lt; 13

mConnectedMachineTextures can change, so tMeta range is not guaranteed

* remove aCoverVariable % 3 &lt; 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.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* 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 &amp;&amp; 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 &lt;p&gt; 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 &lt; 13

mConnectedMachineTextures can change, so tMeta range is not guaranteed

* remove aCoverVariable % 3 &lt; 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.</pre>
</div>
</content>
</entry>
<entry>
<title>Fix void protection not working with MB with custom output hatch field (#2051)</title>
<updated>2023-06-04T10:54:11+00:00</updated>
<author>
<name>miozune</name>
<email>miozune@gmail.com</email>
</author>
<published>2023-06-04T10:54:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.nea.moe/github/GT5-Unofficial.git/commit/?id=f046db94220c1b582175f858f07fd64e81e6e864'/>
<id>f046db94220c1b582175f858f07fd64e81e6e864</id>
<content type='text'>
* Fix void protection not working with MB with custom output hatch field

* forgot to filter

* Add util method for DT-like structure</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Fix void protection not working with MB with custom output hatch field

* forgot to filter

* Add util method for DT-like structure</pre>
</div>
</content>
</entry>
</feed>
