Updated Drives to support more than Item and Fluid cells.
Use Collections.emptyList() instead of creating empty ArrayLists.
Fixes a NPE with uninitialized ME Chests.
Fixes#3150
* Updated Forge to 1.12.2 RB
Updated mappings to the MDK defaults for 1.12.2
Updated related depdencies
* With Forge 14.23 not available for < 1.12.2, we have to drop support.
With one potential fix for TE corruption, this step should be
reasonable.
* Added Registry for customized charger rates.
* Added rates for all chargable items/block.
* Charger and Inscriber now store 1.6k AE each instead of 1.5k
* A crank applies 160 AE instead of 150
* Charged certus now requires 1.6k instead of 1.5k
* Use itemstack as itemdef
* HIGH_TAG/LOW_TAG should be compared both directions
* Remove getTagCompound
* Make Itemlist implementation independent
* Cache item id for performance reasons
* Add preconditions to saveguard against external meddling
* Chache itemDamage
* Remove IAEStackSearchKey for now, rename getDisplayStack
* Improved IGrinderRegistry
Added a builder for grinder recipes similar to IInscriberRegistry.
Replaced different add methods with this builder.
IIinscriberRegistry#addRecipe and removeRecipe now return true on success.
* Further improvments for the enerygrid.
Simplified quartz fiber.
Removed different Actionable code paths and replaced with a unified
approach.
Dropped lastProvider/Requester, it simply iterates over all, but still
drops them when necessary.
Catch all parsing exceptions instead of propagating them upwards as
these are meaningless for the actual test.
Renamed uvlMarker to ae2_uvl_marker just in case some other mod uses the
same key.
* Refactored the BaseActionSource
It now uses an interface `IActionSource` instead of a concrete class and further
subclasses.
Instead of relying on a specific class for a certain action type, it now
uses methods with Optional as return values to determine a player or
machine issuing an action. Refer to the JavaDocs for the exact behaviour.
* `IActionHost` no longer extends `IGridHost`
It never used the additional functionality and if needed the `IGridNode`
will also provide a reference to the corresponding `IGridHost`.
Due to most crafting related GUIs being hardcoded to `IGridHost`,
they no longer work when `IActionHost` is not extending it. Actually
`IActionHost` is the better solution for it, as it prevents us from looking
the grid up via the `IGridHost` and potentially finding a wrong grid.
* Interfaces now only lock the currently worked slot.
This allows `DualityInterface#onChangeInventory` to update slots of the same interface, should they be the source for a requested item and therefore updating their working set accordingly to queue further crafting requests for unfulfilled stack requirements.
* Remove the old annotation system
* Use TileEntity#onLoad instead of onChunkLoad event
* Do not call invalidate in onChunkUnload and validate in onLoad
There is currently no difference between an external grid and the local
machines trying to extract power from the grid. Thus preventing any
external grid from stealing power also does prevent machines from
extracting, if there is no other provider available.
Also a small change to use a priorityqueue with the lowest percentage
stored first. This can better utilize the upper limit by reaching it
faster and exiting earlier.
* Moved all spatial cells into a single dimension instead of one dimension per cell
Each cell will now be backed by a single region file each. So backups and restores can still be done on a per cell level.
Old cells will not be migrated.
* Moved custom cell tracking to a capability based one on the world
The size and owner of a cell is now stored inside the capabilities of the world/dimension not a custom system and we can rely on forge handling the persistence of it.
* Added the cell id to the actual item tooltip, as this is now a real identifier and not an arbitrary dimension id.
* Added vanilla banners to the whitelist
* Added unittests to the dimension manager to ensure the algorithm mapping to the correct region file
* Updated the API to conform with the new dimenion/types/biomes registration and mappings
* Fixed a couple of bugs related to world/dimension/biome registration
* Fixed a bug when transfering certain blocks due to passing missing/incorrect blockstate
* Performance improvements for the energygrid
Reworked the old recursive approach to a queue based loop.
Extract will try to prefer the next grid with the hightest amount of
stored energy.
Inject will try to prefer the grid with the lowest percentage stored.
Other operations are first come, first serve.
* Added a local buffer storage to EnergyGrid
This replaces the old not really working buffer with a special
IAEPowerStorage acting as buffer/proxy for the local energy demand as
well as temporary overflow should something provide more energy than
requested.
Currently it set to hold a maximum of 200 AE (+ optional overflow until
consumed). It will only be used locally, no other grid can use it to
avoid starving the neighbor grids before finding a energy cell.
* Fixes IExternalPowerSink
All implementations currently depend on the network demand being a valid
source, which might not be true.
Further it can cause the sink to iterate the network twice (demand and
inject) and both again for simulate and modulate.
Also it did not return the actual leftover amount instead of relying on
the demand matching it.
* Minor fixes related to removing nodes from a grid.
The grid did remove IStackWatcherHost not IEnergyWatcherHost, this was
fine for AE2 as only level emitters use it and they implement both.
But not for potential addons.
Also they would potentually not being removed as the are indexed by the
gridnodes not the machine.
Fixes#1004
* Fixes#3040: Cache recipe and revalidate it
This caches the last used recipe instead of only the result. Which
allows to revalidate the crafting grid against the recipe itself before
hitting the CraftingManager again. Therefore avoiding a high performance
hit for recipe lookups, just find the potential same recipe again.
* Remove old recipe lookup as forge provides it now.
* Further optimizations.
These are a bit quick'n'dirty and need a better solution with a full
container/gui refactoring. But for now they provide some great benefits
in terms of performance.
From now on every integration must not rely on method stripping through
a coremod or @Optional. Notable example for a very good solution is IC2.
As consequence this drops all support for RF and mods must support on of
our supported energy types. At the time of writing, ForgeEnergy and
IC2/EU.
* Renamed all dense smart cable related things to include smart
* Added dense covered cables
* Added abstract PartDenseCable to reduce redundant code
* Added dense covered recipes
* Ensures ItemPart ordering to be consitent.
Now takes the metadata into account to preserve the ordering for colored
items instead of just the part type name and depend on the insertion
order of a hashmap.
* IC2 rework to avoid a coremod or @Optional
Updated IC2 dependency
Refactored IC2 itemcharging to use an IBackupElectricManager.
Allows charging any ae powered item by using an IBackupElectricManager
instead of having to implement IElectricItem and stripping it by some
sort.
Updated IAEItemPowerStorage to use Actionable for an easier handling
with power APIs supporting a simulation.
Refactored EU P2P to avoid method stripping
Use a modified internal BasicSinkSource instead of implementing
IEnergySource and IEnergySink directly on the tunnel.
Removed the superfluous EU P2P layers.
* Removed internalBattery due to being too complex
* Creative Energy Cell is not a chargeable item
* Fixes#3024: Crash on recipe lookup for disabled features
Adds a new recipe condition for a single AEFeature or a list of them.
Moved the factories to their own package, in preparation of phasing out
the old recipe handling.