diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..0fc4431 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,6 @@ +* text=auto eol=lf +*.bat text eol=crlf +*.png binary +*.ogg binary +*.jar binary +*.zip binary diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7c18eb5..20e0da7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,96 +1,105 @@ -name: Electric Advantage 1.12 CI +name: Electric Advantage 1.13 CI on: push: - branches: - - master-1.12.2 - - 'feature/**' + branches: [master-1.13.2, 'feature/**'] pull_request: - branches: - - master-1.12.2 + branches: [master-1.13.2] permissions: contents: read concurrency: - group: electricadvantage-1.12-${{ github.workflow }}-${{ github.ref }} + group: electricadvantage-1.13-${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: build: name: Build, test, and audit runs-on: ubuntu-latest - timeout-minutes: 75 - + timeout-minutes: 105 steps: - name: Check out ElectricAdvantage uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 - - - name: Check out pinned PowerAdvantage + - name: Check out pinned OreSpawn + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 + with: + repository: MinecraftModDevelopmentMods/OreSpawn + ref: 6a7c2bb07b9a7771128812fcc07d185f7d9df58b + path: .ci-dependencies/OreSpawn + - name: Use canonical LF dependency inputs + # Base Metals predates archive text normalization; its LF artifact is separately pinned. + run: git config --global core.autocrlf false + - name: Check out pinned Base Metals + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 + with: + repository: MinecraftModDevelopmentMods/BaseMetals + ref: 1376a20d7d5ba22d3abc77dc34b49a2c88943697 + path: .ci-dependencies/BaseMetals + - name: Check out PowerAdvantage 1.13.2 uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 with: repository: MinecraftModDevelopmentMods/PowerAdvantage - ref: 40811a0be37174a0633998eb3d820d95755d35e8 + ref: 6a845ad68eb1e34dcdd793dceb9cb528be22cedf path: .ci-dependencies/PowerAdvantage - - name: Install Java 8 toolchain uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5 with: distribution: temurin java-version: '8.0.502+7' - - name: Install Java 17 for Gradle uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5 with: distribution: microsoft java-version: '17' - - name: Set up Gradle uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6 - - - name: Build pinned PowerAdvantage development jar - id: poweradvantage + - name: Build 1.13.2 dependency chain + id: dependencies shell: bash run: | set -euo pipefail - dependency="$GITHUB_WORKSPACE/.ci-dependencies/PowerAdvantage" - mirror="$RUNNER_TEMP/reborncore-mirror" - chmod +x "$dependency/gradlew" - ( - cd "$dependency" - bash gradle/stage-reborncore-release.sh "$mirror" - ./gradlew deobfJar verifyReleaseDependencies \ - -PrebornCoreVerificationRepository="$mirror" --no-daemon --stacktrace - ) - jar="$dependency/build/libs-dev/PowerAdvantage-2.4.1.112021-deobf.jar" - test -f "$jar" - echo "jar=$jar" >> "$GITHUB_OUTPUT" - + orespawn="$GITHUB_WORKSPACE/.ci-dependencies/OreSpawn" + basemetals="$GITHUB_WORKSPACE/.ci-dependencies/BaseMetals" + power="$GITHUB_WORKSPACE/.ci-dependencies/PowerAdvantage" + chmod +x "$orespawn/gradlew" "$basemetals/gradlew" "$power/gradlew" + (cd "$orespawn" && ./gradlew jar --no-daemon --stacktrace) + (cd "$basemetals" && ./gradlew jar --no-daemon --stacktrace) + osjar="$orespawn/build/libs-dev/OreSpawn-4.1.0.113021-deobf.jar" + bmjar="$basemetals/build/libs-dev/BaseMetals-3.0.1.113021-deobf.jar" + (cd "$power" && ./gradlew jar verifyReleaseDependencies -PbaseMetalsDeobfJar="$bmjar" -PoreSpawnDeobfJar="$osjar" --no-daemon --stacktrace) + powerjar="$power/build/libs-dev/PowerAdvantage-2.4.4.113021-deobf.jar" + test -f "$osjar" && test -f "$bmjar" && test -f "$powerjar" + echo "orespawn=$osjar" >> "$GITHUB_OUTPUT" + echo "basemetals=$bmjar" >> "$GITHUB_OUTPUT" + echo "power=$powerjar" >> "$GITHUB_OUTPUT" + echo "power_ref=$(git -C "$power" rev-parse HEAD)" >> "$GITHUB_OUTPUT" - name: Build and audit release artifacts run: >- ./gradlew clean check build javadoc verifyReleaseDependencies verifyReleaseArtifacts writeReleaseChecksums verifyEclipseProductionClasspath - -PpowerAdvantageDeobfJar=${{ steps.poweradvantage.outputs.jar }} + -PpowerAdvantageDeobfJar=${{ steps.dependencies.outputs.power }} + -Ppoweradvantage_source_ref=${{ steps.dependencies.outputs.power_ref }} + -PbaseMetalsDeobfJar=${{ steps.dependencies.outputs.basemetals }} + -PoreSpawnDeobfJar=${{ steps.dependencies.outputs.orespawn }} --no-daemon --stacktrace - - name: Upload audited release candidate uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7 with: - name: ElectricAdvantage-1.12.2-${{ github.sha }} + name: ElectricAdvantage-1.13.2-${{ github.sha }} if-no-files-found: error retention-days: 30 path: | - build/libs/ElectricAdvantage-2.2.1.112021.jar - build/libs/ElectricAdvantage-2.2.1.112021-sources.jar - build/libs/ElectricAdvantage-2.2.1.112021-javadoc.jar + build/libs/ElectricAdvantage-2.2.5.113021.jar + build/libs/ElectricAdvantage-2.2.5.113021-sources.jar + build/libs/ElectricAdvantage-2.2.5.113021-javadoc.jar build/release/SHA256SUMS CHANGELOG.txt - - name: Upload diagnostics on failure if: failure() uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7 with: - name: ElectricAdvantage-1.12.2-diagnostics-${{ github.sha }} + name: ElectricAdvantage-1.13.2-diagnostics-${{ github.sha }} if-no-files-found: ignore retention-days: 14 path: | diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 945ebb1..a2f0ab8 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -2,14 +2,11 @@ name: CodeQL on: push: - branches: - - master-1.12.2 - - 'feature/**' + branches: [master-1.13.2, 'feature/**'] pull_request: - branches: - - master-1.12.2 + branches: [master-1.13.2] schedule: - - cron: '53 7 * * 4' + - cron: '59 7 * * 4' permissions: actions: read @@ -20,62 +17,74 @@ jobs: analyze: name: Analyze Java runs-on: ubuntu-latest - timeout-minutes: 60 - + timeout-minutes: 90 steps: - name: Check out ElectricAdvantage uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 - - - name: Check out pinned PowerAdvantage + - name: Check out pinned OreSpawn + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 + with: + repository: MinecraftModDevelopmentMods/OreSpawn + ref: 6a7c2bb07b9a7771128812fcc07d185f7d9df58b + path: .ci-dependencies/OreSpawn + - name: Use canonical LF dependency inputs + # Base Metals predates archive text normalization; its LF artifact is separately pinned. + run: git config --global core.autocrlf false + - name: Check out pinned Base Metals + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 + with: + repository: MinecraftModDevelopmentMods/BaseMetals + ref: 1376a20d7d5ba22d3abc77dc34b49a2c88943697 + path: .ci-dependencies/BaseMetals + - name: Check out PowerAdvantage 1.13.2 uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 with: repository: MinecraftModDevelopmentMods/PowerAdvantage - ref: 40811a0be37174a0633998eb3d820d95755d35e8 + ref: 6a845ad68eb1e34dcdd793dceb9cb528be22cedf path: .ci-dependencies/PowerAdvantage - - name: Install Java 8 toolchain uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5 with: distribution: temurin java-version: '8.0.502+7' - - name: Install Java 17 for Gradle uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5 with: distribution: microsoft java-version: '17' - - name: Set up Gradle uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6 - - - name: Build pinned PowerAdvantage development jar - id: poweradvantage + - name: Build 1.13.2 dependency chain + id: dependencies shell: bash run: | set -euo pipefail - dependency="$GITHUB_WORKSPACE/.ci-dependencies/PowerAdvantage" - mirror="$RUNNER_TEMP/reborncore-mirror" - chmod +x "$dependency/gradlew" - ( - cd "$dependency" - bash gradle/stage-reborncore-release.sh "$mirror" - ./gradlew deobfJar verifyReleaseDependencies \ - -PrebornCoreVerificationRepository="$mirror" --no-daemon --stacktrace - ) - jar="$dependency/build/libs-dev/PowerAdvantage-2.4.1.112021-deobf.jar" - test -f "$jar" - echo "jar=$jar" >> "$GITHUB_OUTPUT" - + orespawn="$GITHUB_WORKSPACE/.ci-dependencies/OreSpawn" + basemetals="$GITHUB_WORKSPACE/.ci-dependencies/BaseMetals" + power="$GITHUB_WORKSPACE/.ci-dependencies/PowerAdvantage" + chmod +x "$orespawn/gradlew" "$basemetals/gradlew" "$power/gradlew" + (cd "$orespawn" && ./gradlew jar --no-daemon --stacktrace) + (cd "$basemetals" && ./gradlew jar --no-daemon --stacktrace) + osjar="$orespawn/build/libs-dev/OreSpawn-4.1.0.113021-deobf.jar" + bmjar="$basemetals/build/libs-dev/BaseMetals-3.0.1.113021-deobf.jar" + (cd "$power" && ./gradlew jar verifyReleaseDependencies -PbaseMetalsDeobfJar="$bmjar" -PoreSpawnDeobfJar="$osjar" --no-daemon --stacktrace) + powerjar="$power/build/libs-dev/PowerAdvantage-2.4.4.113021-deobf.jar" + test -f "$osjar" && test -f "$bmjar" && test -f "$powerjar" + echo "orespawn=$osjar" >> "$GITHUB_OUTPUT" + echo "basemetals=$bmjar" >> "$GITHUB_OUTPUT" + echo "power=$powerjar" >> "$GITHUB_OUTPUT" + echo "power_ref=$(git -C "$power" rev-parse HEAD)" >> "$GITHUB_OUTPUT" - name: Initialize CodeQL uses: github/codeql-action/init@db488ddef3bf6cb639b32c2e9a7c0a7ea8271d28 # v4 with: languages: java-kotlin - - name: Compile ElectricAdvantage production code run: | chmod +x ./gradlew ./gradlew clean classes --rerun-tasks --no-build-cache --no-daemon --stacktrace \ - -PpowerAdvantageDeobfJar=${{ steps.poweradvantage.outputs.jar }} - + -PpowerAdvantageDeobfJar=${{ steps.dependencies.outputs.power }} \ + -Ppoweradvantage_source_ref=${{ steps.dependencies.outputs.power_ref }} \ + -PbaseMetalsDeobfJar=${{ steps.dependencies.outputs.basemetals }} \ + -PoreSpawnDeobfJar=${{ steps.dependencies.outputs.orespawn }} - name: Analyze uses: github/codeql-action/analyze@db488ddef3bf6cb639b32c2e9a7c0a7ea8271d28 # v4 diff --git a/.github/workflows/validate-gradle-build.yml b/.github/workflows/validate-gradle-build.yml index 8959c1a..d4d55ba 100644 --- a/.github/workflows/validate-gradle-build.yml +++ b/.github/workflows/validate-gradle-build.yml @@ -3,11 +3,11 @@ name: Validate Gradle Wrapper on: push: branches: - - master-1.12.2 + - master-1.13.2 - 'feature/**' pull_request: branches: - - master-1.12.2 + - master-1.13.2 permissions: contents: read diff --git a/.gitignore b/.gitignore index 4502811..cb99cf1 100644 --- a/.gitignore +++ b/.gitignore @@ -21,6 +21,9 @@ /run/ /run-data/ /run.* +/$run/ +/eula.txt +/server.properties /*.log /classes/ /logs/ @@ -62,6 +65,25 @@ /replay_pid*.log /secret.json +# Nested local tooling and generated output +AGENTS.md +AGENT.md +CLAUDE.md +GEMINI.md +ARCHITECT.md +agent-notes/ +.codex/ +.agent/ +.agents/ +.claude/ +.gemini/ +.cursor/ +agent-*.md +codex-*.md +*.log +*.class +__pycache__/ +*.pyc /.DS_Store /README.txt /forge-*-changelog.txt diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 7296c18..56a64fd 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,3 +1,37 @@ +Electric Advantage 2.2.5.113021 + +- Keep development archives identical in existing workspaces and fresh CI checkouts. +- Separate different electronics and machines into distinct recipe-book cells while keeping same-output alternatives together. +- Populate wire and carbon tags, point circuit-board ingredients at finished control circuits, and retain configured rubber and Normal solder compatibility. +- Restore lithium, silicon and solder smelting, mineral crushing and Apocalyptic parts recycling. +- Add lithium nugget/ingot conversion and smelting recipe-book discoveries. +- Restore legacy electric-parts chest loot through Power Advantage's native fallback when Additional Loot Tables is absent. +- Verify material-to-machine progression from raw resources in every recipe mode, with live processing, resource reload and full-restart checks. +- Add ingredient-triggered recipe-book discoveries for every crafting variant, retaining tagged ingredient compatibility and recipe-mode restrictions. +- Prevent Eclipse builds from replacing processed mod metadata with unresolved source templates. +- Fix literal 1.13 blockstate model paths and replace removed normal selectors, preserving every orientation and registry identity. +- Add modern language aliases alongside legacy GUI keys and audit native client resources in the combined Advantage launch. +- Point generated Eclipse mod discovery at bin/main and audit it, preventing launches that omit Electric Advantage. +- Make tile-type registration generic inference explicit for Eclipse's compiler. +- Retain a loaded hydroturbine's pending generator coordinate when saved before its first tick, preserving the same entity across restart. +- Charge track movement energy to the moved drill rather than the removed tile. +- Fix drill output into empty vanilla rear inventories and mark both inventories dirty after transfer. +- Preserve unfinished drill progress across chunk reloads and full restarts; reset it when a saved target state has changed. +- Keep legacy progress and target-coordinate NBT readable, with optional target-state snapshots for new saves. + +- Preserve saved LED energy when upgrading 1.12 worlds or chained 1.10-to-1.12 worlds that use the legacy electricadvantage:l_e_d tile ID. + +- Port Electric Advantage to Minecraft 1.13.2, Forge 25.0.223, and the zone.moddev.mc implementation namespace. +- Register legacy block-state, tile, item, and hydroturbine migrations with Power Advantage for direct 1.10 and 1.12 upgrades. +- Preserve all six Electric Drill facings, active state, energy, inventory, movement, output, and helper state. +- Replace Ore Dictionary recipes with Forge tags, including sulfur/sulphur and lithium compatibility aliases. +- Guard tagged recipes so reduced mod sets cannot drop required material ingredients. +- Register conditional OreSpawn 4 sulfur and lithium providers while preserving user-owned world profiles. +- Import retained OreSpawn 1.x lithium and sulfur settings through Power Advantage's non-destructive OreSpawn 4 provider bridge. +- Use Base Metals data-driven crushing recipes without embedding Base Metals. +- Preserve fluid-machine, battery, growth chamber, laser turret, and hydroelectric state across restart. +- Add reproducible 1.13 release artifacts, dependency audits, Eclipse metadata, and Advantage Works coverage. + Electric Advantage 2.2.1.112021 - Upgrade the Minecraft 1.12.2 build to ForgeGradle 7 and Gradle 9.6.1. diff --git a/README.md b/README.md index 1a1a07c..965056c 100644 --- a/README.md +++ b/README.md @@ -1,25 +1,29 @@ # ElectricAdvantage -Electric Advantage adds electric machines, generators, automation, and infrastructure to Power Advantage for Minecraft 1.12.2. +Electric Advantage adds electric machines, generation, storage, automation, and defence to Power Advantage for Minecraft 1.13.2. -## Building Minecraft 1.12.2 +Every crafting and vanilla smelting variant has an ingredient-triggered recipe-book discovery. See the [shared material checklist and discovery tests](https://github.com/MinecraftModDevelopmentMods/PowerAdvantage/blob/master-1.13.2/docs/1.13/RECIPE-DISCOVERY.md) and [manufacturing progression audit](https://github.com/MinecraftModDevelopmentMods/PowerAdvantage/blob/master-1.13.2/docs/1.13/MANUFACTURING-PROGRESSION.md). Regenerate unlock JSON after recipe changes with `node tools/generate-recipe-unlocks.js`; `check` audits recipe coverage and criteria. Custom machine and crushing recipes are not crafting-book entries. -The `master-1.12.2` build uses ForgeGradle 7.0.34 and Gradle 9.6.1. Run Gradle with Java 17; Gradle resolves the Java 8 toolchain used for compilation. +## Building Minecraft 1.13.2 -First build the pinned sibling PowerAdvantage development jar: +The `master-1.13.2` build uses ForgeGradle 7.0.34 and Gradle 9.6.1. Run Gradle with Java 17; production code is compiled for Java 8. + +Build the pinned PowerAdvantage, Base Metals, and OreSpawn deobf jars first. +Exact source commits and checksums are recorded in `gradle.properties`; CI builds the same commits. +With the standard sibling layout: ```text cd ..\..\PowerAdvantage gradlew.bat deobfJar ``` -Then build and audit ElectricAdvantage: +Then build ElectricAdvantage: ```text gradlew.bat clean check build javadoc verifyReleaseDependencies verifyReleaseArtifacts writeReleaseChecksums verifyEclipseProductionClasspath ``` -Release jars are written to `build/libs`. The deobfuscated development jar is written to `build/libs-dev` by `deobfJar` or `build`. +Alternative layouts may pass `-PpowerAdvantageDeobfJar=`, `-PbaseMetalsDeobfJar=`, and `-PoreSpawnDeobfJar=`. None of those dependencies is embedded. For Eclipse, import this repository as an existing Gradle project and run: @@ -27,4 +31,15 @@ For Eclipse, import this repository as an existing Gradle project and run: gradlew.bat cleanEclipse verifyEclipseProductionClasspath ``` -Power Advantage is required at compile time and runtime but is never bundled. Base Metals remains a required distribution dependency while its integrations stay reflection-based and absent from the compile classpath. +Refresh the project in Eclipse, allow its Java build to finish, and launch the generated `runClient.launch`. Eclipse launches discover ElectricAdvantage from `bin/main`; command-line Gradle launches use `build/forge-run-mod-classes/main`. The Eclipse audit checks that discovery points at the same production output Eclipse compiles into. + +The Eclipse resource root is `build/resources/main`, so its builder copies expanded mod metadata rather than raw source templates. Refresh the Gradle project and clean/rebuild after this setup changes. After resource/version edits, run `processResources` or refresh Gradle before launching; do not put `src/main/resources` back on the Eclipse Java build path. + +## Compatibility + +For an all-Advantage play-test, run `prepareCombinedEclipseLaunch` in the sibling PowerAdvantage checkout and select its `runClientAllAdvantage.launch`. The [native resource probe](https://github.com/MinecraftModDevelopmentMods/PowerAdvantage/blob/master-1.13.2/test-rig/client-resources/README.md) checks models, textures and names across all three mods. These resource checks do not replace gameplay testing. + +The implementation namespace is `zone.moddev.mc.electricadvantage`. Runtime identities, registries, tile/entity IDs, NBT, recipes, tags, OreSpawn provider IDs, and assets remain stable. Electric registers its legacy state, tile, and hydroturbine aliases with PowerAdvantage's shared migration hook. + +The RF- and Tech Reborn-labelled converters belong to Power Advantage and now use Forge Energy. +Read the [1.13 migration guide](https://github.com/MinecraftModDevelopmentMods/PowerAdvantage/blob/master-1.13.2/docs/1.13/MIGRATION.md) before upgrading, and always use a backup. The [qualification notes](https://github.com/MinecraftModDevelopmentMods/PowerAdvantage/blob/master-1.13.2/docs/1.13/CURRENT-QUALIFICATION.md) list the tested scenarios and remaining gaps. diff --git a/build.gradle b/build.gradle index d4a9af2..90bb6ad 100644 --- a/build.gradle +++ b/build.gradle @@ -43,7 +43,10 @@ ext.display_version = project.mod_version ext.release_tag = project.mod_version java { - toolchain.languageVersion = JavaLanguageVersion.of(8) + toolchain { + languageVersion = JavaLanguageVersion.of(8) + vendor = JvmVendorSpec.ADOPTIUM + } withSourcesJar() withJavadocJar() } @@ -51,6 +54,7 @@ java { tasks.withType(JavaCompile).configureEach { javaCompiler = javaToolchains.compilerFor { languageVersion = JavaLanguageVersion.of(8) + vendor = JvmVendorSpec.ADOPTIUM } sourceCompatibility = JavaVersion.VERSION_1_8 targetCompatibility = JavaVersion.VERSION_1_8 @@ -66,13 +70,14 @@ tasks.withType(Javadoc).configureEach { } tasks.withType(AbstractArchiveTask).configureEach { + includeEmptyDirs = false preserveFileTimestamps = false reproducibleFileOrder = true } def archiveTextSuffixes = [ '.cfg', '.css', '.html', '.info', '.java', '.js', '.json', '.lang', - '.mcmeta', '.md', '.properties', '.txt', '.xml' + '.mcmeta', '.md', '.properties', '.toml', '.txt', '.xml' ] def archiveTextPatterns = archiveTextSuffixes.collect { "**/*${it}".toString() } archiveTextPatterns.addAll(['**/element-list', '**/package-list']) @@ -86,42 +91,53 @@ minecraft { mappings channel: project.mapping_channel, version: project.mapping_version String configuredRunDirectory = providers.gradleProperty('electricAdvantageRunDirectory') .getOrElse('run') + def forgeRunModClassesDirectory = layout.buildDirectory.dir('forge-run-mod-classes/main') + def forgeMainOutputPath = forgeRunModClassesDirectory.get().asFile.absolutePath + def mainModClasses = "${mod_id}%%${forgeMainOutputPath}${File.pathSeparator}${mod_id}%%${forgeMainOutputPath}" + def forge25RunTargets = [client: 'fmluserdevclient', server: 'fmluserdevserver', data: 'fmluserdevdata'] runs { configureEach { + mainClass = 'net.minecraftforge.userdev.LaunchTesting' workingDir.convention layout.projectDirectory.dir(configuredRunDirectory) - systemProperty 'forge.logging.console.level', 'debug' + systemProperty 'forge.logging.markers', 'REGISTRIES' + systemProperty 'forge.logging.console.level', 'info' + mods { electricadvantage { source sourceSets.main } } + environment 'target', forge25RunTargets[name] + environment 'MCP_MAPPINGS', "${mapping_channel}_${mapping_version}" + environment 'MCP_VERSION', mcp_version + environment 'FORGE_VERSION', forge_version + environment 'FORGE_GROUP', 'net.minecraftforge' + environment 'MC_VERSION', minecraft_version + environment 'MOD_CLASSES', mainModClasses } register('client') register('server') { args '--nogui' } + register('data') { + workingDir.convention layout.projectDirectory.dir('run-data') + args '--mod', project.mod_id, '--all', '--output', file('src/generated/resources/'), + '--existing', file('src/main/resources/') + } } } -// Forge 1.12 expects each development mod to expose classes and resources from -// one classpath root. ForgeGradle 7 splits those outputs, so merge only the -// launch output without contaminating the canonical source-set directories. -def forge12DevelopmentOutput = layout.buildDirectory.dir('forge12-development/main') -def syncForge12DevelopmentResources = tasks.register('syncForge12DevelopmentResources', Sync) { +sourceSets.main.resources { + srcDir 'src/generated/resources' + exclude '.cache/**' +} + +def forgeRunModClassesDirectory = layout.buildDirectory.dir('forge-run-mod-classes/main') +def prepareForgeRunModClasses = tasks.register('prepareForgeRunModClasses', Sync) { group = 'ide' - description = 'Merges classes and processed resources for Forge 1.12 Gradle launches.' + description = 'Merges classes and processed resources for Forge 1.13 launches.' dependsOn tasks.named('classes') - from tasks.named('compileJava', JavaCompile).flatMap { it.destinationDirectory } - from sourceSets.main.output.resourcesDir - into forge12DevelopmentOutput -} -tasks.configureEach { - if (name == 'runClient' || name == 'runServer') { - dependsOn syncForge12DevelopmentResources - doFirst { - Set splitMainOutputs = [ - tasks.named('compileJava', JavaCompile).get().destinationDirectory.get().asFile, - sourceSets.main.output.resourcesDir - ] as Set - classpath = files(forge12DevelopmentOutput, classpath.filter { - !splitMainOutputs.contains(it) - }) - } + from sourceSets.main.output + into forgeRunModClassesDirectory +} +tasks.withType(JavaExec).configureEach { + if (name in ['runClient', 'runServer', 'runData']) { + dependsOn prepareForgeRunModClasses } } @@ -159,24 +175,51 @@ if (!powerAdvantageDeobfJar.isFile()) { + "Run gradlew.bat deobfJar in ../../PowerAdvantage first, or pass " + "-PpowerAdvantageDeobfJar=.") } +// These defaults follow the sibling MMD checkout layout. They are constants +// here so another developer can override them without editing the script. +def baseMetalsDeobfJar = file(providers.gradleProperty('baseMetalsDeobfJar') + .getOrElse('../../../../BaseMetals/BaseMetals 113/BaseMetals/build/libs-dev/' + + 'BaseMetals-3.0.1.113021-deobf.jar')) +if (!baseMetalsDeobfJar.isFile()) { + throw new GradleException("Missing Base Metals deobf jar at ${baseMetalsDeobfJar}. " + + "Build Base Metals 1.13 first, or pass -PbaseMetalsDeobfJar=.") +} +def oreSpawnDeobfJar = file(providers.gradleProperty('oreSpawnDeobfJar') + .getOrElse('../../../../MinecraftMineralogy/OS113/OreSpawn/build/libs-dev/' + + 'OreSpawn-4.1.0.113021-deobf.jar')) +if (!oreSpawnDeobfJar.isFile()) { + throw new GradleException("Missing OreSpawn deobf jar at ${oreSpawnDeobfJar}. " + + "Build OreSpawn 1.13 first, or pass -PoreSpawnDeobfJar=.") +} dependencies { implementation minecraft.dependency( "net.minecraftforge:forge:${project.minecraft_version}-${project.forge_version}") - // Mavenizer's legacy metadata omits this compile-time Minecraft library. - compileOnly 'org.lwjgl.lwjgl:lwjgl_util:2.9.4-nightly-20150209' - // PowerAdvantage is required at runtime but remains a separate mod jar. compileOnly files(powerAdvantageDeobfJar) runtimeOnly files(powerAdvantageDeobfJar) + compileOnly files(baseMetalsDeobfJar) + runtimeOnly files(baseMetalsDeobfJar) + // Required transitively by the coordinated PowerAdvantage/Base Metals development runtime. + compileOnly files(oreSpawnDeobfJar) + runtimeOnly files(oreSpawnDeobfJar) + testImplementation 'junit:junit:4.13.2' + testImplementation files(powerAdvantageDeobfJar, baseMetalsDeobfJar, oreSpawnDeobfJar) } tasks.named('processResources', ProcessResources) { filteringCharset = 'UTF-8' - inputs.property('version', project.version) - inputs.property('mcversion', project.minecraft_version) - filesMatching('mcmod.info') { - expand version: project.version, mcversion: project.minecraft_version + inputs.properties([ + version: project.version, + minecraft_version_range: project.minecraft_version_range, + forge_version_range: project.forge_version_range, + loader_version_range: project.loader_version_range + ]) + filesMatching('META-INF/mods.toml') { + expand version: project.version, + minecraft_version_range: project.minecraft_version_range, + forge_version_range: project.forge_version_range, + loader_version_range: project.loader_version_range } filesMatching(archiveTextPatterns, normalizeArchiveLineEndings) } @@ -298,13 +341,13 @@ tasks.register('verifyReleaseConfiguration') { group = 'verification' description = 'Validates release identity, target metadata, and dependency policy.' doLast { - if (project.mod_version != '2.2.1.112021') { + if (project.mod_version != '2.2.5.113021') { throw new GradleException("Unexpected ElectricAdvantage release version: ${project.mod_version}") } - if (project.minecraft_version != '1.12.2' - || project.forge_version != '14.23.5.2859' - || project.mapping_channel != 'stable' - || project.mapping_version != '39-1.12') { + if (project.minecraft_version != '1.13.2' + || project.forge_version != '25.0.223' + || project.mapping_channel != 'snapshot' + || project.mapping_version != '20180921-1.13') { throw new GradleException('Unexpected Minecraft, Forge, or mappings target') } if (project.loader_name != 'forge' || project.loader_code != '1' @@ -314,7 +357,7 @@ tasks.register('verifyReleaseConfiguration') { throw new GradleException('Unexpected release dispatcher target metadata') } if (project.mod_id != 'electricadvantage' - || project.group.toString() != 'com.mcmoddev.electricadvantage' + || project.group.toString() != 'zone.moddev.mc.electricadvantage' || base.archivesName.get() != 'ElectricAdvantage' || project.mod_license != 'GPL-3.0-only' || project.curseforge_project_id != '240985') { @@ -322,34 +365,30 @@ tasks.register('verifyReleaseConfiguration') { } if (project.cf_requirements != 'power-advantage,base-metals' || project.cf_optionals != '' - || project.cf_versions != '1.12.2') { + || project.cf_versions != '1.13.2') { throw new GradleException('Unexpected CurseForge dependency or game-version metadata') } - if (project.poweradvantage_version != '2.4.1.112021' + if (project.poweradvantage_version != '2.4.4.113021' || project.poweradvantage_source_repository != 'MinecraftModDevelopmentMods/PowerAdvantage' - || project.poweradvantage_source_ref != '40811a0be37174a0633998eb3d820d95755d35e8' - || project.poweradvantage_deobf_sha256 != 'DE7759033A094718E1341CC82B9912425A24A035DBD7F91D590D8B921F08DEB2') { + || !(project.poweradvantage_source_ref ==~ /[a-f0-9]{40}/) + || !(project.poweradvantage_deobf_sha256 ==~ /[A-F0-9]{64}/)) { throw new GradleException('Unexpected PowerAdvantage compile dependency identity') } - ['.github/workflows/ci.yml', '.github/workflows/codeql-analysis.yml'].each { workflowPath -> - String workflow = file(workflowPath).getText('UTF-8') - if (!workflow.contains('repository: ' + project.poweradvantage_source_repository) - || !workflow.contains('ref: ' + project.poweradvantage_source_ref)) { - throw new GradleException("${workflowPath} does not build the pinned PowerAdvantage source") - } - } String mainSource = file( - 'src/main/java/com/mcmoddev/electricadvantage/ElectricAdvantage.java').getText('UTF-8') + 'src/main/java/zone/moddev/mc/electricadvantage/ElectricAdvantage.java').getText('UTF-8') if (!mainSource.contains('MODID = "electricadvantage"') - || !mainSource.contains('VERSION = "2.2.1.112021"') - || !mainSource.contains('dependencies = "required-after:poweradvantage;after:basemetals"')) { - throw new GradleException('ElectricAdvantage source identity or dependency policy changed') + || !mainSource.contains('VERSION = "2.2.5.113021"')) { + throw new GradleException('ElectricAdvantage source identity changed') } - def metadata = new JsonSlurper().parse(file('src/main/resources/mcmod.info')) - def mod = metadata instanceof List ? metadata.first() : metadata - if (mod.modid != 'electricadvantage' - || mod.url != 'https://github.com/MinecraftModDevelopmentMods/ElectricAdvantage') { - throw new GradleException('Source mcmod.info does not use the stable ElectricAdvantage identity') + String metadata = file('src/main/resources/META-INF/mods.toml').getText('UTF-8').replace('\r\n', '\n') + ['modId="electricadvantage"', 'modId="poweradvantage"', 'modId="basemetals"', + 'versionRange="[2.4.4.113021,3.0.0)"'].each { marker -> + if (!metadata.contains(marker)) { + throw new GradleException("Source mods.toml is missing ${marker}") + } + } + if (!metadata.contains('modId="basemetals"\nmandatory=false')) { + throw new GradleException('Base Metals must remain Forge-optional; CurseForge installs it for players') } } } @@ -368,8 +407,9 @@ tasks.register('verifyReleaseDependencies') { new ZipFile(powerAdvantageDeobfJar).withCloseable { zip -> ['cyano/poweradvantage/api/PoweredEntity.class', 'cyano/poweradvantage/api/GUIBlock.class', - 'com/mcmoddev/poweradvantage/conduitnetwork/ConduitRegistry.class', - 'com/mcmoddev/poweradvantage/init/Fluids.class'].each { required -> + 'cyano/poweradvantage/api/FluidCategoryRegistry.class', + 'zone/moddev/mc/poweradvantage/conduitnetwork/ConduitRegistry.class', + 'zone/moddev/mc/poweradvantage/init/Fluids.class'].each { required -> if (zip.getEntry(required) == null) { throw new GradleException("PowerAdvantage dependency is missing ${required}") } @@ -379,6 +419,19 @@ tasks.register('verifyReleaseDependencies') { throw new GradleException('PowerAdvantage dependency manifest has the wrong version') } } + String actualBaseMetalsHash = MessageDigest.getInstance('SHA-256') + .digest(baseMetalsDeobfJar.bytes).encodeHex().toString().toUpperCase() + if (!(actualBaseMetalsHash in [project.basemetals_deobf_sha256, + project.basemetals_deobf_lf_sha256])) { + throw new GradleException("Base Metals SHA-256 is ${actualBaseMetalsHash}, expected " + + project.basemetals_deobf_sha256) + } + String actualOreSpawnHash = MessageDigest.getInstance('SHA-256') + .digest(oreSpawnDeobfJar.bytes).encodeHex().toString().toUpperCase() + if (actualOreSpawnHash != project.orespawn_deobf_sha256) { + throw new GradleException("OreSpawn SHA-256 is ${actualOreSpawnHash}, expected " + + project.orespawn_deobf_sha256) + } Set compileFiles = configurations.compileClasspath.files.collect { it.canonicalFile } as Set if (!compileFiles.contains(powerAdvantageDeobfJar.canonicalFile)) { @@ -388,10 +441,15 @@ tasks.register('verifyReleaseDependencies') { if (!runtimeFiles.contains(powerAdvantageDeobfJar.canonicalFile)) { throw new GradleException('PowerAdvantage is missing from runtimeClasspath') } + if (!runtimeFiles.contains(baseMetalsDeobfJar.canonicalFile)) { + throw new GradleException('Base Metals is missing from runtimeClasspath') + } + if (!runtimeFiles.contains(oreSpawnDeobfJar.canonicalFile)) { + throw new GradleException('OreSpawn is missing from runtimeClasspath') + } List forbiddenRuntimeMods = runtimeFiles.collect { it.name.toLowerCase(Locale.ROOT) } .findAll { name -> - name.contains('basemetals') || name.contains('orespawn') - || name.contains('rf-api') || name.contains('reborncore') + name.contains('rf-api') || name.contains('reborncore') } if (!forbiddenRuntimeMods.isEmpty()) { throw new GradleException( @@ -438,31 +496,35 @@ tasks.register('verifyReleaseArtifacts') { File mainJar = new File(libs, expectedReleaseFiles.get()[0]) new ZipFile(mainJar).withCloseable { zip -> List names = zip.entries().collect { it.name } - ['mcmod.info', 'pack.mcmeta', - 'com/mcmoddev/electricadvantage/ElectricAdvantage.class', - 'com/mcmoddev/electricadvantage/machines/ElectricDrillTileEntity.class', - 'com/mcmoddev/electricadvantage/machines/ElectricPumpTileEntity.class', - 'com/mcmoddev/electricadvantage/machines/LaserTurretTileEntity.class', - 'assets/electricadvantage/lang/en_us.lang'].each { required -> + ['META-INF/mods.toml', 'pack.mcmeta', + 'zone/moddev/mc/electricadvantage/ElectricAdvantage.class', + 'zone/moddev/mc/electricadvantage/machines/ElectricDrillTileEntity.class', + 'zone/moddev/mc/electricadvantage/machines/ElectricPumpTileEntity.class', + 'zone/moddev/mc/electricadvantage/machines/HydroelectricGeneratorTileEntity.class', + 'zone/moddev/mc/electricadvantage/migration/ElectricLegacyMigrations.class', + 'zone/moddev/mc/electricadvantage/init/OreSpawnWorldGen.class', + 'assets/electricadvantage/lang/en_us.json', + 'data/electricadvantage/recipes/electric_conduit_plastic_ingot.json', + 'data/electricadvantage/advancements/recipes/integrated_circuit_copper_normal.json', + 'data/forge/tags/items/ores/lithium.json'].each { required -> if (!names.contains(required)) { throw new GradleException("Release jar is missing ${required}") } } ['agent-notes/', '.codex/', 'src/test/', 'fernflower_abstract_parameter_names.txt', - 'cyano/poweradvantage/', - 'com/mcmoddev/poweradvantage/', 'cyano/basemetals/', 'com/mcmoddev/lib/', - 'cyano/orespawn/', 'com/mcmoddev/orespawn/', 'cofh/api/', 'reborncore/', + 'cyano/poweradvantage/', + 'zone/moddev/mc/poweradvantage/', 'zone/moddev/mc/basemetals/', 'cyano/basemetals/', 'com/mcmoddev/lib/', + 'cyano/orespawn/', 'com/mcmoddev/orespawn/', 'cofh/api/', 'reborncore/', 'net/minecraft/', 'net/minecraftforge/'].each { forbidden -> if (names.any { it.contains(forbidden) }) { throw new GradleException("Release jar contains forbidden entry matching ${forbidden}") } } - def metadata = new JsonSlurper().parseText(zip.getInputStream(zip.getEntry('mcmod.info')) - .getText(StandardCharsets.UTF_8.name())) - def mod = metadata instanceof List ? metadata.first() : metadata - if (mod.modid != project.mod_id || mod.version != project.mod_version - || mod.mcversion != project.minecraft_version) { - throw new GradleException('Packaged mcmod.info identity, version, or target is incorrect') + String metadata = zip.getInputStream(zip.getEntry('META-INF/mods.toml')) + .getText(StandardCharsets.UTF_8.name()) + if (!metadata.contains('modId="electricadvantage"') + || !metadata.contains("version=\"${project.mod_version}\"")) { + throw new GradleException('Packaged mods.toml identity or version is incorrect') } def manifest = new Manifest(zip.getInputStream(zip.getEntry('META-INF/MANIFEST.MF'))).mainAttributes if (manifest.getValue('Implementation-Version') != project.mod_version @@ -486,8 +548,8 @@ tasks.register('verifyReleaseArtifacts') { } new ZipFile(new File(libs, expectedReleaseFiles.get()[1])).withCloseable { sourceZip -> - if (sourceZip.getEntry('com/mcmoddev/electricadvantage/ElectricAdvantage.java') == null - || sourceZip.getEntry('com/mcmoddev/electricadvantage/machines/ElectricDrillTileEntity.java') == null) { + if (sourceZip.getEntry('zone/moddev/mc/electricadvantage/ElectricAdvantage.java') == null + || sourceZip.getEntry('zone/moddev/mc/electricadvantage/machines/ElectricDrillTileEntity.java') == null) { throw new GradleException('Sources jar is missing required ElectricAdvantage sources') } } @@ -504,7 +566,9 @@ tasks.register('writeReleaseChecksums') { description = 'Writes SHA-256 checksums for the audited release jars.' dependsOn tasks.named('verifyReleaseArtifacts') def outputFile = layout.buildDirectory.file('release/SHA256SUMS') + inputs.files(provider { expectedReleaseFiles.get().collect { layout.buildDirectory.file("libs/${it}").get().asFile } }) outputs.file(outputFile) + inputs.files(expectedReleaseFiles.map { names -> names.collect { layout.buildDirectory.file("libs/${it}").get().asFile } }) doLast { File output = outputFile.get().asFile output.parentFile.mkdirs() @@ -654,10 +718,24 @@ eclipse { classpath { downloadSources = true downloadJavadoc = true + file.whenMerged { model -> + // Eclipse must not overwrite expanded metadata with src/main/resources templates. + def rawResources = sourceSets.main.resources.srcDirs.collect { relativePath(it).replace('\\', '/') } + model.entries.removeAll { entry -> + entry instanceof org.gradle.plugins.ide.eclipse.model.SourceFolder + && (rawResources.contains(entry.path) || entry.path == 'build/resources/main') + } + def processed = new org.gradle.plugins.ide.eclipse.model.SourceFolder('build/resources/main', 'bin/main') + processed.entryAttributes['gradle_scope'] = 'main' + processed.entryAttributes['gradle_used_by_scope'] = 'main,test' + model.entries.add(processed) + } } synchronizationTasks 'isolateEclipseProductionRuns' } +tasks.named('eclipseClasspath') { dependsOn tasks.named('processResources') } + tasks.register('configureEclipseBuildship') { group = 'ide' description = 'Creates Buildship preferences for ForgeGradle 7 Eclipse imports.' @@ -698,7 +776,7 @@ tasks.register('isolateEclipseProductionRuns') { } } } - // ForgeGradle 7's legacy 1.12 generator leaves this token unresolved, + // ForgeGradle's legacy launch generator can leave this token unresolved, // so write the target version into every generated launch explicitly. fileTree(project.projectDir) { include 'run*.launch' @@ -707,6 +785,21 @@ tasks.register('isolateEclipseProductionRuns') { contents = contents.replace( 'key="MC_VERSION" value="${MC_VERSION}"', "key=\"MC_VERSION\" value=\"${project.minecraft_version}\"") + if (launch.name in ['runClient.launch', 'runServer.launch', 'runData.launch']) { + // Eclipse compiles into bin/main, not Gradle's merged run output. + def launchXml = new groovy.xml.XmlSlurper().parseText(contents) + def modClasses = launchXml.mapAttribute.find { + it.@key.text() == 'org.eclipse.debug.core.environmentVariables' + }.mapEntry.findAll { it.@key.text() == 'MOD_CLASSES' } + if (modClasses.size() != 1) { + throw new GradleException("${launch.name} must define one MOD_CLASSES entry") + } + String mainOutput = file('bin/main').absolutePath + String eclipseModClasses = "${project.mod_id}%%${mainOutput}" + + "${File.pathSeparator}${project.mod_id}%%${mainOutput}" + modClasses[0].@value = eclipseModClasses + contents = groovy.xml.XmlUtil.serialize(launchXml) + } launch.setText(contents.replace('\r\n', '\n'), 'UTF-8') } ['runClient.launch', 'runServer.launch'].each { name -> @@ -795,27 +888,58 @@ tasks.register('verifyEclipseProductionClasspath') { || !projectMetadata.contains('org.eclipse.buildship.core.gradleprojectbuilder')) { throw new GradleException('Eclipse project metadata is missing its Buildship nature or builder') } - File eclipseModMetadata = file('bin/main/mcmod.info') - def eclipseMetadata = new JsonSlurper().parseText(eclipseModMetadata.getText('UTF-8')) - def eclipseMod = eclipseMetadata instanceof List ? eclipseMetadata.first() : eclipseMetadata - if (eclipseMod.modid != project.mod_id || eclipseMod.version != project.mod_version - || eclipseMod.mcversion != project.minecraft_version) { + File eclipseModMetadata = file('bin/main/META-INF/mods.toml') + String eclipseMetadata = eclipseModMetadata.getText('UTF-8') + if (!eclipseMetadata.contains("modId=\"${project.mod_id}\"") + || !eclipseMetadata.contains("version=\"${project.mod_version}\"")) { throw new GradleException('Eclipse output contains incorrect mod metadata') } + def eclipseClasspath = new groovy.xml.XmlSlurper().parse(file('.classpath')) + def processedResources = eclipseClasspath.classpathentry.findAll { + it.@kind.text() == 'src' && it.@path.text() == 'build/resources/main' + } + def rawResourcePaths = sourceSets.main.resources.srcDirs.collect { relativePath(it).replace('\\', '/') } + if (processedResources.size() != 1 || processedResources[0].@output.text() != 'bin/main' + || eclipseClasspath.classpathentry.any { + it.@kind.text() == 'src' && rawResourcePaths.contains(it.@path.text()) + }) { + throw new GradleException('Eclipse must copy processed resources, never raw mod metadata templates') + } + String mainOutput = eclipseClasspath.classpathentry.find { + it.@kind.text() == 'src' && it.@path.text() == 'src/main/java' + }.@output.text() + if (file(mainOutput).canonicalFile != file('bin/main').canonicalFile) { + throw new GradleException('Eclipse production classes must use bin/main') + } + String expectedModClasses = "${project.mod_id}%%${file(mainOutput).absolutePath}" + + "${File.pathSeparator}${project.mod_id}%%${file(mainOutput).absolutePath}" + ['runClient.launch', 'runServer.launch', 'runData.launch'].each { name -> + def launch = new groovy.xml.XmlSlurper().parse(file(name)) + String modClasses = launch.mapAttribute.find { + it.@key.text() == 'org.eclipse.debug.core.environmentVariables' + }.mapEntry.find { it.@key.text() == 'MOD_CLASSES' }.@value.text() + if (modClasses != expectedModClasses) { + throw new GradleException("${name} does not discover the Eclipse production mod in bin/main") + } + } ['runClient.launch', 'runServer.launch'].each { name -> + def launch = new groovy.xml.XmlSlurper().parse(file(name)) String contents = file(name).getText('UTF-8').replace('\\', '/') - if (!contents.contains('org.eclipse.jdt.launching.ATTR_EXCLUDE_TEST_CODE') - || !contents.contains('value="true"') + if (launch.booleanAttribute.find { + it.@key.text() == 'org.eclipse.jdt.launching.ATTR_EXCLUDE_TEST_CODE' + }.@value.text() != 'true' || contents.contains('src/test') || contents.contains('bin/test')) { throw new GradleException("${name} does not isolate production code") } - if (!contents.contains('PROJECT_ATTR" value="ElectricAdvantage"')) { + if (launch.stringAttribute.find { + it.@key.text() == 'org.eclipse.jdt.launching.PROJECT_ATTR' + }.@value.text() != 'ElectricAdvantage') { throw new GradleException("${name} targets the wrong Eclipse project") } if (contents.contains('org.eclipse.buildship.core.gradleclasspathcontainer')) { throw new GradleException("${name} exposes compileOnly dependencies at runtime") } - ['BaseMetals', 'OreSpawn', 'RF-API.jar', 'RebornCore-1.12.2'].each { forbiddenDependency -> + ['RF-API.jar', 'RebornCore-1.12.2'].each { forbiddenDependency -> if (contents.toLowerCase(Locale.ROOT).contains(forbiddenDependency.toLowerCase(Locale.ROOT))) { throw new GradleException( "${name} includes forbidden runtime dependency ${forbiddenDependency}") @@ -824,6 +948,10 @@ tasks.register('verifyEclipseProductionClasspath') { if (!contents.contains(powerAdvantageDeobfJar.canonicalPath.replace('\\', '/'))) { throw new GradleException("${name} is missing the required PowerAdvantage runtime") } + if (!contents.contains(baseMetalsDeobfJar.canonicalPath.replace('\\', '/')) + || !contents.contains(oreSpawnDeobfJar.canonicalPath.replace('\\', '/'))) { + throw new GradleException("${name} is missing the required Base Metals or OreSpawn runtime") + } if (!contents.contains("forge-${project.minecraft_version}-${project.forge_version}")) { throw new GradleException("${name} is missing the Forge development runtime") } @@ -840,9 +968,9 @@ tasks.register('verifyEclipseProductionClasspath') { throw new GradleException( "${name} does not preserve the Forge bootstrap classpath order") } - if (contents.contains('${MC_VERSION}') - || !contents.contains( - "key=\"MC_VERSION\" value=\"${project.minecraft_version}\"")) { + if (contents.contains('${MC_VERSION}') || launch.mapAttribute.find { + it.@key.text() == 'org.eclipse.debug.core.environmentVariables' + }.mapEntry.find { it.@key.text() == 'MC_VERSION' }.@value.text() != project.minecraft_version) { throw new GradleException("${name} does not define a literal Minecraft version") } } @@ -858,12 +986,16 @@ tasks.register('verifyModelAssets') { File modelRoot = new File(assetRoot, 'models') File blockstateRoot = new File(assetRoot, 'blockstates') inputs.dir(assetRoot) + inputs.dir(new File(resourceRoot, 'data')) inputs.file(powerAdvantageDeobfJar) doLast { fileTree(assetRoot) { include '**/*.json' }.files.sort().each { File jsonFile -> new JsonSlurper().parse(jsonFile) } + fileTree(new File(resourceRoot, 'data')) { include '**/*.json' }.files.sort().each { File jsonFile -> + new JsonSlurper().parse(jsonFile) + } Set powerAdvantageAssets = new ZipFile(powerAdvantageDeobfJar).withCloseable { zip -> zip.entries().collect { it.name } as Set @@ -903,7 +1035,7 @@ tasks.register('verifyModelAssets') { if (node instanceof Map) { node.each { key, value -> if (key == 'model' && value instanceof String) { - verifyReference(value, 'models/block', sourcePath) + verifyReference(value, 'models', sourcePath) } else { verifyBlockstateModels(value, sourcePath) } @@ -913,7 +1045,12 @@ tasks.register('verifyModelAssets') { } } fileTree(blockstateRoot) { include '**/*.json' }.files.sort().each { File blockstateFile -> - verifyBlockstateModels(new JsonSlurper().parse(blockstateFile), blockstateFile.path) + def blockstate = new JsonSlurper().parse(blockstateFile) + if (blockstate.containsKey('forge_marker') || (blockstate.variants instanceof Map + && (blockstate.variants.containsKey('normal') || blockstate.variants.containsKey('fluid')))) { + throw new GradleException("${blockstateFile.path} uses removed legacy blockstate selectors") + } + verifyBlockstateModels(blockstate, blockstateFile.path) } } } @@ -957,8 +1094,54 @@ tasks.register('verifyRepositoryHygiene') { } } +tasks.register('verifyRecipeTagGuards') { + group = 'verification' + description = 'Rejects recipes that can collapse when a Forge material tag is empty.' + File recipeRoot = file("src/main/resources/data/${project.mod_id}/recipes") + inputs.dir(recipeRoot) + doLast { + Closure collectTags + collectTags = { Object node, Set tags -> + if (node instanceof Map) { + node.each { key, value -> + if (key == 'conditions' || key == 'result') return + if (key == 'tag' && value instanceof String && value.startsWith('forge:')) { + tags.add(value) + } else { + collectTags(value, tags) + } + } + } else if (node instanceof Collection) { + node.each { collectTags(it, tags) } + } + } + fileTree(recipeRoot) { include '**/*.json' }.files.sort().each { File recipeFile -> + Map recipe = new JsonSlurper().parse(recipeFile) as Map + Set tags = [] as Set + collectTags(recipe, tags) + Collection conditions = (recipe.conditions ?: []) as Collection + if (conditions.any { !(it instanceof Map) }) { + throw new GradleException("${recipeFile.path} contains a non-object recipe condition") + } + Set guards = conditions + .findAll { it instanceof Map && it.type == 'poweradvantage:tag_not_empty' } + .collect { it.tag as String } as Set + Set emptyGuards = conditions.findAll { it.type == 'poweradvantage:tag_empty' } + .collect { it.tag as String } as Set + if (!(emptyGuards.intersect(guards)).isEmpty()) { + throw new GradleException("${recipeFile.path} requires the same tag to be empty and nonempty") + } + Set missing = tags - guards + if (!missing.isEmpty()) { + throw new GradleException("${recipeFile.path} lacks tag_not_empty guards for ${missing.sort()}") + } + } + } +} + tasks.named('check') { dependsOn tasks.named('verifyReleaseConfiguration') dependsOn tasks.named('verifyModelAssets') dependsOn tasks.named('verifyRepositoryHygiene') + dependsOn tasks.named('verifyRecipeTagGuards') } diff --git a/gradle.properties b/gradle.properties index bb0c2fc..5a58646 100644 --- a/gradle.properties +++ b/gradle.properties @@ -5,13 +5,14 @@ org.gradle.caching=true org.gradle.parallel=false net.minecraftforge.gradle.merge-source-sets=false -minecraft_version=1.12.2 -minecraft_version_range=[1.12.2] -forge_version=14.23.5.2859 -forge_version_range=[14.23.5.2859,) -loader_version_range=[14,) -mapping_channel=stable -mapping_version=39-1.12 +minecraft_version=1.13.2 +minecraft_version_range=[1.13.2] +forge_version=25.0.223 +forge_version_range=[25,) +loader_version_range=[25,) +mapping_channel=snapshot +mapping_version=20180921-1.13 +mcp_version=20190213.203750 loader_name=forge loader_code=1 @@ -24,16 +25,24 @@ curseforge_project_id=240985 mod_id=electricadvantage mod_name=Electric Advantage mod_license=GPL-3.0-only -mod_version=2.2.1.112021 -mod_group=com.mcmoddev.electricadvantage +mod_version=2.2.5.113021 +mod_group=zone.moddev.mc.electricadvantage mod_authors=DrCyano mod_description=Electric-powered machines and infrastructure for the Power Advantage platform. cf_requirements=power-advantage,base-metals cf_optionals= -cf_versions=1.12.2 +cf_versions=1.13.2 -poweradvantage_version=2.4.1.112021 +poweradvantage_version=2.4.4.113021 poweradvantage_source_repository=MinecraftModDevelopmentMods/PowerAdvantage -poweradvantage_source_ref=40811a0be37174a0633998eb3d820d95755d35e8 -poweradvantage_deobf_sha256=DE7759033A094718E1341CC82B9912425A24A035DBD7F91D590D8B921F08DEB2 +poweradvantage_source_ref=6a845ad68eb1e34dcdd793dceb9cb528be22cedf +poweradvantage_deobf_sha256=160F29590913A2DA0637E710458DC8AEF8D4CC3883EA3B0E2E258C70240BDE02 + +basemetals_version=3.0.1.113021 +basemetals_deobf_sha256=2E4B0F619AD6B516A341DD332FABB66FE882A9DBA8E5C74F5BB52942302CFD18 +# Same pinned source and class bytes, with a clean LF checkout on Linux. +basemetals_deobf_lf_sha256=D1843CFAB23E7DB4B8A64ADB280D7EA51E3909B8E3490D4F5D471F0C94E1D0BF + +orespawn_version=4.1.0.113021 +orespawn_deobf_sha256=F5A015584000CCEF0E94D8BB567E7B75603B37F10A88BFC5A129176D487BB038 diff --git a/src/main/java/com/mcmoddev/electricadvantage/ElectricAdvantage.java b/src/main/java/com/mcmoddev/electricadvantage/ElectricAdvantage.java deleted file mode 100644 index 87f47c1..0000000 --- a/src/main/java/com/mcmoddev/electricadvantage/ElectricAdvantage.java +++ /dev/null @@ -1,166 +0,0 @@ -package com.mcmoddev.electricadvantage; - -import com.mcmoddev.electricadvantage.init.*; -import com.mcmoddev.electricadvantage.util.crafting.RecipeDeconstructor; -import net.minecraftforge.common.config.Configuration; -import net.minecraftforge.fml.common.FMLLog; -import net.minecraftforge.fml.common.Mod; -import net.minecraftforge.fml.common.Mod.EventHandler; -import net.minecraftforge.fml.common.event.FMLInitializationEvent; -import net.minecraftforge.fml.common.event.FMLPostInitializationEvent; -import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - -import java.io.IOException; -import java.nio.charset.Charset; -import java.nio.file.Files; -import java.nio.file.Path; -import java.nio.file.Paths; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Set; - -@Mod(modid = ElectricAdvantage.MODID, version = ElectricAdvantage.VERSION, name=ElectricAdvantage.NAME, - dependencies = "required-after:poweradvantage;after:basemetals", - acceptedMinecraftVersions = "[1.12.2]") -public class ElectricAdvantage -{/** The identifier for this mod */ - public static final String MODID = "electricadvantage"; - /** The display name for this mod */ - public static final String NAME = "Electric Advantage"; - /** The version of this mod, in the format major.minor.update */ - public static final String VERSION = "2.2.1.112021"; - - public static ElectricAdvantage INSTANCE = null; - - public final Set PLASTIC_FLUID_MATERIALS = new HashSet<>(); - - // TODO: figure out why metal blocks are causing the Automated Assembler to hang and time-out players from a server - - public String LASER_SOUND = "block.note.bass"; - /** - * Pre-initialization step. Used for initializing objects and reading the - * config file - * @param event FML event object - */ - @EventHandler - public void preInit(FMLPreInitializationEvent event) - { - INSTANCE = this; - Entities.registerDataFixers(); - - Configuration config = new Configuration(event.getSuggestedConfigurationFile()); - config.load(); - - RecipeDeconstructor.RECURSION_LIMIT = config.getInt("recursion_limit", "fabricator", RecipeDeconstructor.RECURSION_LIMIT, - 1, 255, - "Prevents circular recipes from crashing the fabricator machine. You may need to increase this \n" -+ "number to fabricate especially complex recipes. If fabricators are causing too much server lag, " -+ "try reducing this number."); - - Path orespawnFolder = Paths.get(event.getSuggestedConfigurationFile().toPath().getParent().toString(),"orespawn"); - Path orespawnFile = Paths.get(orespawnFolder.toString(),MODID+".json"); - if(!Files.exists(orespawnFile)){ - try{ - Files.createDirectories(orespawnFile.getParent()); - Files.write(orespawnFile, Arrays.asList(Data.ORESPAWN_FILE_CONTENTS.split("\n")), Charset.forName("UTF-8")); - } catch (IOException e) { - FMLLog.severe(MODID+": Error: Failed to write file "+orespawnFile); - } - } - - LASER_SOUND = config.getString("laser_sound", "options", LASER_SOUND, "Set the sound to use when the laser fires"); - - PLASTIC_FLUID_MATERIALS.addAll(Arrays.asList(config.getString("petrolplastic_fluids", "options", - "refined_oil;oil", "Semicollon-delemited list of the names of fluids that can be used to make plastic") - .split(";"))); - - config.save(); - - - Blocks.init(); - Items.init(); - TreasureChests.init(config.getConfigFile().toPath().getParent()); - - - if(event.getSide() == Side.CLIENT){ - clientPreInit(event); - } - if(event.getSide() == Side.SERVER){ - serverPreInit(event); - } - } - - @SideOnly(Side.CLIENT) - private void clientPreInit(FMLPreInitializationEvent event){ - // client-only code - } - @SideOnly(Side.SERVER) - private void serverPreInit(FMLPreInitializationEvent event){ - // client-only code - } - /** - * Initialization step. Used for adding renderers and most content to the - * game - * @param event FML event object - */ - @EventHandler - public void init(FMLInitializationEvent event) - { - Recipes.init(); - Entities.init(); - GUI.init(); - Enchantments.init(); - Villages.init(); - - if(event.getSide() == Side.CLIENT){ - clientInit(event); - } - if(event.getSide() == Side.SERVER){ - serverInit(event); - } - } - - - @SideOnly(Side.CLIENT) - private void clientInit(FMLInitializationEvent event){ - // client-only code - Items.registerItemRenders(event); - Blocks.registerItemRenders(event); - Entities.registerRenderers(); - - } - @SideOnly(Side.SERVER) - private void serverInit(FMLInitializationEvent event){ - // client-only code - } - - /** - * Post-initialization step. Used for cross-mod options - * @param event FML event object - */ - @EventHandler - public void postInit(FMLPostInitializationEvent event) - { - - if(event.getSide() == Side.CLIENT){ - clientPostInit(event); - } - if(event.getSide() == Side.SERVER){ - serverPostInit(event); - } - } - - @SideOnly(Side.CLIENT) - private void clientPostInit(FMLPostInitializationEvent event){ - // client-only code - } - @SideOnly(Side.SERVER) - private void serverPostInit(FMLPostInitializationEvent event){ - // server-only code - } - - - -} diff --git a/src/main/java/com/mcmoddev/electricadvantage/blocks/ElectricScaffoldBlock.java b/src/main/java/com/mcmoddev/electricadvantage/blocks/ElectricScaffoldBlock.java deleted file mode 100644 index 18e7d64..0000000 --- a/src/main/java/com/mcmoddev/electricadvantage/blocks/ElectricScaffoldBlock.java +++ /dev/null @@ -1,51 +0,0 @@ -package com.mcmoddev.electricadvantage.blocks; - -import com.mcmoddev.electricadvantage.init.Power; -import net.minecraft.block.material.Material; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.Entity; -import net.minecraft.util.BlockRenderLayer; -import net.minecraft.util.math.AxisAlignedBB; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - -import java.util.List; - -public class ElectricScaffoldBlock extends cyano.poweradvantage.api.simple.BlockSimplePowerConduit{ - - public ElectricScaffoldBlock() { - super(Material.PISTON, 0.75f, 2f/16f, Power.ELECTRIC_POWER); - } - - @Override - public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos) { - return FULL_BLOCK_AABB; - } - @Override - public void addCollisionBoxToList(final IBlockState bs, final World world, final BlockPos coord, - final AxisAlignedBB box, final List collisionBoxList, - final Entity entity, final boolean isActualState) { - super.addCollisionBoxToList(coord, box, collisionBoxList, FULL_BLOCK_AABB); - } - - @Override - public boolean isFullCube(IBlockState bs) { - return false; - } - - @Override - public boolean isOpaqueCube(IBlockState bs) { - return false; - } - - @SideOnly(Side.CLIENT) - @Override - public BlockRenderLayer getRenderLayer() { - return BlockRenderLayer.CUTOUT; - } - - -} diff --git a/src/main/java/com/mcmoddev/electricadvantage/blocks/Ore.java b/src/main/java/com/mcmoddev/electricadvantage/blocks/Ore.java deleted file mode 100644 index 401d755..0000000 --- a/src/main/java/com/mcmoddev/electricadvantage/blocks/Ore.java +++ /dev/null @@ -1,61 +0,0 @@ -package com.mcmoddev.electricadvantage.blocks; - -import net.minecraft.block.Block; -import net.minecraft.block.SoundType; -import net.minecraft.block.material.Material; -import net.minecraft.block.state.IBlockState; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; - -import java.util.Random; - -public class Ore extends Block { - - private final ItemStack dropItem; - private final int dropRange; - - - public Ore(ItemStack oreDrop, int pickLevel, int variation){ - super(Material.ROCK); - this.setCreativeTab(CreativeTabs.BUILDING_BLOCKS); - this.setHardness(1.5f+pickLevel); // dirt is 0.5, grass is 0.6, stone is 1.5,iron ore is 3, obsidian is 50 - this.setResistance(5*(1+pickLevel)); // dirt is 0, iron ore is 5, stone is 10, obsidian is 2000 - this.setSoundType(SoundType.STONE); // sound for stone - this.setHarvestLevel("pickaxe", pickLevel); - dropItem = oreDrop; - dropRange = variation+1; - } - - public Ore( int pickLevel){ - super(Material.ROCK); - this.setCreativeTab(CreativeTabs.BUILDING_BLOCKS); - this.setHardness(1.5f+pickLevel); // dirt is 0.5, grass is 0.6, stone is 1.5,iron ore is 3, obsidian is 50 - this.setResistance(5*(1+pickLevel)); // dirt is 0, iron ore is 5, stone is 10, obsidian is 2000 - this.setSoundType(SoundType.STONE); // sound for stone - this.setHarvestLevel("pickaxe", pickLevel); - dropItem = null; - dropRange = 0; - } - - @Override public Item getItemDropped(IBlockState bs, Random prng, int n) - { - if(dropItem == null){ - return super.getItemDropped(bs, prng, n); - } - return dropItem.getItem(); - } - @Override public int quantityDropped(Random prng) - { - final int baseCount; - if(dropItem == null){ - baseCount = 1; - } else { - baseCount = dropItem.getCount(); - } - if(dropRange > 1){ - return baseCount + prng.nextInt(dropRange); - } - return baseCount; - } -} diff --git a/src/main/java/com/mcmoddev/electricadvantage/blocks/PumpPipeBlock.java b/src/main/java/com/mcmoddev/electricadvantage/blocks/PumpPipeBlock.java deleted file mode 100644 index c695d13..0000000 --- a/src/main/java/com/mcmoddev/electricadvantage/blocks/PumpPipeBlock.java +++ /dev/null @@ -1,92 +0,0 @@ -package com.mcmoddev.electricadvantage.blocks; - -import net.minecraft.block.Block; -import net.minecraft.block.material.Material; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.Entity; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.math.AxisAlignedBB; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.Explosion; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; - -import java.util.Collections; -import java.util.List; -import java.util.Random; - -public class PumpPipeBlock extends Block{ - - - private static final AxisAlignedBB bounds = new AxisAlignedBB(0.25,0.00,0.25,0.75,1.00,0.75); - - public PumpPipeBlock() { - super(Material.IRON); - this.setHardness(5.0F).setResistance(10.0F); - } - - @Override - public Item getItemDropped(IBlockState bs, Random rand, int fortune){ - return null; - } - - @Override - public int quantityDropped(IBlockState state, int fortune, Random random){ - return 0; - } - - @Override public List getDrops(IBlockAccess world, BlockPos pos, IBlockState state, int fortune){ - return Collections.EMPTY_LIST; - } - - - //And this tell it that you can see through this block, and neighbor blocks should be rendered. - @Override - public boolean isOpaqueCube(IBlockState bs) - { - return false; - } - - @Override - public boolean isFullCube(IBlockState bs){ - return false; - } - @Override - public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos) { - return bounds; - } - @Override - public void addCollisionBoxToList(final IBlockState bs, final World world, final BlockPos coord, - final AxisAlignedBB box, final List collisionBoxList, - final Entity entity, final boolean isActualState) { - super.addCollisionBoxToList(coord, box, collisionBoxList, bounds); - } - - - - - @Override - public void onPlayerDestroy(World w, BlockPos coord, IBlockState state){ - destroyNeighbors(w,coord,w.getBlockState(coord)); - super.onPlayerDestroy(w, coord, state); - } - - @Override - public void onBlockExploded(World w, BlockPos coord, Explosion boom){ - destroyNeighbors(w,coord,w.getBlockState(coord)); - super.onBlockExploded(w, coord, boom); - } - - - private void destroyNeighbors(World w, BlockPos coord, IBlockState state) { - if(w.isRemote) return; - // destroy connected drill bits - BlockPos c = coord.down(); - while(c.getY() > 0 && w.getBlockState(c).getBlock() == this){ - w.setBlockToAir(c); - c = c.down(); - } - } - -} diff --git a/src/main/java/com/mcmoddev/electricadvantage/compat/BaseMetalsCompat.java b/src/main/java/com/mcmoddev/electricadvantage/compat/BaseMetalsCompat.java deleted file mode 100644 index 47541c4..0000000 --- a/src/main/java/com/mcmoddev/electricadvantage/compat/BaseMetalsCompat.java +++ /dev/null @@ -1,190 +0,0 @@ -package com.mcmoddev.electricadvantage.compat; - -import com.mcmoddev.electricadvantage.ElectricAdvantage; -import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; -import net.minecraft.init.Blocks; -import net.minecraft.init.Items; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fml.common.FMLLog; -import net.minecraftforge.fml.common.Loader; -import net.minecraftforge.oredict.OreDictionary; -import org.apache.logging.log4j.Level; - -import java.lang.reflect.Method; -import java.util.List; - -public final class BaseMetalsCompat { - - private static final String MODID = "basemetals"; - private static final String[] CRUSHER_REGISTRY_CLASSES = { - "cyano.basemetals.registry.CrusherRecipeRegistry", - "com.mcmoddev.lib.registry.CrusherRecipeRegistry" - }; - - private static boolean registryResolved = false; - private static Class crusherRegistryClass = null; - private static boolean missingRegistryLogged = false; - - private BaseMetalsCompat() { - throw new IllegalAccessError("Not an instantiable class"); - } - - public static boolean isLoaded() { - return Loader.isModLoaded(MODID); - } - - public static void addCrusherRecipe(String input, ItemStack output) { - if (!isLoaded()) return; - invokeCrusherRecipe(new Class[]{String.class, ItemStack.class}, new Object[]{input, output}); - } - - public static void addCrusherRecipe(Item input, ItemStack output) { - if (!isLoaded()) return; - invokeCrusherRecipe(new Class[]{Item.class, ItemStack.class}, new Object[]{input, output}); - } - - public static void addCrusherRecipe(Block input, ItemStack output) { - if (!isLoaded()) return; - invokeCrusherRecipe(new Class[]{Block.class, ItemStack.class}, new Object[]{input, output}); - } - - public static boolean hasCrusherRecipe(ItemStack input) { - return getCrusherRecipeOutput(input) != null; - } - - public static ItemStack getCrusherRecipeOutput(ItemStack input) { - if (input == null) return null; - if (isLoaded()) { - ItemStack output = getRecipeOutput(getCrusherRecipe(input, ItemStack.class)); - if (output != null) return output; - } - return getVanillaCrusherOutput(input); - } - - public static ItemStack getCrusherRecipeOutput(IBlockState input) { - if (input == null) return null; - if (isLoaded()) { - ItemStack output = getRecipeOutput(getCrusherRecipe(input, IBlockState.class)); - if (output != null) return output; - } - return getCrusherRecipeOutput(new ItemStack(input.getBlock(), 1, input.getBlock().getMetaFromState(input))); - } - - public static void registerOreDictionaryCopies(String targetName, String... sourceNames) { - for (String sourceName : sourceNames) { - List entries = OreDictionary.getOres(sourceName); - for (ItemStack entry : entries) { - if (entry != null) { - OreDictionary.registerOre(targetName, entry.copy()); - } - } - } - } - - private static Class getCrusherRegistryClass() { - if (!isLoaded()) return null; - if (registryResolved) return crusherRegistryClass; - - registryResolved = true; - for (String className : CRUSHER_REGISTRY_CLASSES) { - try { - crusherRegistryClass = Class.forName(className); - return crusherRegistryClass; - } catch (ClassNotFoundException e) { - // Try the next known BaseMetals package. - } - } - - if (!missingRegistryLogged) { - FMLLog.warning("%s: BaseMetals is loaded, but no known crusher recipe registry was found", ElectricAdvantage.MODID); - missingRegistryLogged = true; - } - return null; - } - - private static void invokeCrusherRecipe(Class[] parameterTypes, Object[] args) { - Class registry = getCrusherRegistryClass(); - if (registry == null) return; - - try { - Method method = registry.getMethod("addNewCrusherRecipe", parameterTypes); - method.invoke(null, args); - } catch (ReflectiveOperationException | RuntimeException e) { - FMLLog.log(Level.WARN, e, "%s: failed to add BaseMetals crusher recipe through %s", ElectricAdvantage.MODID, registry.getName()); - } - } - - private static Object getCrusherRecipe(Object input, Class inputType) { - Class registry = getCrusherRegistryClass(); - if (registry == null) return null; - - try { - Object instance = registry.getMethod("getInstance").invoke(null); - Method method = registry.getMethod("getRecipeForInputItem", inputType); - method.setAccessible(true); - return method.invoke(instance, input); - } catch (NoSuchMethodException e) { - return null; - } catch (ReflectiveOperationException | RuntimeException e) { - FMLLog.log(Level.WARN, e, "%s: failed to look up BaseMetals crusher recipe through %s", ElectricAdvantage.MODID, registry.getName()); - return null; - } - } - - private static ItemStack getRecipeOutput(Object recipe) { - if (recipe == null) return null; - - try { - Method method = recipe.getClass().getMethod("getOutput"); - method.setAccessible(true); - Object output = method.invoke(recipe); - return output instanceof ItemStack ? ((ItemStack) output).copy() : null; - } catch (ReflectiveOperationException | RuntimeException e) { - FMLLog.log(Level.WARN, e, "%s: failed to read BaseMetals crusher recipe output", ElectricAdvantage.MODID); - return null; - } - } - - private static ItemStack getVanillaCrusherOutput(ItemStack input) { - if (input == null || input.getItem() == null) return null; - - Block block = Block.getBlockFromItem(input.getItem()); - int meta = input.getMetadata(); - - if (block == Blocks.STONE) return new ItemStack(Blocks.COBBLESTONE, 1); - if (block == Blocks.STONEBRICK) return new ItemStack(Blocks.COBBLESTONE, 1); - if (block == Blocks.STONE_SLAB && (meta == 0 || meta == 5)) return new ItemStack(Blocks.STONE_SLAB, 1, 3); - if (block == Blocks.COBBLESTONE || block == Blocks.MOSSY_COBBLESTONE) return new ItemStack(Blocks.GRAVEL, 1); - if (block == Blocks.COBBLESTONE_WALL) return new ItemStack(Blocks.GRAVEL, 1); - if (block == Blocks.GRAVEL) return new ItemStack(Blocks.SAND, 1); - if (block == Blocks.SANDSTONE) return new ItemStack(Blocks.SAND, 4); - if (block == Blocks.RED_SANDSTONE) return new ItemStack(Blocks.SAND, 4, 1); - if (block == Blocks.STONE_SLAB && meta == 1) return new ItemStack(Blocks.SAND, 2); - if (block == Blocks.STONE_SLAB2 && meta == 0) return new ItemStack(Blocks.SAND, 2, 1); - if (block == Blocks.GLASS) return new ItemStack(Blocks.SAND, 1); - if (block == Blocks.STAINED_GLASS) return new ItemStack(Blocks.SAND, 1, meta); - if (block == Blocks.GLOWSTONE) return new ItemStack(Items.GLOWSTONE_DUST, 4); - if (block == Blocks.LAPIS_ORE) return new ItemStack(Items.DYE, 8, 4); - if (block == Blocks.LAPIS_BLOCK) return new ItemStack(Items.DYE, 9, 4); - if (block == Blocks.REDSTONE_ORE || block == Blocks.LIT_REDSTONE_ORE) return new ItemStack(Items.REDSTONE, 8); - if (block == Blocks.REDSTONE_BLOCK) return new ItemStack(Items.REDSTONE, 9); - if (block == Blocks.QUARTZ_ORE) return new ItemStack(Items.QUARTZ, 2); - if (block == Blocks.QUARTZ_BLOCK) return new ItemStack(Items.QUARTZ, 4); - if (block == Blocks.PRISMARINE) { - if (meta == 1) return new ItemStack(Items.PRISMARINE_SHARD, 9); - if (meta == 2) return new ItemStack(Items.PRISMARINE_SHARD, 8); - return new ItemStack(Items.PRISMARINE_SHARD, 4); - } - if (block == Blocks.SEA_LANTERN) return new ItemStack(Items.PRISMARINE_CRYSTALS, 3); - if (block == Blocks.SLIME_BLOCK) return new ItemStack(Items.SLIME_BALL, 9); - if (block == Blocks.BONE_BLOCK) return new ItemStack(Items.DYE, 9, 15); - - if (input.getItem() == Items.REEDS) return new ItemStack(Items.SUGAR, 2); - if (input.getItem() == Items.BONE) return new ItemStack(Items.DYE, 3, 15); - if (input.getItem() == Items.BLAZE_ROD) return new ItemStack(Items.BLAZE_POWDER, 2); - - return null; - } -} diff --git a/src/main/java/com/mcmoddev/electricadvantage/init/Blocks.java b/src/main/java/com/mcmoddev/electricadvantage/init/Blocks.java deleted file mode 100644 index 1f5ad74..0000000 --- a/src/main/java/com/mcmoddev/electricadvantage/init/Blocks.java +++ /dev/null @@ -1,134 +0,0 @@ -package com.mcmoddev.electricadvantage.init; - -import com.mcmoddev.electricadvantage.ElectricAdvantage; -import com.mcmoddev.electricadvantage.blocks.ElectricConduitBlock; -import com.mcmoddev.electricadvantage.blocks.ElectricScaffoldBlock; -import com.mcmoddev.electricadvantage.blocks.Ore; -import com.mcmoddev.electricadvantage.blocks.PumpPipeBlock; -import com.mcmoddev.electricadvantage.machines.*; -import cyano.poweradvantage.api.GUIBlock; -import com.mcmoddev.poweradvantage.blocks.BlockPowerSwitch; -import net.minecraft.block.Block; -import net.minecraft.client.Minecraft; -import net.minecraft.client.renderer.block.model.ModelResourceLocation; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.item.ItemBlock; -import net.minecraft.item.ItemStack; -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.fml.common.event.FMLInitializationEvent; -import net.minecraftforge.fml.common.registry.ForgeRegistries; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; -import net.minecraftforge.oredict.OreDictionary; - -import java.util.HashMap; -import java.util.Map; - -public abstract class Blocks { - private static final Map allBlocks = new HashMap<>(); - - public static Block electric_conduit; - public static Block lithium_ore; - public static Block sulfur_ore; - - public static Block electric_track; - public static Block led_bar; - - public static GUIBlock steam_powered_generator; - public static GUIBlock photovoltaic_generator; - public static GUIBlock hydroelectric_generator; - - public static GUIBlock arc_furnace; - public static GUIBlock battery_array; - public static GUIBlock rock_crusher; - public static GUIBlock laser_drill; - public static GUIBlock laser_turret; - public static GUIBlock laser_turret_evil; - public static GUIBlock fabricator; - public static GUIBlock growth_chamber; - public static GUIBlock growth_chamber_controller; - public static GUIBlock oven; - - public static Block pump_pipe_electric; - public static Block electric_switch; - public static GUIBlock electric_still; - public static GUIBlock electric_pump; - public static GUIBlock plastic_refinery; - - - - private static boolean initDone = false; - public static void init(){ - if(initDone) return; - Items.init(); - - electric_conduit = addBlock(new ElectricConduitBlock(),"electric_conduit","wire","conduitElectricity","powerCable","cableElectric"); - lithium_ore = addBlock(new Ore(1),"li_ore","oreLithium"); - sulfur_ore = addBlock(new Ore(new ItemStack(Items.sulfur_powder,1),0,3),"sulfur_ore","oreSulfur"); - - electric_track = addBlock(new ElectricScaffoldBlock(),"electric_track"); - laser_turret = (GUIBlock)addBlock(new LaserTurretBlock(false),"laser_turret"); - laser_turret_evil = (GUIBlock)addBlock(new LaserTurretBlock(true),"laser_turret_evil"); - laser_turret_evil.setTranslationKey(ElectricAdvantage.MODID+".laser_turret"); - laser_turret_evil.setCreativeTab(null); - led_bar = addBlock(new LEDBlock(),"led_bar"); - - photovoltaic_generator = (GUIBlock)addBlock(new PhotovoltaicGeneratorBlock(),"photovoltaic_generator"); - hydroelectric_generator = (GUIBlock)addBlock(new HydroelectricGeneratorBlock(),"hydroelectric_generator"); - steam_powered_generator = (GUIBlock)addBlock(new SteamPoweredElectricGeneratorBlock(),"steam_powered_generator"); - - arc_furnace = (GUIBlock)addBlock(new ElectricFurnaceBlock(),"electric_furnace"); - battery_array = (GUIBlock)addBlock(new ElectricBatteryArrayBlock(),"electric_battery_array"); - rock_crusher = (GUIBlock)addBlock(new ElectricCrusherBlock(),"electric_crusher"); - laser_drill = (GUIBlock)addBlock(new ElectricDrillBlock(),"electric_drill"); - fabricator = (GUIBlock)addBlock(new ElectricFabricatorBlock(),"electric_fabricator"); - growth_chamber = (GUIBlock)addBlock(new GrowthChamberBlock(),"growth_chamber"); - growth_chamber_controller = (GUIBlock)addBlock(new GrowthChamberControllerBlock(),"growth_chamber_controller"); - oven = (GUIBlock)addBlock(new ElectricOvenBlock(),"electric_oven"); - - - - electric_switch = addBlock(new BlockPowerSwitch(Power.ELECTRIC_POWER),"electric_switch"); - electric_pump = (GUIBlock)addBlock(new ElectricPumpBlock(),"electric_pump"); - electric_still = (GUIBlock)addBlock(new ElectricStillBlock(),"electric_still"); - plastic_refinery = (GUIBlock)addBlock(new PlasticRefineryBlock(),"plastic_refinery"); - pump_pipe_electric = addBlock(new PumpPipeBlock(),"pump_pipe_electric"); - pump_pipe_electric.setCreativeTab(CreativeTabs.SEARCH); - - // required OreDictionary entries - OreDictionary.registerOre("blockDirt", net.minecraft.init.Blocks.DIRT); - OreDictionary.registerOre("blockDirt", net.minecraft.init.Blocks.GRASS); - - initDone = true; - } - - - private static Block addBlock(Block block, String name, String... oreDictNames){ - block.setTranslationKey(ElectricAdvantage.MODID+"."+name); - ResourceLocation registryName = new ResourceLocation(ElectricAdvantage.MODID, name); - block.setRegistryName(registryName); - ForgeRegistries.BLOCKS.register(block); - ItemBlock itemBlock = new ItemBlock(block); - itemBlock.setRegistryName(registryName); - ForgeRegistries.ITEMS.register(itemBlock); - block.setCreativeTab(com.mcmoddev.poweradvantage.init.ItemGroups.tab_powerAdvantage); - allBlocks.put(name, block); - for(String oreName : oreDictNames){ - OreDictionary.registerOre(oreName, block); - } - return block; - } - - @SideOnly(Side.CLIENT) - public static void registerItemRenders(FMLInitializationEvent event){ - for(Map.Entry e : allBlocks.entrySet()){ - String name = e.getKey(); - Block block = e.getValue(); - Minecraft.getMinecraft().getRenderItem().getItemModelMesher() - .register(net.minecraft.item.Item.getItemFromBlock(block), 0, - new ModelResourceLocation(ElectricAdvantage.MODID+":"+name, "inventory")); - } - } - - -} diff --git a/src/main/java/com/mcmoddev/electricadvantage/init/Entities.java b/src/main/java/com/mcmoddev/electricadvantage/init/Entities.java deleted file mode 100644 index cc64dba..0000000 --- a/src/main/java/com/mcmoddev/electricadvantage/init/Entities.java +++ /dev/null @@ -1,187 +0,0 @@ -package com.mcmoddev.electricadvantage.init; - -import com.mcmoddev.electricadvantage.ElectricAdvantage; -import com.mcmoddev.electricadvantage.entities.*; -import com.mcmoddev.electricadvantage.graphics.*; -import com.mcmoddev.electricadvantage.machines.*; -import net.minecraft.client.Minecraft; -import net.minecraft.client.renderer.entity.RenderManager; -import net.minecraft.entity.Entity; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.datafix.FixTypes; -import net.minecraft.util.datafix.IFixableData; -import net.minecraftforge.common.util.ModFixs; -import net.minecraftforge.event.RegistryEvent; -import net.minecraftforge.fml.client.registry.ClientRegistry; -import net.minecraftforge.fml.client.registry.RenderingRegistry; -import net.minecraftforge.fml.common.FMLCommonHandler; -import net.minecraftforge.fml.common.Mod; -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; -import net.minecraftforge.fml.common.registry.EntityEntry; -import net.minecraftforge.fml.common.registry.EntityRegistry; -import net.minecraftforge.fml.common.registry.ForgeRegistries; -import net.minecraftforge.fml.common.registry.GameRegistry; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - -@Mod.EventBusSubscriber(modid = ElectricAdvantage.MODID) -public abstract class Entities { - - private static final int DATA_FIXER_VERSION = 2; - private static final String HYDROTURBINE_ENTITY_ID = ElectricAdvantage.MODID + ":hydroturbine"; - private static final String LEGACY_HYDROTURBINE_ENTITY_ID = "minecraft:electricadvantage.Hydroturbine"; - private static final String LEGACY_DOUBLE_MODID_HYDROTURBINE_ENTITY_ID = "electricadvantage.electricadvantage.Hydroturbine"; - private static final String LEGACY_AUTO_DOMAIN_HYDROTURBINE_ENTITY_ID = "minecraft:electricadvantage.electricadvantage.hydroturbine"; - - private static boolean initDone = false; - private static boolean dataFixersRegistered = false; - - public static void registerDataFixers(){ - if(dataFixersRegistered) return; - ModFixs fixes = FMLCommonHandler.instance().getDataFixer().init(ElectricAdvantage.MODID, DATA_FIXER_VERSION); - fixes.registerFix(FixTypes.ENTITY, new LegacyHydroturbineEntityFix()); - fixes.registerFix(FixTypes.BLOCK_ENTITY, new LegacyTileEntityIdFix(ElectricAdvantage.MODID, DATA_FIXER_VERSION)); - dataFixersRegistered = true; - } - - public static void init(){ - if(initDone) return; - - Blocks.init(); - - registerTileEntity(ElectricFurnaceTileEntity.class); - registerTileEntity(ElectricCrusherTileEntity.class); - registerTileEntity(ElectricDrillTileEntity.class); - registerTileEntity(ElectricFabricatorTileEntity.class); - registerTileEntity(GrowthChamberTileEntity.class); - registerTileEntity(GrowthChamberControllerTileEntity.class); - registerTileEntity(ElectricOvenTileEntity.class); - registerTileEntity(LaserTurretTileEntity.class); - registerTileEntity(LEDTileEntity.class); - - registerTileEntity(HydroelectricGeneratorTileEntity.class); - registerTileEntity(PhotovoltaicGeneratorTileEntity.class); - registerTileEntity(SteamPoweredElectricGeneratorTileEntity.class); - registerTileEntity(ElectricBatteryArrayTileEntity.class); - - - registerTileEntity(ElectricPumpTileEntity.class); - registerTileEntity(ElectricStillTileEntity.class); - registerTileEntity(PlasticRefineryTileEntity.class); - - registerEntity(HydroturbineEntity.class); - - initDone = true; - } - - - - private static void registerTileEntity(Class tileEntityClass){ - String name = tileEntityClass.getSimpleName(); - if(name.endsWith("TileEntity")){ - name = name.substring(0, name.lastIndexOf("TileEntity")); - } - GameRegistry.registerTileEntity(tileEntityClass, new ResourceLocation(ElectricAdvantage.MODID, toUnderscoreStyle(name))); - } - - private static int entityIndex = 0; - private static void registerEntity(Class entityClass) { - String name=ElectricAdvantage.MODID+"."+entityClass.getSimpleName(); - if(name.endsWith("Entity")){ - name = name.substring(0, name.lastIndexOf("Entity")); - } else if(name.startsWith("Entity")){ - name = name.substring("Entity".length(),name.length()); - } - ResourceLocation registryName = new ResourceLocation(ElectricAdvantage.MODID, name.substring(ElectricAdvantage.MODID.length() + 1).toLowerCase()); - EntityRegistry.registerModEntity(registryName, entityClass, registryName.toString(), entityIndex++, ElectricAdvantage.INSTANCE, 64, 1, true); - } - - @SubscribeEvent - public static void remapMissingEntities(RegistryEvent.MissingMappings event) { - EntityEntry hydroturbine = ForgeRegistries.ENTITIES.getValue(new ResourceLocation(ElectricAdvantage.MODID, "hydroturbine")); - if(hydroturbine == null) return; - for(RegistryEvent.MissingMappings.Mapping mapping : event.getAllMappings()){ - if(isLegacyHydroturbineId(mapping.key.toString())){ - mapping.remap(hydroturbine); - } - } - } - - private static boolean isLegacyHydroturbineId(String id){ - if(id == null) return false; - return LEGACY_HYDROTURBINE_ENTITY_ID.equalsIgnoreCase(id) - || LEGACY_DOUBLE_MODID_HYDROTURBINE_ENTITY_ID.equalsIgnoreCase(id) - || LEGACY_AUTO_DOMAIN_HYDROTURBINE_ENTITY_ID.equalsIgnoreCase(id); - } - - private static final class LegacyHydroturbineEntityFix implements IFixableData { - @Override - public int getFixVersion() { - return DATA_FIXER_VERSION; - } - - @Override - public NBTTagCompound fixTagCompound(NBTTagCompound compound) { - if(compound.hasKey("id", 8) && isLegacyHydroturbineId(compound.getString("id"))){ - compound.setString("id", HYDROTURBINE_ENTITY_ID); - } - return compound; - } - } - - private static final class LegacyTileEntityIdFix implements IFixableData { - private final String modid; - private final int version; - - private LegacyTileEntityIdFix(String modid, int version) { - this.modid = modid; - this.version = version; - } - - @Override - public int getFixVersion() { - return version; - } - - @Override - public NBTTagCompound fixTagCompound(NBTTagCompound compound) { - if (compound.hasKey("id", 8)) { - String id = compound.getString("id"); - String legacyPrefix = modid + "."; - String legacyMinecraftPrefix = "minecraft:" + legacyPrefix; - if (id.startsWith(legacyMinecraftPrefix)) { - compound.setString("id", modid + ":" + id.substring(legacyMinecraftPrefix.length())); - } else if (id.startsWith(legacyPrefix)) { - compound.setString("id", modid + ":" + id.substring(legacyPrefix.length())); - } - } - return compound; - } - } - - private static String toUnderscoreStyle(String camelCase){ - StringBuilder sb = new StringBuilder(); - sb.append(Character.toLowerCase(camelCase.charAt(0))); - for(int i = 1; i < camelCase.length(); i++){ - char c = camelCase.charAt(i); - if(Character.isUpperCase(c)){ - sb.append('_').append(Character.toLowerCase(c)); - } else { - sb.append(c); - } - } - return sb.toString(); - } - - @SideOnly(Side.CLIENT) - public static void registerRenderers(){ - RenderManager rm = Minecraft.getMinecraft().getRenderManager(); - - ClientRegistry.bindTileEntitySpecialRenderer(LaserTurretTileEntity.class, new com.mcmoddev.electricadvantage.graphics.LaserTurretRenderer()); - ClientRegistry.bindTileEntitySpecialRenderer(ElectricDrillTileEntity.class, new com.mcmoddev.electricadvantage.graphics.LaserDrillRenderer()); - - RenderingRegistry.registerEntityRenderingHandler(HydroturbineEntity.class,new HydroturbineRenderer(rm)); - } -} diff --git a/src/main/java/com/mcmoddev/electricadvantage/init/Items.java b/src/main/java/com/mcmoddev/electricadvantage/init/Items.java deleted file mode 100644 index bae91c4..0000000 --- a/src/main/java/com/mcmoddev/electricadvantage/init/Items.java +++ /dev/null @@ -1,105 +0,0 @@ -package com.mcmoddev.electricadvantage.init; - -import com.mcmoddev.electricadvantage.ElectricAdvantage; -import com.mcmoddev.electricadvantage.items.BatteryItem; -import net.minecraft.client.Minecraft; -import net.minecraft.client.renderer.block.model.ModelResourceLocation; -import net.minecraft.item.Item; -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.fml.common.event.FMLInitializationEvent; -import net.minecraftforge.fml.common.registry.ForgeRegistries; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; -import net.minecraftforge.oredict.OreDictionary; - -import java.util.HashMap; -import java.util.Map; -import java.util.Set; - -public abstract class Items { - - - public static final Map allItems = new HashMap<>(); - - - public static Item blank_circuit_board; - public static Item control_circuit; - public static Item integrated_circuit; - public static Item power_supply_unit; - public static Item silicon_ingot; - public static Item silicon_blend; - public static Item solder_blend; - public static Item solder; - public static Item lead_acid_battery; - public static Item nickel_hydride_battery; - public static Item alkaline_battery; - public static Item lithium_battery; - - public static Item lithium_ingot; - public static Item lithium_powder; - public static Item lithium_nugget; - public static Item sulfur_powder; - - - public static Item petrolplastic_ingot; - - private static boolean initDone = false; - public static void init(){ - if(initDone) return; - - blank_circuit_board = addItem("blank_circuit_board",new Item()); - control_circuit = addItem("control_circuit",new Item(),"circuitBoard"); - integrated_circuit = addItem("integrated_circuit",new Item(),"microchip"); - power_supply_unit = addItem("psu",new Item(),"PSU"); - silicon_ingot = addItem("silicon_ingot",new Item(),"ingotSilicon","silicon"); - silicon_blend = addItem("silicon_mix",new Item()); - solder_blend = addItem("solder_mix",new Item()); - solder = addItem("solder",new Item(),"solder","ingotSolder"); - lithium_ingot = addItem("li_ingot",new Item(),"ingotLithium"); - lithium_powder = addItem("li_powder",new Item(),"dustLithium"); - lithium_nugget = addItem("li_nugget",new Item(),"nuggetLithium"); - sulfur_powder = addItem("sulfur_powder",new Item(),"sulfur","dustSulfur","sulphur","dustSulphur"); - petrolplastic_ingot = addItem("petrolplastic_ingot",new Item(),"plastic","ingotPlastic"); - - lead_acid_battery = addItem("lead_acid_battery",new BatteryItem(Power.LEAD_ACID_BATTERY_CAPACITY),"battery"); - nickel_hydride_battery = addItem("nickel_hydride_battery",new BatteryItem(Power.NICKEL_HYDRIDE_BATTERY_CAPACITY),"battery"); - alkaline_battery = addItem("alkaline_battery",new BatteryItem(Power.ALKALINE_BATTERY_CAPACITY),"battery"); - lithium_battery = addItem("lithium_battery",new BatteryItem(Power.LITHIUM_BATTERY_CAPACITY),"battery"); - - initDone = true; - } - - private static Item addItem(String unlocalizedName, Item i,String... oreDictNames){ - Item n = addItem(unlocalizedName,i); - for(String oreDictName : oreDictNames){ - OreDictionary.registerOre(oreDictName, n); - } - return n; - } - private static Item addItem(String unlocalizedName, Item i){ - i.setTranslationKey(ElectricAdvantage.MODID+"."+unlocalizedName); - i.setRegistryName(new ResourceLocation(ElectricAdvantage.MODID, unlocalizedName)); - ForgeRegistries.ITEMS.register(i); - i.setCreativeTab(com.mcmoddev.poweradvantage.init.ItemGroups.tab_powerAdvantage); - allItems.put(unlocalizedName, i); - return i; - } - - public static Item getItemByName(String unlocalizedName){ - return allItems.get(unlocalizedName); - } - - public static Set> getAllRegisteredItems(){ - return allItems.entrySet(); - } - - @SideOnly(Side.CLIENT) - public static void registerItemRenders(FMLInitializationEvent event) { - for(Map.Entry e : getAllRegisteredItems()){ - Minecraft.getMinecraft().getRenderItem().getItemModelMesher() - .register(e.getValue(), 0, - new ModelResourceLocation(ElectricAdvantage.MODID+":"+e.getKey(), "inventory")); - } - } - -} diff --git a/src/main/java/com/mcmoddev/electricadvantage/init/Recipes.java b/src/main/java/com/mcmoddev/electricadvantage/init/Recipes.java deleted file mode 100644 index 18e4558..0000000 --- a/src/main/java/com/mcmoddev/electricadvantage/init/Recipes.java +++ /dev/null @@ -1,48 +0,0 @@ -package com.mcmoddev.electricadvantage.init; - -import com.mcmoddev.electricadvantage.compat.BaseMetalsCompat; -import com.mcmoddev.poweradvantage.PowerAdvantage; -import com.mcmoddev.poweradvantage.RecipeMode; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fml.common.registry.GameRegistry; -import net.minecraftforge.oredict.OreDictionary; - -public abstract class Recipes { - - private static boolean initDone = false; - - public static void init(){ - if(initDone) return; - - Blocks.init(); - Items.init(); - - RecipeMode recipeMode = PowerAdvantage.recipeMode; - - // Recipes for all recipe modes - OreDictionary.registerOre("blockBrick", net.minecraft.init.Blocks.BRICK_BLOCK); - OreDictionary.registerOre("gunpowder", net.minecraft.init.Items.GUNPOWDER); - GameRegistry.addSmelting(Items.lithium_powder,new ItemStack(Items.lithium_ingot),0.5f); - GameRegistry.addSmelting(Blocks.lithium_ore,new ItemStack(Items.lithium_ingot),0.5f); - BaseMetalsCompat.addCrusherRecipe("oreLithium",new ItemStack(Items.lithium_powder,2)); - BaseMetalsCompat.addCrusherRecipe("ingotLithium",new ItemStack(Items.lithium_powder,1)); - BaseMetalsCompat.addCrusherRecipe("oreSulfur",new ItemStack(Items.sulfur_powder,4)); - GameRegistry.addSmelting(Items.silicon_blend, new ItemStack(Items.silicon_ingot), 0.5f); - GameRegistry.addSmelting(Items.solder_blend, new ItemStack(Items.solder), 0.5f); - - // recipe-mode specific non-crafting integration - if(recipeMode == RecipeMode.APOCALYPTIC){ - BaseMetalsCompat.addCrusherRecipe(Blocks.steam_powered_generator, new ItemStack(Items.power_supply_unit,1)); - BaseMetalsCompat.addCrusherRecipe(Blocks.arc_furnace, new ItemStack(Items.power_supply_unit,1)); - BaseMetalsCompat.addCrusherRecipe(Blocks.photovoltaic_generator, new ItemStack(Items.power_supply_unit,1)); - BaseMetalsCompat.addCrusherRecipe(Items.power_supply_unit, new ItemStack(Items.control_circuit,1)); - BaseMetalsCompat.addCrusherRecipe(Items.control_circuit, new ItemStack(Items.integrated_circuit,1)); - } else if(recipeMode == RecipeMode.NORMAL) { - // normal - BaseMetalsCompat.registerOreDictionaryCopies("solder", "ingotLead", "ingotTin", "ingotSilver"); - } - - - initDone = true; - } -} diff --git a/src/main/java/com/mcmoddev/electricadvantage/machines/ElectricDrillBlock.java b/src/main/java/com/mcmoddev/electricadvantage/machines/ElectricDrillBlock.java deleted file mode 100644 index bb29900..0000000 --- a/src/main/java/com/mcmoddev/electricadvantage/machines/ElectricDrillBlock.java +++ /dev/null @@ -1,234 +0,0 @@ -package com.mcmoddev.electricadvantage.machines; - -import com.mcmoddev.electricadvantage.init.Power; -import cyano.poweradvantage.api.*; -import com.mcmoddev.poweradvantage.conduitnetwork.ConduitRegistry; -import net.minecraft.block.material.Material; -import net.minecraft.block.properties.IProperty; -import net.minecraft.block.properties.PropertyBool; -import net.minecraft.block.properties.PropertyDirection; -import net.minecraft.block.state.BlockStateContainer; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.inventory.IInventory; -import net.minecraft.inventory.InventoryHelper; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.Explosion; -import net.minecraft.world.World; - -import java.util.Random; - -public class ElectricDrillBlock extends GUIBlock implements ITypedConduit { - - - - private final ConduitType type; - private final ConduitType[] types = new ConduitType[1]; - - /** - * Blockstate property - */ - public static final PropertyDirection FACING = PropertyDirection.create("facing"); - /** - * Blockstate property - */ - public static final PropertyBool ACTIVE = PropertyBool.create("active"); - - - public ElectricDrillBlock(){ - super(Material.PISTON); - this.type = Power.ELECTRIC_POWER; - types[0] = this.type; - this.setPowerAdvantageHardness(0.75f); - this.setDefaultState(getDefaultState().withProperty(ACTIVE, false).withProperty(FACING, EnumFacing.DOWN)); - } - - - /** - * Creates a blockstate - */ - @Override - protected BlockStateContainer createBlockState() { - return new BlockStateContainer(this, new IProperty[] { ACTIVE,FACING }); - } - - @Override - public ElectricMachineTileEntity createNewTileEntity(World w, int m) { - return new ElectricDrillTileEntity(); - } - - - - /** - * Override of default block behavior - */ - @Override - public void onBlockAdded(final World world, final BlockPos coord, final IBlockState state) { - ConduitRegistry.getInstance().conduitBlockPlacedEvent(world, world.provider.getDimension(), coord, type); - } - /** - * This method is called when the block is removed from the world by an entity. - */ - @Override - public void onPlayerDestroy(World w, BlockPos coord, IBlockState state){ - super.onPlayerDestroy(w, coord, state); - ConduitRegistry.getInstance().conduitBlockRemovedEvent(w, w.provider.getDimension(), coord, type); - } - /** - * This method is called when the block is destroyed by an explosion. - */ - @Override - public void onBlockExploded(World w, BlockPos coord, Explosion boom){ - super.onBlockExploded(w, coord, boom); - ConduitRegistry.getInstance().conduitBlockRemovedEvent(w, w.provider.getDimension(), coord, type); - } - - /** - * Used to decides whether or not a conduit should connect to this block - * based on its energy type. - * @return The type of energy for this block - */ - @Override - public ConduitType[] getTypes() { - return types; - } - - @Override - public boolean isPowerSink(ConduitType conduitType) { - return true; - } - - @Override - public boolean isPowerSource(ConduitType conduitType) { - return false; - } - - - @Override - public boolean canAcceptConnection(PowerConnectorContext connection) { - return ConduitType.areSameType( type, connection.powerType); - } - - - /** - * Override of default block behavior - */ - @Override - public Item getItemDropped(final IBlockState state, final Random prng, final int i3) { - return Item.getItemFromBlock(this); - } - - - - /** - * Creates the blockstate of this block when it is placed in the world - */ - @Override - public IBlockState getStateForPlacement(final World world, final BlockPos coord, final EnumFacing facing, - final float f1, final float f2, final float f3, - final int meta, final EntityLivingBase player) { - return this.getDefaultState().withProperty( FACING, facing.getOpposite()); - } - - /** - * Creates the blockstate of this block when it is placed in the world - */ - @Override - public void onBlockPlacedBy(final World world, final BlockPos coord, final IBlockState bs, - final EntityLivingBase placer, final ItemStack srcItemStack) { - if (srcItemStack.hasDisplayName()) { - final TileEntity tileEntity = world.getTileEntity(coord); - if (tileEntity instanceof PoweredEntity){ - ((PoweredEntity)tileEntity).setCustomInventoryName(srcItemStack.getDisplayName()); - } - } - } - - - - - /** - * Sets the default blockstate - * @param w World instance - * @param coord Block coordinate - * @param state Block state - */ - protected void setDefaultFacing(final World w, final BlockPos coord, final IBlockState state) { - if (w.isRemote) { - return; - } - EnumFacing enumFacing = EnumFacing.DOWN; - w.setBlockState(coord, state.withProperty((IProperty) FACING, (Comparable)enumFacing), 2); - } - - - /** - * Converts metadata into blockstate - */ - @Override - public IBlockState getStateFromMeta(final int metaValue) { - EnumFacing enumFacing = metaToFacing(metaValue); - return this.getDefaultState().withProperty( FACING, enumFacing) - .withProperty(ACTIVE, (metaValue & 0x8) != 0); - } - - /** - * Converts blockstate into metadata - */ - @Override - public int getMetaFromState(final IBlockState bs) { - int extraBit; - if((Boolean)(bs.getValue(ACTIVE))){ - extraBit = 0x8; - } else { - extraBit = 0; - } - return facingToMeta((EnumFacing)bs.getValue( FACING)) | extraBit; - } - - private int facingToMeta(EnumFacing f){ - return f.getIndex(); - } - private EnumFacing metaToFacing(int i){ - int f = i & 0x07; - return EnumFacing.values()[f]; - } - - - @Override - public int getComparatorInputOverride(IBlockState bs, World w, BlockPos p) { - TileEntity te = w.getTileEntity(p); - if(te instanceof ElectricMachineTileEntity){ - return ((ElectricMachineTileEntity)te).getComparatorOutput(); - } - return 0; - - } - - @Override - public boolean hasComparatorInputOverride(IBlockState bs) { - return true; - } - - @Override - public void breakBlock(World world, BlockPos pos, IBlockState state){ - TileEntity te = world.getTileEntity(pos); - if (te instanceof IInventory) - { - InventoryHelper.dropInventoryItems(world, pos, (IInventory)te); - ((IInventory)te).clear(); - world.updateComparatorOutputLevel(pos, this); - } - super.breakBlock(world, pos, state); - } - - - - - - -} diff --git a/src/main/java/com/mcmoddev/electricadvantage/machines/ElectricGeneratorBlock.java b/src/main/java/com/mcmoddev/electricadvantage/machines/ElectricGeneratorBlock.java deleted file mode 100644 index bc475b6..0000000 --- a/src/main/java/com/mcmoddev/electricadvantage/machines/ElectricGeneratorBlock.java +++ /dev/null @@ -1,117 +0,0 @@ -package com.mcmoddev.electricadvantage.machines; - -import com.mcmoddev.electricadvantage.init.Power; -import cyano.poweradvantage.api.ConduitType; -import net.minecraft.block.material.Material; -import net.minecraft.block.properties.IProperty; -import net.minecraft.block.properties.PropertyBool; -import net.minecraft.block.state.BlockStateContainer; -import net.minecraft.block.state.IBlockState; -import net.minecraft.inventory.IInventory; -import net.minecraft.inventory.InventoryHelper; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; - -public abstract class ElectricGeneratorBlock extends cyano.poweradvantage.api.simple.BlockSimplePowerMachine{ - - /** - * Blockstate property - */ - public static final PropertyBool ACTIVE = PropertyBool.create("active"); - - public ElectricGeneratorBlock() { - this(Material.PISTON); - } - - - public ElectricGeneratorBlock(Material m) { - super(m, 0.75f, Power.ELECTRIC_POWER); - this.setDefaultState(getDefaultState().withProperty(ACTIVE, false).withProperty(FACING, EnumFacing.NORTH)); - } - - /** - * Creates a blockstate - */ - @Override - protected BlockStateContainer createBlockState() { - return new BlockStateContainer(this, new IProperty[] { ACTIVE,FACING }); - } - - /** - * Converts metadata into blockstate - */ - @Override - public IBlockState getStateFromMeta(final int metaValue) { - EnumFacing enumFacing = EnumFacing.byIndex(metaValue & 0x7); - if (enumFacing.getAxis() == EnumFacing.Axis.Y) { - enumFacing = EnumFacing.NORTH; - } - return this.getDefaultState().withProperty( FACING, enumFacing).withProperty(ACTIVE, (metaValue & 0x8) != 0); - } - - /** - * Converts blockstate into metadata - */ - @Override - public int getMetaFromState(final IBlockState bs) { - int extraBit; - if((Boolean)(bs.getValue(ACTIVE))){ - extraBit = 0x8; - } else { - extraBit = 0; - } - return ((EnumFacing)bs.getValue( FACING)).getIndex() | extraBit; - } - - @Override - public abstract ElectricGeneratorTileEntity createNewTileEntity(World arg0, int arg1); - - @Override - public int getComparatorInputOverride(IBlockState bs, World w, BlockPos p){ - return getComparatorInputOverride(w,p); - } - public int getComparatorInputOverride(World w, BlockPos p) { - TileEntity te = w.getTileEntity(p); - if(te instanceof ElectricGeneratorTileEntity){ - return ((ElectricGeneratorTileEntity)te).getComparatorOutput(); - } - return 0; - - } - - @Override - public boolean hasComparatorInputOverride(IBlockState bs){ - return hasComparatorInputOverride(); - } - public boolean hasComparatorInputOverride() { - return true; - } - - - @Override - public void breakBlock(World world, BlockPos pos, IBlockState state){ - TileEntity te = world.getTileEntity(pos); - if (te instanceof IInventory) - { - InventoryHelper.dropInventoryItems(world, pos, (IInventory)te); - ((IInventory)te).clear(); - world.updateComparatorOutputLevel(pos, this); - } - super.breakBlock(world, pos, state); - } - - - @Override - public boolean isPowerSink(ConduitType e){ - return false; - } - - @Override - public boolean isPowerSource(ConduitType e){ - return true; - } - - public ConduitType getType() {return Power.ELECTRIC_POWER;} -} diff --git a/src/main/java/com/mcmoddev/electricadvantage/machines/ElectricMachineBlock.java b/src/main/java/com/mcmoddev/electricadvantage/machines/ElectricMachineBlock.java deleted file mode 100644 index 5212ad1..0000000 --- a/src/main/java/com/mcmoddev/electricadvantage/machines/ElectricMachineBlock.java +++ /dev/null @@ -1,147 +0,0 @@ -package com.mcmoddev.electricadvantage.machines; - -import com.mcmoddev.electricadvantage.init.Power; -import cyano.poweradvantage.api.ConduitType; -import net.minecraft.block.material.Material; -import net.minecraft.block.properties.IProperty; -import net.minecraft.block.properties.PropertyBool; -import net.minecraft.block.state.BlockStateContainer; -import net.minecraft.block.state.IBlockState; -import net.minecraft.inventory.IInventory; -import net.minecraft.inventory.InventoryHelper; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; - -public abstract class ElectricMachineBlock extends cyano.poweradvantage.api.simple.BlockSimplePowerMachine{ - - /** - * Blockstate property - */ - public static final PropertyBool ACTIVE = PropertyBool.create("active"); - /** - * Blockstate property - */ - public static final PropertyBool POWERED = PropertyBool.create("powered"); - - public ElectricMachineBlock() { - this(Material.PISTON); - } - - public ElectricMachineBlock(Material m, ConduitType type) { - super(m, 0.75f, type); - this.setDefaultState(getDefaultState().withProperty(ACTIVE, false).withProperty(POWERED, false).withProperty(FACING, EnumFacing.NORTH)); - } - - public ElectricMachineBlock(Material m) { - this(m,Power.ELECTRIC_POWER); - } - - /** - * Creates a blockstate - */ - @Override - protected BlockStateContainer createBlockState() { - return new BlockStateContainer(this, new IProperty[] { ACTIVE,FACING,POWERED }); - } - - /** - * Converts metadata into blockstate - */ - @Override - public IBlockState getStateFromMeta(final int metaValue) { - EnumFacing enumFacing = metaToFacing(metaValue); - if (enumFacing.getAxis() == EnumFacing.Axis.Y) { - enumFacing = EnumFacing.NORTH; - } - return this.getDefaultState().withProperty( FACING, enumFacing) - .withProperty(ACTIVE, (metaValue & 0x4) != 0) - .withProperty(POWERED, (metaValue & 0x8) != 0); - } - - /** - * Converts blockstate into metadata - */ - @Override - public int getMetaFromState(final IBlockState bs) { - int extraBit; - if((Boolean)(bs.getValue(ACTIVE))){ - extraBit = 0x4; - } else { - extraBit = 0; - } - if((Boolean)(bs.getValue(POWERED))){ - extraBit = extraBit | 0x8; - } - return facingToMeta((EnumFacing)bs.getValue( FACING)) | extraBit; - } - - private int facingToMeta(EnumFacing f){ - switch(f){ - case NORTH: return 0; - case WEST: return 1; - case SOUTH: return 2; - case EAST: return 3; - default: return 0; - } - } - private EnumFacing metaToFacing(int i){ - int f = i & 0x03; - switch(f){ - case 0: return EnumFacing.NORTH; - case 1: return EnumFacing.WEST; - case 2: return EnumFacing.SOUTH; - case 3: return EnumFacing.EAST; - default: return EnumFacing.NORTH; - } - } - - @Override - public abstract ElectricMachineTileEntity createNewTileEntity(World w, int m); - - @Override - public int getComparatorInputOverride(IBlockState bs, World w, BlockPos p){ - return getComparatorInputOverride(w,p); - } - public int getComparatorInputOverride(World w, BlockPos p) { - TileEntity te = w.getTileEntity(p); - if(te instanceof ElectricMachineTileEntity){ - return ((ElectricMachineTileEntity)te).getComparatorOutput(); - } - return 0; - - } - - @Override - public boolean hasComparatorInputOverride(IBlockState bs){ - return hasComparatorInputOverride(); - } - public boolean hasComparatorInputOverride() { - return true; - } - - @Override - public void breakBlock(World world, BlockPos pos, IBlockState state){ - TileEntity te = world.getTileEntity(pos); - if (te instanceof IInventory) - { - InventoryHelper.dropInventoryItems(world, pos, (IInventory)te); - ((IInventory)te).clear(); - world.updateComparatorOutputLevel(pos, this); - } - super.breakBlock(world, pos, state); - } - - @Override - public boolean isPowerSink(ConduitType e){ - return true; - } - - @Override - public boolean isPowerSource(ConduitType e){ - return false; - } - - public ConduitType getType() {return Power.ELECTRIC_POWER;} -} diff --git a/src/main/java/com/mcmoddev/electricadvantage/machines/GrowthChamberControllerBlock.java b/src/main/java/com/mcmoddev/electricadvantage/machines/GrowthChamberControllerBlock.java deleted file mode 100644 index 5c32800..0000000 --- a/src/main/java/com/mcmoddev/electricadvantage/machines/GrowthChamberControllerBlock.java +++ /dev/null @@ -1,102 +0,0 @@ -package com.mcmoddev.electricadvantage.machines; - -import com.mcmoddev.electricadvantage.init.Power; -import cyano.poweradvantage.api.ConduitType; -import cyano.poweradvantage.api.PowerConnectorContext; -import cyano.poweradvantage.api.PoweredEntity; -import com.mcmoddev.poweradvantage.conduitnetwork.ConduitRegistry; -import com.mcmoddev.poweradvantage.init.Fluids; -import net.minecraft.block.material.Material; -import net.minecraft.block.state.IBlockState; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.Explosion; -import net.minecraft.world.World; - - -/** - * The coal boiler is a bit more complicated because it consumes fluids (water) and produces steam, - * making it a multi-type powered block. - * @author DrCyano - * - */ -public class GrowthChamberControllerBlock extends cyano.poweradvantage.api.simple.BlockSimplePowerMachine{ - - - public GrowthChamberControllerBlock() { - super(Material.PISTON, 0.75f, Power.GROWTHCHAMBER_POWER, Power.ELECTRIC_POWER, Fluids.fluidConduit_general); - } - - @Override - public PoweredEntity createNewTileEntity(World world, int metaDataValue) { - return new GrowthChamberControllerTileEntity(); - } - - @Override - public boolean hasComparatorInputOverride(IBlockState bs) { - return true; - } - - @Override - public int getComparatorInputOverride(IBlockState bs, World world, BlockPos coord) { - if(world.getTileEntity(coord) instanceof GrowthChamberControllerTileEntity){ - return ((GrowthChamberControllerTileEntity)world.getTileEntity(coord)).getComparatorOutput(); - } - return 0; - } - - - - ///// Overrides to make this a multi-type block ///// - - /** - * This method is called whenever the block is placed into the world - */ - @Override - public void onBlockAdded(World w, BlockPos coord, IBlockState state){ - super.onBlockAdded(w, coord, state); - ConduitRegistry.getInstance().conduitBlockPlacedEvent(w, w.provider.getDimension(), coord, com.mcmoddev.poweradvantage.init.Fluids.fluidConduit_general); - ConduitRegistry.getInstance().conduitBlockPlacedEvent(w, w.provider.getDimension(), coord, Power.GROWTHCHAMBER_POWER); - ConduitRegistry.getInstance().conduitBlockPlacedEvent(w, w.provider.getDimension(), coord, Power.ELECTRIC_POWER); - } - - /** - * This method is called when the block is removed from the world by an entity. - */ - @Override - public void onPlayerDestroy(World w, BlockPos coord, IBlockState state){ - super.onPlayerDestroy(w, coord, state); - ConduitRegistry.getInstance().conduitBlockRemovedEvent(w, w.provider.getDimension(), coord, com.mcmoddev.poweradvantage.init.Fluids.fluidConduit_general); - ConduitRegistry.getInstance().conduitBlockRemovedEvent(w, w.provider.getDimension(), coord, Power.GROWTHCHAMBER_POWER); - ConduitRegistry.getInstance().conduitBlockRemovedEvent(w, w.provider.getDimension(), coord, Power.ELECTRIC_POWER); - } - /** - * This method is called when the block is destroyed by an explosion. - */ - @Override - public void onBlockExploded(World w, BlockPos coord, Explosion boom){ - super.onBlockExploded(w, coord, boom); - ConduitRegistry.getInstance().conduitBlockRemovedEvent(w, w.provider.getDimension(), coord, Fluids.fluidConduit_general); - ConduitRegistry.getInstance().conduitBlockRemovedEvent(w, w.provider.getDimension(), coord, Power.GROWTHCHAMBER_POWER); - ConduitRegistry.getInstance().conduitBlockRemovedEvent(w, w.provider.getDimension(), coord, Power.ELECTRIC_POWER); - } - - - @Override - public boolean isPowerSink(ConduitType pt){ - return ConduitType.areSameType(Power.ELECTRIC_POWER,pt) - || Fluids.isFluidType(pt); - } - @Override - public boolean isPowerSource(ConduitType pt){ - return ConduitType.areSameType(Power.GROWTHCHAMBER_POWER,pt); - } - - @Override - public boolean canAcceptConnection(PowerConnectorContext c){ - return ConduitType.areSameType(Power.ELECTRIC_POWER,c.powerType) - || ConduitType.areSameType(Power.GROWTHCHAMBER_POWER, c.powerType) - || Fluids.isFluidType(c.powerType); - } - - ///// end multi-type overrides ///// -} diff --git a/src/main/java/com/mcmoddev/electricadvantage/machines/HydroelectricGeneratorBlock.java b/src/main/java/com/mcmoddev/electricadvantage/machines/HydroelectricGeneratorBlock.java deleted file mode 100644 index e7fde28..0000000 --- a/src/main/java/com/mcmoddev/electricadvantage/machines/HydroelectricGeneratorBlock.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.mcmoddev.electricadvantage.machines; - -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; - -public class HydroelectricGeneratorBlock extends ElectricGeneratorBlock { - - public HydroelectricGeneratorBlock(){ - super(); - } - - @Override - public ElectricGeneratorTileEntity createNewTileEntity(World w, int m) { - return new HydroelectricGeneratorTileEntity(); - } - - @Override - public boolean canPlaceBlockAt(World worldIn, BlockPos pos) - { - return super.canPlaceBlockAt(worldIn, pos) && !worldIn.getBlockState( pos.down()).getMaterial().isSolid(); - } -} diff --git a/src/main/java/com/mcmoddev/electricadvantage/machines/LEDBlock.java b/src/main/java/com/mcmoddev/electricadvantage/machines/LEDBlock.java deleted file mode 100644 index b0042e5..0000000 --- a/src/main/java/com/mcmoddev/electricadvantage/machines/LEDBlock.java +++ /dev/null @@ -1,171 +0,0 @@ -package com.mcmoddev.electricadvantage.machines; - -import com.mcmoddev.electricadvantage.blocks.ElectricConduitBlock; -import net.minecraft.block.ITileEntityProvider; -import net.minecraft.block.properties.IProperty; -import net.minecraft.block.properties.PropertyBool; -import net.minecraft.block.state.BlockStateContainer; -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.Entity; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.math.AxisAlignedBB; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; - -import java.util.List; - -public class LEDBlock extends ElectricConduitBlock implements ITileEntityProvider{ - - private final float pipeRadius = 2f/16f; - public static final PropertyBool LIT = PropertyBool.create("lit"); - - public LEDBlock(){ - super(); - this.setDefaultState(getDefaultState().withProperty(LIT, false)); - } - - @Override - public TileEntity createNewTileEntity(World worldIn, int meta) { - return new LEDTileEntity(); - } - - @Override - public int getLightValue(IBlockState bs, IBlockAccess world, BlockPos pos){ - if(bs.getBlock() == this && (Boolean)bs.getValue(LIT) == true){ - return 15; - } else { - return 0; - } - } - - @Override - public int getMetaFromState(IBlockState bs){ - if(bs.getBlock() == this && (Boolean)bs.getValue(LIT) == true){ - return 1; - } else { - return 0; - } - } - - @Override - public IBlockState getStateFromMeta(int m){ - return this.getDefaultState().withProperty(LIT, (m & 1) != 0); - } - - @Override - protected BlockStateContainer createBlockState() { - return new BlockStateContainer(this, new IProperty[] { WEST, DOWN, SOUTH, EAST, UP, NORTH, LIT }); - } - - @Override - public boolean isPowerSink(){ - return true; - } - - - /** - * Calculates the collision boxes for this block. - */ - @Override - public AxisAlignedBB getBoundingBox(final IBlockState bs, final IBlockAccess world, final BlockPos coord) { - IBlockState oldBS = bs; - final boolean connectNorth = this.canConnectTo(world,coord,oldBS,EnumFacing.NORTH, coord.north()); - final boolean connectSouth = this.canConnectTo(world,coord,oldBS,EnumFacing.SOUTH, coord.south()); - final boolean connectWest = this.canConnectTo(world,coord,oldBS,EnumFacing.WEST, coord.west()); - final boolean connectEast = this.canConnectTo(world,coord,oldBS,EnumFacing.EAST, coord.east()); - final boolean connectUp = this.canConnectTo(world,coord,oldBS,EnumFacing.UP, coord.up()); - final boolean connectDown = this.canConnectTo(world,coord,oldBS,EnumFacing.DOWN, coord.down()); - final boolean allFalse = !(connectNorth || connectSouth || connectWest || connectEast || connectUp || connectDown); - - float radius = pipeRadius; - float rminus = 0.5f - radius; - float rplus = 0.5f + radius; - - float x1 = rminus; - float x2 = rplus; - float y1 = rminus; - float y2 = rplus; - float z1 = rminus; - float z2 = rplus; - if (connectNorth) { - z1 = 0.0f; - } - if (connectSouth) { - z2 = 1.0f; - } - if (connectWest) { - x1 = 0.0f; - } - if (connectEast) { - x2 = 1.0f; - } - if(connectDown){ - y1 = 0.0f; - } - if(connectUp){ - y2 = 1.0f; - } - if(allFalse){ // Horizontal '+' when making no connections - z1 = 0.0f; - z2 = 1.0f; - x1 = 0.0f; - x2 = 1.0f; - } - - return new AxisAlignedBB(x1, y1, z1, x2, y2, z2); - } - - /** - * Calculates the collision boxes for this block. - */ - @Override - public void addCollisionBoxToList(final IBlockState bs, final World world, final BlockPos coord, - final AxisAlignedBB box, final List collisionBoxList, - final Entity entity, final boolean isActualState) { - IBlockState oldBS = bs; - final boolean connectNorth = this.canConnectTo(world,coord,oldBS,EnumFacing.NORTH, coord.north()); - final boolean connectSouth = this.canConnectTo(world,coord,oldBS,EnumFacing.SOUTH, coord.south()); - final boolean connectWest = this.canConnectTo(world,coord,oldBS,EnumFacing.WEST, coord.west()); - final boolean connectEast = this.canConnectTo(world,coord,oldBS,EnumFacing.EAST, coord.east()); - final boolean connectUp = this.canConnectTo(world,coord,oldBS,EnumFacing.UP, coord.up()); - final boolean connectDown = this.canConnectTo(world,coord,oldBS,EnumFacing.DOWN, coord.down()); - final boolean allFalse = !(connectNorth || connectSouth || connectWest || connectEast || connectUp || connectDown); -// Horizontal '+' when making no connections - - float radius = pipeRadius; - float rminus = 0.5f - radius; - float rplus = 0.5f + radius; - - AxisAlignedBB newBox; - newBox = new AxisAlignedBB(rminus, rminus, rminus, rplus, rplus, rplus); - super.addCollisionBoxToList(coord, box, collisionBoxList, newBox); - - if(connectUp){ - newBox = new AxisAlignedBB(rminus, rminus, rminus, rplus, 1f, rplus); - super.addCollisionBoxToList(coord, box, collisionBoxList, newBox); - } - if(connectDown){ - newBox = new AxisAlignedBB(rminus, 0f, rminus, rplus, rplus, rplus); - super.addCollisionBoxToList(coord, box, collisionBoxList, newBox); - } - if(allFalse || connectEast){ - newBox = new AxisAlignedBB(rminus, rminus, rminus, 1f, rplus, rplus); - super.addCollisionBoxToList(coord, box, collisionBoxList, newBox); - } - if(allFalse || connectWest){ - newBox = new AxisAlignedBB(0f, rminus, rminus, rplus, rplus, rplus); - super.addCollisionBoxToList(coord, box, collisionBoxList, newBox); - } - if(allFalse || connectSouth){ - newBox = new AxisAlignedBB(rminus, rminus, rminus, rplus, rplus, 1f); - super.addCollisionBoxToList(coord, box, collisionBoxList, newBox); - } - if(allFalse || connectNorth){ - newBox = new AxisAlignedBB(rminus, rminus, 0f, rplus, rplus, rplus); - super.addCollisionBoxToList(coord, box, collisionBoxList, newBox); - } - } - -} diff --git a/src/main/java/com/mcmoddev/electricadvantage/machines/LaserTurretBlock.java b/src/main/java/com/mcmoddev/electricadvantage/machines/LaserTurretBlock.java deleted file mode 100644 index 6f9bd2f..0000000 --- a/src/main/java/com/mcmoddev/electricadvantage/machines/LaserTurretBlock.java +++ /dev/null @@ -1,61 +0,0 @@ -package com.mcmoddev.electricadvantage.machines; - -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.math.AxisAlignedBB; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; - -import java.util.List; - -public class LaserTurretBlock extends ElectricMachineBlock { - - private final AxisAlignedBB baseBounds = new AxisAlignedBB(0.0f, 0.0f, 0.0f, 1.0f, 0.25f, 1.0f); - private final AxisAlignedBB shaftBounds = new AxisAlignedBB(0.25f, 0.25f, 0.25f, 0.75f, 1.0f, 0.75f); - - // Evil laser turrets target players and not hostile mobs - public final boolean evil; - public LaserTurretBlock(boolean isEvil) { - super(); - this.setHardness(5.0F).setResistance(100.0F); - this.evil = isEvil; - } - - @Override - public ElectricMachineTileEntity createNewTileEntity(World arg0, int arg1) { - return new LaserTurretTileEntity(); - } - - - - - @Override - public AxisAlignedBB getBoundingBox(final IBlockState bs, final IBlockAccess world, final BlockPos coord) { - return baseBounds; - } - @Override - public void addCollisionBoxToList(final IBlockState bs, final World world, final BlockPos coord, - final AxisAlignedBB box, final List collisionBoxList, - final Entity entity, final boolean isActualState) { - - final EnumFacing orientation = (EnumFacing) world.getBlockState(coord).getValue(FACING); - super.addCollisionBoxToList(coord, box, collisionBoxList, baseBounds); - super.addCollisionBoxToList(coord, box, collisionBoxList, shaftBounds); - } - - @Override - public void onBlockPlacedBy(World w, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack) { - super.onBlockPlacedBy(w, pos, state, placer, stack); - TileEntity te = w.getTileEntity(pos); - if(placer instanceof EntityPlayer && te instanceof LaserTurretTileEntity){ - ((LaserTurretTileEntity)te).setOwner((EntityPlayer)placer); - } - } - -} diff --git a/src/main/java/com/mcmoddev/electricadvantage/machines/PlasticRefineryBlock.java b/src/main/java/com/mcmoddev/electricadvantage/machines/PlasticRefineryBlock.java deleted file mode 100644 index 970fc21..0000000 --- a/src/main/java/com/mcmoddev/electricadvantage/machines/PlasticRefineryBlock.java +++ /dev/null @@ -1,69 +0,0 @@ -package com.mcmoddev.electricadvantage.machines; - -import com.mcmoddev.electricadvantage.init.Power; -import cyano.poweradvantage.api.ConduitType; -import cyano.poweradvantage.api.PowerConnectorContext; -import com.mcmoddev.poweradvantage.conduitnetwork.ConduitRegistry; -import com.mcmoddev.poweradvantage.init.Fluids; -import net.minecraft.block.state.IBlockState; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.Explosion; -import net.minecraft.world.World; - -public class PlasticRefineryBlock extends ElectricMachineBlock{ - - @Override - public ElectricMachineTileEntity createNewTileEntity(World w, int m) { - return new PlasticRefineryTileEntity(); - } - -///// Overrides to make this a multi-type block ///// - - /** - * This method is called whenever the block is placed into the world - */ - @Override - public void onBlockAdded(World w, BlockPos coord, IBlockState state){ - super.onBlockAdded(w, coord, state); - ConduitRegistry.getInstance().conduitBlockPlacedEvent(w, w.provider.getDimension(), coord, com.mcmoddev.poweradvantage.init.Fluids.fluidConduit_general); - } - - /** - * This method is called when the block is removed from the world by an entity. - */ - @Override - public void onPlayerDestroy(World w, BlockPos coord, IBlockState state){ - super.onPlayerDestroy(w, coord, state); - ConduitRegistry.getInstance().conduitBlockRemovedEvent(w, w.provider.getDimension(), coord, com.mcmoddev.poweradvantage.init.Fluids.fluidConduit_general); - } - /** - * This method is called when the block is destroyed by an explosion. - */ - @Override - public void onBlockExploded(World w, BlockPos coord, Explosion boom){ - super.onBlockExploded(w, coord, boom); - ConduitRegistry.getInstance().conduitBlockRemovedEvent(w, w.provider.getDimension(), coord, Fluids.fluidConduit_general); - } - - - @Override - public boolean isPowerSource(ConduitType e){ - return false; - } - @Override - public boolean isPowerSink(ConduitType e){ - return true; - } - private final ConduitType[] types = {Power.ELECTRIC_POWER,Fluids.fluidConduit_general}; - @Override - public ConduitType[] getTypes(){ - return types; - } - @Override - public boolean canAcceptConnection(PowerConnectorContext c){ - return ConduitType.areSameType(Power.ELECTRIC_POWER,c.powerType) - || Fluids.isFluidType(c.powerType); - } - ///// end multi-type overrides ///// - -} diff --git a/src/main/java/com/mcmoddev/electricadvantage/machines/SteamPoweredElectricGeneratorBlock.java b/src/main/java/com/mcmoddev/electricadvantage/machines/SteamPoweredElectricGeneratorBlock.java deleted file mode 100644 index 3da574c..0000000 --- a/src/main/java/com/mcmoddev/electricadvantage/machines/SteamPoweredElectricGeneratorBlock.java +++ /dev/null @@ -1,73 +0,0 @@ -package com.mcmoddev.electricadvantage.machines; - -import com.mcmoddev.electricadvantage.init.Power; -import cyano.poweradvantage.api.ConduitType; -import cyano.poweradvantage.api.PowerConnectorContext; -import com.mcmoddev.poweradvantage.conduitnetwork.ConduitRegistry; -import net.minecraft.block.state.IBlockState; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.Explosion; -import net.minecraft.world.World; - -public class SteamPoweredElectricGeneratorBlock extends ElectricGeneratorBlock{ - - public static final ConduitType STEAM_POWER = new ConduitType("steam"); - - @Override - public ElectricGeneratorTileEntity createNewTileEntity(World arg0, int arg1) { - return new SteamPoweredElectricGeneratorTileEntity(); - } - - ///// Overrides to make this a multi-type block ///// - - /** - * This method is called whenever the block is placed into the world - */ - @Override - public void onBlockAdded(World w, BlockPos coord, IBlockState state){ - super.onBlockAdded(w, coord, state); - ConduitRegistry.getInstance().conduitBlockPlacedEvent(w, w.provider.getDimension(), coord, STEAM_POWER); - } - - /** - * This method is called when the block is removed from the world by an entity. - */ - @Override - public void onPlayerDestroy(World w, BlockPos coord, IBlockState state){ - super.onPlayerDestroy(w, coord, state); - ConduitRegistry.getInstance().conduitBlockRemovedEvent(w, w.provider.getDimension(), coord,STEAM_POWER); - } - /** - * This method is called when the block is destroyed by an explosion. - */ - @Override - public void onBlockExploded(World w, BlockPos coord, Explosion boom){ - super.onBlockExploded(w, coord, boom); - ConduitRegistry.getInstance().conduitBlockRemovedEvent(w, w.provider.getDimension(), coord, STEAM_POWER); - } - - - - @Override - public boolean canAcceptConnection(PowerConnectorContext c){ - return ConduitType.areSameType(Power.ELECTRIC_POWER,c.powerType) - || ConduitType.areSameType(STEAM_POWER,c.powerType); - } - private final ConduitType[] types = {Power.ELECTRIC_POWER,STEAM_POWER}; - @Override - public ConduitType[] getTypes(){ - return types; - } - - @Override - public boolean isPowerSink(ConduitType pt){ - return ConduitType.areSameType(STEAM_POWER,pt); - } - @Override - public boolean isPowerSource(ConduitType pt){ - return ConduitType.areSameType(Power.ELECTRIC_POWER,pt); - } - - ///// end multi-type overrides ///// - -} diff --git a/src/main/java/com/mcmoddev/electricadvantage/recipe/condition/NotRecipeModeConditionFactory.java b/src/main/java/com/mcmoddev/electricadvantage/recipe/condition/NotRecipeModeConditionFactory.java deleted file mode 100644 index f3b8bde..0000000 --- a/src/main/java/com/mcmoddev/electricadvantage/recipe/condition/NotRecipeModeConditionFactory.java +++ /dev/null @@ -1,19 +0,0 @@ -package com.mcmoddev.electricadvantage.recipe.condition; - -import com.google.gson.JsonObject; -import com.mcmoddev.poweradvantage.PowerAdvantage; -import com.mcmoddev.poweradvantage.RecipeMode; -import net.minecraft.util.JsonUtils; -import net.minecraftforge.common.crafting.IConditionFactory; -import net.minecraftforge.common.crafting.JsonContext; - -import java.util.Locale; -import java.util.function.BooleanSupplier; - -public class NotRecipeModeConditionFactory implements IConditionFactory { - @Override - public BooleanSupplier parse(JsonContext context, JsonObject json) { - RecipeMode mode = RecipeMode.valueOf(JsonUtils.getString(json, "mode").toUpperCase(Locale.US)); - return () -> PowerAdvantage.recipeMode != mode; - } -} diff --git a/src/main/java/com/mcmoddev/electricadvantage/recipe/condition/RecipeModeConditionFactory.java b/src/main/java/com/mcmoddev/electricadvantage/recipe/condition/RecipeModeConditionFactory.java deleted file mode 100644 index 913fd79..0000000 --- a/src/main/java/com/mcmoddev/electricadvantage/recipe/condition/RecipeModeConditionFactory.java +++ /dev/null @@ -1,19 +0,0 @@ -package com.mcmoddev.electricadvantage.recipe.condition; - -import com.google.gson.JsonObject; -import com.mcmoddev.poweradvantage.PowerAdvantage; -import com.mcmoddev.poweradvantage.RecipeMode; -import net.minecraft.util.JsonUtils; -import net.minecraftforge.common.crafting.IConditionFactory; -import net.minecraftforge.common.crafting.JsonContext; - -import java.util.Locale; -import java.util.function.BooleanSupplier; - -public class RecipeModeConditionFactory implements IConditionFactory { - @Override - public BooleanSupplier parse(JsonContext context, JsonObject json) { - RecipeMode mode = RecipeMode.valueOf(JsonUtils.getString(json, "mode").toUpperCase(Locale.US)); - return () -> PowerAdvantage.recipeMode == mode; - } -} diff --git a/src/main/java/com/mcmoddev/electricadvantage/util/LegacyFluidHandler.java b/src/main/java/com/mcmoddev/electricadvantage/util/LegacyFluidHandler.java deleted file mode 100644 index ea8f347..0000000 --- a/src/main/java/com/mcmoddev/electricadvantage/util/LegacyFluidHandler.java +++ /dev/null @@ -1,79 +0,0 @@ -package com.mcmoddev.electricadvantage.util; - -import net.minecraft.util.EnumFacing; -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.FluidTankInfo; -import net.minecraftforge.fluids.capability.IFluidHandler; -import net.minecraftforge.fluids.capability.IFluidTankProperties; - -public interface LegacyFluidHandler extends IFluidHandler { - - int fill(EnumFacing face, FluidStack fluid, boolean forReal); - - FluidStack drain(EnumFacing face, FluidStack fluid, boolean forReal); - - FluidStack drain(EnumFacing face, int amount, boolean forReal); - - boolean canFill(EnumFacing face, Fluid fluid); - - boolean canDrain(EnumFacing face, Fluid fluid); - - FluidTankInfo[] getTankInfo(EnumFacing face); - - @Override - default IFluidTankProperties[] getTankProperties() { - FluidTankInfo[] tankInfo = getTankInfo(null); - IFluidTankProperties[] properties = new IFluidTankProperties[tankInfo.length]; - for (int i = 0; i < tankInfo.length; i++) { - final FluidTankInfo info = tankInfo[i]; - properties[i] = new IFluidTankProperties() { - @Override - public FluidStack getContents() { - return info.fluid; - } - - @Override - public int getCapacity() { - return info.capacity; - } - - @Override - public boolean canFill() { - return true; - } - - @Override - public boolean canDrain() { - return true; - } - - @Override - public boolean canFillFluidType(FluidStack fluidStack) { - return fluidStack != null && LegacyFluidHandler.this.canFill(null, fluidStack.getFluid()); - } - - @Override - public boolean canDrainFluidType(FluidStack fluidStack) { - return fluidStack != null && LegacyFluidHandler.this.canDrain(null, fluidStack.getFluid()); - } - }; - } - return properties; - } - - @Override - default int fill(FluidStack resource, boolean doFill) { - return fill(null, resource, doFill); - } - - @Override - default FluidStack drain(FluidStack resource, boolean doDrain) { - return drain(null, resource, doDrain); - } - - @Override - default FluidStack drain(int maxDrain, boolean doDrain) { - return drain(null, maxDrain, doDrain); - } -} diff --git a/src/main/java/com/mcmoddev/electricadvantage/util/crafting/ItemMatcher.java b/src/main/java/com/mcmoddev/electricadvantage/util/crafting/ItemMatcher.java deleted file mode 100644 index b02a02d..0000000 --- a/src/main/java/com/mcmoddev/electricadvantage/util/crafting/ItemMatcher.java +++ /dev/null @@ -1,118 +0,0 @@ -package com.mcmoddev.electricadvantage.util.crafting; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collection; -import java.util.List; - -import net.minecraft.block.Block; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraftforge.oredict.OreDictionary; - -public class ItemMatcher{ - final ItemStack item; - final List array; - final Block block; - final String name; - - public ItemMatcher(String oreDictRef){ - name = oreDictRef; - item = null; - block = null; - array = null; - } - public ItemMatcher(Item i){ - name = null; - item = new ItemStack(i,1,OreDictionary.WILDCARD_VALUE); - block = null; - array = null; - } - public ItemMatcher(Block i){ - name = null; - item = null; - block = i; - array = null; - } - public ItemMatcher(ItemStack i){ - name = null; - item = i.copy(); - block = null; - if(i.getItem().isDamageable()){ - i.setItemDamage(OreDictionary.WILDCARD_VALUE); - } - array = null; - } - public ItemMatcher(List expandedList) { - name = null; - item = null; - block = null; - array = new ArrayList<>(expandedList.size()); - for(Object o : expandedList){ - if(o instanceof ItemStack){ - array.add(new ItemMatcher((ItemStack)o)); - } else { - throw new ClassCastException(this.getClass().getName()+" does not support item of class type "+o.getClass()); - } - } - } - - - public boolean matches(ItemRecord i){ - return matches(i.getItem()); - } - public boolean matches(ItemStack i){ - if(name != null){ - for(ItemStack n : OreDictionary.getOres(name)){ - if(OreDictionary.itemMatches(i, n, false)){ - return true; - } - } - return false; - } else if(block != null){ - return OreDictionary.itemMatches(new ItemStack(block,1,OreDictionary.WILDCARD_VALUE), i, false); - } else if(array != null){ - for(ItemMatcher m : array){ - if(m.matches(i)){ - return true; - } - } - return false; - } else { - return OreDictionary.itemMatches(item, i, false); - } - } - - public Collection getValidItems() { - if(name != null){ - return OreDictionary.getOres(name); - } else if(block != null){ - ItemStack[] items = new ItemStack[1]; - items [0] = new ItemStack(block,1,OreDictionary.WILDCARD_VALUE); - return Arrays.asList(items); - } else if(array != null){ - List items = new ArrayList<>(array.size()); - for(ItemMatcher m : array){ - items.addAll(m.getValidItems()); - } - return items; - } else { - ItemStack[] items = new ItemStack[1]; - items [0] = item; - return Arrays.asList(items); - } - } - - @Override - public String toString(){ - if(name != null){ - return "\""+name+"\""; - } else if(block != null){ - return block.toString(); - } else if(array != null){ - return Arrays.toString(array.toArray()); - } else { - return item.toString(); - } - } -} \ No newline at end of file diff --git a/src/main/java/com/mcmoddev/electricadvantage/util/crafting/ItemRecord.java b/src/main/java/com/mcmoddev/electricadvantage/util/crafting/ItemRecord.java deleted file mode 100644 index f00f970..0000000 --- a/src/main/java/com/mcmoddev/electricadvantage/util/crafting/ItemRecord.java +++ /dev/null @@ -1,38 +0,0 @@ -package com.mcmoddev.electricadvantage.util.crafting; - -import net.minecraft.item.ItemStack; -import net.minecraftforge.oredict.OreDictionary; - -public class ItemRecord{ - final int hashCode; - final ItemStack item; - - public ItemRecord(ItemStack itemStack){ - this.item = itemStack.copy(); - if(item.getItemDamage() == OreDictionary.WILDCARD_VALUE - || item.getItem().isDamageable() - || item.getItemDamage() == 0){ - hashCode = item.getTranslationKey().hashCode(); - } else { - hashCode = item.getTranslationKey().hashCode() * 57 * item.getItemDamage(); - } - } - - public ItemStack getItem(){return item;} - - @Override public int hashCode(){ return hashCode;} - - @Override - public boolean equals(Object other){ - if(other == this) return true; - if(other == null) return false; - if(other instanceof ItemRecord && this.hashCode() == other.hashCode()){ - if(this.item.getItemDamage() == OreDictionary.WILDCARD_VALUE || this.item.getItem().isDamageable()){ - return this.item.getItem().equals(((ItemRecord)other).item.getItem()); - } else { - return ItemStack.areItemsEqual(item, ((ItemRecord)other).item); - } - } - return false; - } -} diff --git a/src/main/java/com/mcmoddev/electricadvantage/util/crafting/RecipeDeconstructor.java b/src/main/java/com/mcmoddev/electricadvantage/util/crafting/RecipeDeconstructor.java deleted file mode 100644 index 43c2a94..0000000 --- a/src/main/java/com/mcmoddev/electricadvantage/util/crafting/RecipeDeconstructor.java +++ /dev/null @@ -1,254 +0,0 @@ -package com.mcmoddev.electricadvantage.util.crafting; - -import net.minecraft.block.Block; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.item.crafting.IRecipe; -import net.minecraft.item.crafting.Ingredient; -import net.minecraft.item.crafting.ShapedRecipes; -import net.minecraft.item.crafting.ShapelessRecipes; -import net.minecraftforge.fml.common.FMLLog; -import net.minecraftforge.fml.common.registry.ForgeRegistries; -import net.minecraftforge.oredict.OreDictionary; -import net.minecraftforge.oredict.ShapedOreRecipe; -import net.minecraftforge.oredict.ShapelessOreRecipe; - -import java.util.*; -import java.util.concurrent.atomic.AtomicReference; -import java.util.concurrent.locks.Lock; -import java.util.concurrent.locks.ReentrantLock; - -public class RecipeDeconstructor { - - private static final boolean enableDebugOutput = false; - - private static RecipeDeconstructor instance = null; - private static final Lock initLock = new ReentrantLock(); - - public static int RECURSION_LIMIT = 5; - - - private Map> recipeCache = null; - - - // thread-safe singleton initialization - public static RecipeDeconstructor getInstance(){ - if(instance == null){ - initLock.lock(); - try{ - if(instance == null){ - instance = new RecipeDeconstructor(); - } - }finally{ - initLock.unlock(); - } - } - return instance; - } - - public List getRecipesForItem(ItemStack item){ - if(recipeCache == null) initializeRecipeCache(); - return recipeCache.get(new ItemRecord(item)); - } - - - public void initializeRecipeCache(){ - recipeCache = new HashMap<>(); - for(Object o : ForgeRegistries.RECIPES.getValuesCollection()){ - if(o instanceof IRecipe){ - IRecipe recipe = (IRecipe)o; - ItemStack output = recipe.getRecipeOutput(); - ItemRecord key; - try{ - if(output == null || output.getItem() == null || output.isEmpty()) { - // invalid recipe - continue; - } - key = new ItemRecord(output); - } catch(Exception ex){ - // extra insurance - FMLLog.severe("%s: ERROR! Encountered corrupted item! One of the installed mods added an invalid crafting recipe to the game registry.",this.getClass().getName()); - continue; - } - if(recipeCache.containsKey(key) == false){ - recipeCache.put(key, new ArrayList()); - } - recipeCache.get(key).add(recipe); - } - } - } - - public void invalidateRecipeCache(){ - recipeCache = null; - } - - /** - * Attempts to craft a specified item from the provided inventory of serialized items, - * recursively searching for recipes if needed ingredients. This method returns the new state of - * the inventory after crafting if successful, or null if the item cannot be crafted. - * @param craftingTarget The item you want to craft. - * @param serializedInventory The inventory to use, serialized such that all items stacks have a - * size of 1 - * @param output Atomic reference used to pass the actual product of crafting back to the caller - * @return Returns the new inventory after crafting, or null if the item cannot be crafted from - * the provided inventory - */ - public SerializedInventory attemptToCraft(ItemStack craftingTarget, SerializedInventory serializedInventory, AtomicReference output){ - return attemptToCraft( craftingTarget, serializedInventory, output, 0); - } - /** - * Attempts to craft a specified item from the provided inventory of serialized items, - * recursively searching for recipes if needed ingredients. This method returns the new state of - * the inventory after crafting if successful, or null if the item cannot be crafted. - * @param craftingTarget The item you want to craft. - * @param serializedInventory The inventory to use, serialized into a SerializedInventory - * instance - * @param output Atomic reference used to pass the actual product of crafting back to the caller - * @param recursionDepth Used to control how deep the recursion goes. Use 0 if you are calling - * this method. - * @return Returns the new inventory after crafting, or null if the item cannot be crafted from - * the provided inventory - */ - private SerializedInventory attemptToCraft(ItemStack craftingTarget, SerializedInventory serializedInventory, AtomicReference output, int recursionDepth){ - // check recusion limit - if(recursionDepth > RECURSION_LIMIT) return null; - if(craftingTarget == null) return null; - - debug("Looking up recipe for %s in %s",craftingTarget,serializedInventory); - // handle wild-card items by attempting to craft each valid variant - if(craftingTarget.getMetadata() == OreDictionary.WILDCARD_VALUE){ - debug("%s has wild-card meta value",craftingTarget); - SerializedInventory attempt1 = attemptToCraft(craftingTarget,serializedInventory,output,recursionDepth+1); - if(attempt1 != null || craftingTarget.getItem().isDamageable()) return attempt1; - ItemStack newTarget = craftingTarget.copy(); - for(int meta = 0; meta < 16; meta++){ - debug("Trying recipe with meta value ",meta); - newTarget.setItemDamage(meta); - SerializedInventory attempt2 = attemptToCraft(newTarget,serializedInventory,output,recursionDepth+1); - if(attempt2 != null) return attempt2; - } - return null; - } - // get recipes for item - List recipes = getRecipesForItem(craftingTarget); - if(recipes == null || recipes.isEmpty()) return null; - - for(IRecipe recipe : recipes){ - // make local copy of inventory and marshal the recipe into a list of item matchers - recipeAttempt:{ - SerializedInventory tempInv = serializedInventory.copy(); - List ingredients = marshalCraftingRecipe(recipe); - if(ingredients == null || ingredients.isEmpty()) continue; - - debug("Recipe: %s",ingredients); - - // for each ingredient, either find it in the inventory (and remove it) or craft it from the inventory - for(ItemMatcher ingredient : ingredients){ - if(tempInv.decrement(ingredient)){ - debug("Consumed %s",ingredient); - // inventory contained requested ingredient, move on to the next - continue; - } else { - // ingredient not found, try to craft it - Collection validItems = ingredient.getValidItems(); - if(validItems == null || validItems.isEmpty()){ - // no valid items (unused ore dictionary name?) - // cannot craft - break recipeAttempt; - } - boolean failure = true; - for(ItemStack vi : validItems){ - AtomicReference ret = new AtomicReference<>(); - SerializedInventory r = attemptToCraft(vi,tempInv,ret,recursionDepth+1); - if(r != null) { - ItemStack y = ret.get(); - if(y.getCount() > 1){ - y.shrink(1); - r.add(y); - } - tempInv = r; - failure = false; - break; - } - } - if(failure) break recipeAttempt; - } - } - // if we made it this far, then we successfully crafted the item - // set the output callback - debug("Craft successful; New inventory: %s",tempInv); - output.set(recipe.getRecipeOutput().copy()); - // return the new state of the inventory - return tempInv; - } - } - // no valid recipes found - return null; - } - - - - private static List marshalCraftingRecipe(IRecipe recipe) { - if(recipe instanceof ShapedRecipes){ - return marshalIngredients(((ShapedRecipes)recipe).recipeItems); - } else if(recipe instanceof ShapelessRecipes){ - return marshalIngredients(((ShapelessRecipes)recipe).recipeItems); - } else if(recipe instanceof ShapedOreRecipe){ - return marshalIngredients(((ShapedOreRecipe)recipe).getIngredients()); - } else if(recipe instanceof ShapelessOreRecipe){ - return marshalIngredients(((ShapelessOreRecipe)recipe).getIngredients()); - } else { - // unsupported recipe type - return marshalIngredients(recipe.getIngredients()); - } - } - private static List marshalIngredients(List recipeItems) { - List output = new ArrayList<>(recipeItems.size()); - for(Ingredient ingredient : recipeItems){ - if(ingredient == null || ingredient == Ingredient.EMPTY) continue; - ItemStack[] stacks = ingredient.getMatchingStacks(); - if(stacks == null || stacks.length == 0) continue; - if(stacks.length == 1){ - output.add(new ItemMatcher(stacks[0])); - } else { - output.add(new ItemMatcher(Arrays.asList(stacks))); - } - } - return output; - } - private static List marshalCraftingRecipe(ItemStack[] recipeItems) { - return marshalCraftingRecipe(Arrays.asList(recipeItems)); - } - private static List marshalCraftingRecipe(Object[] recipeItems) { - return marshalCraftingRecipe(Arrays.asList(recipeItems)); - } - private static List marshalCraftingRecipe(List recipeItems) { - List output = new ArrayList<>(recipeItems.size()); - for(Object o : recipeItems){ - if(o == null) continue; - if(o instanceof ItemStack){ - output.add(new ItemMatcher((ItemStack)o)); - } else if(o instanceof String){ - output.add(new ItemMatcher((String)o)); - } else if(o instanceof Block){ - output.add(new ItemMatcher((Block)o)); - } else if(o instanceof Item){ - output.add(new ItemMatcher((Item)o)); - } else if(o instanceof List){ - output.add(new ItemMatcher((List)o)); - } else { - FMLLog.severe("%s: Recipe item %s of class type %s was not recognized!", - RecipeDeconstructor.class.getName(), - o.toString(), - o.getClass().getName()); - } - } - return output; - } - - private static void debug(String msg, Object... data){ - if(enableDebugOutput){ - FMLLog.info(RecipeDeconstructor.class.getName()+": "+msg, data); - } - } -} diff --git a/src/main/java/com/mcmoddev/electricadvantage/Data.java b/src/main/java/zone/moddev/mc/electricadvantage/Data.java similarity index 94% rename from src/main/java/com/mcmoddev/electricadvantage/Data.java rename to src/main/java/zone/moddev/mc/electricadvantage/Data.java index 640ca0c..618ea0c 100644 --- a/src/main/java/com/mcmoddev/electricadvantage/Data.java +++ b/src/main/java/zone/moddev/mc/electricadvantage/Data.java @@ -1,4 +1,4 @@ -package com.mcmoddev.electricadvantage; +package zone.moddev.mc.electricadvantage; public abstract class Data { diff --git a/src/main/java/zone/moddev/mc/electricadvantage/ElectricAdvantage.java b/src/main/java/zone/moddev/mc/electricadvantage/ElectricAdvantage.java new file mode 100644 index 0000000..3ce9fa2 --- /dev/null +++ b/src/main/java/zone/moddev/mc/electricadvantage/ElectricAdvantage.java @@ -0,0 +1,109 @@ +package zone.moddev.mc.electricadvantage; + +import java.util.HashSet; +import java.util.Set; +import java.io.IOException; + +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.fml.DistExecutor; +import net.minecraftforge.fml.ModLoadingContext; +import net.minecraftforge.fml.common.Mod; +import net.minecraftforge.fml.config.ModConfig; +import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent; +import net.minecraftforge.fml.event.lifecycle.InterModEnqueueEvent; +import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext; +import net.minecraftforge.fml.loading.FMLPaths; +import cyano.poweradvantage.api.migration.LegacyConfigMigration; +import cyano.poweradvantage.api.migration.LegacyConfigMigration.Mapping; +import cyano.poweradvantage.api.migration.LegacyConfigMigration.ValueType; +import cyano.poweradvantage.api.migration.LegacyOreSpawnConfigBridge; +import zone.moddev.mc.electricadvantage.config.ElectricAdvantageConfig; +import zone.moddev.mc.electricadvantage.init.Blocks; +import zone.moddev.mc.electricadvantage.init.Enchantments; +import zone.moddev.mc.electricadvantage.init.Entities; +import zone.moddev.mc.electricadvantage.init.GUI; +import zone.moddev.mc.electricadvantage.init.Items; +import zone.moddev.mc.electricadvantage.init.OreSpawnWorldGen; +import zone.moddev.mc.electricadvantage.init.Recipes; +import zone.moddev.mc.electricadvantage.init.TreasureChests; +import zone.moddev.mc.electricadvantage.init.Villages; +import zone.moddev.mc.electricadvantage.recipe.RecipeConditions; +import zone.moddev.mc.electricadvantage.migration.ElectricLegacyMigrations; + +/** Forge 1.13 entry point for Electric Advantage. */ +@Mod(ElectricAdvantage.MODID) +public final class ElectricAdvantage { + public static final String MODID = "electricadvantage"; + public static final String NAME = "Electric Advantage"; + public static final String VERSION = "2.2.5.113021"; + public static final Logger LOGGER = LogManager.getLogger(MODID); + public static ElectricAdvantage INSTANCE; + + public final Set PLASTIC_FLUID_MATERIALS = new HashSet<>(); + public String LASER_SOUND = "minecraft:block.note_block.bass"; + + public ElectricAdvantage() { + INSTANCE = this; + Blocks.init(); + Items.init(); + Entities.init(); + Enchantments.init(); + GUI.init(); + RecipeConditions.register(); + ElectricLegacyMigrations.register(); + + migrateLegacyOreSpawnConfiguration(); + migrateLegacyConfiguration(); + ModLoadingContext.get().registerConfig(ModConfig.Type.COMMON, ElectricAdvantageConfig.SPEC); + FMLJavaModLoadingContext.get().getModEventBus().addListener(ElectricAdvantageConfig::onConfigLoading); + FMLJavaModLoadingContext.get().getModEventBus().addListener(this::commonSetup); + FMLJavaModLoadingContext.get().getModEventBus().addListener(this::enqueueInterModCommunication); + + DistExecutor.runWhenOn(Dist.CLIENT, () -> () -> + FMLJavaModLoadingContext.get().getModEventBus().addListener( + zone.moddev.mc.electricadvantage.graphics.ClientRegistration::onClientSetup)); + } + + private static void migrateLegacyOreSpawnConfiguration() { + try { + LegacyOreSpawnConfigBridge.Result result = + LegacyOreSpawnConfigBridge.migrate(FMLPaths.CONFIGDIR.get(), MODID); + if (result.wasMigrated()) { + LOGGER.info("Imported {} legacy Electric Advantage OreSpawn rule(s) from '{}' into '{}'", + result.getRuleCount(), result.getSource(), result.getTarget()); + } + } catch (IOException exception) { + LOGGER.error("Could not migrate legacy Electric Advantage OreSpawn configuration", exception); + } + } + + private static void migrateLegacyConfiguration() { + try { + LegacyConfigMigration.Result result = LegacyConfigMigration.migrate(FMLPaths.CONFIGDIR.get(), MODID, + Mapping.of("fabricator", "recursion_limit", "fabricator", "recursionLimit", ValueType.INTEGER), + Mapping.of("options", "laser_sound", "options", "laserSound", ValueType.STRING), + Mapping.of("options", "petrolplastic_fluids", "options", "petrolplasticFluids", ValueType.STRING)); + if (result.wasMigrated()) { + LOGGER.info("Imported {} legacy Electric Advantage settings; report: {}", + result.getImportedValues(), result.getReportFile()); + } + } catch (IOException exception) { + LOGGER.error("Could not migrate legacy Electric Advantage configuration", exception); + } + } + + private void commonSetup(FMLCommonSetupEvent event) { + ElectricAdvantageConfig.apply(); + Recipes.init(); + TreasureChests.init(FMLPaths.CONFIGDIR.get()); + Villages.init(); + LOGGER.info("Electric Advantage {} common setup complete", VERSION); + } + + private void enqueueInterModCommunication(InterModEnqueueEvent event) { + OreSpawnWorldGen.register(FMLPaths.CONFIGDIR.get()); + } +} diff --git a/src/main/java/com/mcmoddev/electricadvantage/blocks/ElectricConduitBlock.java b/src/main/java/zone/moddev/mc/electricadvantage/blocks/ElectricConduitBlock.java similarity index 71% rename from src/main/java/com/mcmoddev/electricadvantage/blocks/ElectricConduitBlock.java rename to src/main/java/zone/moddev/mc/electricadvantage/blocks/ElectricConduitBlock.java index 25cb7e7..957724b 100644 --- a/src/main/java/com/mcmoddev/electricadvantage/blocks/ElectricConduitBlock.java +++ b/src/main/java/zone/moddev/mc/electricadvantage/blocks/ElectricConduitBlock.java @@ -1,6 +1,6 @@ -package com.mcmoddev.electricadvantage.blocks; +package zone.moddev.mc.electricadvantage.blocks; -import com.mcmoddev.electricadvantage.init.Power; +import zone.moddev.mc.electricadvantage.init.Power; import net.minecraft.block.material.Material; public class ElectricConduitBlock extends cyano.poweradvantage.api.simple.BlockSimplePowerConduit{ diff --git a/src/main/java/zone/moddev/mc/electricadvantage/blocks/ElectricScaffoldBlock.java b/src/main/java/zone/moddev/mc/electricadvantage/blocks/ElectricScaffoldBlock.java new file mode 100644 index 0000000..1c730f8 --- /dev/null +++ b/src/main/java/zone/moddev/mc/electricadvantage/blocks/ElectricScaffoldBlock.java @@ -0,0 +1,20 @@ +package zone.moddev.mc.electricadvantage.blocks; + +import net.minecraft.util.BlockRenderLayer; +import net.minecraft.block.material.Material; +import net.minecraft.block.state.IBlockState; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.shapes.VoxelShape; +import net.minecraft.util.math.shapes.VoxelShapes; +import net.minecraft.world.IBlockReader; +import zone.moddev.mc.electricadvantage.init.Power; + +/** Full-block electric track/scaffold with conduit behavior. */ +public class ElectricScaffoldBlock extends cyano.poweradvantage.api.simple.BlockSimplePowerConduit { + public ElectricScaffoldBlock() { super(Material.PISTON, 0.75F, 2.0F / 16.0F, Power.ELECTRIC_POWER); } + @Override public VoxelShape getShape(IBlockState state, IBlockReader world, BlockPos pos) { return VoxelShapes.fullCube(); } + @Override public VoxelShape getCollisionShape(IBlockState state, IBlockReader world, BlockPos pos) { return VoxelShapes.fullCube(); } + @Override public boolean isNormalCube(IBlockState state) { return false; } + @Override public boolean isSolid(IBlockState state) { return false; } + @Override public BlockRenderLayer getRenderLayer() { return BlockRenderLayer.CUTOUT; } +} diff --git a/src/main/java/zone/moddev/mc/electricadvantage/blocks/Ore.java b/src/main/java/zone/moddev/mc/electricadvantage/blocks/Ore.java new file mode 100644 index 0000000..7431924 --- /dev/null +++ b/src/main/java/zone/moddev/mc/electricadvantage/blocks/Ore.java @@ -0,0 +1,51 @@ +package zone.moddev.mc.electricadvantage.blocks; + +import java.util.Random; + +import net.minecraft.block.Block; +import net.minecraft.block.SoundType; +import net.minecraft.block.material.Material; +import net.minecraft.block.state.IBlockState; +import net.minecraft.item.ItemStack; +import net.minecraft.util.NonNullList; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; +import net.minecraftforge.common.ToolType; + +/** Legacy ElectricAdvantage ore block retaining its original drops and harvest level. */ +public class Ore extends Block { + private final ItemStack dropItem; + private final int dropRange; + private final int harvestLevel; + + public Ore(ItemStack oreDrop, int pickLevel, int variation) { + super(Properties.create(Material.ROCK).sound(SoundType.STONE) + .hardnessAndResistance(1.5F + pickLevel, 5.0F * (1 + pickLevel))); + dropItem = oreDrop.copy(); + dropRange = variation + 1; + harvestLevel = pickLevel; + } + + public Ore(int pickLevel) { + super(Properties.create(Material.ROCK).sound(SoundType.STONE) + .hardnessAndResistance(1.5F + pickLevel, 5.0F * (1 + pickLevel))); + dropItem = ItemStack.EMPTY; + dropRange = 0; + harvestLevel = pickLevel; + } + + @Override public ToolType getHarvestTool(IBlockState state) { return ToolType.PICKAXE; } + @Override public int getHarvestLevel(IBlockState state) { return harvestLevel; } + + @Override + public void getDrops(IBlockState state, NonNullList drops, World world, BlockPos pos, int fortune) { + if (dropItem.isEmpty()) { + drops.add(new ItemStack(this)); + return; + } + Random random = world.rand; + ItemStack result = dropItem.copy(); + result.setCount(dropItem.getCount() + (dropRange > 1 ? random.nextInt(dropRange) : 0)); + drops.add(result); + } +} diff --git a/src/main/java/zone/moddev/mc/electricadvantage/blocks/PumpPipeBlock.java b/src/main/java/zone/moddev/mc/electricadvantage/blocks/PumpPipeBlock.java new file mode 100644 index 0000000..e2a3934 --- /dev/null +++ b/src/main/java/zone/moddev/mc/electricadvantage/blocks/PumpPipeBlock.java @@ -0,0 +1,44 @@ +package zone.moddev.mc.electricadvantage.blocks; + +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.block.state.IBlockState; +import net.minecraft.item.ItemStack; +import net.minecraft.util.NonNullList; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.shapes.VoxelShape; +import net.minecraft.util.math.shapes.VoxelShapes; +import net.minecraft.world.Explosion; +import net.minecraft.world.IBlockReader; +import net.minecraft.world.World; + +/** Hidden pump intake column. */ +public class PumpPipeBlock extends Block { + private static final VoxelShape SHAPE = VoxelShapes.create(0.25D, 0.0D, 0.25D, 0.75D, 1.0D, 0.75D); + public PumpPipeBlock() { super(Properties.create(Material.IRON).hardnessAndResistance(5.0F, 10.0F)); } + @Override public VoxelShape getShape(IBlockState state, IBlockReader world, BlockPos pos) { return SHAPE; } + @Override public VoxelShape getCollisionShape(IBlockState state, IBlockReader world, BlockPos pos) { return SHAPE; } + @Override public boolean isNormalCube(IBlockState state) { return false; } + @Override public boolean isSolid(IBlockState state) { return false; } + @Override public void getDrops(IBlockState state, NonNullList drops, World world, BlockPos pos, int fortune) {} + + @Override + public void onReplaced(IBlockState state, World world, BlockPos pos, IBlockState newState, boolean moving) { + if (state.getBlock() != newState.getBlock()) destroyBelow(world, pos); + super.onReplaced(state, world, pos, newState, moving); + } + + @Override public void onExplosionDestroy(World world, BlockPos pos, Explosion explosion) { + destroyBelow(world, pos); + super.onExplosionDestroy(world, pos, explosion); + } + + private void destroyBelow(World world, BlockPos pos) { + if (world.isRemote) return; + BlockPos cursor = pos.down(); + while (cursor.getY() > 0 && world.getBlockState(cursor).getBlock() == this) { + world.setBlockState(cursor, net.minecraft.init.Blocks.AIR.getDefaultState(), 3); + cursor = cursor.down(); + } + } +} diff --git a/src/main/java/com/mcmoddev/electricadvantage/common/IRechargeableItem.java b/src/main/java/zone/moddev/mc/electricadvantage/common/IRechargeableItem.java similarity index 92% rename from src/main/java/com/mcmoddev/electricadvantage/common/IRechargeableItem.java rename to src/main/java/zone/moddev/mc/electricadvantage/common/IRechargeableItem.java index 7c6cb44..df24562 100644 --- a/src/main/java/com/mcmoddev/electricadvantage/common/IRechargeableItem.java +++ b/src/main/java/zone/moddev/mc/electricadvantage/common/IRechargeableItem.java @@ -1,4 +1,4 @@ -package com.mcmoddev.electricadvantage.common; +package zone.moddev.mc.electricadvantage.common; import cyano.poweradvantage.api.ConduitType; import net.minecraft.item.ItemStack; diff --git a/src/main/java/zone/moddev/mc/electricadvantage/compat/BaseMetalsCompat.java b/src/main/java/zone/moddev/mc/electricadvantage/compat/BaseMetalsCompat.java new file mode 100644 index 0000000..b3fdd0c --- /dev/null +++ b/src/main/java/zone/moddev/mc/electricadvantage/compat/BaseMetalsCompat.java @@ -0,0 +1,83 @@ +package zone.moddev.mc.electricadvantage.compat; + +import net.minecraft.block.Block; +import net.minecraft.block.state.IBlockState; +import net.minecraft.inventory.InventoryBasic; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.item.crafting.IRecipe; +import net.minecraft.util.ResourceLocation; +import net.minecraft.util.text.TextComponentString; +import net.minecraft.world.World; +import net.minecraftforge.fml.ModList; +import net.minecraftforge.registries.ForgeRegistries; +import zone.moddev.mc.basemetals.recipe.CrushingRecipe; + +/** Accesses Base Metals' data-driven 1.13 crushing recipes without embedding it. */ +public final class BaseMetalsCompat { + private BaseMetalsCompat() {} + + public static boolean isLoaded() { + return ModList.get().isLoaded("basemetals"); + } + + /** 1.13 additions are supplied as JSON crushing recipes and item tags. */ + public static void addCrusherRecipe(String input, ItemStack output) {} + public static void addCrusherRecipe(Item input, ItemStack output) {} + public static void addCrusherRecipe(Block input, ItemStack output) {} + public static void registerOreDictionaryCopies(String target, String... sources) {} + + public static boolean hasCrusherRecipe(World world, ItemStack input) { + return getCrusherRecipeOutput(world, input) != null; + } + + public static ItemStack getCrusherRecipeOutput(World world, ItemStack input) { + if (world == null || input == null || input.isEmpty()) return null; + if (isLoaded()) { + InventoryBasic inventory = new InventoryBasic(new TextComponentString("electric crusher"), 1); + inventory.setInventorySlotContents(0, input.copy()); + for (IRecipe candidate : world.getRecipeManager().getRecipes()) { + if (candidate instanceof CrushingRecipe && candidate.matches(inventory, world)) { + return candidate.getRecipeOutput().copy(); + } + } + } + return getVanillaCrusherOutput(input); + } + + public static ItemStack getCrusherRecipeOutput(World world, IBlockState input) { + return input == null ? null : getCrusherRecipeOutput(world, new ItemStack(input.getBlock())); + } + + private static ItemStack getVanillaCrusherOutput(ItemStack input) { + String key = String.valueOf(input.getItem().getRegistryName()); + if ("minecraft:stone".equals(key) || "minecraft:stone_bricks".equals(key)) { + return stack("minecraft:cobblestone", 1); + } + if ("minecraft:cobblestone".equals(key) || "minecraft:mossy_cobblestone".equals(key) + || "minecraft:cobblestone_wall".equals(key)) { + return stack("minecraft:gravel", 1); + } + if ("minecraft:gravel".equals(key) || "minecraft:glass".equals(key)) { + return stack("minecraft:sand", 1); + } + if ("minecraft:sandstone".equals(key)) return stack("minecraft:sand", 4); + if ("minecraft:red_sandstone".equals(key)) return stack("minecraft:red_sand", 4); + if ("minecraft:glowstone".equals(key)) return stack("minecraft:glowstone_dust", 4); + if ("minecraft:sugar_cane".equals(key)) return stack("minecraft:sugar", 2); + if ("minecraft:bone".equals(key)) return stack("minecraft:bone_meal", 3); + if ("minecraft:blaze_rod".equals(key)) return stack("minecraft:blaze_powder", 2); + if ("minecraft:redstone_ore".equals(key)) return stack("minecraft:redstone", 8); + if ("minecraft:redstone_block".equals(key)) return stack("minecraft:redstone", 9); + if ("minecraft:nether_quartz_ore".equals(key)) return stack("minecraft:quartz", 2); + if ("minecraft:quartz_block".equals(key)) return stack("minecraft:quartz", 4); + if ("minecraft:slime_block".equals(key)) return stack("minecraft:slime_ball", 9); + if ("minecraft:bone_block".equals(key)) return stack("minecraft:bone_meal", 9); + return null; + } + + private static ItemStack stack(String id, int count) { + Item item = ForgeRegistries.ITEMS.getValue(new ResourceLocation(id)); + return item == null ? null : new ItemStack(item, count); + } +} diff --git a/src/main/java/zone/moddev/mc/electricadvantage/config/ElectricAdvantageConfig.java b/src/main/java/zone/moddev/mc/electricadvantage/config/ElectricAdvantageConfig.java new file mode 100644 index 0000000..dd5c41d --- /dev/null +++ b/src/main/java/zone/moddev/mc/electricadvantage/config/ElectricAdvantageConfig.java @@ -0,0 +1,53 @@ +package zone.moddev.mc.electricadvantage.config; + +import java.util.Arrays; + +import net.minecraftforge.common.ForgeConfigSpec; +import net.minecraftforge.fml.config.ModConfig; +import zone.moddev.mc.electricadvantage.ElectricAdvantage; +import zone.moddev.mc.electricadvantage.util.crafting.RecipeDeconstructor; + +/** Common configuration retaining the legacy gameplay defaults. */ +public final class ElectricAdvantageConfig { + public static final ForgeConfigSpec SPEC; + public static final ForgeConfigSpec.IntValue FABRICATOR_RECURSION_LIMIT; + public static final ForgeConfigSpec.ConfigValue LASER_SOUND; + public static final ForgeConfigSpec.ConfigValue PLASTIC_FLUIDS; + private static boolean loaded; + + static { + ForgeConfigSpec.Builder builder = new ForgeConfigSpec.Builder(); + builder.push("fabricator"); + FABRICATOR_RECURSION_LIMIT = builder.defineInRange( + "recursionLimit", RecipeDeconstructor.RECURSION_LIMIT, 1, 255); + builder.pop(); + builder.push("options"); + LASER_SOUND = builder.define("laserSound", "minecraft:block.note_block.bass"); + PLASTIC_FLUIDS = builder.comment("Semi-colon delimited fluid registry names usable by the plastic refinery.") + .define("petrolplasticFluids", "refined_oil;poweradvantage:refined_oil;oil"); + builder.pop(); + SPEC = builder.build(); + } + + private ElectricAdvantageConfig() {} + + public static void onConfigLoading(ModConfig.Loading event) { + if (event.getConfig().getSpec() != SPEC) return; + loaded = true; + apply(); + } + + public static void apply() { + if (!loaded || ElectricAdvantage.INSTANCE == null) return; + RecipeDeconstructor.RECURSION_LIMIT = FABRICATOR_RECURSION_LIMIT.get(); + String laserSound = LASER_SOUND.get().trim(); + if ("block.note.bass".equals(laserSound)) { + laserSound = "minecraft:block.note_block.bass"; + } + ElectricAdvantage.INSTANCE.LASER_SOUND = laserSound; + ElectricAdvantage.INSTANCE.PLASTIC_FLUID_MATERIALS.clear(); + Arrays.stream(PLASTIC_FLUIDS.get().split(";")) + .map(String::trim).filter(value -> !value.isEmpty()) + .forEach(ElectricAdvantage.INSTANCE.PLASTIC_FLUID_MATERIALS::add); + } +} diff --git a/src/main/java/com/mcmoddev/electricadvantage/entities/HydroturbineEntity.java b/src/main/java/zone/moddev/mc/electricadvantage/entities/HydroturbineEntity.java similarity index 70% rename from src/main/java/com/mcmoddev/electricadvantage/entities/HydroturbineEntity.java rename to src/main/java/zone/moddev/mc/electricadvantage/entities/HydroturbineEntity.java index 4b7ddf3..d9bad84 100644 --- a/src/main/java/com/mcmoddev/electricadvantage/entities/HydroturbineEntity.java +++ b/src/main/java/zone/moddev/mc/electricadvantage/entities/HydroturbineEntity.java @@ -1,12 +1,11 @@ -package com.mcmoddev.electricadvantage.entities; +package zone.moddev.mc.electricadvantage.entities; -import com.mcmoddev.electricadvantage.init.Power; -import com.mcmoddev.electricadvantage.machines.HydroelectricGeneratorTileEntity; -import net.minecraft.block.Block; -import net.minecraft.block.BlockLiquid; -import net.minecraft.block.state.IBlockState; +import zone.moddev.mc.electricadvantage.init.Power; +import zone.moddev.mc.electricadvantage.machines.HydroelectricGeneratorTileEntity; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.EntityType; +import net.minecraft.fluid.IFluidState; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.math.BlockPos; @@ -27,8 +26,8 @@ public class HydroturbineEntity extends net.minecraft.entity.Entity{ private BlockPos parentCoord = null; private final long roffset; - public HydroturbineEntity(World w) { - super(w); + public HydroturbineEntity(EntityType type, World w) { + super(type, w); this.width = 0.9375F; this.height = 0.9375F; this.setSize(this.width, this.height); @@ -36,29 +35,28 @@ public HydroturbineEntity(World w) { roffset = w.rand.nextInt(8); } public HydroturbineEntity(World w, BlockPos parentTileEntity) { - this(w,w.getTileEntity(parentTileEntity)); + this(w, w.getTileEntity(parentTileEntity)); } public HydroturbineEntity(World w, TileEntity parentTileEntity) { - this(w); + this(zone.moddev.mc.electricadvantage.init.Entities.HYDROTURBINE, w); this.parent = parentTileEntity; BlockPos p = parentTileEntity.getPos(); this.setPosition(p.getX()+0.5, p.getY()-1, p.getZ()+0.5); } @Override - protected void entityInit() { + protected void registerData() { // do nothing } @Override - public void onUpdate(){ - super.onUpdate(); - IBlockState bs = this.getEntityWorld().getBlockState(getPosition()); - Block b = bs.getBlock(); + public void tick(){ + super.tick(); + IFluidState fluidState = this.getEntityWorld().getFluidState(getPosition()); Vec3d directionVector; - if(b instanceof BlockLiquid){ - directionVector = ((BlockLiquid)b).modifyAcceleration(getEntityWorld(), getPosition(), null, new Vec3d(0,0,0)); + if(!fluidState.isEmpty()){ + directionVector = fluidState.getFlow(getEntityWorld(), getPosition()); isSpinning = !(directionVector.x == 0 && directionVector.z == 0); } else { isSpinning = false; @@ -78,8 +76,8 @@ public void onUpdate(){ parent = this.getEntityWorld().getTileEntity(parentCoord); parentCoord = null; } - if(parent == null || parent.isInvalid()){ - this.setDead(); + if(parent == null || parent.isRemoved()){ + this.remove(); } else if(parent instanceof HydroelectricGeneratorTileEntity){ HydroelectricGeneratorTileEntity generator = (HydroelectricGeneratorTileEntity)parent; if(isSpinning){ @@ -87,9 +85,9 @@ public void onUpdate(){ } generator.setActive(isSpinning); } - if(isSpinning && getEntityWorld().getTotalWorldTime() % 8 == roffset){ + if(isSpinning && getEntityWorld().getGameTime() % 8 == roffset){ // slice-n-dice unfortunate souls caught in the blades - List victims = getEntityWorld().getEntitiesWithinAABB(EntityLivingBase.class, this.getEntityBoundingBox()); + List victims = getEntityWorld().getEntitiesWithinAABB(EntityLivingBase.class, this.getBoundingBox()); for(Entity e : victims){ e.attackEntityFrom(Power.propeller_damage, PROPELLER_DAMAGE); } @@ -98,8 +96,10 @@ public void onUpdate(){ } @Override - protected void readEntityFromNBT(NBTTagCompound root) { - if(root.hasKey("parentPos")){ + protected void readAdditional(NBTTagCompound root) { + parent = null; + parentCoord = null; + if(root.contains("parentPos", 11)){ int[] coords = root.getIntArray("parentPos"); if(coords.length >= 3){ parentCoord = new BlockPos(coords[0],coords[1],coords[2]); @@ -108,10 +108,10 @@ protected void readEntityFromNBT(NBTTagCompound root) { } @Override - protected void writeEntityToNBT(NBTTagCompound root) { - if(parent != null){ + protected void writeAdditional(NBTTagCompound root) { + BlockPos p = parent != null ? parent.getPos() : parentCoord; + if(p != null){ int[] coords = new int[3]; - BlockPos p = parent.getPos(); coords[0] = p.getX(); coords[1] = p.getY(); coords[2] = p.getZ(); diff --git a/src/main/java/zone/moddev/mc/electricadvantage/graphics/ClientRegistration.java b/src/main/java/zone/moddev/mc/electricadvantage/graphics/ClientRegistration.java new file mode 100644 index 0000000..a870c6c --- /dev/null +++ b/src/main/java/zone/moddev/mc/electricadvantage/graphics/ClientRegistration.java @@ -0,0 +1,19 @@ +package zone.moddev.mc.electricadvantage.graphics; + +import net.minecraftforge.fml.client.registry.ClientRegistry; +import net.minecraftforge.fml.client.registry.RenderingRegistry; +import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent; +import zone.moddev.mc.electricadvantage.entities.HydroturbineEntity; +import zone.moddev.mc.electricadvantage.machines.ElectricDrillTileEntity; +import zone.moddev.mc.electricadvantage.machines.LaserTurretTileEntity; + +/** Client-only renderer registration. */ +public final class ClientRegistration { + private ClientRegistration() {} + + public static void onClientSetup(FMLClientSetupEvent event) { + ClientRegistry.bindTileEntitySpecialRenderer(ElectricDrillTileEntity.class, new LaserDrillRenderer()); + ClientRegistry.bindTileEntitySpecialRenderer(LaserTurretTileEntity.class, new LaserTurretRenderer()); + RenderingRegistry.registerEntityRenderingHandler(HydroturbineEntity.class, HydroturbineRenderer::new); + } +} diff --git a/src/main/java/com/mcmoddev/electricadvantage/graphics/HydroturbineRenderer.java b/src/main/java/zone/moddev/mc/electricadvantage/graphics/HydroturbineRenderer.java similarity index 93% rename from src/main/java/com/mcmoddev/electricadvantage/graphics/HydroturbineRenderer.java rename to src/main/java/zone/moddev/mc/electricadvantage/graphics/HydroturbineRenderer.java index 5e0d56d..639e6ed 100644 --- a/src/main/java/com/mcmoddev/electricadvantage/graphics/HydroturbineRenderer.java +++ b/src/main/java/zone/moddev/mc/electricadvantage/graphics/HydroturbineRenderer.java @@ -1,7 +1,7 @@ -package com.mcmoddev.electricadvantage.graphics; +package zone.moddev.mc.electricadvantage.graphics; -import com.mcmoddev.electricadvantage.ElectricAdvantage; -import com.mcmoddev.electricadvantage.entities.HydroturbineEntity; +import zone.moddev.mc.electricadvantage.ElectricAdvantage; +import zone.moddev.mc.electricadvantage.entities.HydroturbineEntity; import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.renderer.BufferBuilder; @@ -11,11 +11,11 @@ import net.minecraft.entity.Entity; import net.minecraft.util.ResourceLocation; import net.minecraft.util.math.MathHelper; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; -@SideOnly(Side.CLIENT) -public class HydroturbineRenderer extends Render{ +@OnlyIn(Dist.CLIENT) +public class HydroturbineRenderer extends Render{ private static final ResourceLocation texture = new ResourceLocation(ElectricAdvantage.MODID+":textures/entity/hydroturbine.png"); private static final float DEGREES_TO_RADIANS = (float)(Math.PI / 180); @@ -25,13 +25,13 @@ public HydroturbineRenderer(final RenderManager rm) { } @Override - public void doRender(final Entity entity, final double x, final double y, final double z, final float scale, final float partialTick) { - if(entity instanceof HydroturbineEntity){ + public void doRender(final HydroturbineEntity entity, final double x, final double y, final double z, final float scale, final float partialTick) { + { final float pixel = 1.0f / 16; HydroturbineEntity e = (HydroturbineEntity)entity; GlStateManager.pushMatrix(); this.bindEntityTexture(e); - GlStateManager.translate((float)x, (float)y, (float)z); + GlStateManager.translatef((float)x, (float)y, (float)z); GlStateManager.enableRescaleNormal(); // final float scale = this.scale; // GlStateManager.scale(scale / 1.0f, scale / 1.0f, scale / 1.0f); @@ -45,8 +45,8 @@ public void doRender(final Entity entity, final double x, final double y, final final float shaftMaxU = 0.5f+2*pixel; final float shaftMaxV = 1.0f; - GlStateManager.translate(0f, 0.5f, 0f); - GlStateManager.rotate(e.rotationYaw, 0.0f, 1.0f, 0.0f); + GlStateManager.translatef(0f, 0.5f, 0f); + GlStateManager.rotatef(e.rotationYaw, 0.0f, 1.0f, 0.0f); this.bindTexture(this.getEntityTexture(e)); worldRenderer.begin(7, DefaultVertexFormats.POSITION_TEX); @@ -188,7 +188,7 @@ public void doRender(final Entity entity, final double x, final double y, final @Override - protected ResourceLocation getEntityTexture(final Entity e) { + protected ResourceLocation getEntityTexture(final HydroturbineEntity e) { return texture; } } diff --git a/src/main/java/com/mcmoddev/electricadvantage/graphics/LaserDrillRenderer.java b/src/main/java/zone/moddev/mc/electricadvantage/graphics/LaserDrillRenderer.java similarity index 78% rename from src/main/java/com/mcmoddev/electricadvantage/graphics/LaserDrillRenderer.java rename to src/main/java/zone/moddev/mc/electricadvantage/graphics/LaserDrillRenderer.java index 356b7e2..c11a628 100644 --- a/src/main/java/com/mcmoddev/electricadvantage/graphics/LaserDrillRenderer.java +++ b/src/main/java/zone/moddev/mc/electricadvantage/graphics/LaserDrillRenderer.java @@ -1,22 +1,22 @@ -package com.mcmoddev.electricadvantage.graphics; +package zone.moddev.mc.electricadvantage.graphics; -import com.mcmoddev.electricadvantage.ElectricAdvantage; -import com.mcmoddev.electricadvantage.machines.ElectricDrillTileEntity; +import zone.moddev.mc.electricadvantage.ElectricAdvantage; +import zone.moddev.mc.electricadvantage.machines.ElectricDrillTileEntity; import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.renderer.BufferBuilder; -import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; +import net.minecraft.client.renderer.tileentity.TileEntityRenderer; import net.minecraft.client.renderer.vertex.DefaultVertexFormats; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.EnumFacing; import net.minecraft.util.ResourceLocation; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; -@SideOnly(Side.CLIENT) // This is needed for classes that extend client-only classes -public class LaserDrillRenderer extends TileEntitySpecialRenderer{ +@OnlyIn(Dist.CLIENT) // This is needed for classes that extend client-only classes +public class LaserDrillRenderer extends TileEntityRenderer{ private final ResourceLocation texture = new ResourceLocation(ElectricAdvantage.MODID+":textures/materials/laser_beam.png"); @@ -30,16 +30,11 @@ public LaserDrillRenderer() { @Override - public void render(final TileEntity te, final double x, final double y, final double z, final float partialTick, final int destroyStage, final float alpha) { - if(te instanceof ElectricDrillTileEntity){ - // partialTick is guaranteed to range from 0 to 1 - GlStateManager.pushMatrix(); - GlStateManager.translate((float)x, (float)y, (float)z); - - render((ElectricDrillTileEntity)te,te.getWorld(),te.getPos(),partialTick); - - GlStateManager.popMatrix(); - } + public void render(final ElectricDrillTileEntity te, final double x, final double y, final double z, final float partialTick, final int destroyStage) { + GlStateManager.pushMatrix(); + GlStateManager.translated(x, y, z); + render(te, te.getWorld(), te.getPos(), partialTick); + GlStateManager.popMatrix(); } private void render(ElectricDrillTileEntity e, World world, BlockPos pos, float partialTick){ @@ -98,9 +93,9 @@ private void render(ElectricDrillTileEntity e, World world, BlockPos pos, float GlStateManager.disableLighting(); - GlStateManager.translate(0.5f, 0.5f, 0.5f); - GlStateManager.rotate(rotY, 0.0f, 1.0f, 0.0f); - GlStateManager.rotate(rotX, 1.0f, 0.0f, 0.0f); + GlStateManager.translatef(0.5f, 0.5f, 0.5f); + GlStateManager.rotatef(rotY, 0.0f, 1.0f, 0.0f); + GlStateManager.rotatef(rotX, 1.0f, 0.0f, 0.0f); int lightValue = 15 << 20 | 15 << 4; int lmapX = lightValue >> 16 & 0xFFFF; diff --git a/src/main/java/com/mcmoddev/electricadvantage/graphics/LaserTurretRenderer.java b/src/main/java/zone/moddev/mc/electricadvantage/graphics/LaserTurretRenderer.java similarity index 85% rename from src/main/java/com/mcmoddev/electricadvantage/graphics/LaserTurretRenderer.java rename to src/main/java/zone/moddev/mc/electricadvantage/graphics/LaserTurretRenderer.java index 403ba0f..c62a6ca 100644 --- a/src/main/java/com/mcmoddev/electricadvantage/graphics/LaserTurretRenderer.java +++ b/src/main/java/zone/moddev/mc/electricadvantage/graphics/LaserTurretRenderer.java @@ -1,23 +1,23 @@ -package com.mcmoddev.electricadvantage.graphics; +package zone.moddev.mc.electricadvantage.graphics; -import com.mcmoddev.electricadvantage.ElectricAdvantage; -import com.mcmoddev.electricadvantage.machines.LaserTurretTileEntity; +import zone.moddev.mc.electricadvantage.ElectricAdvantage; +import zone.moddev.mc.electricadvantage.machines.LaserTurretTileEntity; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.RenderHelper; import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.renderer.BufferBuilder; -import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; +import net.minecraft.client.renderer.tileentity.TileEntityRenderer; import net.minecraft.client.renderer.vertex.DefaultVertexFormats; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ResourceLocation; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; -@SideOnly(Side.CLIENT) // This is needed for classes that extend client-only classes -public class LaserTurretRenderer extends TileEntitySpecialRenderer{ +@OnlyIn(Dist.CLIENT) // This is needed for classes that extend client-only classes +public class LaserTurretRenderer extends TileEntityRenderer{ private final ResourceLocation texture = new ResourceLocation(ElectricAdvantage.MODID+":textures/entity/laser_turret.png"); @@ -30,16 +30,11 @@ public LaserTurretRenderer() { @Override - public void render(final TileEntity te, final double x, final double y, final double z, final float partialTick, final int destroyStage, final float alpha) { - if(te instanceof LaserTurretTileEntity){ - // partialTick is guaranteed to range from 0 to 1 - GlStateManager.pushMatrix(); - GlStateManager.translate((float)x, (float)y, (float)z); - - render((LaserTurretTileEntity)te,te.getWorld(),te.getPos(),partialTick); - - GlStateManager.popMatrix(); - } + public void render(final LaserTurretTileEntity te, final double x, final double y, final double z, final float partialTick, final int destroyStage) { + GlStateManager.pushMatrix(); + GlStateManager.translated(x, y, z); + render(te, te.getWorld(), te.getPos(), partialTick); + GlStateManager.popMatrix(); } private void render(LaserTurretTileEntity e, World world, BlockPos pos, float partialTick){ @@ -92,9 +87,9 @@ private void render(LaserTurretTileEntity e, World world, BlockPos pos, float pa GlStateManager.shadeModel(7424); } - GlStateManager.translate(0.5f, 0.75f, 0.5f); - GlStateManager.rotate(yaw, 0.0f, 1.0f, 0.0f); - GlStateManager.rotate(pitch, 1.0f, 0.0f, 0.0f); + GlStateManager.translatef(0.5f, 0.75f, 0.5f); + GlStateManager.rotatef(yaw, 0.0f, 1.0f, 0.0f); + GlStateManager.rotatef(pitch, 1.0f, 0.0f, 0.0f); worldRenderer.begin(7, DefaultVertexFormats.POSITION_TEX); diff --git a/src/main/java/com/mcmoddev/electricadvantage/gui/ArcFurnaceGUI.java b/src/main/java/zone/moddev/mc/electricadvantage/gui/ArcFurnaceGUI.java similarity index 91% rename from src/main/java/com/mcmoddev/electricadvantage/gui/ArcFurnaceGUI.java rename to src/main/java/zone/moddev/mc/electricadvantage/gui/ArcFurnaceGUI.java index 6c636ed..e77502d 100644 --- a/src/main/java/com/mcmoddev/electricadvantage/gui/ArcFurnaceGUI.java +++ b/src/main/java/zone/moddev/mc/electricadvantage/gui/ArcFurnaceGUI.java @@ -1,9 +1,9 @@ -package com.mcmoddev.electricadvantage.gui; +package zone.moddev.mc.electricadvantage.gui; -import com.mcmoddev.electricadvantage.ElectricAdvantage; -import com.mcmoddev.electricadvantage.machines.ElectricMachineTileEntity; +import zone.moddev.mc.electricadvantage.ElectricAdvantage; +import zone.moddev.mc.electricadvantage.machines.ElectricMachineTileEntity; import cyano.poweradvantage.api.simple.SimpleMachineGUI; -import com.mcmoddev.poweradvantage.math.Integer2D; +import zone.moddev.mc.poweradvantage.math.Integer2D; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; diff --git a/src/main/java/com/mcmoddev/electricadvantage/gui/BatteryArrayGUI.java b/src/main/java/zone/moddev/mc/electricadvantage/gui/BatteryArrayGUI.java similarity index 89% rename from src/main/java/com/mcmoddev/electricadvantage/gui/BatteryArrayGUI.java rename to src/main/java/zone/moddev/mc/electricadvantage/gui/BatteryArrayGUI.java index d43e136..1b0d002 100644 --- a/src/main/java/com/mcmoddev/electricadvantage/gui/BatteryArrayGUI.java +++ b/src/main/java/zone/moddev/mc/electricadvantage/gui/BatteryArrayGUI.java @@ -1,9 +1,9 @@ -package com.mcmoddev.electricadvantage.gui; +package zone.moddev.mc.electricadvantage.gui; -import com.mcmoddev.electricadvantage.ElectricAdvantage; -import com.mcmoddev.electricadvantage.machines.ElectricBatteryArrayTileEntity; +import zone.moddev.mc.electricadvantage.ElectricAdvantage; +import zone.moddev.mc.electricadvantage.machines.ElectricBatteryArrayTileEntity; import cyano.poweradvantage.api.simple.SimpleMachineGUI; -import com.mcmoddev.poweradvantage.math.Integer2D; +import zone.moddev.mc.poweradvantage.math.Integer2D; import net.minecraft.util.ResourceLocation; public class BatteryArrayGUI extends SimpleMachineGUI{ diff --git a/src/main/java/com/mcmoddev/electricadvantage/gui/ElectricDrillGUI.java b/src/main/java/zone/moddev/mc/electricadvantage/gui/ElectricDrillGUI.java similarity index 88% rename from src/main/java/com/mcmoddev/electricadvantage/gui/ElectricDrillGUI.java rename to src/main/java/zone/moddev/mc/electricadvantage/gui/ElectricDrillGUI.java index 01455c6..ab17995 100644 --- a/src/main/java/com/mcmoddev/electricadvantage/gui/ElectricDrillGUI.java +++ b/src/main/java/zone/moddev/mc/electricadvantage/gui/ElectricDrillGUI.java @@ -1,9 +1,9 @@ -package com.mcmoddev.electricadvantage.gui; +package zone.moddev.mc.electricadvantage.gui; -import com.mcmoddev.electricadvantage.ElectricAdvantage; -import com.mcmoddev.electricadvantage.machines.ElectricMachineTileEntity; +import zone.moddev.mc.electricadvantage.ElectricAdvantage; +import zone.moddev.mc.electricadvantage.machines.ElectricMachineTileEntity; import cyano.poweradvantage.api.simple.SimpleMachineGUI; -import com.mcmoddev.poweradvantage.math.Integer2D; +import zone.moddev.mc.poweradvantage.math.Integer2D; import net.minecraft.util.ResourceLocation; public class ElectricDrillGUI extends SimpleMachineGUI{ diff --git a/src/main/java/com/mcmoddev/electricadvantage/gui/ElectricPumpGUI.java b/src/main/java/zone/moddev/mc/electricadvantage/gui/ElectricPumpGUI.java similarity index 86% rename from src/main/java/com/mcmoddev/electricadvantage/gui/ElectricPumpGUI.java rename to src/main/java/zone/moddev/mc/electricadvantage/gui/ElectricPumpGUI.java index f9cbe2e..1759fc8 100644 --- a/src/main/java/com/mcmoddev/electricadvantage/gui/ElectricPumpGUI.java +++ b/src/main/java/zone/moddev/mc/electricadvantage/gui/ElectricPumpGUI.java @@ -1,11 +1,11 @@ -package com.mcmoddev.electricadvantage.gui; +package zone.moddev.mc.electricadvantage.gui; -import com.mcmoddev.electricadvantage.ElectricAdvantage; -import com.mcmoddev.electricadvantage.machines.ElectricPumpTileEntity; +import zone.moddev.mc.electricadvantage.ElectricAdvantage; +import zone.moddev.mc.electricadvantage.machines.ElectricPumpTileEntity; import cyano.poweradvantage.api.simple.SimpleMachineGUI; -import com.mcmoddev.poweradvantage.math.Integer2D; +import zone.moddev.mc.poweradvantage.math.Integer2D; import net.minecraft.util.ResourceLocation; -import net.minecraftforge.fluids.FluidStack; +import cyano.poweradvantage.api.fluid.FluidStack; public class ElectricPumpGUI extends SimpleMachineGUI{ diff --git a/src/main/java/com/mcmoddev/electricadvantage/gui/ElectricStillGUI.java b/src/main/java/zone/moddev/mc/electricadvantage/gui/ElectricStillGUI.java similarity index 88% rename from src/main/java/com/mcmoddev/electricadvantage/gui/ElectricStillGUI.java rename to src/main/java/zone/moddev/mc/electricadvantage/gui/ElectricStillGUI.java index f59ab13..225fd65 100644 --- a/src/main/java/com/mcmoddev/electricadvantage/gui/ElectricStillGUI.java +++ b/src/main/java/zone/moddev/mc/electricadvantage/gui/ElectricStillGUI.java @@ -1,11 +1,11 @@ -package com.mcmoddev.electricadvantage.gui; +package zone.moddev.mc.electricadvantage.gui; -import com.mcmoddev.electricadvantage.ElectricAdvantage; -import com.mcmoddev.electricadvantage.machines.ElectricStillTileEntity; +import zone.moddev.mc.electricadvantage.ElectricAdvantage; +import zone.moddev.mc.electricadvantage.machines.ElectricStillTileEntity; import cyano.poweradvantage.api.simple.SimpleMachineGUI; -import com.mcmoddev.poweradvantage.math.Integer2D; +import zone.moddev.mc.poweradvantage.math.Integer2D; import net.minecraft.util.ResourceLocation; -import net.minecraftforge.fluids.FluidStack; +import cyano.poweradvantage.api.fluid.FluidStack; public class ElectricStillGUI extends SimpleMachineGUI{ diff --git a/src/main/java/com/mcmoddev/electricadvantage/gui/FabricatorGUI.java b/src/main/java/zone/moddev/mc/electricadvantage/gui/FabricatorGUI.java similarity index 91% rename from src/main/java/com/mcmoddev/electricadvantage/gui/FabricatorGUI.java rename to src/main/java/zone/moddev/mc/electricadvantage/gui/FabricatorGUI.java index 537e50e..3144583 100644 --- a/src/main/java/com/mcmoddev/electricadvantage/gui/FabricatorGUI.java +++ b/src/main/java/zone/moddev/mc/electricadvantage/gui/FabricatorGUI.java @@ -1,9 +1,9 @@ -package com.mcmoddev.electricadvantage.gui; +package zone.moddev.mc.electricadvantage.gui; -import com.mcmoddev.electricadvantage.ElectricAdvantage; -import com.mcmoddev.electricadvantage.machines.ElectricMachineTileEntity; +import zone.moddev.mc.electricadvantage.ElectricAdvantage; +import zone.moddev.mc.electricadvantage.machines.ElectricMachineTileEntity; import cyano.poweradvantage.api.simple.SimpleMachineGUI; -import com.mcmoddev.poweradvantage.math.Integer2D; +import zone.moddev.mc.poweradvantage.math.Integer2D; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; diff --git a/src/main/java/com/mcmoddev/electricadvantage/gui/GUIHelper.java b/src/main/java/zone/moddev/mc/electricadvantage/gui/GUIHelper.java similarity index 91% rename from src/main/java/com/mcmoddev/electricadvantage/gui/GUIHelper.java rename to src/main/java/zone/moddev/mc/electricadvantage/gui/GUIHelper.java index cfefa96..d147aca 100644 --- a/src/main/java/com/mcmoddev/electricadvantage/gui/GUIHelper.java +++ b/src/main/java/zone/moddev/mc/electricadvantage/gui/GUIHelper.java @@ -1,9 +1,9 @@ -package com.mcmoddev.electricadvantage.gui; +package zone.moddev.mc.electricadvantage.gui; import cyano.poweradvantage.api.simple.SimpleMachineGUI.GUIContainer; -import com.mcmoddev.poweradvantage.gui.FluidTankGUI; +import zone.moddev.mc.poweradvantage.gui.FluidTankGUI; import net.minecraft.util.ResourceLocation; -import net.minecraftforge.fluids.FluidStack; +import cyano.poweradvantage.api.fluid.FluidStack; import java.util.HashMap; import java.util.Map; diff --git a/src/main/java/com/mcmoddev/electricadvantage/gui/GenericMachineGUI.java b/src/main/java/zone/moddev/mc/electricadvantage/gui/GenericMachineGUI.java similarity index 88% rename from src/main/java/com/mcmoddev/electricadvantage/gui/GenericMachineGUI.java rename to src/main/java/zone/moddev/mc/electricadvantage/gui/GenericMachineGUI.java index 822fedc..33f854c 100644 --- a/src/main/java/com/mcmoddev/electricadvantage/gui/GenericMachineGUI.java +++ b/src/main/java/zone/moddev/mc/electricadvantage/gui/GenericMachineGUI.java @@ -1,9 +1,9 @@ -package com.mcmoddev.electricadvantage.gui; +package zone.moddev.mc.electricadvantage.gui; -import com.mcmoddev.electricadvantage.ElectricAdvantage; -import com.mcmoddev.electricadvantage.machines.ElectricMachineTileEntity; +import zone.moddev.mc.electricadvantage.ElectricAdvantage; +import zone.moddev.mc.electricadvantage.machines.ElectricMachineTileEntity; import cyano.poweradvantage.api.simple.SimpleMachineGUI; -import com.mcmoddev.poweradvantage.math.Integer2D; +import zone.moddev.mc.poweradvantage.math.Integer2D; import net.minecraft.util.ResourceLocation; public class GenericMachineGUI extends SimpleMachineGUI{ diff --git a/src/main/java/com/mcmoddev/electricadvantage/gui/GrowthChamberControllerGUI.java b/src/main/java/zone/moddev/mc/electricadvantage/gui/GrowthChamberControllerGUI.java similarity index 88% rename from src/main/java/com/mcmoddev/electricadvantage/gui/GrowthChamberControllerGUI.java rename to src/main/java/zone/moddev/mc/electricadvantage/gui/GrowthChamberControllerGUI.java index d6f2bb4..9e5eae6 100644 --- a/src/main/java/com/mcmoddev/electricadvantage/gui/GrowthChamberControllerGUI.java +++ b/src/main/java/zone/moddev/mc/electricadvantage/gui/GrowthChamberControllerGUI.java @@ -1,9 +1,9 @@ -package com.mcmoddev.electricadvantage.gui; +package zone.moddev.mc.electricadvantage.gui; -import com.mcmoddev.electricadvantage.ElectricAdvantage; -import com.mcmoddev.electricadvantage.machines.GrowthChamberControllerTileEntity; +import zone.moddev.mc.electricadvantage.ElectricAdvantage; +import zone.moddev.mc.electricadvantage.machines.GrowthChamberControllerTileEntity; import cyano.poweradvantage.api.simple.SimpleMachineGUI; -import com.mcmoddev.poweradvantage.math.Integer2D; +import zone.moddev.mc.poweradvantage.math.Integer2D; import net.minecraft.util.ResourceLocation; public class GrowthChamberControllerGUI extends SimpleMachineGUI{ diff --git a/src/main/java/com/mcmoddev/electricadvantage/gui/GrowthChamberGUI.java b/src/main/java/zone/moddev/mc/electricadvantage/gui/GrowthChamberGUI.java similarity index 88% rename from src/main/java/com/mcmoddev/electricadvantage/gui/GrowthChamberGUI.java rename to src/main/java/zone/moddev/mc/electricadvantage/gui/GrowthChamberGUI.java index cfa6f75..8cdb6e9 100644 --- a/src/main/java/com/mcmoddev/electricadvantage/gui/GrowthChamberGUI.java +++ b/src/main/java/zone/moddev/mc/electricadvantage/gui/GrowthChamberGUI.java @@ -1,9 +1,9 @@ -package com.mcmoddev.electricadvantage.gui; +package zone.moddev.mc.electricadvantage.gui; -import com.mcmoddev.electricadvantage.ElectricAdvantage; -import com.mcmoddev.electricadvantage.machines.ElectricMachineTileEntity; +import zone.moddev.mc.electricadvantage.ElectricAdvantage; +import zone.moddev.mc.electricadvantage.machines.ElectricMachineTileEntity; import cyano.poweradvantage.api.simple.SimpleMachineGUI; -import com.mcmoddev.poweradvantage.math.Integer2D; +import zone.moddev.mc.poweradvantage.math.Integer2D; import net.minecraft.util.ResourceLocation; public class GrowthChamberGUI extends SimpleMachineGUI{ diff --git a/src/main/java/com/mcmoddev/electricadvantage/gui/OvenGUI.java b/src/main/java/zone/moddev/mc/electricadvantage/gui/OvenGUI.java similarity index 90% rename from src/main/java/com/mcmoddev/electricadvantage/gui/OvenGUI.java rename to src/main/java/zone/moddev/mc/electricadvantage/gui/OvenGUI.java index 0455c13..c6c3dc2 100644 --- a/src/main/java/com/mcmoddev/electricadvantage/gui/OvenGUI.java +++ b/src/main/java/zone/moddev/mc/electricadvantage/gui/OvenGUI.java @@ -1,9 +1,9 @@ -package com.mcmoddev.electricadvantage.gui; +package zone.moddev.mc.electricadvantage.gui; -import com.mcmoddev.electricadvantage.ElectricAdvantage; -import com.mcmoddev.electricadvantage.machines.ElectricMachineTileEntity; +import zone.moddev.mc.electricadvantage.ElectricAdvantage; +import zone.moddev.mc.electricadvantage.machines.ElectricMachineTileEntity; import cyano.poweradvantage.api.simple.SimpleMachineGUI; -import com.mcmoddev.poweradvantage.math.Integer2D; +import zone.moddev.mc.poweradvantage.math.Integer2D; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; diff --git a/src/main/java/com/mcmoddev/electricadvantage/gui/PlasticRefineryGUI.java b/src/main/java/zone/moddev/mc/electricadvantage/gui/PlasticRefineryGUI.java similarity index 87% rename from src/main/java/com/mcmoddev/electricadvantage/gui/PlasticRefineryGUI.java rename to src/main/java/zone/moddev/mc/electricadvantage/gui/PlasticRefineryGUI.java index 6df3617..51059be 100644 --- a/src/main/java/com/mcmoddev/electricadvantage/gui/PlasticRefineryGUI.java +++ b/src/main/java/zone/moddev/mc/electricadvantage/gui/PlasticRefineryGUI.java @@ -1,11 +1,11 @@ -package com.mcmoddev.electricadvantage.gui; +package zone.moddev.mc.electricadvantage.gui; -import com.mcmoddev.electricadvantage.ElectricAdvantage; -import com.mcmoddev.electricadvantage.machines.PlasticRefineryTileEntity; +import zone.moddev.mc.electricadvantage.ElectricAdvantage; +import zone.moddev.mc.electricadvantage.machines.PlasticRefineryTileEntity; import cyano.poweradvantage.api.simple.SimpleMachineGUI; -import com.mcmoddev.poweradvantage.math.Integer2D; +import zone.moddev.mc.poweradvantage.math.Integer2D; import net.minecraft.util.ResourceLocation; -import net.minecraftforge.fluids.FluidStack; +import cyano.poweradvantage.api.fluid.FluidStack; public class PlasticRefineryGUI extends SimpleMachineGUI{ diff --git a/src/main/java/com/mcmoddev/electricadvantage/gui/PowerGeneratorGUI.java b/src/main/java/zone/moddev/mc/electricadvantage/gui/PowerGeneratorGUI.java similarity index 87% rename from src/main/java/com/mcmoddev/electricadvantage/gui/PowerGeneratorGUI.java rename to src/main/java/zone/moddev/mc/electricadvantage/gui/PowerGeneratorGUI.java index ad2e0f0..582d2ac 100644 --- a/src/main/java/com/mcmoddev/electricadvantage/gui/PowerGeneratorGUI.java +++ b/src/main/java/zone/moddev/mc/electricadvantage/gui/PowerGeneratorGUI.java @@ -1,9 +1,9 @@ -package com.mcmoddev.electricadvantage.gui; +package zone.moddev.mc.electricadvantage.gui; -import com.mcmoddev.electricadvantage.ElectricAdvantage; -import com.mcmoddev.electricadvantage.machines.ElectricGeneratorTileEntity; +import zone.moddev.mc.electricadvantage.ElectricAdvantage; +import zone.moddev.mc.electricadvantage.machines.ElectricGeneratorTileEntity; import cyano.poweradvantage.api.simple.SimpleMachineGUI; -import com.mcmoddev.poweradvantage.math.Integer2D; +import zone.moddev.mc.poweradvantage.math.Integer2D; import net.minecraft.util.ResourceLocation; public class PowerGeneratorGUI extends SimpleMachineGUI{ diff --git a/src/main/java/com/mcmoddev/electricadvantage/gui/RockCrusherGUI.java b/src/main/java/zone/moddev/mc/electricadvantage/gui/RockCrusherGUI.java similarity index 88% rename from src/main/java/com/mcmoddev/electricadvantage/gui/RockCrusherGUI.java rename to src/main/java/zone/moddev/mc/electricadvantage/gui/RockCrusherGUI.java index b0d4ef2..36ffa77 100644 --- a/src/main/java/com/mcmoddev/electricadvantage/gui/RockCrusherGUI.java +++ b/src/main/java/zone/moddev/mc/electricadvantage/gui/RockCrusherGUI.java @@ -1,9 +1,9 @@ -package com.mcmoddev.electricadvantage.gui; +package zone.moddev.mc.electricadvantage.gui; -import com.mcmoddev.electricadvantage.ElectricAdvantage; -import com.mcmoddev.electricadvantage.machines.ElectricMachineTileEntity; +import zone.moddev.mc.electricadvantage.ElectricAdvantage; +import zone.moddev.mc.electricadvantage.machines.ElectricMachineTileEntity; import cyano.poweradvantage.api.simple.SimpleMachineGUI; -import com.mcmoddev.poweradvantage.math.Integer2D; +import zone.moddev.mc.poweradvantage.math.Integer2D; import net.minecraft.util.ResourceLocation; public class RockCrusherGUI extends SimpleMachineGUI{ diff --git a/src/main/java/zone/moddev/mc/electricadvantage/init/Blocks.java b/src/main/java/zone/moddev/mc/electricadvantage/init/Blocks.java new file mode 100644 index 0000000..1b6a15e --- /dev/null +++ b/src/main/java/zone/moddev/mc/electricadvantage/init/Blocks.java @@ -0,0 +1,123 @@ +package zone.moddev.mc.electricadvantage.init; + +import java.util.LinkedHashMap; +import java.util.Map; + +import cyano.poweradvantage.api.GUIBlock; +import net.minecraft.block.Block; +import net.minecraft.item.Item; +import net.minecraft.item.ItemBlock; +import net.minecraft.item.ItemStack; +import net.minecraftforge.event.RegistryEvent; +import net.minecraftforge.eventbus.api.SubscribeEvent; +import net.minecraftforge.fml.common.Mod; +import zone.moddev.mc.electricadvantage.ElectricAdvantage; +import zone.moddev.mc.electricadvantage.blocks.ElectricConduitBlock; +import zone.moddev.mc.electricadvantage.blocks.ElectricScaffoldBlock; +import zone.moddev.mc.electricadvantage.blocks.Ore; +import zone.moddev.mc.electricadvantage.blocks.PumpPipeBlock; +import zone.moddev.mc.electricadvantage.machines.ElectricBatteryArrayBlock; +import zone.moddev.mc.electricadvantage.machines.ElectricCrusherBlock; +import zone.moddev.mc.electricadvantage.machines.ElectricDrillBlock; +import zone.moddev.mc.electricadvantage.machines.ElectricFabricatorBlock; +import zone.moddev.mc.electricadvantage.machines.ElectricFurnaceBlock; +import zone.moddev.mc.electricadvantage.machines.ElectricOvenBlock; +import zone.moddev.mc.electricadvantage.machines.ElectricPumpBlock; +import zone.moddev.mc.electricadvantage.machines.ElectricStillBlock; +import zone.moddev.mc.electricadvantage.machines.GrowthChamberBlock; +import zone.moddev.mc.electricadvantage.machines.GrowthChamberControllerBlock; +import zone.moddev.mc.electricadvantage.machines.HydroelectricGeneratorBlock; +import zone.moddev.mc.electricadvantage.machines.LEDBlock; +import zone.moddev.mc.electricadvantage.machines.LaserTurretBlock; +import zone.moddev.mc.electricadvantage.machines.PhotovoltaicGeneratorBlock; +import zone.moddev.mc.electricadvantage.machines.PlasticRefineryBlock; +import zone.moddev.mc.electricadvantage.machines.SteamPoweredElectricGeneratorBlock; +import zone.moddev.mc.poweradvantage.blocks.BlockPowerSwitch; +import zone.moddev.mc.poweradvantage.init.ItemGroups; + +/** Stable block registry for ElectricAdvantage 1.13. */ +@Mod.EventBusSubscriber(modid = ElectricAdvantage.MODID, bus = Mod.EventBusSubscriber.Bus.MOD) +public final class Blocks { + private static final Map ALL_BLOCKS = new LinkedHashMap<>(); + + public static Block electric_conduit; + public static Block lithium_ore; + public static Block sulfur_ore; + public static Block electric_track; + public static Block led_bar; + public static GUIBlock steam_powered_generator; + public static GUIBlock photovoltaic_generator; + public static GUIBlock hydroelectric_generator; + public static GUIBlock arc_furnace; + public static GUIBlock battery_array; + public static GUIBlock rock_crusher; + public static GUIBlock laser_drill; + public static GUIBlock laser_turret; + public static GUIBlock laser_turret_evil; + public static GUIBlock fabricator; + public static GUIBlock growth_chamber; + public static GUIBlock growth_chamber_controller; + public static GUIBlock oven; + public static Block pump_pipe_electric; + public static Block electric_switch; + public static GUIBlock electric_still; + public static GUIBlock electric_pump; + public static GUIBlock plastic_refinery; + + private static boolean initialized; + private Blocks() {} + + public static synchronized void init() { + if (initialized) return; + Items.initWithoutBlocks(); + ItemGroups.init(); + electric_conduit = add(new ElectricConduitBlock(), "electric_conduit"); + lithium_ore = add(new Ore(1), "li_ore"); + sulfur_ore = add(new Ore(new ItemStack(Items.sulfur_powder, 1), 0, 3), "sulfur_ore"); + electric_track = add(new ElectricScaffoldBlock(), "electric_track"); + laser_turret = (GUIBlock) add(new LaserTurretBlock(false), "laser_turret"); + laser_turret_evil = (GUIBlock) add(new LaserTurretBlock(true), "laser_turret_evil"); + led_bar = add(new LEDBlock(), "led_bar"); + photovoltaic_generator = (GUIBlock) add(new PhotovoltaicGeneratorBlock(), "photovoltaic_generator"); + hydroelectric_generator = (GUIBlock) add(new HydroelectricGeneratorBlock(), "hydroelectric_generator"); + steam_powered_generator = (GUIBlock) add(new SteamPoweredElectricGeneratorBlock(), "steam_powered_generator"); + arc_furnace = (GUIBlock) add(new ElectricFurnaceBlock(), "electric_furnace"); + battery_array = (GUIBlock) add(new ElectricBatteryArrayBlock(), "electric_battery_array"); + rock_crusher = (GUIBlock) add(new ElectricCrusherBlock(), "electric_crusher"); + laser_drill = (GUIBlock) add(new ElectricDrillBlock(), "electric_drill"); + fabricator = (GUIBlock) add(new ElectricFabricatorBlock(), "electric_fabricator"); + growth_chamber = (GUIBlock) add(new GrowthChamberBlock(), "growth_chamber"); + growth_chamber_controller = (GUIBlock) add(new GrowthChamberControllerBlock(), "growth_chamber_controller"); + oven = (GUIBlock) add(new ElectricOvenBlock(), "electric_oven"); + electric_switch = add(new BlockPowerSwitch(Power.ELECTRIC_POWER), "electric_switch"); + electric_pump = (GUIBlock) add(new ElectricPumpBlock(), "electric_pump"); + electric_still = (GUIBlock) add(new ElectricStillBlock(), "electric_still"); + plastic_refinery = (GUIBlock) add(new PlasticRefineryBlock(), "plastic_refinery"); + pump_pipe_electric = add(new PumpPipeBlock(), "pump_pipe_electric"); + initialized = true; + } + + private static Block add(Block block, String id) { + block.setRegistryName(ElectricAdvantage.MODID, id); + ALL_BLOCKS.put(id, block); + return block; + } + + @SubscribeEvent public static void registerBlocks(RegistryEvent.Register event) { + init(); + event.getRegistry().registerAll(ALL_BLOCKS.values().toArray(new Block[0])); + } + + @SubscribeEvent public static void registerBlockItems(RegistryEvent.Register event) { + init(); + for (Map.Entry entry : ALL_BLOCKS.entrySet()) { + Item.Properties properties = new Item.Properties(); + if (!"pump_pipe_electric".equals(entry.getKey()) && !"laser_turret_evil".equals(entry.getKey())) { + properties.group(ItemGroups.tab_powerAdvantage); + } + ItemBlock item = new ItemBlock(entry.getValue(), properties); + item.setRegistryName(ElectricAdvantage.MODID, entry.getKey()); + event.getRegistry().register(item); + } + } +} diff --git a/src/main/java/com/mcmoddev/electricadvantage/init/Enchantments.java b/src/main/java/zone/moddev/mc/electricadvantage/init/Enchantments.java similarity index 61% rename from src/main/java/com/mcmoddev/electricadvantage/init/Enchantments.java rename to src/main/java/zone/moddev/mc/electricadvantage/init/Enchantments.java index ce17f04..29f3719 100644 --- a/src/main/java/com/mcmoddev/electricadvantage/init/Enchantments.java +++ b/src/main/java/zone/moddev/mc/electricadvantage/init/Enchantments.java @@ -1,6 +1,6 @@ -package com.mcmoddev.electricadvantage.init; +package zone.moddev.mc.electricadvantage.init; -//import com.mcmoddev.electricadvantage.enchanments.*; +//import zone.moddev.mc.electricadvantage.enchanments.*; public abstract class Enchantments { diff --git a/src/main/java/zone/moddev/mc/electricadvantage/init/Entities.java b/src/main/java/zone/moddev/mc/electricadvantage/init/Entities.java new file mode 100644 index 0000000..2c50387 --- /dev/null +++ b/src/main/java/zone/moddev/mc/electricadvantage/init/Entities.java @@ -0,0 +1,88 @@ +package zone.moddev.mc.electricadvantage.init; + +import java.util.function.Supplier; + +import net.minecraft.entity.EntityType; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.tileentity.TileEntityType; +import net.minecraftforge.event.RegistryEvent; +import net.minecraftforge.eventbus.api.SubscribeEvent; +import net.minecraftforge.fml.common.Mod; +import zone.moddev.mc.electricadvantage.ElectricAdvantage; +import zone.moddev.mc.electricadvantage.entities.HydroturbineEntity; +import zone.moddev.mc.electricadvantage.machines.ElectricBatteryArrayTileEntity; +import zone.moddev.mc.electricadvantage.machines.ElectricCrusherTileEntity; +import zone.moddev.mc.electricadvantage.machines.ElectricDrillTileEntity; +import zone.moddev.mc.electricadvantage.machines.ElectricFabricatorTileEntity; +import zone.moddev.mc.electricadvantage.machines.ElectricFurnaceTileEntity; +import zone.moddev.mc.electricadvantage.machines.ElectricOvenTileEntity; +import zone.moddev.mc.electricadvantage.machines.ElectricPumpTileEntity; +import zone.moddev.mc.electricadvantage.machines.ElectricStillTileEntity; +import zone.moddev.mc.electricadvantage.machines.GrowthChamberControllerTileEntity; +import zone.moddev.mc.electricadvantage.machines.GrowthChamberTileEntity; +import zone.moddev.mc.electricadvantage.machines.HydroelectricGeneratorTileEntity; +import zone.moddev.mc.electricadvantage.machines.LEDTileEntity; +import zone.moddev.mc.electricadvantage.machines.LaserTurretTileEntity; +import zone.moddev.mc.electricadvantage.machines.PhotovoltaicGeneratorTileEntity; +import zone.moddev.mc.electricadvantage.machines.PlasticRefineryTileEntity; +import zone.moddev.mc.electricadvantage.machines.SteamPoweredElectricGeneratorTileEntity; + +/** Stable tile/entity registrations; IDs are unchanged from 1.12. */ +@Mod.EventBusSubscriber(modid = ElectricAdvantage.MODID, bus = Mod.EventBusSubscriber.Bus.MOD) +public final class Entities { + public static TileEntityType ELECTRIC_FURNACE; + public static TileEntityType ELECTRIC_CRUSHER; + public static TileEntityType ELECTRIC_DRILL; + public static TileEntityType ELECTRIC_FABRICATOR; + public static TileEntityType GROWTH_CHAMBER; + public static TileEntityType GROWTH_CHAMBER_CONTROLLER; + public static TileEntityType ELECTRIC_OVEN; + public static TileEntityType LASER_TURRET; + public static TileEntityType LED; + public static TileEntityType HYDROELECTRIC_GENERATOR; + public static TileEntityType PHOTOVOLTAIC_GENERATOR; + public static TileEntityType STEAM_POWERED_ELECTRIC_GENERATOR; + public static TileEntityType ELECTRIC_BATTERY_ARRAY; + public static TileEntityType ELECTRIC_PUMP; + public static TileEntityType ELECTRIC_STILL; + public static TileEntityType PLASTIC_REFINERY; + public static EntityType HYDROTURBINE; + + private Entities() {} + public static void init() {} + + @SubscribeEvent public static void registerTiles(RegistryEvent.Register> event) { + ELECTRIC_FURNACE = tile(event, "electric_furnace", ElectricFurnaceTileEntity::new); + ELECTRIC_CRUSHER = tile(event, "electric_crusher", ElectricCrusherTileEntity::new); + ELECTRIC_DRILL = tile(event, "electric_drill", ElectricDrillTileEntity::new); + ELECTRIC_FABRICATOR = tile(event, "electric_fabricator", ElectricFabricatorTileEntity::new); + GROWTH_CHAMBER = tile(event, "growth_chamber", GrowthChamberTileEntity::new); + GROWTH_CHAMBER_CONTROLLER = tile(event, "growth_chamber_controller", GrowthChamberControllerTileEntity::new); + ELECTRIC_OVEN = tile(event, "electric_oven", ElectricOvenTileEntity::new); + LASER_TURRET = tile(event, "laser_turret", LaserTurretTileEntity::new); + LED = tile(event, "led", LEDTileEntity::new); + HYDROELECTRIC_GENERATOR = tile(event, "hydroelectric_generator", HydroelectricGeneratorTileEntity::new); + PHOTOVOLTAIC_GENERATOR = tile(event, "photovoltaic_generator", PhotovoltaicGeneratorTileEntity::new); + STEAM_POWERED_ELECTRIC_GENERATOR = tile(event, "steam_powered_electric_generator", SteamPoweredElectricGeneratorTileEntity::new); + ELECTRIC_BATTERY_ARRAY = tile(event, "electric_battery_array", ElectricBatteryArrayTileEntity::new); + ELECTRIC_PUMP = tile(event, "electric_pump", ElectricPumpTileEntity::new); + ELECTRIC_STILL = tile(event, "electric_still", ElectricStillTileEntity::new); + PLASTIC_REFINERY = tile(event, "plastic_refinery", PlasticRefineryTileEntity::new); + } + + @SubscribeEvent public static void registerEntities(RegistryEvent.Register> event) { + HYDROTURBINE = EntityType.Builder.create(HydroturbineEntity.class, + world -> new HydroturbineEntity(HYDROTURBINE, world)) + .tracker(64, 1, true).build(ElectricAdvantage.MODID + ":hydroturbine"); + HYDROTURBINE.setRegistryName(ElectricAdvantage.MODID, "hydroturbine"); + event.getRegistry().register(HYDROTURBINE); + } + + private static TileEntityType tile( + RegistryEvent.Register> event, String id, Supplier factory) { + TileEntityType type = TileEntityType.Builder.create(factory).build(null); + type.setRegistryName(ElectricAdvantage.MODID, id); + event.getRegistry().register(type); + return type; + } +} diff --git a/src/main/java/com/mcmoddev/electricadvantage/init/GUI.java b/src/main/java/zone/moddev/mc/electricadvantage/init/GUI.java similarity index 84% rename from src/main/java/com/mcmoddev/electricadvantage/init/GUI.java rename to src/main/java/zone/moddev/mc/electricadvantage/init/GUI.java index 91b3543..9c0e04c 100644 --- a/src/main/java/com/mcmoddev/electricadvantage/init/GUI.java +++ b/src/main/java/zone/moddev/mc/electricadvantage/init/GUI.java @@ -1,8 +1,8 @@ -package com.mcmoddev.electricadvantage.init; +package zone.moddev.mc.electricadvantage.init; -import com.mcmoddev.poweradvantage.PowerAdvantage; -import com.mcmoddev.poweradvantage.registry.MachineGUIRegistry; -import com.mcmoddev.electricadvantage.gui.*; +import zone.moddev.mc.poweradvantage.PowerAdvantage; +import zone.moddev.mc.poweradvantage.registry.MachineGUIRegistry; +import zone.moddev.mc.electricadvantage.gui.*; public abstract class GUI { @@ -15,6 +15,7 @@ public static void init(){ Blocks.steam_powered_generator.setGuiID(MachineGUIRegistry.addGUI(new PowerGeneratorGUI()), PowerAdvantage.getInstance()); Blocks.photovoltaic_generator.setGuiID(MachineGUIRegistry.addGUI(new PowerGeneratorGUI()), PowerAdvantage.getInstance()); + Blocks.hydroelectric_generator.setGuiID(MachineGUIRegistry.addGUI(new PowerGeneratorGUI()), PowerAdvantage.getInstance()); Blocks.arc_furnace.setGuiID(MachineGUIRegistry.addGUI(new ArcFurnaceGUI()), PowerAdvantage.getInstance()); Blocks.battery_array.setGuiID(MachineGUIRegistry.addGUI(new BatteryArrayGUI()), PowerAdvantage.getInstance()); diff --git a/src/main/java/zone/moddev/mc/electricadvantage/init/Items.java b/src/main/java/zone/moddev/mc/electricadvantage/init/Items.java new file mode 100644 index 0000000..92447ef --- /dev/null +++ b/src/main/java/zone/moddev/mc/electricadvantage/init/Items.java @@ -0,0 +1,78 @@ +package zone.moddev.mc.electricadvantage.init; + +import java.util.LinkedHashMap; +import java.util.Map; +import java.util.Set; + +import net.minecraft.item.Item; +import net.minecraftforge.event.RegistryEvent; +import net.minecraftforge.eventbus.api.SubscribeEvent; +import net.minecraftforge.fml.common.Mod; +import zone.moddev.mc.electricadvantage.ElectricAdvantage; +import zone.moddev.mc.electricadvantage.items.BatteryItem; +import zone.moddev.mc.poweradvantage.init.ItemGroups; + +/** Stable item registry for ElectricAdvantage 1.13. */ +@Mod.EventBusSubscriber(modid = ElectricAdvantage.MODID, bus = Mod.EventBusSubscriber.Bus.MOD) +public final class Items { + public static final Map allItems = new LinkedHashMap<>(); + public static Item blank_circuit_board; + public static Item control_circuit; + public static Item integrated_circuit; + public static Item power_supply_unit; + public static Item silicon_ingot; + public static Item silicon_blend; + public static Item solder_blend; + public static Item solder; + public static Item lead_acid_battery; + public static Item nickel_hydride_battery; + public static Item alkaline_battery; + public static Item lithium_battery; + public static Item lithium_ingot; + public static Item lithium_powder; + public static Item lithium_nugget; + public static Item sulfur_powder; + public static Item petrolplastic_ingot; + private static boolean initialized; + + private Items() {} + public static void init() { initWithoutBlocks(); Blocks.init(); } + + static synchronized void initWithoutBlocks() { + if (initialized) return; + ItemGroups.init(); + blank_circuit_board = add("blank_circuit_board", new Item(properties())); + control_circuit = add("control_circuit", new Item(properties())); + integrated_circuit = add("integrated_circuit", new Item(properties())); + power_supply_unit = add("psu", new Item(properties())); + silicon_ingot = add("silicon_ingot", new Item(properties())); + silicon_blend = add("silicon_mix", new Item(properties())); + solder_blend = add("solder_mix", new Item(properties())); + solder = add("solder", new Item(properties())); + lithium_ingot = add("li_ingot", new Item(properties())); + lithium_powder = add("li_powder", new Item(properties())); + lithium_nugget = add("li_nugget", new Item(properties())); + sulfur_powder = add("sulfur_powder", new Item(properties())); + petrolplastic_ingot = add("petrolplastic_ingot", new Item(properties())); + lead_acid_battery = add("lead_acid_battery", new BatteryItem(Power.LEAD_ACID_BATTERY_CAPACITY, properties())); + nickel_hydride_battery = add("nickel_hydride_battery", new BatteryItem(Power.NICKEL_HYDRIDE_BATTERY_CAPACITY, properties())); + alkaline_battery = add("alkaline_battery", new BatteryItem(Power.ALKALINE_BATTERY_CAPACITY, properties())); + lithium_battery = add("lithium_battery", new BatteryItem(Power.LITHIUM_BATTERY_CAPACITY, properties())); + initialized = true; + } + + private static Item.Properties properties() { return new Item.Properties().group(ItemGroups.tab_powerAdvantage); } + private static Item add(String id, Item item) { + item.setRegistryName(ElectricAdvantage.MODID, id); + allItems.put(id, item); + return item; + } + + @SubscribeEvent public static void register(RegistryEvent.Register event) { + initWithoutBlocks(); + event.getRegistry().registerAll(allItems.values().toArray(new Item[0])); + } + + public static Item getItemByName(String id) { return allItems.get(id); } + public static Set> getAllRegisteredItems() { return allItems.entrySet(); } +} diff --git a/src/main/java/zone/moddev/mc/electricadvantage/init/OreSpawnWorldGen.java b/src/main/java/zone/moddev/mc/electricadvantage/init/OreSpawnWorldGen.java new file mode 100644 index 0000000..264a627 --- /dev/null +++ b/src/main/java/zone/moddev/mc/electricadvantage/init/OreSpawnWorldGen.java @@ -0,0 +1,91 @@ +package zone.moddev.mc.electricadvantage.init; + +import java.nio.file.Files; +import java.nio.file.Path; + +import net.minecraft.util.ResourceLocation; +import net.minecraftforge.fml.ModList; +import zone.moddev.mc.electricadvantage.ElectricAdvantage; +import zone.moddev.mc.orespawn.api.GeologyFamily; +import zone.moddev.mc.orespawn.api.OrePattern; +import zone.moddev.mc.orespawn.api.OreSpawnApi; +import zone.moddev.mc.orespawn.api.WorldgenProvider; + +/** Registers ElectricAdvantage's visible fallback mineral rules with OreSpawn 4. */ +public final class OreSpawnWorldGen { + public static final ResourceLocation LITHIUM_ORE = + new ResourceLocation(ElectricAdvantage.MODID, "ore/lithium"); + public static final ResourceLocation SULFUR_ORE = + new ResourceLocation(ElectricAdvantage.MODID, "ore/sulfur"); + private static final ResourceLocation OVERWORLD = new ResourceLocation("minecraft", "overworld"); + private static final ResourceLocation STONE = new ResourceLocation("minecraft", "stone"); + private static final ResourceLocation STONE_TAG = new ResourceLocation("forge", "stone"); + + private OreSpawnWorldGen() { + } + + public static void register(Path configDirectory) { + boolean mineralogyLoaded = ModList.get().isLoaded("mineralogy"); + boolean baseMineralsLoaded = ModList.get().isLoaded("baseminerals"); + boolean accepted = OreSpawnApi.enqueue(createProvider(mineralogyLoaded, baseMineralsLoaded)); + String sulfurOwner = mineralogyLoaded ? "mineralogy" + : baseMineralsLoaded ? "baseminerals" : ElectricAdvantage.MODID; + String lithiumOwner = baseMineralsLoaded ? "baseminerals" : ElectricAdvantage.MODID; + ElectricAdvantage.LOGGER.info( + "OreSpawn sulfur candidates=[mineralogy, baseminerals, electricadvantage], " + + "selected fresh-world owner={}; lithium candidates=[baseminerals, electricadvantage], " + + "selected fresh-world owner={}; explicit override={}", + sulfurOwner, lithiumOwner, describeOverride(configDirectory)); + if (!accepted) { + ElectricAdvantage.LOGGER.warn("OreSpawn rejected ElectricAdvantage's typed provider; " + + "an authoritative provider override may already be active"); + } + } + + static WorldgenProvider createProvider(boolean mineralogyLoaded, boolean baseMineralsLoaded) { + boolean electricSulfurEnabled = !mineralogyLoaded && !baseMineralsLoaded; + boolean electricLithiumEnabled = !baseMineralsLoaded; + return WorldgenProvider.builder(ElectricAdvantage.MODID, 1) + .ore(LITHIUM_ORE, new ResourceLocation(ElectricAdvantage.MODID, "li_ore"), ore -> ore + .enabled(electricLithiumEnabled) + .retrogen(false) + .dimension(OVERWORLD, dimension -> addHosts(dimension + .enabled(true) + .yRange(1, 31) + .attempts(0.125D) + .quantityRange(6, 9) + .pattern(OrePattern.DEFAULT)))) + .ore(SULFUR_ORE, new ResourceLocation(ElectricAdvantage.MODID, "sulfur_ore"), ore -> ore + .enabled(electricSulfurEnabled) + .retrogen(false) + .dimension(OVERWORLD, dimension -> addHosts(dimension + .enabled(true) + .yRange(1, 31) + .attempts(1.0D) + .quantityRange(8, 23) + .pattern(OrePattern.DEFAULT)))) + .build(); + } + + private static WorldgenProvider.OreDimensionDefinition.Builder addHosts( + WorldgenProvider.OreDimensionDefinition.Builder dimension) { + return dimension + .hostBlock(STONE) + .hostTag(STONE_TAG) + .hostFamily(GeologyFamily.SEDIMENTARY) + .hostFamily(GeologyFamily.METAMORPHIC) + .hostFamily(GeologyFamily.IGNEOUS_INTRUSIVE) + .hostFamily(GeologyFamily.IGNEOUS_VOLCANIC); + } + + static String describeOverride(Path configDirectory) { + if (Files.isRegularFile(configDirectory.resolve(ElectricAdvantage.MODID + "-orespawn.json"))) { + return "config/" + ElectricAdvantage.MODID + "-orespawn.json (authoritative)"; + } + if (Files.isRegularFile(configDirectory.resolve("orespawn") + .resolve(ElectricAdvantage.MODID + ".json"))) { + return "config/orespawn/" + ElectricAdvantage.MODID + ".json (legacy importer authority)"; + } + return "none"; + } +} diff --git a/src/main/java/com/mcmoddev/electricadvantage/init/Power.java b/src/main/java/zone/moddev/mc/electricadvantage/init/Power.java similarity index 95% rename from src/main/java/com/mcmoddev/electricadvantage/init/Power.java rename to src/main/java/zone/moddev/mc/electricadvantage/init/Power.java index 179a538..7f676c9 100644 --- a/src/main/java/com/mcmoddev/electricadvantage/init/Power.java +++ b/src/main/java/zone/moddev/mc/electricadvantage/init/Power.java @@ -1,4 +1,4 @@ -package com.mcmoddev.electricadvantage.init; +package zone.moddev.mc.electricadvantage.init; import net.minecraft.util.DamageSource; import cyano.poweradvantage.api.ConduitType; diff --git a/src/main/java/zone/moddev/mc/electricadvantage/init/Recipes.java b/src/main/java/zone/moddev/mc/electricadvantage/init/Recipes.java new file mode 100644 index 0000000..1a22083 --- /dev/null +++ b/src/main/java/zone/moddev/mc/electricadvantage/init/Recipes.java @@ -0,0 +1,15 @@ +package zone.moddev.mc.electricadvantage.init; + +/** + * Electric Advantage 1.13 recipes are data driven. This hook remains so the + * historical lifecycle call has a stable home while JSON conditions apply the + * selected Power Advantage recipe mode. + */ +public final class Recipes { + private Recipes() {} + + public static void init() { + Blocks.init(); + Items.init(); + } +} diff --git a/src/main/java/com/mcmoddev/electricadvantage/init/TreasureChests.java b/src/main/java/zone/moddev/mc/electricadvantage/init/TreasureChests.java similarity index 96% rename from src/main/java/com/mcmoddev/electricadvantage/init/TreasureChests.java rename to src/main/java/zone/moddev/mc/electricadvantage/init/TreasureChests.java index 420ad43..556f4b2 100644 --- a/src/main/java/com/mcmoddev/electricadvantage/init/TreasureChests.java +++ b/src/main/java/zone/moddev/mc/electricadvantage/init/TreasureChests.java @@ -1,8 +1,6 @@ -package com.mcmoddev.electricadvantage.init; +package zone.moddev.mc.electricadvantage.init; -import com.mcmoddev.electricadvantage.ElectricAdvantage; -import net.minecraftforge.fml.common.FMLLog; -import org.apache.logging.log4j.Level; +import zone.moddev.mc.electricadvantage.ElectricAdvantage; import java.io.IOException; import java.nio.charset.Charset; @@ -33,7 +31,7 @@ private static void writeLootFile(Path file, String content){ Files.createDirectories(file.getParent()); Files.write(file, Arrays.asList(content), Charset.forName("UTF-8")); } catch (IOException e) { - FMLLog.log(Level.ERROR,e,"Error writing additional-loot-table files"); + ElectricAdvantage.LOGGER.error("Error writing additional-loot-table file {}", file, e); } } @@ -178,4 +176,4 @@ private static void writeLootFile(Path file, String content){ " }\n" + " ]\n" + "}\n"; -} \ No newline at end of file +} diff --git a/src/main/java/com/mcmoddev/electricadvantage/init/Villages.java b/src/main/java/zone/moddev/mc/electricadvantage/init/Villages.java similarity index 88% rename from src/main/java/com/mcmoddev/electricadvantage/init/Villages.java rename to src/main/java/zone/moddev/mc/electricadvantage/init/Villages.java index ef7bc00..007a245 100644 --- a/src/main/java/com/mcmoddev/electricadvantage/init/Villages.java +++ b/src/main/java/zone/moddev/mc/electricadvantage/init/Villages.java @@ -1,12 +1,12 @@ -package com.mcmoddev.electricadvantage.init; +package zone.moddev.mc.electricadvantage.init; + +import zone.moddev.mc.electricadvantage.ElectricAdvantage; import net.minecraft.entity.passive.EntityVillager; import net.minecraft.item.Item; import net.minecraft.util.ResourceLocation; -import net.minecraftforge.fml.common.FMLLog; -import net.minecraftforge.fml.common.registry.ForgeRegistries; import net.minecraftforge.fml.common.registry.VillagerRegistry; -import org.apache.logging.log4j.Level; +import net.minecraftforge.registries.ForgeRegistries; public abstract class Villages { // TODO: add machinist villager @@ -37,7 +37,7 @@ public static void init(){ insertTrades(1, 1, 2, new EntityVillager.ListItemForEmeralds( Items.power_supply_unit, new EntityVillager.PriceInfo(1, 3))); } catch (RuntimeException e) { - FMLLog.log(Level.ERROR, e, "Failed to add trades to villagers"); + ElectricAdvantage.LOGGER.error("Failed to add trades to villagers", e); } diff --git a/src/main/java/com/mcmoddev/electricadvantage/items/BatteryItem.java b/src/main/java/zone/moddev/mc/electricadvantage/items/BatteryItem.java similarity index 64% rename from src/main/java/com/mcmoddev/electricadvantage/items/BatteryItem.java rename to src/main/java/zone/moddev/mc/electricadvantage/items/BatteryItem.java index f5f74aa..4b2280f 100644 --- a/src/main/java/com/mcmoddev/electricadvantage/items/BatteryItem.java +++ b/src/main/java/zone/moddev/mc/electricadvantage/items/BatteryItem.java @@ -1,12 +1,15 @@ -package com.mcmoddev.electricadvantage.items; +package zone.moddev.mc.electricadvantage.items; -import com.mcmoddev.electricadvantage.common.IRechargeableItem; -import com.mcmoddev.electricadvantage.init.Power; +import zone.moddev.mc.electricadvantage.common.IRechargeableItem; +import zone.moddev.mc.electricadvantage.init.Power; import cyano.poweradvantage.api.ConduitType; import net.minecraft.client.util.ITooltipFlag; import net.minecraft.item.ItemStack; +import net.minecraft.item.Item; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.text.translation.I18n; +import net.minecraft.util.text.ITextComponent; +import net.minecraft.util.text.TextComponentString; +import net.minecraft.util.text.TextComponentTranslation; import net.minecraft.world.World; import java.text.NumberFormat; @@ -17,12 +20,12 @@ public class BatteryItem extends net.minecraft.item.Item implements IRechargeabl private final float capacity; private final NumberFormat nf; - public BatteryItem(float capacity){ + public BatteryItem(float capacity, Item.Properties properties){ + super(properties.maxStackSize(1)); this.capacity = capacity; nf = NumberFormat.getInstance(); nf.setMaximumFractionDigits(0); nf.setMinimumFractionDigits(0); - super.setMaxStackSize(1); } @Override @@ -30,11 +33,11 @@ public float getEnergy(ItemStack stack) { if(stack.getItem() instanceof IRechargeableItem){ BatteryItem battery = (BatteryItem)stack.getItem(); NBTTagCompound dataTag; - if(!stack.hasTagCompound()){ + if(!stack.hasTag()){ return battery.capacity; // new battery starts with 100% charge } else { - dataTag = stack.getTagCompound(); - if(dataTag.hasKey("energy")){ + dataTag = stack.getTag(); + if(dataTag.contains("energy", 99)){ return dataTag.getFloat("energy"); } else { return battery.capacity; // new battery starts with 100% charge @@ -48,13 +51,9 @@ public float getEnergy(ItemStack stack) { public void setEnergy(ItemStack stack, float energy){ if(stack.getItem() instanceof BatteryItem){ NBTTagCompound dataTag; - if(!stack.hasTagCompound()){ - dataTag = new NBTTagCompound(); - } else { - dataTag = stack.getTagCompound(); - } + dataTag = stack.getOrCreateTag(); dataTag.setFloat("energy", energy); - stack.setTagCompound(dataTag); + stack.setTag(dataTag); } } /** @@ -68,20 +67,16 @@ public float addEnergy(ItemStack stack, float energy, ConduitType type){ if(ConduitType.areSameType(type, Power.ELECTRIC_POWER) && stack.getItem() instanceof BatteryItem){ BatteryItem battery = (BatteryItem)stack.getItem(); NBTTagCompound dataTag; - if(!stack.hasTagCompound()){ - dataTag = new NBTTagCompound(); - } else { - dataTag = stack.getTagCompound(); - } + dataTag = stack.getOrCreateTag(); float currentEnergy; - if(dataTag.hasKey("energy")){ + if(dataTag.contains("energy", 99)){ currentEnergy = dataTag.getFloat("energy"); } else { currentEnergy = battery.capacity; } float newEnergy = Math.max(0, Math.min(currentEnergy+energy, battery.capacity)); dataTag.setFloat("energy", newEnergy); - stack.setTagCompound(dataTag); + stack.setTag(dataTag); return newEnergy - currentEnergy; } else { return 0; @@ -100,17 +95,15 @@ public ConduitType getEnergyType(){ } @Override - public void addInformation(ItemStack stack, World world, List list, ITooltipFlag flag){ + public void addInformation(ItemStack stack, World world, List list, ITooltipFlag flag){ super.addInformation(stack, world, list, flag); - StringBuilder sb = new StringBuilder(); float max = getMaxEnergy(stack); if(max <= 0) return; // not a battery! float e = getEnergy(stack); - //sb.append(nf.format(e)).append('/').append(nf.format(max)).append(" kJ"); - sb.append(nf.format(100*e/max)).append("% ").append(I18n.translateToLocal("tooltip.battery.charge")); - list.add(sb.toString()); - StringBuilder sb2 = new StringBuilder(); - sb2.append('(').append(nf.format(max)).append("kJ ").append(I18n.translateToLocal("tooltip.battery.capacity")).append(')'); - list.add(sb2.toString()); + list.add(new TextComponentString(nf.format(100 * e / max) + "% ") + .appendSibling(new TextComponentTranslation("tooltip.battery.charge"))); + list.add(new TextComponentString("(" + nf.format(max) + "kJ ") + .appendSibling(new TextComponentTranslation("tooltip.battery.capacity")) + .appendText(")")); } } diff --git a/src/main/java/com/mcmoddev/electricadvantage/machines/ElectricBatteryArrayBlock.java b/src/main/java/zone/moddev/mc/electricadvantage/machines/ElectricBatteryArrayBlock.java similarity index 69% rename from src/main/java/com/mcmoddev/electricadvantage/machines/ElectricBatteryArrayBlock.java rename to src/main/java/zone/moddev/mc/electricadvantage/machines/ElectricBatteryArrayBlock.java index 08739bd..9b41de6 100644 --- a/src/main/java/com/mcmoddev/electricadvantage/machines/ElectricBatteryArrayBlock.java +++ b/src/main/java/zone/moddev/mc/electricadvantage/machines/ElectricBatteryArrayBlock.java @@ -1,4 +1,4 @@ -package com.mcmoddev.electricadvantage.machines; +package zone.moddev.mc.electricadvantage.machines; import cyano.poweradvantage.api.ConduitType; import net.minecraft.world.World; @@ -10,7 +10,7 @@ public ElectricBatteryArrayBlock(){ } @Override - public ElectricGeneratorTileEntity createNewTileEntity(World w, int m) { + public ElectricGeneratorTileEntity createNewTileEntity(net.minecraft.world.IBlockReader world) { return new ElectricBatteryArrayTileEntity(); } @Override diff --git a/src/main/java/com/mcmoddev/electricadvantage/machines/ElectricBatteryArrayTileEntity.java b/src/main/java/zone/moddev/mc/electricadvantage/machines/ElectricBatteryArrayTileEntity.java similarity index 93% rename from src/main/java/com/mcmoddev/electricadvantage/machines/ElectricBatteryArrayTileEntity.java rename to src/main/java/zone/moddev/mc/electricadvantage/machines/ElectricBatteryArrayTileEntity.java index cb4c050..5260ca7 100644 --- a/src/main/java/com/mcmoddev/electricadvantage/machines/ElectricBatteryArrayTileEntity.java +++ b/src/main/java/zone/moddev/mc/electricadvantage/machines/ElectricBatteryArrayTileEntity.java @@ -1,7 +1,7 @@ -package com.mcmoddev.electricadvantage.machines; +package zone.moddev.mc.electricadvantage.machines; -import com.mcmoddev.electricadvantage.common.IRechargeableItem; -import com.mcmoddev.electricadvantage.init.Power; +import zone.moddev.mc.electricadvantage.common.IRechargeableItem; +import zone.moddev.mc.electricadvantage.init.Power; import cyano.poweradvantage.api.ConduitType; import cyano.poweradvantage.api.PowerRequest; import net.minecraft.item.Item; @@ -11,7 +11,7 @@ public class ElectricBatteryArrayTileEntity extends ElectricGeneratorTileEntity{ public ElectricBatteryArrayTileEntity(){ - super("tile.electricadvantage.electric_battery_array.name",8); + super(zone.moddev.mc.electricadvantage.init.Entities.ELECTRIC_BATTERY_ARRAY, "tile.electricadvantage.electric_battery_array.name",8); } diff --git a/src/main/java/com/mcmoddev/electricadvantage/machines/ElectricCrusherBlock.java b/src/main/java/zone/moddev/mc/electricadvantage/machines/ElectricCrusherBlock.java similarity index 68% rename from src/main/java/com/mcmoddev/electricadvantage/machines/ElectricCrusherBlock.java rename to src/main/java/zone/moddev/mc/electricadvantage/machines/ElectricCrusherBlock.java index 5c811f5..5bc4000 100644 --- a/src/main/java/com/mcmoddev/electricadvantage/machines/ElectricCrusherBlock.java +++ b/src/main/java/zone/moddev/mc/electricadvantage/machines/ElectricCrusherBlock.java @@ -1,4 +1,4 @@ -package com.mcmoddev.electricadvantage.machines; +package zone.moddev.mc.electricadvantage.machines; import net.minecraft.world.World; @@ -9,7 +9,7 @@ public ElectricCrusherBlock(){ } @Override - public ElectricMachineTileEntity createNewTileEntity(World w, int m) { + public ElectricMachineTileEntity createNewTileEntity(net.minecraft.world.IBlockReader world) { return new ElectricCrusherTileEntity(); } diff --git a/src/main/java/com/mcmoddev/electricadvantage/machines/ElectricCrusherTileEntity.java b/src/main/java/zone/moddev/mc/electricadvantage/machines/ElectricCrusherTileEntity.java similarity index 83% rename from src/main/java/com/mcmoddev/electricadvantage/machines/ElectricCrusherTileEntity.java rename to src/main/java/zone/moddev/mc/electricadvantage/machines/ElectricCrusherTileEntity.java index 960c7be..b16e5de 100644 --- a/src/main/java/com/mcmoddev/electricadvantage/machines/ElectricCrusherTileEntity.java +++ b/src/main/java/zone/moddev/mc/electricadvantage/machines/ElectricCrusherTileEntity.java @@ -1,7 +1,7 @@ -package com.mcmoddev.electricadvantage.machines; +package zone.moddev.mc.electricadvantage.machines; -import com.mcmoddev.electricadvantage.compat.BaseMetalsCompat; -import com.mcmoddev.electricadvantage.init.Power; +import zone.moddev.mc.electricadvantage.compat.BaseMetalsCompat; +import zone.moddev.mc.electricadvantage.init.Power; import net.minecraft.init.SoundEvents; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; @@ -11,18 +11,18 @@ import java.util.Arrays; public class ElectricCrusherTileEntity extends ElectricMachineTileEntity{ - + public static final float ENERGY_PER_TICK = 12f; - + private short[] smashTime = new short[3]; private final short totalSmashTime = 200; - + public ElectricCrusherTileEntity() { - super("tile.electricadvantage.electric_crusher.name", + super(zone.moddev.mc.electricadvantage.init.Entities.ELECTRIC_CRUSHER, "tile.electricadvantage.electric_crusher.name", 3, 6, 0); Arrays.fill(smashTime, (short)0); } @@ -59,7 +59,7 @@ public void tickUpdate(boolean isServerWorld) { } - + private static boolean areNotEqual(short[] a, short[] b){ if(a.length == b.length){ for(int i = 0; i < a.length; i++){ @@ -69,18 +69,18 @@ private static boolean areNotEqual(short[] a, short[] b){ } return true; } - + private boolean canCrush(int slot){ ItemStack input = this.getInputSlot(slot); if(input == null) return false; - ItemStack output = BaseMetalsCompat.getCrusherRecipeOutput(input); + ItemStack output = BaseMetalsCompat.getCrusherRecipeOutput(getWorld(), input); if(output == null) return false; return this.hasSpaceForItemInOutputSlots(output); } - + private void doCrush(int slot){ ItemStack input = this.getInputSlot(slot); - ItemStack output = BaseMetalsCompat.getCrusherRecipeOutput(input); + ItemStack output = BaseMetalsCompat.getCrusherRecipeOutput(getWorld(), input); if(output == null) return; this.insertItemToOutputSlots(output); input.shrink(1); @@ -88,7 +88,7 @@ private void doCrush(int slot){ setInputSlot(slot,null); } } - + private final float[] progress = new float[3]; @Override public float[] getProgress() { @@ -97,21 +97,21 @@ public float[] getProgress() { } return progress; } - - + + @Override protected void saveTo(NBTTagCompound tagRoot) { NBTTagList times = new NBTTagList(); for(int i = 0; i < numberOfInputSlots(); i++){ - times.appendTag(new NBTTagShort(smashTime[i])); + times.add(new NBTTagShort(smashTime[i])); } tagRoot.setTag("smashTime", times); } @Override protected void loadFrom(NBTTagCompound tagRoot) { - NBTTagList times = tagRoot.getTagList("smashTime", 2); - for(int i = 0; i < numberOfInputSlots() && i < times.tagCount(); i++){ + NBTTagList times = tagRoot.getList("smashTime", 2); + for(int i = 0; i < numberOfInputSlots() && i < times.size(); i++){ smashTime[i] = ((NBTTagShort)times.get(i)).getShort(); } } @@ -119,7 +119,7 @@ protected void loadFrom(NBTTagCompound tagRoot) { @Override protected boolean isValidInputItem(ItemStack item) { if(item == null) return false; - return BaseMetalsCompat.hasCrusherRecipe(item); + return BaseMetalsCompat.hasCrusherRecipe(getWorld(), item); } private int[] dataArray = null; diff --git a/src/main/java/zone/moddev/mc/electricadvantage/machines/ElectricDrillBlock.java b/src/main/java/zone/moddev/mc/electricadvantage/machines/ElectricDrillBlock.java new file mode 100644 index 0000000..3a6441b --- /dev/null +++ b/src/main/java/zone/moddev/mc/electricadvantage/machines/ElectricDrillBlock.java @@ -0,0 +1,139 @@ +package zone.moddev.mc.electricadvantage.machines; + +import cyano.poweradvantage.api.ConduitType; +import cyano.poweradvantage.api.GUIBlock; +import cyano.poweradvantage.api.ITypedConduit; +import cyano.poweradvantage.api.PowerConnectorContext; +import cyano.poweradvantage.api.PoweredEntity; +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.block.state.IBlockState; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.inventory.IInventory; +import net.minecraft.inventory.InventoryHelper; +import net.minecraft.item.BlockItemUseContext; +import net.minecraft.item.ItemStack; +import net.minecraft.state.BooleanProperty; +import net.minecraft.state.DirectionProperty; +import net.minecraft.state.StateContainer; +import net.minecraft.state.properties.BlockStateProperties; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.EnumFacing; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.Explosion; +import net.minecraft.world.IBlockReader; +import net.minecraft.world.World; +import zone.moddev.mc.electricadvantage.init.Power; +import zone.moddev.mc.poweradvantage.conduitnetwork.ConduitRegistry; + +public class ElectricDrillBlock extends GUIBlock implements ITypedConduit { + public static final DirectionProperty FACING = BlockStateProperties.FACING; + public static final BooleanProperty ACTIVE = BooleanProperty.create("active"); + + private final ConduitType[] types = {Power.ELECTRIC_POWER}; + + public ElectricDrillBlock() { + super(Material.PISTON); + setPowerAdvantageHardness(0.75f); + setDefaultState(getStateContainer().getBaseState() + .with(ACTIVE, false) + .with(FACING, EnumFacing.DOWN)); + } + + @Override + protected void fillStateContainer(StateContainer.Builder builder) { + builder.add(ACTIVE, FACING); + } + + @Override + public ElectricMachineTileEntity createNewTileEntity(IBlockReader world) { + return new ElectricDrillTileEntity(); + } + + @Override + public void onBlockAdded(IBlockState state, World world, BlockPos pos, IBlockState oldState) { + super.onBlockAdded(state, world, pos, oldState); + ConduitRegistry.getInstance().conduitBlockPlacedEvent( + world, world.dimension.getType().getId(), pos, Power.ELECTRIC_POWER); + } + + @Override + public void onReplaced(IBlockState state, World world, BlockPos pos, IBlockState newState, boolean isMoving) { + if (state.getBlock() != newState.getBlock()) { + ConduitRegistry.getInstance().conduitBlockRemovedEvent( + world, world.dimension.getType().getId(), pos, Power.ELECTRIC_POWER); + TileEntity tile = world.getTileEntity(pos); + if (tile instanceof IInventory) { + InventoryHelper.dropInventoryItems(world, pos, (IInventory) tile); + world.updateComparatorOutputLevel(pos, this); + } + } + super.onReplaced(state, world, pos, newState, isMoving); + } + + @Override + public void onExplosionDestroy(World world, BlockPos pos, Explosion explosion) { + ConduitRegistry.getInstance().conduitBlockRemovedEvent( + world, world.dimension.getType().getId(), pos, Power.ELECTRIC_POWER); + super.onExplosionDestroy(world, pos, explosion); + } + + @Override + public ConduitType[] getTypes() { + return types; + } + + @Override + public boolean isPowerSink(ConduitType type) { + return true; + } + + @Override + public boolean isPowerSource(ConduitType type) { + return false; + } + + @Override + public boolean canAcceptConnection(PowerConnectorContext connection) { + return ConduitType.areSameType(Power.ELECTRIC_POWER, connection.powerType); + } + + @Override + public IBlockState getStateForPlacement(BlockItemUseContext context) { + return getDefaultState().with(FACING, context.getFace().getOpposite()); + } + + @Override + public void onBlockPlacedBy(World world, BlockPos pos, IBlockState state, + EntityLivingBase placer, ItemStack stack) { + if (stack.hasDisplayName()) { + TileEntity tile = world.getTileEntity(pos); + if (tile instanceof PoweredEntity) { + ((PoweredEntity) tile).setCustomInventoryName(stack.getDisplayName().getString()); + } + } + } + + /** Decodes all six legacy facings; bit 3 is the active flag. */ + public IBlockState getStateFromLegacyMeta(int meta) { + return getDefaultState() + .with(FACING, EnumFacing.byIndex(meta & 0x7)) + .with(ACTIVE, (meta & 0x8) != 0); + } + + public int getLegacyMetaFromState(IBlockState state) { + return state.get(FACING).getIndex() | (state.get(ACTIVE) ? 0x8 : 0); + } + + @Override + public int getComparatorInputOverride(IBlockState state, World world, BlockPos pos) { + TileEntity tile = world.getTileEntity(pos); + return tile instanceof ElectricMachineTileEntity + ? ((ElectricMachineTileEntity) tile).getComparatorOutput() : 0; + } + + @Override + public boolean hasComparatorInputOverride(IBlockState state) { + return true; + } +} diff --git a/src/main/java/com/mcmoddev/electricadvantage/machines/ElectricDrillTileEntity.java b/src/main/java/zone/moddev/mc/electricadvantage/machines/ElectricDrillTileEntity.java similarity index 78% rename from src/main/java/com/mcmoddev/electricadvantage/machines/ElectricDrillTileEntity.java rename to src/main/java/zone/moddev/mc/electricadvantage/machines/ElectricDrillTileEntity.java index a10811d..c474e3c 100644 --- a/src/main/java/com/mcmoddev/electricadvantage/machines/ElectricDrillTileEntity.java +++ b/src/main/java/zone/moddev/mc/electricadvantage/machines/ElectricDrillTileEntity.java @@ -1,8 +1,8 @@ -package com.mcmoddev.electricadvantage.machines; +package zone.moddev.mc.electricadvantage.machines; -import com.mcmoddev.electricadvantage.init.Blocks; -import com.mcmoddev.electricadvantage.init.Power; -import com.mcmoddev.poweradvantage.util.InventoryWrapper; +import zone.moddev.mc.electricadvantage.init.Blocks; +import zone.moddev.mc.electricadvantage.init.Power; +import zone.moddev.mc.poweradvantage.util.InventoryWrapper; import net.minecraft.block.Block; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.Entity; @@ -12,14 +12,16 @@ import net.minecraft.inventory.ISidedInventory; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTTagList; +import net.minecraft.nbt.NBTUtil; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.EnumFacing; import net.minecraft.util.math.AxisAlignedBB; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.MathHelper; import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; import java.util.ArrayList; import java.util.Arrays; @@ -33,20 +35,21 @@ public class ElectricDrillTileEntity extends ElectricMachineTileEntity{ public static final float ENERGY_COST_PROGRESS_TICK = 24f; public static final float MINING_TIME_FACTOR = 32.0f; - + private final int[] dataSyncArray = new int[4]; private int progress = 0; private int progressGoal = 0; private BlockPos targetBlockCoord = null; private Block[] targetBlocks = null; + private NBTTagList savedTargetStates = null; private List targetBlockItems = null; private int laserLength = 0; - + private boolean deferred = false; - + public ElectricDrillTileEntity() { - super("tile.electricadvantage.electric_drill.name", + super(zone.moddev.mc.electricadvantage.init.Entities.ELECTRIC_DRILL, "tile.electricadvantage.electric_drill.name", 0, 6, 0); } @@ -69,10 +72,10 @@ public float[] getProgress() { public void tickUpdate(boolean isServerWorld) { if(isServerWorld){ if(deferred){ - targetBlock(targetBlockCoord); + restoreTargetBlock(); } updateFacing(); - + // disabled by redstone if(hasRedstoneSignal()){ if (progress > 0){ @@ -91,7 +94,7 @@ public void tickUpdate(boolean isServerWorld) { BlockPos[] targets = this.getArea(targetBlockCoord); for(int i = 0; i < targets.length; i++) if(canMine(targets[i])){ - getWorld().setBlockToAir(targets[i]); + getWorld().setBlockState(targets[i], net.minecraft.init.Blocks.AIR.getDefaultState(), 3); } for(ItemStack item : targetBlockItems){ addItem(item); @@ -103,14 +106,14 @@ public void tickUpdate(boolean isServerWorld) { if(progress > 0)progress--; } } - + } this.setActiveState(isActive()); } - + } - + private boolean hasSpaceForItems(List items) { if(items.size() == 1){ return super.hasSpaceForItemInOutputSlots(items.get(0)); @@ -136,12 +139,12 @@ private EnumFacing trackDirection(){ } return null; } - + private boolean followTrack(){ if(this.getEnergy() < ENERGY_COST_MOVE) return false; EnumFacing trackDir = trackDirection(); if(trackDir == null) return false; - + // clone this block into neighboring block this.untargetBlock(); World w = getWorld(); @@ -149,22 +152,22 @@ private boolean followTrack(){ w.setBlockState(nextPos, w.getBlockState(getPos()), 2); ElectricDrillTileEntity te = (ElectricDrillTileEntity)w.getTileEntity(nextPos); NBTTagCompound dataTransfer = new NBTTagCompound(); - this.writeToNBT(dataTransfer); - te.readFromNBT(dataTransfer); + this.write(dataTransfer); + te.read(dataTransfer); te.setPos(nextPos); te.validate(); + te.subtractEnergy(ENERGY_COST_MOVE, getEnergyType()); te.markDirty(); Arrays.fill(this.getInventory(), null); - + // replace this block with steam pipe - w.setBlockState(getPos().offset(getFacing()), com.mcmoddev.poweradvantage.init.Blocks.steel_frame.getDefaultState()); + w.setBlockState(getPos().offset(getFacing()), zone.moddev.mc.poweradvantage.init.Blocks.steel_frame.getDefaultState()); w.setBlockState(getPos(), Blocks.electric_conduit.getDefaultState(), 2); - - - this.subtractEnergy(ENERGY_COST_MOVE, getType()); + + return true; } - + @Override public int[] getDataFieldArray() { @@ -181,7 +184,7 @@ public void prepareDataFieldsForSync() { @Override public void onDataFieldUpdate() { - this.setEnergy(Float.intBitsToFloat(dataSyncArray[0]), this.getType()); + this.setEnergy(Float.intBitsToFloat(dataSyncArray[0]), this.getEnergyType()); this.progress = dataSyncArray[1]; progressGoal = dataSyncArray[2]; laserLength = dataSyncArray[3]; @@ -192,19 +195,19 @@ public void onDataFieldUpdate() { private int oldLength = 0; @Override public void powerUpdate(){ if(deferred){ - targetBlock(targetBlockCoord); + restoreTargetBlock(); } super.powerUpdate(); boolean flagSync = progress != oldProgress || oldEnergy != getEnergy(); oldProgress = progress; oldEnergy = getEnergy(); - + boolean redstone = hasRedstoneSignal(); - - + + EnumFacing f = getFacing(); BlockPos n = getPos().offset(f); - + // manage drill bits and find next block if(redstone || this.getEnergy() <= 0){ // no power @@ -220,8 +223,8 @@ public void onDataFieldUpdate() { hitEnd = true; break; } - - if(getWorld().isAirBlock(n) || getWorld().getBlockState(n).getBlock().isReplaceable(getWorld(), n)){ + + if(getWorld().isAirBlock(n) || getWorld().getBlockState(n).getMaterial().isReplaceable()){ // this block is not worth mining, replace it n = n.offset(f); if(n.getY() == 0 || n.getY() == 255){ @@ -243,8 +246,8 @@ public void onDataFieldUpdate() { if(hitEnd){ boolean moved = followTrack(); if(moved){ - com.mcmoddev.poweradvantage.conduitnetwork.ConduitRegistry.getInstance() - .conduitBlockRemovedEvent(getWorld(), getWorld().provider.getDimension(), getPos(), getType()); + zone.moddev.mc.poweradvantage.conduitnetwork.ConduitRegistry.getInstance() + .conduitBlockRemovedEvent(getWorld(), getWorld().dimension.getType().getId(), getPos(), getEnergyType()); return; } } @@ -262,24 +265,24 @@ public void onDataFieldUpdate() { } } } - + calculateDrillLength(); if(oldLength != laserLength){ oldLength = laserLength; flagSync = true; } - + if(flagSync){ this.sync(); } - + // push inventory to adjacent chest BlockPos adj = getPos().offset(f.getOpposite()); if(!redstone && !getWorld().isAirBlock(adj)){ inventoryTransfer(adj,f); } - + // fry any idiots who stand in the laser's path if(isActive() && targetBlocks != null && targetBlockCoord != null){ BlockPos pos = getPos(); @@ -293,11 +296,11 @@ public void onDataFieldUpdate() { } } - + public int getDrillLength(){ return laserLength; } - + public void calculateDrillLength(){ if(this.isActive() && this.targetBlocks != null && this.targetBlockCoord != null){ BlockPos pos = getPos(); @@ -314,20 +317,44 @@ private void targetBlock (BlockPos pos){ targetBlockCoord = pos; progressGoal = 0; targetBlocks = new Block[targets.length]; + savedTargetStates = new NBTTagList(); targetBlockItems = new ArrayList<>(targets.length); for(int i = 0; i < targets.length; i++){ targetBlocks[i] = getWorld().getBlockState(targets[i]).getBlock(); + savedTargetStates.add(NBTUtil.writeBlockState(getWorld().getBlockState(targets[i]))); progressGoal += this.getBlockStrength(targets[i]); - targetBlockItems.addAll(targetBlocks[i].getDrops(getWorld(), targets[i], getWorld().getBlockState(targets[i]), 0)); + net.minecraft.util.NonNullList drops = net.minecraft.util.NonNullList.create(); + targetBlocks[i].getDrops(getWorld().getBlockState(targets[i]), drops, getWorld(), targets[i], 0); + targetBlockItems.addAll(drops); } deferred = false; } - + + private void restoreTargetBlock(){ + int savedProgress = progress; + BlockPos[] targets = getArea(targetBlockCoord); + if(savedTargetStates != null){ + if(savedTargetStates.size() != targets.length){ + untargetBlock(); + return; + } + for(int i = 0; i < targets.length; i++){ + if(!savedTargetStates.getCompound(i).equals(NBTUtil.writeBlockState(getWorld().getBlockState(targets[i])))){ + untargetBlock(); + return; + } + } + } + // Rebuild the nine-block target and drops without resetting saved work. + targetBlock(targetBlockCoord); + progress = Math.max(0, Math.min(savedProgress, progressGoal)); + } + private BlockPos[] getArea(BlockPos center){ BlockPos[] a = new BlockPos[9]; a[0] = center; switch(this.getFacing().getAxis()){ - case X: + case X: a[1] = center.north(); a[2] = center.down(); a[3] = center.south(); @@ -361,20 +388,22 @@ private BlockPos[] getArea(BlockPos center){ } return a; } - + private void deferredTargetBlock (BlockPos n){ targetBlockCoord = n; deferred = true; } - + private void untargetBlock(){ + deferred = false; progress = 0; progressGoal = 0; targetBlockCoord = null; targetBlocks = null; + savedTargetStates = null; targetBlockItems = null; } - + private EnumFacing facingCache = null; public EnumFacing getFacing(){ if(facingCache == null) updateFacing(); @@ -382,21 +411,21 @@ public EnumFacing getFacing(){ } private void updateFacing(){ final EnumFacing old = facingCache; - facingCache = (EnumFacing)getWorld().getBlockState(getPos()).getValue(ElectricDrillBlock.FACING); + facingCache = (EnumFacing)getWorld().getBlockState(getPos()).get(ElectricDrillBlock.FACING); if(old != null && old != facingCache){ untargetBlock(); this.sync(); } } - - + + private boolean canMine(BlockPos coord){ IBlockState bs = getWorld().getBlockState(coord); Block b = bs.getBlock(); // indestructable blocks have negative hardness return !(b.getBlockHardness(bs, getWorld(), coord) < 0); } - + private int getBlockStrength(BlockPos coord){ if(getWorld().isAirBlock(coord)){ return 0; @@ -405,8 +434,8 @@ private int getBlockStrength(BlockPos coord){ Block block = bs.getBlock(); return (int)(Math.max(MINING_TIME_FACTOR * block.getBlockHardness(bs, getWorld(), coord),0.5f * MINING_TIME_FACTOR)); } - - + + private void inventoryTransfer(BlockPos adj, EnumFacing otherFace) { ItemStack[] inventory = this.getInventory(); @@ -416,69 +445,77 @@ private void inventoryTransfer(BlockPos adj, EnumFacing otherFace) { int[] accessibleSlots = inv.getSlotsForFace(otherFace); if(accessibleSlots.length == 0) return; for(int mySlot = 0; mySlot < inventory.length; mySlot++){ - if(inventory[mySlot] == null) continue; + if(inventory[mySlot] == null || inventory[mySlot].isEmpty()) continue; for(int i = 0; i < accessibleSlots.length; i++){ int theirSlot = accessibleSlots[i]; ItemStack theirItem = inv.getStackInSlot(theirSlot); if(inv.canInsertItem(theirSlot, inventory[mySlot], otherFace)){ - if(theirItem == null){ + if(theirItem == null || theirItem.isEmpty()){ ItemStack newItem = inventory[mySlot].copy(); newItem.setCount(1); inv.setInventorySlotContents(theirSlot, newItem); inventory[mySlot].shrink(1); if(inventory[mySlot].isEmpty()) inventory[mySlot] = null; + inv.markDirty(); + this.markDirty(); return; - } else if(ItemStack.areItemsEqual(theirItem, inventory[mySlot]) + } else if(ItemStack.areItemsEqual(theirItem, inventory[mySlot]) && ItemStack.areItemStackTagsEqual(theirItem, inventory[mySlot]) && theirItem.getCount() < theirItem.getMaxStackSize() && theirItem.getCount() < inv.getInventoryStackLimit()){ theirItem.grow(1); inventory[mySlot].shrink(1); if(inventory[mySlot].isEmpty()) inventory[mySlot] = null; + inv.markDirty(); + this.markDirty(); return; } } } } - + } } - + public float getProgressLevel(){ - if(progressGoal > 0) + if(progressGoal > 0) return (float)progress / (float)progressGoal; return 0; } - - - - + + + + @Override protected void saveTo(NBTTagCompound tagRoot) { tagRoot.setShort("progress",(short)progress); if(targetBlockCoord != null){ - tagRoot.setInteger("targetX", targetBlockCoord.getX()); - tagRoot.setInteger("targetY", targetBlockCoord.getY()); - tagRoot.setInteger("targetZ", targetBlockCoord.getZ()); + tagRoot.setInt("targetX", targetBlockCoord.getX()); + tagRoot.setInt("targetY", targetBlockCoord.getY()); + tagRoot.setInt("targetZ", targetBlockCoord.getZ()); + if(savedTargetStates != null) tagRoot.setTag("TargetStates", savedTargetStates.copy()); } } @Override protected void loadFrom(NBTTagCompound tagRoot) { - if(tagRoot.hasKey("progress")){ + untargetBlock(); + if(tagRoot.contains("progress", 99)){ progress = tagRoot.getShort("progress"); } - if(tagRoot.hasKey("targetX") && tagRoot.hasKey("targetY") && tagRoot.hasKey("targetZ")){ - int x = tagRoot.getInteger("targetX"); - int y = tagRoot.getInteger("targetY"); - int z = tagRoot.getInteger("targetZ"); + if(tagRoot.contains("targetX", 99) && tagRoot.contains("targetY", 99) && tagRoot.contains("targetZ", 99)){ + int x = tagRoot.getInt("targetX"); + int y = tagRoot.getInt("targetY"); + int z = tagRoot.getInt("targetZ"); + savedTargetStates = tagRoot.contains("TargetStates", 9) ? tagRoot.getList("TargetStates", 10).copy() : null; // Note: world object for tile entities is set AFTER loading them from NBT if(getWorld() == null){ this.deferredTargetBlock(new BlockPos(x,y,z)); } else { - this.targetBlock(new BlockPos(x,y,z)); + this.deferredTargetBlock(new BlockPos(x,y,z)); + this.restoreTargetBlock(); } } } @@ -487,16 +524,16 @@ protected void loadFrom(NBTTagCompound tagRoot) { protected boolean isValidInputItem(ItemStack item) { return true; } - + @Override protected void setActiveState(boolean active){ IBlockState oldState = getWorld().getBlockState(getPos()); - if(oldState.getBlock() instanceof ElectricDrillBlock - && (Boolean)oldState.getValue(ElectricDrillBlock.ACTIVE) != active ){ + if(oldState.getBlock() instanceof ElectricDrillBlock + && (Boolean)oldState.get(ElectricDrillBlock.ACTIVE) != active ){ final TileEntity save = this; final World w = getWorld(); final BlockPos pos = this.getPos(); - IBlockState newState = oldState.withProperty(ElectricDrillBlock.ACTIVE, active); + IBlockState newState = oldState.with(ElectricDrillBlock.ACTIVE, active); w.setBlockState(pos, newState,3); if(save != null){ w.removeTileEntity(pos); @@ -512,12 +549,12 @@ protected void setPowerState(boolean powered){ @Override public boolean isActive(){ - return isPowered() && (!this.hasRedstoneSignal() && (this.getEnergy() > 0 || (Boolean)getWorld().getBlockState(getPos()).getValue(ElectricDrillBlock.ACTIVE))); + return isPowered() && (!this.hasRedstoneSignal() && (this.getEnergy() > 0 || (Boolean)getWorld().getBlockState(getPos()).get(ElectricDrillBlock.ACTIVE))); } - + // Helps with laser rendering final private int renderRange = MAX_RANGE * 2; - @SideOnly(Side.CLIENT) + @OnlyIn(Dist.CLIENT) public AxisAlignedBB getRenderBoundingBox() { return new AxisAlignedBB(getPos().add(-renderRange, -renderRange, -renderRange), getPos().add(renderRange, renderRange, renderRange)); diff --git a/src/main/java/com/mcmoddev/electricadvantage/machines/ElectricFabricatorBlock.java b/src/main/java/zone/moddev/mc/electricadvantage/machines/ElectricFabricatorBlock.java similarity index 53% rename from src/main/java/com/mcmoddev/electricadvantage/machines/ElectricFabricatorBlock.java rename to src/main/java/zone/moddev/mc/electricadvantage/machines/ElectricFabricatorBlock.java index 7318d09..36e4e32 100644 --- a/src/main/java/com/mcmoddev/electricadvantage/machines/ElectricFabricatorBlock.java +++ b/src/main/java/zone/moddev/mc/electricadvantage/machines/ElectricFabricatorBlock.java @@ -1,11 +1,11 @@ -package com.mcmoddev.electricadvantage.machines; +package zone.moddev.mc.electricadvantage.machines; import net.minecraft.world.World; public class ElectricFabricatorBlock extends ElectricMachineBlock{ @Override - public ElectricMachineTileEntity createNewTileEntity(World w, int m) { + public ElectricMachineTileEntity createNewTileEntity(net.minecraft.world.IBlockReader world) { return new ElectricFabricatorTileEntity(); } diff --git a/src/main/java/com/mcmoddev/electricadvantage/machines/ElectricFabricatorTileEntity.java b/src/main/java/zone/moddev/mc/electricadvantage/machines/ElectricFabricatorTileEntity.java similarity index 86% rename from src/main/java/com/mcmoddev/electricadvantage/machines/ElectricFabricatorTileEntity.java rename to src/main/java/zone/moddev/mc/electricadvantage/machines/ElectricFabricatorTileEntity.java index b925ef6..961d8ab 100644 --- a/src/main/java/com/mcmoddev/electricadvantage/machines/ElectricFabricatorTileEntity.java +++ b/src/main/java/zone/moddev/mc/electricadvantage/machines/ElectricFabricatorTileEntity.java @@ -1,7 +1,7 @@ -package com.mcmoddev.electricadvantage.machines; +package zone.moddev.mc.electricadvantage.machines; -import com.mcmoddev.electricadvantage.util.crafting.RecipeDeconstructor; -import com.mcmoddev.electricadvantage.util.crafting.SerializedInventory; +import zone.moddev.mc.electricadvantage.util.crafting.RecipeDeconstructor; +import zone.moddev.mc.electricadvantage.util.crafting.SerializedInventory; import net.minecraft.init.SoundEvents; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; @@ -13,13 +13,13 @@ public class ElectricFabricatorTileEntity extends ElectricMachineTileEntity { public static final float ENERGY_PER_PROGRESS_TICK = 16; - + private FSM state = FSM.INACTIVE; private int progress; private final int progressGoal = 200; - + public ElectricFabricatorTileEntity() { - super("tile.electricadvantage.electric_fabricator.name", 12, 2, 1); + super(zone.moddev.mc.electricadvantage.init.Entities.ELECTRIC_FABRICATOR, "tile.electricadvantage.electric_fabricator.name", 12, 2, 1); } @@ -66,7 +66,7 @@ public void tickUpdate(boolean isServerWorld) { state = FSM.CRAFT_COMPLETE; } else { progress++; - subtractEnergy(ENERGY_PER_PROGRESS_TICK,getType()); + subtractEnergy(ENERGY_PER_PROGRESS_TICK,getEnergyType()); } break; } @@ -82,12 +82,12 @@ public void tickUpdate(boolean isServerWorld) { throw new IllegalStateException("FSM state "+state.name()+" not recognized"); } this.setActiveState(state == FSM.CRAFTING || state == FSM.CRAFT_COMPLETE ); - + } - + } - - + + private ItemStack[] oldInventory = null; private boolean inventoryChanged(){ if(oldInventory == null){ @@ -111,7 +111,7 @@ private boolean inventoryChanged(){ } return changed; } - + private boolean canCraft(){ ItemStack referenceItem = super.getOtherSlot(0); // first check if null @@ -119,7 +119,7 @@ private boolean canCraft(){ // then check if it is craftable from our input inventory AtomicReference output = new AtomicReference<>(); ItemStack[] inv = Arrays.copyOf(getInventory(), this.numberOfInputSlots()); - SerializedInventory result = RecipeDeconstructor.getInstance().attemptToCraft(referenceItem, + SerializedInventory result = RecipeDeconstructor.getInstance().attemptToCraft(getWorld(), referenceItem, SerializedInventory.serialize(inv), output); if(result == null || isEmptyStack(output.get())) return false; // then check if there is space in the output buffer @@ -128,13 +128,13 @@ private boolean canCraft(){ if(result.deserialize().size() > this.numberOfInputSlots()) return false; return true; } - + private void doCraft(){ ItemStack referenceItem = super.getOtherSlot(0); // assuming that canCraft() was already used to check validity AtomicReference output = new AtomicReference<>(); ItemStack[] inv = Arrays.copyOf(getInventory(), this.numberOfInputSlots()); - SerializedInventory result = RecipeDeconstructor.getInstance().attemptToCraft(referenceItem, + SerializedInventory result = RecipeDeconstructor.getInstance().attemptToCraft(getWorld(), referenceItem, SerializedInventory.serialize(inv), output); this.insertItemToOutputSlots(output.get()); List newInventory = result.deserialize(); @@ -146,7 +146,7 @@ private void doCraft(){ } } } - + @Override public boolean isPowered() { return getEnergy() > ENERGY_PER_PROGRESS_TICK; @@ -167,10 +167,10 @@ protected void saveTo(NBTTagCompound tagRoot) { @Override protected void loadFrom(NBTTagCompound tagRoot) { - if(tagRoot.hasKey("progress")){ + if(tagRoot.contains("progress", 99)){ this.progress = tagRoot.getShort("progress"); } - if(tagRoot.hasKey("FSM")){ + if(tagRoot.contains("FSM", 99)){ this.state = FSM.values()[tagRoot.getByte("FSM")]; } } @@ -191,10 +191,10 @@ public void prepareDataFieldsForSync() { dataArray[0] = Float.floatToIntBits(getEnergy()); dataArray[1] = progress; } - + @Override public void onDataFieldUpdate() { - this.setEnergy(Float.intBitsToFloat(dataArray[0]), getType()); + this.setEnergy(Float.intBitsToFloat(dataArray[0]), getEnergyType()); this.progress = dataArray[1]; } @@ -209,26 +209,26 @@ public int getComparatorOutput(){ /* * finite state machine (FSM): - * inactive - * ^ - * | - * power/redstone signal - * | + * inactive + * ^ + * | + * power/redstone signal + * | * | /-- cannot craft item --> waiting * | / | * | / /- inventory/ref item change -/ - * V / V + * V / V * ready ------ can craft item ------> crafting - * ^ ^ / | - * | \-- inventory/ref item change --/ | + * ^ ^ / | + * | \-- inventory/ref item change --/ | * | | * | progress completes * | | * | V * \----------------------------- craft complete - * + * */ - + private enum FSM{ INACTIVE, WAITING, diff --git a/src/main/java/com/mcmoddev/electricadvantage/machines/ElectricFurnaceBlock.java b/src/main/java/zone/moddev/mc/electricadvantage/machines/ElectricFurnaceBlock.java similarity index 58% rename from src/main/java/com/mcmoddev/electricadvantage/machines/ElectricFurnaceBlock.java rename to src/main/java/zone/moddev/mc/electricadvantage/machines/ElectricFurnaceBlock.java index 9443c6d..b7554c5 100644 --- a/src/main/java/com/mcmoddev/electricadvantage/machines/ElectricFurnaceBlock.java +++ b/src/main/java/zone/moddev/mc/electricadvantage/machines/ElectricFurnaceBlock.java @@ -1,4 +1,4 @@ -package com.mcmoddev.electricadvantage.machines; +package zone.moddev.mc.electricadvantage.machines; import net.minecraft.world.World; @@ -9,7 +9,7 @@ public ElectricFurnaceBlock(){ } @Override - public ElectricMachineTileEntity createNewTileEntity(World w, int m) { + public ElectricMachineTileEntity createNewTileEntity(net.minecraft.world.IBlockReader world) { return new ElectricFurnaceTileEntity(); } diff --git a/src/main/java/com/mcmoddev/electricadvantage/machines/ElectricFurnaceTileEntity.java b/src/main/java/zone/moddev/mc/electricadvantage/machines/ElectricFurnaceTileEntity.java similarity index 80% rename from src/main/java/com/mcmoddev/electricadvantage/machines/ElectricFurnaceTileEntity.java rename to src/main/java/zone/moddev/mc/electricadvantage/machines/ElectricFurnaceTileEntity.java index ca42a60..6c2bb40 100644 --- a/src/main/java/com/mcmoddev/electricadvantage/machines/ElectricFurnaceTileEntity.java +++ b/src/main/java/zone/moddev/mc/electricadvantage/machines/ElectricFurnaceTileEntity.java @@ -1,27 +1,26 @@ -package com.mcmoddev.electricadvantage.machines; +package zone.moddev.mc.electricadvantage.machines; import java.util.Arrays; -import com.mcmoddev.electricadvantage.init.Power; +import zone.moddev.mc.electricadvantage.init.Power; import net.minecraft.item.ItemStack; -import net.minecraft.item.crafting.FurnaceRecipes; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; import net.minecraft.nbt.NBTTagShort; public class ElectricFurnaceTileEntity extends ElectricMachineTileEntity{ - + public static final float ENERGY_PER_TICK = 8f; - + private short[] burnTime = new short[4]; private final short totalBurnTime = 200; - + public ElectricFurnaceTileEntity() { - super("tile.electricadvantage.electric_furnace.name", + super(zone.moddev.mc.electricadvantage.init.Entities.ELECTRIC_FURNACE, "tile.electricadvantage.electric_furnace.name", 4, 6, 0); Arrays.fill(burnTime, (short)0); } @@ -57,7 +56,7 @@ public void tickUpdate(boolean isServerWorld) { } - + private static boolean areNotEqual(short[] a, short[] b){ if(a.length == b.length){ for(int i = 0; i < a.length; i++){ @@ -67,25 +66,25 @@ private static boolean areNotEqual(short[] a, short[] b){ } return true; } - + private boolean canSmelt(int slot){ ItemStack input = this.getInputSlot(slot); if(input == null) return false; - ItemStack output = FurnaceRecipes.instance().getSmeltingResult(input); - if(output == null) return false; + ItemStack output = getSmeltingResult(input); + if(output.isEmpty()) return false; return this.hasSpaceForItemInOutputSlots(output); } - + private void doSmelt(int slot){ ItemStack input = this.getInputSlot(slot); - ItemStack output = FurnaceRecipes.instance().getSmeltingResult(input).copy(); + ItemStack output = getSmeltingResult(input).copy(); this.insertItemToOutputSlots(output); input.shrink(1); if(input.isEmpty()){ setInputSlot(slot,null); } } - + private final float[] progress = new float[4]; @Override public float[] getProgress() { @@ -94,21 +93,21 @@ public float[] getProgress() { } return progress; } - - + + @Override protected void saveTo(NBTTagCompound tagRoot) { NBTTagList burnTimes = new NBTTagList(); for(int i = 0; i < numberOfInputSlots(); i++){ - burnTimes.appendTag(new NBTTagShort(burnTime[i])); + burnTimes.add(new NBTTagShort(burnTime[i])); } tagRoot.setTag("cookTime", burnTimes); } @Override protected void loadFrom(NBTTagCompound tagRoot) { - NBTTagList burnTimes = tagRoot.getTagList("cookTime", 2); - for(int i = 0; i < numberOfInputSlots() && i < burnTimes.tagCount(); i++){ + NBTTagList burnTimes = tagRoot.getList("cookTime", 2); + for(int i = 0; i < numberOfInputSlots() && i < burnTimes.size(); i++){ burnTime[i] = ((NBTTagShort)burnTimes.get(i)).getShort(); } } @@ -116,7 +115,7 @@ protected void loadFrom(NBTTagCompound tagRoot) { @Override protected boolean isValidInputItem(ItemStack item) { if(item == null) return false; - return FurnaceRecipes.instance().getSmeltingResult(item) != null; + return !getSmeltingResult(item).isEmpty(); } private int[] dataArray = null; @@ -131,7 +130,7 @@ public int[] getDataFieldArray() { @Override public void onDataFieldUpdate() { int[] arr = getDataFieldArray(); - setEnergy(Float.intBitsToFloat(arr[0]),getType()); + setEnergy(Float.intBitsToFloat(arr[0]),getEnergyType()); for(int i = 0; i < numberOfInputSlots(); i++){ burnTime[i] = (short) arr[i+1]; } diff --git a/src/main/java/zone/moddev/mc/electricadvantage/machines/ElectricGeneratorBlock.java b/src/main/java/zone/moddev/mc/electricadvantage/machines/ElectricGeneratorBlock.java new file mode 100644 index 0000000..868a97f --- /dev/null +++ b/src/main/java/zone/moddev/mc/electricadvantage/machines/ElectricGeneratorBlock.java @@ -0,0 +1,99 @@ +package zone.moddev.mc.electricadvantage.machines; + +import cyano.poweradvantage.api.ConduitType; +import cyano.poweradvantage.api.simple.BlockSimplePowerMachine; +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.block.state.IBlockState; +import net.minecraft.inventory.IInventory; +import net.minecraft.inventory.InventoryHelper; +import net.minecraft.state.BooleanProperty; +import net.minecraft.state.StateContainer; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.EnumFacing; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.IBlockReader; +import net.minecraft.world.World; +import zone.moddev.mc.electricadvantage.init.Power; + +public abstract class ElectricGeneratorBlock extends BlockSimplePowerMachine { + public static final BooleanProperty ACTIVE = BooleanProperty.create("active"); + + public ElectricGeneratorBlock() { + this(Material.PISTON); + } + + public ElectricGeneratorBlock(Material material) { + super(material, 0.75f, Power.ELECTRIC_POWER); + initializeDefaultState(); + } + + protected ElectricGeneratorBlock(Block.Properties properties) { + super(properties, Power.ELECTRIC_POWER); + initializeDefaultState(); + } + + private void initializeDefaultState() { + setDefaultState(getStateContainer().getBaseState() + .with(ACTIVE, false) + .with(FACING, EnumFacing.NORTH)); + } + + @Override + protected void fillStateContainer(StateContainer.Builder builder) { + builder.add(ACTIVE, FACING); + } + + /** Decodes the 1.10/1.12 metadata used by world migration fixtures. */ + public IBlockState getStateFromLegacyMeta(int meta) { + EnumFacing facing = EnumFacing.byIndex(meta & 0x7); + if (facing.getAxis() == EnumFacing.Axis.Y) facing = EnumFacing.NORTH; + return getDefaultState().with(FACING, facing).with(ACTIVE, (meta & 0x8) != 0); + } + + public int getLegacyMetaFromState(IBlockState state) { + return state.get(FACING).getIndex() | (state.get(ACTIVE) ? 0x8 : 0); + } + + @Override + public abstract ElectricGeneratorTileEntity createNewTileEntity(IBlockReader world); + + @Override + public int getComparatorInputOverride(IBlockState state, World world, BlockPos pos) { + TileEntity tile = world.getTileEntity(pos); + return tile instanceof ElectricGeneratorTileEntity + ? ((ElectricGeneratorTileEntity) tile).getComparatorOutput() : 0; + } + + @Override + public boolean hasComparatorInputOverride(IBlockState state) { + return true; + } + + @Override + public void onReplaced(IBlockState state, World world, BlockPos pos, IBlockState newState, boolean isMoving) { + if (state.getBlock() != newState.getBlock()) { + TileEntity tile = world.getTileEntity(pos); + if (tile instanceof IInventory) { + InventoryHelper.dropInventoryItems(world, pos, (IInventory) tile); + ((IInventory) tile).clear(); + world.updateComparatorOutputLevel(pos, this); + } + } + super.onReplaced(state, world, pos, newState, isMoving); + } + + @Override + public boolean isPowerSink(ConduitType type) { + return false; + } + + @Override + public boolean isPowerSource(ConduitType type) { + return true; + } + + public ConduitType getType() { + return Power.ELECTRIC_POWER; + } +} diff --git a/src/main/java/com/mcmoddev/electricadvantage/machines/ElectricGeneratorTileEntity.java b/src/main/java/zone/moddev/mc/electricadvantage/machines/ElectricGeneratorTileEntity.java similarity index 77% rename from src/main/java/com/mcmoddev/electricadvantage/machines/ElectricGeneratorTileEntity.java rename to src/main/java/zone/moddev/mc/electricadvantage/machines/ElectricGeneratorTileEntity.java index 2296668..e928dc3 100644 --- a/src/main/java/com/mcmoddev/electricadvantage/machines/ElectricGeneratorTileEntity.java +++ b/src/main/java/zone/moddev/mc/electricadvantage/machines/ElectricGeneratorTileEntity.java @@ -1,6 +1,6 @@ -package com.mcmoddev.electricadvantage.machines; +package zone.moddev.mc.electricadvantage.machines; -import com.mcmoddev.electricadvantage.init.Power; +import zone.moddev.mc.electricadvantage.init.Power; import cyano.poweradvantage.api.ConduitType; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.player.EntityPlayerMP; @@ -13,8 +13,9 @@ import net.minecraft.util.SoundEvent; import net.minecraft.util.math.AxisAlignedBB; import net.minecraft.util.math.BlockPos; +import net.minecraft.tileentity.TileEntityType; import net.minecraft.world.World; -import net.minecraftforge.fml.common.FMLLog; +import zone.moddev.mc.electricadvantage.ElectricAdvantage; import java.util.Arrays; import java.util.List; @@ -25,8 +26,8 @@ public abstract class ElectricGeneratorTileEntity extends cyano.poweradvantage.a private final int[] inputSlots; - public ElectricGeneratorTileEntity(String name,int numInputSlots) { - super(Power.ELECTRIC_POWER, 1000, name); + public ElectricGeneratorTileEntity(TileEntityType tileType, String name,int numInputSlots) { + super(tileType, Power.ELECTRIC_POWER, 1000, name); inventory = new ItemStack[numInputSlots]; inputSlots = new int[numInputSlots]; for(int i = 0; i < inventory.length; i++){ @@ -34,8 +35,8 @@ public ElectricGeneratorTileEntity(String name,int numInputSlots) { } } - public ElectricGeneratorTileEntity(String name,int numInputSlots, ConduitType[] types, float[] energyBuffers) { - super(types, energyBuffers, name); + public ElectricGeneratorTileEntity(TileEntityType tileType, String name,int numInputSlots, ConduitType[] types, float[] energyBuffers) { + super(tileType, types, energyBuffers, name); inventory = new ItemStack[numInputSlots]; inputSlots = new int[numInputSlots]; for(int i = 0; i < inventory.length; i++){ @@ -65,11 +66,11 @@ protected boolean hasRedstoneSignal(){ protected void setActive(boolean active){ IBlockState old = getWorld().getBlockState(getPos()); if(old.getBlock() instanceof ElectricGeneratorBlock - && (Boolean)old.getValue(ElectricGeneratorBlock.ACTIVE) != active){ + && (Boolean)old.get(ElectricGeneratorBlock.ACTIVE) != active){ final TileEntity save = this; final World w = getWorld(); final BlockPos pos = this.getPos(); - w.setBlockState(pos, old.withProperty(ElectricGeneratorBlock.ACTIVE, active),3); + w.setBlockState(pos, old.with(ElectricGeneratorBlock.ACTIVE, active),3); if(save != null){ w.removeTileEntity(pos); save.validate(); @@ -92,13 +93,13 @@ protected void playSoundEffect(double x, double y, double z, SoundEvent sound, f x - range, y - range, z - range, x + range, y + range, z + range)); for(EntityPlayerMP player : players){ - player.connection.sendPacket(new SPacketCustomSound(sound.getRegistryName().toString(), SoundCategory.BLOCKS, - x, y, z, (float)volume, (float)pitch)); + player.connection.sendPacket(new SPacketCustomSound(sound.getRegistryName(), SoundCategory.BLOCKS, + new net.minecraft.util.math.Vec3d(x, y, z), volume, pitch)); } } public boolean isActive(){ - return (Boolean)getWorld().getBlockState(getPos()).getValue(ElectricGeneratorBlock.ACTIVE); + return (Boolean)getWorld().getBlockState(getPos()).get(ElectricGeneratorBlock.ACTIVE); } @Override @@ -117,7 +118,8 @@ public ItemStack getInputSlot(int i){ if(i < inputSlots.length){ return inventory[inputSlots[i]]; } else { - FMLLog.warning("Bug in class %s. StackTrace: %s",this.getClass().getName(),Arrays.toString(Thread.currentThread().getStackTrace()).replace(',','\n')); + ElectricAdvantage.LOGGER.warn("Invalid slot access in {}. Stack trace: {}", + getClass().getName(), Arrays.toString(Thread.currentThread().getStackTrace()).replace(',', '\n')); return null; } } @@ -173,7 +175,7 @@ public void setEnergy(float amount){ setEnergy(amount,Power.ELECTRIC_POWER); } - public ConduitType getType() {return Power.ELECTRIC_POWER;} + public ConduitType getEnergyType() {return Power.ELECTRIC_POWER;} public int getComparatorOutput(){ return (int)(15 * this.getEnergy(Power.ELECTRIC_POWER) / this.getEnergyCapacity(Power.ELECTRIC_POWER)); @@ -181,15 +183,15 @@ public int getComparatorOutput(){ @Override - public NBTTagCompound writeToNBT(NBTTagCompound tagRoot){ - super.writeToNBT(tagRoot); + public NBTTagCompound write(NBTTagCompound tagRoot){ + super.write(tagRoot); saveTo(tagRoot); return tagRoot; } @Override - public void readFromNBT(NBTTagCompound tagRoot){ - super.readFromNBT(tagRoot); + public void read(NBTTagCompound tagRoot){ + super.read(tagRoot); loadFrom(tagRoot); } diff --git a/src/main/java/zone/moddev/mc/electricadvantage/machines/ElectricMachineBlock.java b/src/main/java/zone/moddev/mc/electricadvantage/machines/ElectricMachineBlock.java new file mode 100644 index 0000000..cbb07cc --- /dev/null +++ b/src/main/java/zone/moddev/mc/electricadvantage/machines/ElectricMachineBlock.java @@ -0,0 +1,128 @@ +package zone.moddev.mc.electricadvantage.machines; + +import cyano.poweradvantage.api.ConduitType; +import cyano.poweradvantage.api.simple.BlockSimplePowerMachine; +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.block.state.IBlockState; +import net.minecraft.inventory.IInventory; +import net.minecraft.inventory.InventoryHelper; +import net.minecraft.state.BooleanProperty; +import net.minecraft.state.StateContainer; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.EnumFacing; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.IBlockReader; +import net.minecraft.world.World; +import zone.moddev.mc.electricadvantage.init.Power; + +public abstract class ElectricMachineBlock extends BlockSimplePowerMachine { + public static final BooleanProperty ACTIVE = BooleanProperty.create("active"); + public static final BooleanProperty POWERED = BooleanProperty.create("powered"); + + public ElectricMachineBlock() { + this(Material.PISTON); + } + + public ElectricMachineBlock(Material material, ConduitType type) { + super(material, 0.75f, type); + initializeDefaultState(); + } + + protected ElectricMachineBlock(Block.Properties properties) { + super(properties, Power.ELECTRIC_POWER); + initializeDefaultState(); + } + + private void initializeDefaultState() { + setDefaultState(getStateContainer().getBaseState() + .with(ACTIVE, false) + .with(POWERED, false) + .with(FACING, EnumFacing.NORTH)); + } + + public ElectricMachineBlock(Material material) { + this(material, Power.ELECTRIC_POWER); + } + + @Override + protected void fillStateContainer(StateContainer.Builder builder) { + builder.add(ACTIVE, FACING, POWERED); + } + + /** Decodes the 1.10/1.12 metadata used by world migration fixtures. */ + public IBlockState getStateFromLegacyMeta(int meta) { + return getDefaultState() + .with(FACING, metaToFacing(meta)) + .with(ACTIVE, (meta & 0x4) != 0) + .with(POWERED, (meta & 0x8) != 0); + } + + /** Encodes the legacy metadata layout for migration tests. */ + public int getLegacyMetaFromState(IBlockState state) { + int meta = facingToMeta(state.get(FACING)); + if (state.get(ACTIVE)) meta |= 0x4; + if (state.get(POWERED)) meta |= 0x8; + return meta; + } + + private static int facingToMeta(EnumFacing facing) { + switch (facing) { + case WEST: return 1; + case SOUTH: return 2; + case EAST: return 3; + default: return 0; + } + } + + private static EnumFacing metaToFacing(int meta) { + switch (meta & 0x3) { + case 1: return EnumFacing.WEST; + case 2: return EnumFacing.SOUTH; + case 3: return EnumFacing.EAST; + default: return EnumFacing.NORTH; + } + } + + @Override + public abstract ElectricMachineTileEntity createNewTileEntity(IBlockReader world); + + @Override + public int getComparatorInputOverride(IBlockState state, World world, BlockPos pos) { + TileEntity tile = world.getTileEntity(pos); + return tile instanceof ElectricMachineTileEntity + ? ((ElectricMachineTileEntity) tile).getComparatorOutput() : 0; + } + + @Override + public boolean hasComparatorInputOverride(IBlockState state) { + return true; + } + + @Override + public void onReplaced(IBlockState state, World world, BlockPos pos, IBlockState newState, boolean isMoving) { + if (state.getBlock() != newState.getBlock()) { + TileEntity tile = world.getTileEntity(pos); + if (tile instanceof IInventory) { + InventoryHelper.dropInventoryItems(world, pos, (IInventory) tile); + ((IInventory) tile).clear(); + world.updateComparatorOutputLevel(pos, this); + } + } + super.onReplaced(state, world, pos, newState, isMoving); + } + + @Override + public boolean isPowerSink(ConduitType type) { + return true; + } + + @Override + public boolean isPowerSource(ConduitType type) { + return false; + } + + public ConduitType getType() { + return Power.ELECTRIC_POWER; + } +} diff --git a/src/main/java/com/mcmoddev/electricadvantage/machines/ElectricMachineTileEntity.java b/src/main/java/zone/moddev/mc/electricadvantage/machines/ElectricMachineTileEntity.java similarity index 80% rename from src/main/java/com/mcmoddev/electricadvantage/machines/ElectricMachineTileEntity.java rename to src/main/java/zone/moddev/mc/electricadvantage/machines/ElectricMachineTileEntity.java index d9c0fbb..478d5c4 100644 --- a/src/main/java/com/mcmoddev/electricadvantage/machines/ElectricMachineTileEntity.java +++ b/src/main/java/zone/moddev/mc/electricadvantage/machines/ElectricMachineTileEntity.java @@ -1,20 +1,25 @@ -package com.mcmoddev.electricadvantage.machines; +package zone.moddev.mc.electricadvantage.machines; -import com.mcmoddev.electricadvantage.init.Power; +import zone.moddev.mc.electricadvantage.init.Power; import cyano.poweradvantage.api.ConduitType; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.inventory.InventoryBasic; import net.minecraft.item.ItemStack; +import net.minecraft.item.crafting.IRecipe; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.network.play.server.SPacketCustomSound; import net.minecraft.tileentity.TileEntity; +import net.minecraft.tileentity.TileEntityType; import net.minecraft.util.EnumFacing; import net.minecraft.util.SoundCategory; import net.minecraft.util.SoundEvent; import net.minecraft.util.math.AxisAlignedBB; import net.minecraft.util.math.BlockPos; +import net.minecraft.util.text.TextComponentString; import net.minecraft.world.World; -import net.minecraftforge.fml.common.FMLLog; +import net.minecraftforge.common.crafting.VanillaRecipeTypes; +import zone.moddev.mc.electricadvantage.ElectricAdvantage; import java.util.Arrays; import java.util.List; @@ -29,12 +34,12 @@ public abstract class ElectricMachineTileEntity extends cyano.poweradvantage.api - public ElectricMachineTileEntity(String name,float bufferSize,int numInputSlots, int numOutputSlots, int numOtherSlots) { - this(name,Power.ELECTRIC_POWER,bufferSize,numInputSlots,numOutputSlots,numOtherSlots); + public ElectricMachineTileEntity(TileEntityType tileType, String name,float bufferSize,int numInputSlots, int numOutputSlots, int numOtherSlots) { + this(tileType,name,Power.ELECTRIC_POWER,bufferSize,numInputSlots,numOutputSlots,numOtherSlots); } - public ElectricMachineTileEntity(String name, ConduitType powerType, float bufferSize,int numInputSlots, int numOutputSlots, int numOtherSlots) { - super(powerType, bufferSize, name); + public ElectricMachineTileEntity(TileEntityType tileType, String name, ConduitType powerType, float bufferSize,int numInputSlots, int numOutputSlots, int numOtherSlots) { + super(tileType, powerType, bufferSize, name); inventory = new ItemStack[numInputSlots+numOutputSlots+numOtherSlots]; inputSlots = new int[numInputSlots]; outputSlots = new int[numOutputSlots]; @@ -47,11 +52,11 @@ public ElectricMachineTileEntity(String name, ConduitType powerType, float buffe if(i < otherSlots.length)otherSlots[i] = inputSlots.length + outputSlots.length + i; } } - public ElectricMachineTileEntity(String name,int numInputSlots, int numOutputSlots, int numOtherSlots) { - this(name,500f,numInputSlots,numOutputSlots,numOtherSlots); + public ElectricMachineTileEntity(TileEntityType tileType, String name,int numInputSlots, int numOutputSlots, int numOtherSlots) { + this(tileType,name,500f,numInputSlots,numOutputSlots,numOtherSlots); } - public ElectricMachineTileEntity(String name,int numInputSlots, int numOutputSlots, int numOtherSlots, ConduitType[] energyTypes, float[] energyBuffers) { - super(energyTypes, energyBuffers, name); + public ElectricMachineTileEntity(TileEntityType tileType, String name,int numInputSlots, int numOutputSlots, int numOtherSlots, ConduitType[] energyTypes, float[] energyBuffers) { + super(tileType, energyTypes, energyBuffers, name); inventory = new ItemStack[numInputSlots+numOutputSlots+numOtherSlots]; inputSlots = new int[numInputSlots]; outputSlots = new int[numOutputSlots]; @@ -101,11 +106,11 @@ protected boolean hasRedstoneSignal(){ protected void setActiveState(boolean active){ IBlockState oldState = getWorld().getBlockState(getPos()); if(oldState.getBlock() instanceof ElectricMachineBlock - && (Boolean)oldState.getValue(ElectricMachineBlock.ACTIVE) != active ){ + && (Boolean)oldState.get(ElectricMachineBlock.ACTIVE) != active ){ final TileEntity save = this; final World w = getWorld(); final BlockPos pos = this.getPos(); - IBlockState newState = oldState.withProperty(ElectricMachineBlock.ACTIVE, active); + IBlockState newState = oldState.with(ElectricMachineBlock.ACTIVE, active); w.setBlockState(pos, newState,3); if(save != null){ w.removeTileEntity(pos); @@ -117,11 +122,11 @@ protected void setActiveState(boolean active){ protected void setPowerState(boolean powered){ IBlockState oldState = getWorld().getBlockState(getPos()); if(oldState.getBlock() instanceof ElectricMachineBlock - && (Boolean)oldState.getValue(ElectricMachineBlock.POWERED) != powered ){ + && (Boolean)oldState.get(ElectricMachineBlock.POWERED) != powered ){ final TileEntity save = this; final World w = getWorld(); final BlockPos pos = this.getPos(); - IBlockState newState = oldState.withProperty(ElectricMachineBlock.POWERED, powered); + IBlockState newState = oldState.with(ElectricMachineBlock.POWERED, powered); w.setBlockState(pos, newState, 3); if(save != null){ w.removeTileEntity(pos); @@ -140,7 +145,7 @@ public boolean shouldRefresh(World world, BlockPos pos, IBlockState oldState, IB } public boolean isActive(){ - return isPowered() && (!this.hasRedstoneSignal() && (this.getEnergy(Power.ELECTRIC_POWER) > 0 || (Boolean)getWorld().getBlockState(getPos()).getValue(ElectricMachineBlock.ACTIVE))); + return isPowered() && (!this.hasRedstoneSignal() && (this.getEnergy(Power.ELECTRIC_POWER) > 0 || (Boolean)getWorld().getBlockState(getPos()).get(ElectricMachineBlock.ACTIVE))); } public abstract boolean isPowered(); @@ -149,7 +154,7 @@ public ItemStack getInputSlot(int i){ if(i < inputSlots.length){ return inventory[inputSlots[i]]; } else { - FMLLog.warning("Bug in class %s. StackTrace: %s",this.getClass().getName(),Arrays.toString(Thread.currentThread().getStackTrace()).replace(',','\n')); + logInvalidSlot(); return null; } } @@ -158,7 +163,7 @@ public ItemStack getOutputSlot(int i){ if(i < outputSlots.length){ return inventory[outputSlots[i]]; } else { - FMLLog.warning("Bug in class %s. StackTrace: %s",this.getClass().getName(),Arrays.toString(Thread.currentThread().getStackTrace()).replace(',','\n')); + logInvalidSlot(); return null; } } @@ -167,7 +172,7 @@ public ItemStack getOtherSlot(int i){ if(i < otherSlots.length){ return inventory[otherSlots[i]]; } else { - FMLLog.warning("Bug in class %s. StackTrace: %s",this.getClass().getName(),Arrays.toString(Thread.currentThread().getStackTrace()).replace(',','\n')); + logInvalidSlot(); return null; } } @@ -175,7 +180,7 @@ public void setInputSlot(int i, ItemStack item){ if(i < inputSlots.length){ inventory[inputSlots[i]] = item; } else { - FMLLog.warning("Bug in class %s. StackTrace: %s",this.getClass().getName(),Arrays.toString(Thread.currentThread().getStackTrace()).replace(',','\n')); + logInvalidSlot(); } } @@ -183,7 +188,7 @@ public void setOutputSlot(int i, ItemStack item){ if(i < outputSlots.length){ inventory[ outputSlots[i]] = item; } else { - FMLLog.warning("Bug in class %s. StackTrace: %s",this.getClass().getName(),Arrays.toString(Thread.currentThread().getStackTrace()).replace(',','\n')); + logInvalidSlot(); } } @@ -191,7 +196,7 @@ public void setOtherSlot(int i, ItemStack item){ if(i < otherSlots.length){ inventory[otherSlots[i]] = item; } else { - FMLLog.warning("Bug in class %s. StackTrace: %s",this.getClass().getName(),Arrays.toString(Thread.currentThread().getStackTrace()).replace(',','\n')); + logInvalidSlot(); } } @@ -200,6 +205,11 @@ public void setOtherSlot(int i, ItemStack item){ public int numberOfOutputSlots(){return outputSlots.length;} public int numberOfOtherSlots(){return otherSlots.length;} + private void logInvalidSlot() { + ElectricAdvantage.LOGGER.warn("Invalid slot access in {}. Stack trace: {}", + getClass().getName(), Arrays.toString(Thread.currentThread().getStackTrace()).replace(',', '\n')); + } + @Override protected ItemStack[] getInventory() { @@ -227,22 +237,30 @@ protected static boolean areItemStacksEqualNullable(ItemStack left, ItemStack ri } public abstract float[] getProgress(); + + protected ItemStack getSmeltingResult(ItemStack input) { + if (isEmptyStack(input) || getWorld() == null) return ItemStack.EMPTY; + InventoryBasic inventory = new InventoryBasic(new TextComponentString("electricadvantage.smelting"), 1); + inventory.setInventorySlotContents(0, input); + IRecipe recipe = getWorld().getRecipeManager().getRecipe(inventory, getWorld(), VanillaRecipeTypes.SMELTING); + return recipe == null ? ItemStack.EMPTY : recipe.getCraftingResult(inventory); + } @Override - public NBTTagCompound writeToNBT(NBTTagCompound tagRoot){ - super.writeToNBT(tagRoot); + public NBTTagCompound write(NBTTagCompound tagRoot){ + super.write(tagRoot); saveTo(tagRoot); return tagRoot; } @Override public NBTTagCompound getUpdateTag() { - return writeToNBT(new NBTTagCompound()); + return write(new NBTTagCompound()); } @Override - public void readFromNBT(NBTTagCompound tagRoot){ - super.readFromNBT(tagRoot); + public void read(NBTTagCompound tagRoot){ + super.read(tagRoot); loadFrom(tagRoot); } @@ -352,8 +370,8 @@ protected void playSoundEffect(double x, double y, double z, SoundEvent sound, f x - range, y - range, z - range, x + range, y + range, z + range)); for(EntityPlayerMP player : players){ - player.connection.sendPacket(new SPacketCustomSound(sound.getRegistryName().toString(), SoundCategory.BLOCKS, - x, y, z, (float)volume, (float)pitch)); + player.connection.sendPacket(new SPacketCustomSound(sound.getRegistryName(), SoundCategory.BLOCKS, + new net.minecraft.util.math.Vec3d(x, y, z), volume, pitch)); } } @@ -419,7 +437,7 @@ public float subtractEnergy(float amount){ public void setEnergy(float amount){ setEnergy(amount,Power.ELECTRIC_POWER); } - public ConduitType getType() {return Power.ELECTRIC_POWER;} + public ConduitType getEnergyType() {return Power.ELECTRIC_POWER;} @Override public int getInventoryStackLimit(){return 64;} diff --git a/src/main/java/com/mcmoddev/electricadvantage/machines/ElectricOvenBlock.java b/src/main/java/zone/moddev/mc/electricadvantage/machines/ElectricOvenBlock.java similarity index 57% rename from src/main/java/com/mcmoddev/electricadvantage/machines/ElectricOvenBlock.java rename to src/main/java/zone/moddev/mc/electricadvantage/machines/ElectricOvenBlock.java index ac740b5..f53ad23 100644 --- a/src/main/java/com/mcmoddev/electricadvantage/machines/ElectricOvenBlock.java +++ b/src/main/java/zone/moddev/mc/electricadvantage/machines/ElectricOvenBlock.java @@ -1,4 +1,4 @@ -package com.mcmoddev.electricadvantage.machines; +package zone.moddev.mc.electricadvantage.machines; import net.minecraft.world.World; @@ -9,7 +9,7 @@ public ElectricOvenBlock(){ } @Override - public ElectricMachineTileEntity createNewTileEntity(World w, int m) { + public ElectricMachineTileEntity createNewTileEntity(net.minecraft.world.IBlockReader world) { return new ElectricOvenTileEntity(); } diff --git a/src/main/java/com/mcmoddev/electricadvantage/machines/ElectricOvenTileEntity.java b/src/main/java/zone/moddev/mc/electricadvantage/machines/ElectricOvenTileEntity.java similarity index 82% rename from src/main/java/com/mcmoddev/electricadvantage/machines/ElectricOvenTileEntity.java rename to src/main/java/zone/moddev/mc/electricadvantage/machines/ElectricOvenTileEntity.java index 17bacbe..aefa1e8 100644 --- a/src/main/java/com/mcmoddev/electricadvantage/machines/ElectricOvenTileEntity.java +++ b/src/main/java/zone/moddev/mc/electricadvantage/machines/ElectricOvenTileEntity.java @@ -1,10 +1,9 @@ -package com.mcmoddev.electricadvantage.machines; +package zone.moddev.mc.electricadvantage.machines; -import com.mcmoddev.electricadvantage.init.Power; +import zone.moddev.mc.electricadvantage.init.Power; import net.minecraft.init.SoundEvents; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; -import net.minecraft.item.crafting.FurnaceRecipes; import net.minecraft.nbt.NBTTagCompound; public class ElectricOvenTileEntity extends ElectricMachineTileEntity{ @@ -15,7 +14,7 @@ public class ElectricOvenTileEntity extends ElectricMachineTileEntity{ private short progress = 0; public ElectricOvenTileEntity() { - super("tile.electricadvantage.electric_oven.name", 1, 1, 0); + super(zone.moddev.mc.electricadvantage.init.Entities.ELECTRIC_OVEN, "tile.electricadvantage.electric_oven.name", 1, 1, 0); } @Override @@ -25,7 +24,7 @@ public void tickUpdate(boolean isServerWorld) { if(getInputSlot(0) == null || hasRedstoneSignal()){ progress = 0; } else if(getEnergy() >= ENERGY_PER_TICK){ - ItemStack output = FurnaceRecipes.instance().getSmeltingResult(getInputSlot(0)); + ItemStack output = getSmeltingResult(getInputSlot(0)); if(isFoodItem(output) && hasSpaceForItemInOutputSlots(output)){ subtractEnergy(ENERGY_PER_TICK,Power.ELECTRIC_POWER); progress++; @@ -56,9 +55,9 @@ public static boolean isFoodItem(ItemStack item){ return (i instanceof net.minecraft.item.ItemFood); } - public static boolean becomesFoodItem(ItemStack item){ + public boolean becomesFoodItem(ItemStack item){ if(item == null) return false; - return isFoodItem(FurnaceRecipes.instance().getSmeltingResult(item)); + return isFoodItem(getSmeltingResult(item)); } @@ -82,7 +81,7 @@ protected void saveTo(NBTTagCompound tagRoot) { @Override protected void loadFrom(NBTTagCompound tagRoot) { - if(tagRoot.hasKey("cookTime")){ + if(tagRoot.contains("cookTime", 99)){ progress = tagRoot.getShort("cookTime"); } } @@ -100,7 +99,7 @@ public int[] getDataFieldArray() { @Override public void onDataFieldUpdate() { - setEnergy(Float.intBitsToFloat(dataArray[0]),getType()); + setEnergy(Float.intBitsToFloat(dataArray[0]),getEnergyType()); progress = (short)dataArray[1]; } diff --git a/src/main/java/com/mcmoddev/electricadvantage/machines/ElectricPumpBlock.java b/src/main/java/zone/moddev/mc/electricadvantage/machines/ElectricPumpBlock.java similarity index 58% rename from src/main/java/com/mcmoddev/electricadvantage/machines/ElectricPumpBlock.java rename to src/main/java/zone/moddev/mc/electricadvantage/machines/ElectricPumpBlock.java index 59bb8d3..ce9e806 100644 --- a/src/main/java/com/mcmoddev/electricadvantage/machines/ElectricPumpBlock.java +++ b/src/main/java/zone/moddev/mc/electricadvantage/machines/ElectricPumpBlock.java @@ -1,11 +1,11 @@ -package com.mcmoddev.electricadvantage.machines; +package zone.moddev.mc.electricadvantage.machines; -import com.mcmoddev.electricadvantage.init.Blocks; -import com.mcmoddev.electricadvantage.init.Power; +import zone.moddev.mc.electricadvantage.init.Blocks; +import zone.moddev.mc.electricadvantage.init.Power; import cyano.poweradvantage.api.ConduitType; import cyano.poweradvantage.api.PowerConnectorContext; -import com.mcmoddev.poweradvantage.conduitnetwork.ConduitRegistry; -import com.mcmoddev.poweradvantage.init.Fluids; +import zone.moddev.mc.poweradvantage.conduitnetwork.ConduitRegistry; +import zone.moddev.mc.poweradvantage.init.Fluids; import net.minecraft.block.state.IBlockState; import net.minecraft.util.math.BlockPos; import net.minecraft.world.Explosion; @@ -14,7 +14,7 @@ public class ElectricPumpBlock extends ElectricMachineBlock{ @Override - public ElectricMachineTileEntity createNewTileEntity(World w, int m) { + public ElectricMachineTileEntity createNewTileEntity(net.minecraft.world.IBlockReader world) { return new ElectricPumpTileEntity(); } @@ -24,28 +24,17 @@ public ElectricMachineTileEntity createNewTileEntity(World w, int m) { * This method is called whenever the block is placed into the world */ @Override - public void onBlockAdded(World w, BlockPos coord, IBlockState state){ - super.onBlockAdded(w, coord, state); - ConduitRegistry.getInstance().conduitBlockPlacedEvent(w, w.provider.getDimension(), coord, com.mcmoddev.poweradvantage.init.Fluids.fluidConduit_general); - } - - /** - * This method is called when the block is removed from the world by an entity. - */ - @Override - public void onPlayerDestroy(World w, BlockPos coord, IBlockState state){ - super.onPlayerDestroy(w, coord, state); - ConduitRegistry.getInstance().conduitBlockRemovedEvent(w, w.provider.getDimension(), coord, com.mcmoddev.poweradvantage.init.Fluids.fluidConduit_general); - destroyPipe(w,coord); + public void onReplaced(IBlockState state, World w, BlockPos coord, IBlockState newState, boolean isMoving) { + if (state.getBlock() != newState.getBlock()) destroyPipe(w, coord); + super.onReplaced(state, w, coord, newState, isMoving); } /** * This method is called when the block is destroyed by an explosion. */ @Override - public void onBlockExploded(World w, BlockPos coord, Explosion boom){ - super.onBlockExploded(w, coord, boom); - ConduitRegistry.getInstance().conduitBlockRemovedEvent(w, w.provider.getDimension(), coord, Fluids.fluidConduit_general); + public void onExplosionDestroy(World w, BlockPos coord, Explosion boom){ destroyPipe(w,coord); + super.onExplosionDestroy(w, coord, boom); } @@ -54,7 +43,7 @@ private void destroyPipe(World w, BlockPos coord) { // destroy connected drill bits BlockPos c = coord.down(); while(c.getY() > 0 && w.getBlockState(c).getBlock() == Blocks.pump_pipe_electric){ - w.setBlockToAir(c); + w.setBlockState(c, net.minecraft.init.Blocks.AIR.getDefaultState()); c = c.down(); } } diff --git a/src/main/java/com/mcmoddev/electricadvantage/machines/ElectricPumpTileEntity.java b/src/main/java/zone/moddev/mc/electricadvantage/machines/ElectricPumpTileEntity.java similarity index 84% rename from src/main/java/com/mcmoddev/electricadvantage/machines/ElectricPumpTileEntity.java rename to src/main/java/zone/moddev/mc/electricadvantage/machines/ElectricPumpTileEntity.java index 1e75475..fb5f954 100644 --- a/src/main/java/com/mcmoddev/electricadvantage/machines/ElectricPumpTileEntity.java +++ b/src/main/java/zone/moddev/mc/electricadvantage/machines/ElectricPumpTileEntity.java @@ -1,16 +1,13 @@ -package com.mcmoddev.electricadvantage.machines; +package zone.moddev.mc.electricadvantage.machines; -import com.mcmoddev.electricadvantage.util.LegacyFluidHandler; -import com.mcmoddev.electricadvantage.init.Power; +import zone.moddev.mc.electricadvantage.util.LegacyFluidHandler; +import zone.moddev.mc.electricadvantage.init.Power; import cyano.poweradvantage.api.ConduitType; import cyano.poweradvantage.api.PowerConnectorContext; import cyano.poweradvantage.api.PowerRequest; -import com.mcmoddev.poweradvantage.conduitnetwork.ConduitRegistry; -import com.mcmoddev.poweradvantage.init.Fluids; -import com.mcmoddev.poweradvantage.util.FluidIdHelper; -import net.minecraft.block.Block; -import net.minecraft.block.BlockDynamicLiquid; -import net.minecraft.block.BlockLiquid; +import zone.moddev.mc.poweradvantage.conduitnetwork.ConduitRegistry; +import zone.moddev.mc.poweradvantage.init.Fluids; +import zone.moddev.mc.poweradvantage.util.FluidIdHelper; import net.minecraft.block.state.IBlockState; import net.minecraft.init.SoundEvents; import net.minecraft.item.ItemStack; @@ -18,7 +15,10 @@ import net.minecraft.util.EnumFacing; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; -import net.minecraftforge.fluids.*; +import net.minecraft.fluid.Fluid; +import cyano.poweradvantage.api.fluid.FluidStack; +import cyano.poweradvantage.api.fluid.FluidTank; +import cyano.poweradvantage.api.fluid.FluidTankInfo; import java.util.HashSet; import java.util.Set; @@ -39,14 +39,14 @@ public class ElectricPumpTileEntity extends ElectricMachineTileEntity implements private final int[] dataSyncArray = new int[4]; private byte timeUntilNextPump = PUMP_INTERVAL; - - + + public ElectricPumpTileEntity() { - super("tile.electricadvantage.electric_pump.name", 0, 0, 0, new ConduitType[]{Power.ELECTRIC_POWER, Fluids.fluidConduit_general},new float[]{ENERGY_COST_PUMP + 256 * ENERGY_COST_VERTICAL,1000f}); - tank = new FluidTank(Fluid.BUCKET_VOLUME); + super(zone.moddev.mc.electricadvantage.init.Entities.ELECTRIC_PUMP, "tile.electricadvantage.electric_pump.name", 0, 0, 0, new ConduitType[]{Power.ELECTRIC_POWER, Fluids.fluidConduit_general},new float[]{ENERGY_COST_PUMP + 256 * ENERGY_COST_VERTICAL,1000f}); + tank = new FluidTank(FluidTank.BUCKET_VOLUME); } - + private int timeToSound = 0; @@ -61,12 +61,12 @@ public void tickUpdate(boolean isServerWorld) { World w = getWorld(); boolean success = false; BlockPos target = this.getPos().down(); - while(target.getY() > 0 && w.getBlockState(target).getBlock() == com.mcmoddev.electricadvantage.init.Blocks.pump_pipe_electric){ + while(target.getY() > 0 && w.getBlockState(target).getBlock() == zone.moddev.mc.electricadvantage.init.Blocks.pump_pipe_electric){ target = target.down(); } if(target.getY() > 0 && w.isAirBlock(target) && getEnergy() >= ENERGY_COST_PIPE){ // place pipe - w.setBlockState(target, com.mcmoddev.electricadvantage.init.Blocks.pump_pipe_electric.getDefaultState()); + w.setBlockState(target, zone.moddev.mc.electricadvantage.init.Blocks.pump_pipe_electric.getDefaultState()); this.subtractEnergy(ENERGY_COST_PIPE, Power.ELECTRIC_POWER); timeUntilNextPump = PIPE_INTERVAL; playSoundEffect(target.getX()+0.5, target.getY()+0.5, target.getZ()+0.5, SoundEvents.BLOCK_STONE_STEP, 0.3f, 1f); @@ -85,9 +85,9 @@ public void tickUpdate(boolean isServerWorld) { IBlockState blockstate = w.getBlockState(fluidSource); Fluid f = getFluid(blockstate); if(f != null && getEnergy() >= cost){ - this.getTank().fill(new FluidStack(f, Fluid.BUCKET_VOLUME), true); + this.getTank().fill(new FluidStack(f, FluidTank.BUCKET_VOLUME), true); this.subtractEnergy(cost, Power.ELECTRIC_POWER); - w.setBlockToAir(fluidSource); + w.setBlockState(fluidSource, net.minecraft.init.Blocks.AIR.getDefaultState(), 3); success = true; } } @@ -106,8 +106,8 @@ public void tickUpdate(boolean isServerWorld) { if(timeToSound > 0) timeToSound--; } } - - + + @Override public boolean isPowered() { return getEnergy() > ENERGY_COST_PUMP; @@ -128,10 +128,10 @@ public float[] getProgress() { protected boolean isValidInputItem(ItemStack item) { return false; } - + private Fluid getFluid(IBlockState blockstate) { - return FluidRegistry.lookupFluidForBlock(blockstate.getBlock()); + return blockstate.getFluidState().isEmpty() ? null : blockstate.getFluidState().getFluid(); } @@ -145,7 +145,7 @@ private BlockPos scan(Set searchSpace, BlockPos coord, int limit) { searchSpace.add(coord); BlockPos next; boolean nomore = true; - for(EnumFacing dir : EnumFacing.VALUES){ + for(EnumFacing dir : EnumFacing.values()){ next = coord.offset(dir); if(!searchSpace.contains(next) && isFluidBlock(next)){ coord = next; @@ -160,16 +160,9 @@ private BlockPos scan(Set searchSpace, BlockPos coord, int limit) { } while(searchSpace.size() < limit); return null; } - + private boolean isSourceBlock( BlockPos coord){ - IBlockState bs = getWorld().getBlockState(coord); - if(bs.getBlock() instanceof BlockLiquid){ - return (Integer)bs.getValue(BlockDynamicLiquid.LEVEL) == 0; - } else if(bs.getBlock() instanceof BlockFluidClassic){ - return ((BlockFluidClassic)bs.getBlock()).isSourceBlock(getWorld(), coord); - }else{ - return false; - } + return getWorld().getFluidState(coord).isSource(); } @@ -177,11 +170,10 @@ private boolean isSourceBlock( BlockPos coord){ private boolean isFluidBlock(BlockPos coord) { World w = getWorld(); if(w.isBlockLoaded(coord) == false) return false; - Block b = w.getBlockState(coord).getBlock(); - return (b instanceof BlockLiquid || b instanceof IFluidBlock); + return !w.getFluidState(coord).isEmpty(); } - + private boolean redstone = true; private float oldEnergy = 0; private int oldFluid = 0; @@ -191,14 +183,14 @@ public void powerUpdate(){ if(this.getTank().getFluidAmount() > 0){ ConduitType type = Fluids.fluidToConduitType(getTank().getFluid().getFluid()); float availableAmount = getTank().getFluidAmount(); - float delta = ConduitRegistry.transmitPowerToConsumers(availableAmount, com.mcmoddev.poweradvantage.init.Fluids.fluidConduit_general, type, + float delta = ConduitRegistry.transmitPowerToConsumers(availableAmount, zone.moddev.mc.poweradvantage.init.Fluids.fluidConduit_general, type, PowerRequest.LAST_PRIORITY, getWorld(), getPos(), this); if(delta > 0){ getTank().drain(Math.max((int)delta,1),true); // no free energy! } } - // powerUpdate occurs once every 8 world ticks and is scheduled such that neighboring - // machines don't powerUpdate in the same world tick. To reduce network congestion, + // powerUpdate occurs once every 8 world ticks and is scheduled such that neighboring + // machines don't powerUpdate in the same world tick. To reduce network congestion, // I'm doing the synchonization logic here instead of in the tickUpdate method boolean updateFlag = false; @@ -222,8 +214,8 @@ public void powerUpdate(){ protected boolean hasRedstoneSignal() { return getWorld().isBlockPowered(getPos()); } - - + + public FluidTank getTank(){ return tank; @@ -245,7 +237,7 @@ public int[] getDataFieldArray() { public void prepareDataFieldsForSync() { dataSyncArray[0] = Float.floatToRawIntBits(this.getEnergy()); dataSyncArray[1] = this.getTank().getFluidAmount(); - dataSyncArray[2] = (this.getTank().getFluidAmount() > 0 ? FluidIdHelper.getFluidId(this.getTank().getFluid().getFluid()) : FluidIdHelper.getFluidId(FluidRegistry.WATER)); + dataSyncArray[2] = (this.getTank().getFluidAmount() > 0 ? FluidIdHelper.getFluidId(this.getTank().getFluid().getFluid()) : FluidIdHelper.getFluidId(net.minecraft.init.Fluids.WATER)); dataSyncArray[3] = this.timeUntilNextPump; } @@ -257,7 +249,7 @@ public void onDataFieldUpdate() { this.timeUntilNextPump = (byte)dataSyncArray[3]; } - + /** * Handles data saving and loading @@ -276,16 +268,16 @@ public void saveTo(final NBTTagCompound tagRoot) { */ @Override public void loadFrom(final NBTTagCompound tagRoot) { - if (tagRoot.hasKey("Tank")) { - NBTTagCompound tankTag = tagRoot.getCompoundTag("Tank"); + if (tagRoot.contains("Tank", 10)) { + NBTTagCompound tankTag = tagRoot.getCompound("Tank"); getTank().readFromNBT(tankTag); - if(tankTag.hasKey("Empty")){ + if(tankTag.contains("Empty", 1)){ // empty the tank if NBT says its empty (not default behavior of Tank.readFromNBT(...) ) getTank().setFluid(null); } } - if (tagRoot.hasKey("NextPump")) { + if (tagRoot.contains("NextPump", 99)) { this.timeUntilNextPump = tagRoot.getByte("NextPump"); } } @@ -297,7 +289,7 @@ public int getComparatorOutput() { ///// Overrides to make this a multi-type block ///// /** - * Determines whether this block/entity should receive energy + * Determines whether this block/entity should receive energy * @return true if this block/entity should receive energy */ @Override @@ -305,7 +297,7 @@ public boolean isPowerSink(ConduitType p){ return ConduitType.areSameType(Power.ELECTRIC_POWER,p); } /** - * Determines whether this block/entity can provide energy + * Determines whether this block/entity can provide energy * @return true if this block/entity can provide energy */ @Override @@ -314,7 +306,7 @@ public boolean isPowerSource(ConduitType p){ } /** - * Adds "energy" as a fluid to the FluidTank returned by getTank(). This implementation ignores + * Adds "energy" as a fluid to the FluidTank returned by getTank(). This implementation ignores * all non-fluid energy types. * @param amount amount of energy/fluid to add * @param type the type of energy/fluid being added. @@ -332,9 +324,9 @@ public float addEnergy(float amount, ConduitType type){ } return super.addEnergy(amount, type); } - + /** - * Subtracts "energy" as a fluid to the FluidTank returned by getTank(). This implementation + * Subtracts "energy" as a fluid to the FluidTank returned by getTank(). This implementation * ignores all non-fluid energy types. * @param amount amount of energy/fluid to add * @param type the type of energy/fluid being added. @@ -356,9 +348,9 @@ public PowerRequest getPowerRequest(ConduitType offer) { @Override public boolean canAcceptConnection(PowerConnectorContext c){ - return ConduitType.areSameType(getType(), c.powerType) || Fluids.isFluidType( c.powerType); + return ConduitType.areSameType(getEnergyType(), c.powerType) || Fluids.isFluidType( c.powerType); } - + /** * Implementation of IFluidHandler * @param face Face of the block being polled diff --git a/src/main/java/com/mcmoddev/electricadvantage/machines/ElectricStillBlock.java b/src/main/java/zone/moddev/mc/electricadvantage/machines/ElectricStillBlock.java similarity index 82% rename from src/main/java/com/mcmoddev/electricadvantage/machines/ElectricStillBlock.java rename to src/main/java/zone/moddev/mc/electricadvantage/machines/ElectricStillBlock.java index 0a75c73..4bed71a 100644 --- a/src/main/java/com/mcmoddev/electricadvantage/machines/ElectricStillBlock.java +++ b/src/main/java/zone/moddev/mc/electricadvantage/machines/ElectricStillBlock.java @@ -1,15 +1,15 @@ -package com.mcmoddev.electricadvantage.machines; +package zone.moddev.mc.electricadvantage.machines; -import com.mcmoddev.electricadvantage.init.Power; +import zone.moddev.mc.electricadvantage.init.Power; import cyano.poweradvantage.api.ConduitType; import cyano.poweradvantage.api.PowerConnectorContext; -import com.mcmoddev.poweradvantage.init.Fluids; +import zone.moddev.mc.poweradvantage.init.Fluids; import net.minecraft.world.World; public class ElectricStillBlock extends ElectricMachineBlock{ @Override - public ElectricMachineTileEntity createNewTileEntity(World w, int m) { + public ElectricMachineTileEntity createNewTileEntity(net.minecraft.world.IBlockReader world) { return new ElectricStillTileEntity(); } diff --git a/src/main/java/com/mcmoddev/electricadvantage/machines/ElectricStillTileEntity.java b/src/main/java/zone/moddev/mc/electricadvantage/machines/ElectricStillTileEntity.java similarity index 86% rename from src/main/java/com/mcmoddev/electricadvantage/machines/ElectricStillTileEntity.java rename to src/main/java/zone/moddev/mc/electricadvantage/machines/ElectricStillTileEntity.java index 8caf3ec..19914ad 100644 --- a/src/main/java/com/mcmoddev/electricadvantage/machines/ElectricStillTileEntity.java +++ b/src/main/java/zone/moddev/mc/electricadvantage/machines/ElectricStillTileEntity.java @@ -1,20 +1,23 @@ -package com.mcmoddev.electricadvantage.machines; +package zone.moddev.mc.electricadvantage.machines; -import com.mcmoddev.electricadvantage.util.LegacyFluidHandler; -import com.mcmoddev.electricadvantage.init.Power; +import zone.moddev.mc.electricadvantage.util.LegacyFluidHandler; +import zone.moddev.mc.electricadvantage.init.Power; import cyano.poweradvantage.api.ConduitType; import cyano.poweradvantage.api.PowerRequest; import cyano.poweradvantage.api.fluid.FluidRequest; -import com.mcmoddev.poweradvantage.conduitnetwork.ConduitRegistry; -import com.mcmoddev.poweradvantage.init.Fluids; -import com.mcmoddev.poweradvantage.registry.still.recipe.DistillationRecipe; -import com.mcmoddev.poweradvantage.registry.still.recipe.DistillationRecipeRegistry; -import com.mcmoddev.poweradvantage.util.FluidIdHelper; +import zone.moddev.mc.poweradvantage.conduitnetwork.ConduitRegistry; +import zone.moddev.mc.poweradvantage.init.Fluids; +import zone.moddev.mc.poweradvantage.registry.still.recipe.DistillationRecipe; +import zone.moddev.mc.poweradvantage.registry.still.recipe.DistillationRecipeRegistry; +import zone.moddev.mc.poweradvantage.util.FluidIdHelper; import net.minecraft.init.SoundEvents; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.EnumFacing; -import net.minecraftforge.fluids.*; +import net.minecraft.fluid.Fluid; +import cyano.poweradvantage.api.fluid.FluidStack; +import cyano.poweradvantage.api.fluid.FluidTank; +import cyano.poweradvantage.api.fluid.FluidTankInfo; import java.util.Arrays; @@ -28,13 +31,13 @@ public class ElectricStillTileEntity extends ElectricMachineTileEntity implement private final float electricityPerDistill = 16f; private final int[] dataSyncArray = new int[5]; - + public ElectricStillTileEntity() { - super("tile.electricadvantage.electric_still.name", 0, 0, 0, new ConduitType[]{Power.ELECTRIC_POWER, Fluids.fluidConduit_general},new float[]{500f,1000f}); - outputTank = new FluidTank(Fluid.BUCKET_VOLUME ); - inputTank = new FluidTank(Fluid.BUCKET_VOLUME); + super(zone.moddev.mc.electricadvantage.init.Entities.ELECTRIC_STILL, "tile.electricadvantage.electric_still.name", 0, 0, 0, new ConduitType[]{Power.ELECTRIC_POWER, Fluids.fluidConduit_general},new float[]{500f,1000f}); + outputTank = new FluidTank(FluidTank.BUCKET_VOLUME ); + inputTank = new FluidTank(FluidTank.BUCKET_VOLUME); } - + private boolean wasActive = false; private int timeSinceSound = 0; @@ -43,7 +46,7 @@ public void tickUpdate(boolean isServerWorld) { if(isServerWorld){ // server-side logic if(!this.hasRedstoneSignal()){ - if(getInputTank().getFluidAmount() > 0 + if(getInputTank().getFluidAmount() > 0 && getEnergy() >= electricityPerDistill && canDistill(getInputTank().getFluid())){ distill(); @@ -72,7 +75,7 @@ && canDistill(getInputTank().getFluid())){ } } - + private boolean canDistill(Fluid f) { if(f == null) return false; @@ -100,7 +103,7 @@ private void distill(){ getOutputTank().fill(output, true); } } - + @Override @@ -122,8 +125,8 @@ protected boolean isValidInputItem(ItemStack item) { return false; } - - + + public FluidTank getOutputTank(){ return outputTank; } @@ -133,11 +136,11 @@ public FluidTank getInputTank(){ /** * Determines whether this conduit is compatible with a type of energy through any side * @param type The type of energy in the conduit - * @return true if this conduit can flow the given energy type through one or more of its block + * @return true if this conduit can flow the given energy type through one or more of its block * faces, false otherwise */ public boolean canAcceptType(ConduitType type){ - return ConduitType.areSameType(getType(), type) || ConduitType.areSameType(Fluids.fluidConduit_general, type); + return ConduitType.areSameType(getEnergyType(), type) || ConduitType.areSameType(Fluids.fluidConduit_general, type); } @Override @@ -149,9 +152,9 @@ public int[] getDataFieldArray() { public void prepareDataFieldsForSync() { dataSyncArray[0] = Float.floatToRawIntBits(this.getEnergy()); dataSyncArray[1] = this.getOutputTank().getFluidAmount(); - dataSyncArray[2] = (this.getOutputTank().getFluidAmount() > 0 ? FluidIdHelper.getFluidId(this.getOutputTank().getFluid().getFluid()) : FluidIdHelper.getFluidId(FluidRegistry.WATER)); + dataSyncArray[2] = (this.getOutputTank().getFluidAmount() > 0 ? FluidIdHelper.getFluidId(this.getOutputTank().getFluid().getFluid()) : FluidIdHelper.getFluidId(net.minecraft.init.Fluids.WATER)); dataSyncArray[3] = getInputTank().getFluidAmount(); - dataSyncArray[4] = (getInputTank().getFluidAmount() > 0 ? FluidIdHelper.getFluidId(getInputTank().getFluid().getFluid()) : FluidIdHelper.getFluidId(FluidRegistry.WATER)); + dataSyncArray[4] = (getInputTank().getFluidAmount() > 0 ? FluidIdHelper.getFluidId(getInputTank().getFluid().getFluid()) : FluidIdHelper.getFluidId(net.minecraft.init.Fluids.WATER)); } @Override @@ -182,19 +185,19 @@ public void saveTo(final NBTTagCompound tagRoot) { */ @Override public void loadFrom(final NBTTagCompound tagRoot) { - if (tagRoot.hasKey("TankOut")) { - NBTTagCompound tankTag = tagRoot.getCompoundTag("TankOut"); + if (tagRoot.contains("TankOut", 10)) { + NBTTagCompound tankTag = tagRoot.getCompound("TankOut"); getOutputTank().readFromNBT(tankTag); - if(tankTag.hasKey("Empty")){ + if(tankTag.contains("Empty", 1)){ // empty the tank if NBT says its empty (not default behavior of Tank.readFromNBT(...) ) getOutputTank().setFluid(null); } } - if (tagRoot.hasKey("TankIn")) { - NBTTagCompound tankTag = tagRoot.getCompoundTag("TankIn"); + if (tagRoot.contains("TankIn", 10)) { + NBTTagCompound tankTag = tagRoot.getCompound("TankIn"); getInputTank().readFromNBT(tankTag); - if(tankTag.hasKey("Empty")){ + if(tankTag.contains("Empty", 1)){ // empty the tank if NBT says its empty (not default behavior of Tank.readFromNBT(...) ) getInputTank().setFluid(null); } @@ -216,18 +219,18 @@ public void powerUpdate(){ if(this.getOutputTank().getFluidAmount() > 0){ ConduitType type = Fluids.fluidToConduitType(getOutputTank().getFluid().getFluid()); float availableAmount = getOutputTank().getFluidAmount(); - float delta = ConduitRegistry.transmitPowerToConsumers(availableAmount, com.mcmoddev.poweradvantage.init.Fluids.fluidConduit_general, type, + float delta = ConduitRegistry.transmitPowerToConsumers(availableAmount, zone.moddev.mc.poweradvantage.init.Fluids.fluidConduit_general, type, PowerRequest.LAST_PRIORITY, getWorld(), getPos(), this); if(delta > 0){ getOutputTank().drain(Math.max((int)delta,1),true); // no free energy! } } - + redstone = getWorld().isBlockPowered(getPos()); this.setPowerState(this.isPowered()); - + // automatically detect when a sync is needed - if(syncArrayOld == null || syncArrayNew == null + if(syncArrayOld == null || syncArrayNew == null || this.getDataFieldArray().length != syncArrayOld.length){ int size = this.getDataFieldArray().length; syncArrayOld = new int[size]; @@ -260,9 +263,9 @@ public boolean isPowerSink(ConduitType p){ public boolean isPowerSource(ConduitType p){ return Fluids.isFluidType(p); } - + /** - * Adds "energy" as a fluid to the FluidTank returned by getTank(). This implementation ignores + * Adds "energy" as a fluid to the FluidTank returned by getTank(). This implementation ignores * all non-fluid energy types. * @param amount amount of energy/fluid to add * @param type the type of energy/fluid being added. @@ -288,10 +291,10 @@ public float addEnergy(float amount, ConduitType type){ } return super.addEnergy(amount, type); } - + @Override public PowerRequest getPowerRequest(ConduitType offer) { - if(Fluids.isFluidType(offer) + if(Fluids.isFluidType(offer) && DistillationRecipeRegistry.getInstance().getDistillationRecipeForFluid( Fluids.conduitTypeToFluid(offer)) != null){ if(canDistill(Fluids.conduitTypeToFluid(offer))){ if(getInputTank().getFluidAmount() > 0 @@ -305,12 +308,12 @@ public PowerRequest getPowerRequest(ConduitType offer) { return request; } else { return PowerRequest.REQUEST_NOTHING; - } + } } else{ return super.getPowerRequest(offer); } } - + /** * Implementation of IFluidHandler * @param face Face of the block being polled diff --git a/src/main/java/com/mcmoddev/electricadvantage/machines/GrowthChamberBlock.java b/src/main/java/zone/moddev/mc/electricadvantage/machines/GrowthChamberBlock.java similarity index 59% rename from src/main/java/com/mcmoddev/electricadvantage/machines/GrowthChamberBlock.java rename to src/main/java/zone/moddev/mc/electricadvantage/machines/GrowthChamberBlock.java index 8b4fcdd..45718a1 100644 --- a/src/main/java/com/mcmoddev/electricadvantage/machines/GrowthChamberBlock.java +++ b/src/main/java/zone/moddev/mc/electricadvantage/machines/GrowthChamberBlock.java @@ -1,6 +1,6 @@ -package com.mcmoddev.electricadvantage.machines; +package zone.moddev.mc.electricadvantage.machines; -import com.mcmoddev.electricadvantage.init.Power; +import zone.moddev.mc.electricadvantage.init.Power; import net.minecraft.block.material.Material; import net.minecraft.world.World; @@ -11,7 +11,7 @@ public GrowthChamberBlock(){ } @Override - public ElectricMachineTileEntity createNewTileEntity(World w, int m) { + public ElectricMachineTileEntity createNewTileEntity(net.minecraft.world.IBlockReader world) { return new GrowthChamberTileEntity(); } } diff --git a/src/main/java/zone/moddev/mc/electricadvantage/machines/GrowthChamberControllerBlock.java b/src/main/java/zone/moddev/mc/electricadvantage/machines/GrowthChamberControllerBlock.java new file mode 100644 index 0000000..9a28985 --- /dev/null +++ b/src/main/java/zone/moddev/mc/electricadvantage/machines/GrowthChamberControllerBlock.java @@ -0,0 +1,65 @@ +package zone.moddev.mc.electricadvantage.machines; + +import zone.moddev.mc.electricadvantage.init.Power; +import cyano.poweradvantage.api.ConduitType; +import cyano.poweradvantage.api.PowerConnectorContext; +import cyano.poweradvantage.api.PoweredEntity; +import zone.moddev.mc.poweradvantage.init.Fluids; +import net.minecraft.block.material.Material; +import net.minecraft.block.state.IBlockState; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; + + +/** + * The coal boiler is a bit more complicated because it consumes fluids (water) and produces steam, + * making it a multi-type powered block. + * @author DrCyano + * + */ +public class GrowthChamberControllerBlock extends cyano.poweradvantage.api.simple.BlockSimplePowerMachine{ + + + public GrowthChamberControllerBlock() { + super(Material.PISTON, 0.75f, Power.GROWTHCHAMBER_POWER, Power.ELECTRIC_POWER, Fluids.fluidConduit_general); + } + + @Override + public PoweredEntity createNewTileEntity(net.minecraft.world.IBlockReader world) { + return new GrowthChamberControllerTileEntity(); + } + + @Override + public boolean hasComparatorInputOverride(IBlockState bs) { + return true; + } + + @Override + public int getComparatorInputOverride(IBlockState bs, World world, BlockPos coord) { + if(world.getTileEntity(coord) instanceof GrowthChamberControllerTileEntity){ + return ((GrowthChamberControllerTileEntity)world.getTileEntity(coord)).getComparatorOutput(); + } + return 0; + } + + + + @Override + public boolean isPowerSink(ConduitType pt){ + return ConduitType.areSameType(Power.ELECTRIC_POWER,pt) + || Fluids.isFluidType(pt); + } + @Override + public boolean isPowerSource(ConduitType pt){ + return ConduitType.areSameType(Power.GROWTHCHAMBER_POWER,pt); + } + + @Override + public boolean canAcceptConnection(PowerConnectorContext c){ + return ConduitType.areSameType(Power.ELECTRIC_POWER,c.powerType) + || ConduitType.areSameType(Power.GROWTHCHAMBER_POWER, c.powerType) + || Fluids.isFluidType(c.powerType); + } + + ///// end multi-type overrides ///// +} diff --git a/src/main/java/com/mcmoddev/electricadvantage/machines/GrowthChamberControllerTileEntity.java b/src/main/java/zone/moddev/mc/electricadvantage/machines/GrowthChamberControllerTileEntity.java similarity index 89% rename from src/main/java/com/mcmoddev/electricadvantage/machines/GrowthChamberControllerTileEntity.java rename to src/main/java/zone/moddev/mc/electricadvantage/machines/GrowthChamberControllerTileEntity.java index 2cfdf18..9b46b71 100644 --- a/src/main/java/com/mcmoddev/electricadvantage/machines/GrowthChamberControllerTileEntity.java +++ b/src/main/java/zone/moddev/mc/electricadvantage/machines/GrowthChamberControllerTileEntity.java @@ -1,17 +1,21 @@ -package com.mcmoddev.electricadvantage.machines; +package zone.moddev.mc.electricadvantage.machines; -import com.mcmoddev.electricadvantage.util.LegacyFluidHandler; -import com.mcmoddev.electricadvantage.init.Power; +import zone.moddev.mc.electricadvantage.util.LegacyFluidHandler; +import zone.moddev.mc.electricadvantage.init.Power; import cyano.poweradvantage.api.ConduitType; import cyano.poweradvantage.api.PowerConnectorContext; import cyano.poweradvantage.api.PowerRequest; import cyano.poweradvantage.api.fluid.FluidRequest; -import com.mcmoddev.poweradvantage.init.Fluids; +import zone.moddev.mc.poweradvantage.init.Fluids; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.EnumFacing; -import net.minecraftforge.fluids.*; -import net.minecraftforge.oredict.OreDictionary; +import net.minecraft.fluid.Fluid; +import cyano.poweradvantage.api.fluid.FluidStack; +import cyano.poweradvantage.api.fluid.FluidTank; +import cyano.poweradvantage.api.fluid.FluidTankInfo; +import net.minecraft.tags.ItemTags; +import net.minecraft.util.ResourceLocation; public class GrowthChamberControllerTileEntity extends cyano.poweradvantage.api.simple.TileEntitySimplePowerMachine implements LegacyFluidHandler{ @@ -35,7 +39,7 @@ public class GrowthChamberControllerTileEntity extends cyano.poweradvantage.api. private final int[] dataSyncArray = new int[4]; public GrowthChamberControllerTileEntity() { - super(types, capacities, "tile.electricadvantage.growth_chamber_controller.name"); + super(zone.moddev.mc.electricadvantage.init.Entities.GROWTH_CHAMBER_CONTROLLER, types, capacities, "tile.electricadvantage.growth_chamber_controller.name"); tank = new FluidTank((int)capacities[2]); inventory = new ItemStack[1]; } @@ -74,13 +78,9 @@ public void tickUpdate(boolean isServerWorld) { } private static boolean isDirt(ItemStack i){ - if(i == null) return false; - for(ItemStack d : OreDictionary.getOres("blockDirt")){ - if(OreDictionary.itemMatches(d, i, false)){ - return true; - } - } - return false; + return i != null && !i.isEmpty() + && (i.getItem() == net.minecraft.init.Blocks.DIRT.asItem() + || ItemTags.getCollection().getOrCreate(new ResourceLocation("forge", "dirt")).contains(i.getItem())); } private static float lowest(float... numbers){ @@ -177,7 +177,7 @@ public void prepareDataFieldsForSync() { @Override public void onDataFieldUpdate() { this.setEnergy(Float.intBitsToFloat(dataSyncArray[0]), Power.GROWTHCHAMBER_POWER); - this.getTank().setFluid(new FluidStack(FluidRegistry.WATER,dataSyncArray[1])); + this.getTank().setFluid(new FluidStack(net.minecraft.init.Fluids.WATER,dataSyncArray[1])); this.setSoil(Float.intBitsToFloat(dataSyncArray[2])); timeSinceLastPowerRequest = dataSyncArray[3]; } @@ -188,8 +188,8 @@ public void onDataFieldUpdate() { * @param tagRoot An NBT tag */ @Override - public NBTTagCompound writeToNBT(final NBTTagCompound tagRoot) { - super.writeToNBT(tagRoot); + public NBTTagCompound write(final NBTTagCompound tagRoot) { + super.write(tagRoot); NBTTagCompound tankTag = new NBTTagCompound(); this.getTank().writeToNBT(tankTag); tagRoot.setTag("Tank", tankTag); @@ -201,17 +201,17 @@ public NBTTagCompound writeToNBT(final NBTTagCompound tagRoot) { * @param tagRoot An NBT tag */ @Override - public void readFromNBT(final NBTTagCompound tagRoot) { - super.readFromNBT(tagRoot); - if (tagRoot.hasKey("Tank")) { - NBTTagCompound tankTag = tagRoot.getCompoundTag("Tank"); + public void read(final NBTTagCompound tagRoot) { + super.read(tagRoot); + if (tagRoot.contains("Tank", 10)) { + NBTTagCompound tankTag = tagRoot.getCompound("Tank"); getTank().readFromNBT(tankTag); - if(tankTag.hasKey("Empty")){ + if(tankTag.contains("Empty", 1)){ // empty the tank if NBT says its empty (not default behavior of Tank.readFromNBT(...) ) getTank().setFluid(null); } } - if(tagRoot.hasKey("soil")){ + if(tagRoot.contains("soil", 99)){ this.soil = tagRoot.getFloat("soil"); } } @@ -303,7 +303,7 @@ public float subtractEnergy(float amount, ConduitType type){ @Override public PowerRequest getPowerRequest(ConduitType offer) { if(redstone) return PowerRequest.REQUEST_NOTHING; - if(Fluids.conduitTypeToFluid(offer) == FluidRegistry.WATER){ + if(Fluids.conduitTypeToFluid(offer) == net.minecraft.init.Fluids.WATER){ PowerRequest request = new FluidRequest(FluidRequest.MEDIUM_PRIORITY+1, (getTank().getCapacity() - getTank().getFluidAmount()), this); @@ -381,7 +381,7 @@ public FluidStack drain(EnumFacing face, int amount, boolean forReal) { */ @Override public boolean canFill(EnumFacing face, Fluid fluid) { - if(fluid != FluidRegistry.WATER) return false; + if(fluid != net.minecraft.init.Fluids.WATER) return false; if(getTank().getFluid() == null) return true; return getTank().getFluidAmount() <= getTank().getCapacity() && fluid.equals(getTank().getFluid().getFluid()); } diff --git a/src/main/java/com/mcmoddev/electricadvantage/machines/GrowthChamberTileEntity.java b/src/main/java/zone/moddev/mc/electricadvantage/machines/GrowthChamberTileEntity.java similarity index 90% rename from src/main/java/com/mcmoddev/electricadvantage/machines/GrowthChamberTileEntity.java rename to src/main/java/zone/moddev/mc/electricadvantage/machines/GrowthChamberTileEntity.java index 330f2b0..64c30a8 100644 --- a/src/main/java/com/mcmoddev/electricadvantage/machines/GrowthChamberTileEntity.java +++ b/src/main/java/zone/moddev/mc/electricadvantage/machines/GrowthChamberTileEntity.java @@ -1,14 +1,14 @@ -package com.mcmoddev.electricadvantage.machines; +package zone.moddev.mc.electricadvantage.machines; -import com.mcmoddev.electricadvantage.init.Power; -import com.mcmoddev.electricadvantage.util.farming.VirtualCrop; +import zone.moddev.mc.electricadvantage.ElectricAdvantage; +import zone.moddev.mc.electricadvantage.init.Power; +import zone.moddev.mc.electricadvantage.util.farming.VirtualCrop; import cyano.poweradvantage.api.ConduitType; import cyano.poweradvantage.api.PowerRequest; import net.minecraft.entity.item.EntityItem; import net.minecraft.init.SoundEvents; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import net.minecraftforge.fml.common.FMLLog; import java.util.Arrays; import java.util.List; @@ -23,7 +23,7 @@ public class GrowthChamberTileEntity extends ElectricMachineTileEntity { private final VirtualCrop[] crops = new VirtualCrop[GROWTH_AREA]; public GrowthChamberTileEntity() { - super("tile.electricadvantage.growth_chamber.name",Power.GROWTHCHAMBER_POWER, ENERGY_PER_TICK*64, GROWTH_AREA, 6, 0); + super(zone.moddev.mc.electricadvantage.init.Entities.GROWTH_CHAMBER, "tile.electricadvantage.growth_chamber.name",Power.GROWTHCHAMBER_POWER, ENERGY_PER_TICK*64, GROWTH_AREA, 6, 0); } @@ -122,7 +122,7 @@ public int[] getDataFieldArray() { @Override public void onDataFieldUpdate() { - this.setEnergy(Float.intBitsToFloat(dataArray[0]), this.getType()); + this.setEnergy(Float.intBitsToFloat(dataArray[0]), this.getEnergyType()); System.arraycopy(dataArray, 1, progression, 0, progression.length); System.arraycopy(dataArray, 1+GROWTH_AREA, progressionMax, 0, progressionMax.length); } @@ -169,7 +169,7 @@ protected void saveTo(NBTTagCompound tagRoot) { @Override protected void loadFrom(NBTTagCompound tagRoot) { - if(tagRoot.hasKey("growth")){ + if(tagRoot.contains("growth", 99)){ byte[] growthStages = tagRoot.getByteArray("growth"); for(int i = 0; i < growthStages.length && i < GROWTH_AREA; i++){ if(crops[i] == null){ @@ -180,7 +180,7 @@ protected void loadFrom(NBTTagCompound tagRoot) { } } } - if(tagRoot.hasKey("prog")){ + if(tagRoot.contains("prog", 99)){ System.arraycopy(tagRoot.getIntArray("prog"), 0, progression, 0, progression.length); } } @@ -191,7 +191,7 @@ private VirtualCrop getVirtualCrop(ItemStack inputSlot) { try{ return VirtualCrop.createVirtualCrop(inputSlot, getWorld(), getPos()); } catch(Exception ex){ - FMLLog.severe("Error occured while trying to make a virtual crop for %s:\n%s", inputSlot,ex); + ElectricAdvantage.LOGGER.error("Error occurred while trying to make a virtual crop for {}", inputSlot, ex); return null; } } diff --git a/src/main/java/zone/moddev/mc/electricadvantage/machines/HydroelectricGeneratorBlock.java b/src/main/java/zone/moddev/mc/electricadvantage/machines/HydroelectricGeneratorBlock.java new file mode 100644 index 0000000..a0b9ae3 --- /dev/null +++ b/src/main/java/zone/moddev/mc/electricadvantage/machines/HydroelectricGeneratorBlock.java @@ -0,0 +1,24 @@ +package zone.moddev.mc.electricadvantage.machines; + +import net.minecraft.block.state.IBlockState; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.IWorldReaderBase; + +public class HydroelectricGeneratorBlock extends ElectricGeneratorBlock { + + public HydroelectricGeneratorBlock(){ + super(); + } + + @Override + public ElectricGeneratorTileEntity createNewTileEntity(net.minecraft.world.IBlockReader world) { + return new HydroelectricGeneratorTileEntity(); + } + + @Override + public boolean isValidPosition(IBlockState state, IWorldReaderBase worldIn, BlockPos pos) + { + return super.isValidPosition(state, worldIn, pos) + && !worldIn.getBlockState(pos.down()).getMaterial().isSolid(); + } +} diff --git a/src/main/java/com/mcmoddev/electricadvantage/machines/HydroelectricGeneratorTileEntity.java b/src/main/java/zone/moddev/mc/electricadvantage/machines/HydroelectricGeneratorTileEntity.java similarity index 82% rename from src/main/java/com/mcmoddev/electricadvantage/machines/HydroelectricGeneratorTileEntity.java rename to src/main/java/zone/moddev/mc/electricadvantage/machines/HydroelectricGeneratorTileEntity.java index 10c680f..143a22a 100644 --- a/src/main/java/com/mcmoddev/electricadvantage/machines/HydroelectricGeneratorTileEntity.java +++ b/src/main/java/zone/moddev/mc/electricadvantage/machines/HydroelectricGeneratorTileEntity.java @@ -1,6 +1,6 @@ -package com.mcmoddev.electricadvantage.machines; +package zone.moddev.mc.electricadvantage.machines; -import com.mcmoddev.electricadvantage.entities.HydroturbineEntity; +import zone.moddev.mc.electricadvantage.entities.HydroturbineEntity; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.math.AxisAlignedBB; @@ -20,7 +20,7 @@ public class HydroelectricGeneratorTileEntity extends ElectricGeneratorTileEntit private boolean isInitialized; public HydroelectricGeneratorTileEntity() { - super("tile.electricadvantage.hydroelectric_generator.name", 0); + super(zone.moddev.mc.electricadvantage.init.Entities.HYDROELECTRIC_GENERATOR, "tile.electricadvantage.hydroelectric_generator.name", 0); isInitialized = false; } @@ -30,7 +30,7 @@ public void tickUpdate(boolean isServer) { if(!isInitialized){ initialize(); } - if((getWorld().getTotalWorldTime() + checkOffset) % checkInterval == 0){ + if((getWorld().getGameTime() + checkOffset) % checkInterval == 0){ // periodically check if the hydroturbine entity is still present List turbines = getWorld().getEntitiesWithinAABB(HydroturbineEntity.class, new AxisAlignedBB( getPos().getX(),getPos().getY()-1,getPos().getZ(), @@ -71,7 +71,7 @@ protected void saveTo(NBTTagCompound tagRoot) { @Override protected void loadFrom(NBTTagCompound tagRoot) { - if(tagRoot.hasKey("initDone")){ + if(tagRoot.contains("initDone", 1)){ this.isInitialized = tagRoot.getBoolean("initDone"); } } @@ -84,7 +84,7 @@ public int[] getDataFieldArray() { @Override public void onDataFieldUpdate() { - this.setEnergy(Float.intBitsToFloat(dataArray[0]), getType()); + this.setEnergy(Float.intBitsToFloat(dataArray[0]), getEnergyType()); } @Override diff --git a/src/main/java/zone/moddev/mc/electricadvantage/machines/LEDBlock.java b/src/main/java/zone/moddev/mc/electricadvantage/machines/LEDBlock.java new file mode 100644 index 0000000..1d3afeb --- /dev/null +++ b/src/main/java/zone/moddev/mc/electricadvantage/machines/LEDBlock.java @@ -0,0 +1,53 @@ +package zone.moddev.mc.electricadvantage.machines; + +import cyano.poweradvantage.api.ConduitType; +import net.minecraft.block.Block; +import net.minecraft.block.ITileEntityProvider; +import net.minecraft.block.state.IBlockState; +import net.minecraft.state.BooleanProperty; +import net.minecraft.state.StateContainer; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.IBlockReader; +import zone.moddev.mc.electricadvantage.blocks.ElectricConduitBlock; + +/** Electric conduit that consumes a small amount of power to emit light. */ +public class LEDBlock extends ElectricConduitBlock implements ITileEntityProvider { + public static final BooleanProperty LIT = BooleanProperty.create("lit"); + + public LEDBlock() { + super(); + setDefaultState(getStateContainer().getBaseState() + .with(WEST, false).with(DOWN, false).with(SOUTH, false) + .with(EAST, false).with(UP, false).with(NORTH, false) + .with(LIT, false)); + } + + @Override + public TileEntity createNewTileEntity(IBlockReader world) { + return new LEDTileEntity(); + } + + @Override + public int getLightValue(IBlockState state) { + return state.getBlock() == this && state.get(LIT) ? 15 : 0; + } + + @Override + protected void fillStateContainer(StateContainer.Builder builder) { + super.fillStateContainer(builder); + builder.add(LIT); + } + + public IBlockState getStateFromLegacyMeta(int meta) { + return getDefaultState().with(LIT, (meta & 1) != 0); + } + + public int getLegacyMetaFromState(IBlockState state) { + return state.get(LIT) ? 1 : 0; + } + + @Override + public boolean isPowerSink(ConduitType type) { + return true; + } +} diff --git a/src/main/java/com/mcmoddev/electricadvantage/machines/LEDTileEntity.java b/src/main/java/zone/moddev/mc/electricadvantage/machines/LEDTileEntity.java similarity index 85% rename from src/main/java/com/mcmoddev/electricadvantage/machines/LEDTileEntity.java rename to src/main/java/zone/moddev/mc/electricadvantage/machines/LEDTileEntity.java index afebd69..84e4a14 100644 --- a/src/main/java/com/mcmoddev/electricadvantage/machines/LEDTileEntity.java +++ b/src/main/java/zone/moddev/mc/electricadvantage/machines/LEDTileEntity.java @@ -1,6 +1,6 @@ -package com.mcmoddev.electricadvantage.machines; +package zone.moddev.mc.electricadvantage.machines; -import com.mcmoddev.electricadvantage.init.Power; +import zone.moddev.mc.electricadvantage.init.Power; import cyano.poweradvantage.api.ConduitType; import cyano.poweradvantage.api.PowerRequest; import cyano.poweradvantage.api.simple.TileEntitySimplePowerMachine; @@ -14,7 +14,7 @@ public class LEDTileEntity extends TileEntitySimplePowerMachine { private static final float ENERGY_COST = 0.125f; public LEDTileEntity() { - super(Power.ELECTRIC_POWER, ENERGY_COST * 4, "tile.electricadvantage.led_bar.name"); + super(zone.moddev.mc.electricadvantage.init.Entities.LED, Power.ELECTRIC_POWER, ENERGY_COST * 4, "tile.electricadvantage.led_bar.name"); } private final ItemStack[] none = new ItemStack[0]; @@ -61,8 +61,8 @@ public void powerUpdate(){ if(on){ this.subtractEnergy(ENERGY_COST, Power.ELECTRIC_POWER); } - if((Boolean)bs.getValue(LEDBlock.LIT) != on){ - getWorld().setBlockState(getPos(),bs.withProperty(LEDBlock.LIT, on)); + if((Boolean)bs.get(LEDBlock.LIT) != on){ + getWorld().setBlockState(getPos(),bs.with(LEDBlock.LIT, on)); } } diff --git a/src/main/java/zone/moddev/mc/electricadvantage/machines/LaserTurretBlock.java b/src/main/java/zone/moddev/mc/electricadvantage/machines/LaserTurretBlock.java new file mode 100644 index 0000000..3674c62 --- /dev/null +++ b/src/main/java/zone/moddev/mc/electricadvantage/machines/LaserTurretBlock.java @@ -0,0 +1,58 @@ +package zone.moddev.mc.electricadvantage.machines; + +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.block.state.IBlockState; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.shapes.VoxelShape; +import net.minecraft.util.math.shapes.VoxelShapes; +import net.minecraft.world.IBlockReader; +import net.minecraft.world.World; + +public class LaserTurretBlock extends ElectricMachineBlock { + + private static final VoxelShape SHAPE = VoxelShapes.or( + Block.makeCuboidShape(0, 0, 0, 16, 4, 16), + Block.makeCuboidShape(4, 4, 4, 12, 16, 12)); + + // Evil laser turrets target players and not hostile mobs + public final boolean evil; + public LaserTurretBlock(boolean isEvil) { + super(Block.Properties.create(Material.PISTON) + .hardnessAndResistance(5.0F, 100.0F).variableOpacity()); + this.evil = isEvil; + } + + @Override + public ElectricMachineTileEntity createNewTileEntity(net.minecraft.world.IBlockReader world) { + return new LaserTurretTileEntity(); + } + + + + + @Override + public VoxelShape getShape(IBlockState state, IBlockReader world, BlockPos pos) { + return SHAPE; + } + + @Override + public VoxelShape getCollisionShape(IBlockState state, IBlockReader world, BlockPos pos) { + return SHAPE; + } + + @Override + public void onBlockPlacedBy(World w, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack) { + super.onBlockPlacedBy(w, pos, state, placer, stack); + TileEntity te = w.getTileEntity(pos); + if(placer instanceof EntityPlayer && te instanceof LaserTurretTileEntity){ + ((LaserTurretTileEntity)te).setOwner((EntityPlayer)placer); + } + } + +} diff --git a/src/main/java/com/mcmoddev/electricadvantage/machines/LaserTurretTileEntity.java b/src/main/java/zone/moddev/mc/electricadvantage/machines/LaserTurretTileEntity.java similarity index 90% rename from src/main/java/com/mcmoddev/electricadvantage/machines/LaserTurretTileEntity.java rename to src/main/java/zone/moddev/mc/electricadvantage/machines/LaserTurretTileEntity.java index 7f6007c..bf6af06 100644 --- a/src/main/java/com/mcmoddev/electricadvantage/machines/LaserTurretTileEntity.java +++ b/src/main/java/zone/moddev/mc/electricadvantage/machines/LaserTurretTileEntity.java @@ -1,7 +1,7 @@ -package com.mcmoddev.electricadvantage.machines; +package zone.moddev.mc.electricadvantage.machines; -import com.mcmoddev.electricadvantage.ElectricAdvantage; -import com.mcmoddev.electricadvantage.init.Power; +import zone.moddev.mc.electricadvantage.ElectricAdvantage; +import zone.moddev.mc.electricadvantage.init.Power; import net.minecraft.block.Block; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; @@ -19,8 +19,9 @@ import net.minecraft.util.SoundEvent; import net.minecraft.util.math.*; import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; +import net.minecraftforge.registries.ForgeRegistries; import java.util.ArrayList; import java.util.List; @@ -76,10 +77,10 @@ public class LaserTurretTileEntity extends ElectricMachineTileEntity implements public LaserTurretTileEntity(){ - super("tile.electricadvantage.laser_turret.name",MAX_BUFFER,0,0,0); - SoundEvent soundEvent = SoundEvent.REGISTRY.getObject(new ResourceLocation(ElectricAdvantage.INSTANCE.LASER_SOUND)); + super(zone.moddev.mc.electricadvantage.init.Entities.LASER_TURRET, "tile.electricadvantage.laser_turret.name",MAX_BUFFER,0,0,0); + SoundEvent soundEvent = ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation(ElectricAdvantage.INSTANCE.LASER_SOUND)); if(soundEvent == null){ - LASER_SOUND = SoundEvents.ENTITY_ENDERMEN_TELEPORT; + LASER_SOUND = SoundEvents.ENTITY_ENDERMAN_TELEPORT; } else { LASER_SOUND = soundEvent; } @@ -196,8 +197,8 @@ public void tickUpdate(boolean b) { for(Entity v : victims){ hurtVictim(v); } - this.subtractEnergy(ENERGY_PER_SHOT, getType()); - if(e.isDead){ + this.subtractEnergy(ENERGY_PER_SHOT, getEnergyType()); + if(e == null || !e.isAlive()){ setTarget(null); } this.sync(); @@ -206,7 +207,7 @@ public void tickUpdate(boolean b) { this.sync(); } } - this.subtractEnergy(ENERGY_PER_TICK, getType()); + this.subtractEnergy(ENERGY_PER_TICK, getEnergyType()); } else { if(targetLocked){ setTarget(null); @@ -217,7 +218,7 @@ public void tickUpdate(boolean b) { } private boolean isEnemy(EntityPlayer player) { - if(player.capabilities.isCreativeMode) return false; + if(player.isCreative()) return false; if(this.teamIdentity == null || this.teamIdentity.isEmpty()){ return false; } else if(player.getTeam() == null){ @@ -252,7 +253,7 @@ private List getLaserAttackVictims(){ List victims = new ArrayList<>(); for(Entity v : potentialVictims){ if(origin.squareDistanceTo(v.getPositionVector()) < maxDistSqr - && rayIntersectsBoundingBox(origin,dir,v.getEntityBoundingBox())){ + && rayIntersectsBoundingBox(origin,dir,v.getBoundingBox())){ victims.add(v); } } @@ -291,8 +292,8 @@ private Vec3d calculateLaserTerminus(){ } private Vec3d followRayToSolidBlock(Vec3d origin, Vec3d dir, double maxRange){ Vec3d max = origin.add(dir).add(maxRange * dir.x, maxRange * dir.y, maxRange * dir.z); - RayTraceResult impact = getWorld().rayTraceBlocks(origin, max, true, true, false); - if(impact != null && impact.typeOfHit == RayTraceResult.Type.BLOCK){ + RayTraceResult impact = getWorld().rayTraceBlocks(origin, max, RayTraceFluidMode.SOURCE_ONLY, true, false); + if(impact != null && impact.type == RayTraceResult.Type.BLOCK){ final Vec3d impactSite; if(impact.hitVec != null){ impactSite = impact.hitVec; @@ -360,7 +361,7 @@ private void drawLaserLine() { private void validateTarget() { if(targetLocked){ Entity e = getWorld().getEntityByID(targetID); - if(e == null || e.isDead){ + if(e == null || !e.isAlive()){ setTarget(null); return; } @@ -380,8 +381,8 @@ private void validateTarget() { public boolean canSeeEntity(Entity e){ if(e == null) return false; Vec3d offsetOrigin = getOpticPosition().add(e.getPositionVector().subtract(getOpticPosition()).normalize()); - RayTraceResult collision = getWorld().rayTraceBlocks(offsetOrigin, e.getPositionVector().add(0, e.height*0.5, 0), true, true, false); - if(collision != null && collision.typeOfHit == RayTraceResult.Type.BLOCK){ + RayTraceResult collision = getWorld().rayTraceBlocks(offsetOrigin, e.getPositionVector().add(0, e.height*0.5, 0), RayTraceFluidMode.SOURCE_ONLY, true, false); + if(collision != null && collision.type == RayTraceResult.Type.BLOCK){ return false; } return true; @@ -413,7 +414,7 @@ private Vec3d getOpticPosition(){ public void setOwner(EntityPlayer owner){ this.setTeam(owner.getTeam()); - playerOwner = owner.getName(); + playerOwner = owner.getName().getString(); } public void setTeam(Team t){ @@ -494,14 +495,14 @@ public SPacketUpdateTileEntity getUpdatePacket(){ @Override public NBTTagCompound getUpdateTag() { - NBTTagCompound nbtTag = writeToNBT(new NBTTagCompound()); + NBTTagCompound nbtTag = write(new NBTTagCompound()); writeRenderSync(nbtTag); return nbtTag; } @Override public void handleUpdateTag(NBTTagCompound tag) { - readFromNBT(tag); + read(tag); readRenderSync(tag); } @@ -513,7 +514,7 @@ private void writeRenderSync(NBTTagCompound nbtTag) { Entity e = getWorld().getEntityByID(targetID); Vec3d pos = e.getPositionVector().add(0, e.height*0.5, 0); NBTTagCompound target = new NBTTagCompound(); - target.setInteger("id", this.targetID); + target.setInt("id", this.targetID); target.setFloat("yaw", rotTargetYaw); target.setFloat("pitch", rotTargetPitch); target.setByte("attack", (byte)laserAttack); @@ -531,11 +532,11 @@ public void onDataPacket(NetworkManager net, SPacketUpdateTileEntity packet) { } private void readRenderSync(NBTTagCompound tag) { - if(tag.hasKey("lock")){ + if(tag.contains("lock", 1)){ this.targetLocked = tag.getBoolean("lock"); - if(tag.hasKey("target")){ - NBTTagCompound target = tag.getCompoundTag("target"); - this.targetID = target.getInteger("id"); + if(tag.contains("target", 10)){ + NBTTagCompound target = tag.getCompound("target"); + this.targetID = target.getInt("id"); Entity e = getWorld().getEntityByID(targetID); if(e != null){ this.lookAt(e); @@ -546,8 +547,8 @@ private void readRenderSync(NBTTagCompound tag) { this.laserAttack = target.getByte("attack"); } } - if(tag.hasKey("energy")){ - this.setEnergy(tag.getFloat("energy"),getType()); + if(tag.contains("energy", 99)){ + this.setEnergy(tag.getFloat("energy"),getEnergyType()); } } @@ -576,20 +577,20 @@ protected void saveTo(NBTTagCompound root) { @Override protected void loadFrom(NBTTagCompound root) { - if(root.hasKey("pitch")){ + if(root.contains("pitch", 99)){ this.rotPitch = root.getFloat("pitch"); this.rotOldPitch = rotPitch; this.rotTargetPitch = rotPitch; } - if(root.hasKey("yaw")){ + if(root.contains("yaw", 99)){ this.rotYaw = root.getFloat("yaw"); this.rotOldYaw = rotYaw; this.rotTargetYaw = rotYaw; } - if(root.hasKey("lock")){ + if(root.contains("lock", 1)){ targetLocked = root.getBoolean("lock"); } - if(root.hasKey("team")){ + if(root.contains("team", 8)){ String teamName = root.getString("team"); if(teamName.isEmpty()){ this.teamIdentity = null; @@ -598,7 +599,7 @@ protected void loadFrom(NBTTagCompound root) { } } - if(root.hasKey("player")){ + if(root.contains("player", 8)){ playerOwner = root.getString("player"); } } @@ -640,7 +641,7 @@ public int getComparatorOutput(){ // Helps with laser rendering final private int renderRange = ATTACK_RANGE * 2; - @SideOnly(Side.CLIENT) + @OnlyIn(Dist.CLIENT) public AxisAlignedBB getRenderBoundingBox() { return new AxisAlignedBB(getPos().add(-renderRange, -renderRange, -renderRange), getPos().add(renderRange, renderRange, renderRange)); diff --git a/src/main/java/com/mcmoddev/electricadvantage/machines/PhotovoltaicGeneratorBlock.java b/src/main/java/zone/moddev/mc/electricadvantage/machines/PhotovoltaicGeneratorBlock.java similarity index 63% rename from src/main/java/com/mcmoddev/electricadvantage/machines/PhotovoltaicGeneratorBlock.java rename to src/main/java/zone/moddev/mc/electricadvantage/machines/PhotovoltaicGeneratorBlock.java index 5cbc2bd..0d7bbdb 100644 --- a/src/main/java/com/mcmoddev/electricadvantage/machines/PhotovoltaicGeneratorBlock.java +++ b/src/main/java/zone/moddev/mc/electricadvantage/machines/PhotovoltaicGeneratorBlock.java @@ -1,4 +1,4 @@ -package com.mcmoddev.electricadvantage.machines; +package zone.moddev.mc.electricadvantage.machines; import net.minecraft.block.SoundType; import net.minecraft.block.material.Material; @@ -8,13 +8,12 @@ public class PhotovoltaicGeneratorBlock extends ElectricGeneratorBlock{ public PhotovoltaicGeneratorBlock(){ - super(Material.ROCK); - this.setSoundType(SoundType.GLASS); + super(net.minecraft.block.Block.Properties.create(Material.ROCK) + .hardnessAndResistance(0.75F).sound(SoundType.GLASS).variableOpacity()); } @Override - public ElectricGeneratorTileEntity createNewTileEntity(World arg0, int arg1) { - net.minecraft.block.BlockDaylightDetector k; + public ElectricGeneratorTileEntity createNewTileEntity(net.minecraft.world.IBlockReader world) { return new PhotovoltaicGeneratorTileEntity(); } diff --git a/src/main/java/com/mcmoddev/electricadvantage/machines/PhotovoltaicGeneratorTileEntity.java b/src/main/java/zone/moddev/mc/electricadvantage/machines/PhotovoltaicGeneratorTileEntity.java similarity index 84% rename from src/main/java/com/mcmoddev/electricadvantage/machines/PhotovoltaicGeneratorTileEntity.java rename to src/main/java/zone/moddev/mc/electricadvantage/machines/PhotovoltaicGeneratorTileEntity.java index 51306f9..0f36592 100644 --- a/src/main/java/com/mcmoddev/electricadvantage/machines/PhotovoltaicGeneratorTileEntity.java +++ b/src/main/java/zone/moddev/mc/electricadvantage/machines/PhotovoltaicGeneratorTileEntity.java @@ -1,6 +1,6 @@ -package com.mcmoddev.electricadvantage.machines; +package zone.moddev.mc.electricadvantage.machines; -import com.mcmoddev.electricadvantage.init.Power; +import zone.moddev.mc.electricadvantage.init.Power; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.math.BlockPos; @@ -17,7 +17,7 @@ public class PhotovoltaicGeneratorTileEntity extends ElectricGeneratorTileEntity private float powerOutput = 0; public PhotovoltaicGeneratorTileEntity() { - super("tile.electricadvantage.photovoltaic_generator.name", 0); + super(zone.moddev.mc.electricadvantage.init.Entities.PHOTOVOLTAIC_GENERATOR, "tile.electricadvantage.photovoltaic_generator.name", 0); } @Override @@ -93,9 +93,9 @@ public void powerUpdate(){ public static float getLightIntensityAt(BlockPos pos, World w){ float light; - if(w.canSeeSky(pos) && w.provider.hasSkyLight()){ + if(w.canSeeSky(pos) && w.dimension.hasSkyLight()){ // outdoor light imposes no penalty - light = MathHelper.sin((float)w.getWorldTime() * 2.61799E-4f); // (worldTime * pi / 12000); + light = MathHelper.sin((float)w.getDayTime() * 2.61799E-4f); // (worldTime * pi / 12000); // handle weather if(w.isThundering()){ light *= 0.2f; @@ -103,7 +103,7 @@ public static float getLightIntensityAt(BlockPos pos, World w){ light *= 0.35f; } } else { - float blockLight = w.getLightFromNeighbors(pos) * 6.66666E-2f; // block light / 15 + float blockLight = w.getLight(pos) * 6.66666E-2f; // block light / 15 light = BLOCKLIGHT_FACTOR * blockLight; } return light; diff --git a/src/main/java/zone/moddev/mc/electricadvantage/machines/PlasticRefineryBlock.java b/src/main/java/zone/moddev/mc/electricadvantage/machines/PlasticRefineryBlock.java new file mode 100644 index 0000000..1796f11 --- /dev/null +++ b/src/main/java/zone/moddev/mc/electricadvantage/machines/PlasticRefineryBlock.java @@ -0,0 +1,35 @@ +package zone.moddev.mc.electricadvantage.machines; + +import zone.moddev.mc.electricadvantage.init.Power; +import cyano.poweradvantage.api.ConduitType; +import cyano.poweradvantage.api.PowerConnectorContext; +import zone.moddev.mc.poweradvantage.init.Fluids; + +public class PlasticRefineryBlock extends ElectricMachineBlock{ + + @Override + public ElectricMachineTileEntity createNewTileEntity(net.minecraft.world.IBlockReader world) { + return new PlasticRefineryTileEntity(); + } + + @Override + public boolean isPowerSource(ConduitType e){ + return false; + } + @Override + public boolean isPowerSink(ConduitType e){ + return true; + } + private final ConduitType[] types = {Power.ELECTRIC_POWER,Fluids.fluidConduit_general}; + @Override + public ConduitType[] getTypes(){ + return types; + } + @Override + public boolean canAcceptConnection(PowerConnectorContext c){ + return ConduitType.areSameType(Power.ELECTRIC_POWER,c.powerType) + || Fluids.isFluidType(c.powerType); + } + ///// end multi-type overrides ///// + +} diff --git a/src/main/java/com/mcmoddev/electricadvantage/machines/PlasticRefineryTileEntity.java b/src/main/java/zone/moddev/mc/electricadvantage/machines/PlasticRefineryTileEntity.java similarity index 84% rename from src/main/java/com/mcmoddev/electricadvantage/machines/PlasticRefineryTileEntity.java rename to src/main/java/zone/moddev/mc/electricadvantage/machines/PlasticRefineryTileEntity.java index ccf56af..0eabe91 100644 --- a/src/main/java/com/mcmoddev/electricadvantage/machines/PlasticRefineryTileEntity.java +++ b/src/main/java/zone/moddev/mc/electricadvantage/machines/PlasticRefineryTileEntity.java @@ -1,21 +1,26 @@ -package com.mcmoddev.electricadvantage.machines; +package zone.moddev.mc.electricadvantage.machines; -import com.mcmoddev.electricadvantage.ElectricAdvantage; -import com.mcmoddev.electricadvantage.util.LegacyFluidHandler; -import com.mcmoddev.electricadvantage.init.Items; -import com.mcmoddev.electricadvantage.init.Power; +import zone.moddev.mc.electricadvantage.ElectricAdvantage; +import zone.moddev.mc.electricadvantage.util.LegacyFluidHandler; +import zone.moddev.mc.electricadvantage.init.Items; +import zone.moddev.mc.electricadvantage.init.Power; import cyano.poweradvantage.api.ConduitType; import cyano.poweradvantage.api.PowerConnectorContext; import cyano.poweradvantage.api.PowerRequest; import cyano.poweradvantage.api.fluid.FluidRequest; -import com.mcmoddev.poweradvantage.init.Fluids; -import com.mcmoddev.poweradvantage.util.FluidIdHelper; +import zone.moddev.mc.poweradvantage.init.Fluids; +import zone.moddev.mc.poweradvantage.util.FluidIdHelper; import net.minecraft.init.SoundEvents; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.EnumFacing; -import net.minecraftforge.fluids.*; -import net.minecraftforge.oredict.OreDictionary; +import net.minecraft.fluid.Fluid; +import cyano.poweradvantage.api.fluid.FluidStack; +import cyano.poweradvantage.api.fluid.FluidTank; +import cyano.poweradvantage.api.fluid.FluidTankInfo; +import net.minecraft.tags.ItemTags; +import net.minecraft.util.ResourceLocation; +import net.minecraft.util.registry.IRegistry; import java.util.List; @@ -25,16 +30,16 @@ public class PlasticRefineryTileEntity extends ElectricMachineTileEntity impleme public static final float ENERGY_PER_TICK = 12f; public static final short TICKS_PER_INGOT = 100; public static final int OIL_PER_INGOT = 100; - + private final FluidTank tank; private short fabTime = 0; - + private final int[] dataSyncArray = new int[4]; - + public PlasticRefineryTileEntity() { - super("tile.electricadvantage.plastic_refinery.name", + super(zone.moddev.mc.electricadvantage.init.Entities.PLASTIC_REFINERY, "tile.electricadvantage.plastic_refinery.name", 0, 1, 0, new ConduitType[]{Power.ELECTRIC_POWER, Fluids.fluidConduit_general},new float[]{500f,2000f}); - tank = new FluidTank(Fluid.BUCKET_VOLUME * 2); + tank = new FluidTank(FluidTank.BUCKET_VOLUME * 2); } private boolean wasActive = false; @@ -74,13 +79,13 @@ && getTank().getFluidAmount() >= OIL_PER_INGOT){ } } } - + private boolean outputIsAvailable(){ - return this.getOutputSlot(0) == null - || (this.getOutputSlot(0).getItem().equals(Items.petrolplastic_ingot) + return this.getOutputSlot(0) == null + || (this.getOutputSlot(0).getItem().equals(Items.petrolplastic_ingot) && this.getOutputSlot(0).getCount() < this.getOutputSlot(0).getMaxStackSize()); } - + @Override public boolean isPowered() { return getEnergy() > ENERGY_PER_TICK; @@ -96,7 +101,7 @@ public float[] getProgress() { public FluidTank getTank(){ return tank; } - + @Override protected void saveTo(NBTTagCompound tagRoot) { tagRoot.setShort("progress", fabTime); @@ -107,13 +112,13 @@ protected void saveTo(NBTTagCompound tagRoot) { @Override protected void loadFrom(NBTTagCompound tagRoot) { - if(tagRoot.hasKey("progress")){ + if(tagRoot.contains("progress", 99)){ this.fabTime = tagRoot.getShort("progress"); } - if (tagRoot.hasKey("Tank")) { - NBTTagCompound tankTag = tagRoot.getCompoundTag("Tank"); + if (tagRoot.contains("Tank", 10)) { + NBTTagCompound tankTag = tagRoot.getCompound("Tank"); getTank().readFromNBT(tankTag); - if(tankTag.hasKey("Empty")){ + if(tankTag.contains("Empty", 1)){ // empty the tank if NBT says its empty (not default behavior of Tank.readFromNBT(...) ) getTank().setFluid(null); } @@ -122,11 +127,9 @@ protected void loadFrom(NBTTagCompound tagRoot) { @Override protected boolean isValidInputItem(ItemStack item) { - List list = OreDictionary.getOres("plastic"); - for(ItemStack i : list){ - if(i.getItem().equals(item.getItem())) return true; - } - return false; + return item != null && !item.isEmpty() + && ItemTags.getCollection().getOrCreate(new ResourceLocation("forge", "plastics")) + .contains(item.getItem()); } @Override @@ -139,15 +142,15 @@ public void prepareDataFieldsForSync() { dataSyncArray[0] = Float.floatToRawIntBits(this.getEnergy()); dataSyncArray[1] = this.fabTime; dataSyncArray[2] = this.getTank().getFluidAmount(); - dataSyncArray[3] = (getTank().getFluid() != null && getTank().getFluid().getFluid() != null + dataSyncArray[3] = (getTank().getFluid() != null && getTank().getFluid().getFluid() != null ? FluidIdHelper.getFluidId(getTank().getFluid().getFluid()) - : FluidIdHelper.getFluidId(FluidRegistry.WATER)); - + : FluidIdHelper.getFluidId(net.minecraft.init.Fluids.WATER)); + } @Override public void onDataFieldUpdate() { - this.setEnergy(Float.intBitsToFloat(dataSyncArray[0]), this.getType()); + this.setEnergy(Float.intBitsToFloat(dataSyncArray[0]), this.getEnergyType()); this.fabTime = (short)dataSyncArray[1]; Fluid fluid = FluidIdHelper.getFluid(dataSyncArray[3]); this.getTank().setFluid(fluid == null || dataSyncArray[2] <= 0 ? null : new FluidStack(fluid, dataSyncArray[2])); @@ -155,12 +158,12 @@ public void onDataFieldUpdate() { private boolean isPlasticFluid(Fluid fluid) { if(fluid == null) return false; - return ElectricAdvantage.INSTANCE.PLASTIC_FLUID_MATERIALS.contains( - FluidRegistry.getFluidName(fluid)); + ResourceLocation id = IRegistry.field_212619_h.getKey(fluid); + return id != null && ElectricAdvantage.INSTANCE.PLASTIC_FLUID_MATERIALS.contains(id.toString()); } - - + + @Override public int getComparatorOutput() { return 15 * this.getTank().getFluidAmount() / this.getTank().getCapacity(); @@ -168,7 +171,7 @@ public int getComparatorOutput() { ///// Overrides to make this a multi-type block ///// /** - * Adds "energy" as a fluid to the FluidTank returned by getTank(). This implementation ignores + * Adds "energy" as a fluid to the FluidTank returned by getTank(). This implementation ignores * all non-fluid energy types. * @param amount amount of energy/fluid to add * @param type the type of energy/fluid being added. @@ -201,7 +204,7 @@ public void setEnergy(float amount,ConduitType type) { } } /** - * Subtracts "energy" as a fluid to the FluidTank returned by getTank(). This implementation + * Subtracts "energy" as a fluid to the FluidTank returned by getTank(). This implementation * ignores all non-fluid energy types. * @param amount amount of energy/fluid to add * @param type the type of energy/fluid being added. @@ -220,7 +223,7 @@ public float subtractEnergy(float amount, ConduitType type){ return super.subtractEnergy(amount, type); } } - + @Override public PowerRequest getPowerRequest(ConduitType offer) { if(this.hasRedstoneSignal()) return PowerRequest.REQUEST_NOTHING; @@ -233,14 +236,14 @@ public PowerRequest getPowerRequest(ConduitType offer) { return super.getPowerRequest(offer); } } - + @Override public boolean canAcceptConnection(PowerConnectorContext p){ ConduitType type = p.powerType; - return ConduitType.areSameType(getType(), type) || ConduitType.areSameType(Fluids.fluidConduit_general, type); + return ConduitType.areSameType(getEnergyType(), type) || ConduitType.areSameType(Fluids.fluidConduit_general, type); } - + /** * Implementation of IFluidHandler * @param face Face of the block being polled diff --git a/src/main/java/zone/moddev/mc/electricadvantage/machines/SteamPoweredElectricGeneratorBlock.java b/src/main/java/zone/moddev/mc/electricadvantage/machines/SteamPoweredElectricGeneratorBlock.java new file mode 100644 index 0000000..ab7698c --- /dev/null +++ b/src/main/java/zone/moddev/mc/electricadvantage/machines/SteamPoweredElectricGeneratorBlock.java @@ -0,0 +1,38 @@ +package zone.moddev.mc.electricadvantage.machines; + +import zone.moddev.mc.electricadvantage.init.Power; +import cyano.poweradvantage.api.ConduitType; +import cyano.poweradvantage.api.PowerConnectorContext; + +public class SteamPoweredElectricGeneratorBlock extends ElectricGeneratorBlock{ + + public static final ConduitType STEAM_POWER = new ConduitType("steam"); + + @Override + public ElectricGeneratorTileEntity createNewTileEntity(net.minecraft.world.IBlockReader world) { + return new SteamPoweredElectricGeneratorTileEntity(); + } + + @Override + public boolean canAcceptConnection(PowerConnectorContext c){ + return ConduitType.areSameType(Power.ELECTRIC_POWER,c.powerType) + || ConduitType.areSameType(STEAM_POWER,c.powerType); + } + private final ConduitType[] types = {Power.ELECTRIC_POWER,STEAM_POWER}; + @Override + public ConduitType[] getTypes(){ + return types; + } + + @Override + public boolean isPowerSink(ConduitType pt){ + return ConduitType.areSameType(STEAM_POWER,pt); + } + @Override + public boolean isPowerSource(ConduitType pt){ + return ConduitType.areSameType(Power.ELECTRIC_POWER,pt); + } + + ///// end multi-type overrides ///// + +} diff --git a/src/main/java/com/mcmoddev/electricadvantage/machines/SteamPoweredElectricGeneratorTileEntity.java b/src/main/java/zone/moddev/mc/electricadvantage/machines/SteamPoweredElectricGeneratorTileEntity.java similarity index 88% rename from src/main/java/com/mcmoddev/electricadvantage/machines/SteamPoweredElectricGeneratorTileEntity.java rename to src/main/java/zone/moddev/mc/electricadvantage/machines/SteamPoweredElectricGeneratorTileEntity.java index fe207d9..f0a5bd5 100644 --- a/src/main/java/com/mcmoddev/electricadvantage/machines/SteamPoweredElectricGeneratorTileEntity.java +++ b/src/main/java/zone/moddev/mc/electricadvantage/machines/SteamPoweredElectricGeneratorTileEntity.java @@ -1,6 +1,6 @@ -package com.mcmoddev.electricadvantage.machines; +package zone.moddev.mc.electricadvantage.machines; -import com.mcmoddev.electricadvantage.init.Power; +import zone.moddev.mc.electricadvantage.init.Power; import cyano.poweradvantage.api.ConduitType; import cyano.poweradvantage.api.PowerConnectorContext; import cyano.poweradvantage.api.PowerRequest; @@ -9,7 +9,7 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.EnumFacing; -import static com.mcmoddev.electricadvantage.machines.SteamPoweredElectricGeneratorBlock.STEAM_POWER; +import static zone.moddev.mc.electricadvantage.machines.SteamPoweredElectricGeneratorBlock.STEAM_POWER; public class SteamPoweredElectricGeneratorTileEntity extends ElectricGeneratorTileEntity{ @@ -25,7 +25,7 @@ public class SteamPoweredElectricGeneratorTileEntity extends ElectricGeneratorTi private final int[] dataArray = new int[3]; public SteamPoweredElectricGeneratorTileEntity() { - super("tile.electricadvantage.steam_powered_generator.name", 0, new ConduitType[]{Power.ELECTRIC_POWER,STEAM_POWER}, new float[]{1000f,32f}); + super(zone.moddev.mc.electricadvantage.init.Entities.STEAM_POWERED_ELECTRIC_GENERATOR, "tile.electricadvantage.steam_powered_generator.name", 0, new ConduitType[]{Power.ELECTRIC_POWER,STEAM_POWER}, new float[]{1000f,32f}); } @Override public void powerUpdate(){ @@ -157,7 +157,7 @@ public PowerRequest getPowerRequest(ConduitType offer) { * otherwise */ public boolean canAcceptType(ConduitType type, EnumFacing blockFace){ - return ConduitType.areSameType(getType(), type) || ConduitType.areSameType(STEAM_POWER, type); + return ConduitType.areSameType(getEnergyType(), type) || ConduitType.areSameType(STEAM_POWER, type); } /** * Determines whether this conduit is compatible with a type of energy through any side @@ -166,7 +166,7 @@ public boolean canAcceptType(ConduitType type, EnumFacing blockFace){ * faces, false otherwise */ public boolean canAcceptType(ConduitType type){ - return ConduitType.areSameType(getType(), type) || ConduitType.areSameType(STEAM_POWER, type); + return ConduitType.areSameType(getEnergyType(), type) || ConduitType.areSameType(STEAM_POWER, type); } ///// end multi-type overrides ///// diff --git a/src/main/java/zone/moddev/mc/electricadvantage/migration/ElectricLegacyMigrations.java b/src/main/java/zone/moddev/mc/electricadvantage/migration/ElectricLegacyMigrations.java new file mode 100644 index 0000000..c76aa52 --- /dev/null +++ b/src/main/java/zone/moddev/mc/electricadvantage/migration/ElectricLegacyMigrations.java @@ -0,0 +1,103 @@ +package zone.moddev.mc.electricadvantage.migration; + +import cyano.poweradvantage.api.migration.LegacyMigrationApi; +import cyano.poweradvantage.api.simple.BlockSimplePowerMachine; +import net.minecraft.block.Block; +import net.minecraft.block.state.IBlockState; +import net.minecraft.util.ResourceLocation; +import net.minecraft.util.EnumFacing; +import zone.moddev.mc.electricadvantage.ElectricAdvantage; +import zone.moddev.mc.electricadvantage.machines.ElectricDrillBlock; +import zone.moddev.mc.electricadvantage.machines.ElectricGeneratorBlock; +import zone.moddev.mc.electricadvantage.machines.ElectricMachineBlock; +import zone.moddev.mc.electricadvantage.machines.LEDBlock; +import zone.moddev.mc.poweradvantage.blocks.BlockPowerSwitch; + +/** Registers ElectricAdvantage's 1.10 and 1.12 identities with the shared migration hook. */ +public final class ElectricLegacyMigrations { + private static boolean registered; + + private ElectricLegacyMigrations() {} + + public static synchronized void register() { + if (registered) return; + + LegacyMigrationApi.registerNamespace(ElectricAdvantage.MODID); + for (String path : new String[] { + "electric_conduit", "li_ore", "sulfur_ore", "electric_track", + "laser_turret", "laser_turret_evil", "led_bar", "photovoltaic_generator", + "hydroelectric_generator", "steam_powered_generator", "electric_furnace", + "electric_battery_array", "electric_crusher", "electric_drill", + "electric_fabricator", "growth_chamber", "growth_chamber_controller", + "electric_oven", "electric_switch", "electric_pump", "electric_still", + "plastic_refinery", "pump_pipe_electric" }) { + LegacyMigrationApi.registerBlockStateCodec(id(path), ElectricLegacyMigrations::decodeState); + } + + for (String path : new String[] { + "electric_furnace", "electric_crusher", "electric_drill", "electric_fabricator", + "growth_chamber", "growth_chamber_controller", "electric_oven", "laser_turret", + "led", "hydroelectric_generator", "photovoltaic_generator", + "steam_powered_electric_generator", "electric_battery_array", "electric_pump", + "electric_still", "plastic_refinery" }) { + registerTile(path); + } + LegacyMigrationApi.registerTileEntityAlias("electricadvantage.l_e_d", id("led").toString()); + LegacyMigrationApi.registerTileEntityAlias("electricadvantage:l_e_d", id("led").toString()); + LegacyMigrationApi.registerTileEntityAlias("minecraft:electricadvantage.l_e_d", id("led").toString()); + + String hydroturbine = id("hydroturbine").toString(); + LegacyMigrationApi.registerEntityAlias(hydroturbine, hydroturbine); + LegacyMigrationApi.registerEntityAlias("electricadvantage.hydroturbine", hydroturbine); + LegacyMigrationApi.registerEntityAlias("minecraft:electricadvantage.hydroturbine", hydroturbine); + LegacyMigrationApi.registerEntityAlias("minecraft:electricadvantage.Hydroturbine", hydroturbine); + LegacyMigrationApi.registerEntityAlias("electricadvantage.electricadvantage.Hydroturbine", hydroturbine); + LegacyMigrationApi.registerEntityAlias( + "minecraft:electricadvantage.electricadvantage.hydroturbine", hydroturbine); + registered = true; + } + + private static void registerTile(String path) { + String current = id(path).toString(); + LegacyMigrationApi.registerTileEntityAlias(current, current); + LegacyMigrationApi.registerTileEntityAlias(ElectricAdvantage.MODID + "." + path, current); + LegacyMigrationApi.registerTileEntityAlias( + "minecraft:" + ElectricAdvantage.MODID + "." + path, current); + } + + private static IBlockState decodeState(Block block, int metadata) { + if (block instanceof ElectricDrillBlock) { + return block.getDefaultState() + .with(ElectricDrillBlock.FACING, legacyDrillFacing(metadata)) + .with(ElectricDrillBlock.ACTIVE, legacyDrillActive(metadata)); + } + if (block instanceof LEDBlock) { + return ((LEDBlock) block).getStateFromLegacyMeta(metadata); + } + if (block instanceof ElectricGeneratorBlock) { + return ((ElectricGeneratorBlock) block).getStateFromLegacyMeta(metadata); + } + if (block instanceof ElectricMachineBlock) { + return ((ElectricMachineBlock) block).getStateFromLegacyMeta(metadata); + } + if (block instanceof BlockPowerSwitch) { + return ((BlockPowerSwitch) block).getStateFromMeta(metadata); + } + if (block instanceof BlockSimplePowerMachine) { + return ((BlockSimplePowerMachine) block).getStateFromMeta(metadata); + } + return block.getDefaultState(); + } + + static EnumFacing legacyDrillFacing(int metadata) { + return EnumFacing.byIndex(metadata & 0x7); + } + + static boolean legacyDrillActive(int metadata) { + return (metadata & 0x8) != 0; + } + + private static ResourceLocation id(String path) { + return new ResourceLocation(ElectricAdvantage.MODID, path); + } +} diff --git a/src/main/java/zone/moddev/mc/electricadvantage/recipe/RecipeConditions.java b/src/main/java/zone/moddev/mc/electricadvantage/recipe/RecipeConditions.java new file mode 100644 index 0000000..d2a2c95 --- /dev/null +++ b/src/main/java/zone/moddev/mc/electricadvantage/recipe/RecipeConditions.java @@ -0,0 +1,27 @@ +package zone.moddev.mc.electricadvantage.recipe; + +import net.minecraft.util.JsonUtils; +import net.minecraft.util.ResourceLocation; +import net.minecraftforge.common.crafting.CraftingHelper; +import zone.moddev.mc.electricadvantage.ElectricAdvantage; +import zone.moddev.mc.poweradvantage.PowerAdvantage; +import zone.moddev.mc.poweradvantage.RecipeMode; + +/** Registers the data-pack conditions used by ElectricAdvantage recipes. */ +public final class RecipeConditions { + private static boolean registered; + private RecipeConditions() {} + + public static synchronized void register() { + if (registered) return; + CraftingHelper.register(new ResourceLocation(ElectricAdvantage.MODID, "recipe_mode"), json -> { + RecipeMode expected = RecipeMode.valueOf(JsonUtils.getString(json, "mode").toUpperCase()); + return () -> PowerAdvantage.recipeMode == expected; + }); + CraftingHelper.register(new ResourceLocation(ElectricAdvantage.MODID, "not_recipe_mode"), json -> { + RecipeMode excluded = RecipeMode.valueOf(JsonUtils.getString(json, "mode").toUpperCase()); + return () -> PowerAdvantage.recipeMode != excluded; + }); + registered = true; + } +} diff --git a/src/main/java/zone/moddev/mc/electricadvantage/util/LegacyFluidHandler.java b/src/main/java/zone/moddev/mc/electricadvantage/util/LegacyFluidHandler.java new file mode 100644 index 0000000..3e4124d --- /dev/null +++ b/src/main/java/zone/moddev/mc/electricadvantage/util/LegacyFluidHandler.java @@ -0,0 +1,7 @@ +package zone.moddev.mc.electricadvantage.util; + +import cyano.poweradvantage.api.fluid.IAdvantageFluidHandler; + +/** Source-compatible name backed by Power Advantage's stable 1.13 fluid API. */ +public interface LegacyFluidHandler extends IAdvantageFluidHandler { +} diff --git a/src/main/java/zone/moddev/mc/electricadvantage/util/crafting/ItemMatcher.java b/src/main/java/zone/moddev/mc/electricadvantage/util/crafting/ItemMatcher.java new file mode 100644 index 0000000..cef8e4d --- /dev/null +++ b/src/main/java/zone/moddev/mc/electricadvantage/util/crafting/ItemMatcher.java @@ -0,0 +1,86 @@ +package zone.moddev.mc.electricadvantage.util.crafting; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.Collections; +import java.util.List; + +import net.minecraft.block.Block; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.tags.ItemTags; +import net.minecraft.util.ResourceLocation; + +/** Matches a crafting ingredient using flattened items or Forge item tags. */ +public final class ItemMatcher { + private final List choices; + + public ItemMatcher(String legacyName) { + this.choices = new ArrayList<>(); + for (Item item : ItemTags.getCollection().getOrCreate(tagId(legacyName)).getAllElements()) { + choices.add(new ItemStack(item)); + } + } + + public ItemMatcher(Item item) { + this(new ItemStack(item)); + } + + public ItemMatcher(Block block) { + this(new ItemStack(block)); + } + + public ItemMatcher(ItemStack item) { + this.choices = Collections.singletonList(item.copy()); + } + + public ItemMatcher(List expandedList) { + this.choices = new ArrayList<>(expandedList.size()); + for (Object value : expandedList) { + if (!(value instanceof ItemStack)) { + throw new ClassCastException(getClass().getName() + " does not support " + value.getClass()); + } + choices.add(((ItemStack) value).copy()); + } + } + + public boolean matches(ItemRecord record) { + return matches(record.getItem()); + } + + public boolean matches(ItemStack candidate) { + if (candidate == null || candidate.isEmpty()) return false; + for (ItemStack choice : choices) { + if (ItemStack.areItemsEqual(choice, candidate)) return true; + } + return false; + } + + public Collection getValidItems() { + List copy = new ArrayList<>(choices.size()); + for (ItemStack choice : choices) copy.add(choice.copy()); + return copy; + } + + private static ResourceLocation tagId(String name) { + if (name.indexOf(':') >= 0) return new ResourceLocation(name); + String[][] forms = { + {"ingot", "ingots"}, {"nugget", "nuggets"}, {"dust", "dusts"}, + {"ore", "ores"}, {"block", "storage_blocks"}, {"plate", "plates"}, + {"wire", "wires"}, {"gem", "gems"} + }; + for (String[] form : forms) { + if (name.startsWith(form[0]) && name.length() > form[0].length()) { + String material = name.substring(form[0].length()).toLowerCase(java.util.Locale.ROOT); + return new ResourceLocation("forge", form[1] + "/" + material); + } + } + return new ResourceLocation("forge", name.toLowerCase(java.util.Locale.ROOT)); + } + + @Override + public String toString() { + return Arrays.toString(choices.toArray()); + } +} diff --git a/src/main/java/zone/moddev/mc/electricadvantage/util/crafting/ItemRecord.java b/src/main/java/zone/moddev/mc/electricadvantage/util/crafting/ItemRecord.java new file mode 100644 index 0000000..3fa271e --- /dev/null +++ b/src/main/java/zone/moddev/mc/electricadvantage/util/crafting/ItemRecord.java @@ -0,0 +1,27 @@ +package zone.moddev.mc.electricadvantage.util.crafting; + +import net.minecraft.item.ItemStack; + +/** Flattened-item key used by the fabricator's serialized inventory. */ +public final class ItemRecord { + private final ItemStack item; + private final int hashCode; + + public ItemRecord(ItemStack stack) { + this.item = stack.copy(); + this.item.setCount(1); + this.hashCode = item.getItem().hashCode(); + } + + public ItemStack getItem() { + return item; + } + + @Override public int hashCode() { return hashCode; } + + @Override + public boolean equals(Object other) { + return other == this || other instanceof ItemRecord + && ItemStack.areItemsEqual(item, ((ItemRecord) other).item); + } +} diff --git a/src/main/java/zone/moddev/mc/electricadvantage/util/crafting/RecipeDeconstructor.java b/src/main/java/zone/moddev/mc/electricadvantage/util/crafting/RecipeDeconstructor.java new file mode 100644 index 0000000..48d1b49 --- /dev/null +++ b/src/main/java/zone/moddev/mc/electricadvantage/util/crafting/RecipeDeconstructor.java @@ -0,0 +1,102 @@ +package zone.moddev.mc.electricadvantage.util.crafting; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.atomic.AtomicReference; + +import net.minecraft.item.ItemStack; +import net.minecraft.item.crafting.IRecipe; +import net.minecraft.item.crafting.Ingredient; +import net.minecraft.world.World; +import zone.moddev.mc.electricadvantage.ElectricAdvantage; + +/** Recursive crafting solver used by the Electric Fabricator. */ +public final class RecipeDeconstructor { + private static final RecipeDeconstructor INSTANCE = new RecipeDeconstructor(); + public static int RECURSION_LIMIT = 5; + + private final Map> recipeCache = new HashMap<>(); + private int cachedRecipeCount = -1; + + private RecipeDeconstructor() {} + + public static RecipeDeconstructor getInstance() { + return INSTANCE; + } + + public void invalidateRecipeCache() { + recipeCache.clear(); + cachedRecipeCount = -1; + } + + private void initializeRecipeCache(World world) { + Collection recipes = world.getRecipeManager().getRecipes(); + if (cachedRecipeCount == recipes.size() && !recipeCache.isEmpty()) return; + recipeCache.clear(); + for (IRecipe recipe : recipes) { + ItemStack output = recipe.getRecipeOutput(); + if (output == null || output.isEmpty()) continue; + recipeCache.computeIfAbsent(new ItemRecord(output), ignored -> new ArrayList<>()).add(recipe); + } + cachedRecipeCount = recipes.size(); + } + + public SerializedInventory attemptToCraft(World world, ItemStack target, + SerializedInventory inventory, AtomicReference output) { + initializeRecipeCache(world); + return attemptToCraft(world, target, inventory, output, 0); + } + + private SerializedInventory attemptToCraft(World world, ItemStack target, + SerializedInventory inventory, AtomicReference output, int depth) { + if (depth > RECURSION_LIMIT || target == null || target.isEmpty()) return null; + List recipes = recipeCache.get(new ItemRecord(target)); + if (recipes == null || recipes.isEmpty()) return null; + + for (IRecipe recipe : recipes) { + SerializedInventory candidate = inventory.copy(); + boolean failed = false; + for (Ingredient ingredient : recipe.getIngredients()) { + if (ingredient == null || ingredient == Ingredient.EMPTY) continue; + ItemStack[] matching = ingredient.getMatchingStacks(); + if (matching == null || matching.length == 0) { + failed = true; + break; + } + ItemMatcher matcher = new ItemMatcher(Arrays.asList(matching)); + if (candidate.decrement(matcher)) continue; + + boolean craftedIngredient = false; + for (ItemStack choice : matcher.getValidItems()) { + AtomicReference nestedOutput = new AtomicReference<>(); + SerializedInventory nested = attemptToCraft( + world, choice, candidate, nestedOutput, depth + 1); + if (nested != null) { + ItemStack surplus = nestedOutput.get(); + if (surplus != null && surplus.getCount() > 1) { + surplus = surplus.copy(); + surplus.shrink(1); + nested.add(surplus); + } + candidate = nested; + craftedIngredient = true; + break; + } + } + if (!craftedIngredient) { + failed = true; + break; + } + } + if (!failed) { + output.set(recipe.getRecipeOutput().copy()); + return candidate; + } + } + return null; + } +} diff --git a/src/main/java/com/mcmoddev/electricadvantage/util/crafting/SerializedInventory.java b/src/main/java/zone/moddev/mc/electricadvantage/util/crafting/SerializedInventory.java similarity index 96% rename from src/main/java/com/mcmoddev/electricadvantage/util/crafting/SerializedInventory.java rename to src/main/java/zone/moddev/mc/electricadvantage/util/crafting/SerializedInventory.java index 6a3b0ba..5d5af18 100644 --- a/src/main/java/com/mcmoddev/electricadvantage/util/crafting/SerializedInventory.java +++ b/src/main/java/zone/moddev/mc/electricadvantage/util/crafting/SerializedInventory.java @@ -1,4 +1,4 @@ -package com.mcmoddev.electricadvantage.util.crafting; +package zone.moddev.mc.electricadvantage.util.crafting; import java.util.ArrayList; import java.util.Arrays; @@ -51,7 +51,7 @@ public void putAll(Map other){ public void addAll(Map other){ for(Map.Entry e : other.entrySet()){ if(this.containsKey(e.getKey())){ - this.put(e.getKey(), this.get(e.getKey())+e.getValue()); + this.put(e.getKey(), this.get(e.getKey()) + e.getValue()); } else { this.put(e.getKey(), e.getValue()); } diff --git a/src/main/java/com/mcmoddev/electricadvantage/util/farming/VirtualCrop.java b/src/main/java/zone/moddev/mc/electricadvantage/util/farming/VirtualCrop.java similarity index 83% rename from src/main/java/com/mcmoddev/electricadvantage/util/farming/VirtualCrop.java rename to src/main/java/zone/moddev/mc/electricadvantage/util/farming/VirtualCrop.java index d1826ec..f52a651 100644 --- a/src/main/java/com/mcmoddev/electricadvantage/util/farming/VirtualCrop.java +++ b/src/main/java/zone/moddev/mc/electricadvantage/util/farming/VirtualCrop.java @@ -1,14 +1,16 @@ -package com.mcmoddev.electricadvantage.util.farming; +package zone.moddev.mc.electricadvantage.util.farming; -import com.mcmoddev.electricadvantage.util.crafting.ItemRecord; +import zone.moddev.mc.electricadvantage.util.crafting.ItemRecord; import net.minecraft.block.Block; import net.minecraft.block.BlockStem; -import net.minecraft.block.properties.PropertyInteger; +import net.minecraft.state.IProperty; +import net.minecraft.state.IntegerProperty; import net.minecraft.block.state.IBlockState; import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; +import net.minecraft.util.NonNullList; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; import net.minecraftforge.common.IPlantable; @@ -44,7 +46,7 @@ public static VirtualCrop createVirtualCrop(ItemStack stack, World w, BlockPos p } if(customRecipes.get(r) != null){ return customRecipes.get(r).copy(); - } else if(i == Items.REEDS + } else if(i == Item.getItemFromBlock(net.minecraft.init.Blocks.SUGAR_CANE) || b instanceof net.minecraft.block.BlockMushroom || b instanceof net.minecraft.block.BlockCactus || b instanceof net.minecraft.block.BlockBush @@ -65,12 +67,12 @@ public static VirtualCrop createVirtualCrop(ItemStack stack, World w, BlockPos p if(product == null) { return null; } - return new VirtualCrop(seed,numStages,Arrays.asList(new ItemStack(product,1,0))); + return new VirtualCrop(seed,numStages,Arrays.asList(new ItemStack(product))); } else { IBlockState agedState = ageToMax(startingState); - return new VirtualCrop(startingState.getBlock().getDrops(w, pos, startingState, 0), + return new VirtualCrop(getDrops(startingState, w, pos), getNumberOfGrowthStages(startingState), - agedState.getBlock().getDrops(w, pos, agedState, 0)); + getDrops(agedState, w, pos)); } } return null; @@ -83,10 +85,9 @@ public VirtualCrop copy(){ private static int getNumberOfGrowthStages(IBlockState startingState) { - for(Object o : startingState.getProperties().entrySet()){ - Map.Entry e = (Map.Entry)o; - if(e.getKey() instanceof PropertyInteger){ - PropertyInteger prop = (PropertyInteger)e.getKey(); + for(IProperty property : startingState.getProperties()){ + if(property instanceof IntegerProperty){ + IntegerProperty prop = (IntegerProperty)property; if("age".equals(prop.getName())){ return prop.getAllowedValues().size(); } @@ -97,21 +98,26 @@ private static int getNumberOfGrowthStages(IBlockState startingState) { private static IBlockState ageToMax(IBlockState startingState) { - for(Object o : startingState.getProperties().entrySet()){ - Map.Entry e = (Map.Entry)o; - if(e.getKey() instanceof PropertyInteger){ - PropertyInteger prop = (PropertyInteger)e.getKey(); + for(IProperty property : startingState.getProperties()){ + if(property instanceof IntegerProperty){ + IntegerProperty prop = (IntegerProperty)property; if("age".equals(prop.getName())){ int max = 0; for(Object i : prop.getAllowedValues()){ if((Integer)i > max){max = (Integer)i;} } - return startingState.withProperty(prop, Integer.valueOf(max)); + return startingState.with(prop, Integer.valueOf(max)); } } } return startingState; } + + private static List getDrops(IBlockState state, World world, BlockPos pos) { + NonNullList drops = NonNullList.create(); + state.getBlock().getDrops(state, drops, world, pos, 0); + return drops; + } private static Block getBlockFieldByReflection(Object target) { Class type = Block.class; diff --git a/src/main/resources/META-INF/mods.toml b/src/main/resources/META-INF/mods.toml new file mode 100644 index 0000000..004f72b --- /dev/null +++ b/src/main/resources/META-INF/mods.toml @@ -0,0 +1,42 @@ +modLoader="javafml" +loaderVersion="${loader_version_range}" +issueTrackerURL="https://github.com/MinecraftModDevelopmentMods/ElectricAdvantage/issues" +license="GPL-3.0-only" + +[[mods]] +modId="electricadvantage" +version="${version}" +displayName="Electric Advantage" +displayURL="https://www.curseforge.com/minecraft/mc-mods/electric-advantage" +authors="DrCyano" +description=''' +Electric-powered machines and infrastructure for the Power Advantage platform. +''' + +[[dependencies.electricadvantage]] +modId="forge" +mandatory=true +versionRange="${forge_version_range}" +ordering="NONE" +side="BOTH" + +[[dependencies.electricadvantage]] +modId="minecraft" +mandatory=true +versionRange="${minecraft_version_range}" +ordering="NONE" +side="BOTH" + +[[dependencies.electricadvantage]] +modId="poweradvantage" +mandatory=true +versionRange="[2.4.4.113021,3.0.0)" +ordering="AFTER" +side="BOTH" + +[[dependencies.electricadvantage]] +modId="basemetals" +mandatory=false +versionRange="[3.0.1.113021,4.0.0)" +ordering="AFTER" +side="BOTH" diff --git a/src/main/resources/assets/electricadvantage/blockstates/electric_battery_array.json b/src/main/resources/assets/electricadvantage/blockstates/electric_battery_array.json index 3a42457..f26af02 100644 --- a/src/main/resources/assets/electricadvantage/blockstates/electric_battery_array.json +++ b/src/main/resources/assets/electricadvantage/blockstates/electric_battery_array.json @@ -1,12 +1,12 @@ -{ - "variants": { - "active=true,facing=east": { "model": "electricadvantage:electric_battery_array", "y": 90 }, - "active=true,facing=north": { "model": "electricadvantage:electric_battery_array" }, - "active=true,facing=south": { "model": "electricadvantage:electric_battery_array", "y": 180 }, - "active=true,facing=west": { "model": "electricadvantage:electric_battery_array", "y": 270 }, - "active=false,facing=east": { "model": "electricadvantage:electric_battery_array", "y": 90 }, - "active=false,facing=north": { "model": "electricadvantage:electric_battery_array" }, - "active=false,facing=south": { "model": "electricadvantage:electric_battery_array", "y": 180 }, - "active=false,facing=west": { "model": "electricadvantage:electric_battery_array", "y": 270 } - } -} +{ + "variants": { + "active=true,facing=east": { "model": "electricadvantage:block/electric_battery_array", "y": 90 }, + "active=true,facing=north": { "model": "electricadvantage:block/electric_battery_array" }, + "active=true,facing=south": { "model": "electricadvantage:block/electric_battery_array", "y": 180 }, + "active=true,facing=west": { "model": "electricadvantage:block/electric_battery_array", "y": 270 }, + "active=false,facing=east": { "model": "electricadvantage:block/electric_battery_array", "y": 90 }, + "active=false,facing=north": { "model": "electricadvantage:block/electric_battery_array" }, + "active=false,facing=south": { "model": "electricadvantage:block/electric_battery_array", "y": 180 }, + "active=false,facing=west": { "model": "electricadvantage:block/electric_battery_array", "y": 270 } + } +} diff --git a/src/main/resources/assets/electricadvantage/blockstates/electric_conduit.json b/src/main/resources/assets/electricadvantage/blockstates/electric_conduit.json index f4d4d67..c85de48 100644 --- a/src/main/resources/assets/electricadvantage/blockstates/electric_conduit.json +++ b/src/main/resources/assets/electricadvantage/blockstates/electric_conduit.json @@ -1,70 +1,70 @@ { - "__comment": "blockstate parameters MUST be in alphabetical order!", + "__comment": "blockstate parameters MUST be in alphabetical order!", "variants": { - "down=false,east=false,north=false,south=false,up=false,west=false": { "model": "electricadvantage:electric_conduit_ensw", "x": 0, "y": 0, "uvlock": false }, - "down=true,east=false,north=false,south=false,up=false,west=false": { "model": "electricadvantage:electric_conduit_n", "x": 90, "y": 0, "uvlock": false }, - "down=false,east=true,north=false,south=false,up=false,west=false": { "model": "electricadvantage:electric_conduit_n", "x": 0, "y": 90, "uvlock": false }, - "down=false,east=false,north=true,south=false,up=false,west=false": { "model": "electricadvantage:electric_conduit_n", "x": 0, "y": 0, "uvlock": false }, - "down=false,east=false,north=false,south=true,up=false,west=false": { "model": "electricadvantage:electric_conduit_n", "x": 0, "y": 180, "uvlock": false }, - "down=false,east=false,north=false,south=false,up=true,west=false": { "model": "electricadvantage:electric_conduit_n", "x": 270, "y": 0, "uvlock": false }, - "down=false,east=false,north=false,south=false,up=false,west=true": { "model": "electricadvantage:electric_conduit_n", "x": 0, "y": 270, "uvlock": false }, - "down=true,east=true,north=false,south=false,up=false,west=false": { "model": "electricadvantage:electric_conduit_nw", "x": 90, "y": 180, "uvlock": false }, - "down=true,east=false,north=true,south=false,up=false,west=false": { "model": "electricadvantage:electric_conduit_nw", "x": 90, "y": 90, "uvlock": false }, - "down=true,east=false,north=false,south=true,up=false,west=false": { "model": "electricadvantage:electric_conduit_nw", "x": 90, "y": 270, "uvlock": false }, - "down=true,east=false,north=false,south=false,up=true,west=false": { "model": "electricadvantage:electric_conduit_ns", "x": 90, "y": 0, "uvlock": false }, - "down=true,east=false,north=false,south=false,up=false,west=true": { "model": "electricadvantage:electric_conduit_nw", "x": 90, "y": 0, "uvlock": false }, - "down=false,east=true,north=true,south=false,up=false,west=false": { "model": "electricadvantage:electric_conduit_nw", "x": 0, "y": 90, "uvlock": false }, - "down=false,east=true,north=false,south=true,up=false,west=false": { "model": "electricadvantage:electric_conduit_nw", "x": 0, "y": 180, "uvlock": false }, - "down=false,east=true,north=false,south=false,up=true,west=false": { "model": "electricadvantage:electric_conduit_nw", "x": 270, "y": 180, "uvlock": false }, - "down=false,east=true,north=false,south=false,up=false,west=true": { "model": "electricadvantage:electric_conduit_ns", "x": 0, "y": 90, "uvlock": false }, - "down=false,east=false,north=true,south=true,up=false,west=false": { "model": "electricadvantage:electric_conduit_ns", "x": 0, "y": 0, "uvlock": false }, - "down=false,east=false,north=true,south=false,up=true,west=false": { "model": "electricadvantage:electric_conduit_nw", "x": 270, "y": 90, "uvlock": false }, - "down=false,east=false,north=true,south=false,up=false,west=true": { "model": "electricadvantage:electric_conduit_nw", "x": 0, "y": 0, "uvlock": false }, - "down=false,east=false,north=false,south=true,up=true,west=false": { "model": "electricadvantage:electric_conduit_nw", "x": 270, "y": 270, "uvlock": false }, - "down=false,east=false,north=false,south=true,up=false,west=true": { "model": "electricadvantage:electric_conduit_nw", "x": 0, "y": 270, "uvlock": false }, - "down=false,east=false,north=false,south=false,up=true,west=true": { "model": "electricadvantage:electric_conduit_nw", "x": 270, "y": 0, "uvlock": false }, - "down=true,east=true,north=true,south=false,up=false,west=false": { "model": "electricadvantage:electric_conduit_nuw", "x": 90, "y": 90, "uvlock": false }, - "down=true,east=true,north=false,south=true,up=false,west=false": { "model": "electricadvantage:electric_conduit_nuw", "x": 90, "y": 180, "uvlock": false }, - "down=true,east=true,north=false,south=false,up=true,west=false": { "model": "electricadvantage:electric_conduit_dnu", "x": 0, "y": 90, "uvlock": false }, - "down=true,east=true,north=false,south=false,up=false,west=true": { "model": "electricadvantage:electric_conduit_dnu", "x": 90, "y": 90, "uvlock": false }, - "down=true,east=false,north=true,south=true,up=false,west=false": { "model": "electricadvantage:electric_conduit_dnu", "x": 90, "y": 0, "uvlock": false }, - "down=true,east=false,north=true,south=false,up=true,west=false": { "model": "electricadvantage:electric_conduit_dnu", "x": 0, "y": 0, "uvlock": false }, - "down=true,east=false,north=true,south=false,up=false,west=true": { "model": "electricadvantage:electric_conduit_nuw", "x": 90, "y": 0, "uvlock": false }, - "down=true,east=false,north=false,south=true,up=true,west=false": { "model": "electricadvantage:electric_conduit_dnu", "x": 0, "y": 180, "uvlock": false }, - "down=true,east=false,north=false,south=true,up=false,west=true": { "model": "electricadvantage:electric_conduit_nuw", "x": 90, "y": 270, "uvlock": false }, - "down=true,east=false,north=false,south=false,up=true,west=true": { "model": "electricadvantage:electric_conduit_dnu", "x": 0, "y": 270, "uvlock": false }, - "down=false,east=true,north=true,south=true,up=false,west=false": { "model": "electricadvantage:electric_conduit_nsw", "x": 0, "y": 180, "uvlock": false }, - "down=false,east=true,north=true,south=false,up=true,west=false": { "model": "electricadvantage:electric_conduit_nuw", "x": 0, "y": 90, "uvlock": false }, - "down=false,east=true,north=true,south=false,up=false,west=true": { "model": "electricadvantage:electric_conduit_nsw", "x": 0, "y": 90, "uvlock": false }, - "down=false,east=true,north=false,south=true,up=true,west=false": { "model": "electricadvantage:electric_conduit_nuw", "x": 0, "y": 180, "uvlock": false }, - "down=false,east=true,north=false,south=true,up=false,west=true": { "model": "electricadvantage:electric_conduit_nsw", "x": 0, "y": 270, "uvlock": false }, - "down=false,east=true,north=false,south=false,up=true,west=true": { "model": "electricadvantage:electric_conduit_dnu", "x": 270, "y": 90, "uvlock": false }, - "down=false,east=false,north=true,south=true,up=true,west=false": { "model": "electricadvantage:electric_conduit_dnu", "x": 270, "y": 0, "uvlock": false }, - "down=false,east=false,north=true,south=true,up=false,west=true": { "model": "electricadvantage:electric_conduit_nsw", "x": 0, "y": 0, "uvlock": false }, - "down=false,east=false,north=true,south=false,up=true,west=true": { "model": "electricadvantage:electric_conduit_nuw", "x": 0, "y": 0, "uvlock": false }, - "down=false,east=false,north=false,south=true,up=true,west=true": { "model": "electricadvantage:electric_conduit_nuw", "x": 0, "y": 270, "uvlock": false }, - "down=true,east=true,north=true,south=true,up=false,west=false": { "model": "electricadvantage:electric_conduit_nsuw", "x": 180, "y": 180, "uvlock": false }, - "down=true,east=true,north=true,south=false,up=true,west=false": { "model": "electricadvantage:electric_conduit_nsuw", "x": 90, "y": 90, "uvlock": false }, - "down=true,east=true,north=true,south=false,up=false,west=true": { "model": "electricadvantage:electric_conduit_nsuw", "x": 180, "y": 90, "uvlock": false }, - "down=true,east=true,north=false,south=true,up=true,west=false": { "model": "electricadvantage:electric_conduit_nsuw", "x": 90, "y": 180, "uvlock": false }, - "down=true,east=true,north=false,south=true,up=false,west=true": { "model": "electricadvantage:electric_conduit_nsuw", "x": 180, "y": 270, "uvlock": false }, - "down=true,east=true,north=false,south=false,up=true,west=true": { "model": "electricadvantage:electric_conduit_ensw", "x": 90, "y": 0, "uvlock": false }, - "down=true,east=false,north=true,south=true,up=true,west=false": { "model": "electricadvantage:electric_conduit_ensw", "x": 90, "y": 90, "uvlock": false }, - "down=true,east=false,north=true,south=true,up=false,west=true": { "model": "electricadvantage:electric_conduit_nsuw", "x": 180, "y": 0, "uvlock": false }, - "down=true,east=false,north=true,south=false,up=true,west=true": { "model": "electricadvantage:electric_conduit_nsuw", "x": 90, "y": 0, "uvlock": false }, - "down=true,east=false,north=false,south=true,up=true,west=true": { "model": "electricadvantage:electric_conduit_nsuw", "x": 90, "y": 270, "uvlock": false }, - "down=false,east=true,north=true,south=true,up=true,west=false": { "model": "electricadvantage:electric_conduit_nsuw", "x": 0, "y": 180, "uvlock": false }, - "down=false,east=true,north=true,south=true,up=false,west=true": { "model": "electricadvantage:electric_conduit_ensw", "x": 0, "y": 0, "uvlock": false }, - "down=false,east=true,north=true,south=false,up=true,west=true": { "model": "electricadvantage:electric_conduit_nsuw", "x": 0, "y": 90, "uvlock": false }, - "down=false,east=true,north=false,south=true,up=true,west=true": { "model": "electricadvantage:electric_conduit_nsuw", "x": 0, "y": 270, "uvlock": false }, - "down=false,east=false,north=true,south=true,up=true,west=true": { "model": "electricadvantage:electric_conduit_nsuw", "x": 0, "y": 0, "uvlock": false }, - "down=true,east=true,north=true,south=true,up=true,west=false": { "model": "electricadvantage:electric_conduit_desuw", "x": 0, "y": 270, "uvlock": false }, - "down=true,east=true,north=true,south=true,up=false,west=true": { "model": "electricadvantage:electric_conduit_desuw", "x": 270, "y": 0, "uvlock": false }, - "down=true,east=true,north=true,south=false,up=true,west=true": { "model": "electricadvantage:electric_conduit_desuw", "x": 0, "y": 180, "uvlock": false }, - "down=true,east=true,north=false,south=true,up=true,west=true": { "model": "electricadvantage:electric_conduit_desuw", "x": 0, "y": 0, "uvlock": false }, - "down=true,east=false,north=true,south=true,up=true,west=true": { "model": "electricadvantage:electric_conduit_desuw", "x": 0, "y": 90, "uvlock": false }, - "down=false,east=true,north=true,south=true,up=true,west=true": { "model": "electricadvantage:electric_conduit_desuw", "x": 90, "y": 0, "uvlock": false }, - "down=true,east=true,north=true,south=true,up=true,west=true": { "model": "electricadvantage:electric_conduit_densuw", "x": 0, "y": 0, "uvlock": false } - + "down=false,east=false,north=false,south=false,up=false,west=false": { "model": "electricadvantage:block/electric_conduit_ensw", "x": 0, "y": 0, "uvlock": false }, + "down=true,east=false,north=false,south=false,up=false,west=false": { "model": "electricadvantage:block/electric_conduit_n", "x": 90, "y": 0, "uvlock": false }, + "down=false,east=true,north=false,south=false,up=false,west=false": { "model": "electricadvantage:block/electric_conduit_n", "x": 0, "y": 90, "uvlock": false }, + "down=false,east=false,north=true,south=false,up=false,west=false": { "model": "electricadvantage:block/electric_conduit_n", "x": 0, "y": 0, "uvlock": false }, + "down=false,east=false,north=false,south=true,up=false,west=false": { "model": "electricadvantage:block/electric_conduit_n", "x": 0, "y": 180, "uvlock": false }, + "down=false,east=false,north=false,south=false,up=true,west=false": { "model": "electricadvantage:block/electric_conduit_n", "x": 270, "y": 0, "uvlock": false }, + "down=false,east=false,north=false,south=false,up=false,west=true": { "model": "electricadvantage:block/electric_conduit_n", "x": 0, "y": 270, "uvlock": false }, + "down=true,east=true,north=false,south=false,up=false,west=false": { "model": "electricadvantage:block/electric_conduit_nw", "x": 90, "y": 180, "uvlock": false }, + "down=true,east=false,north=true,south=false,up=false,west=false": { "model": "electricadvantage:block/electric_conduit_nw", "x": 90, "y": 90, "uvlock": false }, + "down=true,east=false,north=false,south=true,up=false,west=false": { "model": "electricadvantage:block/electric_conduit_nw", "x": 90, "y": 270, "uvlock": false }, + "down=true,east=false,north=false,south=false,up=true,west=false": { "model": "electricadvantage:block/electric_conduit_ns", "x": 90, "y": 0, "uvlock": false }, + "down=true,east=false,north=false,south=false,up=false,west=true": { "model": "electricadvantage:block/electric_conduit_nw", "x": 90, "y": 0, "uvlock": false }, + "down=false,east=true,north=true,south=false,up=false,west=false": { "model": "electricadvantage:block/electric_conduit_nw", "x": 0, "y": 90, "uvlock": false }, + "down=false,east=true,north=false,south=true,up=false,west=false": { "model": "electricadvantage:block/electric_conduit_nw", "x": 0, "y": 180, "uvlock": false }, + "down=false,east=true,north=false,south=false,up=true,west=false": { "model": "electricadvantage:block/electric_conduit_nw", "x": 270, "y": 180, "uvlock": false }, + "down=false,east=true,north=false,south=false,up=false,west=true": { "model": "electricadvantage:block/electric_conduit_ns", "x": 0, "y": 90, "uvlock": false }, + "down=false,east=false,north=true,south=true,up=false,west=false": { "model": "electricadvantage:block/electric_conduit_ns", "x": 0, "y": 0, "uvlock": false }, + "down=false,east=false,north=true,south=false,up=true,west=false": { "model": "electricadvantage:block/electric_conduit_nw", "x": 270, "y": 90, "uvlock": false }, + "down=false,east=false,north=true,south=false,up=false,west=true": { "model": "electricadvantage:block/electric_conduit_nw", "x": 0, "y": 0, "uvlock": false }, + "down=false,east=false,north=false,south=true,up=true,west=false": { "model": "electricadvantage:block/electric_conduit_nw", "x": 270, "y": 270, "uvlock": false }, + "down=false,east=false,north=false,south=true,up=false,west=true": { "model": "electricadvantage:block/electric_conduit_nw", "x": 0, "y": 270, "uvlock": false }, + "down=false,east=false,north=false,south=false,up=true,west=true": { "model": "electricadvantage:block/electric_conduit_nw", "x": 270, "y": 0, "uvlock": false }, + "down=true,east=true,north=true,south=false,up=false,west=false": { "model": "electricadvantage:block/electric_conduit_nuw", "x": 90, "y": 90, "uvlock": false }, + "down=true,east=true,north=false,south=true,up=false,west=false": { "model": "electricadvantage:block/electric_conduit_nuw", "x": 90, "y": 180, "uvlock": false }, + "down=true,east=true,north=false,south=false,up=true,west=false": { "model": "electricadvantage:block/electric_conduit_dnu", "x": 0, "y": 90, "uvlock": false }, + "down=true,east=true,north=false,south=false,up=false,west=true": { "model": "electricadvantage:block/electric_conduit_dnu", "x": 90, "y": 90, "uvlock": false }, + "down=true,east=false,north=true,south=true,up=false,west=false": { "model": "electricadvantage:block/electric_conduit_dnu", "x": 90, "y": 0, "uvlock": false }, + "down=true,east=false,north=true,south=false,up=true,west=false": { "model": "electricadvantage:block/electric_conduit_dnu", "x": 0, "y": 0, "uvlock": false }, + "down=true,east=false,north=true,south=false,up=false,west=true": { "model": "electricadvantage:block/electric_conduit_nuw", "x": 90, "y": 0, "uvlock": false }, + "down=true,east=false,north=false,south=true,up=true,west=false": { "model": "electricadvantage:block/electric_conduit_dnu", "x": 0, "y": 180, "uvlock": false }, + "down=true,east=false,north=false,south=true,up=false,west=true": { "model": "electricadvantage:block/electric_conduit_nuw", "x": 90, "y": 270, "uvlock": false }, + "down=true,east=false,north=false,south=false,up=true,west=true": { "model": "electricadvantage:block/electric_conduit_dnu", "x": 0, "y": 270, "uvlock": false }, + "down=false,east=true,north=true,south=true,up=false,west=false": { "model": "electricadvantage:block/electric_conduit_nsw", "x": 0, "y": 180, "uvlock": false }, + "down=false,east=true,north=true,south=false,up=true,west=false": { "model": "electricadvantage:block/electric_conduit_nuw", "x": 0, "y": 90, "uvlock": false }, + "down=false,east=true,north=true,south=false,up=false,west=true": { "model": "electricadvantage:block/electric_conduit_nsw", "x": 0, "y": 90, "uvlock": false }, + "down=false,east=true,north=false,south=true,up=true,west=false": { "model": "electricadvantage:block/electric_conduit_nuw", "x": 0, "y": 180, "uvlock": false }, + "down=false,east=true,north=false,south=true,up=false,west=true": { "model": "electricadvantage:block/electric_conduit_nsw", "x": 0, "y": 270, "uvlock": false }, + "down=false,east=true,north=false,south=false,up=true,west=true": { "model": "electricadvantage:block/electric_conduit_dnu", "x": 270, "y": 90, "uvlock": false }, + "down=false,east=false,north=true,south=true,up=true,west=false": { "model": "electricadvantage:block/electric_conduit_dnu", "x": 270, "y": 0, "uvlock": false }, + "down=false,east=false,north=true,south=true,up=false,west=true": { "model": "electricadvantage:block/electric_conduit_nsw", "x": 0, "y": 0, "uvlock": false }, + "down=false,east=false,north=true,south=false,up=true,west=true": { "model": "electricadvantage:block/electric_conduit_nuw", "x": 0, "y": 0, "uvlock": false }, + "down=false,east=false,north=false,south=true,up=true,west=true": { "model": "electricadvantage:block/electric_conduit_nuw", "x": 0, "y": 270, "uvlock": false }, + "down=true,east=true,north=true,south=true,up=false,west=false": { "model": "electricadvantage:block/electric_conduit_nsuw", "x": 180, "y": 180, "uvlock": false }, + "down=true,east=true,north=true,south=false,up=true,west=false": { "model": "electricadvantage:block/electric_conduit_nsuw", "x": 90, "y": 90, "uvlock": false }, + "down=true,east=true,north=true,south=false,up=false,west=true": { "model": "electricadvantage:block/electric_conduit_nsuw", "x": 180, "y": 90, "uvlock": false }, + "down=true,east=true,north=false,south=true,up=true,west=false": { "model": "electricadvantage:block/electric_conduit_nsuw", "x": 90, "y": 180, "uvlock": false }, + "down=true,east=true,north=false,south=true,up=false,west=true": { "model": "electricadvantage:block/electric_conduit_nsuw", "x": 180, "y": 270, "uvlock": false }, + "down=true,east=true,north=false,south=false,up=true,west=true": { "model": "electricadvantage:block/electric_conduit_ensw", "x": 90, "y": 0, "uvlock": false }, + "down=true,east=false,north=true,south=true,up=true,west=false": { "model": "electricadvantage:block/electric_conduit_ensw", "x": 90, "y": 90, "uvlock": false }, + "down=true,east=false,north=true,south=true,up=false,west=true": { "model": "electricadvantage:block/electric_conduit_nsuw", "x": 180, "y": 0, "uvlock": false }, + "down=true,east=false,north=true,south=false,up=true,west=true": { "model": "electricadvantage:block/electric_conduit_nsuw", "x": 90, "y": 0, "uvlock": false }, + "down=true,east=false,north=false,south=true,up=true,west=true": { "model": "electricadvantage:block/electric_conduit_nsuw", "x": 90, "y": 270, "uvlock": false }, + "down=false,east=true,north=true,south=true,up=true,west=false": { "model": "electricadvantage:block/electric_conduit_nsuw", "x": 0, "y": 180, "uvlock": false }, + "down=false,east=true,north=true,south=true,up=false,west=true": { "model": "electricadvantage:block/electric_conduit_ensw", "x": 0, "y": 0, "uvlock": false }, + "down=false,east=true,north=true,south=false,up=true,west=true": { "model": "electricadvantage:block/electric_conduit_nsuw", "x": 0, "y": 90, "uvlock": false }, + "down=false,east=true,north=false,south=true,up=true,west=true": { "model": "electricadvantage:block/electric_conduit_nsuw", "x": 0, "y": 270, "uvlock": false }, + "down=false,east=false,north=true,south=true,up=true,west=true": { "model": "electricadvantage:block/electric_conduit_nsuw", "x": 0, "y": 0, "uvlock": false }, + "down=true,east=true,north=true,south=true,up=true,west=false": { "model": "electricadvantage:block/electric_conduit_desuw", "x": 0, "y": 270, "uvlock": false }, + "down=true,east=true,north=true,south=true,up=false,west=true": { "model": "electricadvantage:block/electric_conduit_desuw", "x": 270, "y": 0, "uvlock": false }, + "down=true,east=true,north=true,south=false,up=true,west=true": { "model": "electricadvantage:block/electric_conduit_desuw", "x": 0, "y": 180, "uvlock": false }, + "down=true,east=true,north=false,south=true,up=true,west=true": { "model": "electricadvantage:block/electric_conduit_desuw", "x": 0, "y": 0, "uvlock": false }, + "down=true,east=false,north=true,south=true,up=true,west=true": { "model": "electricadvantage:block/electric_conduit_desuw", "x": 0, "y": 90, "uvlock": false }, + "down=false,east=true,north=true,south=true,up=true,west=true": { "model": "electricadvantage:block/electric_conduit_desuw", "x": 90, "y": 0, "uvlock": false }, + "down=true,east=true,north=true,south=true,up=true,west=true": { "model": "electricadvantage:block/electric_conduit_densuw", "x": 0, "y": 0, "uvlock": false } + } } \ No newline at end of file diff --git a/src/main/resources/assets/electricadvantage/blockstates/electric_crusher.json b/src/main/resources/assets/electricadvantage/blockstates/electric_crusher.json index c61f389..9042a82 100644 --- a/src/main/resources/assets/electricadvantage/blockstates/electric_crusher.json +++ b/src/main/resources/assets/electricadvantage/blockstates/electric_crusher.json @@ -1,20 +1,20 @@ -{ - "variants": { - "active=true,facing=east,powered=true": { "model": "electricadvantage:electric_crusher_on", "y": 90 }, - "active=true,facing=north,powered=true": { "model": "electricadvantage:electric_crusher_on" }, - "active=true,facing=south,powered=true": { "model": "electricadvantage:electric_crusher_on", "y": 180 }, - "active=true,facing=west,powered=true": { "model": "electricadvantage:electric_crusher_on", "y": 270 }, - "active=false,facing=east,powered=true": { "model": "electricadvantage:electric_crusher_powered", "y": 90 }, - "active=false,facing=north,powered=true": { "model": "electricadvantage:electric_crusher_powered" }, - "active=false,facing=south,powered=true": { "model": "electricadvantage:electric_crusher_powered", "y": 180 }, - "active=false,facing=west,powered=true": { "model": "electricadvantage:electric_crusher_powered", "y": 270 }, - "active=false,facing=east,powered=false": { "model": "electricadvantage:electric_crusher_off", "y": 90 }, - "active=false,facing=north,powered=false": { "model": "electricadvantage:electric_crusher_off" }, - "active=false,facing=south,powered=false": { "model": "electricadvantage:electric_crusher_off", "y": 180 }, - "active=false,facing=west,powered=false": { "model": "electricadvantage:electric_crusher_off", "y": 270 }, - "active=true,facing=east,powered=false": { "model": "electricadvantage:electric_crusher_on", "y": 90 }, - "active=true,facing=north,powered=false": { "model": "electricadvantage:electric_crusher_on" }, - "active=true,facing=south,powered=false": { "model": "electricadvantage:electric_crusher_on", "y": 180 }, - "active=true,facing=west,powered=false": { "model": "electricadvantage:electric_crusher_on", "y": 270 } - } -} +{ + "variants": { + "active=true,facing=east,powered=true": { "model": "electricadvantage:block/electric_crusher_on", "y": 90 }, + "active=true,facing=north,powered=true": { "model": "electricadvantage:block/electric_crusher_on" }, + "active=true,facing=south,powered=true": { "model": "electricadvantage:block/electric_crusher_on", "y": 180 }, + "active=true,facing=west,powered=true": { "model": "electricadvantage:block/electric_crusher_on", "y": 270 }, + "active=false,facing=east,powered=true": { "model": "electricadvantage:block/electric_crusher_powered", "y": 90 }, + "active=false,facing=north,powered=true": { "model": "electricadvantage:block/electric_crusher_powered" }, + "active=false,facing=south,powered=true": { "model": "electricadvantage:block/electric_crusher_powered", "y": 180 }, + "active=false,facing=west,powered=true": { "model": "electricadvantage:block/electric_crusher_powered", "y": 270 }, + "active=false,facing=east,powered=false": { "model": "electricadvantage:block/electric_crusher_off", "y": 90 }, + "active=false,facing=north,powered=false": { "model": "electricadvantage:block/electric_crusher_off" }, + "active=false,facing=south,powered=false": { "model": "electricadvantage:block/electric_crusher_off", "y": 180 }, + "active=false,facing=west,powered=false": { "model": "electricadvantage:block/electric_crusher_off", "y": 270 }, + "active=true,facing=east,powered=false": { "model": "electricadvantage:block/electric_crusher_on", "y": 90 }, + "active=true,facing=north,powered=false": { "model": "electricadvantage:block/electric_crusher_on" }, + "active=true,facing=south,powered=false": { "model": "electricadvantage:block/electric_crusher_on", "y": 180 }, + "active=true,facing=west,powered=false": { "model": "electricadvantage:block/electric_crusher_on", "y": 270 } + } +} diff --git a/src/main/resources/assets/electricadvantage/blockstates/electric_drill.json b/src/main/resources/assets/electricadvantage/blockstates/electric_drill.json index 2040964..1f85ab7 100644 --- a/src/main/resources/assets/electricadvantage/blockstates/electric_drill.json +++ b/src/main/resources/assets/electricadvantage/blockstates/electric_drill.json @@ -1,16 +1,16 @@ -{ - "variants": { - "active=true,facing=up": { "model": "electricadvantage:electric_drill_on", "x":270 }, - "active=true,facing=down": { "model": "electricadvantage:electric_drill_on", "x": 90 }, - "active=true,facing=east": { "model": "electricadvantage:electric_drill_on", "y": 90 }, - "active=true,facing=north": { "model": "electricadvantage:electric_drill_on" }, - "active=true,facing=south": { "model": "electricadvantage:electric_drill_on", "y": 180 }, - "active=true,facing=west": { "model": "electricadvantage:electric_drill_on", "y": 270 }, - "active=false,facing=up": { "model": "electricadvantage:electric_drill_off", "x":270 }, - "active=false,facing=down": { "model": "electricadvantage:electric_drill_off", "x": 90 }, - "active=false,facing=east": { "model": "electricadvantage:electric_drill_off", "y": 90 }, - "active=false,facing=north": { "model": "electricadvantage:electric_drill_off" }, - "active=false,facing=south": { "model": "electricadvantage:electric_drill_off", "y": 180 }, - "active=false,facing=west": { "model": "electricadvantage:electric_drill_off", "y": 270 } - } -} +{ + "variants": { + "active=true,facing=up": { "model": "electricadvantage:block/electric_drill_on", "x":270 }, + "active=true,facing=down": { "model": "electricadvantage:block/electric_drill_on", "x": 90 }, + "active=true,facing=east": { "model": "electricadvantage:block/electric_drill_on", "y": 90 }, + "active=true,facing=north": { "model": "electricadvantage:block/electric_drill_on" }, + "active=true,facing=south": { "model": "electricadvantage:block/electric_drill_on", "y": 180 }, + "active=true,facing=west": { "model": "electricadvantage:block/electric_drill_on", "y": 270 }, + "active=false,facing=up": { "model": "electricadvantage:block/electric_drill_off", "x":270 }, + "active=false,facing=down": { "model": "electricadvantage:block/electric_drill_off", "x": 90 }, + "active=false,facing=east": { "model": "electricadvantage:block/electric_drill_off", "y": 90 }, + "active=false,facing=north": { "model": "electricadvantage:block/electric_drill_off" }, + "active=false,facing=south": { "model": "electricadvantage:block/electric_drill_off", "y": 180 }, + "active=false,facing=west": { "model": "electricadvantage:block/electric_drill_off", "y": 270 } + } +} diff --git a/src/main/resources/assets/electricadvantage/blockstates/electric_fabricator.json b/src/main/resources/assets/electricadvantage/blockstates/electric_fabricator.json index 22904b8..df2151e 100644 --- a/src/main/resources/assets/electricadvantage/blockstates/electric_fabricator.json +++ b/src/main/resources/assets/electricadvantage/blockstates/electric_fabricator.json @@ -1,20 +1,20 @@ -{ - "variants": { - "active=true,facing=east,powered=true": { "model": "electricadvantage:electric_fabricator_on", "y": 90 }, - "active=true,facing=north,powered=true": { "model": "electricadvantage:electric_fabricator_on" }, - "active=true,facing=south,powered=true": { "model": "electricadvantage:electric_fabricator_on", "y": 180 }, - "active=true,facing=west,powered=true": { "model": "electricadvantage:electric_fabricator_on", "y": 270 }, - "active=false,facing=east,powered=true": { "model": "electricadvantage:electric_fabricator_powered", "y": 90 }, - "active=false,facing=north,powered=true": { "model": "electricadvantage:electric_fabricator_powered" }, - "active=false,facing=south,powered=true": { "model": "electricadvantage:electric_fabricator_powered", "y": 180 }, - "active=false,facing=west,powered=true": { "model": "electricadvantage:electric_fabricator_powered", "y": 270 }, - "active=false,facing=east,powered=false": { "model": "electricadvantage:electric_fabricator_off", "y": 90 }, - "active=false,facing=north,powered=false": { "model": "electricadvantage:electric_fabricator_off" }, - "active=false,facing=south,powered=false": { "model": "electricadvantage:electric_fabricator_off", "y": 180 }, - "active=false,facing=west,powered=false": { "model": "electricadvantage:electric_fabricator_off", "y": 270 }, - "active=true,facing=east,powered=false": { "model": "electricadvantage:electric_fabricator_on", "y": 90 }, - "active=true,facing=north,powered=false": { "model": "electricadvantage:electric_fabricator_on" }, - "active=true,facing=south,powered=false": { "model": "electricadvantage:electric_fabricator_on", "y": 180 }, - "active=true,facing=west,powered=false": { "model": "electricadvantage:electric_fabricator_on", "y": 270 } - } -} +{ + "variants": { + "active=true,facing=east,powered=true": { "model": "electricadvantage:block/electric_fabricator_on", "y": 90 }, + "active=true,facing=north,powered=true": { "model": "electricadvantage:block/electric_fabricator_on" }, + "active=true,facing=south,powered=true": { "model": "electricadvantage:block/electric_fabricator_on", "y": 180 }, + "active=true,facing=west,powered=true": { "model": "electricadvantage:block/electric_fabricator_on", "y": 270 }, + "active=false,facing=east,powered=true": { "model": "electricadvantage:block/electric_fabricator_powered", "y": 90 }, + "active=false,facing=north,powered=true": { "model": "electricadvantage:block/electric_fabricator_powered" }, + "active=false,facing=south,powered=true": { "model": "electricadvantage:block/electric_fabricator_powered", "y": 180 }, + "active=false,facing=west,powered=true": { "model": "electricadvantage:block/electric_fabricator_powered", "y": 270 }, + "active=false,facing=east,powered=false": { "model": "electricadvantage:block/electric_fabricator_off", "y": 90 }, + "active=false,facing=north,powered=false": { "model": "electricadvantage:block/electric_fabricator_off" }, + "active=false,facing=south,powered=false": { "model": "electricadvantage:block/electric_fabricator_off", "y": 180 }, + "active=false,facing=west,powered=false": { "model": "electricadvantage:block/electric_fabricator_off", "y": 270 }, + "active=true,facing=east,powered=false": { "model": "electricadvantage:block/electric_fabricator_on", "y": 90 }, + "active=true,facing=north,powered=false": { "model": "electricadvantage:block/electric_fabricator_on" }, + "active=true,facing=south,powered=false": { "model": "electricadvantage:block/electric_fabricator_on", "y": 180 }, + "active=true,facing=west,powered=false": { "model": "electricadvantage:block/electric_fabricator_on", "y": 270 } + } +} diff --git a/src/main/resources/assets/electricadvantage/blockstates/electric_furnace.json b/src/main/resources/assets/electricadvantage/blockstates/electric_furnace.json index 13cf5b5..6fccb9e 100644 --- a/src/main/resources/assets/electricadvantage/blockstates/electric_furnace.json +++ b/src/main/resources/assets/electricadvantage/blockstates/electric_furnace.json @@ -1,20 +1,20 @@ -{ - "variants": { - "active=true,facing=east,powered=true": { "model": "electricadvantage:electric_furnace_on", "y": 90 }, - "active=true,facing=north,powered=true": { "model": "electricadvantage:electric_furnace_on" }, - "active=true,facing=south,powered=true": { "model": "electricadvantage:electric_furnace_on", "y": 180 }, - "active=true,facing=west,powered=true": { "model": "electricadvantage:electric_furnace_on", "y": 270 }, - "active=false,facing=east,powered=true": { "model": "electricadvantage:electric_furnace_powered", "y": 90 }, - "active=false,facing=north,powered=true": { "model": "electricadvantage:electric_furnace_powered" }, - "active=false,facing=south,powered=true": { "model": "electricadvantage:electric_furnace_powered", "y": 180 }, - "active=false,facing=west,powered=true": { "model": "electricadvantage:electric_furnace_powered", "y": 270 }, - "active=false,facing=east,powered=false": { "model": "electricadvantage:electric_furnace_off", "y": 90 }, - "active=false,facing=north,powered=false": { "model": "electricadvantage:electric_furnace_off" }, - "active=false,facing=south,powered=false": { "model": "electricadvantage:electric_furnace_off", "y": 180 }, - "active=false,facing=west,powered=false": { "model": "electricadvantage:electric_furnace_off", "y": 270 }, - "active=true,facing=east,powered=false": { "model": "electricadvantage:electric_furnace_on", "y": 90 }, - "active=true,facing=north,powered=false": { "model": "electricadvantage:electric_furnace_on" }, - "active=true,facing=south,powered=false": { "model": "electricadvantage:electric_furnace_on", "y": 180 }, - "active=true,facing=west,powered=false": { "model": "electricadvantage:electric_furnace_on", "y": 270 } - } -} +{ + "variants": { + "active=true,facing=east,powered=true": { "model": "electricadvantage:block/electric_furnace_on", "y": 90 }, + "active=true,facing=north,powered=true": { "model": "electricadvantage:block/electric_furnace_on" }, + "active=true,facing=south,powered=true": { "model": "electricadvantage:block/electric_furnace_on", "y": 180 }, + "active=true,facing=west,powered=true": { "model": "electricadvantage:block/electric_furnace_on", "y": 270 }, + "active=false,facing=east,powered=true": { "model": "electricadvantage:block/electric_furnace_powered", "y": 90 }, + "active=false,facing=north,powered=true": { "model": "electricadvantage:block/electric_furnace_powered" }, + "active=false,facing=south,powered=true": { "model": "electricadvantage:block/electric_furnace_powered", "y": 180 }, + "active=false,facing=west,powered=true": { "model": "electricadvantage:block/electric_furnace_powered", "y": 270 }, + "active=false,facing=east,powered=false": { "model": "electricadvantage:block/electric_furnace_off", "y": 90 }, + "active=false,facing=north,powered=false": { "model": "electricadvantage:block/electric_furnace_off" }, + "active=false,facing=south,powered=false": { "model": "electricadvantage:block/electric_furnace_off", "y": 180 }, + "active=false,facing=west,powered=false": { "model": "electricadvantage:block/electric_furnace_off", "y": 270 }, + "active=true,facing=east,powered=false": { "model": "electricadvantage:block/electric_furnace_on", "y": 90 }, + "active=true,facing=north,powered=false": { "model": "electricadvantage:block/electric_furnace_on" }, + "active=true,facing=south,powered=false": { "model": "electricadvantage:block/electric_furnace_on", "y": 180 }, + "active=true,facing=west,powered=false": { "model": "electricadvantage:block/electric_furnace_on", "y": 270 } + } +} diff --git a/src/main/resources/assets/electricadvantage/blockstates/electric_oven.json b/src/main/resources/assets/electricadvantage/blockstates/electric_oven.json index d084fc3..a2d0446 100644 --- a/src/main/resources/assets/electricadvantage/blockstates/electric_oven.json +++ b/src/main/resources/assets/electricadvantage/blockstates/electric_oven.json @@ -1,20 +1,20 @@ -{ - "variants": { - "active=true,facing=east,powered=true": { "model": "electricadvantage:electric_oven_on", "y": 90 }, - "active=true,facing=north,powered=true": { "model": "electricadvantage:electric_oven_on" }, - "active=true,facing=south,powered=true": { "model": "electricadvantage:electric_oven_on", "y": 180 }, - "active=true,facing=west,powered=true": { "model": "electricadvantage:electric_oven_on", "y": 270 }, - "active=false,facing=east,powered=true": { "model": "electricadvantage:electric_oven_powered", "y": 90 }, - "active=false,facing=north,powered=true": { "model": "electricadvantage:electric_oven_powered" }, - "active=false,facing=south,powered=true": { "model": "electricadvantage:electric_oven_powered", "y": 180 }, - "active=false,facing=west,powered=true": { "model": "electricadvantage:electric_oven_powered", "y": 270 }, - "active=false,facing=east,powered=false": { "model": "electricadvantage:electric_oven_off", "y": 90 }, - "active=false,facing=north,powered=false": { "model": "electricadvantage:electric_oven_off" }, - "active=false,facing=south,powered=false": { "model": "electricadvantage:electric_oven_off", "y": 180 }, - "active=false,facing=west,powered=false": { "model": "electricadvantage:electric_oven_off", "y": 270 }, - "active=true,facing=east,powered=false": { "model": "electricadvantage:electric_oven_on", "y": 90 }, - "active=true,facing=north,powered=false": { "model": "electricadvantage:electric_oven_on" }, - "active=true,facing=south,powered=false": { "model": "electricadvantage:electric_oven_on", "y": 180 }, - "active=true,facing=west,powered=false": { "model": "electricadvantage:electric_oven_on", "y": 270 } - } -} +{ + "variants": { + "active=true,facing=east,powered=true": { "model": "electricadvantage:block/electric_oven_on", "y": 90 }, + "active=true,facing=north,powered=true": { "model": "electricadvantage:block/electric_oven_on" }, + "active=true,facing=south,powered=true": { "model": "electricadvantage:block/electric_oven_on", "y": 180 }, + "active=true,facing=west,powered=true": { "model": "electricadvantage:block/electric_oven_on", "y": 270 }, + "active=false,facing=east,powered=true": { "model": "electricadvantage:block/electric_oven_powered", "y": 90 }, + "active=false,facing=north,powered=true": { "model": "electricadvantage:block/electric_oven_powered" }, + "active=false,facing=south,powered=true": { "model": "electricadvantage:block/electric_oven_powered", "y": 180 }, + "active=false,facing=west,powered=true": { "model": "electricadvantage:block/electric_oven_powered", "y": 270 }, + "active=false,facing=east,powered=false": { "model": "electricadvantage:block/electric_oven_off", "y": 90 }, + "active=false,facing=north,powered=false": { "model": "electricadvantage:block/electric_oven_off" }, + "active=false,facing=south,powered=false": { "model": "electricadvantage:block/electric_oven_off", "y": 180 }, + "active=false,facing=west,powered=false": { "model": "electricadvantage:block/electric_oven_off", "y": 270 }, + "active=true,facing=east,powered=false": { "model": "electricadvantage:block/electric_oven_on", "y": 90 }, + "active=true,facing=north,powered=false": { "model": "electricadvantage:block/electric_oven_on" }, + "active=true,facing=south,powered=false": { "model": "electricadvantage:block/electric_oven_on", "y": 180 }, + "active=true,facing=west,powered=false": { "model": "electricadvantage:block/electric_oven_on", "y": 270 } + } +} diff --git a/src/main/resources/assets/electricadvantage/blockstates/electric_pcb_printer.json b/src/main/resources/assets/electricadvantage/blockstates/electric_pcb_printer.json index 63c4448..aeb3d1b 100644 --- a/src/main/resources/assets/electricadvantage/blockstates/electric_pcb_printer.json +++ b/src/main/resources/assets/electricadvantage/blockstates/electric_pcb_printer.json @@ -1,20 +1,20 @@ -{ - "variants": { - "active=true,facing=east,powered=true": { "model": "electricadvantage:electric_pcb_printer_on", "y": 90 }, - "active=true,facing=north,powered=true": { "model": "electricadvantage:electric_pcb_printer_on" }, - "active=true,facing=south,powered=true": { "model": "electricadvantage:electric_pcb_printer_on", "y": 180 }, - "active=true,facing=west,powered=true": { "model": "electricadvantage:electric_pcb_printer_on", "y": 270 }, - "active=false,facing=east,powered=true": { "model": "electricadvantage:electric_pcb_printer_powered", "y": 90 }, - "active=false,facing=north,powered=true": { "model": "electricadvantage:electric_pcb_printer_powered" }, - "active=false,facing=south,powered=true": { "model": "electricadvantage:electric_pcb_printer_powered", "y": 180 }, - "active=false,facing=west,powered=true": { "model": "electricadvantage:electric_pcb_printer_powered", "y": 270 }, - "active=false,facing=east,powered=false": { "model": "electricadvantage:electric_pcb_printer_off", "y": 90 }, - "active=false,facing=north,powered=false": { "model": "electricadvantage:electric_pcb_printer_off" }, - "active=false,facing=south,powered=false": { "model": "electricadvantage:electric_pcb_printer_off", "y": 180 }, - "active=false,facing=west,powered=false": { "model": "electricadvantage:electric_pcb_printer_off", "y": 270 }, - "active=true,facing=east,powered=false": { "model": "electricadvantage:electric_pcb_printer_on", "y": 90 }, - "active=true,facing=north,powered=false": { "model": "electricadvantage:electric_pcb_printer_on" }, - "active=true,facing=south,powered=false": { "model": "electricadvantage:electric_pcb_printer_on", "y": 180 }, - "active=true,facing=west,powered=false": { "model": "electricadvantage:electric_pcb_printer_on", "y": 270 } - } -} +{ + "variants": { + "active=true,facing=east,powered=true": { "model": "electricadvantage:block/electric_pcb_printer_on", "y": 90 }, + "active=true,facing=north,powered=true": { "model": "electricadvantage:block/electric_pcb_printer_on" }, + "active=true,facing=south,powered=true": { "model": "electricadvantage:block/electric_pcb_printer_on", "y": 180 }, + "active=true,facing=west,powered=true": { "model": "electricadvantage:block/electric_pcb_printer_on", "y": 270 }, + "active=false,facing=east,powered=true": { "model": "electricadvantage:block/electric_pcb_printer_powered", "y": 90 }, + "active=false,facing=north,powered=true": { "model": "electricadvantage:block/electric_pcb_printer_powered" }, + "active=false,facing=south,powered=true": { "model": "electricadvantage:block/electric_pcb_printer_powered", "y": 180 }, + "active=false,facing=west,powered=true": { "model": "electricadvantage:block/electric_pcb_printer_powered", "y": 270 }, + "active=false,facing=east,powered=false": { "model": "electricadvantage:block/electric_pcb_printer_off", "y": 90 }, + "active=false,facing=north,powered=false": { "model": "electricadvantage:block/electric_pcb_printer_off" }, + "active=false,facing=south,powered=false": { "model": "electricadvantage:block/electric_pcb_printer_off", "y": 180 }, + "active=false,facing=west,powered=false": { "model": "electricadvantage:block/electric_pcb_printer_off", "y": 270 }, + "active=true,facing=east,powered=false": { "model": "electricadvantage:block/electric_pcb_printer_on", "y": 90 }, + "active=true,facing=north,powered=false": { "model": "electricadvantage:block/electric_pcb_printer_on" }, + "active=true,facing=south,powered=false": { "model": "electricadvantage:block/electric_pcb_printer_on", "y": 180 }, + "active=true,facing=west,powered=false": { "model": "electricadvantage:block/electric_pcb_printer_on", "y": 270 } + } +} diff --git a/src/main/resources/assets/electricadvantage/blockstates/electric_pump.json b/src/main/resources/assets/electricadvantage/blockstates/electric_pump.json index a9b2b80..35a48a2 100644 --- a/src/main/resources/assets/electricadvantage/blockstates/electric_pump.json +++ b/src/main/resources/assets/electricadvantage/blockstates/electric_pump.json @@ -1,20 +1,20 @@ -{ - "variants": { - "active=true,facing=east,powered=true": { "model": "electricadvantage:electric_pump_on", "y": 90 }, - "active=true,facing=north,powered=true": { "model": "electricadvantage:electric_pump_on" }, - "active=true,facing=south,powered=true": { "model": "electricadvantage:electric_pump_on", "y": 180 }, - "active=true,facing=west,powered=true": { "model": "electricadvantage:electric_pump_on", "y": 270 }, - "active=false,facing=east,powered=true": { "model": "electricadvantage:electric_pump_powered", "y": 90 }, - "active=false,facing=north,powered=true": { "model": "electricadvantage:electric_pump_powered" }, - "active=false,facing=south,powered=true": { "model": "electricadvantage:electric_pump_powered", "y": 180 }, - "active=false,facing=west,powered=true": { "model": "electricadvantage:electric_pump_powered", "y": 270 }, - "active=false,facing=east,powered=false": { "model": "electricadvantage:electric_pump_off", "y": 90 }, - "active=false,facing=north,powered=false": { "model": "electricadvantage:electric_pump_off" }, - "active=false,facing=south,powered=false": { "model": "electricadvantage:electric_pump_off", "y": 180 }, - "active=false,facing=west,powered=false": { "model": "electricadvantage:electric_pump_off", "y": 270 }, - "active=true,facing=east,powered=false": { "model": "electricadvantage:electric_pump_on", "y": 90 }, - "active=true,facing=north,powered=false": { "model": "electricadvantage:electric_pump_on" }, - "active=true,facing=south,powered=false": { "model": "electricadvantage:electric_pump_on", "y": 180 }, - "active=true,facing=west,powered=false": { "model": "electricadvantage:electric_pump_on", "y": 270 } - } -} +{ + "variants": { + "active=true,facing=east,powered=true": { "model": "electricadvantage:block/electric_pump_on", "y": 90 }, + "active=true,facing=north,powered=true": { "model": "electricadvantage:block/electric_pump_on" }, + "active=true,facing=south,powered=true": { "model": "electricadvantage:block/electric_pump_on", "y": 180 }, + "active=true,facing=west,powered=true": { "model": "electricadvantage:block/electric_pump_on", "y": 270 }, + "active=false,facing=east,powered=true": { "model": "electricadvantage:block/electric_pump_powered", "y": 90 }, + "active=false,facing=north,powered=true": { "model": "electricadvantage:block/electric_pump_powered" }, + "active=false,facing=south,powered=true": { "model": "electricadvantage:block/electric_pump_powered", "y": 180 }, + "active=false,facing=west,powered=true": { "model": "electricadvantage:block/electric_pump_powered", "y": 270 }, + "active=false,facing=east,powered=false": { "model": "electricadvantage:block/electric_pump_off", "y": 90 }, + "active=false,facing=north,powered=false": { "model": "electricadvantage:block/electric_pump_off" }, + "active=false,facing=south,powered=false": { "model": "electricadvantage:block/electric_pump_off", "y": 180 }, + "active=false,facing=west,powered=false": { "model": "electricadvantage:block/electric_pump_off", "y": 270 }, + "active=true,facing=east,powered=false": { "model": "electricadvantage:block/electric_pump_on", "y": 90 }, + "active=true,facing=north,powered=false": { "model": "electricadvantage:block/electric_pump_on" }, + "active=true,facing=south,powered=false": { "model": "electricadvantage:block/electric_pump_on", "y": 180 }, + "active=true,facing=west,powered=false": { "model": "electricadvantage:block/electric_pump_on", "y": 270 } + } +} diff --git a/src/main/resources/assets/electricadvantage/blockstates/electric_still.json b/src/main/resources/assets/electricadvantage/blockstates/electric_still.json index 78121b3..7d8c62a 100644 --- a/src/main/resources/assets/electricadvantage/blockstates/electric_still.json +++ b/src/main/resources/assets/electricadvantage/blockstates/electric_still.json @@ -1,20 +1,20 @@ -{ - "variants": { - "active=true,facing=east,powered=true": { "model": "electricadvantage:electric_still_on", "y": 90 }, - "active=true,facing=north,powered=true": { "model": "electricadvantage:electric_still_on" }, - "active=true,facing=south,powered=true": { "model": "electricadvantage:electric_still_on", "y": 180 }, - "active=true,facing=west,powered=true": { "model": "electricadvantage:electric_still_on", "y": 270 }, - "active=false,facing=east,powered=true": { "model": "electricadvantage:electric_still_powered", "y": 90 }, - "active=false,facing=north,powered=true": { "model": "electricadvantage:electric_still_powered" }, - "active=false,facing=south,powered=true": { "model": "electricadvantage:electric_still_powered", "y": 180 }, - "active=false,facing=west,powered=true": { "model": "electricadvantage:electric_still_powered", "y": 270 }, - "active=false,facing=east,powered=false": { "model": "electricadvantage:electric_still_off", "y": 90 }, - "active=false,facing=north,powered=false": { "model": "electricadvantage:electric_still_off" }, - "active=false,facing=south,powered=false": { "model": "electricadvantage:electric_still_off", "y": 180 }, - "active=false,facing=west,powered=false": { "model": "electricadvantage:electric_still_off", "y": 270 }, - "active=true,facing=east,powered=false": { "model": "electricadvantage:electric_still_on", "y": 90 }, - "active=true,facing=north,powered=false": { "model": "electricadvantage:electric_still_on" }, - "active=true,facing=south,powered=false": { "model": "electricadvantage:electric_still_on", "y": 180 }, - "active=true,facing=west,powered=false": { "model": "electricadvantage:electric_still_on", "y": 270 } - } -} +{ + "variants": { + "active=true,facing=east,powered=true": { "model": "electricadvantage:block/electric_still_on", "y": 90 }, + "active=true,facing=north,powered=true": { "model": "electricadvantage:block/electric_still_on" }, + "active=true,facing=south,powered=true": { "model": "electricadvantage:block/electric_still_on", "y": 180 }, + "active=true,facing=west,powered=true": { "model": "electricadvantage:block/electric_still_on", "y": 270 }, + "active=false,facing=east,powered=true": { "model": "electricadvantage:block/electric_still_powered", "y": 90 }, + "active=false,facing=north,powered=true": { "model": "electricadvantage:block/electric_still_powered" }, + "active=false,facing=south,powered=true": { "model": "electricadvantage:block/electric_still_powered", "y": 180 }, + "active=false,facing=west,powered=true": { "model": "electricadvantage:block/electric_still_powered", "y": 270 }, + "active=false,facing=east,powered=false": { "model": "electricadvantage:block/electric_still_off", "y": 90 }, + "active=false,facing=north,powered=false": { "model": "electricadvantage:block/electric_still_off" }, + "active=false,facing=south,powered=false": { "model": "electricadvantage:block/electric_still_off", "y": 180 }, + "active=false,facing=west,powered=false": { "model": "electricadvantage:block/electric_still_off", "y": 270 }, + "active=true,facing=east,powered=false": { "model": "electricadvantage:block/electric_still_on", "y": 90 }, + "active=true,facing=north,powered=false": { "model": "electricadvantage:block/electric_still_on" }, + "active=true,facing=south,powered=false": { "model": "electricadvantage:block/electric_still_on", "y": 180 }, + "active=true,facing=west,powered=false": { "model": "electricadvantage:block/electric_still_on", "y": 270 } + } +} diff --git a/src/main/resources/assets/electricadvantage/blockstates/electric_switch.json b/src/main/resources/assets/electricadvantage/blockstates/electric_switch.json index 321a2e9..82b5ec2 100644 --- a/src/main/resources/assets/electricadvantage/blockstates/electric_switch.json +++ b/src/main/resources/assets/electricadvantage/blockstates/electric_switch.json @@ -1,6 +1,6 @@ { "variants": { - "active=false": { "model": "electricadvantage:electric_switch_off"}, - "active=true": { "model": "electricadvantage:electric_switch_on"} + "active=false": { "model": "electricadvantage:block/electric_switch_off"}, + "active=true": { "model": "electricadvantage:block/electric_switch_on"} } } diff --git a/src/main/resources/assets/electricadvantage/blockstates/electric_track.json b/src/main/resources/assets/electricadvantage/blockstates/electric_track.json index d233151..956a5d1 100644 --- a/src/main/resources/assets/electricadvantage/blockstates/electric_track.json +++ b/src/main/resources/assets/electricadvantage/blockstates/electric_track.json @@ -1,70 +1,70 @@ { - "__comment": "blockstate parameters MUST be in alphabetical order!", + "__comment": "blockstate parameters MUST be in alphabetical order!", "variants": { - "down=false,east=false,north=false,south=false,up=false,west=false": { "model": "electricadvantage:electric_track_ensw", "x": 0, "y": 0, "uvlock": false }, - "down=true,east=false,north=false,south=false,up=false,west=false": { "model": "electricadvantage:electric_track_n", "x": 90, "y": 0, "uvlock": false }, - "down=false,east=true,north=false,south=false,up=false,west=false": { "model": "electricadvantage:electric_track_n", "x": 0, "y": 90, "uvlock": false }, - "down=false,east=false,north=true,south=false,up=false,west=false": { "model": "electricadvantage:electric_track_n", "x": 0, "y": 0, "uvlock": false }, - "down=false,east=false,north=false,south=true,up=false,west=false": { "model": "electricadvantage:electric_track_n", "x": 0, "y": 180, "uvlock": false }, - "down=false,east=false,north=false,south=false,up=true,west=false": { "model": "electricadvantage:electric_track_n", "x": 270, "y": 0, "uvlock": false }, - "down=false,east=false,north=false,south=false,up=false,west=true": { "model": "electricadvantage:electric_track_n", "x": 0, "y": 270, "uvlock": false }, - "down=true,east=true,north=false,south=false,up=false,west=false": { "model": "electricadvantage:electric_track_nw", "x": 90, "y": 180, "uvlock": false }, - "down=true,east=false,north=true,south=false,up=false,west=false": { "model": "electricadvantage:electric_track_nw", "x": 90, "y": 90, "uvlock": false }, - "down=true,east=false,north=false,south=true,up=false,west=false": { "model": "electricadvantage:electric_track_nw", "x": 90, "y": 270, "uvlock": false }, - "down=true,east=false,north=false,south=false,up=true,west=false": { "model": "electricadvantage:electric_track_ns", "x": 90, "y": 0, "uvlock": false }, - "down=true,east=false,north=false,south=false,up=false,west=true": { "model": "electricadvantage:electric_track_nw", "x": 90, "y": 0, "uvlock": false }, - "down=false,east=true,north=true,south=false,up=false,west=false": { "model": "electricadvantage:electric_track_nw", "x": 0, "y": 90, "uvlock": false }, - "down=false,east=true,north=false,south=true,up=false,west=false": { "model": "electricadvantage:electric_track_nw", "x": 0, "y": 180, "uvlock": false }, - "down=false,east=true,north=false,south=false,up=true,west=false": { "model": "electricadvantage:electric_track_nw", "x": 270, "y": 180, "uvlock": false }, - "down=false,east=true,north=false,south=false,up=false,west=true": { "model": "electricadvantage:electric_track_ns", "x": 0, "y": 90, "uvlock": false }, - "down=false,east=false,north=true,south=true,up=false,west=false": { "model": "electricadvantage:electric_track_ns", "x": 0, "y": 0, "uvlock": false }, - "down=false,east=false,north=true,south=false,up=true,west=false": { "model": "electricadvantage:electric_track_nw", "x": 270, "y": 90, "uvlock": false }, - "down=false,east=false,north=true,south=false,up=false,west=true": { "model": "electricadvantage:electric_track_nw", "x": 0, "y": 0, "uvlock": false }, - "down=false,east=false,north=false,south=true,up=true,west=false": { "model": "electricadvantage:electric_track_nw", "x": 270, "y": 270, "uvlock": false }, - "down=false,east=false,north=false,south=true,up=false,west=true": { "model": "electricadvantage:electric_track_nw", "x": 0, "y": 270, "uvlock": false }, - "down=false,east=false,north=false,south=false,up=true,west=true": { "model": "electricadvantage:electric_track_nw", "x": 270, "y": 0, "uvlock": false }, - "down=true,east=true,north=true,south=false,up=false,west=false": { "model": "electricadvantage:electric_track_nuw", "x": 90, "y": 90, "uvlock": false }, - "down=true,east=true,north=false,south=true,up=false,west=false": { "model": "electricadvantage:electric_track_nuw", "x": 90, "y": 180, "uvlock": false }, - "down=true,east=true,north=false,south=false,up=true,west=false": { "model": "electricadvantage:electric_track_dnu", "x": 0, "y": 90, "uvlock": false }, - "down=true,east=true,north=false,south=false,up=false,west=true": { "model": "electricadvantage:electric_track_dnu", "x": 90, "y": 90, "uvlock": false }, - "down=true,east=false,north=true,south=true,up=false,west=false": { "model": "electricadvantage:electric_track_dnu", "x": 90, "y": 0, "uvlock": false }, - "down=true,east=false,north=true,south=false,up=true,west=false": { "model": "electricadvantage:electric_track_dnu", "x": 0, "y": 0, "uvlock": false }, - "down=true,east=false,north=true,south=false,up=false,west=true": { "model": "electricadvantage:electric_track_nuw", "x": 90, "y": 0, "uvlock": false }, - "down=true,east=false,north=false,south=true,up=true,west=false": { "model": "electricadvantage:electric_track_dnu", "x": 0, "y": 180, "uvlock": false }, - "down=true,east=false,north=false,south=true,up=false,west=true": { "model": "electricadvantage:electric_track_nuw", "x": 90, "y": 270, "uvlock": false }, - "down=true,east=false,north=false,south=false,up=true,west=true": { "model": "electricadvantage:electric_track_dnu", "x": 0, "y": 270, "uvlock": false }, - "down=false,east=true,north=true,south=true,up=false,west=false": { "model": "electricadvantage:electric_track_nsw", "x": 0, "y": 180, "uvlock": false }, - "down=false,east=true,north=true,south=false,up=true,west=false": { "model": "electricadvantage:electric_track_nuw", "x": 0, "y": 90, "uvlock": false }, - "down=false,east=true,north=true,south=false,up=false,west=true": { "model": "electricadvantage:electric_track_nsw", "x": 0, "y": 90, "uvlock": false }, - "down=false,east=true,north=false,south=true,up=true,west=false": { "model": "electricadvantage:electric_track_nuw", "x": 0, "y": 180, "uvlock": false }, - "down=false,east=true,north=false,south=true,up=false,west=true": { "model": "electricadvantage:electric_track_nsw", "x": 0, "y": 270, "uvlock": false }, - "down=false,east=true,north=false,south=false,up=true,west=true": { "model": "electricadvantage:electric_track_dnu", "x": 270, "y": 90, "uvlock": false }, - "down=false,east=false,north=true,south=true,up=true,west=false": { "model": "electricadvantage:electric_track_dnu", "x": 270, "y": 0, "uvlock": false }, - "down=false,east=false,north=true,south=true,up=false,west=true": { "model": "electricadvantage:electric_track_nsw", "x": 0, "y": 0, "uvlock": false }, - "down=false,east=false,north=true,south=false,up=true,west=true": { "model": "electricadvantage:electric_track_nuw", "x": 0, "y": 0, "uvlock": false }, - "down=false,east=false,north=false,south=true,up=true,west=true": { "model": "electricadvantage:electric_track_nuw", "x": 0, "y": 270, "uvlock": false }, - "down=true,east=true,north=true,south=true,up=false,west=false": { "model": "electricadvantage:electric_track_nsuw", "x": 180, "y": 180, "uvlock": false }, - "down=true,east=true,north=true,south=false,up=true,west=false": { "model": "electricadvantage:electric_track_nsuw", "x": 90, "y": 90, "uvlock": false }, - "down=true,east=true,north=true,south=false,up=false,west=true": { "model": "electricadvantage:electric_track_nsuw", "x": 180, "y": 90, "uvlock": false }, - "down=true,east=true,north=false,south=true,up=true,west=false": { "model": "electricadvantage:electric_track_nsuw", "x": 90, "y": 180, "uvlock": false }, - "down=true,east=true,north=false,south=true,up=false,west=true": { "model": "electricadvantage:electric_track_nsuw", "x": 180, "y": 270, "uvlock": false }, - "down=true,east=true,north=false,south=false,up=true,west=true": { "model": "electricadvantage:electric_track_ensw", "x": 90, "y": 0, "uvlock": false }, - "down=true,east=false,north=true,south=true,up=true,west=false": { "model": "electricadvantage:electric_track_ensw", "x": 90, "y": 90, "uvlock": false }, - "down=true,east=false,north=true,south=true,up=false,west=true": { "model": "electricadvantage:electric_track_nsuw", "x": 180, "y": 0, "uvlock": false }, - "down=true,east=false,north=true,south=false,up=true,west=true": { "model": "electricadvantage:electric_track_nsuw", "x": 90, "y": 0, "uvlock": false }, - "down=true,east=false,north=false,south=true,up=true,west=true": { "model": "electricadvantage:electric_track_nsuw", "x": 90, "y": 270, "uvlock": false }, - "down=false,east=true,north=true,south=true,up=true,west=false": { "model": "electricadvantage:electric_track_nsuw", "x": 0, "y": 180, "uvlock": false }, - "down=false,east=true,north=true,south=true,up=false,west=true": { "model": "electricadvantage:electric_track_ensw", "x": 0, "y": 0, "uvlock": false }, - "down=false,east=true,north=true,south=false,up=true,west=true": { "model": "electricadvantage:electric_track_nsuw", "x": 0, "y": 90, "uvlock": false }, - "down=false,east=true,north=false,south=true,up=true,west=true": { "model": "electricadvantage:electric_track_nsuw", "x": 0, "y": 270, "uvlock": false }, - "down=false,east=false,north=true,south=true,up=true,west=true": { "model": "electricadvantage:electric_track_nsuw", "x": 0, "y": 0, "uvlock": false }, - "down=true,east=true,north=true,south=true,up=true,west=false": { "model": "electricadvantage:electric_track_desuw", "x": 0, "y": 270, "uvlock": false }, - "down=true,east=true,north=true,south=true,up=false,west=true": { "model": "electricadvantage:electric_track_desuw", "x": 270, "y": 0, "uvlock": false }, - "down=true,east=true,north=true,south=false,up=true,west=true": { "model": "electricadvantage:electric_track_desuw", "x": 0, "y": 180, "uvlock": false }, - "down=true,east=true,north=false,south=true,up=true,west=true": { "model": "electricadvantage:electric_track_desuw", "x": 0, "y": 0, "uvlock": false }, - "down=true,east=false,north=true,south=true,up=true,west=true": { "model": "electricadvantage:electric_track_desuw", "x": 0, "y": 90, "uvlock": false }, - "down=false,east=true,north=true,south=true,up=true,west=true": { "model": "electricadvantage:electric_track_desuw", "x": 90, "y": 0, "uvlock": false }, - "down=true,east=true,north=true,south=true,up=true,west=true": { "model": "electricadvantage:electric_track_densuw", "x": 0, "y": 0, "uvlock": false } - + "down=false,east=false,north=false,south=false,up=false,west=false": { "model": "electricadvantage:block/electric_track_ensw", "x": 0, "y": 0, "uvlock": false }, + "down=true,east=false,north=false,south=false,up=false,west=false": { "model": "electricadvantage:block/electric_track_n", "x": 90, "y": 0, "uvlock": false }, + "down=false,east=true,north=false,south=false,up=false,west=false": { "model": "electricadvantage:block/electric_track_n", "x": 0, "y": 90, "uvlock": false }, + "down=false,east=false,north=true,south=false,up=false,west=false": { "model": "electricadvantage:block/electric_track_n", "x": 0, "y": 0, "uvlock": false }, + "down=false,east=false,north=false,south=true,up=false,west=false": { "model": "electricadvantage:block/electric_track_n", "x": 0, "y": 180, "uvlock": false }, + "down=false,east=false,north=false,south=false,up=true,west=false": { "model": "electricadvantage:block/electric_track_n", "x": 270, "y": 0, "uvlock": false }, + "down=false,east=false,north=false,south=false,up=false,west=true": { "model": "electricadvantage:block/electric_track_n", "x": 0, "y": 270, "uvlock": false }, + "down=true,east=true,north=false,south=false,up=false,west=false": { "model": "electricadvantage:block/electric_track_nw", "x": 90, "y": 180, "uvlock": false }, + "down=true,east=false,north=true,south=false,up=false,west=false": { "model": "electricadvantage:block/electric_track_nw", "x": 90, "y": 90, "uvlock": false }, + "down=true,east=false,north=false,south=true,up=false,west=false": { "model": "electricadvantage:block/electric_track_nw", "x": 90, "y": 270, "uvlock": false }, + "down=true,east=false,north=false,south=false,up=true,west=false": { "model": "electricadvantage:block/electric_track_ns", "x": 90, "y": 0, "uvlock": false }, + "down=true,east=false,north=false,south=false,up=false,west=true": { "model": "electricadvantage:block/electric_track_nw", "x": 90, "y": 0, "uvlock": false }, + "down=false,east=true,north=true,south=false,up=false,west=false": { "model": "electricadvantage:block/electric_track_nw", "x": 0, "y": 90, "uvlock": false }, + "down=false,east=true,north=false,south=true,up=false,west=false": { "model": "electricadvantage:block/electric_track_nw", "x": 0, "y": 180, "uvlock": false }, + "down=false,east=true,north=false,south=false,up=true,west=false": { "model": "electricadvantage:block/electric_track_nw", "x": 270, "y": 180, "uvlock": false }, + "down=false,east=true,north=false,south=false,up=false,west=true": { "model": "electricadvantage:block/electric_track_ns", "x": 0, "y": 90, "uvlock": false }, + "down=false,east=false,north=true,south=true,up=false,west=false": { "model": "electricadvantage:block/electric_track_ns", "x": 0, "y": 0, "uvlock": false }, + "down=false,east=false,north=true,south=false,up=true,west=false": { "model": "electricadvantage:block/electric_track_nw", "x": 270, "y": 90, "uvlock": false }, + "down=false,east=false,north=true,south=false,up=false,west=true": { "model": "electricadvantage:block/electric_track_nw", "x": 0, "y": 0, "uvlock": false }, + "down=false,east=false,north=false,south=true,up=true,west=false": { "model": "electricadvantage:block/electric_track_nw", "x": 270, "y": 270, "uvlock": false }, + "down=false,east=false,north=false,south=true,up=false,west=true": { "model": "electricadvantage:block/electric_track_nw", "x": 0, "y": 270, "uvlock": false }, + "down=false,east=false,north=false,south=false,up=true,west=true": { "model": "electricadvantage:block/electric_track_nw", "x": 270, "y": 0, "uvlock": false }, + "down=true,east=true,north=true,south=false,up=false,west=false": { "model": "electricadvantage:block/electric_track_nuw", "x": 90, "y": 90, "uvlock": false }, + "down=true,east=true,north=false,south=true,up=false,west=false": { "model": "electricadvantage:block/electric_track_nuw", "x": 90, "y": 180, "uvlock": false }, + "down=true,east=true,north=false,south=false,up=true,west=false": { "model": "electricadvantage:block/electric_track_dnu", "x": 0, "y": 90, "uvlock": false }, + "down=true,east=true,north=false,south=false,up=false,west=true": { "model": "electricadvantage:block/electric_track_dnu", "x": 90, "y": 90, "uvlock": false }, + "down=true,east=false,north=true,south=true,up=false,west=false": { "model": "electricadvantage:block/electric_track_dnu", "x": 90, "y": 0, "uvlock": false }, + "down=true,east=false,north=true,south=false,up=true,west=false": { "model": "electricadvantage:block/electric_track_dnu", "x": 0, "y": 0, "uvlock": false }, + "down=true,east=false,north=true,south=false,up=false,west=true": { "model": "electricadvantage:block/electric_track_nuw", "x": 90, "y": 0, "uvlock": false }, + "down=true,east=false,north=false,south=true,up=true,west=false": { "model": "electricadvantage:block/electric_track_dnu", "x": 0, "y": 180, "uvlock": false }, + "down=true,east=false,north=false,south=true,up=false,west=true": { "model": "electricadvantage:block/electric_track_nuw", "x": 90, "y": 270, "uvlock": false }, + "down=true,east=false,north=false,south=false,up=true,west=true": { "model": "electricadvantage:block/electric_track_dnu", "x": 0, "y": 270, "uvlock": false }, + "down=false,east=true,north=true,south=true,up=false,west=false": { "model": "electricadvantage:block/electric_track_nsw", "x": 0, "y": 180, "uvlock": false }, + "down=false,east=true,north=true,south=false,up=true,west=false": { "model": "electricadvantage:block/electric_track_nuw", "x": 0, "y": 90, "uvlock": false }, + "down=false,east=true,north=true,south=false,up=false,west=true": { "model": "electricadvantage:block/electric_track_nsw", "x": 0, "y": 90, "uvlock": false }, + "down=false,east=true,north=false,south=true,up=true,west=false": { "model": "electricadvantage:block/electric_track_nuw", "x": 0, "y": 180, "uvlock": false }, + "down=false,east=true,north=false,south=true,up=false,west=true": { "model": "electricadvantage:block/electric_track_nsw", "x": 0, "y": 270, "uvlock": false }, + "down=false,east=true,north=false,south=false,up=true,west=true": { "model": "electricadvantage:block/electric_track_dnu", "x": 270, "y": 90, "uvlock": false }, + "down=false,east=false,north=true,south=true,up=true,west=false": { "model": "electricadvantage:block/electric_track_dnu", "x": 270, "y": 0, "uvlock": false }, + "down=false,east=false,north=true,south=true,up=false,west=true": { "model": "electricadvantage:block/electric_track_nsw", "x": 0, "y": 0, "uvlock": false }, + "down=false,east=false,north=true,south=false,up=true,west=true": { "model": "electricadvantage:block/electric_track_nuw", "x": 0, "y": 0, "uvlock": false }, + "down=false,east=false,north=false,south=true,up=true,west=true": { "model": "electricadvantage:block/electric_track_nuw", "x": 0, "y": 270, "uvlock": false }, + "down=true,east=true,north=true,south=true,up=false,west=false": { "model": "electricadvantage:block/electric_track_nsuw", "x": 180, "y": 180, "uvlock": false }, + "down=true,east=true,north=true,south=false,up=true,west=false": { "model": "electricadvantage:block/electric_track_nsuw", "x": 90, "y": 90, "uvlock": false }, + "down=true,east=true,north=true,south=false,up=false,west=true": { "model": "electricadvantage:block/electric_track_nsuw", "x": 180, "y": 90, "uvlock": false }, + "down=true,east=true,north=false,south=true,up=true,west=false": { "model": "electricadvantage:block/electric_track_nsuw", "x": 90, "y": 180, "uvlock": false }, + "down=true,east=true,north=false,south=true,up=false,west=true": { "model": "electricadvantage:block/electric_track_nsuw", "x": 180, "y": 270, "uvlock": false }, + "down=true,east=true,north=false,south=false,up=true,west=true": { "model": "electricadvantage:block/electric_track_ensw", "x": 90, "y": 0, "uvlock": false }, + "down=true,east=false,north=true,south=true,up=true,west=false": { "model": "electricadvantage:block/electric_track_ensw", "x": 90, "y": 90, "uvlock": false }, + "down=true,east=false,north=true,south=true,up=false,west=true": { "model": "electricadvantage:block/electric_track_nsuw", "x": 180, "y": 0, "uvlock": false }, + "down=true,east=false,north=true,south=false,up=true,west=true": { "model": "electricadvantage:block/electric_track_nsuw", "x": 90, "y": 0, "uvlock": false }, + "down=true,east=false,north=false,south=true,up=true,west=true": { "model": "electricadvantage:block/electric_track_nsuw", "x": 90, "y": 270, "uvlock": false }, + "down=false,east=true,north=true,south=true,up=true,west=false": { "model": "electricadvantage:block/electric_track_nsuw", "x": 0, "y": 180, "uvlock": false }, + "down=false,east=true,north=true,south=true,up=false,west=true": { "model": "electricadvantage:block/electric_track_ensw", "x": 0, "y": 0, "uvlock": false }, + "down=false,east=true,north=true,south=false,up=true,west=true": { "model": "electricadvantage:block/electric_track_nsuw", "x": 0, "y": 90, "uvlock": false }, + "down=false,east=true,north=false,south=true,up=true,west=true": { "model": "electricadvantage:block/electric_track_nsuw", "x": 0, "y": 270, "uvlock": false }, + "down=false,east=false,north=true,south=true,up=true,west=true": { "model": "electricadvantage:block/electric_track_nsuw", "x": 0, "y": 0, "uvlock": false }, + "down=true,east=true,north=true,south=true,up=true,west=false": { "model": "electricadvantage:block/electric_track_desuw", "x": 0, "y": 270, "uvlock": false }, + "down=true,east=true,north=true,south=true,up=false,west=true": { "model": "electricadvantage:block/electric_track_desuw", "x": 270, "y": 0, "uvlock": false }, + "down=true,east=true,north=true,south=false,up=true,west=true": { "model": "electricadvantage:block/electric_track_desuw", "x": 0, "y": 180, "uvlock": false }, + "down=true,east=true,north=false,south=true,up=true,west=true": { "model": "electricadvantage:block/electric_track_desuw", "x": 0, "y": 0, "uvlock": false }, + "down=true,east=false,north=true,south=true,up=true,west=true": { "model": "electricadvantage:block/electric_track_desuw", "x": 0, "y": 90, "uvlock": false }, + "down=false,east=true,north=true,south=true,up=true,west=true": { "model": "electricadvantage:block/electric_track_desuw", "x": 90, "y": 0, "uvlock": false }, + "down=true,east=true,north=true,south=true,up=true,west=true": { "model": "electricadvantage:block/electric_track_densuw", "x": 0, "y": 0, "uvlock": false } + } } \ No newline at end of file diff --git a/src/main/resources/assets/electricadvantage/blockstates/geothermal_generator.json b/src/main/resources/assets/electricadvantage/blockstates/geothermal_generator.json index ef7db1a..7ba200e 100644 --- a/src/main/resources/assets/electricadvantage/blockstates/geothermal_generator.json +++ b/src/main/resources/assets/electricadvantage/blockstates/geothermal_generator.json @@ -1,12 +1,12 @@ -{ - "variants": { - "active=true,facing=east": { "model": "electricadvantage:geothermal_generator", "y": 90 }, - "active=true,facing=north": { "model": "electricadvantage:geothermal_generator" }, - "active=true,facing=south": { "model": "electricadvantage:geothermal_generator", "y": 180 }, - "active=true,facing=west": { "model": "electricadvantage:geothermal_generator", "y": 270 }, - "active=false,facing=east": { "model": "electricadvantage:geothermal_generator", "y": 90 }, - "active=false,facing=north": { "model": "electricadvantage:geothermal_generator" }, - "active=false,facing=south": { "model": "electricadvantage:geothermal_generator", "y": 180 }, - "active=false,facing=west": { "model": "electricadvantage:geothermal_generator", "y": 270 } - } -} +{ + "variants": { + "active=true,facing=east": { "model": "electricadvantage:block/geothermal_generator", "y": 90 }, + "active=true,facing=north": { "model": "electricadvantage:block/geothermal_generator" }, + "active=true,facing=south": { "model": "electricadvantage:block/geothermal_generator", "y": 180 }, + "active=true,facing=west": { "model": "electricadvantage:block/geothermal_generator", "y": 270 }, + "active=false,facing=east": { "model": "electricadvantage:block/geothermal_generator", "y": 90 }, + "active=false,facing=north": { "model": "electricadvantage:block/geothermal_generator" }, + "active=false,facing=south": { "model": "electricadvantage:block/geothermal_generator", "y": 180 }, + "active=false,facing=west": { "model": "electricadvantage:block/geothermal_generator", "y": 270 } + } +} diff --git a/src/main/resources/assets/electricadvantage/blockstates/growth_chamber.json b/src/main/resources/assets/electricadvantage/blockstates/growth_chamber.json index 676a59b..1bd9fd9 100644 --- a/src/main/resources/assets/electricadvantage/blockstates/growth_chamber.json +++ b/src/main/resources/assets/electricadvantage/blockstates/growth_chamber.json @@ -1,20 +1,20 @@ -{ - "variants": { - "active=true,facing=east,powered=true": { "model": "electricadvantage:growth_chamber_on", "y": 90 }, - "active=true,facing=north,powered=true": { "model": "electricadvantage:growth_chamber_on" }, - "active=true,facing=south,powered=true": { "model": "electricadvantage:growth_chamber_on", "y": 180 }, - "active=true,facing=west,powered=true": { "model": "electricadvantage:growth_chamber_on", "y": 270 }, - "active=false,facing=east,powered=true": { "model": "electricadvantage:growth_chamber_powered", "y": 90 }, - "active=false,facing=north,powered=true": { "model": "electricadvantage:growth_chamber_powered" }, - "active=false,facing=south,powered=true": { "model": "electricadvantage:growth_chamber_powered", "y": 180 }, - "active=false,facing=west,powered=true": { "model": "electricadvantage:growth_chamber_powered", "y": 270 }, - "active=false,facing=east,powered=false": { "model": "electricadvantage:growth_chamber_off", "y": 90 }, - "active=false,facing=north,powered=false": { "model": "electricadvantage:growth_chamber_off" }, - "active=false,facing=south,powered=false": { "model": "electricadvantage:growth_chamber_off", "y": 180 }, - "active=false,facing=west,powered=false": { "model": "electricadvantage:growth_chamber_off", "y": 270 }, - "active=true,facing=east,powered=false": { "model": "electricadvantage:growth_chamber_on", "y": 90 }, - "active=true,facing=north,powered=false": { "model": "electricadvantage:growth_chamber_on" }, - "active=true,facing=south,powered=false": { "model": "electricadvantage:growth_chamber_on", "y": 180 }, - "active=true,facing=west,powered=false": { "model": "electricadvantage:growth_chamber_on", "y": 270 } - } -} +{ + "variants": { + "active=true,facing=east,powered=true": { "model": "electricadvantage:block/growth_chamber_on", "y": 90 }, + "active=true,facing=north,powered=true": { "model": "electricadvantage:block/growth_chamber_on" }, + "active=true,facing=south,powered=true": { "model": "electricadvantage:block/growth_chamber_on", "y": 180 }, + "active=true,facing=west,powered=true": { "model": "electricadvantage:block/growth_chamber_on", "y": 270 }, + "active=false,facing=east,powered=true": { "model": "electricadvantage:block/growth_chamber_powered", "y": 90 }, + "active=false,facing=north,powered=true": { "model": "electricadvantage:block/growth_chamber_powered" }, + "active=false,facing=south,powered=true": { "model": "electricadvantage:block/growth_chamber_powered", "y": 180 }, + "active=false,facing=west,powered=true": { "model": "electricadvantage:block/growth_chamber_powered", "y": 270 }, + "active=false,facing=east,powered=false": { "model": "electricadvantage:block/growth_chamber_off", "y": 90 }, + "active=false,facing=north,powered=false": { "model": "electricadvantage:block/growth_chamber_off" }, + "active=false,facing=south,powered=false": { "model": "electricadvantage:block/growth_chamber_off", "y": 180 }, + "active=false,facing=west,powered=false": { "model": "electricadvantage:block/growth_chamber_off", "y": 270 }, + "active=true,facing=east,powered=false": { "model": "electricadvantage:block/growth_chamber_on", "y": 90 }, + "active=true,facing=north,powered=false": { "model": "electricadvantage:block/growth_chamber_on" }, + "active=true,facing=south,powered=false": { "model": "electricadvantage:block/growth_chamber_on", "y": 180 }, + "active=true,facing=west,powered=false": { "model": "electricadvantage:block/growth_chamber_on", "y": 270 } + } +} diff --git a/src/main/resources/assets/electricadvantage/blockstates/growth_chamber_controller.json b/src/main/resources/assets/electricadvantage/blockstates/growth_chamber_controller.json index 39e4d21..cb5898e 100644 --- a/src/main/resources/assets/electricadvantage/blockstates/growth_chamber_controller.json +++ b/src/main/resources/assets/electricadvantage/blockstates/growth_chamber_controller.json @@ -1,8 +1,8 @@ -{ - "variants": { - "facing=east": { "model": "electricadvantage:growth_chamber_controller", "y": 90 }, - "facing=north": { "model": "electricadvantage:growth_chamber_controller" }, - "facing=south": { "model": "electricadvantage:growth_chamber_controller", "y": 180 }, - "facing=west": { "model": "electricadvantage:growth_chamber_controller", "y": 270 } - } -} +{ + "variants": { + "facing=east": { "model": "electricadvantage:block/growth_chamber_controller", "y": 90 }, + "facing=north": { "model": "electricadvantage:block/growth_chamber_controller" }, + "facing=south": { "model": "electricadvantage:block/growth_chamber_controller", "y": 180 }, + "facing=west": { "model": "electricadvantage:block/growth_chamber_controller", "y": 270 } + } +} diff --git a/src/main/resources/assets/electricadvantage/blockstates/hydroelectric_generator.json b/src/main/resources/assets/electricadvantage/blockstates/hydroelectric_generator.json index af7dee5..09f47e8 100644 --- a/src/main/resources/assets/electricadvantage/blockstates/hydroelectric_generator.json +++ b/src/main/resources/assets/electricadvantage/blockstates/hydroelectric_generator.json @@ -1,12 +1,12 @@ -{ - "variants": { - "active=true,facing=east": { "model": "electricadvantage:hydroelectric_generator_on", "y": 90 }, - "active=true,facing=north": { "model": "electricadvantage:hydroelectric_generator_on" }, - "active=true,facing=south": { "model": "electricadvantage:hydroelectric_generator_on", "y": 180 }, - "active=true,facing=west": { "model": "electricadvantage:hydroelectric_generator_on", "y": 270 }, - "active=false,facing=east": { "model": "electricadvantage:hydroelectric_generator_off", "y": 90 }, - "active=false,facing=north": { "model": "electricadvantage:hydroelectric_generator_off" }, - "active=false,facing=south": { "model": "electricadvantage:hydroelectric_generator_off", "y": 180 }, - "active=false,facing=west": { "model": "electricadvantage:hydroelectric_generator_off", "y": 270 } - } -} +{ + "variants": { + "active=true,facing=east": { "model": "electricadvantage:block/hydroelectric_generator_on", "y": 90 }, + "active=true,facing=north": { "model": "electricadvantage:block/hydroelectric_generator_on" }, + "active=true,facing=south": { "model": "electricadvantage:block/hydroelectric_generator_on", "y": 180 }, + "active=true,facing=west": { "model": "electricadvantage:block/hydroelectric_generator_on", "y": 270 }, + "active=false,facing=east": { "model": "electricadvantage:block/hydroelectric_generator_off", "y": 90 }, + "active=false,facing=north": { "model": "electricadvantage:block/hydroelectric_generator_off" }, + "active=false,facing=south": { "model": "electricadvantage:block/hydroelectric_generator_off", "y": 180 }, + "active=false,facing=west": { "model": "electricadvantage:block/hydroelectric_generator_off", "y": 270 } + } +} diff --git a/src/main/resources/assets/electricadvantage/blockstates/laser_turret.json b/src/main/resources/assets/electricadvantage/blockstates/laser_turret.json index 2ef9b07..fa7adcd 100644 --- a/src/main/resources/assets/electricadvantage/blockstates/laser_turret.json +++ b/src/main/resources/assets/electricadvantage/blockstates/laser_turret.json @@ -1,20 +1,20 @@ -{ - "variants": { - "active=true,facing=east,powered=true": { "model": "electricadvantage:laser_turret", "y": 90 }, - "active=true,facing=north,powered=true": { "model": "electricadvantage:laser_turret" }, - "active=true,facing=south,powered=true": { "model": "electricadvantage:laser_turret", "y": 180 }, - "active=true,facing=west,powered=true": { "model": "electricadvantage:laser_turret", "y": 270 }, - "active=false,facing=east,powered=true": { "model": "electricadvantage:laser_turret", "y": 90 }, - "active=false,facing=north,powered=true": { "model": "electricadvantage:laser_turret" }, - "active=false,facing=south,powered=true": { "model": "electricadvantage:laser_turret", "y": 180 }, - "active=false,facing=west,powered=true": { "model": "electricadvantage:laser_turret", "y": 270 }, - "active=false,facing=east,powered=false": { "model": "electricadvantage:laser_turret", "y": 90 }, - "active=false,facing=north,powered=false": { "model": "electricadvantage:laser_turret" }, - "active=false,facing=south,powered=false": { "model": "electricadvantage:laser_turret", "y": 180 }, - "active=false,facing=west,powered=false": { "model": "electricadvantage:laser_turret", "y": 270 }, - "active=true,facing=east,powered=false": { "model": "electricadvantage:laser_turret", "y": 90 }, - "active=true,facing=north,powered=false": { "model": "electricadvantage:laser_turret" }, - "active=true,facing=south,powered=false": { "model": "electricadvantage:laser_turret", "y": 180 }, - "active=true,facing=west,powered=false": { "model": "electricadvantage:laser_turret", "y": 270 } - } -} +{ + "variants": { + "active=true,facing=east,powered=true": { "model": "electricadvantage:block/laser_turret", "y": 90 }, + "active=true,facing=north,powered=true": { "model": "electricadvantage:block/laser_turret" }, + "active=true,facing=south,powered=true": { "model": "electricadvantage:block/laser_turret", "y": 180 }, + "active=true,facing=west,powered=true": { "model": "electricadvantage:block/laser_turret", "y": 270 }, + "active=false,facing=east,powered=true": { "model": "electricadvantage:block/laser_turret", "y": 90 }, + "active=false,facing=north,powered=true": { "model": "electricadvantage:block/laser_turret" }, + "active=false,facing=south,powered=true": { "model": "electricadvantage:block/laser_turret", "y": 180 }, + "active=false,facing=west,powered=true": { "model": "electricadvantage:block/laser_turret", "y": 270 }, + "active=false,facing=east,powered=false": { "model": "electricadvantage:block/laser_turret", "y": 90 }, + "active=false,facing=north,powered=false": { "model": "electricadvantage:block/laser_turret" }, + "active=false,facing=south,powered=false": { "model": "electricadvantage:block/laser_turret", "y": 180 }, + "active=false,facing=west,powered=false": { "model": "electricadvantage:block/laser_turret", "y": 270 }, + "active=true,facing=east,powered=false": { "model": "electricadvantage:block/laser_turret", "y": 90 }, + "active=true,facing=north,powered=false": { "model": "electricadvantage:block/laser_turret" }, + "active=true,facing=south,powered=false": { "model": "electricadvantage:block/laser_turret", "y": 180 }, + "active=true,facing=west,powered=false": { "model": "electricadvantage:block/laser_turret", "y": 270 } + } +} diff --git a/src/main/resources/assets/electricadvantage/blockstates/laser_turret_evil.json b/src/main/resources/assets/electricadvantage/blockstates/laser_turret_evil.json index 2ef9b07..fa7adcd 100644 --- a/src/main/resources/assets/electricadvantage/blockstates/laser_turret_evil.json +++ b/src/main/resources/assets/electricadvantage/blockstates/laser_turret_evil.json @@ -1,20 +1,20 @@ -{ - "variants": { - "active=true,facing=east,powered=true": { "model": "electricadvantage:laser_turret", "y": 90 }, - "active=true,facing=north,powered=true": { "model": "electricadvantage:laser_turret" }, - "active=true,facing=south,powered=true": { "model": "electricadvantage:laser_turret", "y": 180 }, - "active=true,facing=west,powered=true": { "model": "electricadvantage:laser_turret", "y": 270 }, - "active=false,facing=east,powered=true": { "model": "electricadvantage:laser_turret", "y": 90 }, - "active=false,facing=north,powered=true": { "model": "electricadvantage:laser_turret" }, - "active=false,facing=south,powered=true": { "model": "electricadvantage:laser_turret", "y": 180 }, - "active=false,facing=west,powered=true": { "model": "electricadvantage:laser_turret", "y": 270 }, - "active=false,facing=east,powered=false": { "model": "electricadvantage:laser_turret", "y": 90 }, - "active=false,facing=north,powered=false": { "model": "electricadvantage:laser_turret" }, - "active=false,facing=south,powered=false": { "model": "electricadvantage:laser_turret", "y": 180 }, - "active=false,facing=west,powered=false": { "model": "electricadvantage:laser_turret", "y": 270 }, - "active=true,facing=east,powered=false": { "model": "electricadvantage:laser_turret", "y": 90 }, - "active=true,facing=north,powered=false": { "model": "electricadvantage:laser_turret" }, - "active=true,facing=south,powered=false": { "model": "electricadvantage:laser_turret", "y": 180 }, - "active=true,facing=west,powered=false": { "model": "electricadvantage:laser_turret", "y": 270 } - } -} +{ + "variants": { + "active=true,facing=east,powered=true": { "model": "electricadvantage:block/laser_turret", "y": 90 }, + "active=true,facing=north,powered=true": { "model": "electricadvantage:block/laser_turret" }, + "active=true,facing=south,powered=true": { "model": "electricadvantage:block/laser_turret", "y": 180 }, + "active=true,facing=west,powered=true": { "model": "electricadvantage:block/laser_turret", "y": 270 }, + "active=false,facing=east,powered=true": { "model": "electricadvantage:block/laser_turret", "y": 90 }, + "active=false,facing=north,powered=true": { "model": "electricadvantage:block/laser_turret" }, + "active=false,facing=south,powered=true": { "model": "electricadvantage:block/laser_turret", "y": 180 }, + "active=false,facing=west,powered=true": { "model": "electricadvantage:block/laser_turret", "y": 270 }, + "active=false,facing=east,powered=false": { "model": "electricadvantage:block/laser_turret", "y": 90 }, + "active=false,facing=north,powered=false": { "model": "electricadvantage:block/laser_turret" }, + "active=false,facing=south,powered=false": { "model": "electricadvantage:block/laser_turret", "y": 180 }, + "active=false,facing=west,powered=false": { "model": "electricadvantage:block/laser_turret", "y": 270 }, + "active=true,facing=east,powered=false": { "model": "electricadvantage:block/laser_turret", "y": 90 }, + "active=true,facing=north,powered=false": { "model": "electricadvantage:block/laser_turret" }, + "active=true,facing=south,powered=false": { "model": "electricadvantage:block/laser_turret", "y": 180 }, + "active=true,facing=west,powered=false": { "model": "electricadvantage:block/laser_turret", "y": 270 } + } +} diff --git a/src/main/resources/assets/electricadvantage/blockstates/led_bar.json b/src/main/resources/assets/electricadvantage/blockstates/led_bar.json index 2d13c59..3a538f5 100644 --- a/src/main/resources/assets/electricadvantage/blockstates/led_bar.json +++ b/src/main/resources/assets/electricadvantage/blockstates/led_bar.json @@ -1,134 +1,134 @@ { - "__comment": "blockstate parameters MUST be in alphabetical order!", + "__comment": "blockstate parameters MUST be in alphabetical order!", "variants": { - "down=false,east=false,lit=false,north=false,south=false,up=false,west=false": { "model": "electricadvantage:led_bar_off_n", "x": 90, "y": 0, "uvlock": false }, - "down=true,east=false,lit=false,north=false,south=false,up=false,west=false": { "model": "electricadvantage:led_bar_off_n", "x": 90, "y": 0, "uvlock": false }, - "down=false,east=true,lit=false,north=false,south=false,up=false,west=false": { "model": "electricadvantage:led_bar_off_n", "x": 0, "y": 90, "uvlock": false }, - "down=false,east=false,lit=false,north=true,south=false,up=false,west=false": { "model": "electricadvantage:led_bar_off_n", "x": 0, "y": 0, "uvlock": false }, - "down=false,east=false,lit=false,north=false,south=true,up=false,west=false": { "model": "electricadvantage:led_bar_off_n", "x": 0, "y": 180, "uvlock": false }, - "down=false,east=false,lit=false,north=false,south=false,up=true,west=false": { "model": "electricadvantage:led_bar_off_n", "x": 270, "y": 0, "uvlock": false }, - "down=false,east=false,lit=false,north=false,south=false,up=false,west=true": { "model": "electricadvantage:led_bar_off_n", "x": 0, "y": 270, "uvlock": false }, - "down=true,east=true,lit=false,north=false,south=false,up=false,west=false": { "model": "electricadvantage:led_bar_off_nw", "x": 90, "y": 180, "uvlock": false }, - "down=true,east=false,lit=false,north=true,south=false,up=false,west=false": { "model": "electricadvantage:led_bar_off_nw", "x": 90, "y": 90, "uvlock": false }, - "down=true,east=false,lit=false,north=false,south=true,up=false,west=false": { "model": "electricadvantage:led_bar_off_nw", "x": 90, "y": 270, "uvlock": false }, - "down=true,east=false,lit=false,north=false,south=false,up=true,west=false": { "model": "electricadvantage:led_bar_off_ns", "x": 90, "y": 0, "uvlock": false }, - "down=true,east=false,lit=false,north=false,south=false,up=false,west=true": { "model": "electricadvantage:led_bar_off_nw", "x": 90, "y": 0, "uvlock": false }, - "down=false,east=true,lit=false,north=true,south=false,up=false,west=false": { "model": "electricadvantage:led_bar_off_nw", "x": 0, "y": 90, "uvlock": false }, - "down=false,east=true,lit=false,north=false,south=true,up=false,west=false": { "model": "electricadvantage:led_bar_off_nw", "x": 0, "y": 180, "uvlock": false }, - "down=false,east=true,lit=false,north=false,south=false,up=true,west=false": { "model": "electricadvantage:led_bar_off_nw", "x": 270, "y": 180, "uvlock": false }, - "down=false,east=true,lit=false,north=false,south=false,up=false,west=true": { "model": "electricadvantage:led_bar_off_ns", "x": 0, "y": 90, "uvlock": false }, - "down=false,east=false,lit=false,north=true,south=true,up=false,west=false": { "model": "electricadvantage:led_bar_off_ns", "x": 0, "y": 0, "uvlock": false }, - "down=false,east=false,lit=false,north=true,south=false,up=true,west=false": { "model": "electricadvantage:led_bar_off_nw", "x": 270, "y": 90, "uvlock": false }, - "down=false,east=false,lit=false,north=true,south=false,up=false,west=true": { "model": "electricadvantage:led_bar_off_nw", "x": 0, "y": 0, "uvlock": false }, - "down=false,east=false,lit=false,north=false,south=true,up=true,west=false": { "model": "electricadvantage:led_bar_off_nw", "x": 270, "y": 270, "uvlock": false }, - "down=false,east=false,lit=false,north=false,south=true,up=false,west=true": { "model": "electricadvantage:led_bar_off_nw", "x": 0, "y": 270, "uvlock": false }, - "down=false,east=false,lit=false,north=false,south=false,up=true,west=true": { "model": "electricadvantage:led_bar_off_nw", "x": 270, "y": 0, "uvlock": false }, - "down=true,east=true,lit=false,north=true,south=false,up=false,west=false": { "model": "electricadvantage:led_bar_off_nuw", "x": 90, "y": 90, "uvlock": false }, - "down=true,east=true,lit=false,north=false,south=true,up=false,west=false": { "model": "electricadvantage:led_bar_off_nuw", "x": 90, "y": 180, "uvlock": false }, - "down=true,east=true,lit=false,north=false,south=false,up=true,west=false": { "model": "electricadvantage:led_bar_off_dnu", "x": 0, "y": 90, "uvlock": false }, - "down=true,east=true,lit=false,north=false,south=false,up=false,west=true": { "model": "electricadvantage:led_bar_off_dnu", "x": 90, "y": 90, "uvlock": false }, - "down=true,east=false,lit=false,north=true,south=true,up=false,west=false": { "model": "electricadvantage:led_bar_off_dnu", "x": 90, "y": 0, "uvlock": false }, - "down=true,east=false,lit=false,north=true,south=false,up=true,west=false": { "model": "electricadvantage:led_bar_off_dnu", "x": 0, "y": 0, "uvlock": false }, - "down=true,east=false,lit=false,north=true,south=false,up=false,west=true": { "model": "electricadvantage:led_bar_off_nuw", "x": 90, "y": 0, "uvlock": false }, - "down=true,east=false,lit=false,north=false,south=true,up=true,west=false": { "model": "electricadvantage:led_bar_off_dnu", "x": 0, "y": 180, "uvlock": false }, - "down=true,east=false,lit=false,north=false,south=true,up=false,west=true": { "model": "electricadvantage:led_bar_off_nuw", "x": 90, "y": 270, "uvlock": false }, - "down=true,east=false,lit=false,north=false,south=false,up=true,west=true": { "model": "electricadvantage:led_bar_off_dnu", "x": 0, "y": 270, "uvlock": false }, - "down=false,east=true,lit=false,north=true,south=true,up=false,west=false": { "model": "electricadvantage:led_bar_off_nsw", "x": 0, "y": 180, "uvlock": false }, - "down=false,east=true,lit=false,north=true,south=false,up=true,west=false": { "model": "electricadvantage:led_bar_off_nuw", "x": 0, "y": 90, "uvlock": false }, - "down=false,east=true,lit=false,north=true,south=false,up=false,west=true": { "model": "electricadvantage:led_bar_off_nsw", "x": 0, "y": 90, "uvlock": false }, - "down=false,east=true,lit=false,north=false,south=true,up=true,west=false": { "model": "electricadvantage:led_bar_off_nuw", "x": 0, "y": 180, "uvlock": false }, - "down=false,east=true,lit=false,north=false,south=true,up=false,west=true": { "model": "electricadvantage:led_bar_off_nsw", "x": 0, "y": 270, "uvlock": false }, - "down=false,east=true,lit=false,north=false,south=false,up=true,west=true": { "model": "electricadvantage:led_bar_off_dnu", "x": 270, "y": 90, "uvlock": false }, - "down=false,east=false,lit=false,north=true,south=true,up=true,west=false": { "model": "electricadvantage:led_bar_off_dnu", "x": 270, "y": 0, "uvlock": false }, - "down=false,east=false,lit=false,north=true,south=true,up=false,west=true": { "model": "electricadvantage:led_bar_off_nsw", "x": 0, "y": 0, "uvlock": false }, - "down=false,east=false,lit=false,north=true,south=false,up=true,west=true": { "model": "electricadvantage:led_bar_off_nuw", "x": 0, "y": 0, "uvlock": false }, - "down=false,east=false,lit=false,north=false,south=true,up=true,west=true": { "model": "electricadvantage:led_bar_off_nuw", "x": 0, "y": 270, "uvlock": false }, - "down=true,east=true,lit=false,north=true,south=true,up=false,west=false": { "model": "electricadvantage:led_bar_off_nsuw", "x": 180, "y": 180, "uvlock": false }, - "down=true,east=true,lit=false,north=true,south=false,up=true,west=false": { "model": "electricadvantage:led_bar_off_nsuw", "x": 90, "y": 90, "uvlock": false }, - "down=true,east=true,lit=false,north=true,south=false,up=false,west=true": { "model": "electricadvantage:led_bar_off_nsuw", "x": 180, "y": 90, "uvlock": false }, - "down=true,east=true,lit=false,north=false,south=true,up=true,west=false": { "model": "electricadvantage:led_bar_off_nsuw", "x": 90, "y": 180, "uvlock": false }, - "down=true,east=true,lit=false,north=false,south=true,up=false,west=true": { "model": "electricadvantage:led_bar_off_nsuw", "x": 180, "y": 270, "uvlock": false }, - "down=true,east=true,lit=false,north=false,south=false,up=true,west=true": { "model": "electricadvantage:led_bar_off_ensw", "x": 90, "y": 0, "uvlock": false }, - "down=true,east=false,lit=false,north=true,south=true,up=true,west=false": { "model": "electricadvantage:led_bar_off_ensw", "x": 90, "y": 90, "uvlock": false }, - "down=true,east=false,lit=false,north=true,south=true,up=false,west=true": { "model": "electricadvantage:led_bar_off_nsuw", "x": 180, "y": 0, "uvlock": false }, - "down=true,east=false,lit=false,north=true,south=false,up=true,west=true": { "model": "electricadvantage:led_bar_off_nsuw", "x": 90, "y": 0, "uvlock": false }, - "down=true,east=false,lit=false,north=false,south=true,up=true,west=true": { "model": "electricadvantage:led_bar_off_nsuw", "x": 90, "y": 270, "uvlock": false }, - "down=false,east=true,lit=false,north=true,south=true,up=true,west=false": { "model": "electricadvantage:led_bar_off_nsuw", "x": 0, "y": 180, "uvlock": false }, - "down=false,east=true,lit=false,north=true,south=true,up=false,west=true": { "model": "electricadvantage:led_bar_off_ensw", "x": 0, "y": 0, "uvlock": false }, - "down=false,east=true,lit=false,north=true,south=false,up=true,west=true": { "model": "electricadvantage:led_bar_off_nsuw", "x": 0, "y": 90, "uvlock": false }, - "down=false,east=true,lit=false,north=false,south=true,up=true,west=true": { "model": "electricadvantage:led_bar_off_nsuw", "x": 0, "y": 270, "uvlock": false }, - "down=false,east=false,lit=false,north=true,south=true,up=true,west=true": { "model": "electricadvantage:led_bar_off_nsuw", "x": 0, "y": 0, "uvlock": false }, - "down=true,east=true,lit=false,north=true,south=true,up=true,west=false": { "model": "electricadvantage:led_bar_off_desuw", "x": 0, "y": 270, "uvlock": false }, - "down=true,east=true,lit=false,north=true,south=true,up=false,west=true": { "model": "electricadvantage:led_bar_off_desuw", "x": 270, "y": 0, "uvlock": false }, - "down=true,east=true,lit=false,north=true,south=false,up=true,west=true": { "model": "electricadvantage:led_bar_off_desuw", "x": 0, "y": 180, "uvlock": false }, - "down=true,east=true,lit=false,north=false,south=true,up=true,west=true": { "model": "electricadvantage:led_bar_off_desuw", "x": 0, "y": 0, "uvlock": false }, - "down=true,east=false,lit=false,north=true,south=true,up=true,west=true": { "model": "electricadvantage:led_bar_off_desuw", "x": 0, "y": 90, "uvlock": false }, - "down=false,east=true,lit=false,north=true,south=true,up=true,west=true": { "model": "electricadvantage:led_bar_off_desuw", "x": 90, "y": 0, "uvlock": false }, - "down=true,east=true,lit=false,north=true,south=true,up=true,west=true": { "model": "electricadvantage:led_bar_off_densuw", "x": 0, "y": 0, "uvlock": false }, - - "down=false,east=false,lit=true,north=false,south=false,up=false,west=false": { "model": "electricadvantage:led_bar_on_n", "x": 90, "y": 0, "uvlock": false }, - "down=true,east=false,lit=true,north=false,south=false,up=false,west=false": { "model": "electricadvantage:led_bar_on_n", "x": 90, "y": 0, "uvlock": false }, - "down=false,east=true,lit=true,north=false,south=false,up=false,west=false": { "model": "electricadvantage:led_bar_on_n", "x": 0, "y": 90, "uvlock": false }, - "down=false,east=false,lit=true,north=true,south=false,up=false,west=false": { "model": "electricadvantage:led_bar_on_n", "x": 0, "y": 0, "uvlock": false }, - "down=false,east=false,lit=true,north=false,south=true,up=false,west=false": { "model": "electricadvantage:led_bar_on_n", "x": 0, "y": 180, "uvlock": false }, - "down=false,east=false,lit=true,north=false,south=false,up=true,west=false": { "model": "electricadvantage:led_bar_on_n", "x": 270, "y": 0, "uvlock": false }, - "down=false,east=false,lit=true,north=false,south=false,up=false,west=true": { "model": "electricadvantage:led_bar_on_n", "x": 0, "y": 270, "uvlock": false }, - "down=true,east=true,lit=true,north=false,south=false,up=false,west=false": { "model": "electricadvantage:led_bar_on_nw", "x": 90, "y": 180, "uvlock": false }, - "down=true,east=false,lit=true,north=true,south=false,up=false,west=false": { "model": "electricadvantage:led_bar_on_nw", "x": 90, "y": 90, "uvlock": false }, - "down=true,east=false,lit=true,north=false,south=true,up=false,west=false": { "model": "electricadvantage:led_bar_on_nw", "x": 90, "y": 270, "uvlock": false }, - "down=true,east=false,lit=true,north=false,south=false,up=true,west=false": { "model": "electricadvantage:led_bar_on_ns", "x": 90, "y": 0, "uvlock": false }, - "down=true,east=false,lit=true,north=false,south=false,up=false,west=true": { "model": "electricadvantage:led_bar_on_nw", "x": 90, "y": 0, "uvlock": false }, - "down=false,east=true,lit=true,north=true,south=false,up=false,west=false": { "model": "electricadvantage:led_bar_on_nw", "x": 0, "y": 90, "uvlock": false }, - "down=false,east=true,lit=true,north=false,south=true,up=false,west=false": { "model": "electricadvantage:led_bar_on_nw", "x": 0, "y": 180, "uvlock": false }, - "down=false,east=true,lit=true,north=false,south=false,up=true,west=false": { "model": "electricadvantage:led_bar_on_nw", "x": 270, "y": 180, "uvlock": false }, - "down=false,east=true,lit=true,north=false,south=false,up=false,west=true": { "model": "electricadvantage:led_bar_on_ns", "x": 0, "y": 90, "uvlock": false }, - "down=false,east=false,lit=true,north=true,south=true,up=false,west=false": { "model": "electricadvantage:led_bar_on_ns", "x": 0, "y": 0, "uvlock": false }, - "down=false,east=false,lit=true,north=true,south=false,up=true,west=false": { "model": "electricadvantage:led_bar_on_nw", "x": 270, "y": 90, "uvlock": false }, - "down=false,east=false,lit=true,north=true,south=false,up=false,west=true": { "model": "electricadvantage:led_bar_on_nw", "x": 0, "y": 0, "uvlock": false }, - "down=false,east=false,lit=true,north=false,south=true,up=true,west=false": { "model": "electricadvantage:led_bar_on_nw", "x": 270, "y": 270, "uvlock": false }, - "down=false,east=false,lit=true,north=false,south=true,up=false,west=true": { "model": "electricadvantage:led_bar_on_nw", "x": 0, "y": 270, "uvlock": false }, - "down=false,east=false,lit=true,north=false,south=false,up=true,west=true": { "model": "electricadvantage:led_bar_on_nw", "x": 270, "y": 0, "uvlock": false }, - "down=true,east=true,lit=true,north=true,south=false,up=false,west=false": { "model": "electricadvantage:led_bar_on_nuw", "x": 90, "y": 90, "uvlock": false }, - "down=true,east=true,lit=true,north=false,south=true,up=false,west=false": { "model": "electricadvantage:led_bar_on_nuw", "x": 90, "y": 180, "uvlock": false }, - "down=true,east=true,lit=true,north=false,south=false,up=true,west=false": { "model": "electricadvantage:led_bar_on_dnu", "x": 0, "y": 90, "uvlock": false }, - "down=true,east=true,lit=true,north=false,south=false,up=false,west=true": { "model": "electricadvantage:led_bar_on_dnu", "x": 90, "y": 90, "uvlock": false }, - "down=true,east=false,lit=true,north=true,south=true,up=false,west=false": { "model": "electricadvantage:led_bar_on_dnu", "x": 90, "y": 0, "uvlock": false }, - "down=true,east=false,lit=true,north=true,south=false,up=true,west=false": { "model": "electricadvantage:led_bar_on_dnu", "x": 0, "y": 0, "uvlock": false }, - "down=true,east=false,lit=true,north=true,south=false,up=false,west=true": { "model": "electricadvantage:led_bar_on_nuw", "x": 90, "y": 0, "uvlock": false }, - "down=true,east=false,lit=true,north=false,south=true,up=true,west=false": { "model": "electricadvantage:led_bar_on_dnu", "x": 0, "y": 180, "uvlock": false }, - "down=true,east=false,lit=true,north=false,south=true,up=false,west=true": { "model": "electricadvantage:led_bar_on_nuw", "x": 90, "y": 270, "uvlock": false }, - "down=true,east=false,lit=true,north=false,south=false,up=true,west=true": { "model": "electricadvantage:led_bar_on_dnu", "x": 0, "y": 270, "uvlock": false }, - "down=false,east=true,lit=true,north=true,south=true,up=false,west=false": { "model": "electricadvantage:led_bar_on_nsw", "x": 0, "y": 180, "uvlock": false }, - "down=false,east=true,lit=true,north=true,south=false,up=true,west=false": { "model": "electricadvantage:led_bar_on_nuw", "x": 0, "y": 90, "uvlock": false }, - "down=false,east=true,lit=true,north=true,south=false,up=false,west=true": { "model": "electricadvantage:led_bar_on_nsw", "x": 0, "y": 90, "uvlock": false }, - "down=false,east=true,lit=true,north=false,south=true,up=true,west=false": { "model": "electricadvantage:led_bar_on_nuw", "x": 0, "y": 180, "uvlock": false }, - "down=false,east=true,lit=true,north=false,south=true,up=false,west=true": { "model": "electricadvantage:led_bar_on_nsw", "x": 0, "y": 270, "uvlock": false }, - "down=false,east=true,lit=true,north=false,south=false,up=true,west=true": { "model": "electricadvantage:led_bar_on_dnu", "x": 270, "y": 90, "uvlock": false }, - "down=false,east=false,lit=true,north=true,south=true,up=true,west=false": { "model": "electricadvantage:led_bar_on_dnu", "x": 270, "y": 0, "uvlock": false }, - "down=false,east=false,lit=true,north=true,south=true,up=false,west=true": { "model": "electricadvantage:led_bar_on_nsw", "x": 0, "y": 0, "uvlock": false }, - "down=false,east=false,lit=true,north=true,south=false,up=true,west=true": { "model": "electricadvantage:led_bar_on_nuw", "x": 0, "y": 0, "uvlock": false }, - "down=false,east=false,lit=true,north=false,south=true,up=true,west=true": { "model": "electricadvantage:led_bar_on_nuw", "x": 0, "y": 270, "uvlock": false }, - "down=true,east=true,lit=true,north=true,south=true,up=false,west=false": { "model": "electricadvantage:led_bar_on_nsuw", "x": 180, "y": 180, "uvlock": false }, - "down=true,east=true,lit=true,north=true,south=false,up=true,west=false": { "model": "electricadvantage:led_bar_on_nsuw", "x": 90, "y": 90, "uvlock": false }, - "down=true,east=true,lit=true,north=true,south=false,up=false,west=true": { "model": "electricadvantage:led_bar_on_nsuw", "x": 180, "y": 90, "uvlock": false }, - "down=true,east=true,lit=true,north=false,south=true,up=true,west=false": { "model": "electricadvantage:led_bar_on_nsuw", "x": 90, "y": 180, "uvlock": false }, - "down=true,east=true,lit=true,north=false,south=true,up=false,west=true": { "model": "electricadvantage:led_bar_on_nsuw", "x": 180, "y": 270, "uvlock": false }, - "down=true,east=true,lit=true,north=false,south=false,up=true,west=true": { "model": "electricadvantage:led_bar_on_ensw", "x": 90, "y": 0, "uvlock": false }, - "down=true,east=false,lit=true,north=true,south=true,up=true,west=false": { "model": "electricadvantage:led_bar_on_ensw", "x": 90, "y": 90, "uvlock": false }, - "down=true,east=false,lit=true,north=true,south=true,up=false,west=true": { "model": "electricadvantage:led_bar_on_nsuw", "x": 180, "y": 0, "uvlock": false }, - "down=true,east=false,lit=true,north=true,south=false,up=true,west=true": { "model": "electricadvantage:led_bar_on_nsuw", "x": 90, "y": 0, "uvlock": false }, - "down=true,east=false,lit=true,north=false,south=true,up=true,west=true": { "model": "electricadvantage:led_bar_on_nsuw", "x": 90, "y": 270, "uvlock": false }, - "down=false,east=true,lit=true,north=true,south=true,up=true,west=false": { "model": "electricadvantage:led_bar_on_nsuw", "x": 0, "y": 180, "uvlock": false }, - "down=false,east=true,lit=true,north=true,south=true,up=false,west=true": { "model": "electricadvantage:led_bar_on_ensw", "x": 0, "y": 0, "uvlock": false }, - "down=false,east=true,lit=true,north=true,south=false,up=true,west=true": { "model": "electricadvantage:led_bar_on_nsuw", "x": 0, "y": 90, "uvlock": false }, - "down=false,east=true,lit=true,north=false,south=true,up=true,west=true": { "model": "electricadvantage:led_bar_on_nsuw", "x": 0, "y": 270, "uvlock": false }, - "down=false,east=false,lit=true,north=true,south=true,up=true,west=true": { "model": "electricadvantage:led_bar_on_nsuw", "x": 0, "y": 0, "uvlock": false }, - "down=true,east=true,lit=true,north=true,south=true,up=true,west=false": { "model": "electricadvantage:led_bar_on_desuw", "x": 0, "y": 270, "uvlock": false }, - "down=true,east=true,lit=true,north=true,south=true,up=false,west=true": { "model": "electricadvantage:led_bar_on_desuw", "x": 270, "y": 0, "uvlock": false }, - "down=true,east=true,lit=true,north=true,south=false,up=true,west=true": { "model": "electricadvantage:led_bar_on_desuw", "x": 0, "y": 180, "uvlock": false }, - "down=true,east=true,lit=true,north=false,south=true,up=true,west=true": { "model": "electricadvantage:led_bar_on_desuw", "x": 0, "y": 0, "uvlock": false }, - "down=true,east=false,lit=true,north=true,south=true,up=true,west=true": { "model": "electricadvantage:led_bar_on_desuw", "x": 0, "y": 90, "uvlock": false }, - "down=false,east=true,lit=true,north=true,south=true,up=true,west=true": { "model": "electricadvantage:led_bar_on_desuw", "x": 90, "y": 0, "uvlock": false }, - "down=true,east=true,lit=true,north=true,south=true,up=true,west=true": { "model": "electricadvantage:led_bar_on_densuw", "x": 0, "y": 0, "uvlock": false } + "down=false,east=false,lit=false,north=false,south=false,up=false,west=false": { "model": "electricadvantage:block/led_bar_off_n", "x": 90, "y": 0, "uvlock": false }, + "down=true,east=false,lit=false,north=false,south=false,up=false,west=false": { "model": "electricadvantage:block/led_bar_off_n", "x": 90, "y": 0, "uvlock": false }, + "down=false,east=true,lit=false,north=false,south=false,up=false,west=false": { "model": "electricadvantage:block/led_bar_off_n", "x": 0, "y": 90, "uvlock": false }, + "down=false,east=false,lit=false,north=true,south=false,up=false,west=false": { "model": "electricadvantage:block/led_bar_off_n", "x": 0, "y": 0, "uvlock": false }, + "down=false,east=false,lit=false,north=false,south=true,up=false,west=false": { "model": "electricadvantage:block/led_bar_off_n", "x": 0, "y": 180, "uvlock": false }, + "down=false,east=false,lit=false,north=false,south=false,up=true,west=false": { "model": "electricadvantage:block/led_bar_off_n", "x": 270, "y": 0, "uvlock": false }, + "down=false,east=false,lit=false,north=false,south=false,up=false,west=true": { "model": "electricadvantage:block/led_bar_off_n", "x": 0, "y": 270, "uvlock": false }, + "down=true,east=true,lit=false,north=false,south=false,up=false,west=false": { "model": "electricadvantage:block/led_bar_off_nw", "x": 90, "y": 180, "uvlock": false }, + "down=true,east=false,lit=false,north=true,south=false,up=false,west=false": { "model": "electricadvantage:block/led_bar_off_nw", "x": 90, "y": 90, "uvlock": false }, + "down=true,east=false,lit=false,north=false,south=true,up=false,west=false": { "model": "electricadvantage:block/led_bar_off_nw", "x": 90, "y": 270, "uvlock": false }, + "down=true,east=false,lit=false,north=false,south=false,up=true,west=false": { "model": "electricadvantage:block/led_bar_off_ns", "x": 90, "y": 0, "uvlock": false }, + "down=true,east=false,lit=false,north=false,south=false,up=false,west=true": { "model": "electricadvantage:block/led_bar_off_nw", "x": 90, "y": 0, "uvlock": false }, + "down=false,east=true,lit=false,north=true,south=false,up=false,west=false": { "model": "electricadvantage:block/led_bar_off_nw", "x": 0, "y": 90, "uvlock": false }, + "down=false,east=true,lit=false,north=false,south=true,up=false,west=false": { "model": "electricadvantage:block/led_bar_off_nw", "x": 0, "y": 180, "uvlock": false }, + "down=false,east=true,lit=false,north=false,south=false,up=true,west=false": { "model": "electricadvantage:block/led_bar_off_nw", "x": 270, "y": 180, "uvlock": false }, + "down=false,east=true,lit=false,north=false,south=false,up=false,west=true": { "model": "electricadvantage:block/led_bar_off_ns", "x": 0, "y": 90, "uvlock": false }, + "down=false,east=false,lit=false,north=true,south=true,up=false,west=false": { "model": "electricadvantage:block/led_bar_off_ns", "x": 0, "y": 0, "uvlock": false }, + "down=false,east=false,lit=false,north=true,south=false,up=true,west=false": { "model": "electricadvantage:block/led_bar_off_nw", "x": 270, "y": 90, "uvlock": false }, + "down=false,east=false,lit=false,north=true,south=false,up=false,west=true": { "model": "electricadvantage:block/led_bar_off_nw", "x": 0, "y": 0, "uvlock": false }, + "down=false,east=false,lit=false,north=false,south=true,up=true,west=false": { "model": "electricadvantage:block/led_bar_off_nw", "x": 270, "y": 270, "uvlock": false }, + "down=false,east=false,lit=false,north=false,south=true,up=false,west=true": { "model": "electricadvantage:block/led_bar_off_nw", "x": 0, "y": 270, "uvlock": false }, + "down=false,east=false,lit=false,north=false,south=false,up=true,west=true": { "model": "electricadvantage:block/led_bar_off_nw", "x": 270, "y": 0, "uvlock": false }, + "down=true,east=true,lit=false,north=true,south=false,up=false,west=false": { "model": "electricadvantage:block/led_bar_off_nuw", "x": 90, "y": 90, "uvlock": false }, + "down=true,east=true,lit=false,north=false,south=true,up=false,west=false": { "model": "electricadvantage:block/led_bar_off_nuw", "x": 90, "y": 180, "uvlock": false }, + "down=true,east=true,lit=false,north=false,south=false,up=true,west=false": { "model": "electricadvantage:block/led_bar_off_dnu", "x": 0, "y": 90, "uvlock": false }, + "down=true,east=true,lit=false,north=false,south=false,up=false,west=true": { "model": "electricadvantage:block/led_bar_off_dnu", "x": 90, "y": 90, "uvlock": false }, + "down=true,east=false,lit=false,north=true,south=true,up=false,west=false": { "model": "electricadvantage:block/led_bar_off_dnu", "x": 90, "y": 0, "uvlock": false }, + "down=true,east=false,lit=false,north=true,south=false,up=true,west=false": { "model": "electricadvantage:block/led_bar_off_dnu", "x": 0, "y": 0, "uvlock": false }, + "down=true,east=false,lit=false,north=true,south=false,up=false,west=true": { "model": "electricadvantage:block/led_bar_off_nuw", "x": 90, "y": 0, "uvlock": false }, + "down=true,east=false,lit=false,north=false,south=true,up=true,west=false": { "model": "electricadvantage:block/led_bar_off_dnu", "x": 0, "y": 180, "uvlock": false }, + "down=true,east=false,lit=false,north=false,south=true,up=false,west=true": { "model": "electricadvantage:block/led_bar_off_nuw", "x": 90, "y": 270, "uvlock": false }, + "down=true,east=false,lit=false,north=false,south=false,up=true,west=true": { "model": "electricadvantage:block/led_bar_off_dnu", "x": 0, "y": 270, "uvlock": false }, + "down=false,east=true,lit=false,north=true,south=true,up=false,west=false": { "model": "electricadvantage:block/led_bar_off_nsw", "x": 0, "y": 180, "uvlock": false }, + "down=false,east=true,lit=false,north=true,south=false,up=true,west=false": { "model": "electricadvantage:block/led_bar_off_nuw", "x": 0, "y": 90, "uvlock": false }, + "down=false,east=true,lit=false,north=true,south=false,up=false,west=true": { "model": "electricadvantage:block/led_bar_off_nsw", "x": 0, "y": 90, "uvlock": false }, + "down=false,east=true,lit=false,north=false,south=true,up=true,west=false": { "model": "electricadvantage:block/led_bar_off_nuw", "x": 0, "y": 180, "uvlock": false }, + "down=false,east=true,lit=false,north=false,south=true,up=false,west=true": { "model": "electricadvantage:block/led_bar_off_nsw", "x": 0, "y": 270, "uvlock": false }, + "down=false,east=true,lit=false,north=false,south=false,up=true,west=true": { "model": "electricadvantage:block/led_bar_off_dnu", "x": 270, "y": 90, "uvlock": false }, + "down=false,east=false,lit=false,north=true,south=true,up=true,west=false": { "model": "electricadvantage:block/led_bar_off_dnu", "x": 270, "y": 0, "uvlock": false }, + "down=false,east=false,lit=false,north=true,south=true,up=false,west=true": { "model": "electricadvantage:block/led_bar_off_nsw", "x": 0, "y": 0, "uvlock": false }, + "down=false,east=false,lit=false,north=true,south=false,up=true,west=true": { "model": "electricadvantage:block/led_bar_off_nuw", "x": 0, "y": 0, "uvlock": false }, + "down=false,east=false,lit=false,north=false,south=true,up=true,west=true": { "model": "electricadvantage:block/led_bar_off_nuw", "x": 0, "y": 270, "uvlock": false }, + "down=true,east=true,lit=false,north=true,south=true,up=false,west=false": { "model": "electricadvantage:block/led_bar_off_nsuw", "x": 180, "y": 180, "uvlock": false }, + "down=true,east=true,lit=false,north=true,south=false,up=true,west=false": { "model": "electricadvantage:block/led_bar_off_nsuw", "x": 90, "y": 90, "uvlock": false }, + "down=true,east=true,lit=false,north=true,south=false,up=false,west=true": { "model": "electricadvantage:block/led_bar_off_nsuw", "x": 180, "y": 90, "uvlock": false }, + "down=true,east=true,lit=false,north=false,south=true,up=true,west=false": { "model": "electricadvantage:block/led_bar_off_nsuw", "x": 90, "y": 180, "uvlock": false }, + "down=true,east=true,lit=false,north=false,south=true,up=false,west=true": { "model": "electricadvantage:block/led_bar_off_nsuw", "x": 180, "y": 270, "uvlock": false }, + "down=true,east=true,lit=false,north=false,south=false,up=true,west=true": { "model": "electricadvantage:block/led_bar_off_ensw", "x": 90, "y": 0, "uvlock": false }, + "down=true,east=false,lit=false,north=true,south=true,up=true,west=false": { "model": "electricadvantage:block/led_bar_off_ensw", "x": 90, "y": 90, "uvlock": false }, + "down=true,east=false,lit=false,north=true,south=true,up=false,west=true": { "model": "electricadvantage:block/led_bar_off_nsuw", "x": 180, "y": 0, "uvlock": false }, + "down=true,east=false,lit=false,north=true,south=false,up=true,west=true": { "model": "electricadvantage:block/led_bar_off_nsuw", "x": 90, "y": 0, "uvlock": false }, + "down=true,east=false,lit=false,north=false,south=true,up=true,west=true": { "model": "electricadvantage:block/led_bar_off_nsuw", "x": 90, "y": 270, "uvlock": false }, + "down=false,east=true,lit=false,north=true,south=true,up=true,west=false": { "model": "electricadvantage:block/led_bar_off_nsuw", "x": 0, "y": 180, "uvlock": false }, + "down=false,east=true,lit=false,north=true,south=true,up=false,west=true": { "model": "electricadvantage:block/led_bar_off_ensw", "x": 0, "y": 0, "uvlock": false }, + "down=false,east=true,lit=false,north=true,south=false,up=true,west=true": { "model": "electricadvantage:block/led_bar_off_nsuw", "x": 0, "y": 90, "uvlock": false }, + "down=false,east=true,lit=false,north=false,south=true,up=true,west=true": { "model": "electricadvantage:block/led_bar_off_nsuw", "x": 0, "y": 270, "uvlock": false }, + "down=false,east=false,lit=false,north=true,south=true,up=true,west=true": { "model": "electricadvantage:block/led_bar_off_nsuw", "x": 0, "y": 0, "uvlock": false }, + "down=true,east=true,lit=false,north=true,south=true,up=true,west=false": { "model": "electricadvantage:block/led_bar_off_desuw", "x": 0, "y": 270, "uvlock": false }, + "down=true,east=true,lit=false,north=true,south=true,up=false,west=true": { "model": "electricadvantage:block/led_bar_off_desuw", "x": 270, "y": 0, "uvlock": false }, + "down=true,east=true,lit=false,north=true,south=false,up=true,west=true": { "model": "electricadvantage:block/led_bar_off_desuw", "x": 0, "y": 180, "uvlock": false }, + "down=true,east=true,lit=false,north=false,south=true,up=true,west=true": { "model": "electricadvantage:block/led_bar_off_desuw", "x": 0, "y": 0, "uvlock": false }, + "down=true,east=false,lit=false,north=true,south=true,up=true,west=true": { "model": "electricadvantage:block/led_bar_off_desuw", "x": 0, "y": 90, "uvlock": false }, + "down=false,east=true,lit=false,north=true,south=true,up=true,west=true": { "model": "electricadvantage:block/led_bar_off_desuw", "x": 90, "y": 0, "uvlock": false }, + "down=true,east=true,lit=false,north=true,south=true,up=true,west=true": { "model": "electricadvantage:block/led_bar_off_densuw", "x": 0, "y": 0, "uvlock": false }, + + "down=false,east=false,lit=true,north=false,south=false,up=false,west=false": { "model": "electricadvantage:block/led_bar_on_n", "x": 90, "y": 0, "uvlock": false }, + "down=true,east=false,lit=true,north=false,south=false,up=false,west=false": { "model": "electricadvantage:block/led_bar_on_n", "x": 90, "y": 0, "uvlock": false }, + "down=false,east=true,lit=true,north=false,south=false,up=false,west=false": { "model": "electricadvantage:block/led_bar_on_n", "x": 0, "y": 90, "uvlock": false }, + "down=false,east=false,lit=true,north=true,south=false,up=false,west=false": { "model": "electricadvantage:block/led_bar_on_n", "x": 0, "y": 0, "uvlock": false }, + "down=false,east=false,lit=true,north=false,south=true,up=false,west=false": { "model": "electricadvantage:block/led_bar_on_n", "x": 0, "y": 180, "uvlock": false }, + "down=false,east=false,lit=true,north=false,south=false,up=true,west=false": { "model": "electricadvantage:block/led_bar_on_n", "x": 270, "y": 0, "uvlock": false }, + "down=false,east=false,lit=true,north=false,south=false,up=false,west=true": { "model": "electricadvantage:block/led_bar_on_n", "x": 0, "y": 270, "uvlock": false }, + "down=true,east=true,lit=true,north=false,south=false,up=false,west=false": { "model": "electricadvantage:block/led_bar_on_nw", "x": 90, "y": 180, "uvlock": false }, + "down=true,east=false,lit=true,north=true,south=false,up=false,west=false": { "model": "electricadvantage:block/led_bar_on_nw", "x": 90, "y": 90, "uvlock": false }, + "down=true,east=false,lit=true,north=false,south=true,up=false,west=false": { "model": "electricadvantage:block/led_bar_on_nw", "x": 90, "y": 270, "uvlock": false }, + "down=true,east=false,lit=true,north=false,south=false,up=true,west=false": { "model": "electricadvantage:block/led_bar_on_ns", "x": 90, "y": 0, "uvlock": false }, + "down=true,east=false,lit=true,north=false,south=false,up=false,west=true": { "model": "electricadvantage:block/led_bar_on_nw", "x": 90, "y": 0, "uvlock": false }, + "down=false,east=true,lit=true,north=true,south=false,up=false,west=false": { "model": "electricadvantage:block/led_bar_on_nw", "x": 0, "y": 90, "uvlock": false }, + "down=false,east=true,lit=true,north=false,south=true,up=false,west=false": { "model": "electricadvantage:block/led_bar_on_nw", "x": 0, "y": 180, "uvlock": false }, + "down=false,east=true,lit=true,north=false,south=false,up=true,west=false": { "model": "electricadvantage:block/led_bar_on_nw", "x": 270, "y": 180, "uvlock": false }, + "down=false,east=true,lit=true,north=false,south=false,up=false,west=true": { "model": "electricadvantage:block/led_bar_on_ns", "x": 0, "y": 90, "uvlock": false }, + "down=false,east=false,lit=true,north=true,south=true,up=false,west=false": { "model": "electricadvantage:block/led_bar_on_ns", "x": 0, "y": 0, "uvlock": false }, + "down=false,east=false,lit=true,north=true,south=false,up=true,west=false": { "model": "electricadvantage:block/led_bar_on_nw", "x": 270, "y": 90, "uvlock": false }, + "down=false,east=false,lit=true,north=true,south=false,up=false,west=true": { "model": "electricadvantage:block/led_bar_on_nw", "x": 0, "y": 0, "uvlock": false }, + "down=false,east=false,lit=true,north=false,south=true,up=true,west=false": { "model": "electricadvantage:block/led_bar_on_nw", "x": 270, "y": 270, "uvlock": false }, + "down=false,east=false,lit=true,north=false,south=true,up=false,west=true": { "model": "electricadvantage:block/led_bar_on_nw", "x": 0, "y": 270, "uvlock": false }, + "down=false,east=false,lit=true,north=false,south=false,up=true,west=true": { "model": "electricadvantage:block/led_bar_on_nw", "x": 270, "y": 0, "uvlock": false }, + "down=true,east=true,lit=true,north=true,south=false,up=false,west=false": { "model": "electricadvantage:block/led_bar_on_nuw", "x": 90, "y": 90, "uvlock": false }, + "down=true,east=true,lit=true,north=false,south=true,up=false,west=false": { "model": "electricadvantage:block/led_bar_on_nuw", "x": 90, "y": 180, "uvlock": false }, + "down=true,east=true,lit=true,north=false,south=false,up=true,west=false": { "model": "electricadvantage:block/led_bar_on_dnu", "x": 0, "y": 90, "uvlock": false }, + "down=true,east=true,lit=true,north=false,south=false,up=false,west=true": { "model": "electricadvantage:block/led_bar_on_dnu", "x": 90, "y": 90, "uvlock": false }, + "down=true,east=false,lit=true,north=true,south=true,up=false,west=false": { "model": "electricadvantage:block/led_bar_on_dnu", "x": 90, "y": 0, "uvlock": false }, + "down=true,east=false,lit=true,north=true,south=false,up=true,west=false": { "model": "electricadvantage:block/led_bar_on_dnu", "x": 0, "y": 0, "uvlock": false }, + "down=true,east=false,lit=true,north=true,south=false,up=false,west=true": { "model": "electricadvantage:block/led_bar_on_nuw", "x": 90, "y": 0, "uvlock": false }, + "down=true,east=false,lit=true,north=false,south=true,up=true,west=false": { "model": "electricadvantage:block/led_bar_on_dnu", "x": 0, "y": 180, "uvlock": false }, + "down=true,east=false,lit=true,north=false,south=true,up=false,west=true": { "model": "electricadvantage:block/led_bar_on_nuw", "x": 90, "y": 270, "uvlock": false }, + "down=true,east=false,lit=true,north=false,south=false,up=true,west=true": { "model": "electricadvantage:block/led_bar_on_dnu", "x": 0, "y": 270, "uvlock": false }, + "down=false,east=true,lit=true,north=true,south=true,up=false,west=false": { "model": "electricadvantage:block/led_bar_on_nsw", "x": 0, "y": 180, "uvlock": false }, + "down=false,east=true,lit=true,north=true,south=false,up=true,west=false": { "model": "electricadvantage:block/led_bar_on_nuw", "x": 0, "y": 90, "uvlock": false }, + "down=false,east=true,lit=true,north=true,south=false,up=false,west=true": { "model": "electricadvantage:block/led_bar_on_nsw", "x": 0, "y": 90, "uvlock": false }, + "down=false,east=true,lit=true,north=false,south=true,up=true,west=false": { "model": "electricadvantage:block/led_bar_on_nuw", "x": 0, "y": 180, "uvlock": false }, + "down=false,east=true,lit=true,north=false,south=true,up=false,west=true": { "model": "electricadvantage:block/led_bar_on_nsw", "x": 0, "y": 270, "uvlock": false }, + "down=false,east=true,lit=true,north=false,south=false,up=true,west=true": { "model": "electricadvantage:block/led_bar_on_dnu", "x": 270, "y": 90, "uvlock": false }, + "down=false,east=false,lit=true,north=true,south=true,up=true,west=false": { "model": "electricadvantage:block/led_bar_on_dnu", "x": 270, "y": 0, "uvlock": false }, + "down=false,east=false,lit=true,north=true,south=true,up=false,west=true": { "model": "electricadvantage:block/led_bar_on_nsw", "x": 0, "y": 0, "uvlock": false }, + "down=false,east=false,lit=true,north=true,south=false,up=true,west=true": { "model": "electricadvantage:block/led_bar_on_nuw", "x": 0, "y": 0, "uvlock": false }, + "down=false,east=false,lit=true,north=false,south=true,up=true,west=true": { "model": "electricadvantage:block/led_bar_on_nuw", "x": 0, "y": 270, "uvlock": false }, + "down=true,east=true,lit=true,north=true,south=true,up=false,west=false": { "model": "electricadvantage:block/led_bar_on_nsuw", "x": 180, "y": 180, "uvlock": false }, + "down=true,east=true,lit=true,north=true,south=false,up=true,west=false": { "model": "electricadvantage:block/led_bar_on_nsuw", "x": 90, "y": 90, "uvlock": false }, + "down=true,east=true,lit=true,north=true,south=false,up=false,west=true": { "model": "electricadvantage:block/led_bar_on_nsuw", "x": 180, "y": 90, "uvlock": false }, + "down=true,east=true,lit=true,north=false,south=true,up=true,west=false": { "model": "electricadvantage:block/led_bar_on_nsuw", "x": 90, "y": 180, "uvlock": false }, + "down=true,east=true,lit=true,north=false,south=true,up=false,west=true": { "model": "electricadvantage:block/led_bar_on_nsuw", "x": 180, "y": 270, "uvlock": false }, + "down=true,east=true,lit=true,north=false,south=false,up=true,west=true": { "model": "electricadvantage:block/led_bar_on_ensw", "x": 90, "y": 0, "uvlock": false }, + "down=true,east=false,lit=true,north=true,south=true,up=true,west=false": { "model": "electricadvantage:block/led_bar_on_ensw", "x": 90, "y": 90, "uvlock": false }, + "down=true,east=false,lit=true,north=true,south=true,up=false,west=true": { "model": "electricadvantage:block/led_bar_on_nsuw", "x": 180, "y": 0, "uvlock": false }, + "down=true,east=false,lit=true,north=true,south=false,up=true,west=true": { "model": "electricadvantage:block/led_bar_on_nsuw", "x": 90, "y": 0, "uvlock": false }, + "down=true,east=false,lit=true,north=false,south=true,up=true,west=true": { "model": "electricadvantage:block/led_bar_on_nsuw", "x": 90, "y": 270, "uvlock": false }, + "down=false,east=true,lit=true,north=true,south=true,up=true,west=false": { "model": "electricadvantage:block/led_bar_on_nsuw", "x": 0, "y": 180, "uvlock": false }, + "down=false,east=true,lit=true,north=true,south=true,up=false,west=true": { "model": "electricadvantage:block/led_bar_on_ensw", "x": 0, "y": 0, "uvlock": false }, + "down=false,east=true,lit=true,north=true,south=false,up=true,west=true": { "model": "electricadvantage:block/led_bar_on_nsuw", "x": 0, "y": 90, "uvlock": false }, + "down=false,east=true,lit=true,north=false,south=true,up=true,west=true": { "model": "electricadvantage:block/led_bar_on_nsuw", "x": 0, "y": 270, "uvlock": false }, + "down=false,east=false,lit=true,north=true,south=true,up=true,west=true": { "model": "electricadvantage:block/led_bar_on_nsuw", "x": 0, "y": 0, "uvlock": false }, + "down=true,east=true,lit=true,north=true,south=true,up=true,west=false": { "model": "electricadvantage:block/led_bar_on_desuw", "x": 0, "y": 270, "uvlock": false }, + "down=true,east=true,lit=true,north=true,south=true,up=false,west=true": { "model": "electricadvantage:block/led_bar_on_desuw", "x": 270, "y": 0, "uvlock": false }, + "down=true,east=true,lit=true,north=true,south=false,up=true,west=true": { "model": "electricadvantage:block/led_bar_on_desuw", "x": 0, "y": 180, "uvlock": false }, + "down=true,east=true,lit=true,north=false,south=true,up=true,west=true": { "model": "electricadvantage:block/led_bar_on_desuw", "x": 0, "y": 0, "uvlock": false }, + "down=true,east=false,lit=true,north=true,south=true,up=true,west=true": { "model": "electricadvantage:block/led_bar_on_desuw", "x": 0, "y": 90, "uvlock": false }, + "down=false,east=true,lit=true,north=true,south=true,up=true,west=true": { "model": "electricadvantage:block/led_bar_on_desuw", "x": 90, "y": 0, "uvlock": false }, + "down=true,east=true,lit=true,north=true,south=true,up=true,west=true": { "model": "electricadvantage:block/led_bar_on_densuw", "x": 0, "y": 0, "uvlock": false } } } \ No newline at end of file diff --git a/src/main/resources/assets/electricadvantage/blockstates/li_ore.json b/src/main/resources/assets/electricadvantage/blockstates/li_ore.json index a47608f..e35f413 100644 --- a/src/main/resources/assets/electricadvantage/blockstates/li_ore.json +++ b/src/main/resources/assets/electricadvantage/blockstates/li_ore.json @@ -1,5 +1,5 @@ -{ - "variants": { - "normal": { "model": "electricadvantage:li_ore" } - } -} +{ + "variants": { + "": { "model": "electricadvantage:block/li_ore" } + } +} diff --git a/src/main/resources/assets/electricadvantage/blockstates/photovoltaic_generator.json b/src/main/resources/assets/electricadvantage/blockstates/photovoltaic_generator.json index 78fbb88..c2db894 100644 --- a/src/main/resources/assets/electricadvantage/blockstates/photovoltaic_generator.json +++ b/src/main/resources/assets/electricadvantage/blockstates/photovoltaic_generator.json @@ -1,12 +1,12 @@ -{ - "variants": { - "active=true,facing=east": { "model": "electricadvantage:photovoltaic_generator", "y": 90 }, - "active=true,facing=north": { "model": "electricadvantage:photovoltaic_generator" }, - "active=true,facing=south": { "model": "electricadvantage:photovoltaic_generator", "y": 180 }, - "active=true,facing=west": { "model": "electricadvantage:photovoltaic_generator", "y": 270 }, - "active=false,facing=east": { "model": "electricadvantage:photovoltaic_generator", "y": 90 }, - "active=false,facing=north": { "model": "electricadvantage:photovoltaic_generator" }, - "active=false,facing=south": { "model": "electricadvantage:photovoltaic_generator", "y": 180 }, - "active=false,facing=west": { "model": "electricadvantage:photovoltaic_generator", "y": 270 } - } -} +{ + "variants": { + "active=true,facing=east": { "model": "electricadvantage:block/photovoltaic_generator", "y": 90 }, + "active=true,facing=north": { "model": "electricadvantage:block/photovoltaic_generator" }, + "active=true,facing=south": { "model": "electricadvantage:block/photovoltaic_generator", "y": 180 }, + "active=true,facing=west": { "model": "electricadvantage:block/photovoltaic_generator", "y": 270 }, + "active=false,facing=east": { "model": "electricadvantage:block/photovoltaic_generator", "y": 90 }, + "active=false,facing=north": { "model": "electricadvantage:block/photovoltaic_generator" }, + "active=false,facing=south": { "model": "electricadvantage:block/photovoltaic_generator", "y": 180 }, + "active=false,facing=west": { "model": "electricadvantage:block/photovoltaic_generator", "y": 270 } + } +} diff --git a/src/main/resources/assets/electricadvantage/blockstates/plastic_refinery.json b/src/main/resources/assets/electricadvantage/blockstates/plastic_refinery.json index 049b48a..2c0dbdc 100644 --- a/src/main/resources/assets/electricadvantage/blockstates/plastic_refinery.json +++ b/src/main/resources/assets/electricadvantage/blockstates/plastic_refinery.json @@ -1,20 +1,20 @@ -{ - "variants": { - "active=true,facing=east,powered=true": { "model": "electricadvantage:plastic_refinery_on", "y": 90 }, - "active=true,facing=north,powered=true": { "model": "electricadvantage:plastic_refinery_on" }, - "active=true,facing=south,powered=true": { "model": "electricadvantage:plastic_refinery_on", "y": 180 }, - "active=true,facing=west,powered=true": { "model": "electricadvantage:plastic_refinery_on", "y": 270 }, - "active=false,facing=east,powered=true": { "model": "electricadvantage:plastic_refinery_powered", "y": 90 }, - "active=false,facing=north,powered=true": { "model": "electricadvantage:plastic_refinery_powered" }, - "active=false,facing=south,powered=true": { "model": "electricadvantage:plastic_refinery_powered", "y": 180 }, - "active=false,facing=west,powered=true": { "model": "electricadvantage:plastic_refinery_powered", "y": 270 }, - "active=false,facing=east,powered=false": { "model": "electricadvantage:plastic_refinery_off", "y": 90 }, - "active=false,facing=north,powered=false": { "model": "electricadvantage:plastic_refinery_off" }, - "active=false,facing=south,powered=false": { "model": "electricadvantage:plastic_refinery_off", "y": 180 }, - "active=false,facing=west,powered=false": { "model": "electricadvantage:plastic_refinery_off", "y": 270 }, - "active=true,facing=east,powered=false": { "model": "electricadvantage:plastic_refinery_on", "y": 90 }, - "active=true,facing=north,powered=false": { "model": "electricadvantage:plastic_refinery_on" }, - "active=true,facing=south,powered=false": { "model": "electricadvantage:plastic_refinery_on", "y": 180 }, - "active=true,facing=west,powered=false": { "model": "electricadvantage:plastic_refinery_on", "y": 270 } - } -} +{ + "variants": { + "active=true,facing=east,powered=true": { "model": "electricadvantage:block/plastic_refinery_on", "y": 90 }, + "active=true,facing=north,powered=true": { "model": "electricadvantage:block/plastic_refinery_on" }, + "active=true,facing=south,powered=true": { "model": "electricadvantage:block/plastic_refinery_on", "y": 180 }, + "active=true,facing=west,powered=true": { "model": "electricadvantage:block/plastic_refinery_on", "y": 270 }, + "active=false,facing=east,powered=true": { "model": "electricadvantage:block/plastic_refinery_powered", "y": 90 }, + "active=false,facing=north,powered=true": { "model": "electricadvantage:block/plastic_refinery_powered" }, + "active=false,facing=south,powered=true": { "model": "electricadvantage:block/plastic_refinery_powered", "y": 180 }, + "active=false,facing=west,powered=true": { "model": "electricadvantage:block/plastic_refinery_powered", "y": 270 }, + "active=false,facing=east,powered=false": { "model": "electricadvantage:block/plastic_refinery_off", "y": 90 }, + "active=false,facing=north,powered=false": { "model": "electricadvantage:block/plastic_refinery_off" }, + "active=false,facing=south,powered=false": { "model": "electricadvantage:block/plastic_refinery_off", "y": 180 }, + "active=false,facing=west,powered=false": { "model": "electricadvantage:block/plastic_refinery_off", "y": 270 }, + "active=true,facing=east,powered=false": { "model": "electricadvantage:block/plastic_refinery_on", "y": 90 }, + "active=true,facing=north,powered=false": { "model": "electricadvantage:block/plastic_refinery_on" }, + "active=true,facing=south,powered=false": { "model": "electricadvantage:block/plastic_refinery_on", "y": 180 }, + "active=true,facing=west,powered=false": { "model": "electricadvantage:block/plastic_refinery_on", "y": 270 } + } +} diff --git a/src/main/resources/assets/electricadvantage/blockstates/pump_pipe_electric.json b/src/main/resources/assets/electricadvantage/blockstates/pump_pipe_electric.json index ee18552..a25407b 100644 --- a/src/main/resources/assets/electricadvantage/blockstates/pump_pipe_electric.json +++ b/src/main/resources/assets/electricadvantage/blockstates/pump_pipe_electric.json @@ -1,5 +1,5 @@ { "variants": { - "normal": {"model": "poweradvantage:fluid_pipe_ns", "x": 90, "y": 0, "uvlock": false } + "": {"model": "poweradvantage:block/fluid_pipe_ns", "x": 90, "y": 0, "uvlock": false } } } diff --git a/src/main/resources/assets/electricadvantage/blockstates/steam_powered_generator.json b/src/main/resources/assets/electricadvantage/blockstates/steam_powered_generator.json index 3bccce9..70cfdab 100644 --- a/src/main/resources/assets/electricadvantage/blockstates/steam_powered_generator.json +++ b/src/main/resources/assets/electricadvantage/blockstates/steam_powered_generator.json @@ -1,12 +1,12 @@ -{ - "variants": { - "active=true,facing=east": { "model": "electricadvantage:steam_powered_generator_on", "y": 90 }, - "active=true,facing=north": { "model": "electricadvantage:steam_powered_generator_on" }, - "active=true,facing=south": { "model": "electricadvantage:steam_powered_generator_on", "y": 180 }, - "active=true,facing=west": { "model": "electricadvantage:steam_powered_generator_on", "y": 270 }, - "active=false,facing=east": { "model": "electricadvantage:steam_powered_generator_off", "y": 90 }, - "active=false,facing=north": { "model": "electricadvantage:steam_powered_generator_off" }, - "active=false,facing=south": { "model": "electricadvantage:steam_powered_generator_off", "y": 180 }, - "active=false,facing=west": { "model": "electricadvantage:steam_powered_generator_off", "y": 270 } - } -} +{ + "variants": { + "active=true,facing=east": { "model": "electricadvantage:block/steam_powered_generator_on", "y": 90 }, + "active=true,facing=north": { "model": "electricadvantage:block/steam_powered_generator_on" }, + "active=true,facing=south": { "model": "electricadvantage:block/steam_powered_generator_on", "y": 180 }, + "active=true,facing=west": { "model": "electricadvantage:block/steam_powered_generator_on", "y": 270 }, + "active=false,facing=east": { "model": "electricadvantage:block/steam_powered_generator_off", "y": 90 }, + "active=false,facing=north": { "model": "electricadvantage:block/steam_powered_generator_off" }, + "active=false,facing=south": { "model": "electricadvantage:block/steam_powered_generator_off", "y": 180 }, + "active=false,facing=west": { "model": "electricadvantage:block/steam_powered_generator_off", "y": 270 } + } +} diff --git a/src/main/resources/assets/electricadvantage/blockstates/sulfur_ore.json b/src/main/resources/assets/electricadvantage/blockstates/sulfur_ore.json index 424b8a2..47c97b3 100644 --- a/src/main/resources/assets/electricadvantage/blockstates/sulfur_ore.json +++ b/src/main/resources/assets/electricadvantage/blockstates/sulfur_ore.json @@ -1,5 +1,5 @@ -{ - "variants": { - "normal": { "model": "electricadvantage:sulfur_ore" } - } -} +{ + "variants": { + "": { "model": "electricadvantage:block/sulfur_ore" } + } +} diff --git a/src/main/resources/assets/electricadvantage/lang/de_de.json b/src/main/resources/assets/electricadvantage/lang/de_de.json new file mode 100644 index 0000000..05039ff --- /dev/null +++ b/src/main/resources/assets/electricadvantage/lang/de_de.json @@ -0,0 +1,92 @@ +{ + "language_support_goals": "Englisch (en_US, de_DE, en_CA, de_DE, en_AU, en_PT), Spanisch (es_MX, es_ES), Chinesisch (zh_CN), Japanisch (ja_JA), Portugiesisch (pt_BR), Deutsch (de_DE), Italienisch (it_IT), Koreanisch (ko_KR)", + "item.electricadvantage.blank_circuit_board.name": "Leiterplatte (Leer)", + "item.electricadvantage.control_circuit.name": "Steuerstromkreis", + "item.electricadvantage.integrated_circuit.name": "Mikrochip", + "item.electricadvantage.psu.name": "Netzteil", + "item.electricadvantage.silicon_ingot.name": "Silizium-Ingots", + "item.electricadvantage.silicon_mix.name": "Silizium-Mischung", + "item.electricadvantage.solder_mix.name": "Lötmetall Mischung", + "item.electricadvantage.solder.name": "Lötmetall", + "item.electricadvantage.li_powder.name": "Pulverisierte Lithium", + "item.electricadvantage.li_ingot.name": "Lithium-Barren", + "item.electricadvantage.li_nugget.name": "Lithium Nugget", + "item.electricadvantage.sulfur_powder.name": "Schwefelpulver", + "item.electricadvantage.lead_acid_battery.name": "Blei-Säure-Batterie", + "item.electricadvantage.nickel_hydride_battery.name": "Nickel-Metallhydrid-Batterie", + "item.electricadvantage.alkaline_battery.name": "Alkali-Batterie", + "item.electricadvantage.lithium_battery.name": "Lithium-Ionen-Batterie", + "tile.electricadvantage.electric_conduit.name": "Elektrischen Draht", + "tile.electricadvantage.electric_track.name": "Elektro-Gerüst", + "tile.electricadvantage.electric_battery_array.name": "Batterie Array", + "tile.electricadvantage.electric_crusher.name": "Elektrische Felsen-Zerkleinerungsmaschine", + "tile.electricadvantage.laser_turret.name": "Laser-Verteidigung Waffe", + "tile.electricadvantage.electric_drill.name": "Laser Bohrer", + "tile.electricadvantage.electric_fabricator.name": "Automatisierte Fabrik", + "tile.electricadvantage.electric_furnace.name": "Lichtbogenofen", + "tile.electricadvantage.electric_oven.name": "Elektro-Ofen", + "tile.electricadvantage.electric_pcb_printer.name": "PCB Drucker", + "tile.electricadvantage.geothermal_generator.name": "Geothermal Generator", + "tile.electricadvantage.hydroelectric_generator.name": "Hydroelectric Generator", + "tile.electricadvantage.photovoltaic_generator.name": "Photovoltaik-Generator", + "tile.electricadvantage.steam_powered_generator.name": "Pumpenlose Stromerzeuger", + "tile.electricadvantage.growth_chamber.name": "Wachstumskammer", + "tile.electricadvantage.growth_chamber_controller.name": "Wachstumskammer Steuereinheit", + "tile.electricadvantage.li_ore.name": "Lithiumerz", + "tile.electricadvantage.sulfur_ore.name": "Schwefelerz", + "tile.electricadvantage.led_bar.name": "LED Draht", + "tooltip.battery.charge": "Lade", + "tooltip.battery.capacity": "Kapazität", + "death.attack.laser": "%1$s verdampft", + "death.attack.laser.player": "%2$s verdampft %1$s", + "death.attack.propeller": "%1$s wurde von einem Propeller pulverisiert.", + "death.attack.propeller.player": "%2$s geschoben %1$s in einen Propeller.", + "tile.electricadvantage.electric_switch.name": "Elektrische Schalter", + "tile.electricadvantage.electric_still.name": "Elektro Brennerei", + "tile.electricadvantage.electric_pump.name": "Elektropumpe", + "tile.electricadvantage.plastic_refinery.name": "Kunststoff-Raffinerie", + "item.electricadvantage.petrolplastic_ingot.name": "Erdöl Kunststoff Barren", + "tile.electricadvantage.pump_pipe_electric.name": "Pumpenrohr", + "item.electricadvantage.blank_circuit_board": "Leiterplatte (Leer)", + "item.electricadvantage.control_circuit": "Steuerstromkreis", + "item.electricadvantage.integrated_circuit": "Mikrochip", + "item.electricadvantage.psu": "Netzteil", + "item.electricadvantage.silicon_ingot": "Silizium-Ingots", + "item.electricadvantage.silicon_mix": "Silizium-Mischung", + "item.electricadvantage.solder_mix": "Lötmetall Mischung", + "item.electricadvantage.solder": "Lötmetall", + "item.electricadvantage.li_powder": "Pulverisierte Lithium", + "item.electricadvantage.li_ingot": "Lithium-Barren", + "item.electricadvantage.li_nugget": "Lithium Nugget", + "item.electricadvantage.sulfur_powder": "Schwefelpulver", + "item.electricadvantage.lead_acid_battery": "Blei-Säure-Batterie", + "item.electricadvantage.nickel_hydride_battery": "Nickel-Metallhydrid-Batterie", + "item.electricadvantage.alkaline_battery": "Alkali-Batterie", + "item.electricadvantage.lithium_battery": "Lithium-Ionen-Batterie", + "block.electricadvantage.electric_conduit": "Elektrischen Draht", + "block.electricadvantage.electric_track": "Elektro-Gerüst", + "block.electricadvantage.electric_battery_array": "Batterie Array", + "block.electricadvantage.electric_crusher": "Elektrische Felsen-Zerkleinerungsmaschine", + "block.electricadvantage.laser_turret": "Laser-Verteidigung Waffe", + "block.electricadvantage.electric_drill": "Laser Bohrer", + "block.electricadvantage.electric_fabricator": "Automatisierte Fabrik", + "block.electricadvantage.electric_furnace": "Lichtbogenofen", + "block.electricadvantage.electric_oven": "Elektro-Ofen", + "block.electricadvantage.electric_pcb_printer": "PCB Drucker", + "block.electricadvantage.geothermal_generator": "Geothermal Generator", + "block.electricadvantage.hydroelectric_generator": "Hydroelectric Generator", + "block.electricadvantage.photovoltaic_generator": "Photovoltaik-Generator", + "block.electricadvantage.steam_powered_generator": "Pumpenlose Stromerzeuger", + "block.electricadvantage.growth_chamber": "Wachstumskammer", + "block.electricadvantage.growth_chamber_controller": "Wachstumskammer Steuereinheit", + "block.electricadvantage.li_ore": "Lithiumerz", + "block.electricadvantage.sulfur_ore": "Schwefelerz", + "block.electricadvantage.led_bar": "LED Draht", + "block.electricadvantage.electric_switch": "Elektrische Schalter", + "block.electricadvantage.electric_still": "Elektro Brennerei", + "block.electricadvantage.electric_pump": "Elektropumpe", + "block.electricadvantage.plastic_refinery": "Kunststoff-Raffinerie", + "item.electricadvantage.petrolplastic_ingot": "Erdöl Kunststoff Barren", + "block.electricadvantage.pump_pipe_electric": "Pumpenrohr", + "block.electricadvantage.laser_turret_evil": "Laser-Verteidigung Waffe" +} diff --git a/src/main/resources/assets/electricadvantage/lang/de_de.lang b/src/main/resources/assets/electricadvantage/lang/de_de.lang deleted file mode 100644 index 6ccb63d..0000000 --- a/src/main/resources/assets/electricadvantage/lang/de_de.lang +++ /dev/null @@ -1,54 +0,0 @@ -language_support_goals=Englisch (en_US, de_DE, en_CA, de_DE, en_AU, en_PT), Spanisch (es_MX, es_ES), Chinesisch (zh_CN), Japanisch (ja_JA), Portugiesisch (pt_BR), Deutsch (de_DE), Italienisch (it_IT), Koreanisch (ko_KR) - -item.electricadvantage.blank_circuit_board.name=Leiterplatte (Leer) -item.electricadvantage.control_circuit.name=Steuerstromkreis -item.electricadvantage.integrated_circuit.name=Mikrochip -item.electricadvantage.psu.name=Netzteil -item.electricadvantage.silicon_ingot.name=Silizium-Ingots -item.electricadvantage.silicon_mix.name=Silizium-Mischung -item.electricadvantage.solder_mix.name=Lötmetall Mischung -item.electricadvantage.solder.name=Lötmetall -item.electricadvantage.li_powder.name=Pulverisierte Lithium -item.electricadvantage.li_ingot.name=Lithium-Barren -item.electricadvantage.li_nugget.name=Lithium Nugget -item.electricadvantage.sulfur_powder.name=Schwefelpulver -item.electricadvantage.lead_acid_battery.name=Blei-Säure-Batterie -item.electricadvantage.nickel_hydride_battery.name=Nickel-Metallhydrid-Batterie -item.electricadvantage.alkaline_battery.name=Alkali-Batterie -item.electricadvantage.lithium_battery.name=Lithium-Ionen-Batterie - -tile.electricadvantage.electric_conduit.name=Elektrischen Draht -tile.electricadvantage.electric_track.name=Elektro-Gerüst -tile.electricadvantage.electric_battery_array.name=Batterie Array -tile.electricadvantage.electric_crusher.name=Elektrische Felsen-Zerkleinerungsmaschine -tile.electricadvantage.laser_turret.name=Laser-Verteidigung Waffe -tile.electricadvantage.electric_drill.name=Laser Bohrer -tile.electricadvantage.electric_fabricator.name=Automatisierte Fabrik -tile.electricadvantage.electric_furnace.name=Lichtbogenofen -tile.electricadvantage.electric_oven.name=Elektro-Ofen -tile.electricadvantage.electric_pcb_printer.name=PCB Drucker -tile.electricadvantage.geothermal_generator.name=Geothermal Generator -tile.electricadvantage.hydroelectric_generator.name=Hydroelectric Generator -tile.electricadvantage.photovoltaic_generator.name=Photovoltaik-Generator -tile.electricadvantage.steam_powered_generator.name=Pumpenlose Stromerzeuger -tile.electricadvantage.growth_chamber.name=Wachstumskammer -tile.electricadvantage.growth_chamber_controller.name=Wachstumskammer Steuereinheit -tile.electricadvantage.li_ore.name=Lithiumerz -tile.electricadvantage.sulfur_ore.name=Schwefelerz -tile.electricadvantage.led_bar.name=LED Draht - -tooltip.battery.charge=Lade -tooltip.battery.capacity=Kapazität - -death.attack.laser=%1$s verdampft -death.attack.laser.player=%2$s verdampft %1$s -death.attack.propeller=%1$s wurde von einem Propeller pulverisiert. -death.attack.propeller.player=%2$s geschoben %1$s in einen Propeller. - - -tile.electricadvantage.electric_switch.name=Elektrische Schalter -tile.electricadvantage.electric_still.name=Elektro Brennerei -tile.electricadvantage.electric_pump.name=Elektropumpe -tile.electricadvantage.plastic_refinery.name=Kunststoff-Raffinerie -item.electricadvantage.petrolplastic_ingot.name=Erdöl Kunststoff Barren -tile.electricadvantage.pump_pipe_electric.name=Pumpenrohr diff --git a/src/main/resources/assets/electricadvantage/lang/en_au.json b/src/main/resources/assets/electricadvantage/lang/en_au.json new file mode 100644 index 0000000..c629c43 --- /dev/null +++ b/src/main/resources/assets/electricadvantage/lang/en_au.json @@ -0,0 +1,92 @@ +{ + "language_support_goals": "english (en_US,en_EN,en_CA,en_GB, en_AU, en_PT), spanish (es_MX,es_ES), chinese (zh_CN), japanese (ja_JA), portugese (pt_BR), german (de_DE), italian (it_IT), korean (ko_KR)", + "item.electricadvantage.blank_circuit_board.name": "Circuit Board (Blank)", + "item.electricadvantage.control_circuit.name": "Control Circuit", + "item.electricadvantage.integrated_circuit.name": "Microchip", + "item.electricadvantage.psu.name": "Power Supply Unit", + "item.electricadvantage.silicon_ingot.name": "Silicon Ingot", + "item.electricadvantage.silicon_mix.name": "Silicon Blend", + "item.electricadvantage.solder_mix.name": "Solder Blend", + "item.electricadvantage.solder.name": "Solder", + "item.electricadvantage.li_powder.name": "Powdered Lithium", + "item.electricadvantage.li_ingot.name": "Lithium Ingot", + "item.electricadvantage.li_nugget.name": "Lithium Nugget", + "item.electricadvantage.sulfur_powder.name": "Powdered Sulfur", + "item.electricadvantage.lead_acid_battery.name": "Lead-Acid Battery", + "item.electricadvantage.nickel_hydride_battery.name": "Nickel-Metal Hydride Battery", + "item.electricadvantage.alkaline_battery.name": "Alkaline Battery", + "item.electricadvantage.lithium_battery.name": "Lithium-Ion Battery", + "tile.electricadvantage.electric_conduit.name": "Electric Power Cable", + "tile.electricadvantage.electric_track.name": "Electric Scaffold", + "tile.electricadvantage.electric_battery_array.name": "Battery Array", + "tile.electricadvantage.electric_crusher.name": "Electric Rock Crusher", + "tile.electricadvantage.laser_turret.name": "Laser Defense Turret", + "tile.electricadvantage.electric_drill.name": "Electric Mining Drill", + "tile.electricadvantage.electric_fabricator.name": "Automated Assembler", + "tile.electricadvantage.electric_furnace.name": "Electric Arc Furnace", + "tile.electricadvantage.electric_oven.name": "Electric Oven", + "tile.electricadvantage.electric_pcb_printer.name": "PCB Printer", + "tile.electricadvantage.geothermal_generator.name": "Geothermal Generator", + "tile.electricadvantage.hydroelectric_generator.name": "Hydroelectric Generator", + "tile.electricadvantage.photovoltaic_generator.name": "Photovoltaic Generator", + "tile.electricadvantage.steam_powered_generator.name": "Steam-Powered Electric Generator", + "tile.electricadvantage.growth_chamber.name": "Growth Chamber", + "tile.electricadvantage.growth_chamber_controller.name": "Growth Chamber Control Unit", + "tile.electricadvantage.li_ore.name": "Lithium Ore", + "tile.electricadvantage.sulfur_ore.name": "Sulfur Ore", + "tile.electricadvantage.led_bar.name": "LED Bar", + "tooltip.battery.charge": "Charge", + "tooltip.battery.capacity": "Capacity", + "death.attack.laser": "%1$s vaporized", + "death.attack.laser.player": "%2$s vaporized %1$s ", + "death.attack.propeller": "%1$s was pulverized by a propeller.", + "death.attack.propeller.player": "%2$s pushed %1$s into a propeller.", + "tile.electricadvantage.electric_switch.name": "Electric Switch", + "tile.electricadvantage.electric_still.name": "Electric Distiller", + "tile.electricadvantage.electric_pump.name": "Electric Pump", + "tile.electricadvantage.plastic_refinery.name": "Petro-Plastic Refinery", + "item.electricadvantage.petrolplastic_ingot.name": "Petro-Plastic Ingot", + "tile.electricadvantage.pump_pipe_electric.name": "Pump Pipe", + "item.electricadvantage.blank_circuit_board": "Circuit Board (Blank)", + "item.electricadvantage.control_circuit": "Control Circuit", + "item.electricadvantage.integrated_circuit": "Microchip", + "item.electricadvantage.psu": "Power Supply Unit", + "item.electricadvantage.silicon_ingot": "Silicon Ingot", + "item.electricadvantage.silicon_mix": "Silicon Blend", + "item.electricadvantage.solder_mix": "Solder Blend", + "item.electricadvantage.solder": "Solder", + "item.electricadvantage.li_powder": "Powdered Lithium", + "item.electricadvantage.li_ingot": "Lithium Ingot", + "item.electricadvantage.li_nugget": "Lithium Nugget", + "item.electricadvantage.sulfur_powder": "Powdered Sulfur", + "item.electricadvantage.lead_acid_battery": "Lead-Acid Battery", + "item.electricadvantage.nickel_hydride_battery": "Nickel-Metal Hydride Battery", + "item.electricadvantage.alkaline_battery": "Alkaline Battery", + "item.electricadvantage.lithium_battery": "Lithium-Ion Battery", + "block.electricadvantage.electric_conduit": "Electric Power Cable", + "block.electricadvantage.electric_track": "Electric Scaffold", + "block.electricadvantage.electric_battery_array": "Battery Array", + "block.electricadvantage.electric_crusher": "Electric Rock Crusher", + "block.electricadvantage.laser_turret": "Laser Defense Turret", + "block.electricadvantage.electric_drill": "Electric Mining Drill", + "block.electricadvantage.electric_fabricator": "Automated Assembler", + "block.electricadvantage.electric_furnace": "Electric Arc Furnace", + "block.electricadvantage.electric_oven": "Electric Oven", + "block.electricadvantage.electric_pcb_printer": "PCB Printer", + "block.electricadvantage.geothermal_generator": "Geothermal Generator", + "block.electricadvantage.hydroelectric_generator": "Hydroelectric Generator", + "block.electricadvantage.photovoltaic_generator": "Photovoltaic Generator", + "block.electricadvantage.steam_powered_generator": "Steam-Powered Electric Generator", + "block.electricadvantage.growth_chamber": "Growth Chamber", + "block.electricadvantage.growth_chamber_controller": "Growth Chamber Control Unit", + "block.electricadvantage.li_ore": "Lithium Ore", + "block.electricadvantage.sulfur_ore": "Sulfur Ore", + "block.electricadvantage.led_bar": "LED Bar", + "block.electricadvantage.electric_switch": "Electric Switch", + "block.electricadvantage.electric_still": "Electric Distiller", + "block.electricadvantage.electric_pump": "Electric Pump", + "block.electricadvantage.plastic_refinery": "Petro-Plastic Refinery", + "item.electricadvantage.petrolplastic_ingot": "Petro-Plastic Ingot", + "block.electricadvantage.pump_pipe_electric": "Pump Pipe", + "block.electricadvantage.laser_turret_evil": "Laser Defense Turret" +} diff --git a/src/main/resources/assets/electricadvantage/lang/en_au.lang b/src/main/resources/assets/electricadvantage/lang/en_au.lang deleted file mode 100644 index e300e57..0000000 --- a/src/main/resources/assets/electricadvantage/lang/en_au.lang +++ /dev/null @@ -1,54 +0,0 @@ -language_support_goals=english (en_US,en_EN,en_CA,en_GB, en_AU, en_PT), spanish (es_MX,es_ES), chinese (zh_CN), japanese (ja_JA), portugese (pt_BR), german (de_DE), italian (it_IT), korean (ko_KR) - -item.electricadvantage.blank_circuit_board.name=Circuit Board (Blank) -item.electricadvantage.control_circuit.name=Control Circuit -item.electricadvantage.integrated_circuit.name=Microchip -item.electricadvantage.psu.name=Power Supply Unit -item.electricadvantage.silicon_ingot.name=Silicon Ingot -item.electricadvantage.silicon_mix.name=Silicon Blend -item.electricadvantage.solder_mix.name=Solder Blend -item.electricadvantage.solder.name=Solder -item.electricadvantage.li_powder.name=Powdered Lithium -item.electricadvantage.li_ingot.name=Lithium Ingot -item.electricadvantage.li_nugget.name=Lithium Nugget -item.electricadvantage.sulfur_powder.name=Powdered Sulfur -item.electricadvantage.lead_acid_battery.name=Lead-Acid Battery -item.electricadvantage.nickel_hydride_battery.name=Nickel-Metal Hydride Battery -item.electricadvantage.alkaline_battery.name=Alkaline Battery -item.electricadvantage.lithium_battery.name=Lithium-Ion Battery - -tile.electricadvantage.electric_conduit.name=Electric Power Cable -tile.electricadvantage.electric_track.name=Electric Scaffold -tile.electricadvantage.electric_battery_array.name=Battery Array -tile.electricadvantage.electric_crusher.name=Electric Rock Crusher -tile.electricadvantage.laser_turret.name=Laser Defense Turret -tile.electricadvantage.electric_drill.name=Electric Mining Drill -tile.electricadvantage.electric_fabricator.name=Automated Assembler -tile.electricadvantage.electric_furnace.name=Electric Arc Furnace -tile.electricadvantage.electric_oven.name=Electric Oven -tile.electricadvantage.electric_pcb_printer.name=PCB Printer -tile.electricadvantage.geothermal_generator.name=Geothermal Generator -tile.electricadvantage.hydroelectric_generator.name=Hydroelectric Generator -tile.electricadvantage.photovoltaic_generator.name=Photovoltaic Generator -tile.electricadvantage.steam_powered_generator.name=Steam-Powered Electric Generator -tile.electricadvantage.growth_chamber.name=Growth Chamber -tile.electricadvantage.growth_chamber_controller.name=Growth Chamber Control Unit -tile.electricadvantage.li_ore.name=Lithium Ore -tile.electricadvantage.sulfur_ore.name=Sulfur Ore -tile.electricadvantage.led_bar.name=LED Bar - -tooltip.battery.charge=Charge -tooltip.battery.capacity=Capacity - -death.attack.laser=%1$s vaporized -death.attack.laser.player=%2$s vaporized %1$s -death.attack.propeller=%1$s was pulverized by a propeller. -death.attack.propeller.player=%2$s pushed %1$s into a propeller. - - -tile.electricadvantage.electric_switch.name=Electric Switch -tile.electricadvantage.electric_still.name=Electric Distiller -tile.electricadvantage.electric_pump.name=Electric Pump -tile.electricadvantage.plastic_refinery.name=Petro-Plastic Refinery -item.electricadvantage.petrolplastic_ingot.name=Petro-Plastic Ingot -tile.electricadvantage.pump_pipe_electric.name=Pump Pipe diff --git a/src/main/resources/assets/electricadvantage/lang/en_ca.json b/src/main/resources/assets/electricadvantage/lang/en_ca.json new file mode 100644 index 0000000..c629c43 --- /dev/null +++ b/src/main/resources/assets/electricadvantage/lang/en_ca.json @@ -0,0 +1,92 @@ +{ + "language_support_goals": "english (en_US,en_EN,en_CA,en_GB, en_AU, en_PT), spanish (es_MX,es_ES), chinese (zh_CN), japanese (ja_JA), portugese (pt_BR), german (de_DE), italian (it_IT), korean (ko_KR)", + "item.electricadvantage.blank_circuit_board.name": "Circuit Board (Blank)", + "item.electricadvantage.control_circuit.name": "Control Circuit", + "item.electricadvantage.integrated_circuit.name": "Microchip", + "item.electricadvantage.psu.name": "Power Supply Unit", + "item.electricadvantage.silicon_ingot.name": "Silicon Ingot", + "item.electricadvantage.silicon_mix.name": "Silicon Blend", + "item.electricadvantage.solder_mix.name": "Solder Blend", + "item.electricadvantage.solder.name": "Solder", + "item.electricadvantage.li_powder.name": "Powdered Lithium", + "item.electricadvantage.li_ingot.name": "Lithium Ingot", + "item.electricadvantage.li_nugget.name": "Lithium Nugget", + "item.electricadvantage.sulfur_powder.name": "Powdered Sulfur", + "item.electricadvantage.lead_acid_battery.name": "Lead-Acid Battery", + "item.electricadvantage.nickel_hydride_battery.name": "Nickel-Metal Hydride Battery", + "item.electricadvantage.alkaline_battery.name": "Alkaline Battery", + "item.electricadvantage.lithium_battery.name": "Lithium-Ion Battery", + "tile.electricadvantage.electric_conduit.name": "Electric Power Cable", + "tile.electricadvantage.electric_track.name": "Electric Scaffold", + "tile.electricadvantage.electric_battery_array.name": "Battery Array", + "tile.electricadvantage.electric_crusher.name": "Electric Rock Crusher", + "tile.electricadvantage.laser_turret.name": "Laser Defense Turret", + "tile.electricadvantage.electric_drill.name": "Electric Mining Drill", + "tile.electricadvantage.electric_fabricator.name": "Automated Assembler", + "tile.electricadvantage.electric_furnace.name": "Electric Arc Furnace", + "tile.electricadvantage.electric_oven.name": "Electric Oven", + "tile.electricadvantage.electric_pcb_printer.name": "PCB Printer", + "tile.electricadvantage.geothermal_generator.name": "Geothermal Generator", + "tile.electricadvantage.hydroelectric_generator.name": "Hydroelectric Generator", + "tile.electricadvantage.photovoltaic_generator.name": "Photovoltaic Generator", + "tile.electricadvantage.steam_powered_generator.name": "Steam-Powered Electric Generator", + "tile.electricadvantage.growth_chamber.name": "Growth Chamber", + "tile.electricadvantage.growth_chamber_controller.name": "Growth Chamber Control Unit", + "tile.electricadvantage.li_ore.name": "Lithium Ore", + "tile.electricadvantage.sulfur_ore.name": "Sulfur Ore", + "tile.electricadvantage.led_bar.name": "LED Bar", + "tooltip.battery.charge": "Charge", + "tooltip.battery.capacity": "Capacity", + "death.attack.laser": "%1$s vaporized", + "death.attack.laser.player": "%2$s vaporized %1$s ", + "death.attack.propeller": "%1$s was pulverized by a propeller.", + "death.attack.propeller.player": "%2$s pushed %1$s into a propeller.", + "tile.electricadvantage.electric_switch.name": "Electric Switch", + "tile.electricadvantage.electric_still.name": "Electric Distiller", + "tile.electricadvantage.electric_pump.name": "Electric Pump", + "tile.electricadvantage.plastic_refinery.name": "Petro-Plastic Refinery", + "item.electricadvantage.petrolplastic_ingot.name": "Petro-Plastic Ingot", + "tile.electricadvantage.pump_pipe_electric.name": "Pump Pipe", + "item.electricadvantage.blank_circuit_board": "Circuit Board (Blank)", + "item.electricadvantage.control_circuit": "Control Circuit", + "item.electricadvantage.integrated_circuit": "Microchip", + "item.electricadvantage.psu": "Power Supply Unit", + "item.electricadvantage.silicon_ingot": "Silicon Ingot", + "item.electricadvantage.silicon_mix": "Silicon Blend", + "item.electricadvantage.solder_mix": "Solder Blend", + "item.electricadvantage.solder": "Solder", + "item.electricadvantage.li_powder": "Powdered Lithium", + "item.electricadvantage.li_ingot": "Lithium Ingot", + "item.electricadvantage.li_nugget": "Lithium Nugget", + "item.electricadvantage.sulfur_powder": "Powdered Sulfur", + "item.electricadvantage.lead_acid_battery": "Lead-Acid Battery", + "item.electricadvantage.nickel_hydride_battery": "Nickel-Metal Hydride Battery", + "item.electricadvantage.alkaline_battery": "Alkaline Battery", + "item.electricadvantage.lithium_battery": "Lithium-Ion Battery", + "block.electricadvantage.electric_conduit": "Electric Power Cable", + "block.electricadvantage.electric_track": "Electric Scaffold", + "block.electricadvantage.electric_battery_array": "Battery Array", + "block.electricadvantage.electric_crusher": "Electric Rock Crusher", + "block.electricadvantage.laser_turret": "Laser Defense Turret", + "block.electricadvantage.electric_drill": "Electric Mining Drill", + "block.electricadvantage.electric_fabricator": "Automated Assembler", + "block.electricadvantage.electric_furnace": "Electric Arc Furnace", + "block.electricadvantage.electric_oven": "Electric Oven", + "block.electricadvantage.electric_pcb_printer": "PCB Printer", + "block.electricadvantage.geothermal_generator": "Geothermal Generator", + "block.electricadvantage.hydroelectric_generator": "Hydroelectric Generator", + "block.electricadvantage.photovoltaic_generator": "Photovoltaic Generator", + "block.electricadvantage.steam_powered_generator": "Steam-Powered Electric Generator", + "block.electricadvantage.growth_chamber": "Growth Chamber", + "block.electricadvantage.growth_chamber_controller": "Growth Chamber Control Unit", + "block.electricadvantage.li_ore": "Lithium Ore", + "block.electricadvantage.sulfur_ore": "Sulfur Ore", + "block.electricadvantage.led_bar": "LED Bar", + "block.electricadvantage.electric_switch": "Electric Switch", + "block.electricadvantage.electric_still": "Electric Distiller", + "block.electricadvantage.electric_pump": "Electric Pump", + "block.electricadvantage.plastic_refinery": "Petro-Plastic Refinery", + "item.electricadvantage.petrolplastic_ingot": "Petro-Plastic Ingot", + "block.electricadvantage.pump_pipe_electric": "Pump Pipe", + "block.electricadvantage.laser_turret_evil": "Laser Defense Turret" +} diff --git a/src/main/resources/assets/electricadvantage/lang/en_ca.lang b/src/main/resources/assets/electricadvantage/lang/en_ca.lang deleted file mode 100644 index e300e57..0000000 --- a/src/main/resources/assets/electricadvantage/lang/en_ca.lang +++ /dev/null @@ -1,54 +0,0 @@ -language_support_goals=english (en_US,en_EN,en_CA,en_GB, en_AU, en_PT), spanish (es_MX,es_ES), chinese (zh_CN), japanese (ja_JA), portugese (pt_BR), german (de_DE), italian (it_IT), korean (ko_KR) - -item.electricadvantage.blank_circuit_board.name=Circuit Board (Blank) -item.electricadvantage.control_circuit.name=Control Circuit -item.electricadvantage.integrated_circuit.name=Microchip -item.electricadvantage.psu.name=Power Supply Unit -item.electricadvantage.silicon_ingot.name=Silicon Ingot -item.electricadvantage.silicon_mix.name=Silicon Blend -item.electricadvantage.solder_mix.name=Solder Blend -item.electricadvantage.solder.name=Solder -item.electricadvantage.li_powder.name=Powdered Lithium -item.electricadvantage.li_ingot.name=Lithium Ingot -item.electricadvantage.li_nugget.name=Lithium Nugget -item.electricadvantage.sulfur_powder.name=Powdered Sulfur -item.electricadvantage.lead_acid_battery.name=Lead-Acid Battery -item.electricadvantage.nickel_hydride_battery.name=Nickel-Metal Hydride Battery -item.electricadvantage.alkaline_battery.name=Alkaline Battery -item.electricadvantage.lithium_battery.name=Lithium-Ion Battery - -tile.electricadvantage.electric_conduit.name=Electric Power Cable -tile.electricadvantage.electric_track.name=Electric Scaffold -tile.electricadvantage.electric_battery_array.name=Battery Array -tile.electricadvantage.electric_crusher.name=Electric Rock Crusher -tile.electricadvantage.laser_turret.name=Laser Defense Turret -tile.electricadvantage.electric_drill.name=Electric Mining Drill -tile.electricadvantage.electric_fabricator.name=Automated Assembler -tile.electricadvantage.electric_furnace.name=Electric Arc Furnace -tile.electricadvantage.electric_oven.name=Electric Oven -tile.electricadvantage.electric_pcb_printer.name=PCB Printer -tile.electricadvantage.geothermal_generator.name=Geothermal Generator -tile.electricadvantage.hydroelectric_generator.name=Hydroelectric Generator -tile.electricadvantage.photovoltaic_generator.name=Photovoltaic Generator -tile.electricadvantage.steam_powered_generator.name=Steam-Powered Electric Generator -tile.electricadvantage.growth_chamber.name=Growth Chamber -tile.electricadvantage.growth_chamber_controller.name=Growth Chamber Control Unit -tile.electricadvantage.li_ore.name=Lithium Ore -tile.electricadvantage.sulfur_ore.name=Sulfur Ore -tile.electricadvantage.led_bar.name=LED Bar - -tooltip.battery.charge=Charge -tooltip.battery.capacity=Capacity - -death.attack.laser=%1$s vaporized -death.attack.laser.player=%2$s vaporized %1$s -death.attack.propeller=%1$s was pulverized by a propeller. -death.attack.propeller.player=%2$s pushed %1$s into a propeller. - - -tile.electricadvantage.electric_switch.name=Electric Switch -tile.electricadvantage.electric_still.name=Electric Distiller -tile.electricadvantage.electric_pump.name=Electric Pump -tile.electricadvantage.plastic_refinery.name=Petro-Plastic Refinery -item.electricadvantage.petrolplastic_ingot.name=Petro-Plastic Ingot -tile.electricadvantage.pump_pipe_electric.name=Pump Pipe diff --git a/src/main/resources/assets/electricadvantage/lang/en_en.json b/src/main/resources/assets/electricadvantage/lang/en_en.json new file mode 100644 index 0000000..7c5769c --- /dev/null +++ b/src/main/resources/assets/electricadvantage/lang/en_en.json @@ -0,0 +1,92 @@ +{ + "language_support_goals": "english (en_US,en_EN,en_CA,en_GB, en_AU, en_PT), spanish (es_MX,es_ES), chinese (zh_CN), japanese (ja_JA), portugese (pt_BR), german (de_DE), italian (it_IT), korean (ko_KR)", + "item.electricadvantage.blank_circuit_board.name": "Circuit Board (Blank)", + "item.electricadvantage.control_circuit.name": "Control Circuit", + "item.electricadvantage.integrated_circuit.name": "Microchip", + "item.electricadvantage.psu.name": "Power Supply Unit", + "item.electricadvantage.silicon_ingot.name": "Silicon Ingot", + "item.electricadvantage.silicon_mix.name": "Silicon Blend", + "item.electricadvantage.solder_mix.name": "Solder Blend", + "item.electricadvantage.solder.name": "Solder", + "item.electricadvantage.li_powder.name": "Powdered Lithium", + "item.electricadvantage.li_ingot.name": "Lithium Ingot", + "item.electricadvantage.li_nugget.name": "Lithium Nugget", + "item.electricadvantage.sulfur_powder.name": "Powdered Sulfur", + "item.electricadvantage.lead_acid_battery.name": "Lead-Acid Battery", + "item.electricadvantage.nickel_hydride_battery.name": "Nickel-Metal Hydride Battery", + "item.electricadvantage.alkaline_battery.name": "Alkaline Battery", + "item.electricadvantage.lithium_battery.name": "Lithium-Ion Battery", + "tile.electricadvantage.electric_conduit.name": "Electric Power Cable", + "tile.electricadvantage.electric_track.name": "Electric Scaffold", + "tile.electricadvantage.electric_battery_array.name": "Battery Array", + "tile.electricadvantage.electric_crusher.name": "Electric Rock Crusher", + "tile.electricadvantage.laser_turret.name": "Laser Turret", + "tile.electricadvantage.electric_drill.name": "Electric Mining Drill", + "tile.electricadvantage.electric_fabricator.name": "Automated Assembler", + "tile.electricadvantage.electric_furnace.name": "Electric Arc Furnace", + "tile.electricadvantage.electric_oven.name": "Electric Oven", + "tile.electricadvantage.electric_pcb_printer.name": "PCB Printer", + "tile.electricadvantage.geothermal_generator.name": "Geothermal Generator", + "tile.electricadvantage.hydroelectric_generator.name": "Hydroelectric Generator", + "tile.electricadvantage.photovoltaic_generator.name": "Photovoltaic Generator", + "tile.electricadvantage.steam_powered_generator.name": "Steam-Powered Electric Generator", + "tile.electricadvantage.growth_chamber.name": "Growth Chamber", + "tile.electricadvantage.growth_chamber_controller.name": "Growth Chamber Control Unit", + "tile.electricadvantage.li_ore.name": "Lithium Ore", + "tile.electricadvantage.sulfur_ore.name": "Sulfur Ore", + "tile.electricadvantage.led_bar.name": "LED Bar", + "tooltip.battery.charge": "Charge", + "tooltip.battery.capacity": "Capacity", + "death.attack.laser": "%1$s vaporized", + "death.attack.laser.player": "%2$s vaporized %1$s ", + "death.attack.propeller": "%1$s was pulverized by a propeller.", + "death.attack.propeller.player": "%2$s pushed %1$s into a propeller.", + "tile.electricadvantage.electric_switch.name": "Electric Switch", + "tile.electricadvantage.electric_still.name": "Electric Distiller", + "tile.electricadvantage.electric_pump.name": "Electric Pump", + "tile.electricadvantage.plastic_refinery.name": "Petro-Plastic Refinery", + "item.electricadvantage.petrolplastic_ingot.name": "Petro-Plastic Ingot", + "tile.electricadvantage.pump_pipe_electric.name": "Pump Pipe", + "item.electricadvantage.blank_circuit_board": "Circuit Board (Blank)", + "item.electricadvantage.control_circuit": "Control Circuit", + "item.electricadvantage.integrated_circuit": "Microchip", + "item.electricadvantage.psu": "Power Supply Unit", + "item.electricadvantage.silicon_ingot": "Silicon Ingot", + "item.electricadvantage.silicon_mix": "Silicon Blend", + "item.electricadvantage.solder_mix": "Solder Blend", + "item.electricadvantage.solder": "Solder", + "item.electricadvantage.li_powder": "Powdered Lithium", + "item.electricadvantage.li_ingot": "Lithium Ingot", + "item.electricadvantage.li_nugget": "Lithium Nugget", + "item.electricadvantage.sulfur_powder": "Powdered Sulfur", + "item.electricadvantage.lead_acid_battery": "Lead-Acid Battery", + "item.electricadvantage.nickel_hydride_battery": "Nickel-Metal Hydride Battery", + "item.electricadvantage.alkaline_battery": "Alkaline Battery", + "item.electricadvantage.lithium_battery": "Lithium-Ion Battery", + "block.electricadvantage.electric_conduit": "Electric Power Cable", + "block.electricadvantage.electric_track": "Electric Scaffold", + "block.electricadvantage.electric_battery_array": "Battery Array", + "block.electricadvantage.electric_crusher": "Electric Rock Crusher", + "block.electricadvantage.laser_turret": "Laser Turret", + "block.electricadvantage.electric_drill": "Electric Mining Drill", + "block.electricadvantage.electric_fabricator": "Automated Assembler", + "block.electricadvantage.electric_furnace": "Electric Arc Furnace", + "block.electricadvantage.electric_oven": "Electric Oven", + "block.electricadvantage.electric_pcb_printer": "PCB Printer", + "block.electricadvantage.geothermal_generator": "Geothermal Generator", + "block.electricadvantage.hydroelectric_generator": "Hydroelectric Generator", + "block.electricadvantage.photovoltaic_generator": "Photovoltaic Generator", + "block.electricadvantage.steam_powered_generator": "Steam-Powered Electric Generator", + "block.electricadvantage.growth_chamber": "Growth Chamber", + "block.electricadvantage.growth_chamber_controller": "Growth Chamber Control Unit", + "block.electricadvantage.li_ore": "Lithium Ore", + "block.electricadvantage.sulfur_ore": "Sulfur Ore", + "block.electricadvantage.led_bar": "LED Bar", + "block.electricadvantage.electric_switch": "Electric Switch", + "block.electricadvantage.electric_still": "Electric Distiller", + "block.electricadvantage.electric_pump": "Electric Pump", + "block.electricadvantage.plastic_refinery": "Petro-Plastic Refinery", + "item.electricadvantage.petrolplastic_ingot": "Petro-Plastic Ingot", + "block.electricadvantage.pump_pipe_electric": "Pump Pipe", + "block.electricadvantage.laser_turret_evil": "Laser Turret" +} diff --git a/src/main/resources/assets/electricadvantage/lang/en_en.lang b/src/main/resources/assets/electricadvantage/lang/en_en.lang deleted file mode 100644 index 3fde5ab..0000000 --- a/src/main/resources/assets/electricadvantage/lang/en_en.lang +++ /dev/null @@ -1,54 +0,0 @@ -language_support_goals=english (en_US,en_EN,en_CA,en_GB, en_AU, en_PT), spanish (es_MX,es_ES), chinese (zh_CN), japanese (ja_JA), portugese (pt_BR), german (de_DE), italian (it_IT), korean (ko_KR) - -item.electricadvantage.blank_circuit_board.name=Circuit Board (Blank) -item.electricadvantage.control_circuit.name=Control Circuit -item.electricadvantage.integrated_circuit.name=Microchip -item.electricadvantage.psu.name=Power Supply Unit -item.electricadvantage.silicon_ingot.name=Silicon Ingot -item.electricadvantage.silicon_mix.name=Silicon Blend -item.electricadvantage.solder_mix.name=Solder Blend -item.electricadvantage.solder.name=Solder -item.electricadvantage.li_powder.name=Powdered Lithium -item.electricadvantage.li_ingot.name=Lithium Ingot -item.electricadvantage.li_nugget.name=Lithium Nugget -item.electricadvantage.sulfur_powder.name=Powdered Sulfur -item.electricadvantage.lead_acid_battery.name=Lead-Acid Battery -item.electricadvantage.nickel_hydride_battery.name=Nickel-Metal Hydride Battery -item.electricadvantage.alkaline_battery.name=Alkaline Battery -item.electricadvantage.lithium_battery.name=Lithium-Ion Battery - -tile.electricadvantage.electric_conduit.name=Electric Power Cable -tile.electricadvantage.electric_track.name=Electric Scaffold -tile.electricadvantage.electric_battery_array.name=Battery Array -tile.electricadvantage.electric_crusher.name=Electric Rock Crusher -tile.electricadvantage.laser_turret.name=Laser Turret -tile.electricadvantage.electric_drill.name=Electric Mining Drill -tile.electricadvantage.electric_fabricator.name=Automated Assembler -tile.electricadvantage.electric_furnace.name=Electric Arc Furnace -tile.electricadvantage.electric_oven.name=Electric Oven -tile.electricadvantage.electric_pcb_printer.name=PCB Printer -tile.electricadvantage.geothermal_generator.name=Geothermal Generator -tile.electricadvantage.hydroelectric_generator.name=Hydroelectric Generator -tile.electricadvantage.photovoltaic_generator.name=Photovoltaic Generator -tile.electricadvantage.steam_powered_generator.name=Steam-Powered Electric Generator -tile.electricadvantage.growth_chamber.name=Growth Chamber -tile.electricadvantage.growth_chamber_controller.name=Growth Chamber Control Unit -tile.electricadvantage.li_ore.name=Lithium Ore -tile.electricadvantage.sulfur_ore.name=Sulfur Ore -tile.electricadvantage.led_bar.name=LED Bar - -tooltip.battery.charge=Charge -tooltip.battery.capacity=Capacity - -death.attack.laser=%1$s vaporized -death.attack.laser.player=%2$s vaporized %1$s -death.attack.propeller=%1$s was pulverized by a propeller. -death.attack.propeller.player=%2$s pushed %1$s into a propeller. - - -tile.electricadvantage.electric_switch.name=Electric Switch -tile.electricadvantage.electric_still.name=Electric Distiller -tile.electricadvantage.electric_pump.name=Electric Pump -tile.electricadvantage.plastic_refinery.name=Petro-Plastic Refinery -item.electricadvantage.petrolplastic_ingot.name=Petro-Plastic Ingot -tile.electricadvantage.pump_pipe_electric.name=Pump Pipe diff --git a/src/main/resources/assets/electricadvantage/lang/en_gb.json b/src/main/resources/assets/electricadvantage/lang/en_gb.json new file mode 100644 index 0000000..c629c43 --- /dev/null +++ b/src/main/resources/assets/electricadvantage/lang/en_gb.json @@ -0,0 +1,92 @@ +{ + "language_support_goals": "english (en_US,en_EN,en_CA,en_GB, en_AU, en_PT), spanish (es_MX,es_ES), chinese (zh_CN), japanese (ja_JA), portugese (pt_BR), german (de_DE), italian (it_IT), korean (ko_KR)", + "item.electricadvantage.blank_circuit_board.name": "Circuit Board (Blank)", + "item.electricadvantage.control_circuit.name": "Control Circuit", + "item.electricadvantage.integrated_circuit.name": "Microchip", + "item.electricadvantage.psu.name": "Power Supply Unit", + "item.electricadvantage.silicon_ingot.name": "Silicon Ingot", + "item.electricadvantage.silicon_mix.name": "Silicon Blend", + "item.electricadvantage.solder_mix.name": "Solder Blend", + "item.electricadvantage.solder.name": "Solder", + "item.electricadvantage.li_powder.name": "Powdered Lithium", + "item.electricadvantage.li_ingot.name": "Lithium Ingot", + "item.electricadvantage.li_nugget.name": "Lithium Nugget", + "item.electricadvantage.sulfur_powder.name": "Powdered Sulfur", + "item.electricadvantage.lead_acid_battery.name": "Lead-Acid Battery", + "item.electricadvantage.nickel_hydride_battery.name": "Nickel-Metal Hydride Battery", + "item.electricadvantage.alkaline_battery.name": "Alkaline Battery", + "item.electricadvantage.lithium_battery.name": "Lithium-Ion Battery", + "tile.electricadvantage.electric_conduit.name": "Electric Power Cable", + "tile.electricadvantage.electric_track.name": "Electric Scaffold", + "tile.electricadvantage.electric_battery_array.name": "Battery Array", + "tile.electricadvantage.electric_crusher.name": "Electric Rock Crusher", + "tile.electricadvantage.laser_turret.name": "Laser Defense Turret", + "tile.electricadvantage.electric_drill.name": "Electric Mining Drill", + "tile.electricadvantage.electric_fabricator.name": "Automated Assembler", + "tile.electricadvantage.electric_furnace.name": "Electric Arc Furnace", + "tile.electricadvantage.electric_oven.name": "Electric Oven", + "tile.electricadvantage.electric_pcb_printer.name": "PCB Printer", + "tile.electricadvantage.geothermal_generator.name": "Geothermal Generator", + "tile.electricadvantage.hydroelectric_generator.name": "Hydroelectric Generator", + "tile.electricadvantage.photovoltaic_generator.name": "Photovoltaic Generator", + "tile.electricadvantage.steam_powered_generator.name": "Steam-Powered Electric Generator", + "tile.electricadvantage.growth_chamber.name": "Growth Chamber", + "tile.electricadvantage.growth_chamber_controller.name": "Growth Chamber Control Unit", + "tile.electricadvantage.li_ore.name": "Lithium Ore", + "tile.electricadvantage.sulfur_ore.name": "Sulfur Ore", + "tile.electricadvantage.led_bar.name": "LED Bar", + "tooltip.battery.charge": "Charge", + "tooltip.battery.capacity": "Capacity", + "death.attack.laser": "%1$s vaporized", + "death.attack.laser.player": "%2$s vaporized %1$s ", + "death.attack.propeller": "%1$s was pulverized by a propeller.", + "death.attack.propeller.player": "%2$s pushed %1$s into a propeller.", + "tile.electricadvantage.electric_switch.name": "Electric Switch", + "tile.electricadvantage.electric_still.name": "Electric Distiller", + "tile.electricadvantage.electric_pump.name": "Electric Pump", + "tile.electricadvantage.plastic_refinery.name": "Petro-Plastic Refinery", + "item.electricadvantage.petrolplastic_ingot.name": "Petro-Plastic Ingot", + "tile.electricadvantage.pump_pipe_electric.name": "Pump Pipe", + "item.electricadvantage.blank_circuit_board": "Circuit Board (Blank)", + "item.electricadvantage.control_circuit": "Control Circuit", + "item.electricadvantage.integrated_circuit": "Microchip", + "item.electricadvantage.psu": "Power Supply Unit", + "item.electricadvantage.silicon_ingot": "Silicon Ingot", + "item.electricadvantage.silicon_mix": "Silicon Blend", + "item.electricadvantage.solder_mix": "Solder Blend", + "item.electricadvantage.solder": "Solder", + "item.electricadvantage.li_powder": "Powdered Lithium", + "item.electricadvantage.li_ingot": "Lithium Ingot", + "item.electricadvantage.li_nugget": "Lithium Nugget", + "item.electricadvantage.sulfur_powder": "Powdered Sulfur", + "item.electricadvantage.lead_acid_battery": "Lead-Acid Battery", + "item.electricadvantage.nickel_hydride_battery": "Nickel-Metal Hydride Battery", + "item.electricadvantage.alkaline_battery": "Alkaline Battery", + "item.electricadvantage.lithium_battery": "Lithium-Ion Battery", + "block.electricadvantage.electric_conduit": "Electric Power Cable", + "block.electricadvantage.electric_track": "Electric Scaffold", + "block.electricadvantage.electric_battery_array": "Battery Array", + "block.electricadvantage.electric_crusher": "Electric Rock Crusher", + "block.electricadvantage.laser_turret": "Laser Defense Turret", + "block.electricadvantage.electric_drill": "Electric Mining Drill", + "block.electricadvantage.electric_fabricator": "Automated Assembler", + "block.electricadvantage.electric_furnace": "Electric Arc Furnace", + "block.electricadvantage.electric_oven": "Electric Oven", + "block.electricadvantage.electric_pcb_printer": "PCB Printer", + "block.electricadvantage.geothermal_generator": "Geothermal Generator", + "block.electricadvantage.hydroelectric_generator": "Hydroelectric Generator", + "block.electricadvantage.photovoltaic_generator": "Photovoltaic Generator", + "block.electricadvantage.steam_powered_generator": "Steam-Powered Electric Generator", + "block.electricadvantage.growth_chamber": "Growth Chamber", + "block.electricadvantage.growth_chamber_controller": "Growth Chamber Control Unit", + "block.electricadvantage.li_ore": "Lithium Ore", + "block.electricadvantage.sulfur_ore": "Sulfur Ore", + "block.electricadvantage.led_bar": "LED Bar", + "block.electricadvantage.electric_switch": "Electric Switch", + "block.electricadvantage.electric_still": "Electric Distiller", + "block.electricadvantage.electric_pump": "Electric Pump", + "block.electricadvantage.plastic_refinery": "Petro-Plastic Refinery", + "item.electricadvantage.petrolplastic_ingot": "Petro-Plastic Ingot", + "block.electricadvantage.pump_pipe_electric": "Pump Pipe", + "block.electricadvantage.laser_turret_evil": "Laser Defense Turret" +} diff --git a/src/main/resources/assets/electricadvantage/lang/en_gb.lang b/src/main/resources/assets/electricadvantage/lang/en_gb.lang deleted file mode 100644 index e300e57..0000000 --- a/src/main/resources/assets/electricadvantage/lang/en_gb.lang +++ /dev/null @@ -1,54 +0,0 @@ -language_support_goals=english (en_US,en_EN,en_CA,en_GB, en_AU, en_PT), spanish (es_MX,es_ES), chinese (zh_CN), japanese (ja_JA), portugese (pt_BR), german (de_DE), italian (it_IT), korean (ko_KR) - -item.electricadvantage.blank_circuit_board.name=Circuit Board (Blank) -item.electricadvantage.control_circuit.name=Control Circuit -item.electricadvantage.integrated_circuit.name=Microchip -item.electricadvantage.psu.name=Power Supply Unit -item.electricadvantage.silicon_ingot.name=Silicon Ingot -item.electricadvantage.silicon_mix.name=Silicon Blend -item.electricadvantage.solder_mix.name=Solder Blend -item.electricadvantage.solder.name=Solder -item.electricadvantage.li_powder.name=Powdered Lithium -item.electricadvantage.li_ingot.name=Lithium Ingot -item.electricadvantage.li_nugget.name=Lithium Nugget -item.electricadvantage.sulfur_powder.name=Powdered Sulfur -item.electricadvantage.lead_acid_battery.name=Lead-Acid Battery -item.electricadvantage.nickel_hydride_battery.name=Nickel-Metal Hydride Battery -item.electricadvantage.alkaline_battery.name=Alkaline Battery -item.electricadvantage.lithium_battery.name=Lithium-Ion Battery - -tile.electricadvantage.electric_conduit.name=Electric Power Cable -tile.electricadvantage.electric_track.name=Electric Scaffold -tile.electricadvantage.electric_battery_array.name=Battery Array -tile.electricadvantage.electric_crusher.name=Electric Rock Crusher -tile.electricadvantage.laser_turret.name=Laser Defense Turret -tile.electricadvantage.electric_drill.name=Electric Mining Drill -tile.electricadvantage.electric_fabricator.name=Automated Assembler -tile.electricadvantage.electric_furnace.name=Electric Arc Furnace -tile.electricadvantage.electric_oven.name=Electric Oven -tile.electricadvantage.electric_pcb_printer.name=PCB Printer -tile.electricadvantage.geothermal_generator.name=Geothermal Generator -tile.electricadvantage.hydroelectric_generator.name=Hydroelectric Generator -tile.electricadvantage.photovoltaic_generator.name=Photovoltaic Generator -tile.electricadvantage.steam_powered_generator.name=Steam-Powered Electric Generator -tile.electricadvantage.growth_chamber.name=Growth Chamber -tile.electricadvantage.growth_chamber_controller.name=Growth Chamber Control Unit -tile.electricadvantage.li_ore.name=Lithium Ore -tile.electricadvantage.sulfur_ore.name=Sulfur Ore -tile.electricadvantage.led_bar.name=LED Bar - -tooltip.battery.charge=Charge -tooltip.battery.capacity=Capacity - -death.attack.laser=%1$s vaporized -death.attack.laser.player=%2$s vaporized %1$s -death.attack.propeller=%1$s was pulverized by a propeller. -death.attack.propeller.player=%2$s pushed %1$s into a propeller. - - -tile.electricadvantage.electric_switch.name=Electric Switch -tile.electricadvantage.electric_still.name=Electric Distiller -tile.electricadvantage.electric_pump.name=Electric Pump -tile.electricadvantage.plastic_refinery.name=Petro-Plastic Refinery -item.electricadvantage.petrolplastic_ingot.name=Petro-Plastic Ingot -tile.electricadvantage.pump_pipe_electric.name=Pump Pipe diff --git a/src/main/resources/assets/electricadvantage/lang/en_pt.json b/src/main/resources/assets/electricadvantage/lang/en_pt.json new file mode 100644 index 0000000..7c5769c --- /dev/null +++ b/src/main/resources/assets/electricadvantage/lang/en_pt.json @@ -0,0 +1,92 @@ +{ + "language_support_goals": "english (en_US,en_EN,en_CA,en_GB, en_AU, en_PT), spanish (es_MX,es_ES), chinese (zh_CN), japanese (ja_JA), portugese (pt_BR), german (de_DE), italian (it_IT), korean (ko_KR)", + "item.electricadvantage.blank_circuit_board.name": "Circuit Board (Blank)", + "item.electricadvantage.control_circuit.name": "Control Circuit", + "item.electricadvantage.integrated_circuit.name": "Microchip", + "item.electricadvantage.psu.name": "Power Supply Unit", + "item.electricadvantage.silicon_ingot.name": "Silicon Ingot", + "item.electricadvantage.silicon_mix.name": "Silicon Blend", + "item.electricadvantage.solder_mix.name": "Solder Blend", + "item.electricadvantage.solder.name": "Solder", + "item.electricadvantage.li_powder.name": "Powdered Lithium", + "item.electricadvantage.li_ingot.name": "Lithium Ingot", + "item.electricadvantage.li_nugget.name": "Lithium Nugget", + "item.electricadvantage.sulfur_powder.name": "Powdered Sulfur", + "item.electricadvantage.lead_acid_battery.name": "Lead-Acid Battery", + "item.electricadvantage.nickel_hydride_battery.name": "Nickel-Metal Hydride Battery", + "item.electricadvantage.alkaline_battery.name": "Alkaline Battery", + "item.electricadvantage.lithium_battery.name": "Lithium-Ion Battery", + "tile.electricadvantage.electric_conduit.name": "Electric Power Cable", + "tile.electricadvantage.electric_track.name": "Electric Scaffold", + "tile.electricadvantage.electric_battery_array.name": "Battery Array", + "tile.electricadvantage.electric_crusher.name": "Electric Rock Crusher", + "tile.electricadvantage.laser_turret.name": "Laser Turret", + "tile.electricadvantage.electric_drill.name": "Electric Mining Drill", + "tile.electricadvantage.electric_fabricator.name": "Automated Assembler", + "tile.electricadvantage.electric_furnace.name": "Electric Arc Furnace", + "tile.electricadvantage.electric_oven.name": "Electric Oven", + "tile.electricadvantage.electric_pcb_printer.name": "PCB Printer", + "tile.electricadvantage.geothermal_generator.name": "Geothermal Generator", + "tile.electricadvantage.hydroelectric_generator.name": "Hydroelectric Generator", + "tile.electricadvantage.photovoltaic_generator.name": "Photovoltaic Generator", + "tile.electricadvantage.steam_powered_generator.name": "Steam-Powered Electric Generator", + "tile.electricadvantage.growth_chamber.name": "Growth Chamber", + "tile.electricadvantage.growth_chamber_controller.name": "Growth Chamber Control Unit", + "tile.electricadvantage.li_ore.name": "Lithium Ore", + "tile.electricadvantage.sulfur_ore.name": "Sulfur Ore", + "tile.electricadvantage.led_bar.name": "LED Bar", + "tooltip.battery.charge": "Charge", + "tooltip.battery.capacity": "Capacity", + "death.attack.laser": "%1$s vaporized", + "death.attack.laser.player": "%2$s vaporized %1$s ", + "death.attack.propeller": "%1$s was pulverized by a propeller.", + "death.attack.propeller.player": "%2$s pushed %1$s into a propeller.", + "tile.electricadvantage.electric_switch.name": "Electric Switch", + "tile.electricadvantage.electric_still.name": "Electric Distiller", + "tile.electricadvantage.electric_pump.name": "Electric Pump", + "tile.electricadvantage.plastic_refinery.name": "Petro-Plastic Refinery", + "item.electricadvantage.petrolplastic_ingot.name": "Petro-Plastic Ingot", + "tile.electricadvantage.pump_pipe_electric.name": "Pump Pipe", + "item.electricadvantage.blank_circuit_board": "Circuit Board (Blank)", + "item.electricadvantage.control_circuit": "Control Circuit", + "item.electricadvantage.integrated_circuit": "Microchip", + "item.electricadvantage.psu": "Power Supply Unit", + "item.electricadvantage.silicon_ingot": "Silicon Ingot", + "item.electricadvantage.silicon_mix": "Silicon Blend", + "item.electricadvantage.solder_mix": "Solder Blend", + "item.electricadvantage.solder": "Solder", + "item.electricadvantage.li_powder": "Powdered Lithium", + "item.electricadvantage.li_ingot": "Lithium Ingot", + "item.electricadvantage.li_nugget": "Lithium Nugget", + "item.electricadvantage.sulfur_powder": "Powdered Sulfur", + "item.electricadvantage.lead_acid_battery": "Lead-Acid Battery", + "item.electricadvantage.nickel_hydride_battery": "Nickel-Metal Hydride Battery", + "item.electricadvantage.alkaline_battery": "Alkaline Battery", + "item.electricadvantage.lithium_battery": "Lithium-Ion Battery", + "block.electricadvantage.electric_conduit": "Electric Power Cable", + "block.electricadvantage.electric_track": "Electric Scaffold", + "block.electricadvantage.electric_battery_array": "Battery Array", + "block.electricadvantage.electric_crusher": "Electric Rock Crusher", + "block.electricadvantage.laser_turret": "Laser Turret", + "block.electricadvantage.electric_drill": "Electric Mining Drill", + "block.electricadvantage.electric_fabricator": "Automated Assembler", + "block.electricadvantage.electric_furnace": "Electric Arc Furnace", + "block.electricadvantage.electric_oven": "Electric Oven", + "block.electricadvantage.electric_pcb_printer": "PCB Printer", + "block.electricadvantage.geothermal_generator": "Geothermal Generator", + "block.electricadvantage.hydroelectric_generator": "Hydroelectric Generator", + "block.electricadvantage.photovoltaic_generator": "Photovoltaic Generator", + "block.electricadvantage.steam_powered_generator": "Steam-Powered Electric Generator", + "block.electricadvantage.growth_chamber": "Growth Chamber", + "block.electricadvantage.growth_chamber_controller": "Growth Chamber Control Unit", + "block.electricadvantage.li_ore": "Lithium Ore", + "block.electricadvantage.sulfur_ore": "Sulfur Ore", + "block.electricadvantage.led_bar": "LED Bar", + "block.electricadvantage.electric_switch": "Electric Switch", + "block.electricadvantage.electric_still": "Electric Distiller", + "block.electricadvantage.electric_pump": "Electric Pump", + "block.electricadvantage.plastic_refinery": "Petro-Plastic Refinery", + "item.electricadvantage.petrolplastic_ingot": "Petro-Plastic Ingot", + "block.electricadvantage.pump_pipe_electric": "Pump Pipe", + "block.electricadvantage.laser_turret_evil": "Laser Turret" +} diff --git a/src/main/resources/assets/electricadvantage/lang/en_pt.lang b/src/main/resources/assets/electricadvantage/lang/en_pt.lang deleted file mode 100644 index 3fde5ab..0000000 --- a/src/main/resources/assets/electricadvantage/lang/en_pt.lang +++ /dev/null @@ -1,54 +0,0 @@ -language_support_goals=english (en_US,en_EN,en_CA,en_GB, en_AU, en_PT), spanish (es_MX,es_ES), chinese (zh_CN), japanese (ja_JA), portugese (pt_BR), german (de_DE), italian (it_IT), korean (ko_KR) - -item.electricadvantage.blank_circuit_board.name=Circuit Board (Blank) -item.electricadvantage.control_circuit.name=Control Circuit -item.electricadvantage.integrated_circuit.name=Microchip -item.electricadvantage.psu.name=Power Supply Unit -item.electricadvantage.silicon_ingot.name=Silicon Ingot -item.electricadvantage.silicon_mix.name=Silicon Blend -item.electricadvantage.solder_mix.name=Solder Blend -item.electricadvantage.solder.name=Solder -item.electricadvantage.li_powder.name=Powdered Lithium -item.electricadvantage.li_ingot.name=Lithium Ingot -item.electricadvantage.li_nugget.name=Lithium Nugget -item.electricadvantage.sulfur_powder.name=Powdered Sulfur -item.electricadvantage.lead_acid_battery.name=Lead-Acid Battery -item.electricadvantage.nickel_hydride_battery.name=Nickel-Metal Hydride Battery -item.electricadvantage.alkaline_battery.name=Alkaline Battery -item.electricadvantage.lithium_battery.name=Lithium-Ion Battery - -tile.electricadvantage.electric_conduit.name=Electric Power Cable -tile.electricadvantage.electric_track.name=Electric Scaffold -tile.electricadvantage.electric_battery_array.name=Battery Array -tile.electricadvantage.electric_crusher.name=Electric Rock Crusher -tile.electricadvantage.laser_turret.name=Laser Turret -tile.electricadvantage.electric_drill.name=Electric Mining Drill -tile.electricadvantage.electric_fabricator.name=Automated Assembler -tile.electricadvantage.electric_furnace.name=Electric Arc Furnace -tile.electricadvantage.electric_oven.name=Electric Oven -tile.electricadvantage.electric_pcb_printer.name=PCB Printer -tile.electricadvantage.geothermal_generator.name=Geothermal Generator -tile.electricadvantage.hydroelectric_generator.name=Hydroelectric Generator -tile.electricadvantage.photovoltaic_generator.name=Photovoltaic Generator -tile.electricadvantage.steam_powered_generator.name=Steam-Powered Electric Generator -tile.electricadvantage.growth_chamber.name=Growth Chamber -tile.electricadvantage.growth_chamber_controller.name=Growth Chamber Control Unit -tile.electricadvantage.li_ore.name=Lithium Ore -tile.electricadvantage.sulfur_ore.name=Sulfur Ore -tile.electricadvantage.led_bar.name=LED Bar - -tooltip.battery.charge=Charge -tooltip.battery.capacity=Capacity - -death.attack.laser=%1$s vaporized -death.attack.laser.player=%2$s vaporized %1$s -death.attack.propeller=%1$s was pulverized by a propeller. -death.attack.propeller.player=%2$s pushed %1$s into a propeller. - - -tile.electricadvantage.electric_switch.name=Electric Switch -tile.electricadvantage.electric_still.name=Electric Distiller -tile.electricadvantage.electric_pump.name=Electric Pump -tile.electricadvantage.plastic_refinery.name=Petro-Plastic Refinery -item.electricadvantage.petrolplastic_ingot.name=Petro-Plastic Ingot -tile.electricadvantage.pump_pipe_electric.name=Pump Pipe diff --git a/src/main/resources/assets/electricadvantage/lang/en_us.json b/src/main/resources/assets/electricadvantage/lang/en_us.json new file mode 100644 index 0000000..7c5769c --- /dev/null +++ b/src/main/resources/assets/electricadvantage/lang/en_us.json @@ -0,0 +1,92 @@ +{ + "language_support_goals": "english (en_US,en_EN,en_CA,en_GB, en_AU, en_PT), spanish (es_MX,es_ES), chinese (zh_CN), japanese (ja_JA), portugese (pt_BR), german (de_DE), italian (it_IT), korean (ko_KR)", + "item.electricadvantage.blank_circuit_board.name": "Circuit Board (Blank)", + "item.electricadvantage.control_circuit.name": "Control Circuit", + "item.electricadvantage.integrated_circuit.name": "Microchip", + "item.electricadvantage.psu.name": "Power Supply Unit", + "item.electricadvantage.silicon_ingot.name": "Silicon Ingot", + "item.electricadvantage.silicon_mix.name": "Silicon Blend", + "item.electricadvantage.solder_mix.name": "Solder Blend", + "item.electricadvantage.solder.name": "Solder", + "item.electricadvantage.li_powder.name": "Powdered Lithium", + "item.electricadvantage.li_ingot.name": "Lithium Ingot", + "item.electricadvantage.li_nugget.name": "Lithium Nugget", + "item.electricadvantage.sulfur_powder.name": "Powdered Sulfur", + "item.electricadvantage.lead_acid_battery.name": "Lead-Acid Battery", + "item.electricadvantage.nickel_hydride_battery.name": "Nickel-Metal Hydride Battery", + "item.electricadvantage.alkaline_battery.name": "Alkaline Battery", + "item.electricadvantage.lithium_battery.name": "Lithium-Ion Battery", + "tile.electricadvantage.electric_conduit.name": "Electric Power Cable", + "tile.electricadvantage.electric_track.name": "Electric Scaffold", + "tile.electricadvantage.electric_battery_array.name": "Battery Array", + "tile.electricadvantage.electric_crusher.name": "Electric Rock Crusher", + "tile.electricadvantage.laser_turret.name": "Laser Turret", + "tile.electricadvantage.electric_drill.name": "Electric Mining Drill", + "tile.electricadvantage.electric_fabricator.name": "Automated Assembler", + "tile.electricadvantage.electric_furnace.name": "Electric Arc Furnace", + "tile.electricadvantage.electric_oven.name": "Electric Oven", + "tile.electricadvantage.electric_pcb_printer.name": "PCB Printer", + "tile.electricadvantage.geothermal_generator.name": "Geothermal Generator", + "tile.electricadvantage.hydroelectric_generator.name": "Hydroelectric Generator", + "tile.electricadvantage.photovoltaic_generator.name": "Photovoltaic Generator", + "tile.electricadvantage.steam_powered_generator.name": "Steam-Powered Electric Generator", + "tile.electricadvantage.growth_chamber.name": "Growth Chamber", + "tile.electricadvantage.growth_chamber_controller.name": "Growth Chamber Control Unit", + "tile.electricadvantage.li_ore.name": "Lithium Ore", + "tile.electricadvantage.sulfur_ore.name": "Sulfur Ore", + "tile.electricadvantage.led_bar.name": "LED Bar", + "tooltip.battery.charge": "Charge", + "tooltip.battery.capacity": "Capacity", + "death.attack.laser": "%1$s vaporized", + "death.attack.laser.player": "%2$s vaporized %1$s ", + "death.attack.propeller": "%1$s was pulverized by a propeller.", + "death.attack.propeller.player": "%2$s pushed %1$s into a propeller.", + "tile.electricadvantage.electric_switch.name": "Electric Switch", + "tile.electricadvantage.electric_still.name": "Electric Distiller", + "tile.electricadvantage.electric_pump.name": "Electric Pump", + "tile.electricadvantage.plastic_refinery.name": "Petro-Plastic Refinery", + "item.electricadvantage.petrolplastic_ingot.name": "Petro-Plastic Ingot", + "tile.electricadvantage.pump_pipe_electric.name": "Pump Pipe", + "item.electricadvantage.blank_circuit_board": "Circuit Board (Blank)", + "item.electricadvantage.control_circuit": "Control Circuit", + "item.electricadvantage.integrated_circuit": "Microchip", + "item.electricadvantage.psu": "Power Supply Unit", + "item.electricadvantage.silicon_ingot": "Silicon Ingot", + "item.electricadvantage.silicon_mix": "Silicon Blend", + "item.electricadvantage.solder_mix": "Solder Blend", + "item.electricadvantage.solder": "Solder", + "item.electricadvantage.li_powder": "Powdered Lithium", + "item.electricadvantage.li_ingot": "Lithium Ingot", + "item.electricadvantage.li_nugget": "Lithium Nugget", + "item.electricadvantage.sulfur_powder": "Powdered Sulfur", + "item.electricadvantage.lead_acid_battery": "Lead-Acid Battery", + "item.electricadvantage.nickel_hydride_battery": "Nickel-Metal Hydride Battery", + "item.electricadvantage.alkaline_battery": "Alkaline Battery", + "item.electricadvantage.lithium_battery": "Lithium-Ion Battery", + "block.electricadvantage.electric_conduit": "Electric Power Cable", + "block.electricadvantage.electric_track": "Electric Scaffold", + "block.electricadvantage.electric_battery_array": "Battery Array", + "block.electricadvantage.electric_crusher": "Electric Rock Crusher", + "block.electricadvantage.laser_turret": "Laser Turret", + "block.electricadvantage.electric_drill": "Electric Mining Drill", + "block.electricadvantage.electric_fabricator": "Automated Assembler", + "block.electricadvantage.electric_furnace": "Electric Arc Furnace", + "block.electricadvantage.electric_oven": "Electric Oven", + "block.electricadvantage.electric_pcb_printer": "PCB Printer", + "block.electricadvantage.geothermal_generator": "Geothermal Generator", + "block.electricadvantage.hydroelectric_generator": "Hydroelectric Generator", + "block.electricadvantage.photovoltaic_generator": "Photovoltaic Generator", + "block.electricadvantage.steam_powered_generator": "Steam-Powered Electric Generator", + "block.electricadvantage.growth_chamber": "Growth Chamber", + "block.electricadvantage.growth_chamber_controller": "Growth Chamber Control Unit", + "block.electricadvantage.li_ore": "Lithium Ore", + "block.electricadvantage.sulfur_ore": "Sulfur Ore", + "block.electricadvantage.led_bar": "LED Bar", + "block.electricadvantage.electric_switch": "Electric Switch", + "block.electricadvantage.electric_still": "Electric Distiller", + "block.electricadvantage.electric_pump": "Electric Pump", + "block.electricadvantage.plastic_refinery": "Petro-Plastic Refinery", + "item.electricadvantage.petrolplastic_ingot": "Petro-Plastic Ingot", + "block.electricadvantage.pump_pipe_electric": "Pump Pipe", + "block.electricadvantage.laser_turret_evil": "Laser Turret" +} diff --git a/src/main/resources/assets/electricadvantage/lang/en_us.lang b/src/main/resources/assets/electricadvantage/lang/en_us.lang deleted file mode 100644 index a96ef0b..0000000 --- a/src/main/resources/assets/electricadvantage/lang/en_us.lang +++ /dev/null @@ -1,54 +0,0 @@ -language_support_goals=english (en_US,en_EN,en_CA,en_GB, en_AU, en_PT), spanish (es_MX,es_ES), chinese (zh_CN), japanese (ja_JA), portugese (pt_BR), german (de_DE), italian (it_IT), korean (ko_KR) - -item.electricadvantage.blank_circuit_board.name=Circuit Board (Blank) -item.electricadvantage.control_circuit.name=Control Circuit -item.electricadvantage.integrated_circuit.name=Microchip -item.electricadvantage.psu.name=Power Supply Unit -item.electricadvantage.silicon_ingot.name=Silicon Ingot -item.electricadvantage.silicon_mix.name=Silicon Blend -item.electricadvantage.solder_mix.name=Solder Blend -item.electricadvantage.solder.name=Solder -item.electricadvantage.li_powder.name=Powdered Lithium -item.electricadvantage.li_ingot.name=Lithium Ingot -item.electricadvantage.li_nugget.name=Lithium Nugget -item.electricadvantage.sulfur_powder.name=Powdered Sulfur -item.electricadvantage.lead_acid_battery.name=Lead-Acid Battery -item.electricadvantage.nickel_hydride_battery.name=Nickel-Metal Hydride Battery -item.electricadvantage.alkaline_battery.name=Alkaline Battery -item.electricadvantage.lithium_battery.name=Lithium-Ion Battery - -tile.electricadvantage.electric_conduit.name=Electric Power Cable -tile.electricadvantage.electric_track.name=Electric Scaffold -tile.electricadvantage.electric_battery_array.name=Battery Array -tile.electricadvantage.electric_crusher.name=Electric Rock Crusher -tile.electricadvantage.laser_turret.name=Laser Turret -tile.electricadvantage.electric_drill.name=Electric Mining Drill -tile.electricadvantage.electric_fabricator.name=Automated Assembler -tile.electricadvantage.electric_furnace.name=Electric Arc Furnace -tile.electricadvantage.electric_oven.name=Electric Oven -tile.electricadvantage.electric_pcb_printer.name=PCB Printer -tile.electricadvantage.geothermal_generator.name=Geothermal Generator -tile.electricadvantage.hydroelectric_generator.name=Hydroelectric Generator -tile.electricadvantage.photovoltaic_generator.name=Photovoltaic Generator -tile.electricadvantage.steam_powered_generator.name=Steam-Powered Electric Generator -tile.electricadvantage.growth_chamber.name=Growth Chamber -tile.electricadvantage.growth_chamber_controller.name=Growth Chamber Control Unit -tile.electricadvantage.li_ore.name=Lithium Ore -tile.electricadvantage.sulfur_ore.name=Sulfur Ore -tile.electricadvantage.led_bar.name=LED Bar - -tooltip.battery.charge=Charge -tooltip.battery.capacity=Capacity - -death.attack.laser=%1$s vaporized -death.attack.laser.player=%2$s vaporized %1$s -death.attack.propeller=%1$s was pulverized by a propeller. -death.attack.propeller.player=%2$s pushed %1$s into a propeller. - -tile.electricadvantage.electric_switch.name=Electric Switch -tile.electricadvantage.electric_still.name=Electric Distiller -tile.electricadvantage.electric_pump.name=Electric Pump -tile.electricadvantage.plastic_refinery.name=Petro-Plastic Refinery -item.electricadvantage.petrolplastic_ingot.name=Petro-Plastic Ingot -tile.electricadvantage.pump_pipe_electric.name=Pump Pipe - diff --git a/src/main/resources/assets/electricadvantage/lang/es_es.json b/src/main/resources/assets/electricadvantage/lang/es_es.json new file mode 100644 index 0000000..30088ae --- /dev/null +++ b/src/main/resources/assets/electricadvantage/lang/es_es.json @@ -0,0 +1,92 @@ +{ + "language_support_goals": "Inglés (en_US, en_EN, en_CA, es_ES, es_ES, en_PT), Español (es_MX, es_ES), chino (zh_CN), japonés (ja_JA), portugués (pt_BR), Alemán (de_DE), italiano (it_IT), coreano (ko_KR)", + "item.electricadvantage.blank_circuit_board.name": "Placa de Circuito (Blanco)", + "item.electricadvantage.control_circuit.name": "Circuito de Computadora", + "item.electricadvantage.integrated_circuit.name": "Microchip", + "item.electricadvantage.psu.name": "Unidad de Fuente de Alimentación", + "item.electricadvantage.silicon_ingot.name": "Silicio Lingote", + "item.electricadvantage.silicon_mix.name": "Blend Silicio", + "item.electricadvantage.solder_mix.name": "Blend Soldadura", + "item.electricadvantage.solder.name": "Soldadura", + "item.electricadvantage.li_powder.name": "Polvo de Litio", + "item.electricadvantage.li_ingot.name": "Litio Lingote", + "item.electricadvantage.li_nugget.name": "Pepita de Litio", + "item.electricadvantage.sulfur_powder.name": "Azufre en Polvo", + "item.electricadvantage.lead_acid_battery.name": "Plomo-Ácido de la Batería", + "item.electricadvantage.nickel_hydride_battery.name": "Níquel e Hidruro Metálico", + "item.electricadvantage.alkaline_battery.name": "Batería Alcalina", + "item.electricadvantage.lithium_battery.name": "Batería de Litio-Ion", + "tile.electricadvantage.electric_conduit.name": "Cable de Energía Eléctrica", + "tile.electricadvantage.electric_track.name": "Eléctrica Andamios", + "tile.electricadvantage.electric_battery_array.name": "Batería Matriz", + "tile.electricadvantage.electric_crusher.name": "Eléctrica de la Roca Trituradora", + "tile.electricadvantage.laser_turret.name": "Laser Defensa Torreta", + "tile.electricadvantage.electric_drill.name": "Eléctrica Minería Taladro", + "tile.electricadvantage.electric_fabricator.name": "Automatizado Ensamblador", + "tile.electricadvantage.electric_furnace.name": "Horno de Arco Eléctrico", + "tile.electricadvantage.electric_oven.name": "Horno Eléctrico", + "tile.electricadvantage.electric_pcb_printer.name": "PCB Impresora", + "tile.electricadvantage.geothermal_generator.name": "Geotérmica Generador", + "tile.electricadvantage.hydroelectric_generator.name": "Hidroeléctrico Generador", + "tile.electricadvantage.photovoltaic_generator.name": "Fotovoltaica Generador", + "tile.electricadvantage.steam_powered_generator.name": "a Vapor Generador Eléctrico", + "tile.electricadvantage.growth_chamber.name": "Cámara Crecimiento", + "tile.electricadvantage.growth_chamber_controller.name": "Unidad de Control de Crecimiento Cámara", + "tile.electricadvantage.li_ore.name": "Mineral de Litio", + "tile.electricadvantage.sulfur_ore.name": "Mineral de Azufre", + "tile.electricadvantage.led_bar.name": "Luz LED", + "tooltip.battery.charge": "Carga", + "tooltip.battery.capacity": "Capacidad", + "death.attack.laser": "%1$s vaporiza", + "death.attack.laser.player": "%2$s vaporizado s%1$s", + "death.attack.propeller": "%1$s se pulverizan por una hélice.", + "death.attack.propeller.player": "%2$s empujaron %1$s en la hélice.", + "tile.electricadvantage.electric_switch.name": "Interruptor Eléctrico", + "tile.electricadvantage.electric_still.name": "Destilador Eléctrico", + "tile.electricadvantage.electric_pump.name": "Bomba Eléctrica", + "tile.electricadvantage.plastic_refinery.name": "Refinería de Plástico", + "item.electricadvantage.petrolplastic_ingot.name": "Petróleo Lingote de Plástico", + "tile.electricadvantage.pump_pipe_electric.name": "Tubería de la Bomba", + "item.electricadvantage.blank_circuit_board": "Placa de Circuito (Blanco)", + "item.electricadvantage.control_circuit": "Circuito de Computadora", + "item.electricadvantage.integrated_circuit": "Microchip", + "item.electricadvantage.psu": "Unidad de Fuente de Alimentación", + "item.electricadvantage.silicon_ingot": "Silicio Lingote", + "item.electricadvantage.silicon_mix": "Blend Silicio", + "item.electricadvantage.solder_mix": "Blend Soldadura", + "item.electricadvantage.solder": "Soldadura", + "item.electricadvantage.li_powder": "Polvo de Litio", + "item.electricadvantage.li_ingot": "Litio Lingote", + "item.electricadvantage.li_nugget": "Pepita de Litio", + "item.electricadvantage.sulfur_powder": "Azufre en Polvo", + "item.electricadvantage.lead_acid_battery": "Plomo-Ácido de la Batería", + "item.electricadvantage.nickel_hydride_battery": "Níquel e Hidruro Metálico", + "item.electricadvantage.alkaline_battery": "Batería Alcalina", + "item.electricadvantage.lithium_battery": "Batería de Litio-Ion", + "block.electricadvantage.electric_conduit": "Cable de Energía Eléctrica", + "block.electricadvantage.electric_track": "Eléctrica Andamios", + "block.electricadvantage.electric_battery_array": "Batería Matriz", + "block.electricadvantage.electric_crusher": "Eléctrica de la Roca Trituradora", + "block.electricadvantage.laser_turret": "Laser Defensa Torreta", + "block.electricadvantage.electric_drill": "Eléctrica Minería Taladro", + "block.electricadvantage.electric_fabricator": "Automatizado Ensamblador", + "block.electricadvantage.electric_furnace": "Horno de Arco Eléctrico", + "block.electricadvantage.electric_oven": "Horno Eléctrico", + "block.electricadvantage.electric_pcb_printer": "PCB Impresora", + "block.electricadvantage.geothermal_generator": "Geotérmica Generador", + "block.electricadvantage.hydroelectric_generator": "Hidroeléctrico Generador", + "block.electricadvantage.photovoltaic_generator": "Fotovoltaica Generador", + "block.electricadvantage.steam_powered_generator": "a Vapor Generador Eléctrico", + "block.electricadvantage.growth_chamber": "Cámara Crecimiento", + "block.electricadvantage.growth_chamber_controller": "Unidad de Control de Crecimiento Cámara", + "block.electricadvantage.li_ore": "Mineral de Litio", + "block.electricadvantage.sulfur_ore": "Mineral de Azufre", + "block.electricadvantage.led_bar": "Luz LED", + "block.electricadvantage.electric_switch": "Interruptor Eléctrico", + "block.electricadvantage.electric_still": "Destilador Eléctrico", + "block.electricadvantage.electric_pump": "Bomba Eléctrica", + "block.electricadvantage.plastic_refinery": "Refinería de Plástico", + "item.electricadvantage.petrolplastic_ingot": "Petróleo Lingote de Plástico", + "block.electricadvantage.pump_pipe_electric": "Tubería de la Bomba", + "block.electricadvantage.laser_turret_evil": "Laser Defensa Torreta" +} diff --git a/src/main/resources/assets/electricadvantage/lang/es_es.lang b/src/main/resources/assets/electricadvantage/lang/es_es.lang deleted file mode 100644 index da6a1c0..0000000 --- a/src/main/resources/assets/electricadvantage/lang/es_es.lang +++ /dev/null @@ -1,55 +0,0 @@ -language_support_goals=Inglés (en_US, en_EN, en_CA, es_ES, es_ES, en_PT), Español (es_MX, es_ES), chino (zh_CN), japonés (ja_JA), portugués (pt_BR), Alemán (de_DE), italiano (it_IT), coreano (ko_KR) - -item.electricadvantage.blank_circuit_board.name=Placa de Circuito (Blanco) -item.electricadvantage.control_circuit.name=Circuito de Computadora -item.electricadvantage.integrated_circuit.name=Microchip -item.electricadvantage.psu.name=Unidad de Fuente de Alimentación -item.electricadvantage.silicon_ingot.name=Silicio Lingote -item.electricadvantage.silicon_mix.name=Blend Silicio -item.electricadvantage.solder_mix.name=Blend Soldadura -item.electricadvantage.solder.name=Soldadura -item.electricadvantage.li_powder.name=Polvo de Litio -item.electricadvantage.li_ingot.name=Litio Lingote -item.electricadvantage.li_nugget.name=Pepita de Litio -item.electricadvantage.sulfur_powder.name=Azufre en Polvo -item.electricadvantage.lead_acid_battery.name=Plomo-Ácido de la Batería -item.electricadvantage.nickel_hydride_battery.name=Níquel e Hidruro Metálico -item.electricadvantage.alkaline_battery.name=Batería Alcalina -item.electricadvantage.lithium_battery.name=Batería de Litio-Ion - -tile.electricadvantage.electric_conduit.name=Cable de Energía Eléctrica -tile.electricadvantage.electric_track.name=Eléctrica Andamios -tile.electricadvantage.electric_battery_array.name=Batería Matriz -tile.electricadvantage.electric_crusher.name=Eléctrica de la Roca Trituradora -tile.electricadvantage.laser_turret.name=Laser Defensa Torreta -tile.electricadvantage.electric_drill.name=Eléctrica Minería Taladro -tile.electricadvantage.electric_fabricator.name=Automatizado Ensamblador -tile.electricadvantage.electric_furnace.name=Horno de Arco Eléctrico -tile.electricadvantage.electric_oven.name=Horno Eléctrico -tile.electricadvantage.electric_pcb_printer.name=PCB Impresora -tile.electricadvantage.geothermal_generator.name=Geotérmica Generador -tile.electricadvantage.hydroelectric_generator.name=Hidroeléctrico Generador -tile.electricadvantage.photovoltaic_generator.name=Fotovoltaica Generador -tile.electricadvantage.steam_powered_generator.name=a Vapor Generador Eléctrico -tile.electricadvantage.growth_chamber.name=Cámara Crecimiento -tile.electricadvantage.growth_chamber_controller.name=Unidad de Control de Crecimiento Cámara -tile.electricadvantage.li_ore.name=Mineral de Litio -tile.electricadvantage.sulfur_ore.name=Mineral de Azufre -tile.electricadvantage.led_bar.name=Luz LED - -tooltip.battery.charge=Carga -tooltip.battery.capacity=Capacidad - -death.attack.laser=%1$s vaporiza -death.attack.laser.player=%2$s vaporizado s%1$s -death.attack.propeller=%1$s se pulverizan por una hélice. -death.attack.propeller.player=%2$s empujaron %1$s en la hélice. - - - -tile.electricadvantage.electric_switch.name=Interruptor Eléctrico -tile.electricadvantage.electric_still.name=Destilador Eléctrico -tile.electricadvantage.electric_pump.name=Bomba Eléctrica -tile.electricadvantage.plastic_refinery.name=Refinería de Plástico -item.electricadvantage.petrolplastic_ingot.name=Petróleo Lingote de Plástico -tile.electricadvantage.pump_pipe_electric.name=Tubería de la Bomba diff --git a/src/main/resources/assets/electricadvantage/lang/es_mx.json b/src/main/resources/assets/electricadvantage/lang/es_mx.json new file mode 100644 index 0000000..30088ae --- /dev/null +++ b/src/main/resources/assets/electricadvantage/lang/es_mx.json @@ -0,0 +1,92 @@ +{ + "language_support_goals": "Inglés (en_US, en_EN, en_CA, es_ES, es_ES, en_PT), Español (es_MX, es_ES), chino (zh_CN), japonés (ja_JA), portugués (pt_BR), Alemán (de_DE), italiano (it_IT), coreano (ko_KR)", + "item.electricadvantage.blank_circuit_board.name": "Placa de Circuito (Blanco)", + "item.electricadvantage.control_circuit.name": "Circuito de Computadora", + "item.electricadvantage.integrated_circuit.name": "Microchip", + "item.electricadvantage.psu.name": "Unidad de Fuente de Alimentación", + "item.electricadvantage.silicon_ingot.name": "Silicio Lingote", + "item.electricadvantage.silicon_mix.name": "Blend Silicio", + "item.electricadvantage.solder_mix.name": "Blend Soldadura", + "item.electricadvantage.solder.name": "Soldadura", + "item.electricadvantage.li_powder.name": "Polvo de Litio", + "item.electricadvantage.li_ingot.name": "Litio Lingote", + "item.electricadvantage.li_nugget.name": "Pepita de Litio", + "item.electricadvantage.sulfur_powder.name": "Azufre en Polvo", + "item.electricadvantage.lead_acid_battery.name": "Plomo-Ácido de la Batería", + "item.electricadvantage.nickel_hydride_battery.name": "Níquel e Hidruro Metálico", + "item.electricadvantage.alkaline_battery.name": "Batería Alcalina", + "item.electricadvantage.lithium_battery.name": "Batería de Litio-Ion", + "tile.electricadvantage.electric_conduit.name": "Cable de Energía Eléctrica", + "tile.electricadvantage.electric_track.name": "Eléctrica Andamios", + "tile.electricadvantage.electric_battery_array.name": "Batería Matriz", + "tile.electricadvantage.electric_crusher.name": "Eléctrica de la Roca Trituradora", + "tile.electricadvantage.laser_turret.name": "Laser Defensa Torreta", + "tile.electricadvantage.electric_drill.name": "Eléctrica Minería Taladro", + "tile.electricadvantage.electric_fabricator.name": "Automatizado Ensamblador", + "tile.electricadvantage.electric_furnace.name": "Horno de Arco Eléctrico", + "tile.electricadvantage.electric_oven.name": "Horno Eléctrico", + "tile.electricadvantage.electric_pcb_printer.name": "PCB Impresora", + "tile.electricadvantage.geothermal_generator.name": "Geotérmica Generador", + "tile.electricadvantage.hydroelectric_generator.name": "Hidroeléctrico Generador", + "tile.electricadvantage.photovoltaic_generator.name": "Fotovoltaica Generador", + "tile.electricadvantage.steam_powered_generator.name": "a Vapor Generador Eléctrico", + "tile.electricadvantage.growth_chamber.name": "Cámara Crecimiento", + "tile.electricadvantage.growth_chamber_controller.name": "Unidad de Control de Crecimiento Cámara", + "tile.electricadvantage.li_ore.name": "Mineral de Litio", + "tile.electricadvantage.sulfur_ore.name": "Mineral de Azufre", + "tile.electricadvantage.led_bar.name": "Luz LED", + "tooltip.battery.charge": "Carga", + "tooltip.battery.capacity": "Capacidad", + "death.attack.laser": "%1$s vaporiza", + "death.attack.laser.player": "%2$s vaporizado s%1$s", + "death.attack.propeller": "%1$s se pulverizan por una hélice.", + "death.attack.propeller.player": "%2$s empujaron %1$s en la hélice.", + "tile.electricadvantage.electric_switch.name": "Interruptor Eléctrico", + "tile.electricadvantage.electric_still.name": "Destilador Eléctrico", + "tile.electricadvantage.electric_pump.name": "Bomba Eléctrica", + "tile.electricadvantage.plastic_refinery.name": "Refinería de Plástico", + "item.electricadvantage.petrolplastic_ingot.name": "Petróleo Lingote de Plástico", + "tile.electricadvantage.pump_pipe_electric.name": "Tubería de la Bomba", + "item.electricadvantage.blank_circuit_board": "Placa de Circuito (Blanco)", + "item.electricadvantage.control_circuit": "Circuito de Computadora", + "item.electricadvantage.integrated_circuit": "Microchip", + "item.electricadvantage.psu": "Unidad de Fuente de Alimentación", + "item.electricadvantage.silicon_ingot": "Silicio Lingote", + "item.electricadvantage.silicon_mix": "Blend Silicio", + "item.electricadvantage.solder_mix": "Blend Soldadura", + "item.electricadvantage.solder": "Soldadura", + "item.electricadvantage.li_powder": "Polvo de Litio", + "item.electricadvantage.li_ingot": "Litio Lingote", + "item.electricadvantage.li_nugget": "Pepita de Litio", + "item.electricadvantage.sulfur_powder": "Azufre en Polvo", + "item.electricadvantage.lead_acid_battery": "Plomo-Ácido de la Batería", + "item.electricadvantage.nickel_hydride_battery": "Níquel e Hidruro Metálico", + "item.electricadvantage.alkaline_battery": "Batería Alcalina", + "item.electricadvantage.lithium_battery": "Batería de Litio-Ion", + "block.electricadvantage.electric_conduit": "Cable de Energía Eléctrica", + "block.electricadvantage.electric_track": "Eléctrica Andamios", + "block.electricadvantage.electric_battery_array": "Batería Matriz", + "block.electricadvantage.electric_crusher": "Eléctrica de la Roca Trituradora", + "block.electricadvantage.laser_turret": "Laser Defensa Torreta", + "block.electricadvantage.electric_drill": "Eléctrica Minería Taladro", + "block.electricadvantage.electric_fabricator": "Automatizado Ensamblador", + "block.electricadvantage.electric_furnace": "Horno de Arco Eléctrico", + "block.electricadvantage.electric_oven": "Horno Eléctrico", + "block.electricadvantage.electric_pcb_printer": "PCB Impresora", + "block.electricadvantage.geothermal_generator": "Geotérmica Generador", + "block.electricadvantage.hydroelectric_generator": "Hidroeléctrico Generador", + "block.electricadvantage.photovoltaic_generator": "Fotovoltaica Generador", + "block.electricadvantage.steam_powered_generator": "a Vapor Generador Eléctrico", + "block.electricadvantage.growth_chamber": "Cámara Crecimiento", + "block.electricadvantage.growth_chamber_controller": "Unidad de Control de Crecimiento Cámara", + "block.electricadvantage.li_ore": "Mineral de Litio", + "block.electricadvantage.sulfur_ore": "Mineral de Azufre", + "block.electricadvantage.led_bar": "Luz LED", + "block.electricadvantage.electric_switch": "Interruptor Eléctrico", + "block.electricadvantage.electric_still": "Destilador Eléctrico", + "block.electricadvantage.electric_pump": "Bomba Eléctrica", + "block.electricadvantage.plastic_refinery": "Refinería de Plástico", + "item.electricadvantage.petrolplastic_ingot": "Petróleo Lingote de Plástico", + "block.electricadvantage.pump_pipe_electric": "Tubería de la Bomba", + "block.electricadvantage.laser_turret_evil": "Laser Defensa Torreta" +} diff --git a/src/main/resources/assets/electricadvantage/lang/es_mx.lang b/src/main/resources/assets/electricadvantage/lang/es_mx.lang deleted file mode 100644 index 186cc6f..0000000 --- a/src/main/resources/assets/electricadvantage/lang/es_mx.lang +++ /dev/null @@ -1,53 +0,0 @@ -language_support_goals=Inglés (en_US, en_EN, en_CA, es_ES, es_ES, en_PT), Español (es_MX, es_ES), chino (zh_CN), japonés (ja_JA), portugués (pt_BR), Alemán (de_DE), italiano (it_IT), coreano (ko_KR) - -item.electricadvantage.blank_circuit_board.name=Placa de Circuito (Blanco) -item.electricadvantage.control_circuit.name=Circuito de Computadora -item.electricadvantage.integrated_circuit.name=Microchip -item.electricadvantage.psu.name=Unidad de Fuente de Alimentación -item.electricadvantage.silicon_ingot.name=Silicio Lingote -item.electricadvantage.silicon_mix.name=Blend Silicio -item.electricadvantage.solder_mix.name=Blend Soldadura -item.electricadvantage.solder.name=Soldadura -item.electricadvantage.li_powder.name=Polvo de Litio -item.electricadvantage.li_ingot.name=Litio Lingote -item.electricadvantage.li_nugget.name=Pepita de Litio -item.electricadvantage.sulfur_powder.name=Azufre en Polvo -item.electricadvantage.lead_acid_battery.name=Plomo-Ácido de la Batería -item.electricadvantage.nickel_hydride_battery.name=Níquel e Hidruro Metálico -item.electricadvantage.alkaline_battery.name=Batería Alcalina -item.electricadvantage.lithium_battery.name=Batería de Litio-Ion - -tile.electricadvantage.electric_conduit.name=Cable de Energía Eléctrica -tile.electricadvantage.electric_track.name=Eléctrica Andamios -tile.electricadvantage.electric_battery_array.name=Batería Matriz -tile.electricadvantage.electric_crusher.name=Eléctrica de la Roca Trituradora -tile.electricadvantage.laser_turret.name=Laser Defensa Torreta -tile.electricadvantage.electric_drill.name=Eléctrica Minería Taladro -tile.electricadvantage.electric_fabricator.name=Automatizado Ensamblador -tile.electricadvantage.electric_furnace.name=Horno de Arco Eléctrico -tile.electricadvantage.electric_oven.name=Horno Eléctrico -tile.electricadvantage.electric_pcb_printer.name=PCB Impresora -tile.electricadvantage.geothermal_generator.name=Geotérmica Generador -tile.electricadvantage.hydroelectric_generator.name=Hidroeléctrico Generador -tile.electricadvantage.photovoltaic_generator.name=Fotovoltaica Generador -tile.electricadvantage.steam_powered_generator.name=a Vapor Generador Eléctrico -tile.electricadvantage.growth_chamber.name=Cámara Crecimiento -tile.electricadvantage.growth_chamber_controller.name=Unidad de Control de Crecimiento Cámara -tile.electricadvantage.li_ore.name=Mineral de Litio -tile.electricadvantage.sulfur_ore.name=Mineral de Azufre -tile.electricadvantage.led_bar.name=Luz LED - -tooltip.battery.charge=Carga -tooltip.battery.capacity=Capacidad - -death.attack.laser=%1$s vaporiza -death.attack.laser.player=%2$s vaporizado s%1$s -death.attack.propeller=%1$s se pulverizan por una hélice. -death.attack.propeller.player=%2$s empujaron %1$s en la hélice. - -tile.electricadvantage.electric_switch.name=Interruptor Eléctrico -tile.electricadvantage.electric_still.name=Destilador Eléctrico -tile.electricadvantage.electric_pump.name=Bomba Eléctrica -tile.electricadvantage.plastic_refinery.name=Refinería de Plástico -item.electricadvantage.petrolplastic_ingot.name=Petróleo Lingote de Plástico -tile.electricadvantage.pump_pipe_electric.name=Tubería de la Bomba diff --git a/src/main/resources/assets/electricadvantage/lang/it_it.json b/src/main/resources/assets/electricadvantage/lang/it_it.json new file mode 100644 index 0000000..10452d5 --- /dev/null +++ b/src/main/resources/assets/electricadvantage/lang/it_it.json @@ -0,0 +1,92 @@ +{ + "language_support_goals": "inglese (it, en_EN, en_CA, en_GB, en_AU, en_PT), spagnolo (es_MX, es_ES), cinese (zh_CN), giapponese (ja_JA), portoghese (pt_BR), tedesco (de_DE), italiano (it_IT), coreano (ko_KR)", + "item.electricadvantage.blank_circuit_board.name": "Scheda di Circuito (Vuoto)", + "item.electricadvantage.control_circuit.name": "Circuito di Controllo", + "item.electricadvantage.integrated_circuit.name": "Microcircuito Integrato", + "item.electricadvantage.psu.name": "Alimentatore", + "item.electricadvantage.silicon_ingot.name": "Silicio Lingotto", + "item.electricadvantage.silicon_mix.name": "Silicio Miscela", + "item.electricadvantage.solder_mix.name": "Saldatura Miscela", + "item.electricadvantage.solder.name": "Saldatura", + "item.electricadvantage.li_powder.name": "Polvere di Litio", + "item.electricadvantage.li_ingot.name": "Litio Lingotto", + "item.electricadvantage.li_nugget.name": "Pepita d'Litio", + "item.electricadvantage.sulfur_powder.name": "Zolfo in Polvere", + "item.electricadvantage.lead_acid_battery.name": "Batteria al Piombo", + "item.electricadvantage.nickel_hydride_battery.name": "Ni-MH batteria", + "item.electricadvantage.alkaline_battery.name": "Batteria Alcalina", + "item.electricadvantage.lithium_battery.name": "Agli Ioni di Litio", + "tile.electricadvantage.electric_conduit.name": "Cavo Alettrico di Alimentazione", + "tile.electricadvantage.electric_track.name": "Ponteggio Elettrico", + "tile.electricadvantage.electric_battery_array.name": "Array Batteria", + "tile.electricadvantage.electric_crusher.name": "Polverizzatore Masso a Elettrico Alimentata", + "tile.electricadvantage.laser_turret.name": "Laser Difesa Torretta", + "tile.electricadvantage.electric_drill.name": "Trapano Elettrico", + "tile.electricadvantage.electric_fabricator.name": "Fabbrica Automatizzata", + "tile.electricadvantage.electric_furnace.name": "Forno Elettrico ad Arco", + "tile.electricadvantage.electric_oven.name": "Forno Elettrico", + "tile.electricadvantage.electric_pcb_printer.name": "PCB Stampante", + "tile.electricadvantage.geothermal_generator.name": "Geotermica Generatore", + "tile.electricadvantage.hydroelectric_generator.name": "idroelettrica Generatore", + "tile.electricadvantage.photovoltaic_generator.name": "Fotovoltaico Generatore", + "tile.electricadvantage.steam_powered_generator.name": "Generatore Elettrico a Vapore", + "tile.electricadvantage.growth_chamber.name": "Camera di Crescita", + "tile.electricadvantage.growth_chamber_controller.name": "Controllore Camera di Crescita", + "tile.electricadvantage.li_ore.name": "Minerale di litio", + "tile.electricadvantage.sulfur_ore.name": "Minerale di Zolfo", + "tile.electricadvantage.led_bar.name": "Luce a led", + "tooltip.battery.charge": "Carica", + "tooltip.battery.capacity": "Capacità", + "death.attack.laser": "%1$s vaporizzato", + "death.attack.laser.player": "%2$s vaporizzati %1$s", + "death.attack.propeller": "%1$s è stato polverizzato da un'elica.", + "death.attack.propeller.player": "%2$s spinti %1$s nelle eliche.", + "tile.electricadvantage.electric_switch.name": "Interruttore Elettrico", + "tile.electricadvantage.electric_still.name": "Distillatore Elettrico", + "tile.electricadvantage.electric_pump.name": "Pompa Elettricaa", + "tile.electricadvantage.plastic_refinery.name": "Raffineria Plastica", + "item.electricadvantage.petrolplastic_ingot.name": "Petrolio Plastica Lingotto", + "tile.electricadvantage.pump_pipe_electric.name": "Tubo Pompa", + "item.electricadvantage.blank_circuit_board": "Scheda di Circuito (Vuoto)", + "item.electricadvantage.control_circuit": "Circuito di Controllo", + "item.electricadvantage.integrated_circuit": "Microcircuito Integrato", + "item.electricadvantage.psu": "Alimentatore", + "item.electricadvantage.silicon_ingot": "Silicio Lingotto", + "item.electricadvantage.silicon_mix": "Silicio Miscela", + "item.electricadvantage.solder_mix": "Saldatura Miscela", + "item.electricadvantage.solder": "Saldatura", + "item.electricadvantage.li_powder": "Polvere di Litio", + "item.electricadvantage.li_ingot": "Litio Lingotto", + "item.electricadvantage.li_nugget": "Pepita d'Litio", + "item.electricadvantage.sulfur_powder": "Zolfo in Polvere", + "item.electricadvantage.lead_acid_battery": "Batteria al Piombo", + "item.electricadvantage.nickel_hydride_battery": "Ni-MH batteria", + "item.electricadvantage.alkaline_battery": "Batteria Alcalina", + "item.electricadvantage.lithium_battery": "Agli Ioni di Litio", + "block.electricadvantage.electric_conduit": "Cavo Alettrico di Alimentazione", + "block.electricadvantage.electric_track": "Ponteggio Elettrico", + "block.electricadvantage.electric_battery_array": "Array Batteria", + "block.electricadvantage.electric_crusher": "Polverizzatore Masso a Elettrico Alimentata", + "block.electricadvantage.laser_turret": "Laser Difesa Torretta", + "block.electricadvantage.electric_drill": "Trapano Elettrico", + "block.electricadvantage.electric_fabricator": "Fabbrica Automatizzata", + "block.electricadvantage.electric_furnace": "Forno Elettrico ad Arco", + "block.electricadvantage.electric_oven": "Forno Elettrico", + "block.electricadvantage.electric_pcb_printer": "PCB Stampante", + "block.electricadvantage.geothermal_generator": "Geotermica Generatore", + "block.electricadvantage.hydroelectric_generator": "idroelettrica Generatore", + "block.electricadvantage.photovoltaic_generator": "Fotovoltaico Generatore", + "block.electricadvantage.steam_powered_generator": "Generatore Elettrico a Vapore", + "block.electricadvantage.growth_chamber": "Camera di Crescita", + "block.electricadvantage.growth_chamber_controller": "Controllore Camera di Crescita", + "block.electricadvantage.li_ore": "Minerale di litio", + "block.electricadvantage.sulfur_ore": "Minerale di Zolfo", + "block.electricadvantage.led_bar": "Luce a led", + "block.electricadvantage.electric_switch": "Interruttore Elettrico", + "block.electricadvantage.electric_still": "Distillatore Elettrico", + "block.electricadvantage.electric_pump": "Pompa Elettricaa", + "block.electricadvantage.plastic_refinery": "Raffineria Plastica", + "item.electricadvantage.petrolplastic_ingot": "Petrolio Plastica Lingotto", + "block.electricadvantage.pump_pipe_electric": "Tubo Pompa", + "block.electricadvantage.laser_turret_evil": "Laser Difesa Torretta" +} diff --git a/src/main/resources/assets/electricadvantage/lang/it_it.lang b/src/main/resources/assets/electricadvantage/lang/it_it.lang deleted file mode 100644 index 7920979..0000000 --- a/src/main/resources/assets/electricadvantage/lang/it_it.lang +++ /dev/null @@ -1,53 +0,0 @@ -language_support_goals=inglese (it, en_EN, en_CA, en_GB, en_AU, en_PT), spagnolo (es_MX, es_ES), cinese (zh_CN), giapponese (ja_JA), portoghese (pt_BR), tedesco (de_DE), italiano (it_IT), coreano (ko_KR) - -item.electricadvantage.blank_circuit_board.name=Scheda di Circuito (Vuoto) -item.electricadvantage.control_circuit.name=Circuito di Controllo -item.electricadvantage.integrated_circuit.name=Microcircuito Integrato -item.electricadvantage.psu.name=Alimentatore -item.electricadvantage.silicon_ingot.name=Silicio Lingotto -item.electricadvantage.silicon_mix.name=Silicio Miscela -item.electricadvantage.solder_mix.name=Saldatura Miscela -item.electricadvantage.solder.name=Saldatura -item.electricadvantage.li_powder.name=Polvere di Litio -item.electricadvantage.li_ingot.name=Litio Lingotto -item.electricadvantage.li_nugget.name=Pepita d'Litio -item.electricadvantage.sulfur_powder.name=Zolfo in Polvere -item.electricadvantage.lead_acid_battery.name=Batteria al Piombo -item.electricadvantage.nickel_hydride_battery.name=Ni-MH batteria -item.electricadvantage.alkaline_battery.name=Batteria Alcalina -item.electricadvantage.lithium_battery.name=Agli Ioni di Litio - -tile.electricadvantage.electric_conduit.name=Cavo Alettrico di Alimentazione -tile.electricadvantage.electric_track.name=Ponteggio Elettrico -tile.electricadvantage.electric_battery_array.name=Array Batteria -tile.electricadvantage.electric_crusher.name=Polverizzatore Masso a Elettrico Alimentata -tile.electricadvantage.laser_turret.name=Laser Difesa Torretta -tile.electricadvantage.electric_drill.name=Trapano Elettrico -tile.electricadvantage.electric_fabricator.name=Fabbrica Automatizzata -tile.electricadvantage.electric_furnace.name=Forno Elettrico ad Arco -tile.electricadvantage.electric_oven.name=Forno Elettrico -tile.electricadvantage.electric_pcb_printer.name=PCB Stampante -tile.electricadvantage.geothermal_generator.name=Geotermica Generatore -tile.electricadvantage.hydroelectric_generator.name=idroelettrica Generatore -tile.electricadvantage.photovoltaic_generator.name=Fotovoltaico Generatore -tile.electricadvantage.steam_powered_generator.name=Generatore Elettrico a Vapore -tile.electricadvantage.growth_chamber.name=Camera di Crescita -tile.electricadvantage.growth_chamber_controller.name=Controllore Camera di Crescita -tile.electricadvantage.li_ore.name=Minerale di litio -tile.electricadvantage.sulfur_ore.name=Minerale di Zolfo -tile.electricadvantage.led_bar.name=Luce a led - -tooltip.battery.charge=Carica -tooltip.battery.capacity=Capacità - -death.attack.laser=%1$s vaporizzato -death.attack.laser.player=%2$s vaporizzati %1$s -death.attack.propeller=%1$s è stato polverizzato da un'elica. -death.attack.propeller.player=%2$s spinti %1$s nelle eliche. - -tile.electricadvantage.electric_switch.name=Interruttore Elettrico -tile.electricadvantage.electric_still.name=Distillatore Elettrico -tile.electricadvantage.electric_pump.name=Pompa Elettricaa -tile.electricadvantage.plastic_refinery.name=Raffineria Plastica -item.electricadvantage.petrolplastic_ingot.name=Petrolio Plastica Lingotto -tile.electricadvantage.pump_pipe_electric.name=Tubo Pompa diff --git a/src/main/resources/assets/electricadvantage/lang/ja_jp.json b/src/main/resources/assets/electricadvantage/lang/ja_jp.json new file mode 100644 index 0000000..84d5ee8 --- /dev/null +++ b/src/main/resources/assets/electricadvantage/lang/ja_jp.json @@ -0,0 +1,92 @@ +{ + "language_support_goals": " 英語 (en_US en_EN en_CA、en_GB, en_AU, en_PT), スペイン語 (es_MX、es_ES)、中国 (zh_CN)、日本語 (ja_JA)、ポルトガル (pt_BR)、ドイツ語 (de_DE)、イタリア語 (it_IT), 韓国語 (ko_KR)", + "item.electricadvantage.blank_circuit_board.name": "回路基板 (空の)", + "item.electricadvantage.control_circuit.name": "コンピューター回路", + "item.electricadvantage.integrated_circuit.name": "マイクロチップ", + "item.electricadvantage.psu.name": "電源ユニット", + "item.electricadvantage.silicon_ingot.name": "シリコン", + "item.electricadvantage.silicon_mix.name": "シリコンレシピ", + "item.electricadvantage.solder_mix.name": "はんだレシピ", + "item.electricadvantage.solder.name": "はんだ", + "item.electricadvantage.li_powder.name": "リチウム粉末", + "item.electricadvantage.li_ingot.name": "リチウム金属", + "item.electricadvantage.li_nugget.name": "リチウムナゲット", + "item.electricadvantage.sulfur_powder.name": "硫黄粉末", + "item.electricadvantage.lead_acid_battery.name": "鉛蓄電池", + "item.electricadvantage.nickel_hydride_battery.name": "ニッケル水素バッテリー", + "item.electricadvantage.alkaline_battery.name": "アルカリ電池", + "item.electricadvantage.lithium_battery.name": "リチウムイオン電池", + "tile.electricadvantage.electric_conduit.name": "電線", + "tile.electricadvantage.electric_track.name": "電動足場", + "tile.electricadvantage.electric_battery_array.name": "電池貯蔵", + "tile.electricadvantage.electric_crusher.name": "電気岩クラッシャー", + "tile.electricadvantage.laser_turret.name": "レーザー砲塔", + "tile.electricadvantage.electric_drill.name": "電気ドリル", + "tile.electricadvantage.electric_fabricator.name": "ロボット工場", + "tile.electricadvantage.electric_furnace.name": "電気炉", + "tile.electricadvantage.electric_oven.name": "電気オーブン", + "tile.electricadvantage.electric_pcb_printer.name": "回路基板プリンター", + "tile.electricadvantage.geothermal_generator.name": "地熱発電", + "tile.electricadvantage.hydroelectric_generator.name": "水力発電機", + "tile.electricadvantage.photovoltaic_generator.name": "太陽電池パネル", + "tile.electricadvantage.steam_powered_generator.name": "蒸気駆動の発電機", + "tile.electricadvantage.growth_chamber.name": "植物生長室", + "tile.electricadvantage.growth_chamber_controller.name": "植物成長室コントローラ", + "tile.electricadvantage.li_ore.name": "リチウム 鉱石", + "tile.electricadvantage.sulfur_ore.name": "硫黄鉱石", + "tile.electricadvantage.led_bar.name": "LEDライト", + "tooltip.battery.charge": "量", + "tooltip.battery.capacity": "合計金額", + "death.attack.laser": "%1$s気化", + "蒸発 death.attack.laser.player": "%2$sは%1$sを気化しました", + "death.attack.propeller": "プロペラ殺さ%1$s", + "death.attack.propeller.player": "%2$sはプロペラと%1$sを殺しました", + "tile.electricadvantage.electric_switch.name": "電気スイッチ", + "tile.electricadvantage.electric_still.name": "電気蒸留器", + "tile.electricadvantage.electric_pump.name": "電気ポンプ", + "tile.electricadvantage.plastic_refinery.name": "プラスチック製油所", + "item.electricadvantage.petrolplastic_ingot.name": "石油系プラスチックインゴット", + "tile.electricadvantage.pump_pipe_electric.name": "ポンプ配管", + "item.electricadvantage.blank_circuit_board": "回路基板 (空の)", + "item.electricadvantage.control_circuit": "コンピューター回路", + "item.electricadvantage.integrated_circuit": "マイクロチップ", + "item.electricadvantage.psu": "電源ユニット", + "item.electricadvantage.silicon_ingot": "シリコン", + "item.electricadvantage.silicon_mix": "シリコンレシピ", + "item.electricadvantage.solder_mix": "はんだレシピ", + "item.electricadvantage.solder": "はんだ", + "item.electricadvantage.li_powder": "リチウム粉末", + "item.electricadvantage.li_ingot": "リチウム金属", + "item.electricadvantage.li_nugget": "リチウムナゲット", + "item.electricadvantage.sulfur_powder": "硫黄粉末", + "item.electricadvantage.lead_acid_battery": "鉛蓄電池", + "item.electricadvantage.nickel_hydride_battery": "ニッケル水素バッテリー", + "item.electricadvantage.alkaline_battery": "アルカリ電池", + "item.electricadvantage.lithium_battery": "リチウムイオン電池", + "block.electricadvantage.electric_conduit": "電線", + "block.electricadvantage.electric_track": "電動足場", + "block.electricadvantage.electric_battery_array": "電池貯蔵", + "block.electricadvantage.electric_crusher": "電気岩クラッシャー", + "block.electricadvantage.laser_turret": "レーザー砲塔", + "block.electricadvantage.electric_drill": "電気ドリル", + "block.electricadvantage.electric_fabricator": "ロボット工場", + "block.electricadvantage.electric_furnace": "電気炉", + "block.electricadvantage.electric_oven": "電気オーブン", + "block.electricadvantage.electric_pcb_printer": "回路基板プリンター", + "block.electricadvantage.geothermal_generator": "地熱発電", + "block.electricadvantage.hydroelectric_generator": "水力発電機", + "block.electricadvantage.photovoltaic_generator": "太陽電池パネル", + "block.electricadvantage.steam_powered_generator": "蒸気駆動の発電機", + "block.electricadvantage.growth_chamber": "植物生長室", + "block.electricadvantage.growth_chamber_controller": "植物成長室コントローラ", + "block.electricadvantage.li_ore": "リチウム 鉱石", + "block.electricadvantage.sulfur_ore": "硫黄鉱石", + "block.electricadvantage.led_bar": "LEDライト", + "block.electricadvantage.electric_switch": "電気スイッチ", + "block.electricadvantage.electric_still": "電気蒸留器", + "block.electricadvantage.electric_pump": "電気ポンプ", + "block.electricadvantage.plastic_refinery": "プラスチック製油所", + "item.electricadvantage.petrolplastic_ingot": "石油系プラスチックインゴット", + "block.electricadvantage.pump_pipe_electric": "ポンプ配管", + "block.electricadvantage.laser_turret_evil": "レーザー砲塔" +} diff --git a/src/main/resources/assets/electricadvantage/lang/ja_jp.lang b/src/main/resources/assets/electricadvantage/lang/ja_jp.lang deleted file mode 100644 index e7b4f33..0000000 --- a/src/main/resources/assets/electricadvantage/lang/ja_jp.lang +++ /dev/null @@ -1,54 +0,0 @@ -language_support_goals = 英語 (en_US en_EN en_CA、en_GB, en_AU, en_PT), スペイン語 (es_MX、es_ES)、中国 (zh_CN)、日本語 (ja_JA)、ポルトガル (pt_BR)、ドイツ語 (de_DE)、イタリア語 (it_IT), 韓国語 (ko_KR) - -item.electricadvantage.blank_circuit_board.name=回路基板 (空の) -item.electricadvantage.control_circuit.name=コンピューター回路 -item.electricadvantage.integrated_circuit.name=マイクロチップ -item.electricadvantage.psu.name=電源ユニット -item.electricadvantage.silicon_ingot.name=シリコン -item.electricadvantage.silicon_mix.name=シリコンレシピ -item.electricadvantage.solder_mix.name=はんだレシピ -item.electricadvantage.solder.name=はんだ -item.electricadvantage.li_powder.name=リチウム粉末 -item.electricadvantage.li_ingot.name=リチウム金属 -item.electricadvantage.li_nugget.name=リチウムナゲット -item.electricadvantage.sulfur_powder.name=硫黄粉末 -item.electricadvantage.lead_acid_battery.name=鉛蓄電池 -item.electricadvantage.nickel_hydride_battery.name=ニッケル水素バッテリー -item.electricadvantage.alkaline_battery.name=アルカリ電池 -item.electricadvantage.lithium_battery.name=リチウムイオン電池 - -tile.electricadvantage.electric_conduit.name=電線 -tile.electricadvantage.electric_track.name=電動足場 -tile.electricadvantage.electric_battery_array.name=電池貯蔵 -tile.electricadvantage.electric_crusher.name=電気岩クラッシャー -tile.electricadvantage.laser_turret.name=レーザー砲塔 -tile.electricadvantage.electric_drill.name=電気ドリル -tile.electricadvantage.electric_fabricator.name=ロボット工場 -tile.electricadvantage.electric_furnace.name=電気炉 -tile.electricadvantage.electric_oven.name=電気オーブン -tile.electricadvantage.electric_pcb_printer.name=回路基板プリンター -tile.electricadvantage.geothermal_generator.name=地熱発電 -tile.electricadvantage.hydroelectric_generator.name=水力発電機 -tile.electricadvantage.photovoltaic_generator.name=太陽電池パネル -tile.electricadvantage.steam_powered_generator.name=蒸気駆動の発電機 -tile.electricadvantage.growth_chamber.name=植物生長室 -tile.electricadvantage.growth_chamber_controller.name=植物成長室コントローラ -tile.electricadvantage.li_ore.name=リチウム 鉱石 -tile.electricadvantage.sulfur_ore.name=硫黄鉱石 -tile.electricadvantage.led_bar.name=LEDライト - -tooltip.battery.charge=量 -tooltip.battery.capacity=合計金額 - -death.attack.laser=%1$s気化 -蒸発 death.attack.laser.player=%2$sは%1$sを気化しました -death.attack.propeller=プロペラ殺さ%1$s -death.attack.propeller.player=%2$sはプロペラと%1$sを殺しました - - -tile.electricadvantage.electric_switch.name=電気スイッチ -tile.electricadvantage.electric_still.name=電気蒸留器 -tile.electricadvantage.electric_pump.name=電気ポンプ -tile.electricadvantage.plastic_refinery.name=プラスチック製油所 -item.electricadvantage.petrolplastic_ingot.name=石油系プラスチックインゴット -tile.electricadvantage.pump_pipe_electric.name=ポンプ配管 diff --git a/src/main/resources/assets/electricadvantage/lang/ko_ko.json b/src/main/resources/assets/electricadvantage/lang/ko_ko.json new file mode 100644 index 0000000..d527227 --- /dev/null +++ b/src/main/resources/assets/electricadvantage/lang/ko_ko.json @@ -0,0 +1,91 @@ +{ + "item.electricadvantage.blank_circuit_board.name": "회로 기판 (빈)", + "item.electricadvantage.control_circuit.name": "제어 회로", + "item.electricadvantage.integrated_circuit.name": "마이크로 칩", + "item.electricadvantage.psu.name": "전원 공급 장치", + "item.electricadvantage.silicon_ingot.name": "실리콘 잉곳", + "item.electricadvantage.silicon_mix.name": "실리콘 혼합", + "item.electricadvantage.solder_mix.name": "솔더 혼합", + "item.electricadvantage.solder.name": "솔더", + "item.electricadvantage.li_powder.name": "분말 리튬", + "item.electricadvantage.li_ingot.name": "리튬 잉곳", + "item.electricadvantage.li_nugget.name": "리튬 너겟", + "item.electricadvantage.sulfur_powder.name": "분말 유황", + "item.electricadvantage.lead_acid_battery.name": "납 축전지", + "item.electricadvantage.nickel_hydride_battery.name": "니켈 수소 배터리", + "item.electricadvantage.alkaline_battery.name": "알카라인 배터리", + "item.electricadvantage.lithium_battery.name": "리튬 이온 배터리", + "tile.electricadvantage.electric_conduit.name": "전력 케이블", + "tile.electricadvantage.electric_track.name": "전기 비계", + "tile.electricadvantage.electric_battery_array.name": "전지 어레이", + "tile.electricadvantage.electric_crusher.name": "전기 락 크러셔", + "tile.electricadvantage.laser_turret.name": "레이저 방어 터렛", + "tile.electricadvantage.electric_drill.name": "전기 마이닝 드릴", + "tile.electricadvantage.electric_fabricator.name": "자동 어셈블러", + "tile.electricadvantage.electric_furnace.name": "전기로", + "tile.electricadvantage.electric_oven.name": "전기 오븐", + "tile.electricadvantage.electric_pcb_printer.name": "회로 기판 프린터", + "tile.electricadvantage.geothermal_generator.name": "지열 발전기", + "tile.electricadvantage.hydroelectric_generator.name": "수력 발전기", + "tile.electricadvantage.photovoltaic_generator.name": "태양 광 발전기", + "tile.electricadvantage.steam_powered_generator.name": "증기 발전기", + "tile.electricadvantage.growth_chamber.name": "성장 상공 회의소", + "tile.electricadvantage.growth_chamber_controller.name": "성장 챔버 제어 장치", + "tile.electricadvantage.li_ore.name": "리튬 광석", + "tile.electricadvantage.sulfur_ore.name": "유황 광석", + "tile.electricadvantage.led_bar.name": "LED 조명", + "tooltip.battery.charge": "요금", + "tooltip.battery.capacity": "생산 능력", + "death.attack.laser": "%1$s이 (가) 증발", + "death.attack.laser.player": "%2$s의 증발 %1$s", + "death.attack.propeller": "%1$s는 프로펠러에 의해 분쇄 하였다.", + "death.attack.propeller.player": "%2$s는 프로펠러에 %1$s을 (를) 밀었다.", + "tile.electricadvantage.electric_switch.name": "전기 스위치", + "tile.electricadvantage.electric_still.name": "전기 증류기", + "tile.electricadvantage.electric_pump.name": "전기 펌프", + "tile.electricadvantage.plastic_refinery.name": "플라스틱 정유", + "item.electricadvantage.petrolplastic_ingot.name": "석유 수지 잉곳", + "tile.electricadvantage.pump_pipe_electric.name": "펌프 파이프", + "item.electricadvantage.blank_circuit_board": "회로 기판 (빈)", + "item.electricadvantage.control_circuit": "제어 회로", + "item.electricadvantage.integrated_circuit": "마이크로 칩", + "item.electricadvantage.psu": "전원 공급 장치", + "item.electricadvantage.silicon_ingot": "실리콘 잉곳", + "item.electricadvantage.silicon_mix": "실리콘 혼합", + "item.electricadvantage.solder_mix": "솔더 혼합", + "item.electricadvantage.solder": "솔더", + "item.electricadvantage.li_powder": "분말 리튬", + "item.electricadvantage.li_ingot": "리튬 잉곳", + "item.electricadvantage.li_nugget": "리튬 너겟", + "item.electricadvantage.sulfur_powder": "분말 유황", + "item.electricadvantage.lead_acid_battery": "납 축전지", + "item.electricadvantage.nickel_hydride_battery": "니켈 수소 배터리", + "item.electricadvantage.alkaline_battery": "알카라인 배터리", + "item.electricadvantage.lithium_battery": "리튬 이온 배터리", + "block.electricadvantage.electric_conduit": "전력 케이블", + "block.electricadvantage.electric_track": "전기 비계", + "block.electricadvantage.electric_battery_array": "전지 어레이", + "block.electricadvantage.electric_crusher": "전기 락 크러셔", + "block.electricadvantage.laser_turret": "레이저 방어 터렛", + "block.electricadvantage.electric_drill": "전기 마이닝 드릴", + "block.electricadvantage.electric_fabricator": "자동 어셈블러", + "block.electricadvantage.electric_furnace": "전기로", + "block.electricadvantage.electric_oven": "전기 오븐", + "block.electricadvantage.electric_pcb_printer": "회로 기판 프린터", + "block.electricadvantage.geothermal_generator": "지열 발전기", + "block.electricadvantage.hydroelectric_generator": "수력 발전기", + "block.electricadvantage.photovoltaic_generator": "태양 광 발전기", + "block.electricadvantage.steam_powered_generator": "증기 발전기", + "block.electricadvantage.growth_chamber": "성장 상공 회의소", + "block.electricadvantage.growth_chamber_controller": "성장 챔버 제어 장치", + "block.electricadvantage.li_ore": "리튬 광석", + "block.electricadvantage.sulfur_ore": "유황 광석", + "block.electricadvantage.led_bar": "LED 조명", + "block.electricadvantage.electric_switch": "전기 스위치", + "block.electricadvantage.electric_still": "전기 증류기", + "block.electricadvantage.electric_pump": "전기 펌프", + "block.electricadvantage.plastic_refinery": "플라스틱 정유", + "item.electricadvantage.petrolplastic_ingot": "석유 수지 잉곳", + "block.electricadvantage.pump_pipe_electric": "펌프 파이프", + "block.electricadvantage.laser_turret_evil": "레이저 방어 터렛" +} diff --git a/src/main/resources/assets/electricadvantage/lang/ko_ko.lang b/src/main/resources/assets/electricadvantage/lang/ko_ko.lang deleted file mode 100644 index f5dcd3f..0000000 --- a/src/main/resources/assets/electricadvantage/lang/ko_ko.lang +++ /dev/null @@ -1,52 +0,0 @@ -item.electricadvantage.blank_circuit_board.name=회로 기판 (빈) -item.electricadvantage.control_circuit.name=제어 회로 -item.electricadvantage.integrated_circuit.name=마이크로 칩 -item.electricadvantage.psu.name=전원 공급 장치 -item.electricadvantage.silicon_ingot.name=실리콘 잉곳 -item.electricadvantage.silicon_mix.name=실리콘 혼합 -item.electricadvantage.solder_mix.name=솔더 혼합 -item.electricadvantage.solder.name=솔더 -item.electricadvantage.li_powder.name=분말 리튬 -item.electricadvantage.li_ingot.name=리튬 잉곳 -item.electricadvantage.li_nugget.name=리튬 너겟 -item.electricadvantage.sulfur_powder.name=분말 유황 -item.electricadvantage.lead_acid_battery.name=납 축전지 -item.electricadvantage.nickel_hydride_battery.name=니켈 수소 배터리 -item.electricadvantage.alkaline_battery.name=알카라인 배터리 -item.electricadvantage.lithium_battery.name=리튬 이온 배터리 - -tile.electricadvantage.electric_conduit.name=전력 케이블 -tile.electricadvantage.electric_track.name=전기 비계 -tile.electricadvantage.electric_battery_array.name=전지 어레이 -tile.electricadvantage.electric_crusher.name=전기 락 크러셔 -tile.electricadvantage.laser_turret.name=레이저 방어 터렛 -tile.electricadvantage.electric_drill.name=전기 마이닝 드릴 -tile.electricadvantage.electric_fabricator.name=자동 어셈블러 -tile.electricadvantage.electric_furnace.name=전기로 -tile.electricadvantage.electric_oven.name=전기 오븐 -tile.electricadvantage.electric_pcb_printer.name=회로 기판 프린터 -tile.electricadvantage.geothermal_generator.name=지열 발전기 -tile.electricadvantage.hydroelectric_generator.name=수력 발전기 -tile.electricadvantage.photovoltaic_generator.name=태양 광 발전기 -tile.electricadvantage.steam_powered_generator.name=증기 발전기 -tile.electricadvantage.growth_chamber.name=성장 상공 회의소 -tile.electricadvantage.growth_chamber_controller.name=성장 챔버 제어 장치 -tile.electricadvantage.li_ore.name=리튬 광석 -tile.electricadvantage.sulfur_ore.name=유황 광석 -tile.electricadvantage.led_bar.name=LED 조명 - -tooltip.battery.charge=요금 -tooltip.battery.capacity=생산 능력 - -death.attack.laser=%1$s이 (가) 증발 -death.attack.laser.player=%2$s의 증발 %1$s -death.attack.propeller=%1$s는 프로펠러에 의해 분쇄 하였다. -death.attack.propeller.player=%2$s는 프로펠러에 %1$s을 (를) 밀었다. - - -tile.electricadvantage.electric_switch.name=전기 스위치 -tile.electricadvantage.electric_still.name=전기 증류기 -tile.electricadvantage.electric_pump.name=전기 펌프 -tile.electricadvantage.plastic_refinery.name=플라스틱 정유 -item.electricadvantage.petrolplastic_ingot.name=석유 수지 잉곳 -tile.electricadvantage.pump_pipe_electric.name=펌프 파이프 diff --git a/src/main/resources/assets/electricadvantage/lang/pt_br.json b/src/main/resources/assets/electricadvantage/lang/pt_br.json new file mode 100644 index 0000000..3140e93 --- /dev/null +++ b/src/main/resources/assets/electricadvantage/lang/pt_br.json @@ -0,0 +1,92 @@ +{ + "language_support_goals": "inglês (en_US, en_EN, en_CA, en_GB, en_AU, en_PT), espanhol (es_MX, es_ES), chinês (zh_CN), japonês (ja_JA), Português (pt_BR), alemão (de_DE), italiano (it_IT), coreano (ko_KR)", + "item.electricadvantage.blank_circuit_board.name": "Placa de Circuito (Vago)", + "item.electricadvantage.control_circuit.name": "Circuito de Controle", + "item.electricadvantage.integrated_circuit.name": "Circuito Integrado", + "item.electricadvantage.psu.name": "Unidade de Alimentação", + "item.electricadvantage.silicon_ingot.name": "Silício Lingote", + "item.electricadvantage.silicon_mix.name": "Mistura de Silício", + "item.electricadvantage.solder_mix.name": "Mistura de Solda", + "item.electricadvantage.solder.name": "Solda", + "item.electricadvantage.li_powder.name": "Pó de Lítio", + "item.electricadvantage.li_ingot.name": "Lítio Lingote", + "item.electricadvantage.li_nugget.name": "Pepita de Lítio", + "item.electricadvantage.sulfur_powder.name": "Enxofre em Pó", + "item.electricadvantage.lead_acid_battery.name": "Bateria de Chumbo Ácido", + "item.electricadvantage.nickel_hydride_battery.name": "Bateria Níquel-Hidreto Metálico", + "item.electricadvantage.alkaline_battery.name": "Bateria Alcalina", + "item.electricadvantage.lithium_battery.name": "Bateria de Lítio", + "tile.electricadvantage.electric_conduit.name": "Fio Elétrico", + "tile.electricadvantage.electric_track.name": "Elétrica Andaime", + "tile.electricadvantage.electric_battery_array.name": "Armazenamento da Bateria", + "tile.electricadvantage.electric_crusher.name": "Triturador de Rocha Elétrica", + "tile.electricadvantage.laser_turret.name": "Torre de Arma a Laser", + "tile.electricadvantage.electric_drill.name": "Broca Mineração Elétrica", + "tile.electricadvantage.electric_fabricator.name": "Fábrica Automatizada", + "tile.electricadvantage.electric_furnace.name": "Forno Elétrico a Arco", + "tile.electricadvantage.electric_oven.name": "Forno Elétrico", + "tile.electricadvantage.electric_pcb_printer.name": "Impressora Circuito", + "tile.electricadvantage.geothermal_generator.name": "Gerador de Elétrico Geotérmica", + "tile.electricadvantage.hydroelectric_generator.name": "Gerador Hidrelétrico", + "tile.electricadvantage.photovoltaic_generator.name": "Painel Solar", + "tile.electricadvantage.steam_powered_generator.name": "a Vapor Gerador Elétrico", + "tile.electricadvantage.growth_chamber.name": "Câmara de Crescimento", + "tile.electricadvantage.growth_chamber_controller.name": "Unidade de Controle de Crescimento Câmara", + "tile.electricadvantage.li_ore.name": "Minério de Lítio", + "tile.electricadvantage.sulfur_ore.name": "Minério de Enxofre", + "tile.electricadvantage.led_bar.name": "Luz LED", + "tooltip.battery.charge": "Carga", + "tooltip.battery.capacity": "Capacidade", + "death.attack.laser": "%1$S vaporizado", + "death.attack.laser.player": "%2$s vaporizados %1$s", + "death.attack.propeller": "%1$s foi pulverizado por uma hélice.", + "death.attack.propeller.player": "%2$s empurrou %1$s em uma hélice.", + "tile.electricadvantage.electric_switch.name": "Chave Elétrica", + "tile.electricadvantage.electric_still.name": "Destilador Elétrico", + "tile.electricadvantage.electric_pump.name": "Bomba Elétrica", + "tile.electricadvantage.plastic_refinery.name": "Refinaria de Plástico", + "item.electricadvantage.petrolplastic_ingot.name": "Petróleo Plástico Lingote", + "tile.electricadvantage.pump_pipe_electric.name": "Tubo de Bomba", + "item.electricadvantage.blank_circuit_board": "Placa de Circuito (Vago)", + "item.electricadvantage.control_circuit": "Circuito de Controle", + "item.electricadvantage.integrated_circuit": "Circuito Integrado", + "item.electricadvantage.psu": "Unidade de Alimentação", + "item.electricadvantage.silicon_ingot": "Silício Lingote", + "item.electricadvantage.silicon_mix": "Mistura de Silício", + "item.electricadvantage.solder_mix": "Mistura de Solda", + "item.electricadvantage.solder": "Solda", + "item.electricadvantage.li_powder": "Pó de Lítio", + "item.electricadvantage.li_ingot": "Lítio Lingote", + "item.electricadvantage.li_nugget": "Pepita de Lítio", + "item.electricadvantage.sulfur_powder": "Enxofre em Pó", + "item.electricadvantage.lead_acid_battery": "Bateria de Chumbo Ácido", + "item.electricadvantage.nickel_hydride_battery": "Bateria Níquel-Hidreto Metálico", + "item.electricadvantage.alkaline_battery": "Bateria Alcalina", + "item.electricadvantage.lithium_battery": "Bateria de Lítio", + "block.electricadvantage.electric_conduit": "Fio Elétrico", + "block.electricadvantage.electric_track": "Elétrica Andaime", + "block.electricadvantage.electric_battery_array": "Armazenamento da Bateria", + "block.electricadvantage.electric_crusher": "Triturador de Rocha Elétrica", + "block.electricadvantage.laser_turret": "Torre de Arma a Laser", + "block.electricadvantage.electric_drill": "Broca Mineração Elétrica", + "block.electricadvantage.electric_fabricator": "Fábrica Automatizada", + "block.electricadvantage.electric_furnace": "Forno Elétrico a Arco", + "block.electricadvantage.electric_oven": "Forno Elétrico", + "block.electricadvantage.electric_pcb_printer": "Impressora Circuito", + "block.electricadvantage.geothermal_generator": "Gerador de Elétrico Geotérmica", + "block.electricadvantage.hydroelectric_generator": "Gerador Hidrelétrico", + "block.electricadvantage.photovoltaic_generator": "Painel Solar", + "block.electricadvantage.steam_powered_generator": "a Vapor Gerador Elétrico", + "block.electricadvantage.growth_chamber": "Câmara de Crescimento", + "block.electricadvantage.growth_chamber_controller": "Unidade de Controle de Crescimento Câmara", + "block.electricadvantage.li_ore": "Minério de Lítio", + "block.electricadvantage.sulfur_ore": "Minério de Enxofre", + "block.electricadvantage.led_bar": "Luz LED", + "block.electricadvantage.electric_switch": "Chave Elétrica", + "block.electricadvantage.electric_still": "Destilador Elétrico", + "block.electricadvantage.electric_pump": "Bomba Elétrica", + "block.electricadvantage.plastic_refinery": "Refinaria de Plástico", + "item.electricadvantage.petrolplastic_ingot": "Petróleo Plástico Lingote", + "block.electricadvantage.pump_pipe_electric": "Tubo de Bomba", + "block.electricadvantage.laser_turret_evil": "Torre de Arma a Laser" +} diff --git a/src/main/resources/assets/electricadvantage/lang/pt_br.lang b/src/main/resources/assets/electricadvantage/lang/pt_br.lang deleted file mode 100644 index 8bd8c91..0000000 --- a/src/main/resources/assets/electricadvantage/lang/pt_br.lang +++ /dev/null @@ -1,54 +0,0 @@ -language_support_goals=inglês (en_US, en_EN, en_CA, en_GB, en_AU, en_PT), espanhol (es_MX, es_ES), chinês (zh_CN), japonês (ja_JA), Português (pt_BR), alemão (de_DE), italiano (it_IT), coreano (ko_KR) - -item.electricadvantage.blank_circuit_board.name=Placa de Circuito (Vago) -item.electricadvantage.control_circuit.name=Circuito de Controle -item.electricadvantage.integrated_circuit.name=Circuito Integrado -item.electricadvantage.psu.name=Unidade de Alimentação -item.electricadvantage.silicon_ingot.name=Silício Lingote -item.electricadvantage.silicon_mix.name=Mistura de Silício -item.electricadvantage.solder_mix.name=Mistura de Solda -item.electricadvantage.solder.name=Solda -item.electricadvantage.li_powder.name=Pó de Lítio -item.electricadvantage.li_ingot.name=Lítio Lingote -item.electricadvantage.li_nugget.name=Pepita de Lítio -item.electricadvantage.sulfur_powder.name=Enxofre em Pó -item.electricadvantage.lead_acid_battery.name=Bateria de Chumbo Ácido -item.electricadvantage.nickel_hydride_battery.name=Bateria Níquel-Hidreto Metálico -item.electricadvantage.alkaline_battery.name=Bateria Alcalina -item.electricadvantage.lithium_battery.name=Bateria de Lítio - -tile.electricadvantage.electric_conduit.name=Fio Elétrico -tile.electricadvantage.electric_track.name=Elétrica Andaime -tile.electricadvantage.electric_battery_array.name=Armazenamento da Bateria -tile.electricadvantage.electric_crusher.name=Triturador de Rocha Elétrica -tile.electricadvantage.laser_turret.name=Torre de Arma a Laser -tile.electricadvantage.electric_drill.name=Broca Mineração Elétrica -tile.electricadvantage.electric_fabricator.name=Fábrica Automatizada -tile.electricadvantage.electric_furnace.name=Forno Elétrico a Arco -tile.electricadvantage.electric_oven.name=Forno Elétrico -tile.electricadvantage.electric_pcb_printer.name=Impressora Circuito -tile.electricadvantage.geothermal_generator.name=Gerador de Elétrico Geotérmica -tile.electricadvantage.hydroelectric_generator.name=Gerador Hidrelétrico -tile.electricadvantage.photovoltaic_generator.name=Painel Solar -tile.electricadvantage.steam_powered_generator.name=a Vapor Gerador Elétrico -tile.electricadvantage.growth_chamber.name=Câmara de Crescimento -tile.electricadvantage.growth_chamber_controller.name=Unidade de Controle de Crescimento Câmara -tile.electricadvantage.li_ore.name=Minério de Lítio -tile.electricadvantage.sulfur_ore.name=Minério de Enxofre -tile.electricadvantage.led_bar.name=Luz LED - -tooltip.battery.charge=Carga -tooltip.battery.capacity=Capacidade - -death.attack.laser=%1$S vaporizado -death.attack.laser.player=%2$s vaporizados %1$s -death.attack.propeller=%1$s foi pulverizado por uma hélice. -death.attack.propeller.player=%2$s empurrou %1$s em uma hélice. - - -tile.electricadvantage.electric_switch.name=Chave Elétrica -tile.electricadvantage.electric_still.name=Destilador Elétrico -tile.electricadvantage.electric_pump.name=Bomba Elétrica -tile.electricadvantage.plastic_refinery.name=Refinaria de Plástico -item.electricadvantage.petrolplastic_ingot.name=Petróleo Plástico Lingote -tile.electricadvantage.pump_pipe_electric.name=Tubo de Bomba diff --git a/src/main/resources/assets/electricadvantage/lang/zh_cn.json b/src/main/resources/assets/electricadvantage/lang/zh_cn.json new file mode 100644 index 0000000..d881a85 --- /dev/null +++ b/src/main/resources/assets/electricadvantage/lang/zh_cn.json @@ -0,0 +1,92 @@ +{ + "language_support_goals": "英语(EN_US,的en_EN,en_CA,EN_GB,en_AU,en_PT),西班牙语(es_MX,es_ES),中国(zh_CN的),日本(ja_JA),葡萄牙语(PT_BR),德语(de_DE这个),意大利语(it_IT),韩国(ko_KR)", + "item.electricadvantage.blank_circuit_board.name": "电路板(空白)", + "item.electricadvantage.control_circuit.name": "控制电路", + "item.electricadvantage.integrated_circuit.name": "微芯片", + "item.electricadvantage.psu.name": "电源单元", + "item.electricadvantage.silicon_ingot.name": "硅锭", + "item.electricadvantage.silicon_mix.name": "硅混合", + "item.electricadvantage.solder_mix.name": "焊接混合", + "item.electricadvantage.solder.name": "焊料", + "item.electricadvantage.li_powder.name": "粉状锂", + "item.electricadvantage.li_ingot.name": "锂锭", + "item.electricadvantage.li_nugget.name": "锂掘金", + "item.electricadvantage.sulfur_powder.name": "硫粉", + "item.electricadvantage.lead_acid_battery.name": "铅酸蓄电池", + "item.electricadvantage.nickel_hydride_battery.name": "镍氢电池", + "item.electricadvantage.alkaline_battery.name": "碱性电池", + "item.electricadvantage.lithium_battery.name": "锂离子电池", + "tile.electricadvantage.electric_conduit.name": "电力电缆", + "tile.electricadvantage.electric_track.name": "电动脚手架", + "tile.electricadvantage.electric_battery_array.name": "电池阵列", + "tile.electricadvantage.electric_crusher.name": "电碎石机", + "tile.electricadvantage.laser_turret.name": "激光防御炮塔", + "tile.electricadvantage.electric_drill.name": "电矿钻", + "tile.electricadvantage.electric_fabricator.name": "自动汇编", + "tile.electricadvantage.electric_furnace.name": "电弧炉", + "tile.electricadvantage.electric_oven.name": "电烤箱", + "tile.electricadvantage.electric_pcb_printer.name": " 电路板打印机", + "tile.electricadvantage.geothermal_generator.name": "热发电机", + "tile.electricadvantage.hydroelectric_generator.name": "水轮发电机", + "tile.electricadvantage.photovoltaic_generator.name": "光电发生器", + "tile.electricadvantage.steam_powered_generator.name": "蒸汽为动力的电动发电机", + "tile.electricadvantage.growth_chamber.name": "生长箱", + "tile.electricadvantage.growth_chamber_controller.name": "生长箱控制单元", + "tile.electricadvantage.li_ore.name": "锂矿", + "tile.electricadvantage.sulfur_ore.name": "硫矿石", + "tile.electricadvantage.led_bar.name": "LED燈", + "tooltip.battery.charge": "充电", + "tooltip.battery.capacity": "容量", + "death.attack.laser": "%1$s蒸发", + "death.attack.laser.player": "%2$s汽化%1$s", + "death.attack.propeller": "%1$s被粉碎螺旋桨。", + "death.attack.propeller.player": "%2$s推%1$s转换为螺旋桨。", + "tile.electricadvantage.electric_switch.name": "電器開關", + "tile.electricadvantage.electric_still.name": "電熱蒸餾水", + "tile.electricadvantage.electric_pump.name": "電動泵", + "tile.electricadvantage.plastic_refinery.name": "塑料煉油廠", + "item.electricadvantage.petrolplastic_ingot.name": "石油膠錠", + "tile.electricadvantage.pump_pipe_electric.name": "泵管", + "item.electricadvantage.blank_circuit_board": "电路板(空白)", + "item.electricadvantage.control_circuit": "控制电路", + "item.electricadvantage.integrated_circuit": "微芯片", + "item.electricadvantage.psu": "电源单元", + "item.electricadvantage.silicon_ingot": "硅锭", + "item.electricadvantage.silicon_mix": "硅混合", + "item.electricadvantage.solder_mix": "焊接混合", + "item.electricadvantage.solder": "焊料", + "item.electricadvantage.li_powder": "粉状锂", + "item.electricadvantage.li_ingot": "锂锭", + "item.electricadvantage.li_nugget": "锂掘金", + "item.electricadvantage.sulfur_powder": "硫粉", + "item.electricadvantage.lead_acid_battery": "铅酸蓄电池", + "item.electricadvantage.nickel_hydride_battery": "镍氢电池", + "item.electricadvantage.alkaline_battery": "碱性电池", + "item.electricadvantage.lithium_battery": "锂离子电池", + "block.electricadvantage.electric_conduit": "电力电缆", + "block.electricadvantage.electric_track": "电动脚手架", + "block.electricadvantage.electric_battery_array": "电池阵列", + "block.electricadvantage.electric_crusher": "电碎石机", + "block.electricadvantage.laser_turret": "激光防御炮塔", + "block.electricadvantage.electric_drill": "电矿钻", + "block.electricadvantage.electric_fabricator": "自动汇编", + "block.electricadvantage.electric_furnace": "电弧炉", + "block.electricadvantage.electric_oven": "电烤箱", + "block.electricadvantage.electric_pcb_printer": " 电路板打印机", + "block.electricadvantage.geothermal_generator": "热发电机", + "block.electricadvantage.hydroelectric_generator": "水轮发电机", + "block.electricadvantage.photovoltaic_generator": "光电发生器", + "block.electricadvantage.steam_powered_generator": "蒸汽为动力的电动发电机", + "block.electricadvantage.growth_chamber": "生长箱", + "block.electricadvantage.growth_chamber_controller": "生长箱控制单元", + "block.electricadvantage.li_ore": "锂矿", + "block.electricadvantage.sulfur_ore": "硫矿石", + "block.electricadvantage.led_bar": "LED燈", + "block.electricadvantage.electric_switch": "電器開關", + "block.electricadvantage.electric_still": "電熱蒸餾水", + "block.electricadvantage.electric_pump": "電動泵", + "block.electricadvantage.plastic_refinery": "塑料煉油廠", + "item.electricadvantage.petrolplastic_ingot": "石油膠錠", + "block.electricadvantage.pump_pipe_electric": "泵管", + "block.electricadvantage.laser_turret_evil": "激光防御炮塔" +} diff --git a/src/main/resources/assets/electricadvantage/lang/zh_cn.lang b/src/main/resources/assets/electricadvantage/lang/zh_cn.lang deleted file mode 100644 index 55971ff..0000000 --- a/src/main/resources/assets/electricadvantage/lang/zh_cn.lang +++ /dev/null @@ -1,55 +0,0 @@ -language_support_goals=英语(EN_US,的en_EN,en_CA,EN_GB,en_AU,en_PT),西班牙语(es_MX,es_ES),中国(zh_CN的),日本(ja_JA),葡萄牙语(PT_BR),德语(de_DE这个),意大利语(it_IT),韩国(ko_KR) - -item.electricadvantage.blank_circuit_board.name=电路板(空白) -item.electricadvantage.control_circuit.name=控制电路 -item.electricadvantage.integrated_circuit.name=微芯片 -item.electricadvantage.psu.name=电源单元 -item.electricadvantage.silicon_ingot.name=硅锭 -item.electricadvantage.silicon_mix.name=硅混合 -item.electricadvantage.solder_mix.name=焊接混合 -item.electricadvantage.solder.name=焊料 -item.electricadvantage.li_powder.name=粉状锂 -item.electricadvantage.li_ingot.name=锂锭 -item.electricadvantage.li_nugget.name=锂掘金 -item.electricadvantage.sulfur_powder.name=硫粉 -item.electricadvantage.lead_acid_battery.name=铅酸蓄电池 -item.electricadvantage.nickel_hydride_battery.name=镍氢电池 -item.electricadvantage.alkaline_battery.name=碱性电池 -item.electricadvantage.lithium_battery.name=锂离子电池 - -tile.electricadvantage.electric_conduit.name=电力电缆 -tile.electricadvantage.electric_track.name=电动脚手架 -tile.electricadvantage.electric_battery_array.name=电池阵列 -tile.electricadvantage.electric_crusher.name=电碎石机 -tile.electricadvantage.laser_turret.name=激光防御炮塔 -tile.electricadvantage.electric_drill.name=电矿钻 -tile.electricadvantage.electric_fabricator.name=自动汇编 -tile.electricadvantage.electric_furnace.name=电弧炉 -tile.electricadvantage.electric_oven.name=电烤箱 -tile.electricadvantage.electric_pcb_printer.name= 电路板打印机 -tile.electricadvantage.geothermal_generator.name=热发电机 -tile.electricadvantage.hydroelectric_generator.name=水轮发电机 -tile.electricadvantage.photovoltaic_generator.name=光电发生器 -tile.electricadvantage.steam_powered_generator.name=蒸汽为动力的电动发电机 -tile.electricadvantage.growth_chamber.name=生长箱 -tile.electricadvantage.growth_chamber_controller.name=生长箱控制单元 -tile.electricadvantage.li_ore.name=锂矿 -tile.electricadvantage.sulfur_ore.name=硫矿石 -tile.electricadvantage.led_bar.name=LED燈 - -tooltip.battery.charge=充电 -tooltip.battery.capacity=容量 - -death.attack.laser=%1$s蒸发 -death.attack.laser.player=%2$s汽化%1$s -death.attack.propeller=%1$s被粉碎螺旋桨。 -death.attack.propeller.player=%2$s推%1$s转换为螺旋桨。 - - -tile.electricadvantage.electric_switch.name=電器開關 -tile.electricadvantage.electric_still.name=電熱蒸餾水 -tile.electricadvantage.electric_pump.name=電動泵 -tile.electricadvantage.plastic_refinery.name=塑料煉油廠 -item.electricadvantage.petrolplastic_ingot.name=石油膠錠 -tile.electricadvantage.pump_pipe_electric.name=泵管 - diff --git a/src/main/resources/assets/electricadvantage/recipes/_factories.json b/src/main/resources/assets/electricadvantage/recipes/_factories.json deleted file mode 100644 index 0ff84c3..0000000 --- a/src/main/resources/assets/electricadvantage/recipes/_factories.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "conditions": { - "recipe_mode": "com.mcmoddev.electricadvantage.recipe.condition.RecipeModeConditionFactory", - "not_recipe_mode": "com.mcmoddev.electricadvantage.recipe.condition.NotRecipeModeConditionFactory" - } -} diff --git a/src/main/resources/assets/electricadvantage/recipes/alkaline_battery.json b/src/main/resources/assets/electricadvantage/recipes/alkaline_battery.json deleted file mode 100644 index 996da4a..0000000 --- a/src/main/resources/assets/electricadvantage/recipes/alkaline_battery.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "type": "forge:ore_shaped", - "pattern": [ - "pXp", - "pYp", - "pZp" - ], - "key": { - "X": { - "type": "forge:ore_dict", - "ore": "ingotIron" - }, - "Y": { - "item": "minecraft:gunpowder" - }, - "Z": { - "type": "forge:ore_dict", - "ore": "ingotZinc" - }, - "p": { - "type": "forge:ore_dict", - "ore": "plastic" - } - }, - "result": { - "item": "electricadvantage:alkaline_battery" - }, - "group": "batteries" -} diff --git a/src/main/resources/assets/electricadvantage/recipes/blank_circuit_board_ingot_normal.json b/src/main/resources/assets/electricadvantage/recipes/blank_circuit_board_ingot_normal.json deleted file mode 100644 index 3feaaaa..0000000 --- a/src/main/resources/assets/electricadvantage/recipes/blank_circuit_board_ingot_normal.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "type": "forge:ore_shapeless", - "ingredients": [ - { - "type": "forge:ore_dict", - "ore": "plastic" - }, - { - "type": "forge:ore_dict", - "ore": "ingotCopper" - } - ], - "result": { - "item": "electricadvantage:blank_circuit_board", - "count": 2 - }, - "conditions": [ - { - "type": "electricadvantage:recipe_mode", - "mode": "NORMAL" - } - ], - "group": "circuits" -} diff --git a/src/main/resources/assets/electricadvantage/recipes/blank_circuit_board_plate.json b/src/main/resources/assets/electricadvantage/recipes/blank_circuit_board_plate.json deleted file mode 100644 index 12292a1..0000000 --- a/src/main/resources/assets/electricadvantage/recipes/blank_circuit_board_plate.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "type": "forge:ore_shapeless", - "ingredients": [ - { - "type": "forge:ore_dict", - "ore": "plastic" - }, - { - "type": "forge:ore_dict", - "ore": "plateCopper" - } - ], - "result": { - "item": "electricadvantage:blank_circuit_board", - "count": 2 - }, - "group": "circuits" -} diff --git a/src/main/resources/assets/electricadvantage/recipes/control_circuit.json b/src/main/resources/assets/electricadvantage/recipes/control_circuit.json deleted file mode 100644 index be4af2a..0000000 --- a/src/main/resources/assets/electricadvantage/recipes/control_circuit.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "type": "forge:ore_shapeless", - "ingredients": [ - { - "item": "electricadvantage:blank_circuit_board" - }, - { - "type": "forge:ore_dict", - "ore": "microchip" - }, - { - "type": "forge:ore_dict", - "ore": "solder" - } - ], - "result": { - "item": "electricadvantage:control_circuit" - }, - "group": "circuits" -} diff --git a/src/main/resources/assets/electricadvantage/recipes/electric_battery_array.json b/src/main/resources/assets/electricadvantage/recipes/electric_battery_array.json deleted file mode 100644 index cc5613b..0000000 --- a/src/main/resources/assets/electricadvantage/recipes/electric_battery_array.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "type": "forge:ore_shaped", - "pattern": [ - "uX ", - "pmp" - ], - "key": { - "X": { - "item": "minecraft:chest" - }, - "u": { - "type": "forge:ore_dict", - "ore": "PSU" - }, - "p": { - "type": "forge:ore_dict", - "ore": "plateSteel" - }, - "m": { - "type": "forge:ore_dict", - "ore": "frameSteel" - } - }, - "result": { - "item": "electricadvantage:electric_battery_array" - }, - "group": "electric_machines" -} diff --git a/src/main/resources/assets/electricadvantage/recipes/electric_conduit_plastic_ingot.json b/src/main/resources/assets/electricadvantage/recipes/electric_conduit_plastic_ingot.json deleted file mode 100644 index 8e60d04..0000000 --- a/src/main/resources/assets/electricadvantage/recipes/electric_conduit_plastic_ingot.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "type": "forge:ore_shaped", - "pattern": [ - "xxx", - "ccc", - "xxx" - ], - "key": { - "x": { - "type": "forge:ore_dict", - "ore": "plastic" - }, - "c": { - "type": "forge:ore_dict", - "ore": "ingotCopper" - } - }, - "result": { - "item": "electricadvantage:electric_conduit", - "count": 6 - }, - "group": "wires" -} diff --git a/src/main/resources/assets/electricadvantage/recipes/electric_conduit_plastic_rod.json b/src/main/resources/assets/electricadvantage/recipes/electric_conduit_plastic_rod.json deleted file mode 100644 index 6cdb434..0000000 --- a/src/main/resources/assets/electricadvantage/recipes/electric_conduit_plastic_rod.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "type": "forge:ore_shaped", - "pattern": [ - "xx", - "cc" - ], - "key": { - "x": { - "type": "forge:ore_dict", - "ore": "plastic" - }, - "c": { - "type": "forge:ore_dict", - "ore": "rodCopper" - } - }, - "result": { - "item": "electricadvantage:electric_conduit" - }, - "group": "wires" -} diff --git a/src/main/resources/assets/electricadvantage/recipes/electric_conduit_rubber_ingot.json b/src/main/resources/assets/electricadvantage/recipes/electric_conduit_rubber_ingot.json deleted file mode 100644 index 8719c7d..0000000 --- a/src/main/resources/assets/electricadvantage/recipes/electric_conduit_rubber_ingot.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "type": "forge:ore_shaped", - "pattern": [ - "xxx", - "ccc", - "xxx" - ], - "key": { - "x": { - "type": "forge:ore_dict", - "ore": "rubber" - }, - "c": { - "type": "forge:ore_dict", - "ore": "ingotCopper" - } - }, - "result": { - "item": "electricadvantage:electric_conduit", - "count": 6 - }, - "group": "wires" -} diff --git a/src/main/resources/assets/electricadvantage/recipes/electric_conduit_rubber_rod.json b/src/main/resources/assets/electricadvantage/recipes/electric_conduit_rubber_rod.json deleted file mode 100644 index ffc4452..0000000 --- a/src/main/resources/assets/electricadvantage/recipes/electric_conduit_rubber_rod.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "type": "forge:ore_shaped", - "pattern": [ - "xx", - "cc" - ], - "key": { - "x": { - "type": "forge:ore_dict", - "ore": "rubber" - }, - "c": { - "type": "forge:ore_dict", - "ore": "rodCopper" - } - }, - "result": { - "item": "electricadvantage:electric_conduit" - }, - "group": "wires" -} diff --git a/src/main/resources/assets/electricadvantage/recipes/electric_crusher.json b/src/main/resources/assets/electricadvantage/recipes/electric_crusher.json deleted file mode 100644 index d9b30e2..0000000 --- a/src/main/resources/assets/electricadvantage/recipes/electric_crusher.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "type": "forge:ore_shaped", - "pattern": [ - "uXY", - "pmp" - ], - "key": { - "X": { - "type": "forge:ore_dict", - "ore": "sprocket" - }, - "Y": { - "type": "forge:ore_dict", - "ore": "gemDiamond" - }, - "u": { - "type": "forge:ore_dict", - "ore": "PSU" - }, - "p": { - "type": "forge:ore_dict", - "ore": "plateSteel" - }, - "m": { - "type": "forge:ore_dict", - "ore": "frameSteel" - } - }, - "result": { - "item": "electricadvantage:electric_crusher" - }, - "group": "electric_machines" -} diff --git a/src/main/resources/assets/electricadvantage/recipes/electric_drill.json b/src/main/resources/assets/electricadvantage/recipes/electric_drill.json deleted file mode 100644 index 42c4a6a..0000000 --- a/src/main/resources/assets/electricadvantage/recipes/electric_drill.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "type": "forge:ore_shaped", - "pattern": [ - "uX ", - "pmp" - ], - "key": { - "X": { - "type": "forge:ore_dict", - "ore": "blockDiamond" - }, - "u": { - "type": "forge:ore_dict", - "ore": "PSU" - }, - "p": { - "type": "forge:ore_dict", - "ore": "plateSteel" - }, - "m": { - "type": "forge:ore_dict", - "ore": "frameSteel" - } - }, - "result": { - "item": "electricadvantage:electric_drill" - }, - "group": "electric_machines" -} diff --git a/src/main/resources/assets/electricadvantage/recipes/electric_fabricator.json b/src/main/resources/assets/electricadvantage/recipes/electric_fabricator.json deleted file mode 100644 index 08a4d02..0000000 --- a/src/main/resources/assets/electricadvantage/recipes/electric_fabricator.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "type": "forge:ore_shaped", - "pattern": [ - "uX ", - "pmp" - ], - "key": { - "X": { - "item": "minecraft:crafting_table" - }, - "u": { - "type": "forge:ore_dict", - "ore": "PSU" - }, - "p": { - "type": "forge:ore_dict", - "ore": "plateSteel" - }, - "m": { - "type": "forge:ore_dict", - "ore": "frameSteel" - } - }, - "result": { - "item": "electricadvantage:electric_fabricator" - }, - "group": "electric_machines" -} diff --git a/src/main/resources/assets/electricadvantage/recipes/electric_furnace.json b/src/main/resources/assets/electricadvantage/recipes/electric_furnace.json deleted file mode 100644 index 0c63e34..0000000 --- a/src/main/resources/assets/electricadvantage/recipes/electric_furnace.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "type": "forge:ore_shaped", - "pattern": [ - "bbb", - "bub", - "bbb" - ], - "key": { - "b": { - "item": "minecraft:brick_block" - }, - "u": { - "type": "forge:ore_dict", - "ore": "PSU" - } - }, - "result": { - "item": "electricadvantage:electric_furnace" - }, - "group": "electric_machines" -} diff --git a/src/main/resources/assets/electricadvantage/recipes/electric_oven.json b/src/main/resources/assets/electricadvantage/recipes/electric_oven.json deleted file mode 100644 index 3d9c719..0000000 --- a/src/main/resources/assets/electricadvantage/recipes/electric_oven.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "type": "forge:ore_shaped", - "pattern": [ - "uXY", - "pmp" - ], - "key": { - "X": { - "type": "forge:ore_dict", - "ore": "paneGlass" - }, - "Y": { - "type": "forge:ore_dict", - "ore": "PSU" - }, - "u": { - "type": "forge:ore_dict", - "ore": "PSU" - }, - "p": { - "type": "forge:ore_dict", - "ore": "plateSteel" - }, - "m": { - "type": "forge:ore_dict", - "ore": "frameSteel" - } - }, - "result": { - "item": "electricadvantage:electric_oven" - }, - "group": "electric_machines" -} diff --git a/src/main/resources/assets/electricadvantage/recipes/electric_pump.json b/src/main/resources/assets/electricadvantage/recipes/electric_pump.json deleted file mode 100644 index 0d0ad98..0000000 --- a/src/main/resources/assets/electricadvantage/recipes/electric_pump.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "type": "forge:ore_shaped", - "pattern": [ - "uXY", - "pmp" - ], - "key": { - "X": { - "item": "minecraft:piston" - }, - "Y": { - "item": "minecraft:bucket" - }, - "u": { - "type": "forge:ore_dict", - "ore": "PSU" - }, - "p": { - "type": "forge:ore_dict", - "ore": "plateSteel" - }, - "m": { - "type": "forge:ore_dict", - "ore": "frameSteel" - } - }, - "result": { - "item": "electricadvantage:electric_pump" - }, - "group": "electric_machines" -} diff --git a/src/main/resources/assets/electricadvantage/recipes/electric_still.json b/src/main/resources/assets/electricadvantage/recipes/electric_still.json deleted file mode 100644 index 78b52ea..0000000 --- a/src/main/resources/assets/electricadvantage/recipes/electric_still.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "type": "forge:ore_shaped", - "pattern": [ - "uXY", - "pmp" - ], - "key": { - "X": { - "item": "minecraft:bucket" - }, - "Y": { - "item": "minecraft:bucket" - }, - "u": { - "type": "forge:ore_dict", - "ore": "PSU" - }, - "p": { - "type": "forge:ore_dict", - "ore": "plateSteel" - }, - "m": { - "type": "forge:ore_dict", - "ore": "frameSteel" - } - }, - "result": { - "item": "electricadvantage:electric_still" - }, - "group": "electric_machines" -} diff --git a/src/main/resources/assets/electricadvantage/recipes/electric_switch.json b/src/main/resources/assets/electricadvantage/recipes/electric_switch.json deleted file mode 100644 index 7b55d78..0000000 --- a/src/main/resources/assets/electricadvantage/recipes/electric_switch.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "type": "forge:ore_shaped", - "pattern": [ - " L ", - "pfp" - ], - "key": { - "L": { - "item": "minecraft:lever" - }, - "p": { - "type": "forge:ore_dict", - "ore": "wire" - }, - "f": { - "type": "forge:ore_dict", - "ore": "frameSteel" - } - }, - "result": { - "item": "electricadvantage:electric_switch" - }, - "group": "electric_machines" -} diff --git a/src/main/resources/assets/electricadvantage/recipes/electric_track.json b/src/main/resources/assets/electricadvantage/recipes/electric_track.json deleted file mode 100644 index 2351a99..0000000 --- a/src/main/resources/assets/electricadvantage/recipes/electric_track.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "type": "forge:ore_shapeless", - "ingredients": [ - { - "item": "electricadvantage:electric_conduit" - }, - { - "item": "poweradvantage:steel_frame" - } - ], - "result": { - "item": "electricadvantage:electric_track" - }, - "group": "tracks" -} diff --git a/src/main/resources/assets/electricadvantage/recipes/growth_chamber.json b/src/main/resources/assets/electricadvantage/recipes/growth_chamber.json deleted file mode 100644 index 72d46a2..0000000 --- a/src/main/resources/assets/electricadvantage/recipes/growth_chamber.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "type": "forge:ore_shaped", - "pattern": [ - "uXY", - "pmp" - ], - "key": { - "X": { - "item": "minecraft:flower_pot" - }, - "Y": { - "type": "forge:ore_dict", - "ore": "microchip" - }, - "u": { - "type": "forge:ore_dict", - "ore": "PSU" - }, - "p": { - "type": "forge:ore_dict", - "ore": "plateSteel" - }, - "m": { - "type": "forge:ore_dict", - "ore": "frameSteel" - } - }, - "result": { - "item": "electricadvantage:growth_chamber" - }, - "group": "electric_machines" -} diff --git a/src/main/resources/assets/electricadvantage/recipes/growth_chamber_controller.json b/src/main/resources/assets/electricadvantage/recipes/growth_chamber_controller.json deleted file mode 100644 index e95c0ec..0000000 --- a/src/main/resources/assets/electricadvantage/recipes/growth_chamber_controller.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "type": "forge:ore_shaped", - "pattern": [ - "uXY", - "pmp" - ], - "key": { - "X": { - "item": "minecraft:flower_pot" - }, - "Y": { - "type": "forge:ore_dict", - "ore": "circuitBoard" - }, - "u": { - "type": "forge:ore_dict", - "ore": "PSU" - }, - "p": { - "type": "forge:ore_dict", - "ore": "plateSteel" - }, - "m": { - "type": "forge:ore_dict", - "ore": "frameSteel" - } - }, - "result": { - "item": "electricadvantage:growth_chamber_controller" - }, - "group": "electric_machines" -} diff --git a/src/main/resources/assets/electricadvantage/recipes/hydroelectric_generator.json b/src/main/resources/assets/electricadvantage/recipes/hydroelectric_generator.json deleted file mode 100644 index 3c8e7d3..0000000 --- a/src/main/resources/assets/electricadvantage/recipes/hydroelectric_generator.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "type": "forge:ore_shaped", - "pattern": [ - "uXY", - "pmp" - ], - "key": { - "X": { - "type": "forge:ore_dict", - "ore": "sprocket" - }, - "Y": { - "type": "forge:ore_dict", - "ore": "sprocket" - }, - "u": { - "type": "forge:ore_dict", - "ore": "PSU" - }, - "p": { - "type": "forge:ore_dict", - "ore": "plateSteel" - }, - "m": { - "type": "forge:ore_dict", - "ore": "frameSteel" - } - }, - "result": { - "item": "electricadvantage:hydroelectric_generator" - }, - "group": "electric_machines" -} diff --git a/src/main/resources/assets/electricadvantage/recipes/integrated_circuit_copper_normal.json b/src/main/resources/assets/electricadvantage/recipes/integrated_circuit_copper_normal.json deleted file mode 100644 index 9018708..0000000 --- a/src/main/resources/assets/electricadvantage/recipes/integrated_circuit_copper_normal.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "type": "forge:ore_shaped", - "pattern": [ - "sss", - "ccc" - ], - "key": { - "s": { - "type": "forge:ore_dict", - "ore": "ingotSilicon" - }, - "c": { - "type": "forge:ore_dict", - "ore": "nuggetCopper" - } - }, - "result": { - "item": "electricadvantage:integrated_circuit", - "count": 3 - }, - "conditions": [ - { - "type": "electricadvantage:recipe_mode", - "mode": "NORMAL" - } - ], - "group": "circuits" -} diff --git a/src/main/resources/assets/electricadvantage/recipes/integrated_circuit_copper_tech.json b/src/main/resources/assets/electricadvantage/recipes/integrated_circuit_copper_tech.json deleted file mode 100644 index 0af96f2..0000000 --- a/src/main/resources/assets/electricadvantage/recipes/integrated_circuit_copper_tech.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "type": "forge:ore_shaped", - "pattern": [ - "prp", - "sss", - "ccc" - ], - "key": { - "p": { - "type": "forge:ore_dict", - "ore": "plastic" - }, - "s": { - "type": "forge:ore_dict", - "ore": "ingotSilicon" - }, - "r": { - "type": "forge:ore_dict", - "ore": "dustRedstone" - }, - "c": { - "type": "forge:ore_dict", - "ore": "nuggetCopper" - } - }, - "result": { - "item": "electricadvantage:integrated_circuit", - "count": 3 - }, - "conditions": [ - { - "type": "electricadvantage:recipe_mode", - "mode": "TECH_PROGRESSION" - } - ], - "group": "circuits" -} diff --git a/src/main/resources/assets/electricadvantage/recipes/integrated_circuit_gold_normal.json b/src/main/resources/assets/electricadvantage/recipes/integrated_circuit_gold_normal.json deleted file mode 100644 index 2d255cd..0000000 --- a/src/main/resources/assets/electricadvantage/recipes/integrated_circuit_gold_normal.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "type": "forge:ore_shaped", - "pattern": [ - "sss", - "ccc" - ], - "key": { - "s": { - "type": "forge:ore_dict", - "ore": "ingotSilicon" - }, - "c": { - "type": "forge:ore_dict", - "ore": "nuggetGold" - } - }, - "result": { - "item": "electricadvantage:integrated_circuit", - "count": 3 - }, - "conditions": [ - { - "type": "electricadvantage:recipe_mode", - "mode": "NORMAL" - } - ], - "group": "circuits" -} diff --git a/src/main/resources/assets/electricadvantage/recipes/integrated_circuit_gold_tech.json b/src/main/resources/assets/electricadvantage/recipes/integrated_circuit_gold_tech.json deleted file mode 100644 index 96dfc27..0000000 --- a/src/main/resources/assets/electricadvantage/recipes/integrated_circuit_gold_tech.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "type": "forge:ore_shaped", - "pattern": [ - "prp", - "sss", - "ccc" - ], - "key": { - "p": { - "type": "forge:ore_dict", - "ore": "plastic" - }, - "s": { - "type": "forge:ore_dict", - "ore": "ingotSilicon" - }, - "r": { - "type": "forge:ore_dict", - "ore": "dustRedstone" - }, - "c": { - "type": "forge:ore_dict", - "ore": "nuggetGold" - } - }, - "result": { - "item": "electricadvantage:integrated_circuit", - "count": 3 - }, - "conditions": [ - { - "type": "electricadvantage:recipe_mode", - "mode": "TECH_PROGRESSION" - } - ], - "group": "circuits" -} diff --git a/src/main/resources/assets/electricadvantage/recipes/integrated_circuit_tin_normal.json b/src/main/resources/assets/electricadvantage/recipes/integrated_circuit_tin_normal.json deleted file mode 100644 index c910699..0000000 --- a/src/main/resources/assets/electricadvantage/recipes/integrated_circuit_tin_normal.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "type": "forge:ore_shaped", - "pattern": [ - "sss", - "ccc" - ], - "key": { - "s": { - "type": "forge:ore_dict", - "ore": "ingotSilicon" - }, - "c": { - "type": "forge:ore_dict", - "ore": "nuggetTin" - } - }, - "result": { - "item": "electricadvantage:integrated_circuit", - "count": 3 - }, - "conditions": [ - { - "type": "electricadvantage:recipe_mode", - "mode": "NORMAL" - } - ], - "group": "circuits" -} diff --git a/src/main/resources/assets/electricadvantage/recipes/integrated_circuit_tin_tech.json b/src/main/resources/assets/electricadvantage/recipes/integrated_circuit_tin_tech.json deleted file mode 100644 index 146943a..0000000 --- a/src/main/resources/assets/electricadvantage/recipes/integrated_circuit_tin_tech.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "type": "forge:ore_shaped", - "pattern": [ - "prp", - "sss", - "ccc" - ], - "key": { - "p": { - "type": "forge:ore_dict", - "ore": "plastic" - }, - "s": { - "type": "forge:ore_dict", - "ore": "ingotSilicon" - }, - "r": { - "type": "forge:ore_dict", - "ore": "dustRedstone" - }, - "c": { - "type": "forge:ore_dict", - "ore": "nuggetTin" - } - }, - "result": { - "item": "electricadvantage:integrated_circuit", - "count": 3 - }, - "conditions": [ - { - "type": "electricadvantage:recipe_mode", - "mode": "TECH_PROGRESSION" - } - ], - "group": "circuits" -} diff --git a/src/main/resources/assets/electricadvantage/recipes/laser_turret_diamond_emerald.json b/src/main/resources/assets/electricadvantage/recipes/laser_turret_diamond_emerald.json deleted file mode 100644 index 090e4d2..0000000 --- a/src/main/resources/assets/electricadvantage/recipes/laser_turret_diamond_emerald.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "type": "forge:ore_shaped", - "pattern": [ - "uXY", - "pmp" - ], - "key": { - "X": { - "type": "forge:ore_dict", - "ore": "gemDiamond" - }, - "Y": { - "type": "forge:ore_dict", - "ore": "gemEmerald" - }, - "u": { - "type": "forge:ore_dict", - "ore": "PSU" - }, - "p": { - "type": "forge:ore_dict", - "ore": "plateSteel" - }, - "m": { - "type": "forge:ore_dict", - "ore": "frameSteel" - } - }, - "result": { - "item": "electricadvantage:laser_turret" - }, - "group": "electric_machines" -} diff --git a/src/main/resources/assets/electricadvantage/recipes/laser_turret_emerald_diamond.json b/src/main/resources/assets/electricadvantage/recipes/laser_turret_emerald_diamond.json deleted file mode 100644 index 21fabf0..0000000 --- a/src/main/resources/assets/electricadvantage/recipes/laser_turret_emerald_diamond.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "type": "forge:ore_shaped", - "pattern": [ - "uXY", - "pmp" - ], - "key": { - "X": { - "type": "forge:ore_dict", - "ore": "gemEmerald" - }, - "Y": { - "type": "forge:ore_dict", - "ore": "gemDiamond" - }, - "u": { - "type": "forge:ore_dict", - "ore": "PSU" - }, - "p": { - "type": "forge:ore_dict", - "ore": "plateSteel" - }, - "m": { - "type": "forge:ore_dict", - "ore": "frameSteel" - } - }, - "result": { - "item": "electricadvantage:laser_turret" - }, - "group": "electric_machines" -} diff --git a/src/main/resources/assets/electricadvantage/recipes/lead_acid_battery_dust_sulfur.json b/src/main/resources/assets/electricadvantage/recipes/lead_acid_battery_dust_sulfur.json deleted file mode 100644 index 24e0bf9..0000000 --- a/src/main/resources/assets/electricadvantage/recipes/lead_acid_battery_dust_sulfur.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "type": "forge:ore_shaped", - "pattern": [ - "pXp", - "pYp", - "pZp" - ], - "key": { - "X": { - "type": "forge:ore_dict", - "ore": "ingotLead" - }, - "Y": { - "type": "forge:ore_dict", - "ore": "dustSulfur" - }, - "Z": { - "item": "minecraft:water_bucket" - }, - "p": { - "type": "forge:ore_dict", - "ore": "plastic" - } - }, - "result": { - "item": "electricadvantage:lead_acid_battery" - }, - "group": "batteries" -} diff --git a/src/main/resources/assets/electricadvantage/recipes/lead_acid_battery_sulfur.json b/src/main/resources/assets/electricadvantage/recipes/lead_acid_battery_sulfur.json deleted file mode 100644 index 9ef3f32..0000000 --- a/src/main/resources/assets/electricadvantage/recipes/lead_acid_battery_sulfur.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "type": "forge:ore_shaped", - "pattern": [ - "pXp", - "pYp", - "pZp" - ], - "key": { - "X": { - "type": "forge:ore_dict", - "ore": "ingotLead" - }, - "Y": { - "type": "forge:ore_dict", - "ore": "sulfur" - }, - "Z": { - "item": "minecraft:water_bucket" - }, - "p": { - "type": "forge:ore_dict", - "ore": "plastic" - } - }, - "result": { - "item": "electricadvantage:lead_acid_battery" - }, - "group": "batteries" -} diff --git a/src/main/resources/assets/electricadvantage/recipes/led_bar.json b/src/main/resources/assets/electricadvantage/recipes/led_bar.json deleted file mode 100644 index 0614e31..0000000 --- a/src/main/resources/assets/electricadvantage/recipes/led_bar.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "type": "forge:ore_shaped", - "pattern": [ - "ggg", - "xxx", - "ccc" - ], - "key": { - "g": { - "type": "forge:ore_dict", - "ore": "paneGlass" - }, - "x": { - "type": "forge:ore_dict", - "ore": "microchip" - }, - "c": { - "type": "forge:ore_dict", - "ore": "wire" - } - }, - "result": { - "item": "electricadvantage:led_bar", - "count": 3 - }, - "group": "parts" -} diff --git a/src/main/resources/assets/electricadvantage/recipes/lithium_battery.json b/src/main/resources/assets/electricadvantage/recipes/lithium_battery.json deleted file mode 100644 index a25c27f..0000000 --- a/src/main/resources/assets/electricadvantage/recipes/lithium_battery.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "type": "forge:ore_shaped", - "pattern": [ - "pXp", - "pYp", - "pZp" - ], - "key": { - "X": { - "type": "forge:ore_dict", - "ore": "ingotLithium" - }, - "Y": { - "type": "forge:ore_dict", - "ore": "dustRedstone" - }, - "Z": { - "type": "forge:ore_dict", - "ore": "dustCarbon" - }, - "p": { - "type": "forge:ore_dict", - "ore": "plastic" - } - }, - "result": { - "item": "electricadvantage:lithium_battery" - }, - "group": "batteries" -} diff --git a/src/main/resources/assets/electricadvantage/recipes/nickel_hydride_battery.json b/src/main/resources/assets/electricadvantage/recipes/nickel_hydride_battery.json deleted file mode 100644 index b1930c1..0000000 --- a/src/main/resources/assets/electricadvantage/recipes/nickel_hydride_battery.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "type": "forge:ore_shaped", - "pattern": [ - "pXp", - "pYp", - "pZp" - ], - "key": { - "X": { - "type": "forge:ore_dict", - "ore": "ingotNickel" - }, - "Y": { - "type": "forge:ore_dict", - "ore": "dustRedstone" - }, - "Z": { - "item": "minecraft:water_bucket" - }, - "p": { - "type": "forge:ore_dict", - "ore": "plastic" - } - }, - "result": { - "item": "electricadvantage:nickel_hydride_battery" - }, - "group": "batteries" -} diff --git a/src/main/resources/assets/electricadvantage/recipes/photovoltaic_generator.json b/src/main/resources/assets/electricadvantage/recipes/photovoltaic_generator.json deleted file mode 100644 index c01ab47..0000000 --- a/src/main/resources/assets/electricadvantage/recipes/photovoltaic_generator.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "type": "forge:ore_shaped", - "pattern": [ - "ggg", - "sss", - "wuw" - ], - "key": { - "g": { - "type": "forge:ore_dict", - "ore": "paneGlass" - }, - "s": { - "type": "forge:ore_dict", - "ore": "ingotSilicon" - }, - "w": { - "type": "forge:ore_dict", - "ore": "wire" - }, - "u": { - "type": "forge:ore_dict", - "ore": "PSU" - } - }, - "result": { - "item": "electricadvantage:photovoltaic_generator" - }, - "conditions": [ - { - "type": "electricadvantage:not_recipe_mode", - "mode": "APOCALYPTIC" - } - ], - "group": "electric_machines" -} diff --git a/src/main/resources/assets/electricadvantage/recipes/plastic_refinery.json b/src/main/resources/assets/electricadvantage/recipes/plastic_refinery.json deleted file mode 100644 index aa86503..0000000 --- a/src/main/resources/assets/electricadvantage/recipes/plastic_refinery.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "type": "forge:ore_shaped", - "pattern": [ - "uXY", - "pmp" - ], - "key": { - "X": { - "item": "minecraft:piston" - }, - "Y": { - "type": "forge:ore_dict", - "ore": "sprocket" - }, - "u": { - "type": "forge:ore_dict", - "ore": "PSU" - }, - "p": { - "type": "forge:ore_dict", - "ore": "plateSteel" - }, - "m": { - "type": "forge:ore_dict", - "ore": "frameSteel" - } - }, - "result": { - "item": "electricadvantage:plastic_refinery" - }, - "group": "electric_machines" -} diff --git a/src/main/resources/assets/electricadvantage/recipes/power_supply_unit_iron_normal.json b/src/main/resources/assets/electricadvantage/recipes/power_supply_unit_iron_normal.json deleted file mode 100644 index 7f0eab6..0000000 --- a/src/main/resources/assets/electricadvantage/recipes/power_supply_unit_iron_normal.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "type": "forge:ore_shaped", - "pattern": [ - "wcw", - " s " - ], - "key": { - "w": { - "type": "forge:ore_dict", - "ore": "wire" - }, - "c": { - "type": "forge:ore_dict", - "ore": "circuitBoard" - }, - "s": { - "type": "forge:ore_dict", - "ore": "ingotIron" - } - }, - "result": { - "item": "electricadvantage:psu" - }, - "conditions": [ - { - "type": "electricadvantage:recipe_mode", - "mode": "NORMAL" - } - ], - "group": "circuits" -} diff --git a/src/main/resources/assets/electricadvantage/recipes/power_supply_unit_plate_steel_apocalyptic.json b/src/main/resources/assets/electricadvantage/recipes/power_supply_unit_plate_steel_apocalyptic.json deleted file mode 100644 index 47f232a..0000000 --- a/src/main/resources/assets/electricadvantage/recipes/power_supply_unit_plate_steel_apocalyptic.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "type": "forge:ore_shaped", - "pattern": [ - "wcw", - " s " - ], - "key": { - "w": { - "type": "forge:ore_dict", - "ore": "wire" - }, - "c": { - "type": "forge:ore_dict", - "ore": "circuitBoard" - }, - "s": { - "type": "forge:ore_dict", - "ore": "plateSteel" - } - }, - "result": { - "item": "electricadvantage:psu" - }, - "conditions": [ - { - "type": "electricadvantage:recipe_mode", - "mode": "APOCALYPTIC" - } - ], - "group": "circuits" -} diff --git a/src/main/resources/assets/electricadvantage/recipes/power_supply_unit_plate_steel_tech.json b/src/main/resources/assets/electricadvantage/recipes/power_supply_unit_plate_steel_tech.json deleted file mode 100644 index b999337..0000000 --- a/src/main/resources/assets/electricadvantage/recipes/power_supply_unit_plate_steel_tech.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "type": "forge:ore_shaped", - "pattern": [ - "wcw", - " s " - ], - "key": { - "w": { - "type": "forge:ore_dict", - "ore": "wire" - }, - "c": { - "type": "forge:ore_dict", - "ore": "circuitBoard" - }, - "s": { - "type": "forge:ore_dict", - "ore": "plateSteel" - } - }, - "result": { - "item": "electricadvantage:psu" - }, - "conditions": [ - { - "type": "electricadvantage:recipe_mode", - "mode": "TECH_PROGRESSION" - } - ], - "group": "circuits" -} diff --git a/src/main/resources/assets/electricadvantage/recipes/power_supply_unit_steel_normal.json b/src/main/resources/assets/electricadvantage/recipes/power_supply_unit_steel_normal.json deleted file mode 100644 index f3466cb..0000000 --- a/src/main/resources/assets/electricadvantage/recipes/power_supply_unit_steel_normal.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "type": "forge:ore_shaped", - "pattern": [ - "wcw", - " s " - ], - "key": { - "w": { - "type": "forge:ore_dict", - "ore": "wire" - }, - "c": { - "type": "forge:ore_dict", - "ore": "circuitBoard" - }, - "s": { - "type": "forge:ore_dict", - "ore": "ingotSteel" - } - }, - "result": { - "item": "electricadvantage:psu" - }, - "conditions": [ - { - "type": "electricadvantage:recipe_mode", - "mode": "NORMAL" - } - ], - "group": "circuits" -} diff --git a/src/main/resources/assets/electricadvantage/recipes/silicon_blend.json b/src/main/resources/assets/electricadvantage/recipes/silicon_blend.json deleted file mode 100644 index eab9630..0000000 --- a/src/main/resources/assets/electricadvantage/recipes/silicon_blend.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "type": "forge:ore_shapeless", - "ingredients": [ - { - "type": "forge:ore_dict", - "ore": "sand" - }, - { - "type": "forge:ore_dict", - "ore": "dustCarbon" - } - ], - "result": { - "item": "electricadvantage:silicon_mix" - }, - "group": "materials" -} diff --git a/src/main/resources/assets/electricadvantage/recipes/solder_blend_tin_lead.json b/src/main/resources/assets/electricadvantage/recipes/solder_blend_tin_lead.json deleted file mode 100644 index 430da7f..0000000 --- a/src/main/resources/assets/electricadvantage/recipes/solder_blend_tin_lead.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "type": "forge:ore_shapeless", - "ingredients": [ - { - "type": "forge:ore_dict", - "ore": "dustTin" - }, - { - "type": "forge:ore_dict", - "ore": "dustTin" - }, - { - "type": "forge:ore_dict", - "ore": "dustLead" - } - ], - "result": { - "item": "electricadvantage:solder_mix", - "count": 3 - }, - "group": "materials" -} diff --git a/src/main/resources/assets/electricadvantage/recipes/solder_blend_tin_silver.json b/src/main/resources/assets/electricadvantage/recipes/solder_blend_tin_silver.json deleted file mode 100644 index 3672d8f..0000000 --- a/src/main/resources/assets/electricadvantage/recipes/solder_blend_tin_silver.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "type": "forge:ore_shapeless", - "ingredients": [ - { - "type": "forge:ore_dict", - "ore": "dustTin" - }, - { - "type": "forge:ore_dict", - "ore": "dustTin" - }, - { - "type": "forge:ore_dict", - "ore": "dustSilver" - } - ], - "result": { - "item": "electricadvantage:solder_mix", - "count": 3 - }, - "group": "materials" -} diff --git a/src/main/resources/assets/electricadvantage/recipes/steam_powered_generator.json b/src/main/resources/assets/electricadvantage/recipes/steam_powered_generator.json deleted file mode 100644 index 39dc238..0000000 --- a/src/main/resources/assets/electricadvantage/recipes/steam_powered_generator.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "type": "forge:ore_shaped", - "pattern": [ - "uXY", - "pmp" - ], - "key": { - "X": { - "type": "forge:ore_dict", - "ore": "conduitSteam" - }, - "Y": { - "type": "forge:ore_dict", - "ore": "governor" - }, - "u": { - "type": "forge:ore_dict", - "ore": "PSU" - }, - "p": { - "type": "forge:ore_dict", - "ore": "plateSteel" - }, - "m": { - "type": "forge:ore_dict", - "ore": "frameSteel" - } - }, - "result": { - "item": "electricadvantage:steam_powered_generator" - }, - "group": "electric_machines" -} diff --git a/src/main/resources/data/electricadvantage/advancements/recipes/alkaline_battery.json b/src/main/resources/data/electricadvantage/advancements/recipes/alkaline_battery.json new file mode 100644 index 0000000..262ad40 --- /dev/null +++ b/src/main/resources/data/electricadvantage/advancements/recipes/alkaline_battery.json @@ -0,0 +1,65 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_ingredient_1": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:ingots/iron" + } + ] + } + }, + "has_ingredient_2": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "item": "minecraft:gunpowder" + } + ] + } + }, + "has_ingredient_3": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:ingots/zinc" + } + ] + } + }, + "has_ingredient_4": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:plastic" + } + ] + } + }, + "has_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "electricadvantage:alkaline_battery" + } + } + }, + "requirements": [ + [ + "has_ingredient_1", + "has_ingredient_2", + "has_ingredient_3", + "has_ingredient_4", + "has_recipe" + ] + ], + "rewards": { + "recipes": [ + "electricadvantage:alkaline_battery" + ] + } +} diff --git a/src/main/resources/data/electricadvantage/advancements/recipes/blank_circuit_board_ingot_normal.json b/src/main/resources/data/electricadvantage/advancements/recipes/blank_circuit_board_ingot_normal.json new file mode 100644 index 0000000..ef89620 --- /dev/null +++ b/src/main/resources/data/electricadvantage/advancements/recipes/blank_circuit_board_ingot_normal.json @@ -0,0 +1,43 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_ingredient_1": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:plastic" + } + ] + } + }, + "has_ingredient_2": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:ingots/copper" + } + ] + } + }, + "has_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "electricadvantage:blank_circuit_board_ingot_normal" + } + } + }, + "requirements": [ + [ + "has_ingredient_1", + "has_ingredient_2", + "has_recipe" + ] + ], + "rewards": { + "recipes": [ + "electricadvantage:blank_circuit_board_ingot_normal" + ] + } +} diff --git a/src/main/resources/data/electricadvantage/advancements/recipes/blank_circuit_board_plate.json b/src/main/resources/data/electricadvantage/advancements/recipes/blank_circuit_board_plate.json new file mode 100644 index 0000000..0ac9a97 --- /dev/null +++ b/src/main/resources/data/electricadvantage/advancements/recipes/blank_circuit_board_plate.json @@ -0,0 +1,43 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_ingredient_1": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:plastic" + } + ] + } + }, + "has_ingredient_2": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:plates/copper" + } + ] + } + }, + "has_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "electricadvantage:blank_circuit_board_plate" + } + } + }, + "requirements": [ + [ + "has_ingredient_1", + "has_ingredient_2", + "has_recipe" + ] + ], + "rewards": { + "recipes": [ + "electricadvantage:blank_circuit_board_plate" + ] + } +} diff --git a/src/main/resources/data/electricadvantage/advancements/recipes/control_circuit.json b/src/main/resources/data/electricadvantage/advancements/recipes/control_circuit.json new file mode 100644 index 0000000..ac2170b --- /dev/null +++ b/src/main/resources/data/electricadvantage/advancements/recipes/control_circuit.json @@ -0,0 +1,54 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_ingredient_1": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "item": "electricadvantage:blank_circuit_board" + } + ] + } + }, + "has_ingredient_2": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:microchips" + } + ] + } + }, + "has_ingredient_3": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:solder" + } + ] + } + }, + "has_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "electricadvantage:control_circuit" + } + } + }, + "requirements": [ + [ + "has_ingredient_1", + "has_ingredient_2", + "has_ingredient_3", + "has_recipe" + ] + ], + "rewards": { + "recipes": [ + "electricadvantage:control_circuit" + ] + } +} diff --git a/src/main/resources/data/electricadvantage/advancements/recipes/electric_battery_array.json b/src/main/resources/data/electricadvantage/advancements/recipes/electric_battery_array.json new file mode 100644 index 0000000..aab8cf7 --- /dev/null +++ b/src/main/resources/data/electricadvantage/advancements/recipes/electric_battery_array.json @@ -0,0 +1,65 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_ingredient_1": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "item": "minecraft:chest" + } + ] + } + }, + "has_ingredient_2": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:power_supply_units" + } + ] + } + }, + "has_ingredient_3": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:plates/steel" + } + ] + } + }, + "has_ingredient_4": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:frames/steel" + } + ] + } + }, + "has_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "electricadvantage:electric_battery_array" + } + } + }, + "requirements": [ + [ + "has_ingredient_1", + "has_ingredient_2", + "has_ingredient_3", + "has_ingredient_4", + "has_recipe" + ] + ], + "rewards": { + "recipes": [ + "electricadvantage:electric_battery_array" + ] + } +} diff --git a/src/main/resources/data/electricadvantage/advancements/recipes/electric_conduit_plastic_ingot.json b/src/main/resources/data/electricadvantage/advancements/recipes/electric_conduit_plastic_ingot.json new file mode 100644 index 0000000..71d3f2f --- /dev/null +++ b/src/main/resources/data/electricadvantage/advancements/recipes/electric_conduit_plastic_ingot.json @@ -0,0 +1,43 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_ingredient_1": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:plastic" + } + ] + } + }, + "has_ingredient_2": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:ingots/copper" + } + ] + } + }, + "has_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "electricadvantage:electric_conduit_plastic_ingot" + } + } + }, + "requirements": [ + [ + "has_ingredient_1", + "has_ingredient_2", + "has_recipe" + ] + ], + "rewards": { + "recipes": [ + "electricadvantage:electric_conduit_plastic_ingot" + ] + } +} diff --git a/src/main/resources/data/electricadvantage/advancements/recipes/electric_conduit_plastic_rod.json b/src/main/resources/data/electricadvantage/advancements/recipes/electric_conduit_plastic_rod.json new file mode 100644 index 0000000..1113778 --- /dev/null +++ b/src/main/resources/data/electricadvantage/advancements/recipes/electric_conduit_plastic_rod.json @@ -0,0 +1,43 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_ingredient_1": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:plastic" + } + ] + } + }, + "has_ingredient_2": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:rods/copper" + } + ] + } + }, + "has_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "electricadvantage:electric_conduit_plastic_rod" + } + } + }, + "requirements": [ + [ + "has_ingredient_1", + "has_ingredient_2", + "has_recipe" + ] + ], + "rewards": { + "recipes": [ + "electricadvantage:electric_conduit_plastic_rod" + ] + } +} diff --git a/src/main/resources/data/electricadvantage/advancements/recipes/electric_conduit_rubber_ingot.json b/src/main/resources/data/electricadvantage/advancements/recipes/electric_conduit_rubber_ingot.json new file mode 100644 index 0000000..34e1308 --- /dev/null +++ b/src/main/resources/data/electricadvantage/advancements/recipes/electric_conduit_rubber_ingot.json @@ -0,0 +1,43 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_ingredient_1": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:rubber" + } + ] + } + }, + "has_ingredient_2": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:ingots/copper" + } + ] + } + }, + "has_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "electricadvantage:electric_conduit_rubber_ingot" + } + } + }, + "requirements": [ + [ + "has_ingredient_1", + "has_ingredient_2", + "has_recipe" + ] + ], + "rewards": { + "recipes": [ + "electricadvantage:electric_conduit_rubber_ingot" + ] + } +} diff --git a/src/main/resources/data/electricadvantage/advancements/recipes/electric_conduit_rubber_rod.json b/src/main/resources/data/electricadvantage/advancements/recipes/electric_conduit_rubber_rod.json new file mode 100644 index 0000000..02ebcf7 --- /dev/null +++ b/src/main/resources/data/electricadvantage/advancements/recipes/electric_conduit_rubber_rod.json @@ -0,0 +1,43 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_ingredient_1": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:rubber" + } + ] + } + }, + "has_ingredient_2": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:rods/copper" + } + ] + } + }, + "has_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "electricadvantage:electric_conduit_rubber_rod" + } + } + }, + "requirements": [ + [ + "has_ingredient_1", + "has_ingredient_2", + "has_recipe" + ] + ], + "rewards": { + "recipes": [ + "electricadvantage:electric_conduit_rubber_rod" + ] + } +} diff --git a/src/main/resources/data/electricadvantage/advancements/recipes/electric_crusher.json b/src/main/resources/data/electricadvantage/advancements/recipes/electric_crusher.json new file mode 100644 index 0000000..3c6d550 --- /dev/null +++ b/src/main/resources/data/electricadvantage/advancements/recipes/electric_crusher.json @@ -0,0 +1,76 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_ingredient_1": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:sprockets" + } + ] + } + }, + "has_ingredient_2": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:gems/diamond" + } + ] + } + }, + "has_ingredient_3": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:power_supply_units" + } + ] + } + }, + "has_ingredient_4": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:plates/steel" + } + ] + } + }, + "has_ingredient_5": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:frames/steel" + } + ] + } + }, + "has_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "electricadvantage:electric_crusher" + } + } + }, + "requirements": [ + [ + "has_ingredient_1", + "has_ingredient_2", + "has_ingredient_3", + "has_ingredient_4", + "has_ingredient_5", + "has_recipe" + ] + ], + "rewards": { + "recipes": [ + "electricadvantage:electric_crusher" + ] + } +} diff --git a/src/main/resources/data/electricadvantage/advancements/recipes/electric_drill.json b/src/main/resources/data/electricadvantage/advancements/recipes/electric_drill.json new file mode 100644 index 0000000..23a9e46 --- /dev/null +++ b/src/main/resources/data/electricadvantage/advancements/recipes/electric_drill.json @@ -0,0 +1,65 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_ingredient_1": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:storage_blocks/diamond" + } + ] + } + }, + "has_ingredient_2": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:power_supply_units" + } + ] + } + }, + "has_ingredient_3": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:plates/steel" + } + ] + } + }, + "has_ingredient_4": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:frames/steel" + } + ] + } + }, + "has_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "electricadvantage:electric_drill" + } + } + }, + "requirements": [ + [ + "has_ingredient_1", + "has_ingredient_2", + "has_ingredient_3", + "has_ingredient_4", + "has_recipe" + ] + ], + "rewards": { + "recipes": [ + "electricadvantage:electric_drill" + ] + } +} diff --git a/src/main/resources/data/electricadvantage/advancements/recipes/electric_fabricator.json b/src/main/resources/data/electricadvantage/advancements/recipes/electric_fabricator.json new file mode 100644 index 0000000..e811829 --- /dev/null +++ b/src/main/resources/data/electricadvantage/advancements/recipes/electric_fabricator.json @@ -0,0 +1,65 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_ingredient_1": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "item": "minecraft:crafting_table" + } + ] + } + }, + "has_ingredient_2": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:power_supply_units" + } + ] + } + }, + "has_ingredient_3": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:plates/steel" + } + ] + } + }, + "has_ingredient_4": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:frames/steel" + } + ] + } + }, + "has_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "electricadvantage:electric_fabricator" + } + } + }, + "requirements": [ + [ + "has_ingredient_1", + "has_ingredient_2", + "has_ingredient_3", + "has_ingredient_4", + "has_recipe" + ] + ], + "rewards": { + "recipes": [ + "electricadvantage:electric_fabricator" + ] + } +} diff --git a/src/main/resources/data/electricadvantage/advancements/recipes/electric_furnace.json b/src/main/resources/data/electricadvantage/advancements/recipes/electric_furnace.json new file mode 100644 index 0000000..e85ea1e --- /dev/null +++ b/src/main/resources/data/electricadvantage/advancements/recipes/electric_furnace.json @@ -0,0 +1,43 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_ingredient_1": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "item": "minecraft:bricks" + } + ] + } + }, + "has_ingredient_2": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:power_supply_units" + } + ] + } + }, + "has_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "electricadvantage:electric_furnace" + } + } + }, + "requirements": [ + [ + "has_ingredient_1", + "has_ingredient_2", + "has_recipe" + ] + ], + "rewards": { + "recipes": [ + "electricadvantage:electric_furnace" + ] + } +} diff --git a/src/main/resources/data/electricadvantage/advancements/recipes/electric_oven.json b/src/main/resources/data/electricadvantage/advancements/recipes/electric_oven.json new file mode 100644 index 0000000..97f423d --- /dev/null +++ b/src/main/resources/data/electricadvantage/advancements/recipes/electric_oven.json @@ -0,0 +1,65 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_ingredient_1": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:glass_panes" + } + ] + } + }, + "has_ingredient_2": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:power_supply_units" + } + ] + } + }, + "has_ingredient_3": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:plates/steel" + } + ] + } + }, + "has_ingredient_4": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:frames/steel" + } + ] + } + }, + "has_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "electricadvantage:electric_oven" + } + } + }, + "requirements": [ + [ + "has_ingredient_1", + "has_ingredient_2", + "has_ingredient_3", + "has_ingredient_4", + "has_recipe" + ] + ], + "rewards": { + "recipes": [ + "electricadvantage:electric_oven" + ] + } +} diff --git a/src/main/resources/data/electricadvantage/advancements/recipes/electric_pump.json b/src/main/resources/data/electricadvantage/advancements/recipes/electric_pump.json new file mode 100644 index 0000000..53acf4d --- /dev/null +++ b/src/main/resources/data/electricadvantage/advancements/recipes/electric_pump.json @@ -0,0 +1,76 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_ingredient_1": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "item": "minecraft:piston" + } + ] + } + }, + "has_ingredient_2": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "item": "minecraft:bucket" + } + ] + } + }, + "has_ingredient_3": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:power_supply_units" + } + ] + } + }, + "has_ingredient_4": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:plates/steel" + } + ] + } + }, + "has_ingredient_5": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:frames/steel" + } + ] + } + }, + "has_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "electricadvantage:electric_pump" + } + } + }, + "requirements": [ + [ + "has_ingredient_1", + "has_ingredient_2", + "has_ingredient_3", + "has_ingredient_4", + "has_ingredient_5", + "has_recipe" + ] + ], + "rewards": { + "recipes": [ + "electricadvantage:electric_pump" + ] + } +} diff --git a/src/main/resources/data/electricadvantage/advancements/recipes/electric_still.json b/src/main/resources/data/electricadvantage/advancements/recipes/electric_still.json new file mode 100644 index 0000000..91639e9 --- /dev/null +++ b/src/main/resources/data/electricadvantage/advancements/recipes/electric_still.json @@ -0,0 +1,65 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_ingredient_1": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "item": "minecraft:bucket" + } + ] + } + }, + "has_ingredient_2": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:power_supply_units" + } + ] + } + }, + "has_ingredient_3": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:plates/steel" + } + ] + } + }, + "has_ingredient_4": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:frames/steel" + } + ] + } + }, + "has_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "electricadvantage:electric_still" + } + } + }, + "requirements": [ + [ + "has_ingredient_1", + "has_ingredient_2", + "has_ingredient_3", + "has_ingredient_4", + "has_recipe" + ] + ], + "rewards": { + "recipes": [ + "electricadvantage:electric_still" + ] + } +} diff --git a/src/main/resources/data/electricadvantage/advancements/recipes/electric_switch.json b/src/main/resources/data/electricadvantage/advancements/recipes/electric_switch.json new file mode 100644 index 0000000..4aac598 --- /dev/null +++ b/src/main/resources/data/electricadvantage/advancements/recipes/electric_switch.json @@ -0,0 +1,54 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_ingredient_1": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "item": "minecraft:lever" + } + ] + } + }, + "has_ingredient_2": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:wires" + } + ] + } + }, + "has_ingredient_3": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:frames/steel" + } + ] + } + }, + "has_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "electricadvantage:electric_switch" + } + } + }, + "requirements": [ + [ + "has_ingredient_1", + "has_ingredient_2", + "has_ingredient_3", + "has_recipe" + ] + ], + "rewards": { + "recipes": [ + "electricadvantage:electric_switch" + ] + } +} diff --git a/src/main/resources/data/electricadvantage/advancements/recipes/electric_track.json b/src/main/resources/data/electricadvantage/advancements/recipes/electric_track.json new file mode 100644 index 0000000..0d1995d --- /dev/null +++ b/src/main/resources/data/electricadvantage/advancements/recipes/electric_track.json @@ -0,0 +1,43 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_ingredient_1": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "item": "electricadvantage:electric_conduit" + } + ] + } + }, + "has_ingredient_2": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "item": "poweradvantage:steel_frame" + } + ] + } + }, + "has_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "electricadvantage:electric_track" + } + } + }, + "requirements": [ + [ + "has_ingredient_1", + "has_ingredient_2", + "has_recipe" + ] + ], + "rewards": { + "recipes": [ + "electricadvantage:electric_track" + ] + } +} diff --git a/src/main/resources/data/electricadvantage/advancements/recipes/growth_chamber.json b/src/main/resources/data/electricadvantage/advancements/recipes/growth_chamber.json new file mode 100644 index 0000000..b5617b1 --- /dev/null +++ b/src/main/resources/data/electricadvantage/advancements/recipes/growth_chamber.json @@ -0,0 +1,76 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_ingredient_1": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "item": "minecraft:flower_pot" + } + ] + } + }, + "has_ingredient_2": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:microchips" + } + ] + } + }, + "has_ingredient_3": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:power_supply_units" + } + ] + } + }, + "has_ingredient_4": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:plates/steel" + } + ] + } + }, + "has_ingredient_5": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:frames/steel" + } + ] + } + }, + "has_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "electricadvantage:growth_chamber" + } + } + }, + "requirements": [ + [ + "has_ingredient_1", + "has_ingredient_2", + "has_ingredient_3", + "has_ingredient_4", + "has_ingredient_5", + "has_recipe" + ] + ], + "rewards": { + "recipes": [ + "electricadvantage:growth_chamber" + ] + } +} diff --git a/src/main/resources/data/electricadvantage/advancements/recipes/growth_chamber_controller.json b/src/main/resources/data/electricadvantage/advancements/recipes/growth_chamber_controller.json new file mode 100644 index 0000000..c3f9817 --- /dev/null +++ b/src/main/resources/data/electricadvantage/advancements/recipes/growth_chamber_controller.json @@ -0,0 +1,76 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_ingredient_1": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "item": "minecraft:flower_pot" + } + ] + } + }, + "has_ingredient_2": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:circuit_boards" + } + ] + } + }, + "has_ingredient_3": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:power_supply_units" + } + ] + } + }, + "has_ingredient_4": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:plates/steel" + } + ] + } + }, + "has_ingredient_5": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:frames/steel" + } + ] + } + }, + "has_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "electricadvantage:growth_chamber_controller" + } + } + }, + "requirements": [ + [ + "has_ingredient_1", + "has_ingredient_2", + "has_ingredient_3", + "has_ingredient_4", + "has_ingredient_5", + "has_recipe" + ] + ], + "rewards": { + "recipes": [ + "electricadvantage:growth_chamber_controller" + ] + } +} diff --git a/src/main/resources/data/electricadvantage/advancements/recipes/hydroelectric_generator.json b/src/main/resources/data/electricadvantage/advancements/recipes/hydroelectric_generator.json new file mode 100644 index 0000000..fc59a9d --- /dev/null +++ b/src/main/resources/data/electricadvantage/advancements/recipes/hydroelectric_generator.json @@ -0,0 +1,65 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_ingredient_1": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:sprockets" + } + ] + } + }, + "has_ingredient_2": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:power_supply_units" + } + ] + } + }, + "has_ingredient_3": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:plates/steel" + } + ] + } + }, + "has_ingredient_4": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:frames/steel" + } + ] + } + }, + "has_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "electricadvantage:hydroelectric_generator" + } + } + }, + "requirements": [ + [ + "has_ingredient_1", + "has_ingredient_2", + "has_ingredient_3", + "has_ingredient_4", + "has_recipe" + ] + ], + "rewards": { + "recipes": [ + "electricadvantage:hydroelectric_generator" + ] + } +} diff --git a/src/main/resources/data/electricadvantage/advancements/recipes/integrated_circuit_copper_normal.json b/src/main/resources/data/electricadvantage/advancements/recipes/integrated_circuit_copper_normal.json new file mode 100644 index 0000000..8327834 --- /dev/null +++ b/src/main/resources/data/electricadvantage/advancements/recipes/integrated_circuit_copper_normal.json @@ -0,0 +1,43 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_ingredient_1": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:ingots/silicon" + } + ] + } + }, + "has_ingredient_2": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:nuggets/copper" + } + ] + } + }, + "has_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "electricadvantage:integrated_circuit_copper_normal" + } + } + }, + "requirements": [ + [ + "has_ingredient_1", + "has_ingredient_2", + "has_recipe" + ] + ], + "rewards": { + "recipes": [ + "electricadvantage:integrated_circuit_copper_normal" + ] + } +} diff --git a/src/main/resources/data/electricadvantage/advancements/recipes/integrated_circuit_copper_tech.json b/src/main/resources/data/electricadvantage/advancements/recipes/integrated_circuit_copper_tech.json new file mode 100644 index 0000000..fa1b4cd --- /dev/null +++ b/src/main/resources/data/electricadvantage/advancements/recipes/integrated_circuit_copper_tech.json @@ -0,0 +1,65 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_ingredient_1": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:plastic" + } + ] + } + }, + "has_ingredient_2": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:ingots/silicon" + } + ] + } + }, + "has_ingredient_3": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:dusts/redstone" + } + ] + } + }, + "has_ingredient_4": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:nuggets/copper" + } + ] + } + }, + "has_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "electricadvantage:integrated_circuit_copper_tech" + } + } + }, + "requirements": [ + [ + "has_ingredient_1", + "has_ingredient_2", + "has_ingredient_3", + "has_ingredient_4", + "has_recipe" + ] + ], + "rewards": { + "recipes": [ + "electricadvantage:integrated_circuit_copper_tech" + ] + } +} diff --git a/src/main/resources/data/electricadvantage/advancements/recipes/integrated_circuit_gold_normal.json b/src/main/resources/data/electricadvantage/advancements/recipes/integrated_circuit_gold_normal.json new file mode 100644 index 0000000..dc62986 --- /dev/null +++ b/src/main/resources/data/electricadvantage/advancements/recipes/integrated_circuit_gold_normal.json @@ -0,0 +1,43 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_ingredient_1": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:ingots/silicon" + } + ] + } + }, + "has_ingredient_2": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:nuggets/gold" + } + ] + } + }, + "has_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "electricadvantage:integrated_circuit_gold_normal" + } + } + }, + "requirements": [ + [ + "has_ingredient_1", + "has_ingredient_2", + "has_recipe" + ] + ], + "rewards": { + "recipes": [ + "electricadvantage:integrated_circuit_gold_normal" + ] + } +} diff --git a/src/main/resources/data/electricadvantage/advancements/recipes/integrated_circuit_gold_tech.json b/src/main/resources/data/electricadvantage/advancements/recipes/integrated_circuit_gold_tech.json new file mode 100644 index 0000000..ee1d711 --- /dev/null +++ b/src/main/resources/data/electricadvantage/advancements/recipes/integrated_circuit_gold_tech.json @@ -0,0 +1,65 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_ingredient_1": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:plastic" + } + ] + } + }, + "has_ingredient_2": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:ingots/silicon" + } + ] + } + }, + "has_ingredient_3": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:dusts/redstone" + } + ] + } + }, + "has_ingredient_4": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:nuggets/gold" + } + ] + } + }, + "has_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "electricadvantage:integrated_circuit_gold_tech" + } + } + }, + "requirements": [ + [ + "has_ingredient_1", + "has_ingredient_2", + "has_ingredient_3", + "has_ingredient_4", + "has_recipe" + ] + ], + "rewards": { + "recipes": [ + "electricadvantage:integrated_circuit_gold_tech" + ] + } +} diff --git a/src/main/resources/data/electricadvantage/advancements/recipes/integrated_circuit_tin_normal.json b/src/main/resources/data/electricadvantage/advancements/recipes/integrated_circuit_tin_normal.json new file mode 100644 index 0000000..b67d971 --- /dev/null +++ b/src/main/resources/data/electricadvantage/advancements/recipes/integrated_circuit_tin_normal.json @@ -0,0 +1,43 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_ingredient_1": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:ingots/silicon" + } + ] + } + }, + "has_ingredient_2": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:nuggets/tin" + } + ] + } + }, + "has_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "electricadvantage:integrated_circuit_tin_normal" + } + } + }, + "requirements": [ + [ + "has_ingredient_1", + "has_ingredient_2", + "has_recipe" + ] + ], + "rewards": { + "recipes": [ + "electricadvantage:integrated_circuit_tin_normal" + ] + } +} diff --git a/src/main/resources/data/electricadvantage/advancements/recipes/integrated_circuit_tin_tech.json b/src/main/resources/data/electricadvantage/advancements/recipes/integrated_circuit_tin_tech.json new file mode 100644 index 0000000..a234004 --- /dev/null +++ b/src/main/resources/data/electricadvantage/advancements/recipes/integrated_circuit_tin_tech.json @@ -0,0 +1,65 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_ingredient_1": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:plastic" + } + ] + } + }, + "has_ingredient_2": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:ingots/silicon" + } + ] + } + }, + "has_ingredient_3": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:dusts/redstone" + } + ] + } + }, + "has_ingredient_4": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:nuggets/tin" + } + ] + } + }, + "has_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "electricadvantage:integrated_circuit_tin_tech" + } + } + }, + "requirements": [ + [ + "has_ingredient_1", + "has_ingredient_2", + "has_ingredient_3", + "has_ingredient_4", + "has_recipe" + ] + ], + "rewards": { + "recipes": [ + "electricadvantage:integrated_circuit_tin_tech" + ] + } +} diff --git a/src/main/resources/data/electricadvantage/advancements/recipes/laser_turret_diamond_emerald.json b/src/main/resources/data/electricadvantage/advancements/recipes/laser_turret_diamond_emerald.json new file mode 100644 index 0000000..d9885ca --- /dev/null +++ b/src/main/resources/data/electricadvantage/advancements/recipes/laser_turret_diamond_emerald.json @@ -0,0 +1,76 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_ingredient_1": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:gems/diamond" + } + ] + } + }, + "has_ingredient_2": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:gems/emerald" + } + ] + } + }, + "has_ingredient_3": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:power_supply_units" + } + ] + } + }, + "has_ingredient_4": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:plates/steel" + } + ] + } + }, + "has_ingredient_5": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:frames/steel" + } + ] + } + }, + "has_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "electricadvantage:laser_turret_diamond_emerald" + } + } + }, + "requirements": [ + [ + "has_ingredient_1", + "has_ingredient_2", + "has_ingredient_3", + "has_ingredient_4", + "has_ingredient_5", + "has_recipe" + ] + ], + "rewards": { + "recipes": [ + "electricadvantage:laser_turret_diamond_emerald" + ] + } +} diff --git a/src/main/resources/data/electricadvantage/advancements/recipes/laser_turret_emerald_diamond.json b/src/main/resources/data/electricadvantage/advancements/recipes/laser_turret_emerald_diamond.json new file mode 100644 index 0000000..0657f86 --- /dev/null +++ b/src/main/resources/data/electricadvantage/advancements/recipes/laser_turret_emerald_diamond.json @@ -0,0 +1,76 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_ingredient_1": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:gems/emerald" + } + ] + } + }, + "has_ingredient_2": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:gems/diamond" + } + ] + } + }, + "has_ingredient_3": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:power_supply_units" + } + ] + } + }, + "has_ingredient_4": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:plates/steel" + } + ] + } + }, + "has_ingredient_5": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:frames/steel" + } + ] + } + }, + "has_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "electricadvantage:laser_turret_emerald_diamond" + } + } + }, + "requirements": [ + [ + "has_ingredient_1", + "has_ingredient_2", + "has_ingredient_3", + "has_ingredient_4", + "has_ingredient_5", + "has_recipe" + ] + ], + "rewards": { + "recipes": [ + "electricadvantage:laser_turret_emerald_diamond" + ] + } +} diff --git a/src/main/resources/data/electricadvantage/advancements/recipes/lead_acid_battery_dust_sulfur.json b/src/main/resources/data/electricadvantage/advancements/recipes/lead_acid_battery_dust_sulfur.json new file mode 100644 index 0000000..fc09e75 --- /dev/null +++ b/src/main/resources/data/electricadvantage/advancements/recipes/lead_acid_battery_dust_sulfur.json @@ -0,0 +1,65 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_ingredient_1": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:ingots/lead" + } + ] + } + }, + "has_ingredient_2": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:dusts/sulfur" + } + ] + } + }, + "has_ingredient_3": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "item": "minecraft:water_bucket" + } + ] + } + }, + "has_ingredient_4": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:plastic" + } + ] + } + }, + "has_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "electricadvantage:lead_acid_battery_dust_sulfur" + } + } + }, + "requirements": [ + [ + "has_ingredient_1", + "has_ingredient_2", + "has_ingredient_3", + "has_ingredient_4", + "has_recipe" + ] + ], + "rewards": { + "recipes": [ + "electricadvantage:lead_acid_battery_dust_sulfur" + ] + } +} diff --git a/src/main/resources/data/electricadvantage/advancements/recipes/lead_acid_battery_sulfur.json b/src/main/resources/data/electricadvantage/advancements/recipes/lead_acid_battery_sulfur.json new file mode 100644 index 0000000..36ee8b3 --- /dev/null +++ b/src/main/resources/data/electricadvantage/advancements/recipes/lead_acid_battery_sulfur.json @@ -0,0 +1,65 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_ingredient_1": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:ingots/lead" + } + ] + } + }, + "has_ingredient_2": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:sulfur" + } + ] + } + }, + "has_ingredient_3": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "item": "minecraft:water_bucket" + } + ] + } + }, + "has_ingredient_4": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:plastic" + } + ] + } + }, + "has_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "electricadvantage:lead_acid_battery_sulfur" + } + } + }, + "requirements": [ + [ + "has_ingredient_1", + "has_ingredient_2", + "has_ingredient_3", + "has_ingredient_4", + "has_recipe" + ] + ], + "rewards": { + "recipes": [ + "electricadvantage:lead_acid_battery_sulfur" + ] + } +} diff --git a/src/main/resources/data/electricadvantage/advancements/recipes/led_bar.json b/src/main/resources/data/electricadvantage/advancements/recipes/led_bar.json new file mode 100644 index 0000000..2b930e8 --- /dev/null +++ b/src/main/resources/data/electricadvantage/advancements/recipes/led_bar.json @@ -0,0 +1,54 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_ingredient_1": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:glass_panes" + } + ] + } + }, + "has_ingredient_2": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:microchips" + } + ] + } + }, + "has_ingredient_3": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:wires" + } + ] + } + }, + "has_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "electricadvantage:led_bar" + } + } + }, + "requirements": [ + [ + "has_ingredient_1", + "has_ingredient_2", + "has_ingredient_3", + "has_recipe" + ] + ], + "rewards": { + "recipes": [ + "electricadvantage:led_bar" + ] + } +} diff --git a/src/main/resources/data/electricadvantage/advancements/recipes/lithium_battery.json b/src/main/resources/data/electricadvantage/advancements/recipes/lithium_battery.json new file mode 100644 index 0000000..3f7e590 --- /dev/null +++ b/src/main/resources/data/electricadvantage/advancements/recipes/lithium_battery.json @@ -0,0 +1,65 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_ingredient_1": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:ingots/lithium" + } + ] + } + }, + "has_ingredient_2": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:dusts/redstone" + } + ] + } + }, + "has_ingredient_3": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:dusts/carbon" + } + ] + } + }, + "has_ingredient_4": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:plastic" + } + ] + } + }, + "has_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "electricadvantage:lithium_battery" + } + } + }, + "requirements": [ + [ + "has_ingredient_1", + "has_ingredient_2", + "has_ingredient_3", + "has_ingredient_4", + "has_recipe" + ] + ], + "rewards": { + "recipes": [ + "electricadvantage:lithium_battery" + ] + } +} diff --git a/src/main/resources/data/electricadvantage/advancements/recipes/lithium_ingot_from_nuggets.json b/src/main/resources/data/electricadvantage/advancements/recipes/lithium_ingot_from_nuggets.json new file mode 100644 index 0000000..b2c780c --- /dev/null +++ b/src/main/resources/data/electricadvantage/advancements/recipes/lithium_ingot_from_nuggets.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_ingredient_1": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:nuggets/lithium" + } + ] + } + }, + "has_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "electricadvantage:lithium_ingot_from_nuggets" + } + } + }, + "requirements": [ + [ + "has_ingredient_1", + "has_recipe" + ] + ], + "rewards": { + "recipes": [ + "electricadvantage:lithium_ingot_from_nuggets" + ] + } +} diff --git a/src/main/resources/data/electricadvantage/advancements/recipes/lithium_ingot_from_ore.json b/src/main/resources/data/electricadvantage/advancements/recipes/lithium_ingot_from_ore.json new file mode 100644 index 0000000..08d14d9 --- /dev/null +++ b/src/main/resources/data/electricadvantage/advancements/recipes/lithium_ingot_from_ore.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_ingredient_1": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "item": "electricadvantage:li_ore" + } + ] + } + }, + "has_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "electricadvantage:lithium_ingot_from_ore" + } + } + }, + "requirements": [ + [ + "has_ingredient_1", + "has_recipe" + ] + ], + "rewards": { + "recipes": [ + "electricadvantage:lithium_ingot_from_ore" + ] + } +} diff --git a/src/main/resources/data/electricadvantage/advancements/recipes/lithium_ingot_from_powder.json b/src/main/resources/data/electricadvantage/advancements/recipes/lithium_ingot_from_powder.json new file mode 100644 index 0000000..466343f --- /dev/null +++ b/src/main/resources/data/electricadvantage/advancements/recipes/lithium_ingot_from_powder.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_ingredient_1": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "item": "electricadvantage:li_powder" + } + ] + } + }, + "has_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "electricadvantage:lithium_ingot_from_powder" + } + } + }, + "requirements": [ + [ + "has_ingredient_1", + "has_recipe" + ] + ], + "rewards": { + "recipes": [ + "electricadvantage:lithium_ingot_from_powder" + ] + } +} diff --git a/src/main/resources/data/electricadvantage/advancements/recipes/lithium_nuggets.json b/src/main/resources/data/electricadvantage/advancements/recipes/lithium_nuggets.json new file mode 100644 index 0000000..83387d6 --- /dev/null +++ b/src/main/resources/data/electricadvantage/advancements/recipes/lithium_nuggets.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_ingredient_1": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:ingots/lithium" + } + ] + } + }, + "has_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "electricadvantage:lithium_nuggets" + } + } + }, + "requirements": [ + [ + "has_ingredient_1", + "has_recipe" + ] + ], + "rewards": { + "recipes": [ + "electricadvantage:lithium_nuggets" + ] + } +} diff --git a/src/main/resources/data/electricadvantage/advancements/recipes/nickel_hydride_battery.json b/src/main/resources/data/electricadvantage/advancements/recipes/nickel_hydride_battery.json new file mode 100644 index 0000000..f7f51c4 --- /dev/null +++ b/src/main/resources/data/electricadvantage/advancements/recipes/nickel_hydride_battery.json @@ -0,0 +1,65 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_ingredient_1": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:ingots/nickel" + } + ] + } + }, + "has_ingredient_2": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:dusts/redstone" + } + ] + } + }, + "has_ingredient_3": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "item": "minecraft:water_bucket" + } + ] + } + }, + "has_ingredient_4": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:plastic" + } + ] + } + }, + "has_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "electricadvantage:nickel_hydride_battery" + } + } + }, + "requirements": [ + [ + "has_ingredient_1", + "has_ingredient_2", + "has_ingredient_3", + "has_ingredient_4", + "has_recipe" + ] + ], + "rewards": { + "recipes": [ + "electricadvantage:nickel_hydride_battery" + ] + } +} diff --git a/src/main/resources/data/electricadvantage/advancements/recipes/photovoltaic_generator.json b/src/main/resources/data/electricadvantage/advancements/recipes/photovoltaic_generator.json new file mode 100644 index 0000000..10ec133 --- /dev/null +++ b/src/main/resources/data/electricadvantage/advancements/recipes/photovoltaic_generator.json @@ -0,0 +1,65 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_ingredient_1": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:glass_panes" + } + ] + } + }, + "has_ingredient_2": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:ingots/silicon" + } + ] + } + }, + "has_ingredient_3": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:wires" + } + ] + } + }, + "has_ingredient_4": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:power_supply_units" + } + ] + } + }, + "has_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "electricadvantage:photovoltaic_generator" + } + } + }, + "requirements": [ + [ + "has_ingredient_1", + "has_ingredient_2", + "has_ingredient_3", + "has_ingredient_4", + "has_recipe" + ] + ], + "rewards": { + "recipes": [ + "electricadvantage:photovoltaic_generator" + ] + } +} diff --git a/src/main/resources/data/electricadvantage/advancements/recipes/plastic_refinery.json b/src/main/resources/data/electricadvantage/advancements/recipes/plastic_refinery.json new file mode 100644 index 0000000..5b2934e --- /dev/null +++ b/src/main/resources/data/electricadvantage/advancements/recipes/plastic_refinery.json @@ -0,0 +1,76 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_ingredient_1": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "item": "minecraft:piston" + } + ] + } + }, + "has_ingredient_2": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:sprockets" + } + ] + } + }, + "has_ingredient_3": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:power_supply_units" + } + ] + } + }, + "has_ingredient_4": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:plates/steel" + } + ] + } + }, + "has_ingredient_5": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:frames/steel" + } + ] + } + }, + "has_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "electricadvantage:plastic_refinery" + } + } + }, + "requirements": [ + [ + "has_ingredient_1", + "has_ingredient_2", + "has_ingredient_3", + "has_ingredient_4", + "has_ingredient_5", + "has_recipe" + ] + ], + "rewards": { + "recipes": [ + "electricadvantage:plastic_refinery" + ] + } +} diff --git a/src/main/resources/data/electricadvantage/advancements/recipes/power_supply_unit_iron_normal.json b/src/main/resources/data/electricadvantage/advancements/recipes/power_supply_unit_iron_normal.json new file mode 100644 index 0000000..442d954 --- /dev/null +++ b/src/main/resources/data/electricadvantage/advancements/recipes/power_supply_unit_iron_normal.json @@ -0,0 +1,54 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_ingredient_1": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:wires" + } + ] + } + }, + "has_ingredient_2": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:circuit_boards" + } + ] + } + }, + "has_ingredient_3": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:ingots/iron" + } + ] + } + }, + "has_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "electricadvantage:power_supply_unit_iron_normal" + } + } + }, + "requirements": [ + [ + "has_ingredient_1", + "has_ingredient_2", + "has_ingredient_3", + "has_recipe" + ] + ], + "rewards": { + "recipes": [ + "electricadvantage:power_supply_unit_iron_normal" + ] + } +} diff --git a/src/main/resources/data/electricadvantage/advancements/recipes/power_supply_unit_plate_steel_apocalyptic.json b/src/main/resources/data/electricadvantage/advancements/recipes/power_supply_unit_plate_steel_apocalyptic.json new file mode 100644 index 0000000..033f918 --- /dev/null +++ b/src/main/resources/data/electricadvantage/advancements/recipes/power_supply_unit_plate_steel_apocalyptic.json @@ -0,0 +1,54 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_ingredient_1": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:wires" + } + ] + } + }, + "has_ingredient_2": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:circuit_boards" + } + ] + } + }, + "has_ingredient_3": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:plates/steel" + } + ] + } + }, + "has_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "electricadvantage:power_supply_unit_plate_steel_apocalyptic" + } + } + }, + "requirements": [ + [ + "has_ingredient_1", + "has_ingredient_2", + "has_ingredient_3", + "has_recipe" + ] + ], + "rewards": { + "recipes": [ + "electricadvantage:power_supply_unit_plate_steel_apocalyptic" + ] + } +} diff --git a/src/main/resources/data/electricadvantage/advancements/recipes/power_supply_unit_plate_steel_tech.json b/src/main/resources/data/electricadvantage/advancements/recipes/power_supply_unit_plate_steel_tech.json new file mode 100644 index 0000000..68a1ea2 --- /dev/null +++ b/src/main/resources/data/electricadvantage/advancements/recipes/power_supply_unit_plate_steel_tech.json @@ -0,0 +1,54 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_ingredient_1": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:wires" + } + ] + } + }, + "has_ingredient_2": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:circuit_boards" + } + ] + } + }, + "has_ingredient_3": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:plates/steel" + } + ] + } + }, + "has_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "electricadvantage:power_supply_unit_plate_steel_tech" + } + } + }, + "requirements": [ + [ + "has_ingredient_1", + "has_ingredient_2", + "has_ingredient_3", + "has_recipe" + ] + ], + "rewards": { + "recipes": [ + "electricadvantage:power_supply_unit_plate_steel_tech" + ] + } +} diff --git a/src/main/resources/data/electricadvantage/advancements/recipes/power_supply_unit_steel_normal.json b/src/main/resources/data/electricadvantage/advancements/recipes/power_supply_unit_steel_normal.json new file mode 100644 index 0000000..9d1ade2 --- /dev/null +++ b/src/main/resources/data/electricadvantage/advancements/recipes/power_supply_unit_steel_normal.json @@ -0,0 +1,54 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_ingredient_1": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:wires" + } + ] + } + }, + "has_ingredient_2": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:circuit_boards" + } + ] + } + }, + "has_ingredient_3": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:ingots/steel" + } + ] + } + }, + "has_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "electricadvantage:power_supply_unit_steel_normal" + } + } + }, + "requirements": [ + [ + "has_ingredient_1", + "has_ingredient_2", + "has_ingredient_3", + "has_recipe" + ] + ], + "rewards": { + "recipes": [ + "electricadvantage:power_supply_unit_steel_normal" + ] + } +} diff --git a/src/main/resources/data/electricadvantage/advancements/recipes/silicon_blend.json b/src/main/resources/data/electricadvantage/advancements/recipes/silicon_blend.json new file mode 100644 index 0000000..835d345 --- /dev/null +++ b/src/main/resources/data/electricadvantage/advancements/recipes/silicon_blend.json @@ -0,0 +1,43 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_ingredient_1": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:sand" + } + ] + } + }, + "has_ingredient_2": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:dusts/carbon" + } + ] + } + }, + "has_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "electricadvantage:silicon_blend" + } + } + }, + "requirements": [ + [ + "has_ingredient_1", + "has_ingredient_2", + "has_recipe" + ] + ], + "rewards": { + "recipes": [ + "electricadvantage:silicon_blend" + ] + } +} diff --git a/src/main/resources/data/electricadvantage/advancements/recipes/silicon_ingot_from_blend.json b/src/main/resources/data/electricadvantage/advancements/recipes/silicon_ingot_from_blend.json new file mode 100644 index 0000000..5d49df2 --- /dev/null +++ b/src/main/resources/data/electricadvantage/advancements/recipes/silicon_ingot_from_blend.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_ingredient_1": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "item": "electricadvantage:silicon_mix" + } + ] + } + }, + "has_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "electricadvantage:silicon_ingot_from_blend" + } + } + }, + "requirements": [ + [ + "has_ingredient_1", + "has_recipe" + ] + ], + "rewards": { + "recipes": [ + "electricadvantage:silicon_ingot_from_blend" + ] + } +} diff --git a/src/main/resources/data/electricadvantage/advancements/recipes/solder_blend_tin_lead.json b/src/main/resources/data/electricadvantage/advancements/recipes/solder_blend_tin_lead.json new file mode 100644 index 0000000..9054d7e --- /dev/null +++ b/src/main/resources/data/electricadvantage/advancements/recipes/solder_blend_tin_lead.json @@ -0,0 +1,43 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_ingredient_1": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:dusts/tin" + } + ] + } + }, + "has_ingredient_2": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:dusts/lead" + } + ] + } + }, + "has_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "electricadvantage:solder_blend_tin_lead" + } + } + }, + "requirements": [ + [ + "has_ingredient_1", + "has_ingredient_2", + "has_recipe" + ] + ], + "rewards": { + "recipes": [ + "electricadvantage:solder_blend_tin_lead" + ] + } +} diff --git a/src/main/resources/data/electricadvantage/advancements/recipes/solder_blend_tin_silver.json b/src/main/resources/data/electricadvantage/advancements/recipes/solder_blend_tin_silver.json new file mode 100644 index 0000000..ad40fb0 --- /dev/null +++ b/src/main/resources/data/electricadvantage/advancements/recipes/solder_blend_tin_silver.json @@ -0,0 +1,43 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_ingredient_1": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:dusts/tin" + } + ] + } + }, + "has_ingredient_2": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:dusts/silver" + } + ] + } + }, + "has_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "electricadvantage:solder_blend_tin_silver" + } + } + }, + "requirements": [ + [ + "has_ingredient_1", + "has_ingredient_2", + "has_recipe" + ] + ], + "rewards": { + "recipes": [ + "electricadvantage:solder_blend_tin_silver" + ] + } +} diff --git a/src/main/resources/data/electricadvantage/advancements/recipes/solder_from_blend.json b/src/main/resources/data/electricadvantage/advancements/recipes/solder_from_blend.json new file mode 100644 index 0000000..9981a8b --- /dev/null +++ b/src/main/resources/data/electricadvantage/advancements/recipes/solder_from_blend.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_ingredient_1": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "item": "electricadvantage:solder_mix" + } + ] + } + }, + "has_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "electricadvantage:solder_from_blend" + } + } + }, + "requirements": [ + [ + "has_ingredient_1", + "has_recipe" + ] + ], + "rewards": { + "recipes": [ + "electricadvantage:solder_from_blend" + ] + } +} diff --git a/src/main/resources/data/electricadvantage/advancements/recipes/steam_powered_generator.json b/src/main/resources/data/electricadvantage/advancements/recipes/steam_powered_generator.json new file mode 100644 index 0000000..4494cfb --- /dev/null +++ b/src/main/resources/data/electricadvantage/advancements/recipes/steam_powered_generator.json @@ -0,0 +1,76 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_ingredient_1": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:conduits/steam" + } + ] + } + }, + "has_ingredient_2": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:governors" + } + ] + } + }, + "has_ingredient_3": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:power_supply_units" + } + ] + } + }, + "has_ingredient_4": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:plates/steel" + } + ] + } + }, + "has_ingredient_5": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:frames/steel" + } + ] + } + }, + "has_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "electricadvantage:steam_powered_generator" + } + } + }, + "requirements": [ + [ + "has_ingredient_1", + "has_ingredient_2", + "has_ingredient_3", + "has_ingredient_4", + "has_ingredient_5", + "has_recipe" + ] + ], + "rewards": { + "recipes": [ + "electricadvantage:steam_powered_generator" + ] + } +} diff --git a/src/main/resources/data/electricadvantage/loot_tables/chests/advantage_parts.json b/src/main/resources/data/electricadvantage/loot_tables/chests/advantage_parts.json new file mode 100644 index 0000000..248037f --- /dev/null +++ b/src/main/resources/data/electricadvantage/loot_tables/chests/advantage_parts.json @@ -0,0 +1,141 @@ +{ + "pools": [ + { + "__comment": "25% chance of a Electric Advantage item", + "rolls": 1, + "entries": [ + { + "type": "empty", + "weight": 144 + }, + { + "type": "item", + "name": "electricadvantage:psu", + "weight": 6, + "functions": [ + { + "function": "set_count", + "count": { + "min": 1, + "max": 4 + } + } + ] + }, + { + "type": "item", + "name": "electricadvantage:electric_conduit", + "weight": 12, + "functions": [ + { + "function": "set_count", + "count": { + "min": 3, + "max": 10 + } + } + ] + }, + { + "type": "item", + "name": "electricadvantage:led_bar", + "weight": 6, + "functions": [ + { + "function": "set_count", + "count": { + "min": 2, + "max": 8 + } + } + ] + }, + { + "type": "item", + "name": "electricadvantage:solder", + "weight": 6, + "functions": [ + { + "function": "set_count", + "count": { + "min": 3, + "max": 12 + } + } + ] + }, + { + "type": "item", + "name": "electricadvantage:integrated_circuit", + "weight": 3, + "functions": [ + { + "function": "set_count", + "count": { + "min": 5, + "max": 22 + } + } + ] + }, + { + "type": "item", + "name": "electricadvantage:lead_acid_battery", + "weight": 8, + "functions": [ + { + "function": "set_count", + "count": { + "min": 1, + "max": 2 + } + } + ] + }, + { + "type": "item", + "name": "electricadvantage:nickel_hydride_battery", + "weight": 4, + "functions": [ + { + "function": "set_count", + "count": { + "min": 1, + "max": 2 + } + } + ] + }, + { + "type": "item", + "name": "electricadvantage:alkaline_battery", + "weight": 2, + "functions": [ + { + "function": "set_count", + "count": { + "min": 1, + "max": 2 + } + } + ] + }, + { + "type": "item", + "name": "electricadvantage:lithium_battery", + "weight": 1, + "functions": [ + { + "function": "set_count", + "count": { + "min": 1, + "max": 2 + } + } + ] + } + ], + "name": "electricadvantage_legacy_parts_0" + } + ] +} diff --git a/src/main/resources/data/electricadvantage/recipes/alkaline_battery.json b/src/main/resources/data/electricadvantage/recipes/alkaline_battery.json new file mode 100644 index 0000000..c2e0f6a --- /dev/null +++ b/src/main/resources/data/electricadvantage/recipes/alkaline_battery.json @@ -0,0 +1,40 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "pXp", + "pYp", + "pZp" + ], + "key": { + "X": { + "tag": "forge:ingots/iron" + }, + "Y": { + "item": "minecraft:gunpowder" + }, + "Z": { + "tag": "forge:ingots/zinc" + }, + "p": { + "tag": "forge:plastic" + } + }, + "result": { + "item": "electricadvantage:alkaline_battery" + }, + "group": "electricadvantage:alkaline_battery", + "conditions": [ + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:ingots/iron" + }, + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:ingots/zinc" + }, + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:plastic" + } + ] +} diff --git a/src/main/resources/data/electricadvantage/recipes/blank_circuit_board_ingot_normal.json b/src/main/resources/data/electricadvantage/recipes/blank_circuit_board_ingot_normal.json new file mode 100644 index 0000000..ef899bb --- /dev/null +++ b/src/main/resources/data/electricadvantage/recipes/blank_circuit_board_ingot_normal.json @@ -0,0 +1,30 @@ +{ + "type": "minecraft:crafting_shapeless", + "ingredients": [ + { + "tag": "forge:plastic" + }, + { + "tag": "forge:ingots/copper" + } + ], + "result": { + "item": "electricadvantage:blank_circuit_board", + "count": 2 + }, + "conditions": [ + { + "type": "electricadvantage:recipe_mode", + "mode": "NORMAL" + }, + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:ingots/copper" + }, + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:plastic" + } + ], + "group": "electricadvantage:blank_circuit_board" +} diff --git a/src/main/resources/data/electricadvantage/recipes/blank_circuit_board_plate.json b/src/main/resources/data/electricadvantage/recipes/blank_circuit_board_plate.json new file mode 100644 index 0000000..fd0b1d7 --- /dev/null +++ b/src/main/resources/data/electricadvantage/recipes/blank_circuit_board_plate.json @@ -0,0 +1,26 @@ +{ + "type": "minecraft:crafting_shapeless", + "ingredients": [ + { + "tag": "forge:plastic" + }, + { + "tag": "forge:plates/copper" + } + ], + "result": { + "item": "electricadvantage:blank_circuit_board", + "count": 2 + }, + "group": "electricadvantage:blank_circuit_board", + "conditions": [ + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:plastic" + }, + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:plates/copper" + } + ] +} diff --git a/src/main/resources/data/electricadvantage/recipes/control_circuit.json b/src/main/resources/data/electricadvantage/recipes/control_circuit.json new file mode 100644 index 0000000..e7ed909 --- /dev/null +++ b/src/main/resources/data/electricadvantage/recipes/control_circuit.json @@ -0,0 +1,28 @@ +{ + "type": "minecraft:crafting_shapeless", + "ingredients": [ + { + "item": "electricadvantage:blank_circuit_board" + }, + { + "tag": "forge:microchips" + }, + { + "tag": "forge:solder" + } + ], + "result": { + "item": "electricadvantage:control_circuit" + }, + "group": "electricadvantage:control_circuit", + "conditions": [ + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:microchips" + }, + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:solder" + } + ] +} diff --git a/src/main/resources/data/electricadvantage/recipes/crushing_control_circuit.json b/src/main/resources/data/electricadvantage/recipes/crushing_control_circuit.json new file mode 100644 index 0000000..76772ac --- /dev/null +++ b/src/main/resources/data/electricadvantage/recipes/crushing_control_circuit.json @@ -0,0 +1,20 @@ +{ + "type": "basemetals:crushing", + "ingredient": { + "item": "electricadvantage:control_circuit" + }, + "result": { + "item": "electricadvantage:integrated_circuit", + "count": 1 + }, + "conditions": [ + { + "type": "forge:mod_loaded", + "modid": "basemetals" + }, + { + "type": "electricadvantage:recipe_mode", + "mode": "APOCALYPTIC" + } + ] +} diff --git a/src/main/resources/data/electricadvantage/recipes/crushing_electric_furnace.json b/src/main/resources/data/electricadvantage/recipes/crushing_electric_furnace.json new file mode 100644 index 0000000..14c925b --- /dev/null +++ b/src/main/resources/data/electricadvantage/recipes/crushing_electric_furnace.json @@ -0,0 +1,20 @@ +{ + "type": "basemetals:crushing", + "ingredient": { + "item": "electricadvantage:electric_furnace" + }, + "result": { + "item": "electricadvantage:psu", + "count": 1 + }, + "conditions": [ + { + "type": "forge:mod_loaded", + "modid": "basemetals" + }, + { + "type": "electricadvantage:recipe_mode", + "mode": "APOCALYPTIC" + } + ] +} diff --git a/src/main/resources/data/electricadvantage/recipes/crushing_lithium_ingot.json b/src/main/resources/data/electricadvantage/recipes/crushing_lithium_ingot.json new file mode 100644 index 0000000..c27ec25 --- /dev/null +++ b/src/main/resources/data/electricadvantage/recipes/crushing_lithium_ingot.json @@ -0,0 +1,20 @@ +{ + "type": "basemetals:crushing", + "ingredient": { + "tag": "forge:ingots/lithium" + }, + "result": { + "item": "electricadvantage:li_powder", + "count": 1 + }, + "conditions": [ + { + "type": "forge:mod_loaded", + "modid": "basemetals" + }, + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:ingots/lithium" + } + ] +} diff --git a/src/main/resources/data/electricadvantage/recipes/crushing_lithium_ore.json b/src/main/resources/data/electricadvantage/recipes/crushing_lithium_ore.json new file mode 100644 index 0000000..f12e324 --- /dev/null +++ b/src/main/resources/data/electricadvantage/recipes/crushing_lithium_ore.json @@ -0,0 +1,20 @@ +{ + "type": "basemetals:crushing", + "ingredient": { + "tag": "forge:ores/lithium" + }, + "result": { + "item": "electricadvantage:li_powder", + "count": 2 + }, + "conditions": [ + { + "type": "forge:mod_loaded", + "modid": "basemetals" + }, + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:ores/lithium" + } + ] +} diff --git a/src/main/resources/data/electricadvantage/recipes/crushing_photovoltaic_generator.json b/src/main/resources/data/electricadvantage/recipes/crushing_photovoltaic_generator.json new file mode 100644 index 0000000..eb3f0c0 --- /dev/null +++ b/src/main/resources/data/electricadvantage/recipes/crushing_photovoltaic_generator.json @@ -0,0 +1,20 @@ +{ + "type": "basemetals:crushing", + "ingredient": { + "item": "electricadvantage:photovoltaic_generator" + }, + "result": { + "item": "electricadvantage:psu", + "count": 1 + }, + "conditions": [ + { + "type": "forge:mod_loaded", + "modid": "basemetals" + }, + { + "type": "electricadvantage:recipe_mode", + "mode": "APOCALYPTIC" + } + ] +} diff --git a/src/main/resources/data/electricadvantage/recipes/crushing_psu.json b/src/main/resources/data/electricadvantage/recipes/crushing_psu.json new file mode 100644 index 0000000..af2d99b --- /dev/null +++ b/src/main/resources/data/electricadvantage/recipes/crushing_psu.json @@ -0,0 +1,20 @@ +{ + "type": "basemetals:crushing", + "ingredient": { + "item": "electricadvantage:psu" + }, + "result": { + "item": "electricadvantage:control_circuit", + "count": 1 + }, + "conditions": [ + { + "type": "forge:mod_loaded", + "modid": "basemetals" + }, + { + "type": "electricadvantage:recipe_mode", + "mode": "APOCALYPTIC" + } + ] +} diff --git a/src/main/resources/data/electricadvantage/recipes/crushing_steam_powered_generator.json b/src/main/resources/data/electricadvantage/recipes/crushing_steam_powered_generator.json new file mode 100644 index 0000000..8d18ed4 --- /dev/null +++ b/src/main/resources/data/electricadvantage/recipes/crushing_steam_powered_generator.json @@ -0,0 +1,20 @@ +{ + "type": "basemetals:crushing", + "ingredient": { + "item": "electricadvantage:steam_powered_generator" + }, + "result": { + "item": "electricadvantage:psu", + "count": 1 + }, + "conditions": [ + { + "type": "forge:mod_loaded", + "modid": "basemetals" + }, + { + "type": "electricadvantage:recipe_mode", + "mode": "APOCALYPTIC" + } + ] +} diff --git a/src/main/resources/data/electricadvantage/recipes/crushing_sulfur_ore.json b/src/main/resources/data/electricadvantage/recipes/crushing_sulfur_ore.json new file mode 100644 index 0000000..23ee408 --- /dev/null +++ b/src/main/resources/data/electricadvantage/recipes/crushing_sulfur_ore.json @@ -0,0 +1,20 @@ +{ + "type": "basemetals:crushing", + "ingredient": { + "tag": "forge:ores/sulfur" + }, + "result": { + "item": "electricadvantage:sulfur_powder", + "count": 4 + }, + "conditions": [ + { + "type": "forge:mod_loaded", + "modid": "basemetals" + }, + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:ores/sulfur" + } + ] +} diff --git a/src/main/resources/data/electricadvantage/recipes/electric_battery_array.json b/src/main/resources/data/electricadvantage/recipes/electric_battery_array.json new file mode 100644 index 0000000..d95f596 --- /dev/null +++ b/src/main/resources/data/electricadvantage/recipes/electric_battery_array.json @@ -0,0 +1,39 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "uX ", + "pmp" + ], + "key": { + "X": { + "item": "minecraft:chest" + }, + "u": { + "tag": "forge:power_supply_units" + }, + "p": { + "tag": "forge:plates/steel" + }, + "m": { + "tag": "forge:frames/steel" + } + }, + "result": { + "item": "electricadvantage:electric_battery_array" + }, + "group": "electricadvantage:electric_battery_array", + "conditions": [ + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:frames/steel" + }, + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:plates/steel" + }, + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:power_supply_units" + } + ] +} diff --git a/src/main/resources/data/electricadvantage/recipes/electric_conduit_plastic_ingot.json b/src/main/resources/data/electricadvantage/recipes/electric_conduit_plastic_ingot.json new file mode 100644 index 0000000..af2b75d --- /dev/null +++ b/src/main/resources/data/electricadvantage/recipes/electric_conduit_plastic_ingot.json @@ -0,0 +1,31 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "xxx", + "ccc", + "xxx" + ], + "key": { + "x": { + "tag": "forge:plastic" + }, + "c": { + "tag": "forge:ingots/copper" + } + }, + "result": { + "item": "electricadvantage:electric_conduit", + "count": 6 + }, + "group": "electricadvantage:electric_conduit", + "conditions": [ + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:ingots/copper" + }, + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:plastic" + } + ] +} diff --git a/src/main/resources/data/electricadvantage/recipes/electric_conduit_plastic_rod.json b/src/main/resources/data/electricadvantage/recipes/electric_conduit_plastic_rod.json new file mode 100644 index 0000000..c8a341f --- /dev/null +++ b/src/main/resources/data/electricadvantage/recipes/electric_conduit_plastic_rod.json @@ -0,0 +1,29 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "xx", + "cc" + ], + "key": { + "x": { + "tag": "forge:plastic" + }, + "c": { + "tag": "forge:rods/copper" + } + }, + "result": { + "item": "electricadvantage:electric_conduit" + }, + "group": "electricadvantage:electric_conduit", + "conditions": [ + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:plastic" + }, + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:rods/copper" + } + ] +} diff --git a/src/main/resources/data/electricadvantage/recipes/electric_conduit_rubber_ingot.json b/src/main/resources/data/electricadvantage/recipes/electric_conduit_rubber_ingot.json new file mode 100644 index 0000000..fdb23cd --- /dev/null +++ b/src/main/resources/data/electricadvantage/recipes/electric_conduit_rubber_ingot.json @@ -0,0 +1,31 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "xxx", + "ccc", + "xxx" + ], + "key": { + "x": { + "tag": "forge:rubber" + }, + "c": { + "tag": "forge:ingots/copper" + } + }, + "result": { + "item": "electricadvantage:electric_conduit", + "count": 6 + }, + "group": "electricadvantage:electric_conduit", + "conditions": [ + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:ingots/copper" + }, + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:rubber" + } + ] +} diff --git a/src/main/resources/data/electricadvantage/recipes/electric_conduit_rubber_rod.json b/src/main/resources/data/electricadvantage/recipes/electric_conduit_rubber_rod.json new file mode 100644 index 0000000..c6eab54 --- /dev/null +++ b/src/main/resources/data/electricadvantage/recipes/electric_conduit_rubber_rod.json @@ -0,0 +1,29 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "xx", + "cc" + ], + "key": { + "x": { + "tag": "forge:rubber" + }, + "c": { + "tag": "forge:rods/copper" + } + }, + "result": { + "item": "electricadvantage:electric_conduit" + }, + "group": "electricadvantage:electric_conduit", + "conditions": [ + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:rods/copper" + }, + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:rubber" + } + ] +} diff --git a/src/main/resources/data/electricadvantage/recipes/electric_crusher.json b/src/main/resources/data/electricadvantage/recipes/electric_crusher.json new file mode 100644 index 0000000..6f78f68 --- /dev/null +++ b/src/main/resources/data/electricadvantage/recipes/electric_crusher.json @@ -0,0 +1,50 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "uXY", + "pmp" + ], + "key": { + "X": { + "tag": "forge:sprockets" + }, + "Y": { + "tag": "forge:gems/diamond" + }, + "u": { + "tag": "forge:power_supply_units" + }, + "p": { + "tag": "forge:plates/steel" + }, + "m": { + "tag": "forge:frames/steel" + } + }, + "result": { + "item": "electricadvantage:electric_crusher" + }, + "group": "electricadvantage:electric_crusher", + "conditions": [ + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:frames/steel" + }, + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:gems/diamond" + }, + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:plates/steel" + }, + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:power_supply_units" + }, + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:sprockets" + } + ] +} diff --git a/src/main/resources/data/electricadvantage/recipes/electric_drill.json b/src/main/resources/data/electricadvantage/recipes/electric_drill.json new file mode 100644 index 0000000..0d5b52e --- /dev/null +++ b/src/main/resources/data/electricadvantage/recipes/electric_drill.json @@ -0,0 +1,43 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "uX ", + "pmp" + ], + "key": { + "X": { + "tag": "forge:storage_blocks/diamond" + }, + "u": { + "tag": "forge:power_supply_units" + }, + "p": { + "tag": "forge:plates/steel" + }, + "m": { + "tag": "forge:frames/steel" + } + }, + "result": { + "item": "electricadvantage:electric_drill" + }, + "group": "electricadvantage:electric_drill", + "conditions": [ + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:frames/steel" + }, + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:plates/steel" + }, + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:power_supply_units" + }, + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:storage_blocks/diamond" + } + ] +} diff --git a/src/main/resources/data/electricadvantage/recipes/electric_fabricator.json b/src/main/resources/data/electricadvantage/recipes/electric_fabricator.json new file mode 100644 index 0000000..896b387 --- /dev/null +++ b/src/main/resources/data/electricadvantage/recipes/electric_fabricator.json @@ -0,0 +1,39 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "uX ", + "pmp" + ], + "key": { + "X": { + "item": "minecraft:crafting_table" + }, + "u": { + "tag": "forge:power_supply_units" + }, + "p": { + "tag": "forge:plates/steel" + }, + "m": { + "tag": "forge:frames/steel" + } + }, + "result": { + "item": "electricadvantage:electric_fabricator" + }, + "group": "electricadvantage:electric_fabricator", + "conditions": [ + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:frames/steel" + }, + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:plates/steel" + }, + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:power_supply_units" + } + ] +} diff --git a/src/main/resources/data/electricadvantage/recipes/electric_furnace.json b/src/main/resources/data/electricadvantage/recipes/electric_furnace.json new file mode 100644 index 0000000..f78493a --- /dev/null +++ b/src/main/resources/data/electricadvantage/recipes/electric_furnace.json @@ -0,0 +1,26 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "bbb", + "bub", + "bbb" + ], + "key": { + "b": { + "item": "minecraft:bricks" + }, + "u": { + "tag": "forge:power_supply_units" + } + }, + "result": { + "item": "electricadvantage:electric_furnace" + }, + "group": "electricadvantage:electric_furnace", + "conditions": [ + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:power_supply_units" + } + ] +} diff --git a/src/main/resources/data/electricadvantage/recipes/electric_oven.json b/src/main/resources/data/electricadvantage/recipes/electric_oven.json new file mode 100644 index 0000000..cef55cd --- /dev/null +++ b/src/main/resources/data/electricadvantage/recipes/electric_oven.json @@ -0,0 +1,46 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "uXY", + "pmp" + ], + "key": { + "X": { + "tag": "forge:glass_panes" + }, + "Y": { + "tag": "forge:power_supply_units" + }, + "u": { + "tag": "forge:power_supply_units" + }, + "p": { + "tag": "forge:plates/steel" + }, + "m": { + "tag": "forge:frames/steel" + } + }, + "result": { + "item": "electricadvantage:electric_oven" + }, + "group": "electricadvantage:electric_oven", + "conditions": [ + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:frames/steel" + }, + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:glass_panes" + }, + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:plates/steel" + }, + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:power_supply_units" + } + ] +} diff --git a/src/main/resources/data/electricadvantage/recipes/electric_pump.json b/src/main/resources/data/electricadvantage/recipes/electric_pump.json new file mode 100644 index 0000000..b2d1750 --- /dev/null +++ b/src/main/resources/data/electricadvantage/recipes/electric_pump.json @@ -0,0 +1,42 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "uXY", + "pmp" + ], + "key": { + "X": { + "item": "minecraft:piston" + }, + "Y": { + "item": "minecraft:bucket" + }, + "u": { + "tag": "forge:power_supply_units" + }, + "p": { + "tag": "forge:plates/steel" + }, + "m": { + "tag": "forge:frames/steel" + } + }, + "result": { + "item": "electricadvantage:electric_pump" + }, + "group": "electricadvantage:electric_pump", + "conditions": [ + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:frames/steel" + }, + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:plates/steel" + }, + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:power_supply_units" + } + ] +} diff --git a/src/main/resources/data/electricadvantage/recipes/electric_still.json b/src/main/resources/data/electricadvantage/recipes/electric_still.json new file mode 100644 index 0000000..09ee3c3 --- /dev/null +++ b/src/main/resources/data/electricadvantage/recipes/electric_still.json @@ -0,0 +1,42 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "uXY", + "pmp" + ], + "key": { + "X": { + "item": "minecraft:bucket" + }, + "Y": { + "item": "minecraft:bucket" + }, + "u": { + "tag": "forge:power_supply_units" + }, + "p": { + "tag": "forge:plates/steel" + }, + "m": { + "tag": "forge:frames/steel" + } + }, + "result": { + "item": "electricadvantage:electric_still" + }, + "group": "electricadvantage:electric_still", + "conditions": [ + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:frames/steel" + }, + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:plates/steel" + }, + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:power_supply_units" + } + ] +} diff --git a/src/main/resources/data/electricadvantage/recipes/electric_switch.json b/src/main/resources/data/electricadvantage/recipes/electric_switch.json new file mode 100644 index 0000000..698048a --- /dev/null +++ b/src/main/resources/data/electricadvantage/recipes/electric_switch.json @@ -0,0 +1,32 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + " L ", + "pfp" + ], + "key": { + "L": { + "item": "minecraft:lever" + }, + "p": { + "tag": "forge:wires" + }, + "f": { + "tag": "forge:frames/steel" + } + }, + "result": { + "item": "electricadvantage:electric_switch" + }, + "group": "electricadvantage:electric_switch", + "conditions": [ + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:frames/steel" + }, + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:wires" + } + ] +} diff --git a/src/main/resources/data/electricadvantage/recipes/electric_track.json b/src/main/resources/data/electricadvantage/recipes/electric_track.json new file mode 100644 index 0000000..00a93d0 --- /dev/null +++ b/src/main/resources/data/electricadvantage/recipes/electric_track.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "ingredients": [ + { + "item": "electricadvantage:electric_conduit" + }, + { + "item": "poweradvantage:steel_frame" + } + ], + "result": { + "item": "electricadvantage:electric_track" + }, + "group": "electricadvantage:electric_track" +} diff --git a/src/main/resources/data/electricadvantage/recipes/growth_chamber.json b/src/main/resources/data/electricadvantage/recipes/growth_chamber.json new file mode 100644 index 0000000..1171b69 --- /dev/null +++ b/src/main/resources/data/electricadvantage/recipes/growth_chamber.json @@ -0,0 +1,46 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "uXY", + "pmp" + ], + "key": { + "X": { + "item": "minecraft:flower_pot" + }, + "Y": { + "tag": "forge:microchips" + }, + "u": { + "tag": "forge:power_supply_units" + }, + "p": { + "tag": "forge:plates/steel" + }, + "m": { + "tag": "forge:frames/steel" + } + }, + "result": { + "item": "electricadvantage:growth_chamber" + }, + "group": "electricadvantage:growth_chamber", + "conditions": [ + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:frames/steel" + }, + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:microchips" + }, + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:plates/steel" + }, + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:power_supply_units" + } + ] +} diff --git a/src/main/resources/data/electricadvantage/recipes/growth_chamber_controller.json b/src/main/resources/data/electricadvantage/recipes/growth_chamber_controller.json new file mode 100644 index 0000000..e38dcdd --- /dev/null +++ b/src/main/resources/data/electricadvantage/recipes/growth_chamber_controller.json @@ -0,0 +1,46 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "uXY", + "pmp" + ], + "key": { + "X": { + "item": "minecraft:flower_pot" + }, + "Y": { + "tag": "forge:circuit_boards" + }, + "u": { + "tag": "forge:power_supply_units" + }, + "p": { + "tag": "forge:plates/steel" + }, + "m": { + "tag": "forge:frames/steel" + } + }, + "result": { + "item": "electricadvantage:growth_chamber_controller" + }, + "group": "electricadvantage:growth_chamber_controller", + "conditions": [ + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:circuit_boards" + }, + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:frames/steel" + }, + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:plates/steel" + }, + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:power_supply_units" + } + ] +} diff --git a/src/main/resources/data/electricadvantage/recipes/hydroelectric_generator.json b/src/main/resources/data/electricadvantage/recipes/hydroelectric_generator.json new file mode 100644 index 0000000..992b730 --- /dev/null +++ b/src/main/resources/data/electricadvantage/recipes/hydroelectric_generator.json @@ -0,0 +1,46 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "uXY", + "pmp" + ], + "key": { + "X": { + "tag": "forge:sprockets" + }, + "Y": { + "tag": "forge:sprockets" + }, + "u": { + "tag": "forge:power_supply_units" + }, + "p": { + "tag": "forge:plates/steel" + }, + "m": { + "tag": "forge:frames/steel" + } + }, + "result": { + "item": "electricadvantage:hydroelectric_generator" + }, + "group": "electricadvantage:hydroelectric_generator", + "conditions": [ + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:frames/steel" + }, + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:plates/steel" + }, + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:power_supply_units" + }, + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:sprockets" + } + ] +} diff --git a/src/main/resources/data/electricadvantage/recipes/integrated_circuit_copper_normal.json b/src/main/resources/data/electricadvantage/recipes/integrated_circuit_copper_normal.json new file mode 100644 index 0000000..793b6a7 --- /dev/null +++ b/src/main/resources/data/electricadvantage/recipes/integrated_circuit_copper_normal.json @@ -0,0 +1,34 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "sss", + "ccc" + ], + "key": { + "s": { + "tag": "forge:ingots/silicon" + }, + "c": { + "tag": "forge:nuggets/copper" + } + }, + "result": { + "item": "electricadvantage:integrated_circuit", + "count": 3 + }, + "conditions": [ + { + "type": "electricadvantage:recipe_mode", + "mode": "NORMAL" + }, + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:ingots/silicon" + }, + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:nuggets/copper" + } + ], + "group": "electricadvantage:integrated_circuit" +} diff --git a/src/main/resources/data/electricadvantage/recipes/integrated_circuit_copper_tech.json b/src/main/resources/data/electricadvantage/recipes/integrated_circuit_copper_tech.json new file mode 100644 index 0000000..3404793 --- /dev/null +++ b/src/main/resources/data/electricadvantage/recipes/integrated_circuit_copper_tech.json @@ -0,0 +1,49 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "prp", + "sss", + "ccc" + ], + "key": { + "p": { + "tag": "forge:plastic" + }, + "s": { + "tag": "forge:ingots/silicon" + }, + "r": { + "tag": "forge:dusts/redstone" + }, + "c": { + "tag": "forge:nuggets/copper" + } + }, + "result": { + "item": "electricadvantage:integrated_circuit", + "count": 3 + }, + "conditions": [ + { + "type": "electricadvantage:recipe_mode", + "mode": "TECH_PROGRESSION" + }, + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:dusts/redstone" + }, + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:ingots/silicon" + }, + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:nuggets/copper" + }, + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:plastic" + } + ], + "group": "electricadvantage:integrated_circuit" +} diff --git a/src/main/resources/data/electricadvantage/recipes/integrated_circuit_gold_normal.json b/src/main/resources/data/electricadvantage/recipes/integrated_circuit_gold_normal.json new file mode 100644 index 0000000..9b1d5b0 --- /dev/null +++ b/src/main/resources/data/electricadvantage/recipes/integrated_circuit_gold_normal.json @@ -0,0 +1,34 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "sss", + "ccc" + ], + "key": { + "s": { + "tag": "forge:ingots/silicon" + }, + "c": { + "tag": "forge:nuggets/gold" + } + }, + "result": { + "item": "electricadvantage:integrated_circuit", + "count": 3 + }, + "conditions": [ + { + "type": "electricadvantage:recipe_mode", + "mode": "NORMAL" + }, + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:ingots/silicon" + }, + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:nuggets/gold" + } + ], + "group": "electricadvantage:integrated_circuit" +} diff --git a/src/main/resources/data/electricadvantage/recipes/integrated_circuit_gold_tech.json b/src/main/resources/data/electricadvantage/recipes/integrated_circuit_gold_tech.json new file mode 100644 index 0000000..355a44b --- /dev/null +++ b/src/main/resources/data/electricadvantage/recipes/integrated_circuit_gold_tech.json @@ -0,0 +1,49 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "prp", + "sss", + "ccc" + ], + "key": { + "p": { + "tag": "forge:plastic" + }, + "s": { + "tag": "forge:ingots/silicon" + }, + "r": { + "tag": "forge:dusts/redstone" + }, + "c": { + "tag": "forge:nuggets/gold" + } + }, + "result": { + "item": "electricadvantage:integrated_circuit", + "count": 3 + }, + "conditions": [ + { + "type": "electricadvantage:recipe_mode", + "mode": "TECH_PROGRESSION" + }, + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:dusts/redstone" + }, + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:ingots/silicon" + }, + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:nuggets/gold" + }, + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:plastic" + } + ], + "group": "electricadvantage:integrated_circuit" +} diff --git a/src/main/resources/data/electricadvantage/recipes/integrated_circuit_tin_normal.json b/src/main/resources/data/electricadvantage/recipes/integrated_circuit_tin_normal.json new file mode 100644 index 0000000..a3d0c3d --- /dev/null +++ b/src/main/resources/data/electricadvantage/recipes/integrated_circuit_tin_normal.json @@ -0,0 +1,34 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "sss", + "ccc" + ], + "key": { + "s": { + "tag": "forge:ingots/silicon" + }, + "c": { + "tag": "forge:nuggets/tin" + } + }, + "result": { + "item": "electricadvantage:integrated_circuit", + "count": 3 + }, + "conditions": [ + { + "type": "electricadvantage:recipe_mode", + "mode": "NORMAL" + }, + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:ingots/silicon" + }, + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:nuggets/tin" + } + ], + "group": "electricadvantage:integrated_circuit" +} diff --git a/src/main/resources/data/electricadvantage/recipes/integrated_circuit_tin_tech.json b/src/main/resources/data/electricadvantage/recipes/integrated_circuit_tin_tech.json new file mode 100644 index 0000000..a33d39e --- /dev/null +++ b/src/main/resources/data/electricadvantage/recipes/integrated_circuit_tin_tech.json @@ -0,0 +1,49 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "prp", + "sss", + "ccc" + ], + "key": { + "p": { + "tag": "forge:plastic" + }, + "s": { + "tag": "forge:ingots/silicon" + }, + "r": { + "tag": "forge:dusts/redstone" + }, + "c": { + "tag": "forge:nuggets/tin" + } + }, + "result": { + "item": "electricadvantage:integrated_circuit", + "count": 3 + }, + "conditions": [ + { + "type": "electricadvantage:recipe_mode", + "mode": "TECH_PROGRESSION" + }, + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:dusts/redstone" + }, + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:ingots/silicon" + }, + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:nuggets/tin" + }, + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:plastic" + } + ], + "group": "electricadvantage:integrated_circuit" +} diff --git a/src/main/resources/data/electricadvantage/recipes/laser_turret_diamond_emerald.json b/src/main/resources/data/electricadvantage/recipes/laser_turret_diamond_emerald.json new file mode 100644 index 0000000..73f7d30 --- /dev/null +++ b/src/main/resources/data/electricadvantage/recipes/laser_turret_diamond_emerald.json @@ -0,0 +1,50 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "uXY", + "pmp" + ], + "key": { + "X": { + "tag": "forge:gems/diamond" + }, + "Y": { + "tag": "forge:gems/emerald" + }, + "u": { + "tag": "forge:power_supply_units" + }, + "p": { + "tag": "forge:plates/steel" + }, + "m": { + "tag": "forge:frames/steel" + } + }, + "result": { + "item": "electricadvantage:laser_turret" + }, + "group": "electricadvantage:laser_turret", + "conditions": [ + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:frames/steel" + }, + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:gems/diamond" + }, + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:gems/emerald" + }, + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:plates/steel" + }, + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:power_supply_units" + } + ] +} diff --git a/src/main/resources/data/electricadvantage/recipes/laser_turret_emerald_diamond.json b/src/main/resources/data/electricadvantage/recipes/laser_turret_emerald_diamond.json new file mode 100644 index 0000000..167f6b3 --- /dev/null +++ b/src/main/resources/data/electricadvantage/recipes/laser_turret_emerald_diamond.json @@ -0,0 +1,50 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "uXY", + "pmp" + ], + "key": { + "X": { + "tag": "forge:gems/emerald" + }, + "Y": { + "tag": "forge:gems/diamond" + }, + "u": { + "tag": "forge:power_supply_units" + }, + "p": { + "tag": "forge:plates/steel" + }, + "m": { + "tag": "forge:frames/steel" + } + }, + "result": { + "item": "electricadvantage:laser_turret" + }, + "group": "electricadvantage:laser_turret", + "conditions": [ + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:frames/steel" + }, + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:gems/diamond" + }, + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:gems/emerald" + }, + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:plates/steel" + }, + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:power_supply_units" + } + ] +} diff --git a/src/main/resources/data/electricadvantage/recipes/lead_acid_battery_dust_sulfur.json b/src/main/resources/data/electricadvantage/recipes/lead_acid_battery_dust_sulfur.json new file mode 100644 index 0000000..a9b6e05 --- /dev/null +++ b/src/main/resources/data/electricadvantage/recipes/lead_acid_battery_dust_sulfur.json @@ -0,0 +1,40 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "pXp", + "pYp", + "pZp" + ], + "key": { + "X": { + "tag": "forge:ingots/lead" + }, + "Y": { + "tag": "forge:dusts/sulfur" + }, + "Z": { + "item": "minecraft:water_bucket" + }, + "p": { + "tag": "forge:plastic" + } + }, + "result": { + "item": "electricadvantage:lead_acid_battery" + }, + "group": "electricadvantage:lead_acid_battery", + "conditions": [ + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:dusts/sulfur" + }, + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:ingots/lead" + }, + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:plastic" + } + ] +} diff --git a/src/main/resources/data/electricadvantage/recipes/lead_acid_battery_sulfur.json b/src/main/resources/data/electricadvantage/recipes/lead_acid_battery_sulfur.json new file mode 100644 index 0000000..830be4d --- /dev/null +++ b/src/main/resources/data/electricadvantage/recipes/lead_acid_battery_sulfur.json @@ -0,0 +1,40 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "pXp", + "pYp", + "pZp" + ], + "key": { + "X": { + "tag": "forge:ingots/lead" + }, + "Y": { + "tag": "forge:sulfur" + }, + "Z": { + "item": "minecraft:water_bucket" + }, + "p": { + "tag": "forge:plastic" + } + }, + "result": { + "item": "electricadvantage:lead_acid_battery" + }, + "group": "electricadvantage:lead_acid_battery", + "conditions": [ + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:ingots/lead" + }, + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:plastic" + }, + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:sulfur" + } + ] +} diff --git a/src/main/resources/data/electricadvantage/recipes/led_bar.json b/src/main/resources/data/electricadvantage/recipes/led_bar.json new file mode 100644 index 0000000..62940d6 --- /dev/null +++ b/src/main/resources/data/electricadvantage/recipes/led_bar.json @@ -0,0 +1,38 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "ggg", + "xxx", + "ccc" + ], + "key": { + "g": { + "tag": "forge:glass_panes" + }, + "x": { + "tag": "forge:microchips" + }, + "c": { + "tag": "forge:wires" + } + }, + "result": { + "item": "electricadvantage:led_bar", + "count": 3 + }, + "group": "electricadvantage:led_bar", + "conditions": [ + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:glass_panes" + }, + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:microchips" + }, + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:wires" + } + ] +} diff --git a/src/main/resources/data/electricadvantage/recipes/lithium_battery.json b/src/main/resources/data/electricadvantage/recipes/lithium_battery.json new file mode 100644 index 0000000..f6fc936 --- /dev/null +++ b/src/main/resources/data/electricadvantage/recipes/lithium_battery.json @@ -0,0 +1,44 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "pXp", + "pYp", + "pZp" + ], + "key": { + "X": { + "tag": "forge:ingots/lithium" + }, + "Y": { + "tag": "forge:dusts/redstone" + }, + "Z": { + "tag": "forge:dusts/carbon" + }, + "p": { + "tag": "forge:plastic" + } + }, + "result": { + "item": "electricadvantage:lithium_battery" + }, + "group": "electricadvantage:lithium_battery", + "conditions": [ + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:dusts/carbon" + }, + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:dusts/redstone" + }, + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:ingots/lithium" + }, + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:plastic" + } + ] +} diff --git a/src/main/resources/data/electricadvantage/recipes/lithium_ingot_from_nuggets.json b/src/main/resources/data/electricadvantage/recipes/lithium_ingot_from_nuggets.json new file mode 100644 index 0000000..1c63c54 --- /dev/null +++ b/src/main/resources/data/electricadvantage/recipes/lithium_ingot_from_nuggets.json @@ -0,0 +1,23 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "xxx", + "xxx", + "xxx" + ], + "key": { + "x": { + "tag": "forge:nuggets/lithium" + } + }, + "result": { + "item": "electricadvantage:li_ingot" + }, + "conditions": [ + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:nuggets/lithium" + } + ], + "group": "electricadvantage:li_ingot" +} diff --git a/src/main/resources/data/electricadvantage/recipes/lithium_ingot_from_ore.json b/src/main/resources/data/electricadvantage/recipes/lithium_ingot_from_ore.json new file mode 100644 index 0000000..6875bf2 --- /dev/null +++ b/src/main/resources/data/electricadvantage/recipes/lithium_ingot_from_ore.json @@ -0,0 +1,11 @@ +{ + "type": "minecraft:smelting", + "ingredient": { + "item": "electricadvantage:li_ore" + }, + "result": "electricadvantage:li_ingot", + "experience": 0.5, + "cookingtime": 200, + "conditions": [], + "group": "electricadvantage:li_ingot" +} diff --git a/src/main/resources/data/electricadvantage/recipes/lithium_ingot_from_powder.json b/src/main/resources/data/electricadvantage/recipes/lithium_ingot_from_powder.json new file mode 100644 index 0000000..b6c13ea --- /dev/null +++ b/src/main/resources/data/electricadvantage/recipes/lithium_ingot_from_powder.json @@ -0,0 +1,11 @@ +{ + "type": "minecraft:smelting", + "ingredient": { + "item": "electricadvantage:li_powder" + }, + "result": "electricadvantage:li_ingot", + "experience": 0.5, + "cookingtime": 200, + "conditions": [], + "group": "electricadvantage:li_ingot" +} diff --git a/src/main/resources/data/electricadvantage/recipes/lithium_nuggets.json b/src/main/resources/data/electricadvantage/recipes/lithium_nuggets.json new file mode 100644 index 0000000..cb8b1ff --- /dev/null +++ b/src/main/resources/data/electricadvantage/recipes/lithium_nuggets.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:crafting_shapeless", + "ingredients": [ + { + "tag": "forge:ingots/lithium" + } + ], + "result": { + "item": "electricadvantage:li_nugget", + "count": 9 + }, + "group": "electricadvantage:li_nugget", + "conditions": [ + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:ingots/lithium" + } + ] +} diff --git a/src/main/resources/data/electricadvantage/recipes/nickel_hydride_battery.json b/src/main/resources/data/electricadvantage/recipes/nickel_hydride_battery.json new file mode 100644 index 0000000..16a7abd --- /dev/null +++ b/src/main/resources/data/electricadvantage/recipes/nickel_hydride_battery.json @@ -0,0 +1,40 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "pXp", + "pYp", + "pZp" + ], + "key": { + "X": { + "tag": "forge:ingots/nickel" + }, + "Y": { + "tag": "forge:dusts/redstone" + }, + "Z": { + "item": "minecraft:water_bucket" + }, + "p": { + "tag": "forge:plastic" + } + }, + "result": { + "item": "electricadvantage:nickel_hydride_battery" + }, + "group": "electricadvantage:nickel_hydride_battery", + "conditions": [ + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:dusts/redstone" + }, + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:ingots/nickel" + }, + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:plastic" + } + ] +} diff --git a/src/main/resources/data/electricadvantage/recipes/photovoltaic_generator.json b/src/main/resources/data/electricadvantage/recipes/photovoltaic_generator.json new file mode 100644 index 0000000..4d30454 --- /dev/null +++ b/src/main/resources/data/electricadvantage/recipes/photovoltaic_generator.json @@ -0,0 +1,48 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "ggg", + "sss", + "wuw" + ], + "key": { + "g": { + "tag": "forge:glass_panes" + }, + "s": { + "tag": "forge:ingots/silicon" + }, + "w": { + "tag": "forge:wires" + }, + "u": { + "tag": "forge:power_supply_units" + } + }, + "result": { + "item": "electricadvantage:photovoltaic_generator" + }, + "conditions": [ + { + "type": "electricadvantage:not_recipe_mode", + "mode": "APOCALYPTIC" + }, + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:glass_panes" + }, + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:ingots/silicon" + }, + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:power_supply_units" + }, + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:wires" + } + ], + "group": "electricadvantage:photovoltaic_generator" +} diff --git a/src/main/resources/data/electricadvantage/recipes/plastic_refinery.json b/src/main/resources/data/electricadvantage/recipes/plastic_refinery.json new file mode 100644 index 0000000..d6dc1e6 --- /dev/null +++ b/src/main/resources/data/electricadvantage/recipes/plastic_refinery.json @@ -0,0 +1,46 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "uXY", + "pmp" + ], + "key": { + "X": { + "item": "minecraft:piston" + }, + "Y": { + "tag": "forge:sprockets" + }, + "u": { + "tag": "forge:power_supply_units" + }, + "p": { + "tag": "forge:plates/steel" + }, + "m": { + "tag": "forge:frames/steel" + } + }, + "result": { + "item": "electricadvantage:plastic_refinery" + }, + "group": "electricadvantage:plastic_refinery", + "conditions": [ + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:frames/steel" + }, + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:plates/steel" + }, + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:power_supply_units" + }, + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:sprockets" + } + ] +} diff --git a/src/main/resources/data/electricadvantage/recipes/power_supply_unit_iron_normal.json b/src/main/resources/data/electricadvantage/recipes/power_supply_unit_iron_normal.json new file mode 100644 index 0000000..5ee3c2e --- /dev/null +++ b/src/main/resources/data/electricadvantage/recipes/power_supply_unit_iron_normal.json @@ -0,0 +1,40 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "wcw", + " s " + ], + "key": { + "w": { + "tag": "forge:wires" + }, + "c": { + "tag": "forge:circuit_boards" + }, + "s": { + "tag": "forge:ingots/iron" + } + }, + "result": { + "item": "electricadvantage:psu" + }, + "conditions": [ + { + "type": "electricadvantage:recipe_mode", + "mode": "NORMAL" + }, + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:circuit_boards" + }, + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:ingots/iron" + }, + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:wires" + } + ], + "group": "electricadvantage:psu" +} diff --git a/src/main/resources/data/electricadvantage/recipes/power_supply_unit_plate_steel_apocalyptic.json b/src/main/resources/data/electricadvantage/recipes/power_supply_unit_plate_steel_apocalyptic.json new file mode 100644 index 0000000..43b04e9 --- /dev/null +++ b/src/main/resources/data/electricadvantage/recipes/power_supply_unit_plate_steel_apocalyptic.json @@ -0,0 +1,40 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "wcw", + " s " + ], + "key": { + "w": { + "tag": "forge:wires" + }, + "c": { + "tag": "forge:circuit_boards" + }, + "s": { + "tag": "forge:plates/steel" + } + }, + "result": { + "item": "electricadvantage:psu" + }, + "conditions": [ + { + "type": "electricadvantage:recipe_mode", + "mode": "APOCALYPTIC" + }, + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:circuit_boards" + }, + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:plates/steel" + }, + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:wires" + } + ], + "group": "electricadvantage:psu" +} diff --git a/src/main/resources/data/electricadvantage/recipes/power_supply_unit_plate_steel_tech.json b/src/main/resources/data/electricadvantage/recipes/power_supply_unit_plate_steel_tech.json new file mode 100644 index 0000000..fabb5ac --- /dev/null +++ b/src/main/resources/data/electricadvantage/recipes/power_supply_unit_plate_steel_tech.json @@ -0,0 +1,40 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "wcw", + " s " + ], + "key": { + "w": { + "tag": "forge:wires" + }, + "c": { + "tag": "forge:circuit_boards" + }, + "s": { + "tag": "forge:plates/steel" + } + }, + "result": { + "item": "electricadvantage:psu" + }, + "conditions": [ + { + "type": "electricadvantage:recipe_mode", + "mode": "TECH_PROGRESSION" + }, + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:circuit_boards" + }, + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:plates/steel" + }, + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:wires" + } + ], + "group": "electricadvantage:psu" +} diff --git a/src/main/resources/data/electricadvantage/recipes/power_supply_unit_steel_normal.json b/src/main/resources/data/electricadvantage/recipes/power_supply_unit_steel_normal.json new file mode 100644 index 0000000..b7a49fd --- /dev/null +++ b/src/main/resources/data/electricadvantage/recipes/power_supply_unit_steel_normal.json @@ -0,0 +1,40 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "wcw", + " s " + ], + "key": { + "w": { + "tag": "forge:wires" + }, + "c": { + "tag": "forge:circuit_boards" + }, + "s": { + "tag": "forge:ingots/steel" + } + }, + "result": { + "item": "electricadvantage:psu" + }, + "conditions": [ + { + "type": "electricadvantage:recipe_mode", + "mode": "NORMAL" + }, + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:circuit_boards" + }, + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:ingots/steel" + }, + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:wires" + } + ], + "group": "electricadvantage:psu" +} diff --git a/src/main/resources/data/electricadvantage/recipes/silicon_blend.json b/src/main/resources/data/electricadvantage/recipes/silicon_blend.json new file mode 100644 index 0000000..2cf242e --- /dev/null +++ b/src/main/resources/data/electricadvantage/recipes/silicon_blend.json @@ -0,0 +1,25 @@ +{ + "type": "minecraft:crafting_shapeless", + "ingredients": [ + { + "tag": "forge:sand" + }, + { + "tag": "forge:dusts/carbon" + } + ], + "result": { + "item": "electricadvantage:silicon_mix" + }, + "group": "electricadvantage:silicon_mix", + "conditions": [ + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:dusts/carbon" + }, + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:sand" + } + ] +} diff --git a/src/main/resources/data/electricadvantage/recipes/silicon_ingot_from_blend.json b/src/main/resources/data/electricadvantage/recipes/silicon_ingot_from_blend.json new file mode 100644 index 0000000..d0f1cf9 --- /dev/null +++ b/src/main/resources/data/electricadvantage/recipes/silicon_ingot_from_blend.json @@ -0,0 +1,11 @@ +{ + "type": "minecraft:smelting", + "ingredient": { + "item": "electricadvantage:silicon_mix" + }, + "result": "electricadvantage:silicon_ingot", + "experience": 0.5, + "cookingtime": 200, + "conditions": [], + "group": "electricadvantage:silicon_ingot" +} diff --git a/src/main/resources/data/electricadvantage/recipes/solder_blend_tin_lead.json b/src/main/resources/data/electricadvantage/recipes/solder_blend_tin_lead.json new file mode 100644 index 0000000..06ece9d --- /dev/null +++ b/src/main/resources/data/electricadvantage/recipes/solder_blend_tin_lead.json @@ -0,0 +1,29 @@ +{ + "type": "minecraft:crafting_shapeless", + "ingredients": [ + { + "tag": "forge:dusts/tin" + }, + { + "tag": "forge:dusts/tin" + }, + { + "tag": "forge:dusts/lead" + } + ], + "result": { + "item": "electricadvantage:solder_mix", + "count": 3 + }, + "group": "electricadvantage:solder_mix", + "conditions": [ + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:dusts/lead" + }, + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:dusts/tin" + } + ] +} diff --git a/src/main/resources/data/electricadvantage/recipes/solder_blend_tin_silver.json b/src/main/resources/data/electricadvantage/recipes/solder_blend_tin_silver.json new file mode 100644 index 0000000..d82bd9c --- /dev/null +++ b/src/main/resources/data/electricadvantage/recipes/solder_blend_tin_silver.json @@ -0,0 +1,29 @@ +{ + "type": "minecraft:crafting_shapeless", + "ingredients": [ + { + "tag": "forge:dusts/tin" + }, + { + "tag": "forge:dusts/tin" + }, + { + "tag": "forge:dusts/silver" + } + ], + "result": { + "item": "electricadvantage:solder_mix", + "count": 3 + }, + "group": "electricadvantage:solder_mix", + "conditions": [ + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:dusts/silver" + }, + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:dusts/tin" + } + ] +} diff --git a/src/main/resources/data/electricadvantage/recipes/solder_from_blend.json b/src/main/resources/data/electricadvantage/recipes/solder_from_blend.json new file mode 100644 index 0000000..2ed4010 --- /dev/null +++ b/src/main/resources/data/electricadvantage/recipes/solder_from_blend.json @@ -0,0 +1,11 @@ +{ + "type": "minecraft:smelting", + "ingredient": { + "item": "electricadvantage:solder_mix" + }, + "result": "electricadvantage:solder", + "experience": 0.5, + "cookingtime": 200, + "conditions": [], + "group": "electricadvantage:solder" +} diff --git a/src/main/resources/data/electricadvantage/recipes/steam_powered_generator.json b/src/main/resources/data/electricadvantage/recipes/steam_powered_generator.json new file mode 100644 index 0000000..77050c1 --- /dev/null +++ b/src/main/resources/data/electricadvantage/recipes/steam_powered_generator.json @@ -0,0 +1,50 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "uXY", + "pmp" + ], + "key": { + "X": { + "tag": "forge:conduits/steam" + }, + "Y": { + "tag": "forge:governors" + }, + "u": { + "tag": "forge:power_supply_units" + }, + "p": { + "tag": "forge:plates/steel" + }, + "m": { + "tag": "forge:frames/steel" + } + }, + "result": { + "item": "electricadvantage:steam_powered_generator" + }, + "group": "electricadvantage:steam_powered_generator", + "conditions": [ + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:conduits/steam" + }, + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:frames/steel" + }, + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:governors" + }, + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:plates/steel" + }, + { + "type": "poweradvantage:tag_not_empty", + "tag": "forge:power_supply_units" + } + ] +} diff --git a/src/main/resources/data/forge/tags/blocks/ores/lithium.json b/src/main/resources/data/forge/tags/blocks/ores/lithium.json new file mode 100644 index 0000000..796eb3c --- /dev/null +++ b/src/main/resources/data/forge/tags/blocks/ores/lithium.json @@ -0,0 +1,4 @@ +{ + "replace": false, + "values": ["electricadvantage:li_ore"] +} diff --git a/src/main/resources/data/forge/tags/blocks/ores/sulfur.json b/src/main/resources/data/forge/tags/blocks/ores/sulfur.json new file mode 100644 index 0000000..8be591e --- /dev/null +++ b/src/main/resources/data/forge/tags/blocks/ores/sulfur.json @@ -0,0 +1,4 @@ +{ + "replace": false, + "values": ["electricadvantage:sulfur_ore"] +} diff --git a/src/main/resources/data/forge/tags/blocks/ores/sulphur.json b/src/main/resources/data/forge/tags/blocks/ores/sulphur.json new file mode 100644 index 0000000..471ab27 --- /dev/null +++ b/src/main/resources/data/forge/tags/blocks/ores/sulphur.json @@ -0,0 +1,4 @@ +{ + "replace": false, + "values": ["#forge:ores/sulfur"] +} diff --git a/src/main/resources/data/forge/tags/items/circuit_boards.json b/src/main/resources/data/forge/tags/items/circuit_boards.json new file mode 100644 index 0000000..6427b28 --- /dev/null +++ b/src/main/resources/data/forge/tags/items/circuit_boards.json @@ -0,0 +1,4 @@ +{ + "replace": false, + "values": ["electricadvantage:control_circuit"] +} diff --git a/src/main/resources/data/forge/tags/items/conduits/steam.json b/src/main/resources/data/forge/tags/items/conduits/steam.json new file mode 100644 index 0000000..5d341ba --- /dev/null +++ b/src/main/resources/data/forge/tags/items/conduits/steam.json @@ -0,0 +1,4 @@ +{ + "replace": false, + "values": [] +} diff --git a/src/main/resources/data/forge/tags/items/dusts/carbon.json b/src/main/resources/data/forge/tags/items/dusts/carbon.json new file mode 100644 index 0000000..9eaf066 --- /dev/null +++ b/src/main/resources/data/forge/tags/items/dusts/carbon.json @@ -0,0 +1,4 @@ +{ + "replace": false, + "values": ["#forge:dusts/coal", "#forge:dusts/charcoal"] +} diff --git a/src/main/resources/data/forge/tags/items/dusts/lithium.json b/src/main/resources/data/forge/tags/items/dusts/lithium.json new file mode 100644 index 0000000..0bb2c09 --- /dev/null +++ b/src/main/resources/data/forge/tags/items/dusts/lithium.json @@ -0,0 +1,4 @@ +{ + "replace": false, + "values": ["electricadvantage:li_powder"] +} diff --git a/src/main/resources/data/forge/tags/items/dusts/sulfur.json b/src/main/resources/data/forge/tags/items/dusts/sulfur.json new file mode 100644 index 0000000..1f04541 --- /dev/null +++ b/src/main/resources/data/forge/tags/items/dusts/sulfur.json @@ -0,0 +1,4 @@ +{ + "replace": false, + "values": ["electricadvantage:sulfur_powder"] +} diff --git a/src/main/resources/data/forge/tags/items/dusts/sulphur.json b/src/main/resources/data/forge/tags/items/dusts/sulphur.json new file mode 100644 index 0000000..f4b4db9 --- /dev/null +++ b/src/main/resources/data/forge/tags/items/dusts/sulphur.json @@ -0,0 +1,4 @@ +{ + "replace": false, + "values": ["#forge:dusts/sulfur"] +} diff --git a/src/main/resources/data/forge/tags/items/glass_panes.json b/src/main/resources/data/forge/tags/items/glass_panes.json new file mode 100644 index 0000000..e312863 --- /dev/null +++ b/src/main/resources/data/forge/tags/items/glass_panes.json @@ -0,0 +1,6 @@ +{ + "replace": false, + "values": [ + "minecraft:glass_pane" + ] +} diff --git a/src/main/resources/data/forge/tags/items/governors.json b/src/main/resources/data/forge/tags/items/governors.json new file mode 100644 index 0000000..5d341ba --- /dev/null +++ b/src/main/resources/data/forge/tags/items/governors.json @@ -0,0 +1,4 @@ +{ + "replace": false, + "values": [] +} diff --git a/src/main/resources/data/forge/tags/items/ingots/lithium.json b/src/main/resources/data/forge/tags/items/ingots/lithium.json new file mode 100644 index 0000000..dcf9ae1 --- /dev/null +++ b/src/main/resources/data/forge/tags/items/ingots/lithium.json @@ -0,0 +1,4 @@ +{ + "replace": false, + "values": ["electricadvantage:li_ingot"] +} diff --git a/src/main/resources/data/forge/tags/items/ingots/plastic.json b/src/main/resources/data/forge/tags/items/ingots/plastic.json new file mode 100644 index 0000000..037a076 --- /dev/null +++ b/src/main/resources/data/forge/tags/items/ingots/plastic.json @@ -0,0 +1,4 @@ +{ + "replace": false, + "values": ["electricadvantage:petrolplastic_ingot"] +} diff --git a/src/main/resources/data/forge/tags/items/ingots/silicon.json b/src/main/resources/data/forge/tags/items/ingots/silicon.json new file mode 100644 index 0000000..b1e560b --- /dev/null +++ b/src/main/resources/data/forge/tags/items/ingots/silicon.json @@ -0,0 +1,4 @@ +{ + "replace": false, + "values": ["electricadvantage:silicon_ingot"] +} diff --git a/src/main/resources/data/forge/tags/items/microchips.json b/src/main/resources/data/forge/tags/items/microchips.json new file mode 100644 index 0000000..cd3cc2c --- /dev/null +++ b/src/main/resources/data/forge/tags/items/microchips.json @@ -0,0 +1,4 @@ +{ + "replace": false, + "values": ["electricadvantage:integrated_circuit"] +} diff --git a/src/main/resources/data/forge/tags/items/nuggets/lithium.json b/src/main/resources/data/forge/tags/items/nuggets/lithium.json new file mode 100644 index 0000000..3044471 --- /dev/null +++ b/src/main/resources/data/forge/tags/items/nuggets/lithium.json @@ -0,0 +1,4 @@ +{ + "replace": false, + "values": ["electricadvantage:li_nugget"] +} diff --git a/src/main/resources/data/forge/tags/items/ores/lithium.json b/src/main/resources/data/forge/tags/items/ores/lithium.json new file mode 100644 index 0000000..796eb3c --- /dev/null +++ b/src/main/resources/data/forge/tags/items/ores/lithium.json @@ -0,0 +1,4 @@ +{ + "replace": false, + "values": ["electricadvantage:li_ore"] +} diff --git a/src/main/resources/data/forge/tags/items/ores/sulfur.json b/src/main/resources/data/forge/tags/items/ores/sulfur.json new file mode 100644 index 0000000..8be591e --- /dev/null +++ b/src/main/resources/data/forge/tags/items/ores/sulfur.json @@ -0,0 +1,4 @@ +{ + "replace": false, + "values": ["electricadvantage:sulfur_ore"] +} diff --git a/src/main/resources/data/forge/tags/items/ores/sulphur.json b/src/main/resources/data/forge/tags/items/ores/sulphur.json new file mode 100644 index 0000000..471ab27 --- /dev/null +++ b/src/main/resources/data/forge/tags/items/ores/sulphur.json @@ -0,0 +1,4 @@ +{ + "replace": false, + "values": ["#forge:ores/sulfur"] +} diff --git a/src/main/resources/data/forge/tags/items/plastic.json b/src/main/resources/data/forge/tags/items/plastic.json new file mode 100644 index 0000000..037a076 --- /dev/null +++ b/src/main/resources/data/forge/tags/items/plastic.json @@ -0,0 +1,4 @@ +{ + "replace": false, + "values": ["electricadvantage:petrolplastic_ingot"] +} diff --git a/src/main/resources/data/forge/tags/items/power_supply_units.json b/src/main/resources/data/forge/tags/items/power_supply_units.json new file mode 100644 index 0000000..69b2004 --- /dev/null +++ b/src/main/resources/data/forge/tags/items/power_supply_units.json @@ -0,0 +1,4 @@ +{ + "replace": false, + "values": ["electricadvantage:psu"] +} diff --git a/src/main/resources/data/forge/tags/items/rubber.json b/src/main/resources/data/forge/tags/items/rubber.json new file mode 100644 index 0000000..5d341ba --- /dev/null +++ b/src/main/resources/data/forge/tags/items/rubber.json @@ -0,0 +1,4 @@ +{ + "replace": false, + "values": [] +} diff --git a/src/main/resources/data/forge/tags/items/sand.json b/src/main/resources/data/forge/tags/items/sand.json new file mode 100644 index 0000000..c2b982e --- /dev/null +++ b/src/main/resources/data/forge/tags/items/sand.json @@ -0,0 +1,7 @@ +{ + "replace": false, + "values": [ + "minecraft:sand", + "minecraft:red_sand" + ] +} diff --git a/src/main/resources/data/forge/tags/items/solder.json b/src/main/resources/data/forge/tags/items/solder.json new file mode 100644 index 0000000..8abd047 --- /dev/null +++ b/src/main/resources/data/forge/tags/items/solder.json @@ -0,0 +1,4 @@ +{ + "replace": false, + "values": ["electricadvantage:solder"] +} diff --git a/src/main/resources/data/forge/tags/items/sulfur.json b/src/main/resources/data/forge/tags/items/sulfur.json new file mode 100644 index 0000000..1f04541 --- /dev/null +++ b/src/main/resources/data/forge/tags/items/sulfur.json @@ -0,0 +1,4 @@ +{ + "replace": false, + "values": ["electricadvantage:sulfur_powder"] +} diff --git a/src/main/resources/data/forge/tags/items/sulphur.json b/src/main/resources/data/forge/tags/items/sulphur.json new file mode 100644 index 0000000..4632d69 --- /dev/null +++ b/src/main/resources/data/forge/tags/items/sulphur.json @@ -0,0 +1,4 @@ +{ + "replace": false, + "values": ["#forge:sulfur"] +} diff --git a/src/main/resources/data/forge/tags/items/wires.json b/src/main/resources/data/forge/tags/items/wires.json new file mode 100644 index 0000000..1391f4f --- /dev/null +++ b/src/main/resources/data/forge/tags/items/wires.json @@ -0,0 +1,4 @@ +{ + "replace": false, + "values": ["electricadvantage:electric_conduit"] +} diff --git a/src/main/resources/mcmod.info b/src/main/resources/mcmod.info deleted file mode 100644 index 29923c7..0000000 --- a/src/main/resources/mcmod.info +++ /dev/null @@ -1,16 +0,0 @@ -[ -{ - "modid": "electricadvantage", - "name": "Electric Advantage", - "description": "Add electricity to your game with this Power Advantage add-on", - "version": "${version}", - "mcversion": "${mcversion}", - "url": "https://github.com/MinecraftModDevelopmentMods/ElectricAdvantage", - "updateUrl": "", - "authorList": ["DrCyano"], - "credits": "The Forge and FML guys, the author of this mod, Benjamin Franklin, and electrons everywhere", - "logoFile": "", - "screenshots": [], - "dependencies": [] -} -] diff --git a/src/test/java/zone/moddev/mc/electricadvantage/entities/HydroturbinePersistenceTest.java b/src/test/java/zone/moddev/mc/electricadvantage/entities/HydroturbinePersistenceTest.java new file mode 100644 index 0000000..b2a3d91 --- /dev/null +++ b/src/test/java/zone/moddev/mc/electricadvantage/entities/HydroturbinePersistenceTest.java @@ -0,0 +1,41 @@ +package zone.moddev.mc.electricadvantage.entities; + +import java.lang.reflect.Field; +import net.minecraft.nbt.NBTTagCompound; +import org.junit.Test; +import sun.misc.Unsafe; + +import static org.junit.Assert.*; + +public class HydroturbinePersistenceTest { + @Test public void preservesPendingGeneratorAcrossRepeatedReadSaveWithoutTick() throws Exception { + NBTTagCompound source = new NBTTagCompound(); + source.setIntArray("parentPos", new int[] {164, 81, 8}); + for (int pass = 0; pass < 3; pass++) { + HydroturbineEntity turbine = withoutWorld(); + turbine.readAdditional(source); + NBTTagCompound saved = new NBTTagCompound(); + turbine.writeAdditional(saved); + assertArrayEquals(new int[] {164, 81, 8}, saved.getIntArray("parentPos")); + source = saved; + } + } + + @Test public void readingUnlinkedEntityClearsPendingLink() throws Exception { + HydroturbineEntity turbine = withoutWorld(); + NBTTagCompound source = new NBTTagCompound(); + source.setIntArray("parentPos", new int[] {164, 81, 8}); + turbine.readAdditional(source); + turbine.readAdditional(new NBTTagCompound()); + NBTTagCompound saved = new NBTTagCompound(); + turbine.writeAdditional(saved); + assertFalse(saved.contains("parentPos", 11)); + } + + // Only exercise the custom NBT methods; no world, registry or entity tick is needed. + private static HydroturbineEntity withoutWorld() throws Exception { + Field field = Unsafe.class.getDeclaredField("theUnsafe"); + field.setAccessible(true); + return (HydroturbineEntity) ((Unsafe) field.get(null)).allocateInstance(HydroturbineEntity.class); + } +} diff --git a/src/test/java/zone/moddev/mc/electricadvantage/init/OreSpawnWorldGenTest.java b/src/test/java/zone/moddev/mc/electricadvantage/init/OreSpawnWorldGenTest.java new file mode 100644 index 0000000..7d2c7fe --- /dev/null +++ b/src/test/java/zone/moddev/mc/electricadvantage/init/OreSpawnWorldGenTest.java @@ -0,0 +1,35 @@ +package zone.moddev.mc.electricadvantage.init; + +import static org.junit.Assert.assertEquals; + +import com.google.gson.JsonObject; +import org.junit.Test; + +public class OreSpawnWorldGenTest { + @Test public void electricOwnsBothMaterialsWhenNoPreferredProviderIsLoaded() { + assertDefaults(false, false, true, true); + } + + @Test public void mineralogyOwnsSulfurButElectricStillOwnsLithium() { + assertDefaults(true, false, false, true); + } + + @Test public void baseMineralsOwnsBothFallbackMaterials() { + assertDefaults(false, true, false, false); + } + + @Test public void preferredProvidersDisableBothElectricAlternatives() { + assertDefaults(true, true, false, false); + } + + private static void assertDefaults(boolean mineralogy, boolean baseMinerals, + boolean sulfurEnabled, boolean lithiumEnabled) { + JsonObject root = OreSpawnWorldGen.createProvider(mineralogy, baseMinerals).toJson(); + JsonObject ores = root.getAsJsonObject("ores"); + assertEquals(sulfurEnabled, + ores.getAsJsonObject("electricadvantage:ore/sulfur").get("enabled").getAsBoolean()); + assertEquals(lithiumEnabled, + ores.getAsJsonObject("electricadvantage:ore/lithium").get("enabled").getAsBoolean()); + assertEquals(2, ores.size()); + } +} diff --git a/src/test/java/zone/moddev/mc/electricadvantage/machines/ElectricDrillPersistenceTest.java b/src/test/java/zone/moddev/mc/electricadvantage/machines/ElectricDrillPersistenceTest.java new file mode 100644 index 0000000..4e1cb7e --- /dev/null +++ b/src/test/java/zone/moddev/mc/electricadvantage/machines/ElectricDrillPersistenceTest.java @@ -0,0 +1,32 @@ +package zone.moddev.mc.electricadvantage.machines; + +import net.minecraft.nbt.NBTTagCompound; +import org.junit.Test; + +import static org.junit.Assert.assertEquals; + +public class ElectricDrillPersistenceTest { + @Test public void retainsLegacyProgressUntilWorldIsAttached() { + ElectricDrillTileEntity drill = new ElectricDrillTileEntity(); + drill.read(target(94)); + drill.prepareDataFieldsForSync(); + assertEquals(94, drill.getDataFieldArray()[1]); + } + + @Test public void clearsPreviousProgressOnReadingAnUntargetedTile() { + ElectricDrillTileEntity drill = new ElectricDrillTileEntity(); + drill.read(target(94)); + drill.read(new NBTTagCompound()); + drill.prepareDataFieldsForSync(); + assertEquals(0, drill.getDataFieldArray()[1]); + } + + private static NBTTagCompound target(int progress) { + NBTTagCompound tag = new NBTTagCompound(); + tag.setShort("progress", (short) progress); + tag.setInt("targetX", 2048); + tag.setInt("targetY", 80); + tag.setInt("targetZ", 2049); + return tag; + } +} diff --git a/src/test/java/zone/moddev/mc/electricadvantage/migration/ElectricLegacyMigrationsTest.java b/src/test/java/zone/moddev/mc/electricadvantage/migration/ElectricLegacyMigrationsTest.java new file mode 100644 index 0000000..56cade8 --- /dev/null +++ b/src/test/java/zone/moddev/mc/electricadvantage/migration/ElectricLegacyMigrationsTest.java @@ -0,0 +1,29 @@ +package zone.moddev.mc.electricadvantage.migration; + +import static org.junit.Assert.assertEquals; + +import cyano.poweradvantage.api.migration.LegacyMigrationApi; +import net.minecraft.util.EnumFacing; +import org.junit.Test; + +public class ElectricLegacyMigrationsTest { + @Test public void preservesAllSixDrillFacingsAndActiveFlag() { + for (EnumFacing facing : EnumFacing.values()) { + int metadata = facing.getIndex() | 8; + assertEquals(facing, ElectricLegacyMigrations.legacyDrillFacing(metadata)); + assertEquals(true, ElectricLegacyMigrations.legacyDrillActive(metadata)); + } + } + + @Test public void aliasesLegacyTileAndHydroturbineIds() { + ElectricLegacyMigrations.register(); + assertEquals("electricadvantage:led", LegacyMigrationApi.tileTarget("electricadvantage:l_e_d")); + assertEquals("electricadvantage:led", LegacyMigrationApi.tileTarget("electricadvantage.l_e_d")); + assertEquals("electricadvantage:electric_furnace", + LegacyMigrationApi.tileTarget("minecraft:electricadvantage.electric_furnace")); + assertEquals("electricadvantage:hydroturbine", + LegacyMigrationApi.entityTarget("minecraft:electricadvantage.Hydroturbine")); + assertEquals("electricadvantage:hydroturbine", + LegacyMigrationApi.entityTarget("electricadvantage.electricadvantage.Hydroturbine")); + } +} diff --git a/src/test/java/zone/moddev/mc/electricadvantage/resources/ClientResourceContractTest.java b/src/test/java/zone/moddev/mc/electricadvantage/resources/ClientResourceContractTest.java new file mode 100644 index 0000000..7f984dc --- /dev/null +++ b/src/test/java/zone/moddev/mc/electricadvantage/resources/ClientResourceContractTest.java @@ -0,0 +1,93 @@ +package zone.moddev.mc.electricadvantage.resources; + +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParser; +import org.junit.Test; +import java.io.Reader; +import java.nio.charset.StandardCharsets; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.Map; +import java.util.stream.Stream; +import static org.junit.Assert.*; + +public class ClientResourceContractTest { + private static final Path ROOT = Paths.get("src/main/resources"); + private static final Path ASSETS = ROOT.resolve("assets/electricadvantage"); + + @Test public void blockstatesUseLiteralModelPaths() throws Exception { + try (Stream files = Files.walk(ASSETS.resolve("blockstates"))) { + for (Path file : (Iterable) files.filter(p -> p.toString().endsWith(".json"))::iterator) { + verifyModels(read(file), file); + } + } + } + + @Test public void obsoleteSelectorsAreAbsent() throws Exception { + try (Stream files = Files.walk(ASSETS.resolve("blockstates"))) { + for (Path file : (Iterable) files.filter(p -> p.toString().endsWith(".json"))::iterator) { + JsonObject state = read(file); + assertFalse(file.toString(), state.has("forge_marker")); + if (state.has("variants")) { + assertFalse(file.toString(), state.getAsJsonObject("variants").has("normal")); + assertFalse(file.toString(), state.getAsJsonObject("variants").has("fluid")); + } + } + } + } + + @Test public void parentsAndTexturesExistInActualPacks() throws Exception { + try (Stream files = Files.walk(ASSETS.resolve("models"))) { + for (Path file : (Iterable) files.filter(p -> p.toString().endsWith(".json"))::iterator) { + JsonObject model = read(file); + if (model.has("parent")) reference(model.get("parent").getAsString(), "models", ".json", file); + if (model.has("textures")) for (Map.Entry entry : model.getAsJsonObject("textures").entrySet()) + reference(entry.getValue().getAsString(), "textures", ".png", file); + } + } + } + + @Test public void modernAliasesRetainEveryLegacyTranslation() throws Exception { + try (Stream files = Files.walk(ASSETS.resolve("lang"))) { + for (Path file : (Iterable) files.filter(p -> p.toString().endsWith(".json"))::iterator) { + JsonObject locale = read(file); + for (Map.Entry entry : locale.entrySet()) { + String key = entry.getKey(); + if (!(key.startsWith("tile.electricadvantage.") || key.startsWith("item.electricadvantage.")) + || !key.endsWith(".name")) continue; + String alias = key.substring(0, key.length() - 5); + if (alias.startsWith("tile.")) alias = "block." + alias.substring(5); + assertEquals(file + " lost alias " + alias, entry.getValue(), locale.get(alias)); + } + } + } + } + + private static void verifyModels(JsonElement node, Path file) { + if (node.isJsonObject()) for (Map.Entry entry : node.getAsJsonObject().entrySet()) { + if ("model".equals(entry.getKey())) reference(entry.getValue().getAsString(), "models", ".json", file); + else verifyModels(entry.getValue(), file); + } + else if (node.isJsonArray()) for (JsonElement child : node.getAsJsonArray()) verifyModels(child, file); + } + + private static void reference(String id, String directory, String suffix, Path file) { + if (id.startsWith("#")) return; + String[] parts = id.split(":", 2); + String namespace = parts.length == 2 ? parts[0] : "minecraft"; + String path = parts.length == 2 ? parts[1] : parts[0]; + if ("minecraft".equals(namespace) && path.startsWith("builtin/")) return; + String resource = "assets/" + namespace + "/" + directory + "/" + path + suffix; + boolean exists = "electricadvantage".equals(namespace) ? Files.isRegularFile(ROOT.resolve(resource)) + : ClientResourceContractTest.class.getClassLoader().getResource(resource) != null; + assertTrue(file + " references missing " + resource, exists); + } + + private static JsonObject read(Path file) throws Exception { + try (Reader reader = Files.newBufferedReader(file, StandardCharsets.UTF_8)) { + return new JsonParser().parse(reader).getAsJsonObject(); + } + } +} diff --git a/src/test/java/zone/moddev/mc/electricadvantage/resources/RecipeResourceTest.java b/src/test/java/zone/moddev/mc/electricadvantage/resources/RecipeResourceTest.java new file mode 100644 index 0000000..a65b3a7 --- /dev/null +++ b/src/test/java/zone/moddev/mc/electricadvantage/resources/RecipeResourceTest.java @@ -0,0 +1,49 @@ +package zone.moddev.mc.electricadvantage.resources; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; + +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.List; +import java.util.stream.Collectors; +import java.util.stream.Stream; + +import com.google.gson.JsonObject; +import com.google.gson.JsonParser; +import org.junit.Test; + +public class RecipeResourceTest { + @Test public void allRecipesUseTheOneThirteenDataPackLocationAndSerializers() throws IOException { + Path recipes = Paths.get("src/main/resources/data/electricadvantage/recipes"); + List files; + try (Stream stream = Files.list(recipes)) { + files = stream.filter(path -> path.toString().endsWith(".json")) + .sorted().collect(Collectors.toList()); + } + assertEquals(58, files.size()); + int crafting = 0, smelting = 0, crushing = 0; + for (Path file : files) { + String text = new String(Files.readAllBytes(file), StandardCharsets.UTF_8); + JsonObject json = new JsonParser().parse(text).getAsJsonObject(); + String type = json.get("type").getAsString(); + assertTrue(file + " has unsupported serializer " + type, + "minecraft:crafting_shaped".equals(type) + || "minecraft:crafting_shapeless".equals(type) + || "minecraft:smelting".equals(type) + || "basemetals:crushing".equals(type)); + if (type.startsWith("minecraft:crafting_")) crafting++; + else if ("minecraft:smelting".equals(type)) smelting++; + else crushing++; + assertFalse(file + " still contains an ore dictionary ingredient", text.contains("ore_dict")); + } + assertEquals(46, crafting); + assertEquals(4, smelting); + assertEquals(8, crushing); + assertFalse(Files.exists(Paths.get("src/main/resources/assets/electricadvantage/recipes"))); + } +} diff --git a/src/test/java/zone/moddev/mc/electricadvantage/resources/RecipeUnlockContractTest.java b/src/test/java/zone/moddev/mc/electricadvantage/resources/RecipeUnlockContractTest.java new file mode 100644 index 0000000..5866cd8 --- /dev/null +++ b/src/test/java/zone/moddev/mc/electricadvantage/resources/RecipeUnlockContractTest.java @@ -0,0 +1,131 @@ +package zone.moddev.mc.electricadvantage.resources; + +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParser; +import java.io.IOException; +import java.io.Reader; +import java.nio.charset.StandardCharsets; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.ArrayList; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.stream.Collectors; +import java.util.stream.Stream; +import org.junit.Test; +import static org.junit.Assert.*; + +public class RecipeUnlockContractTest { + private static final String MOD = "electricadvantage"; + private static final Path DATA = Paths.get("src/main/resources/data", MOD); + private static final Set IGNORED = new LinkedHashSet<>(java.util.Arrays.asList( + "item:minecraft:stick", "item:minecraft:string", "item:minecraft:feather", "tag:forge:rods/wooden")); + + @Test public void everyCraftingRecipeHasExactlyOneUnlockAndProcessingHasNone() throws IOException { + Set expected = new LinkedHashSet<>(); + for (Path file : files(DATA.resolve("recipes"))) { + if (crafting(read(file))) expected.add(file.getFileName().toString()); + } + Set actual = files(DATA.resolve("advancements/recipes")).stream() + .map(file -> file.getFileName().toString()).collect(Collectors.toSet()); + assertFalse("No crafting recipes found", expected.isEmpty()); + assertEquals("Missing or orphaned recipe unlocks", expected, actual); + } + + @Test public void discoveriesAreSingleIngredientAlternativesNotAnEntireCraftingGrid() throws IOException { + for (Path file : files(DATA.resolve("recipes"))) { + JsonObject recipe = read(file); + if (!crafting(recipe)) continue; + JsonObject unlock = read(DATA.resolve("advancements/recipes").resolve(file.getFileName())); + assertEquals("minecraft:recipes/root", unlock.get("parent").getAsString()); + assertFalse("Recipe unlocks should not create visible advancement tabs", unlock.has("display")); + JsonObject criteria = unlock.getAsJsonObject("criteria"); + Set actual = new LinkedHashSet<>(); + for (Map.Entry entry : criteria.entrySet()) { + if (entry.getKey().equals("has_recipe")) continue; + JsonObject criterion = entry.getValue().getAsJsonObject(); + assertEquals(file.toString(), "minecraft:inventory_changed", criterion.get("trigger").getAsString()); + JsonArray items = criterion.getAsJsonObject("conditions").getAsJsonArray("items"); + assertEquals("Finding ONE ingredient must be enough: " + file, 1, items.size()); + JsonObject predicate = items.get(0).getAsJsonObject(); + assertEquals("Only an item or tag predicate is expected", 1, predicate.size()); + actual.add(predicateKey(predicate)); + } + List choices = new ArrayList<>(); + if (recipe.has("key")) { + for (Map.Entry entry : recipe.getAsJsonObject("key").entrySet()) + collect(entry.getValue(), choices); + } else collect(recipe.has("ingredients") ? recipe.get("ingredients") : recipe.get("ingredient"), choices); + Set expected = choices.stream().map(RecipeUnlockContractTest::predicateKey) + .filter(key -> !IGNORED.contains(key)).collect(Collectors.toCollection(LinkedHashSet::new)); + if (expected.isEmpty()) for (JsonObject choice : choices) expected.add(predicateKey(choice)); + assertEquals("Trigger must correspond to a relevant recipe ingredient: " + file, expected, actual); + JsonArray requirements = unlock.getAsJsonArray("requirements"); + assertEquals("All criteria must form one OR group", 1, requirements.size()); + Set alternatives = new LinkedHashSet<>(); + for (JsonElement key : requirements.get(0).getAsJsonArray()) alternatives.add(key.getAsString()); + assertEquals(criteria.entrySet().stream().map(Map.Entry::getKey).collect(Collectors.toSet()), alternatives); + } + } + + @Test public void rewardAndRecipeCommandCriterionReferToTheExactVariant() throws IOException { + for (Path file : files(DATA.resolve("advancements/recipes"))) { + String id = MOD + ":" + file.getFileName().toString().replace(".json", ""); + JsonObject unlock = read(file); + JsonArray recipes = unlock.getAsJsonObject("rewards").getAsJsonArray("recipes"); + assertEquals(1, recipes.size()); + assertEquals(id, recipes.get(0).getAsString()); + JsonObject criterion = unlock.getAsJsonObject("criteria").getAsJsonObject("has_recipe"); + assertEquals("minecraft:recipe_unlocked", criterion.get("trigger").getAsString()); + assertEquals(id, criterion.getAsJsonObject("conditions").get("recipe").getAsString()); + assertFalse("Forge recipe conditions are not valid advancement conditions", unlock.has("conditions")); + } + } + + @Test public void recipeBookGroupsIdentifyTheOutputNotABroadMachineCategory() throws IOException { + for (Path file : files(DATA.resolve("recipes"))) { + JsonObject recipe = read(file); + if (!crafting(recipe)) continue; + JsonElement result = recipe.get("result"); + String output = result.isJsonPrimitive() ? result.getAsString() + : result.getAsJsonObject().get("item").getAsString(); + assertTrue("Missing output-specific group: " + file, recipe.has("group")); + assertEquals("Different items must not share a recipe-book cell: " + file, + output, recipe.get("group").getAsString()); + } + } + + private static boolean crafting(JsonObject recipe) { + String type = recipe.get("type").getAsString(); + return type.equals("minecraft:crafting_shaped") || type.equals("minecraft:crafting_shapeless") + || type.equals("minecraft:smelting"); + } + + private static String predicateKey(JsonObject predicate) { + String type = predicate.has("tag") ? "tag" : "item"; + return type + ":" + predicate.get(type).getAsString(); + } + + private static void collect(JsonElement element, List result) { + if (element.isJsonArray()) for (JsonElement child : element.getAsJsonArray()) collect(child, result); + else result.add(element.getAsJsonObject()); + } + + private static JsonObject read(Path file) throws IOException { + try (Reader reader = Files.newBufferedReader(file, StandardCharsets.UTF_8)) { + return new JsonParser().parse(reader).getAsJsonObject(); + } + } + + private static List files(Path directory) throws IOException { + if (!Files.isDirectory(directory)) return java.util.Collections.emptyList(); + try (Stream files = Files.walk(directory)) { + return files.filter(path -> path.toString().endsWith(".json")).sorted().collect(Collectors.toList()); + } + } +} diff --git a/src/test/resources/orespawn-legacy/electricadvantage.json b/src/test/resources/orespawn-legacy/electricadvantage.json new file mode 100644 index 0000000..fd57000 --- /dev/null +++ b/src/test/resources/orespawn-legacy/electricadvantage.json @@ -0,0 +1,27 @@ +{ + "dimensions": [ + { + "dimension": 0, + "ores": [ + { + "blockID": "electricadvantage:li_ore", + "size": 8, + "variation": 2, + "frequency": 0.125, + "minHeight": 1, + "maxHeight": 32, + "biomes": [] + }, + { + "blockID": "electricadvantage:sulfur_ore", + "size": 16, + "variation": 8, + "frequency": 1, + "minHeight": 1, + "maxHeight": 32, + "biomes": [] + } + ] + } + ] +} diff --git a/tools/generate-recipe-unlocks.js b/tools/generate-recipe-unlocks.js new file mode 100644 index 0000000..2714622 --- /dev/null +++ b/tools/generate-recipe-unlocks.js @@ -0,0 +1,56 @@ +// Rebuild the checked-in recipe-book advancements; Node is not needed for normal builds. +const fs = require('fs'); +const path = require('path'); + +const root = path.resolve(__dirname, '..'); +const properties = fs.readFileSync(path.join(root, 'gradle.properties'), 'utf8'); +const mod = /^mod_id=(.+)$/m.exec(properties)[1].trim(); +const data = path.join(root, 'src/main/resources/data', mod); +const recipes = path.join(data, 'recipes'); +const output = path.join(data, 'advancements/recipes'); +const check = process.argv.includes('--check'); +const ignored = new Set(['item:minecraft:stick', 'item:minecraft:string', + 'item:minecraft:feather', 'tag:forge:rods/wooden']); + +function choices(value) { + if (Array.isArray(value)) return value.flatMap(choices); + if (value && value.tag) return [{tag: value.tag}]; + if (value && value.item) return [{item: value.item}]; + throw new Error('Unsupported recipe ingredient: ' + JSON.stringify(value)); +} + +const expected = new Set(); +for (const file of fs.readdirSync(recipes).filter(name => name.endsWith('.json')).sort()) { + const recipe = JSON.parse(fs.readFileSync(path.join(recipes, file), 'utf8')); + if (!['minecraft:crafting_shaped', 'minecraft:crafting_shapeless', 'minecraft:smelting'].includes(recipe.type)) continue; + const inputs = choices(recipe.key ? Object.values(recipe.key) : recipe.ingredients || recipe.ingredient); + const materials = inputs.filter(value => !ignored.has(Object.entries(value)[0].join(':'))); + const unique = [...new Map((materials.length ? materials : inputs).map(value => [JSON.stringify(value), value])).values()]; + const id = `${mod}:${file.slice(0, -5)}`; + const criteria = {}; + unique.forEach((ingredient, index) => { + criteria[`has_ingredient_${index + 1}`] = { + trigger: 'minecraft:inventory_changed', conditions: {items: [ingredient]} + }; + }); + criteria.has_recipe = {trigger: 'minecraft:recipe_unlocked', conditions: {recipe: id}}; + const advancement = { + parent: 'minecraft:recipes/root', criteria, + requirements: [Object.keys(criteria)], rewards: {recipes: [id]} + }; + const text = JSON.stringify(advancement, null, 2) + '\n'; + const target = path.join(output, file); + expected.add(file); + if (check) { + if (!fs.existsSync(target) || fs.readFileSync(target, 'utf8').replace(/\r\n/g, '\n') !== text) { + throw new Error('Missing/stale recipe unlock: ' + target); + } + } else { + fs.mkdirSync(output, {recursive: true}); + fs.writeFileSync(target, text); + } +} +for (const file of fs.existsSync(output) ? fs.readdirSync(output) : []) { + if (file.endsWith('.json') && !expected.has(file)) throw new Error('Unexpected recipe unlock: ' + file); +} +console.log(`${mod}: ${expected.size} recipe unlocks ${check ? 'verified' : 'generated'}`);