Commit graph

2946 commits

Author SHA1 Message Date
fscan
8ad8ce68b5 Added optional TE wrench support. (#3145) 2017-10-08 17:58:57 +02:00
yueh
644194d0d6 Updated Forge to 1.12.2 RB (#3141)
* 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.
2017-10-08 17:34:05 +02:00
yueh
95b27f490c Added Registry for customized charger rates. (#3139)
* 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
2017-10-08 17:33:06 +02:00
fscan
6032c0328e Fixes #3143: Queue network list updates in onTick (#3144) 2017-10-08 15:12:27 +02:00
fscan
e8d554d69d Fix Inscriber recipe registration (#3131)
Fixes #3129
2017-10-02 22:03:22 +02:00
fscan
1e15b23506 Rework AEItemStack (#3091)
* 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
2017-09-30 17:18:30 +02:00
yueh
2ed7a5598a Improved IGrinderRegistry (#3110)
* 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.
2017-09-29 20:32:59 +02:00
yueh
1c05dd5834 Further improvments for the energygrid. (#3107)
* 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.
2017-09-29 20:32:20 +02:00
Florian Scandella
632d124359 Fix ArithmeticException in PartP2PFEPower 2017-09-26 22:14:04 +02:00
yueh
829c18e2bb Make UVLLoader a bit more robust (#3102)
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.
2017-09-21 20:42:23 +02:00
yueh
d3a5be7ed6 Fixes #3105: Dupe bug due to forge default itemhandler implementation. (#3106) 2017-09-21 20:41:30 +02:00
Florian Scandella
217cbf0982 we dont use scala ... 2017-09-17 13:38:44 +02:00
fscan
4dd0a4cd96 Improve terminal search box (#3064)
Uses exsting JEI filter in JEI mode.
Preselects text for easy delete/change without using rightclick.
QoL improvements for focus handling.
2017-09-16 17:44:16 +02:00
Florian Scandella
54c0ce43ea fix fluid p2p voiding excess liquids 2017-09-14 18:38:29 +02:00
yueh
bd8f43acbf Updated to forge 1.12.1 RB. (#3087)
Updated related deps.
2017-09-12 13:23:17 +02:00
yueh
970630a90d Refactored the BaseActionSource (#3063)
* 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.
2017-09-12 11:39:00 +02:00
yueh
771a944058 Fixes #3081: Fixes blocking mode blocking on empty inventory. (#3082) 2017-09-11 12:03:32 +02:00
Florian Scandella
db1cd8c312 Cache the STORAGE_MONITORABLE_ACCESSOR Capability to reduce the amount of MENetworkCellArrayUpdates 2017-09-09 13:04:21 +02:00
fscan
375e1efb15 We don't need the showCraftingLabel flag, as IAEStack is perfectly fine with 0 size stacks. (#3071)
Adjust rendering code to use ItemStack with size 1 where required.
2017-09-09 12:58:22 +02:00
yueh
955fcac92a Correctly handle the grid power storage during onJoin/onSplit. 2017-09-03 13:40:30 +02:00
Florian Scandella
216e2cb1e3 Fix matter condenser input slot 2017-09-03 04:45:17 +02:00
Florian Scandella
53f5724657 Set stack size to 1 for rendering 2017-09-02 01:06:25 +02:00
Florian Scandella
a3269826f9 cleanup inventory change handling 2017-08-31 14:01:46 +02:00
Florian Scandella
1a918be658 only calculate difference when it's the same item 2017-08-29 22:52:59 +02:00
Florian Scandella
90130e72aa call saveChanges when inventory changes. 2017-08-29 22:52:06 +02:00
Florian Scandella
c8f10d92bb use index not slotNumber 2017-08-29 21:20:18 +02:00
fscan
548af3c6cc Use standard inheritance to propagage NBT events (#3058)
* Remove the old annotation system
* Use TileEntity#onLoad instead of onChunkLoad event
* Do not call invalidate in onChunkUnload and validate in onLoad
2017-08-28 09:34:09 +02:00
yueh
98b9380494 Fixes machines not extracting power from the local grid.
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.
2017-08-27 15:01:07 +02:00
fscan
bbf4d4a9ce Spatial rework (#3048)
* 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
2017-08-24 11:24:33 +02:00
yueh
1513ba3f6a Performance improvements for the energygrid (#3051)
* 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
2017-08-24 11:06:31 +02:00
yueh
f03f8ec432 Remove RF dependency 2017-08-22 11:07:00 +02:00
Florian Scandella
e1dcd588b7 add particle texture to charged quartz 2017-08-21 20:11:20 +02:00
fscan
8338a7d13e Fixes #3049: JEI recipe transfer can voiding items (#3053) 2017-08-21 14:39:29 +02:00
yueh
b8e685b1b6 Fixes #3040: Cache recipe and revalidate it (#3042)
* 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.
2017-08-20 21:31:30 +02:00
yueh
d84500c5b7 Fixes FE P2P tunnel drain issues
Only queue drain on modulate, also queue it for extracting from the
input side.
2017-08-20 14:35:31 +02:00
yueh
a1679c944b Added SCS size to the Spatial IO Port. (#3045)
Uses the same format as the cells display in their tooltip for easy comparison.
2017-08-20 13:14:27 +02:00
fscan
a3a39201d1 Missed vibration chamber when fixing the others. (#3050) 2017-08-19 21:31:16 +02:00
Emanuele Torre
d788da687e Update it_it.lang (#3041) 2017-08-18 10:31:15 +02:00
yueh
030e0c6a14 Updated gradle.properties for deploying to multiple minecraft versions 2017-08-18 00:47:31 +02:00
fscan
8e4265aa33 P2P Tunnel improvements (#3039)
* Fix P2P Tunnels randomly resetting to ME
* Allow one way push and pull. Outputs can pull from the input side, input can push into outputs.
2017-08-18 00:44:19 +02:00
Gunther De Wachter
80eaa032b9 Fixes #3011: placing the last part in off-hand clearing main hand as well 2017-08-17 22:19:50 +02:00
yueh
bee9c70497 Added 1.12.1 as accepted version. 2017-08-17 21:17:55 +02:00
yueh
c4fa21c193 Removes coremod (#3038)
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.
2017-08-17 21:16:57 +02:00
Gunther De Wachter
8a7450168b Updated JEI plugin to newer API methods. 2017-08-17 20:41:20 +02:00
Gunther De Wachter
7cb641cdc8 Fix shift clicking memory card still triggering off-hand item/block usage. 2017-08-17 20:41:20 +02:00
Gunther De Wachter
b5b8050c4c Added workaround for sorting items on amount with fake amount when showing crafting label 2017-08-17 20:41:20 +02:00
Gunther De Wachter
e65083b045 Fixed dropping items on the ground when clicking on a crafting label with items in hand 2017-08-17 20:41:20 +02:00
yueh
b61219ef88 Covered dense cables (#3030)
* 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.
2017-08-17 18:41:39 +02:00
yueh
4f9fd1b369 IC2 rework to avoid a coremod or @Optional (#3034)
* 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
2017-08-17 17:35:34 +02:00
yueh
630fae3f73 Fixes #3024: Crash on recipe lookup for disabled features (#3026)
* 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.
2017-08-17 17:17:26 +02:00