Compare commits
210 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 5da5315a5b | |||
| f3c44c64c2 | |||
| 1b4969c8e7 | |||
| f2427ee347 | |||
| 4aa9c92a68 | |||
| b5a90357c0 | |||
| 5be0adbc89 | |||
| d8e5f4fed5 | |||
| 47dfc19b7c | |||
| 45f5851079 | |||
| ce058b006c | |||
| 5aef82b9ef | |||
| 483f93f977 | |||
| c0575e11b0 | |||
| 31ecdfbe0a | |||
| f0bfbfec48 | |||
| 06a8843a65 | |||
| 2bca23d75d | |||
| b47543d166 | |||
| a340925d98 | |||
| 0be7322c2c | |||
| a521e827db | |||
| 17648633fe | |||
| fcbebd4ffc | |||
| ca007a3737 | |||
| 92b6650022 | |||
| e1cd3bba25 | |||
| 689bf6e8d9 | |||
| c8a5049d71 | |||
| 10a1a6d855 | |||
| 575a625f75 | |||
| 89ea923c43 | |||
| 5d818eb03e | |||
| e34126458b | |||
| 0ac918c363 | |||
| b6160e40bc | |||
| cf103b06c1 | |||
| 5d33005aaf | |||
| 87cf070b33 | |||
| b1a55f3a79 | |||
| 226e9596ee | |||
| 5cab9c8799 | |||
| 1d2ac29742 | |||
| cbe6012b98 | |||
| 1842febf86 | |||
| d2b69671f5 | |||
| 359e3f7e63 | |||
| fa3e41e687 | |||
| 4e86c92720 | |||
| 07dfa3db2e | |||
| e0e139900f | |||
| 9942f2d32c | |||
| 858826d1fa | |||
| 90ad345672 | |||
| 9a81ebfa50 | |||
| da9fa3d697 | |||
| cae1621613 | |||
| e8574d03ea | |||
| d28f33d198 | |||
| 7df5bf4076 | |||
| 66760865a3 | |||
| e4a08ba99d | |||
| f11e9e2a4c | |||
| 7a469c1a1d | |||
| e256a4f664 | |||
| 73cc3f8998 | |||
| 874f46ed4d | |||
| d82c713112 | |||
| 45cbc40177 | |||
| 0e7e9313ee | |||
| 2bba843313 | |||
| a0949297d5 | |||
| 420fb272b4 | |||
| debd2de42e | |||
| 3fb813a81b | |||
| ab05f5fec9 | |||
| 9e4f51db6e | |||
| 74480502b1 | |||
| 739277ab64 | |||
| cf656e1540 | |||
| ab6f46077b | |||
| e9c7312e98 | |||
| 006cf2f8c1 | |||
| 636dce66e3 | |||
| 2787796cd3 | |||
| 506c516384 | |||
| 011455e327 | |||
| 11d772a32b | |||
| f20f0e003e | |||
| 0f100341d3 | |||
| b1feeca41c | |||
| 7d43d79682 | |||
| 5cd148ab5a | |||
| 6c544f2211 | |||
| 0a2f03aa92 | |||
| b03a249da3 | |||
| 6f0fc7d189 | |||
| fd8eecbe93 | |||
| 0a60b3ebb2 | |||
| 15522f5ce7 | |||
| 964559baa1 | |||
| 06f30b3daa | |||
| 68a02ed64b | |||
| c59a6e34eb | |||
| 5b4f450fc3 | |||
| ff0d38d56a | |||
| 89058448cf | |||
| 3c737d8d1e | |||
| a807b4e3ad | |||
| 8f740be431 | |||
| 77e07e9b3b | |||
| d04cd2a001 | |||
| 8f2b7fe16b | |||
| 239f8d027a | |||
| c4c4d20303 | |||
| e7c57c0f61 | |||
| 184fe8c1fc | |||
| 6f4722b393 | |||
| 414b01bddb | |||
| 63c251294e | |||
| 541f07a7e3 | |||
| 1693271660 | |||
| 3a12fa4843 | |||
| ba85da2c72 | |||
| 469a1e205b | |||
| d238f6e8e4 | |||
| c0fa8ab2dc | |||
| 3e5787be76 | |||
| 52ec63413f | |||
| 62ac6a0052 | |||
| 7f7b794c0b | |||
| a97ebaf40d | |||
| 80375c436d | |||
| 9ce4a65203 | |||
| f5aee56a0b | |||
| 2655620fd0 | |||
| 3c86f2eae4 | |||
| cdba0b04fb | |||
| a6fb17b008 | |||
| 1b31185cdb | |||
| 3d1a919e69 | |||
| 80710cc818 | |||
| b8c63df11b | |||
| 20fd760274 | |||
| 27cdbfb7f3 | |||
| 33d247fec8 | |||
| 75dd1d4bb6 | |||
| a8e79826bd | |||
| b9ece3a18a | |||
| 780f68952b | |||
| 49296915c9 | |||
| 0fdc46b358 | |||
| c7980907ed | |||
| 8306f5bf0a | |||
| 5bf05f6cb1 | |||
| 9fcfbf31be | |||
| 1933b4b10d | |||
| 019f570331 | |||
| d053c9b1bc | |||
| be4fdfed85 | |||
| 19802b96e8 | |||
| 1e20cd8c08 | |||
| 15d4583c56 | |||
| 0c5c23e9ff | |||
| 832d4bb527 | |||
| 62b02d3faf | |||
| 006316603d | |||
| 1bd4bd00a8 | |||
| 2944873431 | |||
| f8ee4bb1f2 | |||
| 5eece068ba | |||
| 9220ca0048 | |||
| 1478e4c378 | |||
| 5982f094ec | |||
| eb93ffc8d8 | |||
| 7b21aa2b07 | |||
| fee1c18afe | |||
| 295e720d37 | |||
| 75234415ac | |||
| c7b1ab756b | |||
| 2dd2b5d034 | |||
| dd9346e53f | |||
| 3b4302583d | |||
| 3dd9aa09d3 | |||
| 2642ced86b | |||
| f2e3d81fd7 | |||
| 8e031ca8d6 | |||
| 996d387525 | |||
| 1cda087c03 | |||
| 007c7ceb56 | |||
| 529d03fa9e | |||
| c0a4762ffc | |||
| 3337eb9ae3 | |||
| ca104912d6 | |||
| 0d63f560d3 | |||
| 3df93fc66d | |||
| f5412152a4 | |||
| 46955643b9 | |||
| fee5b7fdfc | |||
| 7c28a71e10 | |||
| 7f049e099d | |||
| 37ce6b262e | |||
| b79cd732b2 | |||
| 80fbb58d4f | |||
| ba71a82288 | |||
| d638d083c2 | |||
| 136c204421 | |||
| 6cda95b979 | |||
| 000cb555e3 | |||
| 82af7e6dde |
@@ -21,13 +21,11 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
path: ~/.gradle/caches
|
path: ~/.gradle/caches
|
||||||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
|
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
|
||||||
- name: Clean gradle
|
- name: Generate Resources
|
||||||
run: ./gradlew clean --no-daemon --max-workers 1
|
run: ./gradlew generateData
|
||||||
- name: Validate no assets
|
- name: Build
|
||||||
run: test ! -d ./src/generated
|
run: ./gradlew build
|
||||||
- name: Generate assets
|
- uses: actions/upload-artifact@v2
|
||||||
run: ./gradlew runData --no-daemon --max-workers 1
|
with:
|
||||||
- name: Validate assets
|
name: dist
|
||||||
run: test -d ./src/generated -a -f ./src/generated/resources/.cache/cache
|
path: build/libs/
|
||||||
- name: Build with Gradle
|
|
||||||
run: ./gradlew build --no-daemon --max-workers 1
|
|
||||||
|
|||||||
@@ -1,26 +1,19 @@
|
|||||||
name: 'Release'
|
name: 'Release'
|
||||||
|
|
||||||
on:
|
on:
|
||||||
release:
|
create:
|
||||||
types: [published]
|
tags:
|
||||||
|
- fabric/v*
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Validate semver
|
- name: Export current tag as environment variable
|
||||||
env:
|
env:
|
||||||
TAG: ${{ github.event.release.tag_name }}
|
TAG: ${{ github.event.ref }}
|
||||||
run: |
|
run: echo "::set-env name=TAG::${TAG}"
|
||||||
echo $TAG | grep -oP '^v(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$'
|
|
||||||
echo "::set-env name=RELEASE::${TAG:1}"
|
|
||||||
- name: Export keystore
|
|
||||||
env:
|
|
||||||
KEY_STORE: ${{ secrets.KEY_STORE }}
|
|
||||||
run: |
|
|
||||||
echo $KEY_STORE | base64 -d > $HOME/keystore.jks
|
|
||||||
echo "::set-env name=KEY_STORE_FILE::$HOME/keystore.jks"
|
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Set up JDK 1.8
|
- name: Set up JDK 1.8
|
||||||
uses: actions/setup-java@v1
|
uses: actions/setup-java@v1
|
||||||
@@ -30,25 +23,19 @@ jobs:
|
|||||||
run: chmod +x gradlew
|
run: chmod +x gradlew
|
||||||
- name: Validate no assets
|
- name: Validate no assets
|
||||||
run: test ! -d ./src/generated
|
run: test ! -d ./src/generated
|
||||||
- name: Generate assets
|
- name: Generate resources
|
||||||
run: ./gradlew runData --no-daemon --max-workers 1
|
env:
|
||||||
- name: Validate assets
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
run: test -d ./src/generated -a -f ./src/generated/resources/.cache/cache
|
run: ./gradlew generateData
|
||||||
- name: Build with Gradle
|
- name: Build with Gradle
|
||||||
env:
|
env:
|
||||||
KEY_STORE_PASS: ${{ secrets.KEY_STORE_PASS }}
|
|
||||||
KEY_STORE_ALIAS: ${{ secrets.KEY_STORE_ALIAS }}
|
|
||||||
KEY_STORE_KEY_PASS: ${{ secrets.KEY_STORE_KEY_PASS }}
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
run: ./gradlew build --no-daemon --max-workers 1
|
run: ./gradlew build
|
||||||
- name: Upload to curseforge
|
- name: Upload artifacts
|
||||||
env:
|
uses: actions/upload-artifact@v2
|
||||||
KEY_STORE_PASS: ${{ secrets.KEY_STORE_PASS }}
|
with:
|
||||||
KEY_STORE_ALIAS: ${{ secrets.KEY_STORE_ALIAS }}
|
name: dist
|
||||||
KEY_STORE_KEY_PASS: ${{ secrets.KEY_STORE_KEY_PASS }}
|
path: build/libs/
|
||||||
CHANGELOG: ${{ github.event.release.body }}
|
|
||||||
CURSEFORGE: ${{ secrets.CURSEFORGE }}
|
|
||||||
run: ./gradlew curseforge --no-daemon --max-workers 1
|
|
||||||
- name: Publish to github packages
|
- name: Publish to github packages
|
||||||
env:
|
env:
|
||||||
KEY_STORE_PASS: ${{ secrets.KEY_STORE_PASS }}
|
KEY_STORE_PASS: ${{ secrets.KEY_STORE_PASS }}
|
||||||
@@ -64,17 +51,8 @@ jobs:
|
|||||||
MODMAVEN_USER: ${{ secrets.MODMAVEN_USER }}
|
MODMAVEN_USER: ${{ secrets.MODMAVEN_USER }}
|
||||||
MODMAVEN_PASSWORD: ${{ secrets.MODMAVEN_PASSWORD }}
|
MODMAVEN_PASSWORD: ${{ secrets.MODMAVEN_PASSWORD }}
|
||||||
run: ./gradlew publishMavenPublicationToModmavenRepository --no-daemon --max-workers 1
|
run: ./gradlew publishMavenPublicationToModmavenRepository --no-daemon --max-workers 1
|
||||||
- name: Prepare artifact metadata
|
- name: Upload to curseforge
|
||||||
id: prepare_artifact_metadata
|
|
||||||
run: |
|
|
||||||
echo ::set-output name=ARTIFACT_PATH::./build/libs/appliedenergistics2-${RELEASE}.jar
|
|
||||||
echo ::set-output name=ARTIFACT_NAME::appliedenergistics2-${RELEASE}.jar
|
|
||||||
- name: Upload Release Artifact
|
|
||||||
uses: actions/upload-release-asset@v1.0.1
|
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
with:
|
CURSEFORGE: ${{ secrets.CURSEFORGE }}
|
||||||
upload_url: ${{ github.event.release.upload_url }}
|
run: ./gradlew curseforge
|
||||||
asset_path: ${{ steps.prepare_artifact_metadata.outputs.ARTIFACT_PATH }}
|
|
||||||
asset_name: ${{ steps.prepare_artifact_metadata.outputs.ARTIFACT_NAME }}
|
|
||||||
asset_content_type: application/zip
|
|
||||||
|
|||||||
@@ -76,7 +76,9 @@ Our authoritative Maven repository is Github Packages, which you can also use in
|
|||||||
[requires special setup](https://docs.github.com/en/packages/using-github-packages-with-your-projects-ecosystem/configuring-gradle-for-use-with-github-packages#authenticating-to-github-packages)
|
[requires special setup](https://docs.github.com/en/packages/using-github-packages-with-your-projects-ecosystem/configuring-gradle-for-use-with-github-packages#authenticating-to-github-packages)
|
||||||
to authenticate with your personal access token.
|
to authenticate with your personal access token.
|
||||||
|
|
||||||
AE2 is also available without authentication from Modmaven. You can use the following snippet as example on how to add a repository to your gradle build file.
|
AE2 is also available without authentication from Modmaven.
|
||||||
|
|
||||||
|
You can use the following snippet as example on how to add a repository to your gradle build file.
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
maven {
|
maven {
|
||||||
@@ -87,12 +89,24 @@ AE2 is also available without authentication from Modmaven. You can use the foll
|
|||||||
includeGroup 'appeng'
|
includeGroup 'appeng'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Required for libblockattributes
|
||||||
|
maven {
|
||||||
|
name = "BuildCraft"
|
||||||
|
url = "https://mod-buildcraft.com/maven"
|
||||||
|
content {
|
||||||
|
includeGroup "alexiil.mc.lib"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
When compiling against the AE2 API you can use gradle dependencies, just add
|
When compiling against the AE2 API you can use gradle dependencies, just add
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compileOnly "appeng:appliedenergistics2:VERSION:api"
|
modCompileOnly "appeng:appliedenergistics2-fabric:VERSION:api"
|
||||||
|
|
||||||
|
// Include only if you want AE2 at runtime
|
||||||
|
modRuntimeOnly "appeng:appliedenergistics2-fabric:VERSION"
|
||||||
}
|
}
|
||||||
|
|
||||||
or add the `compileOnly` line to your existing dependencies task to your build.gradle.
|
or add the `compileOnly` line to your existing dependencies task to your build.gradle.
|
||||||
|
|||||||
+138
-127
@@ -16,56 +16,74 @@
|
|||||||
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
|
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
buildscript {
|
|
||||||
repositories {
|
|
||||||
maven { url = 'https://files.minecraftforge.net/maven' }
|
|
||||||
maven { url = 'https://repo.spongepowered.org/maven' }
|
|
||||||
jcenter()
|
|
||||||
mavenCentral()
|
|
||||||
}
|
|
||||||
dependencies {
|
|
||||||
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '3.+', changing: true
|
|
||||||
classpath 'org.spongepowered:mixingradle:0.7-SNAPSHOT'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
id "maven-publish"
|
id 'java'
|
||||||
|
id 'fabric-loom'
|
||||||
|
id 'maven-publish'
|
||||||
id "com.diffplug.gradle.spotless" version "4.3.0"
|
id "com.diffplug.gradle.spotless" version "4.3.0"
|
||||||
id "com.matthewprenger.cursegradle" version "1.4.0"
|
id "com.matthewprenger.cursegradle" version "1.4.0"
|
||||||
id "idea"
|
id "org.sonarqube" version "2.8"
|
||||||
|
id "jacoco"
|
||||||
}
|
}
|
||||||
|
|
||||||
apply plugin: 'net.minecraftforge.gradle'
|
|
||||||
apply plugin: 'org.spongepowered.mixin'
|
|
||||||
apply plugin: "eclipse"
|
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenLocal()
|
mavenLocal()
|
||||||
jcenter()
|
jcenter()
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
maven { // modmaven, maven proxy
|
maven { url = "https://maven.fabricmc.net/" }
|
||||||
name 'modmaven'
|
maven {
|
||||||
url "https://modmaven.k-4u.nl/"
|
name = "BuildCraft"
|
||||||
|
url = "https://mod-buildcraft.com/maven"
|
||||||
|
content {
|
||||||
|
includeGroup "alexiil.mc.lib"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
maven {
|
||||||
|
name = "HYWLA"
|
||||||
|
url = "https://maven.tehnut.info/"
|
||||||
|
content {
|
||||||
|
includeGroup "mcp.mobius.waila"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
minecraft "net.minecraftforge:forge:${minecraft_version}-${forge_version}"
|
minecraft "com.mojang:minecraft:${project.minecraft_version}"
|
||||||
|
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
|
||||||
|
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
|
||||||
|
|
||||||
// compile against provided APIs
|
//Fabric api
|
||||||
compileOnly "mezz.jei:jei-${jei_minecraft_version}:${jei_version}:api"
|
modImplementation "net.fabricmc.fabric-api:fabric-api:${fabric_version}"
|
||||||
compileOnly "mcjty.theoneprobe:TheOneProbe-${minecraft_release}:${minecraft_release}-${top_version}:api"
|
|
||||||
|
|
||||||
// Runtime, Mods
|
modImplementation "alexiil.mc.lib:libblockattributes-core:${libblockattributes_version}"
|
||||||
runtimeOnly fg.deobf("mezz.jei:jei-${jei_minecraft_version}:${jei_version}")
|
modImplementation "alexiil.mc.lib:libblockattributes-items:${libblockattributes_version}"
|
||||||
runtimeOnly fg.deobf("mcjty.theoneprobe:TheOneProbe-${minecraft_release}:${minecraft_release}-${top_version}")
|
modImplementation "alexiil.mc.lib:libblockattributes-fluids:${libblockattributes_version}"
|
||||||
|
include "alexiil.mc.lib:libblockattributes-core:${libblockattributes_version}"
|
||||||
|
include "alexiil.mc.lib:libblockattributes-items:${libblockattributes_version}"
|
||||||
|
include "alexiil.mc.lib:libblockattributes-fluids:${libblockattributes_version}"
|
||||||
|
|
||||||
|
// Energy API
|
||||||
|
modApi "teamreborn:energy:${tr_energy_version}"
|
||||||
|
include "teamreborn:energy:${tr_energy_version}"
|
||||||
|
|
||||||
|
modCompileOnly("me.shedaniel:RoughlyEnoughItems:${rei_version}") {
|
||||||
|
exclude group: "net.fabricmc.fabric-api"
|
||||||
|
}
|
||||||
|
modCompileOnly("mcp.mobius.waila:Hwyla:1.16.1-1.9.22-75") {
|
||||||
|
exclude group: "net.fabricmc.fabric-api"
|
||||||
|
}
|
||||||
|
modRuntime("me.shedaniel:RoughlyEnoughItems:${rei_version}") {
|
||||||
|
exclude group: "net.fabricmc.fabric-api"
|
||||||
|
}
|
||||||
|
modRuntime("TechReborn:TechReborn-1.16:3.5.1+build.101") {
|
||||||
|
exclude group: "net.fabricmc.fabric-api"
|
||||||
|
}
|
||||||
|
// modRuntimeOnly "mcp.mobius.waila:Hwyla:1.16.1-1.9.22-75"
|
||||||
|
|
||||||
|
implementation 'com.google.code.findbugs:jsr305:3.0.2'
|
||||||
|
|
||||||
// unit test dependencies
|
// unit test dependencies
|
||||||
testCompile "junit:junit:4.13"
|
testCompile "junit:junit:4.13"
|
||||||
|
|
||||||
// Annotation Processors
|
|
||||||
annotationProcessor 'org.spongepowered:mixin:0.8:processor'
|
|
||||||
}
|
}
|
||||||
group = artifact_group
|
group = artifact_group
|
||||||
archivesBaseName = artifact_basename
|
archivesBaseName = artifact_basename
|
||||||
@@ -73,6 +91,7 @@ archivesBaseName = artifact_basename
|
|||||||
sourceCompatibility = targetCompatibility = JavaVersion.VERSION_1_8
|
sourceCompatibility = targetCompatibility = JavaVersion.VERSION_1_8
|
||||||
compileJava {
|
compileJava {
|
||||||
sourceCompatibility = targetCompatibility = JavaVersion.VERSION_1_8
|
sourceCompatibility = targetCompatibility = JavaVersion.VERSION_1_8
|
||||||
|
options.deprecation = false
|
||||||
}
|
}
|
||||||
|
|
||||||
// ensure everything uses UTF-8 and not some random codepage chosen by gradle
|
// ensure everything uses UTF-8 and not some random codepage chosen by gradle
|
||||||
@@ -83,7 +102,6 @@ tasks.withType(JavaCompile) {
|
|||||||
|
|
||||||
///////////////////
|
///////////////////
|
||||||
// Version Number
|
// Version Number
|
||||||
version = version_major + "." + version_minor + "." + version_patch
|
|
||||||
|
|
||||||
ext.pr = System.getenv('PR_NUMBER') ?: ""
|
ext.pr = System.getenv('PR_NUMBER') ?: ""
|
||||||
if (ext.pr) {
|
if (ext.pr) {
|
||||||
@@ -95,9 +113,15 @@ if (ext.branch) {
|
|||||||
version = version + "+branch." + ext.branch
|
version = version + "+branch." + ext.branch
|
||||||
}
|
}
|
||||||
|
|
||||||
ext.release = System.getenv('RELEASE') ?: ""
|
ext.tag = System.getenv('TAG') ?: ""
|
||||||
if (ext.release) {
|
if (ext.tag && ext.tag.startsWith("fabric/v")) {
|
||||||
version = ext.release
|
version = ext.tag.substring("fabric/v".length())
|
||||||
|
// Validate that the rest is a semver version
|
||||||
|
if (version ==~ /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/) {
|
||||||
|
println("::set-env name=VERSION::${version}")
|
||||||
|
} else {
|
||||||
|
throw new GradleException("Invalid semver: $version")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ext.isAlpha = project.version.contains("alpha")
|
ext.isAlpha = project.version.contains("alpha")
|
||||||
@@ -112,92 +136,47 @@ sourceSets {
|
|||||||
srcDir 'src/generated/resources'
|
srcDir 'src/generated/resources'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
datagen {
|
||||||
|
compileClasspath += sourceSets.api.output
|
||||||
|
runtimeClasspath += sourceSets.api.output
|
||||||
|
compileClasspath += sourceSets.main.output
|
||||||
|
runtimeClasspath += sourceSets.main.output
|
||||||
|
}
|
||||||
test {
|
test {
|
||||||
compileClasspath += sourceSets.api.output
|
compileClasspath += sourceSets.api.output
|
||||||
runtimeClasspath += sourceSets.api.output
|
runtimeClasspath += sourceSets.api.output
|
||||||
java {
|
}
|
||||||
exclude '**/*'
|
siteexport {
|
||||||
}
|
compileClasspath += sourceSets.api.output
|
||||||
|
runtimeClasspath += sourceSets.api.output
|
||||||
|
compileClasspath += sourceSets.main.output
|
||||||
|
runtimeClasspath += sourceSets.main.output
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
configurations {
|
configurations {
|
||||||
apiCompile.extendsFrom(compile)
|
apiCompile.extendsFrom(compileClasspath)
|
||||||
|
datagenCompile.extendsFrom(compileClasspath)
|
||||||
|
siteexportCompile.extendsFrom(compileClasspath)
|
||||||
|
siteexportRuntime.extendsFrom(runtimeClasspath)
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////
|
////////////////////
|
||||||
// Forge/Minecraft
|
// Forge/Minecraft
|
||||||
minecraft {
|
minecraft {
|
||||||
mappings channel: "snapshot", version: project.mcp_mappings
|
accessWidener "src/main/resources/appliedenergistics2.accesswidener"
|
||||||
|
}
|
||||||
|
|
||||||
accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg')
|
processResources {
|
||||||
|
inputs.property "version", project.version
|
||||||
|
|
||||||
runs {
|
from(sourceSets.main.resources.srcDirs) {
|
||||||
client {
|
include "fabric.mod.json"
|
||||||
property 'forge.logging.console.level', 'debug'
|
expand "version": project.version
|
||||||
workingDirectory project.file('run')
|
|
||||||
property "mixin.debug.export", "true"
|
|
||||||
mods {
|
|
||||||
appliedenergistics2 {
|
|
||||||
source sourceSets.main
|
|
||||||
source sourceSets.api
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
server {
|
|
||||||
property 'forge.logging.console.level', 'debug'
|
|
||||||
workingDirectory project.file('run')
|
|
||||||
mods {
|
|
||||||
appliedenergistics2 {
|
|
||||||
source sourceSets.main
|
|
||||||
source sourceSets.api
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
data {
|
|
||||||
property 'forge.logging.console.level', 'debug'
|
|
||||||
workingDirectory project.file('run')
|
|
||||||
// ForgeGradle will just force-exit the Gradle Daemon which fails our builds in case
|
|
||||||
// a daemon is used for any reason.
|
|
||||||
forceExit false
|
|
||||||
args '--mod', 'appliedenergistics2', '--all', '--output', file('src/generated/resources/')
|
|
||||||
mods {
|
|
||||||
appliedenergistics2 {
|
|
||||||
source sourceSets.main
|
|
||||||
source sourceSets.api
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
///////////
|
from(sourceSets.main.resources.srcDirs) {
|
||||||
// Mixins
|
exclude "fabric.mod.json"
|
||||||
mixin {
|
|
||||||
add sourceSets.main, "appliedenergistics2.mixins.refmap.json"
|
|
||||||
}
|
|
||||||
|
|
||||||
////////////////
|
|
||||||
// Jar Signing
|
|
||||||
def signProps = [:]
|
|
||||||
if (System.getenv("KEY_STORE_FILE")) {
|
|
||||||
signProps['keyStore'] = System.getenv("KEY_STORE_FILE")
|
|
||||||
signProps['storePass'] = System.getenv("KEY_STORE_PASS")
|
|
||||||
signProps['alias'] = System.getenv("KEY_STORE_ALIAS")
|
|
||||||
signProps['keyPass'] = System.getenv("KEY_STORE_KEY_PASS")
|
|
||||||
}
|
|
||||||
|
|
||||||
task signJar(type: net.minecraftforge.gradle.common.task.SignJar, dependsOn: 'reobfJar') {
|
|
||||||
onlyIf { !signProps.isEmpty() }
|
|
||||||
|
|
||||||
if (!signProps.isEmpty()) {
|
|
||||||
keyStore = signProps.keyStore
|
|
||||||
alias = signProps.alias
|
|
||||||
storePass = signProps.storePass
|
|
||||||
keyPass = signProps.keyPass
|
|
||||||
|
|
||||||
inputFile = jar.archivePath
|
|
||||||
outputFile = jar.archivePath
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -208,8 +187,7 @@ processResources {
|
|||||||
}
|
}
|
||||||
|
|
||||||
jar {
|
jar {
|
||||||
finalizedBy 'reobfJar'
|
finalizedBy 'remapJar'
|
||||||
finalizedBy 'signJar'
|
|
||||||
|
|
||||||
from sourceSets.main.output.classesDirs
|
from sourceSets.main.output.classesDirs
|
||||||
from sourceSets.api.output.classesDirs
|
from sourceSets.api.output.classesDirs
|
||||||
@@ -244,11 +222,13 @@ task javadocJar(type: Jar, dependsOn: javadocs) {
|
|||||||
classifier = "javadoc"
|
classifier = "javadoc"
|
||||||
from javadoc.destinationDir
|
from javadoc.destinationDir
|
||||||
}
|
}
|
||||||
|
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
|
||||||
task sourcesJar(type: Jar) {
|
// if it is present.
|
||||||
|
// If you remove this task, sources will not be generated.
|
||||||
|
task sourcesJar(type: Jar, dependsOn: classes) {
|
||||||
classifier = "sources"
|
classifier = "sources"
|
||||||
from sourceSets.main.allJava
|
from sourceSets.main.allSource
|
||||||
from sourceSets.api.allJava
|
from sourceSets.api.allSource
|
||||||
}
|
}
|
||||||
|
|
||||||
task apiJar(type: Jar) {
|
task apiJar(type: Jar) {
|
||||||
@@ -271,22 +251,23 @@ artifacts {
|
|||||||
//////////////////
|
//////////////////
|
||||||
// Maven publish
|
// Maven publish
|
||||||
publishing {
|
publishing {
|
||||||
publications {
|
if (!version.endsWith("-SNAPSHOT")) {
|
||||||
maven(MavenPublication) {
|
publications {
|
||||||
groupId = project.group
|
maven(MavenPublication) {
|
||||||
artifactId = project.archivesBaseName
|
groupId = project.group
|
||||||
version = project.version
|
artifactId = 'appliedenergistics2-fabric'
|
||||||
|
version = project.version
|
||||||
|
|
||||||
// ForgeGradle will generate wild dependency definitions, see https://github.com/MinecraftForge/ForgeGradle/issues/584
|
// add all the jars that should be included when publishing to maven
|
||||||
// Since we don't actually depend on anything, just remove the entire node.
|
artifact(remapJar) {
|
||||||
pom.withXml {
|
builtBy remapJar
|
||||||
asNode().remove(asNode().dependencies)
|
}
|
||||||
|
artifact(sourcesJar) {
|
||||||
|
builtBy remapSourcesJar
|
||||||
|
}
|
||||||
|
artifact javadocJar
|
||||||
|
artifact apiJar
|
||||||
}
|
}
|
||||||
|
|
||||||
from components.java
|
|
||||||
artifact sourcesJar
|
|
||||||
artifact javadocJar
|
|
||||||
artifact apiJar
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
repositories {
|
repositories {
|
||||||
@@ -307,6 +288,25 @@ publishing {
|
|||||||
url = "https://modmaven.k-4u.nl/artifactory/local-releases/"
|
url = "https://modmaven.k-4u.nl/artifactory/local-releases/"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
import net.fabricmc.loom.task.RunClientTask;
|
||||||
|
|
||||||
|
task generateData(type: RunClientTask, dependsOn: downloadAssets, group: "ae2", description: "Generates various JSON assets for the mod") {
|
||||||
|
classpath = configurations.runtimeClasspath
|
||||||
|
classpath sourceSets.api.output
|
||||||
|
classpath sourceSets.main.output
|
||||||
|
classpath sourceSets.datagen.output
|
||||||
|
systemProperty "appeng.generateData", "true"
|
||||||
|
}
|
||||||
|
build.dependsOn generateData
|
||||||
|
|
||||||
|
task runSiteExport(type: RunClientTask, dependsOn: downloadAssets, group: "ae2", description: "Export game assets for the website") {
|
||||||
|
classpath = configurations.runtimeClasspath
|
||||||
|
classpath sourceSets.api.output
|
||||||
|
classpath sourceSets.main.output
|
||||||
|
classpath sourceSets.siteexport.output
|
||||||
}
|
}
|
||||||
|
|
||||||
/////////////
|
/////////////
|
||||||
@@ -328,7 +328,7 @@ spotless {
|
|||||||
|
|
||||||
////////////////
|
////////////////
|
||||||
// Curse Forge
|
// Curse Forge
|
||||||
if (System.getenv("CURSEFORGE")) {
|
if (System.getenv("CURSEFORGE") && !version.endsWith("-SNAPSHOT")) {
|
||||||
def cfReleaseType = "release"
|
def cfReleaseType = "release"
|
||||||
if (ext.isAlpha) {
|
if (ext.isAlpha) {
|
||||||
cfReleaseType = "alpha"
|
cfReleaseType = "alpha"
|
||||||
@@ -343,6 +343,17 @@ if (System.getenv("CURSEFORGE")) {
|
|||||||
changelogType = "markdown"
|
changelogType = "markdown"
|
||||||
changelog = System.getenv("CHANGELOG") ?: "Please visit our [releases](https://github.com/AppliedEnergistics/Applied-Energistics-2/releases) for a changelog"
|
changelog = System.getenv("CHANGELOG") ?: "Please visit our [releases](https://github.com/AppliedEnergistics/Applied-Energistics-2/releases) for a changelog"
|
||||||
releaseType = cfReleaseType
|
releaseType = cfReleaseType
|
||||||
|
addGameVersion project.minecraft_version
|
||||||
|
addGameVersion "Fabric"
|
||||||
|
mainArtifact(remapJar.archiveFile) {
|
||||||
|
displayName = "${project.version} [FABRIC]"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
options {
|
||||||
|
forgeGradleIntegration = false
|
||||||
|
}
|
||||||
|
afterEvaluate {
|
||||||
|
tasks.getByName("curseforge${project.curseforge_project}").dependsOn remapJar
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+18
-26
@@ -1,36 +1,28 @@
|
|||||||
version_major=0
|
version=0.0.0-SNAPSHOT
|
||||||
version_minor=0
|
|
||||||
version_patch=0
|
|
||||||
|
|
||||||
artifact_group=appeng
|
artifact_group=appeng
|
||||||
artifact_basename=appliedenergistics2
|
artifact_basename=appliedenergistics2-fabric
|
||||||
|
|
||||||
|
org.gradle.jvmargs=-Xmx2G
|
||||||
|
|
||||||
|
# Fabric Properties
|
||||||
|
# Check these on https://modmuss50.me/fabric.html
|
||||||
|
|
||||||
#########################################################
|
|
||||||
# Minecraft Versions #
|
|
||||||
#########################################################
|
|
||||||
minecraft_release=1.16
|
|
||||||
minecraft_version=1.16.3
|
minecraft_version=1.16.3
|
||||||
mcp_mappings=20200916-1.16.2
|
yarn_mappings=1.16.3+build.11
|
||||||
forge_version=34.0.8
|
loader_version=0.9.3+build.207
|
||||||
|
|
||||||
#########################################################
|
#Fabric api
|
||||||
# Provided APIs #
|
fabric_version=0.21.0+build.407-1.16
|
||||||
#########################################################
|
|
||||||
jei_minecraft_version=1.16.2
|
loom_version=0.5-SNAPSHOT
|
||||||
jei_version=7.3.2.25
|
|
||||||
top_version=3.0.3-beta-6
|
# Dependencies
|
||||||
hwyla_version=1.10.8-B72_1.15.2
|
libblockattributes_version=0.8.0
|
||||||
ctm_version=MC1.15.2-1.1.0.9
|
tr_energy_version=0.1.0
|
||||||
|
rei_version=5.2.10
|
||||||
|
|
||||||
#########################################################
|
#########################################################
|
||||||
# Deployment #
|
# Deployment #
|
||||||
#########################################################
|
#########################################################
|
||||||
website_version=1.16.2
|
|
||||||
curse_versions=1.16.2
|
|
||||||
curseforge_project=223794
|
curseforge_project=223794
|
||||||
|
|
||||||
#########################################################
|
|
||||||
# Gradle #
|
|
||||||
#########################################################
|
|
||||||
# Various tasks like runData will fail when run as daemon
|
|
||||||
org.gradle.daemon=false
|
|
||||||
|
|||||||
Vendored
BIN
Binary file not shown.
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.3-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-6.3-bin.zip
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
|||||||
@@ -1,5 +1,21 @@
|
|||||||
#!/usr/bin/env sh
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
|
#
|
||||||
|
# Copyright 2015 the original author or authors.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# https://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
#
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
##
|
##
|
||||||
## Gradle start up script for UN*X
|
## Gradle start up script for UN*X
|
||||||
@@ -28,7 +44,7 @@ APP_NAME="Gradle"
|
|||||||
APP_BASE_NAME=`basename "$0"`
|
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.
|
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||||
DEFAULT_JVM_OPTS=""
|
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||||
|
|
||||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||||
MAX_FD="maximum"
|
MAX_FD="maximum"
|
||||||
@@ -109,8 +125,8 @@ if $darwin; then
|
|||||||
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
|
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# For Cygwin, switch paths to Windows format before running java
|
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||||
if $cygwin ; then
|
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
|
||||||
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
||||||
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
||||||
JAVACMD=`cygpath --unix "$JAVACMD"`
|
JAVACMD=`cygpath --unix "$JAVACMD"`
|
||||||
@@ -138,19 +154,19 @@ if $cygwin ; then
|
|||||||
else
|
else
|
||||||
eval `echo args$i`="\"$arg\""
|
eval `echo args$i`="\"$arg\""
|
||||||
fi
|
fi
|
||||||
i=$((i+1))
|
i=`expr $i + 1`
|
||||||
done
|
done
|
||||||
case $i in
|
case $i in
|
||||||
(0) set -- ;;
|
0) set -- ;;
|
||||||
(1) set -- "$args0" ;;
|
1) set -- "$args0" ;;
|
||||||
(2) set -- "$args0" "$args1" ;;
|
2) set -- "$args0" "$args1" ;;
|
||||||
(3) set -- "$args0" "$args1" "$args2" ;;
|
3) set -- "$args0" "$args1" "$args2" ;;
|
||||||
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
|
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
|
||||||
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
|
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
|
||||||
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
|
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
|
||||||
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
|
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
|
||||||
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
|
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
|
||||||
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
|
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -159,14 +175,9 @@ save () {
|
|||||||
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
|
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
|
||||||
echo " "
|
echo " "
|
||||||
}
|
}
|
||||||
APP_ARGS=$(save "$@")
|
APP_ARGS=`save "$@"`
|
||||||
|
|
||||||
# Collect all arguments for the java command, following the shell quoting and substitution rules
|
# 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"
|
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" "$@"
|
||||||
|
|||||||
Vendored
+20
-1
@@ -1,3 +1,19 @@
|
|||||||
|
@rem
|
||||||
|
@rem Copyright 2015 the original author or authors.
|
||||||
|
@rem
|
||||||
|
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
@rem you may not use this file except in compliance with the License.
|
||||||
|
@rem You may obtain a copy of the License at
|
||||||
|
@rem
|
||||||
|
@rem https://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
@rem
|
||||||
|
@rem Unless required by applicable law or agreed to in writing, software
|
||||||
|
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
@rem See the License for the specific language governing permissions and
|
||||||
|
@rem limitations under the License.
|
||||||
|
@rem
|
||||||
|
|
||||||
@if "%DEBUG%" == "" @echo off
|
@if "%DEBUG%" == "" @echo off
|
||||||
@rem ##########################################################################
|
@rem ##########################################################################
|
||||||
@rem
|
@rem
|
||||||
@@ -13,8 +29,11 @@ if "%DIRNAME%" == "" set DIRNAME=.
|
|||||||
set APP_BASE_NAME=%~n0
|
set APP_BASE_NAME=%~n0
|
||||||
set APP_HOME=%DIRNAME%
|
set APP_HOME=%DIRNAME%
|
||||||
|
|
||||||
|
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
|
||||||
|
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
|
||||||
|
|
||||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
@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 DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
||||||
|
|
||||||
@rem Find java.exe
|
@rem Find java.exe
|
||||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||||
|
|||||||
@@ -0,0 +1,15 @@
|
|||||||
|
pluginManagement {
|
||||||
|
repositories {
|
||||||
|
jcenter()
|
||||||
|
maven {
|
||||||
|
name = "Fabric"
|
||||||
|
url = "https://maven.fabricmc.net/"
|
||||||
|
}
|
||||||
|
gradlePluginPortal()
|
||||||
|
}
|
||||||
|
|
||||||
|
plugins {
|
||||||
|
id "fabric-loom" version loom_version
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -27,11 +27,11 @@ import java.lang.annotation.Target;
|
|||||||
/**
|
/**
|
||||||
* Use this annotation on a class in your Mod to have it instantiated during the
|
* Use this annotation on a class in your Mod to have it instantiated during the
|
||||||
* initialization phase of Applied Energistics.
|
* initialization phase of Applied Energistics.
|
||||||
*
|
* <p>
|
||||||
* The class also needs to implement {@link IAEAddon}.
|
* The class also needs to implement {@link IAEAddon}.
|
||||||
*
|
* <p>
|
||||||
* AE expects your class to have a single constructor without any parameters.
|
* AE expects your class to have a single constructor without any parameters.
|
||||||
*
|
* <p>
|
||||||
* This is the only way to get access to the public {@link IAppEngApi} instance.
|
* This is the only way to get access to the public {@link IAppEngApi} instance.
|
||||||
*/
|
*/
|
||||||
@Target(ElementType.TYPE)
|
@Target(ElementType.TYPE)
|
||||||
|
|||||||
@@ -23,26 +23,21 @@
|
|||||||
|
|
||||||
package appeng.api;
|
package appeng.api;
|
||||||
|
|
||||||
import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Every AE2 addon requiring access to {@link IAppEngApi}, needs to provide at
|
* Every AE2 addon requiring access to {@link IAppEngApi}, needs to provide at
|
||||||
* least one class implementing this interface.
|
* least one class implementing this interface.
|
||||||
*
|
* <p>
|
||||||
* Further it requires the class to be annotated with {@link AEAddon}.
|
* Further it requires the class to be annotated with {@link AEAddon}.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
public interface IAEAddon {
|
public interface IAEAddon {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This gets called once the API is successfully constructed and ready to be
|
* This gets called once the API is successfully constructed and ready to be
|
||||||
* used.
|
* used.
|
||||||
*
|
* <p>
|
||||||
* For now this happens during {@link FMLCommonSetupEvent}.
|
|
||||||
*
|
|
||||||
* Each addon is responsible to maintain a reference to {@link IAppEngApi} for
|
* Each addon is responsible to maintain a reference to {@link IAppEngApi} for
|
||||||
* future use. Otherwise there is no alternative to access it later.
|
* future use. Otherwise there is no alternative to access it later.
|
||||||
*
|
*
|
||||||
* @param api The API instance when ready.
|
* @param api The API instance when ready.
|
||||||
*/
|
*/
|
||||||
void onAPIAvailable(IAppEngApi api);
|
void onAPIAvailable(IAppEngApi api);
|
||||||
|
|||||||
@@ -28,9 +28,8 @@ import java.util.Map;
|
|||||||
import javax.annotation.Nonnull;
|
import javax.annotation.Nonnull;
|
||||||
import javax.annotation.Nullable;
|
import javax.annotation.Nullable;
|
||||||
|
|
||||||
import net.minecraft.client.renderer.model.ModelBakery;
|
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.Identifier;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A registry for 3D models used to render storage cells in the world, when they
|
* A registry for 3D models used to render storage cells in the world, when they
|
||||||
@@ -40,49 +39,51 @@ public interface ICellModelRegistry {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Register a new model for a storage cell item.
|
* Register a new model for a storage cell item.
|
||||||
*
|
*
|
||||||
* <p>
|
* <p>
|
||||||
* You are responsible for ensuring that the given model is actually loaded by
|
* You are responsible for ensuring that the given model is actually loaded by
|
||||||
* the game. See
|
* the game. See
|
||||||
* {@see net.minecraftforge.client.model.ModelLoader#addSpecialModel}.
|
* {@see net.minecraftforge.client.model.ModelLoader#addSpecialModel}.
|
||||||
*
|
* <p>
|
||||||
* This method only maps an {@link Item} to a {@link ResourceLocation} which can
|
* This method only maps an {@link Item} to a {@link Identifier} which can be
|
||||||
* be looked up from the {@link ModelBakery}. No validation about missing models
|
* looked up from the
|
||||||
* will be done.
|
* {@link net.minecraft.client.render.model.BakedModelManager}. No validation
|
||||||
*
|
* about missing models will be done.
|
||||||
|
* <p>
|
||||||
* Will throw an exception in case a model is already registered for an item.
|
* Will throw an exception in case a model is already registered for an item.
|
||||||
*
|
* <p>
|
||||||
* For examples look at our cell part models within the drive model directory.
|
* For examples look at our cell part models within the drive model directory.
|
||||||
*
|
*
|
||||||
* @param item The cell item
|
* @param item The cell item
|
||||||
* @param model The {@link ResourceLocation} representing the model.
|
* @param model The {@link net.minecraft.util.Identifier} representing the
|
||||||
|
* model.
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
void registerModel(@Nonnull Item item, @Nonnull ResourceLocation model);
|
void registerModel(@Nonnull Item item, @Nonnull Identifier model);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The {@link ResourceLocation} of the model used to render the given storage
|
* The {@link Identifier} of the model used to render the given storage cell
|
||||||
* cell {@link Item} when inserted into a drive or similar.
|
* {@link Item} when inserted into a drive or similar.
|
||||||
*
|
*
|
||||||
* @param item
|
* @param item
|
||||||
* @return null, if no model is registered.
|
* @return null, if no model is registered.
|
||||||
*/
|
*/
|
||||||
@Nullable
|
@Nullable
|
||||||
ResourceLocation model(@Nonnull Item item);
|
Identifier model(@Nonnull Item item);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An unmodifiable map of all registered mappings.
|
* An unmodifiable map of all registered mappings.
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Nonnull
|
@Nonnull
|
||||||
Map<Item, ResourceLocation> models();
|
Map<Item, Identifier> models();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the default model, which can be used when no explicit model is
|
* Returns the default model, which can be used when no explicit model is
|
||||||
* registered.
|
* registered.
|
||||||
*/
|
*/
|
||||||
@Nonnull
|
@Nonnull
|
||||||
ResourceLocation getDefaultModel();
|
Identifier getDefaultModel();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ package appeng.api.client;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import net.minecraft.util.text.ITextComponent;
|
import net.minecraft.text.Text;
|
||||||
|
|
||||||
import appeng.api.storage.cells.ICellInventoryHandler;
|
import appeng.api.storage.cells.ICellInventoryHandler;
|
||||||
import appeng.api.storage.data.IAEStack;
|
import appeng.api.storage.data.IAEStack;
|
||||||
@@ -37,11 +37,11 @@ public interface IClientHelper {
|
|||||||
* @param handler Cell handler.
|
* @param handler Cell handler.
|
||||||
* @param lines List of lines to add to.
|
* @param lines List of lines to add to.
|
||||||
*/
|
*/
|
||||||
<T extends IAEStack<T>> void addCellInformation(ICellInventoryHandler<T> handler, List<ITextComponent> lines);
|
<T extends IAEStack<T>> void addCellInformation(ICellInventoryHandler<T> handler, List<Text> lines);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A helper to work with clientside related tasks for cells.
|
* A helper to work with clientside related tasks for cells.
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
ICellModelRegistry cells();
|
ICellModelRegistry cells();
|
||||||
|
|||||||
@@ -23,26 +23,15 @@
|
|||||||
|
|
||||||
package appeng.api.config;
|
package appeng.api.config;
|
||||||
|
|
||||||
import net.minecraftforge.fluids.capability.IFluidHandler.FluidAction;
|
|
||||||
|
|
||||||
public enum Actionable {
|
public enum Actionable {
|
||||||
/**
|
/**
|
||||||
* Perform the intended action.
|
* Perform the intended action.
|
||||||
*/
|
*/
|
||||||
MODULATE(FluidAction.EXECUTE),
|
MODULATE,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Pretend to perform the action.
|
* Pretend to perform the action.
|
||||||
*/
|
*/
|
||||||
SIMULATE(FluidAction.SIMULATE);
|
SIMULATE
|
||||||
|
|
||||||
private final FluidAction fluidAction;
|
|
||||||
|
|
||||||
Actionable(FluidAction fluidAction) {
|
|
||||||
this.fluidAction = fluidAction;
|
|
||||||
}
|
|
||||||
|
|
||||||
public FluidAction getFluidAction() {
|
|
||||||
return fluidAction;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,46 +23,55 @@
|
|||||||
|
|
||||||
package appeng.api.config;
|
package appeng.api.config;
|
||||||
|
|
||||||
import net.minecraft.util.text.ITextComponent;
|
import net.minecraft.text.Text;
|
||||||
import net.minecraft.util.text.TranslationTextComponent;
|
import net.minecraft.text.TranslatableText;
|
||||||
|
|
||||||
public enum PowerUnits {
|
public enum PowerUnits {
|
||||||
AE("gui.appliedenergistics2.units.appliedenergstics"), // Native Units - AE Energy
|
AE("gui.appliedenergistics2.units.appliedenergstics", "AE"), // Native Units - AE Energy
|
||||||
EU("gui.appliedenergistics2.units.ic2"), // IndustrialCraft 2 - Energy Units
|
EU("gui.appliedenergistics2.units.ic2", "EU"), // IndustrialCraft 2 - Energy Units
|
||||||
RF("gui.appliedenergistics2.units.rf"); // RF - Redstone Flux
|
TR("gui.appliedenergistics2.units.tr", "E"); // TR - TechReborn energy
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* unlocalized name for the power unit.
|
* unlocalized name for the power unit.
|
||||||
*/
|
*/
|
||||||
public final String unlocalizedName;
|
public final String unlocalizedName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* unlocalized name for the power unit's symbol used to display values.
|
||||||
|
*/
|
||||||
|
public final String symbolName;
|
||||||
/**
|
/**
|
||||||
* please do not edit this value, it is set when AE loads its config files.
|
* please do not edit this value, it is set when AE loads its config files.
|
||||||
*/
|
*/
|
||||||
public double conversionRatio = 1.0;
|
public double conversionRatio = 1.0;
|
||||||
|
|
||||||
PowerUnits(final String un) {
|
PowerUnits(final String un, String symbolName) {
|
||||||
this.unlocalizedName = un;
|
this.unlocalizedName = un;
|
||||||
|
this.symbolName = symbolName;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* do power conversion using AE's conversion rates.
|
* do power conversion using AE's conversion rates.
|
||||||
*
|
* <p>
|
||||||
* Example: PowerUnits.EU.convertTo( PowerUnits.AE, 32 );
|
* Example: PowerUnits.EU.convertTo( PowerUnits.AE, 32 );
|
||||||
*
|
* <p>
|
||||||
* will normally returns 64, as it will convert the EU, to AE with AE's power
|
* will normally returns 64, as it will convert the EU, to AE with AE's power
|
||||||
* settings.
|
* settings.
|
||||||
*
|
*
|
||||||
* @param target target power unit
|
* @param target target power unit
|
||||||
* @param value value
|
* @param value value
|
||||||
*
|
|
||||||
* @return value converted to target units, from this units.
|
* @return value converted to target units, from this units.
|
||||||
*/
|
*/
|
||||||
public double convertTo(final PowerUnits target, final double value) {
|
public double convertTo(final PowerUnits target, final double value) {
|
||||||
return (value * this.conversionRatio) / target.conversionRatio;
|
return (value * this.conversionRatio) / target.conversionRatio;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ITextComponent textComponent() {
|
public Text textComponent() {
|
||||||
return new TranslationTextComponent(unlocalizedName);
|
return new TranslatableText(unlocalizedName);
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSymbolName() {
|
||||||
|
return symbolName;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -25,6 +25,9 @@ package appeng.api.config;
|
|||||||
|
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
|
|
||||||
|
import net.minecraft.text.Text;
|
||||||
|
import net.minecraft.text.TranslatableText;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represent the security systems basic permissions, these are not for
|
* Represent the security systems basic permissions, these are not for
|
||||||
* anti-griefing, they are part of the mod as a gameplay feature.
|
* anti-griefing, they are part of the mod as a gameplay feature.
|
||||||
@@ -66,7 +69,16 @@ public enum SecurityPermissions {
|
|||||||
return this.translationKey + ".name";
|
return this.translationKey + ".name";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Text nameText() {
|
||||||
|
return new TranslatableText(getTranslatedName());
|
||||||
|
}
|
||||||
|
|
||||||
public String getTranslatedTip() {
|
public String getTranslatedTip() {
|
||||||
return this.translationKey + ".tip";
|
return this.translationKey + ".tip";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Text tooltipText() {
|
||||||
|
return new TranslatableText(getTranslatedTip());
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ public enum Settings {
|
|||||||
|
|
||||||
CONDENSER_OUTPUT(EnumSet.allOf(CondenserOutput.class)),
|
CONDENSER_OUTPUT(EnumSet.allOf(CondenserOutput.class)),
|
||||||
|
|
||||||
POWER_UNITS(EnumSet.allOf(PowerUnits.class)),
|
POWER_UNITS(EnumSet.of(PowerUnits.AE, PowerUnits.TR)),
|
||||||
|
|
||||||
ACCESS(EnumSet.of(AccessRestriction.READ_WRITE, AccessRestriction.READ, AccessRestriction.WRITE)),
|
ACCESS(EnumSet.of(AccessRestriction.READ_WRITE, AccessRestriction.READ, AccessRestriction.WRITE)),
|
||||||
|
|
||||||
|
|||||||
@@ -25,12 +25,8 @@ package appeng.api.config;
|
|||||||
|
|
||||||
public enum TunnelType {
|
public enum TunnelType {
|
||||||
ME, // Network Tunnel
|
ME, // Network Tunnel
|
||||||
IC2_POWER, // EU Tunnel
|
|
||||||
FE_POWER, // Forge Energy tunnel
|
|
||||||
REDSTONE, // Redstone Tunnel
|
REDSTONE, // Redstone Tunnel
|
||||||
FLUID, // Fluid Tunnel
|
FLUID, // Fluid Tunnel
|
||||||
ITEM, // Item Tunnel
|
ITEM, // Item Tunnel
|
||||||
LIGHT, // Light Tunnel
|
LIGHT, // Light Tunnel
|
||||||
BUNDLED_REDSTONE, // Bundled Redstone Tunnel
|
|
||||||
COMPUTER_MESSAGE // Computer Message Tunnel
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,12 +33,14 @@ import javax.annotation.Nullable;
|
|||||||
|
|
||||||
import com.google.common.base.Preconditions;
|
import com.google.common.base.Preconditions;
|
||||||
|
|
||||||
|
import net.fabricmc.api.EnvType;
|
||||||
|
import net.fabricmc.api.Environment;
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.item.BlockItem;
|
import net.minecraft.item.BlockItem;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.util.IItemProvider;
|
import net.minecraft.item.ItemConvertible;
|
||||||
import net.minecraft.util.text.ITextComponent;
|
import net.minecraft.text.Text;
|
||||||
import net.minecraft.util.text.TranslationTextComponent;
|
import net.minecraft.text.TranslatableText;
|
||||||
|
|
||||||
public enum Upgrades {
|
public enum Upgrades {
|
||||||
/**
|
/**
|
||||||
@@ -53,7 +55,7 @@ public enum Upgrades {
|
|||||||
|
|
||||||
private final int tier;
|
private final int tier;
|
||||||
private final List<Supported> supported = new ArrayList<>();
|
private final List<Supported> supported = new ArrayList<>();
|
||||||
private List<ITextComponent> supportedTooltipLines;
|
private List<Text> supportedTooltipLines;
|
||||||
|
|
||||||
Upgrades(final int tier) {
|
Upgrades(final int tier) {
|
||||||
this.tier = tier;
|
this.tier = tier;
|
||||||
@@ -67,7 +69,7 @@ public enum Upgrades {
|
|||||||
return this.supported;
|
return this.supported;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void registerItem(final IItemProvider item, final int maxSupported) {
|
public void registerItem(final ItemConvertible item, final int maxSupported) {
|
||||||
this.registerItem(item, maxSupported, null);
|
this.registerItem(item, maxSupported, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -81,23 +83,24 @@ public enum Upgrades {
|
|||||||
* the items have different maxSupported values, the highest
|
* the items have different maxSupported values, the highest
|
||||||
* will be shown.
|
* will be shown.
|
||||||
*/
|
*/
|
||||||
public void registerItem(final IItemProvider item, final int maxSupported, @Nullable String tooltipGroup) {
|
public void registerItem(final ItemConvertible item, final int maxSupported, @Nullable String tooltipGroup) {
|
||||||
Preconditions.checkNotNull(item);
|
Preconditions.checkNotNull(item);
|
||||||
this.supported.add(new Supported(item.asItem(), maxSupported, tooltipGroup));
|
this.supported.add(new Supported(item.asItem(), maxSupported, tooltipGroup));
|
||||||
supportedTooltipLines = null; // Reset tooltip
|
supportedTooltipLines = null; // Reset tooltip
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<ITextComponent> getTooltipLines() {
|
@Environment(EnvType.CLIENT)
|
||||||
|
public List<Text> getTooltipLines() {
|
||||||
if (supportedTooltipLines == null) {
|
if (supportedTooltipLines == null) {
|
||||||
supported.sort(Comparator.comparingInt(o -> o.maxCount));
|
supported.sort(Comparator.comparingInt(o -> o.maxCount));
|
||||||
supportedTooltipLines = new ArrayList<>(supported.size());
|
supportedTooltipLines = new ArrayList<>(supported.size());
|
||||||
|
|
||||||
// Use a separate set because the final text will include numbers
|
// Use a separate set because the final text will include numbers
|
||||||
Set<ITextComponent> namesAdded = new HashSet<>();
|
Set<Text> namesAdded = new HashSet<>();
|
||||||
|
|
||||||
for (int i = 0; i < supported.size(); i++) {
|
for (int i = 0; i < supported.size(); i++) {
|
||||||
Supported supported = this.supported.get(i);
|
Supported supported = this.supported.get(i);
|
||||||
ITextComponent name = supported.item.getName();
|
Text name = supported.item.getName();
|
||||||
|
|
||||||
// If the group was already added by a previous item, skip this
|
// If the group was already added by a previous item, skip this
|
||||||
if (supported.getTooltipGroup() != null && namesAdded.contains(supported.getTooltipGroup())) {
|
if (supported.getTooltipGroup() != null && namesAdded.contains(supported.getTooltipGroup())) {
|
||||||
@@ -108,7 +111,7 @@ public enum Upgrades {
|
|||||||
// instead
|
// instead
|
||||||
if (supported.getTooltipGroup() != null) {
|
if (supported.getTooltipGroup() != null) {
|
||||||
for (int j = i + 1; j < this.supported.size(); j++) {
|
for (int j = i + 1; j < this.supported.size(); j++) {
|
||||||
ITextComponent otherGroup = this.supported.get(j).getTooltipGroup();
|
Text otherGroup = this.supported.get(j).getTooltipGroup();
|
||||||
if (supported.getTooltipGroup().equals(otherGroup)) {
|
if (supported.getTooltipGroup().equals(otherGroup)) {
|
||||||
name = supported.getTooltipGroup();
|
name = supported.getTooltipGroup();
|
||||||
break;
|
break;
|
||||||
@@ -119,7 +122,7 @@ public enum Upgrades {
|
|||||||
if (namesAdded.add(name)) {
|
if (namesAdded.add(name)) {
|
||||||
// append the supported count only if its > 1
|
// append the supported count only if its > 1
|
||||||
if (supported.maxCount > 1) {
|
if (supported.maxCount > 1) {
|
||||||
name = name.deepCopy().appendString(" (" + supported.maxCount + ")");
|
name = name.copy().append(" (" + supported.maxCount + ")");
|
||||||
}
|
}
|
||||||
supportedTooltipLines.add(name);
|
supportedTooltipLines.add(name);
|
||||||
}
|
}
|
||||||
@@ -143,8 +146,8 @@ public enum Upgrades {
|
|||||||
|
|
||||||
public Supported(Item item, int maxCount, @Nullable String tooltipGroup) {
|
public Supported(Item item, int maxCount, @Nullable String tooltipGroup) {
|
||||||
this.item = item;
|
this.item = item;
|
||||||
if (item.getItem() instanceof BlockItem) {
|
if (item instanceof BlockItem) {
|
||||||
this.block = ((BlockItem) item.getItem()).getBlock();
|
this.block = ((BlockItem) item).getBlock();
|
||||||
} else {
|
} else {
|
||||||
this.block = null;
|
this.block = null;
|
||||||
}
|
}
|
||||||
@@ -164,8 +167,8 @@ public enum Upgrades {
|
|||||||
return item != null && this.item == item;
|
return item != null && this.item == item;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ITextComponent getTooltipGroup() {
|
public Text getTooltipGroup() {
|
||||||
return this.tooltipGroup != null ? new TranslationTextComponent(this.tooltipGroup) : null;
|
return this.tooltipGroup != null ? new TranslatableText(this.tooltipGroup) : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ import javax.annotation.Nonnull;
|
|||||||
import javax.annotation.Nullable;
|
import javax.annotation.Nullable;
|
||||||
|
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.item.crafting.ICraftingRecipe;
|
import net.minecraft.recipe.CraftingRecipe;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
import appeng.api.networking.crafting.ICraftingPatternDetails;
|
import appeng.api.networking.crafting.ICraftingPatternDetails;
|
||||||
@@ -53,10 +53,10 @@ public interface ICraftingHelper {
|
|||||||
* @param stack If null, a new item will be created to hold the encoded pattern.
|
* @param stack If null, a new item will be created to hold the encoded pattern.
|
||||||
* Otherwise the given item must already contains an encoded
|
* Otherwise the given item must already contains an encoded
|
||||||
* pattern that will be overwritten.
|
* pattern that will be overwritten.
|
||||||
* @throws IllegalArgumentException If either in or out contain only empty
|
|
||||||
* ItemStacks.
|
|
||||||
* @return A new encoded pattern, or the given stack with the pattern encoded in
|
* @return A new encoded pattern, or the given stack with the pattern encoded in
|
||||||
* it.
|
* it.
|
||||||
|
* @throws IllegalArgumentException If either in or out contain only empty
|
||||||
|
* ItemStacks.
|
||||||
*/
|
*/
|
||||||
ItemStack encodeProcessingPattern(@Nullable ItemStack stack, ItemStack[] in, ItemStack[] out);
|
ItemStack encodeProcessingPattern(@Nullable ItemStack stack, ItemStack[] in, ItemStack[] out);
|
||||||
|
|
||||||
@@ -78,7 +78,7 @@ public interface ICraftingHelper {
|
|||||||
* @throws IllegalArgumentException If either in or out contain only empty
|
* @throws IllegalArgumentException If either in or out contain only empty
|
||||||
* ItemStacks.
|
* ItemStacks.
|
||||||
*/
|
*/
|
||||||
ItemStack encodeCraftingPattern(@Nullable ItemStack stack, ICraftingRecipe recipe, ItemStack[] in, ItemStack out,
|
ItemStack encodeCraftingPattern(@Nullable ItemStack stack, CraftingRecipe recipe, ItemStack[] in, ItemStack out,
|
||||||
boolean allowSubstitutes);
|
boolean allowSubstitutes);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -98,7 +98,7 @@ public interface ICraftingHelper {
|
|||||||
*
|
*
|
||||||
* @param itemStack pattern
|
* @param itemStack pattern
|
||||||
* @param world world used to access the
|
* @param world world used to access the
|
||||||
* {@link net.minecraft.item.crafting.RecipeManager}.
|
* {@link net.minecraft.recipe.RecipeManager}.
|
||||||
* @param autoRecovery If true, the method will try to recover from changed
|
* @param autoRecovery If true, the method will try to recover from changed
|
||||||
* recipe ids by searching the entire recipe manager for a
|
* recipe ids by searching the entire recipe manager for a
|
||||||
* recipe matching the inputs. If this is successful, the
|
* recipe matching the inputs. If this is successful, the
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ import java.util.Optional;
|
|||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.item.BlockItem;
|
import net.minecraft.item.BlockItem;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.world.IBlockReader;
|
import net.minecraft.world.BlockView;
|
||||||
|
|
||||||
public interface IBlockDefinition extends IItemDefinition {
|
public interface IBlockDefinition extends IItemDefinition {
|
||||||
/**
|
/**
|
||||||
@@ -49,8 +49,7 @@ public interface IBlockDefinition extends IItemDefinition {
|
|||||||
*
|
*
|
||||||
* @param world world of block
|
* @param world world of block
|
||||||
* @param pos location
|
* @param pos location
|
||||||
*
|
|
||||||
* @return if the block is placed in the world at the specific location.
|
* @return if the block is placed in the world at the specific location.
|
||||||
*/
|
*/
|
||||||
boolean isSameAs(IBlockReader world, BlockPos pos);
|
boolean isSameAs(BlockView world, BlockPos pos);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,7 +32,6 @@ public interface IComparableDefinition {
|
|||||||
* Compare {@link ItemStack} with this
|
* Compare {@link ItemStack} with this
|
||||||
*
|
*
|
||||||
* @param comparableStack compared item
|
* @param comparableStack compared item
|
||||||
*
|
|
||||||
* @return true if the item stack is a matching item.
|
* @return true if the item stack is a matching item.
|
||||||
*/
|
*/
|
||||||
boolean isSameAs(ItemStack comparableStack);
|
boolean isSameAs(ItemStack comparableStack);
|
||||||
|
|||||||
@@ -29,12 +29,12 @@ import java.util.Set;
|
|||||||
import javax.annotation.Nonnull;
|
import javax.annotation.Nonnull;
|
||||||
|
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
|
import net.minecraft.item.ItemConvertible;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.util.IItemProvider;
|
|
||||||
|
|
||||||
import appeng.api.features.AEFeature;
|
import appeng.api.features.AEFeature;
|
||||||
|
|
||||||
public interface IItemDefinition extends IComparableDefinition, IItemProvider {
|
public interface IItemDefinition extends IComparableDefinition, ItemConvertible {
|
||||||
/**
|
/**
|
||||||
* @return the unique name of the definition which will be used to register the
|
* @return the unique name of the definition which will be used to register the
|
||||||
* underlying structure. Will never be null
|
* underlying structure. Will never be null
|
||||||
|
|||||||
@@ -71,10 +71,6 @@ public interface IParts {
|
|||||||
|
|
||||||
IItemDefinition p2PTunnelFluids();
|
IItemDefinition p2PTunnelFluids();
|
||||||
|
|
||||||
IItemDefinition p2PTunnelEU();
|
|
||||||
|
|
||||||
IItemDefinition p2PTunnelFE();
|
|
||||||
|
|
||||||
IItemDefinition p2PTunnelLight();
|
IItemDefinition p2PTunnelLight();
|
||||||
|
|
||||||
IItemDefinition cableAnchor();
|
IItemDefinition cableAnchor();
|
||||||
|
|||||||
@@ -20,11 +20,11 @@ package appeng.api.definitions;
|
|||||||
|
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
|
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.block.entity.BlockEntity;
|
||||||
|
|
||||||
public interface ITileDefinition extends IBlockDefinition {
|
public interface ITileDefinition extends IBlockDefinition {
|
||||||
/**
|
/**
|
||||||
* @return the {@link TileEntity} Class if applicable.
|
* @return the {@link BlockEntity} Class if applicable.
|
||||||
*/
|
*/
|
||||||
Optional<? extends Class<? extends TileEntity>> maybeEntity();
|
Optional<? extends Class<? extends BlockEntity>> maybeEntity();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package appeng.api.definitions;
|
package appeng.api.definitions;
|
||||||
|
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.Identifier;
|
||||||
|
|
||||||
// Private helper class to create AE2 resource locations
|
// Private helper class to create AE2 resource locations
|
||||||
final class IdHelper {
|
final class IdHelper {
|
||||||
@@ -11,8 +11,8 @@ final class IdHelper {
|
|||||||
/**
|
/**
|
||||||
* Creates a ResourceLocation namespaced to AE2.
|
* Creates a ResourceLocation namespaced to AE2.
|
||||||
*/
|
*/
|
||||||
static ResourceLocation id(String id) {
|
static Identifier id(String id) {
|
||||||
return new ResourceLocation("appliedenergistics2", id);
|
return new Identifier("appliedenergistics2", id);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,26 +23,28 @@
|
|||||||
|
|
||||||
package appeng.api.events;
|
package appeng.api.events;
|
||||||
|
|
||||||
import net.minecraftforge.eventbus.api.Event;
|
import net.fabricmc.fabric.api.event.Event;
|
||||||
|
import net.fabricmc.fabric.api.event.EventFactory;
|
||||||
|
|
||||||
import appeng.api.features.ILocatable;
|
import appeng.api.features.ILocatable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Input Event:
|
* Input Event:
|
||||||
*
|
* <p>
|
||||||
* Used to Notify the Location Registry of objects, and their availability.
|
* Used to Notify the Location Registry of objects, and their availability.
|
||||||
*/
|
*/
|
||||||
public class LocatableEventAnnounce extends Event {
|
public interface LocatableEventAnnounce {
|
||||||
|
|
||||||
public final ILocatable target;
|
Event<LocatableEventAnnounce> EVENT = EventFactory.createArrayBacked(LocatableEventAnnounce.class,
|
||||||
public final LocatableEvent change;
|
listeners -> (ILocatable target, LocatableEvent change) -> {
|
||||||
|
for (LocatableEventAnnounce listener : listeners) {
|
||||||
|
listener.onLocatableAnnounce(target, change);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
public LocatableEventAnnounce(final ILocatable o, final LocatableEvent ev) {
|
void onLocatableAnnounce(final ILocatable target, final LocatableEvent change);
|
||||||
this.target = o;
|
|
||||||
this.change = ev;
|
|
||||||
}
|
|
||||||
|
|
||||||
public enum LocatableEvent {
|
enum LocatableEvent {
|
||||||
/**
|
/**
|
||||||
* Adds the locatable to the registry
|
* Adds the locatable to the registry
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -0,0 +1,8 @@
|
|||||||
|
package appeng.api.events;
|
||||||
|
|
||||||
|
@FunctionalInterface
|
||||||
|
public interface LocatableEventCallback {
|
||||||
|
|
||||||
|
void onLocatable(LocatableEventAnnounce.LocatableEvent evt);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -28,7 +28,7 @@ import appeng.api.networking.IGridNode;
|
|||||||
/**
|
/**
|
||||||
* Exception occurred because of an already existing connection between the two
|
* Exception occurred because of an already existing connection between the two
|
||||||
* {@link IGridNode}s
|
* {@link IGridNode}s
|
||||||
*
|
* <p>
|
||||||
* Intended to signal an internal exception and not intended to be thrown by any
|
* Intended to signal an internal exception and not intended to be thrown by any
|
||||||
* 3rd party module.
|
* 3rd party module.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -27,10 +27,10 @@ import appeng.api.networking.IGridNode;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Exception indicating a failed connection between two {@link IGridNode}s.
|
* Exception indicating a failed connection between two {@link IGridNode}s.
|
||||||
*
|
* <p>
|
||||||
* Intended to signal an internal exception and not intended to be thrown by any
|
* Intended to signal an internal exception and not intended to be thrown by any
|
||||||
* 3rd party module.
|
* 3rd party module.
|
||||||
*
|
* <p>
|
||||||
* See any subclass for a more specific reason.
|
* See any subclass for a more specific reason.
|
||||||
*
|
*
|
||||||
* @author AlgorithmX2
|
* @author AlgorithmX2
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ package appeng.api.exceptions;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Exception due to trying to connect one or more null values.
|
* Exception due to trying to connect one or more null values.
|
||||||
*
|
* <p>
|
||||||
* Intended to signal an internal exception and not intended to be thrown by any
|
* Intended to signal an internal exception and not intended to be thrown by any
|
||||||
* 3rd party module.
|
* 3rd party module.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ package appeng.api.exceptions;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Exception due to trying to connect different security realms.
|
* Exception due to trying to connect different security realms.
|
||||||
*
|
* <p>
|
||||||
* Intended to signal an internal exception and not intended to be thrown by any
|
* Intended to signal an internal exception and not intended to be thrown by any
|
||||||
* 3rd party module.
|
* 3rd party module.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -33,12 +33,12 @@ import appeng.api.implementations.items.IAEItemPowerStorage;
|
|||||||
/**
|
/**
|
||||||
* A registry to allow mapping {@link Item}s to a specific charge rate when
|
* A registry to allow mapping {@link Item}s to a specific charge rate when
|
||||||
* being placed inside a charger.
|
* being placed inside a charger.
|
||||||
*
|
* <p>
|
||||||
* The registry is used in favor of an additional method for
|
* The registry is used in favor of an additional method for
|
||||||
* {@link IAEItemPowerStorage} with a fixed value per item. This allows more
|
* {@link IAEItemPowerStorage} with a fixed value per item. This allows more
|
||||||
* flexibility for other charger like machines to choose their own values when
|
* flexibility for other charger like machines to choose their own values when
|
||||||
* needed.
|
* needed.
|
||||||
*
|
* <p>
|
||||||
* There is no guarantee that this is charged per tick, it only represents the
|
* 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
|
* value per operation. By default this is one charging operation every 10 ticks
|
||||||
* in case of an AE2 charger.
|
* in case of an AE2 charger.
|
||||||
@@ -51,7 +51,7 @@ public interface IChargerRegistry {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Fetch a charge rate for a specific item.
|
* Fetch a charge rate for a specific item.
|
||||||
*
|
* <p>
|
||||||
* The specific item does not need to have a mapping registered at all. In this
|
* 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.
|
* case it will use a default value of 160 AE.
|
||||||
*
|
*
|
||||||
@@ -63,7 +63,7 @@ public interface IChargerRegistry {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Register a custom charge rate for a specific item.
|
* Register a custom charge rate for a specific item.
|
||||||
*
|
* <p>
|
||||||
* Capped at 16000 to avoid extracting too much energy from a network for each
|
* 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
|
* 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
|
* the cap is not fixed, it can change at any time in the future should power
|
||||||
@@ -76,7 +76,7 @@ public interface IChargerRegistry {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Remove the custom rate for a specific item.
|
* Remove the custom rate for a specific item.
|
||||||
*
|
* <p>
|
||||||
* It will revert to the default value afterwards.
|
* It will revert to the default value afterwards.
|
||||||
*
|
*
|
||||||
* @param item A {@link Item} implementing {@link IAEItemPowerStorage}.
|
* @param item A {@link Item} implementing {@link IAEItemPowerStorage}.
|
||||||
|
|||||||
@@ -37,7 +37,6 @@ public interface IItemComparisonProvider {
|
|||||||
* supplied item.
|
* supplied item.
|
||||||
*
|
*
|
||||||
* @param is item
|
* @param is item
|
||||||
*
|
|
||||||
* @return IItemComparison, or null
|
* @return IItemComparison, or null
|
||||||
*/
|
*/
|
||||||
IItemComparison getComparison(ItemStack is);
|
IItemComparison getComparison(ItemStack is);
|
||||||
@@ -47,7 +46,6 @@ public interface IItemComparisonProvider {
|
|||||||
* function. )
|
* function. )
|
||||||
*
|
*
|
||||||
* @param stack item
|
* @param stack item
|
||||||
*
|
|
||||||
* @return true, if getComparison will return a valid IItemComparison Object
|
* @return true, if getComparison will return a valid IItemComparison Object
|
||||||
*/
|
*/
|
||||||
boolean canHandle(ItemStack stack);
|
boolean canHandle(ItemStack stack);
|
||||||
|
|||||||
@@ -32,7 +32,6 @@ public interface ILocatableRegistry {
|
|||||||
* Gets the {@link ILocatable} with the registered serial, if available
|
* Gets the {@link ILocatable} with the registered serial, if available
|
||||||
*
|
*
|
||||||
* @param serial serial
|
* @param serial serial
|
||||||
*
|
|
||||||
* @return requestedObject, or null, if the object does not exist anymore
|
* @return requestedObject, or null, if the object does not exist anymore
|
||||||
*/
|
*/
|
||||||
ILocatable getLocatableBy(long serial);
|
ILocatable getLocatableBy(long serial);
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ package appeng.api.features;
|
|||||||
|
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.Identifier;
|
||||||
|
|
||||||
public interface IMatterCannonAmmoRegistry {
|
public interface IMatterCannonAmmoRegistry {
|
||||||
|
|
||||||
@@ -45,13 +45,12 @@ public interface IMatterCannonAmmoRegistry {
|
|||||||
* @param ammoTag item tag id
|
* @param ammoTag item tag id
|
||||||
* @param weight atomic weight
|
* @param weight atomic weight
|
||||||
*/
|
*/
|
||||||
void registerAmmoTag(ResourceLocation ammoTag, double weight);
|
void registerAmmoTag(Identifier ammoTag, double weight);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get the penetration value for a particular ammo, 0 indicates a non-ammo.
|
* get the penetration value for a particular ammo, 0 indicates a non-ammo.
|
||||||
*
|
*
|
||||||
* @param is ammo
|
* @param is ammo
|
||||||
*
|
|
||||||
* @return 0 or a valid penetration value.
|
* @return 0 or a valid penetration value.
|
||||||
*/
|
*/
|
||||||
float getPenetration(ItemStack is);
|
float getPenetration(ItemStack is);
|
||||||
|
|||||||
@@ -31,7 +31,6 @@ public interface INetworkEncodable {
|
|||||||
* Used to get the current key from the item.
|
* Used to get the current key from the item.
|
||||||
*
|
*
|
||||||
* @param item item
|
* @param item item
|
||||||
*
|
|
||||||
* @return string key of item
|
* @return string key of item
|
||||||
*/
|
*/
|
||||||
String getEncryptionKey(ItemStack item);
|
String getEncryptionKey(ItemStack item);
|
||||||
|
|||||||
@@ -27,7 +27,8 @@ import javax.annotation.Nonnull;
|
|||||||
import javax.annotation.Nullable;
|
import javax.annotation.Nullable;
|
||||||
|
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraftforge.common.capabilities.Capability;
|
|
||||||
|
import alexiil.mc.lib.attributes.Attribute;
|
||||||
|
|
||||||
import appeng.api.config.TunnelType;
|
import appeng.api.config.TunnelType;
|
||||||
|
|
||||||
@@ -48,13 +49,12 @@ public interface IP2PTunnelRegistry {
|
|||||||
|
|
||||||
void addNewAttunement(@Nonnull String ModId, @Nullable TunnelType type);
|
void addNewAttunement(@Nonnull String ModId, @Nullable TunnelType type);
|
||||||
|
|
||||||
void addNewAttunement(@Nonnull Capability<?> cap, @Nullable TunnelType type);
|
void addNewAttunement(@Nonnull Attribute<?> attr, @Nullable TunnelType type);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* returns null if no attunement can be found.
|
* returns null if no attunement can be found.
|
||||||
*
|
*
|
||||||
* @param trigger attunement trigger
|
* @param trigger attunement trigger
|
||||||
*
|
|
||||||
* @return null if no attunement can be found or attunement
|
* @return null if no attunement can be found or attunement
|
||||||
*/
|
*/
|
||||||
@Nonnull
|
@Nonnull
|
||||||
|
|||||||
@@ -38,21 +38,18 @@ public interface IPlayerRegistry {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param gameProfile user game profile
|
* @param gameProfile user game profile
|
||||||
*
|
|
||||||
* @return user id of a username.
|
* @return user id of a username.
|
||||||
*/
|
*/
|
||||||
int getID(GameProfile gameProfile);
|
int getID(GameProfile gameProfile);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param player player
|
* @param player player
|
||||||
*
|
|
||||||
* @return user id of a player entity.
|
* @return user id of a player entity.
|
||||||
*/
|
*/
|
||||||
int getID(PlayerEntity player);
|
int getID(PlayerEntity player);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param playerID to be found player id
|
* @param playerID to be found player id
|
||||||
*
|
|
||||||
* @return PlayerEntity, or null if the player could not be found.
|
* @return PlayerEntity, or null if the player could not be found.
|
||||||
*/
|
*/
|
||||||
@Nullable
|
@Nullable
|
||||||
|
|||||||
@@ -82,11 +82,6 @@ public interface IRegistryContainer {
|
|||||||
*/
|
*/
|
||||||
IPlayerRegistry players();
|
IPlayerRegistry players();
|
||||||
|
|
||||||
/**
|
|
||||||
* get access to the world-gen api.
|
|
||||||
*/
|
|
||||||
IWorldGen worldgen();
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Register your IPart models before using them.
|
* Register your IPart models before using them.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -35,7 +35,6 @@ public interface IWirelessTermHandler extends INetworkEncodable {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param is wireless terminal
|
* @param is wireless terminal
|
||||||
*
|
|
||||||
* @return true, if usePower, hasPower, etc... can be called for the provided
|
* @return true, if usePower, hasPower, etc... can be called for the provided
|
||||||
* item
|
* item
|
||||||
*/
|
*/
|
||||||
@@ -47,7 +46,6 @@ public interface IWirelessTermHandler extends INetworkEncodable {
|
|||||||
* @param amount is in AE units ( 5 per MJ ), if you return false, the item
|
* @param amount is in AE units ( 5 per MJ ), if you return false, the item
|
||||||
* should be dead and return false for hasPower
|
* should be dead and return false for hasPower
|
||||||
* @param is wireless terminal
|
* @param is wireless terminal
|
||||||
*
|
|
||||||
* @return true if wireless terminal uses power
|
* @return true if wireless terminal uses power
|
||||||
*/
|
*/
|
||||||
boolean usePower(PlayerEntity player, double amount, ItemStack is);
|
boolean usePower(PlayerEntity player, double amount, ItemStack is);
|
||||||
@@ -56,7 +54,6 @@ public interface IWirelessTermHandler extends INetworkEncodable {
|
|||||||
* gets the power status of the item.
|
* gets the power status of the item.
|
||||||
*
|
*
|
||||||
* @param is wireless terminal
|
* @param is wireless terminal
|
||||||
*
|
|
||||||
* @return returns true if there is any power left.
|
* @return returns true if there is any power left.
|
||||||
*/
|
*/
|
||||||
boolean hasPower(PlayerEntity player, double amount, ItemStack is);
|
boolean hasPower(PlayerEntity player, double amount, ItemStack is);
|
||||||
@@ -65,7 +62,6 @@ public interface IWirelessTermHandler extends INetworkEncodable {
|
|||||||
* Return the config manager for the wireless terminal.
|
* Return the config manager for the wireless terminal.
|
||||||
*
|
*
|
||||||
* @param is wireless terminal
|
* @param is wireless terminal
|
||||||
*
|
|
||||||
* @return config manager of wireless terminal
|
* @return config manager of wireless terminal
|
||||||
*/
|
*/
|
||||||
IConfigManager getConfigManager(ItemStack is);
|
IConfigManager getConfigManager(ItemStack is);
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ package appeng.api.features;
|
|||||||
import net.minecraft.entity.player.PlayerEntity;
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.util.Hand;
|
import net.minecraft.util.Hand;
|
||||||
import net.minecraft.world.IBlockReader;
|
import net.minecraft.world.BlockView;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Registration record for a Custom Cell handler.
|
* Registration record for a Custom Cell handler.
|
||||||
@@ -42,7 +42,6 @@ public interface IWirelessTermRegistry {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param is item which might have a handler
|
* @param is item which might have a handler
|
||||||
*
|
|
||||||
* @return true if there is a handler for this item
|
* @return true if there is a handler for this item
|
||||||
*/
|
*/
|
||||||
boolean isWirelessTerminal(ItemStack is);
|
boolean isWirelessTerminal(ItemStack is);
|
||||||
@@ -58,5 +57,5 @@ public interface IWirelessTermRegistry {
|
|||||||
* opens the wireless terminal gui, the wireless terminal item, must be in the
|
* opens the wireless terminal gui, the wireless terminal item, must be in the
|
||||||
* active slot on the tool bar.
|
* active slot on the tool bar.
|
||||||
*/
|
*/
|
||||||
void openWirelessTerminalGui(ItemStack item, IBlockReader world, PlayerEntity player, Hand hand);
|
void openWirelessTerminalGui(ItemStack item, BlockView world, PlayerEntity player, Hand hand);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,40 +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 net.minecraft.util.ResourceLocation;
|
|
||||||
import net.minecraft.world.server.ServerWorld;
|
|
||||||
|
|
||||||
public interface IWorldGen {
|
|
||||||
|
|
||||||
void enableWorldGenForDimension(WorldGenType type, ResourceLocation dimID);
|
|
||||||
|
|
||||||
void disableWorldGenForDimension(WorldGenType type, ResourceLocation dimID);
|
|
||||||
|
|
||||||
boolean isWorldGenEnabled(WorldGenType type, ServerWorld w);
|
|
||||||
|
|
||||||
enum WorldGenType {
|
|
||||||
CERTUS_QUARTZ, CHARGED_CERTUS_QUARTZ, METEORITES
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
package appeng.api.implementations;
|
package appeng.api.implementations;
|
||||||
|
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.block.entity.BlockEntity;
|
||||||
|
|
||||||
import appeng.api.config.Upgrades;
|
import appeng.api.config.Upgrades;
|
||||||
import appeng.api.implementations.tiles.ISegmentedInventory;
|
import appeng.api.implementations.tiles.ISegmentedInventory;
|
||||||
@@ -39,7 +39,7 @@ public interface IUpgradeableHost extends IConfigurableObject, ISegmentedInvento
|
|||||||
/**
|
/**
|
||||||
* the tile...
|
* the tile...
|
||||||
*
|
*
|
||||||
* @return tile entity
|
* @return block entity
|
||||||
*/
|
*/
|
||||||
TileEntity getTile();
|
BlockEntity getTile();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,7 +35,6 @@ import net.minecraft.world.World;
|
|||||||
*/
|
*/
|
||||||
public interface IGuiItem {
|
public interface IGuiItem {
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @param is The item used to open the container.
|
* @param is The item used to open the container.
|
||||||
* @param playerInventorySlot The slot in the player's inventory the item is in.
|
* @param playerInventorySlot The slot in the player's inventory the item is in.
|
||||||
* @param world The world the player is in.
|
* @param world The world the player is in.
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
package appeng.api.implementations.guiobjects;
|
package appeng.api.implementations.guiobjects;
|
||||||
|
|
||||||
import net.minecraftforge.items.IItemHandler;
|
import alexiil.mc.lib.attributes.item.FixedItemInv;
|
||||||
|
|
||||||
import appeng.api.networking.IGridHost;
|
import appeng.api.networking.IGridHost;
|
||||||
|
|
||||||
@@ -33,5 +33,5 @@ import appeng.api.networking.IGridHost;
|
|||||||
public interface INetworkTool extends IGuiItemObject {
|
public interface INetworkTool extends IGuiItemObject {
|
||||||
IGridHost getGridHost(); // null for most purposes.
|
IGridHost getGridHost(); // null for most purposes.
|
||||||
|
|
||||||
IItemHandler getInventory();
|
FixedItemInv getInventory();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,7 +46,6 @@ public interface IAEItemPowerStorage {
|
|||||||
* return it.
|
* return it.
|
||||||
*
|
*
|
||||||
* @param amount to be extracted power from device
|
* @param amount to be extracted power from device
|
||||||
*
|
|
||||||
* @return what it could extract
|
* @return what it could extract
|
||||||
*/
|
*/
|
||||||
double extractAEPower(ItemStack stack, double amount, Actionable mode);
|
double extractAEPower(ItemStack stack, double amount, Actionable mode);
|
||||||
|
|||||||
@@ -38,7 +38,6 @@ public interface IAEWrench {
|
|||||||
*
|
*
|
||||||
* @param player wrenching player
|
* @param player wrenching player
|
||||||
* @param pos of block.
|
* @param pos of block.
|
||||||
*
|
|
||||||
* @return true if wrench can be used
|
* @return true if wrench can be used
|
||||||
*/
|
*/
|
||||||
boolean canWrench(ItemStack wrench, PlayerEntity player, BlockPos pos);
|
boolean canWrench(ItemStack wrench, PlayerEntity player, BlockPos pos);
|
||||||
|
|||||||
@@ -48,7 +48,6 @@ public interface IBiometricCard {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param itemStack card
|
* @param itemStack card
|
||||||
*
|
|
||||||
* @return the full list of permissions encoded on the card.
|
* @return the full list of permissions encoded on the card.
|
||||||
*/
|
*/
|
||||||
EnumSet<SecurityPermissions> getPermissions(ItemStack itemStack);
|
EnumSet<SecurityPermissions> getPermissions(ItemStack itemStack);
|
||||||
@@ -57,7 +56,6 @@ public interface IBiometricCard {
|
|||||||
* Check if a permission is encoded on the card.
|
* Check if a permission is encoded on the card.
|
||||||
*
|
*
|
||||||
* @param permission card
|
* @param permission card
|
||||||
*
|
|
||||||
* @return true if this permission is set on the card.
|
* @return true if this permission is set on the card.
|
||||||
*/
|
*/
|
||||||
boolean hasPermission(ItemStack is, SecurityPermissions permission);
|
boolean hasPermission(ItemStack is, SecurityPermissions permission);
|
||||||
|
|||||||
@@ -25,13 +25,13 @@ package appeng.api.implementations.items;
|
|||||||
|
|
||||||
import net.minecraft.entity.player.PlayerEntity;
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.nbt.CompoundNBT;
|
import net.minecraft.nbt.CompoundTag;
|
||||||
|
|
||||||
import appeng.api.util.AEColor;
|
import appeng.api.util.AEColor;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Memory Card API
|
* Memory Card API
|
||||||
*
|
* <p>
|
||||||
* AE's Memory Card Item Class implements this interface.
|
* AE's Memory Card Item Class implements this interface.
|
||||||
*/
|
*/
|
||||||
public interface IMemoryCard {
|
public interface IMemoryCard {
|
||||||
@@ -39,21 +39,21 @@ public interface IMemoryCard {
|
|||||||
/**
|
/**
|
||||||
* Configures the data stored on the memory card, the SettingsName, will be
|
* Configures the data stored on the memory card, the SettingsName, will be
|
||||||
* localized when displayed.
|
* localized when displayed.
|
||||||
*
|
* <p>
|
||||||
* The data can contain an optional string with the key "tooltip", which will be
|
* 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.
|
* used as unlocalized string to display it after the settings name.
|
||||||
*
|
* <p>
|
||||||
* The data can contain an optional intArray using "colorCode" to be displayed
|
* 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
|
* 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
|
* ordinal of the matching {@link AEColor}. The first 4 values represent the top
|
||||||
* row, left to right. The second 4 the bottom row.
|
* row, left to right. The second 4 the bottom row.
|
||||||
*
|
*
|
||||||
* @param is item
|
* @param is item
|
||||||
* @param settingsName unlocalized string that represents the tile entity.
|
* @param settingsName unlocalized string that represents the block entity.
|
||||||
* @param data the NBT tag, refer to the normal comment for special
|
* @param data the NBT tag, refer to the normal comment for special
|
||||||
* keys.
|
* keys.
|
||||||
*/
|
*/
|
||||||
void setMemoryCardContents(ItemStack is, String settingsName, CompoundNBT data);
|
void setMemoryCardContents(ItemStack is, String settingsName, CompoundTag data);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* returns the settings name provided by a previous call to
|
* returns the settings name provided by a previous call to
|
||||||
@@ -61,27 +61,24 @@ public interface IMemoryCard {
|
|||||||
* call to setMemoryCardContents.
|
* call to setMemoryCardContents.
|
||||||
*
|
*
|
||||||
* @param is item
|
* @param is item
|
||||||
*
|
|
||||||
* @return setting name
|
* @return setting name
|
||||||
*/
|
*/
|
||||||
String getSettingsName(ItemStack is);
|
String getSettingsName(ItemStack is);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param is item
|
* @param is item
|
||||||
*
|
|
||||||
* @return the NBT Data previously saved by setMemoryCardContents, or an empty
|
* @return the NBT Data previously saved by setMemoryCardContents, or an empty
|
||||||
* NBTCompound
|
* NBTCompound
|
||||||
*/
|
*/
|
||||||
CompoundNBT getData(ItemStack is);
|
CompoundTag getData(ItemStack is);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This represent as 4x2 grid of {@link AEColor} without transparent/fluix
|
* This represent as 4x2 grid of {@link AEColor} without transparent/fluix
|
||||||
* color.
|
* color.
|
||||||
*
|
* <p>
|
||||||
* First 4 colors are used for the top row, second for the bottom one.
|
* First 4 colors are used for the top row, second for the bottom one.
|
||||||
*
|
*
|
||||||
* @param is item
|
* @param is item
|
||||||
*
|
|
||||||
* @return a hash representation of the memory card content
|
* @return a hash representation of the memory card content
|
||||||
*/
|
*/
|
||||||
AEColor[] getColorCode(ItemStack is);
|
AEColor[] getColorCode(ItemStack is);
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ package appeng.api.implementations.items;
|
|||||||
|
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.world.server.ServerWorld;
|
import net.minecraft.server.world.ServerWorld;
|
||||||
|
|
||||||
import appeng.api.util.WorldCoord;
|
import appeng.api.util.WorldCoord;
|
||||||
|
|
||||||
@@ -36,14 +36,12 @@ public interface ISpatialStorageCell {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param is spatial storage cell
|
* @param is spatial storage cell
|
||||||
*
|
|
||||||
* @return true if this item is a spatial storage cell
|
* @return true if this item is a spatial storage cell
|
||||||
*/
|
*/
|
||||||
boolean isSpatialStorage(ItemStack is);
|
boolean isSpatialStorage(ItemStack is);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param is spatial storage cell
|
* @param is spatial storage cell
|
||||||
*
|
|
||||||
* @return the maximum size of the spatial storage cell along any given axis
|
* @return the maximum size of the spatial storage cell along any given axis
|
||||||
*/
|
*/
|
||||||
int getMaxStoredDim(ItemStack is);
|
int getMaxStoredDim(ItemStack is);
|
||||||
@@ -52,7 +50,6 @@ public interface ISpatialStorageCell {
|
|||||||
* get the currently stored spatial storage plot id.
|
* get the currently stored spatial storage plot id.
|
||||||
*
|
*
|
||||||
* @param is spatial storage cell
|
* @param is spatial storage cell
|
||||||
*
|
|
||||||
* @return plot id or -1
|
* @return plot id or -1
|
||||||
*/
|
*/
|
||||||
int getAllocatedPlotId(ItemStack is);
|
int getAllocatedPlotId(ItemStack is);
|
||||||
@@ -65,7 +62,6 @@ public interface ISpatialStorageCell {
|
|||||||
* @param min min coord
|
* @param min min coord
|
||||||
* @param max max coord
|
* @param max max coord
|
||||||
* @param playerId owner of current grid or -1
|
* @param playerId owner of current grid or -1
|
||||||
*
|
|
||||||
* @return success of transition
|
* @return success of transition
|
||||||
*/
|
*/
|
||||||
boolean doSpatialTransition(ItemStack is, ServerWorld w, WorldCoord min, WorldCoord max, int playerId);
|
boolean doSpatialTransition(ItemStack is, ServerWorld w, WorldCoord min, WorldCoord max, int playerId);
|
||||||
|
|||||||
@@ -38,14 +38,14 @@ import appeng.api.storage.data.IAEStack;
|
|||||||
* {@link ICellHandler#getCellInventory(ItemStack, appeng.api.storage.cells.ISaveProvider, IStorageChannel)}
|
* {@link ICellHandler#getCellInventory(ItemStack, appeng.api.storage.cells.ISaveProvider, IStorageChannel)}
|
||||||
* or {@link ICellHandler#isCell(ItemStack)}. It automatically handles the
|
* or {@link ICellHandler#isCell(ItemStack)}. It automatically handles the
|
||||||
* internals and NBT data, which is both nice, and bad for you!
|
* internals and NBT data, which is both nice, and bad for you!
|
||||||
*
|
* <p>
|
||||||
* Good cause it means you don't have to do anything, bad because you have
|
* Good cause it means you don't have to do anything, bad because you have
|
||||||
* little to no control over it.
|
* little to no control over it.
|
||||||
*
|
* <p>
|
||||||
* Limited to {@link Integer} internally for most calculations. E.g. if the used
|
* Limited to {@link Integer} internally for most calculations. E.g. if the used
|
||||||
* or remaining bytes would overflow {@link Integer#MAX_VALUE} the behaviour is
|
* or remaining bytes would overflow {@link Integer#MAX_VALUE} the behaviour is
|
||||||
* no longer specified. Even if {@link ICellInventory} is using {@link Long}.
|
* no longer specified. Even if {@link ICellInventory} is using {@link Long}.
|
||||||
*
|
* <p>
|
||||||
* The standard AE implementation also only provides 1-63 Types.
|
* The standard AE implementation also only provides 1-63 Types.
|
||||||
*/
|
*/
|
||||||
public interface IStorageCell<T extends IAEStack<T>> extends ICellWorkbenchItem {
|
public interface IStorageCell<T extends IAEStack<T>> extends ICellWorkbenchItem {
|
||||||
@@ -55,7 +55,6 @@ public interface IStorageCell<T extends IAEStack<T>> extends ICellWorkbenchItem
|
|||||||
* ({@link Integer#MAX_VALUE} + 1) / 8.
|
* ({@link Integer#MAX_VALUE} + 1) / 8.
|
||||||
*
|
*
|
||||||
* @param cellItem item
|
* @param cellItem item
|
||||||
*
|
|
||||||
* @return number of bytes
|
* @return number of bytes
|
||||||
*/
|
*/
|
||||||
int getBytes(@Nonnull ItemStack cellItem);
|
int getBytes(@Nonnull ItemStack cellItem);
|
||||||
@@ -64,7 +63,6 @@ public interface IStorageCell<T extends IAEStack<T>> extends ICellWorkbenchItem
|
|||||||
* Determines the number of bytes used for any type included on the cell.
|
* Determines the number of bytes used for any type included on the cell.
|
||||||
*
|
*
|
||||||
* @param cellItem item
|
* @param cellItem item
|
||||||
*
|
|
||||||
* @return number of bytes
|
* @return number of bytes
|
||||||
*/
|
*/
|
||||||
int getBytesPerType(@Nonnull ItemStack cellItem);
|
int getBytesPerType(@Nonnull ItemStack cellItem);
|
||||||
@@ -74,7 +72,6 @@ public interface IStorageCell<T extends IAEStack<T>> extends ICellWorkbenchItem
|
|||||||
* item.
|
* item.
|
||||||
*
|
*
|
||||||
* @param cellItem item
|
* @param cellItem item
|
||||||
*
|
|
||||||
* @return number of types
|
* @return number of types
|
||||||
*/
|
*/
|
||||||
int getTotalTypes(@Nonnull ItemStack cellItem);
|
int getTotalTypes(@Nonnull ItemStack cellItem);
|
||||||
@@ -86,7 +83,6 @@ public interface IStorageCell<T extends IAEStack<T>> extends ICellWorkbenchItem
|
|||||||
*
|
*
|
||||||
* @param cellItem item
|
* @param cellItem item
|
||||||
* @param requestedAddition requested addition
|
* @param requestedAddition requested addition
|
||||||
*
|
|
||||||
* @return true to preventAdditionOfItem
|
* @return true to preventAdditionOfItem
|
||||||
*/
|
*/
|
||||||
boolean isBlackListed(@Nonnull ItemStack cellItem, @Nonnull T requestedAddition);
|
boolean isBlackListed(@Nonnull ItemStack cellItem, @Nonnull T requestedAddition);
|
||||||
@@ -106,7 +102,6 @@ public interface IStorageCell<T extends IAEStack<T>> extends ICellWorkbenchItem
|
|||||||
* Allows an item to selectively enable or disable its status as a storage cell.
|
* Allows an item to selectively enable or disable its status as a storage cell.
|
||||||
*
|
*
|
||||||
* @param i item
|
* @param i item
|
||||||
*
|
|
||||||
* @return if the ItemStack should behavior as a storage cell.
|
* @return if the ItemStack should behavior as a storage cell.
|
||||||
*/
|
*/
|
||||||
boolean isStorageCell(@Nonnull ItemStack i);
|
boolean isStorageCell(@Nonnull ItemStack i);
|
||||||
|
|||||||
@@ -37,7 +37,6 @@ public interface IStorageComponent {
|
|||||||
* condenser.
|
* condenser.
|
||||||
*
|
*
|
||||||
* @param is item
|
* @param is item
|
||||||
*
|
|
||||||
* @return number of bytes
|
* @return number of bytes
|
||||||
*/
|
*/
|
||||||
int getBytes(ItemStack is);
|
int getBytes(ItemStack is);
|
||||||
@@ -46,7 +45,6 @@ public interface IStorageComponent {
|
|||||||
* Just true or false for the item stack.
|
* Just true or false for the item stack.
|
||||||
*
|
*
|
||||||
* @param is item
|
* @param is item
|
||||||
*
|
|
||||||
* @return true if item is a storage component
|
* @return true if item is a storage component
|
||||||
*/
|
*/
|
||||||
boolean isStorageComponent(ItemStack is);
|
boolean isStorageComponent(ItemStack is);
|
||||||
|
|||||||
@@ -31,7 +31,6 @@ public interface IUpgradeModule {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param itemstack item with potential upgrades
|
* @param itemstack item with potential upgrades
|
||||||
*
|
|
||||||
* @return null, or a valid upgrade type.
|
* @return null, or a valid upgrade type.
|
||||||
*/
|
*/
|
||||||
Upgrades getType(ItemStack itemstack);
|
Upgrades getType(ItemStack itemstack);
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ package appeng.api.implementations.parts;
|
|||||||
import java.util.EnumSet;
|
import java.util.EnumSet;
|
||||||
|
|
||||||
import net.minecraft.entity.player.PlayerEntity;
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
import net.minecraft.util.Direction;
|
import net.minecraft.util.math.Direction;
|
||||||
|
|
||||||
import appeng.api.networking.IGridHost;
|
import appeng.api.networking.IGridHost;
|
||||||
import appeng.api.parts.BusSupport;
|
import appeng.api.parts.BusSupport;
|
||||||
@@ -62,14 +62,13 @@ public interface ICablePart extends IPart, IGridHost {
|
|||||||
* something.
|
* something.
|
||||||
*
|
*
|
||||||
* @param newColor new color
|
* @param newColor new color
|
||||||
*
|
|
||||||
* @return if the color change was successful.
|
* @return if the color change was successful.
|
||||||
*/
|
*/
|
||||||
boolean changeColor(AEColor newColor, PlayerEntity who);
|
boolean changeColor(AEColor newColor, PlayerEntity who);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Change sides on the cables node.
|
* Change sides on the cables node.
|
||||||
*
|
* <p>
|
||||||
* Called by AE, do not invoke.
|
* Called by AE, do not invoke.
|
||||||
*
|
*
|
||||||
* @param sides sides of cable
|
* @param sides sides of cable
|
||||||
@@ -80,7 +79,6 @@ public interface ICablePart extends IPart, IGridHost {
|
|||||||
* used to tests if a cable connects to neighbors visually.
|
* used to tests if a cable connects to neighbors visually.
|
||||||
*
|
*
|
||||||
* @param side neighbor side
|
* @param side neighbor side
|
||||||
*
|
|
||||||
* @return true if this side is currently connects to an external block.
|
* @return true if this side is currently connects to an external block.
|
||||||
*/
|
*/
|
||||||
boolean isConnected(Direction side);
|
boolean isConnected(Direction side);
|
||||||
|
|||||||
@@ -41,7 +41,6 @@ public interface IChestOrDrive extends ICellContainer, IGridHost, IOrientable {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param slot slot index
|
* @param slot slot index
|
||||||
*
|
|
||||||
* @return status of the slot, one of the above indices.
|
* @return status of the slot, one of the above indices.
|
||||||
*/
|
*/
|
||||||
CellState getCellStatus(int slot);
|
CellState getCellStatus(int slot);
|
||||||
@@ -54,7 +53,6 @@ public interface IChestOrDrive extends ICellContainer, IGridHost, IOrientable {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param slot slot index
|
* @param slot slot index
|
||||||
*
|
|
||||||
* @return is the cell currently blinking to show activity.
|
* @return is the cell currently blinking to show activity.
|
||||||
*/
|
*/
|
||||||
boolean isCellBlinking(int slot);
|
boolean isCellBlinking(int slot);
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
package appeng.api.implementations.tiles;
|
package appeng.api.implementations.tiles;
|
||||||
|
|
||||||
import net.minecraft.entity.player.PlayerEntity;
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
import net.minecraft.util.Direction;
|
import net.minecraft.util.math.Direction;
|
||||||
|
|
||||||
import appeng.api.util.AEColor;
|
import appeng.api.util.AEColor;
|
||||||
|
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
package appeng.api.implementations.tiles;
|
package appeng.api.implementations.tiles;
|
||||||
|
|
||||||
import net.minecraft.inventory.CraftingInventory;
|
import net.minecraft.inventory.CraftingInventory;
|
||||||
import net.minecraft.util.Direction;
|
import net.minecraft.util.math.Direction;
|
||||||
|
|
||||||
import appeng.api.networking.crafting.ICraftingPatternDetails;
|
import appeng.api.networking.crafting.ICraftingPatternDetails;
|
||||||
|
|
||||||
@@ -36,7 +36,6 @@ public interface ICraftingMachine {
|
|||||||
* @param patternDetails details of pattern
|
* @param patternDetails details of pattern
|
||||||
* @param table crafting table
|
* @param table crafting table
|
||||||
* @param ejectionDirection ejection direction
|
* @param ejectionDirection ejection direction
|
||||||
*
|
|
||||||
* @return if it was accepted, all or nothing.
|
* @return if it was accepted, all or nothing.
|
||||||
*/
|
*/
|
||||||
boolean pushPattern(ICraftingPatternDetails patternDetails, CraftingInventory table, Direction ejectionDirection);
|
boolean pushPattern(ICraftingPatternDetails patternDetails, CraftingInventory table, Direction ejectionDirection);
|
||||||
|
|||||||
@@ -23,17 +23,17 @@
|
|||||||
|
|
||||||
package appeng.api.implementations.tiles;
|
package appeng.api.implementations.tiles;
|
||||||
|
|
||||||
import net.minecraft.util.Direction;
|
import net.minecraft.util.math.Direction;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Crank/Crankable API,
|
* Crank/Crankable API,
|
||||||
*
|
* <p>
|
||||||
* Tiles that Implement this can receive power, from the crank, and have the
|
* Tiles that Implement this can receive power, from the crank, and have the
|
||||||
* crank placed on them.
|
* crank placed on them.
|
||||||
*
|
* <p>
|
||||||
* Tiles that access other tiles that implement this method can act as Cranks.
|
* Tiles that access other tiles that implement this method can act as Cranks.
|
||||||
*
|
* <p>
|
||||||
* This interface must be implemented by a tile entity.
|
* This interface must be implemented by a block entity.
|
||||||
*/
|
*/
|
||||||
public interface ICrankable {
|
public interface ICrankable {
|
||||||
|
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
package appeng.api.implementations.tiles;
|
package appeng.api.implementations.tiles;
|
||||||
|
|
||||||
import net.minecraftforge.items.IItemHandler;
|
import alexiil.mc.lib.attributes.item.FixedItemInv;
|
||||||
|
|
||||||
public interface ISegmentedInventory {
|
public interface ISegmentedInventory {
|
||||||
|
|
||||||
@@ -33,8 +33,7 @@ public interface ISegmentedInventory {
|
|||||||
* duplication.
|
* duplication.
|
||||||
*
|
*
|
||||||
* @param name inventory name
|
* @param name inventory name
|
||||||
*
|
|
||||||
* @return inventory with inventory name
|
* @return inventory with inventory name
|
||||||
*/
|
*/
|
||||||
IItemHandler getInventoryByName(String name);
|
FixedItemInv getInventoryByName(String name);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
package appeng.api.implementations.tiles;
|
package appeng.api.implementations.tiles;
|
||||||
|
|
||||||
import net.minecraftforge.items.IItemHandler;
|
import alexiil.mc.lib.attributes.item.FixedItemInv;
|
||||||
|
|
||||||
public interface IViewCellStorage {
|
public interface IViewCellStorage {
|
||||||
|
|
||||||
@@ -32,5 +32,5 @@ public interface IViewCellStorage {
|
|||||||
*
|
*
|
||||||
* @return inventory with at least 5 slot
|
* @return inventory with at least 5 slot
|
||||||
*/
|
*/
|
||||||
IItemHandler getViewCellStorage();
|
FixedItemInv getViewCellStorage();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
package appeng.api.movable;
|
package appeng.api.movable;
|
||||||
|
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.block.entity.BlockEntity;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
@@ -33,28 +33,27 @@ public interface IMovableHandler {
|
|||||||
* if you return true from this, your saying you can handle the class, not that
|
* if you return true from this, your saying you can handle the class, not that
|
||||||
* single entity, you cannot opt out of single entities.
|
* single entity, you cannot opt out of single entities.
|
||||||
*
|
*
|
||||||
* @param myClass tile entity class
|
* @param myClass block entity class
|
||||||
* @param tile tile entity
|
* @param tile block entity
|
||||||
*
|
|
||||||
* @return true if it can handle moving
|
* @return true if it can handle moving
|
||||||
*/
|
*/
|
||||||
boolean canHandle(Class<? extends TileEntity> myClass, TileEntity tile);
|
boolean canHandle(Class<? extends BlockEntity> myClass, BlockEntity tile);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* request that the handler move the the tile from its current location to the
|
* request that the handler move the the tile from its current location to the
|
||||||
* new one. the tile has already been invalidated, and the blocks have already
|
* new one. the tile has already been invalidated, and the blocks have already
|
||||||
* been fully moved.
|
* been fully moved.
|
||||||
*
|
* <p>
|
||||||
* Potential Example:
|
* Potential Example:
|
||||||
*
|
*
|
||||||
* <pre>
|
* <pre>
|
||||||
* {
|
* {
|
||||||
* @code
|
* @code
|
||||||
* Chunk c = world.getChunkAt(x, z);
|
* Chunk c = world.getChunk(x, z);
|
||||||
* c.setChunkBlockTileEntity(x & 0xF, y + y, z & 0xF, tile);
|
* c.setChunkBlockTileEntity(x & 0xF, y + y, z & 0xF, tile);
|
||||||
*
|
*
|
||||||
* if (c.isChunkLoaded) {
|
* if (c.isChunkLoaded) {
|
||||||
* world.addTileEntity(tile);
|
* world.addBlockEntity(tile);
|
||||||
* world.markBlockForUpdate(x, y, z);
|
* world.markBlockForUpdate(x, y, z);
|
||||||
* }
|
* }
|
||||||
* }
|
* }
|
||||||
@@ -64,5 +63,5 @@ public interface IMovableHandler {
|
|||||||
* @param world world of tile
|
* @param world world of tile
|
||||||
* @param newPosition the new location
|
* @param newPosition the new location
|
||||||
*/
|
*/
|
||||||
void moveTile(TileEntity tile, World world, BlockPos newPosition);
|
void moveTile(BlockEntity tile, World world, BlockPos newPosition);
|
||||||
}
|
}
|
||||||
@@ -24,37 +24,37 @@
|
|||||||
package appeng.api.movable;
|
package appeng.api.movable;
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.block.entity.BlockEntity;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Used to determine if a tile is marked as movable, a block will be considered
|
* Used to determine if a tile is marked as movable, a block will be considered
|
||||||
* movable, if...
|
* movable, if...
|
||||||
*
|
* <p>
|
||||||
* 1. The Tile or its super classes have been white listed with
|
* 1. The Tile or its super classes have been white listed with
|
||||||
* whiteListTileEntity.
|
* whiteListTileEntity.
|
||||||
*
|
* <p>
|
||||||
* 2. The Tile implements IMovableTile
|
* 2. The Tile implements IMovableTile
|
||||||
*
|
* <p>
|
||||||
* 3. A IMovableHandler is register that returns canHandle = true for the
|
* 3. A IMovableHandler is register that returns canHandle = true for the
|
||||||
* {@link TileEntity} subclass
|
* {@link BlockEntity} subclass
|
||||||
*
|
* <p>
|
||||||
*
|
* <p>
|
||||||
* The movement process is as follows,
|
* The movement process is as follows,
|
||||||
*
|
* <p>
|
||||||
* 1. IMovableTile.prepareToMove() or TileEntity.invalidate() depending on your
|
* 1. IMovableTile.prepareToMove() or TileEntity.invalidate() depending on your
|
||||||
* opt-in method. 2. The tile will be removed from the world. 3. Its world,
|
* opt-in method. 2. The tile will be removed from the world. 3. Its world,
|
||||||
* coordinates will be changed. *** this can be overridden with a
|
* coordinates will be changed. *** this can be overridden with a
|
||||||
* IMovableHandler *** 4. It will then be re-added to the world, or a new world.
|
* IMovableHandler *** 4. It will then be re-added to the world, or a new world.
|
||||||
* 5. TileEntity.validate() 6. IMovableTile.doneMoving ( if you implemented
|
* 5. TileEntity.cancelRemoval() 6. IMovableTile.doneMoving ( if you implemented
|
||||||
* IMovableTile )
|
* IMovableTile )
|
||||||
*
|
* <p>
|
||||||
* Please note, this is a 100% white list only feature, I will never opt in any
|
* Please note, this is a 100% white list only feature, I will never opt in any
|
||||||
* non-vanilla, non-AE blocks. If you do not want to support your tiles being
|
* non-vanilla, non-AE blocks. If you do not want to support your tiles being
|
||||||
* moved, you don't have to do anything.
|
* moved, you don't have to do anything.
|
||||||
*
|
* <p>
|
||||||
* I appreciate anyone that takes the effort to get their tiles to work with
|
* I appreciate anyone that takes the effort to get their tiles to work with
|
||||||
* this system to create a better use experience.
|
* this system to create a better use experience.
|
||||||
*
|
* <p>
|
||||||
* If you need a build of deobf build of AE for testing, do not hesitate to ask.
|
* If you need a build of deobf build of AE for testing, do not hesitate to ask.
|
||||||
*/
|
*/
|
||||||
public interface IMovableRegistry {
|
public interface IMovableRegistry {
|
||||||
@@ -67,26 +67,25 @@ public interface IMovableRegistry {
|
|||||||
void blacklistBlock(Block blk);
|
void blacklistBlock(Block blk);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* White list your tile entity with the registry.
|
* White list your block entity with the registry.
|
||||||
*
|
* <p>
|
||||||
* If you tile is handled with IMovableHandler or IMovableTile you do not need
|
* If you tile is handled with IMovableHandler or IMovableTile you do not need
|
||||||
* to white list it.
|
* to white list it.
|
||||||
*/
|
*/
|
||||||
void whiteListTileEntity(Class<? extends TileEntity> c);
|
void whiteListBlockEntity(Class<? extends BlockEntity> c);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param te to be moved tile entity
|
* @param te to be moved block entity
|
||||||
*
|
|
||||||
* @return true if the tile has accepted your request to move it
|
* @return true if the tile has accepted your request to move it
|
||||||
*/
|
*/
|
||||||
boolean askToMove(TileEntity te);
|
boolean askToMove(BlockEntity te);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* tells the tile you are done moving it.
|
* tells the tile you are done moving it.
|
||||||
*
|
*
|
||||||
* @param te moved tile entity
|
* @param te moved block entity
|
||||||
*/
|
*/
|
||||||
void doneMoving(TileEntity te);
|
void doneMoving(BlockEntity te);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* add a new handler movable handler.
|
* add a new handler movable handler.
|
||||||
@@ -98,14 +97,13 @@ public interface IMovableRegistry {
|
|||||||
/**
|
/**
|
||||||
* handlers are used to perform movement, this allows you to override AE's
|
* handlers are used to perform movement, this allows you to override AE's
|
||||||
* internal version.
|
* internal version.
|
||||||
*
|
* <p>
|
||||||
* only valid after askToMove(...) = true
|
* only valid after askToMove(...) = true
|
||||||
*
|
*
|
||||||
* @param te tile entity
|
* @param te block entity
|
||||||
*
|
* @return moving handler of block entity
|
||||||
* @return moving handler of tile entity
|
|
||||||
*/
|
*/
|
||||||
IMovableHandler getHandler(TileEntity te);
|
IMovableHandler getHandler(BlockEntity te);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return a copy of the default handler
|
* @return a copy of the default handler
|
||||||
@@ -114,7 +112,6 @@ public interface IMovableRegistry {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param blk block
|
* @param blk block
|
||||||
*
|
|
||||||
* @return true if this block is blacklisted
|
* @return true if this block is blacklisted
|
||||||
*/
|
*/
|
||||||
boolean isBlacklisted(Block blk);
|
boolean isBlacklisted(Block blk);
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ import appeng.api.util.IReadOnlyCollection;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Gives you access to Grid based information.
|
* Gives you access to Grid based information.
|
||||||
*
|
* <p>
|
||||||
* Don't Implement.
|
* Don't Implement.
|
||||||
*/
|
*/
|
||||||
public interface IGrid {
|
public interface IGrid {
|
||||||
@@ -39,7 +39,6 @@ public interface IGrid {
|
|||||||
* Get Access to various grid modules
|
* Get Access to various grid modules
|
||||||
*
|
*
|
||||||
* @param iface face
|
* @param iface face
|
||||||
*
|
|
||||||
* @return the IGridCache you requested.
|
* @return the IGridCache you requested.
|
||||||
*/
|
*/
|
||||||
@Nonnull
|
@Nonnull
|
||||||
@@ -49,7 +48,6 @@ public interface IGrid {
|
|||||||
* Post an event into the network event bus.
|
* Post an event into the network event bus.
|
||||||
*
|
*
|
||||||
* @param ev - event to post
|
* @param ev - event to post
|
||||||
*
|
|
||||||
* @return returns ev back to original poster
|
* @return returns ev back to original poster
|
||||||
*/
|
*/
|
||||||
@Nonnull
|
@Nonnull
|
||||||
@@ -59,7 +57,6 @@ public interface IGrid {
|
|||||||
* Post an event into the network event bus, but direct it at a single node.
|
* Post an event into the network event bus, but direct it at a single node.
|
||||||
*
|
*
|
||||||
* @param ev event to post
|
* @param ev event to post
|
||||||
*
|
|
||||||
* @return returns ev back to original poster
|
* @return returns ev back to original poster
|
||||||
*/
|
*/
|
||||||
@Nonnull
|
@Nonnull
|
||||||
@@ -79,7 +76,6 @@ public interface IGrid {
|
|||||||
* Get machines on the network.
|
* Get machines on the network.
|
||||||
*
|
*
|
||||||
* @param gridHostClass class of the grid host
|
* @param gridHostClass class of the grid host
|
||||||
*
|
|
||||||
* @return IMachineSet of all nodes belonging to hosts of specified class.
|
* @return IMachineSet of all nodes belonging to hosts of specified class.
|
||||||
*/
|
*/
|
||||||
@Nonnull
|
@Nonnull
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ import javax.annotation.Nonnegative;
|
|||||||
import javax.annotation.Nonnull;
|
import javax.annotation.Nonnull;
|
||||||
|
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.util.Direction;
|
import net.minecraft.util.math.Direction;
|
||||||
|
|
||||||
import appeng.api.parts.IPart;
|
import appeng.api.parts.IPart;
|
||||||
import appeng.api.util.AEColor;
|
import appeng.api.util.AEColor;
|
||||||
@@ -37,14 +37,14 @@ import appeng.api.util.DimensionalCoord;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* An Implementation is required to create your node for IGridHost
|
* An Implementation is required to create your node for IGridHost
|
||||||
*
|
* <p>
|
||||||
* Implement for use with IGridHost
|
* Implement for use with IGridHost
|
||||||
*/
|
*/
|
||||||
public interface IGridBlock {
|
public interface IGridBlock {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* how much power to drain per tick as part of idle network usage.
|
* how much power to drain per tick as part of idle network usage.
|
||||||
*
|
* <p>
|
||||||
* if the value of this changes, you must post a MENetworkPowerIdleChange
|
* if the value of this changes, you must post a MENetworkPowerIdleChange
|
||||||
*
|
*
|
||||||
* @return ae/t to use.
|
* @return ae/t to use.
|
||||||
|
|||||||
@@ -26,9 +26,9 @@ package appeng.api.networking;
|
|||||||
import javax.annotation.Nonnull;
|
import javax.annotation.Nonnull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Allows you to create a network wise service, AE2 uses these for providing
|
* Allows you to create a network wide service, AE2 uses these for providing
|
||||||
* item, spatial, and tunnel services.
|
* item, spatial, and tunnel services.
|
||||||
*
|
* <p>
|
||||||
* Any Class that implements this, should have a public default constructor that
|
* Any Class that implements this, should have a public default constructor that
|
||||||
* takes a single argument of type IGrid.
|
* takes a single argument of type IGrid.
|
||||||
*/
|
*/
|
||||||
@@ -42,7 +42,7 @@ public interface IGridCache {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* inform your cache, that a machine was removed from the grid.
|
* inform your cache, that a machine was removed from the grid.
|
||||||
*
|
* <p>
|
||||||
* Important: Do not trust the grids state in this method, interact only with
|
* Important: Do not trust the grids state in this method, interact only with
|
||||||
* the node you are passed, if you need to manage other grid information, do it
|
* the node you are passed, if you need to manage other grid information, do it
|
||||||
* on the next updateTick.
|
* on the next updateTick.
|
||||||
@@ -54,7 +54,7 @@ public interface IGridCache {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* informs you cache that a machine was added to the grid.
|
* informs you cache that a machine was added to the grid.
|
||||||
*
|
* <p>
|
||||||
* Important: Do not trust the grids state in this method, interact only with
|
* Important: Do not trust the grids state in this method, interact only with
|
||||||
* the node you are passed, if you need to manage other grid information, do it
|
* the node you are passed, if you need to manage other grid information, do it
|
||||||
* on the next updateTick.
|
* on the next updateTick.
|
||||||
|
|||||||
@@ -45,7 +45,6 @@ public interface IGridCacheRegistry {
|
|||||||
* requests a new INSTANCE of a grid cache for use, used internally
|
* requests a new INSTANCE of a grid cache for use, used internally
|
||||||
*
|
*
|
||||||
* @param grid grid
|
* @param grid grid
|
||||||
*
|
|
||||||
* @return a new Map of IGridCaches from the registry, called from IGrid when
|
* @return a new Map of IGridCaches from the registry, called from IGrid when
|
||||||
* constructing a new grid.
|
* constructing a new grid.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -29,10 +29,10 @@ import appeng.api.util.AEPartLocation;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Access to AE's internal grid connections.
|
* Access to AE's internal grid connections.
|
||||||
*
|
* <p>
|
||||||
* Messing with connection is generally completely unnecessary, you should be
|
* Messing with connection is generally completely unnecessary, you should be
|
||||||
* able to just use IGridNode.updateState() to have AE manage them for you.
|
* able to just use IGridNode.updateState() to have AE manage them for you.
|
||||||
*
|
* <p>
|
||||||
* Don't Implement.
|
* Don't Implement.
|
||||||
*/
|
*/
|
||||||
public interface IGridConnection {
|
public interface IGridConnection {
|
||||||
@@ -41,7 +41,6 @@ public interface IGridConnection {
|
|||||||
* lets you get the opposing node of the connection by passing your own node.
|
* lets you get the opposing node of the connection by passing your own node.
|
||||||
*
|
*
|
||||||
* @param gridNode current grid node
|
* @param gridNode current grid node
|
||||||
*
|
|
||||||
* @return the IGridNode which represents the opposite side of the connection.
|
* @return the IGridNode which represents the opposite side of the connection.
|
||||||
*/
|
*/
|
||||||
@Nonnull
|
@Nonnull
|
||||||
@@ -51,7 +50,6 @@ public interface IGridConnection {
|
|||||||
* determine the direction of the connection based on your node.
|
* determine the direction of the connection based on your node.
|
||||||
*
|
*
|
||||||
* @param gridNode current grid node
|
* @param gridNode current grid node
|
||||||
*
|
|
||||||
* @return the direction of the connection, only valid for in world connections.
|
* @return the direction of the connection, only valid for in world connections.
|
||||||
*/
|
*/
|
||||||
@Nonnull
|
@Nonnull
|
||||||
|
|||||||
@@ -39,12 +39,11 @@ public interface IGridHelper {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a grid node for your {@link IGridHost}
|
* Create a grid node for your {@link IGridHost}
|
||||||
*
|
* <p>
|
||||||
* The passed {@link IGridBlock} represents the definition for properties like
|
* The passed {@link IGridBlock} represents the definition for properties like
|
||||||
* connectable sides. Refer to its documentation for further details.
|
* connectable sides. Refer to its documentation for further details.
|
||||||
*
|
*
|
||||||
* @param block grid block
|
* @param block grid block
|
||||||
*
|
|
||||||
* @return grid node of block
|
* @return grid node of block
|
||||||
*/
|
*/
|
||||||
@Nonnull
|
@Nonnull
|
||||||
@@ -52,13 +51,12 @@ public interface IGridHelper {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a direct connection between two {@link IGridNode}.
|
* Create a direct connection between two {@link IGridNode}.
|
||||||
*
|
* <p>
|
||||||
* This will be considered as having a distance of 1, regardless of the location
|
* This will be considered as having a distance of 1, regardless of the location
|
||||||
* of both nodes.
|
* of both nodes.
|
||||||
*
|
*
|
||||||
* @param a to be connected gridnode
|
* @param a to be connected gridnode
|
||||||
* @param b to be connected gridnode
|
* @param b to be connected gridnode
|
||||||
*
|
|
||||||
* @throws appeng.api.exceptions.FailedConnectionException
|
* @throws appeng.api.exceptions.FailedConnectionException
|
||||||
*/
|
*/
|
||||||
@Nonnull
|
@Nonnull
|
||||||
|
|||||||
@@ -26,15 +26,15 @@ package appeng.api.networking;
|
|||||||
import javax.annotation.Nonnull;
|
import javax.annotation.Nonnull;
|
||||||
import javax.annotation.Nullable;
|
import javax.annotation.Nullable;
|
||||||
|
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.block.entity.BlockEntity;
|
||||||
|
|
||||||
import appeng.api.parts.IPart;
|
import appeng.api.parts.IPart;
|
||||||
import appeng.api.util.AECableType;
|
import appeng.api.util.AECableType;
|
||||||
import appeng.api.util.AEPartLocation;
|
import appeng.api.util.AEPartLocation;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Implement to create a networked {@link TileEntity} or {@link IPart} must be
|
* Implement to create a networked {@link BlockEntity} or {@link IPart} must be
|
||||||
* implemented for a part, or tile entity to become part of a grid.
|
* implemented for a part, or block entity to become part of a grid.
|
||||||
*/
|
*/
|
||||||
public interface IGridHost {
|
public interface IGridHost {
|
||||||
|
|
||||||
@@ -45,7 +45,6 @@ public interface IGridHost {
|
|||||||
*
|
*
|
||||||
* @param dir feel free to ignore this, most blocks will use the same node for
|
* @param dir feel free to ignore this, most blocks will use the same node for
|
||||||
* every side.
|
* every side.
|
||||||
*
|
|
||||||
* @return a new IGridNode, create these with AEApi.INSTANCE().createGridNode(
|
* @return a new IGridNode, create these with AEApi.INSTANCE().createGridNode(
|
||||||
* MyIGridBlock )
|
* MyIGridBlock )
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -27,8 +27,8 @@ import java.util.EnumSet;
|
|||||||
|
|
||||||
import javax.annotation.Nonnull;
|
import javax.annotation.Nonnull;
|
||||||
|
|
||||||
import net.minecraft.nbt.CompoundNBT;
|
import net.minecraft.nbt.CompoundTag;
|
||||||
import net.minecraft.world.IWorld;
|
import net.minecraft.world.WorldAccess;
|
||||||
|
|
||||||
import appeng.api.IAppEngApi;
|
import appeng.api.IAppEngApi;
|
||||||
import appeng.api.util.AEPartLocation;
|
import appeng.api.util.AEPartLocation;
|
||||||
@@ -36,9 +36,9 @@ import appeng.api.util.IReadOnlyCollection;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Gives you a view into your Nodes connections and information.
|
* Gives you a view into your Nodes connections and information.
|
||||||
*
|
* <p>
|
||||||
* updateState, getGrid, destroy are required to implement a proper IGridHost.
|
* updateState, getGrid, destroy are required to implement a proper IGridHost.
|
||||||
*
|
* <p>
|
||||||
* Don't Implement; Acquire from {@link IAppEngApi}.createGridNode
|
* Don't Implement; Acquire from {@link IAppEngApi}.createGridNode
|
||||||
*/
|
*/
|
||||||
public interface IGridNode {
|
public interface IGridNode {
|
||||||
@@ -54,10 +54,10 @@ public interface IGridNode {
|
|||||||
/**
|
/**
|
||||||
* inform the node that your IGridBlock has changed its internal state, and
|
* inform the node that your IGridBlock has changed its internal state, and
|
||||||
* force the node to update.
|
* force the node to update.
|
||||||
*
|
* <p>
|
||||||
* ALWAYS make sure that your tile entity is in the world, and has its node
|
* ALWAYS make sure that your block entity is in the world, and has its node
|
||||||
* properly saved to be returned from the host before updating state,
|
* properly saved to be returned from the host before updating state,
|
||||||
*
|
* <p>
|
||||||
* If your entity is not in the world, or if you IGridHost returns a different
|
* If your entity is not in the world, or if you IGridHost returns a different
|
||||||
* node for the same side you will likely crash the game.
|
* node for the same side you will likely crash the game.
|
||||||
*/
|
*/
|
||||||
@@ -89,7 +89,7 @@ public interface IGridNode {
|
|||||||
* @return the world the node is located in
|
* @return the world the node is located in
|
||||||
*/
|
*/
|
||||||
@Nonnull
|
@Nonnull
|
||||||
IWorld getWorld();
|
WorldAccess getWorld();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return a set of the connected sides, INTERNAL represents an invisible
|
* @return a set of the connected sides, INTERNAL represents an invisible
|
||||||
@@ -124,13 +124,13 @@ public interface IGridNode {
|
|||||||
* this should be called for each node you create, if you have a nodeData
|
* this should be called for each node you create, if you have a nodeData
|
||||||
* compound to load from, you can store all your nods on a single compound using
|
* compound to load from, you can store all your nods on a single compound using
|
||||||
* name.
|
* name.
|
||||||
*
|
* <p>
|
||||||
* Important: You must call this before updateState.
|
* Important: You must call this before updateState.
|
||||||
*
|
*
|
||||||
* @param name nbt name
|
* @param name nbt name
|
||||||
* @param nodeData to be loaded data
|
* @param nodeData to be loaded data
|
||||||
*/
|
*/
|
||||||
void loadFromNBT(@Nonnull String name, @Nonnull CompoundNBT nodeData);
|
void loadFromNBT(@Nonnull String name, @Nonnull CompoundTag nodeData);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* this should be called for each node you maintain, you can save all your nodes
|
* this should be called for each node you maintain, you can save all your nodes
|
||||||
@@ -140,7 +140,7 @@ public interface IGridNode {
|
|||||||
* @param name nbt name
|
* @param name nbt name
|
||||||
* @param nodeData to be saved data
|
* @param nodeData to be saved data
|
||||||
*/
|
*/
|
||||||
void saveToNBT(@Nonnull String name, @Nonnull CompoundNBT nodeData);
|
void saveToNBT(@Nonnull String name, @Nonnull CompoundTag nodeData);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return if the node's channel requirements are currently met, use this for
|
* @return if the node's channel requirements are currently met, use this for
|
||||||
@@ -152,7 +152,6 @@ public interface IGridNode {
|
|||||||
* see if this node has a certain flag
|
* see if this node has a certain flag
|
||||||
*
|
*
|
||||||
* @param flag flags
|
* @param flag flags
|
||||||
*
|
|
||||||
* @return true if has flag
|
* @return true if has flag
|
||||||
*/
|
*/
|
||||||
boolean hasFlag(@Nonnull GridFlags flag);
|
boolean hasFlag(@Nonnull GridFlags flag);
|
||||||
|
|||||||
@@ -25,15 +25,15 @@ package appeng.api.networking;
|
|||||||
|
|
||||||
import javax.annotation.Nonnull;
|
import javax.annotation.Nonnull;
|
||||||
|
|
||||||
import net.minecraft.nbt.CompoundNBT;
|
import net.minecraft.nbt.CompoundTag;
|
||||||
|
|
||||||
public interface IGridStorage {
|
public interface IGridStorage {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return an CompoundNBT that can be read, and written too.
|
* @return an CompoundTag that can be read, and written too.
|
||||||
*/
|
*/
|
||||||
@Nonnull
|
@Nonnull
|
||||||
CompoundNBT dataObject();
|
CompoundTag dataObject();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return the id for this grid storage object, used internally
|
* @return the id for this grid storage object, used internally
|
||||||
|
|||||||
@@ -32,12 +32,11 @@ public interface IGridVisitor {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Called for each node on the network.
|
* Called for each node on the network.
|
||||||
*
|
* <p>
|
||||||
* By returning false your informing the host to stop visiting nodes beyond the
|
* By returning false your informing the host to stop visiting nodes beyond the
|
||||||
* current node.
|
* current node.
|
||||||
*
|
*
|
||||||
* @param n the current node.
|
* @param n the current node.
|
||||||
*
|
|
||||||
* @return true to continue visiting nodes beyond this node.
|
* @return true to continue visiting nodes beyond this node.
|
||||||
*/
|
*/
|
||||||
boolean visitNode(@Nonnull IGridNode n);
|
boolean visitNode(@Nonnull IGridNode n);
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
package appeng.api.networking.crafting;
|
package appeng.api.networking.crafting;
|
||||||
|
|
||||||
import net.minecraft.util.text.ITextComponent;
|
import net.minecraft.text.Text;
|
||||||
|
|
||||||
import appeng.api.networking.security.IActionSource;
|
import appeng.api.networking.security.IActionSource;
|
||||||
import appeng.api.networking.storage.IBaseMonitor;
|
import appeng.api.networking.storage.IBaseMonitor;
|
||||||
@@ -54,5 +54,5 @@ public interface ICraftingCPU extends IBaseMonitor<IAEItemStack> {
|
|||||||
/**
|
/**
|
||||||
* @return a null or the name of the cpu.
|
* @return a null or the name of the cpu.
|
||||||
*/
|
*/
|
||||||
ITextComponent getName();
|
Text getName();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,7 +42,6 @@ public interface ICraftingGrid extends IGridCache {
|
|||||||
* @param world crafting world
|
* @param world crafting world
|
||||||
* @param slot slot index
|
* @param slot slot index
|
||||||
* @param details pattern details
|
* @param details pattern details
|
||||||
*
|
|
||||||
* @return a collection of crafting patterns for the item in question.
|
* @return a collection of crafting patterns for the item in question.
|
||||||
*/
|
*/
|
||||||
ImmutableCollection<ICraftingPatternDetails> getCraftingFor(IAEItemStack whatToCraft,
|
ImmutableCollection<ICraftingPatternDetails> getCraftingFor(IAEItemStack whatToCraft,
|
||||||
@@ -56,7 +55,6 @@ public interface ICraftingGrid extends IGridCache {
|
|||||||
* @param actionSrc source
|
* @param actionSrc source
|
||||||
* @param craftWhat result
|
* @param craftWhat result
|
||||||
* @param callback callback -- optional
|
* @param callback callback -- optional
|
||||||
*
|
|
||||||
* @return a future which will at an undetermined point in the future get you
|
* @return a future which will at an undetermined point in the future get you
|
||||||
* the {@link ICraftingJob} do not wait on this, your be waiting
|
* the {@link ICraftingJob} do not wait on this, your be waiting
|
||||||
* forever.
|
* forever.
|
||||||
@@ -79,7 +77,6 @@ public interface ICraftingGrid extends IGridCache {
|
|||||||
* this will be used for extracting items, should
|
* this will be used for extracting items, should
|
||||||
* usually be the same as the one provided to
|
* usually be the same as the one provided to
|
||||||
* beginCraftingJob.
|
* beginCraftingJob.
|
||||||
*
|
|
||||||
* @return null ( if failed ) or an {@link ICraftingLink} other wise, if you
|
* @return null ( if failed ) or an {@link ICraftingLink} other wise, if you
|
||||||
* send requestingMachine you need to properly keep track of this and
|
* send requestingMachine you need to properly keep track of this and
|
||||||
* handle the nbt saving and loading of the object as well as the
|
* handle the nbt saving and loading of the object as well as the
|
||||||
@@ -96,7 +93,6 @@ public interface ICraftingGrid extends IGridCache {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param what to be requested item
|
* @param what to be requested item
|
||||||
*
|
|
||||||
* @return true if the item can be requested via a crafting emitter.
|
* @return true if the item can be requested via a crafting emitter.
|
||||||
*/
|
*/
|
||||||
boolean canEmitFor(IAEItemStack what);
|
boolean canEmitFor(IAEItemStack what);
|
||||||
@@ -105,7 +101,6 @@ public interface ICraftingGrid extends IGridCache {
|
|||||||
* is this item being crafted?
|
* is this item being crafted?
|
||||||
*
|
*
|
||||||
* @param what item being crafted
|
* @param what item being crafted
|
||||||
*
|
|
||||||
* @return true if it is being crafting
|
* @return true if it is being crafting
|
||||||
*/
|
*/
|
||||||
boolean isRequesting(IAEItemStack what);
|
boolean isRequesting(IAEItemStack what);
|
||||||
@@ -114,7 +109,6 @@ public interface ICraftingGrid extends IGridCache {
|
|||||||
* The total amount being requested across all crafting cpus of a grid.
|
* The total amount being requested across all crafting cpus of a grid.
|
||||||
*
|
*
|
||||||
* @param what item being requested, ignores stacksize
|
* @param what item being requested, ignores stacksize
|
||||||
*
|
|
||||||
* @return The total amount being requested.
|
* @return The total amount being requested.
|
||||||
*/
|
*/
|
||||||
long requesting(IAEItemStack what);
|
long requesting(IAEItemStack what);
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
package appeng.api.networking.crafting;
|
package appeng.api.networking.crafting;
|
||||||
|
|
||||||
import net.minecraft.nbt.CompoundNBT;
|
import net.minecraft.nbt.CompoundTag;
|
||||||
|
|
||||||
public interface ICraftingLink {
|
public interface ICraftingLink {
|
||||||
|
|
||||||
@@ -53,7 +53,7 @@ public interface ICraftingLink {
|
|||||||
*
|
*
|
||||||
* @param tag to be written data
|
* @param tag to be written data
|
||||||
*/
|
*/
|
||||||
void writeToNBT(CompoundNBT tag);
|
void writeToNBT(CompoundTag tag);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return the crafting ID for this link.
|
* @return the crafting ID for this link.
|
||||||
|
|||||||
@@ -37,7 +37,6 @@ public interface ICraftingMedium {
|
|||||||
*
|
*
|
||||||
* @param patternDetails details
|
* @param patternDetails details
|
||||||
* @param table crafting table
|
* @param table crafting table
|
||||||
*
|
|
||||||
* @return if the pattern was successfully pushed.
|
* @return if the pattern was successfully pushed.
|
||||||
*/
|
*/
|
||||||
boolean pushPattern(ICraftingPatternDetails patternDetails, CraftingInventory table);
|
boolean pushPattern(ICraftingPatternDetails patternDetails, CraftingInventory table);
|
||||||
|
|||||||
@@ -49,7 +49,6 @@ public interface ICraftingPatternDetails {
|
|||||||
* @param slotIndex specific slot index
|
* @param slotIndex specific slot index
|
||||||
* @param itemStack item in slot
|
* @param itemStack item in slot
|
||||||
* @param world crafting world
|
* @param world crafting world
|
||||||
*
|
|
||||||
* @return if an item can be used in the specific slot for this pattern.
|
* @return if an item can be used in the specific slot for this pattern.
|
||||||
*/
|
*/
|
||||||
boolean isValidItemForSlot(int slotIndex, ItemStack itemStack, World world);
|
boolean isValidItemForSlot(int slotIndex, ItemStack itemStack, World world);
|
||||||
@@ -70,7 +69,7 @@ public interface ICraftingPatternDetails {
|
|||||||
* The list will be sorted in descending order by stack size. However there is
|
* The list will be sorted in descending order by stack size. However there is
|
||||||
* no guarantee about maintaining the placement order of the inputs in case of
|
* no guarantee about maintaining the placement order of the inputs in case of
|
||||||
* equal values.
|
* equal values.
|
||||||
*
|
*
|
||||||
* @return an immutable list of inputs without nulls
|
* @return an immutable list of inputs without nulls
|
||||||
*/
|
*/
|
||||||
List<IAEItemStack> getInputs();
|
List<IAEItemStack> getInputs();
|
||||||
@@ -81,11 +80,11 @@ public interface ICraftingPatternDetails {
|
|||||||
* <p>
|
* <p>
|
||||||
* This should be the preferred way to deal with the list of outputs.
|
* This should be the preferred way to deal with the list of outputs.
|
||||||
* <p>
|
* <p>
|
||||||
*
|
* <p>
|
||||||
* The list will be sorted in descending order by stack size. However there is
|
* The list will be sorted in descending order by stack size. However there is
|
||||||
* no guarantee about maintaining the placement order of the outputs in case of
|
* no guarantee about maintaining the placement order of the outputs in case of
|
||||||
* equal values.
|
* equal values.
|
||||||
*
|
*
|
||||||
* @return an immutable list of outputs without nulls
|
* @return an immutable list of outputs without nulls
|
||||||
*/
|
*/
|
||||||
List<IAEItemStack> getOutputs();
|
List<IAEItemStack> getOutputs();
|
||||||
@@ -101,7 +100,7 @@ public interface ICraftingPatternDetails {
|
|||||||
* <p>
|
* <p>
|
||||||
* This can return a copy from the internal structure, so there are no
|
* This can return a copy from the internal structure, so there are no
|
||||||
* guarantees about modifications.
|
* guarantees about modifications.
|
||||||
*
|
*
|
||||||
* @return a list of the inputs, will include nulls.
|
* @return a list of the inputs, will include nulls.
|
||||||
*/
|
*/
|
||||||
IAEItemStack[] getSparseInputs();
|
IAEItemStack[] getSparseInputs();
|
||||||
@@ -117,7 +116,7 @@ public interface ICraftingPatternDetails {
|
|||||||
* <p>
|
* <p>
|
||||||
* This can return a copy from the internal structure, so there are no
|
* This can return a copy from the internal structure, so there are no
|
||||||
* guarantees about modifications.
|
* guarantees about modifications.
|
||||||
*
|
*
|
||||||
* @return a list of the outputs, will include nulls.
|
* @return a list of the outputs, will include nulls.
|
||||||
*/
|
*/
|
||||||
IAEItemStack[] getSparseOutputs();
|
IAEItemStack[] getSparseOutputs();
|
||||||
@@ -133,7 +132,6 @@ public interface ICraftingPatternDetails {
|
|||||||
*
|
*
|
||||||
* @param craftingInv inventory
|
* @param craftingInv inventory
|
||||||
* @param world crafting world
|
* @param world crafting world
|
||||||
*
|
|
||||||
* @return the crafted ( work bench ) item.
|
* @return the crafted ( work bench ) item.
|
||||||
*/
|
*/
|
||||||
ItemStack getOutput(CraftingInventory craftingInv, World world);
|
ItemStack getOutput(CraftingInventory craftingInv, World world);
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ public interface ICraftingProviderHelper {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Add new Pattern to AE's crafting cache.
|
* Add new Pattern to AE's crafting cache.
|
||||||
*
|
* <p>
|
||||||
* This will only accept instances created by
|
* This will only accept instances created by
|
||||||
* {@link ICraftingHelper#decodePattern(net.minecraft.item.ItemStack, net.minecraft.world.World)}
|
* {@link ICraftingHelper#decodePattern(net.minecraft.item.ItemStack, net.minecraft.world.World)}
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -45,7 +45,6 @@ public interface ICraftingRequester extends IActionHost {
|
|||||||
*
|
*
|
||||||
* @param items item
|
* @param items item
|
||||||
* @param mode action mode
|
* @param mode action mode
|
||||||
*
|
|
||||||
* @return unwanted item
|
* @return unwanted item
|
||||||
*/
|
*/
|
||||||
IAEItemStack injectCraftedItems(ICraftingLink link, IAEItemStack items, Actionable mode);
|
IAEItemStack injectCraftedItems(ICraftingLink link, IAEItemStack items, Actionable mode);
|
||||||
@@ -53,7 +52,7 @@ public interface ICraftingRequester extends IActionHost {
|
|||||||
/**
|
/**
|
||||||
* called when the job changes from in progress, to either complete, or
|
* called when the job changes from in progress, to either complete, or
|
||||||
* canceled.
|
* canceled.
|
||||||
*
|
* <p>
|
||||||
* after this call the crafting link is "dead" and should be discarded.
|
* after this call the crafting link is "dead" and should be discarded.
|
||||||
*/
|
*/
|
||||||
void jobStateChange(ICraftingLink link);
|
void jobStateChange(ICraftingLink link);
|
||||||
|
|||||||
@@ -27,13 +27,13 @@ import appeng.api.storage.data.IAEStack;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* DO NOT IMPLEMENT.
|
* DO NOT IMPLEMENT.
|
||||||
*
|
* <p>
|
||||||
* Will be injected when adding an {@link ICraftingWatcherHost} to a grid.
|
* Will be injected when adding an {@link ICraftingWatcherHost} to a grid.
|
||||||
*/
|
*/
|
||||||
public interface ICraftingWatcher {
|
public interface ICraftingWatcher {
|
||||||
/**
|
/**
|
||||||
* Add a specific {@link IAEStack} to watch.
|
* Add a specific {@link IAEStack} to watch.
|
||||||
*
|
* <p>
|
||||||
* Supports multiple values, duplicate ones will not be added.
|
* Supports multiple values, duplicate ones will not be added.
|
||||||
*
|
*
|
||||||
* @param stack
|
* @param stack
|
||||||
|
|||||||
@@ -41,7 +41,6 @@ public interface IAEPowerStorage extends IEnergySource {
|
|||||||
*
|
*
|
||||||
* @param amt to be injected amount
|
* @param amt to be injected amount
|
||||||
* @param mode action mode
|
* @param mode action mode
|
||||||
*
|
|
||||||
* @return amount of power which was unable to be stored
|
* @return amount of power which was unable to be stored
|
||||||
*/
|
*/
|
||||||
double injectAEPower(double amt, @Nonnull Actionable mode);
|
double injectAEPower(double amt, @Nonnull Actionable mode);
|
||||||
@@ -75,16 +74,16 @@ public interface IAEPowerStorage extends IEnergySource {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* The priority to use this energy storage.
|
* The priority to use this energy storage.
|
||||||
*
|
* <p>
|
||||||
* A higher value means it is more likely to be extracted from first, and less
|
* A higher value means it is more likely to be extracted from first, and less
|
||||||
* likely to be inserted into first.
|
* likely to be inserted into first.
|
||||||
*
|
* <p>
|
||||||
* The value needs to be constant once added to a {@link IGrid}. Should it ever
|
* The value needs to be constant once added to a {@link IGrid}. Should it ever
|
||||||
* need to be changed, it has to be removed from the grid, then update the
|
* need to be changed, it has to be removed from the grid, then update the
|
||||||
* value, and finally added back to the grid.
|
* value, and finally added back to the grid.
|
||||||
*
|
* <p>
|
||||||
* This should never use {@link Integer#MIN_VALUE} or {@link Integer#MAX_VALUE}.
|
* This should never use {@link Integer#MIN_VALUE} or {@link Integer#MAX_VALUE}.
|
||||||
*
|
*
|
||||||
* @return the priority for this storage
|
* @return the priority for this storage
|
||||||
*/
|
*/
|
||||||
default int getPriority() {
|
default int getPriority() {
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ public interface IEnergyGrid extends IGridCache, IEnergySource, IEnergyGridProvi
|
|||||||
* condenses this into a single operation that determines the networks "powered
|
* condenses this into a single operation that determines the networks "powered
|
||||||
* state" if the network is considered off-line, your machines should not
|
* state" if the network is considered off-line, your machines should not
|
||||||
* function.
|
* function.
|
||||||
*
|
* <p>
|
||||||
* {@link MENetworkPowerStatusChange} events are posted when this value changes
|
* {@link MENetworkPowerStatusChange} events are posted when this value changes
|
||||||
* if you need to be notified of the change, most machines can simply test the
|
* if you need to be notified of the change, most machines can simply test the
|
||||||
* value when they operate.
|
* value when they operate.
|
||||||
@@ -73,21 +73,20 @@ public interface IEnergyGrid extends IGridCache, IEnergySource, IEnergyGridProvi
|
|||||||
/**
|
/**
|
||||||
* AE will accept any power, and store it, to maintain sanity please don't send
|
* AE will accept any power, and store it, to maintain sanity please don't send
|
||||||
* more then 10,000 at a time.
|
* more then 10,000 at a time.
|
||||||
*
|
* <p>
|
||||||
* IMPORTANT: Network power knows no bounds, for less spamy power flow, networks
|
* IMPORTANT: Network power knows no bounds, for less spamy power flow, networks
|
||||||
* can store more then their allotted storage, however, it should be kept to a
|
* can store more then their allotted storage, however, it should be kept to a
|
||||||
* minimum, to help with this, this method returns the networks current
|
* minimum, to help with this, this method returns the networks current
|
||||||
* OVERFLOW, this is not energy you can store some where else, its already
|
* OVERFLOW, this is not energy you can store some where else, its already
|
||||||
* stored in the network, you can extract it if you want, however it it owned by
|
* stored in the network, you can extract it if you want, however it it owned by
|
||||||
* the network, this is different then IAEEnergyStore
|
* the network, this is different then IAEEnergyStore
|
||||||
*
|
* <p>
|
||||||
* Another important note, is that if a network that had overflow is deleted,
|
* Another important note, is that if a network that had overflow is deleted,
|
||||||
* its power is gone, this is one of the reasons why keeping overflow to a
|
* its power is gone, this is one of the reasons why keeping overflow to a
|
||||||
* minimum is important.
|
* minimum is important.
|
||||||
*
|
*
|
||||||
* @param amt power to inject into the network
|
* @param amt power to inject into the network
|
||||||
* @param mode should the action be simulated or performed?
|
* @param mode should the action be simulated or performed?
|
||||||
*
|
|
||||||
* @return the amount of power that the network has OVER the limit.
|
* @return the amount of power that the network has OVER the limit.
|
||||||
*/
|
*/
|
||||||
@Nonnegative
|
@Nonnegative
|
||||||
|
|||||||
@@ -36,15 +36,15 @@ import appeng.api.config.Actionable;
|
|||||||
public interface IEnergyGridProvider {
|
public interface IEnergyGridProvider {
|
||||||
/**
|
/**
|
||||||
* internal use only
|
* internal use only
|
||||||
*
|
* <p>
|
||||||
* Can return a list of providers behind the current.
|
* Can return a list of providers behind the current.
|
||||||
*
|
* <p>
|
||||||
* An example would be something acting as proxy between different
|
* An example would be something acting as proxy between different
|
||||||
* {@link IEnergyGrid}s.
|
* {@link IEnergyGrid}s.
|
||||||
*
|
* <p>
|
||||||
* This can contain duplicate entries, AE will ensure that each provider is only
|
* This can contain duplicate entries, AE will ensure that each provider is only
|
||||||
* visited once.
|
* visited once.
|
||||||
*
|
* <p>
|
||||||
* internal use only
|
* internal use only
|
||||||
*/
|
*/
|
||||||
@Nonnull
|
@Nonnull
|
||||||
@@ -52,9 +52,9 @@ public interface IEnergyGridProvider {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* internal use only
|
* internal use only
|
||||||
*
|
* <p>
|
||||||
* Extracts the requested amount from the provider.
|
* Extracts the requested amount from the provider.
|
||||||
*
|
* <p>
|
||||||
* This should never forward a call to another {@link IEnergyGridProvider},
|
* This should never forward a call to another {@link IEnergyGridProvider},
|
||||||
* instead return them via {@link IEnergyGridProvider#providers()}
|
* instead return them via {@link IEnergyGridProvider#providers()}
|
||||||
*
|
*
|
||||||
@@ -65,10 +65,10 @@ public interface IEnergyGridProvider {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Injects the offered amount into the provider.
|
* Injects the offered amount into the provider.
|
||||||
*
|
* <p>
|
||||||
* This should never forward a call to another {@link IEnergyGridProvider},
|
* This should never forward a call to another {@link IEnergyGridProvider},
|
||||||
* instead return them via {@link IEnergyGridProvider#providers()}
|
* instead return them via {@link IEnergyGridProvider#providers()}
|
||||||
*
|
* <p>
|
||||||
* internal use only
|
* internal use only
|
||||||
*
|
*
|
||||||
* @return the leftover amount
|
* @return the leftover amount
|
||||||
@@ -78,13 +78,12 @@ public interface IEnergyGridProvider {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* internal use only
|
* internal use only
|
||||||
*
|
* <p>
|
||||||
* Returns the current demand of an provider.
|
* Returns the current demand of an provider.
|
||||||
*
|
* <p>
|
||||||
* This should never forward a call to another {@link IEnergyGridProvider},
|
* This should never forward a call to another {@link IEnergyGridProvider},
|
||||||
* instead return them via {@link IEnergyGridProvider#providers()}
|
* instead return them via {@link IEnergyGridProvider#providers()}
|
||||||
*
|
*
|
||||||
*
|
|
||||||
* @param d the max amount offered, the demand should never exceed it.
|
* @param d the max amount offered, the demand should never exceed it.
|
||||||
* @return the total amount demanded
|
* @return the total amount demanded
|
||||||
*/
|
*/
|
||||||
@@ -93,31 +92,29 @@ public interface IEnergyGridProvider {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* internal use only
|
* internal use only
|
||||||
*
|
* <p>
|
||||||
* AE currently uses this to enqueue the next visited provider.
|
* AE currently uses this to enqueue the next visited provider.
|
||||||
*
|
* <p>
|
||||||
* There is no guarantee that this works on in a perfect way. It can be limited
|
* There is no guarantee that this works on in a perfect way. It can be limited
|
||||||
* to the returns of the past {@link IEnergyGridProvider#providers()}, but not
|
* to the returns of the past {@link IEnergyGridProvider#providers()}, but not
|
||||||
* any future one discovered by visiting further providers.
|
* any future one discovered by visiting further providers.
|
||||||
*
|
* <p>
|
||||||
* E.g. inject into the the lowest one first or extract from the highest one.
|
* E.g. inject into the the lowest one first or extract from the highest one.
|
||||||
*
|
*
|
||||||
* @return the current stored amount.
|
* @return the current stored amount.
|
||||||
*
|
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
@Nonnegative
|
@Nonnegative
|
||||||
double getProviderStoredEnergy();
|
double getProviderStoredEnergy();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* internal use only
|
* internal use only
|
||||||
*
|
* <p>
|
||||||
* AE currently uses this to enqueue the next visited provider.
|
* AE currently uses this to enqueue the next visited provider.
|
||||||
*
|
* <p>
|
||||||
* There is no guarantee that this works on in a perfect way. It can be limited
|
* There is no guarantee that this works on in a perfect way. It can be limited
|
||||||
* to the returns of the past {@link IEnergyGridProvider#providers()}, but not
|
* to the returns of the past {@link IEnergyGridProvider#providers()}, but not
|
||||||
* any future one discovered by visiting further providers.
|
* any future one discovered by visiting further providers.
|
||||||
*
|
* <p>
|
||||||
* E.g. inject into the the lowest one first or extract from the highest one.
|
* E.g. inject into the the lowest one first or extract from the highest one.
|
||||||
*
|
*
|
||||||
* @return the maximum amount stored.
|
* @return the maximum amount stored.
|
||||||
|
|||||||
@@ -36,7 +36,6 @@ public interface IEnergySource {
|
|||||||
*
|
*
|
||||||
* @param amt extracted power
|
* @param amt extracted power
|
||||||
* @param mode should the action be simulated or performed?
|
* @param mode should the action be simulated or performed?
|
||||||
*
|
|
||||||
* @return returns extracted power.
|
* @return returns extracted power.
|
||||||
*/
|
*/
|
||||||
@Nonnegative
|
@Nonnegative
|
||||||
|
|||||||
@@ -27,13 +27,13 @@ import javax.annotation.Nonnegative;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* DO NOT IMPLEMENT.
|
* DO NOT IMPLEMENT.
|
||||||
*
|
* <p>
|
||||||
* Will be injected when adding an {@link IEnergyWatcherHost} to a grid.
|
* Will be injected when adding an {@link IEnergyWatcherHost} to a grid.
|
||||||
*/
|
*/
|
||||||
public interface IEnergyWatcher {
|
public interface IEnergyWatcher {
|
||||||
/**
|
/**
|
||||||
* Add a specific threshold to watch.
|
* Add a specific threshold to watch.
|
||||||
*
|
* <p>
|
||||||
* Supports multiple values, duplicate ones will not be added.
|
* Supports multiple values, duplicate ones will not be added.
|
||||||
*
|
*
|
||||||
* @param amount
|
* @param amount
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ import appeng.api.networking.IGridNode;
|
|||||||
/**
|
/**
|
||||||
* Posted by the network when the booting status of the network goes up or down,
|
* Posted by the network when the booting status of the network goes up or down,
|
||||||
* the change is reflected via {@link IGridNode}.isActive()
|
* the change is reflected via {@link IGridNode}.isActive()
|
||||||
*
|
* <p>
|
||||||
* Note: Most machines just need to check {@link IGridNode}.isActive()
|
* Note: Most machines just need to check {@link IGridNode}.isActive()
|
||||||
*/
|
*/
|
||||||
public class MENetworkBootingStatusChange extends MENetworkEvent {
|
public class MENetworkBootingStatusChange extends MENetworkEvent {
|
||||||
|
|||||||
@@ -25,10 +25,10 @@ package appeng.api.networking.events;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Posted by storage devices to inform AE to refresh its storage structure.
|
* Posted by storage devices to inform AE to refresh its storage structure.
|
||||||
*
|
* <p>
|
||||||
* This is done in cases such as a storage cell being removed or added to a
|
* This is done in cases such as a storage cell being removed or added to a
|
||||||
* drive.
|
* drive.
|
||||||
*
|
* <p>
|
||||||
* you do not need to send this event when your node is added / removed from the
|
* you do not need to send this event when your node is added / removed from the
|
||||||
* grid.
|
* grid.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ import appeng.api.networking.IGridHost;
|
|||||||
/**
|
/**
|
||||||
* Posted to the {@link IGridHost} when the channels on the node connections are
|
* Posted to the {@link IGridHost} when the channels on the node connections are
|
||||||
* altered.
|
* altered.
|
||||||
*
|
* <p>
|
||||||
* Never posted IGridCaches.
|
* Never posted IGridCaches.
|
||||||
*/
|
*/
|
||||||
public class MENetworkChannelsChanged extends MENetworkEvent {
|
public class MENetworkChannelsChanged extends MENetworkEvent {
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ import appeng.api.networking.IGrid;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Part of AE's Event Bus.
|
* Part of AE's Event Bus.
|
||||||
*
|
* <p>
|
||||||
* Posted via {@link IGrid}.postEvent or {@link IGrid}.postEventTo
|
* Posted via {@link IGrid}.postEvent or {@link IGrid}.postEventTo
|
||||||
*/
|
*/
|
||||||
public class MENetworkEvent {
|
public class MENetworkEvent {
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ import appeng.api.networking.IGridNode;
|
|||||||
* Implementers of a IGridBlock must post this event when your getIdlePowerUsage
|
* Implementers of a IGridBlock must post this event when your getIdlePowerUsage
|
||||||
* starts returning a new value, if you do not post this event the network will
|
* starts returning a new value, if you do not post this event the network will
|
||||||
* not change the idle draw.
|
* not change the idle draw.
|
||||||
*
|
* <p>
|
||||||
* you do not need to send this event when your node is added / removed from the
|
* you do not need to send this event when your node is added / removed from the
|
||||||
* grid.
|
* grid.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ import appeng.api.networking.energy.IEnergyGrid;
|
|||||||
* Posted by the network when the power status of the network goes up or down,
|
* Posted by the network when the power status of the network goes up or down,
|
||||||
* the change is reflected via the {@link IEnergyGrid}.isNetworkPowered() or via
|
* the change is reflected via the {@link IEnergyGrid}.isNetworkPowered() or via
|
||||||
* {@link IGridNode}.isActive()
|
* {@link IGridNode}.isActive()
|
||||||
*
|
* <p>
|
||||||
* Note: Most machines just need to check {@link IGridNode}.isActive()
|
* Note: Most machines just need to check {@link IGridNode}.isActive()
|
||||||
*/
|
*/
|
||||||
public class MENetworkPowerStatusChange extends MENetworkEvent {
|
public class MENetworkPowerStatusChange extends MENetworkEvent {
|
||||||
|
|||||||
@@ -28,10 +28,10 @@ import appeng.api.networking.energy.IAEPowerStorage;
|
|||||||
/**
|
/**
|
||||||
* informs the network, that a {@link IAEPowerStorage} block that had either
|
* informs the network, that a {@link IAEPowerStorage} block that had either
|
||||||
* run, out of power, or was full, is no longer in that state.
|
* run, out of power, or was full, is no longer in that state.
|
||||||
*
|
* <p>
|
||||||
* failure to post this event when your {@link IAEPowerStorage} changes state
|
* failure to post this event when your {@link IAEPowerStorage} changes state
|
||||||
* will result in your block not charging, or not-discharging.
|
* will result in your block not charging, or not-discharging.
|
||||||
*
|
* <p>
|
||||||
* you do not need to send this event when your node is added / removed from the
|
* you do not need to send this event when your node is added / removed from the
|
||||||
* grid.
|
* grid.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -29,9 +29,9 @@ import appeng.api.storage.IStorageChannel;
|
|||||||
/**
|
/**
|
||||||
* posted by the network when the networks Storage Changes, you can use the
|
* posted by the network when the networks Storage Changes, you can use the
|
||||||
* currentItems list to check levels, and update status.
|
* currentItems list to check levels, and update status.
|
||||||
*
|
* <p>
|
||||||
* this is the least useful method of getting info about changes in the network.
|
* this is the least useful method of getting info about changes in the network.
|
||||||
*
|
* <p>
|
||||||
* Do not modify the list or its contents in anyway.
|
* Do not modify the list or its contents in anyway.
|
||||||
*/
|
*/
|
||||||
public class MENetworkStorageEvent extends MENetworkEvent {
|
public class MENetworkStorageEvent extends MENetworkEvent {
|
||||||
|
|||||||
@@ -31,18 +31,17 @@ import net.minecraft.entity.player.PlayerEntity;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* The source of any action.
|
* The source of any action.
|
||||||
*
|
* <p>
|
||||||
* This can either be a {@link PlayerEntity} or an {@link IActionHost}.
|
* This can either be a {@link PlayerEntity} or an {@link IActionHost}.
|
||||||
*
|
* <p>
|
||||||
* In most cases this is used for security checks, but can be used to validate
|
* In most cases this is used for security checks, but can be used to validate
|
||||||
* the source itself.
|
* the source itself.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
public interface IActionSource {
|
public interface IActionSource {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* If present, AE will consider the player being the source for the action.
|
* If present, AE will consider the player being the source for the action.
|
||||||
*
|
* <p>
|
||||||
* This will take precedence over {@link IActionSource#machine()} in any case.
|
* This will take precedence over {@link IActionSource#machine()} in any case.
|
||||||
*
|
*
|
||||||
* @return An optional player issuing the action.
|
* @return An optional player issuing the action.
|
||||||
@@ -52,10 +51,10 @@ public interface IActionSource {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* If present, it indicates the {@link IActionHost} of the source.
|
* If present, it indicates the {@link IActionHost} of the source.
|
||||||
*
|
* <p>
|
||||||
* Should {@link IActionSource#player()} be absent, it will consider a machine
|
* Should {@link IActionSource#player()} be absent, it will consider a machine
|
||||||
* as source.
|
* as source.
|
||||||
*
|
* <p>
|
||||||
* It is recommended to include the machine even when a player is present.
|
* It is recommended to include the machine even when a player is present.
|
||||||
*
|
*
|
||||||
* @return An optional machine issuing the action or acting as proxy for a
|
* @return An optional machine issuing the action or acting as proxy for a
|
||||||
@@ -66,9 +65,9 @@ public interface IActionSource {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* An {@link IActionSource} can have multiple optional contexts.
|
* An {@link IActionSource} can have multiple optional contexts.
|
||||||
*
|
* <p>
|
||||||
* It is strongly recommended to limit the uses for absolutely necessary cases.
|
* It is strongly recommended to limit the uses for absolutely necessary cases.
|
||||||
*
|
* <p>
|
||||||
* Currently there are no public contexts made available by AE. An example would
|
* Currently there are no public contexts made available by AE. An example would
|
||||||
* be the context interfaces use internally to avoid looping items between each
|
* be the context interfaces use internally to avoid looping items between each
|
||||||
* other.
|
* other.
|
||||||
|
|||||||
@@ -43,7 +43,6 @@ public interface ISecurityGrid extends IGridCache {
|
|||||||
*
|
*
|
||||||
* @param player to be checked player
|
* @param player to be checked player
|
||||||
* @param perm checked permissions
|
* @param perm checked permissions
|
||||||
*
|
|
||||||
* @return true if the player has permissions.
|
* @return true if the player has permissions.
|
||||||
*/
|
*/
|
||||||
boolean hasPermission(@Nonnull PlayerEntity player, @Nonnull SecurityPermissions perm);
|
boolean hasPermission(@Nonnull PlayerEntity player, @Nonnull SecurityPermissions perm);
|
||||||
@@ -53,7 +52,6 @@ public interface ISecurityGrid extends IGridCache {
|
|||||||
*
|
*
|
||||||
* @param playerID id of player
|
* @param playerID id of player
|
||||||
* @param perm checked permissions
|
* @param perm checked permissions
|
||||||
*
|
|
||||||
* @return true if the player has permissions.
|
* @return true if the player has permissions.
|
||||||
*/
|
*/
|
||||||
boolean hasPermission(@Nonnegative int playerID, @Nonnull SecurityPermissions perm);
|
boolean hasPermission(@Nonnegative int playerID, @Nonnull SecurityPermissions perm);
|
||||||
|
|||||||
@@ -27,13 +27,13 @@ import appeng.api.storage.data.IAEStack;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* DO NOT IMPLEMENT.
|
* DO NOT IMPLEMENT.
|
||||||
*
|
* <p>
|
||||||
* Will be injected when adding an {@link IStackWatcherHost} to a grid.
|
* Will be injected when adding an {@link IStackWatcherHost} to a grid.
|
||||||
*/
|
*/
|
||||||
public interface IStackWatcher {
|
public interface IStackWatcher {
|
||||||
/**
|
/**
|
||||||
* Add a specific {@link IAEStack} to watch.
|
* Add a specific {@link IAEStack} to watch.
|
||||||
*
|
* <p>
|
||||||
* Supports multiple values, duplicate ones will not be added.
|
* Supports multiple values, duplicate ones will not be added.
|
||||||
*
|
*
|
||||||
* @param stack
|
* @param stack
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ public interface IStorageGrid extends IGridCache, IStorageMonitorable {
|
|||||||
* outside of the standard Network operations, Examples, ME Chest inputs from
|
* outside of the standard Network operations, Examples, ME Chest inputs from
|
||||||
* the world, or a Storage Bus detecting modifications made to the chest by an
|
* the world, or a Storage Bus detecting modifications made to the chest by an
|
||||||
* outside force.
|
* outside force.
|
||||||
*
|
* <p>
|
||||||
* Expects the input to have either a negative or a positive stack size to
|
* Expects the input to have either a negative or a positive stack size to
|
||||||
* correspond to the injection, or extraction operation.
|
* correspond to the injection, or extraction operation.
|
||||||
*
|
*
|
||||||
@@ -52,7 +52,7 @@ public interface IStorageGrid extends IGridCache, IStorageMonitorable {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Used to add a cell provider to the storage system
|
* Used to add a cell provider to the storage system
|
||||||
*
|
* <p>
|
||||||
* THIS IT NOT FOR USE {@link IGridHost} THAT PROVIDE {@link ICellContainer} -
|
* THIS IT NOT FOR USE {@link IGridHost} THAT PROVIDE {@link ICellContainer} -
|
||||||
* those are automatically handled by the storage system.
|
* those are automatically handled by the storage system.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ public interface IGridTickable {
|
|||||||
/**
|
/**
|
||||||
* Return a valid TickingRequest to tell AE a guide for which type of
|
* Return a valid TickingRequest to tell AE a guide for which type of
|
||||||
* responsiveness your device wants.
|
* responsiveness your device wants.
|
||||||
*
|
* <p>
|
||||||
* This will be called for your tile any time your tile changes grids, this can
|
* This will be called for your tile any time your tile changes grids, this can
|
||||||
* happen at any time, so if your using the sleep feature you may wish to
|
* happen at any time, so if your using the sleep feature you may wish to
|
||||||
* preserve your sleep, in the result of this method. or you can simply reset
|
* preserve your sleep, in the result of this method. or you can simply reset
|
||||||
@@ -61,15 +61,14 @@ public interface IGridTickable {
|
|||||||
* AE lets you adjust your tick rate based on the results of your tick, if your
|
* AE lets you adjust your tick rate based on the results of your tick, if your
|
||||||
* block as accomplished work you may wish to increase the ticking speed, if
|
* block as accomplished work you may wish to increase the ticking speed, if
|
||||||
* your block is idle you may wish to slow it down.
|
* your block is idle you may wish to slow it down.
|
||||||
*
|
* <p>
|
||||||
* Its up to you.
|
* Its up to you.
|
||||||
*
|
* <p>
|
||||||
* Note: this is never called if you return null from getTickingRequest.
|
* Note: this is never called if you return null from getTickingRequest.
|
||||||
*
|
*
|
||||||
* @param ticksSinceLastCall the number of world ticks that were skipped since
|
* @param ticksSinceLastCall the number of world ticks that were skipped since
|
||||||
* your last tick, you can use this to adjust speed of
|
* your last tick, you can use this to adjust speed of
|
||||||
* processing or adjust your tick rate.
|
* processing or adjust your tick rate.
|
||||||
*
|
|
||||||
* @return tick rate adjustment.
|
* @return tick rate adjustment.
|
||||||
*/
|
*/
|
||||||
@Nonnull
|
@Nonnull
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user