Compare commits

..

213 Commits

Author SHA1 Message Date
yueh ac45095cb4 Merge pull request #2100 from yueh/fix-2099
Fixes #2099: No neighbor update of Pressure P2P before IAirHandler is validated.
2016-01-13 14:57:59 +01:00
yueh 68d3025fac Fixes #2099: No neighbor update of Pressure P2P before IAirHandler is validated. 2016-01-10 21:01:02 +01:00
yueh a62e157e7c Merge pull request #2091 from Adaptivity/master
Ore Dictionary support for recipes
2016-01-08 21:00:34 +01:00
yueh 106b823827 Merge pull request #2088 from fnuecke/master
Reworked computer P2P tunnel for #2087
2016-01-08 20:48:27 +01:00
yueh 8406c00e22 Merge pull request #2092 from GWYOG/master_patch_1
Update zh_CN.lang, fix #2090
2016-01-08 20:36:29 +01:00
JJN 22f05428be fixed #2090
fixed #2090
2016-01-07 09:29:49 +08:00
Adaptivity bd0bf26f30 Ore Dictionary support for recipes
Added missing changes to oredict.recipe
2016-01-06 20:29:33 +03:00
Florian Nücke 2ea05bce5f Reworked computer P2P tunnel to use events, and cleaned up reconnection, fixes #2087.
Just `onTunnelNetworkChange` with tickable is apparently less exhaustive, and less stable. This now avoids issues with network splits and reconnects not being handled in some cases. Also simplified reconnection; there was some duplicate logic in there, with a missing validity check which potentially led to invalid connections.
2016-01-05 19:05:25 +01:00
yueh f47fd1957a Merge pull request #2075 from yueh/fix-2043
Fixes #2043: Storage buses updates should happen in the correct order.
2016-01-05 13:53:01 +01:00
yueh a890e57e44 Merge pull request #2085 from yueh/fix-wrong-api-version
Changed outdated API version to rv3
2016-01-04 08:09:58 +01:00
thatsIch 6e61627d7c Merge pull request #2006 from Mazdallier/patch-1
Update fr_FR.lang
2016-01-03 14:42:59 +01:00
thatsIch 580a17987b Merge pull request #2079 from Honon/patch-1
Japanese translation files
2016-01-03 14:42:07 +01:00
yueh bfe2e6ecb3 API version will be replaced during build with the correct rv. 2016-01-03 14:28:37 +01:00
yueh 38e7e579fa Fixes #2043: Storage buses updates should happen in the correct order.
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
2016-01-03 13:23:51 +01:00
Tier 6aa91c3f65 Japanese translation files
Hello!!
As we have created a Japanese translation files , and you sure you want to got to add when it is good?
2015-12-29 17:46:20 +09:00
yueh 17bdd085b1 Merge pull request #2010 from yueh/feature-logger-refactoring
Refactored the logging
2015-12-27 12:53:01 +01:00
yueh 684cda58c2 Merge pull request #2074 from yueh/backport-1.8-cleanup
Backport some 1.8 cleanups
2015-12-27 12:50:11 +01:00
yueh 740324913e Merge pull request #2073 from yueh/fix-1905-followup
Interfaces now slow down with failed crafting attempts.
2015-12-27 12:50:01 +01:00
yueh dae5e888e9 Merge pull request #2059 from wlhlm/update-german-translation
Update and extend German translation
2015-12-27 12:49:49 +01:00
yueh a3abc7a1f0 Backport some 1.8 cleanups 2015-12-27 12:33:50 +01:00
yueh dd1ae4a9b5 Interfaces now slow down with failed crafting attempts.
Cleanup of unneeded tracking of failed attempts of MultiCraftingTracker.
Followup of #1905
2015-12-27 00:00:12 +01:00
yueh c9ef1beea1 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.

Closes #2009
Refs #2069
2015-12-26 23:14:29 +01:00
Wilhelm Schuster 276480519e Update and extend German translation
Add translated achievements.
2015-12-20 14:23:42 +01:00
yueh 04b1ca3485 Merge pull request #2050 from XFRGod/patch-7
Update hu_HU.lang
2015-12-11 22:39:14 +01:00
yueh c14f688100 Merge pull request #1997 from thatsIch/b-1995-versionchecker-config
Fixes #1995: Allows creation of version checker config file after start up
2015-12-11 22:38:54 +01:00
yueh 8bf98919e2 Merge pull request #2053 from AppliedEnergistics/revert-2032-feature-cached-networkmonitor
Revert "Changed NetworkMonitor to update its cache."
2015-12-11 22:31:46 +01:00
yueh 1862ab3562 Revert "Changed NetworkMonitor to update its cache." 2015-12-11 22:26:21 +01:00
XFRGod df6070ecbd Update hu_HU.lang
This is a language "correction"(?) and typo fixing update for the lang file and now it's 110% localized:D
2015-12-11 16:04:16 +01:00
yueh 12cf76a62f Merge pull request #1880 from yueh/feature-rendering-cleanup
Rendering cleanup
2015-12-10 16:36:01 +01:00
yueh 919faefb15 Merge pull request #2032 from yueh/feature-cached-networkmonitor
Changed NetworkMonitor to update its cache.
2015-12-10 16:34:24 +01:00
yueh 71a9687b01 Merge pull request #2045 from yueh/fix-2044
Fixes #2044: No longer uses internal exceptions
2015-12-10 16:33:25 +01:00
yueh e877eac7bb Fixes #2044: No longer uses internal exceptions
Added 3 new exception as subclass to FailedConnection to allow a more
precise handling and/or logging.
2015-12-10 16:24:40 +01:00
yueh 0696662254 Changed NetworkMonitor to update its cache.
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.
2015-12-10 16:11:30 +01:00
yueh 1aa84945eb Merge pull request #2037 from XFRGod/patch-5
Update hu_HU.lang
2015-12-07 20:40:53 +01:00
XFRGod 88f9c8ba40 Update hu_HU.lang
Okay now it's absolutely 100% done and I'm officially dead.
Onto EnderIO and Botania then!
2015-12-06 21:36:53 +01:00
yueh 0ed1054aad Merge pull request #2035 from XFRGod/patch-3
Update hu_HU.lang
2015-12-06 16:55:53 +01:00
XFRGod 11f92f6888 Update hu_HU.lang 2015-12-06 16:49:45 +01:00
yueh b0d3a6c743 Merge pull request #2022 from yueh/feature-revert-itemlist-changes
Reverts some of the changes to ItemList.
2015-12-06 14:36:45 +01:00
yueh b252d1f269 Merge pull request #2028 from yueh/fix-2027
Fixes 2027: TinyTNT not triggered by flint&steel.
2015-12-06 14:36:09 +01:00
yueh d4692128a5 Merge pull request #2031 from yueh/e-gridconnection-better-logging
Exception during GridConnection now reports the machine and side.
2015-12-06 14:35:54 +01:00
yueh 599e6f3e64 Exception during GridConnection now reports the machine and side. 2015-11-30 12:55:47 +01:00
yueh 478d400627 Fixes 2027: TinyTNT not triggered by flint&steel. 2015-11-29 18:21:05 +01:00
yueh fbfd13d163 Reverts some of the changes to ItemList.
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
2015-11-28 11:12:31 +01:00
Mazdallier 5bb0ac7833 Update fr_FR.lang
thanks Pyeroh
2015-11-17 10:27:12 +01:00
yueh 8b4a39085e Fixes #1998: Using the correct culling mode and rotation
Blocks are now rendered with the correct culling mode and rotated similar
to the icon itself, but slightly shifted to the left that the front
texture appears larger (This applies to items following the normal
minecraft rotation like furnaces)

Items are also now rotated a bit differently and more in line with their
item rendering as well as longer being mirror inverted.
2015-11-16 11:31:02 +01:00
yueh d5dfc31210 Rendering cleanup
Replaces the reflexive instantiation of the Renderes with a factory
method.

Some optimizations to the renderers to no longer push the whole OpenGL state to the stack.

General cleanup of duplicate code, etc
2015-11-16 10:52:20 +01:00
yueh 824ec1eccb Merge pull request #1986 from yueh/fix-1983
Fixes #1983: WorldData cleared too early when still needed.
2015-11-16 10:51:05 +01:00
yueh 87eb5498f9 Merge pull request #1996 from thatsIch/b-1970-inscriber-lighting
Fixes #1970: Lighting was not re-enabled when looking at an inscriber
2015-11-16 10:50:56 +01:00
Mazdallier 55c0e6aa56 Update fr_FR.lang 2015-11-16 09:47:36 +01:00
thatsIch 8c62e1e7a6 Fixes #1995: Allows creation of version checker config file after start up 2015-11-11 21:39:29 +01:00
thatsIch 97c099c2ae Fixes #1970: Lighting was not re-enabled when looking at an inscriber 2015-11-11 21:36:53 +01:00
yueh 3c19350b9b Fixes #1983: WorldData cleared too early when still needed. 2015-11-02 12:13:09 +01:00
yueh c83946420e Merge pull request #1936 from yueh/feature-hide-fields
Make all fields private and creates necessary getters/setters
2015-10-30 19:02:00 +01:00
yueh 500fc47490 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-10-30 18:52:20 +01:00
thatsIch cb44af5e49 Merge pull request #1974 from thatsIch/b-1973-ignored-required-work
Fixes #1973: 9th slot of ME Interface ignored work
2015-10-29 09:24:43 +01:00
thatsIch c1b966eea1 Fixes #1973: 9th slot of ME Interface ignored work 2015-10-28 11:19:05 +01:00
yueh 8f1d22b863 Merge pull request #1934 from yueh/fix-1932
Fixes #1932: Better VersionChecker exception handling
2015-10-21 14:06:54 +02:00
yueh 15bcf6fbd1 Merge pull request #1957 from bakaxyf/master
Update zh_CN.lang
2015-10-17 19:21:25 +02:00
bakaxyf 1ea48fb389 Update zh_CN.lang
1728f683c3 d893e52eb0 24224a450b
2015-10-18 00:37:39 +08:00
yueh 47592bcbcb Fixes #1932: Better VersionChecker exception handling
ModVersionFetcher will now return a MissingVersion in case of an exception
instead of letting it propagate upwards.

Also added a generic try/catch to the VersionChecker itself, just in case
any unchecked exception might be triggered inside the thread and at least
not logged correctly.
2015-10-12 14:07:36 +02:00
yueh 56435199b7 Merge pull request #1891 from yueh/feature-1156
Added an option to toggle oredict substitutions for patterns.
2015-10-10 22:28:40 +02:00
yueh d615fa2dcd Merge pull request #1940 from yueh/fix-1938
Fixes #1938: UnsortedList not respecting meaningful entries.
2015-10-10 18:31:21 +02:00
yueh 614da977f9 Fixes #1938: UnsortedList not respecting meaningful entries. 2015-10-09 12:27:00 +02:00
yueh 24224a450b Added an option to toggle oredict subsitutions for patterns.
It adds a backward compatibility to convert current patterns to use
oredict by default, which should be removed with rv4 stable.

Closes #1156
2015-10-06 11:33:27 +02:00
thatsIch c14bc82a01 Merge pull request #1900 from thatsIch/export-names-to-csv
Closes #1899, Fixed #1898: Adds an easy way to export item names
2015-10-06 09:00:53 +02:00
yueh 64e4dc08d9 Merge pull request #1908 from yueh/feature-1906
Closes #1906: Using a constant time collection for cells
2015-10-05 20:38:50 +02:00
yueh 2e00a483a0 Closes #1906: Using a constant time collection for cells
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.
2015-10-03 15:22:12 +02:00
thatsIch d52efa8f78 Merge pull request #1919 from thatsIch/e-javadoc-issues
Javadoc issues
2015-09-27 14:07:28 +02:00
thatsIch 55e373bb31 Javadoc issues 2015-09-27 11:20:01 +02:00
thatsIch db76915b7e sort modifier 2015-09-27 00:00:50 +02:00
thatsIch d5b352abda Add this qualifier 2015-09-27 00:00:34 +02:00
thatsIch 90af295750 Constant array init 2015-09-27 00:00:11 +02:00
thatsIch b004e6eb27 Javastyle array 2015-09-26 23:59:47 +02:00
thatsIch 37ae2131fe Closes #1899, Fixed #1898: Adds an easy way to export interesting information into CSV format
Mostly used for the recipe system, but can also be used for debugging purposes. Debug options needs to be ticked to use the full information gain. Recipes only require the normal localization and the specific name plus metadata.

Shifted the recipes into a recipes folder where the CSV will also reside. This will also elevate the copying of the readme to the user directory since it can reside in the recipes folder.

Fixed a bug where the copier would copy the would also copy empty folders
2015-09-26 23:15:25 +02:00
thatsIch b560382e80 Merge pull request #1913 from thatsIch/e-final-stuff
final variables and parameters
2015-09-26 23:06:46 +02:00
thatsIch 410d2f1e0d final variables and parameters
seeing some methods it does actually help to enforce the parameters
2015-09-26 21:08:18 +02:00
thatsIch e52400bf26 Merge pull request #1911 from thatsIch/e-scope-too-broad
Reduce scope of variables
2015-09-26 20:23:57 +02:00
thatsIch 0387d30d1c Reduce scope of variables 2015-09-26 20:07:51 +02:00
yueh f4ff28d2a6 Merge pull request #1877 from yueh/feature-itemlist-refactoring
ItemList refactoring
2015-09-26 19:51:47 +02:00
yueh 1bec11f616 ItemList refactoring
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.
2015-09-26 19:00:59 +02:00
yueh 9b685d5b73 Merge pull request #1915 from thatsIch/e-remove-base-module
Remove base module
2015-09-26 11:57:04 +02:00
yueh 4b984452ad Merge pull request #1914 from thatsIch/e-prefer-is-empty
prefer isEmpty over length() == 0
2015-09-26 11:56:50 +02:00
yueh b3e33b1c3b Merge pull request #1912 from thatsIch/e-replace-with-array-initializer
Replace with array initializer
2015-09-26 11:56:44 +02:00
yueh 572c2bb403 Merge pull request #1910 from thatsIch/e-redundant-type-casts
Remove redundant type casts
2015-09-26 11:56:28 +02:00
yueh 645c2b0e1c Merge pull request #1907 from yueh/fix-1905
Fixes #1905: Export bus now considers failed crafting requests
2015-09-26 11:40:38 +02:00
thatsIch 6952a2f958 Remove base module 2015-09-25 23:28:57 +02:00
thatsIch dbf84428a5 Remove unnecessary semicolon 2015-09-25 23:19:34 +02:00
thatsIch 734d50d086 prefer isEmpty over length() == 0 2015-09-25 23:18:27 +02:00
thatsIch 4b3d7c7d03 Replace with array initializer
this can be done through http://docs.oracle.com/javase/specs/jls/se6/html/arrays.html#10.6
2015-09-25 23:04:36 +02:00
thatsIch 7a220e253d Remove unused imports 2015-09-25 22:33:03 +02:00
thatsIch 80e1a2863b Remove redundant type casts 2015-09-25 22:30:38 +02:00
yueh 92331b4d2e Fixes #1905: Export bus now considers failed crafting requests
The export bus will now no longer speed up, if more than 1 of the last
crafting requests failed and slow down, if more then 5 failed.

Some code cleanup and moved the custom iterator into the helper package
as it is clearly related to the craftingtracker and not the export bus.
2015-09-25 19:58:07 +02:00
yueh bcba2329b7 Merge pull request #1902 from yueh/fix-1896
Fixes 1896: Only update a monitor if the text would change
2015-09-23 23:46:43 +02:00
yueh 597e17b52b Fixes 1896: Only update a monitor if the text would change 2015-09-23 22:28:50 +02:00
yueh 4b055a7f21 Merge pull request #1894 from yueh/update-readme
Updated README.md and CONTRIBIBUTING.md
2015-09-23 15:28:23 +02:00
yueh 759b6daa59 Merge pull request #1893 from yueh/fix-1892
Fixes incorrect handling of prioritized inventories
2015-09-23 15:28:13 +02:00
yueh e1f03db7b3 Updated README.md and CONTRIBIBUTING.md 2015-09-23 14:27:11 +02:00
yueh 72518ad977 Merge pull request #1772 from yueh/feature-1569
Feature 1569 Typesafe Integration Modules
2015-09-23 00:20:00 +02:00
yueh 21fa2718f8 Merge pull request #1879 from yueh/fix-1878
Fixes #1878: Now saves the dimensionlist correctly
2015-09-23 00:15:36 +02:00
yueh 777bec184a Fixes 1878: Now saves worlddata more reliable. 2015-09-23 00:12:53 +02:00
yueh b9d615c4ba Fixes incorrect handling of prioritized inventories
Prioritized inventories are not longer used twice for storing leftover
items and thus finally reporting twice the amount of storable items when
they are the only possible option to store something.

