Compare commits

...

238 Commits

Author SHA1 Message Date
thatsIch 2adc055536 Merge pull request #1276 from thatsIch/b-1186-disassembling-storage-missing-upgrades
Fixes #1186: Storage Cells drop upgrades upon disassembling
2015-04-24 19:12:17 +02:00
thatsIch 399934ac2b Merge pull request #1319 from Adaptivity/patch-1
Update ru_RU.lang
2015-04-24 19:11:51 +02:00
Anton 9451106c81 Update ru_RU.lang 2015-04-24 07:51:44 +03:00
thatsIch 8e75de8fb9 Merge pull request #1278 from thatsIch/b-1277-no-mj-config
Fixes #1277: Removed config option for MJ-P2P Tunnel
2015-04-23 23:48:55 +02:00
thatsIch eca598516e Fixes #1277: Removed config option for MJ-P2P Tunnel 2015-04-23 23:45:32 +02:00
thatsIch 2c5a54c210 Merge pull request #1269 from thatsIch/b-1256-number-converter
Fixes #1256: Using new size logic to determine the abbreviation for a stack size
2015-04-23 23:43:31 +02:00
thatsIch 1ac2ab0c10 Merge pull request #1272 from thatsIch/b-1271-missing-pack-mcmeta
Fixes #1271: Added missing pack.mcmeta
2015-04-23 23:42:58 +02:00
thatsIch 199b17b9c6 Merge pull request #1274 from thatsIch/e-1273-deprecated
Closes #1273: Replaced deprecated method call
2015-04-23 23:42:42 +02:00
thatsIch f582c8081b Merge pull request #1275 from thatsIch/e-1270-nei-grinder-localization
Closes #1270: Improves NEI grinder overlay localization
2015-04-23 23:42:26 +02:00
thatsIch 77d66b1817 Merge pull request #1279 from thatsIch/b-1264-render-crash-missing-rf-api
Fixes #1264: Does not crash on missing RF API
2015-04-23 23:42:01 +02:00
thatsIch df370396b1 Merge pull request #1299 from thatsIch/e-qol-exception-messages
Improved exceptions
2015-04-23 23:41:44 +02:00
thatsIch ceeb84a439 Merge pull request #1302 from thatsIch/e-qol-parthelper
Removes unrequired part helper getter, since it already existed
2015-04-23 23:41:24 +02:00
yueh 9af6b50347 Merge pull request #1308 from yueh/fix-329
Replaced static field with with a unique BaseActionSource
2015-04-23 23:32:41 +02:00
yueh d151313253 Replaced static field with with a unique BaseActionSource
Fixes #329
2015-04-23 23:22:55 +02:00
yueh 6d935cc8ae Merge pull request #1311 from yueh/fix-1310
Refactored the NEI handling to use an InventoryAdaptor
2015-04-23 23:17:11 +02:00
yueh 1396dbf600 Merge pull request #1312 from yueh/fix-456
Fixed interface dropping items into itself
2015-04-23 23:17:05 +02:00
thatsIch 8087a43df5 Fixes #1186: Storage Cells drop upgrades upon disassembling 2015-04-23 22:54:10 +02:00
yueh c2cd395ca1 Fixed interface dropping items into itself
Fixes #456
2015-04-23 15:57:12 +02:00
yueh a6e2975677 Refactored the NEI handling to use an InventoryAdaptor
Fixes #1310
2015-04-23 15:00:34 +02:00
thatsIch 3783ae8619 Improved exceptions
Many exceptions got an improvement due to changed class or description or details it is providing.
Is not complete, needs to be done in patches in the regions, where it is needed, since some are just
swallowed.

Removed total usage of pure RuntimeExceptions to 0.
2015-04-21 17:43:24 +02:00
thatsIch be17616836 Removes unrequired part helper getter, since it already existed 2015-04-20 21:12:03 +02:00
thatsIch 36c72d641f Merge pull request #1282 from theelixzammuto/rv2
Update it_IT.lang
2015-04-14 18:38:06 +02:00
theelixzammuto f878a7598d Update it_IT.lang 2015-04-14 18:07:07 +02:00
thatsIch 071ae6d680 Fixes #1264: Does not crash on missing RF API 2015-04-13 22:15:39 +02:00
thatsIch cc29230ce5 Fixes #1256: Using new size logic to determine the abbreviation for a stack size
Removes the usage of the old methods, since they were pretty, but not applicable for our use case. The displayed strings are determined by the size of the to be rendered string. Now the algorithm tries to use as much width as possible before trying to trim it down.

Added tests to reflect the changes and expected behaviour. Also using specific interfaces for the corresponding behaviour to shield from potential calls to the underlying enum singleton implementation.
2015-04-13 14:59:44 +02:00
thatsIch b282e5d968 Closes #1270: Improves NEI grinder overlay localization 2015-04-13 12:53:55 +02:00
thatsIch 3410db7b45 Closes #1273: Replaced deprecated method call 2015-04-13 12:32:53 +02:00
thatsIch 800c30e91c Fixes #1271: Added missing pack.mcmeta
Was missing in the resource management of the build script to be handled
2015-04-13 12:25:54 +02:00
thatsIch 817163dbf6 Merge pull request #1240 from bakaxyf/rv2
Update zh_CN.lang
2015-04-08 21:03:31 +02:00
thatsIch d164e279ef Merge pull request #1238 from thatsIch/b-1202-item-count
Fixes #1202: Now 10000x is the limit before being converted to next bigger unit
2015-04-08 15:35:07 +02:00
bakaxyf 4f9b8db6fc Update zh_CN.lang 2015-04-08 12:16:13 +08:00
thatsIch b58c92ebb6 Fixes #1202: Now 10000x items is the limit before being converted to next bigger unit
Added a new method to display a number in a long fashion.
Added respective unit tests for them
2015-04-07 23:46:52 +02:00
yueh 2667b8eac6 Merge pull request #1233 from yueh/fix-1230
Changed to LinkedHashSet to maintain insertion order
2015-04-07 12:50:27 +02:00
yueh 235fad439d Merge pull request #1228 from yueh/fix-1222
Changed the order as WATs are special and needing a position
2015-04-07 12:50:21 +02:00
yueh fcea444041 Changed to LinkedHashSet to maintain insertion order
Fixes #1230
2015-04-07 12:28:45 +02:00
yueh 80f56d4359 Changed the order as WATs are special and needing a position
Fixes #1222
2015-04-07 00:17:55 +02:00
thatsIch f14bfa7d53 Merge pull request #1227 from bakaxyf/rv2
Update zh_CN.lang
2015-04-06 22:42:57 +02:00
bakaxyf a7d55ee520 Update zh_CN.lang 2015-04-07 04:39:19 +08:00
thatsIch 7382897e8e Merge pull request #1225 from thatsIch/b-dev-jar-duplicates
Deobfuscated version for Developers contains no dupes anymore
2015-04-06 20:31:48 +02:00
thatsIch aac2b598ea Merge pull request #1221 from Adaptivity/rv2
Update ru_RU.lang
2015-04-06 20:30:44 +02:00
thatsIch 0f31cd43d2 Deobfuscated version for Developers contains no dupes anymore 2015-04-06 19:42:20 +02:00
yueh 788de6d432 Merge pull request #964 from yueh/fix-889
Fixes #889 possible dupe bug
2015-04-06 15:54:23 +02:00
thatsIch 04a6a683bc Merge pull request #1220 from thatsIch/e-1219-hardcoded-localizations
Fixes #1219: Improved localization options
2015-04-06 15:44:36 +02:00
thatsIch 25e433f7bd Merge pull request #1215 from thatsIch/e-1054-inscriber-api
Closes #1054: Adds an Inscriber API for Developers
2015-04-06 15:44:27 +02:00
Anton fbc44f47c8 Update ru_RU.lang 2015-04-06 16:32:05 +03:00
thatsIch 06bca227d0 Closes #1054: Adds an Inscriber API for Developers 2015-04-06 13:45:27 +02:00
thatsIch 8321a5fe1c Fixes #1219: Improved localization options 2015-04-06 13:37:40 +02:00
yueh 1bb8de3570 Merge pull request #1216 from yueh/cleanup-modifier-order
Modifier are now using a consistent order based on the java conventions
2015-04-06 13:31:21 +02:00
thatsIch 8666937117 Merge pull request #1210 from thatsIch/e-1207-channels
Fixes #1207 → Enables resource packs more fine tuned information in WAILA channel display
2015-04-06 13:09:54 +02:00
yueh eaf57bedf6 Modifier are now using a consistent order based on the java conventions 2015-04-06 00:35:42 +02:00
thatsIch a30ef4679c Fixes #1207 → Enables resource packs more fine tuned information in WAILA channel display 2015-04-05 23:06:31 +02:00
yueh 0ee2ca72ac Merge pull request #1206 from yueh/fix-1068
Stops AEBaseItemBlock from modifying the metadata before placing.
2015-04-05 20:47:31 +02:00
thatsIch 881bb919da Merge pull request #1205 from thatsIch/b-npe-on-random-smashing-button
Fixes NPE on random button smashing
2015-04-05 20:18:10 +02:00
thatsIch 5ecd68d5b6 Merge pull request #1209 from thatsIch/b-integration-with-gradle
Fixes integration bug for Resources between Gradle and IntelliJ, does not affect Eclipse
2015-04-05 20:18:03 +02:00
thatsIch e2d0e5d424 Dont use instance reference for static references 2015-04-05 15:59:23 +02:00
thatsIch e3bf7d63c0 Split one liner declarations 2015-04-05 15:57:37 +02:00
thatsIch 3fedcf273b Remove random semicolons 2015-04-05 15:56:10 +02:00
thatsIch 8042dbb3db Fixes integration bug for Resources between Gradle and IntelliJ, does not affect Eclipse 2015-04-05 15:25:26 +02:00
yueh e7e397c412 Stops AEBaseItemBlock from modifying the metadata before placing. 2015-04-05 14:01:42 +02:00
thatsIch ecc472a692 Fixes NPE on random button smashing 2015-04-05 13:07:19 +02:00
thatsIch 9790d9fd93 Merge pull request #1187 from thatsIch/b-1059-fmp-disables-interfaces
Fixes #1059 FMP like TileEntities are not valid Interface targets anymore
2015-04-04 14:55:21 +02:00
yueh f3f89344b4 Merge pull request #1192 from yueh/fix-1191
Moved AEBaseBlock.setFeature() to the end of any constructor.
2015-04-04 14:40:35 +02:00
thatsIch bac94b67b8 Merge pull request #1199 from thatsIch/b-skychest-invtweaks-interaction
Fixes interaction bug between Sky Stone Chest and Inventory Tweaks
2015-04-04 14:33:06 +02:00
thatsIch ba1afcca38 Merge pull request #1198 from thatsIch/e-1197-ae-vibration
Fixes #1197 Vibration Chamber does produce AE, not ae
2015-04-04 14:32:54 +02:00
thatsIch bb1c341c95 Fixes #1059 FMP Blocks don't disturb the ME Interface identifier 2015-04-04 14:32:17 +02:00
thatsIch 2ef04f1303 Fixes interaction bug between Sky Stone Chest and Inventory Tweaks upon sort via space + click 2015-04-04 12:56:42 +02:00
thatsIch 632d048ee2 Fixes #1197 Vibration Chamber does produce AE, not ae 2015-04-04 12:26:15 +02:00
yueh adea6b3dec Moved AEBaseBlock.setFeature() to the end of any constructor.
Otherwise it can cause a registration of incomplete blocks, like missing
subtypes.
2015-04-04 01:31:51 +02:00
yueh 5416ea2365 Fixes 889 possible dupe bug
Adds a hotfix to prevent duping with portable cells.
Should possibly fix the NPE crash with switching slots on laggy servers.
2015-04-03 17:23:17 +02:00
thatsIch a081a4f066 Updating to BC 6.4.6 2015-04-03 15:28:33 +02:00
thatsIch b54676793e Merge pull request #1181 from thatsIch/e-basic-reformat
Basic reformat, hit once, hope never again
2015-04-03 15:15:42 +02:00
thatsIch d34c988c88 Basic reformat, hit once, hope never again 2015-04-03 15:07:13 +02:00
yueh 4ff1631f89 Merge pull request #1175 from yueh/fix-1143
Fixes api refactoring causing items to be null.
2015-04-03 11:40:23 +02:00
yueh dc6a325392 Merge pull request #1176 from yueh/fix-1174
Added missing Block.damageDropped() to OreQuartzCharged
2015-04-03 11:40:17 +02:00
yueh 4f364a46df Added missing Block.damageDropped() to OreQuartzCharged
This was previously handled by a template method, but it was removed with
the api refactoring.

Fixes #1174
2015-04-02 15:57:43 +02:00
yueh c699ed44aa Fixes api refactoring causing items to be null.
This happens as nothing is registered with minecraft at this point, so it
will always return null for the ItemBlock.
2015-04-02 14:33:39 +02:00
thatsIch 6bd4472229 Merge pull request #1145 from thatsIch/e-number-converter
Using a unified number converter to display short versions of numbers
2015-03-30 21:06:42 +02:00
thatsIch c9d67e40af Using a unified number converter to display short versions of numbers 2015-03-30 13:06:59 +02:00
thatsIch 9a7329598e Merge pull request #1127 from thatsIch/b-1118-api-crash
Fixes #1118 Does not crash with invalid ItemStacks anymore
2015-03-30 11:54:28 +02:00
thatsIch 278cfc076b Updated to BuildCraft 6.4.5 2015-03-30 11:37:45 +02:00
thatsIch 5c908c7404 Merge pull request #1130 from yueh/fix-1125
Prevent matrix frames from explosions.
2015-03-30 10:38:24 +02:00
thatsIch 65aceeffa8 Merge pull request #1134 from yueh/fix-newapi-nei-facade-handler
Fixes NEI recipe handler
2015-03-29 21:31:11 +02:00
thatsIch 08505e1fa3 Merge pull request #1065 from thatsIch/e-api-access
instance() does not return null anymore, since else it would represent catching a major bug
2015-03-29 21:02:41 +02:00
yueh b75e8d5824 Fixes NEI recipe handler
.get() is used as it is safe to assert facades are present at this point.
If not there should be an exception being thrown.
2015-03-29 15:51:22 +02:00
yueh fbda2c571b Prevent matrix frames from explosions.
Fixes #1125
2015-03-29 14:29:54 +02:00
thatsIch 2a89bdf52a Fixes #1118 Does not crash with invalid ItemStacks anymore 2015-03-29 12:46:55 +02:00
thatsIch 67d9a48d75 API jars contain now classes and source files
Updated dependencies also use those
2015-03-29 09:40:27 +02:00
thatsIch 07084939a0 Merge pull request #1117 from thatsIch/b-1115-crash-without-rotarycraft
Fixes #1115 Does not crash anymore without RotaryCraft
2015-03-28 19:15:33 +01:00
thatsIch a7b0872697 Fixes #1115 Does not crash anymore without RotaryCraft 2015-03-28 19:14:34 +01:00
thatsIch 371588ed79 instance() does not return null anymore, since else it would represent catching a major bug
also does not catch any throwable anymore
2015-03-28 17:11:19 +01:00
thatsIch 92ae39a3ab Merge pull request #1073 from thatsIch/e-api-new-definition
Fixes #675 No disabled feature should log spam or crash anymore.
2015-03-28 17:03:10 +01:00
thatsIch 9986ffc458 Fixes #675 No disabled feature should log spam or crash anymore.
Deprecates the old usage of the AEItemDefinitions via the direct method access of

* blocks()
* parts()
* items()
* materials()

and thus use the new re-direct via definitions().

