Compare commits

..

26 Commits

Author SHA1 Message Date
thatsIch 52d62b8202 Merge pull request #1591 from thatsIch/e-update-to-bc-7
Updates BC to 7.0.9 for rv2
2015-06-14 18:19:03 +02:00
thatsIch 643f559186 Fixes #1559: Level Emitter with P:R alloy wire does not crash anymore
Required to implement a more advanced interface, if not done that way, the parts will update themselves recursively
2015-06-14 10:10:51 +02:00
thatsIch 09ed06e47f Fixes #1588: Charged Certus Quartz Ore has its own oredictionary entry 2015-06-14 10:10:36 +02:00
thatsIch 741b5bee1f Updates BC to 7.0.9
Fixes disabling of BC integration
2015-06-13 22:53:57 +02:00
Uristqwerty c1c3655db6 Cleaned up CraftGuide Integration
A NPE caused to open CraftGuide very slowly (several seconds)

Added Grinder recipes
Added Inscriber recipes

Conflicts:
	src/main/java/appeng/integration/modules/CraftGuide.java
2015-06-09 23:42:03 +02:00
yueh b05796e62b No longer invalidate the cache of MEMonitorIInventory on simulate.
Should fix #1036
2015-06-05 23:06:57 +02:00
thatsIch 200e56a509 Fixes #1536: Checking for all required BC classes 2015-06-01 20:47:04 +02:00
thatsIch 9540bbce49 Merge pull request #1499 from TheJulianJES/patch-5
Changed version from PartStack provider to rv2 (rv3)
2015-05-23 13:52:58 +02:00
TheJulianJES c6d932da04 Changed version from PartStack provider to rv2 (rv3)
because @thatsIch merged it also to rv2
2015-05-23 13:49:52 +02:00
yueh 6e7100361c Fixes #1465 faulty item comparison 2015-05-19 21:16:30 +02:00
TheJulianJES ca50ee0762 Removes default RF tooltip
Removed tab

Did something
2015-05-19 21:16:10 +02:00
TheJulianJES f00d5c297f Parts display correctly in WAILA
Register an method that can be overidden

Register the same method in the interface

New class that picks the item and displays it to WAILA

Register the new class and call the other class method

Import in PartWailaDataProvider

Fixed errors

Renamed all Display -> Stack

Stuff
2015-05-19 21:15:50 +02:00
yueh b13f5ced01 Fixes #1389 Enabled repeatable keyboard events 2015-05-19 21:14:49 +02:00
thatsIch 1c0f1ea243 Merge branch 'rv2' of https://github.com/AppliedEnergistics/Applied-Energistics-2 into rv2 2015-05-19 21:11:26 +02:00
Jeremiah Winsley b612ff47a3 Test with V6e of RotaryCraft
Conflicts:
	gradle.properties
2015-05-19 21:10:08 +02:00
Jeremiah Winsley e8a68cc531 Fixes #1384 - implement AdvancedShaftPowerReceiver for RotaryCraft powersink 2015-05-19 21:08:37 +02:00
thatsIch d9f362270b Merge pull request #1454 from TheJulianJES/doublePlayerInvInscriber
Don't add the player inventory two times (rv2)
2015-05-14 12:43:21 +02:00
TheJulianJES 37aef15a02 Don't add the player inventory two times (rv2) 2015-05-14 12:38:44 +02:00
thatsIch 2d8728f0e1 Merge pull request #1437 from TheJulianJES/GermanLang
Changed things in de_DE.lang (rv2)
2015-05-10 12:12:08 +02:00
thatsIch 3498a0902b Merge pull request #1434 from plumpudding/errorEclipse
Error eclipse for rv2 branch
2015-05-10 12:11:58 +02:00
TheJulianJES bb4b6719fe Changed things in de_DE.lang 2015-05-10 10:34:54 +02:00
TheJulianJES 34f78a7ce4 Fix warnings in eclipse
Close scanner instead of doing it with a warning