Also fixes import buses now respecting the amount of storable items inside
the network instead of trying to place the exported items back and failing
on any restricted inventory, potentially voiding the overflow.

Fixes #1892
2015-09-23 00:09:27 +02:00
yueh 40d339e173 Merge pull request #1888 from asd0210a/patch-3
zh_tw.lang Updated
2015-09-22 19:39:56 +02:00
asd0210a 20c1c4529a zh_tw.lang Updated 2015-09-21 10:15:20 +08:00
yueh 72399e5789 Merge pull request #1866 from yueh/fix-1865
Fixes #1865: Spawn overflow items into the world
2015-09-16 20:41:57 +02:00
yueh f303c17ae0 First iteration of making integrations typesafe 2015-09-16 15:59:33 +02:00
yueh 26f13d4109 Fixes #1865: Spawn overflow items into the world 2015-09-11 20:05:17 +02:00
yueh 0df445c6a8 Merge pull request #1862 from yueh/feature-interface-9-slots
Changed the interface to 9 slots to be consistent with every other machine
2015-09-11 20:04:29 +02:00
thatsIch 8c817b2f85 Merge pull request #1851 from thatsIch/b-1850-add-second-optional-to-grindstone
Fixes #1850: Fixed support for second optional output of the AE2 Grindstone
2015-09-10 19:15:29 +02:00
yueh 7bd8cf3f59 Changed the interface to 9 slots to be consistent with every other machine 2015-09-08 00:19:05 +02:00
yueh 3ab6758e6c Merge pull request #1839 from yueh/fix-1833
Fixed the order craftinglinks are notified for the last item.
2015-09-05 18:00:41 +02:00
yueh 3dd948e4a4 Merge pull request #1854 from yueh/feature-recipes-refactoring
Added a missing whitespace and removed duplicate ones.
2015-09-05 18:00:22 +02:00
thatsIch 3bb9e4df97 Merge pull request #1634 from thatsIch/b-1588-wrong-oredict-name
Fixes #1588: Charged Certus Quartz Ore was given a wrong name
2015-09-03 23:50:53 +02:00
thatsIch d17f045339 Merge pull request #1852 from Mazdallier/patch-1
Update fr_FR.lang
2015-09-02 17:03:16 +02:00
yueh 5817cde56b Added a missing whitespace and removed duplicate ones. 2015-09-02 16:51:37 +02:00
Mazdallier 45d94d4c2c Update fr_FR.lang 2015-09-02 10:00:16 +02:00
thatsIch d893e52eb0 Fixes #1850: Fixed support for second optional output of the AE2 Grindstone 2015-09-01 23:58:40 +02:00
thatsIch 464a56ffc5 Fixes #1588: Charged Certus Quartz Ore was given a wrong name 2015-08-31 16:54:29 +02:00
yueh 40dcf711f6 Fixed the order craftinglinks are notified for the last item.
Fixes #1833
2015-08-28 13:29:24 +02:00
yueh 5dfca5eb93 Merge pull request #1776 from yueh/feature-1283
Closes #1283: Add custom Callable to prevent memory leaks
2015-08-22 23:22:17 +02:00
yueh 26daaf2232 Merge pull request #1805 from yueh/feature-recipes-refactoring
Reorganizes the recipes in a more reasonable way.
2015-08-22 23:21:14 +02:00
yueh c2022a7208 Reorganizes the recipes in a more reasonable way.
The recipes are now structured into multipe subfolder and split into more
distinct files, so the names are more appropriate and are better at
hinting which items the actually contain.

It also extends the RecipeResourceCopier to now handle the folder
recursively and extract all subdirectories and their files.

"import=" is currently requiring a relative path to the root directory
of the recipes. This would require a larger rewrite/refactoring, thus it
is kept for now until a potentially later changer.

This reverts splitting the oredict entries into their own directory and
moves them back into the recipes folder, as it currently is causing a
couple of issues like not being able to resolve the aliases or is not
working indev. But to keep it seperate it is now its own recipe file.

Fixes #1791
Reverts #1635
2015-08-21 12:23:20 +02:00
yueh 74c2e1fab9 Merge pull request #1823 from yueh/fix-1810
Fixes #1810: Removes a CompassReader once the world is unloaded.
2015-08-20 23:05:58 +02:00
yueh 0de7a2d83a Closes #1283: Add custom Callable to prevent memory leaks 2015-08-20 21:04:06 +02:00
yueh 517a832ac1 Fixes #1810: Removes a CompassReader once the world is unloaded.
This should no longer keep a reference to a World around and potentially
keep them loaded.
Also added a finalize() to CompassRegion to ensure the file is closed on a
GC.

Some cleanup regarding member order, final, etc
2015-08-20 19:04:33 +02:00
yueh 1ecc811559 Merge pull request #1813 from yueh/fix-1481
Fixes #1481: Not using the right itemcount in a few cases
2015-08-16 15:39:33 +02:00
yueh 7dd283cf9f Fixes 1481: Not using the right itemcount in a few cases 2015-08-16 15:32:58 +02:00
yueh a12ef1e534 Merge pull request #1807 from yueh/fix-1806
Wrong culling direction when rendering inscriber
2015-08-15 21:25:29 +02:00
yueh a567dcc026 Wrong culling direction when rendering inscriber
Fixes #1806
2015-08-15 19:48:12 +02:00
yueh 7f72ba97f0 Merge pull request #1769 from yueh/feature-1726
Closes #1726: Added Pressure P2P tunnel (PneumaticCraft)
2015-08-15 18:12:37 +02:00
yueh c3db5ef9e4 Merge pull request #1787 from thatsIch/b-1786-turkish-locale
Fixes #1786: Locale critical code now uses the english local. Fixes Turkish Problem.
2015-08-15 18:11:48 +02:00
yueh f955febb5d Merge pull request #1782 from yueh/fix-1781
Fixes #1781: Do not crash after the tileentity was removed
2015-08-15 18:10:44 +02:00
yueh 3115147edf Merge pull request #1774 from yueh/fix-1481
Fixes #1481: Updated cell itemcount when empty
2015-08-15 18:10:30 +02:00
yueh 1cec5922a0 Merge pull request #1773 from yueh/fix-1601
Fixes #1601: Do not allow 0 as stacksize for recipes
2015-08-15 18:10:21 +02:00
thatsIch 322b296639 Fixes #1786: Locale critical code now uses the english local for transmission. Fixes Turkish Problem.
Applied English Locale where localization is not expected as in internal recipe handling and IMC handling, basically which interacts with public API where we either require to enforce the incoming text with regex ([a-z0-9]) or just expect proper usage of the API, but with just using upper cases in recipe files it would break in Turkish Locale like

ALIAS

another option would have been to use `equalsIgnoreCase` in some cases, but not all applicable
2015-08-10 13:34:31 +02:00
yueh d1244f59ed Fixes #1781 Do not crash after the tileentity was removed 2015-08-08 14:14:38 +02:00
yueh 6a18102ea0 Fixes #1481: Updated cell itemcount when empty 2015-08-06 23:04:57 +02:00
yueh 300a9618b6 Fixes #1601: Do not allow 0 as stacksize for recipes 2015-08-06 22:47:24 +02:00
yueh dfb435ae7d Removed unused imports 2015-08-06 19:49:56 +02:00
yueh 1728f683c3 Closes #1726: Added Pressure P2P tunnel (PneumaticCraft) 2015-08-06 19:37:19 +02:00
yueh c0b62fd519 Added missing annotations 2015-08-06 19:08:33 +02:00
yueh 67c901966e Non static access of static members 2015-08-06 19:08:32 +02:00
yueh a5287f6779 Qualified field and method access 2015-08-06 19:08:04 +02:00
yueh 8234c6dbb5 Added missing blocks for control statements 2015-08-06 19:08:03 +02:00
yueh 9c8deac9de Code format 2015-08-06 19:08:02 +02:00
yueh c21a44d8c0 Organize imports 2015-08-06 19:06:49 +02:00
yueh 3c62734c87 Merge pull request #1770 from bakaxyf/master
Update zh_CN.lang
2015-08-06 13:25:45 +02:00
bakaxyf 5b6b14cde7 Update zh_CN.lang 2015-08-06 15:32:15 +08:00
yueh 51c92d3dfb Merge pull request #1732 from yueh/fix-1718
Use the correct resolver for crystal seeds
2015-07-25 18:29:13 +02:00
yueh 37295745cf Merge pull request #1696 from yueh/feature-85
Adds a round robin and random mode to export buses.
2015-07-25 18:29:02 +02:00
yueh c3ce9d9542 Adds a round robin and random mode to export buses.
Resolves #85
2015-07-25 17:27:56 +02:00
yueh 15993eb3c7 Merge pull request #1695 from yueh/b-prevents-crafting-of-disabled-parts
Prevents crafting of disabled parts
2015-07-24 22:27:21 +02:00
yueh 48d1a5aa88 Merge pull request #1687 from yueh/fix-1686
Fixes #1686: Let PlayerRegistry handle nonexistent players
2015-07-24 22:26:00 +02:00
yueh 3826b3b51f Merge pull request #1730 from yueh/fix-1728
Fixes #1728 Mark the entity as dead before spawning overflow
2015-07-24 22:25:43 +02:00
yueh 7833ff5eab Merge pull request #1733 from yueh/fix-1710
Use the correct culling face for the meteor compass
2015-07-24 22:24:08 +02:00
yueh 6f5a2888c0 Fixes #1710 Use the correct culling face for the meteor compass 2015-07-22 16:58:50 +02:00
yueh 6d42032738 Fixes #1718 Use the correct resolver for crystal seeds 2015-07-22 16:00:18 +02:00
yueh 1a38e5ba94 Fixes #1728 Mark the entity as dead before spawning overflow 2015-07-22 15:07:08 +02:00
yueh ff3e51018f Fixes #1686: Let PlayerRegistry handle nonexistent players 2015-07-14 22:48:37 +02:00
yueh 65c47d4c4e Merge pull request #1633 from TheCricket/patch-2
Allows the automation of Vibration Chambers with lava buckets
2015-07-14 21:31:16 +02:00
yueh d7486fec3c Merge pull request #1647 from yueh/fix-1646
Fixes #1646 Save GridStorage properly
2015-07-14 21:30:50 +02:00
yueh 796b6dc7a2 Merge pull request #1709 from yueh/fix-1706
Fixes #1706 Adds a test to disable unsupported BetterStorage integration
2015-07-14 21:30:30 +02:00
yueh 67b261cc7c Merge pull request #1698 from yueh/fix-1648
Fixes #1648 Removes unecessary cast to BlockQuartzTorch
2015-07-14 21:30:19 +02:00
yueh 3fb3f70392 Merge pull request #1678 from yueh/fix-1673
Removed overly defensive code and ensure GL state to be restored.
2015-07-14 21:30:03 +02:00
yueh 49321d72c1 Merge pull request #1667 from yueh/fix-1666
Fixes #1666 Missing check for the memory card
2015-07-14 21:29:49 +02:00
yueh 62fb0dc7f7 Merge pull request #1665 from yueh/fix-1656
Fixes #1656 Reduces the amount of block updates a controller sends.
2015-07-14 21:29:39 +02:00
yueh e9e9535f2a Merge pull request #1635 from thatsIch/e-export-oredicts
Exports the ore-dicts out of the recipe files
2015-07-14 21:29:18 +02:00
yueh ab9f4e7fd7 Merge pull request #1604 from yueh/e-immutable-inscriber-recipes
Changed to immutable list to prevent direct modifcations
2015-07-14 21:28:41 +02:00
yueh 1080b65404 Fixes #1706 Adds a test to disable unsupported BetterStorage integration 2015-07-14 20:49:39 +02:00
yueh c823e1464b Ensure that disabled parts are actually disabled and removed. 2015-07-10 18:35:22 +02:00
yueh 4ba722cb51 Fixes #1648 Removes unecessary cast to BlockQuartzTorch 2015-07-10 18:16:27 +02:00
thatsIch 91b8d30a15 Fixes #1474: Prevents crafting of disabled recipes and deletes invalid parts 2015-07-09 13:35:31 +02:00
yueh 3e6231492e Merge pull request #1684 from yueh/fix-1611
Reset the lastUsedChannels on a gridstorage change
2015-07-06 09:58:43 +02:00
yueh 1c2df4f380 Reset the lastUsedChannels on a gridstorage change 2015-07-06 09:54:05 +02:00
yueh 3f013c8d1d Removed overly defensive code and ensure GL state to be restored.
Fixes #1673
2015-07-04 17:30:54 +02:00
yueh 4e46dc08af Fixes #1666 Missing check for the memory card 2015-07-01 22:01:46 +02:00
yueh f5e3ae8949 Fixes #1656 Reduces the amount of block updates a controller sends. 2015-07-01 20:26:04 +02:00
yueh b2c31e20b2 Fixes #1646 Save GridStorage properly 2015-06-26 00:35:59 +02:00
thatsIch cd0aec123d Exports the ore-dicts out of the recipe files
This will not alter the handler, because rewriting the parser for it being too static is not feasible at this point
2015-06-21 23:57:36 +02:00
yueh 3844f3af87 Merge pull request #1619 from yueh/fix-1618
Removed meta based rotation of CGA
2015-06-21 20:33:54 +02:00
Cricket 1cc118c927 Allows the automation of Vibration Chambers with lava buckets 2015-06-21 12:57:59 -04:00
thatsIch afd1d4e21e Merge pull request #1627 from bakaxyf/master
Update zh_CN.lang
2015-06-20 19:26:43 +02:00
bakaxyf 77597973e7 Update zh_CN.lang 2015-06-20 17:55:24 +08:00
yueh 4acec30a66 Removed meta based rotation of CGA
Fixes #1618
2015-06-17 21:42:35 +02:00
thatsIch ab32b2b357 Merge pull request #1600 from thatsIch/b-1599-precondition-failing-of-world-data
Fixes #1599: Removes preconditions for world data and children
2015-06-17 20:13:27 +02:00
thatsIch 8b7aea9f14 Merge pull request #1610 from thatsIch/e-update-dependencies
Update dependencies
2015-06-16 19:29:42 +02:00
thatsIch db4a6c6cc0 Fixes #1599: Removes preconditions for world data and children 2015-06-16 19:26:37 +02:00
yueh c6383f21c5 Merge pull request #1609 from yueh/fix-1510
Splitted channeldata into two ints
2015-06-16 18:04:49 +02:00
yueh 85de600d16 Splitted channeldata into two ints
Previously it did encode the current and previous used channels into the
same as well as mask it with 0xFF. Which lead to an overflow every 256
gridnodes requiring a channel. This will not happen at > 2^31

Also removes the need to bitshift them for every access.

Fixes #1510
2015-06-16 14:57:04 +02:00
thatsIch 944f434993 Update dependencies 2015-06-16 14:32:08 +02:00
yueh 6b47bf3ce8 Changed to immutable list to prevent direct modifcations 2015-06-16 00:18:01 +02:00
thatsIch 60aa74d19f Merge pull request #1593 from thatsIch/e-update-forge
Updates Forge to 1.7.10-10.13.4.1448-1.7.10
2015-06-14 14:51:36 +02:00
thatsIch e5f59e0a00 Updates Forge to 1.7.10-10.13.4.1448-1.7.10
the public field fluidID was removed and was replaced with the public getter
2015-06-14 09:46:44 +02:00
thatsIch 2ba4f312d4 Fixes wrong interface names for BuildCraft Transport 2015-06-13 23:42:40 +02:00
thatsIch 2274ca79e4 Merge pull request #1578 from thatsIch/b-1559-infinite-recursion-crash
Fixes #1559: Level Emitter with P:R alloy wire does not crash anymore
2015-06-13 22:45:28 +02:00
thatsIch a75dee0d08 Fixes #1559: Level Emitter with P:R alloy wire does not crash anymore
Required to implement a more advanced interface, if not done that way, the parts will update themselves recursively
2015-06-13 17:24:30 +02:00
thatsIch 349ac7e0a0 Merge pull request #1590 from thatsIch/b-1588-same-oredict-name-for-certus-ore-and-charged
Fixes #1588: Charged Certus Quartz Ore has its own oredictionary entry
2015-06-13 17:17:54 +02:00
thatsIch b5d0db493b Fixes #1588: Charged Certus Quartz Ore has its own oredictionary entry 2015-06-13 17:06:24 +02:00
yueh 256c0258bb Merge pull request #1522 from yueh/feature-12
Closes #12 Added visual lock state to monitors
2015-06-13 16:55:03 +02:00
yueh 73ffbb268a Merge pull request #1577 from yueh/fix-1567
Moved ETA to the title and also no longer display for empty jobs
2015-06-13 16:50:01 +02:00
thatsIch 69299a6b1d Merge pull request #1526 from thatsIch/e-error-message
Improves the message generated when generating the folder for the compass data
2015-06-13 16:46:29 +02:00
thatsIch d1e4ea6579 Improves the message generated when generating the folder for the compass data.
Outsources the encoding of the compass data into the file name
Written tests for the encoding
Did some internal cleaning of the class
2015-06-13 16:05:59 +02:00
yueh f0bf72bc34 Updated eclipse formatter and import order 2015-06-13 15:28:14 +02:00
thatsIch 7fc538fc99 Add IntelliJ Code-Style 2015-06-13 15:22:39 +02:00
thatsIch acc3bb6a29 Merge pull request #1561 from thatsIch/b-update-build-craft
Updates BuildCraft to 7.0.9
2015-06-13 14:37:41 +02:00
thatsIch 71ce42f26a Updates BuildCraft to 7.0.9
Split dependency logic on the BuildCraft modules.
Config needs to be reset, if BuildCraft was disabled actively,
because now there are 3 BC modules to be taken account of
2015-06-13 13:10:46 +02:00
yueh cb013cf55b Moved ETA to the title and also no longer display for empty jobs
Fixes #1567
2015-06-11 20:00:47 +02:00
yueh 57836848ae Merge pull request #1575 from yueh/fix-1574
Fixes #1574 Light detector no longer emitting light
2015-06-11 19:33:59 +02:00
yueh 53c4529d7a Fixes #1574 Light detector no longer emitting light 2015-06-11 11:51:15 +02:00
thatsIch e3a0b34767 Merge pull request #1555 from thatsIch/b-slow-craftguide-integration
Cleaned up CraftGuide Integration
2015-06-09 23:28:17 +02:00
yueh 5aaaeb6d42 Closes #12 Added visual lock state to monitors
Some general refactoring of every monitor including panels and terminals.
Disabled glPushAttrib and glPopAttrib for StorageMonitor as this can be a
performance issue.
2015-06-06 17:00:52 +02:00
Uristqwerty e1ff0fe5ef Cleaned up CraftGuide Integration
A NPE caused to open CraftGuide very slowly (several seconds)

