Compare commits
553 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 6ca3e6e696 | |||
| a4b5cfc3b9 | |||
| 38b0a7a153 | |||
| aa4863a979 | |||
| 44c7a46315 | |||
| c3b1dea7c5 | |||
| 40ec517480 | |||
| 2fdc16d3a8 | |||
| 053485a95a | |||
| e910af7734 | |||
| 59d7bd6c16 | |||
| 1a11462ddd | |||
| 77d615559f | |||
| 6878bfa4b0 | |||
| f1d50eca1a | |||
| 4ee32dd0b0 | |||
| 66e589324a | |||
| 362b001cb4 | |||
| b6fd4b3c0f | |||
| e364603a5a | |||
| c58bebc346 | |||
| 97f11f0c61 | |||
| 5c2fa72f95 | |||
| ebd8501301 | |||
| fa07247bd7 | |||
| 95d25ddf47 | |||
| 7a45e1faf4 | |||
| 1f88494832 | |||
| c629b4e0cf | |||
| 65ca607134 | |||
| 898c07ca01 | |||
| 883c267aa8 | |||
| 22cf913708 | |||
| b4ba1af1ec | |||
| 892c919ee2 | |||
| a65b3d2ceb | |||
| c826a3e24f | |||
| fc98505f22 | |||
| ea54ccbcf5 | |||
| 7796c6d4b6 | |||
| e2e6f6e83f | |||
| a7a1a87cd8 | |||
| e50eb7965f | |||
| d25a8a53a2 | |||
| 92b48f01a2 | |||
| 42f0d37c44 | |||
| 088a1827be | |||
| 6a21968dab | |||
| 7c5ff5322a | |||
| 7834028459 | |||
| c43cbbef43 | |||
| ead6274ca4 | |||
| f1c41bab3f | |||
| 12e74dc0de | |||
| c10088d907 | |||
| a12d29c4a0 | |||
| 2227510acf | |||
| 97ae7e1f14 | |||
| fc119070b2 | |||
| 82e3a95f11 | |||
| e6998913e1 | |||
| a3e69ce608 | |||
| ceef176a2a | |||
| c2e2696707 | |||
| 4d6c61dfcb | |||
| 932141cc9e | |||
| adf59774d4 | |||
| 9c6668b0f7 | |||
| 1b7f11a12e | |||
| 3cf4f9122c | |||
| d97996070a | |||
| 8a165bea09 | |||
| f707f95373 | |||
| b2a660ec9b | |||
| d6499c16b0 | |||
| de3e0178a4 | |||
| 203522316c | |||
| 719ea5090b | |||
| 00e19d67a2 | |||
| 169f6393d1 | |||
| 12bf337238 | |||
| 3b544c2486 | |||
| 660e17d167 | |||
| b10246a67b | |||
| 74362bb543 | |||
| 81df58afa5 | |||
| 535289e694 | |||
| d730503378 | |||
| f3349b0a2d | |||
| f667e9a5f0 | |||
| 2c0a2975de | |||
| 2e3d6b721a | |||
| 94e294f4e9 | |||
| 91620a0042 | |||
| ffc79b5494 | |||
| ce7c29d0ac | |||
| 5ac8db41e7 | |||
| 6ece190ac4 | |||
| 00a596ea8f | |||
| 1fc1d5517d | |||
| d5fc7a5b21 | |||
| 1f85d0f607 | |||
| dfe5b82bda | |||
| c7f8f4249e | |||
| 5efa6d6251 | |||
| 4269a66a4b | |||
| df2a7c1858 | |||
| c483bd17f5 | |||
| 92536fceb4 | |||
| ded71cb2bd | |||
| 41a4518c5b | |||
| 87643094c3 | |||
| 8a4c9b58e6 | |||
| 5436e6bf08 | |||
| 078112d97b | |||
| 46355a4e9b | |||
| eb389971a3 | |||
| a38ebf7c4d | |||
| dfcba264f3 | |||
| d343ac47f5 | |||
| 05db930a4e | |||
| 33bc0a6a3f | |||
| f2f48a8d59 | |||
| 0f0af2349b | |||
| 32a4fcab77 | |||
| a847a01d8a | |||
| ed643787df | |||
| 524b26d2a2 | |||
| 184b1f8efb | |||
| 06cca13087 | |||
| 8e735e72ff | |||
| d3dd137570 | |||
| 78e1126c38 | |||
| ebe3ff045d | |||
| 6291a545c3 | |||
| 99fd5a9d53 | |||
| 416c7d2683 | |||
| 0c88d1e7ee | |||
| d88f550eb0 | |||
| e21c59b326 | |||
| d8af8d26be | |||
| 02426bc101 | |||
| 11f8471772 | |||
| d35b720a16 | |||
| 7a5b84c10a | |||
| 800860d4e6 | |||
| ac81418684 | |||
| 7daad58607 | |||
| 038ca23523 | |||
| 37d8833b95 | |||
| fdcba13369 | |||
| b1ac0adfd8 | |||
| 7ba2893635 | |||
| ed8baf8c15 | |||
| 758377ed5d | |||
| a2091d10fe | |||
| fed12cb99f | |||
| 66c365d11f | |||
| 044f4c9ed3 | |||
| 91a74813d9 | |||
| a0b645a0a7 | |||
| d439fb2915 | |||
| 7efd4d872f | |||
| 1b09760631 | |||
| 04daadceed | |||
| 4d3df96350 | |||
| d7e2ae8fcb | |||
| 73f471e685 | |||
| 390ad875ee | |||
| e5f43bf315 | |||
| 8a72ebca89 | |||
| ad1eff2adb | |||
| 9e252df8d9 | |||
| 67584083c6 | |||
| c1c7e94cf6 | |||
| 85dec35366 | |||
| d5372a5ff6 | |||
| c8eb792d38 | |||
| f4ef7edf86 | |||
| 67c733b418 | |||
| fe4db2eb98 | |||
| 2891014cf6 | |||
| e809c688df | |||
| 71a9bb2532 | |||
| 3363acb7db | |||
| 8f6f35b9cf | |||
| ff75f34333 | |||
| e2c0129037 | |||
| 7fe7f4b1c2 | |||
| 693487504c | |||
| 883d9ba49b | |||
| fe8d824526 | |||
| d2250b115f | |||
| e5ab9df086 | |||
| 96af371882 | |||
| bde76d1fb1 | |||
| eb4caaa688 | |||
| 3ba04b3831 | |||
| 7cd8b72bb7 | |||
| 2182b6e37c | |||
| 5d26b98ab8 | |||
| 979531afb7 | |||
| dcf7de9000 | |||
| 87999dbf27 | |||
| c2d18ce013 | |||
| 046a27bf4c | |||
| 841bc6e356 | |||
| e72b5b369c | |||
| d635a87f01 | |||
| 51481d3e30 | |||
| 77e11c7a24 | |||
| 3056bb6ffb | |||
| edc0cef2bb | |||
| 4bd2797f5e | |||
| f37dfd0a24 | |||
| 937ea00e9d | |||
| b431d5d681 | |||
| 0ef854ca4b | |||
| 2c6e50d48a | |||
| dcd94b1cfa | |||
| 89de98f71e | |||
| d16677224a | |||
| 89bebc4385 | |||
| 987ea8d39d | |||
| f4212a86c3 | |||
| 3c4a0cae11 | |||
| 2894a7caa0 | |||
| 044e639827 | |||
| d7b97fa7b8 | |||
| 62435a65f1 | |||
| bf4818cf97 | |||
| 3e09c49e03 | |||
| 9481c9a7d7 | |||
| ccefb47581 | |||
| 59af05aeb1 | |||
| b32834e2b3 | |||
| 6c7cbb7ee1 | |||
| 84c065ff28 | |||
| c9b92a81a3 | |||
| eed4776c6f | |||
| 22807bc619 | |||
| ae352c093e | |||
| 36d6681eac | |||
| 6cffe93970 | |||
| b1472c58d0 | |||
| 96450a76c7 | |||
| ac209053b9 | |||
| dce1aa37eb | |||
| 0b6831e4d7 | |||
| da6d8ba9a8 | |||
| f0e45c7a3c | |||
| cbfc88c87f | |||
| 8c5842aca9 | |||
| 483049f555 | |||
| a7a65ae39d | |||
| 45878df17d | |||
| 98142d8ade | |||
| 7956872d1d | |||
| e243c8e9a2 | |||
| 641d0d40cc | |||
| 50fad685b6 | |||
| 1ad49edd76 | |||
| 7ceaa4cc3e | |||
| b70c86542b | |||
| c1197c0084 | |||
| f0d807f0a2 | |||
| 5fa2c0ab27 | |||
| 3063bd887c | |||
| fac4a8f9dc | |||
| 9d8226da19 | |||
| 33754d289d | |||
| 959672dae3 | |||
| 90c17c09a8 | |||
| e0bf7223e0 | |||
| ba9af94228 | |||
| 122b6163dc | |||
| fab42ccc75 | |||
| f5dd2c8b0a | |||
| a126112a2d | |||
| 99cda5f5a3 | |||
| 56a5363528 | |||
| be65edbd5b | |||
| fe5d9251eb | |||
| 3cf48b2291 | |||
| cc4599b5fc | |||
| c1fa77df51 | |||
| 725fa491e6 | |||
| e2a6cd1d57 | |||
| 6ddf60fab8 | |||
| 2c07acfe81 | |||
| 3749742231 | |||
| 74b9610b45 | |||
| a725779ff6 | |||
| b82df25c75 | |||
| cc9b33b473 | |||
| 5496b746ea | |||
| f80f623ccf | |||
| cba6c5500f | |||
| bc8268af94 | |||
| 297cd16702 | |||
| 41711e50b9 | |||
| 2bfb8b75e8 | |||
| 58e96aa3de | |||
| 4f07b63b13 | |||
| 905dd6c888 | |||
| ab7f35a9ee | |||
| 6e81f698c0 | |||
| 8ad8ce68b5 | |||
| 644194d0d6 | |||
| 95b27f490c | |||
| 6032c0328e | |||
| e8d554d69d | |||
| 1e15b23506 | |||
| 2ed7a5598a | |||
| 1c05dd5834 | |||
| 632d124359 | |||
| 829c18e2bb | |||
| d3a5be7ed6 | |||
| 217cbf0982 | |||
| 4dd0a4cd96 | |||
| 54c0ce43ea | |||
| bd8f43acbf | |||
| 970630a90d | |||
| 771a944058 | |||
| db1cd8c312 | |||
| 375e1efb15 | |||
| 955fcac92a | |||
| 216e2cb1e3 | |||
| 53f5724657 | |||
| a3269826f9 | |||
| 1a918be658 | |||
| 90130e72aa | |||
| c8f10d92bb | |||
| 548af3c6cc | |||
| 98b9380494 | |||
| bbf4d4a9ce | |||
| 1513ba3f6a | |||
| f03f8ec432 | |||
| e1dcd588b7 | |||
| 8338a7d13e | |||
| b8e685b1b6 | |||
| d84500c5b7 | |||
| a1679c944b | |||
| a3a39201d1 | |||
| d788da687e | |||
| 030e0c6a14 | |||
| 8e4265aa33 | |||
| 80eaa032b9 | |||
| bee9c70497 | |||
| c4fa21c193 | |||
| 8a7450168b | |||
| 7cb641cdc8 | |||
| b5b8050c4c | |||
| e65083b045 | |||
| b61219ef88 | |||
| 4f9fd1b369 | |||
| 630fae3f73 | |||
| 488ef1b544 | |||
| 098ee2f000 | |||
| 04d2b06c0d | |||
| ac48ab02fc | |||
| 9022150e38 | |||
| 65c6d2249a | |||
| 8e7f79a9ea | |||
| 95b48b9438 | |||
| cdd76b7b22 | |||
| 3e2bc0e038 | |||
| eec3e59eea | |||
| e39855b48f | |||
| cdcab7d91c | |||
| 27ad2c2b96 | |||
| 542a2e5d5a | |||
| 3b58f5e8da | |||
| 092afad4a5 | |||
| 6aa810d62a | |||
| 41d98f9944 | |||
| 1b198979fd | |||
| 8d5cc916e0 | |||
| 5abb8bf886 | |||
| 0bed78a144 | |||
| 30940e91ea | |||
| 0f9ac5fdda | |||
| 5e001d86cb | |||
| b13a338948 | |||
| 454404b0c1 | |||
| bb1e191666 | |||
| b72fce97db | |||
| bcc4a732ed | |||
| 52d28fabe3 | |||
| c077840988 | |||
| 8f6510aad4 | |||
| fa8427dcbd | |||
| 7eb09fc4db | |||
| ac528d09ae | |||
| c97165cc63 | |||
| 08ee8f7656 | |||
| 727fcc528f | |||
| a4c468b9cf | |||
| 4ad31f5066 | |||
| f70e97046f | |||
| 3a053d9ebe | |||
| fbaff342e4 | |||
| f0baea3be8 | |||
| fd7e393d23 | |||
| a24ed38e90 | |||
| 15582fd1df | |||
| f9cad0758d | |||
| 406013142e | |||
| 7de90ed0ae | |||
| 8ec8babb6a | |||
| 621910df91 | |||
| 66437897be | |||
| 7414840530 | |||
| 0741e4ae09 | |||
| 87f6a63f47 | |||
| b0950683a1 | |||
| 009cf8ac40 | |||
| 4c272de77f | |||
| 6648d18f00 | |||
| 16b5b5aea2 | |||
| e20697a7d9 | |||
| dc0447d137 | |||
| 577b1fa757 | |||
| 3d69dc9bc4 | |||
| 66c87a2fa2 | |||
| fdab91323c | |||
| 98a8c3d06b | |||
| 458356a2be | |||
| c91b432e09 | |||
| d67d93b343 | |||
| f6f8da28af | |||
| 76fd3c1166 | |||
| 3da881829e | |||
| 90ee7fb15d | |||
| e5e2714273 | |||
| 1534521362 | |||
| 0f8204cd93 | |||
| eb11845a2f | |||
| fe213e5ac5 | |||
| 25c82b2c9f | |||
| d03faae983 | |||
| 76e19874cf | |||
| 1975c3c262 | |||
| 720feb4f16 | |||
| 588579d67f | |||
| 043f6e9919 | |||
| cc7824a0e5 | |||
| a57cd3f580 | |||
| 33f54a1bd6 | |||
| 3008088ad7 | |||
| 198ea9f16e | |||
| d8c5e6a5fa | |||
| fbcf8c4705 | |||
| d67f97cd16 | |||
| 0e2f8a22a2 | |||
| 20fc0e136d | |||
| 7f7495f1df | |||
| e6e858820f | |||
| 4679b0ee61 | |||
| 890eef1803 | |||
| 780ce89ac3 | |||
| e96339dd2b | |||
| b67d7eed82 | |||
| 5ebd8452bf | |||
| ee774cd3f8 | |||
| 0a2f90d115 | |||
| 0f86efa3f5 | |||
| 7398af0e1c | |||
| eb0b304fd9 | |||
| c455ee69b8 | |||
| 820a6bdbd6 | |||
| 7a8499c455 | |||
| 76f17ba53c | |||
| 16a0872d06 | |||
| 49a87f62ce | |||
| c382ab7300 | |||
| 49a6df5bc7 | |||
| 10e050c35b | |||
| b1e249aad0 | |||
| d3bb71d834 | |||
| 3f7051ec8e | |||
| 2f1f19bbb3 | |||
| 4c7f065af3 | |||
| 6c52f31686 | |||
| 3ac7e518b1 | |||
| af85a2bf67 | |||
| c4b4a257f3 | |||
| 4eba3bca5b | |||
| cd78586910 | |||
| 178198b0c6 | |||
| bdf46a6ee2 | |||
| 0be2011645 | |||
| bce500616c | |||
| e022c23c8f | |||
| 61b81fc802 | |||
| b819fe4adb | |||
| 66a797dd7c | |||
| 99c294e948 | |||
| 6529de911a | |||
| 650edae902 | |||
| 78904204cf | |||
| df7ab00c37 | |||
| 5432decf95 | |||
| da5879b667 | |||
| 370fc49357 | |||
| c74aaddbd3 | |||
| 1a4db4b8d7 | |||
| d77d21858e | |||
| 42bfc549be | |||
| c6bdf845a8 | |||
| ccc46e77a3 | |||
| 7e45cf0e37 | |||
| 86dd8193f7 | |||
| 5fff8310d6 | |||
| 1cde7bc933 | |||
| ed9e6dd21c | |||
| 589730bfad | |||
| 8700a79ca6 | |||
| a14cf2204d | |||
| 8bed7f223e | |||
| db85419702 | |||
| fb79fd284d | |||
| e3305c1963 | |||
| a3c85b4a59 | |||
| a2b20f1d67 | |||
| 86908b1ae6 | |||
| 6bf52b0b0f | |||
| eb1e86cacb | |||
| c405e725b2 | |||
| d377af9a69 | |||
| 12dbd17320 | |||
| 5028c8025b | |||
| d11d6e754f | |||
| 887339f7b8 | |||
| a665200c31 | |||
| 6554e295d5 | |||
| 4eeb554dcb | |||
| 3eae4a7d19 | |||
| 6c91e852ec | |||
| 52f516299b | |||
| c74166b02a | |||
| 26e86a114c | |||
| fc834036a0 | |||
| f96f7d82c5 | |||
| c592f54a77 | |||
| 89609a83ea | |||
| e67969f52f | |||
| 32a0496bc2 | |||
| 6df311c11a | |||
| 2e23b92763 | |||
| 41a029ffb4 | |||
| 9c8f914f42 | |||
| d75cdc9696 |
+11
-6
@@ -12,15 +12,18 @@ 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]` 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.
|
||||
* 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.
|
||||
* 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
|
||||
* Never post an excerpt of what you consider important
|
||||
* Always 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
|
||||
@@ -33,10 +36,12 @@ 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
|
||||
5. Click `Submit New Issue`, and wait for feedback!
|
||||
4. 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.
|
||||
@@ -108,7 +113,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, but in case you find them not formatting it correctly, then please report it
|
||||
We try to keep them up to date. Please report any case of maintaining the correct formatting.
|
||||
|
||||
### Whitespace
|
||||
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
---
|
||||
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:
|
||||
@@ -0,0 +1,17 @@
|
||||
---
|
||||
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. -->
|
||||
@@ -0,0 +1,15 @@
|
||||
name: 'Lock threads'
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 0 * * *'
|
||||
|
||||
jobs:
|
||||
lock:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: dessant/lock-threads@v2
|
||||
with:
|
||||
github-token: ${{ github.token }}
|
||||
issue-lock-inactive-days: '180'
|
||||
pr-lock-inactive-days: '180'
|
||||
+4
-1
@@ -25,4 +25,7 @@
|
||||
!codeformat/
|
||||
|
||||
# Github specific files and directories
|
||||
!.github/
|
||||
!.github/
|
||||
|
||||
# Explicit ignores
|
||||
Thumbs.db
|
||||
+19
-6
@@ -7,14 +7,27 @@ jdk:
|
||||
- openjdk8
|
||||
|
||||
before_cache:
|
||||
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
|
||||
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
|
||||
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
|
||||
- rm -f $HOME/.gradle/caches/minecraft/deobfedDeps/providedDummy.jar
|
||||
- rm -f $HOME/.gradle/caches/minecraft/deobfedDeps/compileDummy.jar
|
||||
- rm -f $HOME/.gradle/caches/minecraft/ForgeVersion.json
|
||||
- rm -f $HOME/.gradle/caches/minecraft/ForgeVersion.json.etag
|
||||
- rm -fr $HOME/.gradle/caches/minecraft/deobfedDeps
|
||||
- rm -f $HOME/.gradle/caches/*/fileHashes/fileHashes.bin
|
||||
- rm -f $HOME/.gradle/caches/*/fileHashes/fileHashes.lock
|
||||
|
||||
cache:
|
||||
directories:
|
||||
- $HOME/.gradle/caches/
|
||||
- $HOME/.gradle/wrapper/
|
||||
- '$HOME/.m2/repository'
|
||||
- '$HOME/.sonar/cache'
|
||||
- '$HOME/.gradle/wrapper'
|
||||
- '$HOME/.gradle/caches'
|
||||
|
||||
addons:
|
||||
sonarcloud:
|
||||
organization: "appliedenergistics"
|
||||
|
||||
install: "./gradlew setupCIWorkspace"
|
||||
script: "./gradlew build test"
|
||||
script:
|
||||
- "./gradlew build"
|
||||
- "./gradlew test"
|
||||
- "./gradlew sonarqube"
|
||||
|
||||
@@ -1,191 +1,29 @@
|
||||
[](https://travis-ci.org/AppliedEnergistics/Applied-Energistics-2)
|
||||
[](https://github.com/AppliedEnergistics/Applied-Energistics-2/releases)
|
||||
This is a fork of AE2 i made for trying to solve issues for the [Omnifactory](https://www.curseforge.com/minecraft/modpacks/omnifactory) modpack.
|
||||
|
||||
# Applied Energistics 2
|
||||
See https://github.com/PrototypeTrousers/Applied-Energistics-2/tree/AE2-Omnifactory branch for commits
|
||||
and
|
||||
https://github.com/PrototypeTrousers/Applied-Energistics-2/releases for the compiled jars.
|
||||
|
||||
## Table of Contents
|
||||
|
||||
* [About](#about)
|
||||
* [Contacts](#contacts)
|
||||
* [License](#license)
|
||||
* [Downloads](#downloads)
|
||||
* [Nightly Builds](#nightly-builds)
|
||||
* [Installation](#installation)
|
||||
* [Issues](#issues)
|
||||
* [Building](#building)
|
||||
* [Contribution](#contribution)
|
||||
* [API](#applied-energistics-2-api)
|
||||
* [Localization](#applied-energistics-2-localization)
|
||||
* [Credits](#credits)
|
||||
# Applied Energistics 2 (PrototypeTrousers fork for Omnifactory)
|
||||
|
||||
## About
|
||||
|
||||
A Mod about Matter, Energy and using them to conquer the world..
|
||||
|
||||
## Contacts
|
||||
|
||||
* [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 - 2015 AlgorithmX2 et al
|
||||
- (c) 2013 - 2018 AlgorithmX2 et al
|
||||
- [](http://opensource.org/licenses/MIT)
|
||||
* Applied Energistics 2
|
||||
- (c) 2013 - 2015 AlgorithmX2 et al
|
||||
- (c) 2013 - 2018 AlgorithmX2 et al
|
||||
- [](https://raw.githubusercontent.com/AppliedEnergistics/Applied-Energistics-2/rv2/LICENSE)
|
||||
* Textures and Models
|
||||
- (c) 2013 - 2015 AlgorithmX2 et al
|
||||
- (c) 2013 - 2018 AlgorithmX2 et al
|
||||
- [](https://creativecommons.org/licenses/by-nc-sa/3.0/)
|
||||
* Text and Translations
|
||||
- [](https://creativecommons.org/publicdomain/zero/1.0/)
|
||||
|
||||
## Downloads
|
||||
|
||||
Downloads can be found on [CurseForge](http://www.curse.com/mc-mods/minecraft/223794-applied-energistics-2) or on the [official website](http://ae-mod.info/Downloads/).
|
||||
|
||||
## Nightly Builds
|
||||
|
||||
[](https://ci.appveyor.com/project/shartte/applied-energistics-2/history)
|
||||
|
||||
[Download Latest Nightly Build](https://ci.appveyor.com/api/projects/shartte/applied-energistics-2/artifacts/ae2-rv4-nightly.zip?branch=master)
|
||||
|
||||
Nightly builds for the Minecraft 1.10.2 branch of AE2 (rv4-alpha) are available from [AppVeyor](https://ci.appveyor.com/project/shartte/applied-energistics-2/history). These builds are only for testing purposes and might lead to loss of data, and will contain significant bugs. Please see below on how you can report bugs you find during testing.
|
||||
|
||||
## Installation
|
||||
|
||||
You install this mod by putting it into the `minecraft/mods/` folder. It has no additional hard dependencies.
|
||||
|
||||
## 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, execute `gradlew genIntellijRuns` and change RunConfiguration to `*_main` as quickfix for [ForgeGradle](https://github.com/MinecraftForge/ForgeGradle/issues/357)
|
||||
- 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 or updated Translations
|
||||
|
||||
The language files are located in `/src/main/resources/assets/appliedenergistics2/lang/` and use the [appropriate locale code](http://minecraft.gamepedia.com/Language) as name and `.lang` as extension.
|
||||
|
||||
To update an translation edit the corresponding file and improve/correct the existing entry. Or copy any entries from `en_US.lang` for missing translation.
|
||||
|
||||
To create a new translation, copy the contents of `en_US.lang`, create a new file with appropriate filename, and translate it to your language.
|
||||
|
||||
Please keep in mind that we use [String format](https://docs.oracle.com/javase/8/docs/api/java/util/Formatter.html) to pass additional data to the text for displaying.
|
||||
Therefore you should preserve parts like `%s` or `%1$d%%`, which allows us to replace them with the correct values while you still have the option to change their order for match the rules of grammar.
|
||||
This might not be possible for some languages. Should this be the case, please contact us.
|
||||
|
||||
### 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
|
||||
|
||||
Thanks to
|
||||
|
||||
+25
-26
@@ -27,10 +27,16 @@ buildscript {
|
||||
}
|
||||
}
|
||||
dependencies {
|
||||
classpath 'net.minecraftforge.gradle:ForgeGradle:2.2-SNAPSHOT'
|
||||
classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT'
|
||||
}
|
||||
}
|
||||
|
||||
plugins {
|
||||
id "org.sonarqube" version "2.6"
|
||||
}
|
||||
|
||||
apply plugin: 'net.minecraftforge.gradle.forge'
|
||||
apply plugin: 'jacoco'
|
||||
|
||||
repositories {
|
||||
mavenLocal()
|
||||
@@ -45,26 +51,34 @@ apply from: 'gradle/scripts/optional.gradle'
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
|
||||
version = aeversion + "-" + aechannel + "-" + aebuild
|
||||
// ensure everything uses UTF-8 and not some random codepage chosen by gradle
|
||||
compileJava.options.encoding = 'UTF-8'
|
||||
tasks.withType(JavaCompile) {
|
||||
options.encoding = 'UTF-8'
|
||||
}
|
||||
|
||||
version = aeversion + "-" + aechannel + "-" + aebuild + " " + trousers
|
||||
group = aegroup
|
||||
archivesBaseName = aebasename
|
||||
|
||||
// Add Coremod Manifest
|
||||
jar {
|
||||
manifest {
|
||||
attributes 'FMLCorePluginContainsFMLMod': 'true'
|
||||
attributes 'FMLAT': 'appeng_at.cfg'
|
||||
}
|
||||
|
||||
from sourceSets.api.output
|
||||
dependsOn apiClasses
|
||||
|
||||
// specify which files are really included, can control which APIs should be in
|
||||
include "appeng/**"
|
||||
include "assets/**"
|
||||
include "mcmod.info"
|
||||
include "pack.mcmeta"
|
||||
include "META-INF/appeng_at.cfg"
|
||||
}
|
||||
|
||||
minecraft {
|
||||
coreMod = "appeng.transformer.AppEngCore"
|
||||
|
||||
version = minecraft_version + "-" + forge_version
|
||||
|
||||
replaceIn "AEConfig.java"
|
||||
@@ -81,26 +95,8 @@ minecraft {
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
main {
|
||||
java {
|
||||
srcDirs += 'src/api/java'
|
||||
srcDirs += 'src/main/java/'
|
||||
}
|
||||
|
||||
resources {
|
||||
srcDir "src/main/resources/"
|
||||
include "assets/appliedenergistics2/recipes/**/*.recipe",
|
||||
"assets/appliedenergistics2/recipes/README.html",
|
||||
"assets/appliedenergistics2/lang/*.lang",
|
||||
"assets/appliedenergistics2/blockstates/**/*.json",
|
||||
"assets/appliedenergistics2/models/**/*.json",
|
||||
"assets/appliedenergistics2/textures/**/*.png",
|
||||
"assets/appliedenergistics2/textures/**/*.mcmeta",
|
||||
"assets/appliedenergistics2/meta/*",
|
||||
"mcmod.info",
|
||||
"pack.mcmeta"
|
||||
}
|
||||
}
|
||||
api
|
||||
main
|
||||
}
|
||||
|
||||
processResources
|
||||
@@ -119,4 +115,7 @@ processResources
|
||||
from(sourceSets.main.resources.srcDirs) {
|
||||
exclude 'mcmod.info'
|
||||
}
|
||||
}
|
||||
|
||||
// move access transformer to META-INF
|
||||
rename '(.+_at.cfg)', 'META-INF/$1'
|
||||
}
|
||||
|
||||
@@ -1,24 +1,28 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<profiles version="12">
|
||||
<profile kind="CodeFormatterProfile" name="AE2" version="12">
|
||||
<profiles version="13">
|
||||
<profile kind="CodeFormatterProfile" name="AE2" version="13">
|
||||
<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"/>
|
||||
@@ -26,17 +30,19 @@
|
||||
<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="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_enum_constants" value="80"/>
|
||||
<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"/>
|
||||
@@ -52,14 +58,16 @@
|
||||
<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="end_of_line"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration" value="next_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"/>
|
||||
@@ -82,6 +90,7 @@
|
||||
<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"/>
|
||||
@@ -93,15 +102,16 @@
|
||||
<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="end_of_line"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_lambda_body" value="next_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="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation" value="16"/>
|
||||
<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"/>
|
||||
@@ -112,9 +122,10 @@
|
||||
<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="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer" value="16"/>
|
||||
<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"/>
|
||||
@@ -153,15 +164,18 @@
|
||||
<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.alignment_for_selector_in_method_invocation" value="0"/>
|
||||
<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.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"/>
|
||||
@@ -183,6 +197,7 @@
|
||||
<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"/>
|
||||
@@ -194,8 +209,10 @@
|
||||
<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"/>
|
||||
@@ -256,6 +273,7 @@
|
||||
<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"/>
|
||||
@@ -271,6 +289,7 @@
|
||||
<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"/>
|
||||
|
||||
+22
-10
@@ -1,24 +1,36 @@
|
||||
aeversion=rv4
|
||||
aechannel=alpha
|
||||
aebuild=0
|
||||
aeversion=rv6
|
||||
aechannel=stable
|
||||
aebuild=7
|
||||
aegroup=appeng
|
||||
aebasename=appliedenergistics2
|
||||
trousers=omni-fixes-v21b
|
||||
|
||||
#########################################################
|
||||
# Versions #
|
||||
#########################################################
|
||||
minecraft_version=1.10.2
|
||||
mcp_mappings=snapshot_20161018
|
||||
forge_version=12.18.2.2104
|
||||
minecraft_version=1.12.2
|
||||
mcp_mappings=snapshot_20171003
|
||||
forge_version=14.23.5.2847
|
||||
|
||||
#########################################################
|
||||
# Installable #
|
||||
#########################################################
|
||||
waila_version=1.7.0-B3_1.9.4
|
||||
hwyla_version=1.8.26-B41_1.12.2
|
||||
|
||||
#########################################################
|
||||
# Provided APIs #
|
||||
#########################################################
|
||||
jei_version=3.12.7.312
|
||||
tesla_version=1.10.2-1.2.1.49
|
||||
ic2_version=2.6.96-ex110
|
||||
jei_version=4.16.1.302
|
||||
tesla_version=1.0.63
|
||||
ic2_version=2.8.73-ex112
|
||||
top_version=1.12-1.4.23-16
|
||||
cofhcore_version=1.12.2-4.5.2.19
|
||||
crafttweaker_version=4.1.8.9
|
||||
inventorytweaks_version=1.63
|
||||
ctm_version=MC1.12.2-0.3.1.16
|
||||
|
||||
#########################################################
|
||||
# Deployment #
|
||||
#########################################################
|
||||
website_version=1.12.2
|
||||
curse_versions=1.12.2
|
||||
|
||||
@@ -24,36 +24,44 @@ allprojects {
|
||||
}
|
||||
|
||||
javadoc {
|
||||
options.encoding = 'UTF-8'
|
||||
options.charSet = 'UTF-8'
|
||||
options.encoding = 'UTF-8'
|
||||
options.charSet = 'UTF-8'
|
||||
}
|
||||
|
||||
task javadocs(type: Javadoc) {
|
||||
source = sourceSets.api.java
|
||||
include "appeng/api/**"
|
||||
source = sourceSets.api.java
|
||||
include "appeng/api/**"
|
||||
|
||||
// Due to ForgeGradle having to be a special snowflake,
|
||||
// we have to add some custom configurations to the normal compile configuration and hope it does not break.
|
||||
classpath = configurations.compile + configurations.forgeGradleMc + configurations.forgeGradleMcDeps
|
||||
// Due to ForgeGradle having to be a special snowflake,
|
||||
// we have to add some custom configurations to the normal compile configuration and hope it does not break.
|
||||
classpath = configurations.compile + configurations.forgeGradleMc + configurations.forgeGradleMcDeps
|
||||
}
|
||||
|
||||
task javadocJar(type: Jar, dependsOn: javadocs) {
|
||||
from javadoc.destinationDir
|
||||
classifier = 'javadoc'
|
||||
|
||||
classifier = 'javadoc'
|
||||
}
|
||||
|
||||
task apiJar(type: Jar) {
|
||||
from sourceSets.api.java
|
||||
include "appeng/api/**"
|
||||
from sourceSets.api.java
|
||||
include "appeng/api/**"
|
||||
|
||||
from sourceSets.main.output
|
||||
include "appeng/api/**"
|
||||
from sourceSets.api.output
|
||||
include "appeng/api/**"
|
||||
|
||||
classifier = 'api'
|
||||
classifier = 'api'
|
||||
}
|
||||
|
||||
task sourceJar(type: Jar, overwrite: true) {
|
||||
from sourceSets.api.allSource
|
||||
from sourceSets.main.allSource
|
||||
|
||||
classifier = 'sources'
|
||||
}
|
||||
|
||||
artifacts {
|
||||
archives apiJar
|
||||
archives javadocJar
|
||||
archives sourceJar
|
||||
archives apiJar
|
||||
archives javadocJar
|
||||
archives sourceJar
|
||||
}
|
||||
@@ -19,6 +19,11 @@
|
||||
repositories {
|
||||
mavenLocal()
|
||||
|
||||
maven {
|
||||
name = "storagedrawers"
|
||||
url = "https://dl.bintray.com/jaquadro/dev/"
|
||||
}
|
||||
|
||||
maven {
|
||||
name "Mobius"
|
||||
url "http://mobiusstrip.eu/maven"
|
||||
@@ -31,13 +36,48 @@ repositories {
|
||||
|
||||
maven {
|
||||
name = "Tesla repo"
|
||||
url "http://maven.epoxide.xyz"
|
||||
url "http://maven.mcmoddev.com"
|
||||
}
|
||||
|
||||
maven {
|
||||
name = "IC2 repo"
|
||||
url = "http://maven.ic2.player.to"
|
||||
}
|
||||
|
||||
maven {
|
||||
name = "CoFH Maven"
|
||||
url = "http://maven.covers1624.net"
|
||||
}
|
||||
|
||||
maven { // TheOneProbe
|
||||
name 'tterrag maven'
|
||||
url "http://maven.tterrag.com/"
|
||||
}
|
||||
|
||||
maven { // McJtyLib
|
||||
name 'mcjty'
|
||||
url "http://maven.k-4u.nl/"
|
||||
}
|
||||
|
||||
maven { // Hwyla
|
||||
name 'tehnut'
|
||||
url "http://tehnut.info/maven"
|
||||
}
|
||||
|
||||
maven { // CraftTweaker
|
||||
name 'jared maven'
|
||||
url "http://maven.blamejared.com/"
|
||||
}
|
||||
|
||||
//maven { // modmaven, maven proxy
|
||||
// name 'modmaven'
|
||||
// url "https://modmaven.k-4u.nl/"
|
||||
//}
|
||||
|
||||
maven {
|
||||
name = "CurseForge"
|
||||
url = "https://minecraft.curseforge.com/api/maven/"
|
||||
}
|
||||
}
|
||||
|
||||
configurations {
|
||||
@@ -45,18 +85,29 @@ configurations {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compileOnly "com.jaquadro.minecraft.storagedrawers:StorageDrawers:1.12.2-5.4.2:api"
|
||||
compileOnly "gregtechce:gregtech:1.12.2:1.12.0.662"
|
||||
|
||||
// installable runtime dependencies
|
||||
mods "mcp.mobius.waila:Waila:${waila_version}"
|
||||
mods "mcp.mobius.waila:Hwyla:${hwyla_version}"
|
||||
mods "net.industrial-craft:industrialcraft-2:${ic2_version}:dev"
|
||||
mods "mcjty.theoneprobe:TheOneProbe-${minecraft_version}:${top_version}"
|
||||
|
||||
// compile against provided APIs
|
||||
compileOnly "mezz.jei:jei_${minecraft_version}:${jei_version}:api"
|
||||
compileOnly "mcp.mobius.waila:Waila:${waila_version}"
|
||||
compileOnly "net.darkhax.tesla:Tesla:${tesla_version}"
|
||||
compileOnly "mcp.mobius.waila:Hwyla:${hwyla_version}"
|
||||
compileOnly "net.darkhax.tesla:Tesla-1.12.2:${tesla_version}"
|
||||
compileOnly "net.industrial-craft:industrialcraft-2:${ic2_version}:api"
|
||||
compileOnly "mcjty.theoneprobe:TheOneProbe-1.12:${top_version}:api"
|
||||
compileOnly "cofh:CoFHCore:${cofhcore_version}:deobf"
|
||||
compileOnly "CraftTweaker2:CraftTweaker2-API:${crafttweaker_version}"
|
||||
compileOnly "inventory-tweaks:InventoryTweaks:${inventorytweaks_version}:api"
|
||||
compileOnly "team.chisel.ctm:CTM:${ctm_version}"
|
||||
|
||||
// at runtime, use the full JEI jar
|
||||
runtime "mezz.jei:jei_${minecraft_version}:${jei_version}"
|
||||
runtime "com.jaquadro.minecraft.storagedrawers:StorageDrawers:1.12.2-5.4.2"
|
||||
runtime "com.jaquadro.minecraft.chameleon:Chameleon:1.12-4.1.3"
|
||||
|
||||
// unit test dependencies
|
||||
testCompile "junit:junit:4.12"
|
||||
|
||||
@@ -20,18 +20,18 @@ task wrapper(type: Wrapper) {
|
||||
gradleVersion = "2.14"
|
||||
}
|
||||
|
||||
// WAILA
|
||||
task installWaila(type: Copy, dependsOn: "deinstallWaila") {
|
||||
// HWYLA
|
||||
task installHwyla(type: Copy, dependsOn: "deinstallHwyla") {
|
||||
from { configurations.mods }
|
||||
include "**/*Waila*.jar"
|
||||
include "**/*Hwyla*.jar"
|
||||
into file(minecraft.runDir + "/mods")
|
||||
}
|
||||
|
||||
task deinstallWaila(type: Delete) {
|
||||
delete fileTree(dir: minecraft.runDir + "/mods", include: "*Waila*.jar")
|
||||
task deinstallHwyla(type: Delete) {
|
||||
delete fileTree(dir: minecraft.runDir + "/mods", include: "*Hwyla*.jar")
|
||||
}
|
||||
|
||||
// IC²
|
||||
// IC2
|
||||
task installIC2(type: Copy, dependsOn: "deinstallIC2") {
|
||||
from { configurations.mods }
|
||||
include "**/*industrialcraft-2*.jar"
|
||||
@@ -41,3 +41,15 @@ task installIC2(type: Copy, dependsOn: "deinstallIC2") {
|
||||
task deinstallIC2(type: Delete) {
|
||||
delete fileTree(dir: minecraft.runDir + "/mods", include: "*industrialcraft-2*.jar")
|
||||
}
|
||||
|
||||
// TOP
|
||||
task installTop(type: Copy, dependsOn: ["deinstallTop"]) {
|
||||
from { configurations.mods }
|
||||
include "**/*TheOneProbe*.jar"
|
||||
into file(minecraft.runDir + "/mods")
|
||||
}
|
||||
|
||||
task deinstallTop(type: Delete) {
|
||||
delete fileTree(dir: minecraft.runDir + "/mods", include: "*TheOneProbe*.jar")
|
||||
}
|
||||
|
||||
|
||||
Vendored
BIN
Binary file not shown.
+1
-2
@@ -1,6 +1,5 @@
|
||||
#Fri Sep 16 14:56:32 CEST 2016
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.8-bin.zip
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
#!/usr/bin/env sh
|
||||
|
||||
##############################################################################
|
||||
##
|
||||
@@ -33,11 +33,11 @@ DEFAULT_JVM_OPTS=""
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD="maximum"
|
||||
|
||||
warn ( ) {
|
||||
warn () {
|
||||
echo "$*"
|
||||
}
|
||||
|
||||
die ( ) {
|
||||
die () {
|
||||
echo
|
||||
echo "$*"
|
||||
echo
|
||||
@@ -154,11 +154,19 @@ if $cygwin ; then
|
||||
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=("$@")
|
||||
# Escape application args
|
||||
save () {
|
||||
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
|
||||
echo " "
|
||||
}
|
||||
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
|
||||
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
|
||||
APP_ARGS=$(save "$@")
|
||||
|
||||
exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
|
||||
# Collect all arguments for the java command, following the shell quoting and substitution rules
|
||||
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
|
||||
|
||||
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
|
||||
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
|
||||
cd "$(dirname "$0")"
|
||||
fi
|
||||
|
||||
exec "$JAVACMD" "$@"
|
||||
|
||||
Vendored
-6
@@ -49,7 +49,6 @@ goto fail
|
||||
@rem Get command-line arguments, handling Windows 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.
|
||||
@@ -60,11 +59,6 @@ set _SKIP=2
|
||||
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
|
||||
|
||||
@@ -25,13 +25,13 @@ package appeng.api;
|
||||
|
||||
|
||||
import appeng.api.definitions.IDefinitions;
|
||||
import appeng.api.exceptions.FailedConnection;
|
||||
import appeng.api.features.IRegistryContainer;
|
||||
import appeng.api.networking.IGridBlock;
|
||||
import appeng.api.networking.IGridConnection;
|
||||
import appeng.api.networking.IGridHelper;
|
||||
import appeng.api.networking.IGridNode;
|
||||
import appeng.api.parts.IPartHelper;
|
||||
import appeng.api.storage.IStorageHelper;
|
||||
import appeng.api.util.IClientHelper;
|
||||
|
||||
|
||||
@AEInjectable
|
||||
public interface IAppEngApi
|
||||
@@ -42,36 +42,28 @@ public interface IAppEngApi
|
||||
IRegistryContainer registries();
|
||||
|
||||
/**
|
||||
* @return helper for working with storage data types.
|
||||
* @return A helper for working with storage data types.
|
||||
*/
|
||||
IStorageHelper storage();
|
||||
|
||||
/**
|
||||
* @return helper for working with grids, and buses.
|
||||
* @return A helper to create {@link IGridNode} and other grid related objects.
|
||||
*/
|
||||
IGridHelper grid();
|
||||
|
||||
/**
|
||||
* @return A helper for working with grids, and buses.
|
||||
*/
|
||||
IPartHelper partHelper();
|
||||
|
||||
/**
|
||||
* @return an accessible list of all AE definitions
|
||||
* @return An accessible list of all AE definitions
|
||||
*/
|
||||
IDefinitions definitions();
|
||||
|
||||
/**
|
||||
* create a grid node for your {@link appeng.api.networking.IGridHost}
|
||||
*
|
||||
* @param block grid block
|
||||
*
|
||||
* @return grid node of block
|
||||
* @return Utility methods primarily useful for client side stuff
|
||||
*/
|
||||
IGridNode createGridNode( IGridBlock block );
|
||||
IClientHelper client();
|
||||
|
||||
/**
|
||||
* 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;
|
||||
}
|
||||
@@ -1,39 +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.client;
|
||||
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.client.renderer.block.model.IBakedModel;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
|
||||
|
||||
public interface BakingPipelineElement<F, T>
|
||||
{
|
||||
|
||||
public List<T> pipe( List<F> elements, IBakedModel parent, IBlockState state, EnumFacing side, long rand );
|
||||
|
||||
}
|
||||
@@ -26,5 +26,20 @@ package appeng.api.config;
|
||||
|
||||
public enum ActionItems
|
||||
{
|
||||
WRENCH, CLOSE, STASH, ENCODE, SUBSTITUTION
|
||||
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,
|
||||
FREE_MOLECULAR_SLOT_SHORTCUT,
|
||||
TOGGLE_SHOW_FULL_INTERFACES_ON,
|
||||
TOGGLE_SHOW_FULL_INTERFACES_OFF,
|
||||
HIGHLIGHT_INTERFACE
|
||||
}
|
||||
@@ -26,5 +26,5 @@ package appeng.api.config;
|
||||
|
||||
public enum SearchBoxMode
|
||||
{
|
||||
AUTOSEARCH, MANUAL_SEARCH, JEI_AUTOSEARCH, JEI_MANUAL_SEARCH
|
||||
AUTOSEARCH, AUTOSEARCH_KEEP, MANUAL_SEARCH, MANUAL_SEARCH_KEEP, JEI_AUTOSEARCH, JEI_AUTOSEARCH_KEEP, JEI_MANUAL_SEARCH, JEI_MANUAL_SEARCH_KEEP
|
||||
}
|
||||
|
||||
@@ -33,29 +33,53 @@ 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 ) ), ACCESS( EnumSet.of( AccessRestriction.READ_WRITE, AccessRestriction.READ, AccessRestriction.WRITE ) ),
|
||||
POWER_UNITS( EnumSet.allOf( PowerUnits.class ) ),
|
||||
|
||||
SORT_DIRECTION( EnumSet.allOf( SortDir.class ) ), SORT_BY( EnumSet.allOf( SortOrder.class ) ),
|
||||
ACCESS( EnumSet.of( AccessRestriction.READ_WRITE, AccessRestriction.READ, AccessRestriction.WRITE ) ),
|
||||
|
||||
SEARCH_TOOLTIPS( EnumSet.of( YesNo.YES, YesNo.NO ) ), VIEW_MODE( EnumSet.allOf( ViewItems.class ) ), SEARCH_MODE( EnumSet.allOf( SearchBoxMode.class ) ),
|
||||
SORT_DIRECTION( EnumSet.allOf( SortDir.class ) ),
|
||||
|
||||
ACTIONS( EnumSet.allOf( ActionItems.class ) ), IO_DIRECTION( EnumSet.of( RelativeDirection.LEFT, RelativeDirection.RIGHT ) ),
|
||||
SORT_BY( EnumSet.allOf( SortOrder.class ) ),
|
||||
|
||||
BLOCK( EnumSet.of( YesNo.YES, YesNo.NO ) ), OPERATION_MODE( EnumSet.allOf( OperationMode.class ) ),
|
||||
SEARCH_TOOLTIPS( EnumSet.of( YesNo.YES, YesNo.NO ) ),
|
||||
|
||||
FULLNESS_MODE( EnumSet.allOf( FullnessMode.class ) ), CRAFT_ONLY( EnumSet.of( YesNo.YES, YesNo.NO ) ),
|
||||
VIEW_MODE( EnumSet.allOf( ViewItems.class ) ),
|
||||
|
||||
FUZZY_MODE( EnumSet.allOf( FuzzyMode.class ) ), LEVEL_TYPE( EnumSet.allOf( LevelType.class ) ),
|
||||
SEARCH_MODE( EnumSet.allOf( SearchBoxMode.class ) ),
|
||||
|
||||
TERMINAL_STYLE( EnumSet.of( TerminalStyle.TALL, TerminalStyle.SMALL ) ), COPY_MODE( EnumSet.allOf( CopyMode.class ) ),
|
||||
ACTIONS( EnumSet.allOf( ActionItems.class ) ),
|
||||
|
||||
INTERFACE_TERMINAL( EnumSet.of( YesNo.YES, YesNo.NO ) ), CRAFT_VIA_REDSTONE( EnumSet.of( YesNo.YES, YesNo.NO ) ),
|
||||
IO_DIRECTION( EnumSet.of( RelativeDirection.LEFT, RelativeDirection.RIGHT ) ),
|
||||
|
||||
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 ) );
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ public enum TunnelType
|
||||
{
|
||||
ME, // Network Tunnel
|
||||
IC2_POWER, // EU Tunnel
|
||||
RF_POWER, // RF Tunnel
|
||||
FE_POWER, // Forge Energy tunnel
|
||||
REDSTONE, // Redstone Tunnel
|
||||
FLUID, // Fluid Tunnel
|
||||
ITEM, // Item Tunnel
|
||||
|
||||
@@ -37,12 +37,16 @@ public enum Upgrades
|
||||
/**
|
||||
* Gold Tier Upgrades.
|
||||
*/
|
||||
CAPACITY( 0 ), REDSTONE( 0 ), CRAFTING( 0 ),
|
||||
CAPACITY( 0 ),
|
||||
REDSTONE( 0 ),
|
||||
CRAFTING( 0 ),
|
||||
|
||||
/**
|
||||
* Diamond Tier Upgrades.
|
||||
*/
|
||||
FUZZY( 1 ), SPEED( 1 ), INVERTER( 1 );
|
||||
FUZZY( 1 ),
|
||||
SPEED( 1 ),
|
||||
INVERTER( 1 );
|
||||
|
||||
private final int tier;
|
||||
private final Map<ItemStack, Integer> supportedMax = new HashMap<>();
|
||||
|
||||
@@ -148,6 +148,8 @@ public interface IBlocks
|
||||
|
||||
ITileDefinition iface();
|
||||
|
||||
ITileDefinition fluidIface();
|
||||
|
||||
ITileDefinition cellWorkbench();
|
||||
|
||||
ITileDefinition iOPort();
|
||||
|
||||
@@ -88,6 +88,14 @@ public interface IItems
|
||||
|
||||
IItemDefinition cell64k();
|
||||
|
||||
IItemDefinition fluidCell1k();
|
||||
|
||||
IItemDefinition fluidCell4k();
|
||||
|
||||
IItemDefinition fluidCell16k();
|
||||
|
||||
IItemDefinition fluidCell64k();
|
||||
|
||||
IItemDefinition spatialCell2();
|
||||
|
||||
IItemDefinition spatialCell16();
|
||||
|
||||
@@ -111,8 +111,6 @@ public interface IMaterials
|
||||
|
||||
IItemDefinition matterBall();
|
||||
|
||||
IItemDefinition ironNugget();
|
||||
|
||||
IItemDefinition certusQuartzCrystal();
|
||||
|
||||
IItemDefinition certusQuartzCrystalCharged();
|
||||
@@ -136,4 +134,12 @@ public interface IMaterials
|
||||
IItemDefinition qESingularity();
|
||||
|
||||
IItemDefinition blankPattern();
|
||||
|
||||
IItemDefinition fluidCell1kPart();
|
||||
|
||||
IItemDefinition fluidCell4kPart();
|
||||
|
||||
IItemDefinition fluidCell16kPart();
|
||||
|
||||
IItemDefinition fluidCell64kPart();
|
||||
}
|
||||
|
||||
@@ -38,7 +38,9 @@ public interface IParts
|
||||
|
||||
AEColoredItemDefinition cableGlass();
|
||||
|
||||
AEColoredItemDefinition cableDense();
|
||||
AEColoredItemDefinition cableDenseCovered();
|
||||
|
||||
AEColoredItemDefinition cableDenseSmart();
|
||||
|
||||
AEColoredItemDefinition lumenCableSmart();
|
||||
|
||||
@@ -46,7 +48,7 @@ public interface IParts
|
||||
|
||||
AEColoredItemDefinition lumenCableGlass();
|
||||
|
||||
AEColoredItemDefinition lumenCableDense();
|
||||
AEColoredItemDefinition lumenDenseCableSmart();
|
||||
|
||||
IItemDefinition quartzFiber();
|
||||
|
||||
@@ -62,6 +64,8 @@ public interface IParts
|
||||
|
||||
IItemDefinition iface();
|
||||
|
||||
IItemDefinition fluidIface();
|
||||
|
||||
IItemDefinition levelEmitter();
|
||||
|
||||
IItemDefinition annihilationPlane();
|
||||
@@ -76,11 +80,11 @@ public interface IParts
|
||||
|
||||
IItemDefinition p2PTunnelItems();
|
||||
|
||||
IItemDefinition p2PTunnelLiquids();
|
||||
IItemDefinition p2PTunnelFluids();
|
||||
|
||||
IItemDefinition p2PTunnelEU();
|
||||
|
||||
// IItemDefinition p2PTunnelRF();
|
||||
IItemDefinition p2PTunnelFE();
|
||||
|
||||
IItemDefinition p2PTunnelLight();
|
||||
|
||||
@@ -105,4 +109,18 @@ public interface IParts
|
||||
IItemDefinition storageMonitor();
|
||||
|
||||
IItemDefinition conversionMonitor();
|
||||
|
||||
IItemDefinition fluidTerminal();
|
||||
|
||||
IItemDefinition fluidImportBus();
|
||||
|
||||
IItemDefinition fluidExportBus();
|
||||
|
||||
IItemDefinition fluidStorageBus();
|
||||
|
||||
IItemDefinition fluidLevelEmitter();
|
||||
|
||||
IItemDefinition fluidAnnihilationPlane();
|
||||
|
||||
IItemDefinition fluidFormationnPlane();
|
||||
}
|
||||
|
||||
@@ -21,6 +21,8 @@ package appeng.api.exceptions;
|
||||
|
||||
public class CoreInaccessibleException extends RuntimeException
|
||||
{
|
||||
private static final long serialVersionUID = -7434641554655517242L;
|
||||
|
||||
public CoreInaccessibleException( final String message )
|
||||
{
|
||||
super( message );
|
||||
|
||||
@@ -37,7 +37,7 @@ import appeng.api.networking.IGridNode;
|
||||
* @version rv3
|
||||
* @since rv3
|
||||
*/
|
||||
public class ExistingConnectionException extends FailedConnection
|
||||
public class ExistingConnectionException extends FailedConnectionException
|
||||
{
|
||||
|
||||
private static final long serialVersionUID = 2975450379720353182L;
|
||||
|
||||
+3
-3
@@ -40,16 +40,16 @@ import appeng.api.networking.IGridNode;
|
||||
* @version rv3
|
||||
* @since rv0
|
||||
*/
|
||||
public class FailedConnection extends Exception
|
||||
public class FailedConnectionException extends Exception
|
||||
{
|
||||
|
||||
private static final long serialVersionUID = -2544208090248293753L;
|
||||
|
||||
public FailedConnection()
|
||||
public FailedConnectionException()
|
||||
{
|
||||
}
|
||||
|
||||
public FailedConnection( String message )
|
||||
public FailedConnectionException( String message )
|
||||
{
|
||||
super( message );
|
||||
}
|
||||
+4
-2
@@ -19,9 +19,11 @@
|
||||
package appeng.api.exceptions;
|
||||
|
||||
|
||||
public class MissingDefinition extends RuntimeException
|
||||
public class MissingDefinitionException extends RuntimeException
|
||||
{
|
||||
public MissingDefinition( final String message )
|
||||
private static final long serialVersionUID = -6547396584255825761L;
|
||||
|
||||
public MissingDefinitionException( final String message )
|
||||
{
|
||||
super( message );
|
||||
}
|
||||
+2
-2
@@ -24,12 +24,12 @@
|
||||
package appeng.api.exceptions;
|
||||
|
||||
|
||||
public class MissingIngredientError extends Exception
|
||||
public class MissingIngredientException extends Exception
|
||||
{
|
||||
|
||||
private static final long serialVersionUID = -998858343831371697L;
|
||||
|
||||
public MissingIngredientError( final String n )
|
||||
public MissingIngredientException( final String n )
|
||||
{
|
||||
super( n );
|
||||
}
|
||||
+2
-2
@@ -24,12 +24,12 @@
|
||||
package appeng.api.exceptions;
|
||||
|
||||
|
||||
public class ModNotInstalled extends Exception
|
||||
public class ModNotInstalledException extends Exception
|
||||
{
|
||||
|
||||
private static final long serialVersionUID = -9052435206368425494L;
|
||||
|
||||
public ModNotInstalled( final String t )
|
||||
public ModNotInstalledException( final String t )
|
||||
{
|
||||
super( t );
|
||||
}
|
||||
@@ -34,7 +34,7 @@ package appeng.api.exceptions;
|
||||
* @version rv3
|
||||
* @since rv3
|
||||
*/
|
||||
public class NullNodeConnectionException extends FailedConnection
|
||||
public class NullNodeConnectionException extends FailedConnectionException
|
||||
{
|
||||
|
||||
private static final long serialVersionUID = -2143719383495321764L;
|
||||
|
||||
+2
-2
@@ -24,12 +24,12 @@
|
||||
package appeng.api.exceptions;
|
||||
|
||||
|
||||
public class RecipeError extends Exception
|
||||
public class RecipeException extends Exception
|
||||
{
|
||||
|
||||
private static final long serialVersionUID = -6602870588617670262L;
|
||||
|
||||
public RecipeError( final String n )
|
||||
public RecipeException( final String n )
|
||||
{
|
||||
super( n );
|
||||
}
|
||||
+2
-2
@@ -24,12 +24,12 @@
|
||||
package appeng.api.exceptions;
|
||||
|
||||
|
||||
public class RegistrationError extends Exception
|
||||
public class RegistrationException extends Exception
|
||||
{
|
||||
|
||||
private static final long serialVersionUID = -6602870588617670263L;
|
||||
|
||||
public RegistrationError( final String n )
|
||||
public RegistrationException( final String n )
|
||||
{
|
||||
super( n );
|
||||
}
|
||||
@@ -34,7 +34,7 @@ package appeng.api.exceptions;
|
||||
* @version rv3
|
||||
* @since rv3
|
||||
*/
|
||||
public class SecurityConnectionException extends FailedConnection
|
||||
public class SecurityConnectionException extends FailedConnectionException
|
||||
{
|
||||
private static final long serialVersionUID = 5048714900434215426L;
|
||||
private static final String DEFAULT_MESSAGE = "Connection failed due to different security realms.";
|
||||
|
||||
@@ -0,0 +1,84 @@
|
||||
/*
|
||||
* 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 );
|
||||
|
||||
}
|
||||
+15
-43
@@ -24,13 +24,17 @@
|
||||
package appeng.api.features;
|
||||
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
|
||||
/**
|
||||
* Registration Records for {@link IGrinderRegistry}
|
||||
*/
|
||||
public interface IGrinderEntry
|
||||
public interface IGrinderRecipe
|
||||
{
|
||||
|
||||
/**
|
||||
@@ -38,66 +42,40 @@ public interface IGrinderEntry
|
||||
*
|
||||
* @return input that the grinder will accept.
|
||||
*/
|
||||
@Nonnull
|
||||
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
|
||||
*/
|
||||
@Nonnull
|
||||
ItemStack getOutput();
|
||||
|
||||
/**
|
||||
* allows you to change the output.
|
||||
* gets the current output
|
||||
*
|
||||
* @param output output item
|
||||
* @return output that the grinder will produce
|
||||
*/
|
||||
void setOutput( ItemStack output );
|
||||
@Nonnull
|
||||
Optional<ItemStack> getOptionalOutput();
|
||||
|
||||
/**
|
||||
* 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 );
|
||||
Optional<ItemStack> getSecondOptionalOutput();
|
||||
|
||||
/**
|
||||
* 0.0 - 1.0 the chance that the optional output will be generated.
|
||||
*
|
||||
* @return chance of optional output
|
||||
*/
|
||||
@Nonnull
|
||||
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.
|
||||
*
|
||||
@@ -106,16 +84,10 @@ public interface IGrinderEntry
|
||||
float getSecondOptionalChance();
|
||||
|
||||
/**
|
||||
* Energy cost, in turns.
|
||||
* Amount of turns required to process the item.
|
||||
*
|
||||
* @return number of turns it takes to produce the output from the input.
|
||||
*/
|
||||
int getEnergyCost();
|
||||
int getRequiredTurns();
|
||||
|
||||
/**
|
||||
* Allows you to adjust the number of turns
|
||||
*
|
||||
* @param c number of turns to produce output.
|
||||
*/
|
||||
void setEnergyCost( int c );
|
||||
}
|
||||
@@ -0,0 +1,115 @@
|
||||
/*
|
||||
* 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,7 +24,10 @@
|
||||
package appeng.api.features;
|
||||
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Collection;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
@@ -36,51 +39,63 @@ public interface IGrinderRegistry
|
||||
{
|
||||
|
||||
/**
|
||||
* Current list of registered recipes, you can modify this if you want too.
|
||||
* Extensible way to create a grinder recipe.
|
||||
*
|
||||
* @return builder for grinder recipes
|
||||
*/
|
||||
@Nonnull
|
||||
IGrinderRecipeBuilder builder();
|
||||
|
||||
/**
|
||||
* An immutable list of the currently registered recipes.
|
||||
*
|
||||
* @return currentlyRegisteredRecipes
|
||||
*/
|
||||
List<IGrinderEntry> getRecipes();
|
||||
@Nonnull
|
||||
Collection<IGrinderRecipe> getRecipes();
|
||||
|
||||
/**
|
||||
* add a new recipe the easy way, in → 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
|
||||
* Add a new recipe to the registry.
|
||||
*/
|
||||
void addRecipe( ItemStack in, ItemStack out, int turns );
|
||||
boolean addRecipe( IGrinderRecipe recipe );
|
||||
|
||||
/**
|
||||
* 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
|
||||
* Remove the specific from the recipe list.
|
||||
*
|
||||
* @param recipe The recipe to be removed.
|
||||
* @return true, if it was removed
|
||||
*/
|
||||
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 );
|
||||
boolean removeRecipe( @Nonnull IGrinderRecipe recipe );
|
||||
|
||||
/**
|
||||
* Searches for a recipe for a given input, and returns it.
|
||||
*
|
||||
* @param input input
|
||||
* @param input The {@link ItemStack} to be grinded.
|
||||
*
|
||||
* @return identified recipe or null
|
||||
*/
|
||||
IGrinderEntry getRecipeForInput( ItemStack input );
|
||||
@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 );
|
||||
|
||||
}
|
||||
|
||||
@@ -31,11 +31,19 @@ import net.minecraft.item.ItemStack;
|
||||
* Lets you manipulate Inscriber Recipes, by adding or editing existing ones.
|
||||
*
|
||||
* @author thatsIch
|
||||
* @version rv3
|
||||
* @version rv5
|
||||
* @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.
|
||||
*
|
||||
@@ -65,29 +73,25 @@ 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
|
||||
*/
|
||||
void addRecipe( IInscriberRecipe recipe );
|
||||
boolean 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
|
||||
*/
|
||||
void removeRecipe( IInscriberRecipe toBeRemovedRecipe );
|
||||
boolean removeRecipe( IInscriberRecipe toBeRemovedRecipe );
|
||||
|
||||
}
|
||||
|
||||
@@ -24,9 +24,11 @@
|
||||
package appeng.api.features;
|
||||
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.common.capabilities.Capability;
|
||||
|
||||
import appeng.api.config.TunnelType;
|
||||
|
||||
@@ -44,7 +46,11 @@ public interface IP2PTunnelRegistry
|
||||
* @param trigger - the item which triggers attunement. Nullable, but then ignored
|
||||
* @param type - the type of tunnel. Nullable, but then ignored
|
||||
*/
|
||||
void addNewAttunement( @Nullable ItemStack trigger, @Nullable TunnelType type );
|
||||
void addNewAttunement( @Nonnull ItemStack trigger, @Nullable TunnelType type );
|
||||
|
||||
void addNewAttunement( @Nonnull String ModId, @Nullable TunnelType type );
|
||||
|
||||
void addNewAttunement( @Nonnull Capability<?> cap, @Nullable TunnelType type );
|
||||
|
||||
/**
|
||||
* returns null if no attunement can be found.
|
||||
@@ -53,6 +59,6 @@ public interface IP2PTunnelRegistry
|
||||
*
|
||||
* @return null if no attunement can be found or attunement
|
||||
*/
|
||||
@Nullable
|
||||
@Nonnull
|
||||
TunnelType getTunnelTypeByItem( ItemStack trigger );
|
||||
}
|
||||
@@ -48,6 +48,7 @@ public interface IRecipeHandlerRegistry
|
||||
* @param name name of crafthandler
|
||||
* @param handler class of crafthandler
|
||||
*/
|
||||
@Deprecated
|
||||
void addNewCraftHandler( String name, Class<? extends ICraftHandler> handler );
|
||||
|
||||
/**
|
||||
@@ -65,11 +66,13 @@ 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();
|
||||
|
||||
/**
|
||||
|
||||
@@ -34,7 +34,8 @@ import appeng.api.storage.ICellRegistry;
|
||||
/**
|
||||
* @author AlgorithmX2
|
||||
* @author thatsIch
|
||||
* @version rv2
|
||||
* @author yueh
|
||||
* @version rv5
|
||||
* @since rv0
|
||||
*/
|
||||
@AEInjectable
|
||||
@@ -76,6 +77,11 @@ public interface IRegistryContainer
|
||||
*/
|
||||
IInscriberRegistry inscriber();
|
||||
|
||||
/**
|
||||
* Manage charger via API
|
||||
*/
|
||||
IChargerRegistry charger();
|
||||
|
||||
/**
|
||||
* get access to the locatable registry
|
||||
*/
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
package appeng.api.implementations.guiobjects;
|
||||
|
||||
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
|
||||
import appeng.api.networking.IGridHost;
|
||||
|
||||
@@ -32,8 +32,9 @@ import appeng.api.networking.IGridHost;
|
||||
/**
|
||||
* Obtained via {@link IGuiItem} getGuiObject
|
||||
*/
|
||||
public interface INetworkTool extends IInventory, IGuiItemObject
|
||||
public interface INetworkTool extends IGuiItemObject
|
||||
{
|
||||
|
||||
IGridHost getGridHost(); // null for most purposes.
|
||||
|
||||
IItemHandler getInventory();
|
||||
}
|
||||
|
||||
@@ -27,6 +27,7 @@ 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;
|
||||
|
||||
|
||||
@@ -42,27 +43,27 @@ public interface IAEItemPowerStorage
|
||||
*
|
||||
* @return amount unable to be stored
|
||||
*/
|
||||
double injectAEPower( ItemStack is, double amt );
|
||||
double injectAEPower( ItemStack stack, double amount, Actionable mode );
|
||||
|
||||
/**
|
||||
* Attempt to extract power from the device, it will extract what it can and
|
||||
* return it.
|
||||
*
|
||||
* @param amt to be extracted power from device
|
||||
* @param amount to be extracted power from device
|
||||
*
|
||||
* @return what it could extract
|
||||
*/
|
||||
double extractAEPower( ItemStack is, double amt );
|
||||
double extractAEPower( ItemStack stack, double amount, Actionable mode );
|
||||
|
||||
/**
|
||||
* @return the current maximum power ( this can change :P )
|
||||
*/
|
||||
double getAEMaxPower( ItemStack is );
|
||||
double getAEMaxPower( ItemStack stack );
|
||||
|
||||
/**
|
||||
* @return the current AE Power Level, this may exceed getMEMaxPower()
|
||||
*/
|
||||
double getAECurrentPower( ItemStack is );
|
||||
double getAECurrentPower( ItemStack stack );
|
||||
|
||||
/**
|
||||
* Control the power flow by telling what the network can do, either add? or
|
||||
@@ -70,5 +71,5 @@ public interface IAEItemPowerStorage
|
||||
*
|
||||
* @return access restriction of network
|
||||
*/
|
||||
AccessRestriction getPowerFlow( ItemStack is );
|
||||
AccessRestriction getPowerFlow( ItemStack stack );
|
||||
}
|
||||
@@ -28,6 +28,8 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
||||
import appeng.api.util.AEColor;
|
||||
|
||||
|
||||
/**
|
||||
* Memory Card API
|
||||
@@ -41,13 +43,18 @@ 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 may contain a String called "tooltip" which is is a
|
||||
* unlocalized string displayed after the settings name, optional
|
||||
* but can be used to add details to the card for later.
|
||||
* @param settingsName unlocalized string that represents the tile entity.
|
||||
* @param data the NBT tag, refer to the normal comment for special keys.
|
||||
*/
|
||||
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
|
||||
@@ -68,6 +75,17 @@ 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.
|
||||
*
|
||||
|
||||
@@ -29,6 +29,7 @@ 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;
|
||||
|
||||
|
||||
@@ -57,7 +58,7 @@ public interface ISpatialStorageCell
|
||||
*
|
||||
* @return the world for this cell
|
||||
*/
|
||||
World getWorld( ItemStack is );
|
||||
ISpatialDimension getSpatialDimension();
|
||||
|
||||
/**
|
||||
* get the currently stored size.
|
||||
@@ -69,22 +70,13 @@ public interface ISpatialStorageCell
|
||||
WorldCoord getStoredSize( ItemStack is );
|
||||
|
||||
/**
|
||||
* Minimum coordinates in its world for the storage cell.
|
||||
* get the currently stored Dimension id.
|
||||
*
|
||||
* @param is spatial storage cell
|
||||
*
|
||||
* @return minimum coordinate of dimension
|
||||
* @return dimension id or -1
|
||||
*/
|
||||
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 );
|
||||
int getStoredDimensionID( ItemStack is );
|
||||
|
||||
/**
|
||||
* Perform a spatial swap with the contents of the cell, and the world.
|
||||
@@ -93,9 +85,9 @@ public interface ISpatialStorageCell
|
||||
* @param w world of spatial
|
||||
* @param min min coord
|
||||
* @param max max coord
|
||||
* @param doTransition transition
|
||||
* @param playerId owner of current grid or -1
|
||||
*
|
||||
* @return result of transition
|
||||
*/
|
||||
TransitionResult doSpatialTransition( ItemStack is, World w, WorldCoord min, WorldCoord max, boolean doTransition );
|
||||
TransitionResult doSpatialTransition( ItemStack is, World w, WorldCoord min, WorldCoord max, int playerId );
|
||||
}
|
||||
@@ -24,10 +24,13 @@
|
||||
package appeng.api.implementations.items;
|
||||
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import appeng.api.storage.ICellWorkbenchItem;
|
||||
import appeng.api.storage.data.IAEItemStack;
|
||||
import appeng.api.storage.IStorageChannel;
|
||||
import appeng.api.storage.data.IAEStack;
|
||||
|
||||
|
||||
/**
|
||||
@@ -40,7 +43,7 @@ import appeng.api.storage.data.IAEItemStack;
|
||||
*
|
||||
* The standard AE implementation only provides 1-63 Types
|
||||
*/
|
||||
public interface IStorageCell extends ICellWorkbenchItem
|
||||
public interface IStorageCell<T extends IAEStack<T>> extends ICellWorkbenchItem
|
||||
{
|
||||
|
||||
/**
|
||||
@@ -51,7 +54,7 @@ public interface IStorageCell extends ICellWorkbenchItem
|
||||
*
|
||||
* @return number of bytes
|
||||
*/
|
||||
int getBytes( ItemStack cellItem );
|
||||
int getBytes( @Nonnull ItemStack cellItem );
|
||||
|
||||
/**
|
||||
* Determines the number of bytes used for any type included on the cell.
|
||||
@@ -60,7 +63,7 @@ public interface IStorageCell extends ICellWorkbenchItem
|
||||
*
|
||||
* @return number of bytes
|
||||
*/
|
||||
int getBytesPerType( ItemStack cellItem );
|
||||
int getBytesPerType( @Nonnull ItemStack cellItem );
|
||||
|
||||
/**
|
||||
* Must be between 1 and 63, indicates how many types you want to store on
|
||||
@@ -70,7 +73,7 @@ public interface IStorageCell extends ICellWorkbenchItem
|
||||
*
|
||||
* @return number of types
|
||||
*/
|
||||
int getTotalTypes( ItemStack cellItem );
|
||||
int getTotalTypes( @Nonnull ItemStack cellItem );
|
||||
|
||||
/**
|
||||
* Allows you to fine tune which items are allowed on a given cell, if you
|
||||
@@ -82,7 +85,7 @@ public interface IStorageCell extends ICellWorkbenchItem
|
||||
*
|
||||
* @return true to preventAdditionOfItem
|
||||
*/
|
||||
boolean isBlackListed( ItemStack cellItem, IAEItemStack requestedAddition );
|
||||
boolean isBlackListed( @Nonnull ItemStack cellItem, @Nonnull T requestedAddition );
|
||||
|
||||
/**
|
||||
* Allows you to specify if this storage cell can be stored inside other
|
||||
@@ -103,10 +106,16 @@ public interface IStorageCell extends ICellWorkbenchItem
|
||||
*
|
||||
* @return if the ItemStack should behavior as a storage cell.
|
||||
*/
|
||||
boolean isStorageCell( ItemStack i );
|
||||
boolean isStorageCell( @Nonnull 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_CLEARED
|
||||
INVALID_MACHINE, SETTINGS_LOADED, SETTINGS_SAVED, SETTINGS_RESET, SETTINGS_CLEARED
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
package appeng.api.implementations.tiles;
|
||||
|
||||
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
|
||||
|
||||
public interface ISegmentedInventory
|
||||
@@ -38,5 +38,5 @@ public interface ISegmentedInventory
|
||||
*
|
||||
* @return inventory with inventory name
|
||||
*/
|
||||
IInventory getInventoryByName( String name );
|
||||
IItemHandler getInventoryByName( String name );
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
package appeng.api.implementations.tiles;
|
||||
|
||||
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
|
||||
|
||||
public interface IViewCellStorage
|
||||
@@ -35,5 +35,5 @@ public interface IViewCellStorage
|
||||
*
|
||||
* @return inventory with at least 5 slot
|
||||
*/
|
||||
IInventory getViewCellStorage();
|
||||
IItemHandler getViewCellStorage();
|
||||
}
|
||||
|
||||
@@ -24,6 +24,8 @@
|
||||
package appeng.api.networking;
|
||||
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import appeng.api.networking.events.MENetworkEvent;
|
||||
import appeng.api.util.IReadOnlyCollection;
|
||||
|
||||
@@ -43,7 +45,8 @@ public interface IGrid
|
||||
*
|
||||
* @return the IGridCache you requested.
|
||||
*/
|
||||
<C extends IGridCache> C getCache( Class<? extends IGridCache> iface );
|
||||
@Nonnull
|
||||
<C extends IGridCache> C getCache( @Nonnull Class<? extends IGridCache> iface );
|
||||
|
||||
/**
|
||||
* Post an event into the network event bus.
|
||||
@@ -52,7 +55,8 @@ public interface IGrid
|
||||
*
|
||||
* @return returns ev back to original poster
|
||||
*/
|
||||
MENetworkEvent postEvent( MENetworkEvent ev );
|
||||
@Nonnull
|
||||
MENetworkEvent postEvent( @Nonnull MENetworkEvent ev );
|
||||
|
||||
/**
|
||||
* Post an event into the network event bus, but direct it at a single node.
|
||||
@@ -61,7 +65,8 @@ public interface IGrid
|
||||
*
|
||||
* @return returns ev back to original poster
|
||||
*/
|
||||
MENetworkEvent postEventTo( IGridNode node, MENetworkEvent ev );
|
||||
@Nonnull
|
||||
MENetworkEvent postEventTo( @Nonnull IGridNode node, @Nonnull MENetworkEvent ev );
|
||||
|
||||
/**
|
||||
* get a list of the diversity of classes, you can use this to better detect which machines your interested in,
|
||||
@@ -69,6 +74,7 @@ public interface IGrid
|
||||
*
|
||||
* @return IReadOnlyCollection of all available host types (Of Type IGridHost).
|
||||
*/
|
||||
@Nonnull
|
||||
IReadOnlyCollection<Class<? extends IGridHost>> getMachinesClasses();
|
||||
|
||||
/**
|
||||
@@ -78,11 +84,13 @@ public interface IGrid
|
||||
*
|
||||
* @return IMachineSet of all nodes belonging to hosts of specified class.
|
||||
*/
|
||||
IMachineSet getMachines( Class<? extends IGridHost> gridHostClass );
|
||||
@Nonnull
|
||||
IMachineSet getMachines( @Nonnull Class<? extends IGridHost> gridHostClass );
|
||||
|
||||
/**
|
||||
* @return IReadOnlyCollection for all nodes on the network, node visitors are preferred.
|
||||
*/
|
||||
@Nonnull
|
||||
IReadOnlyCollection<IGridNode> getNodes();
|
||||
|
||||
/**
|
||||
@@ -93,5 +101,6 @@ public interface IGrid
|
||||
/**
|
||||
* @return the node considered the pivot point of the grid.
|
||||
*/
|
||||
@Nonnull
|
||||
IGridNode getPivot();
|
||||
}
|
||||
@@ -26,6 +26,9 @@ package appeng.api.networking;
|
||||
|
||||
import java.util.EnumSet;
|
||||
|
||||
import javax.annotation.Nonnegative;
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
|
||||
@@ -49,6 +52,7 @@ public interface IGridBlock
|
||||
*
|
||||
* @return ae/t to use.
|
||||
*/
|
||||
@Nonnegative
|
||||
double getIdlePowerUsage();
|
||||
|
||||
/**
|
||||
@@ -56,10 +60,11 @@ public interface IGridBlock
|
||||
*
|
||||
* @return Set of flags for this IGridBlock
|
||||
*/
|
||||
@Nonnull
|
||||
EnumSet<GridFlags> getFlags();
|
||||
|
||||
/**
|
||||
* generally speaking you will return true for this, the one exception is buses, or worm holes where the node
|
||||
* Generally speaking you will return true for this, the one exception is buses, or worm holes where the node
|
||||
* represents something that isn't a real connection in the world, but rather one represented internally to the
|
||||
* block.
|
||||
*
|
||||
@@ -68,37 +73,46 @@ public interface IGridBlock
|
||||
boolean isWorldAccessible();
|
||||
|
||||
/**
|
||||
* Must not return when {@link #isWorldAccessible()} is true.
|
||||
* Otherwise the behavior is unspecified.
|
||||
*
|
||||
* @return current location of this node
|
||||
*/
|
||||
@Nonnull
|
||||
DimensionalCoord getLocation();
|
||||
|
||||
/**
|
||||
* @return Transparent, or a valid color, NULL IS NOT A VALID RETURN
|
||||
*/
|
||||
@Nonnull
|
||||
AEColor getGridColor();
|
||||
|
||||
/**
|
||||
* Notifies your IGridBlock that changes were made to your connections
|
||||
*/
|
||||
void onGridNotification( GridNotification notification );
|
||||
void onGridNotification( @Nonnull GridNotification notification );
|
||||
|
||||
/**
|
||||
* Update Blocks network/connection/booting status. grid,
|
||||
*
|
||||
* @param grid grid
|
||||
* @param channelsInUse used channels
|
||||
* @deprecated to be removed in rv7
|
||||
*/
|
||||
@Deprecated
|
||||
void setNetworkStatus( IGrid grid, int channelsInUse );
|
||||
|
||||
/**
|
||||
* Determine which sides of the block can be connected too, only used when isWorldAccessible returns true, not used
|
||||
* for {@link IPart} implementations.
|
||||
*/
|
||||
@Nonnull
|
||||
EnumSet<EnumFacing> getConnectableSides();
|
||||
|
||||
/**
|
||||
* @return the IGridHost for the node, this will be an IGridPart or a TileEntity generally speaking.
|
||||
*/
|
||||
@Nonnull
|
||||
IGridHost getMachine();
|
||||
|
||||
/**
|
||||
@@ -109,7 +123,8 @@ public interface IGridBlock
|
||||
/**
|
||||
* Determines what item stack is used to render this node in the GUI.
|
||||
*
|
||||
* @return the render item stack to use to render this node, null is valid, and will not show this node.
|
||||
* @return the render item stack to use to render this node. Returning an empty ItemStack will not show this node.
|
||||
*/
|
||||
@Nonnull
|
||||
ItemStack getMachineRepresentation();
|
||||
}
|
||||
|
||||
@@ -24,6 +24,9 @@
|
||||
package appeng.api.networking;
|
||||
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
|
||||
/**
|
||||
* Allows you to create a network wise service, AE2 uses these for providing
|
||||
* item, spatial, and tunnel services.
|
||||
@@ -50,7 +53,7 @@ public interface IGridCache
|
||||
* @param gridNode removed from that grid
|
||||
* @param machine to be removed machine
|
||||
*/
|
||||
void removeNode( IGridNode gridNode, IGridHost machine );
|
||||
void removeNode( @Nonnull IGridNode gridNode, @Nonnull IGridHost machine );
|
||||
|
||||
/**
|
||||
* informs you cache that a machine was added to the grid.
|
||||
@@ -62,7 +65,7 @@ public interface IGridCache
|
||||
* @param gridNode added to grid node
|
||||
* @param machine to be added machine
|
||||
*/
|
||||
void addNode( IGridNode gridNode, IGridHost machine );
|
||||
void addNode( @Nonnull IGridNode gridNode, @Nonnull IGridHost machine );
|
||||
|
||||
/**
|
||||
* Called when a grid splits into two grids, AE will call a split as it
|
||||
@@ -71,7 +74,7 @@ public interface IGridCache
|
||||
*
|
||||
* @param destinationStorage storage which receives half of old grid
|
||||
*/
|
||||
void onSplit( IGridStorage destinationStorage );
|
||||
void onSplit( @Nonnull IGridStorage destinationStorage );
|
||||
|
||||
/**
|
||||
* Called when two grids merge into one, AE will call a join as it
|
||||
@@ -80,12 +83,12 @@ public interface IGridCache
|
||||
*
|
||||
* @param sourceStorage old storage
|
||||
*/
|
||||
void onJoin( IGridStorage sourceStorage );
|
||||
void onJoin( @Nonnull IGridStorage sourceStorage );
|
||||
|
||||
/**
|
||||
* Called when saving changes,
|
||||
*
|
||||
* @param destinationStorage storage
|
||||
*/
|
||||
void populateGridStorage( IGridStorage destinationStorage );
|
||||
void populateGridStorage( @Nonnull IGridStorage destinationStorage );
|
||||
}
|
||||
|
||||
@@ -24,7 +24,9 @@
|
||||
package appeng.api.networking;
|
||||
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
|
||||
/**
|
||||
@@ -38,14 +40,14 @@ public interface IGridCacheRegistry
|
||||
*
|
||||
* @param iface grid cache class
|
||||
*/
|
||||
void registerGridCache( Class<? extends IGridCache> iface, Class<? extends IGridCache> implementation );
|
||||
void registerGridCache( @Nonnull Class<? extends IGridCache> iface, @Nonnull Class<? extends IGridCache> implementation );
|
||||
|
||||
/**
|
||||
* requests a new INSTANCE of a grid cache for use, used internally
|
||||
*
|
||||
* @param grid grid
|
||||
*
|
||||
* @return a new HashMap of IGridCaches from the registry, called from IGrid when constructing a new grid.
|
||||
* @return a new Map of IGridCaches from the registry, called from IGrid when constructing a new grid.
|
||||
*/
|
||||
HashMap<Class<? extends IGridCache>, IGridCache> createCacheInstance( IGrid grid );
|
||||
Map<Class<? extends IGridCache>, IGridCache> createCacheInstance( IGrid grid );
|
||||
}
|
||||
|
||||
@@ -24,6 +24,8 @@
|
||||
package appeng.api.networking;
|
||||
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import appeng.api.util.AEPartLocation;
|
||||
|
||||
|
||||
@@ -45,6 +47,7 @@ public interface IGridConnection
|
||||
*
|
||||
* @return the IGridNode which represents the opposite side of the connection.
|
||||
*/
|
||||
@Nonnull
|
||||
IGridNode getOtherSide( IGridNode gridNode );
|
||||
|
||||
/**
|
||||
@@ -54,6 +57,7 @@ public interface IGridConnection
|
||||
*
|
||||
* @return the direction of the connection, only valid for in world connections.
|
||||
*/
|
||||
@Nonnull
|
||||
AEPartLocation getDirection( IGridNode gridNode );
|
||||
|
||||
/**
|
||||
@@ -65,11 +69,13 @@ public interface IGridConnection
|
||||
/**
|
||||
* @return node A
|
||||
*/
|
||||
@Nonnull
|
||||
IGridNode a();
|
||||
|
||||
/**
|
||||
* @return node B
|
||||
*/
|
||||
@Nonnull
|
||||
IGridNode b();
|
||||
|
||||
/**
|
||||
|
||||
@@ -24,6 +24,9 @@
|
||||
package appeng.api.networking;
|
||||
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
|
||||
public interface IGridConnectionVisitor extends IGridVisitor
|
||||
{
|
||||
|
||||
@@ -32,5 +35,5 @@ public interface IGridConnectionVisitor extends IGridVisitor
|
||||
*
|
||||
* @param n the connection.
|
||||
*/
|
||||
void visitConnection( IGridConnection n );
|
||||
void visitConnection( @Nonnull IGridConnection n );
|
||||
}
|
||||
|
||||
+32
-28
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2013 AlgorithmX2
|
||||
* 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
|
||||
@@ -21,44 +21,48 @@
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
package appeng.api.client;
|
||||
package appeng.api.networking;
|
||||
|
||||
|
||||
import java.util.List;
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import appeng.api.exceptions.FailedConnectionException;
|
||||
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.client.renderer.block.model.IBakedModel;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
|
||||
/**
|
||||
* TODO: Needs to be moved to an internal class. API is only allowed to contain interfaces and/or data.
|
||||
* A helper responsible for creating new {@link IGridNode}, {@link IGridConnection} or potentially similar tasks.
|
||||
*
|
||||
* @deprecated
|
||||
* @author yueh
|
||||
* @version rv5
|
||||
* @since rv5
|
||||
*/
|
||||
@Deprecated
|
||||
public class BakingPipeline<F, T> implements BakingPipelineElement<F, T>
|
||||
public interface IGridHelper
|
||||
{
|
||||
|
||||
private final ImmutableList<BakingPipelineElement<?, ?>> pipeline;
|
||||
|
||||
public BakingPipeline( BakingPipelineElement<?, ?>... pipeline )
|
||||
{
|
||||
this.pipeline = ImmutableList.copyOf( pipeline );
|
||||
}
|
||||
/**
|
||||
* Create a grid node for your {@link IGridHost}
|
||||
*
|
||||
* The passed {@link IGridBlock} represents the definition for properties like connectable sides.
|
||||
* Refer to its documentation for further details.
|
||||
*
|
||||
* @param block grid block
|
||||
*
|
||||
* @return grid node of block
|
||||
*/
|
||||
@Nonnull
|
||||
IGridNode createGridNode( @Nonnull IGridBlock block );
|
||||
|
||||
/**
|
||||
* TODO: fix generics
|
||||
* Create a direct connection between two {@link IGridNode}.
|
||||
*
|
||||
* This will be considered as having a distance of 1, regardless of the location of both nodes.
|
||||
*
|
||||
* @param a to be connected gridnode
|
||||
* @param b to be connected gridnode
|
||||
*
|
||||
* @throws appeng.api.exceptions.FailedConnectionException
|
||||
*/
|
||||
@Override
|
||||
public List pipe( List things, IBakedModel parent, IBlockState state, EnumFacing side, long rand )
|
||||
{
|
||||
for( BakingPipelineElement pipe : pipeline )
|
||||
{
|
||||
things = pipe.pipe( things, parent, state, side, rand );
|
||||
}
|
||||
return things;
|
||||
}
|
||||
@Nonnull
|
||||
IGridConnection createGridConnection( @Nonnull IGridNode a, @Nonnull IGridNode b ) throws FailedConnectionException;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -24,6 +24,9 @@
|
||||
package appeng.api.networking;
|
||||
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
import appeng.api.parts.IPart;
|
||||
@@ -49,7 +52,8 @@ public interface IGridHost
|
||||
* @return a new IGridNode, create these with
|
||||
* AEApi.INSTANCE().createGridNode( MyIGridBlock )
|
||||
*/
|
||||
IGridNode getGridNode( AEPartLocation dir );
|
||||
@Nullable
|
||||
IGridNode getGridNode( @Nonnull AEPartLocation dir );
|
||||
|
||||
/**
|
||||
* Determines how cables render when they connect to this block. Priority is
|
||||
@@ -57,7 +61,8 @@ public interface IGridHost
|
||||
*
|
||||
* @param dir direction
|
||||
*/
|
||||
AECableType getCableConnectionType( AEPartLocation dir );
|
||||
@Nonnull
|
||||
AECableType getCableConnectionType( @Nonnull AEPartLocation dir );
|
||||
|
||||
/**
|
||||
* break this host, its violating security rules, just break your block, or part.
|
||||
|
||||
@@ -26,6 +26,8 @@ package appeng.api.networking;
|
||||
|
||||
import java.util.Iterator;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
|
||||
/**
|
||||
* An extension of IGridBlock, only means something when your getFlags() contains REQUIRE_CHANNEL, when done properly it
|
||||
@@ -40,5 +42,6 @@ public interface IGridMultiblock extends IGridBlock
|
||||
*
|
||||
* @return an iterator that will iterate all the nodes for the multiblock. ( read-only iterator expected. )
|
||||
*/
|
||||
@Nonnull
|
||||
Iterator<IGridNode> getMultiblockNodes();
|
||||
}
|
||||
|
||||
@@ -26,6 +26,8 @@ package appeng.api.networking;
|
||||
|
||||
import java.util.EnumSet;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
@@ -50,7 +52,7 @@ public interface IGridNode
|
||||
*
|
||||
* @param visitor visitor
|
||||
*/
|
||||
void beginVisit( IGridVisitor visitor );
|
||||
void beginVisit( @Nonnull IGridVisitor visitor );
|
||||
|
||||
/**
|
||||
* inform the node that your IGridBlock has changed its internal state, and force the node to update.
|
||||
@@ -68,6 +70,7 @@ public interface IGridNode
|
||||
*
|
||||
* @return grid host
|
||||
*/
|
||||
@Nonnull
|
||||
IGridHost getMachine();
|
||||
|
||||
/**
|
||||
@@ -75,6 +78,7 @@ public interface IGridNode
|
||||
*
|
||||
* @return grid
|
||||
*/
|
||||
@Nonnull
|
||||
IGrid getGrid();
|
||||
|
||||
/**
|
||||
@@ -86,11 +90,13 @@ public interface IGridNode
|
||||
/**
|
||||
* @return the world the node is located in
|
||||
*/
|
||||
@Nonnull
|
||||
World getWorld();
|
||||
|
||||
/**
|
||||
* @return a set of the connected sides, INTERNAL represents an invisible connection
|
||||
*/
|
||||
@Nonnull
|
||||
EnumSet<AEPartLocation> getConnectedSides();
|
||||
|
||||
/**
|
||||
@@ -98,11 +104,13 @@ public interface IGridNode
|
||||
*
|
||||
* @return grid connections
|
||||
*/
|
||||
@Nonnull
|
||||
IReadOnlyCollection<IGridConnection> getConnections();
|
||||
|
||||
/**
|
||||
* @return the IGridBlock for this node
|
||||
*/
|
||||
@Nonnull
|
||||
IGridBlock getGridBlock();
|
||||
|
||||
/**
|
||||
@@ -122,7 +130,7 @@ public interface IGridNode
|
||||
* @param name nbt name
|
||||
* @param nodeData to be loaded data
|
||||
*/
|
||||
void loadFromNBT( String name, NBTTagCompound nodeData );
|
||||
void loadFromNBT( @Nonnull String name, @Nonnull NBTTagCompound nodeData );
|
||||
|
||||
/**
|
||||
* this should be called for each node you maintain, you can save all your nodes to the same tag with different
|
||||
@@ -131,7 +139,7 @@ public interface IGridNode
|
||||
* @param name nbt name
|
||||
* @param nodeData to be saved data
|
||||
*/
|
||||
void saveToNBT( String name, NBTTagCompound nodeData );
|
||||
void saveToNBT( @Nonnull String name, @Nonnull NBTTagCompound nodeData );
|
||||
|
||||
/**
|
||||
* @return if the node's channel requirements are currently met, use this for display purposes, use isActive for
|
||||
@@ -146,7 +154,7 @@ public interface IGridNode
|
||||
*
|
||||
* @return true if has flag
|
||||
*/
|
||||
boolean hasFlag( GridFlags flag );
|
||||
boolean hasFlag( @Nonnull GridFlags flag );
|
||||
|
||||
/**
|
||||
* @return the ownerID this represents the person who placed the node.
|
||||
|
||||
@@ -24,6 +24,8 @@
|
||||
package appeng.api.networking;
|
||||
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
||||
|
||||
@@ -33,6 +35,7 @@ public interface IGridStorage
|
||||
/**
|
||||
* @return an NBTTagCompound that can be read, and written too.
|
||||
*/
|
||||
@Nonnull
|
||||
NBTTagCompound dataObject();
|
||||
|
||||
/**
|
||||
|
||||
@@ -24,6 +24,9 @@
|
||||
package appeng.api.networking;
|
||||
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
|
||||
/**
|
||||
* Simple Visitor pattern access to network nodes.
|
||||
*/
|
||||
@@ -39,5 +42,5 @@ public interface IGridVisitor
|
||||
*
|
||||
* @return true to continue visiting nodes beyond this node.
|
||||
*/
|
||||
boolean visitNode( IGridNode n );
|
||||
boolean visitNode( @Nonnull IGridNode n );
|
||||
}
|
||||
|
||||
@@ -24,6 +24,8 @@
|
||||
package appeng.api.networking;
|
||||
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import appeng.api.util.IReadOnlyCollection;
|
||||
|
||||
|
||||
@@ -33,5 +35,6 @@ public interface IMachineSet extends IReadOnlyCollection<IGridNode>
|
||||
/**
|
||||
* @return the machine class for this set.
|
||||
*/
|
||||
@Nonnull
|
||||
Class<? extends IGridHost> getMachineClass();
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
package appeng.api.networking.crafting;
|
||||
|
||||
|
||||
import appeng.api.networking.security.BaseActionSource;
|
||||
import appeng.api.networking.security.IActionSource;
|
||||
import appeng.api.networking.storage.IBaseMonitor;
|
||||
import appeng.api.storage.data.IAEItemStack;
|
||||
|
||||
@@ -40,7 +40,7 @@ public interface ICraftingCPU extends IBaseMonitor<IAEItemStack>
|
||||
/**
|
||||
* @return the action source for the CPU.
|
||||
*/
|
||||
BaseActionSource getActionSource();
|
||||
IActionSource getActionSource();
|
||||
|
||||
/**
|
||||
* @return the available storage in bytes
|
||||
|
||||
@@ -24,6 +24,9 @@
|
||||
package appeng.api.networking.crafting;
|
||||
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
|
||||
public interface ICraftingCallback
|
||||
{
|
||||
|
||||
@@ -32,5 +35,5 @@ public interface ICraftingCallback
|
||||
*
|
||||
* @param job - final job
|
||||
*/
|
||||
void calculationComplete( ICraftingJob job );
|
||||
void calculationComplete( @Nonnull ICraftingJob job );
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ import net.minecraft.world.World;
|
||||
|
||||
import appeng.api.networking.IGrid;
|
||||
import appeng.api.networking.IGridCache;
|
||||
import appeng.api.networking.security.BaseActionSource;
|
||||
import appeng.api.networking.security.IActionSource;
|
||||
import appeng.api.storage.data.IAEItemStack;
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ public interface ICraftingGrid extends IGridCache
|
||||
* @return a future which will at an undetermined point in the future get you the {@link ICraftingJob} do not wait
|
||||
* on this, your be waiting forever.
|
||||
*/
|
||||
Future<ICraftingJob> beginCraftingJob( World world, IGrid grid, BaseActionSource actionSrc, IAEItemStack craftWhat, ICraftingCallback callback );
|
||||
Future<ICraftingJob> beginCraftingJob( World world, IGrid grid, IActionSource actionSrc, IAEItemStack craftWhat, ICraftingCallback callback );
|
||||
|
||||
/**
|
||||
* Submit the job to the Crafting system for processing.
|
||||
@@ -82,7 +82,7 @@ public interface ICraftingGrid extends IGridCache
|
||||
* {@link ICraftingRequester} methods. if you send null, this object should be discarded after verifying the
|
||||
* return state.
|
||||
*/
|
||||
ICraftingLink submitJob( ICraftingJob job, ICraftingRequester requestingMachine, ICraftingCPU target, boolean prioritizePower, BaseActionSource src );
|
||||
ICraftingLink submitJob( ICraftingJob job, ICraftingRequester requestingMachine, ICraftingCPU target, boolean prioritizePower, IActionSource src );
|
||||
|
||||
/**
|
||||
* @return list of all the crafting cpus on the grid
|
||||
@@ -99,9 +99,18 @@ public interface ICraftingGrid extends IGridCache
|
||||
/**
|
||||
* is this item being crafted?
|
||||
*
|
||||
* @param aeStackInSlot item being crafted
|
||||
* @param what item being crafted
|
||||
*
|
||||
* @return true if it is being crafting
|
||||
*/
|
||||
boolean isRequesting( IAEItemStack aeStackInSlot );
|
||||
boolean isRequesting( IAEItemStack what );
|
||||
|
||||
/**
|
||||
* The total amount being requested across all crafting cpus of a grid.
|
||||
*
|
||||
* @param what item being requested, ignores stacksize
|
||||
*
|
||||
* @return The total amount being requested.
|
||||
*/
|
||||
long requesting( IAEItemStack what );
|
||||
}
|
||||
|
||||
@@ -24,12 +24,36 @@
|
||||
package appeng.api.networking.crafting;
|
||||
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
import appeng.api.storage.data.IAEStack;
|
||||
|
||||
|
||||
public interface ICraftingWatcher extends Collection<IAEStack>
|
||||
/**
|
||||
* DO NOT IMPLEMENT.
|
||||
*
|
||||
* Will be injected when adding an {@link ICraftingWatcherHost} to a grid.
|
||||
*/
|
||||
public interface ICraftingWatcher
|
||||
{
|
||||
/**
|
||||
* Add a specific {@link IAEStack} to watch.
|
||||
*
|
||||
* Supports multiple values, duplicate ones will not be added.
|
||||
*
|
||||
* @param stack
|
||||
* @return true, if successfully added.
|
||||
*/
|
||||
boolean add( IAEStack<?> stack );
|
||||
|
||||
/**
|
||||
* Remove a specific {@link IAEStack} from the watcher.
|
||||
*
|
||||
* @param stack
|
||||
* @return true, if successfully removed.
|
||||
*/
|
||||
boolean remove( IAEStack<?> stack );
|
||||
|
||||
/**
|
||||
* Removes all watched stacks and resets the watcher to a clean state.
|
||||
*/
|
||||
void reset();
|
||||
}
|
||||
|
||||
@@ -24,6 +24,8 @@
|
||||
package appeng.api.networking.energy;
|
||||
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import appeng.api.config.AccessRestriction;
|
||||
import appeng.api.config.Actionable;
|
||||
|
||||
@@ -42,7 +44,7 @@ public interface IAEPowerStorage extends IEnergySource
|
||||
*
|
||||
* @return amount of power which was unable to be stored
|
||||
*/
|
||||
double injectAEPower( double amt, Actionable mode );
|
||||
double injectAEPower( double amt, @Nonnull Actionable mode );
|
||||
|
||||
/**
|
||||
* @return the current maximum power ( this can change :P )
|
||||
@@ -67,5 +69,6 @@ public interface IAEPowerStorage extends IEnergySource
|
||||
*
|
||||
* @return access restriction what the network can do
|
||||
*/
|
||||
@Nonnull
|
||||
AccessRestriction getPowerFlow();
|
||||
}
|
||||
@@ -24,6 +24,9 @@
|
||||
package appeng.api.networking.energy;
|
||||
|
||||
|
||||
import javax.annotation.Nonnegative;
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import appeng.api.config.Actionable;
|
||||
import appeng.api.networking.IGridCache;
|
||||
import appeng.api.networking.events.MENetworkPowerStatusChange;
|
||||
@@ -38,17 +41,20 @@ public interface IEnergyGrid extends IGridCache, IEnergySource, IEnergyGridProvi
|
||||
/**
|
||||
* @return the current calculated idle energy drain each tick, is used internally to drain power for each tick.
|
||||
*/
|
||||
@Nonnegative
|
||||
double getIdlePowerUsage();
|
||||
|
||||
/**
|
||||
* @return the average power drain over the past 10 ticks, includes idle usage during this time, and all use of
|
||||
* extractPower.
|
||||
*/
|
||||
@Nonnegative
|
||||
double getAvgPowerUsage();
|
||||
|
||||
/**
|
||||
* @return the average energy injected into the system per tick, for the last 10 ticks.
|
||||
*/
|
||||
@Nonnegative
|
||||
double getAvgPowerInjection();
|
||||
|
||||
/**
|
||||
@@ -79,13 +85,15 @@ public interface IEnergyGrid extends IGridCache, IEnergySource, IEnergyGridProvi
|
||||
*
|
||||
* @return the amount of power that the network has OVER the limit.
|
||||
*/
|
||||
double injectPower( double amt, Actionable mode );
|
||||
@Nonnegative
|
||||
double injectPower( @Nonnegative double amt, @Nonnull Actionable mode );
|
||||
|
||||
/**
|
||||
* this is should be considered an estimate, and not relied upon for real calculations.
|
||||
*
|
||||
* @return estimated available power.
|
||||
*/
|
||||
@Nonnegative
|
||||
double getStoredPower();
|
||||
|
||||
/**
|
||||
@@ -93,6 +101,7 @@ public interface IEnergyGrid extends IGridCache, IEnergySource, IEnergyGridProvi
|
||||
*
|
||||
* @return estimated available power.
|
||||
*/
|
||||
@Nonnegative
|
||||
double getMaxStoredPower();
|
||||
|
||||
/**
|
||||
@@ -101,5 +110,6 @@ public interface IEnergyGrid extends IGridCache, IEnergySource, IEnergyGridProvi
|
||||
*
|
||||
* @return Amount of power required to charge the grid, in AE.
|
||||
*/
|
||||
double getEnergyDemand( double maxRequired );
|
||||
@Nonnegative
|
||||
double getEnergyDemand( @Nonnegative double maxRequired );
|
||||
}
|
||||
|
||||
@@ -24,7 +24,10 @@
|
||||
package appeng.api.networking.energy;
|
||||
|
||||
|
||||
import java.util.Set;
|
||||
import java.util.Collection;
|
||||
|
||||
import javax.annotation.Nonnegative;
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import appeng.api.config.Actionable;
|
||||
|
||||
@@ -35,17 +38,91 @@ import appeng.api.config.Actionable;
|
||||
public interface IEnergyGridProvider
|
||||
{
|
||||
/**
|
||||
* internal use only
|
||||
*
|
||||
* Can return a list of providers behind the current.
|
||||
*
|
||||
* An example would be something acting as proxy between different {@link IEnergyGrid}s.
|
||||
*
|
||||
* This can contain duplicate entries, AE will ensure that each provider is only visited once.
|
||||
*
|
||||
* internal use only
|
||||
*/
|
||||
double extractAEPower( double amt, Actionable mode, Set<IEnergyGrid> seen );
|
||||
@Nonnull
|
||||
Collection<IEnergyGridProvider> providers();
|
||||
|
||||
/**
|
||||
* internal use only
|
||||
*
|
||||
* Extracts the requested amount from the provider.
|
||||
*
|
||||
* This should never forward a call to another {@link IEnergyGridProvider}, instead return them via
|
||||
* {@link IEnergyGridProvider#providers()}
|
||||
*
|
||||
* @return the used amount
|
||||
*/
|
||||
double injectAEPower( double amt, Actionable mode, Set<IEnergyGrid> seen );
|
||||
@Nonnegative
|
||||
double extractProviderPower( @Nonnegative double amt, @Nonnull Actionable mode );
|
||||
|
||||
/**
|
||||
* Injects the offered amount into the provider.
|
||||
*
|
||||
* This should never forward a call to another {@link IEnergyGridProvider}, instead return them via
|
||||
* {@link IEnergyGridProvider#providers()}
|
||||
*
|
||||
* internal use only
|
||||
*
|
||||
* @return the leftover amount
|
||||
*/
|
||||
@Nonnegative
|
||||
double injectProviderPower( @Nonnegative double amt, @Nonnull Actionable mode );
|
||||
|
||||
/**
|
||||
* internal use only
|
||||
*
|
||||
* Returns the current demand of an provider.
|
||||
*
|
||||
* This should never forward a call to another {@link IEnergyGridProvider}, instead return them via
|
||||
* {@link IEnergyGridProvider#providers()}
|
||||
*
|
||||
*
|
||||
* @param d the max amount offered, the demand should never exceed it.
|
||||
* @return the total amount demanded
|
||||
*/
|
||||
double getEnergyDemand( double d, Set<IEnergyGrid> seen );
|
||||
@Nonnegative
|
||||
double getProviderEnergyDemand( @Nonnegative double d );
|
||||
|
||||
/**
|
||||
* internal use only
|
||||
*
|
||||
* AE currently uses this to enqueue the next visited provider.
|
||||
*
|
||||
* There is no guarantee that this works on in a perfect way.
|
||||
* It can be limited to the returns of the past {@link IEnergyGridProvider#providers()}, but not any future one
|
||||
* discovered by visiting further providers.
|
||||
*
|
||||
* E.g. inject into the the lowest one first or extract from the highest one.
|
||||
*
|
||||
* @return the current stored amount.
|
||||
*
|
||||
*
|
||||
*/
|
||||
@Nonnegative
|
||||
double getProviderStoredEnergy();
|
||||
|
||||
/**
|
||||
* internal use only
|
||||
*
|
||||
* AE currently uses this to enqueue the next visited provider.
|
||||
*
|
||||
* There is no guarantee that this works on in a perfect way.
|
||||
* It can be limited to the returns of the past {@link IEnergyGridProvider#providers()}, but not any future one
|
||||
* discovered by visiting further providers.
|
||||
*
|
||||
* E.g. inject into the the lowest one first or extract from the highest one.
|
||||
*
|
||||
* @return the maximum amount stored.
|
||||
*/
|
||||
@Nonnegative
|
||||
double getProviderMaxEnergy();
|
||||
}
|
||||
|
||||
@@ -24,6 +24,9 @@
|
||||
package appeng.api.networking.energy;
|
||||
|
||||
|
||||
import javax.annotation.Nonnegative;
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import appeng.api.config.Actionable;
|
||||
import appeng.api.config.PowerMultiplier;
|
||||
|
||||
@@ -39,5 +42,6 @@ public interface IEnergySource
|
||||
*
|
||||
* @return returns extracted power.
|
||||
*/
|
||||
double extractAEPower( double amt, Actionable mode, PowerMultiplier usePowerMultiplier );
|
||||
@Nonnegative
|
||||
double extractAEPower( @Nonnegative double amt, @Nonnull Actionable mode, @Nonnull PowerMultiplier usePowerMultiplier );
|
||||
}
|
||||
|
||||
@@ -24,10 +24,37 @@
|
||||
package appeng.api.networking.energy;
|
||||
|
||||
|
||||
import java.util.Collection;
|
||||
import javax.annotation.Nonnegative;
|
||||
|
||||
|
||||
public interface IEnergyWatcher extends Collection<Double>
|
||||
/**
|
||||
* DO NOT IMPLEMENT.
|
||||
*
|
||||
* Will be injected when adding an {@link IEnergyWatcherHost} to a grid.
|
||||
*/
|
||||
public interface IEnergyWatcher
|
||||
{
|
||||
/**
|
||||
* Add a specific threshold to watch.
|
||||
*
|
||||
* Supports multiple values, duplicate ones will not be added.
|
||||
*
|
||||
* @param amount
|
||||
* @return true, if successfully added.
|
||||
*/
|
||||
boolean add( @Nonnegative double amount );
|
||||
|
||||
/**
|
||||
* Remove a specific threshold from the watcher.
|
||||
*
|
||||
* @param amount
|
||||
* @return true, if successfully removed.
|
||||
*/
|
||||
boolean remove( @Nonnegative double amount );
|
||||
|
||||
/**
|
||||
* Removes all thresholds and resets the watcher to a clean state.
|
||||
*/
|
||||
void reset();
|
||||
|
||||
}
|
||||
|
||||
@@ -24,6 +24,9 @@
|
||||
package appeng.api.networking.energy;
|
||||
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
|
||||
public interface IEnergyWatcherHost
|
||||
{
|
||||
|
||||
@@ -33,12 +36,12 @@ public interface IEnergyWatcherHost
|
||||
*
|
||||
* @param newWatcher new watcher
|
||||
*/
|
||||
void updateWatcher( IEnergyWatcher newWatcher );
|
||||
void updateWatcher( @Nonnull IEnergyWatcher newWatcher );
|
||||
|
||||
/**
|
||||
* Called when a threshold is crossed.
|
||||
*
|
||||
* @param energyGrid grid
|
||||
*/
|
||||
void onThresholdPass( IEnergyGrid energyGrid );
|
||||
void onThresholdPass( @Nonnull IEnergyGrid energyGrid );
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ package appeng.api.networking.events;
|
||||
|
||||
|
||||
import appeng.api.storage.IMEMonitor;
|
||||
import appeng.api.storage.StorageChannel;
|
||||
import appeng.api.storage.IStorageChannel;
|
||||
|
||||
|
||||
/**
|
||||
@@ -40,9 +40,9 @@ public class MENetworkStorageEvent extends MENetworkEvent
|
||||
{
|
||||
|
||||
public final IMEMonitor monitor;
|
||||
public final StorageChannel channel;
|
||||
public final IStorageChannel channel;
|
||||
|
||||
public MENetworkStorageEvent( final IMEMonitor o, final StorageChannel chan )
|
||||
public MENetworkStorageEvent( final IMEMonitor o, final IStorageChannel chan )
|
||||
{
|
||||
this.monitor = o;
|
||||
this.channel = chan;
|
||||
|
||||
@@ -24,6 +24,8 @@
|
||||
package appeng.api.networking.pathing;
|
||||
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import appeng.api.networking.IGridCache;
|
||||
|
||||
|
||||
@@ -39,6 +41,7 @@ public interface IPathingGrid extends IGridCache
|
||||
* @return the controller state of the network, useful if you want to
|
||||
* require a controller for a feature.
|
||||
*/
|
||||
@Nonnull
|
||||
ControllerState getControllerState();
|
||||
|
||||
/**
|
||||
|
||||
@@ -24,11 +24,12 @@
|
||||
package appeng.api.networking.security;
|
||||
|
||||
|
||||
import appeng.api.networking.IGridHost;
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import appeng.api.networking.IGridNode;
|
||||
|
||||
|
||||
public interface IActionHost extends IGridHost
|
||||
public interface IActionHost
|
||||
{
|
||||
|
||||
/**
|
||||
@@ -39,5 +40,6 @@ public interface IActionHost extends IGridHost
|
||||
* @return the the gridnode that actions from this IGridHost are preformed
|
||||
* by.
|
||||
*/
|
||||
@Nonnull
|
||||
IGridNode getActionableNode();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,77 @@
|
||||
/*
|
||||
* 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.networking.security;
|
||||
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
||||
|
||||
/**
|
||||
* The source of any action.
|
||||
*
|
||||
* This can either be a {@link EntityPlayer} or an {@link IActionHost}.
|
||||
*
|
||||
* In most cases this is used for security checks, but can be used to validate the source itself.
|
||||
*
|
||||
*/
|
||||
public interface IActionSource
|
||||
{
|
||||
|
||||
/**
|
||||
* If present, AE will consider the player being the source for the action.
|
||||
*
|
||||
* This will take precedence over {@link IActionSource#machine()} in any case.
|
||||
*
|
||||
* @return An optional player issuing the action.
|
||||
*/
|
||||
@Nonnull
|
||||
Optional<EntityPlayer> player();
|
||||
|
||||
/**
|
||||
* If present, it indicates the {@link IActionHost} of the source.
|
||||
*
|
||||
* Should {@link IActionSource#player()} be absent, it will consider a machine as source.
|
||||
*
|
||||
* It is recommended to include the machine even when a player is present.
|
||||
*
|
||||
* @return An optional machine issuing the action or acting as proxy for a player.
|
||||
*/
|
||||
@Nonnull
|
||||
Optional<IActionHost> machine();
|
||||
|
||||
/**
|
||||
* An {@link IActionSource} can have multiple optional contexts.
|
||||
*
|
||||
* It is strongly recommended to limit the uses for absolutely necessary cases.
|
||||
*
|
||||
* Currently there are no public contexts made available by AE.
|
||||
* An example would be the context interfaces use internally to avoid looping items between each other.
|
||||
*/
|
||||
@Nonnull
|
||||
<T> Optional<T> context( @Nonnull Class<T> key );
|
||||
}
|
||||
@@ -24,6 +24,9 @@
|
||||
package appeng.api.networking.security;
|
||||
|
||||
|
||||
import javax.annotation.Nonnegative;
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
||||
import appeng.api.config.SecurityPermissions;
|
||||
@@ -46,7 +49,7 @@ public interface ISecurityGrid extends IGridCache
|
||||
*
|
||||
* @return true if the player has permissions.
|
||||
*/
|
||||
boolean hasPermission( EntityPlayer player, SecurityPermissions perm );
|
||||
boolean hasPermission( @Nonnull EntityPlayer player, @Nonnull SecurityPermissions perm );
|
||||
|
||||
/**
|
||||
* Check if a player has permissions.
|
||||
@@ -56,7 +59,7 @@ public interface ISecurityGrid extends IGridCache
|
||||
*
|
||||
* @return true if the player has permissions.
|
||||
*/
|
||||
boolean hasPermission( int playerID, SecurityPermissions perm );
|
||||
boolean hasPermission( @Nonnegative int playerID, @Nonnull SecurityPermissions perm );
|
||||
|
||||
/**
|
||||
* @return PlayerID of the admin, or owner, this is the person who placed the security block.
|
||||
|
||||
@@ -25,7 +25,7 @@ package appeng.api.networking.security;
|
||||
|
||||
|
||||
import java.util.EnumSet;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import appeng.api.config.SecurityPermissions;
|
||||
|
||||
@@ -48,7 +48,7 @@ public interface ISecurityProvider
|
||||
*
|
||||
* @param playerPerms player permissions
|
||||
*/
|
||||
void readPermissions( HashMap<Integer, EnumSet<SecurityPermissions>> playerPerms );
|
||||
void readPermissions( Map<Integer, EnumSet<SecurityPermissions>> playerPerms );
|
||||
|
||||
/**
|
||||
* @return is security on or off?
|
||||
|
||||
@@ -26,6 +26,8 @@ package appeng.api.networking.security;
|
||||
|
||||
import java.util.EnumSet;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import appeng.api.config.SecurityPermissions;
|
||||
|
||||
|
||||
@@ -41,5 +43,5 @@ public interface ISecurityRegistry
|
||||
* @param playerID player id
|
||||
* @param permissions permissions of player
|
||||
*/
|
||||
void addPlayer( int playerID, EnumSet<SecurityPermissions> permissions );
|
||||
void addPlayer( int playerID, @Nonnull EnumSet<SecurityPermissions> permissions );
|
||||
}
|
||||
|
||||
@@ -1,49 +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.networking.security;
|
||||
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
||||
/**
|
||||
* TODO: Consider refactoring.
|
||||
*/
|
||||
public class PlayerSource extends BaseActionSource
|
||||
{
|
||||
|
||||
public final EntityPlayer player;
|
||||
public final IActionHost via;
|
||||
|
||||
public PlayerSource( final EntityPlayer p, final IActionHost v )
|
||||
{
|
||||
this.player = p;
|
||||
this.via = v;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isPlayer()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -28,7 +28,7 @@ import appeng.api.storage.IMEMonitorHandlerReceiver;
|
||||
import appeng.api.storage.data.IAEStack;
|
||||
|
||||
|
||||
public interface IBaseMonitor<T extends IAEStack>
|
||||
public interface IBaseMonitor<T extends IAEStack<T>>
|
||||
{
|
||||
|
||||
/**
|
||||
|
||||
@@ -24,12 +24,36 @@
|
||||
package appeng.api.networking.storage;
|
||||
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
import appeng.api.storage.data.IAEStack;
|
||||
|
||||
|
||||
public interface IStackWatcher extends Collection<IAEStack>
|
||||
/**
|
||||
* DO NOT IMPLEMENT.
|
||||
*
|
||||
* Will be injected when adding an {@link IStackWatcherHost} to a grid.
|
||||
*/
|
||||
public interface IStackWatcher
|
||||
{
|
||||
/**
|
||||
* Add a specific {@link IAEStack} to watch.
|
||||
*
|
||||
* Supports multiple values, duplicate ones will not be added.
|
||||
*
|
||||
* @param stack
|
||||
* @return true, if successfully added.
|
||||
*/
|
||||
boolean add( IAEStack<?> stack );
|
||||
|
||||
/**
|
||||
* Remove a specific {@link IAEStack} from the watcher.
|
||||
*
|
||||
* @param stack
|
||||
* @return true, if successfully removed.
|
||||
*/
|
||||
boolean remove( IAEStack<?> stack );
|
||||
|
||||
/**
|
||||
* Removes all watched stacks and resets the watcher to a clean state.
|
||||
*/
|
||||
void reset();
|
||||
}
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
package appeng.api.networking.storage;
|
||||
|
||||
|
||||
import appeng.api.networking.security.BaseActionSource;
|
||||
import appeng.api.storage.StorageChannel;
|
||||
import appeng.api.networking.security.IActionSource;
|
||||
import appeng.api.storage.IStorageChannel;
|
||||
import appeng.api.storage.data.IAEStack;
|
||||
import appeng.api.storage.data.IItemList;
|
||||
|
||||
@@ -50,5 +50,5 @@ public interface IStackWatcherHost
|
||||
* @param src action source
|
||||
* @param chan storage channel
|
||||
*/
|
||||
void onStackChange( IItemList o, IAEStack fullStack, IAEStack diffStack, BaseActionSource src, StorageChannel chan );
|
||||
void onStackChange( IItemList<?> o, IAEStack<?> fullStack, IAEStack<?> diffStack, IActionSource src, IStorageChannel<?> chan );
|
||||
}
|
||||
|
||||
@@ -26,11 +26,11 @@ package appeng.api.networking.storage;
|
||||
|
||||
import appeng.api.networking.IGridCache;
|
||||
import appeng.api.networking.IGridHost;
|
||||
import appeng.api.networking.security.BaseActionSource;
|
||||
import appeng.api.networking.security.IActionSource;
|
||||
import appeng.api.storage.ICellContainer;
|
||||
import appeng.api.storage.ICellProvider;
|
||||
import appeng.api.storage.IStorageChannel;
|
||||
import appeng.api.storage.IStorageMonitorable;
|
||||
import appeng.api.storage.StorageChannel;
|
||||
import appeng.api.storage.data.IAEStack;
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ public interface IStorageGrid extends IGridCache, IStorageMonitorable
|
||||
*
|
||||
* @param input injected items
|
||||
*/
|
||||
void postAlterationOfStoredItems( StorageChannel chan, Iterable<? extends IAEStack> input, BaseActionSource src );
|
||||
void postAlterationOfStoredItems( IStorageChannel<?> chan, Iterable<? extends IAEStack<?>> input, IActionSource src );
|
||||
|
||||
/**
|
||||
* Used to add a cell provider to the storage system
|
||||
|
||||
@@ -24,6 +24,8 @@
|
||||
package appeng.api.networking.ticking;
|
||||
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import appeng.api.networking.IGridNode;
|
||||
|
||||
|
||||
@@ -45,18 +47,18 @@ public interface IGridTickable
|
||||
*/
|
||||
|
||||
/**
|
||||
* You can return null, if you wish to tick using MC's ticking mechanism, or
|
||||
* you can return a valid TickingRequest to tell AE a guide for which type
|
||||
* of responsiveness your device wants.
|
||||
* Return a valid TickingRequest to tell AE a guide for which type of
|
||||
* responsiveness your device wants.
|
||||
*
|
||||
* this will be called for your tile any time your tile changes grids, this
|
||||
* This will be called for your tile any time your tile changes grids, this
|
||||
* can happen at any time, so if your using the sleep feature you may wish
|
||||
* to preserve your sleep, in the result of this method. or you can simply
|
||||
* reset it.
|
||||
*
|
||||
* @return null or a valid new TickingRequest
|
||||
* @return a valid new TickingRequest
|
||||
*/
|
||||
TickingRequest getTickingRequest( IGridNode node );
|
||||
@Nonnull
|
||||
TickingRequest getTickingRequest( @Nonnull IGridNode node );
|
||||
|
||||
/**
|
||||
* AE lets you adjust your tick rate based on the results of your tick, if
|
||||
@@ -67,11 +69,12 @@ public interface IGridTickable
|
||||
*
|
||||
* Note: this is never called if you return null from getTickingRequest.
|
||||
*
|
||||
* @param TicksSinceLastCall the number of world ticks that were skipped since your last
|
||||
* @param ticksSinceLastCall the number of world ticks that were skipped since your last
|
||||
* tick, you can use this to adjust speed of processing or adjust
|
||||
* your tick rate.
|
||||
*
|
||||
* @return tick rate adjustment.
|
||||
*/
|
||||
TickRateModulation tickingRequest( IGridNode node, int TicksSinceLastCall );
|
||||
@Nonnull
|
||||
TickRateModulation tickingRequest( @Nonnull IGridNode node, int ticksSinceLastCall );
|
||||
}
|
||||
|
||||
@@ -24,6 +24,8 @@
|
||||
package appeng.api.networking.ticking;
|
||||
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import appeng.api.networking.IGridCache;
|
||||
import appeng.api.networking.IGridNode;
|
||||
|
||||
@@ -42,7 +44,7 @@ public interface ITickManager extends IGridCache
|
||||
*
|
||||
* @param node gridnode
|
||||
*/
|
||||
boolean alertDevice( IGridNode node );
|
||||
boolean alertDevice( @Nonnull IGridNode node );
|
||||
|
||||
/**
|
||||
* disables ticking for your device.
|
||||
@@ -51,7 +53,7 @@ public interface ITickManager extends IGridCache
|
||||
*
|
||||
* @return if the call was successful.
|
||||
*/
|
||||
boolean sleepDevice( IGridNode node );
|
||||
boolean sleepDevice( @Nonnull IGridNode node );
|
||||
|
||||
/**
|
||||
* enables ticking for your device, undoes a sleepDevice call.
|
||||
@@ -60,5 +62,5 @@ public interface ITickManager extends IGridCache
|
||||
*
|
||||
* @return if the call was successful.
|
||||
*/
|
||||
boolean wakeDevice( IGridNode node );
|
||||
boolean wakeDevice( @Nonnull IGridNode node );
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
|
||||
/*
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
|
||||
@@ -29,5 +29,5 @@ public enum BusSupport
|
||||
CABLE,
|
||||
|
||||
DENSE_CABLE
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -24,8 +24,6 @@
|
||||
package appeng.api.parts;
|
||||
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.item.Item;
|
||||
@@ -71,7 +69,6 @@ public interface IFacadePart
|
||||
/**
|
||||
* The item that this facade masquerades as.
|
||||
*/
|
||||
@Nullable
|
||||
ItemStack getTextureItem();
|
||||
|
||||
/**
|
||||
|
||||
@@ -25,10 +25,11 @@ package appeng.api.parts;
|
||||
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import io.netty.buffer.ByteBuf;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
@@ -39,9 +40,9 @@ import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.capabilities.Capability;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
@@ -71,7 +72,8 @@ public interface IPart extends IBoxProvider, ICustomCableConnection
|
||||
ItemStack getItemStack( PartItemStack type );
|
||||
|
||||
/**
|
||||
* Render dynamic portions of this part, as part of the cable bus TESR. This part has to return true for {@link #requireDynamicRender()} in order for
|
||||
* Render dynamic portions of this part, as part of the cable bus TESR. This part has to return true for
|
||||
* {@link #requireDynamicRender()} in order for
|
||||
* this method to be called.
|
||||
*/
|
||||
@SideOnly( Side.CLIENT )
|
||||
@@ -128,7 +130,7 @@ public interface IPart extends IBoxProvider, ICustomCableConnection
|
||||
/**
|
||||
* a block around the bus's host has been changed.
|
||||
*/
|
||||
void onNeighborChanged();
|
||||
void onNeighborChanged( IBlockAccess w, BlockPos pos, BlockPos neighbor );
|
||||
|
||||
/**
|
||||
* @return output redstone on facing side
|
||||
@@ -207,6 +209,7 @@ public interface IPart extends IBoxProvider, ICustomCableConnection
|
||||
* Called when you right click the part, very similar to Block.onActivateBlock
|
||||
*
|
||||
* @param player right clicking player
|
||||
* @param hand hand used
|
||||
* @param pos position of block
|
||||
*
|
||||
* @return if your activate method performed something.
|
||||
@@ -217,12 +220,41 @@ public interface IPart extends IBoxProvider, ICustomCableConnection
|
||||
* Called when you right click the part, very similar to Block.onActivateBlock
|
||||
*
|
||||
* @param player shift right clicking player
|
||||
* @param hand hand used
|
||||
* @param pos position of block
|
||||
*
|
||||
* @return if your activate method performed something, you should use false unless you really need it.
|
||||
*/
|
||||
boolean onShiftActivate( EntityPlayer player, EnumHand hand, Vec3d pos );
|
||||
|
||||
/**
|
||||
* Called when you left click the part, very similar to Block.onBlockClicked
|
||||
*
|
||||
* @param player left clicking player
|
||||
* @param hand hand used
|
||||
* @param pos position of block
|
||||
*
|
||||
* @return if your activate method performed something, you should use false unless you really need it.
|
||||
*/
|
||||
default boolean onClicked( EntityPlayer player, EnumHand hand, Vec3d pos )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when you shift-left click the part, very similar to Block.onBlockClicked
|
||||
*
|
||||
* @param player shift-left clicking player
|
||||
* @param hand hand used
|
||||
* @param pos position of block
|
||||
*
|
||||
* @return if your activate method performed something, you should use false unless you really need it.
|
||||
*/
|
||||
default boolean onShiftClicked( EntityPlayer player, EnumHand hand, Vec3d pos )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add drops to the items being dropped into the world, if your item stores its contents when wrenched use the
|
||||
* wrenched boolean to control what data is saved vs dropped when it is broken.
|
||||
@@ -259,6 +291,9 @@ public interface IPart extends IBoxProvider, ICustomCableConnection
|
||||
|
||||
/**
|
||||
* Used to determine which parts can be placed on what cables.
|
||||
*
|
||||
* Dense cables are not allowed for functional (getGridNode returns a node) parts.
|
||||
* Doing so will result in crashes.
|
||||
*
|
||||
* @param what placed part
|
||||
*
|
||||
@@ -267,8 +302,10 @@ public interface IPart extends IBoxProvider, ICustomCableConnection
|
||||
boolean canBePlacedOn( BusSupport what );
|
||||
|
||||
/**
|
||||
* This method is used when a chunk is rebuilt to determine how this part should be rendered. The returned models should represent the
|
||||
* part oriented north. They will be automatically rotated to match the part's actual orientation. Tint indices 1-4 can be used in the
|
||||
* This method is used when a chunk is rebuilt to determine how this part should be rendered. The returned models
|
||||
* should represent the
|
||||
* part oriented north. They will be automatically rotated to match the part's actual orientation. Tint indices 1-4
|
||||
* can be used in the
|
||||
* models to access the parts color.
|
||||
*
|
||||
* <dl>
|
||||
@@ -279,18 +316,23 @@ public interface IPart extends IBoxProvider, ICustomCableConnection
|
||||
* <dt>Tint Index 3</dt>
|
||||
* <dd>The {@link AEColor#whiteVariant bright variant color} of the cable that this part is attached to.</dd>
|
||||
* <dt>Tint Index 4</dt>
|
||||
* <dd>A color variant that is between the cable's {@link AEColor#mediumVariant color} and its {@link AEColor#whiteVariant bright variant}.</dd>
|
||||
* <dd>A color variant that is between the cable's {@link AEColor#mediumVariant color} and its
|
||||
* {@link AEColor#whiteVariant bright variant}.</dd>
|
||||
* </dl>
|
||||
*
|
||||
* <b>Important:</b> All models must have been registered via the {@link IPartModels} API before use.
|
||||
*/
|
||||
default List<ResourceLocation> getStaticModels()
|
||||
@Nonnull
|
||||
default IPartModel getStaticModels()
|
||||
{
|
||||
return Collections.emptyList();
|
||||
return new IPartModel()
|
||||
{
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Implement this method if your part exposes capabilitys. Any requests for capabilities on the cable bus will be forwarded to parts on the appropriate
|
||||
* Implement this method if your part exposes capabilitys. Any requests for capabilities on the cable bus will be
|
||||
* forwarded to parts on the appropriate
|
||||
* side.
|
||||
*
|
||||
* @see TileEntity#hasCapability(Capability, EnumFacing)
|
||||
@@ -303,7 +345,8 @@ public interface IPart extends IBoxProvider, ICustomCableConnection
|
||||
}
|
||||
|
||||
/**
|
||||
* Implement this method if your part exposes capabilitys. Any requests for capabilities on the cable bus will be forwarded to parts on the appropriate
|
||||
* Implement this method if your part exposes capabilitys. Any requests for capabilities on the cable bus will be
|
||||
* forwarded to parts on the appropriate
|
||||
* side.
|
||||
*
|
||||
* @see TileEntity#getCapability(Capability, EnumFacing)
|
||||
@@ -315,4 +358,14 @@ public interface IPart extends IBoxProvider, ICustomCableConnection
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
/**
|
||||
* Flag to be passed to the renderer.
|
||||
*
|
||||
* @return flag or null
|
||||
*/
|
||||
default Long getRenderFlag()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
|
||||
package appeng.api.parts;
|
||||
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import net.minecraft.client.renderer.block.model.BakedQuad;
|
||||
|
||||
|
||||
public interface IPartBakedModel
|
||||
{
|
||||
List<BakedQuad> getPartQuads( @Nullable Long partFlags, long rand );
|
||||
}
|
||||
@@ -72,7 +72,7 @@ public interface IPartHost extends ICustomCableConnection
|
||||
* @return null if the item failed to add, the side it was placed on other wise ( may different for cables,
|
||||
* {@link AEPartLocation}.UNKNOWN )
|
||||
*/
|
||||
AEPartLocation addPart( ItemStack is, AEPartLocation side, EntityPlayer owner, EnumHand hand );
|
||||
AEPartLocation addPart( ItemStack is, AEPartLocation side, EntityPlayer owner, EnumHand hand );
|
||||
|
||||
/**
|
||||
* Get part by side ( center is {@link AEPartLocation}.UNKNOWN )
|
||||
|
||||
+27
-21
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2013 AlgorithmX2
|
||||
* Copyright (c) 2013 - 2015 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
|
||||
@@ -21,39 +21,45 @@
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
package appeng.api.storage.data;
|
||||
package appeng.api.parts;
|
||||
|
||||
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import appeng.api.features.IItemComparison;
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
|
||||
/**
|
||||
* Don't cast this... either compare with it, or copy it.
|
||||
*
|
||||
* Don't Implement.
|
||||
* A container to store a collection of {@link ResourceLocation} as models for a part as well as other properties.
|
||||
*/
|
||||
public interface IAETagCompound
|
||||
public interface IPartModel
|
||||
{
|
||||
|
||||
/**
|
||||
* @return a copy ( the copy will not be a IAETagCompound, it will be a NBTTagCompound )
|
||||
* A solid {@link IPartModel} indicates that the rendering requires a cable connection, which will also result in
|
||||
* creating an intersection for the cable.
|
||||
*
|
||||
* This should be true for pretty much all parts.
|
||||
*
|
||||
* @return true for a solid part.
|
||||
*/
|
||||
NBTTagCompound getNBTTagCompoundCopy();
|
||||
default boolean requireCableConnection()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* compare to other NBTTagCompounds or IAETagCompounds
|
||||
* A collection of {@link ResourceLocation} used as models for a part.
|
||||
*
|
||||
* @param a compared object
|
||||
*
|
||||
* @return true, if they are the same.
|
||||
* @return a collection of models, never null.
|
||||
*/
|
||||
@Override
|
||||
boolean equals( Object a );
|
||||
@Nonnull
|
||||
default List<ResourceLocation> getModels()
|
||||
{
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the special comparison for this tag
|
||||
*/
|
||||
IItemComparison getSpecialComparison();
|
||||
}
|
||||
}
|
||||
@@ -23,6 +23,7 @@
|
||||
|
||||
package appeng.api.parts;
|
||||
|
||||
|
||||
/**
|
||||
* TODO: Consider removing and replacing with capabilities.
|
||||
*/
|
||||
|
||||
@@ -26,11 +26,12 @@ package appeng.api.recipes;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import appeng.api.exceptions.MissingIngredientError;
|
||||
import appeng.api.exceptions.RecipeError;
|
||||
import appeng.api.exceptions.RegistrationError;
|
||||
import appeng.api.exceptions.MissingIngredientException;
|
||||
import appeng.api.exceptions.RecipeException;
|
||||
import appeng.api.exceptions.RegistrationException;
|
||||
|
||||
|
||||
@Deprecated
|
||||
public interface ICraftHandler
|
||||
{
|
||||
|
||||
@@ -40,15 +41,15 @@ public interface ICraftHandler
|
||||
* @param input parsed inputs
|
||||
* @param output parsed outputs
|
||||
*
|
||||
* @throws RecipeError
|
||||
* @throws RecipeException
|
||||
*/
|
||||
void setup( List<List<IIngredient>> input, List<List<IIngredient>> output ) throws RecipeError;
|
||||
void setup( List<List<IIngredient>> input, List<List<IIngredient>> output ) throws RecipeException;
|
||||
|
||||
/**
|
||||
* called when all recipes are parsed, and your required to register your recipe.
|
||||
*
|
||||
* @throws RegistrationError
|
||||
* @throws MissingIngredientError
|
||||
* @throws RegistrationException
|
||||
* @throws MissingIngredientException
|
||||
*/
|
||||
void register() throws RegistrationError, MissingIngredientError;
|
||||
void register() throws RegistrationException, MissingIngredientException;
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user