Compare commits

..

165 Commits

Author SHA1 Message Date
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
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
3483 changed files with 128688 additions and 168721 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:
-30
View File
@@ -1,30 +0,0 @@
---
name: Bug report
about: You found a bug or encountered a crash? Please report it here.
---
<!-- Provide a summary of the issue in the Title above, please do not "[Tag]" it. -->
**Describe the bug**
<!-- Always use the most recent version from ae-mod.info, it might already be fixed. -->
**To Reproduce**
<!-- Please provide the steps to reproduce it, otherwise we might not be able to fix it. -->
**Expected behavior**
<!-- A clear and concise description of what you expected to happen. -->
**Additional context**
<!-- Screenshots, crashlogs, etc. -->
<!-- A complete crashlog is required when reporting a crash. No excerpts. -->
<!-- Please use pastebin or gist for posting the complete crashlog. -->
**Environment**
<!-- Include as many relevant details about the environment -->
<!-- Like the used version, SP/MP, other mods and their version -->
<!-- The following ones are required, please note "latest" is not a version -->
- Minecraft Version:
- AE2 Version:
- Forge Version:
-17
View File
@@ -1,17 +0,0 @@
---
name: Feature Request
about: A feature request or suggestion to improve Applied Energistics 2
---
<!-- Provide a summary of the issue in the Title above, please do not "[Tag]" it. -->
**Describe the feature**
<!-- Tell us how it should work. -->
**Reasons why it should be considered**
<!-- This can help us in various degrees, e.g. to determine if it fits our design ideas. -->
**Additional Context**
<!-- Use this for further details, e.g. screenshots, links to mods for integrations. -->
<!-- Features will only be considered for the latest/next version. -->
-23
View File
@@ -1,23 +0,0 @@
name: Build
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up OpenJDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'adopt' # You can choose other OpenJDK distributions.
- name: Update Build Script (Before Build)
run: ./gradlew updateBuildScript
- name: Build with Gradle
run: ./gradlew build
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: AE2-UEL
path: build/libs/*.jar # Make sure this path matches the location of your build artifacts
-82
View File
@@ -1,82 +0,0 @@
# Publishes built jars to distribution platforms
name: Publish
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+' # any semver tag, e.g. 1.2.3
env:
# type of release
RELEASE_TYPE: "release"
jobs:
Publish:
runs-on: ubuntu-latest
permissions:
contents: write # needed to create GitHub releases
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Check for Duplicate Tags
run: |
if git rev-parse -q --verify "refs/tags/${{ github.ref }}" >/dev/null; then
echo "Tag already exists. A version bump is required."
exit 1
fi
- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '17'
- name: Build Project
uses: gradle/gradle-build-action@v2
with:
arguments: 'build --build-cache --daemon' # use the daemon here so the rest of the process is faster
generate-job-summary: false
gradle-home-cache-includes: |
caches
jdks
notifications
wrapper
- name: Publish to GitHub
uses: softprops/action-gh-release@v1
with:
files: "build/libs/*.jar"
generate_release_notes: true
fail_on_unmatched_files: true
- name: Publish to Maven
uses: gradle/gradle-build-action@v2
env:
MAVEN_USER: "${{secrets.MAVEN_USER}}"
MAVEN_PASSWORD: "${{secrets.MAVEN_PASSWORD}}"
with:
arguments: 'publish --daemon'
generate-job-summary: false
gradle-home-cache-includes: |
caches
jdks
notifications
wrapper
- name: Publish to Curseforge
uses: gradle/gradle-build-action@v2
env:
CURSEFORGE_API_KEY: "${{secrets.CURSEFORGE_API_KEY}}"
CURSEFORGE_PROJECT_ID: "${{secrets.CURSEFORGE_PROJECT_ID}}"
RELEASE_TYPE: "${{env.RELEASE_TYPE}}"
with:
arguments: 'curseforge --daemon'
generate-job-summary: false
gradle-home-cache-includes: |
caches
jdks
notifications
wrapper
-39
View File
@@ -1,39 +0,0 @@
# Updates the Gradle Cache when relevant files change
name: Update Gradle Cache
on:
workflow_dispatch:
push:
branches:
- master
paths:
- "gradle**" # covers gradle folder, gradle.properties, gradlew
- "build.gradle*"
- "settings.gradle*"
- "src/main/resources/*_at.cfg" # access transformers
jobs:
Update_Cache:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '17'
- name: Update Cache
uses: gradle/gradle-build-action@v2
with:
arguments: 'test --build-cache --no-daemon' # disable daemon since only one gradle operation will happen
generate-job-summary: false
gradle-home-cache-includes: |
caches
jdks
notifications
wrapper
cache-write-only: true
+20 -78
View File
@@ -1,83 +1,25 @@
.nopublish
# exclude all
/*
### Windows ###
# include important folders
# need gradle
!gradle/
!gradlew
!gradlew.bat
!build.gradle
!gradle.properties
thumbs.db
*.db
# include markdowns
!README.md
!LICENSE
!CONTRIBUTING.md
### Java ###
# include sourcecode
!src/
*.class
# include git important files
!.gitmodules
!.gitignore
# Mobile Tools for Java (J2ME)
.mtj.tmp/
# Package Files #
*.war
*.ear
*.txt
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
### Eclipse ###
*.pydevproject
.metadata
.gradle
bin/
tmp/
*.tmp
*.bak
*.swp
*~.nib
local.properties
.settings/
.loadpath
/eclipse
# Eclipse Core
.project
# External tool builders
.externalToolBuilders/
# Locally stored "Eclipse launch configurations"
*.launch
# CDT-specific
.cproject
# JDT-specific (Eclipse Java Development Tools)
.classpath
# Java annotation processor (APT)
.factorypath
# PDT-specific
.buildpath
# sbteclipse plugin
.target
# TeXlipse plugin
.texlipse
### Intellij IDEA ###
*.iml
*.ipr
*.iws
.idea/
.idea_modules/
/classes/
/out/
/build/
# Linux
*~
run/
logs/
# code format to reduce noise in git commits
!codeformat/
-58
View File
@@ -1,58 +0,0 @@
Changes so far :
Design changes/breakages:
- Interfaces no longer spill items of one pattern on other faces
- Interfaces now push patterns in round-robin (Interfaces, then sides)
Fixes:
- Fix gregtech machines appearing with 'unnamed' or 'draconium lens' on the interface terminal on specific situations.
- Add memorycard support for fluid interfaces, import/export/storage busses and level emitters ( this fix was upstreamed to AE2 for MC 1.16)
- Storage busses now hide/show inaccessible items as configured.
- Exclusive Blocking mode for GTCE ( shapes, molds and configured circuits do not block GTCE machines )
- Blocking modes default to block on any item in the iventory the entity exposes
- Fuzzy includes items that report that they're damageable, but report a maxDamage of 0 ( auto-crafting of basic capacitors -> resonant capacitors is now possible ) <- Broken item implementation.
- Fix CME exceptions on the energy grid
- Fix AE going offline even with enough power by extracting from the local buffer always last
- Fix IO-Port copying craftable flag into items
- Fix NBT of old items not clearing on drives that reached 64 types once
Performance:
- Added @talchas fixes for insane channelless AE networks.
- Implemented StorageDrawers slotless itemrepository.
- Removed CraftedEvent calls (really bad lag with craftweaker versions before CraftTweaker2-1.12-4.1.20.626)
- Count items set in interfaces before queuing crafting for them needlessly
- Backported b7ca98d ( Avoid copying items on simulated item extraction )
- Cache some level emitters functions
- Reduced import bus insert simulation to 1 before real insertion (if possible)
- Backported itemlist re-implementation along with pattern changes to avoid CraftingManager fallback issues
- Instead of recalculating all the content of the network on every change, track the changes properly and apply them to the cached list of items
QOL:
- added highlight interface button to interface terminal ("?" button on the left of the interface slots)
- Added bar on the interface terminal that search by inputs ( The one on the LEFT, also searchs by interface name )
- Shortcut to molecular assemblers with free slots on the terminal interface by @Theisyat
- Toggle button on interface terminal to hide full interfaces
- JEI "U", "R" and "A" (Usages/Recipes/Bookmark) now work on the Crafting Status GUI. ( the one that shows the total items to craft, and whats missing)
- Patterns can now be made with items currently showing on JEI. ( This is overriden by Just Enough Energistics. )
- Added multiplier buttons to processing pattern gui
- Switched crafting terminal JEI search to fuzzy mode. If the recipe uses a damageable item, AE will try to grab it ( damaged tools )
- Encoded patterns stack up to 64 ( holding shift and clicking the encode arrow will transfer the encoded pattern to the player inventory)
- Encoded patterns can be draggred on the interface terminal.
- Storage Monitor and Conversion Monitor now also ccepts fluids
- Draggable JEI ghost items (also works on bookmarked items. SHIFT + Click will move the hovered item into the first free target slot)
- JEI auto switches between crafting and processing patterns
- GTCE Blocking mode work through phantom itemfaces
- Shift-clicking blank patterns into the pattern terminal will try to fill the blank pattern slots first
- Mismached simulated/real item count ( most often due to compacting drawers ) will now tell the player wich item cause the failure when trying to start a craft
- Added 'pattern expansion' cards that adds an extra row of patterns to interfaces. up to 3 card on an interface. (each card will increase the interface idle power draw by 4 times)
HOTKEYS:
- Implemented mousetweaks API. AE2 custom keybinds now work. (Try right clicking and use the scroll-wheel on the terminals)
- Holding SHIFT and scrolling UP and DOWN will increase the items set on the configured slots of Interfaces and Pattern Terminal (Processing mode)
+6 -11
View File
@@ -12,18 +12,15 @@ top of things.
Applied Energistics 2 crashing, have a suggestion, found a bug? Create an issue now!
1. Make sure your issue has not already been answered or fixed and you are using the latest version. Also think about whether your issue is a valid one before submitting it.
* If it is already possible with vanilla and AE2 itself, the suggestion will be considered invalid.
* Asking for a smaller version, more compact version, or more efficient version of something will also be considered invalid.
2. Go to [the issues page](https://github.com/AppliedEnergistics/Applied-Energistics-2/issues) and click [new issue](https://github.com/AppliedEnergistics/Applied-Energistics-2/issues/new)
3. Enter your a title of your issue (something that summarizes your issue), and then create a detailed description of the issue.
* Do not tag it with something like `[Feature]`, `[Bug]`, or a version.
* Restrict it to a single bug or feature, it makes managing them way easier for us.
* The following details are required. Also refer to the issue template when creating one.
* Do not tag it with something like `[Feature]` or `[Bug]`. When it is applicable, we will take care of it.
* The following details are required. Not including them can cause the issue to be closed.
* Forge version
* AE2 version
* Crash log, when reporting a crash (Please make sure to use [pastebin](http://pastebin.com/))
* Never post an excerpt of what you consider important
* Always post the full log
* Do not post an excerpt of what you consider important, instead:
* Post the full log
* Other mods and their version, when reporting an issue between AE and another mod
* Also consider updating these before submitting a new issue, it might be already fixed
* A detailed description of the bug or feature
@@ -36,12 +33,10 @@ Applied Energistics 2 crashing, have a suggestion, found a bug? Create an issue
* Mod Pack using and version?
* Keep in mind that some mods might use an outdated version of AE2
* If so you should report it to your modpack
4. Click `Submit New Issue`, and wait for feedback!
5. Click `Submit New Issue`, and wait for feedback!
Providing as many details as possible does help us to find and resolve the issue faster and also you getting a fixed version as fast as possible.
Please note that we might close any issue not matching these requirements.
### Submitting Changes
* Submit an issue to the github project, assuming one does not already exist.
@@ -113,7 +108,7 @@ the styling guidelines used by AE.
PRs that do not conform to these standards will be rejected.
You can find presets for Eclipse and IntelliJ IDEA in the `codeformat` folder.
We try to keep them up to date. Please report any case of maintaining the correct formatting.
We try to keep them up to date, but in case you find them not formatting it correctly, then please report it
### Whitespace
+160 -25
View File
@@ -1,44 +1,179 @@
# Applied Energistics 2 Unofficial Extended Life
[![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)
[![Downloads](http://cf.way2muchnoise.eu/570458.svg)](https://www.curseforge.com/minecraft/mc-mods/ae2-extended-life) [![MCVersion](http://cf.way2muchnoise.eu/versions/570458.svg)](https://www.curseforge.com/minecraft/mc-mods/ae2-extended-life) [![GitHub issues](https://img.shields.io/github/issues/AE2-UEL/Applied-Energistics-2.svg)](https://github.com/AE2-UEL/Applied-Energistics-2/issues) [![GitHub pull requests](https://img.shields.io/github/issues-pr/AE2-UEL/Applied-Energistics-2.svg)](https://github.com/AE2-UEL/Applied-Energistics-2/pulls)
# Applied Energistics 2
---
## Table of Contents
* [About](#about)
* [Contacts](#contacts)
* [License](#license)
* [Downloads](#downloads)
* [Installation](#installation)
* [Issues](#issues)
* [Building](#building)
* [Contribution](#contribution)
* [API](#applied-energistics-2-api)
* [Localization](#applied-energistics-2-localization)
* [Credits](#credits)
## About
A maintained fork of a Mod about Matter, Energy and using them to conquer the world.
A Mod about Matter, Energy and using them to conquer the world..
This project started as a fork of [Applied Energistics 2](https://github.com/AppliedEnergistics/Applied-Energistics-2) by [PrototypeTrousers](https://github.com/PrototypeTrousers), initially addressing issues related to the [Nomifactory](https://www.curseforge.com/minecraft/modpacks/nomifactory) modpack. It is now being maintained by the [AE2 Unofficial Extended Life Team](https://github.com/AE2-UEL).
## Contacts
See [Releases](https://github.com/PrototypeTrousers/Applied-Energistics-2/releases) for the compiled jars.
## RecipeStages
You need to add the following into a CraftTweaker script:
```
mods.recipestages.Recipes.setPackageStage("appeng", allStages);
```
The second argument allows you to customize which stages exactly you want to be craftable with AE2. Not sure why you would do that, but we support that nonetheless!
* [Website](http://ae-mod.info/)
* [IRC #appliedenergistics on esper.net](http://webchat.esper.net/?channels=appliedenergistics&prompt=1)
* [GitHub](https://github.com/AppliedEnergistics/Applied-Energistics-2)
## License
* Applied Energistics 2 API
- (c) 2013 - 2018 AlgorithmX2 et al
- [![License](https://img.shields.io/badge/License-MIT-red.svg?style=flat-square)](http://opensource.org/licenses/MIT)
- (c) 2013 - 2015 AlgorithmX2 et al
- [![License](https://img.shields.io/badge/License-MIT-red.svg?style=flat)](http://opensource.org/licenses/MIT)
* Applied Energistics 2
- (c) 2013 - 2018 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)
- (c) 2013 - 2015 AlgorithmX2 et al
- [![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 - 2018 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/)
- (c) 2013 - 2015 AlgorithmX2 et al
- [![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/).
## Installation
You install this mod by putting it into the `minecraft/mods/` folder. It has no additional hard dependencies.
## Issues
Applied Energistics 2 crashing, have a suggestion, found a bug? Create an issue now!
1. Make sure your issue has not already been answered or fixed and you are using the latest version. Also think about whether your issue is a valid one before submitting it.
2. Go to [the issues page](https://github.com/AppliedEnergistics/Applied-Energistics-2/issues) and click [new issue](https://github.com/AppliedEnergistics/Applied-Energistics-2/issues/new)
3. Enter your a title of your issue (something that summarizes your issue), and then create a detailed description of the issue.
* Do not tag it with something like `[Feature]` or `[Bug]`. When it is applicable, we will take care of it.
* The following details are required. Not including them can cause the issue to be closed.
* Forge version
* AE2 version
* Crash log, when reporting a crash (Please make sure to use [pastebin](http://pastebin.com/))
* Do not post an excerpt of what you consider important, instead:
* Post the full log
* Other mods and their version, when reporting an issue between AE and another mod
* Also consider updating these before submitting a new issue, it might be already fixed
* A detailed description of the bug or feature
* To further help in resolving your issues please try to include the follow if applicable:
* What was expected?
* How to reproduce the problem?
* This is usually a great detail and allows us to fix it way faster
* Server or Single Player?
* Screen shots or Pictures of the problem
* Mod Pack using and version?
* Keep in mind that some mods might use an outdated version of AE2
* If so you should report it to your modpack
5. Click `Submit New Issue`, and wait for feedback!
Providing as many details as possible does help us to find and resolve the issue faster and also you getting a fixed version as fast as possible.
## Building
1. Clone this repository via
- SSH `git clone git@github.com:AppliedEnergistics/Applied-Energistics-2.git` or
- HTTPS `git clone https://github.com/AppliedEnergistics/Applied-Energistics-2.git`
2. Setup workspace
- Decompiled source `gradlew setupDecompWorkspace`
- Obfuscated source `gradlew setupDevWorkspace`
- CI server `gradlew setupCIWorkspace`
3. Build `gradlew build`. Jar will be in `build/libs`
4. For core developer: Setup IDE
- 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
- `-Dfml.coreMods.load=appeng.transformer.AppEngCore`
## Contribution
Before you want to add major changes, you might want to discuss them with us first, before wasting your time.
If you are still willing to contribute to this project, you can contribute via [Pull-Request](https://help.github.com/articles/creating-a-pull-request).
The [guidelines for contributing](https://github.com/AppliedEnergistics/Applied-Energistics-2/blob/master/CONTRIBUTING.md) contain more detailed information about topics like the used code style and should also be considered.
Here are a few things to keep in mind that will help get your PR approved.
* A PR should be focused on content. Any PRs where the changes are only syntax will be rejected.
* Use the file you are editing as a style guide.
* Consider your feature. [Suggestion Guidelines](http://ae-mod.info/Suggestion-Guidelines/)
- Is your suggestion already possible using Vanilla + AE2?
- Make sure your feature isn't already in the works, or hasn't been rejected previously.
- Does your feature simplify another feature of AE2? These changes will not be accepted.
- If your feature can be done by any popular mod, discuss with us first.
Getting Started
1. Fork this repository
2. Clone the fork via
* SSH `git clone git@github.com:<your username>/Applied-Energistics-2.git` or
* HTTPS `git clone https://github.com/<your username>/Applied-Energistics-2.git`
3. Change code base
4. Add changes to git `git add -A`
5. Commit changes to your clone `git commit -m "<summery of made changes>"`
6. Push to your fork `git push`
7. Create a Pull-Request on GitHub
8. Wait for review
9. Squash commits for cleaner history
If you are only doing single file pull requests, GitHub supports using a quick way without the need of cloning your fork. Also read up about [synching](https://help.github.com/articles/syncing-a-fork) if you plan to contribute on regular basis.
## Applied Energistics 2 API
The API for Applied Energistics 2. It is open source to discuss changes, improve documentation, and provide better add-on support in general.
Development and standard builds can be obtained [Here](http://ae2.ae-mod.info/Downloads/).
### Maven
When compiling against the AE2 API you can use gradle dependencies, just add
dependencies {
compile "appeng:appliedenergistics2:rv_-_____-__:dev"
}
or add the compile line to your existing dependencies task to your build.gradle
Where the __ are filled in with the correct version criteria; AE2 is available from the default forge maven so no additional repositories are necessary.
An example string would be `appeng:appliedenergistics2:rv2-alpha-30:dev`
## Applied Energistics 2 Localization
### English Text
`en_US` is included in this repository, fixes to typos are welcome.
### Encoding
Files must be encoded as UTF-8.
### New Translations
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
If you have have issues localizing something feel free to contact us on IRC, at #AppliedEnergistics on Esper.net
Thanks to everyone helping out to improve localization of AE2.
## Credits
Special thanks to:
* PrototypeTrousers for the initial fork
Thanks to
* Notch et al for Minecraft
* Lex et al for MinecraftForge
* AlgorithmX2 for AppliedEnergistics2
+85 -1195
View File
File diff suppressed because it is too large Load Diff
+8 -27
View File
@@ -1,28 +1,24 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<profiles version="13">
<profile kind="CodeFormatterProfile" name="AE2" version="13">
<profiles version="12">
<profile kind="CodeFormatterProfile" name="AE2" version="12">
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_ellipsis" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_for_statment" value="common_lines"/>
<setting id="org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_method_invocation" value="common_lines"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_imports" value="2"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_switch_statement" value="common_lines"/>
<setting id="org.eclipse.jdt.core.formatter.comment.format_javadoc_comments" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.indentation.size" value="4"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_enum_constant_declaration" value="common_lines"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits" value="do not insert"/>
@@ -30,19 +26,17 @@
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.disabling_tag" value="@formatter:off"/>
<setting id="org.eclipse.jdt.core.formatter.continuation_indentation" value="2"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_enum_constants" value="80"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_enum_constants" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_imports" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_package" value="2"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_binary_operator" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_if_while_statement" value="common_lines"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.indent_root_tags" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.enabling_tag" value="@formatter:on"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.count_line_length_from_starting_position" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter" value="do not insert"/>
@@ -58,16 +52,14 @@
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameterized_type_references" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_enum_constant" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column" value="false"/>
<setting id="org.eclipse.jdt.core.compiler.problem.enumIdentifier" value="error"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.indent_statements_compare_to_block" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration" value="next_line"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration" value="end_of_line"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments" value="do not insert"/>
@@ -90,7 +82,6 @@
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_binary_expression" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_catch_clause" value="common_lines"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations" value="insert"/>
@@ -102,16 +93,15 @@
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_block" value="next_line"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration" value="next_line"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_lambda_body" value="next_line"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_lambda_body" value="end_of_line"/>
<setting id="org.eclipse.jdt.core.formatter.compact_else_if" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_type_parameters" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration" value="0"/>
<setting id="org.eclipse.jdt.core.compiler.problem.assertIdentifier" value="error"/>
<setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment" value="true"/>
@@ -122,10 +112,9 @@
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_binary_operator" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_unary_operator" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_annotation" value="common_lines"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_ellipsis" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources" value="do not insert"/>
@@ -164,18 +153,15 @@
<setting id="org.eclipse.jdt.core.formatter.alignment_for_method_declaration" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.join_wrapped_lines" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.wrap_before_conditional_operator" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines" value="2147483647"/>
<setting id="org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration" value="next_line"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_resources_in_try" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_try_clause" value="common_lines"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation" value="80"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column" value="false"/>
<setting id="org.eclipse.jdt.core.compiler.source" value="1.8"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized" value="insert"/>
@@ -197,7 +183,6 @@
<setting id="org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.wrap_before_assignment_operator" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement" value="do not insert"/>
<setting id="org.eclipse.jdt.core.compiler.codegen.targetPlatform" value="1.8"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_switch" value="next_line"/>
@@ -209,10 +194,8 @@
<setting id="org.eclipse.jdt.core.formatter.comment.format_html" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_method_delcaration" value="common_lines"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_compact_if" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.indent_empty_lines" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_type_arguments" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_unary_operator" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant" value="do not insert"/>
@@ -273,7 +256,6 @@
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_lambda_declaration" value="common_lines"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations" value="do not insert"/>
@@ -289,7 +271,6 @@
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_expressions_in_for_loop_header" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments" value="do not insert"/>
-52
View File
@@ -1,52 +0,0 @@
//file:noinspection DependencyNotationArgument
// TODO remove when fixed in RFG ^
/*
* Add your dependencies here. Common configurations:
* - implementation("group:name:version:classifier"): if you need this for internal implementation details of the mod.
* Available at compiletime and runtime for your environment.
*
* - compileOnlyApi("g:n:v:c"): if you need this for internal implementation details of the mod.
* Available at compiletime but not runtime for your environment.
*
* - annotationProcessor("g:n:v:c"): mostly for java compiler plugins, if you know you need this, use it, otherwise don't worry
*
* - testCONFIG("g:n:v:c"): replace CONFIG by one of the above, same as above but for the test sources instead of main
*
* You can exclude transitive dependencies (dependencies of the chosen dependency) by appending { transitive = false } if needed.
*
* To add a mod with CurseMaven, replace '("g:n:v:c")' in the above with 'rfg.deobf("curse.maven:project_slug-project_id:file_id")'
* Example: implementation rfg.deobf("curse.maven:gregtech-ce-unofficial-557242:4527757")
*
* To shadow a dependency, use 'shadowImplementation'. For more info, see https://github.com/GregTechCEu/Buildscripts/blob/master/docs/shadow.md
*
* For more details, see https://docs.gradle.org/8.0.1/userguide/java_library_plugin.html#sec:java_library_configurations_graph
*/
dependencies {
// Mods always in-game
implementation rfg.deobf("curse.maven:gregtechceu-557242:4429261") // GTCEu
implementation rfg.deobf("curse.maven:codechicken-lib-1-8-242818:2779848") // CCL 3.2.3.358
implementation rfg.deobf("curse.maven:baubles-227083:2518667") // Baubles
implementation rfg.deobf("curse.maven:industrial-craft-242638:2547175") // IC2
implementation rfg.deobf("curse.maven:forestry-59751:2684780") // Forestry
// Mods only in code by default
compileOnly "curse.maven:chisel-235279:2915375"
compileOnly "curse.maven:hwyla-253449:2568751"
compileOnly "curse.maven:recipe-stages-280554:3405072"
compileOnly "curse.maven:item-stages-280316:2696769"
compileOnly "curse.maven:game-stages-268655:2951844"
compileOnly "net.darkhax.tesla:Tesla-1.12.2:1.0.63"
compileOnly "curse.maven:CoFHCore-69162:2920433"
compileOnly "CraftTweaker2:CraftTweaker2-API:4.1.20.684"
compileOnly "curse.maven:inventory-tweaks-223094:2482482"
compileOnly "curse.maven:inventory-bogo-sorter-632327:4399738"
compileOnly rfg.deobf("curse.maven:ctm-267602:2915363") // CTM 1.0.2.31
compileOnly rfg.deobf("curse.maven:actually-additions-228404:3117927") // ActuallyAdditions r152
}
minecraft {
injectedTags.put('AEVERSION', aeversion)
injectedTags.put('AECHANNEL', aechannel)
injectedTags.put('AEBUILD', aebuild)
}
+52 -178
View File
@@ -1,184 +1,58 @@
modName = AE2 Unofficial Extended Life
aeversion=rv3
aechannel=alpha
aebuild=0
aegroup=appeng
aebasename=appliedenergistics2
# This is a case-sensitive string to identify your mod. Convention is to use lower case.
modId = appliedenergistics2
#########################################################
# Versions #
#########################################################
minecraft_version=1.7.10
forge_version=10.13.4.1448-1.7.10
modGroup = appeng
#########################################################
# Installable #
#########################################################
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
# Version of your mod.
# This field can be left empty if you want your mod's version to be determined by the latest git tag instead.
modVersion =
#########################################################
# Provided APIs #
#########################################################
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
# AE2 Specific Version Settings
aeversion=rv6
aechannel=stable
aebuild=7
# Whether to use the old jar naming structure (modid-mcversion-version) instead of the new version (modid-version)
includeMCVersionJar = false
# The name of your jar when you produce builds, not including any versioning info
modArchivesBaseName = ae2-uel
# Will update your build.gradle automatically whenever an update is available
autoUpdateBuildScript = false
minecraftVersion = 1.12.2
# Select a username for testing your mod with breakpoints. You may leave this empty for a random username each time you
# restart Minecraft in development. Choose this dependent on your mod:
# Do you need consistent player progressing (for example Thaumcraft)? -> Select a name
# Do you need to test how your custom blocks interacts with a player that is not the owner? -> leave name empty
# Alternatively this can be set with the 'DEV_USERNAME' environment variable.
developmentEnvironmentUserName = Developer
# Enables using modern java syntax (up to version 17) via Jabel, while still targeting JVM 8.
# See https://github.com/bsideup/jabel for details on how this works.
# Using this requires that you use a Java 17 JDK for development.
enableModernJavaSyntax = true
# Generate a class with String fields for the mod id, name and version named with the fields below
generateGradleTokenClass = appeng.Tags
gradleTokenModId = MODID
gradleTokenModName = MODNAME
gradleTokenVersion = VERSION
# In case your mod provides an API for other mods to implement you may declare its package here. Otherwise, you can
# leave this property empty.
# Example value: apiPackage = api + modGroup = com.myname.mymodid -> com.myname.mymodid.api
apiPackage = api
# If you want to keep your API code in src/api instead of src/main
useSrcApiPath = true
# Specify the configuration file for Forge's access transformers here. It must be placed into /src/main/resources/
# There can be multiple files in a comma-separated list.
# Example value: mymodid_at.cfg,jei_at.cfg
accessTransformersFile = appliedenergistics2_at.cfg
# Provides setup for Mixins if enabled. If you don't know what mixins are: Keep it disabled!
usesMixins = false
# Specify the package that contains all of your Mixins. You may only place Mixins in this package or the build will fail!
mixinsPackage =
# Automatically generates a mixin config json if enabled, with the name mixins.modid.json
generateMixinConfig = false
# Specify the core mod entry class if you use a core mod. This class must implement IFMLLoadingPlugin!
# Example value: coreModClass = asm.FMLPlugin + modGroup = com.myname.mymodid -> com.myname.mymodid.asm.FMLPlugin
coreModClass = core.AE2ELCore
# If your project is only a consolidation of mixins or a core mod and does NOT contain a 'normal' mod (meaning that
# there is no class annotated with @Mod) you want this to be true. When in doubt: leave it on false!
containsMixinsAndOrCoreModOnly = false
# Enables Mixins even if this mod doesn't use them, useful if one of the dependencies uses mixins.
forceEnableMixins = false
# Outputs pre-transformed and post-transformed loaded classes to run/CLASSLOADER_TEMP. Can be used in combination with
# diff to see exactly what your ASM or Mixins are changing in the target file.
# Optionally can be specified with the 'CORE_MOD_DEBUG' env var. Will output a lot of files!
enableCoreModDebug = false
# Adds CurseMaven, Modrinth Maven, BlameJared maven, and some more well-known 1.12.2 repositories
includeWellKnownRepositories = true
# Adds JEI and TheOneProbe to your development environment. Adds them as 'implementation', meaning they will
# be available at compiletime and runtime for your mod (in-game and in-code).
# Overrides the above setting to be always true, as these repositories are needed to fetch the mods
includeCommonDevEnvMods = true
#########################################################
# Self Compiled APIs #
#########################################################
mekansim_version=8.0.1.198
rotarycraft_version=V6e
# If enabled, you may use 'shadowCompile' for dependencies. They will be integrated in your jar. It is your
# responsibility check the licence and request permission for distribution, if required.
usesShadowedDependencies = false
# If disabled, won't remove unused classes from shaded dependencies. Some libraries use reflection to access
# their own classes, making the minimization unreliable.
minimizeShadowedDependencies = true
# If disabled, won't rename the shadowed classes.
relocateShadowedDependencies = true
# Separate run directories into "run/client" for runClient task, and "run/server" for runServer task.
# Useful for debugging a server and client simultaneously. If not enabled, it will be in the standard location "run/"
separateRunDirectories = false
# The display name format of versions published to Curse and Modrinth. $MOD_NAME and $VERSION are available variables.
# Default: $MOD_NAME \u2212 $VERSION. \u2212 is the minus character which looks much better than the hyphen minus on Curse.
versionDisplayFormat = $MOD_NAME \u2212 $VERSION
# Publishing to modrinth requires you to set the MODRINTH_API_KEY environment variable to your current modrinth API token.
# The project's ID on Modrinth. Can be either the slug or the ID.
# Leave this empty if you don't want to publish on Modrinth.
# Alternatively this can be set with the 'MODRINTH_PROJECT_ID' environment variable.
modrinthProjectId =
# The project's relations on Modrinth. You can use this to refer to other projects on Modrinth.
# Syntax: scope1-type1:name1;scope2-type2:name2;...
# Where scope can be one of [required, optional, incompatible, embedded],
# type can be one of [project, version],
# and the name is the Modrinth project or version slug/id of the other mod.
# Example: required-project:jei;optional-project:top;incompatible-project:gregtech
modrinthRelations =
# Publishing to CurseForge requires you to set the CURSEFORGE_API_KEY environment variable to one of your CurseForge API tokens.
# The project's numeric ID on CurseForge. You can find this in the About Project box.
# Leave this empty if you don't want to publish on CurseForge.
# Alternatively this can be set with the 'CURSEFORGE_PROJECT_ID' environment variable.
curseForgeProjectId =
# The project's relations on CurseForge. You can use this to refer to other projects on CurseForge.
# Syntax: type1:name1;type2:name2;...
# Where type can be one of [requiredDependency, embeddedLibrary, optionalDependency, tool, incompatible],
# and the name is the CurseForge project slug of the other mod.
# Example: requiredDependency:railcraft;embeddedLibrary:cofhlib;incompatible:buildcraft
curseForgeRelations =
# This project's release type on CurseForge and/or Modrinth
# Alternatively this can be set with the 'RELEASE_TYPE' environment variable.
# Allowed types: release, beta, alpha
releaseType = release
# Generate a default changelog for releases. Requires git to be installed, as it uses it to generate a changelog of
# commits since the last tagged release.
generateDefaultChangelog = false
# Prevent the source code from being published
noPublishedSources = false
# Publish to a custom maven location. Follows a few rules:
# Group ID can be set with the 'ARTIFACT_GROUP_ID' environment variable, default to 'project.group'
# Artifact ID can be set with the 'ARTIFACT_ID' environment variable, default to 'project.name'
# Version can be set with the 'RELEASE_VERSION' environment variable, default to 'modVersion'
# For maven credentials:
# Username is set with the 'MAVEN_USER' environment variable, default to "NONE"
# Password is set with the 'MAVEN_PASSWORD' environment variable, default to "NONE"
customMavenPublishUrl = https://maven.gtceu.com
# The group for maven artifacts. Defaults to the 'project.modGroup' until the last '.' (if any).
# So 'mymod' becomes 'mymod' and 'com.myname.mymodid' 'becomes com.myname'
mavenArtifactGroup =
# Enable spotless checks
# Enforces code formatting on your source code
# By default this will use the files found here: https://github.com/GregTechCEu/Buildscripts/tree/master/spotless
# to format your code. However, you can create your own version of these files and place them in your project's
# root directory to apply your own formatting options instead.
enableSpotless = false
# Enable JUnit testing platform used for testing your code.
# Uses JUnit 5. See guide and documentation here: https://junit.org/junit5/docs/current/user-guide/
enableJUnit = true
# Deployment debug setting
# Uncomment this to test deployments to CurseForge and Modrinth
# Alternatively, you can set the 'DEPLOYMENT_DEBUG' environment variable.
deploymentDebug = false
# Gradle Settings
# Effectively applies the '--stacktrace' flag by default
org.gradle.logging.stacktrace = all
# Sets default memory used for gradle commands. Can be overridden by user or command line properties.
# This is required to provide enough memory for the Minecraft decompilation process.
org.gradle.jvmargs = -Xmx3G
#########################################################
# 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
+49
View File
@@ -0,0 +1,49 @@
task myJavadocs(type: Javadoc) {
source = sourceSets.api.java
include "appeng/api/**"
classpath = configurations.compile
}
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) {
from sourceSets.api.java
include "appeng/api/**"
from sourceSets.main.output
include "appeng/api/**"
classifier = 'api'
}
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
+139
View File
@@ -0,0 +1,139 @@
/*
* 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>.
*/
repositories {
mavenLocal()
maven {
name "ChickenBones"
url "http://chickenbones.net/maven/"
}
maven {
name "Mobius"
url "http://mobiusstrip.eu/maven"
}
maven {
name "FireBall API Depot"
url "http://dl.tsr.me/artifactory/libs-release-local"
}
maven {
name = "Player"
url = "http://maven.ic2.player.to/"
}
maven {
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 {
mods
}
dependencies {
// 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"
// 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'
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}")
testCompile "junit:junit:4.12"
}
+7
View File
@@ -0,0 +1,7 @@
apply plugin: 'idea'
idea {
module {
inheritOutputDirs = true
}
}
+116
View File
@@ -0,0 +1,116 @@
task wrapper(type: Wrapper) {
gradleVersion = "2.4"
}
// WAILA
task installWaila(type: Copy, dependsOn: "deinstallWaila") {
from { configurations.mods }
include "**/*Waila*dev.jar"
into file(minecraft.runDir + "/mods")
}
task deinstallWaila(type: Delete) {
delete fileTree(dir: minecraft.runDir + "/mods", include: "*Waila*.jar")
}
// 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*dev.jar"
into file(minecraft.runDir + "/mods")
}
task deinstallIC2(type: Delete) {
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 -3
View File
@@ -1,7 +1,6 @@
#Tue Sep 01 22:00:39 CEST 2015
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.4-all.zip
Vendored
+117 -201
View File
@@ -1,126 +1,79 @@
#!/bin/sh
#
# Copyright © 2015-2021 the original authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
#!/usr/bin/env bash
##############################################################################
#
# Gradle start up script for POSIX generated by Gradle.
#
# Important for running:
#
# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
# noncompliant, but you have some other compliant shell such as ksh or
# bash, then to run this script, type that shell name before the whole
# command line, like:
#
# ksh Gradle
#
# Busybox and similar reduced shells will NOT work, because this script
# requires all of these POSIX shell features:
# * functions;
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
# * compound commands having a testable exit status, especially «case»;
# * various built-in commands including «command», «set», and «ulimit».
#
# Important for patching:
#
# (2) This script targets any POSIX shell, so it avoids extensions provided
# by Bash, Ksh, etc; in particular arrays are avoided.
#
# The "traditional" practice of packing multiple parameters into a
# space-separated string is a well documented source of bugs and security
# problems, so this is (mostly) avoided, by progressively accumulating
# options in "$@", and eventually passing that to Java.
#
# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
# see the in-line comments for details.
#
# There are tweaks for specific operating systems such as AIX, CygWin,
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
#
##
## Gradle start up script for UN*X
##
##############################################################################
# Attempt to set APP_HOME
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""
# Resolve links: $0 may be a link
app_path=$0
# Need this for daisy-chained symlinks.
while
APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
[ -h "$app_path" ]
do
ls=$( ls -ld "$app_path" )
link=${ls#*' -> '}
case $link in #(
/*) app_path=$link ;; #(
*) app_path=$APP_HOME$link ;;
esac
done
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
MAX_FD="maximum"
warn () {
warn ( ) {
echo "$*"
} >&2
}
die () {
die ( ) {
echo
echo "$*"
echo
exit 1
} >&2
}
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
case "$( uname )" in #(
CYGWIN* ) cygwin=true ;; #(
Darwin* ) darwin=true ;; #(
MSYS* | MINGW* ) msys=true ;; #(
NONSTOP* ) nonstop=true ;;
case "`uname`" in
CYGWIN* )
cygwin=true
;;
Darwin* )
darwin=true
;;
MINGW* )
msys=true
;;
esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# 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.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD=$JAVA_HOME/jre/sh/java
JAVACMD="$JAVA_HOME/jre/sh/java"
else
JAVACMD=$JAVA_HOME/bin/java
JAVACMD="$JAVA_HOME/bin/java"
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
@@ -129,120 +82,83 @@ Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD=java
if ! command -v java >/dev/null 2>&1
then
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
JAVACMD="java"
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
fi
# Increase the maximum file descriptors if we can.
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
fi
# Collect all arguments for the java command, stacking in reverse order:
# * args from the command line
# * the main class name
# * -classpath
# * -D...appname settings
# * --module-path (only if needed)
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
# For Cygwin or MSYS, switch paths to Windows format before running java
if "$cygwin" || "$msys" ; then
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
JAVACMD=$( cygpath --unix "$JAVACMD" )
# Now convert the arguments - kludge to limit ourselves to /bin/sh
for arg do
if
case $arg in #(
-*) false ;; # don't mess with options #(
/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
[ -e "$t" ] ;; #(
*) false ;;
esac
then
arg=$( cygpath --path --ignore --mixed "$arg" )
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
MAX_FD="$MAX_FD_LIMIT"
fi
# Roll the args list around exactly as many times as the number of
# args, so each arg winds up back in the position where it started, but
# possibly modified.
#
# NB: a `for` loop captures its iteration list before it begins, so
# changing the positional parameters here affects neither the number of
# iterations, nor the values presented in `arg`.
shift # remove old arg
set -- "$@" "$arg" # push replacement arg
ulimit -n $MAX_FD
if [ $? -ne 0 ] ; then
warn "Could not set maximum file descriptor limit: $MAX_FD"
fi
else
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
fi
fi
# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
# For Cygwin, switch paths to Windows format before running java
if $cygwin ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
SEP=""
for dir in $ROOTDIRSRAW ; do
ROOTDIRS="$ROOTDIRS$SEP$dir"
SEP="|"
done
OURCYGPATTERN="(^($ROOTDIRS))"
# Add a user-defined pattern to the cygpath arguments
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
fi
# Now convert the arguments - kludge to limit ourselves to /bin/sh
i=0
for arg in "$@" ; do
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
else
eval `echo args$i`="\"$arg\""
fi
i=$((i+1))
done
case $i in
(0) set -- ;;
(1) set -- "$args0" ;;
(2) set -- "$args0" "$args1" ;;
(3) set -- "$args0" "$args1" "$args2" ;;
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi
# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
function splitJvmOpts() {
JVM_OPTS=("$@")
}
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
# double quotes to make sure that they get re-expanded; and
# * put everything else in single quotes, so that it's not re-expanded.
set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
-classpath "$CLASSPATH" \
org.gradle.wrapper.GradleWrapperMain \
"$@"
# Stop when "xargs" is not available.
if ! command -v xargs >/dev/null 2>&1
then
die "xargs is not available"
fi
# Use "xargs" to parse quoted args.
#
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
#
# In Bash we could simply go:
#
# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
# set -- "${ARGS[@]}" "$@"
#
# but POSIX shell has neither arrays nor command substitution, so instead we
# post-process each arg (as a line of input to sed) to backslash-escape any
# character that might be a shell metacharacter, then use eval to reverse
# that process (while maintaining the separation between arguments), and wrap
# the whole thing up as a single "set" statement.
#
# This will of course break if any of these variables contains a newline or
# an unmatched quote.
#
eval "set -- $(
printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
xargs -n1 |
sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
tr '\n' ' '
)" '"$@"'
exec "$JAVACMD" "$@"
exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
Vendored
+32 -34
View File
@@ -1,20 +1,4 @@
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@if "%DEBUG%"=="" @echo off
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@@ -24,24 +8,20 @@
@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=.
@rem This is normally unused
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
@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="-Xmx64m" "-Xms64m"
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute
if "%ERRORLEVEL%" == "0" goto init
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
@@ -55,7 +35,7 @@ goto fail
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto execute
if exist "%JAVA_EXE%" goto init
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
@@ -65,26 +45,44 @@ echo location of your Java installation.
goto fail
:init
@rem Get command-line arguments, handling Windowz variants
if not "%OS%" == "Windows_NT" goto win9xME_args
if "%@eval[2+2]" == "4" goto 4NT_args
:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2
:win9xME_args_slurp
if "x%~1" == "x" goto execute
set CMD_LINE_ARGS=%*
goto execute
:4NT_args
@rem Get arguments from the 4NT Shell from JP Software
set CMD_LINE_ARGS=%$
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
:end
@rem End local scope for the variables with windows NT shell
if %ERRORLEVEL% equ 0 goto mainEnd
if "%ERRORLEVEL%"=="0" goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
set EXIT_CODE=%ERRORLEVEL%
if %EXIT_CODE% equ 0 set EXIT_CODE=1
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
exit /b %EXIT_CODE%
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
:mainEnd
if "%OS%"=="Windows_NT" endlocal
-30
View File
@@ -1,30 +0,0 @@
pluginManagement {
repositories {
maven {
// RetroFuturaGradle
name 'GTNH Maven'
url 'https://nexus.gtnewhorizons.com/repository/public/'
//noinspection GroovyAssignabilityCheck
mavenContent {
includeGroup 'com.gtnewhorizons'
includeGroup 'com.gtnewhorizons.retrofuturagradle'
}
}
gradlePluginPortal()
mavenCentral()
mavenLocal()
}
}
plugins {
id 'com.diffplug.blowdryerSetup' version '1.7.0'
// Automatic toolchain provisioning
id 'org.gradle.toolchains.foojay-resolver-convention' version '0.7.0'
}
blowdryerSetup {
repoSubfolder 'spotless'
github 'GregTechCEu/Buildscripts', 'tag', 'v1.0.7'
}
rootProject.name = rootProject.projectDir.getName()
-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
{}
+58 -13
View File
@@ -24,46 +24,91 @@
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.IGridHelper;
import appeng.api.networking.IGridBlock;
import appeng.api.networking.IGridConnection;
import appeng.api.networking.IGridNode;
import appeng.api.parts.IPartHelper;
import appeng.api.storage.IStorageHelper;
import appeng.api.util.IClientHelper;
@AEInjectable
public interface IAppEngApi
{
/**
* @return Registry Container for the numerous registries in AE2.
*/
IRegistryContainer registries();
/**
* @return A helper for working with storage data types.
* @return helper for working with storage data types.
*/
IStorageHelper storage();
/**
* @return A helper to create {@link IGridNode} and other grid related objects.
*/
IGridHelper grid();
/**
* @return A helper for working with grids, and buses.
* @return helper for working with grids, and buses.
*/
IPartHelper partHelper();
/**
* @return An accessible list of all AE definitions
* @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
*/
IDefinitions definitions();
/**
* @return Utility methods primarily useful for client side stuff
* create a grid node for your {@link appeng.api.networking.IGridHost}
*
* @param block grid block
*
* @return grid node of block
*/
IClientHelper client();
IGridNode createGridNode( IGridBlock block );
/**
* create a connection between two {@link appeng.api.networking.IGridNode}
*
* @param a to be connected gridnode
* @param b to be connected gridnode
*
* @throws appeng.api.exceptions.FailedConnection
*/
IGridConnection createGridConnection( IGridNode a, IGridNode b ) throws FailedConnection;
}
@@ -26,23 +26,5 @@ package appeng.api.config;
public enum ActionItems
{
WRENCH,
CLOSE,
STASH,
ENCODE,
SUBSTITUTION,
MULTIPLY_BY_TWO,
MULTIPLY_BY_THREE,
INCREASE_BY_ONE,
DIVIDE_BY_TWO,
DIVIDE_BY_THREE,
DECREASE_BY_ONE,
MAX_COUNT,
MOLECULAR_ASSEMBLERS_ON,
MOLECULAR_ASSEMBLERS_OFF,
TOGGLE_SHOW_FULL_INTERFACES_ON,
TOGGLE_SHOW_FULL_INTERFACES_OFF,
TOGGLE_SHOW_ONLY_INVALID_PATTERNS_ON,
TOGGLE_SHOW_ONLY_INVALID_PATTERNS_OFF,
HIGHLIGHT_INTERFACE
}
WRENCH, CLOSE, STASH, ENCODE, SUBSTITUTION
}
@@ -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;
@@ -1,26 +0,0 @@
package appeng.api.config;
public enum LockCraftingMode {
/**
* Crafting is never locked.
*/
NONE,
/**
* After pushing a pattern to an adjacent machine, the interface will not accept further crafts until a
* redstone pulse is received.
*/
LOCK_UNTIL_PULSE,
/**
* Crafting is locked while the interface is receiving a redstone signal.
*/
LOCK_WHILE_HIGH,
/**
* Crafting is locked while the interface is not receiving a redstone signal.
*/
LOCK_WHILE_LOW,
/**
* After pushing a pattern to an adjacent machine, the interface will not accept further crafts until the
* primary pattern result is returned to the network through the interface.
*/
LOCK_UNTIL_RESULT
}
@@ -28,8 +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
GTEU( "gui.appliedenergistics2.units.gteu" ); // 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.
@@ -47,13 +48,14 @@ public enum PowerUnits
/**
* do power conversion using AE's conversion rates.
* <p>
*
* Example: PowerUnits.EU.convertTo( PowerUnits.AE, 32 );
* <p>
*
* 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
*
* @return value converted to target units, from this units.
*/
public double convertTo( final PowerUnits target, final double value )
@@ -26,5 +26,5 @@ package appeng.api.config;
public enum SearchBoxMode
{
AUTOSEARCH, AUTOSEARCH_KEEP, MANUAL_SEARCH, MANUAL_SEARCH_KEEP, JEI_AUTOSEARCH, JEI_AUTOSEARCH_KEEP, JEI_MANUAL_SEARCH, JEI_MANUAL_SEARCH_KEEP
AUTOSEARCH, MANUAL_SEARCH, NEI_AUTOSEARCH, NEI_MANUAL_SEARCH
}
+12 -43
View File
@@ -25,7 +25,6 @@ package appeng.api.config;
import java.util.EnumSet;
import javax.annotation.Nonnull;
@@ -33,61 +32,31 @@ public enum Settings
{
LEVEL_EMITTER_MODE( EnumSet.allOf( LevelEmitterMode.class ) ),
REDSTONE_EMITTER( EnumSet.of( RedstoneMode.HIGH_SIGNAL, RedstoneMode.LOW_SIGNAL ) ),
REDSTONE_CONTROLLED( EnumSet.allOf( RedstoneMode.class ) ),
REDSTONE_EMITTER( EnumSet.of( RedstoneMode.HIGH_SIGNAL, RedstoneMode.LOW_SIGNAL ) ), REDSTONE_CONTROLLED( EnumSet.allOf( RedstoneMode.class ) ),
CONDENSER_OUTPUT( EnumSet.allOf( CondenserOutput.class ) ),
POWER_UNITS( EnumSet.allOf( PowerUnits.class ) ),
POWER_UNITS( EnumSet.allOf( PowerUnits.class ) ), ACCESS( EnumSet.of( AccessRestriction.READ_WRITE, AccessRestriction.READ, AccessRestriction.WRITE ) ),
ACCESS( EnumSet.of( AccessRestriction.READ_WRITE, AccessRestriction.READ, AccessRestriction.WRITE ) ),
SORT_DIRECTION( EnumSet.allOf( SortDir.class ) ), SORT_BY( EnumSet.allOf( SortOrder.class ) ),
SORT_DIRECTION( EnumSet.allOf( SortDir.class ) ),
SEARCH_TOOLTIPS( EnumSet.of( YesNo.YES, YesNo.NO ) ), VIEW_MODE( EnumSet.allOf( ViewItems.class ) ), SEARCH_MODE( EnumSet.allOf( SearchBoxMode.class ) ),
SORT_BY( EnumSet.allOf( SortOrder.class ) ),
ACTIONS( EnumSet.allOf( ActionItems.class ) ), IO_DIRECTION( EnumSet.of( RelativeDirection.LEFT, RelativeDirection.RIGHT ) ),
SEARCH_TOOLTIPS( EnumSet.of( YesNo.YES, YesNo.NO ) ),
BLOCK( EnumSet.of( YesNo.YES, YesNo.NO ) ), OPERATION_MODE( EnumSet.allOf( OperationMode.class ) ),
VIEW_MODE( EnumSet.allOf( ViewItems.class ) ),
FULLNESS_MODE( EnumSet.allOf( FullnessMode.class ) ), CRAFT_ONLY( EnumSet.of( YesNo.YES, YesNo.NO ) ),
SEARCH_MODE( EnumSet.allOf( SearchBoxMode.class ) ),
FUZZY_MODE( EnumSet.allOf( FuzzyMode.class ) ), LEVEL_TYPE( EnumSet.allOf( LevelType.class ) ),
ACTIONS( EnumSet.allOf( ActionItems.class ) ),
TERMINAL_STYLE( EnumSet.of( TerminalStyle.TALL, TerminalStyle.SMALL ) ), COPY_MODE( EnumSet.allOf( CopyMode.class ) ),
IO_DIRECTION( EnumSet.of( RelativeDirection.LEFT, RelativeDirection.RIGHT ) ),
INTERFACE_TERMINAL( EnumSet.of( YesNo.YES, YesNo.NO ) ), CRAFT_VIA_REDSTONE( EnumSet.of( YesNo.YES, YesNo.NO ) ),
UNLOCK(EnumSet.allOf(LockCraftingMode.class)),
STORAGE_FILTER( EnumSet.allOf( StorageFilter.class ) ), PLACE_BLOCK( EnumSet.of( YesNo.YES, YesNo.NO ) ),
BLOCK( EnumSet.of( YesNo.YES, YesNo.NO ) ),
OPERATION_MODE( EnumSet.allOf( OperationMode.class ) ),
FULLNESS_MODE( EnumSet.allOf( FullnessMode.class ) ),
CRAFT_ONLY( EnumSet.of( YesNo.YES, YesNo.NO ) ),
FUZZY_MODE( EnumSet.allOf( FuzzyMode.class ) ),
LEVEL_TYPE( EnumSet.allOf( LevelType.class ) ),
TERMINAL_STYLE( EnumSet.of( TerminalStyle.TALL, TerminalStyle.SMALL ) ),
COPY_MODE( EnumSet.allOf( CopyMode.class ) ),
INTERFACE_TERMINAL( EnumSet.of( YesNo.YES, YesNo.NO ) ),
CRAFT_VIA_REDSTONE( EnumSet.of( YesNo.YES, YesNo.NO ) ),
STORAGE_FILTER( EnumSet.allOf( StorageFilter.class ) ),
PLACE_BLOCK( EnumSet.of( YesNo.YES, YesNo.NO ) ),
SCHEDULING_MODE( EnumSet.allOf( SchedulingMode.class ) ),
STICKY_MODE( EnumSet.of( YesNo.YES, YesNo.NO ) ),
;
SCHEDULING_MODE( EnumSet.allOf( SchedulingMode.class ) );
private final EnumSet<? extends Enum<?>> values;
+12 -61
View File
@@ -24,65 +24,16 @@
package appeng.api.config;
import appeng.api.AEApi;
import appeng.api.definitions.IItemDefinition;
import appeng.api.definitions.IParts;
import appeng.api.parts.IPartItem;
import com.google.common.base.Preconditions;
import net.minecraft.item.ItemStack;
import net.minecraftforge.common.util.EnumHelper;
import javax.annotation.Nonnull;
import java.util.function.Function;
import java.util.function.Supplier;
public enum TunnelType {
ME(tryPartStack(IParts::p2PTunnelME)),
IC2_POWER(tryPartStack(IParts::p2PTunnelEU)),
FE_POWER(tryPartStack(IParts::p2PTunnelFE)),
GTEU_POWER(tryPartStack(IParts::p2PTunnelGTEU)),
REDSTONE(tryPartStack(IParts::p2PTunnelRedstone)),
FLUID(tryPartStack(IParts::p2PTunnelFE)),
ITEM(tryPartStack(IParts::p2PTunnelItems)),
LIGHT(tryPartStack(IParts::p2PTunnelLight));
private ItemStack partItemStack;
private Supplier<ItemStack> partItemStackSupplier;
@Deprecated
TunnelType() {
this.partItemStack = ItemStack.EMPTY;
this.partItemStackSupplier = null;
}
// Public facing.
TunnelType(ItemStack partItemStack) {
this.partItemStack = partItemStack;
this.partItemStackSupplier = null;
}
// Work around things instantiating this class too early.
TunnelType(Supplier<ItemStack> supplier) {
this.partItemStack = null;
this.partItemStackSupplier = supplier;
}
private static Supplier<ItemStack> tryPartStack(Function<IParts, IItemDefinition> supplier) {
return () -> supplier.apply(AEApi.instance().definitions().parts()).maybeStack(1).orElse(ItemStack.EMPTY);
}
public static TunnelType registerTunnelType(@Nonnull String name, @Nonnull ItemStack partItemStack) {
Preconditions.checkArgument(partItemStack.isEmpty() || partItemStack.getItem() instanceof IPartItem<?>,
"Part item must be an instance of IPartItem");
return EnumHelper.addEnum(TunnelType.class, name, new Class[]{ItemStack.class}, partItemStack);
}
public ItemStack getPartItemStack() {
if (this.partItemStackSupplier != null) {
this.partItemStack = this.partItemStackSupplier.get();
this.partItemStackSupplier = null;
}
return partItemStack;
}
public enum TunnelType
{
ME, // Network Tunnel
IC2_POWER, // EU Tunnel
RF_POWER, // RF Tunnel
REDSTONE, // Redstone Tunnel
FLUID, // Fluid Tunnel
ITEM, // Item Tunnel
LIGHT, // Light Tunnel
BUNDLED_REDSTONE, // Bundled Redstone Tunnel
COMPUTER_MESSAGE, // Computer Message Tunnel
PRESSURE // PneumaticCraft Tunnel
}
+88 -51
View File
@@ -29,65 +29,102 @@ 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 {
/**
* Gold Tier Upgrades.
*/
CAPACITY(0),
REDSTONE(0),
CRAFTING(0),
MAGNET(0),
STICKY(0),
public enum Upgrades
{
/**
* Gold Tier Upgrades.
*/
CAPACITY( 0 ), REDSTONE( 0 ), CRAFTING( 0 ),
/**
* Diamond Tier Upgrades.
*/
FUZZY(1),
SPEED(1),
INVERTER(1),
PATTERN_EXPANSION(1),
QUANTUM_LINK(1);
/**
* Diamond Tier 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;
Upgrades(final int tier) {
this.tier = tier;
}
/**
* @deprecated use {@link Upgrades#getSupported()}
*/
@Deprecated
private final Map<ItemStack, Integer> supportedMax = new HashMap<ItemStack, Integer>();
/**
* @return list of Items/Blocks that support this upgrade, and how many it supports.
*/
public Map<ItemStack, Integer> getSupported() {
return this.supportedMax;
}
Upgrades( final int tier )
{
this.tier = tier;
}
/**
* 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
*/
public void registerItem(final IItemDefinition item, final int maxSupported) {
item.maybeStack(1).ifPresent(is -> this.registerItem(is, maxSupported));
}
/**
* @return list of Items/Blocks that support this upgrade, and how many it supports.
*/
public Map<ItemStack, Integer> getSupported()
{
return this.supportedMax;
}
/**
* Registers a specific amount of this upgrade into a specific machine
*
* @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) {
if (stack != null) {
this.supportedMax.put(stack, maxSupported);
}
}
/**
* 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
*/
public void registerItem( final IItemDefinition item, final int maxSupported )
{
final Optional<ItemStack> maybeStack = item.maybeStack( 1 );
for( final ItemStack stack : maybeStack.asSet() )
{
this.registerItem( stack, maxSupported );
}
}
public int getTier() {
return this.tier;
}
/**
* Registers a specific amount of this upgrade into a specific machine
*
* @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 )
{
if( stack != null )
{
this.supportedMax.put( stack, maxSupported );
}
}
/**
* 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
@@ -148,8 +140,6 @@ public interface IBlocks
ITileDefinition iface();
ITileDefinition fluidIface();
ITileDefinition cellWorkbench();
ITileDefinition iOPort();
@@ -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
*/
@@ -30,7 +30,8 @@ import appeng.api.util.AEColoredItemDefinition;
/**
* A list of all items in AE
*/
public interface IItems {
public interface IItems
{
IItemDefinition certusQuartzAxe();
IItemDefinition certusQuartzHoe();
@@ -63,14 +64,6 @@ public interface IItems {
IItemDefinition wirelessTerminal();
IItemDefinition wirelessCraftingTerminal();
IItemDefinition wirelessPatternTerminal();
IItemDefinition wirelessInterfaceTerminal();
IItemDefinition wirelessFluidTerminal();
IItemDefinition biometricCard();
IItemDefinition chargedStaff();
@@ -95,14 +88,6 @@ public interface IItems {
IItemDefinition cell64k();
IItemDefinition fluidCell1k();
IItemDefinition fluidCell4k();
IItemDefinition fluidCell16k();
IItemDefinition fluidCell64k();
IItemDefinition spatialCell2();
IItemDefinition spatialCell16();
@@ -27,126 +27,113 @@ package appeng.api.definitions;
/**
* A list of all materials in AE
*/
public interface IMaterials {
IItemDefinition cell2SpatialPart();
public interface IMaterials
{
IItemDefinition cell2SpatialPart();
IItemDefinition cell16SpatialPart();
IItemDefinition cell16SpatialPart();
IItemDefinition cell128SpatialPart();
IItemDefinition cell128SpatialPart();
IItemDefinition silicon();
IItemDefinition silicon();
IItemDefinition skyDust();
IItemDefinition skyDust();
IItemDefinition calcProcessorPress();
IItemDefinition calcProcessorPress();
IItemDefinition engProcessorPress();
IItemDefinition engProcessorPress();
IItemDefinition logicProcessorPress();
IItemDefinition logicProcessorPress();
IItemDefinition calcProcessorPrint();
IItemDefinition calcProcessorPrint();
IItemDefinition engProcessorPrint();
IItemDefinition engProcessorPrint();
IItemDefinition logicProcessorPrint();
IItemDefinition logicProcessorPrint();
IItemDefinition siliconPress();
IItemDefinition siliconPress();
IItemDefinition siliconPrint();
IItemDefinition siliconPrint();
IItemDefinition namePress();
IItemDefinition namePress();
IItemDefinition logicProcessor();
IItemDefinition logicProcessor();
IItemDefinition calcProcessor();
IItemDefinition calcProcessor();
IItemDefinition engProcessor();
IItemDefinition engProcessor();
IItemDefinition basicCard();
IItemDefinition basicCard();
IItemDefinition advCard();
IItemDefinition advCard();
IItemDefinition purifiedCertusQuartzCrystal();
IItemDefinition purifiedCertusQuartzCrystal();
IItemDefinition purifiedNetherQuartzCrystal();
IItemDefinition purifiedNetherQuartzCrystal();
IItemDefinition purifiedFluixCrystal();
IItemDefinition purifiedFluixCrystal();
IItemDefinition cell1kPart();
IItemDefinition cell1kPart();
IItemDefinition cell4kPart();
IItemDefinition cell4kPart();
IItemDefinition cell16kPart();
IItemDefinition cell16kPart();
IItemDefinition cell64kPart();
IItemDefinition cell64kPart();
IItemDefinition emptyStorageCell();
IItemDefinition emptyStorageCell();
IItemDefinition cardRedstone();
IItemDefinition cardRedstone();
IItemDefinition cardSpeed();
IItemDefinition cardSpeed();
IItemDefinition cardCapacity();
IItemDefinition cardCapacity();
IItemDefinition cardPatternExpansion();
IItemDefinition cardFuzzy();
IItemDefinition cardQuantumLink();
IItemDefinition cardInverter();
IItemDefinition cardMagnet();
IItemDefinition cardCrafting();
IItemDefinition cardFuzzy();
IItemDefinition enderDust();
IItemDefinition cardInverter();
IItemDefinition flour();
IItemDefinition cardCrafting();
IItemDefinition goldDust();
IItemDefinition cardSticky();
IItemDefinition ironDust();
IItemDefinition enderDust();
IItemDefinition fluixDust();
IItemDefinition flour();
IItemDefinition certusQuartzDust();
IItemDefinition goldDust();
IItemDefinition netherQuartzDust();
IItemDefinition ironDust();
IItemDefinition matterBall();
IItemDefinition fluixDust();
IItemDefinition ironNugget();
IItemDefinition certusQuartzDust();
IItemDefinition certusQuartzCrystal();
IItemDefinition netherQuartzDust();
IItemDefinition certusQuartzCrystalCharged();
IItemDefinition matterBall();
IItemDefinition fluixCrystal();
IItemDefinition certusQuartzCrystal();
IItemDefinition fluixPearl();
IItemDefinition certusQuartzCrystalCharged();
IItemDefinition woodenGear();
IItemDefinition fluixCrystal();
IItemDefinition wireless();
IItemDefinition fluixPearl();
IItemDefinition wirelessBooster();
IItemDefinition woodenGear();
IItemDefinition annihilationCore();
IItemDefinition wirelessReceiver();
IItemDefinition formationCore();
IItemDefinition wirelessBooster();
IItemDefinition singularity();
IItemDefinition annihilationCore();
IItemDefinition qESingularity();
IItemDefinition formationCore();
IItemDefinition singularity();
IItemDefinition qESingularity();
IItemDefinition blankPattern();
IItemDefinition fluidCell1kPart();
IItemDefinition fluidCell4kPart();
IItemDefinition fluidCell16kPart();
IItemDefinition fluidCell64kPart();
IItemDefinition blankPattern();
}
+40 -65
View File
@@ -30,106 +30,81 @@ import appeng.api.util.AEColoredItemDefinition;
/**
* A list of all parts in AE
*/
public interface IParts {
AEColoredItemDefinition cableSmart();
public interface IParts
{
AEColoredItemDefinition cableSmart();
AEColoredItemDefinition cableCovered();
AEColoredItemDefinition cableCovered();
AEColoredItemDefinition cableGlass();
AEColoredItemDefinition cableGlass();
AEColoredItemDefinition cableDenseCovered();
AEColoredItemDefinition cableDense();
AEColoredItemDefinition cableDenseSmart();
AEColoredItemDefinition lumenCableSmart();
AEColoredItemDefinition lumenCableSmart();
AEColoredItemDefinition lumenCableCovered();
AEColoredItemDefinition lumenCableCovered();
AEColoredItemDefinition lumenCableGlass();
AEColoredItemDefinition lumenCableGlass();
AEColoredItemDefinition lumenCableDense();
AEColoredItemDefinition lumenDenseCableSmart();
IItemDefinition quartzFiber();
IItemDefinition quartzFiber();
IItemDefinition toggleBus();
IItemDefinition toggleBus();
IItemDefinition invertedToggleBus();
IItemDefinition invertedToggleBus();
IItemDefinition storageBus();
IItemDefinition storageBus();
IItemDefinition importBus();
IItemDefinition oreDictStorageBus();
IItemDefinition exportBus();
IItemDefinition importBus();
IItemDefinition iface();
IItemDefinition exportBus();
IItemDefinition levelEmitter();
IItemDefinition iface();
IItemDefinition annihilationPlane();
IItemDefinition fluidIface();
IItemDefinition identityAnnihilationPlane();
IItemDefinition levelEmitter();
IItemDefinition formationPlane();
IItemDefinition annihilationPlane();
IItemDefinition p2PTunnelME();
IItemDefinition identityAnnihilationPlane();
IItemDefinition p2PTunnelRedstone();
IItemDefinition formationPlane();
IItemDefinition p2PTunnelItems();
IItemDefinition p2PTunnelME();
IItemDefinition p2PTunnelLiquids();
IItemDefinition p2PTunnelRedstone();
IItemDefinition p2PTunnelEU();
IItemDefinition p2PTunnelItems();
IItemDefinition p2PTunnelRF();
IItemDefinition p2PTunnelFluids();
IItemDefinition p2PTunnelLight();
IItemDefinition p2PTunnelEU();
IItemDefinition p2PTunnelOpenComputers();
IItemDefinition p2PTunnelFE();
IItemDefinition p2PTunnelPneumaticCraft();
IItemDefinition p2PTunnelGTEU();
IItemDefinition cableAnchor();
IItemDefinition p2PTunnelLight();
IItemDefinition monitor();
// IItemDefinition p2PTunnelOpenComputers();
IItemDefinition semiDarkMonitor();
IItemDefinition cableAnchor();
IItemDefinition darkMonitor();
IItemDefinition monitor();
IItemDefinition interfaceTerminal();
IItemDefinition semiDarkMonitor();
IItemDefinition patternTerminal();
IItemDefinition darkMonitor();
IItemDefinition craftingTerminal();
IItemDefinition interfaceTerminal();
IItemDefinition terminal();
IItemDefinition patternTerminal();
IItemDefinition storageMonitor();
IItemDefinition expandedProcessingPatternTerminal();
IItemDefinition interfaceConfigurationTerminal();
IItemDefinition fluidInterfaceConfigurationTerminal();
IItemDefinition craftingTerminal();
IItemDefinition terminal();
IItemDefinition storageMonitor();
IItemDefinition conversionMonitor();
IItemDefinition fluidTerminal();
IItemDefinition fluidImportBus();
IItemDefinition fluidExportBus();
IItemDefinition fluidStorageBus();
IItemDefinition fluidLevelEmitter();
IItemDefinition fluidAnnihilationPlane();
IItemDefinition fluidFormationnPlane();
IItemDefinition conversionMonitor();
}
@@ -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,28 +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.exceptions;
public class CoreInaccessibleException extends RuntimeException
{
private static final long serialVersionUID = -7434641554655517242L;
public CoreInaccessibleException( final String message )
{
super( message );
@@ -1,56 +0,0 @@
/*
* 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.exceptions;
import appeng.api.networking.IGridNode;
/**
* Exception occurred because of an already existing connection between the two {@link IGridNode}s
*
* Intended to signal an internal exception and not intended to be thrown by
* any 3rd party module.
*
* @author yueh
* @version rv3
* @since rv3
*/
public class ExistingConnectionException extends FailedConnectionException
{
private static final long serialVersionUID = 2975450379720353182L;
private static final String DEFAULT_MESSAGE = "Connection between both nodes already exists.";
public ExistingConnectionException()
{
super( DEFAULT_MESSAGE );
}
public ExistingConnectionException( String message )
{
super( message );
}
}
@@ -0,0 +1,35 @@
/*
* 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.exceptions;
public class FailedConnection extends Exception
{
private static final long serialVersionUID = -2544208090248293753L;
public FailedConnection()
{
}
}
@@ -1,56 +0,0 @@
/*
* 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.exceptions;
import appeng.api.networking.IGridNode;
/**
* Exception indicating a failed connection between two {@link IGridNode}s.
*
* Intended to signal an internal exception and not intended to be thrown by
* any 3rd party module.
*
* See any subclass for a more specific reason.
*
* @author AlgorithmX2
* @author yueh
* @version rv3
* @since rv0
*/
public class FailedConnectionException extends Exception
{
private static final long serialVersionUID = -2544208090248293753L;
public FailedConnectionException()
{
}
public FailedConnectionException( String message )
{
super( message );
}
}
@@ -0,0 +1,10 @@
package appeng.api.exceptions;
public class MissingDefinition extends RuntimeException
{
public MissingDefinition( final String message )
{
super( message );
}
}
@@ -1,30 +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.exceptions;
public class MissingDefinitionException extends RuntimeException
{
private static final long serialVersionUID = -6547396584255825761L;
public MissingDefinitionException( final String message )
{
super( message );
}
}
@@ -0,0 +1,36 @@
/*
* 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.exceptions;
public class MissingIngredientError extends Exception
{
private static final long serialVersionUID = -998858343831371697L;
public MissingIngredientError( final String n )
{
super( n );
}
}
@@ -1,36 +0,0 @@
/*
* 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.exceptions;
public class MissingIngredientException extends Exception
{
private static final long serialVersionUID = -998858343831371697L;
public MissingIngredientException( final String n )
{
super( n );
}
}
@@ -0,0 +1,36 @@
/*
* 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.exceptions;
public class ModNotInstalled extends Exception
{
private static final long serialVersionUID = -9052435206368425494L;
public ModNotInstalled( final String t )
{
super( t );
}
}
@@ -1,36 +0,0 @@
/*
* 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.exceptions;
public class ModNotInstalledException extends Exception
{
private static final long serialVersionUID = -9052435206368425494L;
public ModNotInstalledException( final String t )
{
super( t );
}
}
@@ -1,53 +0,0 @@
/*
* 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.exceptions;
/**
* Exception due to trying to connect one or more null values.
*
* Intended to signal an internal exception and not intended to be thrown by
* any 3rd party module.
*
* @author yueh
* @version rv3
* @since rv3
*/
public class NullNodeConnectionException extends FailedConnectionException
{
private static final long serialVersionUID = -2143719383495321764L;
private static final String DEFAULT_MESSAGE = "Connection forged between null entities.";
public NullNodeConnectionException()
{
super( DEFAULT_MESSAGE );
}
public NullNodeConnectionException( String message )
{
super( message );
}
}
@@ -0,0 +1,36 @@
/*
* 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.exceptions;
public class RecipeError extends Exception
{
private static final long serialVersionUID = -6602870588617670262L;
public RecipeError( final String n )
{
super( n );
}
}
@@ -1,36 +0,0 @@
/*
* 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.exceptions;
public class RecipeException extends Exception
{
private static final long serialVersionUID = -6602870588617670262L;
public RecipeException( final String n )
{
super( n );
}
}
@@ -0,0 +1,36 @@
/*
* 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.exceptions;
public class RegistrationError extends Exception
{
private static final long serialVersionUID = -6602870588617670263L;
public RegistrationError( final String n )
{
super( n );
}
}
@@ -1,36 +0,0 @@
/*
* 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.exceptions;
public class RegistrationException extends Exception
{
private static final long serialVersionUID = -6602870588617670263L;
public RegistrationException( final String n )
{
super( n );
}
}
@@ -1,52 +0,0 @@
/*
* 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.exceptions;
/**
* Exception due to trying to connect different security realms.
*
* Intended to signal an internal exception and not intended to be thrown by
* any 3rd party module.
*
* @author yueh
* @version rv3
* @since rv3
*/
public class SecurityConnectionException extends FailedConnectionException
{
private static final long serialVersionUID = 5048714900434215426L;
private static final String DEFAULT_MESSAGE = "Connection failed due to different security realms.";
public SecurityConnectionException()
{
super( DEFAULT_MESSAGE );
}
public SecurityConnectionException( String message )
{
super( message );
}
}
@@ -1,84 +0,0 @@
/*
* The MIT License (MIT)
*
* Copyright (c) 2017 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.features;
import javax.annotation.Nonnegative;
import javax.annotation.Nonnull;
import net.minecraft.item.Item;
import appeng.api.implementations.items.IAEItemPowerStorage;
/**
* A registry to allow mapping {@link Item}s to a specific charge rate when being placed inside a charger.
*
* The registry is used in favor of an additional method for {@link IAEItemPowerStorage} with a fixed value per item.
* This allows more flexibility for other charger like machines to choose their own values when needed.
*
* There is no guarantee that this is charged per tick, it only represents the value per operation.
* By default this is one charging operation every 10 ticks in case of an AE2 charger.
*
* @author yueh
* @version rv5
* @since rv5
*/
public interface IChargerRegistry
{
/**
* Fetch a charge rate for a specific item.
*
* The specific item does not need to have a mapping registered at all.
* In this case it will use a default value of 160 AE.
*
* @param item A {@link Item} implementing {@link IAEItemPowerStorage}.
* @return custom rate or default of 160
*/
@Nonnegative
double getChargeRate( @Nonnull Item item );
/**
* Register a custom charge rate for a specific item.
*
* Capped at 16000 to avoid extracting too much energy from a network for each operation.
* This is done silently without any feedback or exception.
* Further the cap is not fixed, it can change at any time in the future should power issues arise.
*
* @param item A {@link Item} implementing {@link IAEItemPowerStorage}.
* @param chargeRate the custom rate, must be > 0, capped to 16000d
*/
void addChargeRate( @Nonnull Item item, @Nonnegative double chargeRate );
/**
* Remove the custom rate for a specific item.
*
* It will revert to the default value afterwards.
*
* @param item A {@link Item} implementing {@link IAEItemPowerStorage}.
*/
void removeChargeRate( @Nonnull Item item );
}
@@ -0,0 +1,121 @@
/*
* 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.features;
import net.minecraft.item.ItemStack;
/**
* Registration Records for {@link IGrinderRegistry}
*/
public interface IGrinderEntry
{
/**
* the current input
*
* @return input that the grinder will accept.
*/
ItemStack getInput();
/**
* lets you change the grinder recipe by changing its input.
*
* @param input input item
*/
void setInput( ItemStack input );
/**
* gets the current output
*
* @return output that the grinder will produce
*/
ItemStack getOutput();
/**
* allows you to change the output.
*
* @param output output item
*/
void setOutput( ItemStack output );
/**
* gets the current output
*
* @return output that the grinder will produce
*/
ItemStack getOptionalOutput();
/**
* gets the current output
*
* @return output that the grinder will produce
*/
ItemStack getSecondOptionalOutput();
/**
* stack, and 0.0-1.0 chance that it will be generated.
*
* @param output output item
* @param chance generation chance
*/
void setOptionalOutput( ItemStack output, float chance );
/**
* 0.0 - 1.0 the chance that the optional output will be generated.
*
* @return chance of optional output
*/
float getOptionalChance();
/**
* stack, and 0.0-1.0 chance that it will be generated.
*
* @param output second optional output item
* @param chance second optional output chance
*/
void setSecondOptionalOutput( ItemStack output, float chance );
/**
* 0.0 - 1.0 the chance that the optional output will be generated.
*
* @return second optional output chance
*/
float getSecondOptionalChance();
/**
* Energy cost, in turns.
*
* @return number of turns it takes to produce the output from the input.
*/
int getEnergyCost();
/**
* Allows you to adjust the number of turns
*
* @param c number of turns to produce output.
*/
void setEnergyCost( int c );
}
@@ -1,93 +0,0 @@
/*
* 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.features;
import java.util.Optional;
import javax.annotation.Nonnull;
import net.minecraft.item.ItemStack;
/**
* Registration Records for {@link IGrinderRegistry}
*/
public interface IGrinderRecipe
{
/**
* the current input
*
* @return input that the grinder will accept.
*/
@Nonnull
ItemStack getInput();
/**
* gets the current output
*
* @return output that the grinder will produce
*/
@Nonnull
ItemStack getOutput();
/**
* gets the current output
*
* @return output that the grinder will produce
*/
@Nonnull
Optional<ItemStack> getOptionalOutput();
/**
* gets the current output
*
* @return output that the grinder will produce
*/
Optional<ItemStack> getSecondOptionalOutput();
/**
* 0.0 - 1.0 the chance that the optional output will be generated.
*
* @return chance of optional output
*/
@Nonnull
float getOptionalChance();
/**
* 0.0 - 1.0 the chance that the optional output will be generated.
*
* @return second optional output chance
*/
float getSecondOptionalChance();
/**
* Amount of turns required to process the item.
*
* @return number of turns it takes to produce the output from the input.
*/
int getRequiredTurns();
}
@@ -1,115 +0,0 @@
/*
* 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.features;
import javax.annotation.Nonnegative;
import javax.annotation.Nonnull;
import net.minecraft.item.ItemStack;
/**
* Builder for a grinder recipe.
*
* The only default value provided are turns at a value of 8.
*
* @author yueh
* @version rv5
* @since rv5
*/
public interface IGrinderRecipeBuilder
{
/**
* Creates an grinder recipe with inputs.
* Needs to be invoked.
*
* @param input new input for the recipe
*
* @return currently used builder
*/
@Nonnull
IGrinderRecipeBuilder withInput( @Nonnull ItemStack input );
/**
* Creates an grinder recipe with output.
* Needs to be invoked.
*
* @param output new output for the recipe
*
* @return currently used builder
*/
@Nonnull
IGrinderRecipeBuilder withOutput( @Nonnull ItemStack output );
/**
* Creates an grinder recipe with the first optional output and its chance.
*
* @param optional new first optional for the recipe
* @param chance chance for the first optional output, must be within 0.0 - 1.0
*
* @return currently used builder
*/
@Nonnull
IGrinderRecipeBuilder withFirstOptional( @Nonnull ItemStack optional, float chance );
/**
* Creates an grinder recipe with the second optional output and its chance.
*
* @param optional new second optional for the recipe
* @param chance chance for the second optional output, must be within 0.0 - 1.0
*
* @return currently used builder
*/
@Nonnull
IGrinderRecipeBuilder withSecondOptional( @Nonnull ItemStack optional, float chance );
/**
* Creates an grinder recipe with the amount of turns as cost.
*
* Defaults to 8 when not called.
*
* @param turns new turns for the recipe, must be > 0
*
* @return currently used builder
*/
@Nonnull
IGrinderRecipeBuilder withTurns( @Nonnegative int turns );
/**
* Finalizes the process of making the recipe.
* Needs to be invoked to fetch grinder recipe.
*
* @return valid grinder recipe
*
* @throws IllegalStateException when input is not defined
* @throws IllegalStateException when input has no size
* @throws IllegalStateException when output is not defined
* @throws IllegalStateException when both optionals are not defined
* @throws IllegalStateException when process type is not defined
*/
@Nonnull
IGrinderRecipe build();
}
@@ -24,10 +24,7 @@
package appeng.api.features;
import java.util.Collection;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import java.util.List;
import net.minecraft.item.ItemStack;
@@ -39,63 +36,51 @@ public interface IGrinderRegistry
{
/**
* Extensible way to create a grinder recipe.
*
* @return builder for grinder recipes
*/
@Nonnull
IGrinderRecipeBuilder builder();
/**
* An immutable list of the currently registered recipes.
* Current list of registered recipes, you can modify this if you want too.
*
* @return currentlyRegisteredRecipes
*/
@Nonnull
Collection<IGrinderRecipe> getRecipes();
List<IGrinderEntry> getRecipes();
/**
* Add a new recipe to the registry.
* 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 turns amount of turns to turn the input into the output
*/
boolean addRecipe( IGrinderRecipe recipe );
void addRecipe( ItemStack in, ItemStack out, int turns );
/**
* Remove the specific from the recipe list.
*
* @param recipe The recipe to be removed.
* @return true, if it was removed
* 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 turns amount of turns to turn the input into the outputs
*/
boolean removeRecipe( @Nonnull IGrinderRecipe recipe );
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 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
*/
void addRecipe( ItemStack in, ItemStack out, ItemStack optional, float chance, ItemStack optional2, float chance2, int turns );
/**
* Searches for a recipe for a given input, and returns it.
*
* @param input The {@link ItemStack} to be grinded.
* @param input input
*
* @return identified recipe or null
*/
@Nullable
IGrinderRecipe getRecipeForInput( @Nonnull ItemStack input );
/**
* Allows do add a custom ratio from an ore to dust when being grinded.
*
* The default ratio is 1 ore to 2 dusts.
*
* These have to be added before any recipe is registered. Otherwise it will use the default value.
*
* @param oredictName The name of the ore;
* @param ratio The amount, must be > 0;
*/
void addDustRatio( @Nonnull String oredictName, int ratio );
/**
* Remove a custom ratio for a specific ore name.
*
* Will use the default of 2 value afterwards.
*
* @param oredictName The name of the ore;
*/
boolean removeDustRatio( @Nonnull String oredictName );
IGrinderEntry getRecipeForInput( ItemStack input );
}
@@ -1,29 +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.features;
import java.util.List;
import javax.annotation.Nonnull;
import net.minecraft.item.ItemStack;
import javax.annotation.Nonnull;
import java.util.List;
import java.util.Optional;
import com.google.common.base.Optional;
/**
@@ -56,35 +39,21 @@ public interface IInscriberRecipe
@Nonnull
ItemStack getOutput();
@Nonnull
List<ItemStack> getTopInputs();
/**
* gets the top optional
*
* @return item which is used top
*/
@Deprecated
@Nonnull
default Optional<ItemStack> getTopOptional(){
return getTopInputs().isEmpty() ? Optional.empty() : Optional.of(getTopInputs().get(0));
}
@Nonnull
List<ItemStack> getBottomInputs();
Optional<ItemStack> getTopOptional();
/**
* gets the bottom optional
*
* @return item which is used bottom
*/
@Deprecated
@Nonnull
default Optional<ItemStack> getBottomOptional() {
return getBottomInputs().isEmpty() ? Optional.empty() : Optional.of(getBottomInputs().get(0));
}
Optional<ItemStack> getBottomOptional();
/**
* type of inscriber process
@@ -1,29 +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.features;
import net.minecraft.item.ItemStack;
import javax.annotation.Nonnull;
import java.util.Collection;
import java.util.Collections;
import javax.annotation.Nonnull;
import net.minecraft.item.ItemStack;
/**
@@ -66,7 +47,7 @@ public interface IInscriberRecipeBuilder
* @return currently used builder
*/
@Nonnull
IInscriberRecipeBuilder withTopOptional(@Nonnull Collection<ItemStack> topOptional );
IInscriberRecipeBuilder withTopOptional( @Nonnull ItemStack topOptional );
/**
* Creates an inscriber recipe with bot.
@@ -77,7 +58,7 @@ public interface IInscriberRecipeBuilder
* @return currently used builder
*/
@Nonnull
IInscriberRecipeBuilder withBottomOptional( @Nonnull Collection<ItemStack> bottomOptional );
IInscriberRecipeBuilder withBottomOptional( @Nonnull ItemStack bottomOptional );
/**
* Creates an inscriber recipe with type.
@@ -104,14 +85,4 @@ public interface IInscriberRecipeBuilder
*/
@Nonnull
IInscriberRecipe build();
@Deprecated
default IInscriberRecipeBuilder withTopOptional(@Nonnull ItemStack topOptional){
return withTopOptional(Collections.singleton(topOptional));
}
@Deprecated
default IInscriberRecipeBuilder withBottomOptional(@Nonnull ItemStack bottomOptional){
return withBottomOptional(Collections.singleton(bottomOptional));
}
}
@@ -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;
@@ -31,19 +14,11 @@ import net.minecraft.item.ItemStack;
* Lets you manipulate Inscriber Recipes, by adding or editing existing ones.
*
* @author thatsIch
* @version rv5
* @version rv3
* @since rv2
*/
public interface IInscriberRegistry
{
/**
* Extensible way to create an inscriber recipe.
*
* @return builder for inscriber recipes
*/
@Nonnull
IInscriberRecipeBuilder builder();
/**
* An immutable copy of currently registered recipes.
*
@@ -73,25 +48,29 @@ public interface IInscriberRegistry
@Nonnull
Set<ItemStack> getInputs();
/**
* Extensible way to create an inscriber recipe.
*
* @return builder for inscriber recipes
*/
@Nonnull
IInscriberRecipeBuilder builder();
/**
* add a new recipe the easy way, duplicates will not be added.
* Added recipes will be automatically added to the optionals and inputs.
*
* @param recipe new recipe
*
* @return true, when successfully added
*
* @throws IllegalArgumentException if null is added
*/
boolean addRecipe( IInscriberRecipe recipe );
void addRecipe( IInscriberRecipe recipe );
/**
* Removes all equal recipes from the registry.
*
*
* @param toBeRemovedRecipe to be removed recipe, can be null, makes just no sense.
*
* @return true, when successfully removed
*/
boolean removeRecipe( IInscriberRecipe toBeRemovedRecipe );
void removeRecipe( IInscriberRecipe toBeRemovedRecipe );
}
@@ -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 );
}
@@ -24,13 +24,12 @@
package appeng.api.features;
import appeng.api.config.TunnelType;
import net.minecraft.item.ItemStack;
import net.minecraftforge.common.capabilities.Capability;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import net.minecraft.item.ItemStack;
import appeng.api.config.TunnelType;
/**
* A Registry for how p2p Tunnels are attuned
@@ -43,13 +42,9 @@ 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( @Nonnull ItemStack trigger, @Nullable TunnelType type );
void addNewAttunement( @Nonnull String ModId, @Nullable TunnelType type );
void addNewAttunement( @Nonnull Capability<?> cap, @Nullable TunnelType type );
void addNewAttunement( @Nullable ItemStack trigger, @Nullable TunnelType type );
/**
* returns null if no attunement can be found.
@@ -60,6 +55,4 @@ public interface IP2PTunnelRegistry
*/
@Nullable
TunnelType getTunnelTypeByItem( ItemStack trigger );
TunnelType registerTunnelType( @Nonnull String enumName, @Nonnull ItemStack partStack );
}
@@ -48,7 +48,6 @@ public interface IRecipeHandlerRegistry
* @param name name of crafthandler
* @param handler class of crafthandler
*/
@Deprecated
void addNewCraftHandler( String name, Class<? extends ICraftHandler> handler );
/**
@@ -66,13 +65,11 @@ public interface IRecipeHandlerRegistry
* @return A recipe handler by name, returns null on failure.
*/
@Nullable
@Deprecated
ICraftHandler getCraftHandlerFor( String name );
/**
* @return a new recipe handler, which can be used to parse, and read recipe files.
*/
@Deprecated
IRecipeHandler createNewRecipehandler();
/**
@@ -24,21 +24,18 @@
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;
/**
* @author AlgorithmX2
* @author thatsIch
* @author yueh
* @version rv5
* @version rv2
* @since rv0
*/
@AEInjectable
public interface IRegistryContainer
{
@@ -52,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.
*/
@@ -77,11 +80,6 @@ public interface IRegistryContainer
*/
IInscriberRegistry inscriber();
/**
* Manage charger via API
*/
IChargerRegistry charger();
/**
* get access to the locatable registry
*/
@@ -111,9 +109,4 @@ public interface IRegistryContainer
* get access to the world-gen api.
*/
IWorldGen worldgen();
/**
* Register your IPart models before using them.
*/
IPartModels partModels();
}
@@ -28,45 +28,47 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import appeng.api.util.IConfigManager;
import net.minecraftforge.fml.common.network.IGuiHandler;
/**
* A handler for a wireless terminal.
*/
public interface IWirelessTermHandler extends INetworkEncodable {
public interface IWirelessTermHandler extends INetworkEncodable
{
/**
* @param is wireless terminal
* @return true, if usePower, hasPower, etc... can be called for the provided item
*/
boolean canHandle(ItemStack is);
/**
* @param is wireless terminal
*
* @return true, if usePower, hasPower, etc... can be called for the provided item
*/
boolean canHandle( ItemStack is );
/**
* 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
* @return true if wireless terminal uses power
*/
boolean usePower(EntityPlayer player, double amount, ItemStack is);
/**
* 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
*
* @return true if wireless terminal uses power
*/
boolean usePower( EntityPlayer player, double amount, ItemStack is );
/**
* gets the power status of the item.
*
* @param is wireless terminal
* @return returns true if there is any power left.
*/
boolean hasPower(EntityPlayer player, double amount, ItemStack is);
/**
* gets the power status of the item.
*
* @param is wireless terminal
*
* @return returns true if there is any power left.
*/
boolean hasPower( EntityPlayer player, double amount, ItemStack is );
/**
* Return the config manager for the wireless terminal.
*
* @param is wireless terminal
* @return config manager of wireless terminal
*/
IConfigManager getConfigManager(ItemStack is);
IGuiHandler getGuiHandler(ItemStack is);
/**
* Return the config manager for the wireless terminal.
*
* @param is wireless terminal
*
* @return config manager of wireless terminal
*/
IConfigManager getConfigManager( ItemStack is );
}
@@ -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
*/
@@ -1,7 +0,0 @@
package appeng.api.implementations;
public interface IUpgradeableCellContainer {
int availableUpgrades();
void setupUpgrades();
}
@@ -1,41 +0,0 @@
/*
* 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.implementations;
import appeng.api.config.Upgrades;
import appeng.api.implementations.tiles.ISegmentedInventory;
import appeng.api.util.IConfigurableObject;
public interface IUpgradeableCellHost extends IConfigurableObject, ISegmentedInventory {
/**
* determine how many of an upgrade are installed.
*/
default int getInstalledUpgrades(Upgrades u) {
return 0;
}
}
@@ -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 );
}
@@ -24,7 +24,7 @@
package appeng.api.implementations.guiobjects;
import net.minecraftforge.items.IItemHandler;
import net.minecraft.inventory.IInventory;
import appeng.api.networking.IGridHost;
@@ -32,9 +32,8 @@ import appeng.api.networking.IGridHost;
/**
* Obtained via {@link IGuiItem} getGuiObject
*/
public interface INetworkTool extends IGuiItemObject
public interface INetworkTool extends IInventory, IGuiItemObject
{
IGridHost getGridHost(); // null for most purposes.
IItemHandler getInventory();
IGridHost getGridHost(); // null for most purposes.
}
@@ -27,7 +27,6 @@ package appeng.api.implementations.items;
import net.minecraft.item.ItemStack;
import appeng.api.config.AccessRestriction;
import appeng.api.config.Actionable;
import appeng.api.networking.energy.IAEPowerStorage;
@@ -43,27 +42,27 @@ public interface IAEItemPowerStorage
*
* @return amount unable to be stored
*/
double injectAEPower( ItemStack stack, double amount, Actionable mode );
double injectAEPower( ItemStack is, double amt );
/**
* Attempt to extract power from the device, it will extract what it can and
* return it.
*
* @param amount to be extracted power from device
* @param amt to be extracted power from device
*
* @return what it could extract
*/
double extractAEPower( ItemStack stack, double amount, Actionable mode );
double extractAEPower( ItemStack is, double amt );
/**
* @return the current maximum power ( this can change :P )
*/
double getAEMaxPower( ItemStack stack );
double getAEMaxPower( ItemStack is );
/**
* @return the current AE Power Level, this may exceed getMEMaxPower()
*/
double getAECurrentPower( ItemStack stack );
double getAECurrentPower( ItemStack is );
/**
* Control the power flow by telling what the network can do, either add? or
@@ -71,5 +70,5 @@ public interface IAEItemPowerStorage
*
* @return access restriction of network
*/
AccessRestriction getPowerFlow( ItemStack stack );
AccessRestriction getPowerFlow( ItemStack is );
}
@@ -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 );
}
@@ -28,8 +28,6 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import appeng.api.util.AEColor;
/**
* Memory Card API
@@ -43,18 +41,13 @@ public interface IMemoryCard
* Configures the data stored on the memory card, the SettingsName, will be
* localized when displayed.
*
* The data can contain an optional string with the key "tooltip", which will be used as
* unlocalized string to display it after the settings name.
*
* The data can contain an optional intArray using "colorCode" to be displayed on the model itself.
* It needs to have exactly 8 elements representing the ordinal of the matching {@link AEColor}.
* The first 4 values represent the top row, left to right. The second 4 the bottom row.
*
* @param is item
* @param settingsName unlocalized string that represents the tile entity.
* @param data the NBT tag, refer to the normal comment for special keys.
* @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.
*/
void setMemoryCardContents( ItemStack is, String settingsName, NBTTagCompound data );
void setMemoryCardContents( ItemStack is, String SettingsName, NBTTagCompound data );
/**
* returns the settings name provided by a previous call to
@@ -75,22 +68,11 @@ public interface IMemoryCard
*/
NBTTagCompound getData( ItemStack is );
/**
* This represent as 4x2 grid of {@link AEColor} without transparent/fluix color.
*
* First 4 colors are used for the top row, second for the bottom one.
*
* @param is item
*
* @return a hash representation of the memory card content
*/
AEColor[] getColorCode( ItemStack is );
/**
* 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 );
}
@@ -29,7 +29,6 @@ import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import appeng.api.implementations.TransitionResult;
import appeng.api.storage.ISpatialDimension;
import appeng.api.util.WorldCoord;
@@ -58,7 +57,7 @@ public interface ISpatialStorageCell
*
* @return the world for this cell
*/
ISpatialDimension getSpatialDimension();
World getWorld( ItemStack is );
/**
* get the currently stored size.
@@ -70,24 +69,33 @@ public interface ISpatialStorageCell
WorldCoord getStoredSize( ItemStack is );
/**
* get the currently stored Dimension id.
* Minimum coordinates in its world for the storage cell.
*
* @param is spatial storage cell
*
* @return dimension id or -1
* @return minimum coordinate of dimension
*/
int getStoredDimensionID( ItemStack is );
WorldCoord getMin( ItemStack is );
/**
* Maximum coordinates in its world for the storage cell.
*
* @param is spatial storage cell
*
* @return maximum coordinate of dimension
*/
WorldCoord getMax( ItemStack is );
/**
* 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 playerId owner of current grid or -1
* @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
*/
TransitionResult doSpatialTransition( ItemStack is, World w, WorldCoord min, WorldCoord max, int playerId );
TransitionResult doSpatialTransition( ItemStack is, World w, WorldCoord min, WorldCoord max, boolean doTransition );
}
@@ -24,13 +24,10 @@
package appeng.api.implementations.items;
import javax.annotation.Nonnull;
import net.minecraft.item.ItemStack;
import appeng.api.storage.ICellWorkbenchItem;
import appeng.api.storage.IStorageChannel;
import appeng.api.storage.data.IAEStack;
import appeng.api.storage.data.IAEItemStack;
/**
@@ -43,7 +40,7 @@ import appeng.api.storage.data.IAEStack;
*
* The standard AE implementation only provides 1-63 Types
*/
public interface IStorageCell<T extends IAEStack<T>> extends ICellWorkbenchItem
public interface IStorageCell extends ICellWorkbenchItem
{
/**
@@ -54,7 +51,19 @@ public interface IStorageCell<T extends IAEStack<T>> extends ICellWorkbenchItem
*
* @return number of bytes
*/
int getBytes( @Nonnull ItemStack cellItem );
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.
@@ -63,7 +72,7 @@ public interface IStorageCell<T extends IAEStack<T>> extends ICellWorkbenchItem
*
* @return number of bytes
*/
int getBytesPerType( @Nonnull ItemStack cellItem );
int getBytesPerType( ItemStack cellItem );
/**
* Must be between 1 and 63, indicates how many types you want to store on
@@ -73,19 +82,19 @@ public interface IStorageCell<T extends IAEStack<T>> extends ICellWorkbenchItem
*
* @return number of types
*/
int getTotalTypes( @Nonnull ItemStack cellItem );
int getTotalTypes( ItemStack cellItem );
/**
* Allows you to fine tune which items are allowed on a given cell, if you
* 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
*/
boolean isBlackListed( @Nonnull ItemStack cellItem, @Nonnull T requestedAddition );
boolean isBlackListed( ItemStack cellItem, IAEItemStack requestedAddition );
/**
* Allows you to specify if this storage cell can be stored inside other
@@ -106,16 +115,10 @@ public interface IStorageCell<T extends IAEStack<T>> extends ICellWorkbenchItem
*
* @return if the ItemStack should behavior as a storage cell.
*/
boolean isStorageCell( @Nonnull ItemStack i );
boolean isStorageCell( ItemStack i );
/**
* @return drain in ae/t this storage cell will use.
*/
double getIdleDrain();
/**
* @return the type of channel your cell should be part of
*/
@Nonnull
IStorageChannel<T> getChannel();
}
@@ -29,5 +29,5 @@ package appeng.api.implementations.items;
*/
public enum MemoryCardMessages
{
INVALID_MACHINE, SETTINGS_LOADED, SETTINGS_SAVED, SETTINGS_RESET, SETTINGS_CLEARED
INVALID_MACHINE, SETTINGS_LOADED, SETTINGS_SAVED, SETTINGS_CLEARED
}
@@ -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 );
}
@@ -40,13 +40,11 @@ public interface IChestOrDrive extends ICellContainer, IGridHost, IOrientable
/**
* 0 - cell is missing.
*
* 1 - green, the cell is present and partially empty
* 1 - green,
*
* 2 - orange, the cell is present and full on types
* 2 - orange,
*
* 3 - red, the cell is present and full on bytes
*
* 4 - blue, the cell is present but totally empty
* 3 - red
*
* @param slot slot index
*
@@ -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
{
}
@@ -24,7 +24,7 @@
package appeng.api.implementations.tiles;
import net.minecraftforge.items.IItemHandler;
import net.minecraft.inventory.IInventory;
public interface ISegmentedInventory
@@ -38,5 +38,5 @@ public interface ISegmentedInventory
*
* @return inventory with inventory name
*/
IItemHandler getInventoryByName( String name );
IInventory getInventoryByName( String name );
}

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