Added Grinder recipes
Added Inscriber recipes
2015-06-06 13:36:00 +02:00
yueh 86e5d6f5da Merge pull request #1551 from yueh/fix-1036
No longer invalidate the cache on simulate.
2015-06-05 23:03:08 +02:00
yueh 05f90760f2 No longer invalidate the cache of MEMonitorIInventory on simulate.
Should fix #1036
2015-06-05 19:35:52 +02:00
2138 changed files with 38984 additions and 45532 deletions
-16
View File
@@ -1,16 +0,0 @@
<!-- Provide a summary of the issue in the Title above, please do not "[Tag]" it -->
#### Description
<!-- Always use the most recent version from ae-mod.info, it might already be fixed -->
<!-- When describing a bug, tell us what was expected and what the actual behaviour is -->
<!-- When suggesting a feature, tell us how it should work and why it should be considered -->
#### Environment
<!-- Include as many relevant details about the environment -->
<!-- Like the used version, SP/MP, other mods and their version, crashlogs etc -->
<!-- Please use pastebin or gist for posting the complete crashlog, no excerpt -->
<!-- The following ones are required, please note "latest" is not a version -->
- Minecraft Version:
- AE2 Version:
- Forge Version:
+2 -5
View File
@@ -8,11 +8,11 @@
!gradlew.bat
!build.gradle
!gradle.properties
!.travis.yml
# include markdowns
!README.md
!LICENSE
!CONTRIBUTING.md
# include sourcecode
!src/
@@ -22,7 +22,4 @@
!.gitignore
# code format to reduce noise in git commits
!codeformat/
# Github specific files and directories
!.github/
!codeformat/
-20
View File
@@ -1,20 +0,0 @@
sudo: required
dist: trusty
language: java
jdk:
- oraclejdk8
- openjdk8
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
- rm -f $HOME/.gradle/caches/minecraft/deobfedDeps/providedDummy.jar
- rm -f $HOME/.gradle/caches/minecraft/deobfedDeps/compileDummy.jar
cache:
directories:
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/
install: "./gradlew setupCIWorkspace"
script: "./gradlew build test"
+10 -27
View File
@@ -1,6 +1,6 @@
[![Travis](https://img.shields.io/travis/AppliedEnergistics/Applied-Energistics-2.svg?maxAge=2592000&style=flat-square)](https://travis-ci.org/AppliedEnergistics/Applied-Energistics-2)
[![Latest Tag](https://img.shields.io/github/tag/AppliedEnergistics/Applied-Energistics-2.svg?label=Latest Tag&style=flat-square)](https://github.com/AppliedEnergistics/Applied-Energistics-2/tags)
[![Latest Release](https://img.shields.io/github/release/AppliedEnergistics/Applied-Energistics-2.svg?label=Latest Release&style=flat-square)](https://github.com/AppliedEnergistics/Applied-Energistics-2/releases)
[![Latest Build](https://img.shields.io/teamcity/http/ci.tsr.me/s/AppliedEnergistics_AutoHeadBuild.svg?label=Latest Build)](http://ci.tsr.me/viewType.html?buildTypeId=AppliedEnergistics_AutoHeadBuild&tab=buildTypeStatusDiv)
[![Latest Tag](https://img.shields.io/github/tag/AppliedEnergistics/Applied-Energistics-2.svg?label=Latest Tag)](https://github.com/AppliedEnergistics/Applied-Energistics-2/tags)
[![Latest Release](https://img.shields.io/github/release/AppliedEnergistics/Applied-Energistics-2.svg?label=Latest Release)](https://github.com/AppliedEnergistics/Applied-Energistics-2/releases)
# Applied Energistics 2
@@ -10,7 +10,6 @@
* [Contacts](#contacts)
* [License](#license)
* [Downloads](#downloads)
* [Nightly Builds](#nightly-builds)
* [Installation](#installation)
* [Issues](#issues)
* [Building](#building)
@@ -33,28 +32,20 @@ A Mod about Matter, Energy and using them to conquer the world..
* Applied Energistics 2 API
- (c) 2013 - 2015 AlgorithmX2 et al
- [![License](https://img.shields.io/badge/License-MIT-red.svg?style=flat-square)](http://opensource.org/licenses/MIT)
- [![License](https://img.shields.io/badge/License-MIT-red.svg?style=flat)](http://opensource.org/licenses/MIT)
* Applied Energistics 2
- (c) 2013 - 2015 AlgorithmX2 et al
- [![License](https://img.shields.io/badge/License-LGPLv3-blue.svg?style=flat-square)](https://raw.githubusercontent.com/AppliedEnergistics/Applied-Energistics-2/rv2/LICENSE)
- [![License](https://img.shields.io/badge/License-LGPLv3-blue.svg?style=flat)](https://raw.githubusercontent.com/AppliedEnergistics/Applied-Energistics-2/rv2/LICENSE)
* Textures and Models
- (c) 2013 - 2015 AlgorithmX2 et al
- [![License](https://img.shields.io/badge/License-CC%20BY--NC--SA%203.0-yellow.svg?style=flat-square)](https://creativecommons.org/licenses/by-nc-sa/3.0/)
- [![License](https://img.shields.io/badge/License-CC%20BY--NC--SA%203.0-yellow.svg?style=flat)](https://creativecommons.org/licenses/by-nc-sa/3.0/)
* Text and Translations
- [![License](https://img.shields.io/badge/License-No%20Restriction-green.svg?style=flat-square)](https://creativecommons.org/publicdomain/zero/1.0/)
- [![License](https://img.shields.io/badge/License-No%20Restriction-green.svg?style=flat)](https://creativecommons.org/publicdomain/zero/1.0/)
## Downloads
Downloads can be found on [CurseForge](http://www.curse.com/mc-mods/minecraft/223794-applied-energistics-2) or on the [official website](http://ae-mod.info/Downloads/).
## Nightly Builds
[![Build status](https://ci.appveyor.com/api/projects/status/w0sg7upakn0vj5gc?svg=true)](https://ci.appveyor.com/project/shartte/applied-energistics-2/history)
[Download Latest Nightly Build](https://ci.appveyor.com/api/projects/shartte/applied-energistics-2/artifacts/ae2-rv4-nightly.zip?branch=master)
Nightly builds for the Minecraft 1.10.2 branch of AE2 (rv4-alpha) are available from [AppVeyor](https://ci.appveyor.com/api/projects/shartte/applied-energistics-2/history). These builds are only for testing purposes and might lead to loss of data, and will contain significant bugs. Please see below on how you can report bugs you find during testing.
## Installation
You install this mod by putting it into the `minecraft/mods/` folder. It has no additional hard dependencies.
@@ -100,7 +91,7 @@ Providing as many details as possible does help us to find and resolve the issue
- CI server `gradlew setupCIWorkspace`
3. Build `gradlew build`. Jar will be in `build/libs`
4. For core developer: Setup IDE
- IntelliJ: Import into IDE, execute `gradlew genIntellijRuns` and change RunConfiguration to `*_main` as quickfix for [ForgeGradle](https://github.com/MinecraftForge/ForgeGradle/issues/357)
- IntelliJ: Import into IDE and execute `gradlew genIntellijRuns` afterwards
- Eclipse: execute `gradlew eclipse`
5. For add-on developer: Core-Mod Detection
- In order to have FML detect AE from your dev environment, add the following VM Option to your run profile
@@ -169,17 +160,9 @@ An example string would be `appeng:appliedenergistics2:rv2-alpha-30:dev`
Files must be encoded as UTF-8.
### New or updated Translations
### New Translations
The language files are located in `/src/main/resources/assets/appliedenergistics2/lang/` and use the [appropriate locale code](http://minecraft.gamepedia.com/Language) as name and `.lang` as extension.
To update an translation edit the corresponding file and improve/correct the existing entry. Or copy any entries from `en_US.lang` for missing translation.
To create a new translation, copy the contents of `en_US.lang`, create a new file with appropriate filename, and translate it to your language.
Please keep in mind that we use [String format](https://docs.oracle.com/javase/8/docs/api/java/util/Formatter.html) to pass additional data to the text for displaying.
Therefore you should preserve parts like `%s` or `%1$d%%`, which allows us to replace them with the correct values while you still have the option to change their order for match the rules of grammar.
This might not be possible for some languages. Should this be the case, please contact us.
You can provide any additional languages by creating a new file with the [appropriate language code](http://download1.parallels.com/SiteBuilder/Windows/docs/3.2/en_US/sitebulder-3.2-win-sdk-localization-pack-creation-guide/30801.htm).
### Final Note
+34 -36
View File
@@ -1,6 +1,6 @@
/*
* This file is part of Applied Energistics 2.
* Copyright (c) 2013 - 2015, AlgorithmX2, All rights reserved.
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
*
* Applied Energistics 2 is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -16,43 +16,54 @@
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
*/
apply plugin: 'forge'
apply from: 'gradle/scripts/dependencies.gradle'
apply from: 'gradle/scripts/artifacts.gradle'
apply from: 'gradle/scripts/autoinstallruntime.gradle'
apply from: 'gradle/scripts/integration.gradle'
apply from: 'gradle/scripts/optional.gradle'
buildscript {
repositories {
mavenLocal()
jcenter()
mavenCentral()
maven {
name = "forge"
url = "http://files.minecraftforge.net/maven"
}
maven {
name = "sonatype"
url = "https://oss.sonatype.org/content/repositories/snapshots/"
}
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:2.2-SNAPSHOT'
classpath 'net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT'
}
}
apply plugin: 'net.minecraftforge.gradle.forge'
repositories {
mavenLocal()
jcenter()
mavenCentral()
}
apply from: 'gradle/scripts/dependencies.gradle'
apply from: 'gradle/scripts/artifacts.gradle'
apply from: 'gradle/scripts/integration.gradle'
apply from: 'gradle/scripts/optional.gradle'
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
sourceCompatibility = JavaVersion.VERSION_1_6
targetCompatibility = JavaVersion.VERSION_1_6
version = aeversion + "-" + aechannel + "-" + aebuild
group = aegroup
archivesBaseName = aebasename
// If TeamCity is running this build, lets set the version info
if (hasProperty("teamcity")) {
version = teamcity["build.number"]
// Fix for main branch being built
version = version.replaceAll("/", "-")
}
// Add Coremod Manifest
jar {
manifest {
attributes 'FMLCorePlugin': 'appeng.transformer.AppEngCore'
attributes 'FMLCorePluginContainsFMLMod': 'true'
}
@@ -64,8 +75,6 @@ jar {
}
minecraft {
coreMod = "appeng.transformer.AppEngCore"
version = minecraft_version + "-" + forge_version
replaceIn "AEConfig.java"
@@ -78,7 +87,6 @@ minecraft {
// used when launching minecraft in dev env
runDir = "run"
mappings = mcp_mappings
}
sourceSets {
@@ -93,10 +101,10 @@ sourceSets {
include "assets/appliedenergistics2/recipes/**/*.recipe",
"assets/appliedenergistics2/recipes/README.html",
"assets/appliedenergistics2/lang/*.lang",
"assets/appliedenergistics2/blockstates/**/*.json",
"assets/appliedenergistics2/models/**/*.json",
"assets/appliedenergistics2/textures/**/*.png",
"assets/appliedenergistics2/textures/**/*.mcmeta",
"assets/appliedenergistics2/textures/blocks/*",
"assets/appliedenergistics2/textures/guis/*",
"assets/appliedenergistics2/textures/models/*",
"assets/appliedenergistics2/textures/items/*",
"assets/appliedenergistics2/meta/*",
"mcmod.info",
"pack.mcmeta"
@@ -104,20 +112,10 @@ sourceSets {
}
}
processResources
{
// this will ensure that this task is redone when the versions change.
inputs.property "version", project.version
inputs.property "mcversion", project.minecraft.version
processResources {
// replace stuff in mcmod.info, nothing else
from(sourceSets.main.resources.srcDirs) {
include 'mcmod.info'
expand 'version': project.version, 'mcversion': project.minecraft.version
}
// copy everything else, thats not the mcmod.info
from(sourceSets.main.resources.srcDirs) {
exclude 'mcmod.info'
expand 'version': project.version, 'mcversion': minecraft_version
}
}
+42 -8
View File
@@ -1,4 +1,4 @@
aeversion=rv4
aeversion=rv3
aechannel=alpha
aebuild=0
aegroup=appeng
@@ -7,18 +7,52 @@ aebasename=appliedenergistics2
#########################################################
# Versions #
#########################################################
minecraft_version=1.10.2
mcp_mappings=snapshot_20161018
forge_version=12.18.2.2104
minecraft_version=1.7.10
forge_version=10.13.4.1448-1.7.10
#########################################################
# Installable #
#########################################################
waila_version=1.7.0-B3_1.9.4
waila_version=1.5.10
jabba_version=1.2.1a
enderstorage_version=1.4.7.36
translocator_version=1.1.2.15
ic2_version=2.2.717
enderio_version=2.3.0.375_beta
#cofhlib_version=1.0.1-157
#cofhcore_version=3.0.2-270
#texpansion_version=4.0.0-176
#tfoundation_version=1.0.0-82
betterstorage_version=0.11.3.123.20
invtweaks_version=1.58
#########################################################
# Provided APIs #
#########################################################
jei_version=3.12.7.312
tesla_version=1.10.2-1.2.1.49
ic2_version=2.6.96-ex110
fmp_version=1.2.0.345
code_chicken_lib_version=1.1.3.138
code_chicken_core_version=1.0.7.47
nei_version=1.0.5.111
bc_version=7.0.9
opencomputers_version=1.5.12.26
pneumaticcraft_version=1.9.15-105
#########################################################
# Self Compiled APIs #
#########################################################
mekansim_version=8.0.1.198
rotarycraft_version=V6e
#########################################################
# Self Compiled API Stubs #
# Note: Do not edit these version numbers as they are #
# not the version of the mod, but stub code for AE2 to #
# compile #
#########################################################
api_coloredlightscore_version=1
api_craftguide_version=1
api_immibis_version=1
api_mfr_version=1
api_railcraft_version=1
api_rf_version=2
+26 -36
View File
@@ -1,45 +1,34 @@
/*
* This file is part of Applied Energistics 2.
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
*
* Applied Energistics 2 is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Applied Energistics 2 is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
*/
// Suppresses warnings/errors when building javadocs
allprojects {
tasks.withType(Javadoc) {
options.addStringOption('Xdoclint:none', '-quiet')
}
}
javadoc {
options.encoding = 'UTF-8'
options.charSet = 'UTF-8'
}
task javadocs(type: Javadoc) {
task myJavadocs(type: Javadoc) {
source = sourceSets.api.java
include "appeng/api/**"
// Due to ForgeGradle having to be a special snowflake,
// we have to add some custom configurations to the normal compile configuration and hope it does not break.
classpath = configurations.compile + configurations.forgeGradleMc + configurations.forgeGradleMcDeps
classpath = configurations.compile
}
task javadocJar(type: Jar, dependsOn: javadocs) {
from javadoc.destinationDir
task javadocJar(type: Jar, dependsOn: myJavadocs) {
classifier = 'javadoc'
from 'build/docs/javadoc/'
}
task sourceJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
task devJar(type: Jar) {
manifest {
attributes 'FMLCorePlugin': 'appeng.transformer.AppEngCore'
attributes 'FMLCorePluginContainsFMLMod': 'true'
}
from(sourceSets.main.output) {
include "appeng/**"
include "assets/**"
include 'mcmod.info'
}
classifier = 'dev'
}
task apiJar(type: Jar) {
@@ -53,6 +42,7 @@ task apiJar(type: Jar) {
}
artifacts {
archives devJar
archives apiJar
archives javadocJar
archives sourceJar
+12
View File
@@ -0,0 +1,12 @@
// searches for NEI and Chicken stuff from compile set
// and adds them to the mods in run dir
task copyChicken(type: Copy, dependsOn: "extractUserDev") {
from { configurations.compile }
include "**/*Chicken*.jar", "**/*NotEnoughItems*.jar"
exclude "**/CodeChickenLib*" // because CCC downloads it anyways.. -_-
into file(minecraft.runDir + "/mods")
mustRunAfter "deobfBinJar"
mustRunAfter "repackMinecraft"
}
tasks.setupDevWorkspace.dependsOn copyChicken
tasks.setupDecompWorkspace.dependsOn copyChicken
+93 -17
View File
@@ -1,3 +1,4 @@
/*
* This file is part of Applied Energistics 2.
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
@@ -16,8 +17,14 @@
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
*/
repositories {
mavenLocal()
maven {
name "ChickenBones"
url "http://chickenbones.net/maven/"
}
maven {
name "Mobius"
@@ -25,19 +32,60 @@ repositories {
}
maven {
name = "JEI repo"
url "http://dvs1.progwml6.com/files/maven"
name "FireBall API Depot"
url "http://dl.tsr.me/artifactory/libs-release-local"
}
maven {
name = "Tesla repo"
url "http://maven.epoxide.xyz"
name = "Player"
url = "http://maven.ic2.player.to/"
}
maven {
name = "IC2 repo"
url = "http://maven.ic2.player.to"
name = "Tterrag"
url = "http://maven.tterrag.com/"
}
maven {
name = "RX14 Proxy"
url = "http://mvn.rx14.co.uk/repo/"
}
maven {
name "OpenComputers Repo"
url = "http://maven.cil.li/"
}
maven {
name = "MM repo"
url = "http://maven.k-4u.nl/"
}
ivy {
name "BuildCraft"
artifactPattern "http://www.mod-buildcraft.com/releases/BuildCraft/[revision]/[module]-[revision]-[classifier].[ext]"
}
// CurseForge DNS for TE is not available or I am just being unlucky, code part can stay since this is applicable to any other curseforge mod though
// ivy {
// name = "CoFHLib"
// artifactPattern "http://addons.cursecdn.com/files/2212/893/[module]-[revision].[ext]"
// }
//
// ivy {
// name = "CoFHCore"
// artifactPattern "http://addons.cursecdn.com/files/2212/895/[module]-[revision].[ext]"
// }
// ivy {
// name = "ThermalExpansion"
// artifactPattern "http://addons.curse.cursecdn.com/files/2212/446/[module]-[revision].[ext]"
// }
// ivy {
// name = "ThermalFoundation"
// artifactPattern "http://addons.curse.cursecdn.com/files/2212/444/[module]-[revision].[ext]"
// }
}
configurations {
@@ -45,19 +93,47 @@ configurations {
}
dependencies {
// installable runtime dependencies
mods "mcp.mobius.waila:Waila:${waila_version}"
mods "net.industrial-craft:industrialcraft-2:${ic2_version}:dev"
// installable
mods "mcp.mobius.waila:Waila:${waila_version}_${minecraft_version}:dev"
mods "mcp.mobius.jabba:Jabba:${jabba_version}_${minecraft_version}:dev"
mods "codechicken:EnderStorage:${minecraft_version}-${enderstorage_version}:dev"
mods "codechicken:Translocator:${minecraft_version}-${translocator_version}:dev"
mods "net.industrial-craft:industrialcraft-2:${ic2_version}-experimental:dev"
mods "com.enderio:EnderIO:${minecraft_version}-${enderio_version}:dev"
mods "net.mcft.copy.betterstorage:BetterStorage:${minecraft_version}-${betterstorage_version}:deobf"
mods "inventorytweaks:InventoryTweaks:${invtweaks_version}:deobf"
mods "li.cil.oc:OpenComputers:MC${minecraft_version}-${opencomputers_version}:dev"
// compile against provided APIs
compileOnly "mezz.jei:jei_${minecraft_version}:${jei_version}:api"
compileOnly "mcp.mobius.waila:Waila:${waila_version}"
compileOnly "net.darkhax.tesla:Tesla:${tesla_version}"
compileOnly "net.industrial-craft:industrialcraft-2:${ic2_version}:api"
// mods name: 'CoFHLib', version: "[${minecraft_version}]${cofhlib_version}-dev", ext: 'jar'
// mods name: 'CoFHCore', version: "[${minecraft_version}]${cofhcore_version}-dev", ext: 'jar'
// mods name: 'ThermalExpansion', version: "[${minecraft_version}]${texpansion_version}-dev", ext: 'jar'
// mods name: 'ThermalFoundation', version: "[${minecraft_version}]${tfoundation_version}-dev", ext: 'jar'
// at runtime, use the full JEI jar
runtime "mezz.jei:jei_${minecraft_version}:${jei_version}"
compile "codechicken:ForgeMultipart:${minecraft_version}-${fmp_version}:dev"
compile "codechicken:CodeChickenLib:${minecraft_version}-${code_chicken_lib_version}:dev"
compile "codechicken:CodeChickenCore:${minecraft_version}-${code_chicken_core_version}:dev"
compile "codechicken:NotEnoughItems:${minecraft_version}-${nei_version}:dev"
compile "com.mod-buildcraft:buildcraft:${bc_version}:dev"
compile "pneumaticCraft:PneumaticCraft-${minecraft_version}:${pneumaticcraft_version}:api"
// provided APIs
compile "li.cil.oc:OpenComputers:MC${minecraft_version}-${opencomputers_version}:api"
compile "net.industrial-craft:industrialcraft-2:${ic2_version}-experimental:api"
compile "net.mcft.copy.betterstorage:BetterStorage:${minecraft_version}-${betterstorage_version}:api"
// self compiled APIs
compile "appeng:Waila:${waila_version}_${minecraft_version}:api"
compile "appeng:RotaryCraft:${rotarycraft_version}:api"
compile "appeng:mekanism:${minecraft_version}-${mekansim_version}:api"
compile "appeng:InventoryTweaks:${invtweaks_version}:api"
// self compiled stubs
compile(group: 'api', name: 'coloredlightscore', version: "${api_coloredlightscore_version}")
compile(group: 'api', name: 'craftguide', version: "${api_craftguide_version}")
compile(group: 'api', name: 'immibis', version: "${api_immibis_version}")
compile(group: 'api', name: 'mfr', version: "${api_mfr_version}")
compile(group: 'api', name: 'railcraft', version: "${api_railcraft_version}")
compile(group: 'api', name: 'rf', version: "${api_rf_version}")
// unit test dependencies
testCompile "junit:junit:4.12"
}
-22
View File
@@ -1,29 +1,7 @@
/*
* This file is part of Applied Energistics 2.
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
*
* Applied Energistics 2 is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Applied Energistics 2 is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
*/
// Should be provided by ForgeGradle, some idea user should confirm it.
apply plugin: 'idea'
idea {
module {
inheritOutputDirs = true
// excludes integration due to not being available upon port
excludeDirs += file('src/main/java/appeng/parts/layers/')
}
}
+96 -23
View File
@@ -1,29 +1,11 @@
/*
* This file is part of Applied Energistics 2.
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
*
* Applied Energistics 2 is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Applied Energistics 2 is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
*/
task wrapper(type: Wrapper) {
gradleVersion = "2.14"
gradleVersion = "2.4"
}
// WAILA
task installWaila(type: Copy, dependsOn: "deinstallWaila") {
from { configurations.mods }
include "**/*Waila*.jar"
include "**/*Waila*dev.jar"
into file(minecraft.runDir + "/mods")
}
@@ -31,13 +13,104 @@ task deinstallWaila(type: Delete) {
delete fileTree(dir: minecraft.runDir + "/mods", include: "*Waila*.jar")
}
// IC²
// JABBA
task installJabba(type: Copy, dependsOn: "deinstallJabba") {
from { configurations.mods }
include "**/*Jabba*dev.jar"
into file(minecraft.runDir + "/mods")
}
task deinstallJabba(type: Delete) {
delete fileTree(dir: minecraft.runDir + "/mods", include: "*Jabba*.jar")
}
// ENDER STORAGE
task installEnderStorage(type: Copy, dependsOn: "deinstallEnderStorage") {
from { configurations.mods }
include "**/*EnderStorage*dev.jar"
into file(minecraft.runDir + "/mods")
}
task deinstallEnderStorage(type: Delete) {
delete fileTree(dir: minecraft.runDir + "/mods", include: "*EnderStorage*.jar")
}
// TRANSLOCATOR
task installTranslocator(type: Copy, dependsOn: "deinstallTranslocator") {
from { configurations.mods }
include "**/*Translocator*dev.jar"
into file(minecraft.runDir + "/mods")
}
task deinstallTranslocator(type: Delete) {
delete fileTree(dir: minecraft.runDir + "/mods", include: "*Translocator*.jar")
}
// INDUSTRIALCRAFT
task installIC2(type: Copy, dependsOn: "deinstallIC2") {
from { configurations.mods }
include "**/*industrialcraft-2*.jar"
include "**/*industrialcraft*dev.jar"
into file(minecraft.runDir + "/mods")
}
task deinstallIC2(type: Delete) {
delete fileTree(dir: minecraft.runDir + "/mods", include: "*industrialcraft-2*.jar")
delete fileTree(dir: minecraft.runDir + "/mods", include: "*industrialcraft*.jar")
}
// ENDER IO
task installEnderIO(type: Copy, dependsOn: "deinstallEnderIO") {
from { configurations.mods }
include "**/*EnderIO*dev.jar"
into file(minecraft.runDir + "/mods")
}
task deinstallEnderIO(type: Delete) {
delete fileTree(dir: minecraft.runDir + "/mods", include: "*EnderIO*.jar")
}
// TE
//task installTE(type: Copy, dependsOn: "deinstallTE") {
// from { configurations.mods }
// include "**/*CoFHLib*.jar"
// include "**/*CoFHCore*.jar"
// include "**/*ThermalFoundation*.jar"
// include "**/*ThermalExpansion*.jar"
//
// into file(minecraft.runDir + "/mods")
//}
//
//task deinstallTE(type: Delete) {
// delete fileTree(dir: minecraft.runDir + "/mods", includes: ["*CoFHLib*.jar", "*CoFHCore*.jar", "*ThermalFoundation*.jar", "*ThermalExpansion*.jar"])
//}
// INV TWEAKS
task installInvTweaks(type: Copy, dependsOn: "deinstallInvTweaks") {
from { configurations.mods }
include "**/*InventoryTweaks*dev*.jar"
into file(minecraft.runDir + "/mods")
}
task deinstallInvTweaks(type: Delete) {
delete fileTree(dir: minecraft.runDir + "/mods", include: "*InventoryTweaks*.jar")
}
// BETTER STORAGE
task installBetterStorage(type: Copy, dependsOn: "deinstallBetterStorage") {
from { configurations.mods }
include "**/*BetterStorage*deobf*.jar"
into file(minecraft.runDir + "/mods")
}
task deinstallBetterStorage(type: Delete) {
delete fileTree(dir: minecraft.runDir + "/mods", include: "*BetterStorage*.jar")
}
task installOpenComputers(type: Copy, dependsOn: "deinstallOpenComputers") {
from { configurations.mods }
include "**/*OpenComputer*dev*.jar"
into file(minecraft.runDir + "/mods")
}
task deinstallOpenComputers(type: Delete) {
delete fileTree(dir: minecraft.runDir + "/mods", include: "*OpenComputers*.jar")
}
Binary file not shown.
+2 -2
View File
@@ -1,6 +1,6 @@
#Fri Sep 16 14:56:32 CEST 2016
#Tue Sep 01 22:00:39 CEST 2015
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-2.4-all.zip
Vendored
+26 -26
View File
@@ -6,30 +6,12 @@
##
##############################################################################
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""
APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
@@ -48,7 +30,6 @@ die ( ) {
cygwin=false
msys=false
darwin=false
nonstop=false
case "`uname`" in
CYGWIN* )
cygwin=true
@@ -59,11 +40,31 @@ case "`uname`" in
MINGW* )
msys=true
;;
NONSTOP* )
nonstop=true
;;
esac
# For Cygwin, ensure paths are in UNIX format before anything is touched.
if $cygwin ; then
[ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
fi
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >&-
APP_HOME="`pwd -P`"
cd "$SAVED" >&-
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
@@ -89,7 +90,7 @@ location of your Java installation."
fi
# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
@@ -113,7 +114,6 @@ fi
if $cygwin ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
Vendored
+4 -4
View File
@@ -8,14 +8,14 @@
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
@@ -46,7 +46,7 @@ echo location of your Java installation.
goto fail
:init
@rem Get command-line arguments, handling Windows variants
@rem Get command-line arguments, handling Windowz variants
if not "%OS%" == "Windows_NT" goto win9xME_args
if "%@eval[2+2]" == "4" goto 4NT_args
-34
View File
@@ -1,34 +0,0 @@
/*
* This file is part of Applied Energistics 2.
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
*
* Applied Energistics 2 is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Applied Energistics 2 is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
*/
package appeng.api;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* Marks interfaces that can be used as injectable constructor arguments for an {@link AEPlugin}.
*/
@Target( ElementType.TYPE )
@Retention( RetentionPolicy.RUNTIME )
public @interface AEInjectable
{}
-39
View File
@@ -1,39 +0,0 @@
/*
* This file is part of Applied Energistics 2.
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
*
* Applied Energistics 2 is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Applied Energistics 2 is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
*/
package appeng.api;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* Use this annotation on a class in your Mod to have it instantiated during the initialization phase of Applied
* Energistics.
* AE expects your class to have a single constructor and can supply certain arguments to your constructor using
* dependency injection.
*/
@Target( ElementType.TYPE )
@Retention( RetentionPolicy.RUNTIME )
@Documented
public @interface AEPlugin
{}
+38 -1
View File
@@ -24,7 +24,11 @@
package appeng.api;
import appeng.api.definitions.Blocks;
import appeng.api.definitions.IDefinitions;
import appeng.api.definitions.Items;
import appeng.api.definitions.Materials;
import appeng.api.definitions.Parts;
import appeng.api.exceptions.FailedConnection;
import appeng.api.features.IRegistryContainer;
import appeng.api.networking.IGridBlock;
@@ -33,9 +37,10 @@ import appeng.api.networking.IGridNode;
import appeng.api.parts.IPartHelper;
import appeng.api.storage.IStorageHelper;
@AEInjectable
public interface IAppEngApi
{
/**
* @return Registry Container for the numerous registries in AE2.
*/
@@ -51,6 +56,38 @@ public interface IAppEngApi
*/
IPartHelper partHelper();
/**
* @return an accessible list of all of AE's Items
*
* @deprecated use {@link appeng.api.definitions.IDefinitions#items()}
*/
@Deprecated
Items items();
/**
* @return an accessible list of all of AE's materials; materials are items
*
* @deprecated use {@link appeng.api.definitions.IDefinitions#materials()}
*/
@Deprecated
Materials materials();
/**
* @return an accessible list of all of AE's blocks
*
* @deprecated use {@link appeng.api.definitions.IDefinitions#blocks()}
*/
@Deprecated
Blocks blocks();
/**
* @return an accessible list of all of AE's parts, parts are items
*
* @deprecated use {@link appeng.api.definitions.IDefinitions#parts()}
*/
@Deprecated
Parts parts();
/**
* @return an accessible list of all AE definitions
*/
@@ -27,11 +27,7 @@ package appeng.api.config;
public enum FuzzyMode
{
// Note that percentage damaged, is the inverse of percentage durability.
IGNORE_ALL( -1 ),
PERCENT_99( 0 ),
PERCENT_75( 25 ),
PERCENT_50( 50 ),
PERCENT_25( 75 );
IGNORE_ALL( -1 ), PERCENT_99( 0 ), PERCENT_75( 25 ), PERCENT_50( 50 ), PERCENT_25( 75 );
public final float breakPoint;
public final float percentage;
@@ -28,7 +28,9 @@ public enum PowerUnits
{
AE( "gui.appliedenergistics2.units.appliedenergstics" ), // Native Units - AE Energy
EU( "gui.appliedenergistics2.units.ic2" ), // IndustrialCraft 2 - Energy Units
RF( "gui.appliedenergistics2.units.rf" ); // RF - Redstone Flux
WA( "gui.appliedenergistics2.units.rotarycraft" ), // RotaryCraft - Watts
RF( "gui.appliedenergistics2.units.thermalexpansion" ), // ThermalExpansion - Redstone Flux
MK( "gui.appliedenergistics2.units.mekanism" ); // Mekanism - Joules
/**
* unlocalized name for the power unit.
@@ -52,7 +54,7 @@ public enum PowerUnits
* will normally returns 64, as it will convert the EU, to AE with AE's power settings.
*
* @param target target power unit
* @param value value
* @param value value
*
* @return value converted to target units, from this units.
*/
@@ -26,5 +26,5 @@ package appeng.api.config;
public enum SearchBoxMode
{
AUTOSEARCH, MANUAL_SEARCH, JEI_AUTOSEARCH, JEI_MANUAL_SEARCH
AUTOSEARCH, MANUAL_SEARCH, NEI_AUTOSEARCH, NEI_MANUAL_SEARCH
}
@@ -25,7 +25,6 @@ package appeng.api.config;
import java.util.EnumSet;
import javax.annotation.Nonnull;
@@ -34,5 +34,6 @@ public enum TunnelType
ITEM, // Item Tunnel
LIGHT, // Light Tunnel
BUNDLED_REDSTONE, // Bundled Redstone Tunnel
COMPUTER_MESSAGE // Computer Message Tunnel
COMPUTER_MESSAGE, // Computer Message Tunnel
PRESSURE // PneumaticCraft Tunnel
}
+43 -5
View File
@@ -29,7 +29,10 @@ import java.util.Map;
import net.minecraft.item.ItemStack;
import com.google.common.base.Optional;
import appeng.api.definitions.IItemDefinition;
import appeng.api.util.AEItemDefinition;
public enum Upgrades
@@ -44,8 +47,17 @@ public enum Upgrades
*/
FUZZY( 1 ), SPEED( 1 ), INVERTER( 1 );
private final int tier;
private final Map<ItemStack, Integer> supportedMax = new HashMap<>();
/**
* @deprecated use {@link Upgrades#getTier()}
*/
@Deprecated
public final int tier;
/**
* @deprecated use {@link Upgrades#getSupported()}
*/
@Deprecated
private final Map<ItemStack, Integer> supportedMax = new HashMap<ItemStack, Integer>();
Upgrades( final int tier )
{
@@ -63,18 +75,22 @@ public enum Upgrades
/**
* Registers a specific amount of this upgrade into a specific machine
*
* @param item machine in which this upgrade can be installed
* @param item machine in which this upgrade can be installed
* @param maxSupported amount how many upgrades can be installed
*/
public void registerItem( final IItemDefinition item, final int maxSupported )
{
item.maybeStack( 1 ).ifPresent( is -> this.registerItem( is, maxSupported ) );
final Optional<ItemStack> maybeStack = item.maybeStack( 1 );
for( final ItemStack stack : maybeStack.asSet() )
{
this.registerItem( stack, maxSupported );
}
}
/**
* Registers a specific amount of this upgrade into a specific machine
*
* @param stack machine in which this upgrade can be installed
* @param stack machine in which this upgrade can be installed
* @param maxSupported amount how many upgrades can be installed
*/
public void registerItem( final ItemStack stack, final int maxSupported )
@@ -85,6 +101,28 @@ public enum Upgrades
}
}
/**
* Registers a specific amount of this upgrade into a specific machine
*
* @param item machine in which this upgrade can be installed
* @param maxSupported amount how many upgrades can be installed
*
* @deprecated use {@link Upgrades#registerItem(IItemDefinition, int)}
*/
@Deprecated
public void registerItem( final AEItemDefinition item, final int maxSupported )
{
if( item != null )
{
final ItemStack stack = item.stack( 1 );
if( stack != null )
{
this.registerItem( stack, maxSupported );
}
}
}
public int getTier()
{
return this.tier;
@@ -0,0 +1,131 @@
/*
* The MIT License (MIT)
*
* Copyright (c) 2013 AlgorithmX2
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package appeng.api.definitions;
import appeng.api.util.AEItemDefinition;
/**
* @deprecated use {@link IBlocks} now
*/
@Deprecated
public class Blocks
{
public AEItemDefinition blockQuartzOre;
public AEItemDefinition blockQuartzOreCharged;
public AEItemDefinition blockMatrixFrame;
public AEItemDefinition blockQuartz;
public AEItemDefinition blockQuartzPillar;
public AEItemDefinition blockQuartzChiseled;
public AEItemDefinition blockQuartzGlass;
public AEItemDefinition blockQuartzVibrantGlass;
public AEItemDefinition blockQuartzTorch;
public AEItemDefinition blockFluix;
public AEItemDefinition blockSkyStone;
public AEItemDefinition blockSkyChest;
public AEItemDefinition blockSkyCompass;
public AEItemDefinition blockGrindStone;
public AEItemDefinition blockCrankHandle;
public AEItemDefinition blockInscriber;
public AEItemDefinition blockWireless;
public AEItemDefinition blockCharger;
public AEItemDefinition blockTinyTNT;
public AEItemDefinition blockSecurity;
public AEItemDefinition blockQuantumRing;
public AEItemDefinition blockQuantumLink;
public AEItemDefinition blockSpatialPylon;
public AEItemDefinition blockSpatialIOPort;
public AEItemDefinition blockMultiPart;
public AEItemDefinition blockController;
public AEItemDefinition blockDrive;
public AEItemDefinition blockChest;
public AEItemDefinition blockInterface;
public AEItemDefinition blockCellWorkbench;
public AEItemDefinition blockIOPort;
public AEItemDefinition blockCondenser;
public AEItemDefinition blockEnergyAcceptor;
public AEItemDefinition blockVibrationChamber;
public AEItemDefinition blockQuartzGrowthAccelerator;
public AEItemDefinition blockEnergyCell;
public AEItemDefinition blockEnergyCellDense;
public AEItemDefinition blockEnergyCellCreative;
public AEItemDefinition blockCraftingUnit;
public AEItemDefinition blockCraftingAccelerator;
public AEItemDefinition blockCraftingStorage1k;
public AEItemDefinition blockCraftingStorage4k;
public AEItemDefinition blockCraftingStorage16k;
public AEItemDefinition blockCraftingStorage64k;
public AEItemDefinition blockCraftingMonitor;
public AEItemDefinition blockMolecularAssembler;
public AEItemDefinition blockLightDetector;
public AEItemDefinition blockPaint;
}
@@ -1,31 +1,12 @@
/*
* This file is part of Applied Energistics 2.
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
*
* Applied Energistics 2 is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Applied Energistics 2 is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
*/
package appeng.api.definitions;
import java.util.Optional;
import net.minecraft.block.Block;
import net.minecraft.item.ItemBlock;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess;
import com.google.common.base.Optional;
public interface IBlockDefinition extends IItemDefinition
{
@@ -43,9 +24,11 @@ public interface IBlockDefinition extends IItemDefinition
* Compare Block with world.
*
* @param world world of block
* @param pos location
* @param x x pos of block
* @param y y pos of block
* @param z z pos of block
*
* @return if the block is placed in the world at the specific location.
*/
boolean isSameAs( IBlockAccess world, BlockPos pos );
boolean isSameAs( IBlockAccess world, int x, int y, int z );
}
@@ -41,53 +41,45 @@ public interface IBlocks
/*
* decorative
*/
IBlockDefinition quartzBlock();
IBlockDefinition quartz();
IBlockDefinition quartzPillar();
IBlockDefinition chiseledQuartzBlock();
IBlockDefinition quartzChiseled();
IBlockDefinition quartzGlass();
IBlockDefinition quartzVibrantGlass();
IBlockDefinition quartzFixture();
IBlockDefinition quartzTorch();
IBlockDefinition fluixBlock();
IBlockDefinition fluix();
IBlockDefinition skyStoneBlock();
IBlockDefinition skyStone();
IBlockDefinition smoothSkyStoneBlock();
IBlockDefinition skyStoneBrick();
IBlockDefinition skyStoneSmallBrick();
IBlockDefinition skyStoneChest();
IBlockDefinition smoothSkyStoneChest();
IBlockDefinition skyChest();
IBlockDefinition skyCompass();
IBlockDefinition skyStoneStairs();
IBlockDefinition skyStoneStair();
IBlockDefinition smoothSkyStoneStairs();
IBlockDefinition skyStoneBlockStair();
IBlockDefinition skyStoneBrickStairs();
IBlockDefinition skyStoneBrickStair();
IBlockDefinition skyStoneSmallBrickStairs();
IBlockDefinition skyStoneSmallBrickStair();
IBlockDefinition fluixStairs();
IBlockDefinition fluixStair();
IBlockDefinition quartzStairs();
IBlockDefinition quartzStair();
IBlockDefinition chiseledQuartzStairs();
IBlockDefinition chiseledQuartzStair();
IBlockDefinition quartzPillarStairs();
IBlockDefinition quartzPillarStair();
IBlockDefinition skyStoneSlab();
IBlockDefinition smoothSkyStoneSlab();
IBlockDefinition skyStoneBlockSlab();
IBlockDefinition skyStoneBrickSlab();
@@ -104,19 +96,19 @@ public interface IBlocks
/*
* misc
*/
ITileDefinition grindstone();
ITileDefinition grindStone();
ITileDefinition crank();
ITileDefinition crankHandle();
ITileDefinition inscriber();
ITileDefinition wirelessAccessPoint();
ITileDefinition wireless();
ITileDefinition charger();
IBlockDefinition tinyTNT();
ITileDefinition securityStation();
ITileDefinition security();
/*
* quantum Network Bridge
@@ -1,25 +1,8 @@
/*
* This file is part of Applied Energistics 2.
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
*
* Applied Energistics 2 is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Applied Energistics 2 is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
*/
package appeng.api.definitions;
import net.minecraft.item.ItemStack;
import net.minecraft.world.IBlockAccess;
/**
@@ -39,4 +22,19 @@ public interface IComparableDefinition
* @return true if the item stack is a matching item.
*/
boolean isSameAs( ItemStack comparableStack );
/**
* Compare Block with world.
*
* @param world world of block
* @param x x pos of block
* @param y y pos of block
* @param z z pos of block
*
* @return if the block is placed in the world at the specific location.
*
* @deprecated moved to {@link IBlockDefinition}. Is removed in the next major release rv3
*/
@Deprecated
boolean isSameAs( IBlockAccess world, int x, int y, int z );
}
@@ -24,9 +24,7 @@
package appeng.api.definitions;
import java.util.Optional;
import javax.annotation.Nonnull;
import com.google.common.base.Optional;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
@@ -34,13 +32,6 @@ import net.minecraft.item.ItemStack;
public interface IItemDefinition extends IComparableDefinition
{
/**
* @return the unique name of the definition which will be used to register the underlying structure. Will never be
* null
*/
@Nonnull
String identifier();
/**
* @return the {@link Item} Implementation if applicable
*/
@@ -123,7 +123,7 @@ public interface IMaterials
IItemDefinition woodenGear();
IItemDefinition wirelessReceiver();
IItemDefinition wireless();
IItemDefinition wirelessBooster();
@@ -78,13 +78,15 @@ public interface IParts
IItemDefinition p2PTunnelLiquids();
// IItemDefinition p2PTunnelEU();
IItemDefinition p2PTunnelEU();
// IItemDefinition p2PTunnelRF();
IItemDefinition p2PTunnelRF();
IItemDefinition p2PTunnelLight();
// IItemDefinition p2PTunnelOpenComputers();
IItemDefinition p2PTunnelOpenComputers();
IItemDefinition p2PTunnelPneumaticCraft();
IItemDefinition cableAnchor();
@@ -1,28 +1,10 @@
/*
* This file is part of Applied Energistics 2.
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
*
* Applied Energistics 2 is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Applied Energistics 2 is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
*/
package appeng.api.definitions;
import java.util.Optional;
import net.minecraft.tileentity.TileEntity;
import com.google.common.base.Optional;
public interface ITileDefinition extends IBlockDefinition
{
@@ -0,0 +1,110 @@
/*
* The MIT License (MIT)
*
* Copyright (c) 2013 AlgorithmX2
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package appeng.api.definitions;
import appeng.api.util.AEColoredItemDefinition;
import appeng.api.util.AEItemDefinition;
/**
* @deprecated use {@link IItems}
*/
@Deprecated
public class Items
{
public AEItemDefinition itemCertusQuartzAxe;
public AEItemDefinition itemCertusQuartzHoe;
public AEItemDefinition itemCertusQuartzShovel;
public AEItemDefinition itemCertusQuartzPick;
public AEItemDefinition itemCertusQuartzSword;
public AEItemDefinition itemCertusQuartzWrench;
public AEItemDefinition itemCertusQuartzKnife;
public AEItemDefinition itemNetherQuartzAxe;
public AEItemDefinition itemNetherQuartzHoe;
public AEItemDefinition itemNetherQuartzShovel;
public AEItemDefinition itemNetherQuartzPick;
public AEItemDefinition itemNetherQuartzSword;
public AEItemDefinition itemNetherQuartzWrench;
public AEItemDefinition itemNetherQuartzKnife;
public AEItemDefinition itemEntropyManipulator;
public AEItemDefinition itemWirelessTerminal;
public AEItemDefinition itemBiometricCard;
public AEItemDefinition itemChargedStaff;
public AEItemDefinition itemMassCannon;
public AEItemDefinition itemMemoryCard;
public AEItemDefinition itemNetworkTool;
public AEItemDefinition itemPortableCell;
public AEItemDefinition itemCellCreative;
public AEItemDefinition itemViewCell;
public AEItemDefinition itemCell1k;
public AEItemDefinition itemCell4k;
public AEItemDefinition itemCell16k;
public AEItemDefinition itemCell64k;
public AEItemDefinition itemSpatialCell2;
public AEItemDefinition itemSpatialCell16;
public AEItemDefinition itemSpatialCell128;
public AEItemDefinition itemFacade;
public AEItemDefinition itemCrystalSeed;
public AEItemDefinition itemEncodedPattern;
public AEItemDefinition itemColorApplicator;
public AEColoredItemDefinition itemPaintBall;
public AEColoredItemDefinition itemLumenPaintBall;
}
@@ -0,0 +1,143 @@
/*
* The MIT License (MIT)
*
* Copyright (c) 2013 AlgorithmX2
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package appeng.api.definitions;
import appeng.api.util.AEItemDefinition;
/**
* @deprecated use {@link IMaterials}
*/
@Deprecated
public class Materials
{
public AEItemDefinition materialCell2SpatialPart;
public AEItemDefinition materialCell16SpatialPart;
public AEItemDefinition materialCell128SpatialPart;
public AEItemDefinition materialSilicon;
public AEItemDefinition materialSkyDust;
public AEItemDefinition materialCalcProcessorPress;
public AEItemDefinition materialEngProcessorPress;
public AEItemDefinition materialLogicProcessorPress;
public AEItemDefinition materialCalcProcessorPrint;
public AEItemDefinition materialEngProcessorPrint;
public AEItemDefinition materialLogicProcessorPrint;
public AEItemDefinition materialSiliconPress;
public AEItemDefinition materialSiliconPrint;
public AEItemDefinition materialNamePress;
public AEItemDefinition materialLogicProcessor;
public AEItemDefinition materialCalcProcessor;
public AEItemDefinition materialEngProcessor;
public AEItemDefinition materialBasicCard;
public AEItemDefinition materialAdvCard;
public AEItemDefinition materialPurifiedCertusQuartzCrystal;
public AEItemDefinition materialPurifiedNetherQuartzCrystal;
public AEItemDefinition materialPurifiedFluixCrystal;
public AEItemDefinition materialCell1kPart;
public AEItemDefinition materialCell4kPart;
public AEItemDefinition materialCell16kPart;
public AEItemDefinition materialCell64kPart;
public AEItemDefinition materialEmptyStorageCell;
public AEItemDefinition materialCardRedstone;
public AEItemDefinition materialCardSpeed;
public AEItemDefinition materialCardCapacity;
public AEItemDefinition materialCardFuzzy;
public AEItemDefinition materialCardInverter;
public AEItemDefinition materialCardCrafting;
public AEItemDefinition materialEnderDust;
public AEItemDefinition materialFlour;
public AEItemDefinition materialGoldDust;
public AEItemDefinition materialIronDust;
public AEItemDefinition materialFluixDust;
public AEItemDefinition materialCertusQuartzDust;
public AEItemDefinition materialNetherQuartzDust;
public AEItemDefinition materialMatterBall;
public AEItemDefinition materialIronNugget;
public AEItemDefinition materialCertusQuartzCrystal;
public AEItemDefinition materialCertusQuartzCrystalCharged;
public AEItemDefinition materialFluixCrystal;
public AEItemDefinition materialFluixPearl;
public AEItemDefinition materialWoodenGear;
public AEItemDefinition materialWireless;
public AEItemDefinition materialWirelessBooster;
public AEItemDefinition materialAnnihilationCore;
public AEItemDefinition materialFormationCore;
public AEItemDefinition materialSingularity;
public AEItemDefinition materialQESingularity;
public AEItemDefinition materialBlankPattern;
}
@@ -0,0 +1,106 @@
/*
* The MIT License (MIT)
*
* Copyright (c) 2013 AlgorithmX2
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package appeng.api.definitions;
import appeng.api.util.AEColoredItemDefinition;
import appeng.api.util.AEItemDefinition;
/**
* @deprecated use {@link IParts}
*/
@Deprecated
public class Parts
{
public AEColoredItemDefinition partCableSmart;
public AEColoredItemDefinition partCableCovered;
public AEColoredItemDefinition partCableGlass;
public AEColoredItemDefinition partCableDense;
public AEColoredItemDefinition partLumenCableSmart;
public AEColoredItemDefinition partLumenCableCovered;
public AEColoredItemDefinition partLumenCableGlass;
public AEColoredItemDefinition partLumenCableDense;
public AEItemDefinition partQuartzFiber;
public AEItemDefinition partToggleBus;
public AEItemDefinition partInvertedToggleBus;
public AEItemDefinition partStorageBus;
public AEItemDefinition partImportBus;
public AEItemDefinition partExportBus;
public AEItemDefinition partInterface;
public AEItemDefinition partLevelEmitter;
public AEItemDefinition partAnnihilationPlane;
public AEItemDefinition partFormationPlane;
public AEItemDefinition partP2PTunnelME;
public AEItemDefinition partP2PTunnelRedstone;
public AEItemDefinition partP2PTunnelItems;
public AEItemDefinition partP2PTunnelLiquids;
public AEItemDefinition partP2PTunnelEU;
public AEItemDefinition partP2PTunnelRF;
public AEItemDefinition partP2PTunnelLight;
public AEItemDefinition partCableAnchor;
public AEItemDefinition partMonitor;
public AEItemDefinition partSemiDarkMonitor;
public AEItemDefinition partDarkMonitor;
public AEItemDefinition partInterfaceTerminal;
public AEItemDefinition partPatternTerminal;
public AEItemDefinition partCraftingTerminal;
public AEItemDefinition partTerminal;
public AEItemDefinition partStorageMonitor;
public AEItemDefinition partConversionMonitor;
}
@@ -24,7 +24,7 @@
package appeng.api.events;
import net.minecraftforge.fml.common.eventhandler.Event;
import cpw.mods.fml.common.eventhandler.Event;
import appeng.api.features.ILocatable;
@@ -48,14 +48,7 @@ public class LocatableEventAnnounce extends Event
public enum LocatableEvent
{
/**
* Adds the locatable to the registry
*/
REGISTER,
/**
* Removes the locatable from the registry
*/
UNREGISTER
Register, // Adds the locatable to the registry
Unregister // Removes the locatable from the registry
}
}
@@ -1,21 +1,3 @@
/*
* This file is part of Applied Energistics 2.
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
*
* Applied Energistics 2 is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Applied Energistics 2 is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
*/
package appeng.api.exceptions;
@@ -1,21 +1,3 @@
/*
* This file is part of Applied Energistics 2.
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
*
* Applied Energistics 2 is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Applied Energistics 2 is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
*/
package appeng.api.exceptions;
@@ -45,8 +45,8 @@ public interface IGrinderRegistry
/**
* add a new recipe the easy way, in &#8594; out, how many turns., duplicates will not be added.
*
* @param in input
* @param out output
* @param in input
* @param out output
* @param turns amount of turns to turn the input into the output
*/
void addRecipe( ItemStack in, ItemStack out, int turns );
@@ -54,24 +54,24 @@ public interface IGrinderRegistry
/**
* add a new recipe with optional outputs, duplicates will not be added.
*
* @param in input
* @param out output
* @param in input
* @param out output
* @param optional optional output
* @param chance chance to get the optional output within 0.0 - 1.0
* @param turns amount of turns to turn the input into the outputs
* @param chance chance to get the optional output within 0.0 - 1.0
* @param turns amount of turns to turn the input into the outputs
*/
void addRecipe( ItemStack in, ItemStack out, ItemStack optional, float chance, int turns );
/**
* add a new recipe with optional outputs, duplicates will not be added.
*
* @param in input
* @param out output
* @param optional optional output
* @param chance chance to get the optional output within 0.0 - 1.0
* @param in input
* @param out output
* @param optional optional output
* @param chance chance to get the optional output within 0.0 - 1.0
* @param optional2 second optional output
* @param chance2 chance to get the second optional output within 0.0 - 1.0
* @param turns amount of turns to turn the input into the outputs
* @param chance2 chance to get the second optional output within 0.0 - 1.0
* @param turns amount of turns to turn the input into the outputs
*/
void addRecipe( ItemStack in, ItemStack out, ItemStack optional, float chance, ItemStack optional2, float chance2, int turns );
@@ -1,31 +1,13 @@
/*
* This file is part of Applied Energistics 2.
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
*
* Applied Energistics 2 is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Applied Energistics 2 is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
*/
package appeng.api.features;
import java.util.List;
import java.util.Optional;
import javax.annotation.Nonnull;
import net.minecraft.item.ItemStack;
import com.google.common.base.Optional;
/**
* Registration Records for {@link IInscriberRegistry}
@@ -1,26 +1,7 @@
/*
* This file is part of Applied Energistics 2.
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
*
* Applied Energistics 2 is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Applied Energistics 2 is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
*/
package appeng.api.features;
import java.util.Collection;
import javax.annotation.Nonnull;
import net.minecraft.item.ItemStack;
@@ -1,20 +1,3 @@
/*
* This file is part of Applied Energistics 2.
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
*
* Applied Energistics 2 is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Applied Energistics 2 is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
*/
package appeng.api.features;
@@ -29,6 +29,18 @@ package appeng.api.features;
*/
public interface ILocatableRegistry
{
/**
* Attempts to find the object with the serial specified, if it can it
* returns the object.
*
* @param serial serial
*
* @return requestedObject, or null
*
* @deprecated use {@link ILocatableRegistry#getLocatableBy(long)}
*/
@Deprecated
Object findLocatableBySerial( long serial );
/**
* Gets the {@link ILocatable} with the registered serial, if available
@@ -33,7 +33,7 @@ public interface IMatterCannonAmmoRegistry
/**
* register a new ammo, generally speaking this is based off of atomic weight to make it easier to guess at
*
* @param ammo new ammo
* @param ammo new ammo
* @param weight atomic weight
*/
void registerAmmo( ItemStack ammo, double weight );
@@ -42,9 +42,9 @@ public interface INetworkEncodable
/**
* Encode the wireless frequency via the Controller.
*
* @param item the wireless terminal.
* @param item the wireless terminal.
* @param encKey the wireless encryption key.
* @param name null for now.
* @param name null for now.
*/
void setEncryptionKey( ItemStack item, String encKey, String name );
}
@@ -42,7 +42,7 @@ public interface IP2PTunnelRegistry
* attunements for AE's P2P Tunnels
*
* @param trigger - the item which triggers attunement. Nullable, but then ignored
* @param type - the type of tunnel. Nullable, but then ignored
* @param type - the type of tunnel. Nullable, but then ignored
*/
void addNewAttunement( @Nullable ItemStack trigger, @Nullable TunnelType type );
@@ -24,11 +24,10 @@
package appeng.api.features;
import appeng.api.AEInjectable;
import appeng.api.movable.IMovableRegistry;
import appeng.api.networking.IGridCacheRegistry;
import appeng.api.parts.IPartModels;
import appeng.api.storage.ICellRegistry;
import appeng.api.storage.IExternalStorageRegistry;
/**
@@ -37,7 +36,6 @@ import appeng.api.storage.ICellRegistry;
* @version rv2
* @since rv0
*/
@AEInjectable
public interface IRegistryContainer
{
@@ -51,6 +49,12 @@ public interface IRegistryContainer
*/
IGridCacheRegistry gridCache();
/**
* Add additional storage bus handlers to improve interplay with mod blocks that contains special inventories that
* function unlike vanilla chests. AE uses this internally for barrels, DSU's, quantum chests, AE Networks and more.
*/
IExternalStorageRegistry externalStorage();
/**
* Add additional special comparison functionality, AE Uses this internally for Bees.
*/
@@ -105,9 +109,4 @@ public interface IRegistryContainer
* get access to the world-gen api.
*/
IWorldGen worldgen();
/**
* Register your IPart models before using them.
*/
IPartModels partModels();
}
@@ -47,8 +47,8 @@ public interface IWirelessTermHandler extends INetworkEncodable
* use an amount of power, in AE units
*
* @param amount is in AE units ( 5 per MJ ), if you return false, the item should be dead and return false for
* hasPower
* @param is wireless terminal
* hasPower
* @param is wireless terminal
*
* @return true if wireless terminal uses power
*/
@@ -41,6 +41,6 @@ public interface IWorldGen
enum WorldGenType
{
CERTUS_QUARTZ, CHARGED_CERTUS_QUARTZ, METEORITES
CertusQuartz, ChargedCertusQuartz, Meteorites
}
}
@@ -1,21 +1,3 @@
/*
* This file is part of Applied Energistics 2.
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
*
* Applied Energistics 2 is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Applied Energistics 2 is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
*/
package appeng.api.features;
@@ -24,10 +6,10 @@ public enum InscriberProcessType
/**
* uses the optionals as catalyst
*/
INSCRIBE,
Inscribe,
/**
* spends the optionals
*/
PRESS
Press
}
@@ -41,7 +41,7 @@ public interface ICraftingPatternItem
* Access Details about a pattern
*
* @param is pattern
* @param w crafting world
* @param w crafting world
*
* @return details of pattern
*/
@@ -25,7 +25,6 @@ package appeng.api.implementations.guiobjects;
import net.minecraft.item.ItemStack;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
@@ -36,5 +35,5 @@ import net.minecraft.world.World;
public interface IGuiItem
{
IGuiItemObject getGuiObject( ItemStack is, World world, BlockPos pos );
IGuiItemObject getGuiObject( ItemStack is, World world, int x, int y, int z );
}
@@ -26,7 +26,6 @@ package appeng.api.implementations.items;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.util.math.BlockPos;
/**
@@ -40,9 +39,11 @@ public interface IAEWrench
* Check if the wrench can be used.
*
* @param player wrenching player
* @param pos of block.
* @param x x pos of wrenched block
* @param y y pos of wrenched block
* @param z z pos of wrenched block
*
* @return true if wrench can be used
*/
boolean canWrench( ItemStack wrench, EntityPlayer player, BlockPos pos );
boolean canWrench( ItemStack wrench, EntityPlayer player, int x, int y, int z );
}
@@ -26,10 +26,10 @@ package appeng.api.implementations.items;
import java.util.EnumSet;
import com.mojang.authlib.GameProfile;
import net.minecraft.item.ItemStack;
import com.mojang.authlib.GameProfile;
import appeng.api.config.SecurityPermissions;
import appeng.api.features.IPlayerRegistry;
import appeng.api.networking.security.ISecurityRegistry;
@@ -39,7 +39,7 @@ public interface IBiometricCard
{
/**
* Set the {@link GameProfile} to null, to clear it.
* Set the {@link GameProfile} to null, to clear it.
*/
void setProfile( ItemStack itemStack, GameProfile username );
@@ -67,7 +67,7 @@ public interface IBiometricCard
/**
* remove a permission from the item stack.
*
* @param itemStack card
* @param itemStack card
* @param permission to be removed permission
*/
void removePermission( ItemStack itemStack, SecurityPermissions permission );
@@ -75,7 +75,7 @@ public interface IBiometricCard
/**
* add a permission to the item stack.
*
* @param itemStack card
* @param itemStack card
* @param permission to be added permission
*/
void addPermission( ItemStack itemStack, SecurityPermissions permission );
@@ -84,8 +84,8 @@ public interface IBiometricCard
* lets you handle submission of security values on the card for custom behavior.
*
* @param registry security registry
* @param pr player registry
* @param is card
* @param pr player registry
* @param is card
*/
void registerPermissions( ISecurityRegistry registry, IPlayerRegistry pr, ItemStack is );
}
@@ -41,11 +41,11 @@ public interface IMemoryCard
* Configures the data stored on the memory card, the SettingsName, will be
* localized when displayed.
*
* @param is item
* @param is item
* @param SettingsName unlocalized string that represents the tile entity.
* @param data may contain a String called "tooltip" which is is a
* unlocalized string displayed after the settings name, optional
* but can be used to add details to the card for later.
* @param data may contain a String called "tooltip" which is is a
* unlocalized string displayed after the settings name, optional
* but can be used to add details to the card for later.
*/
void setMemoryCardContents( ItemStack is, String SettingsName, NBTTagCompound data );
@@ -72,7 +72,7 @@ public interface IMemoryCard
* notify the user of a outcome related to the memory card.
*
* @param player that used the card.
* @param msg which message to send.
* @param msg which message to send.
*/
void notifyUser( EntityPlayer player, MemoryCardMessages msg );
}
@@ -89,10 +89,10 @@ public interface ISpatialStorageCell
/**
* Perform a spatial swap with the contents of the cell, and the world.
*
* @param is spatial storage cell
* @param w world of spatial
* @param min min coord
* @param max max coord
* @param is spatial storage cell
* @param w world of spatial
* @param min min coord
* @param max max coord
* @param doTransition transition
*
* @return result of transition
@@ -53,6 +53,18 @@ public interface IStorageCell extends ICellWorkbenchItem
*/
int getBytes( ItemStack cellItem );
/**
* Determines the number of bytes used for any type included on the cell.
*
* @param cellItem item
*
* @return number of bytes
*
* @deprecated use {@link IStorageCell#getBytesPerType(ItemStack)}
*/
@Deprecated
int BytePerType( ItemStack cellItem );
/**
* Determines the number of bytes used for any type included on the cell.
*
@@ -77,7 +89,7 @@ public interface IStorageCell extends ICellWorkbenchItem
* don't care, just return false; As the handler for this type of cell is
* still the default cells, the normal AE black list is also applied.
*
* @param cellItem item
* @param cellItem item
* @param requestedAddition requested addition
*
* @return true to preventAdditionOfItem
@@ -27,7 +27,7 @@ package appeng.api.implementations.parts;
import java.util.EnumSet;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.EnumFacing;
import net.minecraftforge.common.util.ForgeDirection;
import appeng.api.networking.IGridHost;
import appeng.api.parts.BusSupport;
@@ -35,11 +35,10 @@ import appeng.api.parts.IPart;
import appeng.api.parts.IPartHost;
import appeng.api.util.AECableType;
import appeng.api.util.AEColor;
import appeng.api.util.AEPartLocation;
/**
* Implemented on the {@link IPart}s cable objects that can be placed at {@link AEPartLocation}.UNKNOWN in
* Implemented on the {@link IPart}s cable objects that can be placed at {@link ForgeDirection}.UNKNOWN in
* {@link IPartHost}s
*/
public interface IPartCable extends IPart, IGridHost
@@ -76,7 +75,7 @@ public interface IPartCable extends IPart, IGridHost
*
* @param sides sides of cable
*/
void setValidSides( EnumSet<EnumFacing> sides );
void setValidSides( EnumSet<ForgeDirection> sides );
/**
* used to tests if a cable connects to neighbors visually.
@@ -85,6 +84,5 @@ public interface IPartCable extends IPart, IGridHost
*
* @return true if this side is currently connects to an external block.
*/
boolean isConnected( EnumFacing side );
boolean isConnected( ForgeDirection side );
}
@@ -25,7 +25,7 @@ package appeng.api.implementations.tiles;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.EnumFacing;
import net.minecraftforge.common.util.ForgeDirection;
import appeng.api.util.AEColor;
@@ -35,5 +35,5 @@ public interface IColorableTile
AEColor getColor();
boolean recolourBlock( EnumFacing side, AEColor colour, EntityPlayer who );
boolean recolourBlock( ForgeDirection side, AEColor colour, EntityPlayer who );
}
@@ -25,7 +25,7 @@ package appeng.api.implementations.tiles;
import net.minecraft.inventory.InventoryCrafting;
import net.minecraft.util.EnumFacing;
import net.minecraftforge.common.util.ForgeDirection;
import appeng.api.networking.crafting.ICraftingPatternDetails;
@@ -36,13 +36,13 @@ public interface ICraftingMachine
/**
* inserts a crafting plan, and the necessary items into the crafting machine.
*
* @param patternDetails details of pattern
* @param table crafting table
* @param patternDetails details of pattern
* @param table crafting table
* @param ejectionDirection ejection direction
*
* @return if it was accepted, all or nothing.
*/
boolean pushPattern( ICraftingPatternDetails patternDetails, InventoryCrafting table, EnumFacing ejectionDirection );
boolean pushPattern( ICraftingPatternDetails patternDetails, InventoryCrafting table, ForgeDirection ejectionDirection );
/**
* check if the crafting machine is accepting pushes via pushPattern, if this is false, all calls to push will fail,
@@ -24,7 +24,7 @@
package appeng.api.implementations.tiles;
import net.minecraft.util.EnumFacing;
import net.minecraftforge.common.util.ForgeDirection;
/**
@@ -55,5 +55,5 @@ public interface ICrankable
/**
* @return true if the crank can attach on the given side.
*/
boolean canCrankAttach( EnumFacing directionToCrank );
boolean canCrankAttach( ForgeDirection directionToCrank );
}
@@ -27,7 +27,7 @@ package appeng.api.implementations.tiles;
import appeng.api.networking.energy.IEnergySource;
public interface IMEChest extends IChestOrDrive, IEnergySource
public interface IMEChest extends IChestOrDrive, ITileStorageMonitorable, IEnergySource
{
}
@@ -21,19 +21,20 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package appeng.api.client;
package appeng.api.implementations.tiles;
import java.util.List;
import net.minecraftforge.common.util.ForgeDirection;
import net.minecraft.block.state.IBlockState;
import net.minecraft.client.renderer.block.model.IBakedModel;
import net.minecraft.util.EnumFacing;
import appeng.api.networking.security.BaseActionSource;
import appeng.api.storage.IStorageMonitorable;
public interface BakingPipelineElement<F, T>
/**
* Implemented on inventories that can share their inventories with other networks, best example, ME Interface.
*/
public interface ITileStorageMonitorable
{
public List<T> pipe( List<F> elements, IBakedModel parent, IBlockState state, EnumFacing side, long rand );
IStorageMonitorable getMonitorable( ForgeDirection side, BaseActionSource src );
}
@@ -0,0 +1,43 @@
/*
* The MIT License (MIT)
*
* Copyright (c) 2013 AlgorithmX2
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package appeng.api.integration;
/**
* An interface to get access to the individual settings for AE's Internal Bee
* Comparison handler.
*
* Assessable via: ( IBeeComparison )
* IAEItemStack.getTagCompound().getSpecialComparison()
*
* If you don't have the forestry API, just delete this file when using the API.
*/
public interface IBeeComparison
{
/**
* @return the Forestry IIndividual for this comparison object - cast this to a IIndividual if you want to use it.
*/
Object getIndividual();
}
@@ -25,7 +25,6 @@ package appeng.api.movable;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
@@ -37,7 +36,7 @@ public interface IMovableHandler
* that single entity, you cannot opt out of single entities.
*
* @param myClass tile entity class
* @param tile tile entity
* @param tile tile entity
*
* @return true if it can handle moving
*/
@@ -51,22 +50,20 @@ public interface IMovableHandler
* Potential Example:
*
* <pre>
* {
* &#064;code
* Chunk c = world.getChunkFromBlockCoords( x, z );
* c.setChunkBlockTileEntity( x &amp; 0xF, y + y, z &amp; 0xF, tile );
* {@code
* Chunk c = world.getChunkFromBlockCoords( x, z ); c.setChunkBlockTileEntity( x
* & 0xF, y + y, z & 0xF, tile );
*
* if( c.isChunkLoaded )
* {
* world.addTileEntity( tile );
* world.markBlockForUpdate( x, y, z );
* }
* if ( c.isChunkLoaded ) { world.addTileEntity( tile ); world.markBlockForUpdate( x,
* y, z ); }
* }
* </pre>
*
* @param tile to be moved tile
* @param tile to be moved tile
* @param world world of tile
* @param newPosition the new location
* @param x x coord of tile
* @param y y coord of tile
* @param z z coord of tile
*/
void moveTile( TileEntity tile, World world, BlockPos newPosition );
void moveTile( TileEntity tile, World world, int x, int y, int z );
}
@@ -56,8 +56,7 @@ public enum GridFlags
DENSE_CAPACITY,
/**
* This block is part of a multiblock, used in conjunction with REQUIRE_CHANNEL, and {@link IGridMultiblock} see
* this
* This block is part of a multiblock, used in conjunction with REQUIRE_CHANNEL, and {@link IGridMultiblock} see this
* interface for details.
*/
MULTIBLOCK,
@@ -29,5 +29,5 @@ public enum GridNotification
/**
* the visible connections for this node have changed, useful for cable.
*/
CONNECTIONS_CHANGED,
ConnectionsChanged,
}
@@ -27,7 +27,7 @@ package appeng.api.networking;
import java.util.EnumSet;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumFacing;
import net.minecraftforge.common.util.ForgeDirection;
import appeng.api.parts.IPart;
import appeng.api.util.AEColor;
@@ -85,7 +85,7 @@ public interface IGridBlock
/**
* Update Blocks network/connection/booting status. grid,
*
* @param grid grid
* @param grid grid
* @param channelsInUse used channels
*/
void setNetworkStatus( IGrid grid, int channelsInUse );
@@ -94,7 +94,7 @@ public interface IGridBlock
* Determine which sides of the block can be connected too, only used when isWorldAccessible returns true, not used
* for {@link IPart} implementations.
*/
EnumSet<EnumFacing> getConnectableSides();
EnumSet<ForgeDirection> getConnectableSides();
/**
* @return the IGridHost for the node, this will be an IGridPart or a TileEntity generally speaking.
@@ -48,7 +48,7 @@ public interface IGridCache
* information, do it on the next updateTick.
*
* @param gridNode removed from that grid
* @param machine to be removed machine
* @param machine to be removed machine
*/
void removeNode( IGridNode gridNode, IGridHost machine );
@@ -60,7 +60,7 @@ public interface IGridCache
* information, do it on the next updateTick.
*
* @param gridNode added to grid node
* @param machine to be added machine
* @param machine to be added machine
*/
void addNode( IGridNode gridNode, IGridHost machine );
@@ -24,7 +24,7 @@
package appeng.api.networking;
import appeng.api.util.AEPartLocation;
import net.minecraftforge.common.util.ForgeDirection;
/**
@@ -54,7 +54,7 @@ public interface IGridConnection
*
* @return the direction of the connection, only valid for in world connections.
*/
AEPartLocation getDirection( IGridNode gridNode );
ForgeDirection getDirection( IGridNode gridNode );
/**
* by destroying a connection you may create new grids, and trigger un-expected behavior, you should only destroy
@@ -25,10 +25,10 @@ package appeng.api.networking;
import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.common.util.ForgeDirection;
import appeng.api.parts.IPart;
import appeng.api.util.AECableType;
import appeng.api.util.AEPartLocation;
/**
@@ -44,12 +44,12 @@ public interface IGridHost
* Grid when your block is ready.
*
* @param dir feel free to ignore this, most blocks will use the same node
* for every side.
* for every side.
*
* @return a new IGridNode, create these with
* AEApi.INSTANCE().createGridNode( MyIGridBlock )
*/
IGridNode getGridNode( AEPartLocation dir );
IGridNode getGridNode( ForgeDirection dir );
/**
* Determines how cables render when they connect to this block. Priority is
@@ -57,7 +57,7 @@ public interface IGridHost
*
* @param dir direction
*/
AECableType getCableConnectionType( AEPartLocation dir );
AECableType getCableConnectionType( ForgeDirection dir );
/**
* break this host, its violating security rules, just break your block, or part.
@@ -28,9 +28,9 @@ import java.util.EnumSet;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
import appeng.api.IAppEngApi;
import appeng.api.util.AEPartLocation;
import appeng.api.util.IReadOnlyCollection;
@@ -89,9 +89,9 @@ public interface IGridNode
World getWorld();
/**
* @return a set of the connected sides, INTERNAL represents an invisible connection
* @return a set of the connected sides, UNKNOWN represents an invisible connection
*/
EnumSet<AEPartLocation> getConnectedSides();
EnumSet<ForgeDirection> getConnectedSides();
/**
* lets you iterate a nodes connections
@@ -119,7 +119,7 @@ public interface IGridNode
*
* Important: You must call this before updateState.
*
* @param name nbt name
* @param name nbt name
* @param nodeData to be loaded data
*/
void loadFromNBT( String name, NBTTagCompound nodeData );
@@ -128,7 +128,7 @@ public interface IGridNode
* this should be called for each node you maintain, you can save all your nodes to the same tag with different
* names, if you fail to complete the load / save procedure, network state may be lost between game load/saves.
*
* @param name nbt name
* @param name nbt name
* @param nodeData to be saved data
*/
void saveToNBT( String name, NBTTagCompound nodeData );
@@ -155,8 +155,7 @@ public interface IGridNode
/**
* tell the node who was responsible for placing it, failure to do this may result in in-compatibility with the
* security system. Called instead of loadFromNBT when initially placed, once set never required again, the value is
* saved with the Node NBT.
* security system. Called instead of loadFromNBT when initially placed, once set never required again, the value is saved with the Node NBT.
*
* @param playerID new player id
*/
@@ -26,11 +26,11 @@ package appeng.api.networking.crafting;
import java.util.concurrent.Future;
import net.minecraft.world.World;
import com.google.common.collect.ImmutableCollection;
import com.google.common.collect.ImmutableSet;
import net.minecraft.world.World;
import appeng.api.networking.IGrid;
import appeng.api.networking.IGridCache;
import appeng.api.networking.security.BaseActionSource;
@@ -42,9 +42,9 @@ public interface ICraftingGrid extends IGridCache
/**
* @param whatToCraft requested craft
* @param world crafting world
* @param slot slot index
* @param details pattern details
* @param world crafting world
* @param slot slot index
* @param details pattern details
*
* @return a collection of crafting patterns for the item in question.
*/
@@ -53,12 +53,12 @@ public interface ICraftingGrid extends IGridCache
/**
* Begin calculating a crafting job.
*
* @param world crafting world
* @param grid network
* @param world crafting world
* @param grid network
* @param actionSrc source
* @param craftWhat result
* @param callback callback
* -- optional
* @param callback callback
* -- optional
*
* @return a future which will at an undetermined point in the future get you the {@link ICraftingJob} do not wait
* on this, your be waiting forever.
@@ -68,14 +68,13 @@ public interface ICraftingGrid extends IGridCache
/**
* Submit the job to the Crafting system for processing.
*
* @param job - the crafting job from beginCraftingJob
* @param job - the crafting job from beginCraftingJob
* @param requestingMachine - a machine if its being requested via automation, may be null.
* @param target - can be null
* @param prioritizePower - if cpu is null, this determine if the system should prioritize power, or if it should
* find the lower
* end cpus, automatic processes generally should pick lower end cpus.
* @param src - the action source to use when starting the job, this will be used for extracting items, should
* usually be the same as the one provided to beginCraftingJob.
* @param target - can be null
* @param prioritizePower - if cpu is null, this determine if the system should prioritize power, or if it should find the lower
* end cpus, automatic processes generally should pick lower end cpus.
* @param src - the action source to use when starting the job, this will be used for extracting items, should
* usually be the same as the one provided to beginCraftingJob.
*
* @return null ( if failed ) or an {@link ICraftingLink} other wise, if you send requestingMachine you need to
* properly keep track of this and handle the nbt saving and loading of the object as well as the
@@ -38,7 +38,7 @@ public interface ICraftingMedium
* possible the output should be directed.
*
* @param patternDetails details
* @param table crafting table
* @param table crafting table
*
* @return if the pattern was successfully pushed.
*/
@@ -48,7 +48,7 @@ public interface ICraftingPatternDetails
/**
* @param slotIndex specific slot index
* @param itemStack item in slot
* @param world crafting world
* @param world crafting world
*
* @return if an item can be used in the specific slot for this pattern.
*/
@@ -88,7 +88,7 @@ public interface ICraftingPatternDetails
* Allow using this INSTANCE of the pattern details to preform the crafting action with performance enhancements.
*
* @param craftingInv inventory
* @param world crafting world
* @param world crafting world
*
* @return the crafted ( work bench ) item.
*/
@@ -47,7 +47,7 @@ public interface ICraftingRequester extends IActionHost
* be returned.
*
* @param items item
* @param mode action mode
* @param mode action mode
*
* @return unwanted item
*/
@@ -42,7 +42,7 @@ public interface ICraftingWatcherHost
* Called when a crafting status changes.
*
* @param craftingGrid current crafting grid
* @param what change
* @param what change
*/
void onRequestChange( ICraftingGrid craftingGrid, IAEItemStack what );
}
@@ -37,7 +37,7 @@ public interface IAEPowerStorage extends IEnergySource
/**
* Inject amt, power into the device, it will store what it can, and return the amount unable to be stored.
*
* @param amt to be injected amount
* @param amt to be injected amount
* @param mode action mode
*
* @return amount of power which was unable to be stored
@@ -74,7 +74,7 @@ public interface IEnergyGrid extends IGridCache, IEnergySource, IEnergyGridProvi
* Another important note, is that if a network that had overflow is deleted, its power is gone, this is one of the
* reasons why keeping overflow to a minimum is important.
*
* @param amt power to inject into the network
* @param amt power to inject into the network
* @param mode should the action be simulated or performed?
*
* @return the amount of power that the network has OVER the limit.
@@ -34,7 +34,7 @@ public interface IEnergySource
/**
* Extract power from the network.
*
* @param amt extracted power
* @param amt extracted power
* @param mode should the action be simulated or performed?
*
* @return returns extracted power.
@@ -30,7 +30,8 @@ import appeng.api.networking.energy.IEnergyGrid;
/**
* Posted by the network when the power status of the network goes up or down,
* the change is reflected via the {@link IEnergyGrid}.isNetworkPowered() or via {@link IGridNode}.isActive()
* the change is reflected via the {@link IEnergyGrid}.isNetworkPowered() or via
* {@link IGridNode}.isActive()
*
* Note: Most machines just need to check {@link IGridNode}.isActive()
*/
@@ -36,7 +36,7 @@ public class MENetworkSpatialEvent extends MENetworkEvent
public final double spatialEnergyUsage;
/**
* @param SpatialIO ( INSTANCE of the SpatialIO block )
* @param SpatialIO ( INSTANCE of the SpatialIO block )
* @param EnergyUsage ( the amount of energy that the SpatialIO uses)
*/
public MENetworkSpatialEvent( final IGridHost SpatialIO, final double EnergyUsage )
@@ -23,9 +23,7 @@
package appeng.api.networking.security;
/**
* TODO: Consider refactoring.
*/
public class BaseActionSource
{
@@ -42,7 +42,7 @@ public interface ISecurityGrid extends IGridCache
* Check if a player has permissions.
*
* @param player to be checked player
* @param perm checked permissions
* @param perm checked permissions
*
* @return true if the player has permissions.
*/
@@ -52,7 +52,7 @@ public interface ISecurityGrid extends IGridCache
* Check if a player has permissions.
*
* @param playerID id of player
* @param perm checked permissions
* @param perm checked permissions
*
* @return true if the player has permissions.
*/
@@ -38,7 +38,7 @@ public interface ISecurityRegistry
/**
* Submit Permissions into the register.
*
* @param playerID player id
* @param playerID player id
* @param permissions permissions of player
*/
void addPlayer( int playerID, EnumSet<SecurityPermissions> permissions );
@@ -23,9 +23,7 @@
package appeng.api.networking.security;
/**
* TODO: Consider refactoring.
*/
public class MachineSource extends BaseActionSource
{
@@ -26,9 +26,7 @@ package appeng.api.networking.security;
import net.minecraft.entity.player.EntityPlayer;
/**
* TODO: Consider refactoring.
*/
public class PlayerSource extends BaseActionSource
{
@@ -32,8 +32,7 @@ public interface ISpatialCache extends IGridCache
{
/**
* @return true if a region is defined at all, it doesn't have to be valid, but all points must be in the same
* world.
* @return true if a region is defined at all, it doesn't have to be valid, but all points must be in the same world.
*/
boolean hasRegion();
@@ -44,11 +44,11 @@ public interface IStackWatcherHost
/**
* Called when a watched item changes amounts.
*
* @param o changed item list
* @param o changed item list
* @param fullStack old stack
* @param diffStack new stack
* @param src action source
* @param chan storage channel
* @param src action source
* @param chan storage channel
*/
void onStackChange( IItemList o, IAEStack fullStack, IAEStack diffStack, BaseActionSource src, StorageChannel chan );
}
@@ -68,8 +68,8 @@ public interface IGridTickable
* Note: this is never called if you return null from getTickingRequest.
*
* @param TicksSinceLastCall the number of world ticks that were skipped since your last
* tick, you can use this to adjust speed of processing or adjust
* your tick rate.
* tick, you can use this to adjust speed of processing or adjust
* your tick rate.
*
* @return tick rate adjustment.
*/
+3 -3
View File
@@ -21,8 +21,8 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
@API( apiVersion = "@aeversion@", owner = "appliedenergistics2", provides = "appliedenergistics2|API" )
package appeng.api;
@API( apiVersion = "@aeversion@", owner = "appliedenergistics2", provides = "appliedenergistics2|API" ) package appeng.api;
import net.minecraftforge.fml.common.API;
import cpw.mods.fml.common.API;
@@ -28,6 +28,7 @@ public enum BusSupport
{
CABLE,
DENSE_CABLE
DENSE_CABLE,
NO_PARTS
}
@@ -26,9 +26,9 @@ package appeng.api.parts;
public enum CableRenderMode
{
STANDARD( false ),
Standard( false ),
CABLE_VIEW( true );
CableView( true );
public final boolean transparentFacades;
public final boolean opaqueFacades;
@@ -29,8 +29,7 @@ import java.io.IOException;
import io.netty.buffer.ByteBuf;
import net.minecraft.nbt.NBTTagCompound;
import appeng.api.util.AEPartLocation;
import net.minecraftforge.common.util.ForgeDirection;
/**
@@ -51,12 +50,12 @@ public interface IFacadeContainer
/**
* Removed the facade on the given side, or does nothing.
*/
void removeFacade( IPartHost host, AEPartLocation side );
void removeFacade( IPartHost host, ForgeDirection side );
/**
* @return the {@link IFacadePart} for a given side, or null.
*/
IFacadePart getFacade( AEPartLocation s );
IFacadePart getFacade( ForgeDirection s );
/**
* rotate the facades left.
+38 -18
View File
@@ -24,14 +24,15 @@
package appeng.api.parts;
import javax.annotation.Nullable;
import net.minecraft.block.state.IBlockState;
import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.entity.Entity;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.AxisAlignedBB;
import net.minecraftforge.common.util.ForgeDirection;
import appeng.api.util.AEPartLocation;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
/**
@@ -51,14 +52,43 @@ public interface IFacadePart
* used to collide, and pick the part
*
* @param ch collision helper
* @param e colliding entity
* @param e colliding entity
*/
void getBoxes( IPartCollisionHelper ch, Entity e );
/**
* render the part.
*
* @param x x pos of part
* @param y y pos of part
* @param z z pos of part
* @param instance render helper
* @param renderer renderer
* @param fc face container
* @param busBounds bounding box
* @param renderStilt if to render stilt
*/
@SideOnly( Side.CLIENT )
void renderStatic( int x, int y, int z, IPartRenderHelper instance, RenderBlocks renderer, IFacadeContainer fc, AxisAlignedBB busBounds, boolean renderStilt );
/**
* render the part in inventory.
*
* @param instance render helper
* @param renderer renderer
*/
@SideOnly( Side.CLIENT )
void renderInventory( IPartRenderHelper instance, RenderBlocks renderer );
/**
* @return side the facade is in
*/
AEPartLocation getSide();
ForgeDirection getSide();
/**
* @return the box for the face of the facade
*/
AxisAlignedBB getPrimaryBox();
Item getItem();
@@ -66,17 +96,7 @@ public interface IFacadePart
boolean notAEFacade();
void setThinFacades( boolean useThinFacades );
boolean isTransparent();
/**
* The item that this facade masquerades as.
*/
@Nullable
ItemStack getTextureItem();
/**
* @return The block state used for rendering.
*/
IBlockState getBlockState();
}
+66 -84
View File
@@ -25,35 +25,30 @@ package appeng.api.parts;
import java.io.IOException;
import java.util.Collections;
import java.util.List;
import java.util.Random;
import io.netty.buffer.ByteBuf;
import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.EnumHand;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Vec3d;
import net.minecraft.util.IIcon;
import net.minecraft.util.Vec3;
import net.minecraft.world.World;
import net.minecraftforge.common.capabilities.Capability;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import net.minecraftforge.common.util.ForgeDirection;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import appeng.api.networking.IGridNode;
import appeng.api.util.AECableType;
import appeng.api.util.AEColor;
import appeng.api.util.AEPartLocation;
public interface IPart extends IBoxProvider, ICustomCableConnection
public interface IPart extends IBoxProvider
{
/**
@@ -71,13 +66,50 @@ public interface IPart extends IBoxProvider, ICustomCableConnection
ItemStack getItemStack( PartItemStack type );
/**
* Render dynamic portions of this part, as part of the cable bus TESR. This part has to return true for {@link #requireDynamicRender()} in order for
* this method to be called.
* render item form for inventory, or entity.
*
* GL Available
*
* @param rh helper
* @param renderer renderer
*/
@SideOnly( Side.CLIENT )
default void renderDynamic( double x, double y, double z, float partialTicks, int destroyStage )
{
}
void renderInventory( IPartRenderHelper rh, RenderBlocks renderer );
/**
* render world renderer ( preferred )
*
* GL is NOT Available
*
* @param x x coord
* @param y y coord
* @param z z coord
* @param rh helper
* @param renderer renderer
*/
@SideOnly( Side.CLIENT )
void renderStatic( int x, int y, int z, IPartRenderHelper rh, RenderBlocks renderer );
/**
* render TESR.
*
* GL Available
*
* @param x x coord
* @param y y coord
* @param z z coord
* @param rh helper
* @param renderer renderer
*/
@SideOnly( Side.CLIENT )
void renderDynamic( double x, double y, double z, IPartRenderHelper rh, RenderBlocks renderer );
/**
* @return the Block sheet icon used when rendering the breaking particles, return null to use the ItemStack
* texture.
*/
@SideOnly( Side.CLIENT )
IIcon getBreakingTexture();
/**
* return true only if your part require dynamic rendering, must be consistent.
@@ -201,61 +233,61 @@ public interface IPart extends IBoxProvider, ICustomCableConnection
* @param host part side
* @param tile tile entity of part
*/
void setPartHostInfo( AEPartLocation side, IPartHost host, TileEntity tile );
void setPartHostInfo( ForgeDirection side, IPartHost host, TileEntity tile );
/**
* Called when you right click the part, very similar to Block.onActivateBlock
*
* @param player right clicking player
* @param pos position of block
* @param pos position of block
*
* @return if your activate method performed something.
*/
boolean onActivate( EntityPlayer player, EnumHand hand, Vec3d pos );
boolean onActivate( EntityPlayer player, Vec3 pos );
/**
* Called when you right click the part, very similar to Block.onActivateBlock
*
* @param player shift right clicking player
* @param pos position of block
* @param pos position of block
*
* @return if your activate method performed something, you should use false unless you really need it.
*/
boolean onShiftActivate( EntityPlayer player, EnumHand hand, Vec3d pos );
boolean onShiftActivate( EntityPlayer player, Vec3 pos );
/**
* Add drops to the items being dropped into the world, if your item stores its contents when wrenched use the
* wrenched boolean to control what data is saved vs dropped when it is broken.
*
* @param drops item drops if wrenched
* @param drops item drops if wrenched
* @param wrenched control flag for wrenched vs broken
*/
void getDrops( List<ItemStack> drops, boolean wrenched );
/**
* @return 0 - 8, reasonable default 3-4, this controls the cable connection to the node. -1 to render connection
* yourself.
* @return 0 - 8, reasonable default 3-4, this controls the cable connection to the node.
*/
@Override
public float getCableConnectionLength( AECableType cable );
int cableConnectionRenderTo();
/**
* same as Block.randomDisplayTick, for but parts.
*
* @param world world of block
* @param pos location of block
* @param r random
* @param x x coord of block
* @param y y coord of block
* @param z z coord of block
* @param r random
*/
void randomDisplayTick( World world, BlockPos pos, Random r );
void randomDisplayTick( World world, int x, int y, int z, Random r );
/**
* Called when placed in the world by a player, this happens before addWorld.
*
* @param player placing player
* @param held held item
* @param side placing side
* @param held held item
* @param side placing side
*/
void onPlacement( EntityPlayer player, EnumHand hand, ItemStack held, AEPartLocation side );
void onPlacement( EntityPlayer player, ItemStack held, ForgeDirection side );
/**
* Used to determine which parts can be placed on what cables.
@@ -265,54 +297,4 @@ public interface IPart extends IBoxProvider, ICustomCableConnection
* @return true if the part can be placed on this support.
*/
boolean canBePlacedOn( BusSupport what );
/**
* This method is used when a chunk is rebuilt to determine how this part should be rendered. The returned models should represent the
* part oriented north. They will be automatically rotated to match the part's actual orientation. Tint indices 1-4 can be used in the
* models to access the parts color.
*
* <dl>
* <dt>Tint Index 1</dt>
* <dd>The {@link AEColor#blackVariant dark variant color} of the cable that this part is attached to.</dd>
* <dt>Tint Index 2</dt>
* <dd>The {@link AEColor#mediumVariant color} of the cable that this part is attached to.</dd>
* <dt>Tint Index 3</dt>
* <dd>The {@link AEColor#whiteVariant bright variant color} of the cable that this part is attached to.</dd>
* <dt>Tint Index 4</dt>
* <dd>A color variant that is between the cable's {@link AEColor#mediumVariant color} and its {@link AEColor#whiteVariant bright variant}.</dd>
* </dl>
*
* <b>Important:</b> All models must have been registered via the {@link IPartModels} API before use.
*/
default List<ResourceLocation> getStaticModels()
{
return Collections.emptyList();
}
/**
* Implement this method if your part exposes capabilitys. Any requests for capabilities on the cable bus will be forwarded to parts on the appropriate
* side.
*
* @see TileEntity#hasCapability(Capability, EnumFacing)
*
* @return True if your part has the requested capability.
*/
default boolean hasCapability( Capability<?> capabilityClass )
{
return false;
}
/**
* Implement this method if your part exposes capabilitys. Any requests for capabilities on the cable bus will be forwarded to parts on the appropriate
* side.
*
* @see TileEntity#getCapability(Capability, EnumFacing)
*
* @return The capability or null.
*/
default <T> T getCapability( Capability<T> capabilityClass )
{
return null;
}
}
@@ -24,7 +24,7 @@
package appeng.api.parts;
import net.minecraft.util.EnumFacing;
import net.minecraftforge.common.util.ForgeDirection;
public interface IPartCollisionHelper
@@ -47,17 +47,17 @@ public interface IPartCollisionHelper
/**
* @return east in world space.
*/
EnumFacing getWorldX();
ForgeDirection getWorldX();
/**
* @return up in world space.
*/
EnumFacing getWorldY();
ForgeDirection getWorldY();
/**
* @return forward in world space.
*/
EnumFacing getWorldZ();
ForgeDirection getWorldZ();
/**
* @return true if this test is to get the BB Collision information.
+19 -14
View File
@@ -26,18 +26,15 @@ package appeng.api.parts;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumActionResult;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.EnumHand;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
public interface IPartHelper
{
/**
* Register a new layer with the part layer system, this allows you to write an in between between tile entities and
* parts.
* Register a new layer with the part layer system, this allows you to write
* an in between between tile entities and parts.
*
* AE By Default includes,
*
@@ -55,25 +52,33 @@ public interface IPartHelper
*
* 7. IPipeConnection BC Pipe Connections
*
* As long as a valid layer is registered for a interface you can simply implement that interface on a part get
* implement it.
* As long as a valid layer is registered for a interface you can simply
* implement that interface on a part get implement it.
*
* @return true on success, false on failure, usually a error will be logged as well.
* @return true on success, false on failure, usually a error will be logged
* as well.
*/
boolean registerNewLayer( String string, String layerInterface );
/**
* Register IBusItem with renderer
*/
void setItemBusRenderer( IPartItem i );
/**
* use in use item, to try and place a IBusItem
*
* @param is ItemStack of an item which implements {@link IPartItem}
* @param pos pos of part
* @param side side which the part should be on
* @param is ItemStack of an item which implements {@link IPartItem}
* @param x x pos of part
* @param y y pos of part
* @param z z pos of part
* @param side side which the part should be on
* @param player player placing part
* @param world part in world
* @param world part in world
*
* @return true if placing was successful
*/
EnumActionResult placeBus( ItemStack is, BlockPos pos, EnumFacing side, EntityPlayer player, EnumHand hand, World world );
boolean placeBus( ItemStack is, int x, int y, int z, int side, EntityPlayer player, World world );
/**
* @return the render mode
+17 -29
View File
@@ -29,21 +29,19 @@ import java.util.Set;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.EnumHand;
import net.minecraft.util.math.Vec3d;
import net.minecraft.util.Vec3;
import net.minecraftforge.common.util.ForgeDirection;
import appeng.api.util.AEColor;
import appeng.api.util.AEPartLocation;
import appeng.api.util.DimensionalCoord;
/**
* Implemented on AE's TileEntity.
* Implemented on AE's TileEntity or AE's FMP Part.
*
* Do Not Implement
*/
public interface IPartHost extends ICustomCableConnection
public interface IPartHost
{
/**
@@ -52,7 +50,7 @@ public interface IPartHost extends ICustomCableConnection
IFacadeContainer getFacadeContainer();
/**
* Test if you can add a part to the specified side of the Part Host, {@link AEPartLocation}.UNKNOWN is used to
* Test if you can add a part to the specified side of the Part Host, {@link ForgeDirection}.UNKNOWN is used to
* represent the cable in the middle.
*
* @param part to be added part
@@ -60,37 +58,28 @@ public interface IPartHost extends ICustomCableConnection
*
* @return returns false if the part cannot be added.
*/
boolean canAddPart( ItemStack part, AEPartLocation side );
boolean canAddPart( ItemStack part, ForgeDirection side );
/**
* try to add a new part to the specified side, returns false if it failed to be added.
*
* @param is new part
* @param side onto side
* @param is new part
* @param side onto side
* @param owner with owning player
*
* @return null if the item failed to add, the side it was placed on other wise ( may different for cables,
* {@link AEPartLocation}.UNKNOWN )
* {@link ForgeDirection}.UNKNOWN )
*/
AEPartLocation addPart( ItemStack is, AEPartLocation side, EntityPlayer owner, EnumHand hand );
ForgeDirection addPart( ItemStack is, ForgeDirection side, EntityPlayer owner );
/**
* Get part by side ( center is {@link AEPartLocation}.UNKNOWN )
* Get part by side ( center is {@link ForgeDirection}.UNKNOWN )
*
* @param side side of part
*
* @return the part located on the specified side, or null if there is no part.
*/
IPart getPart( AEPartLocation side );
/**
* Get part by side, this method cannot aquire the center part, you must use the other varient of getPart.
*
* @param side side of part
*
* @return the part located on the specified side, or null if there is no part.
*/
IPart getPart( EnumFacing side );
IPart getPart( ForgeDirection side );
/**
* removes the part on the side, this doesn't drop it or anything, if you don't do something with it, its just
@@ -98,10 +87,10 @@ public interface IPartHost extends ICustomCableConnection
*
* if you want to drop the part you must request it prior to removing it.
*
* @param side side of part
* @param side side of part
* @param suppressUpdate - used if you need to replace a part's INSTANCE, without really removing it first.
*/
void removePart( AEPartLocation side, boolean suppressUpdate );
void removePart( ForgeDirection side, boolean suppressUpdate );
/**
* something changed, might want to send a packet to clients to update state.
@@ -134,7 +123,7 @@ public interface IPartHost extends ICustomCableConnection
*
* @return returns if microblocks are blocking this cable path.
*/
boolean isBlocked( EnumFacing side );
boolean isBlocked( ForgeDirection side );
/**
* finds the part located at the position ( pos must be relative, not global )
@@ -143,7 +132,7 @@ public interface IPartHost extends ICustomCableConnection
*
* @return a new SelectedPart, this is never null.
*/
SelectedPart selectPart( Vec3d pos );
SelectedPart selectPart( Vec3 pos );
/**
* can be used by parts to trigger the tile or part to save.
@@ -162,7 +151,7 @@ public interface IPartHost extends ICustomCableConnection
*
* @return true of the part host is receiving redstone from an external source.
*/
boolean hasRedstone( AEPartLocation side );
boolean hasRedstone( ForgeDirection side );
/**
* returns false if this block contains any parts or facades, true other wise.
@@ -190,5 +179,4 @@ public interface IPartHost extends ICustomCableConnection
* @return true if tile is in world
*/
boolean isInWorld();
}

Some files were not shown because too many files have changed in this diff Show More