Compare commits

..

204 Commits

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

ALIAS

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

Also removes the need to bitshift them for every access.

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

Added Grinder recipes
Added Inscriber recipes
2015-06-06 13:36:00 +02:00
yueh 86e5d6f5da Merge pull request #1551 from yueh/fix-1036
No longer invalidate the cache on simulate.
2015-06-05 23:03:08 +02:00
yueh 05f90760f2 No longer invalidate the cache of MEMonitorIInventory on simulate.
Should fix #1036
2015-06-05 19:35:52 +02:00
thatsIch 17465e68e8 Merge pull request #1453 from thatsIch/f-1452-auto-gen-custom-recipes
Closes #1452: Implements auto-generation of custom recipes
2015-06-03 23:18:35 +02:00
thatsIch b0348fb888 Merge pull request #1543 from thatsIch/f-1541-td-attunements
Closes #1541: Implements Thermal Dynamics attunements
2015-06-03 23:18:17 +02:00
thatsIch 7a731ec658 Closes #1541: Implements Thermal Dynamics attunements
Adds itemduct to item P2P
Adds fluiducts to fluid P2P
Adds fluxduct to RF P2P
2015-06-02 22:21:37 +02:00
thatsIch 3a9296f453 Merge pull request #1537 from thatsIch/b-1536-bc-checking
Fixes #1536: Checking for all required BC classes
2015-06-01 20:45:15 +02:00
yueh 4ac8a0add0 Merge pull request #1519 from yueh/fix-1517
Fixes #1517 improved performance of TESRWrapper
2015-06-01 20:04:09 +02:00
yueh 6e76690835 Fixes #1517 improved performance of TESRWrapper 2015-06-01 19:57:14 +02:00
yueh 776d68bb03 Merge pull request #1486 from yueh/feature-1259
Closes #1259 ETA for crafting jobs
2015-06-01 19:51:47 +02:00
yueh e2b870f1f1 Merge pull request #1482 from yueh/feature-1344
Closes #1344 Added a silk touch annihilation plane
2015-06-01 19:51:28 +02:00
yueh 4befdecd25 Closes #1344 Added a silk touch annihilation plane 2015-06-01 19:50:38 +02:00
yueh 98fe4680c1 Merge pull request #1428 from yueh/feature-split-aebaseblock
Splits AEBaseBlock into AEBaseBlock + AEBaseTileBlock
2015-06-01 19:48:21 +02:00
yueh 2d7917de14 Splits AEBaseBlock into AEBaseBlock + AEBaseTileBlock 2015-06-01 19:38:46 +02:00
thatsIch 6e881fac2d Fixes #1536: Checking for all required BC classes 2015-06-01 19:14:45 +02:00
thatsIch 0076f2ea51 Closes #1452: Implements auto-generation of custom recipes 2015-06-01 17:37:25 +02:00
thatsIch 523548373d Merge pull request #1535 from LemonLake/master
Proper English localisation
2015-06-01 14:58:35 +02:00
Lemmmy 58bdeb134c Proper English localisation 2015-06-01 01:54:44 +01:00
thatsIch 2722057c81 Merge pull request #1527 from thatsIch/b-1521-wrong-stable-channel
Fixes #1521: Renames release to stable
2015-05-30 22:30:07 +02:00
thatsIch d6f29464c6 Fixes #1521: Renames release to stable 2015-05-30 19:52:06 +02:00
thatsIch 5105a2b1fb Merge pull request #1500 from plumpudding/master
Closes #1379: Implements decorative slabs
2015-05-25 15:27:10 +02:00
PetaByteBoy c00962b044 add slabs 2015-05-23 15:02:29 +02:00
thatsIch 858f73c439 Merge pull request #1498 from TheJulianJES/patch-6
Changed version from PartStack provider to rv2 (rv2)
2015-05-23 13:52:43 +02:00
TheJulianJES ade5e23458 Changed version from PartStack provider to rv2 (rv2)
because @thatsIch merged it also to rv2
2015-05-23 13:49:54 +02:00
yueh 61dfc05ae0 Added a simple ETA to crafting jobs 2015-05-21 21:31:13 +02:00
thatsIch 25fd03cb88 Revert cast to match Java 6 2015-05-21 21:00:45 +02:00
thatsIch e7fe8b60de Merge pull request #1487 from thatsIch/f-source-jar
Adds source jar artifact to gradle
2015-05-20 21:02:46 +02:00
thatsIch f16ae9c80b Merge pull request #1490 from bakaxyf/master
Update zh_CN.lang
2015-05-20 10:43:31 +02:00
bakaxyf ed1f327c57 Update zh_CN.lang 2015-05-20 16:10:04 +08:00
thatsIch 4a19ea4c68 Merge pull request #1447 from jeremiahwinsley/master
Fix for #1384 - Infinite Power
2015-05-19 21:06:48 +02:00
thatsIch 0ec1d728e5 Adds source jar artifact to gradle 2015-05-19 20:55:31 +02:00
thatsIch 57eb4c0a71 Lower case playerID 2015-05-19 16:24:08 +02:00
yueh ecf2f3fdaf Merge pull request #1478 from yueh/fix-1465
Fixes #1465 faulty item comparison
2015-05-19 00:53:53 +02:00
yueh f3db010303 Merge pull request #1461 from yueh/fix-1389
Fixes #1389 Enabled repeatable keyboard events
2015-05-19 00:53:22 +02:00
Jeremiah Winsley 1a1316072a Test with V6e of RotaryCraft 2015-05-18 14:38:38 -04:00
Jeremiah Winsley 020740bf43 Fixes #1384 - implement AdvancedShaftPowerReceiver for RotaryCraft powersink 2015-05-18 14:38:38 -04:00
thatsIch 682c674696 Merge pull request #1467 from TheJulianJES/wailaStackPart
Fix #1362 - Parts display in WAILA
2015-05-18 19:35:14 +02:00
yueh 7fa7502770 Fixes #1465 faulty item comparison 2015-05-18 19:31:18 +02:00
thatsIch 962c7c0a92 Merge pull request #1468 from TheJulianJES/noRFtooltip
Removes default RF tooltip on WAILA 1.5.9+
2015-05-18 19:28:31 +02:00
thatsIch 12e0efa3e1 Merge pull request #1466 from thatsIch/e-instance-factory
Uses an instance factory access for AE2
2015-05-18 19:26:46 +02:00
thatsIch a349e1a277 Usage of CONSTANTS 2015-05-18 08:59:27 +02:00
thatsIch b72c766c16 Split raytrace 2015-05-18 00:37:06 +02:00
thatsIch 72eab029ab Static imports 2015-05-18 00:34:50 +02:00
thatsIch 3613c235be Unused imports 2015-05-18 00:34:37 +02:00
thatsIch 880ea762e5 missing javadoc 2015-05-18 00:34:14 +02:00
thatsIch 83c9c0efcb Better hyphing 2015-05-18 00:33:39 +02:00
thatsIch 733a53ec6d Typo in 'fward' 2015-05-18 00:33:04 +02:00
thatsIch 8c500c4016 Typo in 'fward' 2015-05-18 00:32:46 +02:00
thatsIch abdd6e1915 Typo in 'constructor' 2015-05-18 00:31:41 +02:00
thatsIch 209333989e Typ in chisldQuartz 2015-05-18 00:31:16 +02:00
thatsIch 2803a671d1 Redundant type casts 2015-05-18 00:30:08 +02:00
thatsIch 1cf2e8d43e Instance field access not qualified with 'this' 2015-05-18 00:12:45 +02:00
thatsIch e7746dc037 Static imports 2015-05-18 00:12:13 +02:00
thatsIch 72195ea784 Unused imports 2015-05-18 00:12:01 +02:00
thatsIch f102c3b468 apply constant naming convention 2015-05-18 00:11:18 +02:00
thatsIch f0215ca56a apply method parameter naming convetion 2015-05-18 00:09:09 +02:00
thatsIch 0f9ca7885a Lower case methods 2015-05-18 00:08:05 +02:00
thatsIch 124d14d3c3 Lower case Swap 2015-05-18 00:02:28 +02:00
thatsIch f9e25b5a33 Lower case method name 2015-05-17 23:52:15 +02:00
thatsIch 72d85aecc9 Use interface for collections 2015-05-17 23:51:57 +02:00
TheJulianJES 0bfb7b7ed3 Removes default RF tooltip
Removed tab

Did something
2015-05-17 20:22:01 +02:00
TheJulianJES e82e8a039b Parts display correctly in WAILA
Register an method that can be overidden

Register the same method in the interface

New class that picks the item and displays it to WAILA

Register the new class and call the other class method

Import in PartWailaDataProvider

Fixed errors

Renamed all Display -> Stack

Stuff
2015-05-17 20:03:32 +02:00
thatsIch e626355aef Merge pull request #1464 from thatsIch/e-update-rtc-api
Update RotaryCraft API to V6f
2015-05-16 21:22:59 +02:00
thatsIch 192848e383 Uses an instance factory access for AE2
Removes the improper way to set itself into a public static non-final variable.
Removes the direct access to the IntegrationRegistry from AppEng. Will be added at some later point somewhere else for non-singleton access.
Constructor is set to package private to enable possible construction from unit tests. Are current not runnable sind it is currently tied to the FML Loader instance.
2015-05-16 20:48:32 +02:00
thatsIch 6339be5a06 Update RotaryCraft API to V6f 2015-05-16 15:16:16 +02:00
thatsIch 4b5fd35056 Merge pull request #1462 from thatsIch/e-improved-test-coverage
Adds tests to improve the test coverage
2015-05-16 14:21:58 +02:00
thatsIch 1137b11550 Merge pull request #1463 from thatsIch/e-update-gradle-2-4
Update Gradle to 2.4
2015-05-16 14:21:53 +02:00
thatsIch 6636718ef7 Update Gradle to 2.4 2015-05-16 13:20:11 +02:00
thatsIch e40f68d3fa Adds tests to improve the test coverage 2015-05-16 12:25:10 +02:00
yueh 96e79e9d9c Fixes #1389 Enabled repeatable keyboard events 2015-05-16 11:34:18 +02:00
thatsIch 3f5ed8ed7f Merge pull request #1443 from TheJulianJES/doublePlayerInvInscriber
Fixes #1442 - Don't add the player inventory two times (Inscriber)
2015-05-14 10:42:43 +02:00
thatsIch fdd44f4633 Add missing License and contributing to gitignore 2015-05-13 22:21:48 +02:00
TheJulianJES 0085909914 Don't add the player inventory two times (Inscriber) 2015-05-10 17:55:10 +02:00
thatsIch 5c301238cd Merge pull request #1438 from TheJulianJES/stainedClayMeteorite
Meteorites can now spawn in stained clay biomes
2015-05-10 13:45:17 +02:00
thatsIch 30ba43e672 Merge pull request #1433 from plumpudding/readme-links
fix licensing links in readme
2015-05-10 12:12:39 +02:00
TheJulianJES afb9bb4379 Meteorites can now spawn in stained clay biomes 2015-05-10 11:37:42 +02:00
PetaByteBoy 3863e2c900 fix licensing links in readme 2015-05-09 23:24:05 +02:00
thatsIch b0249244cc Merge pull request #1431 from TheJulianJES/GermanLang
Changed things in de_DE.lang
2015-05-09 23:23:26 +02:00
TheJulianJES 77873e135f Changed things in de_DE.lang
Fixed a derp

Changed it, again!

Fixed it (all)

Added line 450
2015-05-09 23:20:53 +02:00
thatsIch 35997d58bb Merge pull request #1432 from TheJulianJES/errorEclipse
Fix warnings in eclipse
2015-05-09 23:13:38 +02:00
TheJulianJES 82efa151cc Fix warnings in eclipse
Close scanner instead of doing it with a warning

