Compare commits

...

159 Commits

Author SHA1 Message Date
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
thatsIch 02e59faa59 Remove comment 2014-12-29 23:02:48 +01:00
thatsIch a23a8ed165 Merge pull request #657 from yueh/organize-imports
Organize imports
2014-12-29 22:16:24 +01:00
yueh 9b7b0fc0fb Organize imports 2014-12-29 21:59:05 +01:00
thatsIch ddf71c5072 Merge pull request #611 from TheJulianJES/Log-Fix
Better log output at AE2 starting
2014-12-29 21:54:34 +01:00
thatsIch 2b34ba5840 Merge pull request #652 from thatsIch/b-644-NPE-on-disabled-features
Fixes #644 Several missing null checks when disabling huge chunks of the mod via config
2014-12-29 20:20:38 +01:00
thatsIch 3554b5f48d Fixes #644 Several missing null checks when disabling huge chunks of the mod via config 2014-12-29 17:58:19 +01:00
thatsIch eb74fb33b8 Merge pull request #653 from yueh/qualified-this
Changed access to use this qualifier
2014-12-29 15:44:27 +01:00
yueh f471513bd0 Changed access to use this qualifier 2014-12-29 15:13:47 +01:00
thatsIch 2a5e57a59b Merge pull request #642 from Adaptivity/patch-1
Update ru_RU.lang
2014-12-28 23:45:57 +01:00
Anton e37d9099c7 Update ru_RU.lang 2014-12-28 22:24:53 +03:00
thatsIch e712a9d8ce Merge pull request #640 from thatsIch/b-639-crash-on-disabled-channels
Fixes #639 Missing null check for people with disabled channels
2014-12-28 18:38:56 +01:00
thatsIch 0cb58b4d93 Fixes #639 Missing null check for people with disabled channels 2014-12-28 18:00:04 +01:00
TheJulianJES 20ccf65906 Better output log of starting
thatsIch wanted it ;)
2014-12-21 12:18:53 +01:00
980 changed files with 21135 additions and 18221 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
# Applied Energistics 2 # Applied Energistics 2
## Table of Content ## Table of Contents
* [About](#about) * [About](#about)
* [Contacts](#contacts) * [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. 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. 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 ## Downloads
+1
View File
@@ -79,6 +79,7 @@ jar {
minecraft { minecraft {
version = config.minecraft_version + "-" + config.forge_version version = config.minecraft_version + "-" + config.forge_version
replaceIn "AEConfig.java"
replace "@version@", project.version replace "@version@", project.version
replace "@aechannel@", config.aechannel replace "@aechannel@", config.aechannel
+9 -9
View File
@@ -8,17 +8,17 @@ archivesBaseName=appliedenergistics2
# Versions # # Versions #
######################################################### #########################################################
minecraft_version=1.7.10 minecraft_version=1.7.10
forge_version=10.13.2.1230 forge_version=10.13.2.1291
######################################################### #########################################################
# APIs used for development # # APIs used for development #
######################################################### #########################################################
cb_minecraft_version=1.7.10 cb_minecraft_version=1.7.10
fmp_version=1.1.0.311 fmp_version=1.1.1.324
code_chicken_lib_version=1.1.1.105 code_chicken_lib_version=1.1.3.127
code_chicken_core_version=1.0.4.29 code_chicken_core_version=1.0.4.35
nei_version=1.0.3.66 nei_version=1.0.4.90
waila_version=1.5.5_1.7.10 bc_version=6.4.3
######################################################### #########################################################
# API Stubs # # API Stubs #
@@ -32,10 +32,10 @@ api_craftguide_version=1
api_ic2_version=1 api_ic2_version=1
api_immibis_version=1 api_immibis_version=1
api_invtweaks_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_mfr_version=1
api_railcraft_version=1 api_railcraft_version=1
api_rblocks_version=1 api_rblocks_version=1
api_rf_version=2 api_rf_version=2
api_rotarycraft_version=1 api_rotarycraft_version=V5c
dev_buildcraft_version=1 api_waila_version=1.5.10_1.7.10
-22
View File
@@ -10,25 +10,3 @@ task copyChicken(type: Copy, dependsOn: "extractUserDev") {
} }
tasks.setupDevWorkspace.dependsOn copyChicken tasks.setupDevWorkspace.dependsOn copyChicken
tasks.setupDecompWorkspace.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
+5 -7
View File
@@ -43,24 +43,22 @@ dependencies {
compile "codechicken:CodeChickenCore:${config.cb_minecraft_version}-${config.code_chicken_core_version}:dev" 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 "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: 'betterstorage', version: "${config.api_betterstorage_version}")
compile(group: 'api', name: 'coloredlightscore', version: "${config.api_coloredlightscore_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: 'craftguide', version: "${config.api_craftguide_version}")
compile(group: 'api', name: 'ic2', version: "${config.api_ic2_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: 'immibis', version: "${config.api_immibis_version}")
compile(group: 'api', name: 'invtweaks', version: "${config.api_invtweaks_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: 'mekanism', version: "${config.api_mekansim_version}", classifier: 'api')
compile(group: 'api', name: 'mfr', version: "${config.api_mfr_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: 'railcraft', version: "${config.api_railcraft_version}")
compile(group: 'api', name: 'rblocks', version: "${config.api_rblocks_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: 'rf', version: "${config.api_rf_version}")
compile(group: 'api', name: 'rotarycraft', version: "${config.api_rotarycraft_version}") compile "appeng:Waila:${config.api_waila_version}:api"
compile(group: 'dev', name: 'buildcraft', version: "${config.dev_buildcraft_version}") compile "appeng:RotaryCraft:${config.api_rotarycraft_version}:api"
// add hacked buildcraft jar to compile time (for facades)
compile fileTree(dir: 'libs', include: '*.jar')
testCompile "junit:junit:4.11" testCompile "junit:junit:4.11"
} }
+2 -2
View File
@@ -38,7 +38,7 @@ public class AEApi
/** /**
* API Entry Point. * API Entry Point.
* *
* @return the {@link IAppEngApi} or null if the instance could not be retrieved * @return the {@link IAppEngApi} or null if the INSTANCE could not be retrieved
*/ */
public static IAppEngApi instance() public static IAppEngApi instance()
{ {
@@ -47,7 +47,7 @@ public class AEApi
try try
{ {
Class c = Class.forName( "appeng.core.Api" ); Class c = Class.forName( "appeng.core.Api" );
api = (IAppEngApi) c.getField( "instance" ).get( c ); api = (IAppEngApi) c.getField( "INSTANCE" ).get( c );
} }
catch (Throwable e) catch (Throwable e)
{ {
@@ -29,28 +29,28 @@ public enum AccessRestriction
private final int permissionBit; private final int permissionBit;
private AccessRestriction(int v) { AccessRestriction( int v ) {
permissionBit = 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) public AccessRestriction addPermissions(AccessRestriction ar)
{ {
return getPermByBit( permissionBit | ar.permissionBit); return this.getPermByBit( this.permissionBit | ar.permissionBit);
} }
public AccessRestriction removePermissions(AccessRestriction ar) public AccessRestriction removePermissions(AccessRestriction ar)
{ {
return getPermByBit( permissionBit & (~ar.permissionBit) ); return this.getPermByBit( this.permissionBit & (~ar.permissionBit) );
} }
private AccessRestriction getPermByBit(int bit) private AccessRestriction getPermByBit(int bit)
@@ -31,14 +31,14 @@ public enum FuzzyMode
final public float breakPoint; final public float breakPoint;
final public float percentage; final public float percentage;
private FuzzyMode(float p) { FuzzyMode( float p ) {
percentage = p; this.percentage = p;
breakPoint = p / 100.0f; 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);
} }
} }
@@ -34,11 +34,11 @@ public enum PowerMultiplier
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;
} }
} }
@@ -32,8 +32,8 @@ public enum PowerUnits
RF("gui.appliedenergistics2.units.thermalexpansion"), // ThermalExpansion - Redstone Flux RF("gui.appliedenergistics2.units.thermalexpansion"), // ThermalExpansion - Redstone Flux
MK("gui.appliedenergistics2.units.mekanism"); // Mekanism - Joules MK("gui.appliedenergistics2.units.mekanism"); // Mekanism - Joules
private PowerUnits(String un) { PowerUnits( String un ) {
unlocalizedName = un; this.unlocalizedName = un;
} }
/** /**
@@ -59,7 +59,7 @@ public enum PowerUnits
*/ */
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;
} }
} }
@@ -56,15 +56,15 @@ public enum SecurityPermissions
*/ */
SECURITY; SECURITY;
final private String unlocalizedName = "gui.appliedenergistics2.security." + name().toLowerCase(); final private String unlocalizedName = "gui.appliedenergistics2.security." + this.name().toLowerCase();
public String getUnlocalizedName() public String getUnlocalizedName()
{ {
return unlocalizedName + ".name"; return this.unlocalizedName + ".name";
} }
public String getUnlocalizedTip() public String getUnlocalizedTip()
{ {
return unlocalizedName + ".tip"; return this.unlocalizedName + ".tip";
} }
} }
+20 -17
View File
@@ -23,47 +23,50 @@
package appeng.api.config; package appeng.api.config;
import java.util.EnumSet; import java.util.EnumSet;
public enum Settings 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 values;
public EnumSet getPossibleValues() public EnumSet getPossibleValues()
{ {
return values; return this.values;
} }
private Settings(EnumSet set) { Settings( EnumSet set )
{
if ( set == null || set.isEmpty() ) if ( set == null || set.isEmpty() )
throw new RuntimeException( "Invalid configuration." ); throw new RuntimeException( "Invalid configuration." );
values = set; this.values = set;
} }
} }
+26 -7
View File
@@ -23,27 +23,32 @@
package appeng.api.config; package appeng.api.config;
import java.util.HashMap; import java.util.HashMap;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import appeng.api.util.AEItemDefinition;
public enum Upgrades public enum Upgrades
{ {
/** /**
* Gold Tier Upgrades. * Gold Tier Upgrades.
*/ */
CAPACITY(0), REDSTONE(0), CRAFTING(0), CAPACITY( 0 ), REDSTONE( 0 ), CRAFTING( 0 ),
/** /**
* Diamond Tier Upgrades. * Diamond Tier Upgrades.
*/ */
FUZZY(1), SPEED(1), INVERTER(1); FUZZY( 1 ), SPEED( 1 ), INVERTER( 1 );
public final int myTier; public final int myTier;
public final HashMap<ItemStack, Integer> supportedMax = new HashMap<ItemStack, Integer>(); public final HashMap<ItemStack, Integer> supportedMax = new HashMap<ItemStack, Integer>();
private Upgrades(int tier) { Upgrades( int tier )
myTier = tier; {
this.myTier = tier;
} }
/** /**
@@ -51,12 +56,26 @@ public enum Upgrades
*/ */
public HashMap<ItemStack, Integer> getSupported() public HashMap<ItemStack, Integer> getSupported()
{ {
return supportedMax; return this.supportedMax;
} }
public void registerItem(ItemStack myItem, int maxSupported)
public void registerItem( AEItemDefinition myItem, int maxSupported )
{ {
if ( myItem != null ) if ( myItem != null )
supportedMax.put( myItem, maxSupported ); {
final ItemStack stack = myItem.stack( 1 );
this.registerItem( stack, maxSupported );
}
}
public void registerItem( ItemStack stack, int maxSupported )
{
if ( stack != null )
{
this.supportedMax.put( stack, maxSupported );
}
} }
} }
@@ -73,5 +73,4 @@ public class Parts
public AEItemDefinition partTerminal; public AEItemDefinition partTerminal;
public AEItemDefinition partStorageMonitor; public AEItemDefinition partStorageMonitor;
public AEItemDefinition partConversionMonitor; public AEItemDefinition partConversionMonitor;
} }
@@ -44,8 +44,8 @@ public class LocatableEventAnnounce extends Event
final public LocatableEvent change; final public LocatableEvent change;
public LocatableEventAnnounce(ILocatable o, LocatableEvent ev) { public LocatableEventAnnounce(ILocatable o, LocatableEvent ev) {
target = o; this.target = o;
change = ev; this.change = ev;
} }
} }
@@ -36,42 +36,42 @@ public interface IGrinderEntry
* *
* @return input that the grinder will accept. * @return input that the grinder will accept.
*/ */
public ItemStack getInput(); ItemStack getInput();
/** /**
* lets you change the grinder recipe by changing its input. * lets you change the grinder recipe by changing its input.
* *
* @param input input item * @param input input item
*/ */
public void setInput(ItemStack input); void setInput( ItemStack input );
/** /**
* gets the current output * gets the current output
* *
* @return output that the grinder will produce * @return output that the grinder will produce
*/ */
public ItemStack getOutput(); ItemStack getOutput();
/** /**
* gets the current output * gets the current output
* *
* @return output that the grinder will produce * @return output that the grinder will produce
*/ */
public ItemStack getOptionalOutput(); ItemStack getOptionalOutput();
/** /**
* gets the current output * gets the current output
* *
* @return output that the grinder will produce * @return output that the grinder will produce
*/ */
public ItemStack getSecondOptionalOutput(); ItemStack getSecondOptionalOutput();
/** /**
* allows you to change the output. * allows you to change the output.
* *
* @param output output item * @param output output item
*/ */
public void setOutput(ItemStack output); void setOutput( ItemStack output );
/** /**
* stack, and 0.0-1.0 chance that it will be generated. * stack, and 0.0-1.0 chance that it will be generated.
@@ -79,14 +79,14 @@ public interface IGrinderEntry
* @param output output item * @param output output item
* @param chance generation chance * @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. * 0.0 - 1.0 the chance that the optional output will be generated.
* *
* @return chance of optional output * @return chance of optional output
*/ */
public float getOptionalChance(); float getOptionalChance();
/** /**
* stack, and 0.0-1.0 chance that it will be generated. * stack, and 0.0-1.0 chance that it will be generated.
@@ -94,26 +94,26 @@ public interface IGrinderEntry
* @param output second optional output item * @param output second optional output item
* @param chance second optional output chance * @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. * 0.0 - 1.0 the chance that the optional output will be generated.
* *
* @return second optional output chance * @return second optional output chance
*/ */
public float getSecondOptionalChance(); float getSecondOptionalChance();
/** /**
* Energy cost, in turns. * Energy cost, in turns.
* *
* @return number of turns it takes to produce the output from the input. * @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 * Allows you to adjust the number of turns
* *
* @param c number of turns to produce output. * @param c number of turns to produce output.
*/ */
public void setEnergyCost(int c); void setEnergyCost( int c );
} }
@@ -23,10 +23,11 @@
package appeng.api.features; package appeng.api.features;
import net.minecraft.item.ItemStack;
import java.util.List; import java.util.List;
import net.minecraft.item.ItemStack;
/** /**
* Lets you manipulate Grinder Recipes, by adding or editing existing ones. * Lets you manipulate Grinder Recipes, by adding or editing existing ones.
*/ */
@@ -38,7 +39,7 @@ public interface IGrinderRegistry
* *
* @return currentlyRegisteredRecipes * @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. * add a new recipe the easy way, in &#8594; out, how many turns., duplicates will not be added.
@@ -47,7 +48,7 @@ public interface IGrinderRegistry
* @param out output * @param out output
* @param turns amount of turns to turn the input into the 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. * add a new recipe with optional outputs, duplicates will not be added.
@@ -79,6 +80,6 @@ public interface IGrinderRegistry
* @param input input * @param input input
* @return identified recipe or null * @return identified recipe or null
*/ */
public IGrinderEntry getRecipeForInput(ItemStack input); IGrinderEntry getRecipeForInput( ItemStack input );
} }
@@ -26,8 +26,8 @@ package appeng.api.features;
public interface IItemComparison public interface IItemComparison
{ {
public boolean sameAsPrecise(IItemComparison comp); boolean sameAsPrecise( IItemComparison comp );
public boolean sameAsFuzzy(IItemComparison comp); boolean sameAsFuzzy( IItemComparison comp );
} }
@@ -48,6 +48,6 @@ public interface IItemComparisonProvider
* @param stack item * @param stack item
* @return true, if getComparison will return a valid IItemComparison Object * @return true, if getComparison will return a valid IItemComparison Object
*/ */
public boolean canHandle(ItemStack stack); boolean canHandle( ItemStack stack );
} }
@@ -23,19 +23,31 @@
package appeng.api.features; package appeng.api.features;
/** /**
* A Registry for locatable items, works based on serial numbers. * A Registry for locatable items, works based on serial numbers.
*/ */
public interface ILocatableRegistry public interface ILocatableRegistry
{ {
/** /**
* Attempts to find the object with the serial specified, if it can it * Attempts to find the object with the serial specified, if it can it
* returns the object. * returns the object.
* *
* @param serial serial * @param serial serial
*
* @return requestedObject, or null * @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 );
} }
@@ -23,7 +23,9 @@
package appeng.api.features; package appeng.api.features;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import appeng.api.config.TunnelType; import appeng.api.config.TunnelType;
/** /**
@@ -41,7 +43,7 @@ public interface IP2PTunnelRegistry
* @param type * @param type
* - the type of tunnel * - 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. * returns null if no attunement can be found.
@@ -58,7 +58,7 @@ public interface IRecipeHandlerRegistry
/** /**
* @return a new recipe handler, which can be used to parse, and read recipe files. * @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. * resolve sub items by name.
@@ -45,6 +45,6 @@ public interface ISpecialComparisonRegistry
* *
* @param prov comparison provider * @param prov comparison provider
*/ */
public void addComparisonProvider(IItemComparisonProvider prov); void addComparisonProvider( IItemComparisonProvider prov );
} }
@@ -29,16 +29,16 @@ import net.minecraft.world.WorldProvider;
public interface IWorldGen public interface IWorldGen
{ {
public enum WorldGenType enum WorldGenType
{ {
CertusQuartz, ChargedCertusQuartz, Meteorites CertusQuartz, ChargedCertusQuartz, Meteorites
} }
public void disableWorldGenForProviderID(WorldGenType type, Class<? extends WorldProvider> provider); void disableWorldGenForProviderID( WorldGenType type, Class<? extends WorldProvider> provider );
public void enableWorldGenForDimension(WorldGenType type, int dimID); void enableWorldGenForDimension( WorldGenType type, int dimID );
public void disableWorldGenForDimension(WorldGenType type, int dimID); void disableWorldGenForDimension( WorldGenType type, int dimID );
boolean isWorldGenEnabled(WorldGenType type, World w); boolean isWorldGenEnabled(WorldGenType type, World w);
@@ -33,7 +33,7 @@ public class TransitionResult
public final double energyUsage; public final double energyUsage;
public TransitionResult(boolean _success, double power) { public TransitionResult(boolean _success, double power) {
success = _success; this.success = _success;
energyUsage = power; this.energyUsage = power;
} }
} }
@@ -28,5 +28,5 @@ import net.minecraft.item.ItemStack;
public interface IGuiItemObject public interface IGuiItemObject
{ {
public ItemStack getItemStack(); ItemStack getItemStack();
} }
@@ -23,7 +23,9 @@
package appeng.api.implementations.items; package appeng.api.implementations.items;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import appeng.api.config.AccessRestriction; import appeng.api.config.AccessRestriction;
import appeng.api.networking.energy.IAEPowerStorage; import appeng.api.networking.energy.IAEPowerStorage;
@@ -39,7 +41,7 @@ public interface IAEItemPowerStorage
* *
* @return 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 * Attempt to extract power from the device, it will extract what it can and
@@ -48,17 +50,17 @@ public interface IAEItemPowerStorage
* @param amt to be extracted power from device * @param amt to be extracted power from device
* @return what it could extract * @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 ) * @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() * @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 * Control the power flow by telling what the network can do, either add? or
@@ -66,6 +68,6 @@ public interface IAEItemPowerStorage
* *
* @return access restriction of network * @return access restriction of network
*/ */
public AccessRestriction getPowerFlow(ItemStack is); AccessRestriction getPowerFlow( ItemStack is );
} }
@@ -39,7 +39,7 @@ public interface IPartStorageMonitor extends IPartMonitor, IPart, IGridHost, INe
* IAEFluidStack the quantity is important remember to use getStackSize() on the IAEStack, and not on the * IAEFluidStack the quantity is important remember to use getStackSize() on the IAEStack, and not on the
* FluidStack/ItemStack acquired from it. * FluidStack/ItemStack acquired from it.
*/ */
IAEStack getDisplayed(); IAEStack<?> getDisplayed();
/** /**
* @return the current locked state of the Storage Monitor * @return the current locked state of the Storage Monitor
@@ -40,7 +40,7 @@ public interface IGrid
* @param iface face * @param iface face
* @return the IGridCache you requested. * @return the IGridCache you requested.
*/ */
public <C extends IGridCache> C getCache(Class<? extends IGridCache> iface); <C extends IGridCache> C getCache( Class<? extends IGridCache> iface );
/** /**
* Post an event into the network event bus. * Post an event into the network event bus.
@@ -49,7 +49,7 @@ public interface IGrid
* - event to post * - event to post
* @return returns ev back to original poster * @return returns ev back to original poster
*/ */
public MENetworkEvent postEvent(MENetworkEvent ev); MENetworkEvent postEvent( MENetworkEvent ev );
/** /**
* Post an event into the network event bus, but direct it at a single node. * Post an event into the network event bus, but direct it at a single node.
@@ -58,7 +58,7 @@ public interface IGrid
* event to post * event to post
* @return returns ev back to original poster * @return returns ev back to original poster
*/ */
public MENetworkEvent postEventTo(IGridNode node, MENetworkEvent ev); MENetworkEvent postEventTo( IGridNode node, MENetworkEvent ev );
/** /**
* get a list of the diversity of classes, you can use this to better detect which machines your interested in, * get a list of the diversity of classes, you can use this to better detect which machines your interested in,
@@ -66,7 +66,7 @@ public interface IGrid
* *
* @return IReadOnlyCollection of all available host types (Of Type IGridHost). * @return IReadOnlyCollection of all available host types (Of Type IGridHost).
*/ */
public IReadOnlyCollection<Class<? extends IGridHost>> getMachinesClasses(); IReadOnlyCollection<Class<? extends IGridHost>> getMachinesClasses();
/** /**
* Get machines on the network. * Get machines on the network.
@@ -74,7 +74,7 @@ public interface IGrid
* @param gridHostClass class of the grid host * @param gridHostClass class of the grid host
* @return IMachineSet of all nodes belonging to hosts of specified class. * @return IMachineSet of all nodes belonging to hosts of specified class.
*/ */
public IMachineSet getMachines(Class<? extends IGridHost> gridHostClass); IMachineSet getMachines( Class<? extends IGridHost> gridHostClass );
/** /**
* @return IReadOnlyCollection for all nodes on the network, node visitors are preferred. * @return IReadOnlyCollection for all nodes on the network, node visitors are preferred.
@@ -84,11 +84,11 @@ public interface IGrid
/** /**
* @return true if the last node has been removed from the grid. * @return true if the last node has been removed from the grid.
*/ */
public boolean isEmpty(); boolean isEmpty();
/** /**
* @return the node considered the pivot point of the grid. * @return the node considered the pivot point of the grid.
*/ */
public IGridNode getPivot(); IGridNode getPivot();
} }
@@ -23,13 +23,15 @@
package appeng.api.networking; package appeng.api.networking;
import appeng.api.parts.IPart;
import appeng.api.util.AEColor; import java.util.EnumSet;
import appeng.api.util.DimensionalCoord;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.common.util.ForgeDirection;
import java.util.EnumSet; import appeng.api.parts.IPart;
import appeng.api.util.AEColor;
import appeng.api.util.DimensionalCoord;
/** /**
* An Implementation is required to create your node for IGridHost * An Implementation is required to create your node for IGridHost
@@ -85,7 +87,7 @@ public interface IGridBlock
* @param grid grid * @param grid grid
* @param channelsInUse used channels * @param channelsInUse used channels
*/ */
public void setNetworkStatus(IGrid grid, int channelsInUse); void setNetworkStatus( IGrid grid, int channelsInUse );
/** /**
* Determine which sides of the block can be connected too, only used when isWorldAccessible returns true, not used * Determine which sides of the block can be connected too, only used when isWorldAccessible returns true, not used
@@ -108,5 +110,5 @@ public interface IGridBlock
* *
* @return the render item stack to use to render this node, null is valid, and will not show this node. * @return the render item stack to use to render this node, null is valid, and will not show this node.
*/ */
public ItemStack getMachineRepresentation(); ItemStack getMachineRepresentation();
} }
@@ -39,7 +39,7 @@ public interface IGridCacheRegistry
void registerGridCache(Class<? extends IGridCache> iface, Class<? extends IGridCache> implementation); void registerGridCache(Class<? extends IGridCache> iface, Class<? extends IGridCache> implementation);
/** /**
* requests a new instance of a grid cache for use, used internally * requests a new INSTANCE of a grid cache for use, used internally
* *
* @param grid grid * @param grid grid
* *
@@ -32,6 +32,6 @@ public interface IGridConnectionVisitor extends IGridVisitor
* @param n * @param n
* the connection. * the connection.
*/ */
public void visitConnection(IGridConnection n); void visitConnection( IGridConnection n );
} }
@@ -23,8 +23,10 @@
package appeng.api.networking; package appeng.api.networking;
import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.common.util.ForgeDirection;
import appeng.api.parts.IPart; import appeng.api.parts.IPart;
import appeng.api.util.AECableType; import appeng.api.util.AECableType;
@@ -46,9 +48,9 @@ public interface IGridHost
* feel free to ignore this, most blocks will use the same node * feel free to ignore this, most blocks will use the same node
* for every side. * for every side.
* @return a new IGridNode, create these with * @return a new IGridNode, create these with
* AEApi.instance().createGridNode( MyIGridBlock ) * AEApi.INSTANCE().createGridNode( MyIGridBlock )
*/ */
public IGridNode getGridNode(ForgeDirection dir); IGridNode getGridNode( ForgeDirection dir );
/** /**
* Determines how cables render when they connect to this block. Priority is * Determines how cables render when they connect to this block. Priority is
@@ -56,11 +58,11 @@ public interface IGridHost
* *
* @param dir direction * @param dir direction
*/ */
public AECableType getCableConnectionType(ForgeDirection dir); AECableType getCableConnectionType( ForgeDirection dir );
/** /**
* break this host, its violating security rules, just break your block, or part. * break this host, its violating security rules, just break your block, or part.
*/ */
public void securityBreak(); void securityBreak();
} }
@@ -39,6 +39,6 @@ public interface IGridVisitor
* *
* @return true to continue visiting nodes beyond this node. * @return true to continue visiting nodes beyond this node.
*/ */
public boolean visitNode(IGridNode n); boolean visitNode( IGridNode n );
} }
@@ -32,6 +32,6 @@ public interface ICraftingCallback
* @param job * @param job
* - final job * - final job
*/ */
public void calculationComplete(ICraftingJob job); void calculationComplete( ICraftingJob job );
} }
@@ -32,7 +32,7 @@ import appeng.api.storage.data.IAEItemStack;
/** /**
* do not implement provided by {@link ICraftingPatternItem} * do not implement provided by {@link ICraftingPatternItem}
* *
* caching this instance will increase performance of validation and checks. * caching this INSTANCE will increase performance of validation and checks.
*/ */
public interface ICraftingPatternDetails public interface ICraftingPatternDetails
{ {
@@ -82,7 +82,7 @@ public interface ICraftingPatternDetails
boolean canSubstitute(); boolean canSubstitute();
/** /**
* Allow using this instance of the pattern details to preform the crafting action with performance enhancements. * Allow using this INSTANCE of the pattern details to preform the crafting action with performance enhancements.
* *
* @param craftingInv inventory * @param craftingInv inventory
* @param world crafting world * @param world crafting world
@@ -40,17 +40,17 @@ public interface IAEPowerStorage extends IEnergySource
* *
* @return amount of power which was unable to be stored * @return amount of power which was unable to be stored
*/ */
public double injectAEPower(double amt, Actionable mode); double injectAEPower( double amt, Actionable mode );
/** /**
* @return the current maximum power ( this can change :P ) * @return the current maximum power ( this can change :P )
*/ */
public double getAEMaxPower(); double getAEMaxPower();
/** /**
* @return the current AE Power Level, this may exceed getMEMaxPower() * @return the current AE Power Level, this may exceed getMEMaxPower()
*/ */
public double getAECurrentPower(); double getAECurrentPower();
/** /**
* Checked on network reset to see if your block can be used as a public power storage ( use getPowerFlow to control * Checked on network reset to see if your block can be used as a public power storage ( use getPowerFlow to control
@@ -58,13 +58,13 @@ public interface IAEPowerStorage extends IEnergySource
* *
* @return true if it can be used as a public power storage * @return true if it can be used as a public power storage
*/ */
public boolean isAEPublicPowerStorage(); boolean isAEPublicPowerStorage();
/** /**
* Control the power flow by telling what the network can do, either add? or subtract? or both! * Control the power flow by telling what the network can do, either add? or subtract? or both!
* *
* @return access restriction what the network can do * @return access restriction what the network can do
*/ */
public AccessRestriction getPowerFlow(); AccessRestriction getPowerFlow();
} }
@@ -36,18 +36,18 @@ public interface IEnergyGrid extends IGridCache, IEnergySource, IEnergyGridProvi
/** /**
* @return the current calculated idle energy drain each tick, is used internally to drain power for each tick. * @return the current calculated idle energy drain each tick, is used internally to drain power for each tick.
*/ */
public double getIdlePowerUsage(); double getIdlePowerUsage();
/** /**
* @return the average power drain over the past 10 ticks, includes idle usage during this time, and all use of * @return the average power drain over the past 10 ticks, includes idle usage during this time, and all use of
* extractPower. * extractPower.
*/ */
public double getAvgPowerUsage(); double getAvgPowerUsage();
/** /**
* @return the average energy injected into the system per tick, for the last 10 ticks. * @return the average energy injected into the system per tick, for the last 10 ticks.
*/ */
public double getAvgPowerInjection(); double getAvgPowerInjection();
/** /**
* AE maintains an idle draw of power separate from active power draw, it condenses this into a single operation * AE maintains an idle draw of power separate from active power draw, it condenses this into a single operation
@@ -59,7 +59,7 @@ public interface IEnergyGrid extends IGridCache, IEnergySource, IEnergyGridProvi
* *
* @return if the network is powered or not. * @return if the network is powered or not.
*/ */
public boolean isNetworkPowered(); boolean isNetworkPowered();
/** /**
* AE will accept any power, and store it, to maintain sanity please don't send more then 10,000 at a time. * AE will accept any power, and store it, to maintain sanity please don't send more then 10,000 at a time.
@@ -78,14 +78,14 @@ public interface IEnergyGrid extends IGridCache, IEnergySource, IEnergyGridProvi
* should the action be simulated or performed? * should the action be simulated or performed?
* @return the amount of power that the network has OVER the limit. * @return the amount of power that the network has OVER the limit.
*/ */
public double injectPower(double amt, Actionable mode); double injectPower( double amt, Actionable mode );
/** /**
* this is should be considered an estimate, and not relied upon for real calculations. * this is should be considered an estimate, and not relied upon for real calculations.
* *
* @return estimated available power. * @return estimated available power.
*/ */
public double getStoredPower(); double getStoredPower();
/** /**
* this is should be considered an estimate, and not relied upon for real calculations. * this is should be considered an estimate, and not relied upon for real calculations.
@@ -100,6 +100,6 @@ public interface IEnergyGrid extends IGridCache, IEnergySource, IEnergyGridProvi
* *
* @return Amount of power required to charge the grid, in AE. * @return Amount of power required to charge the grid, in AE.
*/ */
public double getEnergyDemand(double maxRequired); double getEnergyDemand( double maxRequired );
} }
@@ -36,16 +36,16 @@ public interface IEnergyGridProvider
/** /**
* internal use only * internal use only
*/ */
public double extractAEPower(double amt, Actionable mode, Set<IEnergyGrid> seen); double extractAEPower( double amt, Actionable mode, Set<IEnergyGrid> seen );
/** /**
* internal use only * internal use only
*/ */
public double injectAEPower(double amt, Actionable mode, Set<IEnergyGrid> seen); double injectAEPower( double amt, Actionable mode, Set<IEnergyGrid> seen );
/** /**
* internal use only * internal use only
*/ */
public double getEnergyDemand(double d, Set<IEnergyGrid> seen); double getEnergyDemand( double d, Set<IEnergyGrid> seen );
} }
@@ -36,6 +36,6 @@ public interface IEnergySource
* @param mode should the action be simulated or performed? * @param mode should the action be simulated or performed?
* @return returns extracted power. * @return returns extracted power.
*/ */
public double extractAEPower(double amt, Actionable mode, PowerMultiplier usePowerMultiplier); double extractAEPower( double amt, Actionable mode, PowerMultiplier usePowerMultiplier );
} }
@@ -35,7 +35,7 @@ public class MENetworkChannelChanged extends MENetworkEvent
public final IGridNode node; public final IGridNode node;
public MENetworkChannelChanged(IGridNode n) { public MENetworkChannelChanged(IGridNode n) {
node = n; this.node = n;
} }
} }
@@ -31,7 +31,7 @@ public class MENetworkCraftingCpuChange extends MENetworkEvent
public final IGridNode node; public final IGridNode node;
public MENetworkCraftingCpuChange(IGridNode n) { public MENetworkCraftingCpuChange(IGridNode n) {
node = n; this.node = n;
} }
} }
@@ -33,8 +33,8 @@ public class MENetworkCraftingPatternChange extends MENetworkEvent
public final IGridNode node; public final IGridNode node;
public MENetworkCraftingPatternChange(ICraftingProvider p, IGridNode n) { public MENetworkCraftingPatternChange(ICraftingProvider p, IGridNode n) {
provider = p; this.provider = p;
node = n; this.node = n;
} }
} }
@@ -41,7 +41,7 @@ public class MENetworkEvent
*/ */
public void cancel() public void cancel()
{ {
canceled = true; this.canceled = true;
} }
/** /**
@@ -51,7 +51,7 @@ public class MENetworkEvent
*/ */
public boolean isCanceled() public boolean isCanceled()
{ {
return canceled; return this.canceled;
} }
/** /**
@@ -61,7 +61,7 @@ public class MENetworkEvent
*/ */
public int getVisitedObjects() public int getVisitedObjects()
{ {
return visited; return this.visited;
} }
/** /**
@@ -71,6 +71,6 @@ public class MENetworkEvent
*/ */
public void setVisitedObjects(int v) public void setVisitedObjects(int v)
{ {
visited = v; this.visited = v;
} }
} }
@@ -38,7 +38,7 @@ public class MENetworkPowerIdleChange extends MENetworkEvent
public final IGridNode node; public final IGridNode node;
public MENetworkPowerIdleChange(IGridNode nodeThatChanged) { public MENetworkPowerIdleChange(IGridNode nodeThatChanged) {
node = nodeThatChanged; this.node = nodeThatChanged;
} }
} }
@@ -54,8 +54,8 @@ public class MENetworkPowerStorage extends MENetworkEvent
public final PowerEventType type; public final PowerEventType type;
public MENetworkPowerStorage(IAEPowerStorage t, PowerEventType y) { public MENetworkPowerStorage(IAEPowerStorage t, PowerEventType y) {
storage = t; this.storage = t;
type = y; this.type = y;
} }
} }
@@ -26,7 +26,7 @@ package appeng.api.networking.events;
import appeng.api.networking.IGridHost; import appeng.api.networking.IGridHost;
/** /**
* An event that is posted whenever a spatial IO is actived, called for IGridCache * An event that is posted whenever a spatial IO is active, called for IGridCache
*/ */
public class MENetworkSpatialEvent extends MENetworkEvent public class MENetworkSpatialEvent extends MENetworkEvent
{ {
@@ -34,12 +34,12 @@ public class MENetworkSpatialEvent extends MENetworkEvent
public final double spatialEnergyUsage; public final double spatialEnergyUsage;
/** /**
* @param SpatialIO ( instance of the SpatialIO block ) * @param SpatialIO ( INSTANCE of the SpatialIO block )
* @param EnergyUsage ( the amount of energy that the SpatialIO uses) * @param EnergyUsage ( the amount of energy that the SpatialIO uses)
*/ */
public MENetworkSpatialEvent(IGridHost SpatialIO, double EnergyUsage) public MENetworkSpatialEvent(IGridHost SpatialIO, double EnergyUsage)
{ {
host = SpatialIO; this.host = SpatialIO;
spatialEnergyUsage = EnergyUsage; this.spatialEnergyUsage = EnergyUsage;
} }
} }
@@ -41,8 +41,8 @@ public class MENetworkStorageEvent extends MENetworkEvent
public final StorageChannel channel; public final StorageChannel channel;
public MENetworkStorageEvent(IMEMonitor o, StorageChannel chan) { public MENetworkStorageEvent(IMEMonitor o, StorageChannel chan) {
monitor = o; this.monitor = o;
channel = chan; this.channel = chan;
} }
} }
@@ -40,7 +40,7 @@ public interface IPathingGrid extends IGridCache
ControllerState getControllerState(); ControllerState getControllerState();
/** /**
* trigger a network reset, booting, pathfinding and all. * trigger a network reset, booting, path-finding and all.
*/ */
void repath(); void repath();
@@ -35,7 +35,7 @@ public class MachineSource extends BaseActionSource
} }
public MachineSource(IActionHost v) { public MachineSource(IActionHost v) {
via = v; this.via = v;
} }
} }
@@ -38,8 +38,8 @@ public class PlayerSource extends BaseActionSource
} }
public PlayerSource(EntityPlayer p, IActionHost v) { public PlayerSource(EntityPlayer p, IActionHost v) {
player = p; this.player = p;
via = v; this.via = v;
} }
} }
@@ -68,10 +68,10 @@ public class TickingRequest
public final boolean canBeAlerted; public final boolean canBeAlerted;
public TickingRequest(int min, int max, boolean sleep, boolean alertable) { public TickingRequest(int min, int max, boolean sleep, boolean alertable) {
minTickRate = min; this.minTickRate = min;
maxTickRate = max; this.maxTickRate = max;
isSleeping = sleep; this.isSleeping = sleep;
canBeAlerted = alertable; this.canBeAlerted = alertable;
} }
} }
@@ -33,8 +33,8 @@ public enum CableRenderMode
public final boolean transparentFacades; public final boolean transparentFacades;
public final boolean opaqueFacades; public final boolean opaqueFacades;
private CableRenderMode(boolean hideFacades) { CableRenderMode( boolean hideFacades ) {
this.transparentFacades = hideFacades; this.transparentFacades = hideFacades;
opaqueFacades = !hideFacades; this.opaqueFacades = !hideFacades;
} }
} }
+1 -1
View File
@@ -83,7 +83,7 @@ public interface IPartHost
* *
* @param side side of part * @param side side of part
* @param suppressUpdate * @param suppressUpdate
* - used if you need to replace a part's instance, without really removing it first. * - used if you need to replace a part's INSTANCE, without really removing it first.
*/ */
void removePart(ForgeDirection side, boolean suppressUpdate); void removePart(ForgeDirection side, boolean suppressUpdate);
+3 -3
View File
@@ -29,7 +29,7 @@ import net.minecraft.item.ItemStack;
/** /**
* This is a pretty basic requirement, once you implement the interface, and createPartFromItemStack * This is a pretty basic requirement, once you implement the interface, and createPartFromItemStack
* *
* you must register your bus with the Bus renderer, using AEApi.instance().partHelper().setItemBusRenderer( this ); * you must register your bus with the Bus renderer, using AEApi.INSTANCE().partHelper().setItemBusRenderer( this );
* *
* then simply add these two methods, which tell MC to use the Block Textures, and call AE's Bus Placement Code. * then simply add these two methods, which tell MC to use the Block Textures, and call AE's Bus Placement Code.
* *
@@ -45,7 +45,7 @@ import net.minecraft.item.ItemStack;
* {@literal @}Override * {@literal @}Override
* public boolean onItemUse(ItemStack is, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ) * public boolean onItemUse(ItemStack is, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ)
* { * {
* return AEApi.instance().partHelper().placeBus( is, x, y, z, side, player, world ); * return AEApi.INSTANCE().partHelper().placeBus( is, x, y, z, side, player, world );
* } * }
* </code> * </code>
* </pre> * </pre>
@@ -55,7 +55,7 @@ public interface IPartItem
{ {
/** /**
* create a new part instance, from the item stack. * create a new part INSTANCE, from the item stack.
* *
* @param is item * @param is item
* @return part from item * @return part from item
@@ -47,19 +47,19 @@ public class SelectedPart
public final ForgeDirection side; public final ForgeDirection side;
public SelectedPart() { public SelectedPart() {
part = null; this.part = null;
facade = null; this.facade = null;
side = ForgeDirection.UNKNOWN; this.side = ForgeDirection.UNKNOWN;
} }
public SelectedPart(IPart part, ForgeDirection side) { public SelectedPart(IPart part, ForgeDirection side) {
this.part = part; this.part = part;
facade = null; this.facade = null;
this.side = side; this.side = side;
} }
public SelectedPart(IFacadePart facade, ForgeDirection side) { public SelectedPart(IFacadePart facade, ForgeDirection side) {
part = null; this.part = null;
this.facade = facade; this.facade = facade;
this.side = side; this.side = side;
} }
@@ -23,12 +23,13 @@
package appeng.api.recipes; package appeng.api.recipes;
import java.util.List;
import appeng.api.exceptions.MissingIngredientError; import appeng.api.exceptions.MissingIngredientError;
import appeng.api.exceptions.RecipeError; import appeng.api.exceptions.RecipeError;
import appeng.api.exceptions.RegistrationError; import appeng.api.exceptions.RegistrationError;
import java.util.List;
public interface ICraftHandler public interface ICraftHandler
{ {
@@ -39,7 +40,7 @@ public interface ICraftHandler
* @param output parsed outputs * @param output parsed outputs
* @throws RecipeError * @throws RecipeError
*/ */
public void setup(List<List<IIngredient>> input, List<List<IIngredient>> output) throws RecipeError; void setup( List<List<IIngredient>> input, List<List<IIngredient>> output ) throws RecipeError;
/** /**
* called when all recipes are parsed, and your required to register your recipe. * called when all recipes are parsed, and your required to register your recipe.
@@ -47,6 +48,6 @@ public interface ICraftHandler
* @throws RegistrationError * @throws RegistrationError
* @throws MissingIngredientError * @throws MissingIngredientError
*/ */
public void register() throws RegistrationError, MissingIngredientError; void register() throws RegistrationError, MissingIngredientError;
} }
@@ -23,7 +23,9 @@
package appeng.api.recipes; package appeng.api.recipes;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import appeng.api.exceptions.MissingIngredientError; import appeng.api.exceptions.MissingIngredientError;
import appeng.api.exceptions.RegistrationError; import appeng.api.exceptions.RegistrationError;
@@ -55,30 +57,30 @@ public interface IIngredient {
* *
* @return true if this slot contains no ItemStack, this is passed as "_" * @return true if this slot contains no ItemStack, this is passed as "_"
*/ */
public boolean isAir(); boolean isAir();
/** /**
* @return The Name Space of the item. Prefer getItemStack or getItemStackSet * @return The Name Space of the item. Prefer getItemStack or getItemStackSet
*/ */
public String getNameSpace(); String getNameSpace();
/** /**
* @return The Name of the item. Prefer getItemStack or getItemStackSet * @return The Name of the item. Prefer getItemStack or getItemStackSet
*/ */
public String getItemName(); String getItemName();
/** /**
* @return The Damage Value of the item. Prefer getItemStack or getItemStackSet * @return The Damage Value of the item. Prefer getItemStack or getItemStackSet
*/ */
public int getDamageValue(); int getDamageValue();
/** /**
* @return The Damage Value of the item. Prefer getItemStack or getItemStackSet * @return The Damage Value of the item. Prefer getItemStack or getItemStackSet
*/ */
public int getQty(); int getQty();
/** /**
* Bakes the lists in for faster runtime lookups. * Bakes the lists in for faster runtime look-ups.
* @throws MissingIngredientError * @throws MissingIngredientError
* @throws RegistrationError * @throws RegistrationError
*/ */
@@ -31,6 +31,6 @@ public interface ISubItemResolver
* @param fullName name of sub item * @param fullName name of sub item
* @return either a ResolveResult, or a ResolverResultSet * @return either a ResolveResult, or a ResolverResultSet
*/ */
public Object resolveItemByName(String namespace, String fullName); Object resolveItemByName( String namespace, String fullName );
} }
@@ -33,15 +33,15 @@ public class ResolverResult
final public NBTTagCompound compound; final public NBTTagCompound compound;
public ResolverResult(String name, int damage) { public ResolverResult(String name, int damage) {
itemName = name; this.itemName = name;
damageValue = damage; this.damageValue = damage;
compound = null; this.compound = null;
} }
public ResolverResult(String name, int damage, NBTTagCompound data) { public ResolverResult(String name, int damage, NBTTagCompound data) {
itemName = name; this.itemName = name;
damageValue = damage; this.damageValue = damage;
compound = data; this.compound = data;
} }
} }
@@ -35,8 +35,8 @@ public class ResolverResultSet
public final List<ItemStack> results; public final List<ItemStack> results;
public ResolverResultSet(String myName, ItemStack... set) { public ResolverResultSet(String myName, ItemStack... set) {
results = Arrays.asList( set ); this.results = Arrays.asList( set );
name = myName; this.name = myName;
} }
} }
@@ -26,7 +26,7 @@ package appeng.api.storage;
import appeng.api.networking.security.IActionHost; import appeng.api.networking.security.IActionHost;
/** /**
* Represents a IGridhost that contributes to storage, such as a ME Chest, or ME Drive. * Represents an {@link appeng.api.networking.IGridHost} that contributes to storage, such as a ME Chest, or ME Drive.
*/ */
public interface ICellContainer extends IActionHost, ICellProvider, ISaveProvider public interface ICellContainer extends IActionHost, ICellProvider, ISaveProvider
{ {
@@ -49,7 +49,7 @@ public interface IMEInventory<StackType extends IAEStack>
* @param src action source * @param src action source
* @return returns the number of items not added. * @return returns the number of items not added.
*/ */
public StackType injectItems(StackType input, Actionable type, BaseActionSource src); StackType injectItems( StackType input, Actionable type, BaseActionSource src );
/** /**
* Extract the specified item from the ME Inventory * Extract the specified item from the ME Inventory
@@ -60,7 +60,7 @@ public interface IMEInventory<StackType extends IAEStack>
* simulate, or perform action? * simulate, or perform action?
* @return returns the number of items extracted, null * @return returns the number of items extracted, null
*/ */
public StackType extractItems(StackType request, Actionable mode, BaseActionSource src); StackType extractItems( StackType request, Actionable mode, BaseActionSource src );
/** /**
* request a full report of all available items, storage. * request a full report of all available items, storage.
@@ -69,11 +69,11 @@ public interface IMEInventory<StackType extends IAEStack>
* the IItemList the results will be written too * the IItemList the results will be written too
* @return returns same list that was passed in, is passed out * @return returns same list that was passed in, is passed out
*/ */
public IItemList<StackType> getAvailableItems(IItemList<StackType> out); IItemList<StackType> getAvailableItems( IItemList<StackType> out );
/** /**
* @return the type of channel your handler should be part of * @return the type of channel your handler should be part of
*/ */
public StorageChannel getChannel(); StorageChannel getChannel();
} }
@@ -40,7 +40,7 @@ public interface IMEInventoryHandler<StackType extends IAEStack> extends IMEInve
* *
* @return the access * @return the access
*/ */
public AccessRestriction getAccess(); AccessRestriction getAccess();
/** /**
* determine if a particular item is prioritized for this inventory handler, if it is, then it will be added to this * determine if a particular item is prioritized for this inventory handler, if it is, then it will be added to this
@@ -50,7 +50,7 @@ public interface IMEInventoryHandler<StackType extends IAEStack> extends IMEInve
* - item that might be added * - item that might be added
* @return if its prioritized * @return if its prioritized
*/ */
public boolean isPrioritized(StackType input); boolean isPrioritized( StackType input );
/** /**
* determine if an item can be accepted and stored. * determine if an item can be accepted and stored.
@@ -59,23 +59,23 @@ public interface IMEInventoryHandler<StackType extends IAEStack> extends IMEInve
* - item that might be added * - item that might be added
* @return if the item can be added * @return if the item can be added
*/ */
public boolean canAccept(StackType input); boolean canAccept( StackType input );
/** /**
* determine what the priority of the inventory is. * determine what the priority of the inventory is.
* *
* @return the priority, zero is default, positive and negative are supported. * @return the priority, zero is default, positive and negative are supported.
*/ */
public int getPriority(); int getPriority();
/** /**
* pass back value for blinkCell. * pass back value for blinkCell.
* *
* @return the slot index for the cell that this represents in the storage unit, the method on the * @return the slot index for the cell that this represents in the storage unit, the method on the
* {@link ICellContainer} will be called with this value, only trust the return value of this method if you * {@link ICellContainer} will be called with this value, only trust the return value of this method if you
* are the implementer of the {@link IMEInventoryHandler}. * are the implementer of this.
*/ */
public int getSlot(); int getSlot();
/** /**
* AE Uses a two pass placement system, the first pass checks contents and tries to find a place where the item * AE Uses a two pass placement system, the first pass checks contents and tries to find a place where the item
@@ -86,5 +86,5 @@ public interface IMEInventoryHandler<StackType extends IAEStack> extends IMEInve
* - pass number ( 1 or 2 ) * - pass number ( 1 or 2 )
* @return true, if this inventory is valid for this pass. * @return true, if this inventory is valid for this pass.
*/ */
public boolean validForPass(int i); boolean validForPass( int i );
} }
@@ -30,12 +30,12 @@ import appeng.api.storage.data.IItemList;
public interface IMEMonitor<T extends IAEStack> extends IMEInventoryHandler<T>, IBaseMonitor<T> public interface IMEMonitor<T extends IAEStack> extends IMEInventoryHandler<T>, IBaseMonitor<T>
{ {
@Override
@Deprecated
/** /**
* This method is discouraged when accessing data via a IMEMonitor * This method is discouraged when accessing data via a IMEMonitor
*/ */
public IItemList<T> getAvailableItems(IItemList out); @Override
@Deprecated
IItemList<T> getAvailableItems( IItemList out );
/** /**
* Get access to the full item list of the network, preferred over {@link IMEInventory} .getAvailableItems(...) * Get access to the full item list of the network, preferred over {@link IMEInventory} .getAvailableItems(...)
@@ -52,7 +52,7 @@ public interface IStorageHelper
* @param is * @param is
* An ItemStack * An ItemStack
* *
* @return a new instance of {@link IAEItemStack} from a MC {@link ItemStack} * @return a new INSTANCE of {@link IAEItemStack} from a MC {@link ItemStack}
*/ */
IAEItemStack createItemStack(ItemStack is); IAEItemStack createItemStack(ItemStack is);
@@ -60,17 +60,17 @@ public interface IStorageHelper
* @param is * @param is
* A FluidStack * A FluidStack
* *
* @return a new instance of {@link IAEFluidStack} from a Forge {@link FluidStack} * @return a new INSTANCE of {@link IAEFluidStack} from a Forge {@link FluidStack}
*/ */
IAEFluidStack createFluidStack(FluidStack is); IAEFluidStack createFluidStack(FluidStack is);
/** /**
* @return a new instance of {@link IItemList} for items * @return a new INSTANCE of {@link IItemList} for items
*/ */
IItemList<IAEItemStack> createItemList(); IItemList<IAEItemStack> createItemList();
/** /**
* @return a new instance of {@link IItemList} for fluids * @return a new INSTANCE of {@link IItemList} for fluids
*/ */
IItemList<IAEFluidStack> createFluidList(); IItemList<IAEFluidStack> createFluidList();
@@ -51,23 +51,23 @@ public class MEMonitorHandler<StackType extends IAEStack> implements IMEMonitor<
protected IMEInventoryHandler<StackType> getHandler() protected IMEInventoryHandler<StackType> getHandler()
{ {
return internalHandler; return this.internalHandler;
} }
protected Iterator<Entry<IMEMonitorHandlerReceiver<StackType>, Object>> getListeners() protected Iterator<Entry<IMEMonitorHandlerReceiver<StackType>, Object>> getListeners()
{ {
return listeners.entrySet().iterator(); return this.listeners.entrySet().iterator();
} }
protected void postChangesToListeners( Iterable<StackType> changes, BaseActionSource src) protected void postChangesToListeners( Iterable<StackType> changes, BaseActionSource src)
{ {
notifyListenersOfChange( changes, src ); this.notifyListenersOfChange( changes, src );
} }
protected void notifyListenersOfChange(Iterable<StackType> diff, BaseActionSource src) protected void notifyListenersOfChange(Iterable<StackType> diff, BaseActionSource src)
{ {
hasChanged = true;// need to update the cache. this.hasChanged = true;// need to update the cache.
Iterator<Entry<IMEMonitorHandlerReceiver<StackType>, Object>> i = getListeners(); Iterator<Entry<IMEMonitorHandlerReceiver<StackType>, Object>> i = this.getListeners();
while (i.hasNext()) while (i.hasNext())
{ {
Entry<IMEMonitorHandlerReceiver<StackType>, Object> o = i.next(); Entry<IMEMonitorHandlerReceiver<StackType>, Object> o = i.next();
@@ -89,108 +89,108 @@ public class MEMonitorHandler<StackType extends IAEStack> implements IMEMonitor<
diff.decStackSize( leftOvers.getStackSize() ); diff.decStackSize( leftOvers.getStackSize() );
if ( diff.getStackSize() != 0 ) if ( diff.getStackSize() != 0 )
postChangesToListeners( ImmutableList.of( diff ), src ); this.postChangesToListeners( ImmutableList.of( diff ), src );
return leftOvers; return leftOvers;
} }
public MEMonitorHandler(IMEInventoryHandler<StackType> t) { public MEMonitorHandler(IMEInventoryHandler<StackType> t) {
internalHandler = t; this.internalHandler = t;
cachedList = (IItemList<StackType>) t.getChannel().createList(); this.cachedList = (IItemList<StackType>) t.getChannel().createList();
} }
public MEMonitorHandler(IMEInventoryHandler<StackType> t, StorageChannel chan) { public MEMonitorHandler(IMEInventoryHandler<StackType> t, StorageChannel chan) {
internalHandler = t; this.internalHandler = t;
cachedList = (IItemList<StackType>) chan.createList(); this.cachedList = (IItemList<StackType>) chan.createList();
} }
@Override @Override
public void addListener(IMEMonitorHandlerReceiver<StackType> l, Object verificationToken) public void addListener(IMEMonitorHandlerReceiver<StackType> l, Object verificationToken)
{ {
listeners.put( l, verificationToken ); this.listeners.put( l, verificationToken );
} }
@Override @Override
public void removeListener(IMEMonitorHandlerReceiver<StackType> l) public void removeListener(IMEMonitorHandlerReceiver<StackType> l)
{ {
listeners.remove( l ); this.listeners.remove( l );
} }
@Override @Override
public StackType injectItems(StackType input, Actionable mode, BaseActionSource src) public StackType injectItems(StackType input, Actionable mode, BaseActionSource src)
{ {
if ( mode == Actionable.SIMULATE ) if ( mode == Actionable.SIMULATE )
return getHandler().injectItems( input, mode, src ); return this.getHandler().injectItems( input, mode, src );
return monitorDifference(input.copy(), getHandler().injectItems(input, mode, src), false, src); return this.monitorDifference(input.copy(), this.getHandler().injectItems(input, mode, src), false, src);
} }
@Override @Override
public StackType extractItems(StackType request, Actionable mode, BaseActionSource src) public StackType extractItems(StackType request, Actionable mode, BaseActionSource src)
{ {
if ( mode == Actionable.SIMULATE ) if ( mode == Actionable.SIMULATE )
return getHandler().extractItems( request, mode, src ); return this.getHandler().extractItems( request, mode, src );
return monitorDifference(request.copy(), getHandler().extractItems(request, mode, src), true, src); return this.monitorDifference(request.copy(), this.getHandler().extractItems(request, mode, src), true, src);
} }
@Override @Override
public IItemList<StackType> getStorageList() public IItemList<StackType> getStorageList()
{ {
if ( hasChanged ) if ( this.hasChanged )
{ {
hasChanged = false; this.hasChanged = false;
cachedList.resetStatus(); this.cachedList.resetStatus();
return getAvailableItems( cachedList ); return this.getAvailableItems( this.cachedList );
} }
return cachedList; return this.cachedList;
} }
@Override @Override
public IItemList<StackType> getAvailableItems(IItemList out) public IItemList<StackType> getAvailableItems(IItemList out)
{ {
return getHandler().getAvailableItems( out ); return this.getHandler().getAvailableItems( out );
} }
@Override @Override
public StorageChannel getChannel() public StorageChannel getChannel()
{ {
return getHandler().getChannel(); return this.getHandler().getChannel();
} }
@Override @Override
public AccessRestriction getAccess() public AccessRestriction getAccess()
{ {
return getHandler().getAccess(); return this.getHandler().getAccess();
} }
@Override @Override
public boolean isPrioritized(StackType input) public boolean isPrioritized(StackType input)
{ {
return getHandler().isPrioritized( input ); return this.getHandler().isPrioritized( input );
} }
@Override @Override
public boolean canAccept(StackType input) public boolean canAccept(StackType input)
{ {
return getHandler().canAccept( input ); return this.getHandler().canAccept( input );
} }
@Override @Override
public int getPriority() public int getPriority()
{ {
return getHandler().getPriority(); return this.getHandler().getPriority();
} }
@Override @Override
public int getSlot() public int getSlot()
{ {
return getHandler().getSlot(); return this.getHandler().getSlot();
} }
@Override @Override
public boolean validForPass(int i) public boolean validForPass(int i)
{ {
return getHandler().validForPass( i ); return this.getHandler().validForPass( i );
} }
} }
@@ -43,8 +43,8 @@ public enum StorageChannel
public final Class<? extends IAEStack> type; public final Class<? extends IAEStack> type;
private StorageChannel( Class<? extends IAEStack> t ) { StorageChannel( Class<? extends IAEStack> t ) {
type = t; this.type = t;
} }
public IItemList createList() { public IItemList createList() {
@@ -54,7 +54,7 @@ public interface IAEFluidStack extends IAEStack<IAEFluidStack>
* @return the copy. * @return the copy.
*/ */
@Override @Override
public IAEFluidStack copy(); IAEFluidStack copy();
/** /**
* Combines two IAEItemStacks via addition. * Combines two IAEItemStacks via addition.
@@ -44,7 +44,7 @@ public interface IAEItemStack extends IAEStack<IAEItemStack>
* *
* @return new ItemStack * @return new ItemStack
*/ */
public ItemStack getItemStack(); ItemStack getItemStack();
/** /**
* create a AE Item clone * create a AE Item clone
@@ -52,7 +52,7 @@ public interface IAEItemStack extends IAEStack<IAEItemStack>
* @return the copy * @return the copy
*/ */
@Override @Override
public IAEItemStack copy(); IAEItemStack copy();
/** /**
* is there NBT Data for this item? * is there NBT Data for this item?
@@ -23,7 +23,9 @@
package appeng.api.storage.data; package appeng.api.storage.data;
import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagCompound;
import appeng.api.features.IItemComparison; import appeng.api.features.IItemComparison;
/** /**
@@ -37,7 +39,7 @@ public interface IAETagCompound
/** /**
* @return a copy ( the copy will not be a IAETagCompound, it will be a NBTTagCompound ) * @return a copy ( the copy will not be a IAETagCompound, it will be a NBTTagCompound )
*/ */
public NBTTagCompound getNBTTagCompoundCopy(); NBTTagCompound getNBTTagCompoundCopy();
/** /**
* compare to other NBTTagCompounds or IAETagCompounds * compare to other NBTTagCompounds or IAETagCompounds
@@ -23,10 +23,11 @@
package appeng.api.storage.data; package appeng.api.storage.data;
import appeng.api.config.FuzzyMode;
import java.util.Collection; import java.util.Collection;
import appeng.api.config.FuzzyMode;
/** /**
* Represents a list of items in AE. * Represents a list of items in AE.
* *
@@ -42,7 +43,7 @@ public interface IItemContainer<StackType extends IAEStack>
* *
* @param option added stack * @param option added stack
*/ */
public void add(StackType option); // adds stack as is void add( StackType option ); // adds stack as is
/** /**
* @param i compared item * @param i compared item
@@ -55,11 +56,11 @@ public interface IItemContainer<StackType extends IAEStack>
* @param input compared item * @param input compared item
* @return a list of relevant fuzzy matched stacks * @return a list of relevant fuzzy matched stacks
*/ */
public Collection<StackType> findFuzzy(StackType input, FuzzyMode fuzzy); Collection<StackType> findFuzzy( StackType input, FuzzyMode fuzzy );
/** /**
* @return true if there are no items in the list * @return true if there are no items in the list
*/ */
public boolean isEmpty(); boolean isEmpty();
} }
@@ -41,14 +41,14 @@ public interface IItemList<StackType extends IAEStack> extends IItemContainer<St
* *
* @param option stacktype option * @param option stacktype option
*/ */
public void addStorage(StackType option); // adds a stack as stored void addStorage( StackType option ); // adds a stack as stored
/** /**
* add a stack to the list as craftable, this will merge the stack with an item already in the list if found. * add a stack to the list as craftable, this will merge the stack with an item already in the list if found.
* *
* @param option stacktype option * @param option stacktype option
*/ */
public void addCrafting(StackType option); void addCrafting( StackType option );
/** /**
* add a stack to the list, stack size is used to add to requestable, this will merge the stack with an item already * add a stack to the list, stack size is used to add to requestable, this will merge the stack with an item already
@@ -56,7 +56,7 @@ public interface IItemList<StackType extends IAEStack> extends IItemContainer<St
* *
* @param option stacktype option * @param option stacktype option
*/ */
public void addRequestable(StackType option); // adds a stack as requestable void addRequestable( StackType option ); // adds a stack as requestable
/** /**
* @return the first item in the list * @return the first item in the list
@@ -72,7 +72,7 @@ public interface IItemList<StackType extends IAEStack> extends IItemContainer<St
* allows you to iterate the list. * allows you to iterate the list.
*/ */
@Override @Override
public Iterator<StackType> iterator(); Iterator<StackType> iterator();
/** /**
* resets stack sizes to 0. * resets stack sizes to 0.
+5 -5
View File
@@ -89,9 +89,9 @@ public enum AEColor
AEColor(String unlocalizedName, int blackHex, int medHex, int whiteHex) { AEColor(String unlocalizedName, int blackHex, int medHex, int whiteHex) {
this.unlocalizedName = unlocalizedName; this.unlocalizedName = unlocalizedName;
blackVariant = blackHex; this.blackVariant = blackHex;
mediumVariant = medHex; this.mediumVariant = medHex;
whiteVariant = whiteHex; this.whiteVariant = whiteHex;
} }
/** /**
@@ -99,13 +99,13 @@ public enum AEColor
*/ */
public boolean matches(AEColor color) public boolean matches(AEColor color)
{ {
return equals(Transparent) || color.equals(Transparent) || equals(color); return this == Transparent || color == Transparent || this == color;
} }
@Override @Override
public String toString() public String toString()
{ {
return StatCollector.translateToLocal( unlocalizedName ); return StatCollector.translateToLocal( this.unlocalizedName );
} }
} }
@@ -56,7 +56,7 @@ public interface AEItemDefinition
ItemStack stack(int stackSize); ItemStack stack(int stackSize);
/** /**
* Compare {@link ItemStack} with this {@link AEItemDefinition} * Compare {@link ItemStack} with this
* *
* @param comparableItem compared item * @param comparableItem compared item
* @return true if the item stack is a matching item. * @return true if the item stack is a matching item.
@@ -37,20 +37,20 @@ public class DimensionalCoord extends WorldCoord
public DimensionalCoord(DimensionalCoord s) { public DimensionalCoord(DimensionalCoord s) {
super( s.x, s.y, s.z ); super( s.x, s.y, s.z );
w = s.w; this.w = s.w;
dimId = s.dimId; this.dimId = s.dimId;
} }
public DimensionalCoord(TileEntity s) { public DimensionalCoord(TileEntity s) {
super( s ); super( s );
w = s.getWorldObj(); this.w = s.getWorldObj();
dimId = w.provider.dimensionId; this.dimId = this.w.provider.dimensionId;
} }
public DimensionalCoord(World _w, int _x, int _y, int _z) { public DimensionalCoord(World _w, int _x, int _y, int _z) {
super( _x, _y, _z ); super( _x, _y, _z );
w = _w; this.w = _w;
dimId = _w.provider.dimensionId; this.dimId = _w.provider.dimensionId;
} }
@Override @Override
@@ -61,34 +61,34 @@ public class DimensionalCoord extends WorldCoord
public boolean isEqual(DimensionalCoord c) public boolean isEqual(DimensionalCoord c)
{ {
return x == c.x && y == c.y && z == c.z && c.w == this.w; return this.x == c.x && this.y == c.y && this.z == c.z && c.w == this.w;
} }
@Override @Override
public boolean equals(Object obj) public boolean equals(Object obj)
{ {
return obj instanceof DimensionalCoord && isEqual((DimensionalCoord) obj); return obj instanceof DimensionalCoord && this.isEqual((DimensionalCoord) obj);
} }
@Override @Override
public int hashCode() public int hashCode()
{ {
return super.hashCode() ^ dimId; return super.hashCode() ^ this.dimId;
} }
public boolean isInWorld(World world) public boolean isInWorld(World world)
{ {
return w == world; return this.w == world;
} }
@Override @Override
public String toString() public String toString()
{ {
return dimId + "," + super.toString(); return "dimension=" + this.dimId + ", " + super.toString();
} }
public World getWorld() public World getWorld()
{ {
return w; return this.w;
} }
} }
@@ -23,10 +23,10 @@
package appeng.api.util; package appeng.api.util;
import net.minecraft.nbt.NBTTagCompound;
import java.util.Set; import java.util.Set;
import net.minecraft.nbt.NBTTagCompound;
/** /**
* Used to adjust settings on an object, * Used to adjust settings on an object,
* *
@@ -70,9 +70,9 @@ public interface IConfigManager
/** /**
* write all settings to the NBT Tag so they can be read later. * write all settings to the NBT Tag so they can be read later.
* *
* @param dest to be written nbt tag * @param destination to be written nbt tag
*/ */
void writeToNBT(NBTTagCompound dest); void writeToNBT(NBTTagCompound destination);
/** /**
* Only works after settings have been registered * Only works after settings have been registered
+29 -29
View File
@@ -39,56 +39,56 @@ public class WorldCoord
public WorldCoord add(ForgeDirection direction, int length) public WorldCoord add(ForgeDirection direction, int length)
{ {
x += direction.offsetX * length; this.x += direction.offsetX * length;
y += direction.offsetY * length; this.y += direction.offsetY * length;
z += direction.offsetZ * length; this.z += direction.offsetZ * length;
return this; return this;
} }
public WorldCoord subtract(ForgeDirection direction, int length) public WorldCoord subtract(ForgeDirection direction, int length)
{ {
x -= direction.offsetX * length; this.x -= direction.offsetX * length;
y -= direction.offsetY * length; this.y -= direction.offsetY * length;
z -= direction.offsetZ * length; this.z -= direction.offsetZ * length;
return this; return this;
} }
public WorldCoord add(int _x, int _y, int _z) public WorldCoord add(int _x, int _y, int _z)
{ {
x += _x; this.x += _x;
y += _y; this.y += _y;
z += _z; this.z += _z;
return this; return this;
} }
public WorldCoord subtract(int _x, int _y, int _z) public WorldCoord subtract(int _x, int _y, int _z)
{ {
x -= _x; this.x -= _x;
y -= _y; this.y -= _y;
z -= _z; this.z -= _z;
return this; return this;
} }
public WorldCoord multiple(int _x, int _y, int _z) public WorldCoord multiple(int _x, int _y, int _z)
{ {
x *= _x; this.x *= _x;
y *= _y; this.y *= _y;
z *= _z; this.z *= _z;
return this; return this;
} }
public WorldCoord divide(int _x, int _y, int _z) public WorldCoord divide(int _x, int _y, int _z)
{ {
x /= _x; this.x /= _x;
y /= _y; this.y /= _y;
z /= _z; this.z /= _z;
return this; return this;
} }
public WorldCoord(int _x, int _y, int _z) { public WorldCoord(int _x, int _y, int _z) {
x = _x; this.x = _x;
y = _y; this.y = _y;
z = _z; this.z = _z;
} }
public WorldCoord(TileEntity s) { public WorldCoord(TileEntity s) {
@@ -100,9 +100,9 @@ public class WorldCoord
*/ */
public ForgeDirection directionTo(WorldCoord loc) public ForgeDirection directionTo(WorldCoord loc)
{ {
int ox = x - loc.x; int ox = this.x - loc.x;
int oy = y - loc.y; int oy = this.y - loc.y;
int oz = z - loc.z; int oz = this.z - loc.z;
int xlen = Math.abs( ox ); int xlen = Math.abs( ox );
int ylen = Math.abs( oy ); int ylen = Math.abs( oy );
@@ -131,29 +131,29 @@ public class WorldCoord
public boolean isEqual(WorldCoord c) public boolean isEqual(WorldCoord c)
{ {
return x == c.x && y == c.y && z == c.z; return this.x == c.x && this.y == c.y && this.z == c.z;
} }
public WorldCoord copy() public WorldCoord copy()
{ {
return new WorldCoord( x, y, z ); return new WorldCoord( this.x, this.y, this.z );
} }
@Override @Override
public boolean equals(Object obj) public boolean equals(Object obj)
{ {
return obj instanceof WorldCoord && isEqual((WorldCoord) obj); return obj instanceof WorldCoord && this.isEqual((WorldCoord) obj);
} }
@Override @Override
public String toString() public String toString()
{ {
return "" + x + "," + y + "," + z; return "x=" + this.x + ", y=" + this.y + ", z=" + this.z;
} }
@Override @Override
public int hashCode() public int hashCode()
{ {
return (y << 24) ^ x ^ z; return ( this.y << 24) ^ this.x ^ this.z;
} }
} }
+80 -80
View File
@@ -102,39 +102,39 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
protected AEBaseBlock( Class<? extends AEBaseBlock> c, Material mat ) protected AEBaseBlock( Class<? extends AEBaseBlock> c, Material mat )
{ {
this( c, mat, Optional.<String> absent() ); this( c, mat, Optional.<String> absent() );
setLightOpacity( 255 ); this.setLightOpacity( 255 );
setLightLevel( 0 ); this.setLightLevel( 0 );
setHardness( 2.2F ); this.setHardness( 2.2F );
setTileProvider( false ); this.setTileProvider( false );
setHarvestLevel( "pickaxe", 0 ); this.setHarvestLevel( "pickaxe", 0 );
} }
protected AEBaseBlock( Class<?> c, Material mat, Optional<String> subName ) protected AEBaseBlock( Class<?> c, Material mat, Optional<String> subName )
{ {
super( mat ); super( mat );
if ( mat == AEGlassMaterial.instance || mat == Material.glass ) if ( mat == AEGlassMaterial.INSTANCE || mat == Material.glass )
setStepSound( Block.soundTypeGlass ); this.setStepSound( Block.soundTypeGlass );
else if ( mat == Material.rock ) else if ( mat == Material.rock )
setStepSound( Block.soundTypeStone ); this.setStepSound( Block.soundTypeStone );
else if ( mat == Material.wood ) else if ( mat == Material.wood )
setStepSound( Block.soundTypeWood ); this.setStepSound( Block.soundTypeWood );
else else
setStepSound( Block.soundTypeMetal ); this.setStepSound( Block.soundTypeMetal );
featureFullName = new FeatureNameExtractor( c, subName ).get(); this.featureFullName = new FeatureNameExtractor( c, subName ).get();
featureSubName = subName; this.featureSubName = subName;
} }
@Override @Override
public String toString() public String toString()
{ {
return featureFullName; return this.featureFullName;
} }
public void registerNoIcons() public void registerNoIcons()
{ {
BlockRenderInfo info = getRendererInstance(); BlockRenderInfo info = this.getRendererInstance();
FlippableIcon i = new FlippableIcon( new MissingIcon( this ) ); FlippableIcon i = new FlippableIcon( new MissingIcon( this ) );
info.updateIcons( i, i, i, i, i, i ); info.updateIcons( i, i, i, i, i, i );
} }
@@ -147,9 +147,9 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
protected void setTileEntity( Class<? extends TileEntity> c ) protected void setTileEntity( Class<? extends TileEntity> c )
{ {
AEBaseTile.registerTileItem( c, new ItemStackSrc( this, 0 ) ); AEBaseTile.registerTileItem( c, new ItemStackSrc( this, 0 ) );
GameRegistry.registerTileEntity( tileEntityType = c, featureFullName ); GameRegistry.registerTileEntity( this.tileEntityType = c, this.featureFullName );
isInventory = IInventory.class.isAssignableFrom( c ); this.isInventory = IInventory.class.isAssignableFrom( c );
setTileProvider( hasBlockTileEntity() ); this.setTileProvider( this.hasBlockTileEntity() );
} }
// update Block value. // update Block value.
@@ -166,7 +166,7 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
@Override @Override
final public IFeatureHandler handler() final public IFeatureHandler handler()
{ {
return handler; return this.handler;
} }
@Override @Override
@@ -177,36 +177,36 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
public boolean isOpaque() public boolean isOpaque()
{ {
return isOpaque; return this.isOpaque;
} }
@Override @Override
public boolean renderAsNormalBlock() public boolean renderAsNormalBlock()
{ {
return isFullSize && isOpaque; return this.isFullSize && this.isOpaque;
} }
@Override @Override
@SideOnly( Side.CLIENT ) @SideOnly( Side.CLIENT )
public int getRenderType() public int getRenderType()
{ {
return WorldRender.instance.getRenderId(); return WorldRender.INSTANCE.getRenderId();
} }
@Override @Override
public IIcon getIcon( IBlockAccess w, int x, int y, int z, int s ) public IIcon getIcon( IBlockAccess w, int x, int y, int z, int s )
{ {
return getIcon( mapRotation( w, x, y, z, s ), w.getBlockMetadata( x, y, z ) ); return this.getIcon( this.mapRotation( w, x, y, z, s ), w.getBlockMetadata( x, y, z ) );
} }
@Override @Override
@SideOnly( Side.CLIENT ) @SideOnly( Side.CLIENT )
public IIcon getIcon( int direction, int metadata ) public IIcon getIcon( int direction, int metadata )
{ {
if ( renderIcon != null ) if ( this.renderIcon != null )
return renderIcon; return this.renderIcon;
return getRendererInstance().getTexture( ForgeDirection.getOrientation( direction ) ); return this.getRendererInstance().getTexture( ForgeDirection.getOrientation( direction ) );
} }
@Override @Override
@@ -220,7 +220,7 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
collisionHandler = ( ICustomCollision ) this; collisionHandler = ( ICustomCollision ) this;
else else
{ {
AEBaseTile te = getTileEntity( w, x, y, z ); AEBaseTile te = this.getTileEntity( w, x, y, z );
if ( te instanceof ICustomCollision ) if ( te instanceof ICustomCollision )
collisionHandler = ( ICustomCollision ) te; collisionHandler = ( ICustomCollision ) te;
} }
@@ -256,7 +256,7 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
collisionHandler = ( ICustomCollision ) this; collisionHandler = ( ICustomCollision ) this;
else else
{ {
AEBaseTile te = getTileEntity( w, x, y, z ); AEBaseTile te = this.getTileEntity( w, x, y, z );
if ( te instanceof ICustomCollision ) if ( te instanceof ICustomCollision )
collisionHandler = ( ICustomCollision ) te; collisionHandler = ( ICustomCollision ) te;
} }
@@ -275,11 +275,11 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
for ( AxisAlignedBB bb : bbs ) for ( AxisAlignedBB bb : bbs )
{ {
setBlockBounds( ( float ) bb.minX, ( float ) bb.minY, ( float ) bb.minZ, ( float ) bb.maxX, ( float ) bb.maxY, ( float ) bb.maxZ ); this.setBlockBounds( ( float ) bb.minX, ( float ) bb.minY, ( float ) bb.minZ, ( float ) bb.maxX, ( float ) bb.maxY, ( float ) bb.maxZ );
MovingObjectPosition r = super.collisionRayTrace( w, x, y, z, ld.a, ld.b ); MovingObjectPosition r = super.collisionRayTrace( w, x, y, z, ld.a, ld.b );
setBlockBounds( 0, 0, 0, 1, 1, 1 ); this.setBlockBounds( 0, 0, 0, 1, 1, 1 );
if ( r != null ) if ( r != null )
{ {
@@ -330,7 +330,7 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
@Override @Override
final public boolean isOpaqueCube() final public boolean isOpaqueCube()
{ {
return isOpaque; return this.isOpaque;
} }
@Override @Override
@@ -342,7 +342,7 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
collisionHandler = ( ICustomCollision ) this; collisionHandler = ( ICustomCollision ) this;
else else
{ {
AEBaseTile te = getTileEntity( w, x, y, z ); AEBaseTile te = this.getTileEntity( w, x, y, z );
if ( te instanceof ICustomCollision ) if ( te instanceof ICustomCollision )
collisionHandler = ( ICustomCollision ) te; collisionHandler = ( ICustomCollision ) te;
} }
@@ -356,11 +356,11 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
for ( AxisAlignedBB bb : bbs ) for ( AxisAlignedBB bb : bbs )
{ {
setBlockBounds( ( float ) bb.minX, ( float ) bb.minY, ( float ) bb.minZ, ( float ) bb.maxX, ( float ) bb.maxY, ( float ) bb.maxZ ); this.setBlockBounds( ( float ) bb.minX, ( float ) bb.minY, ( float ) bb.minZ, ( float ) bb.maxX, ( float ) bb.maxY, ( float ) bb.maxZ );
MovingObjectPosition r = super.collisionRayTrace( w, x, y, z, a, b ); MovingObjectPosition r = super.collisionRayTrace( w, x, y, z, a, b );
setBlockBounds( 0, 0, 0, 1, 1, 1 ); this.setBlockBounds( 0, 0, 0, 1, 1, 1 );
if ( r != null ) if ( r != null )
{ {
@@ -384,7 +384,7 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
return null; return null;
} }
setBlockBounds( 0, 0, 0, 1, 1, 1 ); this.setBlockBounds( 0, 0, 0, 1, 1, 1 );
return super.collisionRayTrace( w, x, y, z, a, b ); return super.collisionRayTrace( w, x, y, z, a, b );
} }
@@ -401,7 +401,7 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
Block id = w.getBlock( x, y, z ); Block id = w.getBlock( x, y, z );
if ( id != null ) if ( id != null )
{ {
AEBaseTile tile = getTileEntity( w, x, y, z ); AEBaseTile tile = this.getTileEntity( w, x, y, z );
ItemStack[] drops = Platform.getBlockDrops( w, x, y, z ); ItemStack[] drops = Platform.getBlockDrops( w, x, y, z );
if ( tile == null ) if ( tile == null )
@@ -436,10 +436,10 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
IMemoryCard memoryCard = ( IMemoryCard ) is.getItem(); IMemoryCard memoryCard = ( IMemoryCard ) is.getItem();
if ( player.isSneaking() ) if ( player.isSneaking() )
{ {
AEBaseTile t = getTileEntity( w, x, y, z ); AEBaseTile t = this.getTileEntity( w, x, y, z );
if ( t != null ) if ( t != null )
{ {
String name = getUnlocalizedName(); String name = this.getUnlocalizedName();
NBTTagCompound data = t.downloadSettings( SettingsFrom.MEMORY_CARD ); NBTTagCompound data = t.downloadSettings( SettingsFrom.MEMORY_CARD );
if ( data != null ) if ( data != null )
{ {
@@ -453,9 +453,9 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
{ {
String name = memoryCard.getSettingsName( is ); String name = memoryCard.getSettingsName( is );
NBTTagCompound data = memoryCard.getData( is ); NBTTagCompound data = memoryCard.getData( is );
if ( getUnlocalizedName().equals( name ) ) if ( this.getUnlocalizedName().equals( name ) )
{ {
AEBaseTile t = getTileEntity( w, x, y, z ); AEBaseTile t = this.getTileEntity( w, x, y, z );
t.uploadSettings( SettingsFrom.MEMORY_CARD, data ); t.uploadSettings( SettingsFrom.MEMORY_CARD, data );
memoryCard.notifyUser( player, MemoryCardMessages.SETTINGS_LOADED ); memoryCard.notifyUser( player, MemoryCardMessages.SETTINGS_LOADED );
} }
@@ -467,7 +467,7 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
} }
} }
return onActivated( w, x, y, z, player, side, hitX, hitY, hitZ ); return this.onActivated( w, x, y, z, player, side, hitX, hitY, hitZ );
} }
public boolean onActivated( World w, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ ) public boolean onActivated( World w, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ )
@@ -480,7 +480,7 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
{ {
if ( is.hasDisplayName() ) if ( is.hasDisplayName() )
{ {
TileEntity te = getTileEntity( w, x, y, z ); TileEntity te = this.getTileEntity( w, x, y, z );
if ( te instanceof AEBaseTile ) if ( te instanceof AEBaseTile )
( ( AEBaseTile ) w.getTileEntity( x, y, z ) ).setName( is.getDisplayName() ); ( ( AEBaseTile ) w.getTileEntity( x, y, z ) ).setName( is.getDisplayName() );
} }
@@ -497,13 +497,13 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
@Override @Override
public boolean hasComparatorInputOverride() public boolean hasComparatorInputOverride()
{ {
return isInventory; return this.isInventory;
} }
@Override @Override
public int getComparatorInputOverride( World w, int x, int y, int z, int s ) public int getComparatorInputOverride( World w, int x, int y, int z, int s )
{ {
TileEntity te = getTileEntity( w, x, y, z ); TileEntity te = this.getTileEntity( w, x, y, z );
if ( te instanceof IInventory ) if ( te instanceof IInventory )
return Container.calcRedstoneFromInventory( ( IInventory ) te ); return Container.calcRedstoneFromInventory( ( IInventory ) te );
return 0; return 0;
@@ -513,7 +513,7 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
@SideOnly( Side.CLIENT ) @SideOnly( Side.CLIENT )
public void registerBlockIcons( IIconRegister iconRegistry ) public void registerBlockIcons( IIconRegister iconRegistry )
{ {
BlockRenderInfo info = getRendererInstance(); BlockRenderInfo info = this.getRendererInstance();
FlippableIcon topIcon; FlippableIcon topIcon;
FlippableIcon bottomIcon; FlippableIcon bottomIcon;
FlippableIcon sideIcon; FlippableIcon sideIcon;
@@ -522,13 +522,13 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
FlippableIcon southIcon; FlippableIcon southIcon;
FlippableIcon northIcon; FlippableIcon northIcon;
this.blockIcon = topIcon = optionalIcon( iconRegistry, this.getTextureName(), null ); this.blockIcon = topIcon = this.optionalIcon( iconRegistry, this.getTextureName(), null );
bottomIcon = optionalIcon( iconRegistry, this.getTextureName() + "Bottom", topIcon ); bottomIcon = this.optionalIcon( iconRegistry, this.getTextureName() + "Bottom", topIcon );
sideIcon = optionalIcon( iconRegistry, this.getTextureName() + "Side", topIcon ); sideIcon = this.optionalIcon( iconRegistry, this.getTextureName() + "Side", topIcon );
eastIcon = optionalIcon( iconRegistry, this.getTextureName() + "East", sideIcon ); eastIcon = this.optionalIcon( iconRegistry, this.getTextureName() + "East", sideIcon );
westIcon = optionalIcon( iconRegistry, this.getTextureName() + "West", sideIcon ); westIcon = this.optionalIcon( iconRegistry, this.getTextureName() + "West", sideIcon );
southIcon = optionalIcon( iconRegistry, this.getTextureName() + "Front", sideIcon ); southIcon = this.optionalIcon( iconRegistry, this.getTextureName() + "Front", sideIcon );
northIcon = optionalIcon( iconRegistry, this.getTextureName() + "Back", sideIcon ); northIcon = this.optionalIcon( iconRegistry, this.getTextureName() + "Back", sideIcon );
info.updateIcons( bottomIcon, topIcon, northIcon, southIcon, eastIcon, westIcon ); info.updateIcons( bottomIcon, topIcon, northIcon, southIcon, eastIcon, westIcon );
} }
@@ -536,7 +536,7 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
@Override @Override
final public boolean isNormalCube( IBlockAccess world, int x, int y, int z ) final public boolean isNormalCube( IBlockAccess world, int x, int y, int z )
{ {
return isFullSize; return this.isFullSize;
} }
@Override @Override
@@ -544,9 +544,9 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
{ {
IOrientable rotatable = null; IOrientable rotatable = null;
if ( hasBlockTileEntity() ) if ( this.hasBlockTileEntity() )
{ {
rotatable = ( AEBaseTile ) getTileEntity( w, x, y, z ); rotatable = ( AEBaseTile ) this.getTileEntity( w, x, y, z );
} }
else if ( this instanceof IOrientableBlock ) else if ( this instanceof IOrientableBlock )
{ {
@@ -555,9 +555,9 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
if ( rotatable != null && rotatable.canBeRotated() ) if ( rotatable != null && rotatable.canBeRotated() )
{ {
if ( hasCustomRotation() ) if ( this.hasCustomRotation() )
{ {
customRotateBlock( rotatable, axis ); this.customRotateBlock( rotatable, axis );
return true; return true;
} }
else else
@@ -600,9 +600,9 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
@Override @Override
final public ForgeDirection[] getValidRotations( World w, int x, int y, int z ) final public ForgeDirection[] getValidRotations( World w, int x, int y, int z )
{ {
if ( hasBlockTileEntity() ) if ( this.hasBlockTileEntity() )
{ {
AEBaseTile obj = getTileEntity( w, x, y, z ); AEBaseTile obj = this.getTileEntity( w, x, y, z );
if ( obj != null && obj.canBeRotated() ) if ( obj != null && obj.canBeRotated() )
{ {
return ForgeDirection.VALID_DIRECTIONS; return ForgeDirection.VALID_DIRECTIONS;
@@ -615,7 +615,7 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
@Override @Override
public boolean recolourBlock( World world, int x, int y, int z, ForgeDirection side, int colour ) public boolean recolourBlock( World world, int x, int y, int z, ForgeDirection side, int colour )
{ {
TileEntity te = getTileEntity( world, x, y, z ); TileEntity te = this.getTileEntity( world, x, y, z );
if ( te instanceof IColorableTile ) if ( te instanceof IColorableTile )
{ {
@@ -637,12 +637,12 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
@SideOnly( Side.CLIENT ) @SideOnly( Side.CLIENT )
public BlockRenderInfo getRendererInstance() public BlockRenderInfo getRendererInstance()
{ {
if ( renderInfo != null ) if ( this.renderInfo != null )
return renderInfo; return this.renderInfo;
try try
{ {
return renderInfo = new BlockRenderInfo( getRenderer().newInstance() ); return this.renderInfo = new BlockRenderInfo( this.getRenderer().newInstance() );
} }
catch ( Throwable t ) catch ( Throwable t )
{ {
@@ -694,9 +694,9 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
{ {
IOrientable ori = null; IOrientable ori = null;
if ( hasBlockTileEntity() ) if ( this.hasBlockTileEntity() )
{ {
ori = ( AEBaseTile ) getTileEntity( w, x, y, z ); ori = ( AEBaseTile ) this.getTileEntity( w, x, y, z );
} }
else if ( this instanceof IOrientableBlock ) else if ( this instanceof IOrientableBlock )
{ {
@@ -705,7 +705,7 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
if ( ori != null && ori.canBeRotated() ) if ( ori != null && ori.canBeRotated() )
{ {
return mapRotation( ori, ForgeDirection.getOrientation( s ) ).ordinal(); return this.mapRotation( ori, ForgeDirection.getOrientation( s ) ).ordinal();
} }
return s; return s;
@@ -713,16 +713,16 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
public boolean hasBlockTileEntity() public boolean hasBlockTileEntity()
{ {
return tileEntityType != null; return this.tileEntityType != null;
} }
public <T extends TileEntity> T getTileEntity( IBlockAccess w, int x, int y, int z ) public <T extends TileEntity> T getTileEntity( IBlockAccess w, int x, int y, int z )
{ {
if ( !hasBlockTileEntity() ) if ( !this.hasBlockTileEntity() )
return null; return null;
TileEntity te = w.getTileEntity( x, y, z ); TileEntity te = w.getTileEntity( x, y, z );
if ( tileEntityType.isInstance( te ) ) if ( this.tileEntityType.isInstance( te ) )
return ( T ) te; return ( T ) te;
return null; return null;
@@ -752,19 +752,19 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
if ( dx.offsetX == west_x && dx.offsetY == west_y && dx.offsetZ == west_z ) if ( dx.offsetX == west_x && dx.offsetY == west_y && dx.offsetZ == west_z )
west = dx; west = dx;
if ( dir.equals( forward ) ) if ( dir == forward )
return ForgeDirection.SOUTH; return ForgeDirection.SOUTH;
if ( dir.equals( forward.getOpposite() ) ) if ( dir == forward.getOpposite() )
return ForgeDirection.NORTH; return ForgeDirection.NORTH;
if ( dir.equals( up ) ) if ( dir == up )
return ForgeDirection.UP; return ForgeDirection.UP;
if ( dir.equals( up.getOpposite() ) ) if ( dir == up.getOpposite() )
return ForgeDirection.DOWN; return ForgeDirection.DOWN;
if ( dir.equals( west ) ) if ( dir == west )
return ForgeDirection.WEST; return ForgeDirection.WEST;
if ( dir.equals( west.getOpposite() ) ) if ( dir == west.getOpposite() )
return ForgeDirection.EAST; return ForgeDirection.EAST;
return ForgeDirection.UNKNOWN; return ForgeDirection.UNKNOWN;
@@ -772,7 +772,7 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
public Class<? extends TileEntity> getTileEntityClass() public Class<? extends TileEntity> getTileEntityClass()
{ {
return tileEntityType; return this.tileEntityType;
} }
@SideOnly( Side.CLIENT ) @SideOnly( Side.CLIENT )
@@ -784,11 +784,11 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
@Override @Override
final public TileEntity createNewTileEntity( World var1, int var2 ) final public TileEntity createNewTileEntity( World var1, int var2 )
{ {
if ( hasBlockTileEntity() ) if ( this.hasBlockTileEntity() )
{ {
try try
{ {
return tileEntityType.newInstance(); return this.tileEntityType.newInstance();
} }
catch ( Throwable e ) catch ( Throwable e )
{ {
@@ -801,7 +801,7 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
@Override @Override
public void breakBlock( World w, int x, int y, int z, Block a, int b ) public void breakBlock( World w, int x, int y, int z, Block a, int b )
{ {
AEBaseTile te = getTileEntity( w, x, y, z ); AEBaseTile te = this.getTileEntity( w, x, y, z );
if ( te != null ) if ( te != null )
{ {
ArrayList<ItemStack> drops = new ArrayList<ItemStack>(); ArrayList<ItemStack> drops = new ArrayList<ItemStack>();
@@ -821,7 +821,7 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
public String getUnlocalizedName( ItemStack is ) public String getUnlocalizedName( ItemStack is )
{ {
return getUnlocalizedName(); return this.getUnlocalizedName();
} }
public void addInformation( ItemStack is, EntityPlayer player, List<String> lines, boolean advancedItemTooltips ) public void addInformation( ItemStack is, EntityPlayer player, List<String> lines, boolean advancedItemTooltips )
@@ -836,6 +836,6 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
public boolean hasSubtypes() public boolean hasSubtypes()
{ {
return hasSubtypes; return this.hasSubtypes;
} }
} }
+19 -17
View File
@@ -28,6 +28,10 @@ import net.minecraft.util.MathHelper;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraftforge.client.MinecraftForgeClient; import net.minecraftforge.client.MinecraftForgeClient;
import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.common.util.ForgeDirection;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import appeng.api.util.IOrientable; import appeng.api.util.IOrientable;
import appeng.api.util.IOrientableBlock; import appeng.api.util.IOrientableBlock;
import appeng.block.misc.BlockLightDetector; import appeng.block.misc.BlockLightDetector;
@@ -37,8 +41,6 @@ import appeng.client.render.ItemRenderer;
import appeng.me.helpers.IGridProxyable; import appeng.me.helpers.IGridProxyable;
import appeng.tile.AEBaseTile; import appeng.tile.AEBaseTile;
import appeng.util.Platform; import appeng.util.Platform;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class AEBaseItemBlock extends ItemBlock public class AEBaseItemBlock extends ItemBlock
{ {
@@ -48,17 +50,17 @@ public class AEBaseItemBlock extends ItemBlock
public AEBaseItemBlock(Block id) public AEBaseItemBlock(Block id)
{ {
super( id ); super( id );
blockType = (AEBaseBlock) id; this.blockType = (AEBaseBlock) id;
hasSubtypes = blockType.hasSubtypes; this.hasSubtypes = this.blockType.hasSubtypes;
if ( Platform.isClient() ) if ( Platform.isClient() )
MinecraftForgeClient.registerItemRenderer( this, ItemRenderer.instance ); MinecraftForgeClient.registerItemRenderer( this, ItemRenderer.INSTANCE );
} }
@Override @Override
public int getMetadata(int dmg) public int getMetadata(int dmg)
{ {
if ( hasSubtypes ) if ( this.hasSubtypes )
return dmg; return dmg;
return 0; return 0;
} }
@@ -66,7 +68,7 @@ public class AEBaseItemBlock extends ItemBlock
@Override @Override
public String getUnlocalizedName(ItemStack is) public String getUnlocalizedName(ItemStack is)
{ {
return blockType.getUnlocalizedName( is ); return this.blockType.getUnlocalizedName( is );
} }
@Override @Override
@@ -91,9 +93,9 @@ public class AEBaseItemBlock extends ItemBlock
IOrientable ori = null; IOrientable ori = null;
if ( blockType.hasBlockTileEntity() ) if ( this.blockType.hasBlockTileEntity() )
{ {
if ( blockType instanceof BlockLightDetector ) if ( this.blockType instanceof BlockLightDetector )
{ {
up = ForgeDirection.getOrientation( side ); up = ForgeDirection.getOrientation( side );
if ( up == ForgeDirection.UP || up == ForgeDirection.DOWN ) if ( up == ForgeDirection.UP || up == ForgeDirection.DOWN )
@@ -101,7 +103,7 @@ public class AEBaseItemBlock extends ItemBlock
else else
forward = ForgeDirection.UP; forward = ForgeDirection.UP;
} }
else if ( blockType instanceof BlockWireless || blockType instanceof BlockSkyCompass ) else if ( this.blockType instanceof BlockWireless || this.blockType instanceof BlockSkyCompass )
{ {
forward = ForgeDirection.getOrientation( side ); forward = ForgeDirection.getOrientation( side );
if ( forward == ForgeDirection.UP || forward == ForgeDirection.DOWN ) if ( forward == ForgeDirection.UP || forward == ForgeDirection.DOWN )
@@ -145,9 +147,9 @@ public class AEBaseItemBlock extends ItemBlock
} }
} }
if ( blockType instanceof IOrientableBlock ) if ( this.blockType instanceof IOrientableBlock )
{ {
ori = ((IOrientableBlock) blockType).getOrientable( w, x, y, z ); ori = ((IOrientableBlock) this.blockType).getOrientable( w, x, y, z );
up = ForgeDirection.getOrientation( side ); up = ForgeDirection.getOrientation( side );
forward = ForgeDirection.SOUTH; forward = ForgeDirection.SOUTH;
if ( up.offsetY == 0 ) if ( up.offsetY == 0 )
@@ -156,20 +158,20 @@ public class AEBaseItemBlock extends ItemBlock
ori.setOrientation( forward, up ); ori.setOrientation( forward, up );
} }
if ( !blockType.isValidOrientation( w, x, y, z, forward, up ) ) if ( !this.blockType.isValidOrientation( w, x, y, z, forward, up ) )
return false; return false;
if ( super.placeBlockAt( stack, player, w, x, y, z, side, hitX, hitY, hitZ, metadata ) ) if ( super.placeBlockAt( stack, player, w, x, y, z, side, hitX, hitY, hitZ, metadata ) )
{ {
if ( blockType.hasBlockTileEntity() && !(blockType instanceof BlockLightDetector) ) if ( this.blockType.hasBlockTileEntity() && !(this.blockType instanceof BlockLightDetector) )
{ {
AEBaseTile tile = blockType.getTileEntity( w, x, y, z ); AEBaseTile tile = this.blockType.getTileEntity( w, x, y, z );
ori = tile; ori = tile;
if ( tile == null ) if ( tile == null )
return true; return true;
if ( ori.canBeRotated() && !blockType.hasCustomRotation() ) if ( ori.canBeRotated() && !this.blockType.hasCustomRotation() )
{ {
if ( ori.getForward() == null || ori.getUp() == null || // null if ( ori.getForward() == null || ori.getUp() == null || // null
tile.getForward() == ForgeDirection.UNKNOWN || ori.getUp() == ForgeDirection.UNKNOWN ) tile.getForward() == ForgeDirection.UNKNOWN || ori.getUp() == ForgeDirection.UNKNOWN )
@@ -183,7 +185,7 @@ public class AEBaseItemBlock extends ItemBlock
tile.onPlacement( stack, player, side ); tile.onPlacement( stack, player, side );
} }
else if ( blockType instanceof IOrientableBlock ) else if ( this.blockType instanceof IOrientableBlock )
{ {
ori.setOrientation( forward, up ); ori.setOrientation( forward, up );
} }
@@ -88,47 +88,47 @@ public class AEBaseItemBlockChargeable extends AEBaseItemBlock implements IAEIte
@Override @Override
public double injectAEPower(ItemStack is, double amt) public double injectAEPower(ItemStack is, double amt)
{ {
double internalCurrentPower = getInternal( is ); double internalCurrentPower = this.getInternal( is );
double internalMaxPower = getMaxEnergyCapacity(); double internalMaxPower = this.getMaxEnergyCapacity();
internalCurrentPower += amt; internalCurrentPower += amt;
if ( internalCurrentPower > internalMaxPower ) if ( internalCurrentPower > internalMaxPower )
{ {
amt = internalCurrentPower - internalMaxPower; amt = internalCurrentPower - internalMaxPower;
internalCurrentPower = internalMaxPower; internalCurrentPower = internalMaxPower;
setInternal( is, internalCurrentPower ); this.setInternal( is, internalCurrentPower );
return amt; return amt;
} }
setInternal( is, internalCurrentPower ); this.setInternal( is, internalCurrentPower );
return 0; return 0;
} }
@Override @Override
public double extractAEPower(ItemStack is, double amt) public double extractAEPower(ItemStack is, double amt)
{ {
double internalCurrentPower = getInternal( is ); double internalCurrentPower = this.getInternal( is );
if ( internalCurrentPower > amt ) if ( internalCurrentPower > amt )
{ {
internalCurrentPower -= amt; internalCurrentPower -= amt;
setInternal( is, internalCurrentPower ); this.setInternal( is, internalCurrentPower );
return amt; return amt;
} }
amt = internalCurrentPower; amt = internalCurrentPower;
setInternal( is, 0 ); this.setInternal( is, 0 );
return amt; return amt;
} }
@Override @Override
public double getAEMaxPower(ItemStack is) public double getAEMaxPower(ItemStack is)
{ {
return getMaxEnergyCapacity(); return this.getMaxEnergyCapacity();
} }
@Override @Override
public double getAECurrentPower(ItemStack is) public double getAECurrentPower(ItemStack is)
{ {
return getInternal( is ); return this.getInternal( is );
} }
@Override @Override
@@ -20,13 +20,15 @@ package appeng.block.crafting;
import java.util.List; import java.util.List;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.creativetab.CreativeTabs; import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon; import net.minecraft.util.IIcon;
import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.common.util.ForgeDirection;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import appeng.api.AEApi; import appeng.api.AEApi;
import appeng.client.render.BaseBlockRender; import appeng.client.render.BaseBlockRender;
import appeng.client.render.blocks.RenderBlockCraftingCPUMonitor; import appeng.client.render.blocks.RenderBlockCraftingCPUMonitor;
@@ -20,12 +20,14 @@ package appeng.block.crafting;
import java.util.List; import java.util.List;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.creativetab.CreativeTabs; import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon; import net.minecraft.util.IIcon;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import appeng.client.texture.ExtraBlockTextures; import appeng.client.texture.ExtraBlockTextures;
import appeng.tile.crafting.TileCraftingStorageTile; import appeng.tile.crafting.TileCraftingStorageTile;
@@ -35,7 +37,7 @@ public class BlockCraftingStorage extends BlockCraftingUnit
{ {
super( BlockCraftingStorage.class ); super( BlockCraftingStorage.class );
setTileEntity( TileCraftingStorageTile.class ); this.setTileEntity( TileCraftingStorageTile.class );
} }
@Override @Override
@@ -56,7 +58,7 @@ public class BlockCraftingStorage extends BlockCraftingUnit
if ( is.getItemDamage() == 3 ) if ( is.getItemDamage() == 3 )
return "tile.appliedenergistics2.BlockCraftingStorage64k"; return "tile.appliedenergistics2.BlockCraftingStorage64k";
return getItemUnlocalizedName( is ); return this.getItemUnlocalizedName( is );
} }
@Override @Override
@@ -21,8 +21,6 @@ package appeng.block.crafting;
import java.util.EnumSet; import java.util.EnumSet;
import java.util.List; import java.util.List;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.block.material.Material; import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs; import net.minecraft.creativetab.CreativeTabs;
@@ -32,6 +30,10 @@ import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon; import net.minecraft.util.IIcon;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.common.util.ForgeDirection;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import appeng.block.AEBaseBlock; import appeng.block.AEBaseBlock;
import appeng.client.render.BaseBlockRender; import appeng.client.render.BaseBlockRender;
import appeng.client.render.blocks.RenderBlockCraftingCPU; import appeng.client.render.blocks.RenderBlockCraftingCPU;
@@ -49,21 +51,21 @@ public class BlockCraftingUnit extends AEBaseBlock
{ {
super( childClass, Material.iron ); super( childClass, Material.iron );
hasSubtypes = true; this.hasSubtypes = true;
setFeature( EnumSet.of( AEFeature.CraftingCPU ) ); this.setFeature( EnumSet.of( AEFeature.CraftingCPU ) );
} }
public BlockCraftingUnit() public BlockCraftingUnit()
{ {
this( BlockCraftingUnit.class ); this( BlockCraftingUnit.class );
setTileEntity( TileCraftingTile.class ); this.setTileEntity( TileCraftingTile.class );
} }
@Override @Override
public boolean onActivated(World w, int x, int y, int z, EntityPlayer p, int side, float hitX, float hitY, float hitZ) public boolean onActivated(World w, int x, int y, int z, EntityPlayer p, int side, float hitX, float hitY, float hitZ)
{ {
TileCraftingTile tg = getTileEntity( w, x, y, z ); TileCraftingTile tg = this.getTileEntity( w, x, y, z );
if ( tg != null && !p.isSneaking() && tg.isFormed() && tg.isActive() ) if ( tg != null && !p.isSneaking() && tg.isFormed() && tg.isActive() )
{ {
if ( Platform.isClient() ) if ( Platform.isClient() )
@@ -80,7 +82,7 @@ public class BlockCraftingUnit extends AEBaseBlock
public int getDamageValue(World w, int x, int y, int z) public int getDamageValue(World w, int x, int y, int z)
{ {
int meta = w.getBlockMetadata( x, y, z ); int meta = w.getBlockMetadata( x, y, z );
return damageDropped( meta ); return this.damageDropped( meta );
} }
@Override @Override
@@ -95,7 +97,7 @@ public class BlockCraftingUnit extends AEBaseBlock
if ( is.getItemDamage() == 1 ) if ( is.getItemDamage() == 1 )
return "tile.appliedenergistics2.BlockCraftingAccelerator"; return "tile.appliedenergistics2.BlockCraftingAccelerator";
return getItemUnlocalizedName( is ); return this.getItemUnlocalizedName( is );
} }
protected String getItemUnlocalizedName(ItemStack is) protected String getItemUnlocalizedName(ItemStack is)
@@ -106,9 +108,9 @@ public class BlockCraftingUnit extends AEBaseBlock
@Override @Override
public void setRenderStateByMeta(int itemDamage) public void setRenderStateByMeta(int itemDamage)
{ {
IIcon front = getIcon( ForgeDirection.SOUTH.ordinal(), itemDamage ); IIcon front = this.getIcon( ForgeDirection.SOUTH.ordinal(), itemDamage );
IIcon other = getIcon( ForgeDirection.NORTH.ordinal(), itemDamage ); IIcon other = this.getIcon( ForgeDirection.NORTH.ordinal(), itemDamage );
getRendererInstance().setTemporaryRenderIcons( other, other, front, other, other, other ); this.getRendererInstance().setTemporaryRenderIcons( other, other, front, other, other, other );
} }
@Override @Override
@@ -137,7 +139,7 @@ public class BlockCraftingUnit extends AEBaseBlock
@Override @Override
public void breakBlock(World w, int x, int y, int z, Block a, int b) public void breakBlock(World w, int x, int y, int z, Block a, int b)
{ {
TileCraftingTile cp = getTileEntity( w, x, y, z ); TileCraftingTile cp = this.getTileEntity( w, x, y, z );
if ( cp != null ) if ( cp != null )
cp.breakCluster(); cp.breakCluster();
@@ -147,7 +149,7 @@ public class BlockCraftingUnit extends AEBaseBlock
@Override @Override
public void onNeighborBlockChange(World w, int x, int y, int z, Block junk) public void onNeighborBlockChange(World w, int x, int y, int z, Block junk)
{ {
TileCraftingTile cp = getTileEntity( w, x, y, z ); TileCraftingTile cp = this.getTileEntity( w, x, y, z );
if ( cp != null ) if ( cp != null )
cp.updateMultiBlock(); cp.updateMultiBlock();
} }
@@ -24,6 +24,10 @@ import net.minecraft.block.material.Material;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.common.util.ForgeDirection;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import appeng.block.AEBaseBlock; import appeng.block.AEBaseBlock;
import appeng.client.render.BaseBlockRender; import appeng.client.render.BaseBlockRender;
import appeng.client.render.blocks.RenderBlockAssembler; import appeng.client.render.blocks.RenderBlockAssembler;
@@ -31,18 +35,16 @@ import appeng.core.features.AEFeature;
import appeng.core.sync.GuiBridge; import appeng.core.sync.GuiBridge;
import appeng.tile.crafting.TileMolecularAssembler; import appeng.tile.crafting.TileMolecularAssembler;
import appeng.util.Platform; import appeng.util.Platform;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class BlockMolecularAssembler extends AEBaseBlock public class BlockMolecularAssembler extends AEBaseBlock
{ {
public BlockMolecularAssembler() { public BlockMolecularAssembler() {
super( BlockMolecularAssembler.class, Material.iron ); super( BlockMolecularAssembler.class, Material.iron );
setFeature( EnumSet.of( AEFeature.MolecularAssembler ) ); this.setFeature( EnumSet.of( AEFeature.MolecularAssembler ) );
setTileEntity( TileMolecularAssembler.class ); this.setTileEntity( TileMolecularAssembler.class );
isOpaque = false; this.isOpaque = false;
lightOpacity = 1; this.lightOpacity = 1;
} }
public static boolean booleanAlphaPass = false; public static boolean booleanAlphaPass = false;
@@ -70,7 +72,7 @@ public class BlockMolecularAssembler extends AEBaseBlock
@Override @Override
public boolean onActivated(World w, int x, int y, int z, EntityPlayer p, int side, float hitX, float hitY, float hitZ) public boolean onActivated(World w, int x, int y, int z, EntityPlayer p, int side, float hitX, float hitY, float hitZ)
{ {
TileMolecularAssembler tg = getTileEntity( w, x, y, z ); TileMolecularAssembler tg = this.getTileEntity( w, x, y, z );
if ( tg != null && !p.isSneaking() ) if ( tg != null && !p.isSneaking() )
{ {
Platform.openGUI( p, tg, ForgeDirection.getOrientation( side ), GuiBridge.GUI_MAC ); Platform.openGUI( p, tg, ForgeDirection.getOrientation( side ), GuiBridge.GUI_MAC );
@@ -20,6 +20,7 @@ package appeng.block.crafting;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import appeng.api.AEApi; import appeng.api.AEApi;
import appeng.block.AEBaseItemBlock; import appeng.block.AEBaseItemBlock;
import appeng.core.AEConfig; import appeng.core.AEConfig;
@@ -29,6 +29,7 @@ import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraftforge.common.util.FakePlayer; import net.minecraftforge.common.util.FakePlayer;
import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.common.util.ForgeDirection;
import appeng.api.implementations.tiles.ICrankable; import appeng.api.implementations.tiles.ICrankable;
import appeng.block.AEBaseBlock; import appeng.block.AEBaseBlock;
import appeng.client.render.BaseBlockRender; import appeng.client.render.BaseBlockRender;
@@ -43,10 +44,11 @@ public class BlockCrank extends AEBaseBlock
public BlockCrank() { public BlockCrank() {
super( BlockCrank.class, Material.wood ); super( BlockCrank.class, Material.wood );
setFeature( EnumSet.of( AEFeature.GrindStone ) ); this.setFeature( EnumSet.of( AEFeature.GrindStone ) );
setTileEntity( TileCrank.class ); this.setTileEntity( TileCrank.class );
setLightOpacity( 0 ); this.setLightOpacity( 0 );
isFullSize = isOpaque = false; this.setHarvestLevel( "axe", 0 );
this.isFullSize = this.isOpaque = false;
} }
@Override @Override
@@ -54,11 +56,11 @@ public class BlockCrank extends AEBaseBlock
{ {
if ( player instanceof FakePlayer || player == null ) if ( player instanceof FakePlayer || player == null )
{ {
dropCrank(w, x, y, z); this.dropCrank(w, x, y, z);
return true; return true;
} }
AEBaseTile tile = getTileEntity( w, x, y, z ); AEBaseTile tile = this.getTileEntity( w, x, y, z );
if ( tile instanceof TileCrank ) if ( tile instanceof TileCrank )
{ {
if ( ((TileCrank) tile).power() ) if ( ((TileCrank) tile).power() )
@@ -86,7 +88,7 @@ public class BlockCrank extends AEBaseBlock
private ForgeDirection findCrankable( World world, int x, int y, int z ) private ForgeDirection findCrankable( World world, int x, int y, int z )
{ {
for ( ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS ) for ( ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS )
if ( isCrankable( world, x, y, z, dir ) ) if ( this.isCrankable( world, x, y, z, dir ) )
{ {
return dir; return dir;
} }
@@ -96,14 +98,14 @@ public class BlockCrank extends AEBaseBlock
@Override @Override
public boolean canPlaceBlockAt( World world, int x, int y, int z ) public boolean canPlaceBlockAt( World world, int x, int y, int z )
{ {
return findCrankable( world , x, y, z ) != ForgeDirection.UNKNOWN; return this.findCrankable( world , x, y, z ) != ForgeDirection.UNKNOWN;
} }
@Override @Override
public boolean isValidOrientation( World world, int x, int y, int z, ForgeDirection forward, ForgeDirection up ) public boolean isValidOrientation( World world, int x, int y, int z, ForgeDirection forward, ForgeDirection up )
{ {
TileEntity te = world.getTileEntity( x, y, z ); TileEntity te = world.getTileEntity( x, y, z );
return !(te instanceof TileCrank) || isCrankable( world, x, y, z, up.getOpposite() ); return !(te instanceof TileCrank) || this.isCrankable( world, x, y, z, up.getOpposite() );
} }
private void dropCrank( World world, int x, int y, int z ) private void dropCrank( World world, int x, int y, int z )
@@ -115,10 +117,10 @@ public class BlockCrank extends AEBaseBlock
@Override @Override
public void onBlockPlacedBy( World world, int x, int y, int z, EntityLivingBase placer, ItemStack itemStack ) public void onBlockPlacedBy( World world, int x, int y, int z, EntityLivingBase placer, ItemStack itemStack )
{ {
AEBaseTile tile = getTileEntity( world, x, y, z ); AEBaseTile tile = this.getTileEntity( world, x, y, z );
if ( tile != null ) if ( tile != null )
{ {
ForgeDirection mnt = findCrankable( world, x, y, z ); ForgeDirection mnt = this.findCrankable( world, x, y, z );
ForgeDirection forward = ForgeDirection.UP; ForgeDirection forward = ForgeDirection.UP;
if ( mnt == ForgeDirection.UP || mnt == ForgeDirection.DOWN ) if ( mnt == ForgeDirection.UP || mnt == ForgeDirection.DOWN )
{ {
@@ -128,24 +130,24 @@ public class BlockCrank extends AEBaseBlock
} }
else else
{ {
dropCrank( world, x, y, z ); this.dropCrank( world, x, y, z );
} }
} }
@Override @Override
public void onNeighborBlockChange (World world, int x, int y, int z, Block block ) public void onNeighborBlockChange (World world, int x, int y, int z, Block block )
{ {
AEBaseTile tile = getTileEntity( world, x, y, z ); AEBaseTile tile = this.getTileEntity( world, x, y, z );
if ( tile != null ) if ( tile != null )
{ {
if ( !isCrankable( world, x, y, z, tile.getUp().getOpposite() ) ) if ( !this.isCrankable( world, x, y, z, tile.getUp().getOpposite() ) )
{ {
dropCrank( world, x, y, z ); this.dropCrank( world, x, y, z );
} }
} }
else else
{ {
dropCrank( world, x, y, z ); this.dropCrank( world, x, y, z );
} }
} }
@@ -24,6 +24,7 @@ import net.minecraft.block.material.Material;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.common.util.ForgeDirection;
import appeng.block.AEBaseBlock; import appeng.block.AEBaseBlock;
import appeng.core.features.AEFeature; import appeng.core.features.AEFeature;
import appeng.core.sync.GuiBridge; import appeng.core.sync.GuiBridge;
@@ -35,15 +36,15 @@ public class BlockGrinder extends AEBaseBlock
public BlockGrinder() { public BlockGrinder() {
super( BlockGrinder.class, Material.rock ); super( BlockGrinder.class, Material.rock );
setFeature( EnumSet.of( AEFeature.GrindStone ) ); this.setFeature( EnumSet.of( AEFeature.GrindStone ) );
setTileEntity( TileGrinder.class ); this.setTileEntity( TileGrinder.class );
setHardness( 3.2F ); this.setHardness( 3.2F );
} }
@Override @Override
public boolean onActivated(World w, int x, int y, int z, EntityPlayer p, int side, float hitX, float hitY, float hitZ) public boolean onActivated(World w, int x, int y, int z, EntityPlayer p, int side, float hitX, float hitY, float hitZ)
{ {
TileGrinder tg = getTileEntity( w, x, y, z ); TileGrinder tg = this.getTileEntity( w, x, y, z );
if ( tg != null && !p.isSneaking() ) if ( tg != null && !p.isSneaking() )
{ {
Platform.openGUI( p, tg, ForgeDirection.getOrientation( side ), GuiBridge.GUI_GRINDER ); Platform.openGUI( p, tg, ForgeDirection.getOrientation( side ), GuiBridge.GUI_GRINDER );
@@ -24,6 +24,7 @@ import net.minecraft.block.material.Material;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.common.util.ForgeDirection;
import appeng.block.AEBaseBlock; import appeng.block.AEBaseBlock;
import appeng.core.features.AEFeature; import appeng.core.features.AEFeature;
import appeng.core.sync.GuiBridge; import appeng.core.sync.GuiBridge;
@@ -35,8 +36,8 @@ public class BlockCellWorkbench extends AEBaseBlock
public BlockCellWorkbench() { public BlockCellWorkbench() {
super( BlockCellWorkbench.class, Material.iron ); super( BlockCellWorkbench.class, Material.iron );
setFeature( EnumSet.of( AEFeature.StorageCells ) ); this.setFeature( EnumSet.of( AEFeature.StorageCells ) );
setTileEntity( TileCellWorkbench.class ); this.setTileEntity( TileCellWorkbench.class );
} }
@Override @Override
@@ -45,7 +46,7 @@ public class BlockCellWorkbench extends AEBaseBlock
if ( p.isSneaking() ) if ( p.isSneaking() )
return false; return false;
TileCellWorkbench tg = getTileEntity( w, x, y, z ); TileCellWorkbench tg = this.getTileEntity( w, x, y, z );
if ( tg != null ) if ( tg != null )
{ {
if ( Platform.isServer() ) if ( Platform.isServer() )
@@ -53,10 +53,10 @@ public class BlockCharger extends AEBaseBlock implements ICustomCollision
public BlockCharger() { public BlockCharger() {
super( BlockCharger.class, Material.iron ); super( BlockCharger.class, Material.iron );
setFeature( EnumSet.of( AEFeature.Core ) ); this.setFeature( EnumSet.of( AEFeature.Core ) );
setTileEntity( TileCharger.class ); this.setTileEntity( TileCharger.class );
setLightOpacity( 2 ); this.setLightOpacity( 2 );
isFullSize = isOpaque = false; this.isFullSize = this.isOpaque = false;
} }
@Override @Override
@@ -67,7 +67,7 @@ public class BlockCharger extends AEBaseBlock implements ICustomCollision
if ( Platform.isServer() ) if ( Platform.isServer() )
{ {
TileCharger tc = getTileEntity( w, x, y, z ); TileCharger tc = this.getTileEntity( w, x, y, z );
if ( tc != null ) if ( tc != null )
{ {
tc.activate( player ); tc.activate( player );
@@ -93,7 +93,7 @@ public class BlockCharger extends AEBaseBlock implements ICustomCollision
if ( r.nextFloat() < 0.98 ) if ( r.nextFloat() < 0.98 )
return; return;
AEBaseTile tile = getTileEntity( w, x, y, z ); AEBaseTile tile = this.getTileEntity( w, x, y, z );
if ( tile instanceof TileCharger ) if ( tile instanceof TileCharger )
{ {
TileCharger tc = (TileCharger) tile; TileCharger tc = (TileCharger) tile;
@@ -120,7 +120,7 @@ public class BlockCharger extends AEBaseBlock implements ICustomCollision
@Override @Override
public Iterable<AxisAlignedBB> getSelectedBoundingBoxesFromPool(World w, int x, int y, int z, Entity e, boolean isVisual) public Iterable<AxisAlignedBB> getSelectedBoundingBoxesFromPool(World w, int x, int y, int z, Entity e, boolean isVisual)
{ {
TileCharger tile = getTileEntity( w, x, y, z ); TileCharger tile = this.getTileEntity( w, x, y, z );
if ( tile != null ) if ( tile != null )
{ {
double twoPixels = 2.0 / 16.0; double twoPixels = 2.0 / 16.0;
@@ -24,6 +24,7 @@ import net.minecraft.block.material.Material;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.common.util.ForgeDirection;
import appeng.block.AEBaseBlock; import appeng.block.AEBaseBlock;
import appeng.core.features.AEFeature; import appeng.core.features.AEFeature;
import appeng.core.sync.GuiBridge; import appeng.core.sync.GuiBridge;
@@ -35,8 +36,8 @@ public class BlockCondenser extends AEBaseBlock
public BlockCondenser() { public BlockCondenser() {
super( BlockCondenser.class, Material.iron ); super( BlockCondenser.class, Material.iron );
setFeature( EnumSet.of( AEFeature.Core ) ); this.setFeature( EnumSet.of( AEFeature.Core ) );
setTileEntity( TileCondenser.class ); this.setTileEntity( TileCondenser.class );
} }
@Override @Override
@@ -47,7 +48,7 @@ public class BlockCondenser extends AEBaseBlock
if ( Platform.isServer() ) if ( Platform.isServer() )
{ {
TileCondenser tc = getTileEntity( w, x, y, z ); TileCondenser tc = this.getTileEntity( w, x, y, z );
if ( tc != null && !player.isSneaking() ) if ( tc != null && !player.isSneaking() )
{ {
Platform.openGUI( player, tc, ForgeDirection.getOrientation(side), GuiBridge.GUI_CONDENSER ); Platform.openGUI( player, tc, ForgeDirection.getOrientation(side), GuiBridge.GUI_CONDENSER );
@@ -24,6 +24,7 @@ import net.minecraft.block.material.Material;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.common.util.ForgeDirection;
import appeng.block.AEBaseBlock; import appeng.block.AEBaseBlock;
import appeng.client.render.BaseBlockRender; import appeng.client.render.BaseBlockRender;
import appeng.client.render.blocks.RenderBlockInscriber; import appeng.client.render.blocks.RenderBlockInscriber;
@@ -37,10 +38,10 @@ public class BlockInscriber extends AEBaseBlock
public BlockInscriber() { public BlockInscriber() {
super( BlockInscriber.class, Material.iron ); super( BlockInscriber.class, Material.iron );
setFeature( EnumSet.of( AEFeature.Inscriber ) ); this.setFeature( EnumSet.of( AEFeature.Inscriber ) );
setTileEntity( TileInscriber.class ); this.setTileEntity( TileInscriber.class );
setLightOpacity( 2 ); this.setLightOpacity( 2 );
isFullSize = isOpaque = false; this.isFullSize = this.isOpaque = false;
} }
@Override @Override
@@ -55,7 +56,7 @@ public class BlockInscriber extends AEBaseBlock
if ( p.isSneaking() ) if ( p.isSneaking() )
return false; return false;
TileInscriber tg = getTileEntity( w, x, y, z ); TileInscriber tg = this.getTileEntity( w, x, y, z );
if ( tg != null ) if ( tg != null )
{ {
if ( Platform.isServer() ) if ( Platform.isServer() )
@@ -24,6 +24,7 @@ import net.minecraft.block.material.Material;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.common.util.ForgeDirection;
import appeng.api.util.IOrientable; import appeng.api.util.IOrientable;
import appeng.block.AEBaseBlock; import appeng.block.AEBaseBlock;
import appeng.client.render.BaseBlockRender; import appeng.client.render.BaseBlockRender;
@@ -38,8 +39,8 @@ public class BlockInterface extends AEBaseBlock
public BlockInterface() { public BlockInterface() {
super( BlockInterface.class, Material.iron ); super( BlockInterface.class, Material.iron );
setFeature( EnumSet.of( AEFeature.Core ) ); this.setFeature( EnumSet.of( AEFeature.Core ) );
setTileEntity( TileInterface.class ); this.setTileEntity( TileInterface.class );
} }
@Override @Override
@@ -69,7 +70,7 @@ public class BlockInterface extends AEBaseBlock
if ( p.isSneaking() ) if ( p.isSneaking() )
return false; return false;
TileInterface tg = getTileEntity( w, x, y, z ); TileInterface tg = this.getTileEntity( w, x, y, z );
if ( tg != null ) if ( tg != null )
{ {
if ( Platform.isServer() ) if ( Platform.isServer() )
@@ -23,18 +23,20 @@ import java.util.Random;
import net.minecraft.world.IBlockAccess; import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World; import net.minecraft.world.World;
import appeng.core.features.AEFeature;
import appeng.tile.misc.TileLightDetector;
import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly; import cpw.mods.fml.relauncher.SideOnly;
import appeng.core.features.AEFeature;
import appeng.tile.misc.TileLightDetector;
public class BlockLightDetector extends BlockQuartzTorch public class BlockLightDetector extends BlockQuartzTorch
{ {
public BlockLightDetector() { public BlockLightDetector() {
super( BlockLightDetector.class ); super( BlockLightDetector.class );
setFeature( EnumSet.of( AEFeature.LightDetector ) ); this.setFeature( EnumSet.of( AEFeature.LightDetector ) );
setTileEntity( TileLightDetector.class ); this.setTileEntity( TileLightDetector.class );
} }
@Override @Override
@@ -42,7 +44,7 @@ public class BlockLightDetector extends BlockQuartzTorch
{ {
super.onNeighborChange( world, x, y, z, tileX, tileY, tileZ ); super.onNeighborChange( world, x, y, z, tileX, tileY, tileZ );
TileLightDetector tld = getTileEntity( world, x, y, z ); TileLightDetector tld = this.getTileEntity( world, x, y, z );
if ( tld != null ) if ( tld != null )
tld.updateLight(); tld.updateLight();
} }
@@ -50,7 +52,7 @@ public class BlockLightDetector extends BlockQuartzTorch
@Override @Override
public int isProvidingWeakPower(IBlockAccess w, int x, int y, int z, int side) public int isProvidingWeakPower(IBlockAccess w, int x, int y, int z, int side)
{ {
if ( w instanceof World && ((TileLightDetector) getTileEntity( w, x, y, z )).isReady() ) if ( w instanceof World && ((TileLightDetector) this.getTileEntity( w, x, y, z )).isReady() )
return ((World) w).getBlockLightValue( x, y, z ) - 6; return ((World) w).getBlockLightValue( x, y, z ) - 6;
return 0; return 0;
+12 -10
View File
@@ -22,8 +22,6 @@ import java.util.EnumSet;
import java.util.List; import java.util.List;
import java.util.Random; import java.util.Random;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.block.material.MapColor; import net.minecraft.block.material.MapColor;
import net.minecraft.block.material.MaterialLiquid; import net.minecraft.block.material.MaterialLiquid;
@@ -33,6 +31,10 @@ import net.minecraft.item.ItemStack;
import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.AxisAlignedBB;
import net.minecraft.world.IBlockAccess; import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World; import net.minecraft.world.World;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import appeng.block.AEBaseBlock; import appeng.block.AEBaseBlock;
import appeng.client.render.BaseBlockRender; import appeng.client.render.BaseBlockRender;
import appeng.client.render.blocks.RenderBlockPaint; import appeng.client.render.blocks.RenderBlockPaint;
@@ -45,11 +47,11 @@ public class BlockPaint extends AEBaseBlock
public BlockPaint() { public BlockPaint() {
super( BlockPaint.class, new MaterialLiquid( MapColor.airColor ) ); super( BlockPaint.class, new MaterialLiquid( MapColor.airColor ) );
setFeature( EnumSet.of( AEFeature.PaintBalls ) ); this.setFeature( EnumSet.of( AEFeature.PaintBalls ) );
setTileEntity( TilePaint.class ); this.setTileEntity( TilePaint.class );
setLightOpacity( 0 ); this.setLightOpacity( 0 );
isFullSize = false; this.isFullSize = false;
isOpaque = false; this.isOpaque = false;
} }
@Override @Override
@@ -61,7 +63,7 @@ public class BlockPaint extends AEBaseBlock
@Override @Override
public int getLightValue(IBlockAccess w, int x, int y, int z) public int getLightValue(IBlockAccess w, int x, int y, int z)
{ {
TilePaint tp = getTileEntity( w, x, y, z ); TilePaint tp = this.getTileEntity( w, x, y, z );
if ( tp != null ) if ( tp != null )
{ {
@@ -82,13 +84,13 @@ public class BlockPaint extends AEBaseBlock
public void fillWithRain(World w, int x, int y, int z) public void fillWithRain(World w, int x, int y, int z)
{ {
if ( Platform.isServer() ) if ( Platform.isServer() )
w.setBlock( x, y, z, Platform.air, 0, 3 ); w.setBlock( x, y, z, Platform.AIR, 0, 3 );
} }
@Override @Override
public void onNeighborBlockChange(World w, int x, int y, int z, Block junk) public void onNeighborBlockChange(World w, int x, int y, int z, Block junk)
{ {
TilePaint tp = getTileEntity( w, x, y, z ); TilePaint tp = this.getTileEntity( w, x, y, z );
if ( tp != null ) if ( tp != null )
tp.onNeighborBlockChange(); tp.onNeighborBlockChange();
@@ -27,6 +27,10 @@ import net.minecraft.client.Minecraft;
import net.minecraft.world.IBlockAccess; import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.common.util.ForgeDirection;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import appeng.api.util.IOrientable; import appeng.api.util.IOrientable;
import appeng.api.util.IOrientableBlock; import appeng.api.util.IOrientableBlock;
import appeng.block.AEBaseBlock; import appeng.block.AEBaseBlock;
@@ -39,17 +43,15 @@ import appeng.core.features.AEFeature;
import appeng.helpers.MetaRotation; import appeng.helpers.MetaRotation;
import appeng.tile.misc.TileQuartzGrowthAccelerator; import appeng.tile.misc.TileQuartzGrowthAccelerator;
import appeng.util.Platform; import appeng.util.Platform;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class BlockQuartzGrowthAccelerator extends AEBaseBlock implements IOrientableBlock public class BlockQuartzGrowthAccelerator extends AEBaseBlock implements IOrientableBlock
{ {
public BlockQuartzGrowthAccelerator() { public BlockQuartzGrowthAccelerator() {
super( BlockQuartzGrowthAccelerator.class, Material.rock ); super( BlockQuartzGrowthAccelerator.class, Material.rock );
setStepSound( Block.soundTypeMetal ); this.setStepSound( Block.soundTypeMetal );
setFeature( EnumSet.of( AEFeature.Core ) ); this.setFeature( EnumSet.of( AEFeature.Core ) );
setTileEntity( TileQuartzGrowthAccelerator.class ); this.setTileEntity( TileQuartzGrowthAccelerator.class );
} }
@Override @Override
@@ -71,7 +73,7 @@ public class BlockQuartzGrowthAccelerator extends AEBaseBlock implements IOrient
if ( !AEConfig.instance.enableEffects ) if ( !AEConfig.instance.enableEffects )
return; return;
TileQuartzGrowthAccelerator tileQuartzGrowthAccelerator = getTileEntity( w, x, y, z ); TileQuartzGrowthAccelerator tileQuartzGrowthAccelerator = this.getTileEntity( w, x, y, z );
if ( tileQuartzGrowthAccelerator != null && tileQuartzGrowthAccelerator.hasPower && CommonHelper.proxy.shouldAddParticles( r ) ) if ( tileQuartzGrowthAccelerator != null && tileQuartzGrowthAccelerator.hasPower && CommonHelper.proxy.shouldAddParticles( r ) )
{ {
@@ -53,14 +53,14 @@ public class BlockQuartzTorch extends AEBaseBlock implements IOrientableBlock, I
protected BlockQuartzTorch(Class which) { protected BlockQuartzTorch(Class which) {
super( which, Material.circuits ); super( which, Material.circuits );
setLightOpacity( 0 ); this.setLightOpacity( 0 );
isFullSize = isOpaque = false; this.isFullSize = this.isOpaque = false;
} }
public BlockQuartzTorch() { public BlockQuartzTorch() {
this( BlockQuartzTorch.class ); this( BlockQuartzTorch.class );
setFeature( EnumSet.of( AEFeature.DecorativeLights ) ); this.setFeature( EnumSet.of( AEFeature.DecorativeLights ) );
setLightLevel( 0.9375F ); this.setLightLevel( 0.9375F );
} }
@Override @Override
@@ -86,7 +86,7 @@ public class BlockQuartzTorch extends AEBaseBlock implements IOrientableBlock, I
public boolean canPlaceBlockAt(World w, int x, int y, int z) public boolean canPlaceBlockAt(World w, int x, int y, int z)
{ {
for (ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) for (ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS)
if ( canPlaceAt( w, x, y, z, dir ) ) if ( this.canPlaceAt( w, x, y, z, dir ) )
return true; return true;
return false; return false;
} }
@@ -99,21 +99,21 @@ public class BlockQuartzTorch extends AEBaseBlock implements IOrientableBlock, I
@Override @Override
public boolean isValidOrientation(World w, int x, int y, int z, ForgeDirection forward, ForgeDirection up) public boolean isValidOrientation(World w, int x, int y, int z, ForgeDirection forward, ForgeDirection up)
{ {
return canPlaceAt( w, x, y, z, up.getOpposite() ); return this.canPlaceAt( w, x, y, z, up.getOpposite() );
} }
@Override @Override
public void onNeighborBlockChange(World w, int x, int y, int z, Block id) public void onNeighborBlockChange(World w, int x, int y, int z, Block id)
{ {
ForgeDirection up = getOrientable( w, x, y, z ).getUp(); ForgeDirection up = this.getOrientable( w, x, y, z ).getUp();
if ( !canPlaceAt( w, x, y, z, up.getOpposite() ) ) if ( !this.canPlaceAt( w, x, y, z, up.getOpposite() ) )
dropTorch( w, x, y, z ); this.dropTorch( w, x, y, z );
} }
@Override @Override
public Iterable<AxisAlignedBB> getSelectedBoundingBoxesFromPool(World w, int x, int y, int z, Entity e, boolean isVisual) public Iterable<AxisAlignedBB> getSelectedBoundingBoxesFromPool(World w, int x, int y, int z, Entity e, boolean isVisual)
{ {
ForgeDirection up = getOrientable( w, x, y, z ).getUp(); ForgeDirection up = this.getOrientable( w, x, y, z ).getUp();
double xOff = -0.3 * up.offsetX; double xOff = -0.3 * up.offsetX;
double yOff = -0.3 * up.offsetY; double yOff = -0.3 * up.offsetY;
double zOff = -0.3 * up.offsetZ; double zOff = -0.3 * up.offsetZ;
@@ -139,7 +139,7 @@ public class BlockQuartzTorch extends AEBaseBlock implements IOrientableBlock, I
if ( r.nextFloat() < 0.98 ) if ( r.nextFloat() < 0.98 )
return; return;
ForgeDirection up = getOrientable( w, x, y, z ).getUp(); ForgeDirection up = this.getOrientable( w, x, y, z ).getUp();
double xOff = -0.3 * up.offsetX; double xOff = -0.3 * up.offsetX;
double yOff = -0.3 * up.offsetY; double yOff = -0.3 * up.offsetY;
double zOff = -0.3 * up.offsetZ; double zOff = -0.3 * up.offsetZ;
@@ -24,6 +24,7 @@ import net.minecraft.block.material.Material;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.common.util.ForgeDirection;
import appeng.block.AEBaseBlock; import appeng.block.AEBaseBlock;
import appeng.client.render.BaseBlockRender; import appeng.client.render.BaseBlockRender;
import appeng.client.render.blocks.RendererSecurity; import appeng.client.render.blocks.RendererSecurity;
@@ -37,8 +38,8 @@ public class BlockSecurity extends AEBaseBlock
public BlockSecurity() { public BlockSecurity() {
super( BlockSecurity.class, Material.iron ); super( BlockSecurity.class, Material.iron );
setFeature( EnumSet.of( AEFeature.Security ) ); this.setFeature( EnumSet.of( AEFeature.Security ) );
setTileEntity( TileSecurity.class ); this.setTileEntity( TileSecurity.class );
} }
@Override @Override
@@ -53,7 +54,7 @@ public class BlockSecurity extends AEBaseBlock
if ( p.isSneaking() ) if ( p.isSneaking() )
return false; return false;
TileSecurity tg = getTileEntity( w, x, y, z ); TileSecurity tg = this.getTileEntity( w, x, y, z );
if ( tg != null ) if ( tg != null )
{ {
if ( Platform.isClient() ) if ( Platform.isClient() )
@@ -48,10 +48,10 @@ public class BlockSkyCompass extends AEBaseBlock implements ICustomCollision
public BlockSkyCompass() { public BlockSkyCompass() {
super( BlockSkyCompass.class, Material.iron ); super( BlockSkyCompass.class, Material.iron );
setFeature( EnumSet.of( AEFeature.MeteoriteCompass ) ); this.setFeature( EnumSet.of( AEFeature.MeteoriteCompass ) );
setTileEntity( TileSkyCompass.class ); this.setTileEntity( TileSkyCompass.class );
isOpaque = isFullSize = false; this.isOpaque = this.isFullSize = false;
lightOpacity = 0; this.lightOpacity = 0;
} }
@Override @Override
@@ -78,7 +78,7 @@ public class BlockSkyCompass extends AEBaseBlock implements ICustomCollision
public boolean canPlaceBlockAt(World w, int x, int y, int z) public boolean canPlaceBlockAt(World w, int x, int y, int z)
{ {
for (ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) for (ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS)
if ( canPlaceAt( w, x, y, z, dir ) ) if ( this.canPlaceAt( w, x, y, z, dir ) )
return true; return true;
return false; return false;
} }
@@ -91,25 +91,25 @@ public class BlockSkyCompass extends AEBaseBlock implements ICustomCollision
@Override @Override
public boolean isValidOrientation(World w, int x, int y, int z, ForgeDirection forward, ForgeDirection up) public boolean isValidOrientation(World w, int x, int y, int z, ForgeDirection forward, ForgeDirection up)
{ {
TileSkyCompass sc = getTileEntity( w, x, y, z ); TileSkyCompass sc = this.getTileEntity( w, x, y, z );
if ( sc != null ) if ( sc != null )
return false; return false;
return canPlaceAt( w, x, y, z, forward.getOpposite() ); return this.canPlaceAt( w, x, y, z, forward.getOpposite() );
} }
@Override @Override
public void onNeighborBlockChange(World w, int x, int y, int z, Block id) public void onNeighborBlockChange(World w, int x, int y, int z, Block id)
{ {
TileSkyCompass sc = getTileEntity( w, x, y, z ); TileSkyCompass sc = this.getTileEntity( w, x, y, z );
ForgeDirection up = sc.getForward(); ForgeDirection up = sc.getForward();
if ( !canPlaceAt( w, x, y, z, up.getOpposite() ) ) if ( !this.canPlaceAt( w, x, y, z, up.getOpposite() ) )
dropTorch( w, x, y, z ); this.dropTorch( w, x, y, z );
} }
@Override @Override
public Iterable<AxisAlignedBB> getSelectedBoundingBoxesFromPool(World w, int x, int y, int z, Entity e, boolean isVisual) public Iterable<AxisAlignedBB> getSelectedBoundingBoxesFromPool(World w, int x, int y, int z, Entity e, boolean isVisual)
{ {
TileSkyCompass tile = getTileEntity( w, x, y, z ); TileSkyCompass tile = this.getTileEntity( w, x, y, z );
if ( tile != null ) if ( tile != null )
{ {
ForgeDirection forward = tile.getForward(); ForgeDirection forward = tile.getForward();
@@ -57,12 +57,12 @@ public class BlockTinyTNT extends AEBaseBlock implements ICustomCollision
public BlockTinyTNT() { public BlockTinyTNT() {
super( BlockTinyTNT.class, Material.tnt ); super( BlockTinyTNT.class, Material.tnt );
setFeature( EnumSet.of( AEFeature.TinyTNT ) ); this.setFeature( EnumSet.of( AEFeature.TinyTNT ) );
setLightOpacity( 1 ); this.setLightOpacity( 1 );
setBlockBounds( 0.25f, 0.0f, 0.25f, 0.75f, 0.5f, 0.75f ); this.setBlockBounds( 0.25f, 0.0f, 0.25f, 0.75f, 0.5f, 0.75f );
isFullSize = isOpaque = false; this.isFullSize = this.isOpaque = false;
setStepSound( soundTypeGrass ); this.setStepSound( soundTypeGrass );
setHardness( 0F ); this.setHardness( 0F );
EntityRegistry.registerModEntity( EntityTinyTNTPrimed.class, "EntityTinyTNTPrimed", EntityIds.TINY_TNT, AppEng.instance, 16, 4, true ); EntityRegistry.registerModEntity( EntityTinyTNTPrimed.class, "EntityTinyTNTPrimed", EntityIds.TINY_TNT, AppEng.instance, 16, 4, true );
} }

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