All definitions are now initialized, no matter what. But SubItems, Items and Blocks are not registered, if by chance are disabled.
2015-03-28 16:21:37 +01:00
thatsIch 3dd81433ac Merge pull request #1103 from thatsIch/b-1013-rotarycraft-power
Fixes #1013 Energy acceptor can receive RotaryCraft Power again
2015-03-28 15:55:14 +01:00
thatsIch 369a82889c Merge pull request #1102 from thatsIch/e-854-file-ctor
Completes #854 Use superior file constructor to not care about file separator
2015-03-26 22:55:54 +01:00
thatsIch 22b965e15a Fixes #1013 Energy acceptor can receive RotaryCraft Power again 2015-03-26 20:28:34 +01:00
thatsIch 0b86887962 Completes #854 Use superior file constructor to not care about file separator 2015-03-26 18:20:49 +01:00
thatsIch db7296c0a1 Final classes with private constructor 2015-03-26 13:57:31 +01:00
thatsIch d1f2625262 Fixes #1099 Client crash on load up due to FML quirks 2015-03-26 13:57:08 +01:00
thatsIch b756a3f564 Final classes with private constructor 2015-03-26 12:25:44 +01:00
thatsIch dfa595ad2a Split logic of crash enhancement 2015-03-26 12:23:55 +01:00
thatsIch 0519f60cb0 protected member in final class 2015-03-26 12:15:57 +01:00
thatsIch 81c32d5181 Multiple variables in one declaration 2015-03-26 12:13:34 +01:00
thatsIch b609b08f98 Null checks before instanceof 2015-03-26 12:12:40 +01:00
thatsIch 50f141edbd Merge pull request #1094 from thatsIch/e-waila-api
Replace deobf version of Waila with an API stub
2015-03-26 11:34:36 +01:00
thatsIch 0542a58e4b Merge pull request #1086 from thatsIch/b-1061-mekanism
Fixes #1061 Recipes are properly registered with new Mekanism
2015-03-26 11:34:16 +01:00
thatsIch 58db877006 Replaced dynamic regular expressions with compiled pattern 2015-03-26 11:33:08 +01:00
thatsIch dff3364eb5 Replace not needed StringBuffer with String concatenation 2015-03-26 11:24:09 +01:00
thatsIch 88310cf04b Single character string concatentation 2015-03-26 11:23:22 +01:00
thatsIch d81eb1fe2d Unnecessary null check before instanceof 2015-03-26 11:22:31 +01:00
thatsIch d8f452b665 Unnecessary enum modifiers 2015-03-26 11:21:55 +01:00
thatsIch ec05bd994c Typos or word-improvements 2015-03-26 11:20:31 +01:00
thatsIch dff48c07c9 finalized 2015-03-26 11:14:34 +01:00
thatsIch 234d97b8ce Security issues: public static collections 2015-03-26 11:13:24 +01:00
thatsIch 9bf8b4388f Extract ++ and -- from expressions 2015-03-26 11:07:26 +01:00
thatsIch b31f2df58d Unnecessary semicolons 2015-03-26 11:03:46 +01:00
thatsIch 14df50dbf3 Unnecessary modifier in interfaces 2015-03-26 11:03:30 +01:00
thatsIch 6aeca93b85 Unnecessary modifier in enums 2015-03-26 11:03:15 +01:00
thatsIch 3143c871d0 this access 2015-03-26 11:01:57 +01:00
thatsIch 7f7c71a22e Unused imports 2015-03-26 10:58:13 +01:00
thatsIch 05f522580b Unnecessary Javadoc link point to containing class 2015-03-26 10:53:09 +01:00
thatsIch 926af89029 Missing @Override annotation 2015-03-26 10:50:34 +01:00
thatsIch f1248c4c33 Unused imports 2015-03-26 10:49:48 +01:00
thatsIch bd2ee1c5ea Assignment replaceable with operator assignment 2015-03-26 10:41:45 +01:00
thatsIch 8ef286b9d6 Replace call to simple setter from within class with inlined version 2015-03-26 10:27:07 +01:00
thatsIch 4b4693498d Replace call to simple getter from within class with inlined version 2015-03-26 10:23:59 +01:00
thatsIch e41d6a0289 Use StringBuilder for creating appended Strings in a loop 2015-03-26 10:15:33 +01:00
thatsIch c8d716d39f Replace deobf version of Waila with an API stub 2015-03-25 20:53:27 +01:00
thatsIch 33c1535bfa Fixes #1061 Most recipes are properly registered with new Mekanism. 2015-03-25 12:24:21 +01:00
thatsIch 1067d30264 Merge pull request #1078 from thatsIch/b-1077-hotfix-packet-size
Fixes #1077 Hotfix: Opening a terminal will not crash as fast anymore in systems with many items.
2015-03-25 12:19:49 +01:00
thatsIch 96145e75f4 Merge pull request #1075 from thatsIch/b-822-io-port
Fixes #822 Automation of IO Port works as intended again
2015-03-25 12:19:09 +01:00
thatsIch 2ba6dad3b2 Merge pull request #1092 from bakaxyf/patch-1
Update zh_CN.lang
2015-03-25 10:51:02 +01:00
bakaxyf a870393edb Update zh_CN.lang 2015-03-25 16:37:46 +08:00
thatsIch d04bc2fb3c Fixed typo in ToC 2015-03-24 18:39:44 +01:00
thatsIch 9d52e85afa Merge pull request #1083 from thatsIch/b-1076-nei-crash
Fixes #1076 Crash on shift clicking a recipe from NEI
2015-03-24 16:54:08 +01:00
thatsIch 3745e6ce8d Fixes #1076 Crash on shift clicking a recipe from NEI 2015-03-24 13:42:32 +01:00
thatsIch a4c38263d1 Merge pull request #1082 from thatsIch/e-integration-name
Renamed Integration class to upper case
2015-03-24 13:18:14 +01:00
thatsIch c1a7a35192 Renamed Integration class to upper case 2015-03-24 13:17:01 +01:00
thatsIch eb98ec891b Merge pull request #1066 from thatsIch/e-remove-deprecated-access
Removes deprecated method access of LocatableRegistry and getPickBlock
2015-03-24 12:47:55 +01:00
thatsIch 69a5507f96 Merge pull request #1064 from thatsIch/e-updated-public-dependencies
Updated public dependencies
2015-03-24 12:47:18 +01:00
thatsIch a1f43ff51a Fixes #1077 Hotfix: Opening a terminal will not crash as fast anymore in systems with many items. 2015-03-23 16:36:06 +01:00
thatsIch da91585d69 Fixes #822 Automation of IO Port works as inteded again
Top and bottom can insert into input slots 0 - 5 on the left
Sides can extract from output slots 6 - 11 on the eight
2015-03-22 11:07:25 +01:00
thatsIch f138a68f3e Merge pull request #1071 from downslope7/grid-connection-exists-coords
Add coords to duplicate connection GridException.
2015-03-22 07:48:23 +01:00
downslope7 30191eb5ba Add coords to duplicate connection GridException.
This exception isn't caught and crashes the server. Added block coordinates to aid in diagnostics.
2015-03-21 20:05:08 -05:00
thatsIch 4552394f6e Removes deprecated method access of LocatableRegistry and getPickBlock 2015-03-21 16:03:26 +01:00
thatsIch 9c3d3db3fb Updated public dependencies
- FMP
- CCL
- WAILA
- BC
2015-03-21 11:51:11 +01:00
thatsIch 9c1c9056f1 Merge pull request #1063 from KamranMackey/rv2
Fixed a couple typos in en_US.lang.
2015-03-21 11:41:06 +01:00
Kamran Mackey b5582688a3 Fixed a couple typos in en_US.lang. 2015-03-21 03:57:41 -06:00
thatsIch 34597a4e21 Merge pull request #1046 from thatsIch/b-976-version-checker
Fixes #976 Now uses GitHub to retrieve most current version
2015-03-17 20:23:14 +01:00
thatsIch e0b32d2641 Merge pull request #1044 from TheVikingWarrior/patch-1
Update it_IT.lang
2015-03-17 07:22:06 +01:00
thatsIch 6baf952904 Fixes #976 Now uses GitHub to retrieve most current version
Reworked whole Version Checker with an extensible interface to add any other service later on easier.
The version checker now has its own config file, to collect the different options and extract them from the main config file.
In that you can specify how fine the versions should be checked.
2015-03-17 07:18:49 +01:00
TheVikingWarrior f132ae3678 Update it_IT.lang 2015-03-16 20:59:01 +01:00
yueh 720b38442e Merge pull request #1034 from yueh/feature-improve-meinventoryhandler-getaccess
Improved MEInventoryHandler.getAccess()
2015-03-16 11:29:57 +01:00
yueh 136f5d7314 Merge pull request #1037 from yueh/fix-1030
Fixes #1030 IndexOutOfBoundsException caused by using wrong index
2015-03-16 11:23:49 +01:00
yueh a83e4b7c3d Fixes #1030 IndexOutOfBoundsException caused by using wrong index 2015-03-15 19:55:58 +01:00
yueh 1bb0109c45 Improved MEInventoryHandler.getAccess()
Changed the public fields to setters and getters
Added a cache for the evaluated values instead of calculating with each
access
2015-03-15 19:43:12 +01:00
thatsIch 4744dfab78 Merge pull request #1029 from thatsIch/e-1024-zinc
Fixes #1024 Added zinc to the grindstone, which is part of Flaxbeards Steam Power (FSP)
2015-03-15 18:38:03 +01:00
thatsIch 7dedd4700f Fixes #1024 Added zinc to the grindstone, which is part of Flaxbeards Steam Power (FSP)
Added zinc to the array of checked ore dictionary names, so if any mod decides to add Zinc in the future or uses it via the OreDictionary, it will be automatically added to the grindstone.

The commit also contains some scoping and code cleanup of the underlaying calls
2015-03-15 09:02:23 +01:00
thatsIch 95fb894ba3 Merge pull request #1028 from bakaxyf/patch-1
Update zh_CN.lang
2015-03-15 08:22:05 +01:00
bakaxyf 621ddc5535 Update zh_CN.lang 2015-03-15 11:05:24 +08:00
yueh ece09a956b Merge pull request #1016 from yueh/fix-1015
Fixes #1015 no longer eat a single item when not able to satisfy the recipe
2015-03-13 23:49:12 +01:00
yueh db5493f60b Merge pull request #1012 from yueh/fix-1011
Fixes #1011 skip null values
2015-03-12 19:23:21 +01:00
yueh f0482dd391 Fixes #1015 no longer eat a single item when not able to satisfy the recipe 2015-03-12 19:07:59 +01:00
yueh c53b3b5dfc Fixes #1011 skip null values 2015-03-11 23:57:48 +01:00
thatsIch ad16550a86 Merge pull request #1009 from bakaxyf/patch-2
Update zh_CN.lang
2015-03-11 17:11:30 +01:00
bakaxyf 99e4928542 Update zh_CN.lang 2015-03-12 00:09:12 +08:00
yueh 43995a4b32 Merge pull request #987 from yueh/feature-improve-aeitemstack-compareto
Improved AEItemStack.compareTo performance.
2015-03-11 16:54:09 +01:00
thatsIch 8ec9bb8b3b Merge pull request #998 from thatsIch/e-920-extended-reach
Fixes #920 Increased GUI close distance to Vanilla MC
2015-03-11 16:40:32 +01:00
thatsIch 18c8197ff4 Merge pull request #996 from thatsIch/b-861-unlinked-wireless-spam
Fixes #861 Wireless Terminal notifies player, if it is unlinked
2015-03-11 16:40:21 +01:00
thatsIch dd1ca1e286 Fixes #861 Wireless Terminal notifies player, if it is unlinked 2015-03-11 09:00:40 +01:00
thatsIch c9f0b4e489 Fixes #920 Increased GUI close distance to Vanilla MC 2015-03-11 07:00:45 +01:00
thatsIch 63a6037ad2 Merge pull request #992 from thatsIch/e-319-new-bc
Fixes #743 crash with plugs, fixes #942 builder integration, closes #319 BC 6 prep
2015-03-11 00:49:21 +01:00
thatsIch 3675f154d1 Merge pull request #993 from Mazdallier/patch-1
Update fr_FR.lang
2015-03-09 15:05:21 +01:00
Yves 5e5be0e192 Update fr_FR.lang 2015-03-09 13:46:12 +01:00
thatsIch e300bf93fd Fixes #743 crash with plugs, fixes #942 builder integration, closes #319 BC 6 prep 2015-03-09 13:10:43 +01:00
yueh cdf949a557 Merge pull request #991 from thatsIch/b-972-level-emitter-tooltip
Fixes #972 Tooltip now corresponds to the actual behaviour
2015-03-09 13:00:03 +01:00
yueh 4c5aeac39f Merge pull request #952 from yueh/update-dependency-versions
Updated Forge and other dependencies
2015-03-09 12:59:52 +01:00
yueh a5f58bb22f Merge pull request #829 from yueh/fix-improve-orehelper-performance
Improved OreHelper performance
2015-03-09 12:59:38 +01:00
thatsIch dddfd6dbaf Fixes #972 Tooltip now corresponds to the actual behaviour 2015-03-09 10:07:13 +01:00
yueh 53f448e578 Improved AEItemStack.compareTo performance. 2015-03-08 15:27:27 +01:00
yueh 311939c63c Merge pull request #973 from yueh/feature-improve-security-audit-log
Some further improvements to the security audit
2015-03-07 16:37:59 +01:00
yueh d8a3556bc3 Merge pull request #983 from yueh/fix-982
Removes creating a ItemStack with a full NBT copy
2015-03-07 16:35:56 +01:00
yueh 57e84c3039 Removes creating a ItemStack with a full NBT copy
There is no need to create a full copy just to fetch the already available
stacksize. It still respects the maximum stacksize of Integer.MAX_VALUE as they copy is doing.

