Removes the split collection as in some rare corner cases the insertion
order is important to maintain the correct data in terms of self cleaning.
Keeps the general cleanups and split of Fluid/ItemList.
Fixes#1964
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.
Cells are only ever using precise for storing their items, thus there is
no need for a sorted collection with in general logarithmic time.
Storing them inside a HashMap for constant time is a way better solution.
Also adds an UnsortedItemList without fuzzy handling.
If anyone tries to use it, it will currently throw an
UnsupportedOperationException, Should the need arise guava Collections2
could provide a filter for it, but it is no alternative with heavy usage
of fuzzy access.
Also some code cleanup, reducing the visibility when not needed as
protected/default as well as removing actually unused methods.
Splitted the ItemList and MeaningfulIterator into an item and fluid
version.
Added an IdentityHashMap as additional item layer to the ItemList for a
faster access.
Refactored FluidList, findFuzzy will now return the same fluid instead of
an empty collection.
Every Block had a call to its super, passing its own class.
This can easily be simulated by calling `this.getClass()` in the super class.
Also this was basically only used as using a name.
In the future it might be advisable to not use such methods,
since they are prone to refactoring.
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.
Deprecates the old usage of the AEItemDefinitions via the direct method access of
* blocks()
* parts()
* items()
* materials()
and thus use the new re-direct via definitions().
All definitions are now initialized, no matter what. But SubItems, Items and Blocks are not registered, if by chance are disabled.
Replaced String concat in loops with StringBuilder (performance)
Replaced for with keySet + Map.get() through for with entrySet (perf)
Changed inner classes to static classes, mostly struct like (memory)