Commit graph

95 commits

Author SHA1 Message Date
yueh 58e96aa3de Fixes new modes not being considered JEI modes. 2017-10-14 14:39:05 +02:00
yueh 6e81f698c0 Refactored StorageChannel enum into an interface (#3138)
This replaces the static enum with a more dynamic interface providing
factory methods for handling network storage.
2017-10-08 17:59:30 +02:00
fscan 8ad8ce68b5 Added optional TE wrench support. (#3145) 2017-10-08 17:58:57 +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 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 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 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
fscan b13a338948 Fix/Remove storage/import/export bus IItemHandler caching (#2987)
* Fix storage/import/export bus IItemHandler caching
2017-07-31 15:51:01 +02:00
yueh bcc4a732ed Started P2P rework (#2966)
* First iteration of P2P rework

Changed frequency to short instead of long.
Added a per grid RNG to request a new frequency, hopefully without many collisons.
Added a helper to convert between a frequency and 4 colours
2017-07-28 22:06:19 +02:00
fscan 52d28fabe3 Use IItemHandler instead of IInventory internally (#2971)
* Use IItemHandler instead of IInventory internally
2017-07-28 22:04:32 +02:00
yueh 406013142e Superfluous whitespace removal 2017-07-20 21:23:01 +02:00
yueh 7de90ed0ae Finally use Java7 <> 2017-07-20 21:21:45 +02:00
yueh 8ec8babb6a Organised imports 2017-07-20 21:18:49 +02:00
yueh 621910df91 Format sourcecode 2017-07-20 21:17:10 +02:00
Gunther De Wachter fbcf8c4705 Highly incomplete code. First work on porting to 1.12. Still need to rework a LOT of things. 2017-07-06 01:57:19 +02:00
Gunther De Wachter 890eef1803 Update MCP Mappings to stable_32
Some mapping updates are just straight up weird. 20170516 -> isBlockSolid, 20170517 -> causesDownwardCurrent
2017-07-03 06:54:45 +02:00
Gunther De Wachter 49a6df5bc7 Fixed up the Tile Entity mess a bit, still need to look at the CableBus stuff a bit though. 2017-06-30 17:22:06 +02:00
Gunther De Wachter 61b81fc802 Fix facade recipes. Hopefully the last null check fix. 2017-06-27 20:39:06 +02:00
Gunther De Wachter da5879b667 First batch of null -> isEmpty() checks.
I most likely still missed a ton of checks...
2017-06-26 05:15:25 +02:00
Gunther De Wachter c6bdf845a8 Add a temporary (?) method to register the TileEntities because the Forge method changed from 1.10 to 1.11.2. 2017-06-03 00:53:32 +02:00
yueh 1cde7bc933 Changed to Null ItemStack instead of null. 2016-12-21 20:38:37 +01:00
yueh ed9e6dd21c Port to 1.11 2016-12-21 20:38:36 +01:00
yueh a14cf2204d Fixes anchor rendering (#2698)
* Fixes #2680: Use a shorter cable anchor model when blocked by a facade.
* Fixes #2664: Prevent anchors from creating intersection.

Replaced the simple List<ResourceLocation> for the static models with a
new container also indicating a solid part, which can be used to prevent
the creation of an intersection.
2016-12-14 22:37:10 +01:00
yueh 887339f7b8 Removed ASMTweaker and replaced it with AT. (#2636)
Added appeng_at.cfg and updated build.gradle to correctly include the AT when building.
Deleted the now useless ASMTweaker.
Moved the coremod from package transformer to coremod as a better matching name.
Updated the old 1.7.10 code using reflection to drop it where forge or vanilla now exposes that functionality directly.
2016-11-26 14:08:10 +01:00
yueh a665200c31 Refactored AEConfig (#2633)
Added a singleton getter instead the public field.
Reduced all fields to private.
Replaced field access with getters.
Added setters where necessary (Dimension/Biome Registration)
Added config options to disable more features.
Splitted Enum name from the config key.
Changed FacadeConfig and Networkhandler similar to AEConfig.init().
2016-11-26 14:07:34 +01:00
shartte 0e7981d717 Cleaning Up Mod Integrations (#2581)
* Cleaned up unused Mod integrations other than for mods that are likely to be integrated soon.
* Introduced an easier Facade class to access mod integration abstractions (called Integrations).
* Removed the link between IntegrationType and integration abstraction. Integrations are now explicitly instantiated inside of IntegrationNode.
2016-11-06 20:23:14 +01:00
Sebastian Hartte 7f02562e0c Fixes sidedness issues when starting up the server. 2016-11-04 21:02:10 +01:00
yueh 1e20086799 Extracts item comparison from Platform into their own helper. (#2555)
* Extracts item comparison from Platform into their own helper.

Renamed methods to be more more fitting for the actual comparison.
Added documentation about each methods behaviour.
2016-11-04 09:27:52 +01:00
yueh a3c33d5323 Fixed typo in prioritylist. 2016-11-01 16:15:05 +01:00
shartte b977ee89ee Remove External Storage Handler (#2417) (#2508)
* Implemented an adapter for IItemHandler so it can be used by the Storage Bus.
* Added update hook for inject/extract to ItemHandlerAdapter.
* Implemented ItemHandler and FluidHandler capabilities for the condenser, as replacement for the Void Inventories.
* Removed external storage handler, added capability-based way of accessing a monitorable ME network via the storage bus. Removed special case inventories for the matter condenser.
* Implemented InventoryAdaptor for IItemHandler. This also now fixes molecular assemblers interaction with part interfaces.
2016-10-26 22:58:23 +02:00
Sebastian Hartte a72c97e666 #2438: Implemented forge energy capabilities. Removed other disabled energy units for the time being. 2016-10-19 20:57:59 +02:00
Sebastian Hartte 6369cef465 Fixes #2446: Allow Platform.pickRandom to work with empty lists. 2016-10-09 12:01:31 +02:00
Sebastian Hartte 8df692053a Added JEI integration (#2436). 2016-10-08 13:06:21 +02:00
Sebastian Hartte 2de1842445 Implemented facade rendering on the cable bus. 2016-09-29 21:47:50 +02:00
yueh f185bc07a6 Capitalised enums to match conventions 2016-09-17 15:06:00 +02:00
elix-x b7b5d2590c Code updated to 1.10
Code updated to 1.10. NOT 1.9.4 COMPATIBLE!!!
2016-06-25 11:00:17 +02:00
elix-x 05aa6972c4 Second update pass (2/3) - 82 -> 0 errors
Second update pass which fixes all compile errors. Some parts may have
aftermath effect, hence why 3rd pass will check those maked with
"aftermath".
Errors: 82 -> 0. Mod can be launched.
2016-06-21 11:03:10 +02:00
elix-x 5498eb6d7c First update pass (1/3) - ~1400 -> 82 errors
This is first update pass, which is mainly import reorganization, name
fixes, etc... Although some parts of second were done where changes
aren't important.
Errors: ~1400 -> 82.
2016-06-19 14:43:27 +02:00
yueh 02ac8cf220 Refactored the logging
Using LogManager instead of FMLRelaunchLog to access the logger instance.
Added logging of the name of failed exports instead of exception.
Improved crafting log to include issuer including their location and the
requested item.
Removed superfluous FMLRelaunchLog instance.
Removed superfluous parameters for PlayerData constructor.
2016-01-01 02:55:36 +01:00
yueh 99215e1701 Organized imports 2015-12-24 02:07:03 +01:00
yueh c9e8a6e939 Formatted code 2015-12-24 02:03:16 +01:00
yueh e94a0cfccf Reduces visibility of internal fields/methods
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.
2015-12-24 01:59:13 +01:00
thatsIch 8b3a954f73 final variables and parameters 2015-09-30 14:24:44 +02:00
thatsIch 059523f543 Reduce scope of variables 2015-09-30 14:22:21 +02:00
thatsIch 430b33b7a3 Replace with array initializer
this can be done through http://docs.oracle.com/javase/specs/jls/se6/html/arrays.html#10.6
2015-09-30 14:15:53 +02:00
yueh 621952e37d Closes #1283: Add custom Callable to prevent memory leaks 2015-09-30 13:37:35 +02:00
thatsIch 59dbfb1452 Fixed stairs 2015-09-30 11:34:16 +02:00
AlgorithmX2 38afde724b Most of the 1.8 Port. 2015-06-15 19:44:59 -05:00
yueh ecf2f3fdaf Merge pull request #1478 from yueh/fix-1465
Fixes #1465 faulty item comparison
2015-05-19 00:53:53 +02:00
yueh 7fa7502770 Fixes #1465 faulty item comparison 2015-05-18 19:31:18 +02:00