* Don't use global iteration # in NetworkInventoryHandler
Add a helper class IterationCounter for getting non-conflicting
iteration ids
* Align to upstream master
---------
Co-authored-by: Martin Robertz <[email protected]>
* Lazily fill out the ItemList for network delta updates
* Implement a new api for looking up a single stored item to optimize network monitor updates
* Update buildscript
* Add Nonnull annotation to the argument
* Enable Jabel and generic injection
* Use RoundingMode enum values
* Use enhanced for loops
* Use diamond operator where appropriate
* Deprecate ChainedIterator
* spotless
* Collapse identical catch blocks
* Use try with resources
* Use List.sort where possible
* Anonymous type->lambda
* Loop -> removeIf
* Simplifiable map operations
* Use enhanced instanceof
* Use enhanced switch
* Use bulk operations
* Use zero-sized arrays in toArray
* Add early exits
* Remove redundant addAll
* Fix missing reflection generic types
* More missed language migration aids
* Redundant type arguments
* Redundant type casts
* Fix compilation errors
* Use Arrays.fill
* Fix some missing generic types
* Fix potential missed updates in the level emitter.
This makes the emitter tickable, but sleeping most of the time so the performance impact should be minimal.
If an update is ignored due to the configured delay, ticking is scheduled to make sure that the update happens if no further network updates happen until the next delay period.
* Attempt #2: Delay the first tick of the level emitter on load
* Revert "NetworkMonitor optimization - do not rebuild cache more than once per tick"
This reverts commit 09b253109c.
* spaces->tabs to match existing code
This is loosely based on #2032 and should prevent any duplicated event,
but still does a refresh the whole cache due to potentially issues with
some inventories.
It also ensures that storage buses will not announce a CellArrayUpdate
before they are fully initialized, thus no longer causing them to return
null during an update.
Fixes#2403
No longer invalidates and refresh it with every single change.
This should now also ensure that updates are send exactly once per network
instead of multiple times scaling up with the amount of chained networks.
Reduces the visibility of all fields to private and create setters/getters
when necessary. Exceptions are fields with GuiSync as these need to be
public.
Reduces the visibility of internal methods to private/protected/default when possible.
Many exceptions got an improvement due to changed class or description or details it is providing.
Is not complete, needs to be done in patches in the regions, where it is needed, since some are just
swallowed.
Removed total usage of pure RuntimeExceptions to 0.