Fixes #982
2015-03-07 15:45:59 +01:00
yueh 1bcf7f9d52 Some further improvements to the security audit 2015-03-05 14:53:10 +01:00
yueh 2746002eb1 Merge pull request #949 from yueh/feature-optional-colored-crafting-status
Added an option to disable the colored crafting status
2015-02-28 18:50:11 +01:00
yueh ee6a3def22 Merge pull request #956 from yueh/feature-improve-security-audit-log
Added some more information to the security audit
2015-02-28 18:49:53 +01:00
yueh 0b15c56037 Added some more information to the security audit 2015-02-28 17:22:17 +01:00
yueh 39c26a72e2 Updated Forge and other dependencies 2015-02-27 23:11:44 +01:00
yueh d2f62ef98c Merge pull request #940 from bakaxyf/patch-1
Update zh_CN.lang
2015-02-27 15:20:40 +01:00
yueh 6476a519bb Added an option to disable the colored crafting status 2015-02-27 13:43:08 +01:00
yueh b8e2d73aa0 Merge pull request #824 from Eearslya/request-817
Added feature request #817
2015-02-27 12:36:02 +01:00
yueh 5a2b35ccd0 Merge pull request #855 from yueh/fix-cable-renderer
Fixes cable render crash and covered cables render as smart.
2015-02-27 11:07:40 +01:00
yueh 16218e46ec Merge pull request #926 from yueh/fix-910
Fixes #910, report the correct hitbox to fmp
2015-02-27 11:07:10 +01:00
yueh 27b692823c Merge pull request #947 from yueh/fix-943
Fixes #943 readded callable for simultaneous block breaking
2015-02-27 11:06:59 +01:00
yueh 68aaec16bc Improved OreHelper performance 2015-02-27 00:17:33 +01:00
yueh ec8d393403 Fixes #943 readded callable for simultaneous block breaking 2015-02-26 22:41:51 +01:00
bakaxyf 27e5eac6aa Update zh_CN.lang 2015-02-25 13:47:40 +08:00
yueh ca521935e0 Fixes #910, report the correct hitbox to fmp 2015-02-22 12:42:39 +01:00
yueh f60798129c Fixes cable render crash and covered cables render as smart. 2015-02-06 19:39:08 +01:00
AlgorithmX2 3e90f354c5 Updated Texture / Model License to be specific. 2015-02-03 10:01:48 -06:00
yueh a27ed6d9ba Merge pull request #840 from yueh/remove-trailing-whitespace
remove trailing whitespaces
2015-02-03 12:05:17 +01:00
yueh b18addbf37 remove trailing whitespaces 2015-02-03 12:04:13 +01:00
Eearslya 3fa501d726 Added feature request #817
Crafting CPU GUI now shows a yellow background on items being crafted, and a yellow background on scheduled items.
2015-02-02 06:37:17 -08:00
FireBall ef3cb0a455 Merge pull request #781 from yueh/fix-p2p-missing-super-call
Added missing super calls
2015-01-22 11:05:23 -05:00
yueh be82dfec1f Added missing super calls 2015-01-19 22:51:41 +01:00
Chris 8eb5ad01cf Merge pull request #776 from al-myr/patch-1
Update pt_BR.lang
2015-01-19 12:22:42 -08:00
Chris a3c5e4cb05 Merge pull request #738 from TheJulianJES/Crank-Fix
Fix #701
2015-01-19 12:15:05 -08:00
yueh c35e057d96 Merge pull request #742 from LeerSpace/patch-1
fixed two grammatical errors
2015-01-19 19:53:35 +01:00
yueh a5a80b58d5 Merge pull request #677 from yueh/feature-remove-annihilation-buffer
Removed buffer from annihilation plane
2015-01-19 19:47:36 +01:00
yueh c10c809c9e Merge pull request #734 from yueh/feature-formation-plane-drop-blocks
Formation plane can now drop blocks as items
2015-01-19 19:45:04 +01:00
yueh 3d2bd84450 Merge pull request #761 from yueh/fix-760
Improved the logged warning for FailledConnection
2015-01-19 19:44:15 +01:00
yueh 2776b2d430 Merge pull request #733 from yueh/fix-emitter-offline-network
Disable level emitter on offline networks
2015-01-19 19:44:01 +01:00
yueh f0d04699d1 Merge pull request #621 from thatsIch/b-304-waila-channels
Fixes #304 WAILA Integration updated and fixed
2015-01-19 19:43:06 +01:00
Al afbce77d0b Update pt_BR.lang 2015-01-19 07:51:22 -03:00
yueh 3a5844a0fe Improved the logged warning for FailledConnection
Now displays to coordinates of the affected tunnels.
2015-01-18 20:46:37 +01:00
John Reed e2798aaaf4 fixed two grammatical errors
replaced "a" with "an" where appropriate
2015-01-17 12:23:19 -06:00
TheJulianJES 99d86511a1 Fix #701 - Changed harvest tool to axe 2015-01-17 15:07:01 +01:00
yueh a8c920932e Formation plane can now drop blocks as items 2015-01-16 19:58:11 +01:00
yueh bd9eaa2d48 Disable level emitter on offline networks
Turns off level emitters if the goes offline because it runs out of power,
channels or similar.
2015-01-15 14:06:23 +01:00
thatsIch c6f232ab63 Fixes #304 WAILA Integration updated and fixed
WAILA offers a new interface to sync the server data to the client.
2015-01-04 00:06:09 +01:00
yueh 29a4464e18 Removed buffer from annihilation plane 2015-01-03 16:26:23 +01:00
yueh 63e375f208 Merge pull request #679 from yueh/fix-colliding-entityfx
Fix colliding entityfx
2015-01-02 23:53:58 +01:00
yueh 2f51568772 Effects should not collide with anything 2015-01-02 20:37:48 +01:00
thatsIch 59adde7c6b Spellings and enums equality 2015-01-02 00:01:34 +01:00
thatsIch 52c512635d Renamed constants 2015-01-01 22:13:10 +01:00
thatsIch e0175bac98 Finalize static field 2015-01-01 21:45:03 +01:00
thatsIch 63ab2bbad0 Remove unsed method 2015-01-01 21:42:14 +01:00
thatsIch 33b04f6ff9 Removed obsolete Hashtable and replaced it with an HashMap 2015-01-01 21:38:52 +01:00
thatsIch 236f6f72e3 finalize fields 2015-01-01 21:19:50 +01:00
thatsIch 8920d949d2 this access 2015-01-01 21:17:00 +01:00
thatsIch eed0c11d7f Replaced equals enum equality check with == 2015-01-01 21:16:04 +01:00
thatsIch 8179259afa Replaced C-style array instantiation with Java-Style 2015-01-01 21:15:03 +01:00
thatsIch e38293a291 Added missing javadoc return statement 2015-01-01 21:00:39 +01:00
yueh 15ba197083 Merge pull request #668 from yueh/fix-666
Fixes #666 Only convert to a cablebus if an IPartItem is attached
2015-01-01 15:35:57 +01:00
yueh ff903e65a5 Fixes #666 Only convert to a cablebus if an IPartItem is attached 2014-12-31 18:21:15 +01:00
thatsIch 305fc6c7f2 Merge pull request #664 from thatsIch/b-663-disabled-facades
Fixes #663 NPE on disabled Facades
2014-12-30 23:34:57 +01:00
thatsIch ada69b9a95 Fixes #663 NPE on disabled Facades 2014-12-30 23:18:38 +01:00
thatsIch 97dabc4a5c Merge pull request #660 from thatsIch/b-659-NPE-sculpting-tool
Fixes #659 NPE on usage of the FZ sculpting tool
2014-12-30 14:06:08 +01:00
thatsIch fec00fee17 Fixes #659 NPE on usage of the FZ sculpting tool 2014-12-30 11:55:47 +01:00
1127 changed files with 52778 additions and 44435 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
# Applied Energistics 2
## Table of Content
## Table of Contents
* [About](#about)
* [Contacts](#contacts)
@@ -31,7 +31,7 @@ Applied Energistics 2 API is (c) 2013 - 2014 AlgorithmX2 and licensed under MIT.
Applied Energistics 2 is (c) 2013 - 2014 AlgorithmX2 and licensed under LGPL v3.
See the LICENSE.txt for details or go to http://www.gnu.org/licenses/lgpl-3.0.txt for more information.
Textures and Models are licensed under Creative Commons 3.
Textures and Models are licensed under [Creative Commons, Attribution-NonCommercial-ShareAlike 3.0]( https://creativecommons.org/licenses/by-nc-sa/3.0/).
## Downloads
+3
View File
@@ -22,6 +22,7 @@ apply from: 'gradle/scripts/propertyloader.gradle'
apply from: 'gradle/scripts/dependencies.gradle'
apply from: 'gradle/scripts/artifacts.gradle'
apply from: 'gradle/scripts/autoinstallruntime.gradle'
apply from: 'gradle/scripts/integration.gradle'
buildscript {
repositories {
@@ -79,6 +80,7 @@ jar {
minecraft {
version = config.minecraft_version + "-" + config.forge_version
replaceIn "AEConfig.java"
replace "@version@", project.version
replace "@aechannel@", config.aechannel
@@ -110,5 +112,6 @@ processResources {
from(sourceSets.main.resources.srcDirs) {
include 'mcmod.info'
expand 'version': project.version, 'mcversion': config.minecraft_version
include 'pack.mcmeta'
}
}
+9 -9
View File
@@ -8,17 +8,17 @@ archivesBaseName=appliedenergistics2
# Versions #
#########################################################
minecraft_version=1.7.10
forge_version=10.13.2.1230
forge_version=10.13.2.1291
#########################################################
# APIs used for development #
#########################################################
cb_minecraft_version=1.7.10
fmp_version=1.1.0.311
code_chicken_lib_version=1.1.1.105
code_chicken_core_version=1.0.4.29
nei_version=1.0.3.66
waila_version=1.5.5_1.7.10
fmp_version=1.1.1.324
code_chicken_lib_version=1.1.3.127
code_chicken_core_version=1.0.4.35
nei_version=1.0.4.90
bc_version=6.4.6
#########################################################
# API Stubs #
@@ -32,10 +32,10 @@ api_craftguide_version=1
api_ic2_version=1
api_immibis_version=1
api_invtweaks_version=1
api_mekansim_version=1
api_mekansim_version=1.7.10-8.0.1.198
api_mfr_version=1
api_railcraft_version=1
api_rblocks_version=1
api_rf_version=2
api_rotarycraft_version=1
dev_buildcraft_version=1
api_rotarycraft_version=V5c
api_waila_version=1.5.10_1.7.10
+4 -4
View File
@@ -27,13 +27,13 @@ task devJar(type: Jar) {
}
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/**"
classifier = 'api'
}
artifacts {
+1 -23
View File
@@ -9,26 +9,4 @@ task copyChicken(type: Copy, dependsOn: "extractUserDev") {
mustRunAfter "repackMinecraft"
}
tasks.setupDevWorkspace.dependsOn copyChicken
tasks.setupDecompWorkspace.dependsOn copyChicken
// same for BC hacked file
task copyBuildcraft(type: Copy, dependsOn: "extractUserDev") {
from { configurations.compile }
include "**/*buildcraft*.jar"
into file(minecraft.runDir + "/mods")
mustRunAfter "deobfBinJar"
mustRunAfter "repackMinecraft"
}
tasks.setupDevWorkspace.dependsOn copyBuildcraft
tasks.setupDecompWorkspace.dependsOn copyBuildcraft
// and for IC2 because it needs its EMLJ jar
task copyIndustrialcraft(type: Copy, dependsOn: "extractUserDev") {
from { configurations.compile }
include "**/*industrialcraft*.jar"
into file(minecraft.runDir + "/mods")
mustRunAfter "deobfBinJar"
mustRunAfter "repackMinecraft"
}
tasks.setupDevWorkspace.dependsOn copyIndustrialcraft
tasks.setupDecompWorkspace.dependsOn copyIndustrialcraft
tasks.setupDecompWorkspace.dependsOn copyChicken
+6 -8
View File
@@ -43,24 +43,22 @@ dependencies {
compile "codechicken:CodeChickenCore:${config.cb_minecraft_version}-${config.code_chicken_core_version}:dev"
compile "codechicken:NotEnoughItems:${config.cb_minecraft_version}-${config.nei_version}:dev"
compile "mcp.mobius.waila:Waila:${config.waila_version}:dev"
compile "com.mod-buildcraft:buildcraft:${config.bc_version}:dev"
// self compiled APIs
compile(group: 'api', name: 'betterstorage', version: "${config.api_betterstorage_version}")
compile(group: 'api', name: 'coloredlightscore', version: "${config.api_coloredlightscore_version}")
compile(group: 'api', name: 'craftguide', version: "${config.api_craftguide_version}")
compile(group: 'api', name: 'ic2', version: "${config.api_ic2_version}")
compile(group: 'api', name: 'immibis', version: "${config.api_immibis_version}")
compile(group: 'api', name: 'invtweaks', version: "${config.api_invtweaks_version}")
compile(group: 'api', name: 'mekansim', version: "${config.api_mekansim_version}")
compile(group: 'api', name: 'mfr', version: "${config.api_mfr_version}")
compile(group: 'api', name: 'railcraft', version: "${config.api_railcraft_version}")
compile(group: 'api', name: 'rblocks', version: "${config.api_rblocks_version}")
compile(group: 'api', name: 'rf', version: "${config.api_rf_version}")
compile(group: 'api', name: 'rotarycraft', version: "${config.api_rotarycraft_version}")
compile(group: 'dev', name: 'buildcraft', version: "${config.dev_buildcraft_version}")
// add hacked buildcraft jar to compile time (for facades)
compile fileTree(dir: 'libs', include: '*.jar')
compile "appeng:Waila:${config.api_waila_version}:api"
compile "appeng:RotaryCraft:${config.api_rotarycraft_version}:api"
compile "appeng:mekanism:${config.api_mekansim_version}:api"
testCompile "junit:junit:4.11"
}
+7
View File
@@ -0,0 +1,7 @@
apply plugin: 'idea'
idea {
module {
inheritOutputDirs = true
}
}
+47 -30
View File
@@ -1,18 +1,18 @@
/*
* 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
@@ -23,39 +23,56 @@
package appeng.api;
/**
*
* Entry point for api.
*
* Available IMCs:
*
*/
public class AEApi
{
static private IAppEngApi api = null;
import java.lang.reflect.Field;
import appeng.api.exceptions.CoreInaccessibleException;
/**
* Entry point for api.
*
* Available IMCs:
*/
public enum AEApi
{
;
private static final String CORE_API_FQN = "appeng.core.Api";
private static final String CORE_API_FIELD = "INSTANCE";
private static final IAppEngApi HELD_API;
static
{
try
{
final Class<?> apiClass = Class.forName( CORE_API_FQN );
final Field apiField = apiClass.getField( CORE_API_FIELD );
HELD_API = (IAppEngApi) apiField.get( apiClass );
}
catch( ClassNotFoundException e )
{
throw new CoreInaccessibleException( "AE2 API tried to access the " + CORE_API_FQN + " class, without it being declared." );
}
catch( NoSuchFieldException e )
{
throw new CoreInaccessibleException( "AE2 API tried to access the " + CORE_API_FIELD + " field in " + CORE_API_FQN + " without it being declared." );
}
catch( IllegalAccessException e )
{
throw new CoreInaccessibleException( "AE2 API tried to access the " + CORE_API_FIELD + " field in " + CORE_API_FQN + " without enough access permissions." );
}
}
/**
* API Entry Point.
*
* @return the {@link IAppEngApi} or null if the instance could not be retrieved
*
* @return the {@link IAppEngApi}
*/
public static IAppEngApi instance()
{
if ( api == null )
{
try
{
Class c = Class.forName( "appeng.core.Api" );
api = (IAppEngApi) c.getField( "instance" ).get( c );
}
catch (Throwable e)
{
return null;
}
}
return api;
return HELD_API;
}
}
+35 -15
View File
@@ -1,18 +1,18 @@
/*
* 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
@@ -23,7 +23,9 @@
package appeng.api;
import appeng.api.definitions.Blocks;
import appeng.api.definitions.IDefinitions;
import appeng.api.definitions.Items;
import appeng.api.definitions.Materials;
import appeng.api.definitions.Parts;
@@ -31,11 +33,11 @@ import appeng.api.exceptions.FailedConnection;
import appeng.api.features.IRegistryContainer;
import appeng.api.networking.IGridBlock;
import appeng.api.networking.IGridConnection;
import appeng.api.networking.IGridHost;
import appeng.api.networking.IGridNode;
import appeng.api.parts.IPartHelper;
import appeng.api.storage.IStorageHelper;
public interface IAppEngApi
{
@@ -56,39 +58,57 @@ public interface IAppEngApi
/**
* @return an accessible list of all of AE's Items
*
* @deprecated use {@link appeng.api.definitions.IDefinitions#items()}
*/
@Deprecated
Items items();
/**
* @return an accessible list of all of AE's materials; materials are items
*
* @deprecated use {@link appeng.api.definitions.IDefinitions#materials()}
*/
@Deprecated
Materials materials();
/**
* @return an accessible list of all of AE's blocks
*
* @deprecated use {@link appeng.api.definitions.IDefinitions#blocks()}
*/
@Deprecated
Blocks blocks();
/**
* @return an accessible list of all of AE's parts, parts are items
*
* @deprecated use {@link appeng.api.definitions.IDefinitions#parts()}
*/
@Deprecated
Parts parts();
/**
* create a grid node for your {@link IGridHost}
*
* @param block grid block
* @return grid node of block
* @return an accessible list of all AE definitions
*/
IGridNode createGridNode(IGridBlock block);
IDefinitions definitions();
/**
* create a connection between two {@link IGridNode}
*
* create a grid node for your {@link appeng.api.networking.IGridHost}
*
* @param block grid block
*
* @return grid node of block
*/
IGridNode createGridNode( IGridBlock block );
/**
* create a connection between two {@link appeng.api.networking.IGridNode}
*
* @param a to be connected gridnode
* @param b to be connected gridnode
* @throws FailedConnection
*
* @throws appeng.api.exceptions.FailedConnection
*/
IGridConnection createGridConnection(IGridNode a, IGridNode b) throws FailedConnection;
IGridConnection createGridConnection( IGridNode a, IGridNode b ) throws FailedConnection;
}
@@ -1,18 +1,18 @@
/*
* 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
@@ -23,49 +23,51 @@
package appeng.api.config;
public enum AccessRestriction
{
NO_ACCESS(0), READ(1), WRITE(2), READ_WRITE(3);
NO_ACCESS( 0 ), READ( 1 ), WRITE( 2 ), READ_WRITE( 3 );
private final int permissionBit;
private AccessRestriction(int v) {
permissionBit = v;
AccessRestriction( int v )
{
this.permissionBit = v;
}
public boolean hasPermission(AccessRestriction ar)
public boolean hasPermission( AccessRestriction ar )
{
return (permissionBit & ar.permissionBit) == ar.permissionBit;
return ( this.permissionBit & ar.permissionBit ) == ar.permissionBit;
}
public AccessRestriction restrictPermissions(AccessRestriction ar)
public AccessRestriction restrictPermissions( AccessRestriction ar )
{
return getPermByBit( permissionBit & ar.permissionBit);
return this.getPermByBit( this.permissionBit & ar.permissionBit );
}
public AccessRestriction addPermissions(AccessRestriction ar)
private AccessRestriction getPermByBit( int bit )
{
return getPermByBit( permissionBit | ar.permissionBit);
}
public AccessRestriction removePermissions(AccessRestriction ar)
{
return getPermByBit( permissionBit & (~ar.permissionBit) );
}
private AccessRestriction getPermByBit(int bit)
{
switch (bit)
switch( bit )
{
default:
case 0:
return NO_ACCESS;
case 1:
return READ;
case 2:
return WRITE;
case 3:
return READ_WRITE;
default:
case 0:
return NO_ACCESS;
case 1:
return READ;
case 2:
return WRITE;
case 3:
return READ_WRITE;
}
}
public AccessRestriction addPermissions( AccessRestriction ar )
{
return this.getPermByBit( this.permissionBit | ar.permissionBit );
}
public AccessRestriction removePermissions( AccessRestriction ar )
{
return this.getPermByBit( this.permissionBit & ( ~ar.permissionBit ) );
}
}
@@ -1,18 +1,18 @@
/*
* 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
@@ -23,6 +23,7 @@
package appeng.api.config;
public enum ActionItems
{
WRENCH, CLOSE, STASH, ENCODE, SUBSTITUTION
@@ -1,18 +1,18 @@
/*
* 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
@@ -23,6 +23,7 @@
package appeng.api.config;
public enum Actionable
{
/**
@@ -1,18 +1,18 @@
/*
* 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
+5 -4
View File
@@ -1,18 +1,18 @@
/*
* 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
@@ -23,6 +23,7 @@
package appeng.api.config;
public enum CopyMode
{
CLEAR_ON_REMOVE, KEEP_ON_REMOVE
@@ -1,18 +1,18 @@
/*
* 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
@@ -23,6 +23,7 @@
package appeng.api.config;
public enum FullnessMode
{
EMPTY, HALF, FULL
+14 -12
View File
@@ -1,18 +1,18 @@
/*
* 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
@@ -23,22 +23,24 @@
package appeng.api.config;
public enum FuzzyMode
{
// Note that percentage damaged, is the inverse of percentage durability.
IGNORE_ALL(-1), PERCENT_99(0), PERCENT_75(25), PERCENT_50(50), PERCENT_25(75);
IGNORE_ALL( -1 ), PERCENT_99( 0 ), PERCENT_75( 25 ), PERCENT_50( 50 ), PERCENT_25( 75 );
final public float breakPoint;
final public float percentage;
public final float breakPoint;
public final float percentage;
private FuzzyMode(float p) {
percentage = p;
breakPoint = p / 100.0f;
FuzzyMode( float p )
{
this.percentage = p;
this.breakPoint = p / 100.0f;
}
public int calculateBreakPoint(int maxDamage)
public int calculateBreakPoint( int maxDamage )
{
return (int) ((percentage * maxDamage) / 100.0f);
return (int) ( ( this.percentage * maxDamage ) / 100.0f );
}
}
@@ -1,18 +1,18 @@
/*
* 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
@@ -23,6 +23,7 @@
package appeng.api.config;
public enum IncludeExclude
{
WHITELIST, BLACKLIST
@@ -1,18 +1,18 @@
/*
* 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
@@ -23,6 +23,7 @@
package appeng.api.config;
public enum LevelEmitterMode
{
@@ -1,18 +1,18 @@
/*
* 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
@@ -23,6 +23,7 @@
package appeng.api.config;
public enum LevelType
{
@@ -1,18 +1,18 @@
/*
* 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
@@ -23,6 +23,7 @@
package appeng.api.config;
public enum ModSettings
{
@@ -1,18 +1,18 @@
/*
* 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
@@ -23,6 +23,7 @@
package appeng.api.config;
public enum NetworkEmitterMode
{
@@ -1,18 +1,18 @@
/*
* 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
@@ -23,6 +23,7 @@
package appeng.api.config;
public enum OperationMode
{
FILL, EMPTY
@@ -1,18 +1,18 @@
/*
* 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
@@ -23,6 +23,7 @@
package appeng.api.config;
public enum OutputMode
{
EXPORT_ONLY, EXPORT_OR_CRAFT, CRAFT_ONLY
@@ -1,18 +1,18 @@
/*
* 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
@@ -23,6 +23,7 @@
package appeng.api.config;
public enum PowerMultiplier
{
ONE, CONFIG;
@@ -32,13 +33,13 @@ public enum PowerMultiplier
*/
public double multiplier = 1.0;
public double multiply(double in)
public double multiply( double in )
{
return in * multiplier;
return in * this.multiplier;
}
public double divide(double in)
public double divide( double in )
{
return in / multiplier;
return in / this.multiplier;
}
}
+25 -24
View File
@@ -1,18 +1,18 @@
/*
* 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
@@ -23,43 +23,44 @@
package appeng.api.config;
public enum PowerUnits
{
AE("gui.appliedenergistics2.units.appliedenergstics"), // Native Units - AE Energy
MJ("gui.appliedenergistics2.units.buildcraft"), // BuildCraft - Minecraft Joules
EU("gui.appliedenergistics2.units.ic2"), // IndustrialCraft 2 - Energy Units
WA("gui.appliedenergistics2.units.rotarycraft"), // RotaryCraft - Watts
RF("gui.appliedenergistics2.units.thermalexpansion"), // ThermalExpansion - Redstone Flux
MK("gui.appliedenergistics2.units.mekanism"); // Mekanism - Joules
private PowerUnits(String un) {
unlocalizedName = un;
}
AE( "gui.appliedenergistics2.units.appliedenergstics" ), // Native Units - AE Energy
EU( "gui.appliedenergistics2.units.ic2" ), // IndustrialCraft 2 - Energy Units
WA( "gui.appliedenergistics2.units.rotarycraft" ), // RotaryCraft - Watts
RF( "gui.appliedenergistics2.units.thermalexpansion" ), // ThermalExpansion - Redstone Flux
MK( "gui.appliedenergistics2.units.mekanism" ); // Mekanism - Joules
/**
* unlocalized name for the power unit.
*/
public final String unlocalizedName;
/**
* please do not edit this value, it is set when AE loads its config files.
*/
public double conversionRatio = 1.0;
/**
* unlocalized name for the power unit.
*/
final public String unlocalizedName;
PowerUnits( String un )
{
this.unlocalizedName = un;
}
/**
* do power conversion using AE's conversion rates.
*
*
* Example: PowerUnits.EU.convertTo( PowerUnits.AE, 32 );
*
*
* will normally returns 64, as it will convert the EU, to AE with AE's power settings.
*
*
* @param target target power unit
* @param value value
* @param value value
*
* @return value converted to target units, from this units.
*/
public double convertTo(PowerUnits target, double value)
public double convertTo( PowerUnits target, double value )
{
return (value * conversionRatio) / target.conversionRatio;
return ( value * this.conversionRatio ) / target.conversionRatio;
}
}
@@ -1,18 +1,18 @@
/*
* 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
@@ -23,6 +23,7 @@
package appeng.api.config;
public enum RedstoneMode
{
IGNORE, LOW_SIGNAL, HIGH_SIGNAL, SIGNAL_PULSE
@@ -1,18 +1,18 @@
/*
* 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
@@ -23,6 +23,7 @@
package appeng.api.config;
public enum RelativeDirection
{
LEFT, RIGHT, UP, DOW
@@ -1,18 +1,18 @@
/*
* 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
@@ -23,6 +23,7 @@
package appeng.api.config;
public enum SearchBoxMode
{
AUTOSEARCH, MANUAL_SEARCH, NEI_AUTOSEARCH, NEI_MANUAL_SEARCH
@@ -1,18 +1,18 @@
/*
* 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
@@ -23,6 +23,7 @@
package appeng.api.config;
/**
* Represent the security systems basic permissions, these are not for anti-griefing, they are part of the mod as a
* gameplay feature.
@@ -56,15 +57,15 @@ public enum SecurityPermissions
*/
SECURITY;
final private String unlocalizedName = "gui.appliedenergistics2.security." + name().toLowerCase();
private final String unlocalizedName = "gui.appliedenergistics2.security." + this.name().toLowerCase();
public String getUnlocalizedName()
{
return unlocalizedName + ".name";
return this.unlocalizedName + ".name";
}
public String getUnlocalizedTip()
{
return unlocalizedName + ".tip";
return this.unlocalizedName + ".tip";
}
}
+31 -24
View File
@@ -1,18 +1,18 @@
/*
* 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
@@ -23,47 +23,54 @@
package appeng.api.config;
import java.util.EnumSet;
import javax.annotation.Nonnull;
public enum Settings
{
LEVEL_EMITTER_MODE(EnumSet.allOf( LevelEmitterMode.class )),
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 )),
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 ) ), ACCESS( EnumSet.of( AccessRestriction.READ_WRITE, AccessRestriction.READ, AccessRestriction.WRITE ) ),
SORT_DIRECTION(EnumSet.allOf( SortDir.class )), SORT_BY(EnumSet.allOf( SortOrder.class )),
SORT_DIRECTION( EnumSet.allOf( SortDir.class ) ), SORT_BY( EnumSet.allOf( SortOrder.class ) ),
SEARCH_TOOLTIPS(EnumSet.of( YesNo.YES, YesNo.NO )), VIEW_MODE(EnumSet.allOf( ViewItems.class )), SEARCH_MODE(EnumSet.allOf( SearchBoxMode.class )),
SEARCH_TOOLTIPS( EnumSet.of( YesNo.YES, YesNo.NO ) ), VIEW_MODE( EnumSet.allOf( ViewItems.class ) ), SEARCH_MODE( EnumSet.allOf( SearchBoxMode.class ) ),
ACTIONS(EnumSet.allOf( ActionItems.class )), IO_DIRECTION(EnumSet.of( RelativeDirection.LEFT, RelativeDirection.RIGHT )),
ACTIONS( EnumSet.allOf( ActionItems.class ) ), IO_DIRECTION( EnumSet.of( RelativeDirection.LEFT, RelativeDirection.RIGHT ) ),
BLOCK(EnumSet.of( YesNo.YES, YesNo.NO )), OPERATION_MODE(EnumSet.allOf( OperationMode.class )),
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 )),
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 )),
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 )),
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 )),
INTERFACE_TERMINAL( EnumSet.of( YesNo.YES, YesNo.NO ) ), CRAFT_VIA_REDSTONE( EnumSet.of( YesNo.YES, YesNo.NO ) ),
STORAGE_FILTER(EnumSet.allOf( StorageFilter.class ));
STORAGE_FILTER( EnumSet.allOf( StorageFilter.class ) ), PLACE_BLOCK( EnumSet.of( YesNo.YES, YesNo.NO ) );
private EnumSet values;
private final EnumSet<? extends Enum<?>> values;
public EnumSet getPossibleValues()
Settings( @Nonnull EnumSet<? extends Enum<?>> possibleOptions )
{
return values;
if ( possibleOptions.isEmpty() )
{
throw new IllegalArgumentException( "Tried to instantiate an empty setting." );
}
this.values = possibleOptions;
}
private Settings(EnumSet set) {
if ( set == null || set.isEmpty() )
throw new RuntimeException( "Invalid configuration." );
values = set;
public EnumSet<? extends Enum<?>> getPossibleValues()
{
return this.values;
}
}
+5 -4
View File
@@ -1,18 +1,18 @@
/*
* 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
@@ -23,6 +23,7 @@
package appeng.api.config;
public enum SortDir
{
ASCENDING, DESCENDING
@@ -1,18 +1,18 @@
/*
* 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
@@ -23,6 +23,7 @@
package appeng.api.config;
public enum SortOrder
{
NAME, AMOUNT, MOD, INVTWEAKS
@@ -1,18 +1,18 @@
/*
* 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
@@ -23,6 +23,7 @@
package appeng.api.config;
public enum StorageFilter
{
@@ -1,18 +1,18 @@
/*
* 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
@@ -23,6 +23,7 @@
package appeng.api.config;
public enum TerminalStyle
{
@@ -1,18 +1,18 @@
/*
* 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
@@ -23,10 +23,10 @@
package appeng.api.config;
public enum TunnelType
{
ME, // Network Tunnel
BC_POWER, // MJ Tunnel
IC2_POWER, // EU Tunnel
RF_POWER, // RF Tunnel
REDSTONE, // Redstone Tunnel
+65 -16
View File
@@ -1,18 +1,18 @@
/*
* 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
@@ -25,9 +25,13 @@ package appeng.api.config;
import java.util.HashMap;
import java.util.Map;
import net.minecraft.item.ItemStack;
import com.google.common.base.Optional;
import appeng.api.definitions.IItemDefinition;
import appeng.api.util.AEItemDefinition;
@@ -43,39 +47,84 @@ public enum Upgrades
*/
FUZZY( 1 ), SPEED( 1 ), INVERTER( 1 );
public final int myTier;
public final HashMap<ItemStack, Integer> supportedMax = new HashMap<ItemStack, Integer>();
/**
* @deprecated use {@link Upgrades#getTier()}
*/
@Deprecated
public final int tier;
private Upgrades( int tier )
/**
* @deprecated use {@link Upgrades#getSupported()}
*/
@Deprecated
private final Map<ItemStack, Integer> supportedMax = new HashMap<ItemStack, Integer>();
Upgrades( int tier )
{
this.myTier = tier;
this.tier = tier;
}
/**
* @return list of Items/Blocks that support this upgrade, and how many it supports.
*/
public HashMap<ItemStack, Integer> getSupported()
public Map<ItemStack, Integer> getSupported()
{
return this.supportedMax;
}
public void registerItem( AEItemDefinition myItem, int maxSupported )
/**
* Registers a specific amount of this upgrade into a specific machine
*
* @param item machine in which this upgrade can be installed
* @param maxSupported amount how many upgrades can be installed
*/
public void registerItem( IItemDefinition item, int maxSupported )
{
if ( myItem != null )
final Optional<ItemStack> maybeStack = item.maybeStack( 1 );
for( ItemStack stack : maybeStack.asSet() )
{
final ItemStack stack = myItem.stack( 1 );
this.registerItem( stack, maxSupported );
}
}
/**
* Registers a specific amount of this upgrade into a specific machine
*
* @param stack machine in which this upgrade can be installed
* @param maxSupported amount how many upgrades can be installed
*/
public void registerItem( ItemStack stack, int maxSupported )
{
if ( stack != null )
if( stack != null )
{
this.supportedMax.put( stack, maxSupported );
}
}
/**
* Registers a specific amount of this upgrade into a specific machine
*
* @param item machine in which this upgrade can be installed
* @param maxSupported amount how many upgrades can be installed
*
* @deprecated use {@link Upgrades#registerItem(IItemDefinition, int)}
*/
@Deprecated
public void registerItem( AEItemDefinition item, int maxSupported )
{
if( item != null )
{
final ItemStack stack = item.stack( 1 );
if( stack != null )
{
this.registerItem( stack, maxSupported );
}
}
}
public int getTier()
{
return this.tier;
}
}
@@ -1,18 +1,18 @@
/*
* 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
@@ -23,6 +23,7 @@
package appeng.api.config;
public enum ViewItems
{
ALL, STORED, CRAFTABLE
+5 -4
View File
@@ -1,18 +1,18 @@
/*
* 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
@@ -23,6 +23,7 @@
package appeng.api.config;
public enum YesNo
{
YES, NO, UNDECIDED
+47 -28
View File
@@ -1,18 +1,18 @@
/*
* 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
@@ -23,90 +23,109 @@
package appeng.api.definitions;
import appeng.api.util.AEItemDefinition;
/**
* @deprecated use {@link IBlocks} now
*/
@Deprecated
public class Blocks
{
/*
* World Gen
*/
public AEItemDefinition blockQuartzOre;
public AEItemDefinition blockQuartzOreCharged;
public AEItemDefinition blockMatrixFrame;
/*
* Decorative
*/
public AEItemDefinition blockQuartz;
public AEItemDefinition blockQuartzPillar;
public AEItemDefinition blockQuartzChiseled;
public AEItemDefinition blockQuartzGlass;
public AEItemDefinition blockQuartzVibrantGlass;
public AEItemDefinition blockQuartzTorch;
public AEItemDefinition blockFluix;
public AEItemDefinition blockSkyStone;
public AEItemDefinition blockSkyChest;
public AEItemDefinition blockSkyCompass;
/*
* Misc
*/
public AEItemDefinition blockGrindStone;
public AEItemDefinition blockCrankHandle;
public AEItemDefinition blockInscriber;
public AEItemDefinition blockWireless;
public AEItemDefinition blockCharger;
public AEItemDefinition blockTinyTNT;
public AEItemDefinition blockSecurity;
/*
* Quantum Network Bridge
*/
public AEItemDefinition blockQuantumRing;
public AEItemDefinition blockQuantumLink;
/*
* Spatial IO
*/
public AEItemDefinition blockSpatialPylon;
public AEItemDefinition blockSpatialIOPort;
/*
* Bus / Cables
*/
public AEItemDefinition blockMultiPart;
/*
* Machines
*/
public AEItemDefinition blockController;
public AEItemDefinition blockDrive;
public AEItemDefinition blockChest;
public AEItemDefinition blockInterface;
public AEItemDefinition blockCellWorkbench;
public AEItemDefinition blockIOPort;
public AEItemDefinition blockCondenser;
public AEItemDefinition blockEnergyAcceptor;
public AEItemDefinition blockVibrationChamber;
public AEItemDefinition blockQuartzGrowthAccelerator;
public AEItemDefinition blockEnergyCell;
public AEItemDefinition blockEnergyCellDense;
public AEItemDefinition blockEnergyCellCreative;
// rv1
public AEItemDefinition blockCraftingUnit;
public AEItemDefinition blockCraftingAccelerator;
public AEItemDefinition blockCraftingStorage1k;
public AEItemDefinition blockCraftingStorage4k;
public AEItemDefinition blockCraftingStorage16k;
public AEItemDefinition blockCraftingStorage64k;
public AEItemDefinition blockCraftingMonitor;
public AEItemDefinition blockMolecularAssembler;
public AEItemDefinition blockLightDetector;
public AEItemDefinition blockPaint;
public AEItemDefinition blockPaint;
}
@@ -0,0 +1,21 @@
package appeng.api.definitions;
import net.minecraft.block.Block;
import net.minecraft.item.ItemBlock;
import com.google.common.base.Optional;
public interface IBlockDefinition extends IItemDefinition
{
/**
* @return the {@link Block} implementation if applicable
*/
Optional<Block> maybeBlock();
/**
* @return the {@link ItemBlock} implementation if applicable
*/
Optional<ItemBlock> maybeItemBlock();
}
@@ -0,0 +1,165 @@
/*
* The MIT License (MIT)
*
* Copyright (c) 2013 AlgorithmX2
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package appeng.api.definitions;
/**
* A list of all blocks in AE
*/
public interface IBlocks
{
/*
* world gen
*/
IBlockDefinition quartzOre();
IBlockDefinition quartzOreCharged();
IBlockDefinition matrixFrame();
/*
* decorative
*/
IBlockDefinition quartz();
IBlockDefinition quartzPillar();
IBlockDefinition quartzChiseled();
IBlockDefinition quartzGlass();
IBlockDefinition quartzVibrantGlass();
IBlockDefinition quartzTorch();
IBlockDefinition fluix();
IBlockDefinition skyStone();
IBlockDefinition skyChest();
IBlockDefinition skyCompass();
IBlockDefinition skyStoneStair();
IBlockDefinition skyStoneBlockStair();
IBlockDefinition skyStoneBrickStair();
IBlockDefinition skyStoneSmallBrickStair();
IBlockDefinition fluixStair();
IBlockDefinition quartzStair();
IBlockDefinition chiseledQuartzStair();
IBlockDefinition quartzPillarStair();
/*
* misc
*/
ITileDefinition grindStone();
ITileDefinition crankHandle();
ITileDefinition inscriber();
ITileDefinition wireless();
ITileDefinition charger();
ITileDefinition tinyTNT();
ITileDefinition security();
/*
* quantum Network Bridge
*/
ITileDefinition quantumRing();
ITileDefinition quantumLink();
/*
* spatial iO
*/
ITileDefinition spatialPylon();
ITileDefinition spatialIOPort();
/*
* Bus / cables
*/
ITileDefinition multiPart();
/*
* machines
*/
ITileDefinition controller();
ITileDefinition drive();
ITileDefinition chest();
ITileDefinition iface();
ITileDefinition cellWorkbench();
ITileDefinition iOPort();
ITileDefinition condenser();
ITileDefinition energyAcceptor();
ITileDefinition vibrationChamber();
ITileDefinition quartzGrowthAccelerator();
ITileDefinition energyCell();
ITileDefinition energyCellDense();
ITileDefinition energyCellCreative();
// rv1
ITileDefinition craftingUnit();
ITileDefinition craftingAccelerator();
ITileDefinition craftingStorage1k();
ITileDefinition craftingStorage4k();
ITileDefinition craftingStorage16k();
ITileDefinition craftingStorage64k();
ITileDefinition craftingMonitor();
ITileDefinition molecularAssembler();
ITileDefinition lightDetector();
ITileDefinition paint();
}
@@ -0,0 +1,33 @@
package appeng.api.definitions;
import net.minecraft.item.ItemStack;
import net.minecraft.world.IBlockAccess;
/**
* Interface to compare a definition with an itemstack or a block
*/
public interface IComparableDefinition
{
/**
* Compare {@link ItemStack} with this
*
* @param comparableStack compared item
*
* @return true if the item stack is a matching item.
*/
boolean isSameAs( ItemStack comparableStack );
/**
* Compare Block with world.
*
* @param world world of block
* @param x x pos of block
* @param y y pos of block
* @param z z pos of block
*
* @return if the block is placed in the world at the specific location.
*/
boolean isSameAs( IBlockAccess world, int x, int y, int z );
}
@@ -0,0 +1,51 @@
/*
* The MIT License (MIT)
*
* Copyright (c) 2013 AlgorithmX2
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package appeng.api.definitions;
/**
* All definitions in AE
*/
public interface IDefinitions
{
/**
* @return an accessible list of all of AE's blocks
*/
IBlocks blocks();
/**
* @return an accessible list of all of AE's Items
*/
IItems items();
/**
* @return an accessible list of all of AE's materials; materials are items
*/
IMaterials materials();
/**
* @return an accessible list of all of AE's parts, parts are items
*/
IParts parts();
}
@@ -0,0 +1,21 @@
package appeng.api.definitions;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import com.google.common.base.Optional;
public interface IItemDefinition extends IComparableDefinition
{
/**
* @return the {@link Item} Implementation if applicable
*/
Optional<Item> maybeItem();
/**
* @return an {@link ItemStack} with specified quantity of this item.
*/
Optional<ItemStack> maybeStack( int stackSize );
}
@@ -0,0 +1,109 @@
/*
* The MIT License (MIT)
*
* Copyright (c) 2013 AlgorithmX2
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package appeng.api.definitions;
import appeng.api.util.AEColoredItemDefinition;
/**
* A list of all items in AE
*/
public interface IItems
{
IItemDefinition certusQuartzAxe();
IItemDefinition certusQuartzHoe();
IItemDefinition certusQuartzShovel();
IItemDefinition certusQuartzPick();
IItemDefinition certusQuartzSword();
IItemDefinition certusQuartzWrench();
IItemDefinition certusQuartzKnife();
IItemDefinition netherQuartzAxe();
IItemDefinition netherQuartzHoe();
IItemDefinition netherQuartzShovel();
IItemDefinition netherQuartzPick();
IItemDefinition netherQuartzSword();
IItemDefinition netherQuartzWrench();
IItemDefinition netherQuartzKnife();
IItemDefinition entropyManipulator();
IItemDefinition wirelessTerminal();
IItemDefinition biometricCard();
IItemDefinition chargedStaff();
IItemDefinition massCannon();
IItemDefinition memoryCard();
IItemDefinition networkTool();
IItemDefinition portableCell();
IItemDefinition cellCreative();
IItemDefinition viewCell();
IItemDefinition cell1k();
IItemDefinition cell4k();
IItemDefinition cell16k();
IItemDefinition cell64k();
IItemDefinition spatialCell2();
IItemDefinition spatialCell16();
IItemDefinition spatialCell128();
IItemDefinition facade();
IItemDefinition crystalSeed();
// rv1
IItemDefinition encodedPattern();
IItemDefinition colorApplicator();
AEColoredItemDefinition coloredPaintBall();
AEColoredItemDefinition coloredLumenPaintBall();
}
@@ -0,0 +1,139 @@
/*
* The MIT License (MIT)
*
* Copyright (c) 2013 AlgorithmX2
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package appeng.api.definitions;
/**
* A list of all materials in AE
*/
public interface IMaterials
{
IItemDefinition cell2SpatialPart();
IItemDefinition cell16SpatialPart();
IItemDefinition cell128SpatialPart();
IItemDefinition silicon();
IItemDefinition skyDust();
IItemDefinition calcProcessorPress();
IItemDefinition engProcessorPress();
IItemDefinition logicProcessorPress();
IItemDefinition calcProcessorPrint();
IItemDefinition engProcessorPrint();
IItemDefinition logicProcessorPrint();
IItemDefinition siliconPress();
IItemDefinition siliconPrint();
IItemDefinition namePress();
IItemDefinition logicProcessor();
IItemDefinition calcProcessor();
IItemDefinition engProcessor();
IItemDefinition basicCard();
IItemDefinition advCard();
IItemDefinition purifiedCertusQuartzCrystal();
IItemDefinition purifiedNetherQuartzCrystal();
IItemDefinition purifiedFluixCrystal();
IItemDefinition cell1kPart();
IItemDefinition cell4kPart();
IItemDefinition cell16kPart();
IItemDefinition cell64kPart();
IItemDefinition emptyStorageCell();
IItemDefinition cardRedstone();
IItemDefinition cardSpeed();
IItemDefinition cardCapacity();
IItemDefinition cardFuzzy();
IItemDefinition cardInverter();
IItemDefinition cardCrafting();
IItemDefinition enderDust();
IItemDefinition flour();
IItemDefinition goldDust();
IItemDefinition ironDust();
IItemDefinition fluixDust();
IItemDefinition certusQuartzDust();
IItemDefinition netherQuartzDust();
IItemDefinition matterBall();
IItemDefinition ironNugget();
IItemDefinition certusQuartzCrystal();
IItemDefinition certusQuartzCrystalCharged();
IItemDefinition fluixCrystal();
IItemDefinition fluixPearl();
IItemDefinition woodenGear();
IItemDefinition wireless();
IItemDefinition wirelessBooster();
IItemDefinition annihilationCore();
IItemDefinition formationCore();
IItemDefinition singularity();
IItemDefinition qESingularity();
IItemDefinition blankPattern();
}
@@ -0,0 +1,104 @@
/*
* The MIT License (MIT)
*
* Copyright (c) 2013 AlgorithmX2
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package appeng.api.definitions;
import appeng.api.util.AEColoredItemDefinition;
/**
* A list of all parts in AE
*/
public interface IParts
{
AEColoredItemDefinition cableSmart();
AEColoredItemDefinition cableCovered();
AEColoredItemDefinition cableGlass();
AEColoredItemDefinition cableDense();
AEColoredItemDefinition lumenCableSmart();
AEColoredItemDefinition lumenCableCovered();
AEColoredItemDefinition lumenCableGlass();
AEColoredItemDefinition lumenCableDense();
IItemDefinition quartzFiber();
IItemDefinition toggleBus();
IItemDefinition invertedToggleBus();
IItemDefinition storageBus();
IItemDefinition importBus();
IItemDefinition exportBus();
IItemDefinition iface();
IItemDefinition levelEmitter();
IItemDefinition annihilationPlane();
IItemDefinition formationPlane();
IItemDefinition p2PTunnelME();
IItemDefinition p2PTunnelRedstone();
IItemDefinition p2PTunnelItems();
IItemDefinition p2PTunnelLiquids();
IItemDefinition p2PTunnelEU();
IItemDefinition p2PTunnelRF();
IItemDefinition p2PTunnelLight();
IItemDefinition cableAnchor();
IItemDefinition monitor();
IItemDefinition semiDarkMonitor();
IItemDefinition darkMonitor();
IItemDefinition interfaceTerminal();
IItemDefinition patternTerminal();
IItemDefinition craftingTerminal();
IItemDefinition terminal();
IItemDefinition storageMonitor();
IItemDefinition conversionMonitor();
}
@@ -0,0 +1,15 @@
package appeng.api.definitions;
import net.minecraft.tileentity.TileEntity;
import com.google.common.base.Optional;
public interface ITileDefinition extends IBlockDefinition
{
/**
* @return the {@link TileEntity} Class if applicable.
*/
Optional<? extends Class<? extends TileEntity>> maybeEntity();
}
+39 -6
View File
@@ -1,18 +1,18 @@
/*
* 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
@@ -23,55 +23,88 @@
package appeng.api.definitions;
import appeng.api.util.AEColoredItemDefinition;
import appeng.api.util.AEItemDefinition;
/**
* @deprecated use {@link IItems}
*/
@Deprecated
public class Items
{
public AEItemDefinition itemCertusQuartzAxe;
public AEItemDefinition itemCertusQuartzHoe;
public AEItemDefinition itemCertusQuartzShovel;
public AEItemDefinition itemCertusQuartzPick;
public AEItemDefinition itemCertusQuartzSword;
public AEItemDefinition itemCertusQuartzWrench;
public AEItemDefinition itemCertusQuartzKnife;
public AEItemDefinition itemNetherQuartzAxe;
public AEItemDefinition itemNetherQuartzHoe;
public AEItemDefinition itemNetherQuartzShovel;
public AEItemDefinition itemNetherQuartzPick;
public AEItemDefinition itemNetherQuartzSword;
public AEItemDefinition itemNetherQuartzWrench;
public AEItemDefinition itemNetherQuartzKnife;
public AEItemDefinition itemEntropyManipulator;
public AEItemDefinition itemWirelessTerminal;
public AEItemDefinition itemBiometricCard;
public AEItemDefinition itemChargedStaff;
public AEItemDefinition itemMassCannon;
public AEItemDefinition itemMemoryCard;
public AEItemDefinition itemNetworkTool;
public AEItemDefinition itemPortableCell;
public AEItemDefinition itemCellCreative;
public AEItemDefinition itemViewCell;
public AEItemDefinition itemCell1k;
public AEItemDefinition itemCell4k;
public AEItemDefinition itemCell16k;
public AEItemDefinition itemCell64k;
public AEItemDefinition itemSpatialCell2;
public AEItemDefinition itemSpatialCell16;
public AEItemDefinition itemSpatialCell128;
public AEItemDefinition itemFacade;
public AEItemDefinition itemCrystalSeed;
// rv1
public AEItemDefinition itemEncodedPattern;
public AEItemDefinition itemColorApplicator;
public AEColoredItemDefinition itemPaintBall;
public AEColoredItemDefinition itemLumenPaintBall;
}
@@ -1,18 +1,18 @@
/*
* 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
@@ -23,81 +23,121 @@
package appeng.api.definitions;
import appeng.api.util.AEItemDefinition;
/**
* @deprecated use {@link IMaterials}
*/
@Deprecated
public class Materials
{
public AEItemDefinition materialCell2SpatialPart;
public AEItemDefinition materialCell16SpatialPart;
public AEItemDefinition materialCell128SpatialPart;
public AEItemDefinition materialSilicon;
public AEItemDefinition materialSkyDust;
public AEItemDefinition materialCalcProcessorPress;
public AEItemDefinition materialEngProcessorPress;
public AEItemDefinition materialLogicProcessorPress;
public AEItemDefinition materialCalcProcessorPrint;
public AEItemDefinition materialEngProcessorPrint;
public AEItemDefinition materialLogicProcessorPrint;
public AEItemDefinition materialSiliconPress;
public AEItemDefinition materialSiliconPrint;
public AEItemDefinition materialNamePress;
public AEItemDefinition materialLogicProcessor;
public AEItemDefinition materialCalcProcessor;
public AEItemDefinition materialEngProcessor;
public AEItemDefinition materialBasicCard;
public AEItemDefinition materialAdvCard;
public AEItemDefinition materialPurifiedCertusQuartzCrystal;
public AEItemDefinition materialPurifiedNetherQuartzCrystal;
public AEItemDefinition materialPurifiedFluixCrystal;
public AEItemDefinition materialCell1kPart;
public AEItemDefinition materialCell4kPart;
public AEItemDefinition materialCell16kPart;
public AEItemDefinition materialCell64kPart;
public AEItemDefinition materialEmptyStorageCell;
public AEItemDefinition materialCardRedstone;
public AEItemDefinition materialCardSpeed;
public AEItemDefinition materialCardCapacity;
public AEItemDefinition materialCardFuzzy;
public AEItemDefinition materialCardInverter;
public AEItemDefinition materialCardCrafting;
public AEItemDefinition materialEnderDust;
public AEItemDefinition materialFlour;
public AEItemDefinition materialGoldDust;
public AEItemDefinition materialIronDust;
public AEItemDefinition materialFluixDust;
public AEItemDefinition materialCertusQuartzDust;
public AEItemDefinition materialNetherQuartzDust;
public AEItemDefinition materialMatterBall;
public AEItemDefinition materialIronNugget;
public AEItemDefinition materialCertusQuartzCrystal;
public AEItemDefinition materialCertusQuartzCrystalCharged;
public AEItemDefinition materialFluixCrystal;
public AEItemDefinition materialFluixPearl;
public AEItemDefinition materialWoodenGear;
public AEItemDefinition materialWireless;
public AEItemDefinition materialWirelessBooster;
public AEItemDefinition materialAnnihilationCore;
public AEItemDefinition materialFormationCore;
public AEItemDefinition materialSingularity;
public AEItemDefinition materialQESingularity;
public AEItemDefinition materialBlankPattern;
public AEItemDefinition materialQESingularity;
public AEItemDefinition materialBlankPattern;
}
+36 -6
View File
@@ -1,18 +1,18 @@
/*
* 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
@@ -23,54 +23,84 @@
package appeng.api.definitions;
import appeng.api.util.AEColoredItemDefinition;
import appeng.api.util.AEItemDefinition;
/**
* @deprecated use {@link IParts}
*/
@Deprecated
public class Parts
{
public AEColoredItemDefinition partCableSmart;
public AEColoredItemDefinition partCableCovered;
public AEColoredItemDefinition partCableGlass;
public AEColoredItemDefinition partCableDense;
public AEColoredItemDefinition partLumenCableSmart;
public AEColoredItemDefinition partLumenCableCovered;
public AEColoredItemDefinition partLumenCableGlass;
public AEColoredItemDefinition partLumenCableDense;
public AEItemDefinition partQuartzFiber;
public AEItemDefinition partToggleBus;
public AEItemDefinition partInvertedToggleBus;
public AEItemDefinition partStorageBus;
public AEItemDefinition partImportBus;
public AEItemDefinition partExportBus;
public AEItemDefinition partInterface;
public AEItemDefinition partLevelEmitter;
public AEItemDefinition partAnnihilationPlane;
public AEItemDefinition partFormationPlane;
public AEItemDefinition partP2PTunnelME;
public AEItemDefinition partP2PTunnelRedstone;
public AEItemDefinition partP2PTunnelItems;
public AEItemDefinition partP2PTunnelLiquids;
public AEItemDefinition partP2PTunnelMJ;
public AEItemDefinition partP2PTunnelEU;
public AEItemDefinition partP2PTunnelRF;
public AEItemDefinition partP2PTunnelLight;
public AEItemDefinition partCableAnchor;
public AEItemDefinition partMonitor;
public AEItemDefinition partSemiDarkMonitor;
public AEItemDefinition partDarkMonitor;
public AEItemDefinition partInterfaceTerminal;
public AEItemDefinition partPatternTerminal;
public AEItemDefinition partCraftingTerminal;
public AEItemDefinition partTerminal;
public AEItemDefinition partStorageMonitor;
public AEItemDefinition partConversionMonitor;
}
@@ -1,18 +1,18 @@
/*
* 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
@@ -23,29 +23,32 @@
package appeng.api.events;
import appeng.api.features.ILocatable;
import cpw.mods.fml.common.eventhandler.Event;
import appeng.api.features.ILocatable;
/**
* Input Event:
*
*
* Used to Notify the Location Registry of objects, and their availability.
*/
public class LocatableEventAnnounce extends Event
{
public final ILocatable target;
public final LocatableEvent change;
public LocatableEventAnnounce( ILocatable o, LocatableEvent ev )
{
this.target = o;
this.change = ev;
}
public enum LocatableEvent
{
Register, // Adds the locatable to the registry
Unregister // Removes the locatable from the registry
}
final public ILocatable target;
final public LocatableEvent change;
public LocatableEventAnnounce(ILocatable o, LocatableEvent ev) {
target = o;
change = ev;
}
}
@@ -1,18 +1,18 @@
/*
* 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
@@ -23,12 +23,14 @@
package appeng.api.exceptions;
public class AppEngException extends Exception
{
private static final long serialVersionUID = -9051434206368465494L;
public AppEngException(String t) {
public AppEngException( String t )
{
super( t );
}
}
@@ -0,0 +1,10 @@
package appeng.api.exceptions;
public class CoreInaccessibleException extends RuntimeException
{
public CoreInaccessibleException( String message )
{
super( message );
}
}
@@ -1,18 +1,18 @@
/*
* 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
@@ -23,11 +23,13 @@
package appeng.api.exceptions;
public class FailedConnection extends Exception
{
private static final long serialVersionUID = -2544208090248293753L;
public FailedConnection() {
public FailedConnection()
{
}
}
@@ -0,0 +1,10 @@
package appeng.api.exceptions;
public class MissingDefinition extends RuntimeException
{
public MissingDefinition( String message )
{
super( message );
}
}
@@ -1,18 +1,18 @@
/*
* 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
@@ -23,12 +23,14 @@
package appeng.api.exceptions;
public class MissingIngredientError extends Exception {
public class MissingIngredientError extends Exception
{
private static final long serialVersionUID = -998858343831371697L;
public MissingIngredientError(String n) {
public MissingIngredientError( String n )
{
super( n );
}
}
@@ -1,18 +1,18 @@
/*
* 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
@@ -23,13 +23,14 @@
package appeng.api.exceptions;
public class ModNotInstalled extends Exception
{
private static final long serialVersionUID = -9052435206368425494L;
public ModNotInstalled(String t) {
public ModNotInstalled( String t )
{
super( t );
}
}
@@ -1,18 +1,18 @@
/*
* 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
@@ -23,13 +23,14 @@
package appeng.api.exceptions;
public class RecipeError extends Exception
{
private static final long serialVersionUID = -6602870588617670262L;
public RecipeError(String n) {
public RecipeError( String n )
{
super( n );
}
}
@@ -1,18 +1,18 @@
/*
* 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
@@ -23,13 +23,14 @@
package appeng.api.exceptions;
public class RegistrationError extends Exception
{
private static final long serialVersionUID = -6602870588617670263L;
public RegistrationError(String n) {
public RegistrationError( String n )
{
super( n );
}
}
@@ -1,18 +1,18 @@
/*
* 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
@@ -23,8 +23,10 @@
package appeng.api.features;
import net.minecraft.item.ItemStack;
/**
* Registration Records for {@link IGrinderRegistry}
*/
@@ -33,87 +35,87 @@ public interface IGrinderEntry
/**
* the current input
*
*
* @return input that the grinder will accept.
*/
public ItemStack getInput();
ItemStack getInput();
/**
* lets you change the grinder recipe by changing its input.
*
*
* @param input input item
*/
public void setInput(ItemStack input);
void setInput( ItemStack input );
/**
* gets the current output
*
*
* @return output that the grinder will produce
*/
public ItemStack getOutput();
/**
* gets the current output
*
* @return output that the grinder will produce
*/
public ItemStack getOptionalOutput();
/**
* gets the current output
*
* @return output that the grinder will produce
*/
public ItemStack getSecondOptionalOutput();
ItemStack getOutput();
/**
* allows you to change the output.
*
*
* @param output output item
*/
public void setOutput(ItemStack output);
void setOutput( ItemStack output );
/**
* gets the current output
*
* @return output that the grinder will produce
*/
ItemStack getOptionalOutput();
/**
* gets the current output
*
* @return output that the grinder will produce
*/
ItemStack getSecondOptionalOutput();
/**
* stack, and 0.0-1.0 chance that it will be generated.
*
*
* @param output output item
* @param chance generation chance
*/
public void setOptionalOutput(ItemStack output, float chance);
void setOptionalOutput( ItemStack output, float chance );
/**
* 0.0 - 1.0 the chance that the optional output will be generated.
*
*
* @return chance of optional output
*/
public float getOptionalChance();
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
*/
public void setSecondOptionalOutput(ItemStack output, float chance);
void setSecondOptionalOutput( ItemStack output, float chance );
/**
* 0.0 - 1.0 the chance that the optional output will be generated.
*
*
* @return second optional output chance
*/
public float getSecondOptionalChance();
float getSecondOptionalChance();
/**
* Energy cost, in turns.
*
*
* @return number of turns it takes to produce the output from the input.
*/
public int getEnergyCost();
int getEnergyCost();
/**
* Allows you to adjust the number of turns
*
*
* @param c number of turns to produce output.
*/
public void setEnergyCost(int c);
void setEnergyCost( int c );
}
@@ -1,18 +1,18 @@
/*
* 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
@@ -23,10 +23,12 @@
package appeng.api.features;
import net.minecraft.item.ItemStack;
import java.util.List;
import net.minecraft.item.ItemStack;
/**
* Lets you manipulate Grinder Recipes, by adding or editing existing ones.
*/
@@ -35,50 +37,50 @@ public interface IGrinderRegistry
/**
* Current list of registered recipes, you can modify this if you want too.
*
*
* @return currentlyRegisteredRecipes
*/
public List<IGrinderEntry> getRecipes();
List<IGrinderEntry> getRecipes();
/**
* add a new recipe the easy way, in &#8594; out, how many turns., duplicates will not be added.
*
* @param in input
* @param out output
*
* @param in input
* @param out output
* @param turns amount of turns to turn the input into the output
*/
public void addRecipe(ItemStack in, ItemStack out, int turns);
void addRecipe( ItemStack in, ItemStack out, int turns );
/**
* add a new recipe with optional outputs, duplicates will not be added.
*
* @param in input
* @param out output
*
* @param in input
* @param out output
* @param optional optional output
* @param chance chance to get the optional output within 0.0 - 1.0
* @param turns amount of turns to turn the input into the outputs
* @param chance chance to get the optional output within 0.0 - 1.0
* @param turns amount of turns to turn the input into the outputs
*/
void addRecipe(ItemStack in, ItemStack out, ItemStack optional, float chance, int turns);
void addRecipe( ItemStack in, ItemStack out, ItemStack optional, float chance, int turns );
/**
* add a new recipe with optional outputs, duplicates will not be added.
*
* @param in input
* @param out output
* @param optional optional output
* @param chance chance to get the optional output within 0.0 - 1.0
*
* @param in input
* @param out output
* @param optional optional output
* @param chance chance to get the optional output within 0.0 - 1.0
* @param optional2 second optional output
* @param chance2 chance to get the second optional output within 0.0 - 1.0
* @param turns amount of turns to turn the input into the outputs
* @param chance2 chance to get the second optional output within 0.0 - 1.0
* @param turns amount of turns to turn the input into the outputs
*/
void addRecipe(ItemStack in, ItemStack out, ItemStack optional, float chance, ItemStack optional2, float chance2, int turns);
void addRecipe( ItemStack in, ItemStack out, ItemStack optional, float chance, ItemStack optional2, float chance2, int turns );
/**
* Searches for a recipe for a given input, and returns it.
*
*
* @param input input
*
* @return identified recipe or null
*/
public IGrinderEntry getRecipeForInput(ItemStack input);
IGrinderEntry getRecipeForInput( ItemStack input );
}
@@ -0,0 +1,65 @@
package appeng.api.features;
import java.util.List;
import javax.annotation.Nonnull;
import net.minecraft.item.ItemStack;
import com.google.common.base.Optional;
/**
* Registration Records for {@link IInscriberRegistry}
*
* You have to pay attention though, that recipes are not mirrored,
* where the top and bottom slots are switching places.
*
* This is applied on runtime.
*
* @author thatsIch
* @version rv2
* @since rv2
*/
public interface IInscriberRecipe
{
/**
* the current inputs
*
* @return inputs the inscriber will accept
*/
@Nonnull
List<ItemStack> getInputs();
/**
* gets the current output
*
* @return output that the recipe will produce
*/
@Nonnull
ItemStack getOutput();
/**
* gets the top optional
*
* @return item which is used top
*/
@Nonnull
Optional<ItemStack> getTopOptional();
/**
* gets the bottom optional
*
* @return item which is used bottom
*/
@Nonnull
Optional<ItemStack> getBottomOptional();
/**
* type of inscriber process
*
* @return type of process the inscriber is doing
*/
@Nonnull
InscriberProcessType getProcessType();
}
@@ -0,0 +1,88 @@
package appeng.api.features;
import java.util.Collection;
import javax.annotation.Nonnull;
import net.minecraft.item.ItemStack;
/**
* Builder for an inscriber recipe
*
* @author thatsIch
* @version rv2
* @since rv2
*/
public interface IInscriberRecipeBuilder
{
/**
* Creates an inscriber recipe with inputs.
* Needs to be invoked.
*
* @param inputs new inputs for the recipe
*
* @return currently used builder
*/
@Nonnull
IInscriberRecipeBuilder withInputs( @Nonnull Collection<ItemStack> inputs );
/**
* Creates an inscriber recipe with output.
* Needs to be invoked.
*
* @param output new output for the recipe
*
* @return currently used builder
*/
@Nonnull
IInscriberRecipeBuilder withOutput( @Nonnull ItemStack output );
/**
* Creates an inscriber recipe with top.
* Either this or bot needs to be invoked.
*
* @param topOptional new top for the recipe
*
* @return currently used builder
*/
@Nonnull
IInscriberRecipeBuilder withTopOptional( @Nonnull ItemStack topOptional );
/**
* Creates an inscriber recipe with bot.
* Either this or top needs to be invoked.
*
* @param bottomOptional new bot for the recipe
*
* @return currently used builder
*/
@Nonnull
IInscriberRecipeBuilder withBottomOptional( @Nonnull ItemStack bottomOptional );
/**
* Creates an inscriber recipe with type.
* Needs to be invoked.
*
* @param type new type for the recipe
*
* @return currently used builder
*/
@Nonnull
IInscriberRecipeBuilder withProcessType( @Nonnull InscriberProcessType type );
/**
* Finalizes the process of making the recipe.
* Needs to be invoked to fetch inscriber recipe.
*
* @return legal inscriber 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
IInscriberRecipe build();
}
@@ -0,0 +1,69 @@
package appeng.api.features;
import java.util.List;
import java.util.Set;
import javax.annotation.Nonnull;
import net.minecraft.item.ItemStack;
/**
* Lets you manipulate Inscriber Recipes, by adding or editing existing ones.
*
* @author thatsIch
* @version rv2
* @since rv2
*/
public interface IInscriberRegistry
{
/**
* Current list of registered recipes, you can modify this if you want too.
* Will never contain a null recipe
*
* @return currentlyRegisteredRecipes
*/
@Nonnull
List<IInscriberRecipe> getRecipes();
/**
* Optional items which are used in the top or bottom slot
*
* @return set of all optional items
*/
@Nonnull
Set<ItemStack> getOptionals();
/**
* Get all registered items which are valid inputs
*
* @return set of all input items
*/
@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
*
* @throws IllegalArgumentException if null is added
*/
void addRecipe( IInscriberRecipe recipe );
/**
* Removes a recipe from the registry
*
* @param toBeRemovedRecipe to be removed recipe, can be null, makes just no sense
*/
void removeRecipe( IInscriberRecipe toBeRemovedRecipe );
}
@@ -1,18 +1,18 @@
/*
* 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
@@ -23,11 +23,10 @@
package appeng.api.features;
public interface IItemComparison
{
boolean sameAsPrecise( IItemComparison comp );
public boolean sameAsPrecise(IItemComparison comp);
public boolean sameAsFuzzy(IItemComparison comp);
boolean sameAsFuzzy( IItemComparison comp );
}
@@ -1,18 +1,18 @@
/*
* 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
@@ -23,8 +23,10 @@
package appeng.api.features;
import net.minecraft.item.ItemStack;
/**
* Provider for special comparisons. when an item is encountered AE Will request
* if the comparison function handles the item, by trying to request a
@@ -36,18 +38,19 @@ public interface IItemComparisonProvider
/**
* should return a new IItemComparison, or return null if it doesn't handle
* the supplied item.
*
*
* @param is item
*
* @return IItemComparison, or null
*/
IItemComparison getComparison(ItemStack is);
IItemComparison getComparison( ItemStack is );
/**
* Simple test for support ( AE generally skips this and calls the above function. )
*
*
* @param stack item
*
* @return true, if getComparison will return a valid IItemComparison Object
*/
public boolean canHandle(ItemStack stack);
boolean canHandle( ItemStack stack );
}
@@ -1,18 +1,18 @@
/*
* 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
@@ -23,8 +23,10 @@
package appeng.api.features;
import appeng.api.events.LocatableEventAnnounce;
/**
* A registration record for the {@link ILocatableRegistry} use the {@link LocatableEventAnnounce} event on the Forge
* Event bus to update the registry.
@@ -36,5 +38,4 @@ public interface ILocatable
* @return the serial for a locatable object
*/
long getLocatableSerial();
}
@@ -1,18 +1,18 @@
/*
* 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
@@ -23,19 +23,31 @@
package appeng.api.features;
/**
* A Registry for locatable items, works based on serial numbers.
*/
public interface ILocatableRegistry
{
/**
* Attempts to find the object with the serial specified, if it can it
* returns the object.
*
*
* @param serial serial
*
* @return requestedObject, or null
*
* @deprecated use {@link ILocatableRegistry#getLocatableBy(long)}
*/
public abstract Object findLocatableBySerial(long serial);
@Deprecated
Object findLocatableBySerial( long serial );
/**
* Gets the {@link ILocatable} with the registered serial, if available
*
* @param serial serial
*
* @return requestedObject, or null, if the object does not exist anymore
*/
ILocatable getLocatableBy( long serial );
}
@@ -1,18 +1,18 @@
/*
* 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
@@ -23,25 +23,27 @@
package appeng.api.features;
import net.minecraft.item.ItemStack;
public interface IMatterCannonAmmoRegistry
{
/**
* register a new ammo, generally speaking this is based off of atomic weight to make it easier to guess at
*
* @param ammo new ammo
*
* @param ammo new ammo
* @param weight atomic weight
*/
void registerAmmo(ItemStack ammo, double weight);
void registerAmmo( ItemStack ammo, double weight );
/**
* get the penetration value for a particular ammo, 0 indicates a non-ammo.
*
*
* @param is ammo
*
* @return 0 or a valid penetration value.
*/
float getPenetration(ItemStack is);
float getPenetration( ItemStack is );
}
@@ -1,18 +1,18 @@
/*
* 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
@@ -23,28 +23,28 @@
package appeng.api.features;
import net.minecraft.item.ItemStack;
public interface INetworkEncodable {
public interface INetworkEncodable
{
/**
* Used to get the current key from the item.
*
*
* @param item item
*
* @return string key of item
*/
String getEncryptionKey(ItemStack item);
String getEncryptionKey( ItemStack item );
/**
* Encode the wireless frequency via the Controller.
*
* @param item
* the wireless terminal.
* @param encKey
* the wireless encryption key.
* @param name
* null for now.
*
* @param item the wireless terminal.
* @param encKey the wireless encryption key.
* @param name null for now.
*/
void setEncryptionKey(ItemStack item, String encKey, String name);
void setEncryptionKey( ItemStack item, String encKey, String name );
}
@@ -1,18 +1,18 @@
/*
* 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
@@ -23,9 +23,12 @@
package appeng.api.features;
import net.minecraft.item.ItemStack;
import appeng.api.config.TunnelType;
/**
* A Registry for how p2p Tunnels are attuned
*/
@@ -35,20 +38,18 @@ public interface IP2PTunnelRegistry
/**
* Allows third parties to register items from their mod as potential
* attunements for AE's P2P Tunnels
*
* @param trigger
* - the item which triggers attunement
* @param type
* - the type of tunnel
*
* @param trigger - the item which triggers attunement
* @param type - the type of tunnel
*/
public abstract void addNewAttunement(ItemStack trigger, TunnelType type);
void addNewAttunement( ItemStack trigger, TunnelType type );
/**
* returns null if no attunement can be found.
*
*
* @param trigger attunement trigger
*
* @return null if no attunement can be found or attunement
*/
TunnelType getTunnelTypeByItem(ItemStack trigger);
TunnelType getTunnelTypeByItem( ItemStack trigger );
}
@@ -1,18 +1,18 @@
/*
* 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
@@ -23,10 +23,12 @@
package appeng.api.features;
import net.minecraft.entity.player.EntityPlayer;
import com.mojang.authlib.GameProfile;
/**
* Maintains a save specific list of userids and username combinations this greatly simplifies storage internally and
* gives a common place to look up and get IDs for the security framework.
@@ -36,20 +38,22 @@ public interface IPlayerRegistry
/**
* @param gameProfile user game profile
*
* @return user id of a username.
*/
int getID(GameProfile gameProfile);
int getID( GameProfile gameProfile );
/**
* @param player player
*
* @return user id of a player entity.
*/
int getID(EntityPlayer player);
int getID( EntityPlayer player );
/**
* @param playerID to be found player id
*
* @return PlayerEntity, or null if the player could not be found.
*/
EntityPlayer findPlayer(int playerID);
EntityPlayer findPlayer( int playerID );
}
@@ -1,18 +1,18 @@
/*
* 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
@@ -23,50 +23,53 @@
package appeng.api.features;
import appeng.api.recipes.ICraftHandler;
import appeng.api.recipes.IRecipeHandler;
import appeng.api.recipes.ISubItemResolver;
public interface IRecipeHandlerRegistry
{
/**
* Add a new Recipe Handler to the parser.
*
*
* MUST BE CALLED IN PRE-INIT
*
* @param name name of crafthandler
*
* @param name name of crafthandler
* @param handler class of crafthandler
*/
void addNewCraftHandler(String name, Class<? extends ICraftHandler> handler);
void addNewCraftHandler( String name, Class<? extends ICraftHandler> handler );
/**
* Add a new resolver to the parser.
*
*
* MUST BE CALLED IN PRE-INIT
*
*
* @param sir sub item resolver
*/
void addNewSubItemResolver(ISubItemResolver sir);
void addNewSubItemResolver( ISubItemResolver sir );
/**
* @param name name of crafting handler
*
* @return A recipe handler by name, returns null on failure.
*/
ICraftHandler getCraftHandlerFor(String name);
ICraftHandler getCraftHandlerFor( String name );
/**
* @return a new recipe handler, which can be used to parse, and read recipe files.
*/
public IRecipeHandler createNewRecipehandler();
IRecipeHandler createNewRecipehandler();
/**
* resolve sub items by name.
*
*
* @param nameSpace namespace of item
* @param itemName full name of item
* @param itemName full name of item
*
* @return ResolverResult or ResolverResultSet
*/
Object resolveItem(String nameSpace, String itemName);
Object resolveItem( String nameSpace, String itemName );
}
@@ -1,18 +1,18 @@
/*
* 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
@@ -23,11 +23,19 @@
package appeng.api.features;
import appeng.api.movable.IMovableRegistry;
import appeng.api.networking.IGridCacheRegistry;
import appeng.api.storage.ICellRegistry;
import appeng.api.storage.IExternalStorageRegistry;
/**
* @author AlgorithmX2
* @author thatsIch
* @version rv2
* @since rv0
*/
public interface IRegistryContainer
{
@@ -67,6 +75,11 @@ public interface IRegistryContainer
*/
IGrinderRegistry grinder();
/**
* Manage inscriber recipes via API
*/
IInscriberRegistry inscriber();
/**
* get access to the locatable registry
*/
@@ -1,18 +1,18 @@
/*
* 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
@@ -23,28 +23,29 @@
package appeng.api.features;
import net.minecraft.item.ItemStack;
/**
* A Registry of any special comparison handlers for AE To use.
*
*/
public interface ISpecialComparisonRegistry
{
/**
* return TheHandler or null.
*
*
* @param stack item
*
* @return a handler it found for a specific item
*/
IItemComparison getSpecialComparison(ItemStack stack);
IItemComparison getSpecialComparison( ItemStack stack );
/**
* Register a new special comparison function with AE.
*
*
* @param prov comparison provider
*/
public void addComparisonProvider(IItemComparisonProvider prov);
void addComparisonProvider( IItemComparisonProvider prov );
}
@@ -1,18 +1,18 @@
/*
* 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
@@ -23,10 +23,13 @@
package appeng.api.features;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import appeng.api.util.IConfigManager;
/**
* A handler for a wireless terminal.
*/
@@ -35,35 +38,37 @@ public interface IWirelessTermHandler extends INetworkEncodable
/**
* @param is wireless terminal
*
* @return true, if usePower, hasPower, etc... can be called for the provided item
*/
boolean canHandle(ItemStack is);
boolean canHandle( ItemStack is );
/**
* use an amount of power, in AE units
*
* @param amount
* is in AE units ( 5 per MJ ), if you return false, the item should be dead and return false for
* hasPower
* @param is wireless terminal
*
* @param amount is in AE units ( 5 per MJ ), if you return false, the item should be dead and return false for
* hasPower
* @param is wireless terminal
*
* @return true if wireless terminal uses power
*/
boolean usePower(EntityPlayer player, double amount, ItemStack is);
boolean usePower( EntityPlayer player, double amount, ItemStack is );
/**
* gets the power status of the item.
*
*
* @param is wireless terminal
*
* @return returns true if there is any power left.
*/
boolean hasPower(EntityPlayer player, double amount, ItemStack is);
boolean hasPower( EntityPlayer player, double amount, ItemStack is );
/**
* Return the config manager for the wireless terminal.
*
*
* @param is wireless terminal
*
* @return config manager of wireless terminal
*/
IConfigManager getConfigManager(ItemStack is);
IConfigManager getConfigManager( ItemStack is );
}
@@ -1,18 +1,18 @@
/*
* 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
@@ -23,10 +23,12 @@
package appeng.api.features;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
/**
* Registration record for a Custom Cell handler.
*/
@@ -35,28 +37,29 @@ public interface IWirelessTermRegistry
/**
* add this handler to the list of other wireless handler.
*
*
* @param handler wireless handler
*/
void registerWirelessHandler(IWirelessTermHandler handler);
void registerWirelessHandler( IWirelessTermHandler handler );
/**
* @param is item which might have a handler
*
* @return true if there is a handler for this item
*/
boolean isWirelessTerminal(ItemStack is);
boolean isWirelessTerminal( ItemStack is );
/**
* @param is item with handler
*
* @return a register handler for the item in question, or null if there
* isn't one
* isn't one
*/
IWirelessTermHandler getWirelessTerminalHandler(ItemStack is);
IWirelessTermHandler getWirelessTerminalHandler( ItemStack is );
/**
* opens the wireless terminal gui, the wireless terminal item, must be in
* the active slot on the tool bar.
*/
void openWirelessTerminalGui(ItemStack item, World w, EntityPlayer player);
void openWirelessTerminalGui( ItemStack item, World w, EntityPlayer player );
}
+15 -14
View File
@@ -1,18 +1,18 @@
/*
* 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
@@ -23,23 +23,24 @@
package appeng.api.features;
import net.minecraft.world.World;
import net.minecraft.world.WorldProvider;
public interface IWorldGen
{
public enum WorldGenType
void disableWorldGenForProviderID( WorldGenType type, Class<? extends WorldProvider> provider );
void enableWorldGenForDimension( WorldGenType type, int dimID );
void disableWorldGenForDimension( WorldGenType type, int dimID );
boolean isWorldGenEnabled( WorldGenType type, World w );
enum WorldGenType
{
CertusQuartz, ChargedCertusQuartz, Meteorites
}
public void disableWorldGenForProviderID(WorldGenType type, Class<? extends WorldProvider> provider);
public void enableWorldGenForDimension(WorldGenType type, int dimID);
public void disableWorldGenForDimension(WorldGenType type, int dimID);
boolean isWorldGenEnabled(WorldGenType type, World w);
}
@@ -0,0 +1,15 @@
package appeng.api.features;
public enum InscriberProcessType
{
/**
* uses the optionals as catalyst
*/
Inscribe,
/**
* spends the optionals
*/
Press
}
@@ -1,18 +1,18 @@
/*
* 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
@@ -23,11 +23,14 @@
package appeng.api.implementations;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import appeng.api.networking.crafting.ICraftingPatternDetails;
/**
* Implemented on {@link Item}
*/
@@ -36,10 +39,11 @@ public interface ICraftingPatternItem
/**
* Access Details about a pattern
*
*
* @param is pattern
* @param w crafting world
* @param w crafting world
*
* @return details of pattern
*/
ICraftingPatternDetails getPatternForItem(ItemStack is, World w);
ICraftingPatternDetails getPatternForItem( ItemStack is, World w );
}
@@ -1,18 +1,18 @@
/*
* 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
@@ -23,6 +23,7 @@
package appeng.api.implementations;
/**
* This is intended for use on the client side to provide details to WAILA.
*/
@@ -38,5 +39,4 @@ public interface IPowerChannelState
* @return true if the part/tile isActive
*/
boolean isActive();
}
@@ -1,18 +1,18 @@
/*
* 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
@@ -23,10 +23,13 @@
package appeng.api.implementations;
import appeng.api.util.IConfigurableObject;
import net.minecraft.tileentity.TileEntity;
import appeng.api.config.Upgrades;
import appeng.api.implementations.tiles.ISegmentedInventory;
import appeng.api.util.IConfigurableObject;
public interface IUpgradeableHost extends IConfigurableObject, ISegmentedInventory
{
@@ -34,13 +37,12 @@ public interface IUpgradeableHost extends IConfigurableObject, ISegmentedInvento
/**
* determine how many of an upgrade are installed.
*/
int getInstalledUpgrades(Upgrades u);
int getInstalledUpgrades( Upgrades u );
/**
* the tile...
*
*
* @return tile entity
*/
TileEntity getTile();
}
@@ -1,18 +1,18 @@
/*
* 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
@@ -23,6 +23,7 @@
package appeng.api.implementations;
/**
* Defines the result of performing a transition from the world into a storage
* cell, if its possible, and what the energy usage is.
@@ -32,8 +33,9 @@ public class TransitionResult
public final boolean success;
public final double energyUsage;
public TransitionResult(boolean _success, double power) {
success = _success;
energyUsage = power;
public TransitionResult( boolean _success, double power )
{
this.success = _success;
this.energyUsage = power;
}
}
@@ -1,18 +1,18 @@
/*
* 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
@@ -23,9 +23,11 @@
package appeng.api.implementations.guiobjects;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
/**
* Implemented on Item objects, to return objects used to manage, and interact
* with the contents.
@@ -33,6 +35,5 @@ import net.minecraft.world.World;
public interface IGuiItem
{
IGuiItemObject getGuiObject(ItemStack is, World world, int x, int y, int z);
IGuiItemObject getGuiObject( ItemStack is, World world, int x, int y, int z );
}
@@ -1,18 +1,18 @@
/*
* 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
@@ -23,10 +23,12 @@
package appeng.api.implementations.guiobjects;
import net.minecraft.item.ItemStack;
public interface IGuiItemObject
{
public ItemStack getItemStack();
ItemStack getItemStack();
}
@@ -1,18 +1,18 @@
/*
* 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
@@ -23,9 +23,12 @@
package appeng.api.implementations.guiobjects;
import net.minecraft.inventory.IInventory;
import appeng.api.networking.IGridHost;
/**
* Obtained via {@link IGuiItem} getGuiObject
*/
@@ -33,5 +36,4 @@ public interface INetworkTool extends IInventory, IGuiItemObject
{
IGridHost getGridHost(); // null for most purposes.
}
@@ -1,18 +1,18 @@
/*
* 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
@@ -23,11 +23,13 @@
package appeng.api.implementations.guiobjects;
import appeng.api.networking.energy.IEnergySource;
import appeng.api.storage.IMEMonitor;
import appeng.api.storage.ITerminalHost;
import appeng.api.storage.data.IAEItemStack;
/**
* Obtained via {@link IGuiItem} getGuiObject
*/
@@ -1,18 +1,18 @@
/*
* 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
@@ -23,10 +23,13 @@
package appeng.api.implementations.items;
import net.minecraft.item.ItemStack;
import appeng.api.config.AccessRestriction;
import appeng.api.networking.energy.IAEPowerStorage;
/**
* Basically the same as {@link IAEPowerStorage}, but for items.
*/
@@ -36,36 +39,36 @@ public interface IAEItemPowerStorage
/**
* Inject amt, power into the device, it will store what it can, and return
* the amount unable to be stored.
*
*
* @return amount unable to be stored
*/
public double injectAEPower(ItemStack is, double amt);
double injectAEPower( ItemStack is, double amt );
/**
* Attempt to extract power from the device, it will extract what it can and
* return it.
*
*
* @param amt to be extracted power from device
*
* @return what it could extract
*/
public double extractAEPower(ItemStack is, double amt);
double extractAEPower( ItemStack is, double amt );
/**
* @return the current maximum power ( this can change :P )
*/
public double getAEMaxPower(ItemStack is);
double getAEMaxPower( ItemStack is );
/**
* @return the current AE Power Level, this may exceed getMEMaxPower()
*/
public double getAECurrentPower(ItemStack is);
double getAECurrentPower( ItemStack is );
/**
* Control the power flow by telling what the network can do, either add? or
* subtract? or both!
*
*
* @return access restriction of network
*/
public AccessRestriction getPowerFlow(ItemStack is);
AccessRestriction getPowerFlow( ItemStack is );
}
@@ -1,18 +1,18 @@
/*
* 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
@@ -23,9 +23,11 @@
package appeng.api.implementations.items;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
/**
* Implemented on AE's wrench(s) as a substitute for if BC's API is not
* available.
@@ -35,14 +37,13 @@ public interface IAEWrench
/**
* Check if the wrench can be used.
*
*
* @param player wrenching player
* @param x x pos of wrenched block
* @param y y pos of wrenched block
* @param z z pos of wrenched block
* @param x x pos of wrenched block
* @param y y pos of wrenched block
* @param z z pos of wrenched block
*
* @return true if wrench can be used
*/
boolean canWrench(ItemStack wrench, EntityPlayer player, int x, int y, int z);
boolean canWrench( ItemStack wrench, EntityPlayer player, int x, int y, int z );
}
@@ -1,18 +1,18 @@
/*
* 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
@@ -23,13 +23,17 @@
package appeng.api.implementations.items;
import java.util.EnumSet;
import net.minecraft.item.ItemStack;
import com.mojang.authlib.GameProfile;
import appeng.api.config.SecurityPermissions;
import appeng.api.features.IPlayerRegistry;
import appeng.api.networking.security.ISecurityRegistry;
import com.mojang.authlib.GameProfile;
import net.minecraft.item.ItemStack;
import java.util.EnumSet;
public interface IBiometricCard
{
@@ -37,50 +41,51 @@ public interface IBiometricCard
/**
* Set the {@link GameProfile} to null, to clear it.
*/
void setProfile(ItemStack itemStack, GameProfile username);
void setProfile( ItemStack itemStack, GameProfile username );
/**
* @return {@link GameProfile} of the player encoded on this card, or a blank string.
*/
GameProfile getProfile(ItemStack is);
GameProfile getProfile( ItemStack is );
/**
* @param itemStack card
*
* @return the full list of permissions encoded on the card.
*/
EnumSet<SecurityPermissions> getPermissions(ItemStack itemStack);
EnumSet<SecurityPermissions> getPermissions( ItemStack itemStack );
/**
* Check if a permission is encoded on the card.
*
*
* @param permission card
*
* @return true if this permission is set on the card.
*/
boolean hasPermission(ItemStack is, SecurityPermissions permission);
boolean hasPermission( ItemStack is, SecurityPermissions permission );
/**
* remove a permission from the item stack.
*
* @param itemStack card
*
* @param itemStack card
* @param permission to be removed permission
*/
void removePermission(ItemStack itemStack, SecurityPermissions permission);
void removePermission( ItemStack itemStack, SecurityPermissions permission );
/**
* add a permission to the item stack.
*
* @param itemStack card
*
* @param itemStack card
* @param permission to be added permission
*/
void addPermission(ItemStack itemStack, SecurityPermissions permission);
void addPermission( ItemStack itemStack, SecurityPermissions permission );
/**
* lets you handle submission of security values on the card for custom behavior.
*
*
* @param registry security registry
* @param pr player registry
* @param is card
* @param pr player registry
* @param is card
*/
void registerPermissions(ISecurityRegistry registry, IPlayerRegistry pr, ItemStack is);
void registerPermissions( ISecurityRegistry registry, IPlayerRegistry pr, ItemStack is );
}
@@ -1,18 +1,18 @@
/*
* 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
@@ -23,15 +23,16 @@
package appeng.api.implementations.items;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.item.ItemStack;
public interface IGrowableCrystal
{
ItemStack triggerGrowth(ItemStack is);
float getMultiplier(Block blk, Material mat);
ItemStack triggerGrowth( ItemStack is );
float getMultiplier( Block blk, Material mat );
}
@@ -1,18 +1,18 @@
/*
* 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
@@ -23,10 +23,12 @@
package appeng.api.implementations.items;
import net.minecraft.item.ItemStack;
import java.util.Set;
import net.minecraft.item.ItemStack;
/**
* Lets you specify the name of the group of items this falls under.
*/
@@ -35,10 +37,10 @@ public interface IItemGroup
/**
* returning null, is the same as not implementing the interface at all.
*
*
* @param is item
*
* @return an unlocalized string to use for the items group name.
*/
String getUnlocalizedGroupName(Set<ItemStack> otherItems, ItemStack is);
String getUnlocalizedGroupName( Set<ItemStack> otherItems, ItemStack is );
}
@@ -1,18 +1,18 @@
/*
* 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
@@ -23,13 +23,15 @@
package appeng.api.implementations.items;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
/**
* Memory Card API
*
*
* AE's Memory Card Item Class implements this interface.
*/
public interface IMemoryCard
@@ -38,42 +40,39 @@ public interface IMemoryCard
/**
* Configures the data stored on the memory card, the SettingsName, will be
* localized when displayed.
*
* @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 is item
* @param SettingsName unlocalized string that represents the tile entity.
* @param data may contain a String called "tooltip" which is is a
* unlocalized string displayed after the settings name, optional
* but can be used to add details to the card for later.
*/
void setMemoryCardContents(ItemStack is, String SettingsName, NBTTagCompound data);
void setMemoryCardContents( ItemStack is, String SettingsName, NBTTagCompound data );
/**
* returns the settings name provided by a previous call to
* setMemoryCardContents, or "AppEng.GuiITooltip.Blank" if there was no
* previous call to setMemoryCardContents.
*
*
* @param is item
*
* @return setting name
*/
String getSettingsName(ItemStack is);
String getSettingsName( ItemStack is );
/**
* @param is item
*
* @return the NBT Data previously saved by setMemoryCardContents, or an
* empty NBTCompound
* empty NBTCompound
*/
NBTTagCompound getData(ItemStack is);
NBTTagCompound getData( ItemStack is );
/**
* notify the user of a outcome related to the memory card.
*
* @param player
* that used the card.
* @param msg
* which message to send.
*
* @param player that used the card.
* @param msg which message to send.
*/
void notifyUser(EntityPlayer player, MemoryCardMessages msg);
void notifyUser( EntityPlayer player, MemoryCardMessages msg );
}
@@ -1,18 +1,18 @@
/*
* 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
@@ -23,12 +23,15 @@
package appeng.api.implementations.items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import appeng.api.implementations.TransitionResult;
import appeng.api.util.WorldCoord;
/**
* Implemented on a {@link Item}
*/
@@ -37,56 +40,62 @@ public interface ISpatialStorageCell
/**
* @param is spatial storage cell
*
* @return true if this item is a spatial storage cell
*/
boolean isSpatialStorage(ItemStack is);
boolean isSpatialStorage( ItemStack is );
/**
* @param is spatial storage cell
*
* @return the maximum size of the spatial storage cell along any given axis
*/
int getMaxStoredDim(ItemStack is);
int getMaxStoredDim( ItemStack is );
/**
* @param is spatial storage cell
*
* @return the world for this cell
*/
World getWorld(ItemStack is);
World getWorld( ItemStack is );
/**
* get the currently stored size.
*
*
* @param is spatial storage cell
*
* @return size of spatial
*/
WorldCoord getStoredSize(ItemStack is);
WorldCoord getStoredSize( ItemStack is );
/**
* Minimum coordinates in its world for the storage cell.
*
*
* @param is spatial storage cell
*
* @return minimum coordinate of dimension
*/
WorldCoord getMin(ItemStack is);
WorldCoord getMin( ItemStack is );
/**
* Maximum coordinates in its world for the storage cell.
*
*
* @param is spatial storage cell
*
* @return maximum coordinate of dimension
*/
WorldCoord getMax(ItemStack is);
WorldCoord getMax( ItemStack is );
/**
* Perform a spatial swap with the contents of the cell, and the world.
*
* @param is spatial storage cell
* @param w world of spatial
* @param min min coord
* @param max max coord
*
* @param is spatial storage cell
* @param w world of spatial
* @param min min coord
* @param max max coord
* @param doTransition transition
*
* @return result of transition
*/
TransitionResult doSpatialTransition(ItemStack is, World w, WorldCoord min, WorldCoord max, boolean doTransition);
TransitionResult doSpatialTransition( ItemStack is, World w, WorldCoord min, WorldCoord max, boolean doTransition );
}
@@ -1,18 +1,18 @@
/*
* 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
@@ -23,20 +23,22 @@
package appeng.api.implementations.items;
import net.minecraft.item.ItemStack;
import appeng.api.storage.ICellWorkbenchItem;
import appeng.api.storage.data.IAEItemStack;
/**
* Any item which implements this can be treated as an IMEInventory via
* Util.getCell / Util.isCell It automatically handles the internals and NBT
* data, which is both nice, and bad for you!
*
*
* Good cause it means you don't have to do anything, bad because you have
* little to no control over it.
*
*
* The standard AE implementation only provides 1-63 Types
*
*/
public interface IStorageCell extends ICellWorkbenchItem
{
@@ -44,59 +46,76 @@ public interface IStorageCell extends ICellWorkbenchItem
/**
* It wont work if the return is not a multiple of 8.
* The limit is ({@link Integer#MAX_VALUE} + 1) / 8.
*
*
* @param cellItem item
*
* @return number of bytes
*/
int getBytes(ItemStack cellItem);
int getBytes( ItemStack cellItem );
/**
* Determines the number of bytes used for any type included on the cell.
*
*
* @param cellItem item
*
* @return number of bytes
*
* @deprecated use {@link IStorageCell#getBytesPerType(ItemStack)}
*/
@Deprecated
int BytePerType( ItemStack cellItem );
/**
* Determines the number of bytes used for any type included on the cell.
*
* @param cellItem item
*
* @return number of bytes
*/
int BytePerType(ItemStack cellItem);
int getBytesPerType( ItemStack cellItem );
/**
* Must be between 1 and 63, indicates how many types you want to store on
* the item.
*
*
* @param cellItem item
*
* @return number of types
*/
int getTotalTypes(ItemStack cellItem);
int getTotalTypes( ItemStack cellItem );
/**
* Allows you to fine tune which items are allowed on a given cell, if you
* don't care, just return false; As the handler for this type of cell is
* still the default cells, the normal AE black list is also applied.
*
* @param cellItem item
*
* @param cellItem item
* @param requestedAddition requested addition
*
* @return true to preventAdditionOfItem
*/
boolean isBlackListed(ItemStack cellItem, IAEItemStack requestedAddition);
boolean isBlackListed( ItemStack cellItem, IAEItemStack requestedAddition );
/**
* Allows you to specify if this storage cell can be stored inside other
* storage cells, only set this for special items like the matter cannon
* that are not general purpose storage.
*
*
* @return true if the storage cell can be stored inside other storage
* cells, this is generally false, except for certain situations
* such as the matter cannon.
* cells, this is generally false, except for certain situations
* such as the matter cannon.
*/
boolean storableInStorageCell();
/**
* Allows an item to selectively enable or disable its status as a storage
* cell.
*
*
* @param i item
*
* @return if the ItemStack should behavior as a storage cell.
*/
boolean isStorageCell(ItemStack i);
boolean isStorageCell( ItemStack i );
/**
* @return drain in ae/t this storage cell will use.
@@ -1,18 +1,18 @@
/*
* 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
@@ -23,9 +23,11 @@
package appeng.api.implementations.items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
/**
* Implemented on a {@link Item}
*/
@@ -36,18 +38,19 @@ public interface IStorageComponent
* This isn't necessarily the same as if you make a storage cell out of it,
* but all of AE's default cells do it that way, its currently only used for
* the condenser.
*
*
* @param is item
*
* @return number of bytes
*/
int getBytes(ItemStack is);
int getBytes( ItemStack is );
/**
* Just true or false for the item stack.
*
*
* @param is item
*
* @return true if item is a storage component
*/
boolean isStorageComponent(ItemStack is);
boolean isStorageComponent( ItemStack is );
}
@@ -1,18 +1,18 @@
/*
* 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
@@ -23,16 +23,19 @@
package appeng.api.implementations.items;
import net.minecraft.item.ItemStack;
import appeng.api.config.Upgrades;
public interface IUpgradeModule
{
/**
* @param itemstack item with potential upgrades
*
* @return null, or a valid upgrade type.
*/
Upgrades getType(ItemStack itemstack);
Upgrades getType( ItemStack itemstack );
}
@@ -1,18 +1,18 @@
/*
* 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
@@ -23,6 +23,7 @@
package appeng.api.implementations.items;
/**
* Status Results for use with {@link IMemoryCard}
*/
@@ -1,18 +1,18 @@
/*
* 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
@@ -23,16 +23,19 @@
package appeng.api.implementations.parts;
import java.util.EnumSet;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraftforge.common.util.ForgeDirection;
import appeng.api.networking.IGridHost;
import appeng.api.parts.BusSupport;
import appeng.api.parts.IPart;
import appeng.api.parts.IPartHost;
import appeng.api.util.AECableType;
import appeng.api.util.AEColor;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraftforge.common.util.ForgeDirection;
import java.util.EnumSet;
/**
* Implemented on the {@link IPart}s cable objects that can be placed at {@link ForgeDirection}.UNKNOWN in
@@ -58,27 +61,28 @@ public interface IPartCable extends IPart, IGridHost
/**
* Change the color of the cable, this should cost a small amount of dye, or something.
*
*
* @param newColor new color
*
* @return if the color change was successful.
*/
boolean changeColor(AEColor newColor, EntityPlayer who);
boolean changeColor( AEColor newColor, EntityPlayer who );
/**
* Change sides on the cables node.
*
*
* Called by AE, do not invoke.
*
*
* @param sides sides of cable
*/
void setValidSides(EnumSet<ForgeDirection> sides);
void setValidSides( EnumSet<ForgeDirection> sides );
/**
* used to tests if a cable connects to neighbors visually.
*
*
* @param side neighbor side
*
* @return true if this side is currently connects to an external block.
*/
boolean isConnected(ForgeDirection side);
boolean isConnected( ForgeDirection side );
}

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