Compare commits

...

515 Commits

Author SHA1 Message Date
Salomão d58a5f0307 fix advancements 2021-04-01 02:13:11 -03:00
Salomão 4c4214754a Merge branch 'fastutils' into AE2-Omnifactory 2021-03-31 21:09:03 -03:00
Salomão 011b3a4b94 backport 0bdc408e950fe787277d1e48be61ebf928127429 2021-03-31 20:53:26 -03:00
Salomão ca7ce33f34 testes 2021-03-31 18:14:16 -03:00
PrototypeTrousers c3b1dea7c5 better level emitting 2021-03-31 17:34:43 -03:00
Salomão 40ec517480 level emitters cache rework 2021-03-30 23:05:15 -03:00
Salomão 2fdc16d3a8 Merge remote-tracking branch 'ALongStringOfNumbers/recipeConditions' into AE2-Omnifactory 2021-03-30 21:58:46 -03:00
Salomão 053485a95a another try at fixing level emitters 2021-03-30 21:57:53 -03:00
ALongStringOfNumbers e910af7734 Fix advancements to check if their parent item is enabled to prevent more logging 2021-03-30 15:36:25 -07:00
Salomão 59d7bd6c16 JEI recipe transfer fixes
re-checks the amount of items in the recipe
only do fuzzy search for damageable items
2021-03-29 21:20:46 -03:00
Salomão 1a11462ddd can now drag encoded patterns on the interface terminal 2021-03-29 01:53:59 -03:00
Salomão 77d615559f Add proper button and tooltips to interface terminal 2021-03-28 16:20:37 -03:00
ALongStringOfNumbers 6878bfa4b0 Fix parts 2021-03-27 01:26:29 -07:00
ALongStringOfNumbers f1d50eca1a More minor fixes 2021-03-26 22:10:24 -07:00
ALongStringOfNumbers 4ee32dd0b0 Fix some recipes not showing up due to bad conditions 2021-03-26 21:48:03 -07:00
ALongStringOfNumbers 66e589324a Make recipes and advancements conditional
Fix crash when fluix was disabled
2021-03-26 19:12:49 -07:00
Salomão 362b001cb4 level emitter dying fix 2021-03-25 22:48:42 -03:00
Salomão b6fd4b3c0f changed priority of JEI items on the 2021-03-23 22:23:58 -03:00
Salomão e364603a5a Changed level emitters to update only once when they tick 2021-03-17 21:35:26 -03:00
Salomão c58bebc346 Fix gregtech tileentities showing up as unnamed or draconium lens 2021-03-07 23:59:39 -03:00
Salomão 97f11f0c61 Fix storage drawers showing up as nothing on interface terminal 2021-03-07 23:56:52 -03:00
Salomão 5c2fa72f95 mix pattern terminal multiplying items above maxitemstack size 2021-03-07 00:01:01 -03:00
Salomão ebd8501301 fix inaccessible items setting in storage bus not being respected 2021-03-07 00:00:16 -03:00
Salomão fa07247bd7 Revert "also shrink the fluid skiplist if the tanks change sizes"
This reverts commit 892c919ee2.
2021-03-04 23:08:08 -03:00
Salomão 95d25ddf47 Revert "Skip un-extractable slots."
This reverts commit e2e6f6e83f.
2021-03-04 23:07:58 -03:00
Salomão 7a45e1faf4 Revert "rebuild skipslotlist if the the inventory grows or shrinks"
This reverts commit 7796c6d4b6.
2021-03-04 23:07:34 -03:00
Salomão 1f88494832 fix not being able to swap patterns on interface terminal 2021-03-03 09:57:02 -03:00
PrototypeTrousers c629b4e0cf Merge pull request #4 from Theisyat/AE2-Omnifactory
Fixed 'Only show Empty' in Interface Terminal
2021-03-02 19:56:16 -03:00
PrototypeTrousers 65ca607134 Merge branch 'AE2-Omnifactory' into AE2-Omnifactory 2021-03-02 19:55:52 -03:00
Salomão 898c07ca01 fix toggling full interfaces hiding all interfaces 2021-03-02 18:45:14 -03:00
Theisyat 883c267aa8 Fixed Interface Terminal and Added Stuff
Fixed 'Hide Full' Button

First Free Molecular Assembler Button