Make the scanner final..
2015-05-09 23:10:23 +02:00
thatsIch 71569cadb5 Merge pull request #1424 from thatsIch/e-simplified-bitwise-operations
Simplified bitwise operation
2015-05-09 15:58:04 +02:00
thatsIch 1d737c3167 Merge pull request #1425 from thatsIch/e-weaker-collection-type
Use weaker collection types
2015-05-09 15:57:57 +02:00
thatsIch 168038c595 Merge pull request #1426 from thatsIch/e-overly-strong-cast
reduces overly strong type cast
2015-05-09 15:57:47 +02:00
thatsIch e99680d59b Merge pull request #1410 from fnuecke/master
Added P2P tunnel part for OpenComputers.
2015-05-09 15:57:21 +02:00
Florian Nücke 18503ac526 Added P2P tunnel part for OpenComputers.
Includes cleanup provided by thatsIch.
2015-05-09 14:53:54 +02:00
yueh 22f7345147 Merge pull request #1429 from yueh/organize-imports
Organize imports
2015-05-09 13:16:07 +02:00
yueh b6b76d145b Organize imports 2015-05-09 13:06:09 +02:00
thatsIch 7c9b734948 reduces overly strong type cast 2015-05-09 12:45:46 +02:00
thatsIch 16c0fbe3c1 Use weaker collection types 2015-05-09 12:33:16 +02:00
thatsIch b8f22202d4 Merge pull request #1421 from thatsIch/e-local-variable-naming-conventions
Replaces all local variables regarding their naming conventions
2015-05-08 23:50:51 +02:00
thatsIch 513292cd08 Replaces all local variables regarding their naming conventions 2015-05-08 23:50:36 +02:00
thatsIch d8ac614a17 Merge pull request #1423 from thatsIch/e-import-issues
Replaces * and static imports with more readable ones
2015-05-08 23:45:51 +02:00
thatsIch 8dd0991a7d Merge pull request #1422 from thatsIch/e-constant-naming-convention
Replaces all constants regarding their naming conventions
2015-05-08 23:45:44 +02:00
thatsIch 5832e2d828 Merge pull request #1420 from thatsIch/e-method-parameter-naming-conventions
Replaces all method parameter regarding their naming conventions
2015-05-08 23:45:28 +02:00
thatsIch c451a25c7f Merge pull request #1419 from thatsIch/e-non-constant-field-with-upper-case-name
Replaces all non constant fields with upper case name
2015-05-08 23:45:15 +02:00
thatsIch 9d4fd64c58 Merge pull request #1417 from thatsIch/e-reflection-stuff
Removes the unneeded information about the current class in all blocks
2015-05-08 23:45:02 +02:00
thatsIch 42c7cca64f Simplified bitwise operation 2015-05-08 23:44:07 +02:00
thatsIch 7f61ebebc8 Replaces * and static imports with more readable ones 2015-05-08 23:40:31 +02:00
thatsIch 7f14faeaa3 Replaces all constants regarding their naming conventions 2015-05-08 23:37:09 +02:00
thatsIch f193c2adc4 Replaces all method parameter regarding their naming conventions 2015-05-08 23:25:19 +02:00
thatsIch b748a1982f Replaces all non constant fields with upper case name 2015-05-08 22:53:50 +02:00
thatsIch a44369a272 More efficient iteration 2015-05-08 22:42:08 +02:00
thatsIch 25a3573a76 Fix typos 2015-05-08 22:38:04 +02:00
thatsIch 9845e2a463 Merge pull request #1414 from thatsIch/e-1413-removal-of-rb
Closes #1413: Removes RB integration since lacking 1.7.10+ support
2015-05-08 19:44:09 +02:00
thatsIch 3d5fd2c5e8 Merge pull request #1408 from thatsIch/e-logo
Closes #1404: Added logo to AE2
2015-05-08 19:44:02 +02:00
thatsIch dbacb566bb Removes the unneeded information about the current class in all blocks
Every Block had a call to its super, passing its own class.
This can easily be simulated by calling `this.getClass()` in the super class.
Also this was basically only used as using a name.
In the future it might be advisable to not use such methods,
since they are prone to refactoring.
2015-05-08 19:03:03 +02:00
thatsIch 96576a7fc5 Closes #1413: Removes RB integration since lacking 1.7.10+ support 2015-05-08 18:58:37 +02:00
thatsIch 81464d7de1 Closes #1404: Added logo to AE2 2015-05-08 18:47:18 +02:00
thatsIch dd8e1d1faf Merge pull request #1416 from thatsIch/b-1411-missing-recipes-for-stairs
Fixes #1411: Adds recipes for stairs
2015-05-08 18:33:47 +02:00
thatsIch 00248f574a Fixes #1411: Adds recipes for stairs 2015-05-08 18:32:44 +02:00
thatsIch e6e1771349 Merge pull request #1400 from LorenzoDCC/patch-1
Update pt_BR.lang
2015-05-08 17:25:24 +02:00
thatsIch 0a0a788c1c Merge pull request #1406 from thatsIch/b-1405-missing-mcmod
Fixes #1405: Adds mcmod.info and pack.mcmeta to resources
2015-05-07 20:03:44 +02:00
thatsIch 74c0fd92ae Fixes #1405: Adds mcmod.info and pack.mcmeta to resources 2015-05-07 18:14:29 +02:00
Lorenzo Dalla Costa Cervelin 34665d94df Update pt_BR.lang 2015-05-06 14:38:21 -03:00
thatsIch 7e681dc1d9 Merge pull request #1395 from thatsIch/e-more-shields
Adds tag and release shield
2015-05-06 07:16:34 +02:00
thatsIch c158519f37 Adds tag and release shield 2015-05-05 23:36:17 +02:00
thatsIch de069980ce Closes #1287: Set release channel to stable 2015-05-03 22:10:13 +02:00
520 changed files with 10660 additions and 5776 deletions
+2 -1
View File
@@ -11,7 +11,8 @@
# include markdowns
!README.md
!License.md
!LICENSE
!CONTRIBUTING.md
# include sourcecode
!src/
+4 -3
View File
@@ -1,5 +1,6 @@
<!--[![Latest Release](https://img.shields.io/github/tag/AppliedEnergistics/Applied-Energistics-2.svg?label=Latest Release)](https://github.com/AppliedEnergistics/Applied-Energistics-2/releases) -->
[![Latest Build](https://img.shields.io/teamcity/http/ci.tsr.me/s/AppliedEnergistics_AutoHeadBuild.svg?label=Latest Build)](http://ci.tsr.me/viewType.html?buildTypeId=AppliedEnergistics_AutoHeadBuild&tab=buildTypeStatusDiv)
[![Latest Tag](https://img.shields.io/github/tag/AppliedEnergistics/Applied-Energistics-2.svg?label=Latest Tag)](https://github.com/AppliedEnergistics/Applied-Energistics-2/tags)
[![Latest Release](https://img.shields.io/github/release/AppliedEnergistics/Applied-Energistics-2.svg?label=Latest Release)](https://github.com/AppliedEnergistics/Applied-Energistics-2/releases)
# Applied Energistics 2
@@ -31,7 +32,7 @@ A Mod about Matter, Energy and using them to conquer the world..
* Applied Energistics 2 API
- (c) 2013 - 2015 AlgorithmX2 et al
- ![License](https://img.shields.io/badge/License-MIT-red.svg?style=flat)
- [![License](https://img.shields.io/badge/License-MIT-red.svg?style=flat)](http://opensource.org/licenses/MIT)
* Applied Energistics 2
- (c) 2013 - 2015 AlgorithmX2 et al
- [![License](https://img.shields.io/badge/License-LGPLv3-blue.svg?style=flat)](https://raw.githubusercontent.com/AppliedEnergistics/Applied-Energistics-2/rv2/LICENSE)
@@ -39,7 +40,7 @@ A Mod about Matter, Energy and using them to conquer the world..
- (c) 2013 - 2015 AlgorithmX2 et al
- [![License](https://img.shields.io/badge/License-CC%20BY--NC--SA%203.0-yellow.svg?style=flat)](https://creativecommons.org/licenses/by-nc-sa/3.0/)
* Text and Translations
- ![License](https://img.shields.io/badge/License-No%20Restriction-green.svg?style=flat)
- [![License](https://img.shields.io/badge/License-No%20Restriction-green.svg?style=flat)](https://creativecommons.org/publicdomain/zero/1.0/)
## Downloads
+6 -2
View File
@@ -99,11 +99,16 @@ sourceSets {
resources {
srcDir "src/main/resources/"
include "assets/appliedenergistics2/recipes/*.recipe",
"assets/appliedenergistics2/recipes/README.html",
"assets/appliedenergistics2/oredict/*.oredict",
"assets/appliedenergistics2/lang/*.lang",
"assets/appliedenergistics2/textures/blocks/*",
"assets/appliedenergistics2/textures/guis/*",
"assets/appliedenergistics2/textures/models/*",
"assets/appliedenergistics2/textures/items/*"
"assets/appliedenergistics2/textures/items/*",
"assets/appliedenergistics2/meta/*",
"mcmod.info",
"pack.mcmeta"
}
}
}
@@ -113,6 +118,5 @@ processResources {
from(sourceSets.main.resources.srcDirs) {
include 'mcmod.info'
expand 'version': project.version, 'mcversion': minecraft_version
include 'pack.mcmeta'
}
}
Binary file not shown.
-10
View File
@@ -1,10 +0,0 @@
#Organize Import Order
#Thu Oct 09 12:52:21 CEST 2014
6=
5=cpw
4=net
3=io
2=org
1=com
0=java
7=appeng
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<profiles version="12">
<profile kind="CodeFormatterProfile" name="Algo" version="12">
<profile kind="CodeFormatterProfile" name="AE2" version="12">
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_ellipsis" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration" value="do not insert"/>
@@ -22,7 +22,7 @@
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.disabling_tag" value="@formatter:off"/>
<setting id="org.eclipse.jdt.core.formatter.continuation_indentation" value="2"/>
@@ -37,13 +37,13 @@
<setting id="org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.enabling_tag" value="@formatter:on"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations" value="2"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer" value="insert"/>
@@ -72,14 +72,14 @@
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_method_declaration" value="next_line"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_binary_expression" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference" value="insert"/>
@@ -96,7 +96,7 @@
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_lambda_body" value="end_of_line"/>
<setting id="org.eclipse.jdt.core.formatter.compact_else_if" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration" value="0"/>
@@ -106,7 +106,7 @@
<setting id="org.eclipse.jdt.core.compiler.problem.assertIdentifier" value="error"/>
<setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer" value="insert"/>
@@ -122,13 +122,13 @@
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.format_line_comments" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.align_type_members_on_columns" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_assignment" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant" value="insert"/>
@@ -138,7 +138,7 @@
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration" value="next_line"/>
@@ -147,7 +147,7 @@
<setting id="org.eclipse.jdt.core.formatter.comment.format_header" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while" value="do not insert"/>
<setting id="org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode" value="enabled"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_method_declaration" value="0"/>
@@ -182,7 +182,7 @@
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_method" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement" value="do not insert"/>
<setting id="org.eclipse.jdt.core.compiler.codegen.targetPlatform" value="1.8"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_switch" value="next_line"/>
@@ -215,7 +215,7 @@
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_member_type" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement" value="insert"/>
@@ -231,7 +231,7 @@
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.format_block_comments" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration" value="insert"/>
@@ -267,8 +267,8 @@
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_constant" value="next_line"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_type_declaration" value="next_line"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_package" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while" value="insert"/>
@@ -283,13 +283,13 @@
<setting id="org.eclipse.jdt.core.formatter.join_lines_in_comments" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.indent_parameter_description" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.comment.indent_parameter_description" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.tabulation.char" value="tab"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_between_import_groups" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.lineSplit" value="160"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch" value="do not insert"/>
</profile>
</profiles>
+11
View File
@@ -0,0 +1,11 @@
#Organize Import Order
#Sat Jun 13 15:22:41 CEST 2015
8=appeng
7=
6=cpw
5=net
4=io
3=org
2=com
1=javax
0=java
+11 -10
View File
@@ -1,5 +1,5 @@
aeversion=rv2
aechannel=stable
aeversion=rv3
aechannel=alpha
aebuild=0
aegroup=appeng
aebasename=appliedenergistics2
@@ -8,15 +8,15 @@ aebasename=appliedenergistics2
# Versions #
#########################################################
minecraft_version=1.7.10
forge_version=10.13.2.1291
forge_version=10.13.4.1448-1.7.10
#########################################################
# Installable #
#########################################################
waila_version=1.5.10
jabba_version=1.2.1a
enderstorage_version=1.4.7.33
translocator_version=1.1.1.14
enderstorage_version=1.4.7.36
translocator_version=1.1.2.15
ic2_version=2.2.717
enderio_version=2.3.0.375_beta
#cofhlib_version=1.0.1-157
@@ -29,11 +29,13 @@ invtweaks_version=1.58
#########################################################
# Provided APIs #
#########################################################
fmp_version=1.1.1.324
code_chicken_lib_version=1.1.3.127
code_chicken_core_version=1.0.4.35
nei_version=1.0.4.90
fmp_version=1.2.0.345
code_chicken_lib_version=1.1.3.138
code_chicken_core_version=1.0.7.46
nei_version=1.0.5.111
bc_version=7.0.9
opencomputers_version=1.5.12.26
pneumaticcraft_version=1.9.15-105
#########################################################
# Self Compiled APIs #
@@ -53,5 +55,4 @@ api_craftguide_version=1
api_immibis_version=1
api_mfr_version=1
api_railcraft_version=1
api_rblocks_version=1
api_rf_version=2
+6
View File
@@ -10,6 +10,11 @@ task javadocJar(type: Jar, dependsOn: myJavadocs) {
from 'build/docs/javadoc/'
}
task sourceJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
task devJar(type: Jar) {
manifest {
@@ -40,4 +45,5 @@ artifacts {
archives devJar
archives apiJar
archives javadocJar
archives sourceJar
}
+16 -2
View File
@@ -1,3 +1,4 @@
/*
* This file is part of Applied Energistics 2.
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
@@ -45,11 +46,21 @@ repositories {
url = "http://maven.tterrag.com/"
}
maven {
maven {
name = "RX14 Proxy"
url = "http://mvn.rx14.co.uk/repo/"
}
maven {
name "OpenComputers Repo"
url = "http://maven.cil.li/"
}
maven {
name = "MM repo"
url = "http://maven.k-4u.nl/"
}
ivy {
name "BuildCraft"
artifactPattern "http://www.mod-buildcraft.com/releases/BuildCraft/[revision]/[module]-[revision]-[classifier].[ext]"
@@ -91,6 +102,8 @@ dependencies {
mods "com.enderio:EnderIO:${minecraft_version}-${enderio_version}:dev"
mods "net.mcft.copy.betterstorage:BetterStorage:${minecraft_version}-${betterstorage_version}:deobf"
mods "inventorytweaks:InventoryTweaks:${invtweaks_version}:deobf"
mods "li.cil.oc:OpenComputers:MC${minecraft_version}-${opencomputers_version}:dev"
// mods name: 'CoFHLib', version: "[${minecraft_version}]${cofhlib_version}-dev", ext: 'jar'
// mods name: 'CoFHCore', version: "[${minecraft_version}]${cofhcore_version}-dev", ext: 'jar'
// mods name: 'ThermalExpansion', version: "[${minecraft_version}]${texpansion_version}-dev", ext: 'jar'
@@ -101,8 +114,10 @@ dependencies {
compile "codechicken:CodeChickenCore:${minecraft_version}-${code_chicken_core_version}:dev"
compile "codechicken:NotEnoughItems:${minecraft_version}-${nei_version}:dev"
compile "com.mod-buildcraft:buildcraft:${bc_version}:dev"
compile "pneumaticCraft:PneumaticCraft-${minecraft_version}:${pneumaticcraft_version}:api"
// provided APIs
compile "li.cil.oc:OpenComputers:MC${minecraft_version}-${opencomputers_version}:api"
compile "net.industrial-craft:industrialcraft-2:${ic2_version}-experimental:api"
compile "net.mcft.copy.betterstorage:BetterStorage:${minecraft_version}-${betterstorage_version}:api"
@@ -118,7 +133,6 @@ dependencies {
compile(group: 'api', name: 'immibis', version: "${api_immibis_version}")
compile(group: 'api', name: 'mfr', version: "${api_mfr_version}")
compile(group: 'api', name: 'railcraft', version: "${api_railcraft_version}")
compile(group: 'api', name: 'rblocks', version: "${api_rblocks_version}")
compile(group: 'api', name: 'rf', version: "${api_rf_version}")
testCompile "junit:junit:4.11"
+12 -2
View File
@@ -1,5 +1,5 @@
task wrapper(type: Wrapper) {
gradleVersion = "2.3"
gradleVersion = "2.4"
}
// WAILA
@@ -103,4 +103,14 @@ task installBetterStorage(type: Copy, dependsOn: "deinstallBetterStorage") {
task deinstallBetterStorage(type: Delete) {
delete fileTree(dir: minecraft.runDir + "/mods", include: "*BetterStorage*.jar")
}
}
task installOpenComputers(type: Copy, dependsOn: "deinstallOpenComputers") {
from { configurations.mods }
include "**/*OpenComputer*dev*.jar"
into file(minecraft.runDir + "/mods")
}
task deinstallOpenComputers(type: Delete) {
delete fileTree(dir: minecraft.runDir + "/mods", include: "*OpenComputers*.jar")
}
Binary file not shown.
+2 -2
View File
@@ -1,6 +1,6 @@
#Sat May 02 19:28:20 CEST 2015
#Sat May 16 13:19:14 CEST 2015
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-2.4-bin.zip
@@ -0,0 +1,30 @@
/*
* The MIT License (MIT)
*
* Copyright (c) 2013 AlgorithmX2
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package appeng.api.config;
public enum SchedulingMode
{
DEFAULT, ROUNDROBIN, RANDOM
}
+4 -2
View File
@@ -54,13 +54,15 @@ public enum Settings
INTERFACE_TERMINAL( EnumSet.of( YesNo.YES, YesNo.NO ) ), CRAFT_VIA_REDSTONE( EnumSet.of( YesNo.YES, YesNo.NO ) ),
STORAGE_FILTER( EnumSet.allOf( StorageFilter.class ) ), PLACE_BLOCK( EnumSet.of( YesNo.YES, YesNo.NO ) );
STORAGE_FILTER( EnumSet.allOf( StorageFilter.class ) ), PLACE_BLOCK( EnumSet.of( YesNo.YES, YesNo.NO ) ),
SCHEDULING_MODE( EnumSet.allOf( SchedulingMode.class ) );
private final EnumSet<? extends Enum<?>> values;
Settings( @Nonnull EnumSet<? extends Enum<?>> possibleOptions )
{
if ( possibleOptions.isEmpty() )
if( possibleOptions.isEmpty() )
{
throw new IllegalArgumentException( "Tried to instantiate an empty setting." );
}
@@ -34,5 +34,6 @@ public enum TunnelType
ITEM, // Item Tunnel
LIGHT, // Light Tunnel
BUNDLED_REDSTONE, // Bundled Redstone Tunnel
COMPUTER_MESSAGE // Computer Message Tunnel
COMPUTER_MESSAGE, // Computer Message Tunnel
PRESSURE // PneumaticCraft Tunnel
}
@@ -77,6 +77,22 @@ public interface IBlocks
IBlockDefinition quartzPillarStair();
IBlockDefinition skyStoneSlab();
IBlockDefinition skyStoneBlockSlab();
IBlockDefinition skyStoneBrickSlab();
IBlockDefinition skyStoneSmallBrickSlab();
IBlockDefinition fluixSlab();
IBlockDefinition quartzSlab();
IBlockDefinition chiseledQuartzSlab();
IBlockDefinition quartzPillarSlab();
/*
* misc
*/
@@ -90,7 +106,7 @@ public interface IBlocks
ITileDefinition charger();
ITileDefinition tinyTNT();
IBlockDefinition tinyTNT();
ITileDefinition security();
@@ -1,11 +1,34 @@
/*
* The MIT License (MIT)
*
* Copyright (c) 2013 - 2015 AlgorithmX2
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package appeng.api.definitions;
import com.google.common.base.Optional;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import com.google.common.base.Optional;
public interface IItemDefinition extends IComparableDefinition
{
@@ -18,4 +41,9 @@ public interface IItemDefinition extends IComparableDefinition
* @return an {@link ItemStack} with specified quantity of this item.
*/
Optional<ItemStack> maybeStack( int stackSize );
/**
* @return <tt>true</tt> if definition is enabled
*/
boolean isEnabled();
}
@@ -66,6 +66,8 @@ public interface IParts
IItemDefinition annihilationPlane();
IItemDefinition identityAnnihilationPlane();
IItemDefinition formationPlane();
IItemDefinition p2PTunnelME();
@@ -82,6 +84,10 @@ public interface IParts
IItemDefinition p2PTunnelLight();
IItemDefinition p2PTunnelOpenComputers();
IItemDefinition p2PTunnelPneumaticCraft();
IItemDefinition cableAnchor();
IItemDefinition monitor();
@@ -1,10 +1,15 @@
package appeng.api.features;
import java.util.Collection;
import java.util.List;
import java.util.Set;
import javax.annotation.Nonnull;
import com.google.common.base.Optional;
import net.minecraft.item.ItemStack;
@@ -12,22 +17,26 @@ import net.minecraft.item.ItemStack;
* Lets you manipulate Inscriber Recipes, by adding or editing existing ones.
*
* @author thatsIch
* @version rv2
* @version rv3
* @since rv2
*/
public interface IInscriberRegistry
{
/**
* Current list of registered recipes, you can modify this if you want too.
* Will never contain a null recipe
* An immutable copy of currently registered recipes.
*
* Use the provided methods to actually modify the inscriber recipes.
*
* @see IInscriberRegistry#addRecipe(IInscriberRecipe)
* @see IInscriberRegistry#removeRecipe(IInscriberRecipe)
*
* @return currentlyRegisteredRecipes
*/
@Nonnull
List<IInscriberRecipe> getRecipes();
Collection<IInscriberRecipe> getRecipes();
/**
* Optional items which are used in the top or bottom slot
* Optional items which are used in the top or bottom slot.
*
* @return set of all optional items
*/
@@ -35,7 +44,7 @@ public interface IInscriberRegistry
Set<ItemStack> getOptionals();
/**
* Get all registered items which are valid inputs
* Get all registered items which are valid inputs.
*
* @return set of all input items
*/
@@ -43,7 +52,7 @@ public interface IInscriberRegistry
Set<ItemStack> getInputs();
/**
* Extensible way to create an inscriber recipe
* Extensible way to create an inscriber recipe.
*
* @return builder for inscriber recipes
*/
@@ -61,9 +70,10 @@ public interface IInscriberRegistry
void addRecipe( IInscriberRecipe recipe );
/**
* Removes a recipe from the registry
* Removes all equal recipes from the registry.
*
* @param toBeRemovedRecipe to be removed recipe, can be null, makes just no sense
* @param toBeRemovedRecipe to be removed recipe, can be null, makes just no sense.
*/
void removeRecipe( IInscriberRecipe toBeRemovedRecipe );
}
@@ -1,7 +1,7 @@
/*
* The MIT License (MIT)
*
* Copyright (c) 2013 AlgorithmX2
* Copyright (c) 2013 - 2015 AlgorithmX2
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
@@ -24,6 +24,8 @@
package appeng.api.features;
import javax.annotation.Nullable;
import net.minecraft.item.ItemStack;
import appeng.api.config.TunnelType;
@@ -39,10 +41,10 @@ public interface IP2PTunnelRegistry
* Allows third parties to register items from their mod as potential
* attunements for AE's P2P Tunnels
*
* @param trigger - the item which triggers attunement
* @param type - the type of tunnel
* @param trigger - the item which triggers attunement. Nullable, but then ignored
* @param type - the type of tunnel. Nullable, but then ignored
*/
void addNewAttunement( ItemStack trigger, TunnelType type );
void addNewAttunement( @Nullable ItemStack trigger, @Nullable TunnelType type );
/**
* returns null if no attunement can be found.
@@ -51,5 +53,6 @@ public interface IP2PTunnelRegistry
*
* @return null if no attunement can be found or attunement
*/
@Nullable
TunnelType getTunnelTypeByItem( ItemStack trigger );
}
@@ -1,7 +1,7 @@
/*
* The MIT License (MIT)
*
* Copyright (c) 2013 AlgorithmX2
* Copyright (c) 2013 - 2015 AlgorithmX2
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
@@ -24,10 +24,12 @@
package appeng.api.features;
import net.minecraft.entity.player.EntityPlayer;
import javax.annotation.Nullable;
import com.mojang.authlib.GameProfile;
import net.minecraft.entity.player.EntityPlayer;
/**
* Maintains a save specific list of userids and username combinations this greatly simplifies storage internally and
@@ -55,5 +57,6 @@ public interface IPlayerRegistry
*
* @return PlayerEntity, or null if the player could not be found.
*/
@Nullable
EntityPlayer findPlayer( int playerID );
}
@@ -1,7 +1,7 @@
/*
* The MIT License (MIT)
*
* Copyright (c) 2013 AlgorithmX2
* Copyright (c) 2013 - 2015 AlgorithmX2
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
@@ -24,11 +24,19 @@
package appeng.api.features;
import javax.annotation.Nullable;
import appeng.api.recipes.ICraftHandler;
import appeng.api.recipes.IRecipeHandler;
import appeng.api.recipes.ISubItemResolver;
/**
* @author AlgorithmX2
* @author thatsIch
* @version rv3 - 10.08.2015
* @since rv0
*/
public interface IRecipeHandlerRegistry
{
@@ -37,7 +45,7 @@ public interface IRecipeHandlerRegistry
*
* MUST BE CALLED IN PRE-INIT
*
* @param name name of crafthandler
* @param name name of crafthandler
* @param handler class of crafthandler
*/
void addNewCraftHandler( String name, Class<? extends ICraftHandler> handler );
@@ -56,6 +64,7 @@ public interface IRecipeHandlerRegistry
*
* @return A recipe handler by name, returns null on failure.
*/
@Nullable
ICraftHandler getCraftHandlerFor( String name );
/**
@@ -67,9 +76,10 @@ public interface IRecipeHandlerRegistry
* resolve sub items by name.
*
* @param nameSpace namespace of item
* @param itemName full name of item
* @param itemName full name of item
*
* @return ResolverResult or ResolverResultSet
* @return ResolverResult or ResolverResultSet or null if could not resolve
*/
@Nullable
Object resolveItem( String nameSpace, String itemName );
}
@@ -1,7 +1,7 @@
/*
* The MIT License (MIT)
*
* Copyright (c) 2013 AlgorithmX2
* Copyright (c) 2013 - 2015 AlgorithmX2
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
@@ -38,8 +38,8 @@ public interface ISecurityRegistry
/**
* Submit Permissions into the register.
*
* @param PlayerID player id
* @param playerID player id
* @param permissions permissions of player
*/
void addPlayer( int PlayerID, EnumSet<SecurityPermissions> permissions );
void addPlayer( int playerID, EnumSet<SecurityPermissions> permissions );
}
@@ -1,7 +1,7 @@
/*
* The MIT License (MIT)
*
* Copyright (c) 2013 AlgorithmX2
* Copyright (c) 2013 - 2015 AlgorithmX2
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
@@ -94,7 +94,7 @@ public interface IFacadePart
int getItemDamage();
boolean isBC();
boolean notAEFacade();
void setThinFacades( boolean useThinFacades );
+4 -1
View File
@@ -1,7 +1,7 @@
/*
* The MIT License (MIT)
*
* Copyright (c) 2013 AlgorithmX2
* Copyright (c) 2013 - 2015 AlgorithmX2
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
@@ -24,6 +24,8 @@
package appeng.api.parts;
import javax.annotation.Nullable;
import net.minecraft.item.ItemStack;
//@formatter:off
@@ -63,5 +65,6 @@ public interface IPartItem
*
* @return part from item
*/
@Nullable
IPart createPartFromItemStack( ItemStack is );
}
@@ -1,7 +1,7 @@
/*
* The MIT License (MIT)
*
* Copyright (c) 2013 AlgorithmX2
* Copyright (c) 2013 - 2015 AlgorithmX2
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
@@ -25,10 +25,17 @@ package appeng.api.recipes;
import java.io.BufferedReader;
import javax.annotation.Nonnull;
public interface IRecipeLoader
{
BufferedReader getFile( String s ) throws Exception;
/**
* @param filePath the path to the to be loaded file
*
* @return reader handler of the file
*
* @throws Exception if reading goes wrong
*/
BufferedReader getFile( @Nonnull String filePath ) throws Exception;
}
@@ -24,7 +24,7 @@
package appeng.api.util;
import java.util.ArrayList;
import java.util.List;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
@@ -43,5 +43,5 @@ public interface ICommonTile
* @param z z pos of tile entity
* @param drops drops of tile entity
*/
void getDrops( World world, int x, int y, int z, ArrayList<ItemStack> drops );
void getDrops( World world, int x, int y, int z, List<ItemStack> drops );
}
+82 -381
View File
@@ -1,6 +1,6 @@
/*
* This file is part of Applied Energistics 2.
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
* Copyright (c) 2013 - 2015, AlgorithmX2, All rights reserved.
*
* Applied Energistics 2 is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -22,24 +22,19 @@ package appeng.block;
import java.util.ArrayList;
import java.util.EnumSet;
import java.util.List;
import javax.annotation.Nullable;
import com.google.common.base.Optional;
import net.minecraft.block.Block;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.client.resources.IResource;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.Container;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.IIcon;
import net.minecraft.util.MovingObjectPosition;
@@ -49,21 +44,11 @@ import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.relauncher.ReflectionHelper;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import com.google.common.base.Optional;
import com.google.common.collect.Lists;
import appeng.api.implementations.items.IMemoryCard;
import appeng.api.implementations.items.MemoryCardMessages;
import appeng.api.implementations.tiles.IColorableTile;
import appeng.api.util.AEColor;
import appeng.api.util.IOrientable;
import appeng.api.util.IOrientableBlock;
import appeng.block.networking.BlockCableBus;
import appeng.client.render.BaseBlockRender;
import appeng.client.render.BlockRenderInfo;
import appeng.client.render.WorldRender;
@@ -74,45 +59,34 @@ import appeng.core.features.AEFeature;
import appeng.core.features.FeatureNameExtractor;
import appeng.core.features.IAEFeature;
import appeng.core.features.IFeatureHandler;
import appeng.core.features.ItemStackSrc;
import appeng.helpers.AEGlassMaterial;
import appeng.helpers.ICustomCollision;
import appeng.tile.AEBaseTile;
import appeng.tile.networking.TileCableBus;
import appeng.tile.storage.TileSkyChest;
import appeng.util.LookDirection;
import appeng.util.Platform;
import appeng.util.SettingsFrom;
public class AEBaseBlock extends BlockContainer implements IAEFeature
public abstract class AEBaseBlock extends Block implements IAEFeature
{
private final String featureFullName;
private final Optional<String> featureSubName;
@SideOnly( Side.CLIENT )
public IIcon renderIcon;
protected final Optional<String> featureSubName;
protected boolean isOpaque = true;
protected boolean isFullSize = true;
protected boolean hasSubtypes = false;
protected boolean isInventory = false;
private IFeatureHandler handler;
@SideOnly( Side.CLIENT )
BlockRenderInfo renderInfo;
private IFeatureHandler handler;
@Nullable
private Class<? extends TileEntity> tileEntityType = null;
protected AEBaseBlock( Class<? extends AEBaseBlock> c, Material mat )
protected AEBaseBlock( Material mat )
{
this( c, mat, Optional.<String>absent() );
this( mat, Optional.<String>absent() );
this.setLightOpacity( 255 );
this.setLightLevel( 0 );
this.setHardness( 2.2F );
this.setTileProvider( false );
this.setHarvestLevel( "pickaxe", 0 );
}
protected AEBaseBlock( Class<?> c, Material mat, Optional<String> subName )
protected AEBaseBlock( Material mat, Optional<String> subName )
{
super( mat );
@@ -133,16 +107,10 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
this.setStepSound( Block.soundTypeMetal );
}
this.featureFullName = new FeatureNameExtractor( c, subName ).get();
this.featureFullName = new FeatureNameExtractor( this.getClass(), subName ).get();
this.featureSubName = subName;
}
// update Block value.
private void setTileProvider( boolean b )
{
ReflectionHelper.setPrivateValue( Block.class, this, b, "isTileProvider" );
}
@Override
public String toString()
{
@@ -151,8 +119,8 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
public void registerNoIcons()
{
BlockRenderInfo info = this.getRendererInstance();
FlippableIcon i = new FlippableIcon( new MissingIcon( this ) );
final BlockRenderInfo info = this.getRendererInstance();
final FlippableIcon i = new FlippableIcon( new MissingIcon( this ) );
info.updateIcons( i, i, i, i, i, i );
}
@@ -171,7 +139,7 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
return this.renderInfo;
}
catch ( InstantiationException e )
catch( InstantiationException e )
{
throw new IllegalStateException( "Failed to create a new instance of an illegal class " + this.getRenderer(), e );
}
@@ -192,24 +160,10 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
return super.getIcon( w, x, y, z, s );
}
protected void setTileEntity( Class<? extends TileEntity> c )
{
this.tileEntityType = c;
AEBaseTile.registerTileItem( c, new ItemStackSrc( this, 0 ) );
GameRegistry.registerTileEntity( this.tileEntityType, this.featureFullName );
this.isInventory = IInventory.class.isAssignableFrom( c );
this.setTileProvider( this.hasBlockTileEntity() );
}
public boolean hasBlockTileEntity()
{
return this.tileEntityType != null;
}
protected void setFeature( EnumSet<AEFeature> f )
{
this.handler = new AEBlockFeatureHandler( f, this, this.featureSubName );
final AEBlockFeatureHandler featureHandler = new AEBlockFeatureHandler( f, this, this.featureSubName );
this.setHandler( featureHandler );
}
@Override
@@ -218,6 +172,11 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
return this.handler;
}
protected final void setHandler( IFeatureHandler handler )
{
this.handler = handler;
}
@Override
public void postInit()
{
@@ -252,33 +211,24 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
@SideOnly( Side.CLIENT )
public IIcon getIcon( int direction, int metadata )
{
if( this.renderIcon != null )
{
return this.renderIcon;
}
return this.getRendererInstance().getTexture( ForgeDirection.getOrientation( direction ) );
}
protected ICustomCollision getCustomCollision( World w, int x, int y, int z )
{
if( this instanceof ICustomCollision )
{
return (ICustomCollision) this;
}
return null;
}
@Override
@SuppressWarnings( "unchecked" )
// NOTE: WAS FINAL, changed for Immibis
public void addCollisionBoxesToList( World w, int x, int y, int z, AxisAlignedBB bb, List out, Entity e )
{
ICustomCollision collisionHandler = null;
if( this instanceof ICustomCollision )
{
collisionHandler = (ICustomCollision) this;
}
else
{
AEBaseTile te = this.getTileEntity( w, x, y, z );
if( te instanceof ICustomCollision )
{
collisionHandler = (ICustomCollision) te;
}
}
final ICustomCollision collisionHandler = this.getCustomCollision( w, x, y, z );
if( collisionHandler != null && bb != null )
{
@@ -308,30 +258,16 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
@SideOnly( Side.CLIENT )
public final AxisAlignedBB getSelectedBoundingBoxFromPool( World w, int x, int y, int z )
{
ICustomCollision collisionHandler = null;
AxisAlignedBB b = null;
if( this instanceof ICustomCollision )
{
collisionHandler = (ICustomCollision) this;
}
else
{
AEBaseTile te = this.getTileEntity( w, x, y, z );
if( te instanceof ICustomCollision )
{
collisionHandler = (ICustomCollision) te;
}
}
final ICustomCollision collisionHandler = this.getCustomCollision( w, x, y, z );
if( collisionHandler != null )
{
if( Platform.isClient() )
{
EntityPlayer player = Minecraft.getMinecraft().thePlayer;
LookDirection ld = Platform.getPlayerRay( player, Platform.getEyeOffset( player ) );
final EntityPlayer player = Minecraft.getMinecraft().thePlayer;
final LookDirection ld = Platform.getPlayerRay( player, Platform.getEyeOffset( player ) );
Iterable<AxisAlignedBB> bbs = collisionHandler.getSelectedBoundingBoxesFromPool( w, x, y, z, Minecraft.getMinecraft().thePlayer, true );
final Iterable<AxisAlignedBB> bbs = collisionHandler.getSelectedBoundingBoxesFromPool( w, x, y, z, Minecraft.getMinecraft().thePlayer, true );
AxisAlignedBB br = null;
double lastDist = 0;
@@ -346,11 +282,12 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
if( r != null )
{
double xLen = ( ld.a.xCoord - r.hitVec.xCoord );
double yLen = ( ld.a.yCoord - r.hitVec.yCoord );
double zLen = ( ld.a.zCoord - r.hitVec.zCoord );
final double xLen = ( ld.a.xCoord - r.hitVec.xCoord );
final double yLen = ( ld.a.yCoord - r.hitVec.yCoord );
final double zLen = ( ld.a.zCoord - r.hitVec.zCoord );
final double thisDist = xLen * xLen + yLen * yLen + zLen * zLen;
double thisDist = xLen * xLen + yLen * yLen + zLen * zLen;
if( br == null || lastDist > thisDist )
{
lastDist = thisDist;
@@ -366,32 +303,26 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
}
}
final AxisAlignedBB b = AxisAlignedBB.getBoundingBox( 16d, 16d, 16d, 0d, 0d, 0d );
for( AxisAlignedBB bx : collisionHandler.getSelectedBoundingBoxesFromPool( w, x, y, z, null, false ) )
{
if( b == null )
{
b = bx;
}
else
{
double minX = Math.min( b.minX, bx.minX );
double minY = Math.min( b.minY, bx.minY );
double minZ = Math.min( b.minZ, bx.minZ );
double maxX = Math.max( b.maxX, bx.maxX );
double maxY = Math.max( b.maxY, bx.maxY );
double maxZ = Math.max( b.maxZ, bx.maxZ );
b.setBounds( minX, minY, minZ, maxX, maxY, maxZ );
}
final double minX = Math.min( b.minX, bx.minX );
final double minY = Math.min( b.minY, bx.minY );
final double minZ = Math.min( b.minZ, bx.minZ );
final double maxX = Math.max( b.maxX, bx.maxX );
final double maxY = Math.max( b.maxY, bx.maxY );
final double maxZ = Math.max( b.maxZ, bx.maxZ );
b.setBounds( minX, minY, minZ, maxX, maxY, maxZ );
}
b.setBounds( b.minX + x, b.minY + y, b.minZ + z, b.maxX + x, b.maxY + y, b.maxZ + z );
}
else
{
b = super.getSelectedBoundingBoxFromPool( w, x, y, z );
return b;
}
return b;
return super.getSelectedBoundingBoxFromPool( w, x, y, z );
}
@Override
@@ -403,24 +334,11 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
@Override
public MovingObjectPosition collisionRayTrace( World w, int x, int y, int z, Vec3 a, Vec3 b )
{
ICustomCollision collisionHandler = null;
if( this instanceof ICustomCollision )
{
collisionHandler = (ICustomCollision) this;
}
else
{
AEBaseTile te = this.getTileEntity( w, x, y, z );
if( te instanceof ICustomCollision )
{
collisionHandler = (ICustomCollision) te;
}
}
final ICustomCollision collisionHandler = this.getCustomCollision( w, x, y, z );
if( collisionHandler != null )
{
Iterable<AxisAlignedBB> bbs = collisionHandler.getSelectedBoundingBoxesFromPool( w, x, y, z, null, true );
final Iterable<AxisAlignedBB> bbs = collisionHandler.getSelectedBoundingBoxesFromPool( w, x, y, z, null, true );
MovingObjectPosition br = null;
double lastDist = 0;
@@ -452,6 +370,7 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
{
return br;
}
return null;
}
@@ -459,114 +378,11 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
return super.collisionRayTrace( w, x, y, z, a, b );
}
@Override
public final boolean onBlockActivated( World w, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ )
{
if( player != null )
{
ItemStack is = player.inventory.getCurrentItem();
if( is != null )
{
if( Platform.isWrench( player, is, x, y, z ) && player.isSneaking() )
{
Block id = w.getBlock( x, y, z );
if( id != null )
{
AEBaseTile tile = this.getTileEntity( w, x, y, z );
ItemStack[] drops = Platform.getBlockDrops( w, x, y, z );
if( tile == null )
{
return false;
}
if( tile instanceof TileCableBus || tile instanceof TileSkyChest )
{
return false;
}
ItemStack op = new ItemStack( this );
for( ItemStack ol : drops )
{
if( Platform.isSameItemType( ol, op ) )
{
NBTTagCompound tag = tile.downloadSettings( SettingsFrom.DISMANTLE_ITEM );
if( tag != null )
{
ol.setTagCompound( tag );
}
}
}
if( id.removedByPlayer( w, player, x, y, z, false ) )
{
List<ItemStack> l = Lists.newArrayList( drops );
Platform.spawnDrops( w, x, y, z, l );
w.setBlockToAir( x, y, z );
}
}
return false;
}
if( is.getItem() instanceof IMemoryCard && !( this instanceof BlockCableBus ) )
{
IMemoryCard memoryCard = (IMemoryCard) is.getItem();
if( player.isSneaking() )
{
AEBaseTile t = this.getTileEntity( w, x, y, z );
if( t != null )
{
String name = this.getUnlocalizedName();
NBTTagCompound data = t.downloadSettings( SettingsFrom.MEMORY_CARD );
if( data != null )
{
memoryCard.setMemoryCardContents( is, name, data );
memoryCard.notifyUser( player, MemoryCardMessages.SETTINGS_SAVED );
return true;
}
}
}
else
{
String name = memoryCard.getSettingsName( is );
NBTTagCompound data = memoryCard.getData( is );
if( this.getUnlocalizedName().equals( name ) )
{
AEBaseTile t = this.getTileEntity( w, x, y, z );
t.uploadSettings( SettingsFrom.MEMORY_CARD, data );
memoryCard.notifyUser( player, MemoryCardMessages.SETTINGS_LOADED );
}
else
{
memoryCard.notifyUser( player, MemoryCardMessages.INVALID_MACHINE );
}
return false;
}
}
}
}
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 )
{
return false;
}
@Override
public void onBlockPlacedBy( World w, int x, int y, int z, EntityLivingBase player, ItemStack is )
{
if( is.hasDisplayName() )
{
TileEntity te = this.getTileEntity( w, x, y, z );
if( te instanceof AEBaseTile )
{
( (AEBaseTile) w.getTileEntity( x, y, z ) ).setName( is.getDisplayName() );
}
}
}
@Override
@SideOnly( Side.CLIENT )
@SuppressWarnings( "unchecked" )
@@ -584,11 +400,6 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
@Override
public int getComparatorInputOverride( World w, int x, int y, int z, int s )
{
TileEntity te = this.getTileEntity( w, x, y, z );
if( te instanceof IInventory )
{
return Container.calcRedstoneFromInventory( (IInventory) te );
}
return 0;
}
@@ -596,14 +407,14 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
@SideOnly( Side.CLIENT )
public void registerBlockIcons( IIconRegister iconRegistry )
{
BlockRenderInfo info = this.getRendererInstance();
FlippableIcon topIcon;
FlippableIcon bottomIcon;
FlippableIcon sideIcon;
FlippableIcon eastIcon;
FlippableIcon westIcon;
FlippableIcon southIcon;
FlippableIcon northIcon;
final BlockRenderInfo info = this.getRendererInstance();
final FlippableIcon topIcon;
final FlippableIcon bottomIcon;
final FlippableIcon sideIcon;
final FlippableIcon eastIcon;
final FlippableIcon westIcon;
final FlippableIcon southIcon;
final FlippableIcon northIcon;
this.blockIcon = topIcon = this.optionalIcon( iconRegistry, this.getTextureName(), null );
bottomIcon = this.optionalIcon( iconRegistry, this.getTextureName() + "Bottom", topIcon );
@@ -622,19 +433,19 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
return this.isFullSize;
}
public IOrientable getOrientable( IBlockAccess w, int x, int y, int z )
{
if( this instanceof IOrientableBlock )
{
return ( (IOrientableBlock) this ).getOrientable( w, x, y, z );
}
return null;
}
@Override
public final boolean rotateBlock( World w, int x, int y, int z, ForgeDirection axis )
{
IOrientable rotatable = null;
if( this.hasBlockTileEntity() )
{
rotatable = (AEBaseTile) this.getTileEntity( w, x, y, z );
}
else if( this instanceof IOrientableBlock )
{
rotatable = ( (IOrientableBlock) this ).getOrientable( w, x, y, z );
}
final IOrientable rotatable = this.getOrientable( w, x, y, z );
if( rotatable != null && rotatable.canBeRotated() )
{
@@ -681,44 +492,13 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
}
@Override
public final ForgeDirection[] getValidRotations( World w, int x, int y, int z )
public ForgeDirection[] getValidRotations( World w, int x, int y, int z )
{
if( this.hasBlockTileEntity() )
{
AEBaseTile obj = this.getTileEntity( w, x, y, z );
if( obj != null && obj.canBeRotated() )
{
return ForgeDirection.VALID_DIRECTIONS;
}
}
return new ForgeDirection[0];
}
@Override
public boolean recolourBlock( World world, int x, int y, int z, ForgeDirection side, int colour )
{
TileEntity te = this.getTileEntity( world, x, y, z );
if( te instanceof IColorableTile )
{
IColorableTile ct = (IColorableTile) te;
AEColor c = ct.getColor();
AEColor newColor = AEColor.values()[colour];
if( c != newColor )
{
ct.recolourBlock( side, newColor, null );
return true;
}
return false;
}
return super.recolourBlock( world, x, y, z, side, colour );
}
@SideOnly( Side.CLIENT )
private FlippableIcon optionalIcon( IIconRegister ir, String Name, IIcon substitute )
private FlippableIcon optionalIcon( IIconRegister ir, String name, IIcon substitute )
{
// if the input is an flippable IIcon find the original.
while( substitute instanceof FlippableIcon )
@@ -730,13 +510,13 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
{
try
{
ResourceLocation resLoc = new ResourceLocation( Name );
ResourceLocation resLoc = new ResourceLocation( name );
resLoc = new ResourceLocation( resLoc.getResourceDomain(), String.format( "%s/%s%s", "textures/blocks", resLoc.getResourcePath(), ".png" ) );
IResource res = Minecraft.getMinecraft().getResourceManager().getResource( resLoc );
if( res != null )
{
return new FlippableIcon( ir.registerIcon( Name ) );
return new FlippableIcon( ir.registerIcon( name ) );
}
}
catch( Throwable e )
@@ -745,7 +525,7 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
}
}
return new FlippableIcon( ir.registerIcon( Name ) );
return new FlippableIcon( ir.registerIcon( name ) );
}
@SideOnly( Side.CLIENT )
@@ -756,16 +536,7 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
int mapRotation( IBlockAccess w, int x, int y, int z, int s )
{
IOrientable ori = null;
if( this.hasBlockTileEntity() )
{
ori = (AEBaseTile) this.getTileEntity( w, x, y, z );
}
else if( this instanceof IOrientableBlock )
{
ori = ( (IOrientableBlock) this ).getOrientable( w, x, y, z );
}
final IOrientable ori = this.getOrientable( w, x, y, z );
if( ori != null && ori.canBeRotated() )
{
@@ -775,23 +546,6 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
return s;
}
@Nullable
public <T extends TileEntity> T getTileEntity( IBlockAccess w, int x, int y, int z )
{
if( !this.hasBlockTileEntity() )
{
return null;
}
TileEntity te = w.getTileEntity( x, y, z );
if( this.tileEntityType.isInstance( te ) )
{
return (T) te;
}
return null;
}
public ForgeDirection mapRotation( IOrientable ori, ForgeDirection dir )
{
// case DOWN: return bottomIcon;
@@ -801,8 +555,8 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
// case WEST: return sideIcon;
// case EAST: return sideIcon;
ForgeDirection forward = ori.getForward();
ForgeDirection up = ori.getUp();
final ForgeDirection forward = ori.getForward();
final ForgeDirection up = ori.getUp();
ForgeDirection west = ForgeDirection.UNKNOWN;
if( forward == null || up == null )
@@ -852,66 +606,12 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
return ForgeDirection.UNKNOWN;
}
public Class<? extends TileEntity> getTileEntityClass()
{
return this.tileEntityType;
}
@SideOnly( Side.CLIENT )
public void setRenderStateByMeta( int itemDamage )
{
}
@Override
public final TileEntity createNewTileEntity( World var1, int var2 )
{
if( this.hasBlockTileEntity() )
{
try
{
return this.tileEntityType.newInstance();
}
catch( InstantiationException e )
{
throw new IllegalStateException( "Failed to create a new instance of an illegal class " + this.tileEntityType , e );
}
catch( IllegalAccessException e )
{
throw new IllegalStateException( "Failed to create a new instance of " + this.tileEntityType + ", because lack of permissions", e );
}
}
return null;
}
@Override
public void breakBlock( World w, int x, int y, int z, Block a, int b )
{
AEBaseTile te = this.getTileEntity( w, x, y, z );
if( te != null )
{
ArrayList<ItemStack> drops = new ArrayList<ItemStack>();
if( te.dropItems() )
{
te.getDrops( w, x, y, z, drops );
}
else
{
te.getNoDrops( w, x, y, z, drops );
}
// Cry ;_; ...
Platform.spawnDrops( w, x, y, z, drops );
}
super.breakBlock( w, x, y, z, a, b );
if( te != null )
{
w.setTileEntity( x, y, z, null );
}
}
public String getUnlocalizedName( ItemStack is )
{
return this.getUnlocalizedName();
@@ -931,4 +631,5 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
{
return this.hasSubtypes;
}
}
@@ -47,7 +47,7 @@ import appeng.util.Platform;
public class AEBaseItemBlock extends ItemBlock
{
final AEBaseBlock blockType;
private final AEBaseBlock blockType;
public AEBaseItemBlock( Block id )
{
@@ -105,7 +105,7 @@ public class AEBaseItemBlock extends ItemBlock
IOrientable ori = null;
if( this.blockType.hasBlockTileEntity() )
if( this.blockType instanceof AEBaseTileBlock )
{
if( this.blockType instanceof BlockLightDetector )
{
@@ -185,9 +185,9 @@ public class AEBaseItemBlock extends ItemBlock
if( super.placeBlockAt( stack, player, w, x, y, z, side, hitX, hitY, hitZ, metadata ) )
{
if( this.blockType.hasBlockTileEntity() && !( this.blockType instanceof BlockLightDetector ) )
if( this.blockType instanceof AEBaseTileBlock && !( this.blockType instanceof BlockLightDetector ) )
{
AEBaseTile tile = this.blockType.getTileEntity( w, x, y, z );
AEBaseTile tile = ( (AEBaseTileBlock) this.blockType ).getTileEntity( w, x, y, z );
ori = tile;
if( tile == null )
@@ -198,7 +198,7 @@ public class AEBaseItemBlock extends ItemBlock
if( ori.canBeRotated() && !this.blockType.hasCustomRotation() )
{
if( ori.getForward() == null || ori.getUp() == null || // null
tile.getForward() == ForgeDirection.UNKNOWN || ori.getUp() == ForgeDirection.UNKNOWN )
tile.getForward() == ForgeDirection.UNKNOWN || ori.getUp() == ForgeDirection.UNKNOWN )
{
ori.setOrientation( forward, up );
}
@@ -51,7 +51,7 @@ public class AEBaseItemBlockChargeable extends AEBaseItemBlock implements IAEIte
@SideOnly( Side.CLIENT )
public void addCheckedInformation( ItemStack itemStack, EntityPlayer player, List<String> toolTip, boolean advancedTooltips )
{
NBTTagCompound tag = itemStack.getTagCompound();
final NBTTagCompound tag = itemStack.getTagCompound();
double internalCurrentPower = 0;
double internalMaxPower = this.getMaxEnergyCapacity();
@@ -60,14 +60,14 @@ public class AEBaseItemBlockChargeable extends AEBaseItemBlock implements IAEIte
internalCurrentPower = tag.getDouble( "internalCurrentPower" );
}
double percent = internalCurrentPower / internalMaxPower;
final double percent = internalCurrentPower / internalMaxPower;
toolTip.add( GuiText.StoredEnergy.getLocal() + ':' + MessageFormat.format( " {0,number,#} ", internalCurrentPower ) + Platform.gui_localize( PowerUnits.AE.unlocalizedName ) + " - " + MessageFormat.format( " {0,number,#.##%} ", percent ) );
}
private double getMaxEnergyCapacity()
{
Block blockID = Block.getBlockFromItem( this );
final Block blockID = Block.getBlockFromItem( this );
final IBlockDefinition energyCell = Api.INSTANCE.definitions().blocks().energyCell();
for( Block block : energyCell.maybeBlock().asSet() )
{
@@ -104,13 +104,13 @@ public class AEBaseItemBlockChargeable extends AEBaseItemBlock implements IAEIte
private double getInternal( ItemStack is )
{
NBTTagCompound nbt = Platform.openNbtData( is );
final NBTTagCompound nbt = Platform.openNbtData( is );
return nbt.getDouble( "internalCurrentPower" );
}
private void setInternal( ItemStack is, double amt )
{
NBTTagCompound nbt = Platform.openNbtData( is );
final NBTTagCompound nbt = Platform.openNbtData( is );
nbt.setDouble( "internalCurrentPower", amt );
}
@@ -0,0 +1,16 @@
package appeng.block;
import net.minecraft.block.Block;
import net.minecraft.item.ItemSlab;
public class AEBaseItemBlockSlab extends ItemSlab
{
public AEBaseItemBlockSlab( Block block, AEBaseSlabBlock singleSlab, AEBaseSlabBlock doubleSlab, Boolean isDoubleSlab )
{
super( block, singleSlab, doubleSlab, isDoubleSlab );
}
}
@@ -0,0 +1,139 @@
/*
* This file is part of Applied Energistics 2.
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
*
* Applied Energistics 2 is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Applied Energistics 2 is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
*/
package appeng.block;
import java.util.EnumSet;
import java.util.Random;
import net.minecraft.block.BlockSlab;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.world.World;
import appeng.core.features.AEFeature;
import appeng.core.features.IAEFeature;
import appeng.core.features.IFeatureHandler;
import appeng.core.features.SlabBlockFeatureHandler;
public class AEBaseSlabBlock extends BlockSlab implements IAEFeature
{
private final IFeatureHandler features;
private final AEBaseBlock block;
private final int meta;
private AEBaseSlabBlock slabs;
private AEBaseSlabBlock doubleSlabs;
private final String name;
public AEBaseSlabBlock( AEBaseBlock block, int meta, EnumSet<AEFeature> features, boolean isDoubleSlab, String name )
{
super( isDoubleSlab, block.getMaterial() );
this.block = block;
this.meta = meta;
this.name = name;
this.setBlockName( "appliedenergistics2." + name );
this.setHardness( block.getBlockHardness( null, 0, 0, 0 ) );
this.setResistance( block.getExplosionResistance( null ) * 5.0F / 3.0F );
this.setStepSound( block.stepSound );
this.useNeighborBrightness = true;
if( !this.field_150004_a )
{
this.doubleSlabs = new AEBaseSlabBlock( block, meta, features, true, name + ".double" ).setSlabs( this );
}
this.features = !this.field_150004_a ? new SlabBlockFeatureHandler( features, this ) : null;
}
public AEBaseSlabBlock setSlabs( AEBaseSlabBlock slabs )
{
this.slabs = slabs;
return this;
}
public AEBaseSlabBlock slabs()
{
return this.slabs;
}
public AEBaseSlabBlock doubleSlabs()
{
return this.doubleSlabs;
}
@Override
public IFeatureHandler handler()
{
return this.features;
}
@Override
public void postInit()
{
// Override to do stuff
}
@Override
public IIcon getIcon( int dir, int meta )
{
return this.block.getIcon( dir, this.meta );
}
@Override
public String func_150002_b( int p_150002_1_ )
{
return this.getUnlocalizedName();
}
@Override
public void registerBlockIcons( IIconRegister reg )
{
}
@Override
public Item getItemDropped( int meta, Random rand, int fortune )
{
return this.field_150004_a ? Item.getItemFromBlock( this.slabs ) : Item.getItemFromBlock( this );
}
@Override
public ItemStack getPickBlock( MovingObjectPosition target, World world, int x, int y, int z )
{
AEBaseSlabBlock block = (AEBaseSlabBlock) world.getBlock( x, y, z );
if( block == null )
{
return null;
}
if( block.field_150004_a )
{
block = this.slabs;
}
int meta = world.getBlockMetadata( x, y, z ) & 7;
return new ItemStack( block, 1, meta );
}
public String name()
{
return this.name;
}
}
@@ -21,11 +21,11 @@ package appeng.block;
import java.util.EnumSet;
import com.google.common.base.Optional;
import net.minecraft.block.Block;
import net.minecraft.block.BlockStairs;
import com.google.common.base.Optional;
import appeng.core.features.AEFeature;
import appeng.core.features.IAEFeature;
import appeng.core.features.IFeatureHandler;
@@ -0,0 +1,348 @@
/*
* This file is part of Applied Energistics 2.
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
*
* Applied Energistics 2 is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Applied Energistics 2 is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
*/
package appeng.block;
import java.util.ArrayList;
import java.util.EnumSet;
import java.util.List;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import com.google.common.base.Optional;
import com.google.common.collect.Lists;
import net.minecraft.block.Block;
import net.minecraft.block.ITileEntityProvider;
import net.minecraft.block.material.Material;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.Container;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
import cpw.mods.fml.relauncher.ReflectionHelper;
import appeng.api.implementations.items.IMemoryCard;
import appeng.api.implementations.items.MemoryCardMessages;
import appeng.api.implementations.tiles.IColorableTile;
import appeng.api.util.AEColor;
import appeng.api.util.IOrientable;
import appeng.block.networking.BlockCableBus;
import appeng.core.features.AEFeature;
import appeng.core.features.AETileBlockFeatureHandler;
import appeng.core.features.IAEFeature;
import appeng.helpers.ICustomCollision;
import appeng.tile.AEBaseTile;
import appeng.tile.networking.TileCableBus;
import appeng.tile.storage.TileSkyChest;
import appeng.util.Platform;
import appeng.util.SettingsFrom;
public abstract class AEBaseTileBlock extends AEBaseBlock implements IAEFeature, ITileEntityProvider
{
@Nonnull
private Class<? extends TileEntity> tileEntityType;
public AEBaseTileBlock( Material mat )
{
super( mat );
}
protected AEBaseTileBlock( Material mat, Optional<String> subName )
{
super( mat, subName );
}
@Override
protected void setFeature( EnumSet<AEFeature> f )
{
final AETileBlockFeatureHandler featureHandler = new AETileBlockFeatureHandler( f, this, this.featureSubName );
this.setHandler( featureHandler );
}
protected void setTileEntity( Class<? extends TileEntity> c )
{
this.tileEntityType = c;
this.isInventory = IInventory.class.isAssignableFrom( c );
this.setTileProvider( this.hasBlockTileEntity() );
}
// update Block value.
private void setTileProvider( boolean b )
{
ReflectionHelper.setPrivateValue( Block.class, this, b, "isTileProvider" );
}
public boolean hasBlockTileEntity()
{
return this.tileEntityType != null;
}
public Class<? extends TileEntity> getTileEntityClass()
{
return this.tileEntityType;
}
@Nullable
public <T extends AEBaseTile> T getTileEntity( IBlockAccess w, int x, int y, int z )
{
if( !this.hasBlockTileEntity() )
{
return null;
}
final TileEntity te = w.getTileEntity( x, y, z );
if( this.tileEntityType.isInstance( te ) )
{
return (T) te;
}
return null;
}
@Override
public final TileEntity createNewTileEntity( World var1, int var2 )
{
if( this.hasBlockTileEntity() )
{
try
{
return this.tileEntityType.newInstance();
}
catch( InstantiationException e )
{
throw new IllegalStateException( "Failed to create a new instance of an illegal class " + this.tileEntityType, e );
}
catch( IllegalAccessException e )
{
throw new IllegalStateException( "Failed to create a new instance of " + this.tileEntityType + ", because lack of permissions", e );
}
}
return null;
}
@Override
public void breakBlock( World w, int x, int y, int z, Block a, int b )
{
final AEBaseTile te = this.getTileEntity( w, x, y, z );
if( te != null )
{
final ArrayList<ItemStack> drops = new ArrayList<ItemStack>();
if( te.dropItems() )
{
te.getDrops( w, x, y, z, drops );
}
else
{
te.getNoDrops( w, x, y, z, drops );
}
// Cry ;_; ...
Platform.spawnDrops( w, x, y, z, drops );
}
// super will remove the TE, as it is not an instance of BlockContainer
super.breakBlock( w, x, y, z, a, b );
}
@Override
public final ForgeDirection[] getValidRotations( World w, int x, int y, int z )
{
final AEBaseTile obj = this.getTileEntity( w, x, y, z );
if( obj != null && obj.canBeRotated() )
{
return ForgeDirection.VALID_DIRECTIONS;
}
return super.getValidRotations( w, x, y, z );
}
@Override
public boolean recolourBlock( World world, int x, int y, int z, ForgeDirection side, int colour )
{
final TileEntity te = this.getTileEntity( world, x, y, z );
if( te instanceof IColorableTile )
{
final IColorableTile ct = (IColorableTile) te;
final AEColor c = ct.getColor();
final AEColor newColor = AEColor.values()[colour];
if( c != newColor )
{
ct.recolourBlock( side, newColor, null );
return true;
}
return false;
}
return super.recolourBlock( world, x, y, z, side, colour );
}
@Override
public int getComparatorInputOverride( World w, int x, int y, int z, int s )
{
final TileEntity te = this.getTileEntity( w, x, y, z );
if( te instanceof IInventory )
{
return Container.calcRedstoneFromInventory( (IInventory) te );
}
return 0;
}
@Override
public boolean onBlockEventReceived( World p_149696_1_, int p_149696_2_, int p_149696_3_, int p_149696_4_, int p_149696_5_, int p_149696_6_ )
{
super.onBlockEventReceived( p_149696_1_, p_149696_2_, p_149696_3_, p_149696_4_, p_149696_5_, p_149696_6_ );
final TileEntity tileentity = p_149696_1_.getTileEntity( p_149696_2_, p_149696_3_, p_149696_4_ );
return tileentity != null ? tileentity.receiveClientEvent( p_149696_5_, p_149696_6_ ) : false;
}
@Override
public void onBlockPlacedBy( World w, int x, int y, int z, EntityLivingBase player, ItemStack is )
{
if( is.hasDisplayName() )
{
final TileEntity te = this.getTileEntity( w, x, y, z );
if( te instanceof AEBaseTile )
{
( (AEBaseTile) w.getTileEntity( x, y, z ) ).setName( is.getDisplayName() );
}
}
}
@Override
public final boolean onBlockActivated( World w, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ )
{
if( player != null )
{
final ItemStack is = player.inventory.getCurrentItem();
if( is != null )
{
if( Platform.isWrench( player, is, x, y, z ) && player.isSneaking() )
{
final Block id = w.getBlock( x, y, z );
if( id != null )
{
final AEBaseTile tile = this.getTileEntity( w, x, y, z );
final ItemStack[] drops = Platform.getBlockDrops( w, x, y, z );
if( tile == null )
{
return false;
}
if( tile instanceof TileCableBus || tile instanceof TileSkyChest )
{
return false;
}
final ItemStack op = new ItemStack( this );
for( ItemStack ol : drops )
{
if( Platform.isSameItemType( ol, op ) )
{
final NBTTagCompound tag = tile.downloadSettings( SettingsFrom.DISMANTLE_ITEM );
if( tag != null )
{
ol.setTagCompound( tag );
}
}
}
if( id.removedByPlayer( w, player, x, y, z, false ) )
{
final List<ItemStack> l = Lists.newArrayList( drops );
Platform.spawnDrops( w, x, y, z, l );
w.setBlockToAir( x, y, z );
}
}
return false;
}
if( is.getItem() instanceof IMemoryCard && !( this instanceof BlockCableBus ) )
{
final IMemoryCard memoryCard = (IMemoryCard) is.getItem();
if( player.isSneaking() )
{
final AEBaseTile t = this.getTileEntity( w, x, y, z );
if( t != null )
{
final String name = this.getUnlocalizedName();
final NBTTagCompound data = t.downloadSettings( SettingsFrom.MEMORY_CARD );
if( data != null )
{
memoryCard.setMemoryCardContents( is, name, data );
memoryCard.notifyUser( player, MemoryCardMessages.SETTINGS_SAVED );
return true;
}
}
}
else
{
final String name = memoryCard.getSettingsName( is );
final NBTTagCompound data = memoryCard.getData( is );
if( this.getUnlocalizedName().equals( name ) )
{
final AEBaseTile t = this.getTileEntity( w, x, y, z );
t.uploadSettings( SettingsFrom.MEMORY_CARD, data );
memoryCard.notifyUser( player, MemoryCardMessages.SETTINGS_LOADED );
}
else
{
memoryCard.notifyUser( player, MemoryCardMessages.INVALID_MACHINE );
}
return false;
}
}
}
}
return this.onActivated( w, x, y, z, player, side, hitX, hitY, hitZ );
}
@Override
public IOrientable getOrientable( IBlockAccess w, int x, int y, int z )
{
return this.getTileEntity( w, x, y, z );
}
@Override
public ICustomCollision getCustomCollision( World w, int x, int y, int z )
{
final AEBaseTile te = this.getTileEntity( w, x, y, z );
if( te instanceof ICustomCollision )
{
return (ICustomCollision) te;
}
return super.getCustomCollision( w, x, y, z );
}
}
@@ -26,9 +26,9 @@ import net.minecraft.world.IBlockAccess;
public class AEDecorativeBlock extends AEBaseBlock
{
public AEDecorativeBlock( Class<? extends AEBaseBlock> c, Material mat )
public AEDecorativeBlock( Material mat )
{
super( c, mat );
super( mat );
}
@Override
@@ -40,11 +40,8 @@ import appeng.tile.crafting.TileCraftingMonitorTile;
public class BlockCraftingMonitor extends BlockCraftingUnit
{
public BlockCraftingMonitor()
{
super( BlockCraftingMonitor.class );
this.setTileEntity( TileCraftingMonitorTile.class );
}
@@ -37,8 +37,6 @@ public class BlockCraftingStorage extends BlockCraftingUnit
{
public BlockCraftingStorage()
{
super( BlockCraftingStorage.class );
this.setTileEntity( TileCraftingStorageTile.class );
}
@@ -35,7 +35,7 @@ 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.AEBaseTileBlock;
import appeng.client.render.BaseBlockRender;
import appeng.client.render.blocks.RenderBlockCraftingCPU;
import appeng.client.texture.ExtraBlockTextures;
@@ -45,22 +45,16 @@ import appeng.tile.crafting.TileCraftingTile;
import appeng.util.Platform;
public class BlockCraftingUnit extends AEBaseBlock
public class BlockCraftingUnit extends AEBaseTileBlock
{
public static final int FLAG_FORMED = 8;
public BlockCraftingUnit()
{
this( BlockCraftingUnit.class );
this.setTileEntity( TileCraftingTile.class );
}
public BlockCraftingUnit( Class<? extends BlockCraftingUnit> childClass )
{
super( childClass, Material.iron );
super( Material.iron );
this.hasSubtypes = true;
this.setTileEntity( TileCraftingTile.class );
this.setFeature( EnumSet.of( AEFeature.CraftingCPU ) );
}
@@ -29,7 +29,7 @@ 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.AEBaseTileBlock;
import appeng.client.render.BaseBlockRender;
import appeng.client.render.blocks.RenderBlockAssembler;
import appeng.core.features.AEFeature;
@@ -38,14 +38,15 @@ import appeng.tile.crafting.TileMolecularAssembler;
import appeng.util.Platform;
public class BlockMolecularAssembler extends AEBaseBlock
public class BlockMolecularAssembler extends AEBaseTileBlock
{
public static boolean booleanAlphaPass = false;
public BlockMolecularAssembler()
{
super( BlockMolecularAssembler.class, Material.iron );
super( Material.iron );
this.setTileEntity( TileMolecularAssembler.class );
this.isOpaque = false;
this.lightOpacity = 1;
@@ -32,7 +32,7 @@ import net.minecraftforge.common.util.FakePlayer;
import net.minecraftforge.common.util.ForgeDirection;
import appeng.api.implementations.tiles.ICrankable;
import appeng.block.AEBaseBlock;
import appeng.block.AEBaseTileBlock;
import appeng.client.render.BaseBlockRender;
import appeng.client.render.blocks.RenderBlockCrank;
import appeng.core.features.AEFeature;
@@ -41,12 +41,13 @@ import appeng.tile.AEBaseTile;
import appeng.tile.grindstone.TileCrank;
public class BlockCrank extends AEBaseBlock
public class BlockCrank extends AEBaseTileBlock
{
public BlockCrank()
{
super( BlockCrank.class, Material.wood );
super( Material.wood );
this.setTileEntity( TileCrank.class );
this.setLightOpacity( 0 );
this.setHarvestLevel( "axe", 0 );
@@ -26,19 +26,20 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
import appeng.block.AEBaseBlock;
import appeng.block.AEBaseTileBlock;
import appeng.core.features.AEFeature;
import appeng.core.sync.GuiBridge;
import appeng.tile.grindstone.TileGrinder;
import appeng.util.Platform;
public class BlockGrinder extends AEBaseBlock
public class BlockGrinder extends AEBaseTileBlock
{
public BlockGrinder()
{
super( BlockGrinder.class, Material.rock );
super( Material.rock );
this.setTileEntity( TileGrinder.class );
this.setHardness( 3.2F );
this.setFeature( EnumSet.of( AEFeature.GrindStone ) );
@@ -26,19 +26,20 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
import appeng.block.AEBaseBlock;
import appeng.block.AEBaseTileBlock;
import appeng.core.features.AEFeature;
import appeng.core.sync.GuiBridge;
import appeng.tile.misc.TileCellWorkbench;
import appeng.util.Platform;
public class BlockCellWorkbench extends AEBaseBlock
public class BlockCellWorkbench extends AEBaseTileBlock
{
public BlockCellWorkbench()
{
super( BlockCellWorkbench.class, Material.iron );
super( Material.iron );
this.setTileEntity( TileCellWorkbench.class );
this.setFeature( EnumSet.of( AEFeature.StorageCells ) );
}
@@ -36,7 +36,7 @@ import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import appeng.api.AEApi;
import appeng.block.AEBaseBlock;
import appeng.block.AEBaseTileBlock;
import appeng.client.render.BaseBlockRender;
import appeng.client.render.blocks.RenderBlockCharger;
import appeng.client.render.effects.LightningFX;
@@ -49,12 +49,13 @@ import appeng.tile.misc.TileCharger;
import appeng.util.Platform;
public class BlockCharger extends AEBaseBlock implements ICustomCollision
public class BlockCharger extends AEBaseTileBlock implements ICustomCollision
{
public BlockCharger()
{
super( BlockCharger.class, Material.iron );
super( Material.iron );
this.setTileEntity( TileCharger.class );
this.setLightOpacity( 2 );
this.isFullSize = this.isOpaque = false;
@@ -26,19 +26,20 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
import appeng.block.AEBaseBlock;
import appeng.block.AEBaseTileBlock;
import appeng.core.features.AEFeature;
import appeng.core.sync.GuiBridge;
import appeng.tile.misc.TileCondenser;
import appeng.util.Platform;
public class BlockCondenser extends AEBaseBlock
public class BlockCondenser extends AEBaseTileBlock
{
public BlockCondenser()
{
super( BlockCondenser.class, Material.iron );
super( Material.iron );
this.setTileEntity( TileCondenser.class );
this.setFeature( EnumSet.of( AEFeature.Core ) );
}
@@ -26,7 +26,7 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
import appeng.block.AEBaseBlock;
import appeng.block.AEBaseTileBlock;
import appeng.client.render.BaseBlockRender;
import appeng.client.render.blocks.RenderBlockInscriber;
import appeng.core.features.AEFeature;
@@ -35,12 +35,13 @@ import appeng.tile.misc.TileInscriber;
import appeng.util.Platform;
public class BlockInscriber extends AEBaseBlock
public class BlockInscriber extends AEBaseTileBlock
{
public BlockInscriber()
{
super( BlockInscriber.class, Material.iron );
super( Material.iron );
this.setTileEntity( TileInscriber.class );
this.setLightOpacity( 2 );
this.isFullSize = this.isOpaque = false;
@@ -27,7 +27,7 @@ import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
import appeng.api.util.IOrientable;
import appeng.block.AEBaseBlock;
import appeng.block.AEBaseTileBlock;
import appeng.client.render.BaseBlockRender;
import appeng.client.render.blocks.RenderBlockInterface;
import appeng.core.features.AEFeature;
@@ -36,12 +36,13 @@ import appeng.tile.misc.TileInterface;
import appeng.util.Platform;
public class BlockInterface extends AEBaseBlock
public class BlockInterface extends AEBaseTileBlock
{
public BlockInterface()
{
super( BlockInterface.class, Material.iron );
super( Material.iron );
this.setTileEntity( TileInterface.class );
this.setFeature( EnumSet.of( AEFeature.Core ) );
}
@@ -19,25 +19,43 @@
package appeng.block.misc;
import java.util.Collections;
import java.util.EnumSet;
import java.util.List;
import java.util.Random;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.entity.Entity;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
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.IOrientableBlock;
import appeng.block.AEBaseTileBlock;
import appeng.client.render.blocks.RenderQuartzTorch;
import appeng.core.features.AEFeature;
import appeng.helpers.ICustomCollision;
import appeng.helpers.MetaRotation;
import appeng.tile.misc.TileLightDetector;
public class BlockLightDetector extends BlockQuartzTorch
public class BlockLightDetector extends AEBaseTileBlock implements IOrientableBlock, ICustomCollision
{
public BlockLightDetector()
{
super( BlockLightDetector.class );
super( Material.circuits );
this.setLightOpacity( 0 );
this.isFullSize = false;
this.isOpaque = false;
this.setTileEntity( TileLightDetector.class );
this.setFeature( EnumSet.of( AEFeature.LightDetector ) );
}
@@ -71,4 +89,82 @@ public class BlockLightDetector extends BlockQuartzTorch
{
// cancel out lightning
}
@Override
protected Class<? extends RenderQuartzTorch> getRenderer()
{
return RenderQuartzTorch.class;
}
@Override
public boolean isValidOrientation( World w, int x, int y, int z, ForgeDirection forward, ForgeDirection up )
{
return this.canPlaceAt( w, x, y, z, up.getOpposite() );
}
private boolean canPlaceAt( World w, int x, int y, int z, ForgeDirection dir )
{
return w.isSideSolid( x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ, dir.getOpposite(), false );
}
@Override
public Iterable<AxisAlignedBB> getSelectedBoundingBoxesFromPool( World w, int x, int y, int z, Entity e, boolean isVisual )
{
ForgeDirection up = this.getOrientable( w, x, y, z ).getUp();
double xOff = -0.3 * up.offsetX;
double yOff = -0.3 * up.offsetY;
double zOff = -0.3 * up.offsetZ;
return Collections.singletonList( AxisAlignedBB.getBoundingBox( xOff + 0.3, yOff + 0.3, zOff + 0.3, xOff + 0.7, yOff + 0.7, zOff + 0.7 ) );
}
@Override
public void addCollidingBlockToList( World w, int x, int y, int z, AxisAlignedBB bb, List out, Entity e )
{/*
* double xOff = -0.15 * getUp().offsetX; double yOff = -0.15 * getUp().offsetY; double zOff = -0.15 *
* getUp().offsetZ; out.add( AxisAlignedBB.getBoundingBox( xOff + (double) x + 0.15, yOff + (double) y + 0.15, zOff
* + (double) z + 0.15,// ahh xOff + (double) x + 0.85, yOff + (double) y + 0.85, zOff + (double) z + 0.85 ) );
*/
}
@Override
public void onNeighborBlockChange( World w, int x, int y, int z, Block id )
{
ForgeDirection up = this.getOrientable( w, x, y, z ).getUp();
if( !this.canPlaceAt( w, x, y, z, up.getOpposite() ) )
{
this.dropTorch( w, x, y, z );
}
}
private void dropTorch( World w, int x, int y, int z )
{
w.func_147480_a( x, y, z, true );
// w.destroyBlock( x, y, z, true );
w.markBlockForUpdate( x, y, z );
}
@Override
public boolean canPlaceBlockAt( World w, int x, int y, int z )
{
for( ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS )
{
if( this.canPlaceAt( w, x, y, z, dir ) )
{
return true;
}
}
return false;
}
@Override
public boolean usesMetadata()
{
return true;
}
@Override
public IOrientable getOrientable( final IBlockAccess w, final int x, final int y, final int z )
{
return new MetaRotation( w, x, y, z );
}
}
@@ -36,7 +36,7 @@ import net.minecraft.world.World;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import appeng.block.AEBaseBlock;
import appeng.block.AEBaseTileBlock;
import appeng.client.render.BaseBlockRender;
import appeng.client.render.blocks.RenderBlockPaint;
import appeng.core.features.AEFeature;
@@ -44,12 +44,13 @@ import appeng.tile.misc.TilePaint;
import appeng.util.Platform;
public class BlockPaint extends AEBaseBlock
public class BlockPaint extends AEBaseTileBlock
{
public BlockPaint()
{
super( BlockPaint.class, new MaterialLiquid( MapColor.airColor ) );
super( new MaterialLiquid( MapColor.airColor ) );
this.setTileEntity( TilePaint.class );
this.setLightOpacity( 0 );
this.isFullSize = false;
@@ -71,13 +72,13 @@ public class BlockPaint extends AEBaseBlock
}
@Override
public AxisAlignedBB getCollisionBoundingBoxFromPool( World p_149668_1_, int p_149668_2_, int p_149668_3_, int p_149668_4_ )
public AxisAlignedBB getCollisionBoundingBoxFromPool( World world, int x, int y, int z )
{
return null;
}
@Override
public boolean canCollideCheck( int p_149678_1_, boolean p_149678_2_ )
public boolean canCollideCheck( int metadata, boolean isHoldingRightClick )
{
return false;
}
@@ -94,13 +95,13 @@ public class BlockPaint extends AEBaseBlock
}
@Override
public Item getItemDropped( int p_149650_1_, Random p_149650_2_, int p_149650_3_ )
public Item getItemDropped( int meta, Random random, int fortune )
{
return null;
}
@Override
public void dropBlockAsItemWithChance( World p_149690_1_, int p_149690_2_, int p_149690_3_, int p_149690_4_, int p_149690_5_, float p_149690_6_, int p_149690_7_ )
public void dropBlockAsItemWithChance( World world, int x, int y, int z, int meta, float chance, int fortune )
{
}
@@ -110,7 +111,7 @@ public class BlockPaint extends AEBaseBlock
{
if( Platform.isServer() )
{
w.setBlock( x, y, z, Platform.AIR, 0, 3 );
w.setBlock( x, y, z, Platform.AIR_BLOCK, 0, 3 );
}
}
@@ -25,33 +25,30 @@ import java.util.Random;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.Minecraft;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
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.IOrientableBlock;
import appeng.block.AEBaseBlock;
import appeng.block.AEBaseTileBlock;
import appeng.client.render.BaseBlockRender;
import appeng.client.render.blocks.RenderBlockQuartzAccelerator;
import appeng.client.render.effects.LightningFX;
import appeng.core.AEConfig;
import appeng.core.CommonHelper;
import appeng.core.features.AEFeature;
import appeng.helpers.MetaRotation;
import appeng.tile.misc.TileQuartzGrowthAccelerator;
import appeng.util.Platform;
public class BlockQuartzGrowthAccelerator extends AEBaseBlock implements IOrientableBlock
public class BlockQuartzGrowthAccelerator extends AEBaseTileBlock implements IOrientableBlock
{
public BlockQuartzGrowthAccelerator()
{
super( BlockQuartzGrowthAccelerator.class, Material.rock );
super( Material.rock );
this.setStepSound( Block.soundTypeMetal );
this.setTileEntity( TileQuartzGrowthAccelerator.class );
this.setFeature( EnumSet.of( AEFeature.Core ) );
@@ -72,15 +69,15 @@ public class BlockQuartzGrowthAccelerator extends AEBaseBlock implements IOrient
return;
}
TileQuartzGrowthAccelerator tileQuartzGrowthAccelerator = this.getTileEntity( w, x, y, z );
TileQuartzGrowthAccelerator cga = this.getTileEntity( w, x, y, z );
if( tileQuartzGrowthAccelerator != null && tileQuartzGrowthAccelerator.hasPower && CommonHelper.proxy.shouldAddParticles( r ) )
if( cga != null && cga.hasPower && CommonHelper.proxy.shouldAddParticles( r ) )
{
double d0 = r.nextFloat() - 0.5F;
double d1 = r.nextFloat() - 0.5F;
ForgeDirection up = tileQuartzGrowthAccelerator.getUp();
ForgeDirection forward = tileQuartzGrowthAccelerator.getForward();
ForgeDirection up = cga.getUp();
ForgeDirection forward = cga.getForward();
ForgeDirection west = Platform.crossProduct( forward, up );
double rx = 0.5 + x;
@@ -144,14 +141,14 @@ public class BlockQuartzGrowthAccelerator extends AEBaseBlock implements IOrient
}
@Override
/**
* TODO: remove with 1.8 or later
*
* @Deprecated no longer true, only kept to prevent missing blocks.
*/
@Deprecated
public boolean usesMetadata()
{
return true;
}
@Override
public IOrientable getOrientable( final IBlockAccess w, final int x, final int y, final int z )
{
return new MetaRotation( w, x, y, z );
}
}
@@ -51,19 +51,15 @@ import appeng.helpers.MetaRotation;
public class BlockQuartzTorch extends AEBaseBlock implements IOrientableBlock, ICustomCollision
{
public BlockQuartzTorch()
{
this( BlockQuartzTorch.class );
this.setLightLevel( 0.9375F );
this.setFeature( EnumSet.of( AEFeature.DecorativeLights ) );
}
super( Material.circuits );
protected BlockQuartzTorch( Class which )
{
super( which, Material.circuits );
this.setFeature( EnumSet.of( AEFeature.DecorativeLights ) );
this.setLightLevel( 0.9375F );
this.setLightOpacity( 0 );
this.isFullSize = this.isOpaque = false;
this.isFullSize = false;
this.isOpaque = false;
}
@Override
@@ -26,7 +26,7 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
import appeng.block.AEBaseBlock;
import appeng.block.AEBaseTileBlock;
import appeng.client.render.BaseBlockRender;
import appeng.client.render.blocks.RendererSecurity;
import appeng.core.features.AEFeature;
@@ -35,12 +35,13 @@ import appeng.tile.misc.TileSecurity;
import appeng.util.Platform;
public class BlockSecurity extends AEBaseBlock
public class BlockSecurity extends AEBaseTileBlock
{
public BlockSecurity()
{
super( BlockSecurity.class, Material.iron );
super( Material.iron );
this.setTileEntity( TileSecurity.class );
this.setFeature( EnumSet.of( AEFeature.Security ) );
}
@@ -36,7 +36,7 @@ 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.AEBaseTileBlock;
import appeng.client.render.BaseBlockRender;
import appeng.client.render.blocks.RenderBlockSkyCompass;
import appeng.core.features.AEFeature;
@@ -44,12 +44,12 @@ import appeng.helpers.ICustomCollision;
import appeng.tile.misc.TileSkyCompass;
public class BlockSkyCompass extends AEBaseBlock implements ICustomCollision
public class BlockSkyCompass extends AEBaseTileBlock implements ICustomCollision
{
public BlockSkyCompass()
{
super( BlockSkyCompass.class, Material.iron );
super( Material.iron );
this.setTileEntity( TileSkyCompass.class );
this.isOpaque = this.isFullSize = false;
this.lightOpacity = 0;
@@ -1,6 +1,6 @@
/*
* This file is part of Applied Energistics 2.
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
* Copyright (c) 2013 - 2015, AlgorithmX2, All rights reserved.
*
* Applied Energistics 2 is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -58,7 +58,7 @@ public class BlockTinyTNT extends AEBaseBlock implements ICustomCollision
public BlockTinyTNT()
{
super( BlockTinyTNT.class, Material.tnt );
super( Material.tnt );
this.setLightOpacity( 1 );
this.setBlockBounds( 0.25f, 0.0f, 0.25f, 0.75f, 0.5f, 0.75f );
this.isFullSize = this.isOpaque = false;
@@ -66,7 +66,7 @@ public class BlockTinyTNT extends AEBaseBlock implements ICustomCollision
this.setHardness( 0F );
this.setFeature( EnumSet.of( AEFeature.TinyTNT ) );
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 );
}
@Override
@@ -29,7 +29,7 @@ import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
import appeng.block.AEBaseBlock;
import appeng.block.AEBaseTileBlock;
import appeng.client.texture.ExtraBlockTextures;
import appeng.core.AEConfig;
import appeng.core.features.AEFeature;
@@ -39,12 +39,12 @@ import appeng.tile.misc.TileVibrationChamber;
import appeng.util.Platform;
public final class BlockVibrationChamber extends AEBaseBlock
public final class BlockVibrationChamber extends AEBaseTileBlock
{
public BlockVibrationChamber()
{
super( BlockVibrationChamber.class, Material.iron );
super( Material.iron );
this.setTileEntity( TileVibrationChamber.class );
this.setHardness( 4.2F );
this.setFeature( EnumSet.of( AEFeature.PowerGen ) );
@@ -1,6 +1,6 @@
/*
* This file is part of Applied Energistics 2.
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
* Copyright (c) 2013 - 2015, AlgorithmX2, All rights reserved.
*
* Applied Energistics 2 is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -53,17 +53,18 @@ import appeng.api.parts.IPartHost;
import appeng.api.parts.PartItemStack;
import appeng.api.parts.SelectedPart;
import appeng.api.util.AEColor;
import appeng.block.AEBaseBlock;
import appeng.block.AEBaseTileBlock;
import appeng.client.render.BaseBlockRender;
import appeng.client.render.BusRenderHelper;
import appeng.client.render.blocks.RendererCableBus;
import appeng.client.texture.ExtraBlockTextures;
import appeng.core.AEConfig;
import appeng.core.Api;
import appeng.core.AppEng;
import appeng.core.CommonHelper;
import appeng.core.features.AECableBusFeatureHandler;
import appeng.core.features.AEFeature;
import appeng.helpers.AEGlassMaterial;
import appeng.integration.IntegrationRegistry;
import appeng.integration.IntegrationType;
import appeng.integration.abstraction.IFMP;
import appeng.parts.ICableBusContainer;
@@ -77,7 +78,7 @@ import appeng.util.Platform;
@Interface( iface = "powercrystals.minefactoryreloaded.api.rednet.connectivity.IRedNetConnection", iname = "MFR" )
public class BlockCableBus extends AEBaseBlock implements IRedNetConnection
public class BlockCableBus extends AEBaseTileBlock implements IRedNetConnection
{
private static final ICableBusContainer NULL_CABLE_BUS = new NullCableBusContainer();
@@ -91,9 +92,12 @@ public class BlockCableBus extends AEBaseBlock implements IRedNetConnection
public BlockCableBus()
{
super( BlockCableBus.class, AEGlassMaterial.INSTANCE );
super( AEGlassMaterial.INSTANCE );
this.setLightOpacity( 0 );
this.isFullSize = this.isOpaque = false;
// this will actually be overwritten later through setupTile and the combined layers
this.setTileEntity( TileCableBus.class );
this.setFeature( EnumSet.of( AEFeature.Core ) );
}
@@ -126,7 +130,7 @@ public class BlockCableBus extends AEBaseBlock implements IRedNetConnection
}
@Override
public int colorMultiplier( IBlockAccess p_149720_1_, int p_149720_2_, int p_149720_3_, int p_149720_4_ )
public int colorMultiplier( IBlockAccess world, int x, int y, int z )
{
return this.myColorMultiplier;
}
@@ -394,9 +398,9 @@ public class BlockCableBus extends AEBaseBlock implements IRedNetConnection
{
out = ( (TileCableBus) te ).cb;
}
else if( AppEng.instance.isIntegrationEnabled( IntegrationType.FMP ) )
else if( IntegrationRegistry.INSTANCE.isEnabled( IntegrationType.FMP ) )
{
out = ( (IFMP) AppEng.instance.getIntegration( IntegrationType.FMP ) ).getCableContainer( te );
out = ( (IFMP) IntegrationRegistry.INSTANCE.getInstance( IntegrationType.FMP ) ).getCableContainer( te );
}
return out == null ? NULL_CABLE_BUS : out;
@@ -464,7 +468,7 @@ public class BlockCableBus extends AEBaseBlock implements IRedNetConnection
}
@Override
public <T extends TileEntity> T getTileEntity( IBlockAccess w, int x, int y, int z )
public <T extends AEBaseTile> T getTileEntity( IBlockAccess w, int x, int y, int z )
{
TileEntity te = w.getTileEntity( x, y, z );
@@ -481,9 +485,18 @@ public class BlockCableBus extends AEBaseBlock implements IRedNetConnection
return null;
}
@Override
protected void setFeature( EnumSet<AEFeature> f )
{
final AECableBusFeatureHandler featureHandler = new AECableBusFeatureHandler( f, this, this.featureSubName );
this.setHandler( featureHandler );
}
public void setupTile()
{
this.setTileEntity( noTesrTile = Api.INSTANCE.partHelper().getCombinedInstance( TileCableBus.class.getName() ) );
noTesrTile = Api.INSTANCE.partHelper().getCombinedInstance( TileCableBus.class.getName() );
this.setTileEntity( noTesrTile );
GameRegistry.registerTileEntity( noTesrTile, "BlockCableBus" );
if( Platform.isClient() )
{
tesrTile = Api.INSTANCE.partHelper().getCombinedInstance( TileCableBusTESR.class.getName() );
@@ -25,26 +25,26 @@ import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.world.World;
import appeng.block.AEBaseBlock;
import appeng.block.AEBaseTileBlock;
import appeng.client.render.BaseBlockRender;
import appeng.client.render.blocks.RenderBlockController;
import appeng.core.features.AEFeature;
import appeng.tile.networking.TileController;
public class BlockController extends AEBaseBlock
public class BlockController extends AEBaseTileBlock
{
public BlockController()
{
super( BlockController.class, Material.iron );
super( Material.iron );
this.setTileEntity( TileController.class );
this.setHardness( 6 );
this.setFeature( EnumSet.of( AEFeature.Channels ) );
}
@Override
public void onNeighborBlockChange( World w, int x, int y, int z, Block id_junk )
public void onNeighborBlockChange( World w, int x, int y, int z, Block neighborBlock )
{
TileController tc = this.getTileEntity( w, x, y, z );
if( tc != null )
@@ -21,18 +21,18 @@ package appeng.block.networking;
import java.util.EnumSet;
import appeng.block.AEBaseBlock;
import appeng.block.AEBaseTileBlock;
import appeng.core.features.AEFeature;
import appeng.helpers.AEGlassMaterial;
import appeng.tile.networking.TileCreativeEnergyCell;
public class BlockCreativeEnergyCell extends AEBaseBlock
public class BlockCreativeEnergyCell extends AEBaseTileBlock
{
public BlockCreativeEnergyCell()
{
super( BlockCreativeEnergyCell.class, AEGlassMaterial.INSTANCE );
super( AEGlassMaterial.INSTANCE );
this.setTileEntity( TileCreativeEnergyCell.class );
this.setFeature( EnumSet.of( AEFeature.Creative ) );
}
@@ -33,7 +33,6 @@ public class BlockDenseEnergyCell extends BlockEnergyCell
public BlockDenseEnergyCell()
{
super( BlockDenseEnergyCell.class );
this.setTileEntity( TileDenseEnergyCell.class );
this.setFeature( EnumSet.of( AEFeature.DenseEnergyCells ) );
}
@@ -23,17 +23,17 @@ import java.util.EnumSet;
import net.minecraft.block.material.Material;
import appeng.block.AEBaseBlock;
import appeng.block.AEBaseTileBlock;
import appeng.core.features.AEFeature;
import appeng.tile.networking.TileEnergyAcceptor;
public class BlockEnergyAcceptor extends AEBaseBlock
public class BlockEnergyAcceptor extends AEBaseTileBlock
{
public BlockEnergyAcceptor()
{
super( BlockEnergyAcceptor.class, Material.iron );
super( Material.iron );
this.setTileEntity( TileEnergyAcceptor.class );
this.setFeature( EnumSet.of( AEFeature.Core ) );
}
@@ -31,9 +31,9 @@ import net.minecraft.util.IIcon;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import appeng.block.AEBaseBlock;
import appeng.block.AEBaseItemBlock;
import appeng.block.AEBaseItemBlockChargeable;
import appeng.block.AEBaseTileBlock;
import appeng.client.render.BaseBlockRender;
import appeng.client.render.blocks.RenderBlockEnergyCube;
import appeng.client.texture.ExtraBlockTextures;
@@ -43,21 +43,17 @@ import appeng.tile.networking.TileEnergyCell;
import appeng.util.Platform;
public class BlockEnergyCell extends AEBaseBlock
public class BlockEnergyCell extends AEBaseTileBlock
{
public BlockEnergyCell()
{
this( BlockEnergyCell.class );
super( AEGlassMaterial.INSTANCE );
this.setTileEntity( TileEnergyCell.class );
this.setFeature( EnumSet.of( AEFeature.Core ) );
}
public BlockEnergyCell( Class c )
{
super( c, AEGlassMaterial.INSTANCE );
}
@Override
protected Class<? extends BaseBlockRender> getRenderer()
{
@@ -29,7 +29,7 @@ import net.minecraft.util.AxisAlignedBB;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
import appeng.block.AEBaseBlock;
import appeng.block.AEBaseTileBlock;
import appeng.client.render.BaseBlockRender;
import appeng.client.render.blocks.RenderBlockWireless;
import appeng.core.features.AEFeature;
@@ -40,12 +40,12 @@ import appeng.tile.networking.TileWireless;
import appeng.util.Platform;
public class BlockWireless extends AEBaseBlock implements ICustomCollision
public class BlockWireless extends AEBaseTileBlock implements ICustomCollision
{
public BlockWireless()
{
super( BlockWireless.class, AEGlassMaterial.INSTANCE );
super( AEGlassMaterial.INSTANCE );
this.setTileEntity( TileWireless.class );
this.setLightOpacity( 0 );
this.isFullSize = false;
@@ -0,0 +1,77 @@
/*
* This file is part of Applied Energistics 2.
* Copyright (c) 2013 - 2015, AlgorithmX2, All rights reserved.
*
* Applied Energistics 2 is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Applied Energistics 2 is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
*/
package appeng.block.qnb;
import java.util.EnumSet;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.world.World;
import appeng.block.AEBaseTileBlock;
import appeng.client.render.blocks.RenderQNB;
import appeng.core.features.AEFeature;
import appeng.helpers.ICustomCollision;
import appeng.tile.qnb.TileQuantumBridge;
public abstract class BlockQuantumBase extends AEBaseTileBlock implements ICustomCollision
{
public BlockQuantumBase( Material mat )
{
super( mat );
this.setTileEntity( TileQuantumBridge.class );
float shave = 2.0f / 16.0f;
this.setBlockBounds( shave, shave, shave, 1.0f - shave, 1.0f - shave, 1.0f - shave );
this.setLightOpacity( 0 );
this.isFullSize = this.isOpaque = false;
this.setFeature( EnumSet.of( AEFeature.QuantumNetworkBridge ) );
}
@Override
public void onNeighborBlockChange( World w, int x, int y, int z, Block pointlessNumber )
{
TileQuantumBridge bridge = this.getTileEntity( w, x, y, z );
if( bridge != null )
{
bridge.neighborUpdate();
}
}
@Override
public void breakBlock( World w, int x, int y, int z, Block a, int b )
{
TileQuantumBridge bridge = this.getTileEntity( w, x, y, z );
if( bridge != null )
{
bridge.breakCluster();
}
super.breakBlock( w, x, y, z, a, b );
}
@Override
protected Class<? extends RenderQNB> getRenderer()
{
return RenderQNB.class;
}
}
@@ -20,11 +20,9 @@ package appeng.block.qnb;
import java.util.Collections;
import java.util.EnumSet;
import java.util.List;
import java.util.Random;
import net.minecraft.block.Block;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.AxisAlignedBB;
@@ -34,31 +32,20 @@ import net.minecraftforge.common.util.ForgeDirection;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import appeng.block.AEBaseBlock;
import appeng.client.EffectType;
import appeng.client.render.BaseBlockRender;
import appeng.client.render.blocks.RenderQNB;
import appeng.core.CommonHelper;
import appeng.core.features.AEFeature;
import appeng.core.sync.GuiBridge;
import appeng.helpers.AEGlassMaterial;
import appeng.helpers.ICustomCollision;
import appeng.tile.qnb.TileQuantumBridge;
import appeng.util.Platform;
public class BlockQuantumLinkChamber extends AEBaseBlock implements ICustomCollision
public class BlockQuantumLinkChamber extends BlockQuantumBase
{
public BlockQuantumLinkChamber()
{
super( BlockQuantumLinkChamber.class, AEGlassMaterial.INSTANCE );
this.setTileEntity( TileQuantumBridge.class );
float shave = 2.0f / 16.0f;
this.setBlockBounds( shave, shave, shave, 1.0f - shave, 1.0f - shave, 1.0f - shave );
this.setLightOpacity( 0 );
this.isFullSize = this.isOpaque = false;
this.setFeature( EnumSet.of( AEFeature.QuantumNetworkBridge ) );
super( AEGlassMaterial.INSTANCE );
}
@Override
@@ -78,22 +65,6 @@ public class BlockQuantumLinkChamber extends AEBaseBlock implements ICustomColli
}
}
@Override
public void onNeighborBlockChange( World w, int x, int y, int z, Block pointlessNumber )
{
TileQuantumBridge bridge = this.getTileEntity( w, x, y, z );
if( bridge != null )
{
bridge.neighborUpdate();
}
}
@Override
protected Class<? extends BaseBlockRender> getRenderer()
{
return RenderQNB.class;
}
@Override
public boolean onActivated( World w, int x, int y, int z, EntityPlayer p, int side, float hitX, float hitY, float hitZ )
{
@@ -114,29 +85,17 @@ public class BlockQuantumLinkChamber extends AEBaseBlock implements ICustomColli
return false;
}
@Override
public void breakBlock( World w, int x, int y, int z, Block a, int b )
{
TileQuantumBridge bridge = this.getTileEntity( w, x, y, z );
if( bridge != null )
{
bridge.breakCluster();
}
super.breakBlock( w, x, y, z, a, b );
}
@Override
public Iterable<AxisAlignedBB> getSelectedBoundingBoxesFromPool( World w, int x, int y, int z, Entity e, boolean isVisual )
{
double OnePx = 2.0 / 16.0;
return Collections.singletonList( AxisAlignedBB.getBoundingBox( OnePx, OnePx, OnePx, 1.0 - OnePx, 1.0 - OnePx, 1.0 - OnePx ) );
double onePixel = 2.0 / 16.0;
return Collections.singletonList( AxisAlignedBB.getBoundingBox( onePixel, onePixel, onePixel, 1.0 - onePixel, 1.0 - onePixel, 1.0 - onePixel ) );
}
@Override
public void addCollidingBlockToList( World w, int x, int y, int z, AxisAlignedBB bb, List<AxisAlignedBB> out, Entity e )
{
double OnePx = 2.0 / 16.0;
out.add( AxisAlignedBB.getBoundingBox( OnePx, OnePx, OnePx, 1.0 - OnePx, 1.0 - OnePx, 1.0 - OnePx ) );
double onePixel = 2.0 / 16.0;
out.add( AxisAlignedBB.getBoundingBox( onePixel, onePixel, onePixel, 1.0 - onePixel, 1.0 - onePixel, 1.0 - onePixel ) );
}
}
@@ -20,94 +20,53 @@ package appeng.block.qnb;
import java.util.Collections;
import java.util.EnumSet;
import java.util.List;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.entity.Entity;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.world.World;
import appeng.block.AEBaseBlock;
import appeng.client.render.BaseBlockRender;
import appeng.client.render.blocks.RenderQNB;
import appeng.core.features.AEFeature;
import appeng.helpers.ICustomCollision;
import appeng.tile.qnb.TileQuantumBridge;
public class BlockQuantumRing extends AEBaseBlock implements ICustomCollision
public class BlockQuantumRing extends BlockQuantumBase
{
public BlockQuantumRing()
{
super( BlockQuantumRing.class, Material.iron );
this.setTileEntity( TileQuantumBridge.class );
float shave = 2.0f / 16.0f;
this.setBlockBounds( shave, shave, shave, 1.0f - shave, 1.0f - shave, 1.0f - shave );
this.setLightOpacity( 1 );
this.isFullSize = this.isOpaque = false;
this.setFeature( EnumSet.of( AEFeature.QuantumNetworkBridge ) );
}
@Override
public void onNeighborBlockChange( World w, int x, int y, int z, Block pointlessNumber )
{
TileQuantumBridge bridge = this.getTileEntity( w, x, y, z );
if( bridge != null )
{
bridge.neighborUpdate();
}
}
@Override
protected Class<? extends BaseBlockRender> getRenderer()
{
return RenderQNB.class;
}
@Override
public void breakBlock( World w, int x, int y, int z, Block a, int b )
{
TileQuantumBridge bridge = this.getTileEntity( w, x, y, z );
if( bridge != null )
{
bridge.breakCluster();
}
super.breakBlock( w, x, y, z, a, b );
super( Material.iron );
}
@Override
public Iterable<AxisAlignedBB> getSelectedBoundingBoxesFromPool( World w, int x, int y, int z, Entity e, boolean isVisual )
{
double OnePx = 2.0 / 16.0;
double onePixel = 2.0 / 16.0;
TileQuantumBridge bridge = this.getTileEntity( w, x, y, z );
if( bridge != null && bridge.isCorner() )
{
OnePx = 4.0 / 16.0;
onePixel = 4.0 / 16.0;
}
else if( bridge != null && bridge.isFormed() )
{
OnePx = 1.0 / 16.0;
onePixel = 1.0 / 16.0;
}
return Collections.singletonList( AxisAlignedBB.getBoundingBox( OnePx, OnePx, OnePx, 1.0 - OnePx, 1.0 - OnePx, 1.0 - OnePx ) );
return Collections.singletonList( AxisAlignedBB.getBoundingBox( onePixel, onePixel, onePixel, 1.0 - onePixel, 1.0 - onePixel, 1.0 - onePixel ) );
}
@Override
public void addCollidingBlockToList( World w, int x, int y, int z, AxisAlignedBB bb, List<AxisAlignedBB> out, Entity e )
{
double OnePx = 2.0 / 16.0;
double onePixel = 2.0 / 16.0;
TileQuantumBridge bridge = this.getTileEntity( w, x, y, z );
if( bridge != null && bridge.isCorner() )
{
OnePx = 4.0 / 16.0;
onePixel = 4.0 / 16.0;
}
else if( bridge != null && bridge.isFormed() )
{
OnePx = 1.0 / 16.0;
onePixel = 1.0 / 16.0;
}
out.add( AxisAlignedBB.getBoundingBox( OnePx, OnePx, OnePx, 1.0 - OnePx, 1.0 - OnePx, 1.0 - OnePx ) );
out.add( AxisAlignedBB.getBoundingBox( onePixel, onePixel, onePixel, 1.0 - onePixel, 1.0 - onePixel, 1.0 - onePixel ) );
}
}
@@ -31,7 +31,7 @@ public class BlockFluix extends AEDecorativeBlock
{
public BlockFluix()
{
super( BlockFluix.class, Material.rock );
super( Material.rock );
this.setFeature( EnumSet.of( AEFeature.DecorativeQuartzBlocks ) );
}
}
@@ -32,7 +32,7 @@ public class BlockQuartz extends AEDecorativeBlock
public BlockQuartz()
{
super( BlockQuartz.class, Material.rock );
super( Material.rock );
this.setFeature( EnumSet.of( AEFeature.DecorativeQuartzBlocks ) );
}
}
@@ -32,7 +32,7 @@ public class BlockQuartzChiseled extends AEDecorativeBlock
public BlockQuartzChiseled()
{
super( BlockQuartzChiseled.class, Material.rock );
super( Material.rock );
this.setFeature( EnumSet.of( AEFeature.DecorativeQuartzBlocks ) );
}
}
@@ -36,15 +36,9 @@ import appeng.helpers.AEGlassMaterial;
public class BlockQuartzGlass extends AEBaseBlock
{
public BlockQuartzGlass()
{
this( BlockQuartzGlass.class );
}
public BlockQuartzGlass( Class c )
{
super( c, Material.glass );
super( Material.glass );
this.setLightOpacity( 0 );
this.isOpaque = false;
this.setFeature( EnumSet.of( AEFeature.DecorativeQuartzBlocks ) );
@@ -39,7 +39,6 @@ public class BlockQuartzLamp extends BlockQuartzGlass
public BlockQuartzLamp()
{
super( BlockQuartzLamp.class );
this.setLightLevel( 1.0f );
this.setBlockTextureName( "BlockQuartzGlass" );
this.setFeature( EnumSet.of( AEFeature.DecorativeQuartzBlocks, AEFeature.DecorativeLights ) );
@@ -36,7 +36,7 @@ public class BlockQuartzPillar extends AEBaseBlock implements IOrientableBlock
public BlockQuartzPillar()
{
super( BlockQuartzPillar.class, Material.rock );
super( Material.rock );
this.setFeature( EnumSet.of( AEFeature.DecorativeQuartzBlocks ) );
}
@@ -1,6 +1,6 @@
/*
* This file is part of Applied Energistics 2.
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
* Copyright (c) 2013 - 2015, AlgorithmX2, All rights reserved.
*
* Applied Energistics 2 is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -29,7 +29,6 @@ import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.IIcon;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.world.IBlockAccess;
@@ -41,40 +40,37 @@ import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import rblocks.api.RotatableBlockEnable;
import appeng.api.util.IOrientable;
import appeng.api.util.IOrientableBlock;
import appeng.block.AEBaseBlock;
import appeng.core.AppEng;
import appeng.core.WorldSettings;
import appeng.core.features.AEFeature;
import appeng.core.worlddata.WorldData;
import appeng.helpers.LocationRotation;
import appeng.helpers.NullRotation;
import appeng.integration.IntegrationType;
import appeng.integration.abstraction.IRB;
import appeng.util.Platform;
@RotatableBlockEnable
public class BlockSkyStone extends AEBaseBlock implements IOrientableBlock
{
private static final float BLOCK_RESISTANCE = 150.0f;
private static final double BREAK_SPEAK_SCALAR = 0.1;
private static final double BREAK_SPEAK_THRESHOLD = 7.0;
@SideOnly( Side.CLIENT )
IIcon Block;
private IIcon block;
@SideOnly( Side.CLIENT )
IIcon Brick;
private IIcon brick;
@SideOnly( Side.CLIENT )
IIcon SmallBrick;
private IIcon smallBrick;
public BlockSkyStone()
{
super( BlockSkyStone.class, Material.rock );
super( Material.rock );
this.setHardness( 50 );
this.hasSubtypes = true;
this.blockResistance = 150.0f;
this.blockResistance = BLOCK_RESISTANCE;
this.setHarvestLevel( "pickaxe", 3, 0 );
this.setFeature( EnumSet.of( AEFeature.Core ) );
@@ -82,21 +78,21 @@ public class BlockSkyStone extends AEBaseBlock implements IOrientableBlock
}
@SubscribeEvent
public void breakFaster( PlayerEvent.BreakSpeed Ev )
public void breakFaster( PlayerEvent.BreakSpeed event )
{
if( Ev.block == this && Ev.entityPlayer != null )
if( event.block == this && event.entityPlayer != null )
{
ItemStack is = Ev.entityPlayer.inventory.getCurrentItem();
ItemStack is = event.entityPlayer.inventory.getCurrentItem();
int level = -1;
if( is != null )
if( is != null && is.getItem() != null )
{
level = is.getItem().getHarvestLevel( is, "pickaxe" );
}
if( Ev.metadata > 0 || level >= 3 || Ev.originalSpeed > 7.0 )
if( event.metadata > 0 || level >= 3 || event.originalSpeed > BREAK_SPEAK_THRESHOLD )
{
Ev.newSpeed /= 0.1;
event.newSpeed /= BREAK_SPEAK_SCALAR;
}
}
}
@@ -122,16 +118,10 @@ public class BlockSkyStone extends AEBaseBlock implements IOrientableBlock
super.onBlockAdded( w, x, y, z );
if( Platform.isServer() )
{
WorldSettings.getInstance().getCompass().updateArea( w, x, y, z );
WorldData.instance().compassData().service().updateArea( w, x, y, z );
}
}
// use AE2's renderer, no rotatable blocks.
int getRealRenderType()
{
return this.getRenderType();
}
@Override
public boolean usesMetadata()
{
@@ -141,19 +131,6 @@ public class BlockSkyStone extends AEBaseBlock implements IOrientableBlock
@Override
public IOrientable getOrientable( final IBlockAccess w, final int x, final int y, final int z )
{
if( AppEng.instance.isIntegrationEnabled( IntegrationType.RB ) )
{
TileEntity te = w.getTileEntity( x, y, z );
if( te != null )
{
IOrientable out = ( (IRB) AppEng.instance.getIntegration( IntegrationType.RB ) ).getOrientable( te );
if( out != null )
{
return out;
}
}
}
if( w.getBlockMetadata( x, y, z ) == 0 )
{
return new LocationRotation( w, x, y, z );
@@ -188,9 +165,9 @@ public class BlockSkyStone extends AEBaseBlock implements IOrientableBlock
public void registerBlockIcons( IIconRegister ir )
{
super.registerBlockIcons( ir );
this.Block = ir.registerIcon( this.getTextureName() + ".Block" );
this.Brick = ir.registerIcon( this.getTextureName() + ".Brick" );
this.SmallBrick = ir.registerIcon( this.getTextureName() + ".SmallBrick" );
this.block = ir.registerIcon( this.getTextureName() + ".Block" );
this.brick = ir.registerIcon( this.getTextureName() + ".Brick" );
this.smallBrick = ir.registerIcon( this.getTextureName() + ".SmallBrick" );
}
@Override
@@ -199,15 +176,15 @@ public class BlockSkyStone extends AEBaseBlock implements IOrientableBlock
{
if( metadata == 1 )
{
return this.Block;
return this.block;
}
if( metadata == 2 )
{
return this.Brick;
return this.brick;
}
if( metadata == 3 )
{
return this.SmallBrick;
return this.smallBrick;
}
return super.getIcon( direction, metadata );
}
@@ -230,12 +207,12 @@ public class BlockSkyStone extends AEBaseBlock implements IOrientableBlock
}
@Override
public void breakBlock( World w, int x, int y, int z, Block b, int WTF )
public void breakBlock( World w, int x, int y, int z, Block b, int metadata )
{
super.breakBlock( w, x, y, z, b, WTF );
super.breakBlock( w, x, y, z, b, metadata );
if( Platform.isServer() )
{
WorldSettings.getInstance().getCompass().updateArea( w, x, y, z );
WorldData.instance().compassData().service().updateArea( w, x, y, z );
}
}
}
@@ -21,6 +21,7 @@ package appeng.block.solids;
import java.util.EnumSet;
import java.util.Random;
import javax.annotation.Nullable;
import net.minecraft.block.material.Material;
@@ -46,12 +47,7 @@ public class OreQuartz extends AEBaseBlock
public OreQuartz()
{
this( OreQuartz.class );
}
public OreQuartz( Class<? extends OreQuartz> self )
{
super( self, Material.rock );
super( Material.rock );
this.setHardness( 3.0F );
this.setResistance( 5.0F );
this.boostBrightnessLow = 0;
@@ -20,6 +20,7 @@ package appeng.block.solids;
import java.util.Random;
import javax.annotation.Nullable;
import net.minecraft.client.Minecraft;
@@ -42,7 +43,6 @@ public class OreQuartzCharged extends OreQuartz
public OreQuartzCharged()
{
super( OreQuartzCharged.class );
this.setBoostBrightnessLow( 2 );
this.setBoostBrightnessHigh( 5 );
}
@@ -62,7 +62,7 @@ public class OreQuartzCharged extends OreQuartz
@Override
public int damageDropped( int id )
{
for ( ItemStack crystalStack : AEApi.instance().definitions().materials().certusQuartzCrystalCharged().maybeStack( 1 ).asSet() )
for( ItemStack crystalStack : AEApi.instance().definitions().materials().certusQuartzCrystalCharged().maybeStack( 1 ).asSet() )
{
return crystalStack.getItemDamage();
}
@@ -74,7 +74,7 @@ public class OreQuartzCharged extends OreQuartz
@SideOnly( Side.CLIENT )
public void randomDisplayTick( World w, int x, int y, int z, Random r )
{
if ( !AEConfig.instance.enableEffects )
if( !AEConfig.instance.enableEffects )
{
return;
}
@@ -49,7 +49,7 @@ public class BlockMatrixFrame extends AEBaseBlock implements ICustomCollision
public BlockMatrixFrame()
{
super( BlockMatrixFrame.class, Material.anvil );
super( Material.anvil );
this.setResistance( 6000000.0F );
this.setBlockUnbreakable();
this.setLightOpacity( 0 );
@@ -27,19 +27,19 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
import appeng.block.AEBaseBlock;
import appeng.block.AEBaseTileBlock;
import appeng.core.features.AEFeature;
import appeng.core.sync.GuiBridge;
import appeng.tile.spatial.TileSpatialIOPort;
import appeng.util.Platform;
public class BlockSpatialIOPort extends AEBaseBlock
public class BlockSpatialIOPort extends AEBaseTileBlock
{
public BlockSpatialIOPort()
{
super( BlockSpatialIOPort.class, Material.iron );
super( Material.iron );
this.setTileEntity( TileSpatialIOPort.class );
this.setFeature( EnumSet.of( AEFeature.SpatialIO ) );
}
@@ -25,7 +25,7 @@ import net.minecraft.block.Block;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import appeng.block.AEBaseBlock;
import appeng.block.AEBaseTileBlock;
import appeng.client.render.BaseBlockRender;
import appeng.client.render.blocks.RenderSpatialPylon;
import appeng.core.features.AEFeature;
@@ -33,12 +33,12 @@ import appeng.helpers.AEGlassMaterial;
import appeng.tile.spatial.TileSpatialPylon;
public class BlockSpatialPylon extends AEBaseBlock
public class BlockSpatialPylon extends AEBaseTileBlock
{
public BlockSpatialPylon()
{
super( BlockSpatialPylon.class, AEGlassMaterial.INSTANCE );
super( AEGlassMaterial.INSTANCE );
this.setTileEntity( TileSpatialPylon.class );
this.setFeature( EnumSet.of( AEFeature.SpatialIO ) );
}
@@ -29,7 +29,7 @@ import net.minecraftforge.common.util.ForgeDirection;
import appeng.api.AEApi;
import appeng.api.storage.ICellHandler;
import appeng.block.AEBaseBlock;
import appeng.block.AEBaseTileBlock;
import appeng.client.render.BaseBlockRender;
import appeng.client.render.blocks.RenderMEChest;
import appeng.core.features.AEFeature;
@@ -39,12 +39,12 @@ import appeng.tile.storage.TileChest;
import appeng.util.Platform;
public class BlockChest extends AEBaseBlock
public class BlockChest extends AEBaseTileBlock
{
public BlockChest()
{
super( BlockChest.class, Material.iron );
super( Material.iron );
this.setTileEntity( TileChest.class );
this.setFeature( EnumSet.of( AEFeature.StorageCells, AEFeature.MEChest ) );
}
@@ -26,7 +26,7 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
import appeng.block.AEBaseBlock;
import appeng.block.AEBaseTileBlock;
import appeng.client.render.BaseBlockRender;
import appeng.client.render.blocks.RenderDrive;
import appeng.core.features.AEFeature;
@@ -35,12 +35,12 @@ import appeng.tile.storage.TileDrive;
import appeng.util.Platform;
public class BlockDrive extends AEBaseBlock
public class BlockDrive extends AEBaseTileBlock
{
public BlockDrive()
{
super( BlockDrive.class, Material.iron );
super( Material.iron );
this.setTileEntity( TileDrive.class );
this.setFeature( EnumSet.of( AEFeature.StorageCells, AEFeature.MEDrive ) );
}
@@ -27,19 +27,19 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
import appeng.block.AEBaseBlock;
import appeng.block.AEBaseTileBlock;
import appeng.core.features.AEFeature;
import appeng.core.sync.GuiBridge;
import appeng.tile.storage.TileIOPort;
import appeng.util.Platform;
public class BlockIOPort extends AEBaseBlock
public class BlockIOPort extends AEBaseTileBlock
{
public BlockIOPort()
{
super( BlockIOPort.class, Material.iron );
super( Material.iron );
this.setTileEntity( TileIOPort.class );
this.setFeature( EnumSet.of( AEFeature.StorageCells, AEFeature.IOPort ) );
}
@@ -42,7 +42,7 @@ import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import appeng.api.AEApi;
import appeng.block.AEBaseBlock;
import appeng.block.AEBaseTileBlock;
import appeng.client.render.BaseBlockRender;
import appeng.client.render.blocks.RenderBlockSkyChest;
import appeng.core.features.AEFeature;
@@ -52,12 +52,12 @@ import appeng.tile.storage.TileSkyChest;
import appeng.util.Platform;
public class BlockSkyChest extends AEBaseBlock implements ICustomCollision
public class BlockSkyChest extends AEBaseTileBlock implements ICustomCollision
{
public BlockSkyChest()
{
super( BlockSkyChest.class, Material.rock );
super( Material.rock );
this.setTileEntity( TileSkyChest.class );
this.isOpaque = this.isFullSize = false;
this.lightOpacity = 0;
@@ -148,11 +148,11 @@ public class BlockSkyChest extends AEBaseBlock implements ICustomCollision
o = sk.getUp();
}
double X = o.offsetX == 0 ? 0.06 : 0.0;
double Y = o.offsetY == 0 ? 0.06 : 0.0;
double Z = o.offsetZ == 0 ? 0.06 : 0.0;
double offsetX = o.offsetX == 0 ? 0.06 : 0.0;
double offsetY = o.offsetY == 0 ? 0.06 : 0.0;
double offsetZ = o.offsetZ == 0 ? 0.06 : 0.0;
return Collections.singletonList( AxisAlignedBB.getBoundingBox( Math.max( 0.0, X - o.offsetX * sc ), Math.max( 0.0, Y - o.offsetY * sc ), Math.max( 0.0, Z - o.offsetZ * sc ), Math.min( 1.0, ( 1.0 - X ) - o.offsetX * sc ), Math.min( 1.0, ( 1.0 - Y ) - o.offsetY * sc ), Math.min( 1.0, ( 1.0 - Z ) - o.offsetZ * sc ) ) );
return Collections.singletonList( AxisAlignedBB.getBoundingBox( Math.max( 0.0, offsetX - o.offsetX * sc ), Math.max( 0.0, offsetY - o.offsetY * sc ), Math.max( 0.0, offsetZ - o.offsetZ * sc ), Math.min( 1.0, ( 1.0 - offsetX ) - o.offsetX * sc ), Math.min( 1.0, ( 1.0 - offsetY ) - o.offsetY * sc ), Math.min( 1.0, ( 1.0 - offsetZ ) - o.offsetZ * sc ) ) );
}
@Override
@@ -1,6 +1,6 @@
/*
* This file is part of Applied Energistics 2.
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
* Copyright (c) 2013 - 2015, AlgorithmX2, All rights reserved.
*
* Applied Energistics 2 is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -84,9 +84,6 @@ import appeng.server.ServerHelper;
import appeng.transformer.MissingCoreMod;
import appeng.util.Platform;
import static net.minecraftforge.client.IItemRenderer.ItemRenderType.ENTITY;
import static net.minecraftforge.client.IItemRenderer.ItemRendererHelper.BLOCK_3D;
public class ClientHelper extends ServerHelper
{
@@ -301,10 +298,10 @@ public class ClientHelper extends ServerHelper
GL11.glRotatef( 30.0f, 0.0f, 1.0f, 0.0f );
}
IItemRenderer customRenderer = MinecraftForgeClient.getItemRenderer( itemstack, ENTITY );
IItemRenderer customRenderer = MinecraftForgeClient.getItemRenderer( itemstack, IItemRenderer.ItemRenderType.ENTITY );
if( customRenderer != null && !( itemstack.getItem() instanceof ItemBlock ) )
{
if( customRenderer.shouldUseRenderHelper( ENTITY, itemstack, BLOCK_3D ) )
if( customRenderer.shouldUseRenderHelper( IItemRenderer.ItemRenderType.ENTITY, itemstack, IItemRenderer.ItemRendererHelper.BLOCK_3D ) )
{
GL11.glTranslatef( 0, -0.04F, 0 );
GL11.glScalef( 0.7f, 0.7f, 0.7f );
+16 -16
View File
@@ -1,6 +1,6 @@
/*
* This file is part of Applied Energistics 2.
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
* Copyright (c) 2013 - 2015, AlgorithmX2, All rights reserved.
*
* Applied Energistics 2 is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -30,6 +30,9 @@ import java.util.List;
import java.util.Set;
import java.util.concurrent.TimeUnit;
import com.google.common.base.Joiner;
import com.google.common.base.Stopwatch;
import org.lwjgl.input.Keyboard;
import org.lwjgl.input.Mouse;
import org.lwjgl.opengl.GL11;
@@ -49,9 +52,6 @@ import net.minecraft.util.ResourceLocation;
import cpw.mods.fml.common.ObfuscationReflectionHelper;
import com.google.common.base.Joiner;
import com.google.common.base.Stopwatch;
import appeng.api.storage.data.IAEItemStack;
import appeng.client.gui.widgets.GuiScrollbar;
import appeng.client.gui.widgets.ITooltip;
@@ -72,11 +72,11 @@ import appeng.container.slot.SlotOutput;
import appeng.container.slot.SlotPatternTerm;
import appeng.container.slot.SlotRestrictedInput;
import appeng.core.AELog;
import appeng.core.AppEng;
import appeng.core.sync.network.NetworkHandler;
import appeng.core.sync.packets.PacketInventoryAction;
import appeng.core.sync.packets.PacketSwapSlots;
import appeng.helpers.InventoryAction;
import appeng.integration.IntegrationRegistry;
import appeng.integration.IntegrationType;
import appeng.integration.abstraction.INEI;
@@ -156,14 +156,14 @@ public abstract class AEBaseGui extends GuiContainer
}
@Override
public void drawScreen( int mouse_x, int mouse_y, float btn )
public void drawScreen( int mouseX, int mouseY, float btn )
{
super.drawScreen( mouse_x, mouse_y, btn );
super.drawScreen( mouseX, mouseY, btn );
boolean hasClicked = Mouse.isButtonDown( 0 );
if( hasClicked && this.myScrollBar != null )
{
this.myScrollBar.click( this, mouse_x - this.guiLeft, mouse_y - this.guiTop );
this.myScrollBar.click( this, mouseX - this.guiLeft, mouseY - this.guiTop );
}
for( Object c : this.buttonList )
@@ -174,9 +174,9 @@ public abstract class AEBaseGui extends GuiContainer
int x = tooltip.xPos(); // ((GuiImgButton) c).xPosition;
int y = tooltip.yPos(); // ((GuiImgButton) c).yPosition;
if( x < mouse_x && x + tooltip.getWidth() > mouse_x && tooltip.isVisible() )
if( x < mouseX && x + tooltip.getWidth() > mouseX && tooltip.isVisible() )
{
if( y < mouse_y && y + tooltip.getHeight() > mouse_y )
if( y < mouseY && y + tooltip.getHeight() > mouseY )
{
if( y < 15 )
{
@@ -194,14 +194,14 @@ public abstract class AEBaseGui extends GuiContainer
}
}
public void drawTooltip( int par2, int par3, int forceWidth, String Msg )
public void drawTooltip( int par2, int par3, int forceWidth, String message )
{
GL11.glPushAttrib( GL11.GL_ALL_ATTRIB_BITS );
GL11.glDisable( GL12.GL_RESCALE_NORMAL );
RenderHelper.disableStandardItemLighting();
GL11.glDisable( GL11.GL_LIGHTING );
GL11.glDisable( GL11.GL_DEPTH_TEST );
String[] var4 = Msg.split( "\n" );
String[] var4 = message.split( "\n" );
if( var4.length > 0 )
{
@@ -590,7 +590,7 @@ public abstract class AEBaseGui extends GuiContainer
}
@Override
protected boolean checkHotbarKeys( int p_146983_1_ )
protected boolean checkHotbarKeys( int keyCode )
{
Slot theSlot;
@@ -607,7 +607,7 @@ public abstract class AEBaseGui extends GuiContainer
{
for( int j = 0; j < 9; ++j )
{
if( p_146983_1_ == this.mc.gameSettings.keyBindsHotbar[j].getKeyCode() )
if( keyCode == this.mc.gameSettings.keyBindsHotbar[j].getKeyCode() )
{
final List<Slot> slots = this.getInventorySlots();
for( Slot s : slots )
@@ -895,9 +895,9 @@ public abstract class AEBaseGui extends GuiContainer
private RenderItem setItemRender( RenderItem item )
{
if( AppEng.instance.isIntegrationEnabled( IntegrationType.NEI ) )
if( IntegrationRegistry.INSTANCE.isEnabled( IntegrationType.NEI ) )
{
return ( (INEI) AppEng.instance.getIntegration( IntegrationType.NEI ) ).setItemRender( item );
return ( (INEI) IntegrationRegistry.INSTANCE.getInstance( IntegrationType.NEI ) ).setItemRender( item );
}
else
{
@@ -26,6 +26,8 @@ import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import com.google.common.base.Joiner;
import org.lwjgl.input.Mouse;
import org.lwjgl.opengl.GL11;
@@ -33,8 +35,6 @@ import net.minecraft.client.gui.GuiButton;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.item.ItemStack;
import com.google.common.base.Joiner;
import appeng.api.AEApi;
import appeng.api.storage.ITerminalHost;
import appeng.api.storage.data.IAEItemStack;
@@ -131,7 +131,7 @@ public class GuiCraftConfirm extends AEBaseGui
}
@Override
public void drawScreen( int mouse_x, int mouse_y, float btn )
public void drawScreen( int mouseX, int mouseY, float btn )
{
this.updateCPUButtonText();
@@ -152,9 +152,9 @@ public class GuiCraftConfirm extends AEBaseGui
int minX = gx + 9 + x * 67;
int minY = gy + 22 + y * offY;
if( minX < mouse_x && minX + 67 > mouse_x )
if( minX < mouseX && minX + 67 > mouseX )
{
if( minY < mouse_y && minY + offY - 2 > mouse_y )
if( minY < mouseY && minY + offY - 2 > mouseY )
{
this.tooltip = z;
break;
@@ -170,7 +170,7 @@ public class GuiCraftConfirm extends AEBaseGui
}
}
super.drawScreen( mouse_x, mouse_y, btn );
super.drawScreen( mouseX, mouseY, btn );
}
private void updateCPUButtonText()
@@ -24,15 +24,17 @@ import java.util.ArrayList;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.concurrent.TimeUnit;
import com.google.common.base.Joiner;
import org.apache.commons.lang3.time.DurationFormatUtils;
import org.lwjgl.opengl.GL11;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.item.ItemStack;
import com.google.common.base.Joiner;
import appeng.api.AEApi;
import appeng.api.config.SortDir;
import appeng.api.config.SortOrder;
@@ -50,20 +52,45 @@ import appeng.core.localization.GuiText;
import appeng.core.sync.network.NetworkHandler;
import appeng.core.sync.packets.PacketValueConfig;
import appeng.util.Platform;
import appeng.util.ReadableNumberConverter;
public class GuiCraftingCPU extends AEBaseGui implements ISortSource
{
private final static int GUI_HEIGHT = 184;
private final static int GUI_WIDTH = 238;
final int rows = 6;
private final static int DISPLAYED_ROWS = 6;
IItemList<IAEItemStack> storage = AEApi.instance().storage().createItemList();
IItemList<IAEItemStack> active = AEApi.instance().storage().createItemList();
IItemList<IAEItemStack> pending = AEApi.instance().storage().createItemList();
private final static int TEXT_COLOR = 0x404040;
private final static int BACKGROUND_ALPHA = 0x5A000000;
List<IAEItemStack> visual = new ArrayList<IAEItemStack>();
GuiButton cancel;
int tooltip = -1;
private final static int SECTION_LENGTH = 67;
private final static int SCROLLBAR_TOP = 19;
private final static int SCROLLBAR_LEFT = 218;
private final static int SCROLLBAR_HEIGHT = 137;
private final static int CANCEL_LEFT_OFFSET = 163;
private final static int CANCEL_TOP_OFFSET = 25;
private final static int CANCEL_HEIGHT = 20;
private final static int CANCEL_WIDTH = 50;
private final static int TITLE_TOP_OFFSET = 7;
private final static int TITLE_LEFT_OFFSET = 8;
private final static int ITEMSTACK_LEFT_OFFSET = 9;
private final static int ITEMSTACK_TOP_OFFSET = 22;
private final ContainerCraftingCPU craftingCpu;
private IItemList<IAEItemStack> storage = AEApi.instance().storage().createItemList();
private IItemList<IAEItemStack> active = AEApi.instance().storage().createItemList();
private IItemList<IAEItemStack> pending = AEApi.instance().storage().createItemList();
private List<IAEItemStack> visual = new ArrayList<IAEItemStack>();
private GuiButton cancel;
private int tooltip = -1;
public GuiCraftingCPU( InventoryPlayer inventoryPlayer, Object te )
{
@@ -73,8 +100,9 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
protected GuiCraftingCPU( ContainerCraftingCPU container )
{
super( container );
this.ySize = 184;
this.xSize = 238;
this.craftingCpu = container;
this.ySize = GUI_HEIGHT;
this.xSize = GUI_WIDTH;
this.myScrollBar = new GuiScrollbar();
}
@@ -109,7 +137,7 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
{
super.initGui();
this.setScrollBar();
this.cancel = new GuiButton( 0, this.guiLeft + 163, this.guiTop + this.ySize - 25, 50, 20, GuiText.Cancel.getLocal() );
this.cancel = new GuiButton( 0, this.guiLeft + CANCEL_LEFT_OFFSET, this.guiTop + this.ySize - CANCEL_TOP_OFFSET, CANCEL_WIDTH, CANCEL_HEIGHT, GuiText.Cancel.getLocal() );
this.buttonList.add( this.cancel );
}
@@ -117,21 +145,21 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
{
int size = this.visual.size();
this.myScrollBar.setTop( 19 ).setLeft( 218 ).setHeight( 137 );
this.myScrollBar.setRange( 0, ( size + 2 ) / 3 - this.rows, 1 );
this.myScrollBar.setTop( SCROLLBAR_TOP ).setLeft( SCROLLBAR_LEFT ).setHeight( SCROLLBAR_HEIGHT );
this.myScrollBar.setRange( 0, ( size + 2 ) / 3 - DISPLAYED_ROWS, 1 );
}
@Override
public void drawScreen( int mouse_x, int mouse_y, float btn )
public void drawScreen( int mouseX, int mouseY, float btn )
{
this.cancel.enabled = !this.visual.isEmpty();
int x = 0;
int y = 0;
int gx = ( this.width - this.xSize ) / 2;
int gy = ( this.height - this.ySize ) / 2;
int offY = 23;
final int gx = ( this.width - this.xSize ) / 2;
final int gy = ( this.height - this.ySize ) / 2;
final int offY = 23;
this.tooltip = -1;
@@ -140,9 +168,9 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
int minX = gx + 9 + x * 67;
int minY = gy + 22 + y * offY;
if( minX < mouse_x && minX + 67 > mouse_x )
if( minX < mouseX && minX + 67 > mouseX )
{
if( minY < mouse_y && minY + offY - 2 > mouse_y )
if( minY < mouseY && minY + offY - 2 > mouseY )
{
this.tooltip = z;
break;
@@ -158,22 +186,28 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
}
}
super.drawScreen( mouse_x, mouse_y, btn );
super.drawScreen( mouseX, mouseY, btn );
}
@Override
public void drawFG( int offsetX, int offsetY, int mouseX, int mouseY )
{
this.fontRendererObj.drawString( this.getGuiDisplayName( GuiText.CraftingStatus.getLocal() ), 8, 7, 4210752 );
final ReadableNumberConverter converter = ReadableNumberConverter.INSTANCE;
String title = this.getGuiDisplayName( GuiText.CraftingStatus.getLocal() );
int sectionLength = 67;
if( this.craftingCpu.eta > 0 && !this.visual.isEmpty() )
{
final long etaInMilliseconds = TimeUnit.MILLISECONDS.convert( this.craftingCpu.eta, TimeUnit.NANOSECONDS );
final String etaTimeText = DurationFormatUtils.formatDuration( etaInMilliseconds, GuiText.ETAFormat.getLocal() );
title += " - " + etaTimeText;
}
this.fontRendererObj.drawString( title, TITLE_LEFT_OFFSET, TITLE_TOP_OFFSET, TEXT_COLOR );
int x = 0;
int y = 0;
int xo = 9;
int yo = 22;
int viewStart = this.myScrollBar.getCurrentScroll() * 3;
int viewEnd = viewStart + 3 * 6;
final int viewStart = this.myScrollBar.getCurrentScroll() * 3;
final int viewEnd = viewStart + 3 * 6;
String dspToolTip = "";
List<String> lineList = new LinkedList<String>();
@@ -190,9 +224,9 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
GL11.glPushMatrix();
GL11.glScaled( 0.5, 0.5, 0.5 );
IAEItemStack stored = this.storage.findPrecise( refStack );
IAEItemStack activeStack = this.active.findPrecise( refStack );
IAEItemStack pendingStack = this.pending.findPrecise( refStack );
final IAEItemStack stored = this.storage.findPrecise( refStack );
final IAEItemStack activeStack = this.active.findPrecise( refStack );
final IAEItemStack pendingStack = this.pending.findPrecise( refStack );
int lines = 0;
boolean active = false;
@@ -215,10 +249,10 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
if( AEConfig.instance.useColoredCraftingStatus && ( active || scheduled ) )
{
int bgColor = ( active ? AEColor.Green.blackVariant : AEColor.Yellow.blackVariant ) | 0x5A000000;
int startX = ( x * ( 1 + sectionLength ) + xo ) * 2;
int startY = ( ( y * offY + yo ) - 3 ) * 2;
drawRect( startX, startY, startX + ( sectionLength * 2 ), startY + ( offY * 2 ) - 2, bgColor );
int bgColor = ( active ? AEColor.Green.blackVariant : AEColor.Yellow.blackVariant ) | BACKGROUND_ALPHA;
int startX = ( x * ( 1 + SECTION_LENGTH ) + ITEMSTACK_LEFT_OFFSET ) * 2;
int startY = ( ( y * offY + ITEMSTACK_TOP_OFFSET ) - 3 ) * 2;
drawRect( startX, startY, startX + ( SECTION_LENGTH * 2 ), startY + ( offY * 2 ) - 2, bgColor );
}
int negY = ( ( lines - 1 ) * 5 ) / 2;
@@ -226,19 +260,9 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
if( stored != null && stored.getStackSize() > 0 )
{
String str = Long.toString( stored.getStackSize() );
if( stored.getStackSize() >= 10000 )
{
str = Long.toString( stored.getStackSize() / 1000 ) + 'k';
}
if( stored.getStackSize() >= 10000000 )
{
str = Long.toString( stored.getStackSize() / 1000000 ) + 'm';
}
str = GuiText.Stored.getLocal() + ": " + str;
final String str = GuiText.Stored.getLocal() + ": " + converter.toWideReadableForm( stored.getStackSize() );
int w = 4 + this.fontRendererObj.getStringWidth( str );
this.fontRendererObj.drawString( str, (int) ( ( x * ( 1 + sectionLength ) + xo + sectionLength - 19 - ( w * 0.5 ) ) * 2 ), ( y * offY + yo + 6 - negY + downY ) * 2, 4210752 );
this.fontRendererObj.drawString( str, (int) ( ( x * ( 1 + SECTION_LENGTH ) + ITEMSTACK_LEFT_OFFSET + SECTION_LENGTH - 19 - ( w * 0.5 ) ) * 2 ), ( y * offY + ITEMSTACK_TOP_OFFSET + 6 - negY + downY ) * 2, TEXT_COLOR );
if( this.tooltip == z - viewStart )
{
@@ -250,19 +274,10 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
if( activeStack != null && activeStack.getStackSize() > 0 )
{
String str = Long.toString( activeStack.getStackSize() );
if( activeStack.getStackSize() >= 10000 )
{
str = Long.toString( activeStack.getStackSize() / 1000 ) + 'k';
}
if( activeStack.getStackSize() >= 10000000 )
{
str = Long.toString( activeStack.getStackSize() / 1000000 ) + 'm';
}
final String str = GuiText.Crafting.getLocal() + ": " + converter.toWideReadableForm( activeStack.getStackSize() );
final int w = 4 + this.fontRendererObj.getStringWidth( str );
str = GuiText.Crafting.getLocal() + ": " + str;
int w = 4 + this.fontRendererObj.getStringWidth( str );
this.fontRendererObj.drawString( str, (int) ( ( x * ( 1 + sectionLength ) + xo + sectionLength - 19 - ( w * 0.5 ) ) * 2 ), ( y * offY + yo + 6 - negY + downY ) * 2, 4210752 );
this.fontRendererObj.drawString( str, (int) ( ( x * ( 1 + SECTION_LENGTH ) + ITEMSTACK_LEFT_OFFSET + SECTION_LENGTH - 19 - ( w * 0.5 ) ) * 2 ), ( y * offY + ITEMSTACK_TOP_OFFSET + 6 - negY + downY ) * 2, TEXT_COLOR );
if( this.tooltip == z - viewStart )
{
@@ -274,19 +289,10 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
if( pendingStack != null && pendingStack.getStackSize() > 0 )
{
String str = Long.toString( pendingStack.getStackSize() );
if( pendingStack.getStackSize() >= 10000 )
{
str = Long.toString( pendingStack.getStackSize() / 1000 ) + 'k';
}
if( pendingStack.getStackSize() >= 10000000 )
{
str = Long.toString( pendingStack.getStackSize() / 1000000 ) + 'm';
}
final String str = GuiText.Scheduled.getLocal() + ": " + converter.toWideReadableForm( pendingStack.getStackSize() );
final int w = 4 + this.fontRendererObj.getStringWidth( str );
str = GuiText.Scheduled.getLocal() + ": " + str;
int w = 4 + this.fontRendererObj.getStringWidth( str );
this.fontRendererObj.drawString( str, (int) ( ( x * ( 1 + sectionLength ) + xo + sectionLength - 19 - ( w * 0.5 ) ) * 2 ), ( y * offY + yo + 6 - negY + downY ) * 2, 4210752 );
this.fontRendererObj.drawString( str, (int) ( ( x * ( 1 + SECTION_LENGTH ) + ITEMSTACK_LEFT_OFFSET + SECTION_LENGTH - 19 - ( w * 0.5 ) ) * 2 ), ( y * offY + ITEMSTACK_TOP_OFFSET + 6 - negY + downY ) * 2, TEXT_COLOR );
if( this.tooltip == z - viewStart )
{
@@ -295,8 +301,8 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
}
GL11.glPopMatrix();
int posX = x * ( 1 + sectionLength ) + xo + sectionLength - 19;
int posY = y * offY + yo;
int posX = x * ( 1 + SECTION_LENGTH ) + ITEMSTACK_LEFT_OFFSET + SECTION_LENGTH - 19;
int posY = y * offY + ITEMSTACK_TOP_OFFSET;
ItemStack is = refStack.copy().getItemStack();
@@ -309,8 +315,8 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
dspToolTip = dspToolTip + '\n' + Joiner.on( "\n" ).join( lineList );
}
toolPosX = x * ( 1 + sectionLength ) + xo + sectionLength - 8;
toolPosY = y * offY + yo;
toolPosX = x * ( 1 + SECTION_LENGTH ) + ITEMSTACK_LEFT_OFFSET + SECTION_LENGTH - 8;
toolPosY = y * offY + ITEMSTACK_TOP_OFFSET;
}
this.drawItem( posX, posY, is );
@@ -412,9 +418,9 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
private long getTotal( IAEItemStack is )
{
IAEItemStack a = this.storage.findPrecise( is );
IAEItemStack b = this.active.findPrecise( is );
IAEItemStack c = this.pending.findPrecise( is );
final IAEItemStack a = this.storage.findPrecise( is );
final IAEItemStack b = this.active.findPrecise( is );
final IAEItemStack c = this.pending.findPrecise( is );
long total = 0;
@@ -438,7 +444,8 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
private void deleteVisualStack( IAEItemStack l )
{
Iterator<IAEItemStack> i = this.visual.iterator();
final Iterator<IAEItemStack> i = this.visual.iterator();
while( i.hasNext() )
{
IAEItemStack o = i.next();
@@ -460,8 +467,9 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
}
}
IAEItemStack stack = l.copy();
final IAEItemStack stack = l.copy();
this.visual.add( stack );
return stack;
}
@@ -28,6 +28,8 @@ import java.util.Map;
import java.util.Set;
import java.util.WeakHashMap;
import com.google.common.collect.HashMultimap;
import org.lwjgl.opengl.GL11;
import net.minecraft.entity.player.InventoryPlayer;
@@ -35,8 +37,6 @@ import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import com.google.common.collect.HashMultimap;
import appeng.api.AEApi;
import appeng.client.gui.AEBaseGui;
import appeng.client.gui.widgets.GuiScrollbar;
@@ -45,7 +45,7 @@ import appeng.client.me.ClientDCInternalInv;
import appeng.client.me.SlotDisconnected;
import appeng.container.implementations.ContainerInterfaceTerminal;
import appeng.core.localization.GuiText;
import appeng.parts.reporting.PartMonitor;
import appeng.parts.reporting.PartInterfaceTerminal;
import appeng.util.Platform;
@@ -67,7 +67,7 @@ public class GuiInterfaceTerminal extends AEBaseGui
private boolean refreshList = false;
private MEGuiTextField searchField;
public GuiInterfaceTerminal( InventoryPlayer inventoryPlayer, PartMonitor te )
public GuiInterfaceTerminal( InventoryPlayer inventoryPlayer, PartInterfaceTerminal te )
{
super( new ContainerInterfaceTerminal( inventoryPlayer, te ) );
this.myScrollBar = new GuiScrollbar();
@@ -1,6 +1,6 @@
/*
* This file is part of Applied Energistics 2.
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
* Copyright (c) 2013 - 2015, AlgorithmX2, All rights reserved.
*
* Applied Energistics 2 is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -54,15 +54,15 @@ import appeng.container.slot.SlotCraftingMatrix;
import appeng.container.slot.SlotFakeCraftingMatrix;
import appeng.core.AEConfig;
import appeng.core.AELog;
import appeng.core.AppEng;
import appeng.core.localization.GuiText;
import appeng.core.sync.GuiBridge;
import appeng.core.sync.network.NetworkHandler;
import appeng.core.sync.packets.PacketSwitchGuis;
import appeng.core.sync.packets.PacketValueConfig;
import appeng.helpers.WirelessTerminalGuiObject;
import appeng.integration.IntegrationRegistry;
import appeng.integration.IntegrationType;
import appeng.parts.reporting.PartTerminal;
import appeng.parts.reporting.AbstractPartTerminal;
import appeng.tile.misc.TileSecurity;
import appeng.util.IConfigManagerHost;
import appeng.util.Platform;
@@ -139,7 +139,7 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
{
this.myName = GuiText.Chest;
}
else if( te instanceof PartTerminal )
else if( te instanceof AbstractPartTerminal )
{
this.myName = GuiText.Terminal;
}
@@ -224,7 +224,7 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
this.maxRows = this.getMaxRows();
this.perRow = AEConfig.instance.getConfigManager().getSetting( Settings.TERMINAL_STYLE ) != TerminalStyle.FULL ? 9 : 9 + ( ( this.width - this.standardSize ) / 18 );
boolean hasNEI = AppEng.instance.isIntegrationEnabled( IntegrationType.NEI );
boolean hasNEI = IntegrationRegistry.INSTANCE.isEnabled( IntegrationType.NEI );
int NEI = hasNEI ? 0 : 0;
int top = hasNEI ? 22 : 0;
@@ -333,7 +333,7 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
{
if( s instanceof AppEngSlot )
{
if( ( (AppEngSlot) s ).xDisplayPosition < 197 )
if( ( (Slot) s ).xDisplayPosition < 197 )
{
this.repositionSlot( (AppEngSlot) s );
}
@@ -89,7 +89,7 @@ public class GuiNetworkStatus extends AEBaseGui implements ISortSource
}
@Override
public void drawScreen( int mouse_x, int mouse_y, float btn )
public void drawScreen( int mouseX, int mouseY, float btn )
{
int x = 0;
int y = 0;
@@ -104,9 +104,9 @@ public class GuiNetworkStatus extends AEBaseGui implements ISortSource
int minX = gx + 14 + x * 31;
int minY = gy + 41 + y * 18;
if( minX < mouse_x && minX + 28 > mouse_x )
if( minX < mouseX && minX + 28 > mouseX )
{
if( minY < mouse_y && minY + 20 > mouse_y )
if( minY < mouseY && minY + 20 > mouseY )
{
this.tooltip = z;
break;
@@ -122,7 +122,7 @@ public class GuiNetworkStatus extends AEBaseGui implements ISortSource
}
}
super.drawScreen( mouse_x, mouse_y, btn );
super.drawScreen( mouseX, mouseY, btn );
}
@Override
@@ -1,6 +1,6 @@
/*
* This file is part of Applied Energistics 2.
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
* Copyright (c) 2013 - 2015, AlgorithmX2, All rights reserved.
*
* Applied Energistics 2 is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -23,8 +23,8 @@ import net.minecraft.entity.player.InventoryPlayer;
import appeng.client.gui.AEBaseGui;
import appeng.container.implementations.ContainerSkyChest;
import appeng.core.AppEng;
import appeng.core.localization.GuiText;
import appeng.integration.IntegrationRegistry;
import appeng.integration.IntegrationType;
import appeng.tile.storage.TileSkyChest;
@@ -55,6 +55,6 @@ public class GuiSkyChest extends AEBaseGui
@Override
protected boolean enableSpaceClicking()
{
return !AppEng.instance.isIntegrationEnabled( IntegrationType.InvTweaks );
return !IntegrationRegistry.INSTANCE.isEnabled( IntegrationType.InvTweaks );
}
}
@@ -26,6 +26,7 @@ import net.minecraft.entity.player.InventoryPlayer;
import appeng.api.config.FuzzyMode;
import appeng.api.config.RedstoneMode;
import appeng.api.config.SchedulingMode;
import appeng.api.config.Settings;
import appeng.api.config.Upgrades;
import appeng.api.config.YesNo;
@@ -36,6 +37,7 @@ import appeng.container.implementations.ContainerUpgradeable;
import appeng.core.localization.GuiText;
import appeng.core.sync.network.NetworkHandler;
import appeng.core.sync.packets.PacketConfigButton;
import appeng.parts.automation.PartExportBus;
import appeng.parts.automation.PartImportBus;
@@ -48,6 +50,7 @@ public class GuiUpgradeable extends AEBaseGui
GuiImgButton redstoneMode;
GuiImgButton fuzzyMode;
GuiImgButton craftMode;
GuiImgButton schedulingMode;
public GuiUpgradeable( InventoryPlayer inventoryPlayer, IUpgradeableHost te )
{
@@ -81,10 +84,12 @@ public class GuiUpgradeable extends AEBaseGui
this.redstoneMode = new GuiImgButton( this.guiLeft - 18, this.guiTop + 8, Settings.REDSTONE_CONTROLLED, RedstoneMode.IGNORE );
this.fuzzyMode = new GuiImgButton( this.guiLeft - 18, this.guiTop + 28, Settings.FUZZY_MODE, FuzzyMode.IGNORE_ALL );
this.craftMode = new GuiImgButton( this.guiLeft - 18, this.guiTop + 48, Settings.CRAFT_ONLY, YesNo.NO );
this.schedulingMode = new GuiImgButton( this.guiLeft - 18, this.guiTop + 68, Settings.SCHEDULING_MODE, SchedulingMode.DEFAULT );
this.buttonList.add( this.craftMode );
this.buttonList.add( this.redstoneMode );
this.buttonList.add( this.fuzzyMode );
this.buttonList.add( this.schedulingMode );
}
@Override
@@ -107,6 +112,11 @@ public class GuiUpgradeable extends AEBaseGui
{
this.craftMode.set( this.cvb.cMode );
}
if( this.schedulingMode != null )
{
this.schedulingMode.set( this.cvb.schedulingMode );
}
}
@Override
@@ -140,6 +150,10 @@ public class GuiUpgradeable extends AEBaseGui
{
this.craftMode.setVisibility( this.bc.getInstalledUpgrades( Upgrades.CRAFTING ) > 0 );
}
if( this.schedulingMode != null )
{
this.schedulingMode.setVisibility(this.bc.getInstalledUpgrades( Upgrades.CAPACITY ) > 0 && this.bc instanceof PartExportBus );
}
}
protected String getBackground()
@@ -178,5 +192,10 @@ public class GuiUpgradeable extends AEBaseGui
{
NetworkHandler.instance.sendToServer( new PacketConfigButton( this.fuzzyMode.getSetting(), backwards ) );
}
if( btn == this.schedulingMode )
{
NetworkHandler.instance.sendToServer( new PacketConfigButton( this.schedulingMode.getSetting(), backwards ) );
}
}
}
@@ -39,6 +39,7 @@ import appeng.api.config.OperationMode;
import appeng.api.config.PowerUnits;
import appeng.api.config.RedstoneMode;
import appeng.api.config.RelativeDirection;
import appeng.api.config.SchedulingMode;
import appeng.api.config.SearchBoxMode;
import appeng.api.config.Settings;
import appeng.api.config.SortDir;
@@ -158,6 +159,10 @@ public class GuiImgButton extends GuiButton implements ITooltip
this.registerApp( 16 * 14, Settings.PLACE_BLOCK, YesNo.YES, ButtonToolTips.BlockPlacement, ButtonToolTips.BlockPlacementYes );
this.registerApp( 16 * 14 + 1, Settings.PLACE_BLOCK, YesNo.NO, ButtonToolTips.BlockPlacement, ButtonToolTips.BlockPlacementNo );
this.registerApp( 16 * 15, Settings.SCHEDULING_MODE, SchedulingMode.DEFAULT, ButtonToolTips.SchedulingMode, ButtonToolTips.SchedulingModeDefault );
this.registerApp( 16 * 15 + 1, Settings.SCHEDULING_MODE, SchedulingMode.ROUNDROBIN, ButtonToolTips.SchedulingMode, ButtonToolTips.SchedulingModeRoundRobin );
this.registerApp( 16 * 15 + 2, Settings.SCHEDULING_MODE, SchedulingMode.RANDOM, ButtonToolTips.SchedulingMode, ButtonToolTips.SchedulingModeRandom );
}
}
@@ -389,7 +394,6 @@ public class GuiImgButton extends GuiButton implements ITooltip
}
}
private static class ButtonAppearance
{
public int index;
@@ -1,6 +1,6 @@
/*
* This file is part of Applied Energistics 2.
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
* Copyright (c) 2013 - 2015, AlgorithmX2, All rights reserved.
*
* Applied Energistics 2 is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -28,17 +28,17 @@ public class GuiNumberBox extends GuiTextField
final Class type;
public GuiNumberBox( FontRenderer p_i1032_1_, int p_i1032_2_, int p_i1032_3_, int p_i1032_4_, int p_i1032_5_, Class type )
public GuiNumberBox( FontRenderer fontRenderer, int x, int y, int width, int height, Class type )
{
super( p_i1032_1_, p_i1032_2_, p_i1032_3_, p_i1032_4_, p_i1032_5_ );
super( fontRenderer, x, y, width, height );
this.type = type;
}
@Override
public void writeText( String p_146191_1_ )
public void writeText( String selectedText )
{
String original = this.getText();
super.writeText( p_146191_1_ );
super.writeText( selectedText );
try
{
@@ -38,20 +38,20 @@ public class GuiProgressBar extends GuiButton implements ITooltip
private final String titleName;
private String fullMsg;
public GuiProgressBar( IProgressProvider source, String texture, int posX, int posY, int u, int y, int _width, int _height, Direction dir )
public GuiProgressBar( IProgressProvider source, String texture, int posX, int posY, int u, int y, int width, int height, Direction dir )
{
this( source, texture, posX, posY, u, y, _width, _height, dir, null );
this( source, texture, posX, posY, u, y, width, height, dir, null );
}
public GuiProgressBar( IProgressProvider source, String texture, int posX, int posY, int u, int y, int _width, int _height, Direction dir, String title )
public GuiProgressBar( IProgressProvider source, String texture, int posX, int posY, int u, int y, int width, int height, Direction dir, String title )
{
super( posX, posY, _width, "" );
super( posX, posY, width, "" );
this.source = source;
this.xPosition = posX;
this.yPosition = posY;
this.texture = new ResourceLocation( "appliedenergistics2", "textures/" + texture );
this.width = _width;
this.height = _height;
this.width = width;
this.height = height;
this.fill_u = u;
this.fill_v = y;
this.layout = dir;
@@ -56,11 +56,11 @@ public class GuiTabButton extends GuiButton implements ITooltip
/**
* Using itemstack as an icon
*
* @param x x pos of button
* @param y y pos of button
* @param ico used icon
* @param x x pos of button
* @param y y pos of button
* @param ico used icon
* @param message mouse over message
* @param ir renderer
* @param ir renderer
*/
public GuiTabButton( int x, int y, ItemStack ico, String message, RenderItem ir )
{
@@ -45,10 +45,10 @@ public class MEGuiTextField extends GuiTextField
* Pays attention to the '_' caret.
*
* @param fontRenderer renderer for the strings
* @param xPos absolute left position
* @param yPos absolute top position
* @param width absolute width
* @param height absolute height
* @param xPos absolute left position
* @param yPos absolute top position
* @param width absolute width
* @param height absolute height
*/
public MEGuiTextField( FontRenderer fontRenderer, int xPos, int yPos, int width, int height )
{
+1 -1
View File
@@ -200,7 +200,7 @@ public class ItemRepo
{
for( Object lp : Platform.getTooltip( is ) )
{
if( lp instanceof String && m.matcher( (String) lp ).find() )
if( lp instanceof String && m.matcher( (CharSequence) lp ).find() )
{
this.view.add( is );
notDone = false;
@@ -21,12 +21,12 @@ package appeng.client.render;
import java.nio.FloatBuffer;
import java.util.EnumSet;
import javax.annotation.Nullable;
import org.lwjgl.BufferUtils;
import org.lwjgl.opengl.GL11;
import net.minecraft.block.Block;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.client.renderer.RenderHelper;
@@ -46,7 +46,6 @@ import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import appeng.api.util.IOrientable;
import appeng.api.util.IOrientableBlock;
import appeng.block.AEBaseBlock;
import appeng.client.texture.ExtraBlockTextures;
import appeng.tile.AEBaseTile;
@@ -54,7 +53,7 @@ import appeng.util.Platform;
@SideOnly( Side.CLIENT )
public class BaseBlockRender
public class BaseBlockRender<B extends AEBaseBlock, T extends AEBaseTile>
{
private static final int ORIENTATION_BITS = 7;
private static final int FLIP_H_BIT = 8;
@@ -70,10 +69,10 @@ public class BaseBlockRender
this( false, 20 );
}
public BaseBlockRender( boolean enableTESR, double tileEntitySpecialRendererRange )
public BaseBlockRender( boolean enableTESR, double renderDistance )
{
this.hasTESR = enableTESR;
this.renderDistance = tileEntitySpecialRendererRange;
this.renderDistance = renderDistance;
setOriMap();
}
@@ -281,7 +280,7 @@ public class BaseBlockRender
return this.renderDistance;
}
public void renderInventory( AEBaseBlock block, ItemStack item, RenderBlocks renderer, ItemRenderType type, Object[] data )
public void renderInventory( B block, ItemStack item, RenderBlocks renderer, ItemRenderType type, Object[] data )
{
Tessellator tess = Tessellator.instance;
@@ -329,7 +328,7 @@ public class BaseBlockRender
return ORIENTATION_MAP[a][b][c];
}
public void renderInvBlock( EnumSet<ForgeDirection> sides, AEBaseBlock block, ItemStack item, Tessellator tess, int color, RenderBlocks renderer )
public void renderInvBlock( EnumSet<ForgeDirection> sides, B block, ItemStack item, Tessellator tess, int color, RenderBlocks renderer )
{
int meta = 0;
if( block != null && block.hasSubtypes() && item != null )
@@ -404,7 +403,7 @@ public class BaseBlockRender
return ExtraBlockTextures.getMissing();
}
public boolean renderInWorld( AEBaseBlock block, IBlockAccess world, int x, int y, int z, RenderBlocks renderer )
public boolean renderInWorld( B block, IBlockAccess world, int x, int y, int z, RenderBlocks renderer )
{
this.preRenderInWorld( block, world, x, y, z, renderer );
@@ -414,7 +413,7 @@ public class BaseBlockRender
return o;
}
public void preRenderInWorld( AEBaseBlock block, IBlockAccess world, int x, int y, int z, RenderBlocks renderer )
public void preRenderInWorld( B block, IBlockAccess world, int x, int y, int z, RenderBlocks renderer )
{
ForgeDirection forward = ForgeDirection.SOUTH;
ForgeDirection up = ForgeDirection.UP;
@@ -443,17 +442,9 @@ public class BaseBlockRender
}
@Nullable
public IOrientable getOrientable( AEBaseBlock block, IBlockAccess w, int x, int y, int z )
public IOrientable getOrientable( B block, IBlockAccess w, int x, int y, int z )
{
if( block.hasBlockTileEntity() )
{
return (AEBaseTile) block.getTileEntity( w, x, y, z );
}
else if( block instanceof IOrientableBlock )
{
return ( (IOrientableBlock) block ).getOrientable( w, x, y, z );
}
return null;
return block.getOrientable( w, x, y, z );
}
protected void setInvRenderBounds( RenderBlocks renderer, int i, int j, int k, int l, int m, int n )
@@ -511,7 +502,7 @@ public class BaseBlockRender
}
@SideOnly( Side.CLIENT )
protected void renderCutoutFace( Block block, IIcon ico, int x, int y, int z, RenderBlocks renderer, ForgeDirection orientation, float edgeThickness )
protected void renderCutoutFace( B block, IIcon ico, int x, int y, int z, RenderBlocks renderer, ForgeDirection orientation, float edgeThickness )
{
Tessellator tess = Tessellator.instance;
@@ -623,7 +614,7 @@ public class BaseBlockRender
}
@SideOnly( Side.CLIENT )
protected void renderFace( int x, int y, int z, Block block, IIcon ico, RenderBlocks renderer, ForgeDirection orientation )
protected void renderFace( int x, int y, int z, B block, IIcon ico, RenderBlocks renderer, ForgeDirection orientation )
{
switch( orientation )
{
@@ -688,7 +679,7 @@ public class BaseBlockRender
return ( 16.0 - uv ) / 16.0;
}
public void renderTile( AEBaseBlock block, AEBaseTile tile, Tessellator tess, double x, double y, double z, float f, RenderBlocks renderer )
public void renderTile( B block, T tile, Tessellator tess, double x, double y, double z, float f, RenderBlocks renderer )
{
ForgeDirection forward = ForgeDirection.SOUTH;
ForgeDirection up = ForgeDirection.UP;
@@ -763,7 +754,6 @@ public class BaseBlockRender
GL11.glTranslated( x + 0.5, y + 0.5, z + 0.5 );
GL11.glMultMatrix( this.rotMat );
GL11.glTranslated( -0.5, -0.5, -0.5 );
GL11.glCullFace( GL11.GL_FRONT );
}
else
{
@@ -49,31 +49,31 @@ public class BlockRenderInfo
this.rendererInstance = inst;
}
public void updateIcons( FlippableIcon Bottom, FlippableIcon Top, FlippableIcon North, FlippableIcon South, FlippableIcon East, FlippableIcon West )
public void updateIcons( FlippableIcon bottom, FlippableIcon top, FlippableIcon north, FlippableIcon south, FlippableIcon east, FlippableIcon west )
{
this.topIcon = Top;
this.bottomIcon = Bottom;
this.southIcon = South;
this.northIcon = North;
this.eastIcon = East;
this.westIcon = West;
this.topIcon = top;
this.bottomIcon = bottom;
this.southIcon = south;
this.northIcon = north;
this.eastIcon = east;
this.westIcon = west;
}
public void setTemporaryRenderIcon( IIcon IIcon )
public void setTemporaryRenderIcon( IIcon icon )
{
if( IIcon == null )
if( icon == null )
{
this.useTmp = false;
}
else
{
this.useTmp = true;
this.tmpTopIcon.setOriginal( IIcon );
this.tmpBottomIcon.setOriginal( IIcon );
this.tmpSouthIcon.setOriginal( IIcon );
this.tmpNorthIcon.setOriginal( IIcon );
this.tmpEastIcon.setOriginal( IIcon );
this.tmpWestIcon.setOriginal( IIcon );
this.tmpTopIcon.setOriginal( icon );
this.tmpBottomIcon.setOriginal( icon );
this.tmpSouthIcon.setOriginal( icon );
this.tmpNorthIcon.setOriginal( icon );
this.tmpEastIcon.setOriginal( icon );
this.tmpWestIcon.setOriginal( icon );
}
}
@@ -1,6 +1,6 @@
/*
* This file is part of Applied Energistics 2.
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
* Copyright (c) 2013 - 2015, AlgorithmX2, All rights reserved.
*
* Applied Energistics 2 is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -20,8 +20,12 @@ package appeng.client.render;
import java.util.EnumSet;
import javax.annotation.Nullable;
import com.google.common.base.Function;
import com.google.common.base.Optional;
import net.minecraft.block.Block;
import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.client.renderer.Tessellator;
@@ -31,9 +35,6 @@ import net.minecraftforge.common.util.ForgeDirection;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import com.google.common.base.Function;
import com.google.common.base.Optional;
import appeng.api.AEApi;
import appeng.api.exceptions.MissingDefinition;
import appeng.api.parts.IBoxProvider;
@@ -44,6 +45,7 @@ import appeng.block.AEBaseBlock;
import appeng.block.networking.BlockCableBus;
import appeng.core.AEConfig;
import appeng.core.features.AEFeature;
import appeng.tile.AEBaseTile;
@SideOnly( Side.CLIENT )
@@ -75,7 +77,7 @@ public final class BusRenderHelper implements IPartRenderHelper
{
this.bbc = new BoundBoxCalculator( this );
this.noAlphaPass = !AEConfig.instance.isFeatureEnabled( AEFeature.AlphaPass );
this.bbr = new BaseBlockRender();
this.bbr = new BaseBlockRender<AEBaseBlock, AEBaseTile>();
this.renderingForPass = 0;
this.currentPass = 0;
this.itemsRendered = 0;
@@ -230,7 +232,6 @@ public final class BusRenderHelper implements IPartRenderHelper
}
}
private static final class BaseBlockTransformFunction implements Function<Block, AEBaseBlock>
{
@Nullable
@@ -239,7 +240,7 @@ public final class BusRenderHelper implements IPartRenderHelper
{
if( input instanceof AEBaseBlock )
{
return ( (AEBaseBlock) input );
return( (AEBaseBlock) input );
}
return null;
@@ -374,16 +375,16 @@ public final class BusRenderHelper implements IPartRenderHelper
}
@Override
public void setTexture( IIcon Down, IIcon Up, IIcon North, IIcon South, IIcon West, IIcon East )
public void setTexture( IIcon down, IIcon up, IIcon north, IIcon south, IIcon west, IIcon east )
{
IIcon[] list = new IIcon[6];
list[0] = Down;
list[1] = Up;
list[2] = North;
list[3] = South;
list[4] = West;
list[5] = East;
list[0] = down;
list[1] = up;
list[2] = north;
list[3] = south;
list[4] = west;
list[5] = east;
for( AEBaseBlock baseBlock : this.maybeBaseBlock.asSet() )
{
@@ -456,10 +457,10 @@ public final class BusRenderHelper implements IPartRenderHelper
}
@Override
public void renderInventoryFace( IIcon IIcon, ForgeDirection face, RenderBlocks renderer )
public void renderInventoryFace( IIcon icon, ForgeDirection face, RenderBlocks renderer )
{
renderer.setRenderBounds( this.minX / 16.0, this.minY / 16.0, this.minZ / 16.0, this.maxX / 16.0, this.maxY / 16.0, this.maxZ / 16.0 );
this.setTexture( IIcon );
this.setTexture( icon );
for( AEBaseBlock baseBlock : this.maybeBaseBlock.asSet() )
{
@@ -568,7 +569,7 @@ public final class BusRenderHelper implements IPartRenderHelper
break;
}
for( Block block : this.maybeBlock.asSet() )
for( AEBaseBlock block : this.maybeBaseBlock.asSet() )
{
this.bbr.renderCutoutFace( block, ico, x, y, z, renderer, face, edgeThickness );
}
@@ -609,7 +610,7 @@ public final class BusRenderHelper implements IPartRenderHelper
break;
}
for( Block block : this.maybeBlock.asSet() )
for( AEBaseBlock block : this.maybeBaseBlock.asSet() )
{
this.bbr.renderFace( x, y, z, block, ico, renderer, face );
}
@@ -1,6 +1,6 @@
/*
* This file is part of Applied Energistics 2.
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
* Copyright (c) 2013 - 2015, AlgorithmX2, All rights reserved.
*
* Applied Energistics 2 is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -21,6 +21,7 @@ package appeng.client.render;
import java.util.HashMap;
import java.util.Map;
import javax.annotation.Nullable;
import org.lwjgl.opengl.GL11;
@@ -164,6 +165,7 @@ public class BusRenderer implements IItemRenderer
GL11.glPopMatrix();
}
@Nullable
public IPart getRenderer( ItemStack is, IPartItem c )
{
int id = ( Item.getIdFromItem( is.getItem() ) << Platform.DEF_OFFSET ) | is.getItemDamage();

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