Make the scanner final..
2015-05-10 00:14:56 +02:00
thatsIch 064acc21ee Fixes #1411: Adds recipes for stairs 2015-05-08 18:36:42 +02:00
Lorenzo Dalla Costa Cervelin deeb67f07d Update pt_BR.lang 2015-05-08 17:59:55 +02:00
thatsIch 2eeaa80b59 Merge pull request #1380 from thatsIch/e-fix-javadoc
Fixed missing Javadoc parameter
2015-05-03 21:48:53 +02:00
thatsIch 7cb485aa48 Fixed missing Javadoc parameter
Reworked the instantiation a bit
Added some additional checks due to the new nonnullability.
2015-05-03 16:45:27 +02:00
3049 changed files with 71257 additions and 115871 deletions
-16
View File
@@ -1,16 +0,0 @@
<!-- Provide a summary of the issue in the Title above, please do not "[Tag]" it -->
#### Description
<!-- Always use the most recent version from ae-mod.info, it might already be fixed -->
<!-- When describing a bug, tell us what was expected and what the actual behaviour is -->
<!-- When suggesting a feature, tell us how it should work and why it should be considered -->
#### Environment
<!-- Include as many relevant details about the environment -->
<!-- Like the used version, SP/MP, other mods and their version, crashlogs etc -->
<!-- Please use pastebin or gist for posting the complete crashlog, no excerpt -->
<!-- The following ones are required, please note "latest" is not a version -->
- Minecraft Version:
- AE2 Version:
- Forge Version:
-30
View File
@@ -1,30 +0,0 @@
---
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
@@ -1,17 +0,0 @@
---
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. -->
+2 -9
View File
@@ -8,11 +8,10 @@
!gradlew.bat
!build.gradle
!gradle.properties
!.travis.yml
# include markdowns
!README.md
!LICENSE
!License.md
# include sourcecode
!src/
@@ -22,10 +21,4 @@
!.gitignore
# code format to reduce noise in git commits
!codeformat/
# Github specific files and directories
!.github/
# Explicit ignores
Thumbs.db
!codeformat/
-33
View File
@@ -1,33 +0,0 @@
sudo: required
dist: trusty
language: java
jdk:
- oraclejdk8
- openjdk8
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
- 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/.m2/repository'
- '$HOME/.sonar/cache'
- '$HOME/.gradle/wrapper'
- '$HOME/.gradle/caches'
addons:
sonarcloud:
organization: "appliedenergistics"
install: "./gradlew setupCIWorkspace"
script:
- "./gradlew build"
- "./gradlew test"
- "./gradlew sonarqube"
+17 -35
View File
@@ -11,36 +11,19 @@ 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]`, `[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/))
* 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
* 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
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.
1. Make sure your issue hasn't already been answered or fixed. 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)
3. Click new issue
4. Enter your Issue's title (something that summarizes your issue), and then create a detailed description of the issue.
* To help in resolving your issues please try to include the follow if applicable:
* The problem that is happening?
* What was expected?
* How to reproduce the problem?
* Server or Single Player?
* Mod Pack using and version?
* Crash log (Please make sure to use [pastebin](http://pastebin.com/) for the log file)
* Screen shots or Pictures of the problem
5. Click `Submit New Issue`, and wait for feedback!
### Submitting Changes
@@ -72,8 +55,10 @@ Please note that we might close any issue not matching these requirements.
from our issue tracker. The body describes the behavior without the patch,
why this is a problem, and how the patch fixes the problem when applied.
````
* Always fully test your changes. If they are large engouh in scope, then fully test AE2.
* Describing the process you used to test your changes in detail will help speed up this process.
* Always fully test your changes. If they are large engouh in scope, then fully
test AE2.
* Describing the process you used to test your changes in detail will help speed
up this process.
## Making Trivial Changes
@@ -112,9 +97,6 @@ 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. Please report any case of maintaining the correct formatting.
### Whitespace
#### Tabs or spaces
+30 -110
View File
@@ -1,5 +1,5 @@
[![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%20Release&style=flat-square)](https://github.com/AppliedEnergistics/Applied-Energistics-2/releases)
<!--[![Latest Release](https://img.shields.io/github/tag/AppliedEnergistics/Applied-Energistics-2.svg?label=Latest Release)](https://github.com/AppliedEnergistics/Applied-Energistics-2/releases) -->
[![Latest Build](https://img.shields.io/teamcity/http/ci.tsr.me/s/AppliedEnergistics_AutoHeadBuild.svg?label=Latest Build)](http://ci.tsr.me/viewType.html?buildTypeId=AppliedEnergistics_AutoHeadBuild&tab=buildTypeStatusDiv)
# Applied Energistics 2
@@ -14,7 +14,6 @@
* [Building](#building)
* [Contribution](#contribution)
* [API](#applied-energistics-2-api)
* [CraftTweaker](#applied-energistics-2-crafttweaker)
* [Localization](#applied-energistics-2-localization)
* [Credits](#credits)
@@ -27,21 +26,20 @@ A Mod about Matter, Energy and using them to conquer the world..
* [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)
* [Discord](https://discord.gg/GygKjjm)
## License
* Applied Energistics 2 API
- (c) 2013 - 2018 AlgorithmX2 et al
- [![License](https://img.shields.io/badge/License-MIT-red.svg?style=flat-square)](http://opensource.org/licenses/MIT)
- (c) 2013 - 2015 AlgorithmX2 et al
- ![License](https://img.shields.io/badge/License-MIT-red.svg?style=flat)
* Applied Energistics 2
- (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)
- (c) 2013 - 2015 AlgorithmX2 et al
- [![License](https://img.shields.io/badge/License-LGPLv3-blue.svg?style=flat)](https://raw.githubusercontent.com/AppliedEnergistics/Applied-Energistics-2/rv2/LICENSE)
* Textures and Models
- (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/)
- (c) 2013 - 2015 AlgorithmX2 et al
- [![License](https://img.shields.io/badge/License-CC%20BY--NC--SA%203.0-yellow.svg?style=flat)](https://creativecommons.org/licenses/by-nc-sa/3.0/)
* Text and Translations
- [![License](https://img.shields.io/badge/License-No%20Restriction-green.svg?style=flat-square)](https://creativecommons.org/publicdomain/zero/1.0/)
- ![License](https://img.shields.io/badge/License-No%20Restriction-green.svg?style=flat)
## Downloads
@@ -55,36 +53,19 @@ You install this mod by putting it into the `minecraft/mods/` folder. It has no
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]`, `[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/))
* 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
* 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
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.
1. Make sure your issue hasn't already been answered or fixed. 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)
3. Click new issue
4. Enter your Issue's title (something that summarizes your issue), and then create a detailed description of the issue.
* To help in resolving your issues please try to include the follow if applicable:
* The problem that is happening?
* What was expected?
* How to reproduce the problem?
* Server or Single Player?
* Mod Pack using and version?
* Crash log (Please make sure to use [pastebin](http://pastebin.com/) for the log file)
* Screen shots or Pictures of the problem
5. Click `Submit New Issue`, and wait for feedback!
## Building
@@ -97,19 +78,17 @@ Please note that we might close any issue not matching these requirements.
- 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)
- IntelliJ: Import into IDE and execute `gradlew genIntellijRuns` afterwards
- 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`
- `-Dfml.coreMods.load=appeng.transformer.AppEngCore`
## Contribution
Before you want to add major changes, you might want to discuss them with us first, before wasting your time.
If you are still willing to contribute to this project, you can contribute via [Pull-Request](https://help.github.com/articles/creating-a-pull-request).
The [guidelines for contributing](https://github.com/AppliedEnergistics/Applied-Energistics-2/blob/master/.github/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.
@@ -120,7 +99,7 @@ Here are a few things to keep in mind that will help get your PR approved.
- 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**
Getting Started
1. Fork this repository
2. Clone the fork via
@@ -140,72 +119,21 @@ If you are only doing single file pull requests, GitHub supports using a quick w
The API for Applied Energistics 2. It is open source to discuss changes, improve documentation, and provide better add-on support in general.
Universal builds obtained [Here](http://ae2.ae-mod.info/Downloads/) should work in a development environment.
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_-_____-__:api"
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:rv5-stable-1:api` for the API only or `appeng:appliedenergistics2:rv5-stable-1` for the whole mod.
## Applied Energistics 2 CraftTweaker
### Inscriber
Add a recipe. When `inscribe` is true the bottom and top inputs are not consumed.
mods.appliedenergistics2.Inscriber.addRecipe(ItemStack output, ItemStack input, boolean inscribe,
@Optional ItemStack topInput, @Optional ItemStack bottomInput );
Remove all recipes for this output stack.
mods.appliedenergistics2.Inscriber.removeRecipe(ItemStack output);
### Grindstone
Add a recipe.
mods.appliedenergistics2.Grinder.addRecipe( ItemStack output, ItemStack input, int turns,
@Optional ItemStack secondary1Output, @Optional float secondary1Chance,
@Optional ItemStack secondary2Output, @Optional float secondary2Chance);
Remove recipes for this input.
mods.appliedenergistics2.Grinder.removeRecipe(ItemStack input);
### Spatial
Whitelist a TileEntity class for Spatial IO.
mods.appliedenergistics2.Spatial.whitelistEntity( String fullEntityClassName );
### Attunement
Attune a ItemStack or ModID to a specific P2P-Tunnel type. ModID's are used as fallback when no ItemStack was found.
mods.appliedenergistics2.Attunement.attuneME( ItemStack itemStack );
mods.appliedenergistics2.Attunement.attuneME( String modID );
mods.appliedenergistics2.Attunement.attuneItem( ItemStack itemStack );
mods.appliedenergistics2.Attunement.attuneItem( String modID );
mods.appliedenergistics2.Attunement.attuneFluid( ItemStack itemStack );
mods.appliedenergistics2.Attunement.attuneFluid( String modID );
mods.appliedenergistics2.Attunement.attuneRedstone( ItemStack itemStack );
mods.appliedenergistics2.Attunement.attuneRedstone( String modID );
mods.appliedenergistics2.Attunement.attuneRF( ItemStack itemStack );
mods.appliedenergistics2.Attunement.attuneRF( String modID );
mods.appliedenergistics2.Attunement.attuneIC2( ItemStack itemStack );
mods.appliedenergistics2.Attunement.attuneIC2( String modID );
mods.appliedenergistics2.Attunement.attuneLight( ItemStack itemStack );
mods.appliedenergistics2.Attunement.attuneLight( String modID );
### Cannon
Add ammo types for the matter cannon.
mods.appliedenergistics2.Cannon.registerAmmo( ItemStack itemStack, double weight );
An example string would be `appeng:appliedenergistics2:rv2-alpha-30:dev`
## Applied Energistics 2 Localization
@@ -217,17 +145,9 @@ Add ammo types for the matter cannon.
Files must be encoded as UTF-8.
### New or updated Translations
### New 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.
You can provide any additional languages by creating a new file with the [appropriate language code](http://download1.parallels.com/SiteBuilder/Windows/docs/3.2/en_US/sitebulder-3.2-win-sdk-localization-pack-creation-guide/30801.htm).
### Final Note
+51 -54
View File
@@ -1,6 +1,6 @@
/*
* This file is part of Applied Energistics 2.
* Copyright (c) 2013 - 2015, AlgorithmX2, All rights reserved.
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
*
* Applied Energistics 2 is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -16,106 +16,103 @@
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
*/
apply plugin: 'forge'
apply from: 'gradle/scripts/dependencies.gradle'
apply from: 'gradle/scripts/artifacts.gradle'
apply from: 'gradle/scripts/autoinstallruntime.gradle'
apply from: 'gradle/scripts/integration.gradle'
apply from: 'gradle/scripts/optional.gradle'
buildscript {
repositories {
mavenLocal()
jcenter()
mavenCentral()
maven {
name = "forge"
url = "http://files.minecraftforge.net/maven"
}
maven {
name = "sonatype"
url = "https://oss.sonatype.org/content/repositories/snapshots/"
}
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT'
classpath 'net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT'
}
}
plugins {
id "org.sonarqube" version "2.6"
configurations.all {
resolutionStrategy.cacheDynamicVersionsFor 7200, 'hours'
}
apply plugin: 'net.minecraftforge.gradle.forge'
apply plugin: 'jacoco'
repositories {
mavenLocal()
jcenter()
mavenCentral()
}
apply from: 'gradle/scripts/dependencies.gradle'
apply from: 'gradle/scripts/artifacts.gradle'
apply from: 'gradle/scripts/optional.gradle'
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
// 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'
}
sourceCompatibility = JavaVersion.VERSION_1_6
targetCompatibility = JavaVersion.VERSION_1_6
version = aeversion + "-" + aechannel + "-" + aebuild
group = aegroup
archivesBaseName = aebasename
// If TeamCity is running this build, lets set the version info
if (hasProperty("teamcity")) {
version = teamcity["build.number"]
// Fix for main branch being built
version = version.replaceAll("/", "-")
}
// Add Coremod Manifest
jar {
manifest {
attributes 'FMLAT': 'appeng_at.cfg'
attributes 'FMLCorePlugin': 'appeng.transformer.AppEngCore'
attributes 'FMLCorePluginContainsFMLMod': 'true'
}
from sourceSets.api.output
dependsOn apiClasses
// specify which files are really included, can control which APIs should be in
include "appeng/**"
include "assets/**"
include "mcmod.info"
include "pack.mcmeta"
include "META-INF/appeng_at.cfg"
}
minecraft {
version = minecraft_version + "-" + forge_version
replaceIn "AEConfig.java"
replaceIn "package-info.java"
replace "@version@", project.version
replace "@aeversion@", aeversion
replace "@aechannel@", aechannel
replace "@aebuild@", aebuild
// used when launching minecraft in dev env
runDir = "run"
mappings = mcp_mappings
}
sourceSets {
api
main
main {
java {
srcDirs += 'src/api/java'
srcDirs += 'src/main/java/'
}
resources {
srcDir "src/main/resources/"
include "assets/appliedenergistics2/recipes/*.recipe",
"assets/appliedenergistics2/lang/*.lang",
"assets/appliedenergistics2/textures/blocks/*",
"assets/appliedenergistics2/textures/guis/*",
"assets/appliedenergistics2/textures/models/*",
"assets/appliedenergistics2/textures/items/*"
}
}
}
processResources
{
// this will ensure that this task is redone when the versions change.
inputs.property "version", project.version
inputs.property "mcversion", project.minecraft.version
processResources {
// replace stuff in mcmod.info, nothing else
from(sourceSets.main.resources.srcDirs) {
include 'mcmod.info'
expand 'version': project.version, 'mcversion': project.minecraft.version
expand 'version': project.version, 'mcversion': minecraft_version
include 'pack.mcmeta'
}
// copy everything else, thats not the mcmod.info
from(sourceSets.main.resources.srcDirs) {
exclude 'mcmod.info'
}
// move access transformer to META-INF
rename '(.+_at.cfg)', 'META-INF/$1'
}
}
Binary file not shown.
+10
View File
@@ -0,0 +1,10 @@
#Organize Import Order
#Thu Oct 09 12:52:21 CEST 2014
6=
5=cpw
4=net
3=io
2=org
1=com
0=java
7=appeng
@@ -1,55 +1,49 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<profiles version="13">
<profile kind="CodeFormatterProfile" name="AE2" version="13">
<profiles version="12">
<profile kind="CodeFormatterProfile" name="Algo" version="12">
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_ellipsis" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration" value="do not insert"/>
<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"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.disabling_tag" value="@formatter:off"/>
<setting id="org.eclipse.jdt.core.formatter.continuation_indentation" value="2"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_enum_constants" value="80"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_enum_constants" value="0"/>
<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.insert_space_before_parenthesized_expression_in_return" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations" value="2"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer" value="insert"/>
@@ -58,16 +52,14 @@
<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="next_line"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration" value="end_of_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"/>
@@ -80,17 +72,16 @@
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_method_declaration" value="next_line"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.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"/>
@@ -102,30 +93,28 @@
<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="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.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_catch" value="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="16"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation" value="0"/>
<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"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer" value="insert"/>
<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="16"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer" value="0"/>
<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"/>
@@ -133,13 +122,13 @@
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.format_line_comments" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.align_type_members_on_columns" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_assignment" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant" value="insert"/>
@@ -149,7 +138,7 @@
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration" value="next_line"/>
@@ -158,24 +147,21 @@
<setting id="org.eclipse.jdt.core.formatter.comment.format_header" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while" value="insert"/>
<setting id="org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode" value="enabled"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_method_declaration" value="0"/>
<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.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.alignment_for_selector_in_method_invocation" value="0"/>
<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"/>
@@ -196,8 +182,7 @@
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_method" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw" value="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_parenthesized_expression_in_throw" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement" value="do not insert"/>
<setting id="org.eclipse.jdt.core.compiler.codegen.targetPlatform" value="1.8"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_switch" value="next_line"/>
@@ -209,10 +194,8 @@
<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"/>
@@ -232,7 +215,7 @@
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_member_type" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement" value="insert"/>
@@ -248,7 +231,7 @@
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.format_block_comments" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration" value="insert"/>
@@ -273,7 +256,6 @@
<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"/>
@@ -285,11 +267,10 @@
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_constant" value="next_line"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_type_declaration" value="next_line"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_package" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_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"/>
@@ -302,13 +283,13 @@
<setting id="org.eclipse.jdt.core.formatter.join_lines_in_comments" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.indent_parameter_description" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.comment.indent_parameter_description" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.tabulation.char" value="tab"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_between_import_groups" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.lineSplit" value="160"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch" value="insert"/>
</profile>
</profiles>
-11
View File
@@ -1,11 +0,0 @@
#Organize Import Order
#Sat Jun 13 15:22:41 CEST 2015
8=appeng
7=
6=cpw
5=net
4=io
3=org
2=com
1=javax
0=java
+39 -17
View File
@@ -1,5 +1,5 @@
aeversion=rv5
aechannel=alpha
aeversion=rv2
aechannel=stable
aebuild=0
aegroup=appeng
aebasename=appliedenergistics2
@@ -7,29 +7,51 @@ aebasename=appliedenergistics2
#########################################################
# Versions #
#########################################################
minecraft_version=1.12.2
mcp_mappings=snapshot_20171003
forge_version=14.23.5.2768
minecraft_version=1.7.10
forge_version=10.13.2.1291
#########################################################
# Installable #
#########################################################
hwyla_version=1.8.26-B41_1.12.2
waila_version=1.5.10
jabba_version=1.2.1a
enderstorage_version=1.4.7.33
translocator_version=1.1.1.14
ic2_version=2.2.717
enderio_version=2.3.0.375_beta
#cofhlib_version=1.0.1-157
#cofhcore_version=3.0.2-270
#texpansion_version=4.0.0-176
#tfoundation_version=1.0.0-82
betterstorage_version=0.11.3.123.20
invtweaks_version=1.58
#########################################################
# Provided APIs #
#########################################################
jei_version=4.13.0.219
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=0.3.0.15
fmp_version=1.1.1.324
code_chicken_lib_version=1.1.3.127
code_chicken_core_version=1.0.4.35
nei_version=1.0.4.90
bc_version=7.0.9
#########################################################
# Deployment #
# Self Compiled APIs #
#########################################################
website_version=1.12.2
curse_versions=1.12.2
mekansim_version=8.0.1.198
rotarycraft_version=V6e
#########################################################
# Self Compiled API Stubs #
# Note: Do not edit these version numbers as they are #
# not the version of the mod, but stub code for AE2 to #
# compile #
#########################################################
api_coloredlightscore_version=1
api_craftguide_version=1
api_immibis_version=1
api_mfr_version=1
api_railcraft_version=1
api_rblocks_version=1
api_rf_version=2
+22 -38
View File
@@ -1,59 +1,43 @@
/*
* This file is part of Applied Energistics 2.
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
*
* Applied Energistics 2 is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Applied Energistics 2 is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
*/
// Suppresses warnings/errors when building javadocs
allprojects {
tasks.withType(Javadoc) {
options.addStringOption('Xdoclint:none', '-quiet')
}
}
javadoc {
options.encoding = 'UTF-8'
options.charSet = 'UTF-8'
}
task javadocs(type: Javadoc) {
task myJavadocs(type: Javadoc) {
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
classpath = configurations.compile
}
task javadocJar(type: Jar, dependsOn: javadocs) {
from javadoc.destinationDir
task javadocJar(type: Jar, dependsOn: myJavadocs) {
classifier = 'javadoc'
from 'build/docs/javadoc/'
}
task devJar(type: Jar) {
manifest {
attributes 'FMLCorePlugin': 'appeng.transformer.AppEngCore'
attributes 'FMLCorePluginContainsFMLMod': 'true'
}
from(sourceSets.main.output) {
include "appeng/**"
include "assets/**"
include 'mcmod.info'
}
classifier = 'dev'
}
task apiJar(type: Jar) {
from sourceSets.api.java
include "appeng/api/**"
from sourceSets.api.output
from sourceSets.main.output
include "appeng/api/**"
classifier = 'api'
}
artifacts {
archives devJar
archives apiJar
archives javadocJar
archives sourceJar
}
+12
View File
@@ -0,0 +1,12 @@
// searches for NEI and Chicken stuff from compile set
// and adds them to the mods in run dir
task copyChicken(type: Copy, dependsOn: "extractUserDev") {
from { configurations.compile }
include "**/*Chicken*.jar", "**/*NotEnoughItems*.jar"
exclude "**/CodeChickenLib*" // because CCC downloads it anyways.. -_-
into file(minecraft.runDir + "/mods")
mustRunAfter "deobfBinJar"
mustRunAfter "repackMinecraft"
}
tasks.setupDevWorkspace.dependsOn copyChicken
tasks.setupDecompWorkspace.dependsOn copyChicken
+72 -51
View File
@@ -16,8 +16,14 @@
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
*/
repositories {
mavenLocal()
maven {
name "ChickenBones"
url "http://chickenbones.net/maven/"
}
maven {
name "Mobius"
@@ -25,54 +31,50 @@ repositories {
}
maven {
name = "JEI repo"
url "http://dvs1.progwml6.com/files/maven"
name "FireBall API Depot"
url "http://dl.tsr.me/artifactory/libs-release-local"
}
maven {
name = "Tesla repo"
url "http://maven.mcmoddev.com"
name = "Player"
url = "http://maven.ic2.player.to/"
}
maven {
name = "IC2 repo"
url = "http://maven.ic2.player.to"
name = "Tterrag"
url = "http://maven.tterrag.com/"
}
maven {
name = "CoFH Maven"
url = "http://maven.covers1624.net"
name = "RX14 Proxy"
url = "http://mvn.rx14.co.uk/repo/"
}
maven { // TheOneProbe
name 'tterrag maven'
url "http://maven.tterrag.com/"
ivy {
name "BuildCraft"
artifactPattern "http://www.mod-buildcraft.com/releases/BuildCraft/[revision]/[module]-[revision]-[classifier].[ext]"
}
maven { // McJtyLib
name 'mcjty'
url "http://maven.k-4u.nl/"
}
// CurseForge DNS for TE is not available or I am just being unlucky, code part can stay since this is applicable to any other curseforge mod though
// ivy {
// name = "CoFHLib"
// artifactPattern "http://addons.cursecdn.com/files/2212/893/[module]-[revision].[ext]"
// }
//
// ivy {
// name = "CoFHCore"
// artifactPattern "http://addons.cursecdn.com/files/2212/895/[module]-[revision].[ext]"
// }
maven { // Hwyla
name 'tehnut'
url "http://tehnut.info/maven"
}
// ivy {
// name = "ThermalExpansion"
// artifactPattern "http://addons.curse.cursecdn.com/files/2212/446/[module]-[revision].[ext]"
// }
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/"
}
// ivy {
// name = "ThermalFoundation"
// artifactPattern "http://addons.curse.cursecdn.com/files/2212/444/[module]-[revision].[ext]"
// }
}
configurations {
@@ -80,25 +82,44 @@ configurations {
}
dependencies {
// installable runtime dependencies
mods "mcp.mobius.waila:Hwyla:${hwyla_version}"
mods "net.industrial-craft:industrialcraft-2:${ic2_version}:dev"
mods "mcjty.theoneprobe:TheOneProbe-${minecraft_version}:${top_version}"
// installable
mods "mcp.mobius.waila:Waila:${waila_version}_${minecraft_version}:dev"
mods "mcp.mobius.jabba:Jabba:${jabba_version}_${minecraft_version}:dev"
mods "codechicken:EnderStorage:${minecraft_version}-${enderstorage_version}:dev"
mods "codechicken:Translocator:${minecraft_version}-${translocator_version}:dev"
mods "net.industrial-craft:industrialcraft-2:${ic2_version}-experimental:dev"
mods "com.enderio:EnderIO:${minecraft_version}-${enderio_version}:dev"
mods "net.mcft.copy.betterstorage:BetterStorage:${minecraft_version}-${betterstorage_version}:deobf"
mods "inventorytweaks:InventoryTweaks:${invtweaks_version}:deobf"
// mods name: 'CoFHLib', version: "[${minecraft_version}]${cofhlib_version}-dev", ext: 'jar'
// mods name: 'CoFHCore', version: "[${minecraft_version}]${cofhcore_version}-dev", ext: 'jar'
// mods name: 'ThermalExpansion', version: "[${minecraft_version}]${texpansion_version}-dev", ext: 'jar'
// mods name: 'ThermalFoundation', version: "[${minecraft_version}]${tfoundation_version}-dev", ext: 'jar'
// compile against provided APIs
compileOnly "mezz.jei:jei_${minecraft_version}:${jei_version}:api"
compileOnly "mcp.mobius.waila:Hwyla:${hwyla_version}"
compileOnly "net.darkhax.tesla:Tesla-1.12.2:${tesla_version}"
compileOnly "net.industrial-craft:industrialcraft-2:${ic2_version}:api"
compileOnly "mcjty.theoneprobe:TheOneProbe-1.12:${top_version}:api"
compileOnly "cofh:CoFHCore:${cofhcore_version}:deobf"
compileOnly "CraftTweaker2:CraftTweaker2-API:${crafttweaker_version}"
compileOnly "inventory-tweaks:InventoryTweaks:${inventorytweaks_version}:api"
compileOnly "team.chisel.ctm:CTM:MC1.12-${ctm_version}"
compile "codechicken:ForgeMultipart:${minecraft_version}-${fmp_version}:dev"
compile "codechicken:CodeChickenLib:${minecraft_version}-${code_chicken_lib_version}:dev"
compile "codechicken:CodeChickenCore:${minecraft_version}-${code_chicken_core_version}:dev"
compile "codechicken:NotEnoughItems:${minecraft_version}-${nei_version}:dev"
compile "com.mod-buildcraft:buildcraft:${bc_version}:dev"
// at runtime, use the full JEI jar
runtime "mezz.jei:jei_${minecraft_version}:${jei_version}"
// provided APIs
compile "net.industrial-craft:industrialcraft-2:${ic2_version}-experimental:api"
compile "net.mcft.copy.betterstorage:BetterStorage:${minecraft_version}-${betterstorage_version}:api"
// unit test dependencies
testCompile "junit:junit:4.12"
// self compiled APIs
compile "appeng:Waila:${waila_version}_${minecraft_version}:api"
compile "appeng:RotaryCraft:${rotarycraft_version}:api"
compile "appeng:mekanism:${minecraft_version}-${mekansim_version}:api"
compile "appeng:InventoryTweaks:${invtweaks_version}:api"
// self compiled stubs
compile(group: 'api', name: 'coloredlightscore', version: "${api_coloredlightscore_version}")
compile(group: 'api', name: 'craftguide', version: "${api_craftguide_version}")
compile(group: 'api', name: 'immibis', version: "${api_immibis_version}")
compile(group: 'api', name: 'mfr', version: "${api_mfr_version}")
compile(group: 'api', name: 'railcraft', version: "${api_railcraft_version}")
compile(group: 'api', name: 'rblocks', version: "${api_rblocks_version}")
compile(group: 'api', name: 'rf', version: "${api_rf_version}")
testCompile "junit:junit:4.11"
}
+7
View File
@@ -0,0 +1,7 @@
apply plugin: 'idea'
idea {
module {
inheritOutputDirs = true
}
}
+83 -32
View File
@@ -1,55 +1,106 @@
/*
* This file is part of Applied Energistics 2.
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
*
* Applied Energistics 2 is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Applied Energistics 2 is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
*/
task wrapper(type: Wrapper) {
gradleVersion = "2.14"
gradleVersion = "2.3"
}
// HWYLA
task installHwyla(type: Copy, dependsOn: "deinstallHwyla") {
// WAILA
task installWaila(type: Copy, dependsOn: "deinstallWaila") {
from { configurations.mods }
include "**/*Hwyla*.jar"
include "**/*Waila*dev.jar"
into file(minecraft.runDir + "/mods")
}
task deinstallHwyla(type: Delete) {
delete fileTree(dir: minecraft.runDir + "/mods", include: "*Hwyla*.jar")
task deinstallWaila(type: Delete) {
delete fileTree(dir: minecraft.runDir + "/mods", include: "*Waila*.jar")
}
// IC2
// JABBA
task installJabba(type: Copy, dependsOn: "deinstallJabba") {
from { configurations.mods }
include "**/*Jabba*dev.jar"
into file(minecraft.runDir + "/mods")
}
task deinstallJabba(type: Delete) {
delete fileTree(dir: minecraft.runDir + "/mods", include: "*Jabba*.jar")
}
// ENDER STORAGE
task installEnderStorage(type: Copy, dependsOn: "deinstallEnderStorage") {
from { configurations.mods }
include "**/*EnderStorage*dev.jar"
into file(minecraft.runDir + "/mods")
}
task deinstallEnderStorage(type: Delete) {
delete fileTree(dir: minecraft.runDir + "/mods", include: "*EnderStorage*.jar")
}
// TRANSLOCATOR
task installTranslocator(type: Copy, dependsOn: "deinstallTranslocator") {
from { configurations.mods }
include "**/*Translocator*dev.jar"
into file(minecraft.runDir + "/mods")
}
task deinstallTranslocator(type: Delete) {
delete fileTree(dir: minecraft.runDir + "/mods", include: "*Translocator*.jar")
}
// INDUSTRIALCRAFT
task installIC2(type: Copy, dependsOn: "deinstallIC2") {
from { configurations.mods }
include "**/*industrialcraft-2*.jar"
include "**/*industrialcraft*dev.jar"
into file(minecraft.runDir + "/mods")
}
task deinstallIC2(type: Delete) {
delete fileTree(dir: minecraft.runDir + "/mods", include: "*industrialcraft-2*.jar")
delete fileTree(dir: minecraft.runDir + "/mods", include: "*industrialcraft*.jar")
}
// TOP
task installTop(type: Copy, dependsOn: ["deinstallTop"]) {
// ENDER IO
task installEnderIO(type: Copy, dependsOn: "deinstallEnderIO") {
from { configurations.mods }
include "**/*TheOneProbe*.jar"
include "**/*EnderIO*dev.jar"
into file(minecraft.runDir + "/mods")
}
task deinstallTop(type: Delete) {
delete fileTree(dir: minecraft.runDir + "/mods", include: "*TheOneProbe*.jar")
task deinstallEnderIO(type: Delete) {
delete fileTree(dir: minecraft.runDir + "/mods", include: "*EnderIO*.jar")
}
// TE
//task installTE(type: Copy, dependsOn: "deinstallTE") {
// from { configurations.mods }
// include "**/*CoFHLib*.jar"
// include "**/*CoFHCore*.jar"
// include "**/*ThermalFoundation*.jar"
// include "**/*ThermalExpansion*.jar"
//
// into file(minecraft.runDir + "/mods")
//}
//
//task deinstallTE(type: Delete) {
// delete fileTree(dir: minecraft.runDir + "/mods", includes: ["*CoFHLib*.jar", "*CoFHCore*.jar", "*ThermalFoundation*.jar", "*ThermalExpansion*.jar"])
//}
// INV TWEAKS
task installInvTweaks(type: Copy, dependsOn: "deinstallInvTweaks") {
from { configurations.mods }
include "**/*InventoryTweaks*dev*.jar"
into file(minecraft.runDir + "/mods")
}
task deinstallInvTweaks(type: Delete) {
delete fileTree(dir: minecraft.runDir + "/mods", include: "*InventoryTweaks*.jar")
}
// BETTER STORAGE
task installBetterStorage(type: Copy, dependsOn: "deinstallBetterStorage") {
from { configurations.mods }
include "**/*BetterStorage*deobf*.jar"
into file(minecraft.runDir + "/mods")
}
task deinstallBetterStorage(type: Delete) {
delete fileTree(dir: minecraft.runDir + "/mods", include: "*BetterStorage*.jar")
}
Binary file not shown.
+2 -1
View File
@@ -1,5 +1,6 @@
#Sat May 02 19:28:20 CEST 2015
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.8-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-2.3-bin.zip
Vendored
+51 -59
View File
@@ -1,4 +1,4 @@
#!/usr/bin/env sh
#!/usr/bin/env bash
##############################################################################
##
@@ -6,6 +6,47 @@
##
##############################################################################
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""
APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
warn ( ) {
echo "$*"
}
die ( ) {
echo
echo "$*"
echo
exit 1
}
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
case "`uname`" in
CYGWIN* )
cygwin=true
;;
Darwin* )
darwin=true
;;
MINGW* )
msys=true
;;
esac
# For Cygwin, ensure paths are in UNIX format before anything is touched.
if $cygwin ; then
[ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
fi
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
@@ -20,49 +61,9 @@ while [ -h "$PRG" ] ; do
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null
cd "`dirname \"$PRG\"`/" >&-
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null
APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
warn () {
echo "$*"
}
die () {
echo
echo "$*"
echo
exit 1
}
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
case "`uname`" in
CYGWIN* )
cygwin=true
;;
Darwin* )
darwin=true
;;
MINGW* )
msys=true
;;
NONSTOP* )
nonstop=true
;;
esac
cd "$SAVED" >&-
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
@@ -89,7 +90,7 @@ location of your Java installation."
fi
# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
@@ -113,7 +114,6 @@ fi
if $cygwin ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
@@ -154,19 +154,11 @@ if $cygwin ; then
esac
fi
# Escape application args
save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
function splitJvmOpts() {
JVM_OPTS=("$@")
}
APP_ARGS=$(save "$@")
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
# 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" "$@"
exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
Vendored
+10 -4
View File
@@ -8,14 +8,14 @@
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
@@ -46,9 +46,10 @@ echo location of your Java installation.
goto fail
:init
@rem Get command-line arguments, handling Windows variants
@rem Get command-line arguments, handling Windowz 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.
@@ -59,6 +60,11 @@ 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
+3 -3
View File
@@ -51,15 +51,15 @@ public enum AEApi
HELD_API = (IAppEngApi) apiField.get( apiClass );
}
catch( final ClassNotFoundException e )
catch( ClassNotFoundException e )
{
throw new CoreInaccessibleException( "AE2 API tried to access the " + CORE_API_FQN + " class, without it being declared." );
}
catch( final NoSuchFieldException e )
catch( NoSuchFieldException e )
{
throw new CoreInaccessibleException( "AE2 API tried to access the " + CORE_API_FIELD + " field in " + CORE_API_FQN + " without it being declared." );
}
catch( final IllegalAccessException e )
catch( IllegalAccessException e )
{
throw new CoreInaccessibleException( "AE2 API tried to access the " + CORE_API_FIELD + " field in " + CORE_API_FQN + " without enough access permissions." );
}
+58 -13
View File
@@ -24,46 +24,91 @@
package appeng.api;
import appeng.api.definitions.Blocks;
import appeng.api.definitions.IDefinitions;
import appeng.api.definitions.Items;
import appeng.api.definitions.Materials;
import appeng.api.definitions.Parts;
import appeng.api.exceptions.FailedConnection;
import appeng.api.features.IRegistryContainer;
import appeng.api.networking.IGridHelper;
import appeng.api.networking.IGridBlock;
import appeng.api.networking.IGridConnection;
import appeng.api.networking.IGridNode;
import appeng.api.parts.IPartHelper;
import appeng.api.storage.IStorageHelper;
import appeng.api.util.IClientHelper;
@AEInjectable
public interface IAppEngApi
{
/**
* @return Registry Container for the numerous registries in AE2.
*/
IRegistryContainer registries();
/**
* @return A helper for working with storage data types.
* @return helper for working with storage data types.
*/
IStorageHelper storage();
/**
* @return A helper to create {@link IGridNode} and other grid related objects.
*/
IGridHelper grid();
/**
* @return A helper for working with grids, and buses.
* @return helper for working with grids, and buses.
*/
IPartHelper partHelper();
/**
* @return An accessible list of all AE definitions
* @return an accessible list of all of AE's Items
*
* @deprecated use {@link appeng.api.definitions.IDefinitions#items()}
*/
@Deprecated
Items items();
/**
* @return an accessible list of all of AE's materials; materials are items
*
* @deprecated use {@link appeng.api.definitions.IDefinitions#materials()}
*/
@Deprecated
Materials materials();
/**
* @return an accessible list of all of AE's blocks
*
* @deprecated use {@link appeng.api.definitions.IDefinitions#blocks()}
*/
@Deprecated
Blocks blocks();
/**
* @return an accessible list of all of AE's parts, parts are items
*
* @deprecated use {@link appeng.api.definitions.IDefinitions#parts()}
*/
@Deprecated
Parts parts();
/**
* @return an accessible list of all AE definitions
*/
IDefinitions definitions();
/**
* @return Utility methods primarily useful for client side stuff
* create a grid node for your {@link appeng.api.networking.IGridHost}
*
* @param block grid block
*
* @return grid node of block
*/
IClientHelper client();
IGridNode createGridNode( IGridBlock block );
/**
* create a connection between two {@link appeng.api.networking.IGridNode}
*
* @param a to be connected gridnode
* @param b to be connected gridnode
*
* @throws appeng.api.exceptions.FailedConnection
*/
IGridConnection createGridConnection( IGridNode a, IGridNode b ) throws FailedConnection;
}
@@ -30,22 +30,22 @@ public enum AccessRestriction
private final int permissionBit;
AccessRestriction( final int v )
AccessRestriction( int v )
{
this.permissionBit = v;
}
public boolean hasPermission( final AccessRestriction ar )
public boolean hasPermission( AccessRestriction ar )
{
return ( this.permissionBit & ar.permissionBit ) == ar.permissionBit;
}
public AccessRestriction restrictPermissions( final AccessRestriction ar )
public AccessRestriction restrictPermissions( AccessRestriction ar )
{
return this.getPermByBit( this.permissionBit & ar.permissionBit );
}
private AccessRestriction getPermByBit( final int bit )
private AccessRestriction getPermByBit( int bit )
{
switch( bit )
{
@@ -61,12 +61,12 @@ public enum AccessRestriction
}
}
public AccessRestriction addPermissions( final AccessRestriction ar )
public AccessRestriction addPermissions( AccessRestriction ar )
{
return this.getPermByBit( this.permissionBit | ar.permissionBit );
}
public AccessRestriction removePermissions( final AccessRestriction ar )
public AccessRestriction removePermissions( AccessRestriction ar )
{
return this.getPermByBit( this.permissionBit & ( ~ar.permissionBit ) );
}
@@ -27,22 +27,18 @@ package appeng.api.config;
public enum FuzzyMode
{
// Note that percentage damaged, is the inverse of percentage durability.
IGNORE_ALL( -1 ),
PERCENT_99( 0 ),
PERCENT_75( 25 ),
PERCENT_50( 50 ),
PERCENT_25( 75 );
IGNORE_ALL( -1 ), PERCENT_99( 0 ), PERCENT_75( 25 ), PERCENT_50( 50 ), PERCENT_25( 75 );
public final float breakPoint;
public final float percentage;
FuzzyMode( final float p )
FuzzyMode( float p )
{
this.percentage = p;
this.breakPoint = p / 100.0f;
}
public int calculateBreakPoint( final int maxDamage )
public int calculateBreakPoint( int maxDamage )
{
return (int) ( ( this.percentage * maxDamage ) / 100.0f );
}
@@ -33,12 +33,12 @@ public enum PowerMultiplier
*/
public double multiplier = 1.0;
public double multiply( final double in )
public double multiply( double in )
{
return in * this.multiplier;
}
public double divide( final double in )
public double divide( double in )
{
return in / this.multiplier;
}
@@ -28,7 +28,9 @@ public enum PowerUnits
{
AE( "gui.appliedenergistics2.units.appliedenergstics" ), // Native Units - AE Energy
EU( "gui.appliedenergistics2.units.ic2" ), // IndustrialCraft 2 - Energy Units
RF( "gui.appliedenergistics2.units.rf" ); // RF - Redstone Flux
WA( "gui.appliedenergistics2.units.rotarycraft" ), // RotaryCraft - Watts
RF( "gui.appliedenergistics2.units.thermalexpansion" ), // ThermalExpansion - Redstone Flux
MK( "gui.appliedenergistics2.units.mekanism" ); // Mekanism - Joules
/**
* unlocalized name for the power unit.
@@ -39,7 +41,7 @@ public enum PowerUnits
*/
public double conversionRatio = 1.0;
PowerUnits( final String un )
PowerUnits( String un )
{
this.unlocalizedName = un;
}
@@ -52,11 +54,11 @@ public enum PowerUnits
* will normally returns 64, as it will convert the EU, to AE with AE's power settings.
*
* @param target target power unit
* @param value value
* @param value value
*
* @return value converted to target units, from this units.
*/
public double convertTo( final PowerUnits target, final double value )
public double convertTo( PowerUnits target, double value )
{
return ( value * this.conversionRatio ) / target.conversionRatio;
}
@@ -26,5 +26,5 @@ package appeng.api.config;
public enum SearchBoxMode
{
AUTOSEARCH, AUTOSEARCH_KEEP, MANUAL_SEARCH, MANUAL_SEARCH_KEEP, JEI_AUTOSEARCH, JEI_AUTOSEARCH_KEEP, JEI_MANUAL_SEARCH, JEI_MANUAL_SEARCH_KEEP
AUTOSEARCH, MANUAL_SEARCH, NEI_AUTOSEARCH, NEI_MANUAL_SEARCH
}
+13 -40
View File
@@ -25,7 +25,6 @@ package appeng.api.config;
import java.util.EnumSet;
import javax.annotation.Nonnull;
@@ -33,61 +32,35 @@ 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 ) ),
POWER_UNITS( EnumSet.allOf( PowerUnits.class ) ), ACCESS( EnumSet.of( AccessRestriction.READ_WRITE, AccessRestriction.READ, AccessRestriction.WRITE ) ),
ACCESS( EnumSet.of( AccessRestriction.READ_WRITE, AccessRestriction.READ, AccessRestriction.WRITE ) ),
SORT_DIRECTION( EnumSet.allOf( SortDir.class ) ), SORT_BY( EnumSet.allOf( SortOrder.class ) ),
SORT_DIRECTION( EnumSet.allOf( SortDir.class ) ),
SEARCH_TOOLTIPS( EnumSet.of( YesNo.YES, YesNo.NO ) ), VIEW_MODE( EnumSet.allOf( ViewItems.class ) ), SEARCH_MODE( EnumSet.allOf( SearchBoxMode.class ) ),
SORT_BY( EnumSet.allOf( SortOrder.class ) ),
ACTIONS( EnumSet.allOf( ActionItems.class ) ), IO_DIRECTION( EnumSet.of( RelativeDirection.LEFT, RelativeDirection.RIGHT ) ),
SEARCH_TOOLTIPS( EnumSet.of( YesNo.YES, YesNo.NO ) ),
BLOCK( EnumSet.of( YesNo.YES, YesNo.NO ) ), OPERATION_MODE( EnumSet.allOf( OperationMode.class ) ),
VIEW_MODE( EnumSet.allOf( ViewItems.class ) ),
FULLNESS_MODE( EnumSet.allOf( FullnessMode.class ) ), CRAFT_ONLY( EnumSet.of( YesNo.YES, YesNo.NO ) ),
SEARCH_MODE( EnumSet.allOf( SearchBoxMode.class ) ),
FUZZY_MODE( EnumSet.allOf( FuzzyMode.class ) ), LEVEL_TYPE( EnumSet.allOf( LevelType.class ) ),
ACTIONS( EnumSet.allOf( ActionItems.class ) ),
TERMINAL_STYLE( EnumSet.of( TerminalStyle.TALL, TerminalStyle.SMALL ) ), COPY_MODE( EnumSet.allOf( CopyMode.class ) ),
IO_DIRECTION( EnumSet.of( RelativeDirection.LEFT, RelativeDirection.RIGHT ) ),
INTERFACE_TERMINAL( EnumSet.of( YesNo.YES, YesNo.NO ) ), CRAFT_VIA_REDSTONE( 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 ) );
STORAGE_FILTER( EnumSet.allOf( StorageFilter.class ) ), PLACE_BLOCK( EnumSet.of( YesNo.YES, YesNo.NO ) );
private final EnumSet<? extends Enum<?>> values;
Settings( @Nonnull final EnumSet<? extends Enum<?>> possibleOptions )
Settings( @Nonnull EnumSet<? extends Enum<?>> possibleOptions )
{
if( possibleOptions.isEmpty() )
if ( possibleOptions.isEmpty() )
{
throw new IllegalArgumentException( "Tried to instantiate an empty setting." );
}
@@ -28,7 +28,7 @@ public enum TunnelType
{
ME, // Network Tunnel
IC2_POWER, // EU Tunnel
FE_POWER, // Forge Energy tunnel
RF_POWER, // RF Tunnel
REDSTONE, // Redstone Tunnel
FLUID, // Fluid Tunnel
ITEM, // Item Tunnel
+48 -14
View File
@@ -29,7 +29,10 @@ import java.util.Map;
import net.minecraft.item.ItemStack;
import com.google.common.base.Optional;
import appeng.api.definitions.IItemDefinition;
import appeng.api.util.AEItemDefinition;
public enum Upgrades
@@ -37,21 +40,26 @@ 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<>();
/**
* @deprecated use {@link Upgrades#getTier()}
*/
@Deprecated
public final int tier;
Upgrades( final int tier )
/**
* @deprecated use {@link Upgrades#getSupported()}
*/
@Deprecated
private final Map<ItemStack, Integer> supportedMax = new HashMap<ItemStack, Integer>();
Upgrades( int tier )
{
this.tier = tier;
}
@@ -67,21 +75,25 @@ public enum Upgrades
/**
* Registers a specific amount of this upgrade into a specific machine
*
* @param item machine in which this upgrade can be installed
* @param item machine in which this upgrade can be installed
* @param maxSupported amount how many upgrades can be installed
*/
public void registerItem( final IItemDefinition item, final int maxSupported )
public void registerItem( IItemDefinition item, int maxSupported )
{
item.maybeStack( 1 ).ifPresent( is -> this.registerItem( is, maxSupported ) );
final Optional<ItemStack> maybeStack = item.maybeStack( 1 );
for( ItemStack stack : maybeStack.asSet() )
{
this.registerItem( stack, maxSupported );
}
}
/**
* Registers a specific amount of this upgrade into a specific machine
*
* @param stack machine in which this upgrade can be installed
* @param stack machine in which this upgrade can be installed
* @param maxSupported amount how many upgrades can be installed
*/
public void registerItem( final ItemStack stack, final int maxSupported )
public void registerItem( ItemStack stack, int maxSupported )
{
if( stack != null )
{
@@ -89,6 +101,28 @@ public enum Upgrades
}
}
/**
* Registers a specific amount of this upgrade into a specific machine
*
* @param item machine in which this upgrade can be installed
* @param maxSupported amount how many upgrades can be installed
*
* @deprecated use {@link Upgrades#registerItem(IItemDefinition, int)}
*/
@Deprecated
public void registerItem( AEItemDefinition item, int maxSupported )
{
if( item != null )
{
final ItemStack stack = item.stack( 1 );
if( stack != null )
{
this.registerItem( stack, maxSupported );
}
}
}
public int getTier()
{
return this.tier;
@@ -0,0 +1,131 @@
/*
* The MIT License (MIT)
*
* Copyright (c) 2013 AlgorithmX2
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package appeng.api.definitions;
import appeng.api.util.AEItemDefinition;
/**
* @deprecated use {@link IBlocks} now
*/
@Deprecated
public class Blocks
{
public AEItemDefinition blockQuartzOre;
public AEItemDefinition blockQuartzOreCharged;
public AEItemDefinition blockMatrixFrame;
public AEItemDefinition blockQuartz;
public AEItemDefinition blockQuartzPillar;
public AEItemDefinition blockQuartzChiseled;
public AEItemDefinition blockQuartzGlass;
public AEItemDefinition blockQuartzVibrantGlass;
public AEItemDefinition blockQuartzTorch;
public AEItemDefinition blockFluix;
public AEItemDefinition blockSkyStone;
public AEItemDefinition blockSkyChest;
public AEItemDefinition blockSkyCompass;
public AEItemDefinition blockGrindStone;
public AEItemDefinition blockCrankHandle;
public AEItemDefinition blockInscriber;
public AEItemDefinition blockWireless;
public AEItemDefinition blockCharger;
public AEItemDefinition blockTinyTNT;
public AEItemDefinition blockSecurity;
public AEItemDefinition blockQuantumRing;
public AEItemDefinition blockQuantumLink;
public AEItemDefinition blockSpatialPylon;
public AEItemDefinition blockSpatialIOPort;
public AEItemDefinition blockMultiPart;
public AEItemDefinition blockController;
public AEItemDefinition blockDrive;
public AEItemDefinition blockChest;
public AEItemDefinition blockInterface;
public AEItemDefinition blockCellWorkbench;
public AEItemDefinition blockIOPort;
public AEItemDefinition blockCondenser;
public AEItemDefinition blockEnergyAcceptor;
public AEItemDefinition blockVibrationChamber;
public AEItemDefinition blockQuartzGrowthAccelerator;
public AEItemDefinition blockEnergyCell;
public AEItemDefinition blockEnergyCellDense;
public AEItemDefinition blockEnergyCellCreative;
public AEItemDefinition blockCraftingUnit;
public AEItemDefinition blockCraftingAccelerator;
public AEItemDefinition blockCraftingStorage1k;
public AEItemDefinition blockCraftingStorage4k;
public AEItemDefinition blockCraftingStorage16k;
public AEItemDefinition blockCraftingStorage64k;
public AEItemDefinition blockCraftingMonitor;
public AEItemDefinition blockMolecularAssembler;
public AEItemDefinition blockLightDetector;
public AEItemDefinition blockPaint;
}
@@ -1,31 +1,12 @@
/*
* This file is part of Applied Energistics 2.
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
*
* Applied Energistics 2 is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Applied Energistics 2 is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
*/
package appeng.api.definitions;
import java.util.Optional;
import net.minecraft.block.Block;
import net.minecraft.item.ItemBlock;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess;
import com.google.common.base.Optional;
public interface IBlockDefinition extends IItemDefinition
{
@@ -43,9 +24,11 @@ public interface IBlockDefinition extends IItemDefinition
* Compare Block with world.
*
* @param world world of block
* @param pos location
* @param x x pos of block
* @param y y pos of block
* @param z z pos of block
*
* @return if the block is placed in the world at the specific location.
*/
boolean isSameAs( IBlockAccess world, BlockPos pos );
boolean isSameAs( IBlockAccess world, int x, int y, int z );
}
@@ -41,82 +41,58 @@ public interface IBlocks
/*
* decorative
*/
IBlockDefinition quartzBlock();
IBlockDefinition quartz();
IBlockDefinition quartzPillar();
IBlockDefinition chiseledQuartzBlock();
IBlockDefinition quartzChiseled();
IBlockDefinition quartzGlass();
IBlockDefinition quartzVibrantGlass();
IBlockDefinition quartzFixture();
IBlockDefinition quartzTorch();
IBlockDefinition fluixBlock();
IBlockDefinition fluix();
IBlockDefinition skyStoneBlock();
IBlockDefinition skyStone();
IBlockDefinition smoothSkyStoneBlock();
IBlockDefinition skyStoneBrick();
IBlockDefinition skyStoneSmallBrick();
IBlockDefinition skyStoneChest();
IBlockDefinition smoothSkyStoneChest();
IBlockDefinition skyChest();
IBlockDefinition skyCompass();
IBlockDefinition skyStoneStairs();
IBlockDefinition skyStoneStair();
IBlockDefinition smoothSkyStoneStairs();
IBlockDefinition skyStoneBlockStair();
IBlockDefinition skyStoneBrickStairs();
IBlockDefinition skyStoneBrickStair();
IBlockDefinition skyStoneSmallBrickStairs();
IBlockDefinition skyStoneSmallBrickStair();
IBlockDefinition fluixStairs();
IBlockDefinition fluixStair();
IBlockDefinition quartzStairs();
IBlockDefinition quartzStair();
IBlockDefinition chiseledQuartzStairs();
IBlockDefinition chiseledQuartzStair();
IBlockDefinition quartzPillarStairs();
IBlockDefinition skyStoneSlab();
IBlockDefinition smoothSkyStoneSlab();
IBlockDefinition skyStoneBrickSlab();
IBlockDefinition skyStoneSmallBrickSlab();
IBlockDefinition fluixSlab();
IBlockDefinition quartzSlab();
IBlockDefinition chiseledQuartzSlab();
IBlockDefinition quartzPillarSlab();
IBlockDefinition quartzPillarStair();
/*
* misc
*/
ITileDefinition grindstone();
ITileDefinition grindStone();
ITileDefinition crank();
ITileDefinition crankHandle();
ITileDefinition inscriber();
ITileDefinition wirelessAccessPoint();
ITileDefinition wireless();
ITileDefinition charger();
IBlockDefinition tinyTNT();
ITileDefinition tinyTNT();
ITileDefinition securityStation();
ITileDefinition security();
/*
* quantum Network Bridge
@@ -148,8 +124,6 @@ public interface IBlocks
ITileDefinition iface();
ITileDefinition fluidIface();
ITileDefinition cellWorkbench();
ITileDefinition iOPort();
@@ -1,25 +1,8 @@
/*
* This file is part of Applied Energistics 2.
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
*
* Applied Energistics 2 is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Applied Energistics 2 is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
*/
package appeng.api.definitions;
import net.minecraft.item.ItemStack;
import net.minecraft.world.IBlockAccess;
/**
@@ -39,4 +22,19 @@ public interface IComparableDefinition
* @return true if the item stack is a matching item.
*/
boolean isSameAs( ItemStack comparableStack );
/**
* Compare Block with world.
*
* @param world world of block
* @param x x pos of block
* @param y y pos of block
* @param z z pos of block
*
* @return if the block is placed in the world at the specific location.
*
* @deprecated moved to {@link IBlockDefinition}. Is removed in the next major release rv3
*/
@Deprecated
boolean isSameAs( IBlockAccess world, int x, int y, int z );
}
@@ -1,46 +1,14 @@
/*
* The MIT License (MIT)
*
* Copyright (c) 2013 - 2015 AlgorithmX2
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package appeng.api.definitions;
import java.util.Optional;
import javax.annotation.Nonnull;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import com.google.common.base.Optional;
public interface IItemDefinition extends IComparableDefinition
{
/**
* @return the unique name of the definition which will be used to register the underlying structure. Will never be
* null
*/
@Nonnull
String identifier();
/**
* @return the {@link Item} Implementation if applicable
*/
@@ -50,9 +18,4 @@ public interface IItemDefinition extends IComparableDefinition
* @return an {@link ItemStack} with specified quantity of this item.
*/
Optional<ItemStack> maybeStack( int stackSize );
/**
* @return <tt>true</tt> if definition is enabled
*/
boolean isEnabled();
}
@@ -88,14 +88,6 @@ public interface IItems
IItemDefinition cell64k();
IItemDefinition fluidCell1k();
IItemDefinition fluidCell4k();
IItemDefinition fluidCell16k();
IItemDefinition fluidCell64k();
IItemDefinition spatialCell2();
IItemDefinition spatialCell16();
@@ -111,6 +111,8 @@ public interface IMaterials
IItemDefinition matterBall();
IItemDefinition ironNugget();
IItemDefinition certusQuartzCrystal();
IItemDefinition certusQuartzCrystalCharged();
@@ -121,7 +123,7 @@ public interface IMaterials
IItemDefinition woodenGear();
IItemDefinition wirelessReceiver();
IItemDefinition wireless();
IItemDefinition wirelessBooster();
@@ -134,12 +136,4 @@ public interface IMaterials
IItemDefinition qESingularity();
IItemDefinition blankPattern();
IItemDefinition fluidCell1kPart();
IItemDefinition fluidCell4kPart();
IItemDefinition fluidCell16kPart();
IItemDefinition fluidCell64kPart();
}
@@ -38,9 +38,7 @@ public interface IParts
AEColoredItemDefinition cableGlass();
AEColoredItemDefinition cableDenseCovered();
AEColoredItemDefinition cableDenseSmart();
AEColoredItemDefinition cableDense();
AEColoredItemDefinition lumenCableSmart();
@@ -48,7 +46,7 @@ public interface IParts
AEColoredItemDefinition lumenCableGlass();
AEColoredItemDefinition lumenDenseCableSmart();
AEColoredItemDefinition lumenCableDense();
IItemDefinition quartzFiber();
@@ -64,14 +62,10 @@ public interface IParts
IItemDefinition iface();
IItemDefinition fluidIface();
IItemDefinition levelEmitter();
IItemDefinition annihilationPlane();
IItemDefinition identityAnnihilationPlane();
IItemDefinition formationPlane();
IItemDefinition p2PTunnelME();
@@ -80,16 +74,14 @@ public interface IParts
IItemDefinition p2PTunnelItems();
IItemDefinition p2PTunnelFluids();
IItemDefinition p2PTunnelLiquids();
IItemDefinition p2PTunnelEU();
IItemDefinition p2PTunnelFE();
IItemDefinition p2PTunnelRF();
IItemDefinition p2PTunnelLight();
// IItemDefinition p2PTunnelOpenComputers();
IItemDefinition cableAnchor();
IItemDefinition monitor();
@@ -109,18 +101,4 @@ public interface IParts
IItemDefinition storageMonitor();
IItemDefinition conversionMonitor();
IItemDefinition fluidTerminal();
IItemDefinition fluidImportBus();
IItemDefinition fluidExportBus();
IItemDefinition fluidStorageBus();
IItemDefinition fluidLevelEmitter();
IItemDefinition fluidAnnihilationPlane();
IItemDefinition fluidFormationnPlane();
}
@@ -1,28 +1,10 @@
/*
* This file is part of Applied Energistics 2.
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
*
* Applied Energistics 2 is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Applied Energistics 2 is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
*/
package appeng.api.definitions;
import java.util.Optional;
import net.minecraft.tileentity.TileEntity;
import com.google.common.base.Optional;
public interface ITileDefinition extends IBlockDefinition
{
@@ -0,0 +1,110 @@
/*
* The MIT License (MIT)
*
* Copyright (c) 2013 AlgorithmX2
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package appeng.api.definitions;
import appeng.api.util.AEColoredItemDefinition;
import appeng.api.util.AEItemDefinition;
/**
* @deprecated use {@link IItems}
*/
@Deprecated
public class Items
{
public AEItemDefinition itemCertusQuartzAxe;
public AEItemDefinition itemCertusQuartzHoe;
public AEItemDefinition itemCertusQuartzShovel;
public AEItemDefinition itemCertusQuartzPick;
public AEItemDefinition itemCertusQuartzSword;
public AEItemDefinition itemCertusQuartzWrench;
public AEItemDefinition itemCertusQuartzKnife;
public AEItemDefinition itemNetherQuartzAxe;
public AEItemDefinition itemNetherQuartzHoe;
public AEItemDefinition itemNetherQuartzShovel;
public AEItemDefinition itemNetherQuartzPick;
public AEItemDefinition itemNetherQuartzSword;
public AEItemDefinition itemNetherQuartzWrench;
public AEItemDefinition itemNetherQuartzKnife;
public AEItemDefinition itemEntropyManipulator;
public AEItemDefinition itemWirelessTerminal;
public AEItemDefinition itemBiometricCard;
public AEItemDefinition itemChargedStaff;
public AEItemDefinition itemMassCannon;
public AEItemDefinition itemMemoryCard;
public AEItemDefinition itemNetworkTool;
public AEItemDefinition itemPortableCell;
public AEItemDefinition itemCellCreative;
public AEItemDefinition itemViewCell;
public AEItemDefinition itemCell1k;
public AEItemDefinition itemCell4k;
public AEItemDefinition itemCell16k;
public AEItemDefinition itemCell64k;
public AEItemDefinition itemSpatialCell2;
public AEItemDefinition itemSpatialCell16;
public AEItemDefinition itemSpatialCell128;
public AEItemDefinition itemFacade;
public AEItemDefinition itemCrystalSeed;
public AEItemDefinition itemEncodedPattern;
public AEItemDefinition itemColorApplicator;
public AEColoredItemDefinition itemPaintBall;
public AEColoredItemDefinition itemLumenPaintBall;
}
@@ -0,0 +1,143 @@
/*
* The MIT License (MIT)
*
* Copyright (c) 2013 AlgorithmX2
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package appeng.api.definitions;
import appeng.api.util.AEItemDefinition;
/**
* @deprecated use {@link IMaterials}
*/
@Deprecated
public class Materials
{
public AEItemDefinition materialCell2SpatialPart;
public AEItemDefinition materialCell16SpatialPart;
public AEItemDefinition materialCell128SpatialPart;
public AEItemDefinition materialSilicon;
public AEItemDefinition materialSkyDust;
public AEItemDefinition materialCalcProcessorPress;
public AEItemDefinition materialEngProcessorPress;
public AEItemDefinition materialLogicProcessorPress;
public AEItemDefinition materialCalcProcessorPrint;
public AEItemDefinition materialEngProcessorPrint;
public AEItemDefinition materialLogicProcessorPrint;
public AEItemDefinition materialSiliconPress;
public AEItemDefinition materialSiliconPrint;
public AEItemDefinition materialNamePress;
public AEItemDefinition materialLogicProcessor;
public AEItemDefinition materialCalcProcessor;
public AEItemDefinition materialEngProcessor;
public AEItemDefinition materialBasicCard;
public AEItemDefinition materialAdvCard;
public AEItemDefinition materialPurifiedCertusQuartzCrystal;
public AEItemDefinition materialPurifiedNetherQuartzCrystal;
public AEItemDefinition materialPurifiedFluixCrystal;
public AEItemDefinition materialCell1kPart;
public AEItemDefinition materialCell4kPart;
public AEItemDefinition materialCell16kPart;
public AEItemDefinition materialCell64kPart;
public AEItemDefinition materialEmptyStorageCell;
public AEItemDefinition materialCardRedstone;
public AEItemDefinition materialCardSpeed;
public AEItemDefinition materialCardCapacity;
public AEItemDefinition materialCardFuzzy;
public AEItemDefinition materialCardInverter;
public AEItemDefinition materialCardCrafting;
public AEItemDefinition materialEnderDust;
public AEItemDefinition materialFlour;
public AEItemDefinition materialGoldDust;
public AEItemDefinition materialIronDust;
public AEItemDefinition materialFluixDust;
public AEItemDefinition materialCertusQuartzDust;
public AEItemDefinition materialNetherQuartzDust;
public AEItemDefinition materialMatterBall;
public AEItemDefinition materialIronNugget;
public AEItemDefinition materialCertusQuartzCrystal;
public AEItemDefinition materialCertusQuartzCrystalCharged;
public AEItemDefinition materialFluixCrystal;
public AEItemDefinition materialFluixPearl;
public AEItemDefinition materialWoodenGear;
public AEItemDefinition materialWireless;
public AEItemDefinition materialWirelessBooster;
public AEItemDefinition materialAnnihilationCore;
public AEItemDefinition materialFormationCore;
public AEItemDefinition materialSingularity;
public AEItemDefinition materialQESingularity;
public AEItemDefinition materialBlankPattern;
}
@@ -0,0 +1,106 @@
/*
* The MIT License (MIT)
*
* Copyright (c) 2013 AlgorithmX2
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package appeng.api.definitions;
import appeng.api.util.AEColoredItemDefinition;
import appeng.api.util.AEItemDefinition;
/**
* @deprecated use {@link IParts}
*/
@Deprecated
public class Parts
{
public AEColoredItemDefinition partCableSmart;
public AEColoredItemDefinition partCableCovered;
public AEColoredItemDefinition partCableGlass;
public AEColoredItemDefinition partCableDense;
public AEColoredItemDefinition partLumenCableSmart;
public AEColoredItemDefinition partLumenCableCovered;
public AEColoredItemDefinition partLumenCableGlass;
public AEColoredItemDefinition partLumenCableDense;
public AEItemDefinition partQuartzFiber;
public AEItemDefinition partToggleBus;
public AEItemDefinition partInvertedToggleBus;
public AEItemDefinition partStorageBus;
public AEItemDefinition partImportBus;
public AEItemDefinition partExportBus;
public AEItemDefinition partInterface;
public AEItemDefinition partLevelEmitter;
public AEItemDefinition partAnnihilationPlane;
public AEItemDefinition partFormationPlane;
public AEItemDefinition partP2PTunnelME;
public AEItemDefinition partP2PTunnelRedstone;
public AEItemDefinition partP2PTunnelItems;
public AEItemDefinition partP2PTunnelLiquids;
public AEItemDefinition partP2PTunnelEU;
public AEItemDefinition partP2PTunnelRF;
public AEItemDefinition partP2PTunnelLight;
public AEItemDefinition partCableAnchor;
public AEItemDefinition partMonitor;
public AEItemDefinition partSemiDarkMonitor;
public AEItemDefinition partDarkMonitor;
public AEItemDefinition partInterfaceTerminal;
public AEItemDefinition partPatternTerminal;
public AEItemDefinition partCraftingTerminal;
public AEItemDefinition partTerminal;
public AEItemDefinition partStorageMonitor;
public AEItemDefinition partConversionMonitor;
}
@@ -24,7 +24,7 @@
package appeng.api.events;
import net.minecraftforge.fml.common.eventhandler.Event;
import cpw.mods.fml.common.eventhandler.Event;
import appeng.api.features.ILocatable;
@@ -40,7 +40,7 @@ public class LocatableEventAnnounce extends Event
public final ILocatable target;
public final LocatableEvent change;
public LocatableEventAnnounce( final ILocatable o, final LocatableEvent ev )
public LocatableEventAnnounce( ILocatable o, LocatableEvent ev )
{
this.target = o;
this.change = ev;
@@ -48,14 +48,7 @@ public class LocatableEventAnnounce extends Event
public enum LocatableEvent
{
/**
* Adds the locatable to the registry
*/
REGISTER,
/**
* Removes the locatable from the registry
*/
UNREGISTER
Register, // Adds the locatable to the registry
Unregister // Removes the locatable from the registry
}
}
@@ -29,7 +29,7 @@ public class AppEngException extends Exception
private static final long serialVersionUID = -9051434206368465494L;
public AppEngException( final String t )
public AppEngException( String t )
{
super( t );
}
@@ -1,29 +1,9 @@
/*
* This file is part of Applied Energistics 2.
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
*
* Applied Energistics 2 is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Applied Energistics 2 is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
*/
package appeng.api.exceptions;
public class CoreInaccessibleException extends RuntimeException
{
private static final long serialVersionUID = -7434641554655517242L;
public CoreInaccessibleException( final String message )
public CoreInaccessibleException( String message )
{
super( message );
}
@@ -0,0 +1,35 @@
/*
* 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.exceptions;
public class FailedConnection extends Exception
{
private static final long serialVersionUID = -2544208090248293753L;
public FailedConnection()
{
}
}
@@ -0,0 +1,10 @@
package appeng.api.exceptions;
public class MissingDefinition extends RuntimeException
{
public MissingDefinition( String message )
{
super( message );
}
}
@@ -24,12 +24,12 @@
package appeng.api.exceptions;
public class MissingIngredientException extends Exception
public class MissingIngredientError extends Exception
{
private static final long serialVersionUID = -998858343831371697L;
public MissingIngredientException( final String n )
public MissingIngredientError( String n )
{
super( n );
}
@@ -24,12 +24,12 @@
package appeng.api.exceptions;
public class ModNotInstalledException extends Exception
public class ModNotInstalled extends Exception
{
private static final long serialVersionUID = -9052435206368425494L;
public ModNotInstalledException( final String t )
public ModNotInstalled( String t )
{
super( t );
}
@@ -1,53 +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.exceptions;
/**
* Exception due to trying to connect one or more null values.
*
* Intended to signal an internal exception and not intended to be thrown by
* any 3rd party module.
*
* @author yueh
* @version rv3
* @since rv3
*/
public class NullNodeConnectionException extends FailedConnectionException
{
private static final long serialVersionUID = -2143719383495321764L;
private static final String DEFAULT_MESSAGE = "Connection forged between null entities.";
public NullNodeConnectionException()
{
super( DEFAULT_MESSAGE );
}
public NullNodeConnectionException( String message )
{
super( message );
}
}
@@ -24,12 +24,12 @@
package appeng.api.exceptions;
public class RecipeException extends Exception
public class RecipeError extends Exception
{
private static final long serialVersionUID = -6602870588617670262L;
public RecipeException( final String n )
public RecipeError( String n )
{
super( n );
}
@@ -24,12 +24,12 @@
package appeng.api.exceptions;
public class RegistrationException extends Exception
public class RegistrationError extends Exception
{
private static final long serialVersionUID = -6602870588617670263L;
public RegistrationException( final String n )
public RegistrationError( String n )
{
super( n );
}
@@ -1,52 +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.exceptions;
/**
* Exception due to trying to connect different security realms.
*
* Intended to signal an internal exception and not intended to be thrown by
* any 3rd party module.
*
* @author yueh
* @version rv3
* @since rv3
*/
public class SecurityConnectionException extends FailedConnectionException
{
private static final long serialVersionUID = 5048714900434215426L;
private static final String DEFAULT_MESSAGE = "Connection failed due to different security realms.";
public SecurityConnectionException()
{
super( DEFAULT_MESSAGE );
}
public SecurityConnectionException( String message )
{
super( message );
}
}
@@ -1,84 +0,0 @@
/*
* 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 );
}
@@ -24,17 +24,13 @@
package appeng.api.features;
import java.util.Optional;
import javax.annotation.Nonnull;
import net.minecraft.item.ItemStack;
/**
* Registration Records for {@link IGrinderRegistry}
*/
public interface IGrinderRecipe
public interface IGrinderEntry
{
/**
@@ -42,40 +38,66 @@ public interface IGrinderRecipe
*
* @return input that the grinder will accept.
*/
@Nonnull
ItemStack getInput();
/**
* lets you change the grinder recipe by changing its input.
*
* @param input input item
*/
void setInput( ItemStack input );
/**
* gets the current output
*
* @return output that the grinder will produce
*/
@Nonnull
ItemStack getOutput();
/**
* gets the current output
* allows you to change the output.
*
* @return output that the grinder will produce
* @param output output item
*/
@Nonnull
Optional<ItemStack> getOptionalOutput();
void setOutput( ItemStack output );
/**
* gets the current output
*
* @return output that the grinder will produce
*/
Optional<ItemStack> getSecondOptionalOutput();
ItemStack getOptionalOutput();
/**
* gets the current output
*
* @return output that the grinder will produce
*/
ItemStack getSecondOptionalOutput();
/**
* stack, and 0.0-1.0 chance that it will be generated.
*
* @param output output item
* @param chance generation chance
*/
void setOptionalOutput( ItemStack output, float chance );
/**
* 0.0 - 1.0 the chance that the optional output will be generated.
*
* @return chance of optional output
*/
@Nonnull
float getOptionalChance();
/**
* stack, and 0.0-1.0 chance that it will be generated.
*
* @param output second optional output item
* @param chance second optional output chance
*/
void setSecondOptionalOutput( ItemStack output, float chance );
/**
* 0.0 - 1.0 the chance that the optional output will be generated.
*
@@ -84,10 +106,16 @@ public interface IGrinderRecipe
float getSecondOptionalChance();
/**
* Amount of turns required to process the item.
* Energy cost, in turns.
*
* @return number of turns it takes to produce the output from the input.
*/
int getRequiredTurns();
int getEnergyCost();
/**
* Allows you to adjust the number of turns
*
* @param c number of turns to produce output.
*/
void setEnergyCost( int c );
}
@@ -1,115 +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.features;
import javax.annotation.Nonnegative;
import javax.annotation.Nonnull;
import net.minecraft.item.ItemStack;
/**
* Builder for a grinder recipe.
*
* The only default value provided are turns at a value of 8.
*
* @author yueh
* @version rv5
* @since rv5
*/
public interface IGrinderRecipeBuilder
{
/**
* Creates an grinder recipe with inputs.
* Needs to be invoked.
*
* @param input new input for the recipe
*
* @return currently used builder
*/
@Nonnull
IGrinderRecipeBuilder withInput( @Nonnull ItemStack input );
/**
* Creates an grinder recipe with output.
* Needs to be invoked.
*
* @param output new output for the recipe
*
* @return currently used builder
*/
@Nonnull
IGrinderRecipeBuilder withOutput( @Nonnull ItemStack output );
/**
* Creates an grinder recipe with the first optional output and its chance.
*
* @param optional new first optional for the recipe
* @param chance chance for the first optional output, must be within 0.0 - 1.0
*
* @return currently used builder
*/
@Nonnull
IGrinderRecipeBuilder withFirstOptional( @Nonnull ItemStack optional, float chance );
/**
* Creates an grinder recipe with the second optional output and its chance.
*
* @param optional new second optional for the recipe
* @param chance chance for the second optional output, must be within 0.0 - 1.0
*
* @return currently used builder
*/
@Nonnull
IGrinderRecipeBuilder withSecondOptional( @Nonnull ItemStack optional, float chance );
/**
* Creates an grinder recipe with the amount of turns as cost.
*
* Defaults to 8 when not called.
*
* @param turns new turns for the recipe, must be > 0
*
* @return currently used builder
*/
@Nonnull
IGrinderRecipeBuilder withTurns( @Nonnegative int turns );
/**
* Finalizes the process of making the recipe.
* Needs to be invoked to fetch grinder recipe.
*
* @return valid grinder recipe
*
* @throws IllegalStateException when input is not defined
* @throws IllegalStateException when input has no size
* @throws IllegalStateException when output is not defined
* @throws IllegalStateException when both optionals are not defined
* @throws IllegalStateException when process type is not defined
*/
@Nonnull
IGrinderRecipe build();
}
@@ -24,10 +24,7 @@
package appeng.api.features;
import java.util.Collection;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import java.util.List;
import net.minecraft.item.ItemStack;
@@ -39,63 +36,51 @@ 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.
* Current list of registered recipes, you can modify this if you want too.
*
* @return currentlyRegisteredRecipes
*/
@Nonnull
Collection<IGrinderRecipe> getRecipes();
List<IGrinderEntry> getRecipes();
/**
* Add a new recipe to the registry.
* add a new recipe the easy way, in &#8594; out, how many turns., duplicates will not be added.
*
* @param in input
* @param out output
* @param turns amount of turns to turn the input into the output
*/
boolean addRecipe( IGrinderRecipe recipe );
void addRecipe( ItemStack in, ItemStack out, int turns );
/**
* Remove the specific from the recipe list.
*
* @param recipe The recipe to be removed.
* @return true, if it was removed
* add a new recipe with optional outputs, duplicates will not be added.
*
* @param in input
* @param out output
* @param optional optional output
* @param chance chance to get the optional output within 0.0 - 1.0
* @param turns amount of turns to turn the input into the outputs
*/
boolean removeRecipe( @Nonnull IGrinderRecipe recipe );
void addRecipe( ItemStack in, ItemStack out, ItemStack optional, float chance, int turns );
/**
* add a new recipe with optional outputs, duplicates will not be added.
*
* @param in input
* @param out output
* @param optional optional output
* @param chance chance to get the optional output within 0.0 - 1.0
* @param optional2 second optional output
* @param chance2 chance to get the second optional output within 0.0 - 1.0
* @param turns amount of turns to turn the input into the outputs
*/
void addRecipe( ItemStack in, ItemStack out, ItemStack optional, float chance, ItemStack optional2, float chance2, int turns );
/**
* Searches for a recipe for a given input, and returns it.
*
* @param input The {@link ItemStack} to be grinded.
* @param input input
*
* @return identified recipe or null
*/
@Nullable
IGrinderRecipe getRecipeForInput( @Nonnull ItemStack input );
/**
* Allows do add a custom ratio from an ore to dust when being grinded.
*
* The default ratio is 1 ore to 2 dusts.
*
* These have to be added before any recipe is registered. Otherwise it will use the default value.
*
* @param oredictName The name of the ore;
* @param ratio The amount, must be > 0;
*/
void addDustRatio( @Nonnull String oredictName, int ratio );
/**
* Remove a custom ratio for a specific ore name.
*
* Will use the default of 2 value afterwards.
*
* @param oredictName The name of the ore;
*/
boolean removeDustRatio( @Nonnull String oredictName );
IGrinderEntry getRecipeForInput( ItemStack input );
}
@@ -1,31 +1,13 @@
/*
* This file is part of Applied Energistics 2.
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
*
* Applied Energistics 2 is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Applied Energistics 2 is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
*/
package appeng.api.features;
import java.util.List;
import java.util.Optional;
import javax.annotation.Nonnull;
import net.minecraft.item.ItemStack;
import com.google.common.base.Optional;
/**
* Registration Records for {@link IInscriberRegistry}
@@ -1,26 +1,7 @@
/*
* This file is part of Applied Energistics 2.
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
*
* Applied Energistics 2 is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Applied Energistics 2 is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
*/
package appeng.api.features;
import java.util.Collection;
import javax.annotation.Nonnull;
import net.minecraft.item.ItemStack;
@@ -1,27 +1,8 @@
/*
* This file is part of Applied Energistics 2.
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
*
* Applied Energistics 2 is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Applied Energistics 2 is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
*/
package appeng.api.features;
import java.util.Collection;
import java.util.List;
import java.util.Set;
import javax.annotation.Nonnull;
import net.minecraft.item.ItemStack;
@@ -31,34 +12,22 @@ import net.minecraft.item.ItemStack;
* Lets you manipulate Inscriber Recipes, by adding or editing existing ones.
*
* @author thatsIch
* @version rv5
* @version rv2
* @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.
*
* Use the provided methods to actually modify the inscriber recipes.
*
* @see IInscriberRegistry#addRecipe(IInscriberRecipe)
* @see IInscriberRegistry#removeRecipe(IInscriberRecipe)
* Current list of registered recipes, you can modify this if you want too.
* Will never contain a null recipe
*
* @return currentlyRegisteredRecipes
*/
@Nonnull
Collection<IInscriberRecipe> getRecipes();
List<IInscriberRecipe> getRecipes();
/**
* Optional items which are used in the top or bottom slot.
* Optional items which are used in the top or bottom slot
*
* @return set of all optional items
*/
@@ -66,32 +35,35 @@ public interface IInscriberRegistry
Set<ItemStack> getOptionals();
/**
* Get all registered items which are valid inputs.
* Get all registered items which are valid inputs
*
* @return set of all input items
*/
@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
*/
boolean addRecipe( IInscriberRecipe recipe );
void 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
* Removes a recipe from the registry
*
* @param toBeRemovedRecipe to be removed recipe, can be null, makes just no sense
*/
boolean removeRecipe( IInscriberRecipe toBeRemovedRecipe );
void removeRecipe( IInscriberRecipe toBeRemovedRecipe );
}
@@ -29,6 +29,18 @@ package appeng.api.features;
*/
public interface ILocatableRegistry
{
/**
* Attempts to find the object with the serial specified, if it can it
* returns the object.
*
* @param serial serial
*
* @return requestedObject, or null
*
* @deprecated use {@link ILocatableRegistry#getLocatableBy(long)}
*/
@Deprecated
Object findLocatableBySerial( long serial );
/**
* Gets the {@link ILocatable} with the registered serial, if available
@@ -33,7 +33,7 @@ public interface IMatterCannonAmmoRegistry
/**
* register a new ammo, generally speaking this is based off of atomic weight to make it easier to guess at
*
* @param ammo new ammo
* @param ammo new ammo
* @param weight atomic weight
*/
void registerAmmo( ItemStack ammo, double weight );
@@ -42,9 +42,9 @@ public interface INetworkEncodable
/**
* Encode the wireless frequency via the Controller.
*
* @param item the wireless terminal.
* @param item the wireless terminal.
* @param encKey the wireless encryption key.
* @param name null for now.
* @param name null for now.
*/
void setEncryptionKey( ItemStack item, String encKey, String name );
}
@@ -1,7 +1,7 @@
/*
* The MIT License (MIT)
*
* Copyright (c) 2013 - 2015 AlgorithmX2
* 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
@@ -24,11 +24,7 @@
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;
@@ -43,14 +39,10 @@ public interface IP2PTunnelRegistry
* Allows third parties to register items from their mod as potential
* attunements for AE's P2P Tunnels
*
* @param trigger - the item which triggers attunement. Nullable, but then ignored
* @param type - the type of tunnel. Nullable, but then ignored
* @param trigger - the item which triggers attunement
* @param type - the type of tunnel
*/
void addNewAttunement( @Nonnull ItemStack trigger, @Nullable TunnelType type );
void addNewAttunement( @Nonnull String ModId, @Nullable TunnelType type );
void addNewAttunement( @Nonnull Capability<?> cap, @Nullable TunnelType type );
void addNewAttunement( ItemStack trigger, TunnelType type );
/**
* returns null if no attunement can be found.
@@ -59,6 +51,5 @@ public interface IP2PTunnelRegistry
*
* @return null if no attunement can be found or attunement
*/
@Nonnull
TunnelType getTunnelTypeByItem( ItemStack trigger );
}
@@ -1,7 +1,7 @@
/*
* The MIT License (MIT)
*
* Copyright (c) 2013 - 2015 AlgorithmX2
* 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
@@ -24,12 +24,10 @@
package appeng.api.features;
import javax.annotation.Nullable;
import net.minecraft.entity.player.EntityPlayer;
import com.mojang.authlib.GameProfile;
import net.minecraft.entity.player.EntityPlayer;
/**
* Maintains a save specific list of userids and username combinations this greatly simplifies storage internally and
@@ -57,6 +55,5 @@ public interface IPlayerRegistry
*
* @return PlayerEntity, or null if the player could not be found.
*/
@Nullable
EntityPlayer findPlayer( int playerID );
}
@@ -1,7 +1,7 @@
/*
* The MIT License (MIT)
*
* Copyright (c) 2013 - 2015 AlgorithmX2
* 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
@@ -24,19 +24,11 @@
package appeng.api.features;
import javax.annotation.Nullable;
import appeng.api.recipes.ICraftHandler;
import appeng.api.recipes.IRecipeHandler;
import appeng.api.recipes.ISubItemResolver;
/**
* @author AlgorithmX2
* @author thatsIch
* @version rv3 - 10.08.2015
* @since rv0
*/
public interface IRecipeHandlerRegistry
{
@@ -45,10 +37,9 @@ public interface IRecipeHandlerRegistry
*
* MUST BE CALLED IN PRE-INIT
*
* @param name name of crafthandler
* @param name name of crafthandler
* @param handler class of crafthandler
*/
@Deprecated
void addNewCraftHandler( String name, Class<? extends ICraftHandler> handler );
/**
@@ -65,24 +56,20 @@ 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();
/**
* resolve sub items by name.
*
* @param nameSpace namespace of item
* @param itemName full name of item
* @param itemName full name of item
*
* @return ResolverResult or ResolverResultSet or null if could not resolve
* @return ResolverResult or ResolverResultSet
*/
@Nullable
Object resolveItem( String nameSpace, String itemName );
}
@@ -24,21 +24,18 @@
package appeng.api.features;
import appeng.api.AEInjectable;
import appeng.api.movable.IMovableRegistry;
import appeng.api.networking.IGridCacheRegistry;
import appeng.api.parts.IPartModels;
import appeng.api.storage.ICellRegistry;
import appeng.api.storage.IExternalStorageRegistry;
/**
* @author AlgorithmX2
* @author thatsIch
* @author yueh
* @version rv5
* @version rv2
* @since rv0
*/
@AEInjectable
public interface IRegistryContainer
{
@@ -52,6 +49,12 @@ public interface IRegistryContainer
*/
IGridCacheRegistry gridCache();
/**
* Add additional storage bus handlers to improve interplay with mod blocks that contains special inventories that
* function unlike vanilla chests. AE uses this internally for barrels, DSU's, quantum chests, AE Networks and more.
*/
IExternalStorageRegistry externalStorage();
/**
* Add additional special comparison functionality, AE Uses this internally for Bees.
*/
@@ -77,11 +80,6 @@ public interface IRegistryContainer
*/
IInscriberRegistry inscriber();
/**
* Manage charger via API
*/
IChargerRegistry charger();
/**
* get access to the locatable registry
*/
@@ -111,9 +109,4 @@ public interface IRegistryContainer
* get access to the world-gen api.
*/
IWorldGen worldgen();
/**
* Register your IPart models before using them.
*/
IPartModels partModels();
}
@@ -47,8 +47,8 @@ public interface IWirelessTermHandler extends INetworkEncodable
* use an amount of power, in AE units
*
* @param amount is in AE units ( 5 per MJ ), if you return false, the item should be dead and return false for
* hasPower
* @param is wireless terminal
* hasPower
* @param is wireless terminal
*
* @return true if wireless terminal uses power
*/
@@ -41,6 +41,6 @@ public interface IWorldGen
enum WorldGenType
{
CERTUS_QUARTZ, CHARGED_CERTUS_QUARTZ, METEORITES
CertusQuartz, ChargedCertusQuartz, Meteorites
}
}
@@ -1,21 +1,3 @@
/*
* This file is part of Applied Energistics 2.
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
*
* Applied Energistics 2 is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Applied Energistics 2 is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
*/
package appeng.api.features;
@@ -24,10 +6,10 @@ public enum InscriberProcessType
/**
* uses the optionals as catalyst
*/
INSCRIBE,
Inscribe,
/**
* spends the optionals
*/
PRESS
Press
}
@@ -41,7 +41,7 @@ public interface ICraftingPatternItem
* Access Details about a pattern
*
* @param is pattern
* @param w crafting world
* @param w crafting world
*
* @return details of pattern
*/
@@ -33,7 +33,7 @@ public class TransitionResult
public final boolean success;
public final double energyUsage;
public TransitionResult( final boolean _success, final double power )
public TransitionResult( boolean _success, double power )
{
this.success = _success;
this.energyUsage = power;
@@ -25,7 +25,6 @@ package appeng.api.implementations.guiobjects;
import net.minecraft.item.ItemStack;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
@@ -36,5 +35,5 @@ import net.minecraft.world.World;
public interface IGuiItem
{
IGuiItemObject getGuiObject( ItemStack is, World world, BlockPos pos );
IGuiItemObject getGuiObject( ItemStack is, World world, int x, int y, int z );
}
@@ -24,7 +24,7 @@
package appeng.api.implementations.guiobjects;
import net.minecraftforge.items.IItemHandler;
import net.minecraft.inventory.IInventory;
import appeng.api.networking.IGridHost;
@@ -32,9 +32,8 @@ import appeng.api.networking.IGridHost;
/**
* Obtained via {@link IGuiItem} getGuiObject
*/
public interface INetworkTool extends IGuiItemObject
public interface INetworkTool extends IInventory, IGuiItemObject
{
IGridHost getGridHost(); // null for most purposes.
IItemHandler getInventory();
IGridHost getGridHost(); // null for most purposes.
}
@@ -27,7 +27,6 @@ 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;
@@ -43,27 +42,27 @@ public interface IAEItemPowerStorage
*
* @return amount unable to be stored
*/
double injectAEPower( ItemStack stack, double amount, Actionable mode );
double injectAEPower( ItemStack is, double amt );
/**
* Attempt to extract power from the device, it will extract what it can and
* return it.
*
* @param amount to be extracted power from device
* @param amt to be extracted power from device
*
* @return what it could extract
*/
double extractAEPower( ItemStack stack, double amount, Actionable mode );
double extractAEPower( ItemStack is, double amt );
/**
* @return the current maximum power ( this can change :P )
*/
double getAEMaxPower( ItemStack stack );
double getAEMaxPower( ItemStack is );
/**
* @return the current AE Power Level, this may exceed getMEMaxPower()
*/
double getAECurrentPower( ItemStack stack );
double getAECurrentPower( ItemStack is );
/**
* Control the power flow by telling what the network can do, either add? or
@@ -71,5 +70,5 @@ public interface IAEItemPowerStorage
*
* @return access restriction of network
*/
AccessRestriction getPowerFlow( ItemStack stack );
AccessRestriction getPowerFlow( ItemStack is );
}
@@ -26,7 +26,6 @@ package appeng.api.implementations.items;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.util.math.BlockPos;
/**
@@ -40,9 +39,11 @@ public interface IAEWrench
* Check if the wrench can be used.
*
* @param player wrenching player
* @param pos of block.
* @param x x pos of wrenched block
* @param y y pos of wrenched block
* @param z z pos of wrenched block
*
* @return true if wrench can be used
*/
boolean canWrench( ItemStack wrench, EntityPlayer player, BlockPos pos );
boolean canWrench( ItemStack wrench, EntityPlayer player, int x, int y, int z );
}
@@ -26,10 +26,10 @@ package appeng.api.implementations.items;
import java.util.EnumSet;
import com.mojang.authlib.GameProfile;
import net.minecraft.item.ItemStack;
import com.mojang.authlib.GameProfile;
import appeng.api.config.SecurityPermissions;
import appeng.api.features.IPlayerRegistry;
import appeng.api.networking.security.ISecurityRegistry;
@@ -39,7 +39,7 @@ public interface IBiometricCard
{
/**
* Set the {@link GameProfile} to null, to clear it.
* Set the {@link GameProfile} to null, to clear it.
*/
void setProfile( ItemStack itemStack, GameProfile username );
@@ -67,7 +67,7 @@ public interface IBiometricCard
/**
* remove a permission from the item stack.
*
* @param itemStack card
* @param itemStack card
* @param permission to be removed permission
*/
void removePermission( ItemStack itemStack, SecurityPermissions permission );
@@ -75,7 +75,7 @@ public interface IBiometricCard
/**
* add a permission to the item stack.
*
* @param itemStack card
* @param itemStack card
* @param permission to be added permission
*/
void addPermission( ItemStack itemStack, SecurityPermissions permission );
@@ -84,8 +84,8 @@ public interface IBiometricCard
* lets you handle submission of security values on the card for custom behavior.
*
* @param registry security registry
* @param pr player registry
* @param is card
* @param pr player registry
* @param is card
*/
void registerPermissions( ISecurityRegistry registry, IPlayerRegistry pr, ItemStack is );
}
@@ -28,8 +28,6 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import appeng.api.util.AEColor;
/**
* Memory Card API
@@ -43,18 +41,13 @@ 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 the NBT tag, refer to the normal comment for special keys.
* @param is item
* @param SettingsName unlocalized string that represents the tile entity.
* @param data may contain a String called "tooltip" which is is a
* unlocalized string displayed after the settings name, optional
* but can be used to add details to the card for later.
*/
void setMemoryCardContents( ItemStack is, String settingsName, NBTTagCompound data );
void setMemoryCardContents( ItemStack is, String SettingsName, NBTTagCompound data );
/**
* returns the settings name provided by a previous call to
@@ -75,22 +68,11 @@ 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.
*
* @param player that used the card.
* @param msg which message to send.
* @param msg which message to send.
*/
void notifyUser( EntityPlayer player, MemoryCardMessages msg );
}
@@ -29,7 +29,6 @@ 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;
@@ -58,7 +57,7 @@ public interface ISpatialStorageCell
*
* @return the world for this cell
*/
ISpatialDimension getSpatialDimension();
World getWorld( ItemStack is );
/**
* get the currently stored size.
@@ -70,24 +69,33 @@ public interface ISpatialStorageCell
WorldCoord getStoredSize( ItemStack is );
/**
* get the currently stored Dimension id.
* Minimum coordinates in its world for the storage cell.
*
* @param is spatial storage cell
*
* @return dimension id or -1
* @return minimum coordinate of dimension
*/
int getStoredDimensionID( ItemStack is );
WorldCoord getMin( ItemStack is );
/**
* Maximum coordinates in its world for the storage cell.
*
* @param is spatial storage cell
*
* @return maximum coordinate of dimension
*/
WorldCoord getMax( ItemStack is );
/**
* Perform a spatial swap with the contents of the cell, and the world.
*
* @param is spatial storage cell
* @param w world of spatial
* @param min min coord
* @param max max coord
* @param playerId owner of current grid or -1
* @param is spatial storage cell
* @param w world of spatial
* @param min min coord
* @param max max coord
* @param doTransition transition
*
* @return result of transition
*/
TransitionResult doSpatialTransition( ItemStack is, World w, WorldCoord min, WorldCoord max, int playerId );
TransitionResult doSpatialTransition( ItemStack is, World w, WorldCoord min, WorldCoord max, boolean doTransition );
}
@@ -24,13 +24,10 @@
package appeng.api.implementations.items;
import javax.annotation.Nonnull;
import net.minecraft.item.ItemStack;
import appeng.api.storage.ICellWorkbenchItem;
import appeng.api.storage.IStorageChannel;
import appeng.api.storage.data.IAEStack;
import appeng.api.storage.data.IAEItemStack;
/**
@@ -43,7 +40,7 @@ import appeng.api.storage.data.IAEStack;
*
* The standard AE implementation only provides 1-63 Types
*/
public interface IStorageCell<T extends IAEStack<T>> extends ICellWorkbenchItem
public interface IStorageCell extends ICellWorkbenchItem
{
/**
@@ -54,7 +51,19 @@ public interface IStorageCell<T extends IAEStack<T>> extends ICellWorkbenchItem
*
* @return number of bytes
*/
int getBytes( @Nonnull ItemStack cellItem );
int getBytes( ItemStack cellItem );
/**
* Determines the number of bytes used for any type included on the cell.
*
* @param cellItem item
*
* @return number of bytes
*
* @deprecated use {@link IStorageCell#getBytesPerType(ItemStack)}
*/
@Deprecated
int BytePerType( ItemStack cellItem );
/**
* Determines the number of bytes used for any type included on the cell.
@@ -63,7 +72,7 @@ public interface IStorageCell<T extends IAEStack<T>> extends ICellWorkbenchItem
*
* @return number of bytes
*/
int getBytesPerType( @Nonnull ItemStack cellItem );
int getBytesPerType( ItemStack cellItem );
/**
* Must be between 1 and 63, indicates how many types you want to store on
@@ -73,19 +82,19 @@ public interface IStorageCell<T extends IAEStack<T>> extends ICellWorkbenchItem
*
* @return number of types
*/
int getTotalTypes( @Nonnull ItemStack cellItem );
int getTotalTypes( ItemStack cellItem );
/**
* Allows you to fine tune which items are allowed on a given cell, if you
* don't care, just return false; As the handler for this type of cell is
* still the default cells, the normal AE black list is also applied.
*
* @param cellItem item
* @param cellItem item
* @param requestedAddition requested addition
*
* @return true to preventAdditionOfItem
*/
boolean isBlackListed( @Nonnull ItemStack cellItem, @Nonnull T requestedAddition );
boolean isBlackListed( ItemStack cellItem, IAEItemStack requestedAddition );
/**
* Allows you to specify if this storage cell can be stored inside other
@@ -106,16 +115,10 @@ public interface IStorageCell<T extends IAEStack<T>> extends ICellWorkbenchItem
*
* @return if the ItemStack should behavior as a storage cell.
*/
boolean isStorageCell( @Nonnull ItemStack i );
boolean isStorageCell( 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_RESET, SETTINGS_CLEARED
INVALID_MACHINE, SETTINGS_LOADED, SETTINGS_SAVED, SETTINGS_CLEARED
}
@@ -27,7 +27,7 @@ package appeng.api.implementations.parts;
import java.util.EnumSet;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.EnumFacing;
import net.minecraftforge.common.util.ForgeDirection;
import appeng.api.networking.IGridHost;
import appeng.api.parts.BusSupport;
@@ -35,11 +35,10 @@ import appeng.api.parts.IPart;
import appeng.api.parts.IPartHost;
import appeng.api.util.AECableType;
import appeng.api.util.AEColor;
import appeng.api.util.AEPartLocation;
/**
* Implemented on the {@link IPart}s cable objects that can be placed at {@link AEPartLocation}.UNKNOWN in
* Implemented on the {@link IPart}s cable objects that can be placed at {@link ForgeDirection}.UNKNOWN in
* {@link IPartHost}s
*/
public interface IPartCable extends IPart, IGridHost
@@ -76,7 +75,7 @@ public interface IPartCable extends IPart, IGridHost
*
* @param sides sides of cable
*/
void setValidSides( EnumSet<EnumFacing> sides );
void setValidSides( EnumSet<ForgeDirection> sides );
/**
* used to tests if a cable connects to neighbors visually.
@@ -85,6 +84,5 @@ public interface IPartCable extends IPart, IGridHost
*
* @return true if this side is currently connects to an external block.
*/
boolean isConnected( EnumFacing side );
boolean isConnected( ForgeDirection side );
}
@@ -25,7 +25,7 @@ package appeng.api.implementations.tiles;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.EnumFacing;
import net.minecraftforge.common.util.ForgeDirection;
import appeng.api.util.AEColor;
@@ -35,5 +35,5 @@ public interface IColorableTile
AEColor getColor();
boolean recolourBlock( EnumFacing side, AEColor colour, EntityPlayer who );
boolean recolourBlock( ForgeDirection side, AEColor colour, EntityPlayer who );
}
@@ -25,7 +25,7 @@ package appeng.api.implementations.tiles;
import net.minecraft.inventory.InventoryCrafting;
import net.minecraft.util.EnumFacing;
import net.minecraftforge.common.util.ForgeDirection;
import appeng.api.networking.crafting.ICraftingPatternDetails;
@@ -36,13 +36,13 @@ public interface ICraftingMachine
/**
* inserts a crafting plan, and the necessary items into the crafting machine.
*
* @param patternDetails details of pattern
* @param table crafting table
* @param patternDetails details of pattern
* @param table crafting table
* @param ejectionDirection ejection direction
*
* @return if it was accepted, all or nothing.
*/
boolean pushPattern( ICraftingPatternDetails patternDetails, InventoryCrafting table, EnumFacing ejectionDirection );
boolean pushPattern( ICraftingPatternDetails patternDetails, InventoryCrafting table, ForgeDirection ejectionDirection );
/**
* check if the crafting machine is accepting pushes via pushPattern, if this is false, all calls to push will fail,
@@ -24,7 +24,7 @@
package appeng.api.implementations.tiles;
import net.minecraft.util.EnumFacing;
import net.minecraftforge.common.util.ForgeDirection;
/**
@@ -55,5 +55,5 @@ public interface ICrankable
/**
* @return true if the crank can attach on the given side.
*/
boolean canCrankAttach( EnumFacing directionToCrank );
boolean canCrankAttach( ForgeDirection directionToCrank );
}
@@ -27,7 +27,7 @@ package appeng.api.implementations.tiles;
import appeng.api.networking.energy.IEnergySource;
public interface IMEChest extends IChestOrDrive, IEnergySource
public interface IMEChest extends IChestOrDrive, ITileStorageMonitorable, IEnergySource
{
}
@@ -24,7 +24,7 @@
package appeng.api.implementations.tiles;
import net.minecraftforge.items.IItemHandler;
import net.minecraft.inventory.IInventory;
public interface ISegmentedInventory
@@ -38,5 +38,5 @@ public interface ISegmentedInventory
*
* @return inventory with inventory name
*/
IItemHandler getInventoryByName( String name );
IInventory getInventoryByName( String name );
}
@@ -21,18 +21,20 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package appeng.api.parts;
package appeng.api.implementations.tiles;
import appeng.api.util.AECableType;
import net.minecraftforge.common.util.ForgeDirection;
import appeng.api.networking.security.BaseActionSource;
import appeng.api.storage.IStorageMonitorable;
public interface ICustomCableConnection
/**
* Implemented on inventories that can share their inventories with other networks, best example, ME Interface.
*/
public interface ITileStorageMonitorable
{
/**
* @return This controls the cable connection to the node. -1 to render connection yourself.
*/
public float getCableConnectionLength( AECableType cable );
IStorageMonitorable getMonitorable( ForgeDirection side, BaseActionSource src );
}
@@ -24,7 +24,7 @@
package appeng.api.implementations.tiles;
import net.minecraftforge.items.IItemHandler;
import net.minecraft.inventory.IInventory;
public interface IViewCellStorage
@@ -35,5 +35,5 @@ public interface IViewCellStorage
*
* @return inventory with at least 5 slot
*/
IItemHandler getViewCellStorage();
IInventory getViewCellStorage();
}
@@ -0,0 +1,43 @@
/*
* 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.integration;
/**
* An interface to get access to the individual settings for AE's Internal Bee
* Comparison handler.
*
* Assessable via: ( IBeeComparison )
* IAEItemStack.getTagCompound().getSpecialComparison()
*
* If you don't have the forestry API, just delete this file when using the API.
*/
public interface IBeeComparison
{
/**
* @return the Forestry IIndividual for this comparison object - cast this to a IIndividual if you want to use it.
*/
Object getIndividual();
}
@@ -25,7 +25,6 @@ package appeng.api.movable;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
@@ -37,7 +36,7 @@ public interface IMovableHandler
* that single entity, you cannot opt out of single entities.
*
* @param myClass tile entity class
* @param tile tile entity
* @param tile tile entity
*
* @return true if it can handle moving
*/
@@ -51,22 +50,20 @@ public interface IMovableHandler
* Potential Example:
*
* <pre>
* {
* &#064;code
* Chunk c = world.getChunkFromBlockCoords( x, z );
* c.setChunkBlockTileEntity( x &amp; 0xF, y + y, z &amp; 0xF, tile );
* {@code
* Chunk c = world.getChunkFromBlockCoords( x, z ); c.setChunkBlockTileEntity( x
* & 0xF, y + y, z & 0xF, tile );
*
* if( c.isChunkLoaded )
* {
* world.addTileEntity( tile );
* world.markBlockForUpdate( x, y, z );
* }
* if ( c.isChunkLoaded ) { world.addTileEntity( tile ); world.markBlockForUpdate( x,
* y, z ); }
* }
* </pre>
*
* @param tile to be moved tile
* @param tile to be moved tile
* @param world world of tile
* @param newPosition the new location
* @param x x coord of tile
* @param y y coord of tile
* @param z z coord of tile
*/
void moveTile( TileEntity tile, World world, BlockPos newPosition );
void moveTile( TileEntity tile, World world, int x, int y, int z );
}
@@ -56,8 +56,7 @@ public enum GridFlags
DENSE_CAPACITY,
/**
* This block is part of a multiblock, used in conjunction with REQUIRE_CHANNEL, and {@link IGridMultiblock} see
* this
* This block is part of a multiblock, used in conjunction with REQUIRE_CHANNEL, and {@link IGridMultiblock} see this
* interface for details.
*/
MULTIBLOCK,
@@ -29,5 +29,5 @@ public enum GridNotification
/**
* the visible connections for this node have changed, useful for cable.
*/
CONNECTIONS_CHANGED,
ConnectionsChanged,
}
+4 -13
View File
@@ -24,8 +24,6 @@
package appeng.api.networking;
import javax.annotation.Nonnull;
import appeng.api.networking.events.MENetworkEvent;
import appeng.api.util.IReadOnlyCollection;
@@ -45,8 +43,7 @@ public interface IGrid
*
* @return the IGridCache you requested.
*/
@Nonnull
<C extends IGridCache> C getCache( @Nonnull Class<? extends IGridCache> iface );
<C extends IGridCache> C getCache( Class<? extends IGridCache> iface );
/**
* Post an event into the network event bus.
@@ -55,8 +52,7 @@ public interface IGrid
*
* @return returns ev back to original poster
*/
@Nonnull
MENetworkEvent postEvent( @Nonnull MENetworkEvent ev );
MENetworkEvent postEvent( MENetworkEvent ev );
/**
* Post an event into the network event bus, but direct it at a single node.
@@ -65,8 +61,7 @@ public interface IGrid
*
* @return returns ev back to original poster
*/
@Nonnull
MENetworkEvent postEventTo( @Nonnull IGridNode node, @Nonnull MENetworkEvent ev );
MENetworkEvent postEventTo( IGridNode node, MENetworkEvent ev );
/**
* get a list of the diversity of classes, you can use this to better detect which machines your interested in,
@@ -74,7 +69,6 @@ public interface IGrid
*
* @return IReadOnlyCollection of all available host types (Of Type IGridHost).
*/
@Nonnull
IReadOnlyCollection<Class<? extends IGridHost>> getMachinesClasses();
/**
@@ -84,13 +78,11 @@ public interface IGrid
*
* @return IMachineSet of all nodes belonging to hosts of specified class.
*/
@Nonnull
IMachineSet getMachines( @Nonnull Class<? extends IGridHost> gridHostClass );
IMachineSet getMachines( Class<? extends IGridHost> gridHostClass );
/**
* @return IReadOnlyCollection for all nodes on the network, node visitors are preferred.
*/
@Nonnull
IReadOnlyCollection<IGridNode> getNodes();
/**
@@ -101,6 +93,5 @@ public interface IGrid
/**
* @return the node considered the pivot point of the grid.
*/
@Nonnull
IGridNode getPivot();
}
@@ -26,12 +26,8 @@ package appeng.api.networking;
import java.util.EnumSet;
import javax.annotation.Nonnegative;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumFacing;
import net.minecraftforge.common.util.ForgeDirection;
import appeng.api.parts.IPart;
import appeng.api.util.AEColor;
@@ -53,7 +49,6 @@ public interface IGridBlock
*
* @return ae/t to use.
*/
@Nonnegative
double getIdlePowerUsage();
/**
@@ -61,11 +56,10 @@ 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.
*
@@ -74,46 +68,37 @@ 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( @Nonnull GridNotification notification );
void onGridNotification( GridNotification notification );
/**
* Update Blocks network/connection/booting status. grid,
*
* @param grid 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();
EnumSet<ForgeDirection> getConnectableSides();
/**
* @return the IGridHost for the node, this will be an IGridPart or a TileEntity generally speaking.
*/
@Nonnull
IGridHost getMachine();
/**
@@ -126,6 +111,5 @@ public interface IGridBlock
*
* @return the render item stack to use to render this node, null is valid, and will not show this node.
*/
@Nullable
ItemStack getMachineRepresentation();
}
@@ -24,9 +24,6 @@
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.
@@ -51,9 +48,9 @@ public interface IGridCache
* information, do it on the next updateTick.
*
* @param gridNode removed from that grid
* @param machine to be removed machine
* @param machine to be removed machine
*/
void removeNode( @Nonnull IGridNode gridNode, @Nonnull IGridHost machine );
void removeNode( IGridNode gridNode, IGridHost machine );
/**
* informs you cache that a machine was added to the grid.
@@ -63,9 +60,9 @@ public interface IGridCache
* information, do it on the next updateTick.
*
* @param gridNode added to grid node
* @param machine to be added machine
* @param machine to be added machine
*/
void addNode( @Nonnull IGridNode gridNode, @Nonnull IGridHost machine );
void addNode( IGridNode gridNode, IGridHost machine );
/**
* Called when a grid splits into two grids, AE will call a split as it
@@ -74,7 +71,7 @@ public interface IGridCache
*
* @param destinationStorage storage which receives half of old grid
*/
void onSplit( @Nonnull IGridStorage destinationStorage );
void onSplit( IGridStorage destinationStorage );
/**
* Called when two grids merge into one, AE will call a join as it
@@ -83,12 +80,12 @@ public interface IGridCache
*
* @param sourceStorage old storage
*/
void onJoin( @Nonnull IGridStorage sourceStorage );
void onJoin( IGridStorage sourceStorage );
/**
* Called when saving changes,
*
* @param destinationStorage storage
*/
void populateGridStorage( @Nonnull IGridStorage destinationStorage );
void populateGridStorage( IGridStorage destinationStorage );
}
@@ -24,9 +24,7 @@
package appeng.api.networking;
import java.util.Map;
import javax.annotation.Nonnull;
import java.util.HashMap;
/**
@@ -40,14 +38,14 @@ public interface IGridCacheRegistry
*
* @param iface grid cache class
*/
void registerGridCache( @Nonnull Class<? extends IGridCache> iface, @Nonnull Class<? extends IGridCache> implementation );
void registerGridCache( Class<? extends IGridCache> iface, Class<? extends IGridCache> implementation );
/**
* requests a new INSTANCE of a grid cache for use, used internally
*
* @param grid grid
*
* @return a new Map of IGridCaches from the registry, called from IGrid when constructing a new grid.
* @return a new HashMap of IGridCaches from the registry, called from IGrid when constructing a new grid.
*/
Map<Class<? extends IGridCache>, IGridCache> createCacheInstance( IGrid grid );
HashMap<Class<? extends IGridCache>, IGridCache> createCacheInstance( IGrid grid );
}
@@ -24,9 +24,7 @@
package appeng.api.networking;
import javax.annotation.Nonnull;
import appeng.api.util.AEPartLocation;
import net.minecraftforge.common.util.ForgeDirection;
/**
@@ -47,7 +45,6 @@ public interface IGridConnection
*
* @return the IGridNode which represents the opposite side of the connection.
*/
@Nonnull
IGridNode getOtherSide( IGridNode gridNode );
/**
@@ -57,8 +54,7 @@ public interface IGridConnection
*
* @return the direction of the connection, only valid for in world connections.
*/
@Nonnull
AEPartLocation getDirection( IGridNode gridNode );
ForgeDirection getDirection( IGridNode gridNode );
/**
* by destroying a connection you may create new grids, and trigger un-expected behavior, you should only destroy
@@ -69,13 +65,11 @@ public interface IGridConnection
/**
* @return node A
*/
@Nonnull
IGridNode a();
/**
* @return node B
*/
@Nonnull
IGridNode b();
/**

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