Added Button in Interface Terminal, which Searches for 'Molecular
Assembler' and sets the Interface Terminal to only show Assemblers with
free Slots.
2021-03-02 07:00:48 +01:00
Salomão 22cf913708 highlight interfaces from interface terminal. 2021-02-28 21:32:11 -03:00
Salomão b4ba1af1ec bind BlockPos of the interface on the list 2021-02-28 02:03:00 -03:00
Salomão 892c919ee2 also shrink the fluid skiplist if the tanks change sizes 2021-02-24 18:08:57 -03:00
Salomão a65b3d2ceb fix interface terminal GUI 2021-02-24 13:24:04 -03:00
Salomão c826a3e24f Add second search bar to Interface Terminal 2021-02-23 20:48:45 -03:00
Salomão fc98505f22 even more JEI integration
get ingredient from the crafting calculation GUIs
2021-02-22 22:33:05 -03:00
Salomão ea54ccbcf5 More JEI integration 2021-02-22 18:35:46 -03:00
Salomão 7796c6d4b6 rebuild skipslotlist if the the inventory grows or shrinks 2021-02-22 14:33:06 -03:00
Salomão e2e6f6e83f Skip un-extractable slots. 2021-02-21 23:08:16 -03:00
Salomão a7a1a87cd8 Holding SHIFT with an empty hand will increase the amount of items set
on interfaces and on pattern terminal
2021-02-21 20:26:52 -03:00
Salomão e50eb7965f undo monitor ticking limit 2021-02-21 03:24:03 -03:00
Salomão d25a8a53a2 fix IItemRepository insert and extraction 2021-02-21 02:24:50 -03:00
Salomão 92b48f01a2 do not use java equals to compare stacks 2021-02-20 21:18:20 -03:00
Salomão 42f0d37c44 Merge branch 'IItemRepository' into AE2-Omnifactory 2021-02-18 23:26:49 -03:00
Salomão 088a1827be implement IItemRepository 2021-02-18 18:33:06 -03:00
Salomão 6a21968dab add storagedrawers to the gradle deps 2021-02-17 12:30:07 -03:00
Salomão 7c5ff5322a Fix JEI transfer fix. Typo correction. 2021-02-16 16:47:22 -03:00
Salomão 7834028459 Rebuild itemlist only once per tick
re-enabled level-emitters update
2021-02-15 15:41:48 -03:00
Salomão c43cbbef43 Switched JEI search to crafting terminal to fuzzy mode 2021-02-14 02:14:15 -03:00
Salomão ead6274ca4 FIX JEI transfer not working correctly
Missing on the crafting terminal
2021-02-13 21:48:37 -03:00
Salomão f1c41bab3f Implement MouseTweaks API
can now set item quantities in pattern terminal and interfaces by right clicking with the same configured item
2021-02-12 20:26:21 -03:00
Salomão 12e74dc0de Merge remote-tracking branch 'origin/AE2-Omnifactory' into AE2-Omnifactory 2021-02-11 23:07:43 -03:00
Salomão c10088d907 Fill pattern with items from JEI
Just Enough Energistics overrides this
2021-02-11 23:07:26 -03:00
PrototypeTrousers a12d29c4a0 Update README.md 2021-02-09 18:58:08 -03:00
PrototypeTrousers 2227510acf Update README.md 2021-02-09 18:55:22 -03:00
Salomão 97ae7e1f14 encoded patterns now stack up to 64 2021-02-08 22:14:37 -03:00
Salomão fc119070b2 Actually copy level emitters set values 2021-01-15 17:41:40 -03:00
Salomão 82e3a95f11 fix memory card not saving fluids an level emitters 2021-01-12 18:24:05 -03:00
Salomão e6998913e1 remove forced level emitters update
remove unneeded itemStack creation.
2021-01-04 14:18:07 -03:00
Salomão a3e69ce608 add hardcoded id range for molds and shapes for GTCE blocking mode 2020-12-08 22:42:04 -03:00
Salomão ceef176a2a remove time-based thread syncinc 2020-12-01 17:26:42 -03:00
Salomão c2e2696707 Fix fuzzy search for items that have metadata > maxdamage 2020-12-01 17:25:52 -03:00
Salomão 4d6c61dfcb backport e82093eec9459be3211564a83166455150c51259 2020-11-23 00:45:49 -03:00
Salomão 932141cc9e backport b7ca98d1e24e5797a8e42ca861ae4187ab5839ec 2020-11-23 00:45:49 -03:00
Salomão adf59774d4 Remove uneeded Forge Event Firing
improves crafting calculation performance
2020-11-18 20:22:40 -03:00
Salomão 9c6668b0f7 disable "smart" button
wasn't so smart
2020-11-13 17:42:41 -03:00
Salomão 1b7f11a12e buttons work and set quantities properly 2020-11-12 23:27:56 -03:00
Salomão 3cf4f9122c works..ish 2020-11-12 20:42:30 -03:00
Salomão d97996070a x2 button on the right place 2020-11-12 18:40:10 -03:00
Salomão 8a165bea09 ease punishment a bit 2020-10-28 19:50:57 -03:00
Salomão f707f95373 Revert "undo penalties"
This reverts commit d6499c16b0.
2020-10-28 19:49:23 -03:00
Salomão b2a660ec9b formating fixes 2020-10-28 17:50:40 -03:00
Salomão d6499c16b0 undo penalties 2020-10-28 16:59:51 -03:00
Salomão de3e0178a4 update forge and jei 2020-10-27 03:38:12 -03:00
Salomão 203522316c more tweaks testing 2020-10-25 18:57:42 -03:00
Salomão 719ea5090b move gtce blocking code out of generic item adaptor
fixes crash with ae2 fluid crafting
2020-10-25 01:04:48 -03:00
Salomão 00e19d67a2 Tune punishment 2020-10-23 21:39:36 -03:00
Salomão 169f6393d1 move penalty up the chain 2020-10-22 11:24:16 -03:00
Salomão 12bf337238 Re-do Blocking mode logic 2020-10-21 15:44:43 -03:00
Salomão 3b544c2486 Merge remote-tracking branch 'PrototypeTrousers/AE2-Omnifactory' into AE2-Omnifactory 2020-10-20 23:52:18 -03:00
Salomão 660e17d167 Merge remote-tracking branch 'talchas/on-upstream' into AE2-Omnifactory 2020-10-20 23:52:11 -03:00
Salomão b10246a67b Merge remote-tracking branch 'talchas/on-upstream' into AE2-Omnifactory 2020-10-20 23:04:44 -03:00
Salomão 74362bb543 Merge branch 'ae2-interface-export-bus-fixes' into AE2-Omnifactory 2020-10-20 23:02:53 -03:00
Salomão 81df58afa5 dont try to re-request craft immediately, if we cant craft it now 2020-10-20 23:01:09 -03:00
Salomão 535289e694 Change interface behavior
skip complete configured stacks
postpone crafting job start
2020-10-20 14:30:08 -03:00
yueh d730503378 Fixes #4388: Ensure correct ticking priority order (#4393) 2020-05-27 16:13:20 +02:00
yueh f3349b0a2d Fixes #4372: Limit validated itemstack to a size of 1 (#4373) 2020-05-07 11:49:00 +02:00
yueh f667e9a5f0 Reduce lock time 2020-04-25 18:28:33 +02:00
Hinara 2c0a2975de Fix #4114 (#4357) 2020-04-25 18:05:14 +02:00
yueh 2e3d6b721a Run daily after the initial cleanup is done 2020-03-30 11:00:43 +02:00
yueh 94e294f4e9 Remove redundant option 2020-03-27 21:28:55 +01:00
yueh 91620a0042 Handle issues and prs 2020-03-27 21:23:29 +01:00
yueh ffc79b5494 Run workflow hourly 2020-03-27 19:43:09 +01:00
yueh ce7c29d0ac Create lock.yml 2020-03-27 18:06:46 +01:00
talchas 5ac8db41e7 option for a blocking mode that actually works 2020-02-06 18:13:31 -08:00
yueh 6ece190ac4 Fixes #4127: Increase JEI box for grindstone recipes (#4270) 2020-01-30 10:06:14 +01:00
yueh 00a596ea8f Fixes #4268: Disabled JEI facade recipe when disabled. (#4269) 2020-01-30 09:35:45 +01:00
yueh 1fc1d5517d Fixes #4213: Prevent NPE when inserting via conversion monitor (#4265) 2020-01-26 13:36:06 +01:00
yueh d5fc7a5b21 Fixes #4256: Cache AESharedItemStack#hashCode() (#4257) 2020-01-16 13:22:42 +01:00
Rik Pronk 1f85d0f607 Fix CraftTweaker Grindstone second optional output (#4250)
Fixes an issue where the CraftTweaker Grindstone integration registered the second optional output as first optional output
2020-01-16 10:57:18 +01:00
talchas dfe5b82bda Safer implementation of CraftingGridCache updatePatterns coalescing 2019-12-31 10:57:23 -08:00
talchas c7f8f4249e Avoid quadratic behavior from rebuilding the entire crafting cache for
each interface visited. Instead rebuild it at most once per tick, like
cpu clusters.

This is particularly important when channels are disabled, since in
that case even adding a cable visits every grid node.
2019-12-31 10:57:23 -08:00
ruifung 5efa6d6251 Update API JavaDocs for clarification (#4180)
* Fix javadoc for IGridBlock.getMachineRepresentation()

Javadoc should state proper semantics for that method, and telling people to return null there is a sure crash. #4178

* Update IPart interface javadoc.

Update the javadoc to state that functional parts should not be allowed to be placed on dense cables.
2019-12-19 10:18:27 +01:00
Andrew Motz 4269a66a4b Fix Typos in README.md (#4183)
"Summery" to "Summary"
2019-12-19 10:16:59 +01:00
Chan, Danny df2a7c1858 Add "cullface" into charged_quartz_ore.json (#4108) 2019-08-07 10:08:05 +02:00
yueh c483bd17f5 Fixes #4089: Render cable core on straight lines of different types. (#4103) 2019-07-23 21:12:17 +02:00
yueh 92536fceb4 Fixes #4090 Portable cell incorrect empty itemstack handling (#4093) 2019-07-23 20:13:15 +02:00
yueh ded71cb2bd Fixes #4062: Rounding error due to float precision. (#4064) 2019-06-20 10:47:28 +02:00
yueh 41a4518c5b Fixes #4005: Persist cell after cleanup. (#4009) 2019-04-21 22:30:45 +02:00
yueh 87643094c3 Fixes #3925: Incorrect API JavaDoc (#4008)
`IGridBlock#getMachineRepresentation()` must be non null.
2019-04-21 22:30:35 +02:00
yueh 8a4c9b58e6 Fixes #3911: Incorrectly used string format. (#4007) 2019-04-21 22:30:21 +02:00
InterPlay 5436e6bf08 Added support for fluids in pt-BR lang file (#3904) 2019-04-21 13:20:57 +02:00
yueh 078112d97b Disable modmaven due to build issues for now (#4011) 2019-04-21 13:10:02 +02:00
yueh 46355a4e9b Fixes #3899: Put fluid interface into configured mode when needed. (#3903) 2019-01-15 12:52:12 +01:00
yueh eb389971a3 Fixes #3901: Ensure fluid terminal respects reported stacksizes. (#3902) 2019-01-15 12:52:00 +01:00
yueh a38ebf7c4d Fixes #3886: Initialise sleeping import bus in pulse mode. (#3887) 2018-12-26 23:28:17 +01:00
yueh dfcba264f3 Fixes #3880: Incorrect compare with empty itemstack. (#3882) 2018-12-25 21:21:19 +01:00
yueh d343ac47f5 Added CTM as actual soft dependency. (#3881) 2018-12-25 21:21:08 +01:00
yueh 05db930a4e Fixes #3821: Unconfigured level emitter now report all fluids. (#3875) 2018-12-24 14:44:40 +01:00
yueh 33bc0a6a3f Fixes #3776: Fixes dupe bug with cell upgrades. (#3874) 2018-12-24 14:11:45 +01:00
yueh f2f48a8d59 Fixes #3767: Fluid Annihilation plane too strict about leftover (#3872) 2018-12-23 23:33:15 +01:00
yueh 0f0af2349b Fixes #3866: Use blockstates to avoid the missing fluid block. (#3869) 2018-12-23 22:42:25 +01:00
yueh 32a4fcab77 Fixes #3768: Damageable items with nbt and without damage could crash. (#3867) 2018-12-23 22:42:09 +01:00
yueh a847a01d8a Feature #3832: Made onRequestChange() less ambiguous (#3833) 2018-12-23 22:41:52 +01:00
yueh ed643787df Updated gradle scripts (#3871)
Includes #3819
2018-12-23 22:41:11 +01:00
covers1624 524b26d2a2 Implement caching for facade item models. 2018-12-19 12:46:43 +01:00
covers1624 184b1f8efb Guard against models providing quads with null orientations. 2018-12-19 12:46:43 +01:00
E. Kim 06cca13087 Update ko_kr.lang (#3674) 2018-11-17 10:31:29 +01:00
徐晨曦 8e735e72ff Update zh_cn.lang (#3570) 2018-11-17 10:31:01 +01:00
yueh d3dd137570 Fixes #3817: Missing 1k Crafting Storage and Monitor from Network Status (#3818) 2018-11-11 13:11:45 +01:00
yueh 78e1126c38 Fixes #3814: IO Port no longer put to sleep on load when having work. (#3816) 2018-11-11 11:52:13 +01:00
yueh ebe3ff045d Fixes #3811: Display crafting unit as themself in the network monitor. (#3815) 2018-11-11 11:52:03 +01:00
yueh 6291a545c3 Fixes #3793: Limit filling fluid inventories to their max capacity. (#3794) 2018-10-21 11:18:02 +02:00
yueh 99fd5a9d53 Fixes #3790: Correctly handle fluids with NBT data. (#3791) 2018-10-21 11:17:27 +02:00
yueh 416c7d2683 Input P2P tunnels can now be assigned a new frequency. (#3765)
Shift right clicking an existing tunnel only allowed to copied the
stored frequency.

When shift right clicking now and the stored frequency being the same as
already stored one, it will now create a new one and save it to the memory
card. In other words doubling clicking will reset now, otherwise the old
behaviour is still kept.
2018-10-21 11:17:01 +02:00
yueh 0c88d1e7ee Fixes #3746: Revert OreDict use for cable anchors. Blame Forge for crashes. (#3764) 2018-10-06 00:02:41 +02:00
fscan d88f550eb0 Switch to new IItemHandler (#3669) 2018-10-04 20:39:06 +02:00
yueh e21c59b326 Fixes #3146: Prevent crash when GlassState is missing. (#3758) 2018-10-04 19:33:10 +02:00
yueh d8af8d26be Updated to new Forge RB (#3760) 2018-10-04 19:32:47 +02:00
yueh 02426bc101 Update bug_report.md
Fixed missing *
2018-10-02 17:38:22 +02:00
yueh 11f8471772 Updated issue templates
Updated bug report
Added feature request
2018-10-01 13:12:44 +02:00
yueh d35b720a16 Update issue templates (#3751) 2018-10-01 13:00:07 +02:00
mezz 7a5b84c10a Allow JEI to differentiate between different cable facades (#3750) 2018-10-01 11:18:38 +02:00
covers1624 800860d4e6 Fixes #3747: Fix issues with facade breaking textures. (#3748) 2018-10-01 11:12:38 +02:00
yueh ac81418684 Changed some fluid recipes to match their item variant. (#3744) 2018-09-28 18:25:05 +02:00
yueh 7daad58607 Fixes #3742: Do not use storableInStorageCell() to identify generic c… (#3743)
Annotated IStorageCell with Nonnull where appropriate.
2018-09-28 17:38:08 +02:00
yueh 038ca23523 Fixes #3688: Invalidate Storage Bus cache immediately upon missing TE. (#3737) 2018-09-28 17:36:58 +02:00
yueh 37d8833b95 Fixes #3708: Move knifes/wrenches to oredict as constants are unreliable (#3729) 2018-09-22 20:14:28 +02:00
yueh fdcba13369 Power off a network in case it losses its local buffer. (#3703)
This better indicates power issue with dynamic consumption like
extracting/inserting items into a network. E.g. the terminals will
shutdown, no light/channel/etc indicators.

Due to the networks trying to extract from the largest possible energy
storage first, the network buffer will be used as last option after
energy cells or controllers.

Potentially needs evaluation in case of adhoc networks with a high
transfer rate locally. Increasing the local buffer might be an idea or
have it scale with the amount of local gridnodes. As long as it does not
invalidates energy cells.
2018-09-02 14:00:15 +02:00
yueh b1ac0adfd8 Added a new facade config. (#3706)
The whitelist is now based on manually add explicit entries instead of
automatically adding every existing block. This alone should save a few
MB of RAM depending on the modpack size.

Additionally the FacadeConfig is no longer extending the normal
Configuration provided by Forge. It will only parse the file once per
start and store the settings in an optimised collection to further
reduce memory consumption.

Any full block without a TileEntity and having a model is whitelisted
automatically and does not need an explicit entry anymore.

By default vanilla and AE2 glass is added as they are no fullblocks
technically.

The whitelist technically allows many more blocks now. E.g. stairs,
slabs or even items like saplings. But with various rendering quality.

Further there is an option to allow facades based on TileEntities, this
is completely unsupported and can work or corrupt the whole save.
2018-09-02 13:59:18 +02:00
covers1624 7ba2893635 New facade system (#3702)
Completely new system to render facades.

It will now support many more cases compared to the old system.
For example connected textures are now possible, as well as multilayer models and so on.
2018-09-02 13:26:20 +02:00
fscan ed8baf8c15 Fix tooltip for vibration chamber (#3675) 2018-08-30 23:13:38 +02:00
yueh 758377ed5d Various code fixes (#3704)
Correctly close streams.
Avoid ArithmeticException in case of /0.
2018-08-30 23:12:35 +02:00
yueh a2091d10fe Code cleanup
Added missing this, annotations, etc.
2018-08-30 20:33:08 +02:00
yueh fed12cb99f Organise Imports 2018-08-30 20:32:01 +02:00
yueh 66c365d11f Code Formatting 2018-08-30 20:31:27 +02:00
yueh 044f4c9ed3 Added jacoco for coverage reports (#3700) 2018-08-30 20:09:36 +02:00
yueh 91a74813d9 Updated Travis CI caches (#3699) 2018-08-30 20:09:25 +02:00
yueh a0b645a0a7 Added SonarCloud integration (#3698)
Updated gradle wrapper to 4.8
2018-08-29 23:24:55 +02:00
fscan d439fb2915 Fix fluid parts item models (#3676) 2018-08-29 19:09:04 +02:00
yueh 7efd4d872f Readded forge as required dependency. (#3678)
Version will automatically be computed based on the release used to
build as well as the next major release being marked as exclusive upper
bound.
2018-08-29 19:08:46 +02:00
yueh 1b09760631 Followup #3646: Assemblers actually have to render in both layers. (#3662) 2018-08-05 13:11:36 +02:00
fscan 04daadceed Increase Vibration Chamber AE/t (#3635) 2018-08-01 00:27:19 +02:00
yueh 4d3df96350 Fixes #3646: Render assemblers in the correct layer. (#3658) 2018-08-01 00:26:28 +02:00
fscan d7e2ae8fcb Fix ConcurrentModificatonException in NetworkEventBus (#3654)
Fixes #3653
2018-08-01 00:20:47 +02:00
fscan 73f471e685 Make search box toggle key configurable (#3650)
Fixes #3641
2018-08-01 00:20:17 +02:00
fscan 390ad875ee Fix Platform#postChanges to check all registered channels (#3644) 2018-08-01 00:19:49 +02:00
fscan e5f43bf315 Allow ME Chest to work with any cell (#3640) 2018-08-01 00:17:43 +02:00
fscan 8a72ebca89 check if actually added before removing (#3639)
Fixes #3634
2018-08-01 00:17:10 +02:00
fscan ad1eff2adb Condensor improvements (#3636) 2018-08-01 00:15:30 +02:00
fscan 9e252df8d9 Fix dupe bug with shulker box (#3633)
Fixes #3632
2018-08-01 00:13:58 +02:00
yueh 67584083c6 Fixes #3630: Formation planes not respecting the entity limit. (#3631) 2018-08-01 00:13:20 +02:00
fscan c1c7e94cf6 Generic ICellInventoryHandler (#3624)
Allows addons who register a custom IStorageChannel to use the IStorageCell interface without registering a cell handler. Also adds some helpers (poweredInsert/poweredExtract).
This breaks API!
2018-07-22 19:20:47 +02:00
fscan 85dec35366 Fix buckets in vibration chamber (#3626) 2018-07-20 21:51:05 +02:00
yueh d5372a5ff6 Added fingerprint 2018-07-14 21:48:52 +02:00
fscan c8eb792d38 Move some blocks to their own feature category and add some comments (#3618)
Start of a bigger cleanup happening in 1.13 to fix the worst issues.
2018-07-14 21:25:06 +02:00
fscan f4ef7edf86 InventoryTweak sorting support (#3603) 2018-07-14 21:07:00 +02:00
fscan 67c733b418 Cutting knife fixes (#3619)
Fixes #3226
2018-07-14 21:03:27 +02:00
yueh fe4db2eb98 Added a color code to the memory card. (#3609)
Can be used to encode the stored content as a 4x2 grid of AEColors
Currently used to indicate the P2P frequency.
2018-07-14 19:42:56 +02:00
fscan 2891014cf6 P2P tunnel frequency color indicators (#3610) 2018-07-14 17:05:07 +02:00
fscan e809c688df Performance improvements for saveChanges() and ICellInventory (#3586)
API break!
Fixes #3553
2018-07-14 16:53:49 +02:00
fscan 71a9bb2532 Change storage/conversion monitor interaction. (#3613)
Fixes #1480
2018-07-14 16:40:20 +02:00
fscan 3363acb7db Follow forges registration guidelines for entities and oredict. Remove ore camouflage (#3605) 2018-07-14 16:37:50 +02:00
fscan 8f6f35b9cf Cache current task in Inscriber, reduce amount of GL calls in TESR (#3604) 2018-07-14 16:35:56 +02:00
fscan ff75f34333 Fix shift-double click behavior (#3606) 2018-07-14 16:33:48 +02:00
fscan e2c0129037 Restore behaviour of ESCAPE always closing the GUI (#3601) 2018-07-14 16:32:21 +02:00
Brock 7fe7f4b1c2 Fixed unnecessary cell saving when cell is full (#3611) 2018-07-14 16:30:33 +02:00
yueh 693487504c Updated README.me 2018-07-11 19:23:00 +02:00
fscan 883d9ba49b Add alternative spelling of aluminium (#3573) 2018-07-08 20:27:12 +02:00
yueh fe8d824526 Updated plane textures (#3598)
New Fluid Annihilation/Formation Plane textures.
Updated Annihilation Plane texture for a more noticable animation.
2018-07-08 18:21:16 +02:00
fscan d2250b115f Fix poweredExtract/Insert and add simulate mode (#3597)
Fixes #3595
2018-07-08 18:16:29 +02:00
fscan e5ab9df086 Add Fluid Formation/Annihilation Planes (#3591)
Fixes #3572
2018-07-08 16:54:22 +02:00
yueh 96af371882 Switches from trove to fastutil. (#3584)
This is mainly to prepare for forge potentially stop shipping trove.
2018-07-08 16:49:06 +02:00
fscan bde76d1fb1 Search box improvements (#3576)
* When the search box has the focus, tell forge to not send any other events.
* Toggle search box  focus with TAB.
2018-07-08 16:48:24 +02:00
fscan eb4caaa688 Priority GUI improvements (#3592) 2018-07-08 16:41:37 +02:00
fscan 3ba04b3831 Format fluid tooltip in buckets (#3580)
Fixes #3560
2018-07-04 19:58:19 +02:00
fscan 7cd8b72bb7 Add fluid level emitter (#3588)
Fixes #3571
2018-07-04 19:56:47 +02:00
fscan 2182b6e37c Add fluid GUI to me chest, fixed some warnings while at it. (#3579)
Fixes #3555
2018-07-04 19:14:34 +02:00
fscan 5d26b98ab8 Fluid cleanup and performance improvements (#3581)
Use custom gui widget with custom synchronization for rendering fake fluid slots.
2018-07-04 19:12:12 +02:00
fscan 979531afb7 Fix SpatialIO entity teleport (#3569)
Fixes #3484
2018-06-28 22:26:34 +02:00
yueh dcf7de9000 Updated fluid interface GUI and other fluid related textures. (#3567) 2018-06-27 20:28:43 +02:00
yueh 87999dbf27 Moved FluidList to fluid package (#3568) 2018-06-27 20:28:29 +02:00
fscan c2d18ce013 Added ME Fluid Interface (#3564)
* Fixed fluid storage bus json recipe
* Added part version and recipes
* Added rudimentary gui
2018-06-27 20:04:30 +02:00
yueh 046a27bf4c Fixes #3560: Render the fluid stacksize for ME fluid slots. (#3562) 2018-06-24 17:22:07 +02:00
fscan 841bc6e356 Rework custom recipe system (#3232) 2018-06-24 17:20:29 +02:00
yueh e72b5b369c Updated Dependencies and readme 2018-06-23 14:28:54 +02:00
Florian Scandella d635a87f01 Fluid import/export bus fixes.
* use correct side for capability.
* don't to to sleep if there is nothing to extract.
2018-06-22 21:34:33 +02:00
yueh 51481d3e30 Fixes #3556: Only extract insertable fluid amount. (#3558) 2018-06-22 21:30:31 +02:00
Florian Scandella 77e11c7a24 fix fluid part names in json recipe 2018-06-21 23:18:33 +02:00
Florian Scandella 3056bb6ffb Fixes #3535, Fixes #3486: Fixes crash when either quartz types are disabled and prevent cascading worldgen. 2018-06-20 23:17:48 +02:00
Florian Scandella edc0cef2bb Fixes #3449: Fix CellInventory to not mess with the item definition 2018-06-20 23:13:07 +02:00
Florian Scandella 4bd2797f5e Fixes #3459: Just open the inventory if raytrace misses. 2018-06-20 23:13:41 +02:00
Florian Scandella f37dfd0a24 Fixes #3548: Fix AEBaseTile to respect overridden markDirty implementations. 2018-06-20 23:13:07 +02:00
Florian Scandella 937ea00e9d Fixes #3478: Changes the way xp drops from Certus Ore blocks 2018-06-20 23:03:05 +02:00
fscan b431d5d681 Fixes DriveBakedModel to not crash when SLOT_STATE is null (#3545)
Uses a null object in case the TE is not available for whichever reason.
2018-06-19 23:23:59 +02:00
fscan 0ef854ca4b Fixes interface shift-clicking to generate correct onChangeInventory events (#3544) 2018-06-19 23:23:38 +02:00
yueh 2c6e50d48a Added fluid models (#3543) 2018-06-17 21:17:40 +02:00
Brock dcd94b1cfa Fixes issue with Fluid Channel not being sent changes. (#3504) 2018-06-17 21:16:44 +02:00
yueh 89de98f71e Changed fluid cells to better match the item ones. (#3539) 2018-06-17 21:15:49 +02:00
Brock d16677224a Initial Fluid Integration (#3510)
* Added Fluid Storage Cells

* Added Fluid Import Bus

* Added Fluid Export Bus

* Added Fluid Storage Bus

* Added Fluid Terminal.
While holding a item with the FLUID_HANDLER_ITEM_CAPABILITY, such as a tank
Left click on a fluid to extract the fluid
Right click to insert the fluid
2018-06-11 19:55:33 +02:00
yueh 89bebc4385 Fixes #3490: Use cached recipe before reaching out to CraftingManager (#3525) 2018-06-02 11:06:19 +02:00
yueh 987ea8d39d Fixes #3476: Correctly handle an empty top namepress. (#3521)
Also some further changes like avoiding to match a recipe without any
input.
2018-06-02 11:06:04 +02:00
Kyle VanderBeek f4212a86c3 Fixes #3520: Correct order for sort by mod and general code cleanup (#3517)
Comparable/Comparator implementation now use fast Java built-ins for
primitive types rather than hand-coded versions. Also DRY some code
and simplify logic.

This maintains the "biggest stack first" notion of "ascending", but
also fixes the inconsistent/accidental reversal of sort by mod (the
mod name should sort the same direction as the item name).
2018-06-02 11:05:44 +02:00
yueh 3c4a0cae11 Reworked cable connections (#3334)
* Reworked cable connections

Added enums for cable variants and sizes.
Rules for connections between a cable and another cable or grid member
are much more simple without any exceptions for certain combinations.
1/ Connections are rendered as the lowest type between cores.
2/ Each type uses are core for clear separation.
3/ The core will always be on the cable with the higher order.
2018-05-27 21:34:28 +02:00
yueh 2894a7caa0 Replaces all custom number comparisons with java provided ones. (#3434) 2018-05-27 21:33:59 +02:00
yueh 044e639827 Updated Grid API (#3399)
* Updated Grid API

Added Nonull/Nullable/Nonnegative where applicable.
Deprecated unused methods
Changed concrete classes with interfaces (HashMap -> Map)
IGridTickable will no longer accept null as TickingRequest. Do not
implement it, if it should not tick.

* Renamed parameter to match conventions
2018-05-27 21:16:01 +02:00
yueh d7b97fa7b8 Replaced LinkedList with ArrayList or ArrayDeque when applicable. (#3392) 2018-05-27 21:15:50 +02:00
yueh 62435a65f1 IAEStack#fuzzyComparison now compares the same subtypes. (#3384)
To reduce the amount of instanceof checks, it will now compare the same
subtupe.
Comparing an ItemStack and IAEItemStack can simply wrap it before
calling it. Heavy use should already use an IAEStack internal.
Analogue for fluids or other types.
2018-05-27 21:15:42 +02:00
yueh bf4818cf97 Updated Cell Registry safety and docs (#3383)
The Cell registry now ensures that the first handler is our own as other
addons might depend on it.
Updated docs to match the new requirements.
Made internal handler classes final.
2018-05-27 21:15:35 +02:00
Kyle VanderBeek 3e09c49e03 Remove call to neighborChanged() (#3497)
Fixes #3462
2018-05-27 20:46:08 +02:00
yueh 9481c9a7d7 Fixes #3428: Invalidate container when the corresponding TE no longer exists. (#3433) 2018-03-22 13:52:07 +01:00
yueh ccefb47581 Added a config option to disable the CraftingManager fallback. (#3415) 2018-03-08 16:44:48 +01:00
yueh 59af05aeb1 Fixes #3417: Avoid creating ItemStacks when injecting them into a cell. (#3418) 2018-03-08 16:38:00 +01:00
yueh b32834e2b3 Fixes #3411: Limit patterns without substitute to precise operations. (#3413)
This will no longer ignore NBT data when searching for an itemstack,
thus less likely to trigger the CraftingManager fallback.
2018-03-08 16:35:13 +01:00
yueh 6c7cbb7ee1 Added a simple warning to patterns when using CraftingManager fallback. (#3412) 2018-03-08 16:34:48 +01:00
yueh 84c065ff28 Fixes #3394: Use cache to avoid using removed IItemHandler (#3395) 2018-03-04 14:33:45 +01:00
yueh c9b92a81a3 Fixes #3405: Use cached tooltip for search, then copy craftable as zero. (#3406) 2018-03-04 14:33:23 +01:00
yueh eed4776c6f Fixes #3389: Prevent inventory cache from becoming unmatched. (#3390)
Use slightly faster ArrayDeqeue instead of LinkedList.
Check boolean fields before more complex datatypes
2018-02-17 19:10:09 +01:00
yueh 22807bc619 Updated maven repos. (#3391) 2018-02-16 18:43:09 +01:00
Florian Scandella ae352c093e fix typo in AEItemStack#fuzzyComparison 2018-02-10 19:02:32 +01:00
yueh 36d6681eac Rework fuzzy comparison for 99 percent threshold (#3367)
* Rework fuzzy comparison for 99 percent threshold

The current implementation is quite convoluted and can handle 99%
incorrectly when items exceed a certain damage range.

* Use metadata explicitly for comparison

Some item could use metadata to pack damageable and undamageable items
into the same id. Thus could lead to get ItemStack#getItemDamage() to
return bogus values for undamageable items.
2018-02-05 15:20:02 +01:00
yueh 6cffe93970 Fixes #3370: Avoid caching the model for facades locally. (#3371) 2018-02-05 15:19:20 +01:00
yueh b1472c58d0 Fixes #3363: Energy providers/requesters incorrectly removed on simulate (#3364) 2018-01-29 15:30:56 +01:00
yueh 96450a76c7 Fixes #3239: Torches should not be placeable on cranks. (#3359) 2018-01-28 13:47:49 +01:00
yueh ac209053b9 Fixes #3345: Added missing sky stone brick recipes. (#3357) 2018-01-28 13:31:07 +01:00
Foxgreat dce1aa37eb Update ru_RU.lang (#3336) 2018-01-28 12:52:53 +01:00
sfs131010 0b6831e4d7 Update zh_TW.lang (#3337) 2018-01-28 12:52:25 +01:00
yueh da6d8ba9a8 Fixes #3338: Upgrade inventory dupe bug due to ignoring player hand. (#3340) 2018-01-28 12:50:20 +01:00
yueh f0e45c7a3c Fixes #3288: Fixes various item rotations when held in 3rd person. (#3330) 2018-01-14 14:36:04 +01:00
fscan cbfc88c87f Fix light sync (#3304)
* Sync light opacity changes to client
* While at it, also fix Light P2P
* Use int for opacity, dont store it in NBT
2018-01-14 13:44:12 +01:00
yueh 8c5842aca9 Fixes #3315: Slightly more permissive checks for autocrafting (#3319)
* Fixes #3315: Slightly more permissive checks for autocrafting

Also fixes a bug in the fallback for looking up patterns to only use
ItemStack.EMPTY.
2018-01-14 13:43:31 +01:00
yueh 483049f555 Fixes #3293: Only update light level if the panel-facing block changes. (#3302) 2017-12-31 13:11:26 +01:00
yueh a7a65ae39d Fixes #3296: Prevent invalid TileEntites from updating their block. (#3301)
Updating the blockstate of invalid TEs will cause Forge to restore the
block including the TE leading to invalid TEs sticking around after
being moved.
2017-12-31 13:06:18 +01:00
yueh 45878df17d Fixes #3286: Incorrectly inverted hasSkyLight causes crashes on spatial transfer. (#3299) 2017-12-31 13:06:08 +01:00
yueh 98142d8ade Fixes CraftTweaker deploying incomplete releases. (#3300)
Due to CraftTweaker not deploying necessary dependencies, we cannot
rely on building against the most recent compatible version. Instead we
have to build against a specific known release to avoid it but have to
risk incompatibilities should there be changes on later versions.
2017-12-30 11:12:04 +01:00
yueh 7956872d1d Reworked IO Port to handle StorageChannels better. (#3284)
* Reworked IO Port to handle custom StorageChannels in a better way.
* Added a transferFactor to `IStorageChannel` to allow addons to speedup the IO Port to transfer faster. E.g. 1000 mB fluid as fast as transfering 1 bucket (item) per operation, not just 1 mB. 
* Also some changes to avoid moving fluids being 1000x as energy expensive as items.
2017-12-21 19:12:45 +01:00
yueh e243c8e9a2 Adds a debug generator for ForgeEnergy. (#3259)
* Adds a debug generator for ForgeEnergy.

This adds a simple debug block to test external energy injection via
ForgeEnergy and not rely solely on creative cells.

The energy has two functions. The first is acting as an infinite
ForgEnergy battery, this is unused by AE2 itself as nothing pulls
energy.
The second one is injecting energy every tick into any adjacent block
accepting ForgeEnergy.
The base generation is 8 per tick, but this is increased by the power of
adjacent TileEnergyGenerators.
2017-12-21 17:29:39 +01:00
yueh 641d0d40cc Fixes #3265: Do not strip special chars when extracting recipes. (#3266) 2017-12-21 17:28:31 +01:00
yueh 50fad685b6 Fixes #3282: Stacksizes > 64 prevent applicator from cycling. (#3287) 2017-12-21 17:28:16 +01:00
yueh 1ad49edd76 Fixes #3260: Only match damaged items when selected and set to 99%. (#3261) 2017-12-01 21:14:29 +01:00
yueh 7ceaa4cc3e Fixes #3217: Allow caps to be used as P2P attunements. (#3257)
Adds a more abstract approach to map a cap to a certain type instead of
the hardcoded ForgeEnergy case.
Reorders the check from exact ItemStack > ModId > ForgeEnergy to
ItemStack > Cap > ModId. Thus the mod wildcard will be used last.
Support for ForgeEnergy and FluidHandlerItems by default.
Result for items supporting multiple capabilities is not defined.
2017-12-01 21:14:11 +01:00
yueh b70c86542b Fixes #3255: Cache invalid patterns instead computing them every frame. (#3256) 2017-12-01 21:13:23 +01:00
yueh c1197c0084 Updated to latest Forge RB. (#3250)
While this is not ideal for a stable release, switching to the latest RB
of Forge avoids the broken recipes in previous versions.
2017-11-26 15:46:38 +01:00
fscan f0d807f0a2 Rework ContainerInscriber validation (#3238)
* Correctly handle metadata wildcard for inscriber inputs
2017-11-26 15:46:02 +01:00
fscan 5fa2c0ab27 Deprecate AE2 recipe system. (#3247)
* Deprecate aerecipes to indicate that they are going away soon.
2017-11-26 15:45:34 +01:00
fscan 3063bd887c Revert DamageableRecipe changes (#3246)
Forge fixed this after all. This is no longer needed.
2017-11-26 15:44:56 +01:00
Florian Scandella fac4a8f9dc Fix typo 2017-11-26 14:38:09 +01:00
fscan 9d8226da19 Remove swingArm in IToolHammer implementation. (#3249)
Fixes #3248
2017-11-25 13:38:22 +01:00
yueh 33754d289d Fixes #932: Fire ExplosionEvent.Detonate when tiny TNT explodes. (#3229)
This still bypasses the start event to prevent it from ever being
cancelled.
2017-11-23 11:06:46 +01:00
fscan 959672dae3 Add CraftTweaker support (#3231) 2017-11-22 21:09:26 +01:00
fscan 90c17c09a8 Add custom recipe for damageable Ingredients (#3230) 2017-11-17 16:20:53 +01:00
yueh e0bf7223e0 Refactors grid connections (#3219)
Extracted all checks and subsequent updates to a factory method from the constructor.
Reordered checks to check for nulls before anything else.
Also existing connections before security breaks.
Fixes TileController#checkController() using the wrong position.
Added debug logging for failed connections.
Improved logging.
Inversed boolean so false no longer means security check passed.
Only issue a security break on SecurityConnectionException.
2017-11-12 18:13:59 +01:00
fscan ba9af94228 Fix StorageBus not updating item count correctly (#3218)
* Queue tick instead of ticking immediatley
2017-11-12 18:12:56 +01:00
yueh 122b6163dc Fixes #3209: Reset stack to prevent leaking meaningful ones (#3210) 2017-11-12 12:53:40 +01:00
yueh fab42ccc75 Use craftinggrid to check existing patterns for JEI recipe transfer. (#3202) 2017-11-12 12:48:18 +01:00
yueh f5dd2c8b0a Fixes tooltips for ME Slots (#3205)
No longer strips colors from names, lore, etc.
Now uses the translation again for "Items Stored:" instead of a hardcoded string.
Removed obsolete methods.
2017-11-12 12:35:05 +01:00
fscan a126112a2d Rework ImportBus (#3206)
Fixes #3201
2017-11-11 19:59:11 +01:00
fscan 99cda5f5a3 Cleanup recipe factories (#3207)
Fixes #3200
2017-11-11 17:51:20 +01:00
Florian Scandella 56a5363528 Fix NetworkToolViewer stack overflow, saveguard against markDirty recursion.
fixes #3199
2017-11-08 13:17:34 +01:00
fscan be65edbd5b Set base biome to "void" to shut up warning. (#3194)
Fixes #3118
2017-11-05 03:12:20 +01:00
fscan fe5d9251eb Spatial IO fixes (#3195)
* fix warning when transfering entities
* clean removed TileEntities from the ITickable list.
2017-11-04 23:12:17 +01:00
yueh 3cf48b2291 Remove channels per side from non smart cable states. (#3192)
These are unnecessary for these cable types and their rendering, but are
actually causing the cache to add duplicate models.
2017-11-04 13:24:57 +01:00
yueh cc4599b5fc Add a basic cache for cable models to avoid constant regeneration. (#3185)
* Add a basic cache for cable models to avoid constant regeneration.
* Improved equals/hashCode to ignore cable unrelated parts or facades.
2017-10-31 21:02:03 +01:00
yueh c1fa77df51 Fixes #3189: Formation plane unable to place special items. (#3190) 2017-10-31 16:12:08 +01:00
yueh 725fa491e6 Fixes #2611: Limit the adaptor to the main player inv. (#3188)
This prevents the result from various inventory actions to be placed into
the offhand or armor slots.
2017-10-31 14:05:05 +01:00
fscan e2a6cd1d57 Fix SkyChest bounding box (#3187)
fixes #3149
2017-10-31 01:40:17 +01:00
fscan 6ddf60fab8 Improve Facade rendering (#3182)
UV fix based on #2941 by @MoreThanHidden
fixes #2679, fixes #2625
2017-10-29 16:47:26 +01:00
fscan 2c07acfe81 Allow extraction for Condenser (#3179)
fixes #2960, fixes #2017, fixes #2602
2017-10-27 15:49:40 +02:00
fscan 3749742231 Fix handling of ItemStacks using getShareTag or Capabilites (#3171)
Temporary fix, ideally we would have a way to reference the original ItemStack so we don't need to send the full NBT data to the client.
2017-10-26 17:59:55 +02:00
yueh 74b9610b45 JSON resource cleanup (#3178)
Unified formatting
Added missing new lines at end of file
Removed superfluous spaces
Removed channel texture from dense covered cables.
2017-10-26 12:47:08 +02:00
yueh a725779ff6 Fixes #3175: Return the correct used amount. (#3176) 2017-10-26 12:46:49 +02:00
Flithor b82df25c75 Update zh_cn.lang (#3137) 2017-10-21 00:47:07 +02:00
fscan cc9b33b473 Implement Advancements (#3160)
Improvements welcome.
2017-10-20 23:54:18 +02:00
fscan 5496b746ea Fix Tiny TNT (#3162) 2017-10-20 23:52:55 +02:00
fscan f80f623ccf Fix AESharedItemStack#compareNBT to get consistent ordering. (#3169) 2017-10-20 23:25:18 +02:00
yueh cba6c5500f Fixes inscriber crash with name presses. 2017-10-16 21:41:44 +02:00
Florian Scandella bc8268af94 readd the non-fortune version 2017-10-15 16:07:12 +02:00
Florian Scandella 297cd16702 cleanup BlockQuartzOre and circumvent Forge bug 2017-10-15 15:53:31 +02:00
Florian Scandella 41711e50b9 Check for null in UpgradeInventory#saveChanges. Fixes #3159 2017-10-14 23:53:34 +02:00
Florian Scandella 2bfb8b75e8 Return correct item defintion. 2017-10-14 19:06:57 +02:00
yueh 58e96aa3de Fixes new modes not being considered JEI modes. 2017-10-14 14:39:05 +02:00
fscan 4f07b63b13 API cleanups (#3155)
* Remove obsolete api and fix some warning
* Move MEMonitorHandler to internal code and fix some warnings
* Rename exceptions to conform to naming scheme
2017-10-14 14:15:28 +02:00
yueh 905dd6c888 Added a clientside config to keep or clear the search filter when opening. (#3154)
Closes #3153.
2017-10-14 14:13:18 +02:00
yueh ab7f35a9ee Further StorageChannel refactoring (#3152)
Updated Drives to support more than Item and Fluid cells.
Use Collections.emptyList() instead of creating empty ArrayLists.
Fixes a NPE with uninitialized ME Chests.

Fixes #3150
2017-10-14 14:12:24 +02:00
yueh 6e81f698c0 Refactored StorageChannel enum into an interface (#3138)
This replaces the static enum with a more dynamic interface providing
factory methods for handling network storage.
2017-10-08 17:59:30 +02:00
fscan 8ad8ce68b5 Added optional TE wrench support. (#3145) 2017-10-08 17:58:57 +02:00
yueh 644194d0d6 Updated Forge to 1.12.2 RB (#3141)
* Updated Forge to 1.12.2 RB

Updated mappings to the MDK defaults for 1.12.2
Updated related depdencies

* With Forge 14.23 not available for < 1.12.2, we have to drop support.

With one potential fix for TE corruption, this step should be
reasonable.
2017-10-08 17:34:05 +02:00
yueh 95b27f490c Added Registry for customized charger rates. (#3139)
* Added Registry for customized charger rates.
* Added rates for all chargable items/block.
* Charger and Inscriber now store 1.6k AE each instead of 1.5k
* A crank applies 160 AE instead of 150
* Charged certus now requires 1.6k instead of 1.5k
2017-10-08 17:33:06 +02:00
fscan 6032c0328e Fixes #3143: Queue network list updates in onTick (#3144) 2017-10-08 15:12:27 +02:00
fscan e8d554d69d Fix Inscriber recipe registration (#3131)
Fixes #3129
2017-10-02 22:03:22 +02:00
fscan 1e15b23506 Rework AEItemStack (#3091)
* Use itemstack as itemdef
* HIGH_TAG/LOW_TAG should be compared both directions
* Remove getTagCompound
* Make Itemlist implementation independent
* Cache item id for performance reasons
* Add preconditions to saveguard against external meddling
* Chache itemDamage
* Remove IAEStackSearchKey for now, rename getDisplayStack
2017-09-30 17:18:30 +02:00
yueh 2ed7a5598a Improved IGrinderRegistry (#3110)
* Improved IGrinderRegistry

Added a builder for grinder recipes similar to IInscriberRegistry.
Replaced different add methods with this builder.
IIinscriberRegistry#addRecipe and removeRecipe now return true on success.
2017-09-29 20:32:59 +02:00
yueh 1c05dd5834 Further improvments for the energygrid. (#3107)
* Further improvments for the enerygrid.

Simplified quartz fiber.
Removed different Actionable code paths and replaced with a unified
approach.
Dropped lastProvider/Requester, it simply iterates over all, but still
drops them when necessary.
2017-09-29 20:32:20 +02:00
Florian Scandella 632d124359 Fix ArithmeticException in PartP2PFEPower 2017-09-26 22:14:04 +02:00
yueh 829c18e2bb Make UVLLoader a bit more robust (#3102)
Catch all parsing exceptions instead of propagating them upwards as
these are meaningless for the actual test.
Renamed uvlMarker to ae2_uvl_marker just in case some other mod uses the
same key.
2017-09-21 20:42:23 +02:00
yueh d3a5be7ed6 Fixes #3105: Dupe bug due to forge default itemhandler implementation. (#3106) 2017-09-21 20:41:30 +02:00
Florian Scandella 217cbf0982 we dont use scala ... 2017-09-17 13:38:44 +02:00
fscan 4dd0a4cd96 Improve terminal search box (#3064)
Uses exsting JEI filter in JEI mode.
Preselects text for easy delete/change without using rightclick.
QoL improvements for focus handling.
2017-09-16 17:44:16 +02:00
Florian Scandella 54c0ce43ea fix fluid p2p voiding excess liquids 2017-09-14 18:38:29 +02:00
yueh bd8f43acbf Updated to forge 1.12.1 RB. (#3087)
Updated related deps.
2017-09-12 13:23:17 +02:00
yueh 970630a90d Refactored the BaseActionSource (#3063)
* Refactored the BaseActionSource

It now uses an interface `IActionSource` instead of a concrete class and further
subclasses. 

Instead of relying on a specific class for a certain action type, it now
uses methods with Optional as return values to determine a player or
machine issuing an action. Refer to the JavaDocs for the exact behaviour.

* `IActionHost` no longer extends `IGridHost`

It never used the additional functionality and if needed the `IGridNode`
will also provide a reference to the corresponding `IGridHost`.

Due to most crafting related GUIs being hardcoded to `IGridHost`, 
they no longer work when `IActionHost` is not extending it. Actually
`IActionHost` is the better solution for it, as it prevents us from looking
the grid up via the `IGridHost` and potentially finding a wrong grid.

* Interfaces now only lock the currently worked slot.

This allows `DualityInterface#onChangeInventory` to update slots of the same interface, should they be the source for a requested item and therefore updating their working set accordingly to queue further crafting requests for unfulfilled stack requirements.
2017-09-12 11:39:00 +02:00
yueh 771a944058 Fixes #3081: Fixes blocking mode blocking on empty inventory. (#3082) 2017-09-11 12:03:32 +02:00
Florian Scandella db1cd8c312 Cache the STORAGE_MONITORABLE_ACCESSOR Capability to reduce the amount of MENetworkCellArrayUpdates 2017-09-09 13:04:21 +02:00
fscan 375e1efb15 We don't need the showCraftingLabel flag, as IAEStack is perfectly fine with 0 size stacks. (#3071)
Adjust rendering code to use ItemStack with size 1 where required.
2017-09-09 12:58:22 +02:00
yueh 955fcac92a Correctly handle the grid power storage during onJoin/onSplit. 2017-09-03 13:40:30 +02:00
Florian Scandella 216e2cb1e3 Fix matter condenser input slot 2017-09-03 04:45:17 +02:00
Florian Scandella 53f5724657 Set stack size to 1 for rendering 2017-09-02 01:06:25 +02:00
Florian Scandella a3269826f9 cleanup inventory change handling 2017-08-31 14:01:46 +02:00
Florian Scandella 1a918be658 only calculate difference when it's the same item 2017-08-29 22:52:59 +02:00
Florian Scandella 90130e72aa call saveChanges when inventory changes. 2017-08-29 22:52:06 +02:00
Florian Scandella c8f10d92bb use index not slotNumber 2017-08-29 21:20:18 +02:00
fscan 548af3c6cc Use standard inheritance to propagage NBT events (#3058)
* Remove the old annotation system
* Use TileEntity#onLoad instead of onChunkLoad event
* Do not call invalidate in onChunkUnload and validate in onLoad
2017-08-28 09:34:09 +02:00
yueh 98b9380494 Fixes machines not extracting power from the local grid.
There is currently no difference between an external grid and the local
machines trying to extract power from the grid. Thus preventing any
external grid from stealing power also does prevent machines from
extracting, if there is no other provider available.

Also a small change to use a priorityqueue with the lowest percentage
stored first. This can better utilize the upper limit by reaching it
faster and exiting earlier.
2017-08-27 15:01:07 +02:00
fscan bbf4d4a9ce Spatial rework (#3048)
* Moved all spatial cells into a single dimension instead of one dimension per cell

Each cell will now be backed by a single region file each. So  backups and restores can still be done on a per cell level.

Old cells will not be migrated.

* Moved custom cell tracking to a capability based one on the world

The size and owner of a cell is now stored inside the capabilities of the world/dimension not a custom system and we can rely on forge handling the persistence of it.

* Added the cell id to the actual item tooltip, as this is now a real identifier and not an arbitrary dimension id.

* Added vanilla banners to the whitelist

* Added unittests to the dimension manager to ensure the algorithm mapping to the correct region file

* Updated the API to conform with the new dimenion/types/biomes registration and mappings

* Fixed a couple of bugs related to world/dimension/biome registration 

* Fixed a bug when transfering certain blocks due to passing missing/incorrect blockstate
2017-08-24 11:24:33 +02:00
yueh 1513ba3f6a Performance improvements for the energygrid (#3051)
* Performance improvements for the energygrid

Reworked the old recursive approach to a queue based loop.
Extract will try to prefer the next grid with the hightest amount of
stored energy.
Inject will try to prefer the grid with the lowest percentage stored.
Other operations are first come, first serve.

* Added a local buffer storage to EnergyGrid

This replaces the old not really working buffer with a special
IAEPowerStorage acting as buffer/proxy for the local energy demand as
well as temporary overflow should something provide more energy than
requested.

Currently it set to hold a maximum of 200 AE (+ optional overflow until
consumed). It will only be used locally, no other grid can use it to
avoid starving the neighbor grids before finding a energy cell.

* Fixes IExternalPowerSink

All implementations currently depend on the network demand being a valid
source, which might not be true.

Further it can cause the sink to iterate the network twice (demand and
inject) and both again for simulate and modulate.

Also it did not return the actual leftover amount instead of relying on
the demand matching it.

* Minor fixes related to removing nodes from a grid.

The grid did remove IStackWatcherHost not IEnergyWatcherHost, this was
fine for AE2 as only level emitters use it and they implement both.
But not for potential addons.

Also they would potentually not being removed as the are indexed by the
gridnodes not the machine.

Fixes #1004
2017-08-24 11:06:31 +02:00
yueh f03f8ec432 Remove RF dependency 2017-08-22 11:07:00 +02:00
Florian Scandella e1dcd588b7 add particle texture to charged quartz 2017-08-21 20:11:20 +02:00
fscan 8338a7d13e Fixes #3049: JEI recipe transfer can voiding items (#3053) 2017-08-21 14:39:29 +02:00
yueh b8e685b1b6 Fixes #3040: Cache recipe and revalidate it (#3042)
* Fixes #3040: Cache recipe and revalidate it

This caches the last used recipe instead of only the result. Which
allows to revalidate the crafting grid against the recipe itself before
hitting the CraftingManager again. Therefore avoiding a high performance
hit for recipe lookups, just find the potential same recipe again.

* Remove old recipe lookup as forge provides it now.

* Further optimizations.

These are a bit quick'n'dirty and need a better solution with a full
container/gui refactoring. But for now they provide some great benefits
in terms of performance.
2017-08-20 21:31:30 +02:00
yueh d84500c5b7 Fixes FE P2P tunnel drain issues
Only queue drain on modulate, also queue it for extracting from the
input side.
2017-08-20 14:35:31 +02:00
yueh a1679c944b Added SCS size to the Spatial IO Port. (#3045)
Uses the same format as the cells display in their tooltip for easy comparison.
2017-08-20 13:14:27 +02:00
fscan a3a39201d1 Missed vibration chamber when fixing the others. (#3050) 2017-08-19 21:31:16 +02:00
Emanuele Torre d788da687e Update it_it.lang (#3041) 2017-08-18 10:31:15 +02:00
yueh 030e0c6a14 Updated gradle.properties for deploying to multiple minecraft versions 2017-08-18 00:47:31 +02:00
fscan 8e4265aa33 P2P Tunnel improvements (#3039)
* Fix P2P Tunnels randomly resetting to ME
* Allow one way push and pull. Outputs can pull from the input side, input can push into outputs.
2017-08-18 00:44:19 +02:00
Gunther De Wachter 80eaa032b9 Fixes #3011: placing the last part in off-hand clearing main hand as well 2017-08-17 22:19:50 +02:00
yueh bee9c70497 Added 1.12.1 as accepted version. 2017-08-17 21:17:55 +02:00
yueh c4fa21c193 Removes coremod (#3038)
From now on every integration must not rely on method stripping through
a coremod or @Optional. Notable example for a very good solution is IC2.

As consequence this drops all support for RF and mods must support on of
our supported energy types. At the time of writing, ForgeEnergy and
IC2/EU.
2017-08-17 21:16:57 +02:00
Gunther De Wachter 8a7450168b Updated JEI plugin to newer API methods. 2017-08-17 20:41:20 +02:00
Gunther De Wachter 7cb641cdc8 Fix shift clicking memory card still triggering off-hand item/block usage. 2017-08-17 20:41:20 +02:00
Gunther De Wachter b5b8050c4c Added workaround for sorting items on amount with fake amount when showing crafting label 2017-08-17 20:41:20 +02:00
Gunther De Wachter e65083b045 Fixed dropping items on the ground when clicking on a crafting label with items in hand 2017-08-17 20:41:20 +02:00
yueh b61219ef88 Covered dense cables (#3030)
* Renamed all dense smart cable related things to include smart
* Added dense covered cables
* Added abstract PartDenseCable to reduce redundant code
* Added dense covered recipes

* Ensures ItemPart ordering to be consitent.

Now takes the metadata into account to preserve the ordering for colored
items instead of just the part type name and depend on the insertion
order of a hashmap.
2017-08-17 18:41:39 +02:00
yueh 4f9fd1b369 IC2 rework to avoid a coremod or @Optional (#3034)
* IC2 rework to avoid a coremod or @Optional

Updated IC2 dependency

Refactored IC2 itemcharging to use an IBackupElectricManager.
Allows charging any ae powered item by using an IBackupElectricManager
instead of having to implement IElectricItem and stripping it by some
sort.

Updated IAEItemPowerStorage to use Actionable for an easier handling
with power APIs supporting a simulation.

Refactored EU P2P to avoid method stripping
Use a modified internal BasicSinkSource instead of implementing
IEnergySource and IEnergySink directly on the tunnel.

Removed the superfluous EU P2P layers.

* Removed internalBattery due to being too complex

* Creative Energy Cell is not a chargeable item
2017-08-17 17:35:34 +02:00
yueh 630fae3f73 Fixes #3024: Crash on recipe lookup for disabled features (#3026)
* Fixes #3024: Crash on recipe lookup for disabled features

Adds a new recipe condition for a single AEFeature or a list of them.
Moved the factories to their own package, in preparation of phasing out
the old recipe handling.
2017-08-17 17:17:26 +02:00
yueh 488ef1b544 Fixes recipes to use correct ingredients
Fluix Pearls instead of Fluix Crystals for spatial related items.
Fluix cables for most items, not any cable to avoid loops or unwanted
crafting steps.
2017-08-17 15:12:34 +02:00
fscan 098ee2f000 Making charged certus ore glow again (#3035) 2017-08-17 11:01:31 +02:00
fscan 04d2b06c0d Ignore MOVE_REGION when clicking on crafting slots (#3032)
Exclude crafting slots from list of slots to move on space click.

Fixes #3031
2017-08-15 15:07:42 +02:00
fscan ac48ab02fc Fix crash in clearStack (#3033) 2017-08-15 15:05:12 +02:00
fscan 9022150e38 Fill existing stacks first when adding to player inventory. (#3025) 2017-08-14 11:03:53 +02:00
yueh 65c6d2249a Fixes encoding issues with spatial cell names 2017-08-13 19:02:03 +02:00
yueh 8e7f79a9ea Ensure gradle uses UTF-8 2017-08-12 16:35:38 +02:00
fscan 95b48b9438 Registration rework (#3018)
Refactored component registration.

Fixes #3008: crank rendering
2017-08-12 15:02:50 +02:00
yueh cdd76b7b22 Added helpers for hex and color output. (#3027) 2017-08-12 14:52:31 +02:00
fscan 3e2bc0e038 Inscriber improvements and fixes (#3028) 2017-08-12 14:52:01 +02:00
yueh eec3e59eea Add missing annotations 2017-08-11 21:44:30 +02:00
yueh e39855b48f Use qualified method and field access 2017-08-11 21:43:47 +02:00
yueh cdcab7d91c Organise Imports 2017-08-11 21:42:26 +02:00
yueh 27ad2c2b96 Code format 2017-08-11 21:41:51 +02:00
yueh 542a2e5d5a Fixes NPE due to using wrong field. 2017-08-11 21:33:57 +02:00
fscan 3b58f5e8da fix me io port (#3019) 2017-08-09 10:39:07 +02:00
fscan 092afad4a5 Correctly detect redstone updates on all sides. (#3017) 2017-08-09 10:30:44 +02:00
Gunther De Wachter 6aa810d62a Re-add a missing piece of IC2 integration code.
This should fix a bunch of IC2 spam in the console and allow items to be charged in IC2 blocks.
2017-08-07 10:15:26 +02:00
Gunther De Wachter 41d98f9944 Fixed ME Chest visually not updating its cell state 2017-08-05 11:43:57 +02:00
Gunther De Wachter 1b198979fd Fixed export bus never speeding up. 2017-08-05 10:45:13 +02:00
tyra 8d5cc916e0 Adds improved tooltip to invalid encodedPattern (#2992)
* Adds improved tooltip to invalid encodedPattern

This also fixes that encodedPattern might be shown as valid,
even though one or more input or output item is missing.
2017-08-04 21:17:35 +02:00
Gunther De Wachter 5abb8bf886 Removed call to super in Crafting Terminal initialisation code. Fixes #2988 2017-08-04 20:28:11 +02:00
Gunther De Wachter 0bed78a144 Re-enabled JEI search integration in terminals. 2017-08-03 22:00:42 +02:00
fscan 30940e91ea InterfaceTerminal: Put into to cursor, not player hand (#2996) 2017-07-31 17:16:56 +02:00
fscan 0f9ac5fdda Fix Inscriber and Molecular Assembler (#2995)
* Fix inscriber
* Allow GUI extraction for Molecular Assembler
2017-07-31 16:06:39 +02:00
fscan 5e001d86cb Move model loading to the correct event. Fixes #2991 (#2994)
* Use the correct event for loading models.
* Introduce IModelRegistry to wrap the ModelLoader
2017-07-31 15:51:53 +02:00
fscan b13a338948 Fix/Remove storage/import/export bus IItemHandler caching (#2987)
* Fix storage/import/export bus IItemHandler caching
2017-07-31 15:51:01 +02:00
yueh 454404b0c1 Changed ItemGen to use IItemHandler 2017-07-30 20:17:23 +02:00
yueh bb1e191666 Changed IPart#onNeighborChanged() to add vanilla arguments (#2985)
Allows more precise checks to limit an update to the facing side.
2017-07-29 15:45:18 +02:00
yueh b72fce97db Removes random energy P2P behaviour (#2986)
Energy P2P now try to evenly distribute over all outputs (to a certain
limit)
Fixes some NPE regarding the caches.

Closes #2969
2017-07-29 15:38:29 +02:00
yueh bcc4a732ed Started P2P rework (#2966)
* First iteration of P2P rework

Changed frequency to short instead of long.
Added a per grid RNG to request a new frequency, hopefully without many collisons.
Added a helper to convert between a frequency and 4 colours
2017-07-28 22:06:19 +02:00
fscan 52d28fabe3 Use IItemHandler instead of IInventory internally (#2971)
* Use IItemHandler instead of IInventory internally
2017-07-28 22:04:32 +02:00
Gunther De Wachter c077840988 Fixed formation plane crashing when placing a block down. 2017-07-26 07:39:59 +02:00
Gunther De Wachter 8f6510aad4 Fixed the spatial cells losing their "cubed" sign because of an encoding issue in the language files. 2017-07-25 02:20:40 +02:00
Gunther De Wachter fa8427dcbd Fixed ItemStack initialisation in ContainerCellWorkbench. 2017-07-23 20:50:30 +02:00
Gunther De Wachter 7eb09fc4db Fixed Container Workbench (and other UI's) giving access to slots that shouldn't be there. 2017-07-23 20:39:01 +02:00
Gunther De Wachter ac528d09ae Fixed empty list when toggling to "Craftable" view in a terminal. 2017-07-23 17:41:05 +02:00
fscan c97165cc63 Fix NPE in MEMonitorIInventory.onTick (#2972) 2017-07-22 21:24:19 +02:00
yueh 08ee8f7656 Updated eclipse codeformat 2017-07-22 21:12:53 +02:00
Gunther De Wachter 727fcc528f Fixed crafting card recipe. 2017-07-22 18:31:30 +02:00
yueh a4c468b9cf Updated caps to be manually disabled via config
Moved the cap injection to a method, allows them to be configurable.
This is not possible for Forge Energy as it is injected before even the
configuration are lodaed, thus violating their own capability contract
to use the method injection to explicitly make it configurable.

Updated the ratio key for forge energy to "ForgeEnergy" without a space
2017-07-22 13:29:14 +02:00
Gunther De Wachter 4ad31f5066 Integrated groups.recipes into the JSON recipes a bit more cleanly.
Groups in groups.recipes that only had 1 item in the group haven't been converted into the JSON system.
That means "monitor" and "densecable" were just left as is.
2017-07-22 02:08:01 +02:00
tyra f70e97046f Fixes PatternTerminal crafting issue (#2964) 2017-07-22 01:12:07 +02:00
tyra 3a053d9ebe Fixes PatternTerminal clearing crafting slot on tried crafting (#2963) 2017-07-22 01:11:42 +02:00
Gunther De Wachter fbaff342e4 Fixed cable anchor recipe. Apparently 32767 is the magic wildcard number we were looking for. 2017-07-22 00:33:16 +02:00
tyra f0baea3be8 Fixes a ItemStack deletion issue in the grindstone (#2962)
Fixes the Grinder eating the item in case of an input ItemStack with size equal to one.
2017-07-21 23:03:13 +02:00
yueh fd7e393d23 Updated github docs 2017-07-21 22:05:38 +02:00
yueh a24ed38e90 Added missing Override annotations 2017-07-20 21:28:16 +02:00
yueh 15582fd1df Always use qualified access for fields and methods 2017-07-20 21:27:22 +02:00
yueh f9cad0758d Always use {} for control statements 2017-07-20 21:24:58 +02:00
yueh 406013142e Superfluous whitespace removal 2017-07-20 21:23:01 +02:00
yueh 7de90ed0ae Finally use Java7 <> 2017-07-20 21:21:45 +02:00
yueh 8ec8babb6a Organised imports 2017-07-20 21:18:49 +02:00
yueh 621910df91 Format sourcecode 2017-07-20 21:17:10 +02:00
yueh 66437897be Removed superfluous thirdparty sourceset 2017-07-20 20:59:37 +02:00
Gunther De Wachter 7414840530 Fixed facades not showing up before F3+A. This is caused by the BlockRendererDispatcher not existing yet in the ModelBakeEvent event. 2017-07-19 19:08:49 +02:00
Gunther De Wachter 0741e4ae09 Cosmetic change to smart fluix recipe. (Looks nicer in JEI) 2017-07-19 13:55:39 +02:00
Gunther De Wachter 87f6a63f47 Fixed seeds and P2P bus not having a localised name. 2017-07-19 13:55:09 +02:00
Gunther De Wachter b0950683a1 Updated pack.mcmeta to new version. 2017-07-19 13:54:08 +02:00
Gunther De Wachter 009cf8ac40 Fixed fluix pearl and Dense Smart Fluix recipes. 2017-07-19 13:52:25 +02:00
Gunther De Wachter 4c272de77f Temporary fix for serverside JEI and valueconfig packets.
It's not pretty but should do until we rewrite the packet/network handler.
2017-07-19 13:50:21 +02:00
Gunther De Wachter 6648d18f00 Changed the Parts and Material enum to be more java compliant.
Renamed Dense Cables to Dense Smart Cables.
2017-07-16 02:22:30 +02:00
Gunther De Wachter 16b5b5aea2 Fixed setting a Tunnel Type to "Forge Energy". Forgot to edit the part that actually sets the tunnel. 2017-07-15 01:19:29 +02:00
Gunther De Wachter e20697a7d9 Added the Forge Energy line to the language files. 2017-07-15 00:51:08 +02:00
Gunther De Wachter dc0447d137 This layer isn't needed for the traversal of Forge Energy. 2017-07-15 00:49:13 +02:00
Gunther De Wachter 577b1fa757 Add a method to attune the P2P Tunnel by (supported) ModId, or check for ForgeEnergy support if it's not listed. 2017-07-14 22:54:19 +02:00
Gunther De Wachter 3d69dc9bc4 Merge branch 'rv5-1.12' of github.com:GuntherDW/Applied-Energistics-2 into rv5-1.12 2017-07-14 21:52:24 +02:00
Gunther De Wachter 66c87a2fa2 Re-enabled the RF and IC2 handler, as well as their P2P tunnels. Added Forge Energy P2P tunnel. 2017-07-14 21:52:04 +02:00
Gunther De Wachter fdab91323c Re-enabled the WAILA handler, using Hwyla. 2017-07-14 21:48:20 +02:00
Gunther De Wachter 98a8c3d06b Forgot to remove extra debug line before pushing to github. 2017-07-14 16:21:16 +02:00
Gunther De Wachter 458356a2be First attempt at combining the Block registration and TE registration whilst still keeping support for addons.
It might need some refinement in the future.
2017-07-14 04:47:40 +02:00
Gunther De Wachter c91b432e09 Added exceptions to the Recipe handlers. Don't crash, but log to the console what went wrong. 2017-07-13 22:18:59 +02:00
Gunther De Wachter d67d93b343 Fixed a couple recipes that were wrong during the transition. 2017-07-13 11:31:26 +02:00
Gunther De Wachter f6f8da28af Fixed Recipe handler only giving out 1 item instead of the amount specified in the json. 2017-07-13 11:29:00 +02:00
Gunther De Wachter 76fd3c1166 Fix potential crash in the recipes when the material was replaced. 2017-07-13 09:30:39 +02:00
Gunther De Wachter 3da881829e Fixed recipe crash when another mod registers a wooden gear.
I'll have to go through every other recipe later.
2017-07-13 09:03:18 +02:00
Gunther De Wachter 90ee7fb15d Fixed last commit. I should never trust kate's syntax hilighting in the future again. 2017-07-13 04:49:10 +02:00
Gunther De Wachter e5e2714273 Really fixed NotNull this time. My local git repo got desync'ed for a bit. 2017-07-13 04:44:05 +02:00
Gunther De Wachter 1534521362 Fixed wrong interface being used for the NonNull ItemStacks causing issues. 2017-07-13 04:21:15 +02:00
Gunther De Wachter 0f8204cd93 Fixed serversided issue. Forgot to check for uses of isEnabled before changing it to a clientside only method. 2017-07-13 04:18:33 +02:00
Gunther De Wachter eb11845a2f Fixed applying the type of tunnel for P2P tunnels.
This was caused by the enforced lowercase mod id's and item names since 1.11.
2017-07-12 06:04:06 +02:00
Gunther De Wachter fe213e5ac5 Add item handler capabilities to Item P2P tunnels. 2017-07-12 06:02:31 +02:00
Gunther De Wachter 25c82b2c9f Forgot to remove test recipe. 2017-07-11 05:12:47 +02:00
Gunther De Wachter d03faae983 JSON Recipes initial import.
Moved the old recipe handler to a different direct to not confuse the vanilla/forge JSON loader.
2017-07-11 04:50:02 +02:00
Gunther De Wachter 76e19874cf Small code cosmetics and null checks update. 2017-07-09 13:44:11 +02:00
Gunther De Wachter 1975c3c262 Moved makeUnique() a bit back to fix almost every AE item being disabled. 2017-07-09 13:43:16 +02:00
Gunther De Wachter 720feb4f16 Iron nuggets are vanilla nowadays. There's no sense in keeping them around in AE2. 2017-07-09 11:33:22 +02:00
Gunther De Wachter 588579d67f Updated CoFH RF API. Removed the old API from thirdparty/.
Those files are available from their maven server now.
2017-07-09 10:34:34 +02:00
Gunther De Wachter 043f6e9919 Fixed ME Drive not rendering in-world. 2017-07-09 10:10:56 +02:00
Gunther De Wachter cc7824a0e5 Merge remote-tracking branch 'origin/rv5-1.12' into rv5-1.12 2017-07-09 07:18:45 +02:00
Gunther De Wachter a57cd3f580 More 1.12 shenanigans. Still far from done. 2017-07-09 07:17:24 +02:00
GuntherDW 33f54a1bd6 Merge pull request #8 from tyra314/creative-tab-leak
Fixes creative tab leak
2017-07-09 05:53:32 +02:00
tyra314 3008088ad7 Fixes creative tab leak 2017-07-08 11:26:51 +02:00
Gunther De Wachter 198ea9f16e Fixed crash caused by delayed block registration.
Added Callback section for the Model Registry event to the builder setup.
Moved the State Mapper section to the Model Registry Callback section.
2017-07-06 14:05:54 +02:00
Gunther De Wachter d8c5e6a5fa Fixed UI background not being drawn.
Mezz removed said displayGuiScreenWithoutClose() so said workaround can be removed.
2017-07-06 08:07:51 +02:00
Gunther De Wachter fbcf8c4705 Highly incomplete code. First work on porting to 1.12. Still need to rework a LOT of things. 2017-07-06 01:57:19 +02:00
Gunther De Wachter d67f97cd16 FMLRelaunchLog is deprecated in favour of FMLLog. Small grammatical fixed as well.
They want you to get a logger in the PreInit phase, but seeing as we are a coremod we run before those events take place.
2017-07-04 17:50:10 +02:00
Gunther De Wachter 0e2f8a22a2 Decided to go for a more "separated" TE registration.
This will still make it so addons still get to add custom blocks without having to change too much of the internals.

It still needs thorough testing though. I don't want to change this too much because it ruins older worlds.
2017-07-04 15:40:57 +02:00
Gunther De Wachter 20fc0e136d Fixed more bugs caused by the new mappings. 2017-07-03 09:11:06 +02:00
Gunther De Wachter 7f7495f1df Fixed bug caused by mapping update, not being able to rclick on parts on a certain side. 2017-07-03 08:20:13 +02:00
Gunther De Wachter e6e858820f Updated forge and added some more stuff from the new mappings. 2017-07-03 07:34:24 +02:00
Gunther De Wachter 4679b0ee61 Forgot to add this file for the Named Inventories fix. 2017-07-03 06:56:03 +02:00
Gunther De Wachter 890eef1803 Update MCP Mappings to stable_32
Some mapping updates are just straight up weird. 20170516 -> isBlockSolid, 20170517 -> causesDownwardCurrent
2017-07-03 06:54:45 +02:00
Gunther De Wachter 780ce89ac3 Internal change to fix Named Inventories. This change will not affect the reobfed version (much). 2017-07-03 05:54:25 +02:00
Gunther De Wachter e96339dd2b Fix more items and unsafe checks that made items get deleted. 2017-07-02 07:44:21 +02:00
Gunther De Wachter b67d7eed82 Fixed tools getting deleted when being used in off-hand. 2017-07-02 07:33:16 +02:00
Gunther De Wachter 5ebd8452bf Fixed another crash from the Entropy Manipulator.
I have no words for this one.
2017-07-02 06:57:40 +02:00
Gunther De Wachter ee774cd3f8 Even more null fixes. 2017-07-02 06:43:33 +02:00
Gunther De Wachter 0a2f90d115 Fixed Entropy Manipulator crash. 2017-07-02 06:17:23 +02:00
Gunther De Wachter 0f86efa3f5 Added workaround for dispenser logic. 2017-07-02 06:05:43 +02:00
Gunther De Wachter 7398af0e1c Add an ease of use tooltip to the creative cell. Displays the items provided/formatted by the cell. 2017-07-02 05:26:37 +02:00
Gunther De Wachter eb0b304fd9 Even more null fixes. 2017-07-02 04:13:49 +02:00
Gunther De Wachter c455ee69b8 When not shifting an encoded item pattern item should let the right click through. 2017-07-02 04:11:26 +02:00
Gunther De Wachter 820a6bdbd6 Fixed the ME system not finding any Crafting CPU's.
Might have to rework it a bit later. looks kind of ugly like this.
2017-07-01 09:08:43 +02:00
Gunther De Wachter 7a8499c455 Fixed tools not working due to a change in the onItemUse method fields in ItemStack.java
I will have to fix the dispenser logic. Manually right clicking works.
2017-06-30 19:17:06 +02:00
Gunther De Wachter 76f17ba53c Fixed Network Tool crashing on null ItemStacks. 2017-06-30 18:35:38 +02:00
Gunther De Wachter 16a0872d06 Fixed Crafting Multiblocks not forming. I accidentally used the wrong subclass to define the StorageTiles here. 2017-06-30 18:16:02 +02:00
Gunther De Wachter 49a87f62ce More null's and cosmetic fixes. 2017-06-30 17:30:03 +02:00
Gunther De Wachter c382ab7300 Made the SkyChestTE's class names more in line with the other ones. 2017-06-30 17:25:02 +02:00
Gunther De Wachter 49a6df5bc7 Fixed up the Tile Entity mess a bit, still need to look at the CableBus stuff a bit though. 2017-06-30 17:22:06 +02:00
Gunther De Wachter 10e050c35b Fixed potential memory leak in the UI code. 2017-06-30 17:17:34 +02:00
Gunther De Wachter b1e249aad0 Fixed Color Applicator not accepting dyes as valid items 2017-06-29 11:34:39 +02:00
Gunther De Wachter d3bb71d834 Fixed JEI clearing the search bar. That last commit was pushed a bit too hastily. 2017-06-29 10:40:47 +02:00
Gunther De Wachter 3f7051ec8e Fixed clearing of the search bar when looking at recipes
Why mezz why...
2017-06-29 10:30:14 +02:00
Gunther De Wachter 2f1f19bbb3 Fixed ResourceLocation for the items and seeds. 2017-06-29 06:34:02 +02:00
yueh 4c7f065af3 Fixes #2729: Fix transformer regression introduced during FG downtime. (#2730)
Added a unittest to verify the necessary string returns match the actual
existing classes, in case something screws up the refactoring.
2017-06-29 06:00:23 +02:00
yueh 6c52f31686 Replaces old fluid handlers with the new capability based ones. (#2727)
* Changed ME Chest and P2P tunnels to use fluid capabilities.
* Renamed all occurrences of liquid to fluids.
2017-06-29 05:57:43 +02:00
Gunther De Wachter 3ac7e518b1 Fixed compile error from cherry-picked commit. 2017-06-29 05:47:51 +02:00
yueh af85a2bf67 Fixes #2713: Call super#onBlockActivated() for wrench interaction. (#2728) 2017-06-29 05:39:31 +02:00
Gunther De Wachter c4b4a257f3 Removed old ASMIntegration file, the rename didn't get picked up by the cherry-pick 2017-06-29 05:39:11 +02:00
yueh 4eba3bca5b Fixes IDE not correctly cleaning up the list of staged files. 2017-06-29 05:35:50 +02:00
yueh cd78586910 Fixes #2768: Incorrect return value when charging items via Tesla. (#2771) 2017-06-29 05:26:00 +02:00
Gunther De Wachter 178198b0c6 Fixed render issue with cables/certain blocks on a specific side. 2017-06-29 04:16:35 +02:00
Gunther De Wachter bdf46a6ee2 Fixed hoppers continuing to insert when they shouldn't into inscribers. Thanks @fscan
Original pull request : #2933
2017-06-28 18:11:11 +02:00
Gunther De Wachter 0be2011645 Fixed blank patterns in the pattern terminal not decreasing when encoding a pattern. 2017-06-28 06:21:11 +02:00
Gunther De Wachter bce500616c Fixed exception being thrown when placing last item of a stack of parts. 2017-06-28 06:19:17 +02:00
Gunther De Wachter e022c23c8f Fixed crash on startup. Apparently there's still null's lurking in the code. 2017-06-27 20:52:56 +02:00
Gunther De Wachter 61b81fc802 Fix facade recipes. Hopefully the last null check fix. 2017-06-27 20:39:06 +02:00
Gunther De Wachter b819fe4adb Fixed "Air" tooltip displaying in the interface terminal. More missed null checks. 2017-06-27 18:00:55 +02:00
Gunther De Wachter 66a797dd7c Fixed grindstone not working with crank due to missed null checks. 2017-06-27 17:20:13 +02:00
Gunther De Wachter 99c294e948 More aesthetic and typo fixes. 2017-06-27 04:04:48 +02:00
Gunther De Wachter 6529de911a Code aesthetics and typo fixes. 2017-06-26 16:35:50 +02:00
Gunther De Wachter 650edae902 More ItemStack null changes. 2017-06-26 07:07:04 +02:00
Gunther De Wachter 78904204cf Fixed inscriber not starting due to vanilla changes. 2017-06-26 07:06:19 +02:00
Gunther De Wachter df7ab00c37 Fixed a null check when the array wasn't initialised yet. I should fix this up in the future though. 2017-06-26 05:43:08 +02:00
Gunther De Wachter 5432decf95 Fix items showing up as craftable when they weren't after taking out the last one. 2017-06-26 05:42:21 +02:00
Gunther De Wachter da5879b667 First batch of null -> isEmpty() checks.
I most likely still missed a ton of checks...
2017-06-26 05:15:25 +02:00
Gunther De Wachter 370fc49357 Temporary (?) hacky fix to display the craftable items
This is kind of a hackjob IMO but it saves me the trouble of possibly rewriting large portions of either the AE codebase or ASM'ing the vanilla classes.
2017-06-25 18:01:30 +02:00
Gunther De Wachter c74aaddbd3 Fixed texture issue for the crafting window. 2017-06-24 16:50:26 +02:00
Gunther De Wachter 1a4db4b8d7 Fixed taking items out of the AE system
Same issue as last commit. ItemStacks with a count of 0 get "nullified".
2017-06-24 16:45:28 +02:00
Gunther De Wachter d77d21858e Fixed manually crafting items
This can hopefully be done in a more sensible fashion later.
2017-06-24 15:51:03 +02:00
Gunther De Wachter 42bfc549be Fixed drawing of items in storage.
An ItemStack count of 0 trips the check for isEmpty and hence doesn't give us the item we want.
2017-06-24 15:01:06 +02:00
Gunther De Wachter c6bdf845a8 Add a temporary (?) method to register the TileEntities because the Forge method changed from 1.10 to 1.11.2. 2017-06-03 00:53:32 +02:00
Gunther De Wachter ccc46e77a3 Fix the coremod looking for the wrong minecraft version 2017-06-03 00:01:01 +02:00
Gunther De Wachter 7e45cf0e37 Add the remainder of the WAILA/IC2 disable comments for now while we focus on fixing the core mod 2017-06-02 23:57:57 +02:00
Gunther De Wachter 86dd8193f7 Add/Change some missing code for the 1.11.2 upgrade 2017-06-02 23:55:31 +02:00
Gunther De Wachter 5fff8310d6 Update gradle and dependencies for 1.11.2 2017-06-02 23:37:27 +02:00
yueh 1cde7bc933 Changed to Null ItemStack instead of null. 2016-12-21 20:38:37 +01:00
yueh ed9e6dd21c Port to 1.11 2016-12-21 20:38:36 +01:00
2024 changed files with 69374 additions and 35160 deletions
+11 -6
View File
@@ -12,15 +12,18 @@ top of things.
Applied Energistics 2 crashing, have a suggestion, found a bug? Create an issue now!
1. Make sure your issue has not already been answered or fixed and you are using the latest version. Also think about whether your issue is a valid one before submitting it.
* If it is already possible with vanilla and AE2 itself, the suggestion will be considered invalid.
* Asking for a smaller version, more compact version, or more efficient version of something will also be considered invalid.
2. Go to [the issues page](https://github.com/AppliedEnergistics/Applied-Energistics-2/issues) and click [new issue](https://github.com/AppliedEnergistics/Applied-Energistics-2/issues/new)
3. Enter your a title of your issue (something that summarizes your issue), and then create a detailed description of the issue.
* Do not tag it with something like `[Feature]` or `[Bug]`. When it is applicable, we will take care of it.
* The following details are required. Not including them can cause the issue to be closed.
* Do not tag it with something like `[Feature]`, `[Bug]`, or a version.
* Restrict it to a single bug or feature, it makes managing them way easier for us.
* The following details are required. Also refer to the issue template when creating one.
* Forge version
* AE2 version
* Crash log, when reporting a crash (Please make sure to use [pastebin](http://pastebin.com/))
* Do not post an excerpt of what you consider important, instead:
* Post the full log
* Never post an excerpt of what you consider important
* Always post the full log
* Other mods and their version, when reporting an issue between AE and another mod
* Also consider updating these before submitting a new issue, it might be already fixed
* A detailed description of the bug or feature
@@ -33,10 +36,12 @@ Applied Energistics 2 crashing, have a suggestion, found a bug? Create an issue
* Mod Pack using and version?
* Keep in mind that some mods might use an outdated version of AE2
* If so you should report it to your modpack
5. Click `Submit New Issue`, and wait for feedback!
4. Click `Submit New Issue`, and wait for feedback!
Providing as many details as possible does help us to find and resolve the issue faster and also you getting a fixed version as fast as possible.
Please note that we might close any issue not matching these requirements.
### Submitting Changes
* Submit an issue to the github project, assuming one does not already exist.
@@ -108,7 +113,7 @@ the styling guidelines used by AE.
PRs that do not conform to these standards will be rejected.
You can find presets for Eclipse and IntelliJ IDEA in the `codeformat` folder.
We try to keep them up to date, but in case you find them not formatting it correctly, then please report it
We try to keep them up to date. Please report any case of maintaining the correct formatting.
### Whitespace
+30
View File
@@ -0,0 +1,30 @@
---
name: Bug report
about: You found a bug or encountered a crash? Please report it here.
---
<!-- Provide a summary of the issue in the Title above, please do not "[Tag]" it. -->
**Describe the bug**
<!-- Always use the most recent version from ae-mod.info, it might already be fixed. -->
**To Reproduce**
<!-- Please provide the steps to reproduce it, otherwise we might not be able to fix it. -->
**Expected behavior**
<!-- A clear and concise description of what you expected to happen. -->
**Additional context**
<!-- Screenshots, crashlogs, etc. -->
<!-- A complete crashlog is required when reporting a crash. No excerpts. -->
<!-- Please use pastebin or gist for posting the complete crashlog. -->
**Environment**
<!-- Include as many relevant details about the environment -->
<!-- Like the used version, SP/MP, other mods and their version -->
<!-- The following ones are required, please note "latest" is not a version -->
- Minecraft Version:
- AE2 Version:
- Forge Version:
+17
View File
@@ -0,0 +1,17 @@
---
name: Feature Request
about: A feature request or suggestion to improve Applied Energistics 2
---
<!-- Provide a summary of the issue in the Title above, please do not "[Tag]" it. -->
**Describe the feature**
<!-- Tell us how it should work. -->
**Reasons why it should be considered**
<!-- This can help us in various degrees, e.g. to determine if it fits our design ideas. -->
**Additional Context**
<!-- Use this for further details, e.g. screenshots, links to mods for integrations. -->
<!-- Features will only be considered for the latest/next version. -->
+15
View File
@@ -0,0 +1,15 @@
name: 'Lock threads'
on:
schedule:
- cron: '0 0 * * *'
jobs:
lock:
runs-on: ubuntu-latest
steps:
- uses: dessant/lock-threads@v2
with:
github-token: ${{ github.token }}
issue-lock-inactive-days: '180'
pr-lock-inactive-days: '180'
+19 -6
View File
@@ -7,14 +7,27 @@ jdk:
- openjdk8
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
- rm -f $HOME/.gradle/caches/minecraft/deobfedDeps/providedDummy.jar
- rm -f $HOME/.gradle/caches/minecraft/deobfedDeps/compileDummy.jar
- rm -f $HOME/.gradle/caches/minecraft/ForgeVersion.json
- rm -f $HOME/.gradle/caches/minecraft/ForgeVersion.json.etag
- rm -fr $HOME/.gradle/caches/minecraft/deobfedDeps
- rm -f $HOME/.gradle/caches/*/fileHashes/fileHashes.bin
- rm -f $HOME/.gradle/caches/*/fileHashes/fileHashes.lock
cache:
directories:
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/
- '$HOME/.m2/repository'
- '$HOME/.sonar/cache'
- '$HOME/.gradle/wrapper'
- '$HOME/.gradle/caches'
addons:
sonarcloud:
organization: "appliedenergistics"
install: "./gradlew setupCIWorkspace"
script: "./gradlew build test"
script:
- "./gradlew build"
- "./gradlew test"
- "./gradlew sonarqube"
+8 -170
View File
@@ -1,191 +1,29 @@
[![Travis](https://img.shields.io/travis/AppliedEnergistics/Applied-Energistics-2.svg?maxAge=2592000&style=flat-square)](https://travis-ci.org/AppliedEnergistics/Applied-Energistics-2)
[![Latest Release](https://img.shields.io/github/release/AppliedEnergistics/Applied-Energistics-2.svg?label=Latest Release&style=flat-square)](https://github.com/AppliedEnergistics/Applied-Energistics-2/releases)
This is a fork of AE2 i made for trying to solve issues for the [Omnifactory](https://www.curseforge.com/minecraft/modpacks/omnifactory) modpack.
# Applied Energistics 2
See https://github.com/PrototypeTrousers/Applied-Energistics-2/tree/AE2-Omnifactory branch for commits
and
https://github.com/PrototypeTrousers/Applied-Energistics-2/releases for the compiled jars.
## Table of Contents
* [About](#about)
* [Contacts](#contacts)
* [License](#license)
* [Downloads](#downloads)
* [Nightly Builds](#nightly-builds)
* [Installation](#installation)
* [Issues](#issues)
* [Building](#building)
* [Contribution](#contribution)
* [API](#applied-energistics-2-api)
* [Localization](#applied-energistics-2-localization)
* [Credits](#credits)
# Applied Energistics 2 (PrototypeTrousers fork for Omnifactory)
## About
A Mod about Matter, Energy and using them to conquer the world..
## Contacts
* [Website](http://ae-mod.info/)
* [IRC #appliedenergistics on esper.net](http://webchat.esper.net/?channels=appliedenergistics&prompt=1)
* [GitHub](https://github.com/AppliedEnergistics/Applied-Energistics-2)
## License
* Applied Energistics 2 API
- (c) 2013 - 2015 AlgorithmX2 et al
- (c) 2013 - 2018 AlgorithmX2 et al
- [![License](https://img.shields.io/badge/License-MIT-red.svg?style=flat-square)](http://opensource.org/licenses/MIT)
* Applied Energistics 2
- (c) 2013 - 2015 AlgorithmX2 et al
- (c) 2013 - 2018 AlgorithmX2 et al
- [![License](https://img.shields.io/badge/License-LGPLv3-blue.svg?style=flat-square)](https://raw.githubusercontent.com/AppliedEnergistics/Applied-Energistics-2/rv2/LICENSE)
* Textures and Models
- (c) 2013 - 2015 AlgorithmX2 et al
- (c) 2013 - 2018 AlgorithmX2 et al
- [![License](https://img.shields.io/badge/License-CC%20BY--NC--SA%203.0-yellow.svg?style=flat-square)](https://creativecommons.org/licenses/by-nc-sa/3.0/)
* Text and Translations
- [![License](https://img.shields.io/badge/License-No%20Restriction-green.svg?style=flat-square)](https://creativecommons.org/publicdomain/zero/1.0/)
## Downloads
Downloads can be found on [CurseForge](http://www.curse.com/mc-mods/minecraft/223794-applied-energistics-2) or on the [official website](http://ae-mod.info/Downloads/).
## Nightly Builds
[![Build status](https://ci.appveyor.com/api/projects/status/w0sg7upakn0vj5gc?svg=true)](https://ci.appveyor.com/project/shartte/applied-energistics-2/history)
[Download Latest Nightly Build](https://ci.appveyor.com/api/projects/shartte/applied-energistics-2/artifacts/ae2-rv4-nightly.zip?branch=master)
Nightly builds for the Minecraft 1.10.2 branch of AE2 (rv4-alpha) are available from [AppVeyor](https://ci.appveyor.com/project/shartte/applied-energistics-2/history). These builds are only for testing purposes and might lead to loss of data, and will contain significant bugs. Please see below on how you can report bugs you find during testing.
## Installation
You install this mod by putting it into the `minecraft/mods/` folder. It has no additional hard dependencies.
## Issues
Applied Energistics 2 crashing, have a suggestion, found a bug? Create an issue now!
1. Make sure your issue has not already been answered or fixed and you are using the latest version. Also think about whether your issue is a valid one before submitting it.
2. Go to [the issues page](https://github.com/AppliedEnergistics/Applied-Energistics-2/issues) and click [new issue](https://github.com/AppliedEnergistics/Applied-Energistics-2/issues/new)
3. Enter your a title of your issue (something that summarizes your issue), and then create a detailed description of the issue.
* Do not tag it with something like `[Feature]` or `[Bug]`. When it is applicable, we will take care of it.
* The following details are required. Not including them can cause the issue to be closed.
* Forge version
* AE2 version
* Crash log, when reporting a crash (Please make sure to use [pastebin](http://pastebin.com/))
* Do not post an excerpt of what you consider important, instead:
* Post the full log
* Other mods and their version, when reporting an issue between AE and another mod
* Also consider updating these before submitting a new issue, it might be already fixed
* A detailed description of the bug or feature
* To further help in resolving your issues please try to include the follow if applicable:
* What was expected?
* How to reproduce the problem?
* This is usually a great detail and allows us to fix it way faster
* Server or Single Player?
* Screen shots or Pictures of the problem
* Mod Pack using and version?
* Keep in mind that some mods might use an outdated version of AE2
* If so you should report it to your modpack
5. Click `Submit New Issue`, and wait for feedback!
Providing as many details as possible does help us to find and resolve the issue faster and also you getting a fixed version as fast as possible.
## Building
1. Clone this repository via
- SSH `git clone git@github.com:AppliedEnergistics/Applied-Energistics-2.git` or
- HTTPS `git clone https://github.com/AppliedEnergistics/Applied-Energistics-2.git`
2. Setup workspace
- Decompiled source `gradlew setupDecompWorkspace`
- Obfuscated source `gradlew setupDevWorkspace`
- CI server `gradlew setupCIWorkspace`
3. Build `gradlew build`. Jar will be in `build/libs`
4. For core developer: Setup IDE
- IntelliJ: Import into IDE, execute `gradlew genIntellijRuns` and change RunConfiguration to `*_main` as quickfix for [ForgeGradle](https://github.com/MinecraftForge/ForgeGradle/issues/357)
- Eclipse: execute `gradlew eclipse`
5. For add-on developer: Core-Mod Detection
- In order to have FML detect AE from your dev environment, add the following VM Option to your run profile
- `-Dfml.coreMods.load=appeng.coremod.AppEngCore`
## Contribution
Before you want to add major changes, you might want to discuss them with us first, before wasting your time.
If you are still willing to contribute to this project, you can contribute via [Pull-Request](https://help.github.com/articles/creating-a-pull-request).
The [guidelines for contributing](https://github.com/AppliedEnergistics/Applied-Energistics-2/blob/master/CONTRIBUTING.md) contain more detailed information about topics like the used code style and should also be considered.
Here are a few things to keep in mind that will help get your PR approved.
* A PR should be focused on content. Any PRs where the changes are only syntax will be rejected.
* Use the file you are editing as a style guide.
* Consider your feature. [Suggestion Guidelines](http://ae-mod.info/Suggestion-Guidelines/)
- Is your suggestion already possible using Vanilla + AE2?
- Make sure your feature isn't already in the works, or hasn't been rejected previously.
- Does your feature simplify another feature of AE2? These changes will not be accepted.
- If your feature can be done by any popular mod, discuss with us first.
Getting Started
1. Fork this repository
2. Clone the fork via
* SSH `git clone git@github.com:<your username>/Applied-Energistics-2.git` or
* HTTPS `git clone https://github.com/<your username>/Applied-Energistics-2.git`
3. Change code base
4. Add changes to git `git add -A`
5. Commit changes to your clone `git commit -m "<summery of made changes>"`
6. Push to your fork `git push`
7. Create a Pull-Request on GitHub
8. Wait for review
9. Squash commits for cleaner history
If you are only doing single file pull requests, GitHub supports using a quick way without the need of cloning your fork. Also read up about [synching](https://help.github.com/articles/syncing-a-fork) if you plan to contribute on regular basis.
## Applied Energistics 2 API
The API for Applied Energistics 2. It is open source to discuss changes, improve documentation, and provide better add-on support in general.
Development and standard builds can be obtained [Here](http://ae2.ae-mod.info/Downloads/).
### Maven
When compiling against the AE2 API you can use gradle dependencies, just add
dependencies {
compile "appeng:appliedenergistics2:rv_-_____-__:dev"
}
or add the compile line to your existing dependencies task to your build.gradle
Where the __ are filled in with the correct version criteria; AE2 is available from the default forge maven so no additional repositories are necessary.
An example string would be `appeng:appliedenergistics2:rv2-alpha-30:dev`
## Applied Energistics 2 Localization
### English Text
`en_US` is included in this repository, fixes to typos are welcome.
### Encoding
Files must be encoded as UTF-8.
### New or updated Translations
The language files are located in `/src/main/resources/assets/appliedenergistics2/lang/` and use the [appropriate locale code](http://minecraft.gamepedia.com/Language) as name and `.lang` as extension.
To update an translation edit the corresponding file and improve/correct the existing entry. Or copy any entries from `en_US.lang` for missing translation.
To create a new translation, copy the contents of `en_US.lang`, create a new file with appropriate filename, and translate it to your language.
Please keep in mind that we use [String format](https://docs.oracle.com/javase/8/docs/api/java/util/Formatter.html) to pass additional data to the text for displaying.
Therefore you should preserve parts like `%s` or `%1$d%%`, which allows us to replace them with the correct values while you still have the option to change their order for match the rules of grammar.
This might not be possible for some languages. Should this be the case, please contact us.
### Final Note
If you have have issues localizing something feel free to contact us on IRC, at #AppliedEnergistics on Esper.net
Thanks to everyone helping out to improve localization of AE2.
## Credits
Thanks to
+15 -19
View File
@@ -27,10 +27,16 @@ buildscript {
}
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:2.2-SNAPSHOT'
classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT'
}
}
plugins {
id "org.sonarqube" version "2.6"
}
apply plugin: 'net.minecraftforge.gradle.forge'
apply plugin: 'jacoco'
repositories {
mavenLocal()
@@ -45,14 +51,19 @@ apply from: 'gradle/scripts/optional.gradle'
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
version = aeversion + "-" + aechannel + "-" + aebuild
// ensure everything uses UTF-8 and not some random codepage chosen by gradle
compileJava.options.encoding = 'UTF-8'
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
version = aeversion + "-" + aechannel + "-" + aebuild + " " + trousers
group = aegroup
archivesBaseName = aebasename
// Add Coremod Manifest
jar {
manifest {
attributes 'FMLCorePluginContainsFMLMod': 'true'
attributes 'FMLAT': 'appeng_at.cfg'
}
@@ -68,8 +79,6 @@ jar {
}
minecraft {
coreMod = "appeng.coremod.AppEngCore"
version = minecraft_version + "-" + forge_version
replaceIn "AEConfig.java"
@@ -86,21 +95,8 @@ minecraft {
}
sourceSets {
api
// This source set will contain third party API code that we need to compile, but which is not shipped with the jar
thirdparty {
// Third Party APIs often need access to Minecraft classes (i.e. EnumFacing), so set this up here
compileClasspath += configurations.forgeGradleMc + configurations.forgeGradleMcDeps
}
main
}
dependencies {
compile sourceSets.thirdparty.output
}
processResources
@@ -122,4 +118,4 @@ processResources
// move access transformer to META-INF
rename '(.+_at.cfg)', 'META-INF/$1'
}
}
+27 -8
View File
@@ -1,24 +1,28 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<profiles version="12">
<profile kind="CodeFormatterProfile" name="AE2" version="12">
<profiles version="13">
<profile kind="CodeFormatterProfile" name="AE2" version="13">
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_ellipsis" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_for_statment" value="common_lines"/>
<setting id="org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_method_invocation" value="common_lines"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_imports" value="2"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_switch_statement" value="common_lines"/>
<setting id="org.eclipse.jdt.core.formatter.comment.format_javadoc_comments" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.indentation.size" value="4"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_enum_constant_declaration" value="common_lines"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits" value="do not insert"/>
@@ -26,17 +30,19 @@
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.disabling_tag" value="@formatter:off"/>
<setting id="org.eclipse.jdt.core.formatter.continuation_indentation" value="2"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_enum_constants" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_enum_constants" value="80"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_imports" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_package" value="2"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_binary_operator" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_if_while_statement" value="common_lines"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.indent_root_tags" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.enabling_tag" value="@formatter:on"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.count_line_length_from_starting_position" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter" value="do not insert"/>
@@ -52,14 +58,16 @@
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameterized_type_references" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_enum_constant" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column" value="false"/>
<setting id="org.eclipse.jdt.core.compiler.problem.enumIdentifier" value="error"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.indent_statements_compare_to_block" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration" value="end_of_line"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration" value="next_line"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments" value="do not insert"/>
@@ -82,6 +90,7 @@
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_binary_expression" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_catch_clause" value="common_lines"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations" value="insert"/>
@@ -93,15 +102,16 @@
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_block" value="next_line"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration" value="next_line"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_lambda_body" value="end_of_line"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_lambda_body" value="next_line"/>
<setting id="org.eclipse.jdt.core.formatter.compact_else_if" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_type_parameters" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration" value="0"/>
<setting id="org.eclipse.jdt.core.compiler.problem.assertIdentifier" value="error"/>
<setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment" value="true"/>
@@ -112,9 +122,10 @@
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_binary_operator" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_unary_operator" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_annotation" value="common_lines"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_ellipsis" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources" value="do not insert"/>
@@ -153,15 +164,18 @@
<setting id="org.eclipse.jdt.core.formatter.alignment_for_method_declaration" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.join_wrapped_lines" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.wrap_before_conditional_operator" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines" value="2147483647"/>
<setting id="org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration" value="next_line"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_resources_in_try" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_try_clause" value="common_lines"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation" value="80"/>
<setting id="org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column" value="false"/>
<setting id="org.eclipse.jdt.core.compiler.source" value="1.8"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized" value="insert"/>
@@ -183,6 +197,7 @@
<setting id="org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.wrap_before_assignment_operator" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement" value="do not insert"/>
<setting id="org.eclipse.jdt.core.compiler.codegen.targetPlatform" value="1.8"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_switch" value="next_line"/>
@@ -194,8 +209,10 @@
<setting id="org.eclipse.jdt.core.formatter.comment.format_html" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_method_delcaration" value="common_lines"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_compact_if" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.indent_empty_lines" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_type_arguments" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_unary_operator" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant" value="do not insert"/>
@@ -256,6 +273,7 @@
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_lambda_declaration" value="common_lines"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations" value="do not insert"/>
@@ -271,6 +289,7 @@
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_expressions_in_for_loop_header" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments" value="do not insert"/>
+22 -11
View File
@@ -1,25 +1,36 @@
aeversion=rv4
aechannel=alpha
aebuild=0
aeversion=rv6
aechannel=stable
aebuild=7
aegroup=appeng
aebasename=appliedenergistics2
trousers=omni-fixes-v21b
#########################################################
# Versions #
#########################################################
minecraft_version=1.10.2
mcp_mappings=snapshot_20161111
forge_version=12.18.3.2185
minecraft_version=1.12.2
mcp_mappings=snapshot_20171003
forge_version=14.23.5.2847
#########################################################
# Installable #
#########################################################
waila_version=1.7.0-B3_1.9.4
hwyla_version=1.8.26-B41_1.12.2
#########################################################
# Provided APIs #
#########################################################
jei_version=3.13.6.391
tesla_version=1.10.2-1.2.1.50
ic2_version=2.6.99-ex110
top_version=1.10-1.3.3-41
jei_version=4.16.1.302
tesla_version=1.0.63
ic2_version=2.8.73-ex112
top_version=1.12-1.4.23-16
cofhcore_version=1.12.2-4.5.2.19
crafttweaker_version=4.1.8.9
inventorytweaks_version=1.63
ctm_version=MC1.12.2-0.3.1.16
#########################################################
# Deployment #
#########################################################
website_version=1.12.2
curse_versions=1.12.2
+24 -16
View File
@@ -24,36 +24,44 @@ allprojects {
}
javadoc {
options.encoding = 'UTF-8'
options.charSet = 'UTF-8'
options.encoding = 'UTF-8'
options.charSet = 'UTF-8'
}
task javadocs(type: Javadoc) {
source = sourceSets.api.java
include "appeng/api/**"
source = sourceSets.api.java
include "appeng/api/**"
// Due to ForgeGradle having to be a special snowflake,
// we have to add some custom configurations to the normal compile configuration and hope it does not break.
classpath = configurations.compile + configurations.forgeGradleMc + configurations.forgeGradleMcDeps
// Due to ForgeGradle having to be a special snowflake,
// we have to add some custom configurations to the normal compile configuration and hope it does not break.
classpath = configurations.compile + configurations.forgeGradleMc + configurations.forgeGradleMcDeps
}
task javadocJar(type: Jar, dependsOn: javadocs) {
from javadoc.destinationDir
classifier = 'javadoc'
classifier = 'javadoc'
}
task apiJar(type: Jar) {
from sourceSets.api.java
include "appeng/api/**"
from sourceSets.api.java
include "appeng/api/**"
from sourceSets.api.output
include "appeng/api/**"
from sourceSets.api.output
include "appeng/api/**"
classifier = 'api'
classifier = 'api'
}
task sourceJar(type: Jar, overwrite: true) {
from sourceSets.api.allSource
from sourceSets.main.allSource
classifier = 'sources'
}
artifacts {
archives apiJar
archives javadocJar
archives sourceJar
archives apiJar
archives javadocJar
archives sourceJar
}
+50 -6
View File
@@ -19,6 +19,11 @@
repositories {
mavenLocal()
maven {
name = "storagedrawers"
url = "https://dl.bintray.com/jaquadro/dev/"
}
maven {
name "Mobius"
url "http://mobiusstrip.eu/maven"
@@ -31,7 +36,7 @@ repositories {
maven {
name = "Tesla repo"
url "http://maven.epoxide.xyz"
url "http://maven.mcmoddev.com"
}
maven {
@@ -39,10 +44,40 @@ repositories {
url = "http://maven.ic2.player.to"
}
maven {
name = "CoFH Maven"
url = "http://maven.covers1624.net"
}
maven { // TheOneProbe
name 'tterrag maven'
url "http://maven.tterrag.com/"
}
maven { // McJtyLib
name 'mcjty'
url "http://maven.k-4u.nl/"
}
maven { // Hwyla
name 'tehnut'
url "http://tehnut.info/maven"
}
maven { // CraftTweaker
name 'jared maven'
url "http://maven.blamejared.com/"
}
//maven { // modmaven, maven proxy
// name 'modmaven'
// url "https://modmaven.k-4u.nl/"
//}
maven {
name = "CurseForge"
url = "https://minecraft.curseforge.com/api/maven/"
}
}
configurations {
@@ -50,20 +85,29 @@ configurations {
}
dependencies {
compileOnly "com.jaquadro.minecraft.storagedrawers:StorageDrawers:1.12.2-5.4.2:api"
compileOnly "gregtechce:gregtech:1.12.2:1.12.0.662"
// installable runtime dependencies
mods "mcp.mobius.waila:Waila:${waila_version}"
mods "mcp.mobius.waila:Hwyla:${hwyla_version}"
mods "net.industrial-craft:industrialcraft-2:${ic2_version}:dev"
mods "mcjty.theoneprobe:TheOneProbe:${top_version}"
mods "mcjty.theoneprobe:TheOneProbe-${minecraft_version}:${top_version}"
// compile against provided APIs
compileOnly "mezz.jei:jei_${minecraft_version}:${jei_version}:api"
compileOnly "mcp.mobius.waila:Waila:${waila_version}"
compileOnly "net.darkhax.tesla:Tesla:${tesla_version}"
compileOnly "mcp.mobius.waila:Hwyla:${hwyla_version}"
compileOnly "net.darkhax.tesla:Tesla-1.12.2:${tesla_version}"
compileOnly "net.industrial-craft:industrialcraft-2:${ic2_version}:api"
compileOnly "mcjty.theoneprobe:TheOneProbe:${top_version}:api"
compileOnly "mcjty.theoneprobe:TheOneProbe-1.12:${top_version}:api"
compileOnly "cofh:CoFHCore:${cofhcore_version}:deobf"
compileOnly "CraftTweaker2:CraftTweaker2-API:${crafttweaker_version}"
compileOnly "inventory-tweaks:InventoryTweaks:${inventorytweaks_version}:api"
compileOnly "team.chisel.ctm:CTM:${ctm_version}"
// at runtime, use the full JEI jar
runtime "mezz.jei:jei_${minecraft_version}:${jei_version}"
runtime "com.jaquadro.minecraft.storagedrawers:StorageDrawers:1.12.2-5.4.2"
runtime "com.jaquadro.minecraft.chameleon:Chameleon:1.12-4.1.3"
// unit test dependencies
testCompile "junit:junit:4.12"
+6 -6
View File
@@ -20,15 +20,15 @@ task wrapper(type: Wrapper) {
gradleVersion = "2.14"
}
// WAILA
task installWaila(type: Copy, dependsOn: "deinstallWaila") {
// HWYLA
task installHwyla(type: Copy, dependsOn: "deinstallHwyla") {
from { configurations.mods }
include "**/*Waila*.jar"
include "**/*Hwyla*.jar"
into file(minecraft.runDir + "/mods")
}
task deinstallWaila(type: Delete) {
delete fileTree(dir: minecraft.runDir + "/mods", include: "*Waila*.jar")
task deinstallHwyla(type: Delete) {
delete fileTree(dir: minecraft.runDir + "/mods", include: "*Hwyla*.jar")
}
// IC2
@@ -43,7 +43,7 @@ task deinstallIC2(type: Delete) {
}
// TOP
task installTop(type: Copy, dependsOn: "deinstallTop") {
task installTop(type: Copy, dependsOn: ["deinstallTop"]) {
from { configurations.mods }
include "**/*TheOneProbe*.jar"
into file(minecraft.runDir + "/mods")
Binary file not shown.
+1 -2
View File
@@ -1,6 +1,5 @@
#Fri Sep 16 14:56:32 CEST 2016
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.8-bin.zip
Vendored
+17 -9
View File
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/usr/bin/env sh
##############################################################################
##
@@ -33,11 +33,11 @@ DEFAULT_JVM_OPTS=""
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
warn ( ) {
warn () {
echo "$*"
}
die ( ) {
die () {
echo
echo "$*"
echo
@@ -154,11 +154,19 @@ if $cygwin ; then
esac
fi
# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
function splitJvmOpts() {
JVM_OPTS=("$@")
# Escape application args
save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
APP_ARGS=$(save "$@")
exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
cd "$(dirname "$0")"
fi
exec "$JAVACMD" "$@"
Vendored
-6
View File
@@ -49,7 +49,6 @@ goto fail
@rem Get command-line arguments, handling Windows variants
if not "%OS%" == "Windows_NT" goto win9xME_args
if "%@eval[2+2]" == "4" goto 4NT_args
:win9xME_args
@rem Slurp the command line arguments.
@@ -60,11 +59,6 @@ set _SKIP=2
if "x%~1" == "x" goto execute
set CMD_LINE_ARGS=%*
goto execute
:4NT_args
@rem Get arguments from the 4NT Shell from JP Software
set CMD_LINE_ARGS=%$
:execute
@rem Setup the command line
+13 -21
View File
@@ -25,13 +25,13 @@ package appeng.api;
import appeng.api.definitions.IDefinitions;
import appeng.api.exceptions.FailedConnection;
import appeng.api.features.IRegistryContainer;
import appeng.api.networking.IGridBlock;
import appeng.api.networking.IGridConnection;
import appeng.api.networking.IGridHelper;
import appeng.api.networking.IGridNode;
import appeng.api.parts.IPartHelper;
import appeng.api.storage.IStorageHelper;
import appeng.api.util.IClientHelper;
@AEInjectable
public interface IAppEngApi
@@ -42,36 +42,28 @@ public interface IAppEngApi
IRegistryContainer registries();
/**
* @return helper for working with storage data types.
* @return A helper for working with storage data types.
*/
IStorageHelper storage();
/**
* @return helper for working with grids, and buses.
* @return A helper to create {@link IGridNode} and other grid related objects.
*/
IGridHelper grid();
/**
* @return A helper for working with grids, and buses.
*/
IPartHelper partHelper();
/**
* @return an accessible list of all AE definitions
* @return An accessible list of all AE definitions
*/
IDefinitions definitions();
/**
* create a grid node for your {@link appeng.api.networking.IGridHost}
*
* @param block grid block
*
* @return grid node of block
* @return Utility methods primarily useful for client side stuff
*/
IGridNode createGridNode( IGridBlock block );
IClientHelper client();
/**
* create a connection between two {@link appeng.api.networking.IGridNode}
*
* @param a to be connected gridnode
* @param b to be connected gridnode
*
* @throws appeng.api.exceptions.FailedConnection
*/
IGridConnection createGridConnection( IGridNode a, IGridNode b ) throws FailedConnection;
}
@@ -1,64 +0,0 @@
/*
* The MIT License (MIT)
*
* Copyright (c) 2013 AlgorithmX2
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package appeng.api.client;
import java.util.List;
import com.google.common.collect.ImmutableList;
import net.minecraft.block.state.IBlockState;
import net.minecraft.client.renderer.block.model.IBakedModel;
import net.minecraft.util.EnumFacing;
/**
* TODO: Needs to be moved to an internal class. API is only allowed to contain interfaces and/or data.
*
* @deprecated
*/
@Deprecated
public class BakingPipeline<F, T> implements BakingPipelineElement<F, T>
{
private final ImmutableList<BakingPipelineElement<?, ?>> pipeline;
public BakingPipeline( BakingPipelineElement<?, ?>... pipeline )
{
this.pipeline = ImmutableList.copyOf( pipeline );
}
/**
* TODO: fix generics
*/
@Override
public List pipe( List things, IBakedModel parent, IBlockState state, EnumFacing side, long rand )
{
for( BakingPipelineElement pipe : pipeline )
{
things = pipe.pipe( things, parent, state, side, rand );
}
return things;
}
}
@@ -1,39 +0,0 @@
/*
* The MIT License (MIT)
*
* Copyright (c) 2013 AlgorithmX2
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package appeng.api.client;
import java.util.List;
import net.minecraft.block.state.IBlockState;
import net.minecraft.client.renderer.block.model.IBakedModel;
import net.minecraft.util.EnumFacing;
public interface BakingPipelineElement<F, T>
{
public List<T> pipe( List<F> elements, IBakedModel parent, IBlockState state, EnumFacing side, long rand );
}
@@ -26,5 +26,20 @@ package appeng.api.config;
public enum ActionItems
{
WRENCH, CLOSE, STASH, ENCODE, SUBSTITUTION
WRENCH,
CLOSE,
STASH,
ENCODE,
SUBSTITUTION,
MULTIPLY_BY_TWO,
MULTIPLY_BY_THREE,
INCREASE_BY_ONE,
DIVIDE_BY_TWO,
DIVIDE_BY_THREE,
DECREASE_BY_ONE,
MAX_COUNT,
FREE_MOLECULAR_SLOT_SHORTCUT,
TOGGLE_SHOW_FULL_INTERFACES_ON,
TOGGLE_SHOW_FULL_INTERFACES_OFF,
HIGHLIGHT_INTERFACE
}
+31 -11
View File
@@ -23,18 +23,38 @@
package appeng.api.config;
public enum FuzzyMode {
/**
* Matches any item from undamaged to including 0% durability, but not negative durability (where item damage
* exceeds maxdamage).
*/
IGNORE_ALL(-1),
/**
* Matches items that have less than 100% durability (that is, at least 1 damage point) if a damaged item is used as
* the filter, or undamaged items otherwise.
*/
PERCENT_99(0),
/**
* If an item with less than 75% durability is used as the filter, items with less than 75% durability are matched.
* Otherwise items with 75% durability or more are matched.
*/
PERCENT_75(25),
/**
* If an item with less than 50% durability is used as the filter, items with less than 50% durability are matched.
* Otherwise items with 50% durability or more are matched.
*/
PERCENT_50(50),
/**
* If an item with less than 25% durability is used as the filter, items with less than 50% durability are matched.
* Otherwise items with 25% durability or more are matched.
*/
PERCENT_25(75);
public enum FuzzyMode
{
// Note that percentage damaged, is the inverse of percentage durability.
IGNORE_ALL( -1 ),
PERCENT_99( 0 ),
PERCENT_75( 25 ),
PERCENT_50( 50 ),
PERCENT_25( 75 );
public final float breakPoint;
public final float percentage;
public final float breakPoint;
/**
* Note this is percentage "damaged". It's the inverse of percentage durability.
*/
public final float percentage;
FuzzyMode( final float p )
{
@@ -26,5 +26,5 @@ package appeng.api.config;
public enum SearchBoxMode
{
AUTOSEARCH, MANUAL_SEARCH, JEI_AUTOSEARCH, JEI_MANUAL_SEARCH
AUTOSEARCH, AUTOSEARCH_KEEP, MANUAL_SEARCH, MANUAL_SEARCH_KEEP, JEI_AUTOSEARCH, JEI_AUTOSEARCH_KEEP, JEI_MANUAL_SEARCH, JEI_MANUAL_SEARCH_KEEP
}
+35 -11
View File
@@ -33,29 +33,53 @@ public enum Settings
{
LEVEL_EMITTER_MODE( EnumSet.allOf( LevelEmitterMode.class ) ),
REDSTONE_EMITTER( EnumSet.of( RedstoneMode.HIGH_SIGNAL, RedstoneMode.LOW_SIGNAL ) ), REDSTONE_CONTROLLED( EnumSet.allOf( RedstoneMode.class ) ),
REDSTONE_EMITTER( EnumSet.of( RedstoneMode.HIGH_SIGNAL, RedstoneMode.LOW_SIGNAL ) ),
REDSTONE_CONTROLLED( EnumSet.allOf( RedstoneMode.class ) ),
CONDENSER_OUTPUT( EnumSet.allOf( CondenserOutput.class ) ),
POWER_UNITS( EnumSet.allOf( PowerUnits.class ) ), ACCESS( EnumSet.of( AccessRestriction.READ_WRITE, AccessRestriction.READ, AccessRestriction.WRITE ) ),
POWER_UNITS( EnumSet.allOf( PowerUnits.class ) ),
SORT_DIRECTION( EnumSet.allOf( SortDir.class ) ), SORT_BY( EnumSet.allOf( SortOrder.class ) ),
ACCESS( EnumSet.of( AccessRestriction.READ_WRITE, AccessRestriction.READ, AccessRestriction.WRITE ) ),
SEARCH_TOOLTIPS( EnumSet.of( YesNo.YES, YesNo.NO ) ), VIEW_MODE( EnumSet.allOf( ViewItems.class ) ), SEARCH_MODE( EnumSet.allOf( SearchBoxMode.class ) ),
SORT_DIRECTION( EnumSet.allOf( SortDir.class ) ),
ACTIONS( EnumSet.allOf( ActionItems.class ) ), IO_DIRECTION( EnumSet.of( RelativeDirection.LEFT, RelativeDirection.RIGHT ) ),
SORT_BY( EnumSet.allOf( SortOrder.class ) ),
BLOCK( EnumSet.of( YesNo.YES, YesNo.NO ) ), OPERATION_MODE( EnumSet.allOf( OperationMode.class ) ),
SEARCH_TOOLTIPS( EnumSet.of( YesNo.YES, YesNo.NO ) ),
FULLNESS_MODE( EnumSet.allOf( FullnessMode.class ) ), CRAFT_ONLY( EnumSet.of( YesNo.YES, YesNo.NO ) ),
VIEW_MODE( EnumSet.allOf( ViewItems.class ) ),
FUZZY_MODE( EnumSet.allOf( FuzzyMode.class ) ), LEVEL_TYPE( EnumSet.allOf( LevelType.class ) ),
SEARCH_MODE( EnumSet.allOf( SearchBoxMode.class ) ),
TERMINAL_STYLE( EnumSet.of( TerminalStyle.TALL, TerminalStyle.SMALL ) ), COPY_MODE( EnumSet.allOf( CopyMode.class ) ),
ACTIONS( EnumSet.allOf( ActionItems.class ) ),
INTERFACE_TERMINAL( EnumSet.of( YesNo.YES, YesNo.NO ) ), CRAFT_VIA_REDSTONE( EnumSet.of( YesNo.YES, YesNo.NO ) ),
IO_DIRECTION( EnumSet.of( RelativeDirection.LEFT, RelativeDirection.RIGHT ) ),
STORAGE_FILTER( EnumSet.allOf( StorageFilter.class ) ), PLACE_BLOCK( EnumSet.of( YesNo.YES, YesNo.NO ) ),
BLOCK( EnumSet.of( YesNo.YES, YesNo.NO ) ),
OPERATION_MODE( EnumSet.allOf( OperationMode.class ) ),
FULLNESS_MODE( EnumSet.allOf( FullnessMode.class ) ),
CRAFT_ONLY( EnumSet.of( YesNo.YES, YesNo.NO ) ),
FUZZY_MODE( EnumSet.allOf( FuzzyMode.class ) ),
LEVEL_TYPE( EnumSet.allOf( LevelType.class ) ),
TERMINAL_STYLE( EnumSet.of( TerminalStyle.TALL, TerminalStyle.SMALL ) ),
COPY_MODE( EnumSet.allOf( CopyMode.class ) ),
INTERFACE_TERMINAL( EnumSet.of( YesNo.YES, YesNo.NO ) ),
CRAFT_VIA_REDSTONE( EnumSet.of( YesNo.YES, YesNo.NO ) ),
STORAGE_FILTER( EnumSet.allOf( StorageFilter.class ) ),
PLACE_BLOCK( EnumSet.of( YesNo.YES, YesNo.NO ) ),
SCHEDULING_MODE( EnumSet.allOf( SchedulingMode.class ) );
@@ -28,7 +28,7 @@ public enum TunnelType
{
ME, // Network Tunnel
IC2_POWER, // EU Tunnel
RF_POWER, // RF Tunnel
FE_POWER, // Forge Energy tunnel
REDSTONE, // Redstone Tunnel
FLUID, // Fluid Tunnel
ITEM, // Item Tunnel
+6 -2
View File
@@ -37,12 +37,16 @@ public enum Upgrades
/**
* Gold Tier Upgrades.
*/
CAPACITY( 0 ), REDSTONE( 0 ), CRAFTING( 0 ),
CAPACITY( 0 ),
REDSTONE( 0 ),
CRAFTING( 0 ),
/**
* Diamond Tier Upgrades.
*/
FUZZY( 1 ), SPEED( 1 ), INVERTER( 1 );
FUZZY( 1 ),
SPEED( 1 ),
INVERTER( 1 );
private final int tier;
private final Map<ItemStack, Integer> supportedMax = new HashMap<>();
@@ -148,6 +148,8 @@ public interface IBlocks
ITileDefinition iface();
ITileDefinition fluidIface();
ITileDefinition cellWorkbench();
ITileDefinition iOPort();
@@ -88,6 +88,14 @@ public interface IItems
IItemDefinition cell64k();
IItemDefinition fluidCell1k();
IItemDefinition fluidCell4k();
IItemDefinition fluidCell16k();
IItemDefinition fluidCell64k();
IItemDefinition spatialCell2();
IItemDefinition spatialCell16();
@@ -111,8 +111,6 @@ public interface IMaterials
IItemDefinition matterBall();
IItemDefinition ironNugget();
IItemDefinition certusQuartzCrystal();
IItemDefinition certusQuartzCrystalCharged();
@@ -136,4 +134,12 @@ public interface IMaterials
IItemDefinition qESingularity();
IItemDefinition blankPattern();
IItemDefinition fluidCell1kPart();
IItemDefinition fluidCell4kPart();
IItemDefinition fluidCell16kPart();
IItemDefinition fluidCell64kPart();
}
@@ -38,7 +38,9 @@ public interface IParts
AEColoredItemDefinition cableGlass();
AEColoredItemDefinition cableDense();
AEColoredItemDefinition cableDenseCovered();
AEColoredItemDefinition cableDenseSmart();
AEColoredItemDefinition lumenCableSmart();
@@ -46,7 +48,7 @@ public interface IParts
AEColoredItemDefinition lumenCableGlass();
AEColoredItemDefinition lumenCableDense();
AEColoredItemDefinition lumenDenseCableSmart();
IItemDefinition quartzFiber();
@@ -62,6 +64,8 @@ public interface IParts
IItemDefinition iface();
IItemDefinition fluidIface();
IItemDefinition levelEmitter();
IItemDefinition annihilationPlane();
@@ -76,11 +80,11 @@ public interface IParts
IItemDefinition p2PTunnelItems();
IItemDefinition p2PTunnelLiquids();
IItemDefinition p2PTunnelFluids();
IItemDefinition p2PTunnelEU();
// IItemDefinition p2PTunnelRF();
IItemDefinition p2PTunnelFE();
IItemDefinition p2PTunnelLight();
@@ -105,4 +109,18 @@ public interface IParts
IItemDefinition storageMonitor();
IItemDefinition conversionMonitor();
IItemDefinition fluidTerminal();
IItemDefinition fluidImportBus();
IItemDefinition fluidExportBus();
IItemDefinition fluidStorageBus();
IItemDefinition fluidLevelEmitter();
IItemDefinition fluidAnnihilationPlane();
IItemDefinition fluidFormationnPlane();
}
@@ -21,6 +21,8 @@ package appeng.api.exceptions;
public class CoreInaccessibleException extends RuntimeException
{
private static final long serialVersionUID = -7434641554655517242L;
public CoreInaccessibleException( final String message )
{
super( message );
@@ -37,7 +37,7 @@ import appeng.api.networking.IGridNode;
* @version rv3
* @since rv3
*/
public class ExistingConnectionException extends FailedConnection
public class ExistingConnectionException extends FailedConnectionException
{
private static final long serialVersionUID = 2975450379720353182L;
@@ -40,16 +40,16 @@ import appeng.api.networking.IGridNode;
* @version rv3
* @since rv0
*/
public class FailedConnection extends Exception
public class FailedConnectionException extends Exception
{
private static final long serialVersionUID = -2544208090248293753L;
public FailedConnection()
public FailedConnectionException()
{
}
public FailedConnection( String message )
public FailedConnectionException( String message )
{
super( message );
}
@@ -19,9 +19,11 @@
package appeng.api.exceptions;
public class MissingDefinition extends RuntimeException
public class MissingDefinitionException extends RuntimeException
{
public MissingDefinition( final String message )
private static final long serialVersionUID = -6547396584255825761L;
public MissingDefinitionException( final String message )
{
super( message );
}
@@ -24,12 +24,12 @@
package appeng.api.exceptions;
public class MissingIngredientError extends Exception
public class MissingIngredientException extends Exception
{
private static final long serialVersionUID = -998858343831371697L;
public MissingIngredientError( final String n )
public MissingIngredientException( final String n )
{
super( n );
}
@@ -24,12 +24,12 @@
package appeng.api.exceptions;
public class ModNotInstalled extends Exception
public class ModNotInstalledException extends Exception
{
private static final long serialVersionUID = -9052435206368425494L;
public ModNotInstalled( final String t )
public ModNotInstalledException( final String t )
{
super( t );
}
@@ -34,7 +34,7 @@ package appeng.api.exceptions;
* @version rv3
* @since rv3
*/
public class NullNodeConnectionException extends FailedConnection
public class NullNodeConnectionException extends FailedConnectionException
{
private static final long serialVersionUID = -2143719383495321764L;
@@ -24,12 +24,12 @@
package appeng.api.exceptions;
public class RecipeError extends Exception
public class RecipeException extends Exception
{
private static final long serialVersionUID = -6602870588617670262L;
public RecipeError( final String n )
public RecipeException( final String n )
{
super( n );
}
@@ -24,12 +24,12 @@
package appeng.api.exceptions;
public class RegistrationError extends Exception
public class RegistrationException extends Exception
{
private static final long serialVersionUID = -6602870588617670263L;
public RegistrationError( final String n )
public RegistrationException( final String n )
{
super( n );
}
@@ -34,7 +34,7 @@ package appeng.api.exceptions;
* @version rv3
* @since rv3
*/
public class SecurityConnectionException extends FailedConnection
public class SecurityConnectionException extends FailedConnectionException
{
private static final long serialVersionUID = 5048714900434215426L;
private static final String DEFAULT_MESSAGE = "Connection failed due to different security realms.";
@@ -0,0 +1,84 @@
/*
* The MIT License (MIT)
*
* Copyright (c) 2017 AlgorithmX2
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package appeng.api.features;
import javax.annotation.Nonnegative;
import javax.annotation.Nonnull;
import net.minecraft.item.Item;
import appeng.api.implementations.items.IAEItemPowerStorage;
/**
* A registry to allow mapping {@link Item}s to a specific charge rate when being placed inside a charger.
*
* The registry is used in favor of an additional method for {@link IAEItemPowerStorage} with a fixed value per item.
* This allows more flexibility for other charger like machines to choose their own values when needed.
*
* There is no guarantee that this is charged per tick, it only represents the value per operation.
* By default this is one charging operation every 10 ticks in case of an AE2 charger.
*
* @author yueh
* @version rv5
* @since rv5
*/
public interface IChargerRegistry
{
/**
* Fetch a charge rate for a specific item.
*
* The specific item does not need to have a mapping registered at all.
* In this case it will use a default value of 160 AE.
*
* @param item A {@link Item} implementing {@link IAEItemPowerStorage}.
* @return custom rate or default of 160
*/
@Nonnegative
double getChargeRate( @Nonnull Item item );
/**
* Register a custom charge rate for a specific item.
*
* Capped at 16000 to avoid extracting too much energy from a network for each operation.
* This is done silently without any feedback or exception.
* Further the cap is not fixed, it can change at any time in the future should power issues arise.
*
* @param item A {@link Item} implementing {@link IAEItemPowerStorage}.
* @param chargeRate the custom rate, must be > 0, capped to 16000d
*/
void addChargeRate( @Nonnull Item item, @Nonnegative double chargeRate );
/**
* Remove the custom rate for a specific item.
*
* It will revert to the default value afterwards.
*
* @param item A {@link Item} implementing {@link IAEItemPowerStorage}.
*/
void removeChargeRate( @Nonnull Item item );
}
@@ -0,0 +1,115 @@
/*
* The MIT License (MIT)
*
* Copyright (c) 2013 AlgorithmX2
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package appeng.api.features;
import javax.annotation.Nonnegative;
import javax.annotation.Nonnull;
import net.minecraft.item.ItemStack;
/**
* Builder for a grinder recipe.
*
* The only default value provided are turns at a value of 8.
*
* @author yueh
* @version rv5
* @since rv5
*/
public interface IGrinderRecipeBuilder
{
/**
* Creates an grinder recipe with inputs.
* Needs to be invoked.
*
* @param input new input for the recipe
*
* @return currently used builder
*/
@Nonnull
IGrinderRecipeBuilder withInput( @Nonnull ItemStack input );
/**
* Creates an grinder recipe with output.
* Needs to be invoked.
*
* @param output new output for the recipe
*
* @return currently used builder
*/
@Nonnull
IGrinderRecipeBuilder withOutput( @Nonnull ItemStack output );
/**
* Creates an grinder recipe with the first optional output and its chance.
*
* @param optional new first optional for the recipe
* @param chance chance for the first optional output, must be within 0.0 - 1.0
*
* @return currently used builder
*/
@Nonnull
IGrinderRecipeBuilder withFirstOptional( @Nonnull ItemStack optional, float chance );
/**
* Creates an grinder recipe with the second optional output and its chance.
*
* @param optional new second optional for the recipe
* @param chance chance for the second optional output, must be within 0.0 - 1.0
*
* @return currently used builder
*/
@Nonnull
IGrinderRecipeBuilder withSecondOptional( @Nonnull ItemStack optional, float chance );
/**
* Creates an grinder recipe with the amount of turns as cost.
*
* Defaults to 8 when not called.
*
* @param turns new turns for the recipe, must be > 0
*
* @return currently used builder
*/
@Nonnull
IGrinderRecipeBuilder withTurns( @Nonnegative int turns );
/**
* Finalizes the process of making the recipe.
* Needs to be invoked to fetch grinder recipe.
*
* @return valid grinder recipe
*
* @throws IllegalStateException when input is not defined
* @throws IllegalStateException when input has no size
* @throws IllegalStateException when output is not defined
* @throws IllegalStateException when both optionals are not defined
* @throws IllegalStateException when process type is not defined
*/
@Nonnull
IGrinderRecipe build();
}
@@ -38,6 +38,14 @@ import net.minecraft.item.ItemStack;
public interface IGrinderRegistry
{
/**
* Extensible way to create a grinder recipe.
*
* @return builder for grinder recipes
*/
@Nonnull
IGrinderRecipeBuilder builder();
/**
* An immutable list of the currently registered recipes.
*
@@ -47,44 +55,9 @@ public interface IGrinderRegistry
Collection<IGrinderRecipe> getRecipes();
/**
* Add a new recipe with a single input and output and how many turns it requires.
*
* Will ignore duplicate recipes with the same input item.
*
* @param in The {@link ItemStack} to grind.
* @param out The {@link ItemStack} to output.
* @param turns Amount of turns to turn the input into the output, with turns > 0.
* Add a new recipe to the registry.
*/
void addRecipe( @Nonnull ItemStack in, @Nonnull ItemStack out, int turns );
/**
* Add a new recipe with an input, output and a single optional output.
*
* Will ignore duplicate recipes with the same input item.
*
* @param in The {@link ItemStack} to grind.
* @param out The {@link ItemStack} to output.
* @param optional The optional {@link ItemStack} to output of a certain chance.
* @param chance Chance to get the optional output within 0.0 - 1.0
* @param turns Amount of turns to turn the input into the output, with turns > 0.
*/
void addRecipe( @Nonnull ItemStack in, @Nonnull ItemStack out, @Nonnull ItemStack optional, float chance, int turns );
/**
* add a new recipe with optional outputs, duplicates will not be added.
*
* Will ignore duplicate recipes with the same input item.
*
* @param in The {@link ItemStack} to grind.
* @param out The {@link ItemStack} to output.
* @param optional The first optional {@link ItemStack} to output of a certain chance.
* @param chance Chance to get the first optional output within 0.0 - 1.0
* @param optional2 The second optional {@link ItemStack} to output of a certain chance.
* @param chance2 chance to get the second optional output within 0.0 - 1.0
* @param turns Amount of turns to turn the input into the output, with turns > 0.
*
*/
void addRecipe( @Nonnull ItemStack in, @Nonnull ItemStack out, @Nonnull ItemStack optional, float chance, @Nonnull ItemStack optional2, float chance2, int turns );
boolean addRecipe( IGrinderRecipe recipe );
/**
* Remove the specific from the recipe list.
@@ -31,11 +31,19 @@ import net.minecraft.item.ItemStack;
* Lets you manipulate Inscriber Recipes, by adding or editing existing ones.
*
* @author thatsIch
* @version rv3
* @version rv5
* @since rv2
*/
public interface IInscriberRegistry
{
/**
* Extensible way to create an inscriber recipe.
*
* @return builder for inscriber recipes
*/
@Nonnull
IInscriberRecipeBuilder builder();
/**
* An immutable copy of currently registered recipes.
*
@@ -65,29 +73,25 @@ public interface IInscriberRegistry
@Nonnull
Set<ItemStack> getInputs();
/**
* Extensible way to create an inscriber recipe.
*
* @return builder for inscriber recipes
*/
@Nonnull
IInscriberRecipeBuilder builder();
/**
* add a new recipe the easy way, duplicates will not be added.
* Added recipes will be automatically added to the optionals and inputs.
*
* @param recipe new recipe
*
* @return true, when successfully added
*
* @throws IllegalArgumentException if null is added
*/
void addRecipe( IInscriberRecipe recipe );
boolean addRecipe( IInscriberRecipe recipe );
/**
* Removes all equal recipes from the registry.
*
*
* @param toBeRemovedRecipe to be removed recipe, can be null, makes just no sense.
*
* @return true, when successfully removed
*/
void removeRecipe( IInscriberRecipe toBeRemovedRecipe );
boolean removeRecipe( IInscriberRecipe toBeRemovedRecipe );
}
@@ -24,9 +24,11 @@
package appeng.api.features;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import net.minecraft.item.ItemStack;
import net.minecraftforge.common.capabilities.Capability;
import appeng.api.config.TunnelType;
@@ -44,7 +46,11 @@ public interface IP2PTunnelRegistry
* @param trigger - the item which triggers attunement. Nullable, but then ignored
* @param type - the type of tunnel. Nullable, but then ignored
*/
void addNewAttunement( @Nullable ItemStack trigger, @Nullable TunnelType type );
void addNewAttunement( @Nonnull ItemStack trigger, @Nullable TunnelType type );
void addNewAttunement( @Nonnull String ModId, @Nullable TunnelType type );
void addNewAttunement( @Nonnull Capability<?> cap, @Nullable TunnelType type );
/**
* returns null if no attunement can be found.
@@ -53,6 +59,6 @@ public interface IP2PTunnelRegistry
*
* @return null if no attunement can be found or attunement
*/
@Nullable
@Nonnull
TunnelType getTunnelTypeByItem( ItemStack trigger );
}
@@ -48,6 +48,7 @@ public interface IRecipeHandlerRegistry
* @param name name of crafthandler
* @param handler class of crafthandler
*/
@Deprecated
void addNewCraftHandler( String name, Class<? extends ICraftHandler> handler );
/**
@@ -65,11 +66,13 @@ public interface IRecipeHandlerRegistry
* @return A recipe handler by name, returns null on failure.
*/
@Nullable
@Deprecated
ICraftHandler getCraftHandlerFor( String name );
/**
* @return a new recipe handler, which can be used to parse, and read recipe files.
*/
@Deprecated
IRecipeHandler createNewRecipehandler();
/**
@@ -34,7 +34,8 @@ import appeng.api.storage.ICellRegistry;
/**
* @author AlgorithmX2
* @author thatsIch
* @version rv2
* @author yueh
* @version rv5
* @since rv0
*/
@AEInjectable
@@ -76,6 +77,11 @@ public interface IRegistryContainer
*/
IInscriberRegistry inscriber();
/**
* Manage charger via API
*/
IChargerRegistry charger();
/**
* get access to the locatable registry
*/
@@ -24,7 +24,7 @@
package appeng.api.implementations.guiobjects;
import net.minecraft.inventory.IInventory;
import net.minecraftforge.items.IItemHandler;
import appeng.api.networking.IGridHost;
@@ -32,8 +32,9 @@ import appeng.api.networking.IGridHost;
/**
* Obtained via {@link IGuiItem} getGuiObject
*/
public interface INetworkTool extends IInventory, IGuiItemObject
public interface INetworkTool extends IGuiItemObject
{
IGridHost getGridHost(); // null for most purposes.
IItemHandler getInventory();
}
@@ -27,6 +27,7 @@ package appeng.api.implementations.items;
import net.minecraft.item.ItemStack;
import appeng.api.config.AccessRestriction;
import appeng.api.config.Actionable;
import appeng.api.networking.energy.IAEPowerStorage;
@@ -42,27 +43,27 @@ public interface IAEItemPowerStorage
*
* @return amount unable to be stored
*/
double injectAEPower( ItemStack is, double amt );
double injectAEPower( ItemStack stack, double amount, Actionable mode );
/**
* Attempt to extract power from the device, it will extract what it can and
* return it.
*
* @param amt to be extracted power from device
* @param amount to be extracted power from device
*
* @return what it could extract
*/
double extractAEPower( ItemStack is, double amt );
double extractAEPower( ItemStack stack, double amount, Actionable mode );
/**
* @return the current maximum power ( this can change :P )
*/
double getAEMaxPower( ItemStack is );
double getAEMaxPower( ItemStack stack );
/**
* @return the current AE Power Level, this may exceed getMEMaxPower()
*/
double getAECurrentPower( ItemStack is );
double getAECurrentPower( ItemStack stack );
/**
* Control the power flow by telling what the network can do, either add? or
@@ -70,5 +71,5 @@ public interface IAEItemPowerStorage
*
* @return access restriction of network
*/
AccessRestriction getPowerFlow( ItemStack is );
AccessRestriction getPowerFlow( ItemStack stack );
}
@@ -28,6 +28,8 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import appeng.api.util.AEColor;
/**
* Memory Card API
@@ -41,13 +43,18 @@ public interface IMemoryCard
* Configures the data stored on the memory card, the SettingsName, will be
* localized when displayed.
*
* The data can contain an optional string with the key "tooltip", which will be used as
* unlocalized string to display it after the settings name.
*
* The data can contain an optional intArray using "colorCode" to be displayed on the model itself.
* It needs to have exactly 8 elements representing the ordinal of the matching {@link AEColor}.
* The first 4 values represent the top row, left to right. The second 4 the bottom row.
*
* @param is item
* @param SettingsName unlocalized string that represents the tile entity.
* @param data may contain a String called "tooltip" which is is a
* unlocalized string displayed after the settings name, optional
* but can be used to add details to the card for later.
* @param settingsName unlocalized string that represents the tile entity.
* @param data the NBT tag, refer to the normal comment for special keys.
*/
void setMemoryCardContents( ItemStack is, String SettingsName, NBTTagCompound data );
void setMemoryCardContents( ItemStack is, String settingsName, NBTTagCompound data );
/**
* returns the settings name provided by a previous call to
@@ -68,6 +75,17 @@ public interface IMemoryCard
*/
NBTTagCompound getData( ItemStack is );
/**
* This represent as 4x2 grid of {@link AEColor} without transparent/fluix color.
*
* First 4 colors are used for the top row, second for the bottom one.
*
* @param is item
*
* @return a hash representation of the memory card content
*/
AEColor[] getColorCode( ItemStack is );
/**
* notify the user of a outcome related to the memory card.
*
@@ -29,6 +29,7 @@ import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import appeng.api.implementations.TransitionResult;
import appeng.api.storage.ISpatialDimension;
import appeng.api.util.WorldCoord;
@@ -57,7 +58,7 @@ public interface ISpatialStorageCell
*
* @return the world for this cell
*/
World getWorld( ItemStack is );
ISpatialDimension getSpatialDimension();
/**
* get the currently stored size.
@@ -69,22 +70,13 @@ public interface ISpatialStorageCell
WorldCoord getStoredSize( ItemStack is );
/**
* Minimum coordinates in its world for the storage cell.
* get the currently stored Dimension id.
*
* @param is spatial storage cell
*
* @return minimum coordinate of dimension
* @return dimension id or -1
*/
WorldCoord getMin( ItemStack is );
/**
* Maximum coordinates in its world for the storage cell.
*
* @param is spatial storage cell
*
* @return maximum coordinate of dimension
*/
WorldCoord getMax( ItemStack is );
int getStoredDimensionID( ItemStack is );
/**
* Perform a spatial swap with the contents of the cell, and the world.
@@ -93,9 +85,9 @@ public interface ISpatialStorageCell
* @param w world of spatial
* @param min min coord
* @param max max coord
* @param doTransition transition
* @param playerId owner of current grid or -1
*
* @return result of transition
*/
TransitionResult doSpatialTransition( ItemStack is, World w, WorldCoord min, WorldCoord max, boolean doTransition );
TransitionResult doSpatialTransition( ItemStack is, World w, WorldCoord min, WorldCoord max, int playerId );
}
@@ -24,10 +24,13 @@
package appeng.api.implementations.items;
import javax.annotation.Nonnull;
import net.minecraft.item.ItemStack;
import appeng.api.storage.ICellWorkbenchItem;
import appeng.api.storage.data.IAEItemStack;
import appeng.api.storage.IStorageChannel;
import appeng.api.storage.data.IAEStack;
/**
@@ -40,7 +43,7 @@ import appeng.api.storage.data.IAEItemStack;
*
* The standard AE implementation only provides 1-63 Types
*/
public interface IStorageCell extends ICellWorkbenchItem
public interface IStorageCell<T extends IAEStack<T>> extends ICellWorkbenchItem
{
/**
@@ -51,7 +54,7 @@ public interface IStorageCell extends ICellWorkbenchItem
*
* @return number of bytes
*/
int getBytes( ItemStack cellItem );
int getBytes( @Nonnull ItemStack cellItem );
/**
* Determines the number of bytes used for any type included on the cell.
@@ -60,7 +63,7 @@ public interface IStorageCell extends ICellWorkbenchItem
*
* @return number of bytes
*/
int getBytesPerType( ItemStack cellItem );
int getBytesPerType( @Nonnull ItemStack cellItem );
/**
* Must be between 1 and 63, indicates how many types you want to store on
@@ -70,7 +73,7 @@ public interface IStorageCell extends ICellWorkbenchItem
*
* @return number of types
*/
int getTotalTypes( ItemStack cellItem );
int getTotalTypes( @Nonnull ItemStack cellItem );
/**
* Allows you to fine tune which items are allowed on a given cell, if you
@@ -82,7 +85,7 @@ public interface IStorageCell extends ICellWorkbenchItem
*
* @return true to preventAdditionOfItem
*/
boolean isBlackListed( ItemStack cellItem, IAEItemStack requestedAddition );
boolean isBlackListed( @Nonnull ItemStack cellItem, @Nonnull T requestedAddition );
/**
* Allows you to specify if this storage cell can be stored inside other
@@ -103,10 +106,16 @@ public interface IStorageCell extends ICellWorkbenchItem
*
* @return if the ItemStack should behavior as a storage cell.
*/
boolean isStorageCell( ItemStack i );
boolean isStorageCell( @Nonnull ItemStack i );
/**
* @return drain in ae/t this storage cell will use.
*/
double getIdleDrain();
/**
* @return the type of channel your cell should be part of
*/
@Nonnull
IStorageChannel<T> getChannel();
}
@@ -29,5 +29,5 @@ package appeng.api.implementations.items;
*/
public enum MemoryCardMessages
{
INVALID_MACHINE, SETTINGS_LOADED, SETTINGS_SAVED, SETTINGS_CLEARED
INVALID_MACHINE, SETTINGS_LOADED, SETTINGS_SAVED, SETTINGS_RESET, SETTINGS_CLEARED
}
@@ -24,7 +24,7 @@
package appeng.api.implementations.tiles;
import net.minecraft.inventory.IInventory;
import net.minecraftforge.items.IItemHandler;
public interface ISegmentedInventory
@@ -38,5 +38,5 @@ public interface ISegmentedInventory
*
* @return inventory with inventory name
*/
IInventory getInventoryByName( String name );
IItemHandler getInventoryByName( String name );
}
@@ -24,7 +24,7 @@
package appeng.api.implementations.tiles;
import net.minecraft.inventory.IInventory;
import net.minecraftforge.items.IItemHandler;
public interface IViewCellStorage
@@ -35,5 +35,5 @@ public interface IViewCellStorage
*
* @return inventory with at least 5 slot
*/
IInventory getViewCellStorage();
IItemHandler getViewCellStorage();
}
+13 -4
View File
@@ -24,6 +24,8 @@
package appeng.api.networking;
import javax.annotation.Nonnull;
import appeng.api.networking.events.MENetworkEvent;
import appeng.api.util.IReadOnlyCollection;
@@ -43,7 +45,8 @@ public interface IGrid
*
* @return the IGridCache you requested.
*/
<C extends IGridCache> C getCache( Class<? extends IGridCache> iface );
@Nonnull
<C extends IGridCache> C getCache( @Nonnull Class<? extends IGridCache> iface );
/**
* Post an event into the network event bus.
@@ -52,7 +55,8 @@ public interface IGrid
*
* @return returns ev back to original poster
*/
MENetworkEvent postEvent( MENetworkEvent ev );
@Nonnull
MENetworkEvent postEvent( @Nonnull MENetworkEvent ev );
/**
* Post an event into the network event bus, but direct it at a single node.
@@ -61,7 +65,8 @@ public interface IGrid
*
* @return returns ev back to original poster
*/
MENetworkEvent postEventTo( IGridNode node, MENetworkEvent ev );
@Nonnull
MENetworkEvent postEventTo( @Nonnull IGridNode node, @Nonnull MENetworkEvent ev );
/**
* get a list of the diversity of classes, you can use this to better detect which machines your interested in,
@@ -69,6 +74,7 @@ public interface IGrid
*
* @return IReadOnlyCollection of all available host types (Of Type IGridHost).
*/
@Nonnull
IReadOnlyCollection<Class<? extends IGridHost>> getMachinesClasses();
/**
@@ -78,11 +84,13 @@ public interface IGrid
*
* @return IMachineSet of all nodes belonging to hosts of specified class.
*/
IMachineSet getMachines( Class<? extends IGridHost> gridHostClass );
@Nonnull
IMachineSet getMachines( @Nonnull Class<? extends IGridHost> gridHostClass );
/**
* @return IReadOnlyCollection for all nodes on the network, node visitors are preferred.
*/
@Nonnull
IReadOnlyCollection<IGridNode> getNodes();
/**
@@ -93,5 +101,6 @@ public interface IGrid
/**
* @return the node considered the pivot point of the grid.
*/
@Nonnull
IGridNode getPivot();
}
@@ -26,6 +26,9 @@ package appeng.api.networking;
import java.util.EnumSet;
import javax.annotation.Nonnegative;
import javax.annotation.Nonnull;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumFacing;
@@ -49,6 +52,7 @@ public interface IGridBlock
*
* @return ae/t to use.
*/
@Nonnegative
double getIdlePowerUsage();
/**
@@ -56,10 +60,11 @@ public interface IGridBlock
*
* @return Set of flags for this IGridBlock
*/
@Nonnull
EnumSet<GridFlags> getFlags();
/**
* generally speaking you will return true for this, the one exception is buses, or worm holes where the node
* Generally speaking you will return true for this, the one exception is buses, or worm holes where the node
* represents something that isn't a real connection in the world, but rather one represented internally to the
* block.
*
@@ -68,37 +73,46 @@ public interface IGridBlock
boolean isWorldAccessible();
/**
* Must not return when {@link #isWorldAccessible()} is true.
* Otherwise the behavior is unspecified.
*
* @return current location of this node
*/
@Nonnull
DimensionalCoord getLocation();
/**
* @return Transparent, or a valid color, NULL IS NOT A VALID RETURN
*/
@Nonnull
AEColor getGridColor();
/**
* Notifies your IGridBlock that changes were made to your connections
*/
void onGridNotification( GridNotification notification );
void onGridNotification( @Nonnull GridNotification notification );
/**
* Update Blocks network/connection/booting status. grid,
*
* @param grid grid
* @param channelsInUse used channels
* @deprecated to be removed in rv7
*/
@Deprecated
void setNetworkStatus( IGrid grid, int channelsInUse );
/**
* Determine which sides of the block can be connected too, only used when isWorldAccessible returns true, not used
* for {@link IPart} implementations.
*/
@Nonnull
EnumSet<EnumFacing> getConnectableSides();
/**
* @return the IGridHost for the node, this will be an IGridPart or a TileEntity generally speaking.
*/
@Nonnull
IGridHost getMachine();
/**
@@ -109,7 +123,8 @@ public interface IGridBlock
/**
* Determines what item stack is used to render this node in the GUI.
*
* @return the render item stack to use to render this node, null is valid, and will not show this node.
* @return the render item stack to use to render this node. Returning an empty ItemStack will not show this node.
*/
@Nonnull
ItemStack getMachineRepresentation();
}
@@ -24,6 +24,9 @@
package appeng.api.networking;
import javax.annotation.Nonnull;
/**
* Allows you to create a network wise service, AE2 uses these for providing
* item, spatial, and tunnel services.
@@ -50,7 +53,7 @@ public interface IGridCache
* @param gridNode removed from that grid
* @param machine to be removed machine
*/
void removeNode( IGridNode gridNode, IGridHost machine );
void removeNode( @Nonnull IGridNode gridNode, @Nonnull IGridHost machine );
/**
* informs you cache that a machine was added to the grid.
@@ -62,7 +65,7 @@ public interface IGridCache
* @param gridNode added to grid node
* @param machine to be added machine
*/
void addNode( IGridNode gridNode, IGridHost machine );
void addNode( @Nonnull IGridNode gridNode, @Nonnull IGridHost machine );
/**
* Called when a grid splits into two grids, AE will call a split as it
@@ -71,7 +74,7 @@ public interface IGridCache
*
* @param destinationStorage storage which receives half of old grid
*/
void onSplit( IGridStorage destinationStorage );
void onSplit( @Nonnull IGridStorage destinationStorage );
/**
* Called when two grids merge into one, AE will call a join as it
@@ -80,12 +83,12 @@ public interface IGridCache
*
* @param sourceStorage old storage
*/
void onJoin( IGridStorage sourceStorage );
void onJoin( @Nonnull IGridStorage sourceStorage );
/**
* Called when saving changes,
*
* @param destinationStorage storage
*/
void populateGridStorage( IGridStorage destinationStorage );
void populateGridStorage( @Nonnull IGridStorage destinationStorage );
}
@@ -24,7 +24,9 @@
package appeng.api.networking;
import java.util.HashMap;
import java.util.Map;
import javax.annotation.Nonnull;
/**
@@ -38,14 +40,14 @@ public interface IGridCacheRegistry
*
* @param iface grid cache class
*/
void registerGridCache( Class<? extends IGridCache> iface, Class<? extends IGridCache> implementation );
void registerGridCache( @Nonnull Class<? extends IGridCache> iface, @Nonnull Class<? extends IGridCache> implementation );
/**
* requests a new INSTANCE of a grid cache for use, used internally
*
* @param grid grid
*
* @return a new HashMap of IGridCaches from the registry, called from IGrid when constructing a new grid.
* @return a new Map of IGridCaches from the registry, called from IGrid when constructing a new grid.
*/
HashMap<Class<? extends IGridCache>, IGridCache> createCacheInstance( IGrid grid );
Map<Class<? extends IGridCache>, IGridCache> createCacheInstance( IGrid grid );
}
@@ -24,6 +24,8 @@
package appeng.api.networking;
import javax.annotation.Nonnull;
import appeng.api.util.AEPartLocation;
@@ -45,6 +47,7 @@ public interface IGridConnection
*
* @return the IGridNode which represents the opposite side of the connection.
*/
@Nonnull
IGridNode getOtherSide( IGridNode gridNode );
/**
@@ -54,6 +57,7 @@ public interface IGridConnection
*
* @return the direction of the connection, only valid for in world connections.
*/
@Nonnull
AEPartLocation getDirection( IGridNode gridNode );
/**
@@ -65,11 +69,13 @@ public interface IGridConnection
/**
* @return node A
*/
@Nonnull
IGridNode a();
/**
* @return node B
*/
@Nonnull
IGridNode b();
/**
@@ -24,6 +24,9 @@
package appeng.api.networking;
import javax.annotation.Nonnull;
public interface IGridConnectionVisitor extends IGridVisitor
{
@@ -32,5 +35,5 @@ public interface IGridConnectionVisitor extends IGridVisitor
*
* @param n the connection.
*/
void visitConnection( IGridConnection n );
void visitConnection( @Nonnull IGridConnection n );
}
@@ -1,7 +1,7 @@
/*
* The MIT License (MIT)
*
* Copyright (c) 2013 AlgorithmX2
* Copyright (c) 2017 AlgorithmX2
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
@@ -21,39 +21,48 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package appeng.api.storage.data;
package appeng.api.networking;
import net.minecraft.nbt.NBTTagCompound;
import javax.annotation.Nonnull;
import appeng.api.features.IItemComparison;
import appeng.api.exceptions.FailedConnectionException;
/**
* Don't cast this... either compare with it, or copy it.
* A helper responsible for creating new {@link IGridNode}, {@link IGridConnection} or potentially similar tasks.
*
* Don't Implement.
* @author yueh
* @version rv5
* @since rv5
*/
public interface IAETagCompound
public interface IGridHelper
{
/**
* @return a copy ( the copy will not be a IAETagCompound, it will be a NBTTagCompound )
* Create a grid node for your {@link IGridHost}
*
* The passed {@link IGridBlock} represents the definition for properties like connectable sides.
* Refer to its documentation for further details.
*
* @param block grid block
*
* @return grid node of block
*/
NBTTagCompound getNBTTagCompoundCopy();
@Nonnull
IGridNode createGridNode( @Nonnull IGridBlock block );
/**
* compare to other NBTTagCompounds or IAETagCompounds
* Create a direct connection between two {@link IGridNode}.
*
* @param a compared object
* This will be considered as having a distance of 1, regardless of the location of both nodes.
*
* @return true, if they are the same.
* @param a to be connected gridnode
* @param b to be connected gridnode
*
* @throws appeng.api.exceptions.FailedConnectionException
*/
@Override
boolean equals( Object a );
@Nonnull
IGridConnection createGridConnection( @Nonnull IGridNode a, @Nonnull IGridNode b ) throws FailedConnectionException;
/**
* @return the special comparison for this tag
*/
IItemComparison getSpecialComparison();
}
@@ -24,6 +24,9 @@
package appeng.api.networking;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import net.minecraft.tileentity.TileEntity;
import appeng.api.parts.IPart;
@@ -49,7 +52,8 @@ public interface IGridHost
* @return a new IGridNode, create these with
* AEApi.INSTANCE().createGridNode( MyIGridBlock )
*/
IGridNode getGridNode( AEPartLocation dir );
@Nullable
IGridNode getGridNode( @Nonnull AEPartLocation dir );
/**
* Determines how cables render when they connect to this block. Priority is
@@ -57,7 +61,8 @@ public interface IGridHost
*
* @param dir direction
*/
AECableType getCableConnectionType( AEPartLocation dir );
@Nonnull
AECableType getCableConnectionType( @Nonnull AEPartLocation dir );
/**
* break this host, its violating security rules, just break your block, or part.
@@ -26,6 +26,8 @@ package appeng.api.networking;
import java.util.Iterator;
import javax.annotation.Nonnull;
/**
* An extension of IGridBlock, only means something when your getFlags() contains REQUIRE_CHANNEL, when done properly it
@@ -40,5 +42,6 @@ public interface IGridMultiblock extends IGridBlock
*
* @return an iterator that will iterate all the nodes for the multiblock. ( read-only iterator expected. )
*/
@Nonnull
Iterator<IGridNode> getMultiblockNodes();
}
@@ -26,6 +26,8 @@ package appeng.api.networking;
import java.util.EnumSet;
import javax.annotation.Nonnull;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.World;
@@ -50,7 +52,7 @@ public interface IGridNode
*
* @param visitor visitor
*/
void beginVisit( IGridVisitor visitor );
void beginVisit( @Nonnull IGridVisitor visitor );
/**
* inform the node that your IGridBlock has changed its internal state, and force the node to update.
@@ -68,6 +70,7 @@ public interface IGridNode
*
* @return grid host
*/
@Nonnull
IGridHost getMachine();
/**
@@ -75,6 +78,7 @@ public interface IGridNode
*
* @return grid
*/
@Nonnull
IGrid getGrid();
/**
@@ -86,11 +90,13 @@ public interface IGridNode
/**
* @return the world the node is located in
*/
@Nonnull
World getWorld();
/**
* @return a set of the connected sides, INTERNAL represents an invisible connection
*/
@Nonnull
EnumSet<AEPartLocation> getConnectedSides();
/**
@@ -98,11 +104,13 @@ public interface IGridNode
*
* @return grid connections
*/
@Nonnull
IReadOnlyCollection<IGridConnection> getConnections();
/**
* @return the IGridBlock for this node
*/
@Nonnull
IGridBlock getGridBlock();
/**
@@ -122,7 +130,7 @@ public interface IGridNode
* @param name nbt name
* @param nodeData to be loaded data
*/
void loadFromNBT( String name, NBTTagCompound nodeData );
void loadFromNBT( @Nonnull String name, @Nonnull NBTTagCompound nodeData );
/**
* this should be called for each node you maintain, you can save all your nodes to the same tag with different
@@ -131,7 +139,7 @@ public interface IGridNode
* @param name nbt name
* @param nodeData to be saved data
*/
void saveToNBT( String name, NBTTagCompound nodeData );
void saveToNBT( @Nonnull String name, @Nonnull NBTTagCompound nodeData );
/**
* @return if the node's channel requirements are currently met, use this for display purposes, use isActive for
@@ -146,7 +154,7 @@ public interface IGridNode
*
* @return true if has flag
*/
boolean hasFlag( GridFlags flag );
boolean hasFlag( @Nonnull GridFlags flag );
/**
* @return the ownerID this represents the person who placed the node.
@@ -24,6 +24,8 @@
package appeng.api.networking;
import javax.annotation.Nonnull;
import net.minecraft.nbt.NBTTagCompound;
@@ -33,6 +35,7 @@ public interface IGridStorage
/**
* @return an NBTTagCompound that can be read, and written too.
*/
@Nonnull
NBTTagCompound dataObject();
/**
@@ -24,6 +24,9 @@
package appeng.api.networking;
import javax.annotation.Nonnull;
/**
* Simple Visitor pattern access to network nodes.
*/
@@ -39,5 +42,5 @@ public interface IGridVisitor
*
* @return true to continue visiting nodes beyond this node.
*/
boolean visitNode( IGridNode n );
boolean visitNode( @Nonnull IGridNode n );
}
@@ -24,6 +24,8 @@
package appeng.api.networking;
import javax.annotation.Nonnull;
import appeng.api.util.IReadOnlyCollection;
@@ -33,5 +35,6 @@ public interface IMachineSet extends IReadOnlyCollection<IGridNode>
/**
* @return the machine class for this set.
*/
@Nonnull
Class<? extends IGridHost> getMachineClass();
}
@@ -24,7 +24,7 @@
package appeng.api.networking.crafting;
import appeng.api.networking.security.BaseActionSource;
import appeng.api.networking.security.IActionSource;
import appeng.api.networking.storage.IBaseMonitor;
import appeng.api.storage.data.IAEItemStack;
@@ -40,7 +40,7 @@ public interface ICraftingCPU extends IBaseMonitor<IAEItemStack>
/**
* @return the action source for the CPU.
*/
BaseActionSource getActionSource();
IActionSource getActionSource();
/**
* @return the available storage in bytes
@@ -24,6 +24,9 @@
package appeng.api.networking.crafting;
import javax.annotation.Nonnull;
public interface ICraftingCallback
{
@@ -32,5 +35,5 @@ public interface ICraftingCallback
*
* @param job - final job
*/
void calculationComplete( ICraftingJob job );
void calculationComplete( @Nonnull ICraftingJob job );
}
@@ -33,7 +33,7 @@ import net.minecraft.world.World;
import appeng.api.networking.IGrid;
import appeng.api.networking.IGridCache;
import appeng.api.networking.security.BaseActionSource;
import appeng.api.networking.security.IActionSource;
import appeng.api.storage.data.IAEItemStack;
@@ -63,7 +63,7 @@ public interface ICraftingGrid extends IGridCache
* @return a future which will at an undetermined point in the future get you the {@link ICraftingJob} do not wait
* on this, your be waiting forever.
*/
Future<ICraftingJob> beginCraftingJob( World world, IGrid grid, BaseActionSource actionSrc, IAEItemStack craftWhat, ICraftingCallback callback );
Future<ICraftingJob> beginCraftingJob( World world, IGrid grid, IActionSource actionSrc, IAEItemStack craftWhat, ICraftingCallback callback );
/**
* Submit the job to the Crafting system for processing.
@@ -82,7 +82,7 @@ public interface ICraftingGrid extends IGridCache
* {@link ICraftingRequester} methods. if you send null, this object should be discarded after verifying the
* return state.
*/
ICraftingLink submitJob( ICraftingJob job, ICraftingRequester requestingMachine, ICraftingCPU target, boolean prioritizePower, BaseActionSource src );
ICraftingLink submitJob( ICraftingJob job, ICraftingRequester requestingMachine, ICraftingCPU target, boolean prioritizePower, IActionSource src );
/**
* @return list of all the crafting cpus on the grid
@@ -99,9 +99,18 @@ public interface ICraftingGrid extends IGridCache
/**
* is this item being crafted?
*
* @param aeStackInSlot item being crafted
* @param what item being crafted
*
* @return true if it is being crafting
*/
boolean isRequesting( IAEItemStack aeStackInSlot );
boolean isRequesting( IAEItemStack what );
/**
* The total amount being requested across all crafting cpus of a grid.
*
* @param what item being requested, ignores stacksize
*
* @return The total amount being requested.
*/
long requesting( IAEItemStack what );
}
@@ -29,16 +29,16 @@ import appeng.api.storage.data.IAEStack;
/**
* DO NOT IMPLEMENT.
*
*
* Will be injected when adding an {@link ICraftingWatcherHost} to a grid.
*/
public interface ICraftingWatcher
{
/**
* Add a specific {@link IAEStack} to watch.
*
*
* Supports multiple values, duplicate ones will not be added.
*
*
* @param stack
* @return true, if successfully added.
*/
@@ -46,7 +46,7 @@ public interface ICraftingWatcher
/**
* Remove a specific {@link IAEStack} from the watcher.
*
*
* @param stack
* @return true, if successfully removed.
*/
@@ -24,6 +24,8 @@
package appeng.api.networking.energy;
import javax.annotation.Nonnull;
import appeng.api.config.AccessRestriction;
import appeng.api.config.Actionable;
@@ -42,7 +44,7 @@ public interface IAEPowerStorage extends IEnergySource
*
* @return amount of power which was unable to be stored
*/
double injectAEPower( double amt, Actionable mode );
double injectAEPower( double amt, @Nonnull Actionable mode );
/**
* @return the current maximum power ( this can change :P )
@@ -67,5 +69,6 @@ public interface IAEPowerStorage extends IEnergySource
*
* @return access restriction what the network can do
*/
@Nonnull
AccessRestriction getPowerFlow();
}
@@ -24,6 +24,9 @@
package appeng.api.networking.energy;
import javax.annotation.Nonnegative;
import javax.annotation.Nonnull;
import appeng.api.config.Actionable;
import appeng.api.networking.IGridCache;
import appeng.api.networking.events.MENetworkPowerStatusChange;
@@ -38,17 +41,20 @@ public interface IEnergyGrid extends IGridCache, IEnergySource, IEnergyGridProvi
/**
* @return the current calculated idle energy drain each tick, is used internally to drain power for each tick.
*/
@Nonnegative
double getIdlePowerUsage();
/**
* @return the average power drain over the past 10 ticks, includes idle usage during this time, and all use of
* extractPower.
*/
@Nonnegative
double getAvgPowerUsage();
/**
* @return the average energy injected into the system per tick, for the last 10 ticks.
*/
@Nonnegative
double getAvgPowerInjection();
/**
@@ -79,13 +85,15 @@ public interface IEnergyGrid extends IGridCache, IEnergySource, IEnergyGridProvi
*
* @return the amount of power that the network has OVER the limit.
*/
double injectPower( double amt, Actionable mode );
@Nonnegative
double injectPower( @Nonnegative double amt, @Nonnull Actionable mode );
/**
* this is should be considered an estimate, and not relied upon for real calculations.
*
* @return estimated available power.
*/
@Nonnegative
double getStoredPower();
/**
@@ -93,6 +101,7 @@ public interface IEnergyGrid extends IGridCache, IEnergySource, IEnergyGridProvi
*
* @return estimated available power.
*/
@Nonnegative
double getMaxStoredPower();
/**
@@ -101,5 +110,6 @@ public interface IEnergyGrid extends IGridCache, IEnergySource, IEnergyGridProvi
*
* @return Amount of power required to charge the grid, in AE.
*/
double getEnergyDemand( double maxRequired );
@Nonnegative
double getEnergyDemand( @Nonnegative double maxRequired );
}
@@ -24,7 +24,10 @@
package appeng.api.networking.energy;
import java.util.Set;
import java.util.Collection;
import javax.annotation.Nonnegative;
import javax.annotation.Nonnull;
import appeng.api.config.Actionable;
@@ -35,17 +38,91 @@ import appeng.api.config.Actionable;
public interface IEnergyGridProvider
{
/**
* internal use only
*
* Can return a list of providers behind the current.
*
* An example would be something acting as proxy between different {@link IEnergyGrid}s.
*
* This can contain duplicate entries, AE will ensure that each provider is only visited once.
*
* internal use only
*/
double extractAEPower( double amt, Actionable mode, Set<IEnergyGrid> seen );
@Nonnull
Collection<IEnergyGridProvider> providers();
/**
* internal use only
*
* Extracts the requested amount from the provider.
*
* This should never forward a call to another {@link IEnergyGridProvider}, instead return them via
* {@link IEnergyGridProvider#providers()}
*
* @return the used amount
*/
double injectAEPower( double amt, Actionable mode, Set<IEnergyGrid> seen );
@Nonnegative
double extractProviderPower( @Nonnegative double amt, @Nonnull Actionable mode );
/**
* Injects the offered amount into the provider.
*
* This should never forward a call to another {@link IEnergyGridProvider}, instead return them via
* {@link IEnergyGridProvider#providers()}
*
* internal use only
*
* @return the leftover amount
*/
@Nonnegative
double injectProviderPower( @Nonnegative double amt, @Nonnull Actionable mode );
/**
* internal use only
*
* Returns the current demand of an provider.
*
* This should never forward a call to another {@link IEnergyGridProvider}, instead return them via
* {@link IEnergyGridProvider#providers()}
*
*
* @param d the max amount offered, the demand should never exceed it.
* @return the total amount demanded
*/
double getEnergyDemand( double d, Set<IEnergyGrid> seen );
@Nonnegative
double getProviderEnergyDemand( @Nonnegative double d );
/**
* internal use only
*
* AE currently uses this to enqueue the next visited provider.
*
* There is no guarantee that this works on in a perfect way.
* It can be limited to the returns of the past {@link IEnergyGridProvider#providers()}, but not any future one
* discovered by visiting further providers.
*
* E.g. inject into the the lowest one first or extract from the highest one.
*
* @return the current stored amount.
*
*
*/
@Nonnegative
double getProviderStoredEnergy();
/**
* internal use only
*
* AE currently uses this to enqueue the next visited provider.
*
* There is no guarantee that this works on in a perfect way.
* It can be limited to the returns of the past {@link IEnergyGridProvider#providers()}, but not any future one
* discovered by visiting further providers.
*
* E.g. inject into the the lowest one first or extract from the highest one.
*
* @return the maximum amount stored.
*/
@Nonnegative
double getProviderMaxEnergy();
}
@@ -24,6 +24,9 @@
package appeng.api.networking.energy;
import javax.annotation.Nonnegative;
import javax.annotation.Nonnull;
import appeng.api.config.Actionable;
import appeng.api.config.PowerMultiplier;
@@ -39,5 +42,6 @@ public interface IEnergySource
*
* @return returns extracted power.
*/
double extractAEPower( double amt, Actionable mode, PowerMultiplier usePowerMultiplier );
@Nonnegative
double extractAEPower( @Nonnegative double amt, @Nonnull Actionable mode, @Nonnull PowerMultiplier usePowerMultiplier );
}
@@ -24,30 +24,33 @@
package appeng.api.networking.energy;
import javax.annotation.Nonnegative;
/**
* DO NOT IMPLEMENT.
*
*
* Will be injected when adding an {@link IEnergyWatcherHost} to a grid.
*/
public interface IEnergyWatcher
{
/**
* Add a specific threshold to watch.
*
*
* Supports multiple values, duplicate ones will not be added.
*
*
* @param amount
* @return true, if successfully added.
*/
boolean add( double amount );
boolean add( @Nonnegative double amount );
/**
* Remove a specific threshold from the watcher.
*
*
* @param amount
* @return true, if successfully removed.
*/
boolean remove( double amount );
boolean remove( @Nonnegative double amount );
/**
* Removes all thresholds and resets the watcher to a clean state.
@@ -24,6 +24,9 @@
package appeng.api.networking.energy;
import javax.annotation.Nonnull;
public interface IEnergyWatcherHost
{
@@ -33,12 +36,12 @@ public interface IEnergyWatcherHost
*
* @param newWatcher new watcher
*/
void updateWatcher( IEnergyWatcher newWatcher );
void updateWatcher( @Nonnull IEnergyWatcher newWatcher );
/**
* Called when a threshold is crossed.
*
* @param energyGrid grid
*/
void onThresholdPass( IEnergyGrid energyGrid );
void onThresholdPass( @Nonnull IEnergyGrid energyGrid );
}
@@ -25,7 +25,7 @@ package appeng.api.networking.events;
import appeng.api.storage.IMEMonitor;
import appeng.api.storage.StorageChannel;
import appeng.api.storage.IStorageChannel;
/**
@@ -40,9 +40,9 @@ public class MENetworkStorageEvent extends MENetworkEvent
{
public final IMEMonitor monitor;
public final StorageChannel channel;
public final IStorageChannel channel;
public MENetworkStorageEvent( final IMEMonitor o, final StorageChannel chan )
public MENetworkStorageEvent( final IMEMonitor o, final IStorageChannel chan )
{
this.monitor = o;
this.channel = chan;
@@ -24,6 +24,8 @@
package appeng.api.networking.pathing;
import javax.annotation.Nonnull;
import appeng.api.networking.IGridCache;
@@ -39,6 +41,7 @@ public interface IPathingGrid extends IGridCache
* @return the controller state of the network, useful if you want to
* require a controller for a feature.
*/
@Nonnull
ControllerState getControllerState();
/**
@@ -24,11 +24,12 @@
package appeng.api.networking.security;
import appeng.api.networking.IGridHost;
import javax.annotation.Nonnull;
import appeng.api.networking.IGridNode;
public interface IActionHost extends IGridHost
public interface IActionHost
{
/**
@@ -39,5 +40,6 @@ public interface IActionHost extends IGridHost
* @return the the gridnode that actions from this IGridHost are preformed
* by.
*/
@Nonnull
IGridNode getActionableNode();
}
@@ -0,0 +1,77 @@
/*
* The MIT License (MIT)
*
* Copyright (c) 2013 AlgorithmX2
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package appeng.api.networking.security;
import java.util.Optional;
import javax.annotation.Nonnull;
import net.minecraft.entity.player.EntityPlayer;
/**
* The source of any action.
*
* This can either be a {@link EntityPlayer} or an {@link IActionHost}.
*
* In most cases this is used for security checks, but can be used to validate the source itself.
*
*/
public interface IActionSource
{
/**
* If present, AE will consider the player being the source for the action.
*
* This will take precedence over {@link IActionSource#machine()} in any case.
*
* @return An optional player issuing the action.
*/
@Nonnull
Optional<EntityPlayer> player();
/**
* If present, it indicates the {@link IActionHost} of the source.
*
* Should {@link IActionSource#player()} be absent, it will consider a machine as source.
*
* It is recommended to include the machine even when a player is present.
*
* @return An optional machine issuing the action or acting as proxy for a player.
*/
@Nonnull
Optional<IActionHost> machine();
/**
* An {@link IActionSource} can have multiple optional contexts.
*
* It is strongly recommended to limit the uses for absolutely necessary cases.
*
* Currently there are no public contexts made available by AE.
* An example would be the context interfaces use internally to avoid looping items between each other.
*/
@Nonnull
<T> Optional<T> context( @Nonnull Class<T> key );
}
@@ -24,6 +24,9 @@
package appeng.api.networking.security;
import javax.annotation.Nonnegative;
import javax.annotation.Nonnull;
import net.minecraft.entity.player.EntityPlayer;
import appeng.api.config.SecurityPermissions;
@@ -46,7 +49,7 @@ public interface ISecurityGrid extends IGridCache
*
* @return true if the player has permissions.
*/
boolean hasPermission( EntityPlayer player, SecurityPermissions perm );
boolean hasPermission( @Nonnull EntityPlayer player, @Nonnull SecurityPermissions perm );
/**
* Check if a player has permissions.
@@ -56,7 +59,7 @@ public interface ISecurityGrid extends IGridCache
*
* @return true if the player has permissions.
*/
boolean hasPermission( int playerID, SecurityPermissions perm );
boolean hasPermission( @Nonnegative int playerID, @Nonnull SecurityPermissions perm );
/**
* @return PlayerID of the admin, or owner, this is the person who placed the security block.
@@ -25,7 +25,7 @@ package appeng.api.networking.security;
import java.util.EnumSet;
import java.util.HashMap;
import java.util.Map;
import appeng.api.config.SecurityPermissions;
@@ -48,7 +48,7 @@ public interface ISecurityProvider
*
* @param playerPerms player permissions
*/
void readPermissions( HashMap<Integer, EnumSet<SecurityPermissions>> playerPerms );
void readPermissions( Map<Integer, EnumSet<SecurityPermissions>> playerPerms );
/**
* @return is security on or off?
@@ -26,6 +26,8 @@ package appeng.api.networking.security;
import java.util.EnumSet;
import javax.annotation.Nonnull;
import appeng.api.config.SecurityPermissions;
@@ -41,5 +43,5 @@ public interface ISecurityRegistry
* @param playerID player id
* @param permissions permissions of player
*/
void addPlayer( int playerID, EnumSet<SecurityPermissions> permissions );
void addPlayer( int playerID, @Nonnull EnumSet<SecurityPermissions> permissions );
}
@@ -1,49 +0,0 @@
/*
* The MIT License (MIT)
*
* Copyright (c) 2013 AlgorithmX2
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package appeng.api.networking.security;
import net.minecraft.entity.player.EntityPlayer;
/**
* TODO: Consider refactoring.
*/
public class PlayerSource extends BaseActionSource
{
public final EntityPlayer player;
public final IActionHost via;
public PlayerSource( final EntityPlayer p, final IActionHost v )
{
this.player = p;
this.via = v;
}
@Override
public boolean isPlayer()
{
return true;
}
}
@@ -28,7 +28,7 @@ import appeng.api.storage.IMEMonitorHandlerReceiver;
import appeng.api.storage.data.IAEStack;
public interface IBaseMonitor<T extends IAEStack>
public interface IBaseMonitor<T extends IAEStack<T>>
{
/**
@@ -29,16 +29,16 @@ import appeng.api.storage.data.IAEStack;
/**
* DO NOT IMPLEMENT.
*
*
* Will be injected when adding an {@link IStackWatcherHost} to a grid.
*/
public interface IStackWatcher
{
/**
* Add a specific {@link IAEStack} to watch.
*
*
* Supports multiple values, duplicate ones will not be added.
*
*
* @param stack
* @return true, if successfully added.
*/
@@ -46,7 +46,7 @@ public interface IStackWatcher
/**
* Remove a specific {@link IAEStack} from the watcher.
*
*
* @param stack
* @return true, if successfully removed.
*/
@@ -24,8 +24,8 @@
package appeng.api.networking.storage;
import appeng.api.networking.security.BaseActionSource;
import appeng.api.storage.StorageChannel;
import appeng.api.networking.security.IActionSource;
import appeng.api.storage.IStorageChannel;
import appeng.api.storage.data.IAEStack;
import appeng.api.storage.data.IItemList;
@@ -50,5 +50,5 @@ public interface IStackWatcherHost
* @param src action source
* @param chan storage channel
*/
void onStackChange( IItemList o, IAEStack fullStack, IAEStack diffStack, BaseActionSource src, StorageChannel chan );
void onStackChange( IItemList<?> o, IAEStack<?> fullStack, IAEStack<?> diffStack, IActionSource src, IStorageChannel<?> chan );
}
@@ -26,11 +26,11 @@ package appeng.api.networking.storage;
import appeng.api.networking.IGridCache;
import appeng.api.networking.IGridHost;
import appeng.api.networking.security.BaseActionSource;
import appeng.api.networking.security.IActionSource;
import appeng.api.storage.ICellContainer;
import appeng.api.storage.ICellProvider;
import appeng.api.storage.IStorageChannel;
import appeng.api.storage.IStorageMonitorable;
import appeng.api.storage.StorageChannel;
import appeng.api.storage.data.IAEStack;
@@ -50,7 +50,7 @@ public interface IStorageGrid extends IGridCache, IStorageMonitorable
*
* @param input injected items
*/
void postAlterationOfStoredItems( StorageChannel chan, Iterable<? extends IAEStack> input, BaseActionSource src );
void postAlterationOfStoredItems( IStorageChannel<?> chan, Iterable<? extends IAEStack<?>> input, IActionSource src );
/**
* Used to add a cell provider to the storage system
@@ -24,6 +24,8 @@
package appeng.api.networking.ticking;
import javax.annotation.Nonnull;
import appeng.api.networking.IGridNode;
@@ -45,18 +47,18 @@ public interface IGridTickable
*/
/**
* You can return null, if you wish to tick using MC's ticking mechanism, or
* you can return a valid TickingRequest to tell AE a guide for which type
* of responsiveness your device wants.
* Return a valid TickingRequest to tell AE a guide for which type of
* responsiveness your device wants.
*
* this will be called for your tile any time your tile changes grids, this
* This will be called for your tile any time your tile changes grids, this
* can happen at any time, so if your using the sleep feature you may wish
* to preserve your sleep, in the result of this method. or you can simply
* reset it.
*
* @return null or a valid new TickingRequest
* @return a valid new TickingRequest
*/
TickingRequest getTickingRequest( IGridNode node );
@Nonnull
TickingRequest getTickingRequest( @Nonnull IGridNode node );
/**
* AE lets you adjust your tick rate based on the results of your tick, if
@@ -67,11 +69,12 @@ public interface IGridTickable
*
* Note: this is never called if you return null from getTickingRequest.
*
* @param TicksSinceLastCall the number of world ticks that were skipped since your last
* @param ticksSinceLastCall the number of world ticks that were skipped since your last
* tick, you can use this to adjust speed of processing or adjust
* your tick rate.
*
* @return tick rate adjustment.
*/
TickRateModulation tickingRequest( IGridNode node, int TicksSinceLastCall );
@Nonnull
TickRateModulation tickingRequest( @Nonnull IGridNode node, int ticksSinceLastCall );
}
@@ -24,6 +24,8 @@
package appeng.api.networking.ticking;
import javax.annotation.Nonnull;
import appeng.api.networking.IGridCache;
import appeng.api.networking.IGridNode;
@@ -42,7 +44,7 @@ public interface ITickManager extends IGridCache
*
* @param node gridnode
*/
boolean alertDevice( IGridNode node );
boolean alertDevice( @Nonnull IGridNode node );
/**
* disables ticking for your device.
@@ -51,7 +53,7 @@ public interface ITickManager extends IGridCache
*
* @return if the call was successful.
*/
boolean sleepDevice( IGridNode node );
boolean sleepDevice( @Nonnull IGridNode node );
/**
* enables ticking for your device, undoes a sleepDevice call.
@@ -60,5 +62,5 @@ public interface ITickManager extends IGridCache
*
* @return if the call was successful.
*/
boolean wakeDevice( IGridNode node );
boolean wakeDevice( @Nonnull IGridNode node );
}
@@ -1,3 +1,4 @@
/*
* The MIT License (MIT)
*
@@ -29,5 +29,5 @@ public enum BusSupport
CABLE,
DENSE_CABLE
}
@@ -24,8 +24,6 @@
package appeng.api.parts;
import javax.annotation.Nullable;
import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.Entity;
import net.minecraft.item.Item;
@@ -71,7 +69,6 @@ public interface IFacadePart
/**
* The item that this facade masquerades as.
*/
@Nullable
ItemStack getTextureItem();
/**
+46 -2
View File
@@ -42,6 +42,7 @@ import net.minecraft.util.EnumFacing;
import net.minecraft.util.EnumHand;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Vec3d;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.common.capabilities.Capability;
import net.minecraftforge.fml.relauncher.Side;
@@ -129,7 +130,7 @@ public interface IPart extends IBoxProvider, ICustomCableConnection
/**
* a block around the bus's host has been changed.
*/
void onNeighborChanged();
void onNeighborChanged( IBlockAccess w, BlockPos pos, BlockPos neighbor );
/**
* @return output redstone on facing side
@@ -208,6 +209,7 @@ public interface IPart extends IBoxProvider, ICustomCableConnection
* Called when you right click the part, very similar to Block.onActivateBlock
*
* @param player right clicking player
* @param hand hand used
* @param pos position of block
*
* @return if your activate method performed something.
@@ -218,12 +220,41 @@ public interface IPart extends IBoxProvider, ICustomCableConnection
* Called when you right click the part, very similar to Block.onActivateBlock
*
* @param player shift right clicking player
* @param hand hand used
* @param pos position of block
*
* @return if your activate method performed something, you should use false unless you really need it.
*/
boolean onShiftActivate( EntityPlayer player, EnumHand hand, Vec3d pos );
/**
* Called when you left click the part, very similar to Block.onBlockClicked
*
* @param player left clicking player
* @param hand hand used
* @param pos position of block
*
* @return if your activate method performed something, you should use false unless you really need it.
*/
default boolean onClicked( EntityPlayer player, EnumHand hand, Vec3d pos )
{
return false;
}
/**
* Called when you shift-left click the part, very similar to Block.onBlockClicked
*
* @param player shift-left clicking player
* @param hand hand used
* @param pos position of block
*
* @return if your activate method performed something, you should use false unless you really need it.
*/
default boolean onShiftClicked( EntityPlayer player, EnumHand hand, Vec3d pos )
{
return false;
}
/**
* Add drops to the items being dropped into the world, if your item stores its contents when wrenched use the
* wrenched boolean to control what data is saved vs dropped when it is broken.
@@ -260,6 +291,9 @@ public interface IPart extends IBoxProvider, ICustomCableConnection
/**
* Used to determine which parts can be placed on what cables.
*
* Dense cables are not allowed for functional (getGridNode returns a node) parts.
* Doing so will result in crashes.
*
* @param what placed part
*
@@ -324,4 +358,14 @@ public interface IPart extends IBoxProvider, ICustomCableConnection
return null;
}
}
/**
* Flag to be passed to the renderer.
*
* @return flag or null
*/
default Long getRenderFlag()
{
return null;
}
}
@@ -0,0 +1,15 @@
package appeng.api.parts;
import java.util.List;
import javax.annotation.Nullable;
import net.minecraft.client.renderer.block.model.BakedQuad;
public interface IPartBakedModel
{
List<BakedQuad> getPartQuads( @Nullable Long partFlags, long rand );
}
+1 -1
View File
@@ -72,7 +72,7 @@ public interface IPartHost extends ICustomCableConnection
* @return null if the item failed to add, the side it was placed on other wise ( may different for cables,
* {@link AEPartLocation}.UNKNOWN )
*/
AEPartLocation addPart( ItemStack is, AEPartLocation side, EntityPlayer owner, EnumHand hand );
AEPartLocation addPart( ItemStack is, AEPartLocation side, EntityPlayer owner, EnumHand hand );
/**
* Get part by side ( center is {@link AEPartLocation}.UNKNOWN )
@@ -41,9 +41,9 @@ public interface IPartModel
/**
* A solid {@link IPartModel} indicates that the rendering requires a cable connection, which will also result in
* creating an intersection for the cable.
*
*
* This should be true for pretty much all parts.
*
*
* @return true for a solid part.
*/
default boolean requireCableConnection()
@@ -53,7 +53,7 @@ public interface IPartModel
/**
* A collection of {@link ResourceLocation} used as models for a part.
*
*
* @return a collection of models, never null.
*/
@Nonnull
@@ -23,6 +23,7 @@
package appeng.api.parts;
/**
* TODO: Consider removing and replacing with capabilities.
*/
@@ -26,11 +26,12 @@ package appeng.api.recipes;
import java.util.List;
import appeng.api.exceptions.MissingIngredientError;
import appeng.api.exceptions.RecipeError;
import appeng.api.exceptions.RegistrationError;
import appeng.api.exceptions.MissingIngredientException;
import appeng.api.exceptions.RecipeException;
import appeng.api.exceptions.RegistrationException;
@Deprecated
public interface ICraftHandler
{
@@ -40,15 +41,15 @@ public interface ICraftHandler
* @param input parsed inputs
* @param output parsed outputs
*
* @throws RecipeError
* @throws RecipeException
*/
void setup( List<List<IIngredient>> input, List<List<IIngredient>> output ) throws RecipeError;
void setup( List<List<IIngredient>> input, List<List<IIngredient>> output ) throws RecipeException;
/**
* called when all recipes are parsed, and your required to register your recipe.
*
* @throws RegistrationError
* @throws MissingIngredientError
* @throws RegistrationException
* @throws MissingIngredientException
*/
void register() throws RegistrationError, MissingIngredientError;
void register() throws RegistrationException, MissingIngredientException;
}

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