diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6806ff9..4dc368a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,16 +1,16 @@ -name: Steam Advantage 1.16 CI +name: baseSteam 1.17 CI on: push: - branches: [master-1.16.5, 'feature/**'] + branches: [master-1.17.1, 'feature/**'] pull_request: - branches: [master-1.16.5] + branches: [master-1.17.1] permissions: contents: read concurrency: - group: steamadvantage-1.16-${{ github.workflow }}-${{ github.ref }} + group: basesteam-1.17-${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: @@ -19,24 +19,31 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 105 steps: - - name: Check out SteamAdvantage + - name: Check out baseSteam uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 - - name: Validate final Power source pin + - name: Validate coordinated dependency pins shell: bash run: | set -euo pipefail power_ref=$(sed -n 's/^poweradvantage_source_ref=//p' gradle.properties | tr -d '\r') power_hash=$(sed -n 's/^poweradvantage_deobf_sha256=//p' gradle.properties | tr -d '\r') if [[ ! "$power_ref" =~ ^[a-f0-9]{40}$ || ! "$power_hash" =~ ^[A-F0-9]{64}$ ]]; then - echo "::error::Final Power 1.16 dependency pin is pending." + echo "::error::The exact basePower 1.17 dependency pin is pending." + exit 1 + fi + bm_ref=$(sed -n 's/^basemetals_source_commit=//p' gradle.properties | tr -d '\r') + bm_hash=$(sed -n 's/^basemetals_deobf_sha256=//p' gradle.properties | tr -d '\r') + if [[ ! "$bm_ref" =~ ^[a-f0-9]{40}$ || ! "$bm_hash" =~ ^[A-F0-9]{64}$ ]]; then + echo "::error::The exact Base Metals 1.17 dependency pin is pending." exit 1 fi echo "POWERADVANTAGE_SOURCE_REF=$power_ref" >> "$GITHUB_ENV" + echo "BASEMETALS_SOURCE_REF=$bm_ref" >> "$GITHUB_ENV" - name: Check out pinned OreSpawn uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 with: repository: MinecraftModDevelopmentMods/OreSpawn - ref: a113e5d767169189f0e35ade1e173a12d550b00e + ref: b56e2b62a1a6ea4d1dd96f8646a87801a817dbdf path: .ci-dependencies/OreSpawn - name: Use canonical LF dependency inputs # Use the same source bytes on hosted and local dependency builds. @@ -45,24 +52,29 @@ jobs: uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 with: repository: MinecraftModDevelopmentMods/BaseMetals - ref: 995f6cc4dd2d5eecc628a42e5c43fa5390c24bca + ref: ${{ env.BASEMETALS_SOURCE_REF }} path: .ci-dependencies/BaseMetals - - name: Check out PowerAdvantage 1.16.5 + - name: Check out basePower 1.17.1 uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 with: - repository: MinecraftModDevelopmentMods/PowerAdvantage - ref: bcb75bfa91c14751ebf1e31865e1ec0ffa82c0b7 - path: .ci-dependencies/PowerAdvantage + repository: MinecraftModDevelopmentMods/basePower + ref: ${{ env.POWERADVANTAGE_SOURCE_REF }} + path: .ci-dependencies/basePower - name: Install pinned Java 25 Mavenizer runtime uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5 with: distribution: temurin java-version: '25.0.3+9.0.LTS' - - name: Install Java 8 toolchain + - name: Install Java 8 for legacy build utilities uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5 with: distribution: temurin java-version: '8.0.502+7' + - name: Install pinned Java 16 production toolchain + uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5 + with: + distribution: temurin + java-version: '16.0.2+7' - name: Install Java 17 for Gradle uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5 with: @@ -72,59 +84,67 @@ jobs: # These are Gradle project properties, not JVM system properties. shell: bash run: >- - echo "MMD_GRADLE_TOOLCHAINS=-Porg.gradle.java.installations.paths=$JAVA_HOME,$JAVA_HOME_8_X64,$JAVA_HOME_25_X64 + echo "MMD_GRADLE_TOOLCHAINS=-Porg.gradle.java.installations.paths=$JAVA_HOME,$JAVA_HOME_16_X64,$JAVA_HOME_8_X64,$JAVA_HOME_25_X64 -Porg.gradle.java.installations.auto-detect=false -Porg.gradle.java.installations.auto-download=false" >> "$GITHUB_ENV" - name: Set up Gradle uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6 - - name: Build 1.16.5 dependency chain + - name: Build 1.17.1 dependency chain id: dependencies shell: bash run: | set -euo pipefail orespawn="$GITHUB_WORKSPACE/.ci-dependencies/OreSpawn" basemetals="$GITHUB_WORKSPACE/.ci-dependencies/BaseMetals" - power="$GITHUB_WORKSPACE/.ci-dependencies/PowerAdvantage" + power="$GITHUB_WORKSPACE/.ci-dependencies/basePower" + test "$(git -C "$power" rev-parse HEAD)" = "$POWERADVANTAGE_SOURCE_REF" + test "$(git -C "$basemetals" rev-parse HEAD)" = "$BASEMETALS_SOURCE_REF" chmod +x "$orespawn/gradlew" "$basemetals/gradlew" "$power/gradlew" (cd "$orespawn" && ./gradlew $MMD_GRADLE_TOOLCHAINS jar --no-daemon --stacktrace) (cd "$basemetals" && ./gradlew $MMD_GRADLE_TOOLCHAINS jar --no-daemon --stacktrace) - osjar="$orespawn/build/libs-dev/OreSpawn-4.1.0.116051-deobf.jar" - bmjar="$basemetals/build/libs-dev/BaseMetals-3.1.1.116051-deobf.jar" - (cd "$power" && ./gradlew $MMD_GRADLE_TOOLCHAINS jar verifyReleaseDependencies \ + osjar="$orespawn/build/libs-dev/OreSpawn-4.1.0.117011-deobf.jar" + bmjar="$basemetals/build/libs-dev/BaseMetals-3.1.1.117011-deobf.jar" + (cd "$power" && ./gradlew $MMD_GRADLE_TOOLCHAINS jar unitBootstrapJar verifyReleaseDependencies \ -PbaseMetalsDeobfJar="$bmjar" -PoreSpawnDeobfJar="$osjar" \ --no-daemon --stacktrace) - powerjar="$power/build/libs-dev/PowerAdvantage-2.4.7.116051-deobf.jar" - test -f "$osjar" && test -f "$bmjar" && test -f "$powerjar" + powerjar="$power/build/libs-dev/basePower-2.4.9.117011-deobf.jar" + bootstrap="$power/build/unit-bootstrap/forge-native-unit-bootstrap.jar" + test -f "$osjar" && test -f "$bmjar" && test -f "$powerjar" && test -f "$bootstrap" + release="$RUNNER_TEMP/basePower-2.4.9.117011.jar" + curl --fail --silent --show-error --location --retry 3 --output "$release" \ + 'https://maven.moddev.zone/releases/zone/moddev/mc/basepower/basePower/2.4.9.117011/basePower-2.4.9.117011.jar' + power_release_sha=$(sed -n 's/^poweradvantage_player_sha256=//p' gradle.properties | tr -d '\r') + printf '%s %s\n' "$power_release_sha" "$release" | sha256sum --check 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" + echo "bootstrap=$bootstrap" >> "$GITHUB_OUTPUT" - name: Build and audit release artifacts run: >- ./gradlew $MMD_GRADLE_TOOLCHAINS clean check build javadoc verifyReleaseDependencies verifyReleaseArtifacts writeReleaseChecksums verifyEclipseProductionClasspath + -PforgeCapabilityBootstrapJar=${{ steps.dependencies.outputs.bootstrap }} -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: SteamAdvantage-1.16.5-${{ github.sha }} + name: baseSteam-1.17.1-${{ github.sha }} if-no-files-found: error retention-days: 30 path: | - build/libs/SteamAdvantage-2.2.8.116051.jar - build/libs/SteamAdvantage-2.2.8.116051-sources.jar - build/libs/SteamAdvantage-2.2.8.116051-javadoc.jar + build/libs/baseSteam-2.2.10.117011.jar + build/libs/baseSteam-2.2.10.117011-sources.jar + build/libs/baseSteam-2.2.10.117011-javadoc.jar build/release/SHA256SUMS CHANGELOG.txt - name: Upload diagnostics on failure if: failure() uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7 with: - name: SteamAdvantage-1.16.5-diagnostics-${{ github.sha }} + name: baseSteam-1.17.1-diagnostics-${{ github.sha }} if-no-files-found: ignore retention-days: 14 path: | @@ -132,5 +152,5 @@ jobs: build/reports/** build/*-run/logs/** build/problems/** - .ci-dependencies/PowerAdvantage/build/reports/** - .ci-dependencies/PowerAdvantage/build/libs-dev/*.jar + .ci-dependencies/basePower/build/reports/** + .ci-dependencies/basePower/build/libs-dev/*.jar diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 2d332dc..f1cd3f9 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -2,9 +2,9 @@ name: CodeQL on: push: - branches: [master-1.16.5, 'feature/**'] + branches: [master-1.17.1, 'feature/**'] pull_request: - branches: [master-1.16.5] + branches: [master-1.17.1] schedule: - cron: '53 7 * * 4' @@ -19,24 +19,31 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 90 steps: - - name: Check out SteamAdvantage + - name: Check out baseSteam uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 - - name: Validate final Power source pin + - name: Validate coordinated dependency pins shell: bash run: | set -euo pipefail power_ref=$(sed -n 's/^poweradvantage_source_ref=//p' gradle.properties | tr -d '\r') power_hash=$(sed -n 's/^poweradvantage_deobf_sha256=//p' gradle.properties | tr -d '\r') if [[ ! "$power_ref" =~ ^[a-f0-9]{40}$ || ! "$power_hash" =~ ^[A-F0-9]{64}$ ]]; then - echo "::error::Final Power 1.16 dependency pin is pending." + echo "::error::The exact basePower 1.17 dependency pin is pending." + exit 1 + fi + bm_ref=$(sed -n 's/^basemetals_source_commit=//p' gradle.properties | tr -d '\r') + bm_hash=$(sed -n 's/^basemetals_deobf_sha256=//p' gradle.properties | tr -d '\r') + if [[ ! "$bm_ref" =~ ^[a-f0-9]{40}$ || ! "$bm_hash" =~ ^[A-F0-9]{64}$ ]]; then + echo "::error::The exact Base Metals 1.17 dependency pin is pending." exit 1 fi echo "POWERADVANTAGE_SOURCE_REF=$power_ref" >> "$GITHUB_ENV" + echo "BASEMETALS_SOURCE_REF=$bm_ref" >> "$GITHUB_ENV" - name: Check out pinned OreSpawn uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 with: repository: MinecraftModDevelopmentMods/OreSpawn - ref: a113e5d767169189f0e35ade1e173a12d550b00e + ref: b56e2b62a1a6ea4d1dd96f8646a87801a817dbdf path: .ci-dependencies/OreSpawn - name: Use canonical LF dependency inputs # Use the same source bytes on hosted and local dependency builds. @@ -45,24 +52,29 @@ jobs: uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 with: repository: MinecraftModDevelopmentMods/BaseMetals - ref: 995f6cc4dd2d5eecc628a42e5c43fa5390c24bca + ref: ${{ env.BASEMETALS_SOURCE_REF }} path: .ci-dependencies/BaseMetals - - name: Check out PowerAdvantage 1.16.5 + - name: Check out basePower 1.17.1 uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 with: - repository: MinecraftModDevelopmentMods/PowerAdvantage - ref: bcb75bfa91c14751ebf1e31865e1ec0ffa82c0b7 - path: .ci-dependencies/PowerAdvantage + repository: MinecraftModDevelopmentMods/basePower + ref: ${{ env.POWERADVANTAGE_SOURCE_REF }} + path: .ci-dependencies/basePower - name: Install pinned Java 25 Mavenizer runtime uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5 with: distribution: temurin java-version: '25.0.3+9.0.LTS' - - name: Install Java 8 toolchain + - name: Install Java 8 for legacy build utilities uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5 with: distribution: temurin java-version: '8.0.502+7' + - name: Install pinned Java 16 production toolchain + uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5 + with: + distribution: temurin + java-version: '16.0.2+7' - name: Install Java 17 for Gradle uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5 with: @@ -72,43 +84,46 @@ jobs: # These are Gradle project properties, not JVM system properties. shell: bash run: >- - echo "MMD_GRADLE_TOOLCHAINS=-Porg.gradle.java.installations.paths=$JAVA_HOME,$JAVA_HOME_8_X64,$JAVA_HOME_25_X64 + echo "MMD_GRADLE_TOOLCHAINS=-Porg.gradle.java.installations.paths=$JAVA_HOME,$JAVA_HOME_16_X64,$JAVA_HOME_8_X64,$JAVA_HOME_25_X64 -Porg.gradle.java.installations.auto-detect=false -Porg.gradle.java.installations.auto-download=false" >> "$GITHUB_ENV" - name: Set up Gradle uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6 - - name: Build 1.16.5 dependency chain + - name: Build 1.17.1 dependency chain id: dependencies shell: bash run: | set -euo pipefail orespawn="$GITHUB_WORKSPACE/.ci-dependencies/OreSpawn" basemetals="$GITHUB_WORKSPACE/.ci-dependencies/BaseMetals" - power="$GITHUB_WORKSPACE/.ci-dependencies/PowerAdvantage" + power="$GITHUB_WORKSPACE/.ci-dependencies/basePower" + test "$(git -C "$power" rev-parse HEAD)" = "$POWERADVANTAGE_SOURCE_REF" + test "$(git -C "$basemetals" rev-parse HEAD)" = "$BASEMETALS_SOURCE_REF" chmod +x "$orespawn/gradlew" "$basemetals/gradlew" "$power/gradlew" (cd "$orespawn" && ./gradlew $MMD_GRADLE_TOOLCHAINS jar --no-daemon --stacktrace) (cd "$basemetals" && ./gradlew $MMD_GRADLE_TOOLCHAINS jar --no-daemon --stacktrace) - osjar="$orespawn/build/libs-dev/OreSpawn-4.1.0.116051-deobf.jar" - bmjar="$basemetals/build/libs-dev/BaseMetals-3.1.1.116051-deobf.jar" - (cd "$power" && ./gradlew $MMD_GRADLE_TOOLCHAINS jar verifyReleaseDependencies \ + osjar="$orespawn/build/libs-dev/OreSpawn-4.1.0.117011-deobf.jar" + bmjar="$basemetals/build/libs-dev/BaseMetals-3.1.1.117011-deobf.jar" + (cd "$power" && ./gradlew $MMD_GRADLE_TOOLCHAINS jar unitBootstrapJar verifyReleaseDependencies \ -PbaseMetalsDeobfJar="$bmjar" -PoreSpawnDeobfJar="$osjar" \ --no-daemon --stacktrace) - powerjar="$power/build/libs-dev/PowerAdvantage-2.4.7.116051-deobf.jar" - test -f "$osjar" && test -f "$bmjar" && test -f "$powerjar" + powerjar="$power/build/libs-dev/basePower-2.4.9.117011-deobf.jar" + bootstrap="$power/build/unit-bootstrap/forge-native-unit-bootstrap.jar" + test -f "$osjar" && test -f "$bmjar" && test -f "$powerjar" && test -f "$bootstrap" 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" + echo "bootstrap=$bootstrap" >> "$GITHUB_OUTPUT" - name: Initialize CodeQL uses: github/codeql-action/init@db488ddef3bf6cb639b32c2e9a7c0a7ea8271d28 # v4 with: languages: java-kotlin - - name: Compile SteamAdvantage production code + - name: Compile baseSteam production code run: | chmod +x ./gradlew ./gradlew $MMD_GRADLE_TOOLCHAINS clean classes --rerun-tasks --no-build-cache --no-daemon --stacktrace \ + -PforgeCapabilityBootstrapJar=${{ steps.dependencies.outputs.bootstrap }} \ -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 diff --git a/.github/workflows/release-on-tag.yml b/.github/workflows/release-on-tag.yml index 42fd0e3..2d1fca3 100644 --- a/.github/workflows/release-on-tag.yml +++ b/.github/workflows/release-on-tag.yml @@ -1,4 +1,4 @@ -name: Validate Steam Advantage release tag +name: Validate baseSteam release tag on: push: @@ -10,13 +10,13 @@ permissions: contents: read concurrency: - group: steamadvantage-release-tag-${{ github.ref_name }} + group: basesteam-release-tag-${{ github.ref_name }} cancel-in-progress: false jobs: validate-release-tag: name: Validate tag for manual release confirmation - if: github.repository == 'MinecraftModDevelopmentMods/SteamAdvantage' + if: github.repository == 'MinecraftModDevelopmentMods/baseSteam' runs-on: ubuntu-latest timeout-minutes: 10 diff --git a/.github/workflows/validate-gradle-build.yml b/.github/workflows/validate-gradle-build.yml index fc66575..0bf04b8 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.16.5 + - master-1.17.1 - 'feature/**' pull_request: branches: - - master-1.16.5 + - master-1.17.1 permissions: contents: read diff --git a/CHANGELOG.txt b/CHANGELOG.txt index c22fde9..8cf1e52 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,3 +1,35 @@ +baseSteam 2.2.10.117011 (Minecraft 1.17.1) + +- Steam Advantage is now baseSteam. Install it with basePower 2.4.9.117011 and find its blocks and items in the shared basePower creative tab. +- Recognize older Steam Advantage world IDs while keeping baseSteam registry paths, machine data and legacy save repairs. +- Carry over Steam Advantage common settings without overwriting an existing baseSteam config. +- Keep Minecraft 1.17.1 machine behavior, models, GUIs, drops and recipe unlocks unchanged. +- Fix repeated Eclipse project refreshes without changing the game launch runtime. +- Build and test against the published basePower 2.4.9.117011 release. + +Steam Advantage 2.2.9.117011 (local 1.17.1 port candidate) + +- Target Minecraft 1.17.1 / Forge 37.1.1, official mappings and MCP 20210706.113038. +- Use Java 16 production bytecode with Java 17 Gradle and Java 25 Mavenizer. +- Preserve stable steamadvantage IDs, NBT, recipes, machine costs and the legacy Power API names. +- Use native position/state factories and tag-only loading; moving drills retain destination constructor state. +- Keep shared machine tick ordering and add the native drill-bit helper ticker. +- Port render buffers, renderer registration, model predicates, config events and native source-fluid pickup. +- Add native pickaxe tags without new tool tiers, and retain self-drops and recipe unlocks. +- Use the 1.17 ingredient-predicate format so unrelated items do not unlock recipes. +- Skip the nine optional Base Metals crushing recipes when Base Metals is absent, including APOCALYPTIC mode; retain their inputs, outputs and quantities. +- Stop musket terrain rays at unloaded chunk boundaries; retain loaded-player sounds and last-cartridge firing. +- Read native lava temperature without changing vanilla heat input or machine ratios. +- Use the published Base Metals raw-metal crushing recipes without overriding their quantities. +- Retain all 1.16 regression coverage and add native factory, position, helper-ticker and chunk-boundary tests. +- Pin the coordinated local Power source/API checkpoint and pass 199 Java tests, release/resource audits, Javadoc and Eclipse configuration checks. +- Track combined Power, Steam and Electric status in Power Advantage's docs/1.17/CURRENT-QUALIFICATION.md; overall qualification remains open. +- Use Power's shared machine-persistence checkpoint; Steam's machine Java is unchanged and full runtime qualification remains pending. +- Pin Power's native registry-alias correction without changing Steam's production Java or public identities. +- Rebuild offline with all tasks forced and retain identical production, sources, Javadoc and development jar bytes. +- Retain failed receipts separately; packaged runtime and client-launch acceptance remain open, and no historical pass qualifies this port. +- Keep manual gameplay, multiplayer, migration acceptance and publication approval as separate gates. + Steam Advantage 2.2.8.116051 (local port candidate) - Read live redstone before the crusher and furnace resume after loading, preserving saved work and the first-tick steam heat bonus without changing the normal polling interval. diff --git a/README.md b/README.md index 29ef05b..a4f0664 100644 --- a/README.md +++ b/README.md @@ -1,105 +1,116 @@ -# SteamAdvantage +# baseSteam -**Minecraft 1.16.5 source port candidate, version 2.2.8.116051.** -This source port remains pending manual acceptance and publication approval. -The follow-up checks use finite supplies and ordinary server ticks to measure -actual machine output, energy use, blocked routes and saved state. They also -cover fluid pickup without destroying waterlogged blocks. Rendered GUI checks -require machine names and inventory labels as well as correctly placed controls. -The shared record below identifies the current jars and each completed run; -earlier results are retained separately rather than counted again. -Earlier-candidate results and accepted 1.15 results do not qualify this candidate. +**Minecraft 1.17.1 (Forge), version 2.2.10.117011. Local candidate.** -The [shared test record](https://github.com/MinecraftModDevelopmentMods/PowerAdvantage/blob/master-1.16.5/docs/1.16/CURRENT-QUALIFICATION.md) -records the exact jars, completed checks and remaining limits. +baseSteam, formerly Steam Advantage, adds boilers, steam-powered machines, +pumps, storage, elevators and a blackpowder musket to basePower. Its items and +blocks use the shared basePower creative tab. This version is not published. -Steam Advantage adds steam-powered machines and infrastructure to Power Advantage. +## Upgrading a World -## Build Target - -The `master-1.16.5` target uses Minecraft 1.16.5, Forge 36.2.34, -official 1.16.5 mappings, and MCP config 20210115.111550. -ForgeGradle 7.0.34 and Gradle 9.6.1 run on Temurin 17.0.1+12. -Compilation and Minecraft launches use Temurin 8.0.502+7 and Java 8 bytecode; -Mavenizer uses Temurin 25.0.3+9.0.LTS. - -Power Advantage 2.4.7.116051 remains a separate required mod. The pinned compile -dependency uses source `bcb75bfa91c14751ebf1e31865e1ec0ffa82c0b7`. -Its development jar SHA-256 is -`2FB923944A456B4F26AB2F9212C646469CE3F49BFD4DAE894C15559B48908386`. -These exact pins are recorded in `gradle.properties` and audited during builds. -Use an immutable development jar through `-PpowerAdvantageDeobfJar=`. -Release audits reject missing, placeholder, or mismatched pins. These source pins -do not grant publication approval. - -Power's migration hook preserves legacy Forge swimming speed, nametag distance, -gravity and reach attributes, including their values and modifiers. Steam uses -that shared hook without duplicating the conversion. - -Earlier dependency-candidate build and runtime receipts remain historical evidence -for their original inputs. They do not qualify the current candidate. Automated -build and test results, bounded runtime checks, and manual acceptance are separate -gates. - -The supplied native development dependencies are Base Metals 3.1.1.116051 -(source `995f6cc4dd2d5eecc628a42e5c43fa5390c24bca`) and OreSpawn 4.1.0.116051 -(source `a113e5d767169189f0e35ade1e173a12d550b00e`). Their exact jar hashes -are recorded in `gradle.properties`. None of the dependencies is embedded. - -With matching native development jars available: - -```text -gradlew.bat compileJava compileTestJava -PpowerAdvantageDeobfJar= -``` +Back up your world and test the upgrade on a copy. Replace Steam Advantage and +Power Advantage with baseSteam and basePower; do not install both sets of mods. +The migration recognizes old Steam Advantage IDs and keeps the registry paths, +machine settings and saved data used by earlier baseSteam versions. The +Minecraft 1.17.1 world upgrade still needs verification for this candidate. -Alternative layouts may also pass `-PbaseMetalsDeobfJar=` and -`-PoreSpawnDeobfJar=`. Explicit toolchain installations can be supplied -through Gradle project properties. Do not use a dependency from an older target. +Existing `basesteam-common.toml` settings take precedence. When that file is +absent, baseSteam can copy `steamadvantage-common.toml` or import settings from an +older `.cfg` file. The old config is left in place. -With the exact dependency jars pinned, the full build gates are: +## Build Target -```text -gradlew.bat clean check build javadoc verifyReleaseDependencies verifyReleaseArtifacts writeReleaseChecksums verifyEclipseProductionClasspath +Minecraft 1.17.1, Forge 37.1.1, official 1.17.1 mappings and MCP +20210706.113038. ForgeGradle 7.0.34 and Gradle 9.6.1 run on Java 17. +Production compilation and launches use Temurin 16.0.2+7, class major 60. +Mavenizer uses Java 25. Java 8 is available only for older build utilities. + +The mod ID and resource namespace are `basesteam`; the Java implementation +namespace is `zone.moddev.mc.basesteam`. The shared `cyano.poweradvantage.api` +names remain in use. + +basePower 2.4.9.117011 is required. Base Metals 3.1.1.117011 remains optional +in Forge; the CurseForge install metadata lists basePower and Base Metals. +Build against the exact basePower source and development jar pinned in +`gradle.properties`. The player jar is the published +[basePower 2.4.9.117011 release](https://maven.moddev.zone/releases/zone/moddev/mc/basepower/basePower/2.4.9.117011/basePower-2.4.9.117011.jar). +The Base Metals startup fix is also published as 3.1.1.117011. OreSpawn +4.1.0.117011 remains in the dependency chain. No dependency is embedded. + +## Local Verification + +Use the checked-in Gradle wrapper and supply explicit paths to the development +jars matching the pins in `gradle.properties`. +Runtime jars are not interchangeable with development jars. Use the test-only +Forge capability bootstrap from the same basePower source pin. Use a Steam-only +Gradle user home; do not build against a sibling checkout's cache or mutable jar. + +For example, from the Steam checkout in PowerShell: + +```powershell +$env:JAVA_HOME = $env:JAVA17_HOME +$jdks = @($env:JAVA17_HOME, $env:JAVA16_HOME, $env:JAVA25_HOME, $env:JAVA8_HOME) -join ',' +$toolchains = @("-Porg.gradle.java.installations.paths=$jdks", + '-Porg.gradle.java.installations.auto-detect=false', + '-Porg.gradle.java.installations.auto-download=false') +$env:GRADLE_USER_HOME = $env:BASESTEAM_GRADLE_USER_HOME +./gradlew.bat @toolchains check build deobfJar javadoc ` + verifyReleaseDependencies verifyReleaseArtifacts writeReleaseChecksums ` + verifyEclipseProductionClasspath ` + "-PpowerAdvantageDeobfJar=$env:POWERADVANTAGE_DEOBF_JAR" ` + "-PbaseMetalsDeobfJar=$env:BASEMETALS_DEOBF_JAR" ` + "-PoreSpawnDeobfJar=$env:ORESPAWN_DEOBF_JAR" ` + "-PforgeCapabilityBootstrapJar=$env:FORGE_CAPABILITY_BOOTSTRAP_JAR" ``` -A compilation pass is not a test pass, release-audit pass, or runtime acceptance. -Shared Gradle caches require exclusive ownership; do not run competing builds -against the same cache or checkout. - -## Compatibility - -Runtime identities remain `steamadvantage:*`; the implementation namespace remains -`zone.moddev.mc.steamadvantage`. Registry names, tile IDs, resources, recipes, -trade ranges, machine costs, output quantities, and persistent NBT remain stable. - -The native port uses world-only conduit callbacks. Power Advantage owns registry-key -dimension handling, shared capability invalidation/revival, fluid adapters, and base -tile lifecycle. Steam uses native `load(BlockState, CompoundNBT)` and -`save(CompoundNBT)`, retaining deferred drill targets, cached facing, progress, -inventory, energy, legacy tank aliases, and musket loaded-state bytes. -Saving a drill must not reacquire its world or neighbouring chunks. - -Client setup registers native item model predicates, drill rendering, and the -track's cutout layer. Native block predicates preserve non-occlusion and prevent -full-collision tracks and platforms from conducting redstone. Existing renderer -geometry, UVs, lighting, and animation axes are retained. - -Every crafting variant has ingredient-triggered recipe-book discovery. -Regenerate unlock JSON after recipe changes with -`node tools/generate-recipe-unlocks.js`. Processing recipes remain outside the -crafting book. Recipe conditions are registered on the queued setup thread. - -Unit tests cover native properties, exact levels and costs, persistence, -world-only callbacks, recipe discovery, and resources. They do not establish -in-world GUIs, sounds, interactions, multiplayer behavior, or arbitrary modpacks. - -Power Advantage supplies the combined-mod runtime harness and shared legacy -migration hook. Upgrade testing must use disposable whole-world copies with -pinned inputs. Preserve original worlds and backups; never open a world in an -older Minecraft version after upgrading it. Manual acceptance and publication -approval remain separate from automated evidence. - -The shared [machine operating checks](https://github.com/MinecraftModDevelopmentMods/PowerAdvantage/blob/master-1.16.5/docs/1.16/OPERATING-TESTS.md) -exercise finite boiler, processing, pumping, storage, elevator and musket jobs. -They check real output and resource use, including failed jobs and complete -server restarts. Live player controls and rendering still need a walkthrough. +On other platforms use `./gradlew`. The artifact family is +`baseSteam-2.2.10.117011.jar`, plus sources and Javadoc. The development jar +stays under `build/libs-dev`. + +`node tools/verify-native-port.js` and `node tools/generate-recipe-unlocks.js --check` +run without the dependency jars. The [port status](docs/PORT117-STATUS.md) separates +these checks from the pending build and runtime gates and retains the earlier +Steam Advantage evidence. + +## Port Details + +Native block-entity factories preserve their actual constructor position and +block state. Loading NBT does not replace that position, including when a drill +moves along a track. Power's shared native ticker retains per-tick work before +the eight-tick power update on both logical sides. The drill-bit helper has its +own native ticker. + +The port retains first-loaded-tick redstone sampling in the crusher and furnace, +water-only boiler inputs, dirty-owner callbacks, finite energy and fluid +accounting, persistence aliases, helper state and GUI caption rows. Native +PoseStack and vertex consumers retain the drill geometry, UVs and animation. +Musket terrain traversal stops before unloaded chunks; sound dispatch still +uses loaded server players. + +Native pickaxe tags cover the metal machines and helpers without introducing +new minimum tool tiers or changing drop requirements. Ordinary blocks retain +their self-drop tables; hidden helpers still have no item form or drops. +Recipe ingredients, processing costs and quantities are unchanged. Recipe-book +advancements use native singleton `items` predicates; the ignored legacy `item` +field must not turn an ingredient discovery into an unrestricted predicate. +Optional Base Metals crushing recipes also require `forge:mod_loaded` before +their recipe-mode condition, so APOCALYPTIC loads safely without that serializer. + +Steam reads Base Metals' crushing recipes without overriding their balance. +Geothermal heat uses native Forge lava temperature, retaining the existing +1300 K input and resulting heat value. + +## Acceptance Still Required + +Historical results from earlier versions do not qualify this candidate. +Compilation, Java tests, repeat Eclipse refresh, packaged server/client checks, +world migration and manual gameplay are separate gates. + +Manual testing must cover all boilers, crusher and furnace reload/redstone, +drills in six directions and track moves with inventory and energy, helper +rotation and cleanup, pumps, stills, elevator rides, GUI captions and controls, +musket last-cartridge firing, terrain boundaries, sounds and enchantments, +multiplayer synchronization and capability unload/reload. + +Use disposable whole-world copies for upgrades. Preserve original worlds and +backups; never reopen an upgraded world with an older Minecraft version. diff --git a/build.gradle b/build.gradle index b05ca6b..9c4f653 100644 --- a/build.gradle +++ b/build.gradle @@ -16,7 +16,7 @@ plugins { group = project.mod_group version = project.mod_version -base.archivesName = 'SteamAdvantage' +base.archivesName = 'baseSteam' def versionParts = project.mod_version.toString().tokenize('.') if (versionParts.size() != 4 || !versionParts.every { it ==~ /\d+/ }) { @@ -44,7 +44,7 @@ ext.release_tag = project.mod_version java { toolchain { - languageVersion = JavaLanguageVersion.of(8) + languageVersion = JavaLanguageVersion.of(16) vendor = JvmVendorSpec.ADOPTIUM } withSourcesJar() @@ -53,11 +53,11 @@ java { tasks.withType(JavaCompile).configureEach { javaCompiler = javaToolchains.compilerFor { - languageVersion = JavaLanguageVersion.of(8) + languageVersion = JavaLanguageVersion.of(16) vendor = JvmVendorSpec.ADOPTIUM } - sourceCompatibility = JavaVersion.VERSION_1_8 - targetCompatibility = JavaVersion.VERSION_1_8 + sourceCompatibility = JavaVersion.VERSION_16 + targetCompatibility = JavaVersion.VERSION_16 options.encoding = 'UTF-8' options.compilerArgs.addAll(['-Xmaxerrs', '1000']) } @@ -94,15 +94,15 @@ minecraft { 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 forge36RunTargets = [client: 'fmluserdevclient', server: 'fmluserdevserver', data: 'fmldatauserdev'] + def forge37RunTargets = [client: 'fmluserdevclient', server: 'fmluserdevserver', data: 'fmluserdevdata'] runs { configureEach { - mainClass = 'net.minecraftforge.userdev.LaunchTesting' + jvmArgs '--add-opens', 'java.base/java.lang.invoke=ALL-UNNAMED' workingDir.convention layout.projectDirectory.dir(configuredRunDirectory) systemProperty 'forge.logging.markers', 'REGISTRIES' systemProperty 'forge.logging.console.level', 'info' - mods { steamadvantage { source sourceSets.main } } - environment 'target', forge36RunTargets[name] + mods { basesteam { source sourceSets.main } } + environment 'target', forge37RunTargets[name] environment 'MCP_MAPPINGS', "${mapping_channel}_${mapping_version}" environment 'MCP_VERSION', mcp_version environment 'FORGE_VERSION', forge_version @@ -130,14 +130,14 @@ sourceSets.main.resources { 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.16 launches.' + description = 'Merges classes and processed resources for Forge 1.17 launches.' dependsOn tasks.named('classes') from sourceSets.main.output into forgeRunModClassesDirectory } tasks.withType(JavaExec).configureEach { javaLauncher = javaToolchains.launcherFor { - languageVersion = JavaLanguageVersion.of(8) + languageVersion = JavaLanguageVersion.of(16) vendor = JvmVendorSpec.ADOPTIUM } if (name in ['runClient', 'runServer', 'runData']) { @@ -165,46 +165,27 @@ repositories { } } -// SteamAdvantage needs the full PowerAdvantage implementation in development, -// but the retired MMD Maven cannot provide a dependable deobfuscated artifact. -// Local builds use the sibling FG7 output; CI supplies the same pinned jar via -// -PpowerAdvantageDeobfJar after building the audited upstream commit. -def defaultPowerAdvantageDeobfJar = file("../../PowerAdvantage/build/libs-dev/" \ - + "PowerAdvantage-${project.poweradvantage_version}-deobf.jar") -def powerAdvantageDeobfJar = providers.gradleProperty('powerAdvantageDeobfJar') - .map { file(it) } - .getOrElse(defaultPowerAdvantageDeobfJar) -if (!powerAdvantageDeobfJar.isFile()) { - throw new GradleException("Missing PowerAdvantage deobf jar at ${powerAdvantageDeobfJar}. " - + "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 116/BaseMetals/build/libs-dev/' - + 'BaseMetals-3.1.1.116051-deobf.jar')) -if (!baseMetalsDeobfJar.isFile()) { - throw new GradleException("Missing Base Metals deobf jar at ${baseMetalsDeobfJar}. " - + "Build Base Metals 1.16 first, or pass -PbaseMetalsDeobfJar=.") -} -def oreSpawnDeobfJar = file(providers.gradleProperty('oreSpawnDeobfJar') - .getOrElse('../../../../MinecraftMineralogy/OS116/OreSpawn/build/libs-dev/' - + 'OreSpawn-4.1.0.116051-deobf.jar')) -if (!oreSpawnDeobfJar.isFile()) { - throw new GradleException("Missing OreSpawn deobf jar at ${oreSpawnDeobfJar}. " - + "Build OreSpawn 1.16 first, or pass -PoreSpawnDeobfJar=.") +// Require explicit development jars so sibling builds cannot silently replace the inputs. +def requiredDeobfJar = { String property, String dependency -> + File jarFile = providers.gradleProperty(property).map { file(it) }.getOrNull() + if (jarFile == null || !jarFile.isFile()) { + throw new GradleException("Supply the pinned ${dependency} development jar via -P${property}=.") + } + jarFile } +def powerAdvantageDeobfJar = requiredDeobfJar('powerAdvantageDeobfJar', 'basePower') +def baseMetalsDeobfJar = requiredDeobfJar('baseMetalsDeobfJar', 'Base Metals') +def oreSpawnDeobfJar = requiredDeobfJar('oreSpawnDeobfJar', 'OreSpawn') dependencies { implementation minecraft.dependency( "net.minecraftforge:forge:${project.minecraft_version}-${project.forge_version}") - // PowerAdvantage is required at runtime but remains a separate mod jar. + // basePower 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. + // Required transitively by the coordinated basePower/Base Metals development runtime. compileOnly files(oreSpawnDeobfJar) runtimeOnly files(oreSpawnDeobfJar) testImplementation 'junit:junit:4.13.2' @@ -228,6 +209,24 @@ tasks.named('processResources', ProcessResources) { filesMatching(archiveTextPatterns, normalizeArchiveLineEndings) } +def forgeCapabilityBootstrapJar = providers.gradleProperty('forgeCapabilityBootstrapJar').map { file(it) } +tasks.withType(Test).configureEach { + inputs.files(forgeCapabilityBootstrapJar) + doFirst { + File bootstrapJar = forgeCapabilityBootstrapJar.getOrNull() + if (bootstrapJar == null || !bootstrapJar.isFile()) { + throw new GradleException('Supply the verified basePower test bootstrap via -PforgeCapabilityBootstrapJar=') + } + new ZipFile(bootstrapJar).withCloseable { zip -> + def manifest = new Manifest(zip.getInputStream(zip.getEntry('META-INF/MANIFEST.MF'))).mainAttributes + if (manifest.getValue('Premain-Class') != 'zone.moddev.mc.advantageworks.unit.ForgeCapabilityBootstrap') { + throw new GradleException('Unexpected native capability test bootstrap entry point') + } + } + jvmArgs "-javaagent:${bootstrapJar.canonicalPath}" + } +} + def prepareEclipseResources = tasks.register('prepareEclipseResources') { group = 'ide' description = 'Copies Gradle-processed resources into Eclipse production output.' @@ -297,6 +296,10 @@ tasks.register('deobfJar') { dependsOn tasks.named('jar') } +tasks.named('compileJava') { + dependsOn 'verifyNativeDevelopmentDependencies' +} + tasks.named('sourcesJar', Jar) { filteringCharset = 'UTF-8' includeEmptyDirs = false @@ -345,90 +348,104 @@ tasks.register('verifyReleaseConfiguration') { group = 'verification' description = 'Validates release identity, target metadata, and dependency policy.' doLast { - if (new JsonSlurper().parse(file('src/main/resources/pack.mcmeta')).pack.pack_format != 6) { - throw new GradleException('Minecraft 1.16.5 resources must use pack format 6') + if (new JsonSlurper().parse(file('src/main/resources/pack.mcmeta')).pack.pack_format != 7) { + throw new GradleException('Minecraft 1.17.1 resources must use pack format 7') } - if (project.mod_version != '2.2.8.116051') { - throw new GradleException("Unexpected SteamAdvantage release version: ${project.mod_version}") + if (project.mod_version != '2.2.10.117011') { + throw new GradleException("Unexpected baseSteam release version: ${project.mod_version}") } - if (project.minecraft_version != '1.16.5' - || project.forge_version != '36.2.34' + if (project.minecraft_version != '1.17.1' + || project.forge_version != '37.1.1' || project.mapping_channel != 'official' - || project.mapping_version != '1.16.5' - || project.mcp_version != '20210115.111550') { + || project.mapping_version != '1.17.1' + || project.mcp_version != '20210706.113038') { throw new GradleException('Unexpected Minecraft, Forge, or mappings target') } if (project.loader_name != 'forge' || project.loader_code != '1' - || project.java_version != '8' - || project.java_toolchain_version != '8.0.502+7' + || project.java_version != '16' + || project.java_toolchain_version != '16.0.2+7' || project.gradle_java_version != '17') { throw new GradleException('Unexpected release dispatcher target metadata') } - if (project.mod_id != 'steamadvantage' - || project.group.toString() != 'zone.moddev.mc.steamadvantage' - || base.archivesName.get() != 'SteamAdvantage' + if (project.mod_id != 'basesteam' + || project.mod_name != 'baseSteam' + || project.group.toString() != 'zone.moddev.mc.basesteam' + || base.archivesName.get() != 'baseSteam' || project.mod_license != 'GPL-3.0-only' - || project.curseforge_project_id != '240984') { + || project.curseforge_project_id != '1781373') { throw new GradleException('Unexpected Forge, Maven, archive, or CurseForge identity') } - if (project.cf_requirements != 'power-advantage,base-metals' + if (project.cf_requirements != 'basepower,base-metals' || project.cf_optionals != '' - || project.cf_versions != '1.16.5') { + || project.cf_versions != '1.17.1') { throw new GradleException('Unexpected CurseForge dependency or game-version metadata') } - if (project.poweradvantage_version != '2.4.7.116051' - || project.poweradvantage_source_repository != 'MinecraftModDevelopmentMods/PowerAdvantage' - || project.poweradvantage_source_ref != 'bcb75bfa91c14751ebf1e31865e1ec0ffa82c0b7' - || project.poweradvantage_deobf_sha256 != '2FB923944A456B4F26AB2F9212C646469CE3F49BFD4DAE894C15559B48908386') { - throw new GradleException('Unexpected PowerAdvantage compile dependency identity') + if (project.basemetals_version != '3.1.1.117011' + || project.orespawn_version != '4.1.0.117011' + || project.orespawn_source_commit != 'b56e2b62a1a6ea4d1dd96f8646a87801a817dbdf' + || project.orespawn_deobf_sha256 != 'CB7A736314842B110B2E4788FBD5E21D4AE8803C5ED34A49199B034BE572DA39') { + throw new GradleException('Unexpected published-source development API identity') + } + if (project.poweradvantage_version != '2.4.9.117011' + || project.poweradvantage_source_repository != 'MinecraftModDevelopmentMods/basePower') { + throw new GradleException('Unexpected basePower compile dependency identity') } String mainSource = file( - 'src/main/java/zone/moddev/mc/steamadvantage/SteamAdvantage.java').getText('UTF-8') - if (!mainSource.contains('MODID = "steamadvantage"') - || !mainSource.contains('VERSION = "2.2.8.116051"')) { - throw new GradleException('SteamAdvantage source identity changed') + 'src/main/java/zone/moddev/mc/basesteam/SteamAdvantage.java').getText('UTF-8') + if (!mainSource.contains('MODID = "basesteam"') + || !mainSource.contains('VERSION = "2.2.10.117011"')) { + throw new GradleException('baseSteam source identity changed') } String metadata = file('src/main/resources/META-INF/mods.toml').getText('UTF-8').replace('\r\n', '\n') - ['modId="steamadvantage"', 'modId="poweradvantage"', 'modId="basemetals"', - 'versionRange="[2.4.7.116051,3.0.0)"'].each { marker -> + ['modId="basesteam"', 'displayName="baseSteam"', + 'modId="basepower"\nmandatory=true\nversionRange="[2.4.9.117011,3.0.0)"', + 'modId="basemetals"\nmandatory=false\nversionRange="[3.1.1.117011,4.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') - } } } -tasks.register('verifyReleaseDependencies') { +tasks.register('verifyNativeDevelopmentDependencies') { group = 'verification' - description = 'Resolves Forge and audits the exact required PowerAdvantage development jar.' - dependsOn tasks.named('verifyReleaseConfiguration') + description = 'Resolves Forge and audits the exact development jars.' doLast { + Properties pins = new Properties() + file('gradle.properties').withInputStream { pins.load(it) } + ['poweradvantage_source_ref', 'poweradvantage_deobf_sha256', + 'basemetals_source_commit', 'basemetals_deobf_sha256'].each { key -> + String pinned = pins.getProperty(key, '') + def pattern = key.endsWith('_sha256') ? /[A-F0-9]{64}/ : /[a-f0-9]{40}/ + if (!(pinned ==~ pattern) || project.property(key) != pinned) { + throw new GradleException("Supply the exact coordinated ${key} in gradle.properties; overrides are not accepted.") + } + } String actualHash = MessageDigest.getInstance('SHA-256') .digest(powerAdvantageDeobfJar.bytes).encodeHex().toString().toUpperCase() if (actualHash != project.poweradvantage_deobf_sha256) { - throw new GradleException("PowerAdvantage SHA-256 is ${actualHash}, expected " + throw new GradleException("basePower SHA-256 is ${actualHash}, expected " + project.poweradvantage_deobf_sha256) } new ZipFile(powerAdvantageDeobfJar).withCloseable { zip -> ['cyano/poweradvantage/api/PoweredEntity.class', 'cyano/poweradvantage/api/GUIBlock.class', 'cyano/poweradvantage/api/FluidCategoryRegistry.class', - 'zone/moddev/mc/poweradvantage/conduitnetwork/ConduitRegistry.class', - 'zone/moddev/mc/poweradvantage/init/Fluids.class'].each { required -> + 'cyano/poweradvantage/api/migration/LegacyMigrationApi.class', + 'zone/moddev/mc/basepower/conduitnetwork/ConduitRegistry.class', + 'zone/moddev/mc/basepower/init/Fluids.class', + 'zone/moddev/mc/basepower/init/ItemGroups.class'].each { required -> if (zip.getEntry(required) == null) { - throw new GradleException("PowerAdvantage dependency is missing ${required}") + throw new GradleException("basePower dependency is missing ${required}") } } def manifest = new Manifest(zip.getInputStream(zip.getEntry('META-INF/MANIFEST.MF'))).mainAttributes if (manifest.getValue('Implementation-Version') != project.poweradvantage_version) { - throw new GradleException('PowerAdvantage dependency manifest has the wrong version') + throw new GradleException('basePower dependency manifest has the wrong version') } - if (manifest.getValue('Built-On') != '1.16.5-36.2.34' - || manifest.getValue('Built-On-Java') != '8') { - throw new GradleException('PowerAdvantage must be the native 1.16.5 Java 8 dependency') + if (manifest.getValue('Built-On') != '1.17.1-37.1.1' + || manifest.getValue('Built-On-Java') != '16') { + throw new GradleException('basePower must be the native 1.17.1 Java 16 dependency') } } String actualBaseMetalsHash = MessageDigest.getInstance('SHA-256') @@ -446,11 +463,11 @@ tasks.register('verifyReleaseDependencies') { Set compileFiles = configurations.compileClasspath.files.collect { it.canonicalFile } as Set if (!compileFiles.contains(powerAdvantageDeobfJar.canonicalFile)) { - throw new GradleException('PowerAdvantage is missing from compileClasspath') + throw new GradleException('basePower is missing from compileClasspath') } Set runtimeFiles = configurations.runtimeClasspath.files.collect { it.canonicalFile } as Set if (!runtimeFiles.contains(powerAdvantageDeobfJar.canonicalFile)) { - throw new GradleException('PowerAdvantage is missing from runtimeClasspath') + throw new GradleException('basePower is missing from runtimeClasspath') } if (!runtimeFiles.contains(baseMetalsDeobfJar.canonicalFile)) { throw new GradleException('Base Metals is missing from runtimeClasspath') @@ -469,6 +486,13 @@ tasks.register('verifyReleaseDependencies') { } } +tasks.register('verifyReleaseDependencies') { + group = 'verification' + description = 'Audits native development dependencies with the final release source pin.' + dependsOn tasks.named('verifyReleaseConfiguration') + dependsOn tasks.named('verifyNativeDevelopmentDependencies') +} + tasks.register('verifyReleaseArtifacts') { group = 'verification' description = 'Audits the exact three distributable jars and release-critical contents.' @@ -508,13 +532,14 @@ tasks.register('verifyReleaseArtifacts') { new ZipFile(mainJar).withCloseable { zip -> List names = zip.entries().collect { it.name } ['META-INF/mods.toml', 'pack.mcmeta', - 'zone/moddev/mc/steamadvantage/SteamAdvantage.class', - 'zone/moddev/mc/steamadvantage/machines/SteamDrillTileEntity.class', - 'zone/moddev/mc/steamadvantage/machines/SteamPumpTileEntity.class', - 'zone/moddev/mc/steamadvantage/machines/GeothermalBoilerTileEntity.class', - 'assets/steamadvantage/lang/en_us.json', - 'data/steamadvantage/recipes/steam_pipe.json', - 'data/steamadvantage/advancements/recipes/steam_pipe.json'].each { required -> + 'zone/moddev/mc/basesteam/SteamAdvantage.class', + 'zone/moddev/mc/basesteam/machines/SteamDrillTileEntity.class', + 'zone/moddev/mc/basesteam/machines/SteamPumpTileEntity.class', + 'zone/moddev/mc/basesteam/machines/GeothermalBoilerTileEntity.class', + 'zone/moddev/mc/basesteam/migration/SteamLegacyMigrations.class', + 'assets/basesteam/lang/en_us.json', + 'data/basesteam/recipes/steam_pipe.json', + 'data/basesteam/advancements/recipes/steam_pipe.json'].each { required -> if (!names.contains(required)) { throw new GradleException("Release jar is missing ${required}") } @@ -523,18 +548,19 @@ tasks.register('verifyReleaseArtifacts') { 'steam_boiler_geothermal', 'steam_tank', 'steam_furnace', 'steam_crusher', 'steam_drill', 'steam_elevator', 'steam_switch', 'steam_still', 'steam_pump', 'steam_boiler_oil'].each { id -> - if (!names.contains("data/steamadvantage/loot_tables/blocks/${id}.json".toString())) { + if (!names.contains("data/basesteam/loot_tables/blocks/${id}.json".toString())) { throw new GradleException("Release jar is missing native block loot for ${id}") } } def resourcePack = new JsonSlurper().parseText(zip.getInputStream(zip.getEntry('pack.mcmeta')) .getText(StandardCharsets.UTF_8.name())) - if (resourcePack.pack.pack_format != 6) { - throw new GradleException('Packaged resources must use native 1.16 pack format 6') + if (resourcePack.pack.pack_format != 7) { + throw new GradleException('Packaged resources must use native 1.17 pack format 7') } ['agent-notes/', '.codex/', 'src/test/', 'fernflower_abstract_parameter_names.txt', - 'cyano/poweradvantage/', - 'zone/moddev/mc/poweradvantage/', 'zone/moddev/mc/basemetals/', 'cyano/basemetals/', 'com/mcmoddev/lib/', + 'cyano/poweradvantage/', 'zone/moddev/mc/basepower/', 'zone/moddev/mc/poweradvantage/', + 'zone/moddev/mc/steamadvantage/', 'assets/steamadvantage/', 'data/steamadvantage/', + '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) }) { @@ -543,7 +569,7 @@ tasks.register('verifyReleaseArtifacts') { } String metadata = zip.getInputStream(zip.getEntry('META-INF/mods.toml')) .getText(StandardCharsets.UTF_8.name()) - if (!metadata.contains('modId="steamadvantage"') + if (!metadata.contains('modId="basesteam"') || !metadata.contains("version=\"${project.mod_version}\"")) { throw new GradleException('Packaged mods.toml identity or version is incorrect') } @@ -562,16 +588,16 @@ tasks.register('verifyReleaseArtifacts') { } } int major = ((header[6] & 0xff) << 8) | (header[7] & 0xff) - if (major != 52) { - throw new GradleException("${entry.name} uses Java class major ${major}, expected 52") + if (major != 60) { + throw new GradleException("${entry.name} uses Java class major ${major}, expected 60") } } } new ZipFile(new File(libs, expectedReleaseFiles.get()[1])).withCloseable { sourceZip -> - if (sourceZip.getEntry('zone/moddev/mc/steamadvantage/SteamAdvantage.java') == null - || sourceZip.getEntry('zone/moddev/mc/steamadvantage/machines/SteamDrillTileEntity.java') == null) { - throw new GradleException('Sources jar is missing required SteamAdvantage sources') + if (sourceZip.getEntry('zone/moddev/mc/basesteam/SteamAdvantage.java') == null + || sourceZip.getEntry('zone/moddev/mc/basesteam/machines/SteamDrillTileEntity.java') == null) { + throw new GradleException('Sources jar is missing required baseSteam sources') } } new ZipFile(new File(libs, expectedReleaseFiles.get()[2])).withCloseable { javadocZip -> @@ -668,9 +694,9 @@ publishing { artifact(tasks.named('javadocJar')) } pom { - name = 'Steam Advantage' + name = 'baseSteam' description = project.mod_description - url = 'https://github.com/MinecraftModDevelopmentMods/SteamAdvantage' + url = 'https://github.com/MinecraftModDevelopmentMods/baseSteam' licenses { license { name = 'GNU General Public License, Version 3' @@ -678,9 +704,9 @@ publishing { } } scm { - connection = 'scm:git:https://github.com/MinecraftModDevelopmentMods/SteamAdvantage.git' - developerConnection = 'scm:git:ssh://git@github.com/MinecraftModDevelopmentMods/SteamAdvantage.git' - url = 'https://github.com/MinecraftModDevelopmentMods/SteamAdvantage' + connection = 'scm:git:https://github.com/MinecraftModDevelopmentMods/baseSteam.git' + developerConnection = 'scm:git:ssh://git@github.com/MinecraftModDevelopmentMods/baseSteam.git' + url = 'https://github.com/MinecraftModDevelopmentMods/baseSteam' } } } @@ -808,10 +834,10 @@ tasks.register('isolateEclipseProductionRuns') { "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 launchXml = new groovy.xml.XmlParser().parseText(contents) def modClasses = launchXml.mapAttribute.find { - it.@key.text() == 'org.eclipse.debug.core.environmentVariables' - }.mapEntry.findAll { it.@key.text() == 'MOD_CLASSES' } + it.@key == 'org.eclipse.debug.core.environmentVariables' + }.mapEntry.findAll { it.@key == 'MOD_CLASSES' } if (modClasses.size() != 1) { throw new GradleException("${launch.name} must define one MOD_CLASSES entry") } @@ -838,7 +864,7 @@ tasks.register('isolateEclipseProductionRuns') { // Buildship exposes compileOnly dependencies through its project // container. Replace that container in production launches with - // Gradle's runtime classpath while retaining required PowerAdvantage. + // Gradle's runtime classpath while retaining required basePower. Set mainOutputs = sourceSets.main.output.files.collect { it.canonicalFile } as Set @@ -847,26 +873,32 @@ tasks.register('isolateEclipseProductionRuns') { }.findAll { File runtimeFile -> !mainOutputs.contains(runtimeFile) } - List launchLines = contents.readLines() - int buildshipContainerLine = launchLines.findIndexOf { - it.contains('org.eclipse.buildship.core.gradleclasspathcontainer') + def parser = new groovy.xml.XmlParser() + def launchXml = parser.parseText(contents) + def classpath = launchXml.listAttribute.find { it.@key == 'org.eclipse.jdt.launching.CLASSPATH' } + if (classpath == null) { + throw new GradleException("${name} is missing its explicit classpath") } - if (buildshipContainerLine < 0) { - throw new GradleException("${name} is missing the Buildship classpath container") + // A repeat refresh replaces the isolated runtime entries as well as + // the original Buildship container, but keeps the Slime Launcher. + def previousRuntime = classpath.listEntry.findAll { entry -> + def runtime = parser.parseText(entry.@value) + String archive = runtime.@externalArchive + runtime.@containerPath == 'org.eclipse.buildship.core.gradleclasspathcontainer' + || (archive && !file(archive).name.startsWith('slime-launcher-')) } - List runtimeEntries = productionRuntime.collect { File runtimeFile -> - String escapedPath = runtimeFile.canonicalPath - .replace('&', '&amp;') - .replace('<', '&lt;') - .replace('>', '&gt;') - (' ') + if (previousRuntime.isEmpty()) { + throw new GradleException("${name} is missing its production runtime entries") } - launchLines.remove(buildshipContainerLine) - launchLines.addAll(buildshipContainerLine, runtimeEntries) - contents = launchLines.join('\n') + '\n' + int runtimeIndex = classpath.children().indexOf(previousRuntime.first()) + previousRuntime.each { classpath.remove(it) } + def runtimeEntries = productionRuntime.collect { File runtimeFile -> + def archive = new Node(null, 'runtimeClasspathEntry', + [externalArchive: runtimeFile.path, type: '2', path: '5']) + new Node(null, 'listEntry', [value: groovy.xml.XmlUtil.serialize(archive)]) + } + classpath.children().addAll(runtimeIndex, runtimeEntries) + contents = groovy.xml.XmlUtil.serialize(launchXml) ['--cache', '--metadata', '--to-srg', '--to-obf'].each { option -> String prefix = option + ' ' @@ -916,6 +948,19 @@ tasks.register('verifyEclipseProductionClasspath') { throw new GradleException('Eclipse output contains incorrect mod metadata') } def eclipseClasspath = new groovy.xml.XmlSlurper().parse(file('.classpath')) + if (!eclipseClasspath.classpathentry.any { + it.@kind.text() == 'con' && it.@path.text().tokenize('/').last() == 'JavaSE-16' + }) { + throw new GradleException('Eclipse must use the Java 16 production execution environment') + } + Properties jdt = new Properties() + file('.settings/org.eclipse.jdt.core.prefs').withInputStream { jdt.load(it) } + ['org.eclipse.jdt.core.compiler.codegen.targetPlatform', 'org.eclipse.jdt.core.compiler.source', + 'org.eclipse.jdt.core.compiler.compliance'].each { key -> + if (jdt.getProperty(key) != '16') { + throw new GradleException("Eclipse ${key} must remain Java 16") + } + } def processedResources = eclipseClasspath.classpathentry.findAll { it.@kind.text() == 'src' && it.@path.text() == 'build/resources/main' } @@ -946,6 +991,17 @@ tasks.register('verifyEclipseProductionClasspath') { ['runClient.launch', 'runServer.launch'].each { name -> def launch = new groovy.xml.XmlSlurper().parse(file(name)) String contents = file(name).getText('UTF-8').replace('\\', '/') + String arguments = launch.stringAttribute.find { + it.@key.text() == 'org.eclipse.jdt.launching.PROGRAM_ARGUMENTS' + }.@value.text() + String vmArguments = launch.stringAttribute.find { + it.@key.text() == 'org.eclipse.jdt.launching.VM_ARGUMENTS' + }.@value.text() + if (!arguments.contains('--main cpw.mods.bootstraplauncher.BootstrapLauncher') + || !vmArguments.contains('--add-opens java.base/java.lang.invoke=ALL-UNNAMED') + || contents.contains('net.minecraftforge.userdev.LaunchTesting')) { + throw new GradleException("${name} must retain the native Forge 37 bootstrap and Java 16 module access") + } if (launch.booleanAttribute.find { it.@key.text() == 'org.eclipse.jdt.launching.ATTR_EXCLUDE_TEST_CODE' }.@value.text() != 'true' @@ -954,7 +1010,7 @@ tasks.register('verifyEclipseProductionClasspath') { } if (launch.stringAttribute.find { it.@key.text() == 'org.eclipse.jdt.launching.PROJECT_ATTR' - }.@value.text() != 'SteamAdvantage') { + }.@value.text() != project.name) { throw new GradleException("${name} targets the wrong Eclipse project") } if (contents.contains('org.eclipse.buildship.core.gradleclasspathcontainer')) { @@ -966,11 +1022,21 @@ tasks.register('verifyEclipseProductionClasspath') { "${name} includes forbidden runtime dependency ${forbiddenDependency}") } } - if (!contents.contains(powerAdvantageDeobfJar.canonicalPath.replace('\\', '/'))) { - throw new GradleException("${name} is missing the required PowerAdvantage runtime") + def entries = launch.listAttribute.find { + it.@key.text() == 'org.eclipse.jdt.launching.CLASSPATH' + }.listEntry.collect { new groovy.xml.XmlSlurper().parseText(it.@value.text()) } + List archives = entries.collect { it.@externalArchive.text() }.findAll { it }.collect { + file(it).canonicalFile + } + if (archives.count { it.name.startsWith('slime-launcher-') } != 1 + || archives.size() != archives.toSet().size()) { + throw new GradleException("${name} must retain one Slime Launcher and no duplicate archives") + } + if (!archives.contains(powerAdvantageDeobfJar.canonicalFile)) { + throw new GradleException("${name} is missing the required basePower runtime") } - if (!contents.contains(baseMetalsDeobfJar.canonicalPath.replace('\\', '/')) - || !contents.contains(oreSpawnDeobfJar.canonicalPath.replace('\\', '/'))) { + if (!archives.contains(baseMetalsDeobfJar.canonicalFile) + || !archives.contains(oreSpawnDeobfJar.canonicalFile)) { throw new GradleException("${name} is missing the required Base Metals or OreSpawn runtime") } if (!contents.contains("forge-${project.minecraft_version}-${project.forge_version}")) { @@ -1000,7 +1066,7 @@ tasks.register('verifyEclipseProductionClasspath') { tasks.register('verifyModelAssets') { group = 'verification' - description = 'Verifies SteamAdvantage JSON and model references against packaged assets.' + description = 'Verifies baseSteam JSON and model references against packaged assets.' dependsOn tasks.named('verifyReleaseDependencies') File resourceRoot = file('src/main/resources') File assetRoot = new File(resourceRoot, "assets/${project.mod_id}") @@ -1022,7 +1088,7 @@ tasks.register('verifyModelAssets') { int separator = reference.indexOf(':') String namespace = separator >= 0 ? reference.substring(0, separator) : 'minecraft' String path = separator >= 0 ? reference.substring(separator + 1) : reference - if (namespace != project.mod_id && namespace != 'poweradvantage') return + if (namespace != project.mod_id && namespace != 'basepower') return String suffix = assetType == 'textures' ? '.png' : '.json' String targetPath = "assets/${namespace}/${assetType}/${path}${suffix}" @@ -1141,9 +1207,9 @@ tasks.register('verifyRecipeTagGuards') { throw new GradleException("${recipeFile.path} contains a non-object recipe condition") } Set guards = conditions - .findAll { it instanceof Map && it.type == 'poweradvantage:tag_not_empty' } + .findAll { it instanceof Map && it.type == 'basepower:tag_not_empty' } .collect { it.tag as String } as Set - Set emptyGuards = conditions.findAll { it.type == 'poweradvantage:tag_empty' } + Set emptyGuards = conditions.findAll { it.type == 'basepower: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") diff --git a/docs/PORT117-STATUS.md b/docs/PORT117-STATUS.md new file mode 100644 index 0000000..6f50eab --- /dev/null +++ b/docs/PORT117-STATUS.md @@ -0,0 +1,373 @@ +# baseSteam 1.17.1 Port Status + +## Current Identity Candidate + +`2.2.10.117011`, branch `feature/basesteam-1.17.1-identity-migration`, +based on the native Steam Advantage port at `f16b4d3`. This changes the mod, +package, archive and resource identities without changing registry paths or +machine behavior. The shared basePower migration hook recognizes the old +`steamadvantage` namespace and dotted block-entity IDs for both namespaces. +The existing state codecs and NBT repairs remain in place. + +basePower 2.4.9.117011 is pinned to source +`308d42a89483d56d0fad4805cdb65dac483d9e31` and development jar SHA-256 +`312FA3012CB57C91F5F22079DA4778D481BA45EF7B8A0587D9993899E1B6D08E`. +The player jar hash is recorded separately in `gradle.properties`. The earlier +pins below cannot be reused. + +Base Metals 3.1.1.117011 is pinned to local, unpushed source +`0deeeeecdbbc1fbcdecf910c59477de8efe164d7`. The dependency owner reports that +its Gradle release and Eclipse suite passed. The supplied development jar was +independently checked against SHA-256 +`83A8C32C633B56BB7E4405E8B3B24A4DEA32B9119216E5097B884056D679CAD1`. +This is not a public runtime hash. Hosted builds still require checkout of +the exact pinned commit; no remote fallback is allowed. + +Source checks passed without Gradle: 179 JSON resources, 12 native factories, +17 harvest entries and 24 recipe unlocks. The baseline comparison found only +identity edits in 61 production Java files and 178 JSON files; all 39 binary +assets were byte-identical. Workflow YAML and shell syntax passed, and both +dependency setup workflows rejected the pending basePower pin. An isolated +XML fixture reproduced the original Eclipse repeat-refresh failure and passed +with the fix, retaining the launcher, classpath order and arguments. + +Local Gradle qualification is recorded separately in the untracked +`evidence/basesteam-117-identity-20261107` receipts. Packaged runtime, +copied-world upgrade and manual acceptance are separate checks. + +## Historical Steam Advantage Record + +The remaining sections document the native Advantage-named candidate and its +retained evidence. Their artifacts, build results and pins do not qualify +baseSteam 2.2.10.117011. + +Local source candidate: `2.2.9.117011`, branch +`feature/steamadvantage-1.17.1-port`, baseline +`ed808f9fe9a2398d2334c0cadb1546284a02a22e`. + +The parent locally committed the original source checkpoint as +`e5dd65cd59b14cba4d072d2a141cc4d89f224eef`. This update records the coordinated +advancement correction, regression tests and coordinated Power repins. +The user approved a local-only Steam commit after the new full gates pass, +excluding the local agent file list. No port code push, PR, merge, tag or +publication is authorized before manual testing and separate approval. + +## Completed Source Work + +- Ported native imports in production and tests; checked the target classes + and changed native signatures against mapped Forge 37.1.1 and the published + Base Metals 1.17 source. +- Ported all twelve block-entity factories to native position/state suppliers. + The eleven machines use the agreed Power constructors. Detached convenience + constructors use the corresponding real block's default state, never a + production factory or saved-position replacement. +- Used native tag-only loading. Drill movement retains the destination's + constructor position and state. The drill-bit helper has an explicit ticker; + machine ticking remains owned by Power's shared GUI parents. +- Ported renderer registration, PoseStack/vertex consumers, shader texture + binding, item model predicates, config loading, merchant listings, slot + callbacks and source-fluid pickup without replacing waterlogged hosts. +- Preserved all boiler water guards and dirty-owner callbacks, loaded-tick + crusher/furnace redstone sampling, persistence, machine costs and GUI rows. +- Bounded musket terrain clipping to loaded chunks using native voxel traversal; + retained loaded-server-entity targeting and loaded-player custom sound packets. +- Used native Forge lava temperature with the existing vanilla heat formula. +- Added native pickaxe tags for seventeen blocks without introducing new tool + tiers or mandatory drop tools. Ordinary self-drops and hidden helper behavior + are unchanged. +- Updated build metadata, class-major audit and Eclipse environment audit to + Java 16 / class major 60. CI uses Java 17 Gradle, Java 25 Mavenizer, Java 16 + production and Java 8 only for legacy build utilities. Hosted CI is not run. + +## Dependency Coordination + +Base Metals 3.1.0.117011 source: +`dacfaa3af2e3310d5cb6b081da79f09260ae103d`. +Development jar SHA-256: +`4EB49B12ED17211296F5FEC67FC4307174702BE096D3F1C02DD67B45AED587FA`. + +OreSpawn 4.1.0.117011 source: +`b56e2b62a1a6ea4d1dd96f8646a87801a817dbdf`. +Development jar SHA-256: +`CB7A736314842B110B2E4788FBD5E21D4AE8803C5ED34A49199B034BE572DA39`. + +Both development jars were independently SHA-256 checked at their supplied +campaign API source paths. Public runtime hashes remain separate in +`gradle.properties`. No dependency is embedded. + +Power 2.4.8.117011 is pinned to the parent's local checkpoint +`5b9abe578b053d2ef59b1962cf9e04f6880c91b9`, API jar SHA-256 +`799B59B06EB2AC3FC4682AA64BF42C3A2A2C1D89D7FFFE9C72745DEC7DFBE0D8`. +The corresponding Power production jar SHA-256 is +`336D9A11F5488EBD63F208554A039A53A398ABC58F632880B8420AF10F5AFBF0`. +The parent's HEAD and both actual jar hashes were independently verified before +this explicit repin. The new API input is +`evidence/inputs/PowerAdvantage-2.4.8.117011-api-checkpoint-799B59B0.jar`. +The verified input is copied under `evidence/inputs` so later parent builds +cannot silently change the bytes used by Steam. This is a local checkpoint, +not final runtime acceptance. No old-target Power jar has been used, and no +extra shared API or constructor workaround was needed. +Power marks loaded chunks unsaved when persistent machine state +changes through server ticking or energy updates. The current checkpoint also +corrects two exact native registry aliases and the Block registry listener, with +no public API change. Its 201-test parent build is not a full packaged runtime +pass. Steam has no local timer or weapon-code fix. + +Plain JUnit uses Power's verified test-only native capability bootstrap, SHA-256 +`0F75844C30D3E0B4FAF43EE0905FABE5553D9CC32177FF0BB3A690088208701A`. +It invokes Forge's own token transformer; it is not a capability replacement +and is absent from production artifacts and launch classpaths. + +The coordinated campaign serialized builds through its own cache-lease wrapper. +That internal arrangement is not a build prerequisite for other workspaces; +the README provides portable wrapper commands, explicit JDK paths and API overrides. + +## Checks Actually Run + +- `node tools/verify-native-port.js`: source pass, 179 JSON resources, + 63 production Java files, 12 factories and 17 harvest entries. +- `node tools/generate-recipe-unlocks.js --check`: 24 unlocks verified. +- Baseline comparison: all 24 original test classes retain their 111 declared + test methods. Thirteen new methods bring the declared total to 124. This is not + an executed-test count and does not expand parameterized cases. +- Literal-key comparison: all 99 NBT/key accesses across the 63 production + Java files retain their original names. +- The parent corrected 21 ingredient predicates in 17 advancement files from + ignored singular `item` fields to native singleton `items` arrays. Recipe + ingredients, processing quantities and loot were not changed. Four new unlock + tests reject the old shape, broad or malformed arrays, and native ANY matching. +- `git diff --check`: pass. +- Historical checkpoint run `steam-checkpoint-build-f`: `check build javadoc + verifyReleaseDependencies verifyReleaseArtifacts writeReleaseChecksums + verifyEclipseProductionClasspath` passed against the exact checkpoint inputs. + All 191 executed tests in 27 suites passed, with zero failures, errors or skips. +- `steam-checkpoint-repro-g`: the same full gate passed with `--offline + --rerun-tasks`, all 32 tasks executed, and all 191 tests passed again. Production, + sources, Javadoc and development jars are byte-for-byte identical to run F. + This is a forced offline repeat build, not an empty-cache qualification. +- The artifact audit verified Java class major 60, metadata, resources, exact + dependencies, no embedded dependencies and canonical deterministic archives. +- Eclipse configuration checks passed for Java 16 source, target, compliance + and JRE, test-code exclusion, native Forge 37 bootstrap and module access. + This is not an Eclipse client-launch or visual acceptance result. +- Previous coordinated runs `steam-advancement-repin-h` and + `steam-advancement-repro-i` each passed the same full task list with + `--offline --rerun-tasks`: 32 tasks executed, 195 tests in 27 suites, zero + failures, errors or skips. These results use the earlier Power source/API pin + `5aaae99596c0891def8072192e0addb73c278fce`, not the shared-persistence pin. + The four jars are identical across H and I; all 322 frozen build/source inputs + were rechecked unchanged. This is not an empty-cache qualification. +- The packaged-content delta from the retained F production jar contains + exactly the 17 parent-corrected advancement JSON entries, with no added or + removed entries. All 71 production class entries, including weapon code, + are byte-identical. Javadoc remains identical too. +- Earlier runs `steam-power-fc4c47f-j` and `steam-power-fc4c47f-repro-k` each + passed `check build deobfJar javadoc verifyReleaseDependencies + verifyReleaseArtifacts writeReleaseChecksums verifyEclipseProductionClasspath` + with `--offline --rerun-tasks`, using the exact `fc4c47f2` Power source/API pin. + Each executed all 32 tasks and all 195 tests in 27 suites with zero failures, + errors or skips. All 322 frozen build/source inputs stayed unchanged. + Production, development, sources and Javadoc jars are identical across J/K + and to the preceding H/I advancement-fix candidate. Steam production Java, + recipes and loot remain unchanged from `e5dd65c`. + +## Optional Provider Guard Candidate + +The absent-Base-Metals APOCALYPTIC worldgen attempt found nine unsupported +`basemetals:crushing` recipe errors. Their resource bytes were unchanged from +1.16; they had only a recipe-mode condition. Each now also requires Forge's +native `forge:mod_loaded` condition for `basemetals`, matching the Power and +Electric resource pattern. Inputs, outputs, quantities and the tank recipe's +implicit single output are unchanged. No production Java changed. + +Four new regression tests cover all nine resources, malformed-provider negative +controls, the actual Forge 37 condition serializer and exact processing payloads. +`steam-optional-crushing-red-b` retained the expected missing-guard failure; +`steam-optional-crushing-release-c` passed all 199 tests in 28 suites and the full +32-task release, Javadoc and Eclipse configuration gate, without build-cache reuse. +The earlier red-A receipt also remains: its additional failure was a new-test +assumption about an explicit tank count, corrected to preserve the real omitted +default-one representation rather than changing the recipe. + +This fix changes resource/archive hashes. Per-commit exports, native absent-provider +startup, ECJ execution and fresh runtime reports must identify these new bytes; +the old frozen-J equality below does not qualify them. Combined current runtime +status belongs to Power Advantage's `docs/1.17/CURRENT-QUALIFICATION.md`, whose +exact artifact pins and scoped results are authoritative. Manual acceptance and +publication approval remain separate. + +## Native-Registry Archived Candidate + +The following build and equality record describes the earlier `f9fd1ec` source, +before the optional-provider guard fix. It is retained evidence, not the current +artifact's resource hash. + +`steam-power-5b9abe5-m` passed the complete Steam build, release, Javadoc and +Eclipse configuration suite with `--offline --no-build-cache --rerun-tasks`: +32 tasks executed, 195 tests in 27 suites, no failures, errors or skips. +The exact native-registry Power source/API pin is recorded above. All four +Steam jars remain byte-identical to frozen J: production `A07B14C1...`, +development `F352BC04...`, sources `3A5CF129...` and Javadoc `122F4666...`. +Their complete hashes and JUnit XML/HTML are retained in +`evidence/steam-power-5b9abe5-m`. + +The source commit's independent clean exports are a separate campaign gate, +recorded under the campaign's `Steam Repro ` directory with a dedicated +empty Gradle user home, command receipts, all four byte comparisons and JUnit +snapshots. A primary-checkout rerun is not an independent export qualification. + +The preceding `f4818bf` / Power `fc4c47f2` checkpoint independently passed both +spaced-path exports, including its initially empty Gradle cache: 195 tests and +33 tasks per export, all four jars byte-exact to J. Its immutable handoff is +`Steam Repro f4818bf/handoff.json`; it does not qualify a newer source/API pin. + +## Persistence-Fix Archived Candidate + +This retained candidate used Power `fc4c47f2ed8cfebbaa010e6a0e807137a3329f95`, +API SHA-256 `BDF486E16C1FE3B4CE2FE1ED78670AABA594063BCD2D4251265124B17FA9E767`. +It does not qualify the newer native-registry Power pin. + +Full evidence for the shared-persistence Power pin is retained in +`evidence/steam-power-fc4c47f-j`; the independent forced offline repeat is in +`evidence/steam-power-fc4c47f-repro-k`. The frozen archive is +`evidence/steam-power-fc4c47f-j.zip`, with a separate SHA-256 report alongside it. +The committed source checkpoint and input pins are recorded in `candidate.json`. +The local agent file list is excluded from both the source snapshot and commit. + +Artifact SHA-256 values: + +- Production `artifacts/SteamAdvantage-2.2.9.117011.jar`: + `A07B14C1442D6A9B2FEF86C1892564BBBD94561D4E9711539A992CB56D7BE2C6`. +- Development `SteamAdvantage-2.2.9.117011-deobf.jar`: + `F352BC0400E27742652073ABB5A49A621E5A6892CEA7D82254216AE54F8629A7`. +- Sources `artifacts/SteamAdvantage-2.2.9.117011-sources.jar`: + `3A5CF1296418A6A4F03B1AB7ABE5191A5819EB38CC3F072A6734512FABEDCD85`. +- Javadoc `artifacts/SteamAdvantage-2.2.9.117011-javadoc.jar`: + `122F466637427788D3EB3FC52990F7E930546AD3EFFCFE9C45F842C79F4316DB`. + +The archive binds the local source commit, exact Power API/bootstrap inputs, +Base Metals/OreSpawn APIs, configuration/source snapshots, artifact comparisons, +JUnit XML/HTML, Gradle command receipts and generated Eclipse files. These are +local build and reproducibility results, not runtime or publication acceptance. + +## Advancement-Fix Archived Candidate + +This candidate used Power `5aaae99596c0891def8072192e0addb73c278fce`, API +SHA-256 `38162B8B1D3B5117E9764A29F04C5A2482FD016D5700D728F9DC12ECCAEB0963`. +It does not qualify the new shared-persistence Power pin. Full evidence is retained in +`evidence/steam-advancement-repin-h`; the independent repeat is retained in +`evidence/steam-advancement-repro-i`. The frozen candidate archive is +`evidence/steam-advancement-repin-h.zip`, with its SHA-256 recorded separately +alongside it. No publication or runtime acceptance is implied by this archive. + +Artifact SHA-256 values: + +- Production `artifacts/SteamAdvantage-2.2.9.117011.jar`: + `A07B14C1442D6A9B2FEF86C1892564BBBD94561D4E9711539A992CB56D7BE2C6`. +- Development `SteamAdvantage-2.2.9.117011-deobf.jar`: + `F352BC0400E27742652073ABB5A49A621E5A6892CEA7D82254216AE54F8629A7`. +- Sources `artifacts/SteamAdvantage-2.2.9.117011-sources.jar`: + `3A5CF1296418A6A4F03B1AB7ABE5191A5819EB38CC3F072A6734512FABEDCD85`. +- Javadoc `artifacts/SteamAdvantage-2.2.9.117011-javadoc.jar`: + `122F466637427788D3EB3FC52990F7E930546AD3EFFCFE9C45F842C79F4316DB`. + +The archive includes exact API/bootstrap inputs, source and configuration +snapshots, the uncommitted patch/change list, hashes, JUnit XML/HTML, Gradle +command receipts and generated Eclipse files. `candidate.json` and +`artifact-delta.json` record the input pins and packaged-content boundary. + +## Earlier Archived Candidate + +This retained F/G candidate used Power checkpoint +`28247f936ac99e7a417da1bc1c89bc8394773a26`, API SHA-256 +`7B2B2676CDB9A0B933DA04CC743787803C68E1466FD44E2EFBAEFB3ED47ABB3D`. +It does not qualify the coordinated advancement correction or the new Power pin. + +Production jar: +`evidence/steam-checkpoint-build-f/artifacts/SteamAdvantage-2.2.9.117011.jar` + +SHA-256: +`8270BE3399EEA1F3E63446EA9E256C7C227FAA2BA78410B439942FA4FD067F72` + +Development jar: +`evidence/steam-checkpoint-build-f/SteamAdvantage-2.2.9.117011-deobf.jar` + +SHA-256: +`43FE3EC41392142B0ACAC01961E4E96A7E295AB058CE369B2E2058BB6DFDFCF4` + +The full artifact family, checksums, JUnit XML/HTML, generated Eclipse files +and pinned properties are retained in the F evidence directory. Run G's tests +and checksums are retained separately. Command logs and machine-readable run +receipts are in the parent campaign directory. + +## Retained Failed Runs + +- `steam-native-test-a`: main/test compilation passed, but standalone registry + bootstrap failed because the native game version was not initialized. + The fixtures now call `SharedConstants.tryDetectVersion()` before bootstrap; + the failed XML and HTML reports remain in `evidence/steam-native-test-a`. +- `steam-native-test-b`: rejected a mutable Power jar whose hash changed from + the approved provisional `5D0B363F...` to `7B2B2676...`. No silent repin was + made. Run C used an independently rechecked copy of the originally approved + provisional bytes and passed 191 tests. That result is not checkpoint proof. +- `steam-native-audit-d`: cancelled while queued for the lease when the pinned + checkpoint arrived; no Gradle audit tasks were executed under this label. +- `steam-checkpoint-build-e`: all tests, packaging, release and checksum tasks + passed, but the new Eclipse JRE audit rejected its valid trailing slash. + The audit now checks the final path segment and all three JDT compiler levels. + Run E's original reports and generated files remain preserved. + +Base Metals' published copper recipes yield one powder from raw copper and two +from copper ore. Steam reads those native recipes and does not override their +ratios. This is a dependency-version distinction, not a Steam balance adjustment. + +## Required Next Gates + +Use the coordinated Power Advantage 1.17.1 test record for current packaged +server/client, migration, operation and endurance results. Every result is bound +to exact Steam, Power, dependency and test-harness hashes; older F/G/J results do +not qualify a changed archive merely because its version is unchanged. Preserve +failed receipts and use a new evidence label for every run and explicit repin. + +Earlier operating failures remain archived. G is diagnostic-only because its +finite-Float32 protocol changed during restart; its pre-existing raw-save receipt +remains red and unchanged. Those historical failures are not a statement that the +current native-registry runtime is still waiting for its first qualification. +The optional-provider fix needs its own exact-byte follow-up in the central +record. Module build proof does not imply manual gameplay or visual acceptance. + +The generated client tokens are expected launcher inputs, not a confirmed +generator defect: bytecode inspection of the pinned Slime Launcher 0.2.2 shows +`Main` replacing `{asset_index}` and `{assets_root}` and calling +`LegacyDev.setupNatives`, which extracts natives and sets `java.library.path`. +Forge 37's `CommonDevLaunchHandler.fixNatives` appends its extra native-directory +entry rather than removing that prepared path. No workaround or generated +launch edit was made. An actual Eclipse client launch, production packaged +client qualification and visual acceptance are still required. + +Manual gaps include all boiler variants; first-loaded-tick heat and redstone; +six drill facings, target hardness, track movement, inventory and energy; +helper animation and cleanup; pumps and stills; elevator rides; GUI captions +and controls; musket last-cartridge firing, chunk boundaries, sounds and +enchantments; multiplayer synchronization and capability unload/revival. +Use disposable copied worlds only. + +## Changed File Groups + +- `src/main/java/zone/moddev/mc/steamadvantage`: native source changes across + entry point, blocks, machines, inventories, client graphics/GUI, musket, + enchantments, villages, migration, config and recipe helpers. +- `src/main/resources/META-INF/mods.toml`, `pack.mcmeta` and + `data/minecraft/tags/blocks/mineable/pickaxe.json`: target metadata and tools. +- `src/test/java`: retained native regression tests plus + `NativeBlockEntityContractTest`, `MusketLoadedChunkBoundaryTest` and + `GeothermalNativeTemperatureTest`. +- `build.gradle`, `gradle.properties`, the three build/analysis workflows, + `tools/verify-native-port.js`, `README.md`, `CHANGELOG.txt` and this record. + +The current candidate's tracked changes from `e5dd65c` are archived separately +as `tracked-change-list.txt`. The local agent file list is not part of the commit. +All Steam-owned build sessions have finished. +This module qualification did not open or modify a world. + +Native ticker reference: [Forge 1.17 block entities](https://docs.minecraftforge.net/en/1.17.x/blockentities/blockentity/). diff --git a/gradle.properties b/gradle.properties index 379caca..6b28899 100644 --- a/gradle.properties +++ b/gradle.properties @@ -5,46 +5,53 @@ org.gradle.caching=true org.gradle.parallel=false net.minecraftforge.gradle.merge-source-sets=false -minecraft_version=1.16.5 -minecraft_version_range=[1.16.5] -forge_version=36.2.34 -forge_installer_sha256=53B73DBBCC486F38726E76CE923B13381044984C83C762847C7193340F97130F -forge_version_range=[36.2.34,37) -loader_version_range=[36,) +minecraft_version=1.17.1 +minecraft_version_range=[1.17.1] +forge_version=37.1.1 +forge_installer_sha256=31F2319B1B9CA491AACCC020887240F8524A4FF2A8E0F8B795E17E889CBC043B +forge_version_range=[37.1.1,38) +loader_version_range=[37,38) mapping_channel=official -mapping_version=1.16.5 -mcp_version=20210115.111550 +mapping_version=1.17.1 +mcp_version=20210706.113038 loader_name=forge loader_code=1 -java_version=8 -java_toolchain_version=8.0.502+7 -java_setup_version=8.0.502+7 +java_version=16 +java_toolchain_version=16.0.2+7 +java_setup_version=16.0.2+7 gradle_java_version=17 -curseforge_project_id=240984 +curseforge_project_id=1781373 -mod_id=steamadvantage -mod_name=Steam Advantage +mod_id=basesteam +mod_name=baseSteam mod_license=GPL-3.0-only -mod_version=2.2.8.116051 -mod_group=zone.moddev.mc.steamadvantage +mod_version=2.2.10.117011 +mod_group=zone.moddev.mc.basesteam mod_authors=DrCyano -mod_description=Steam-powered machines and infrastructure for the Power Advantage platform. +mod_description=Steam-powered machines and infrastructure for basePower. -cf_requirements=power-advantage,base-metals +cf_requirements=basepower,base-metals cf_optionals= -cf_versions=1.16.5 +cf_versions=1.17.1 -poweradvantage_version=2.4.7.116051 -poweradvantage_source_repository=MinecraftModDevelopmentMods/PowerAdvantage -# Power F local candidate; automated verification and manual acceptance are separate. -poweradvantage_source_ref=bcb75bfa91c14751ebf1e31865e1ec0ffa82c0b7 -poweradvantage_deobf_sha256=2FB923944A456B4F26AB2F9212C646469CE3F49BFD4DAE894C15559B48908386 +poweradvantage_version=2.4.9.117011 +poweradvantage_source_repository=MinecraftModDevelopmentMods/basePower +poweradvantage_source_ref=bb7023835fd41aefe89c92275caa74da9e126cc7 +poweradvantage_deobf_sha256=AFC3FBDF84FF7E8FF8929F8192FDBCEC170C9AE1CF1B248E1C4B9C6ED17AA357 +# Player jar is a separate runtime input, not a development jar or publication claim. +poweradvantage_player_sha256=A788C08163CECE1C6D33FBDC295BE6EC272DE9AF7911BE74E707D0EE9121DF73 -basemetals_version=3.1.1.116051 -basemetals_source_commit=995f6cc4dd2d5eecc628a42e5c43fa5390c24bca -basemetals_deobf_sha256=A7B0C4F394DFAF4E11E0275B1A86CB1D47C7AF8E175759D9BB84F965C684466D +basemetals_version=3.1.1.117011 +# Local, unpushed source. Hosted builds must be able to check out this exact commit. +basemetals_source_commit=65f9956c07d5d0c0b6ec0ac2108ce69c3ce52c6e +basemetals_deobf_sha256=83A8C32C633B56BB7E4405E8B3B24A4DEA32B9119216E5097B884056D679CAD1 -orespawn_version=4.1.0.116051 -orespawn_source_commit=a113e5d767169189f0e35ade1e173a12d550b00e -orespawn_deobf_sha256=DCEE75480C9DD70EE58B218AAE799C5FAB0525DAF9A05455270F1570C24F7F8F +orespawn_version=4.1.0.117011 +orespawn_source_commit=b56e2b62a1a6ea4d1dd96f8646a87801a817dbdf +orespawn_deobf_sha256=CB7A736314842B110B2E4788FBD5E21D4AE8803C5ED34A49199B034BE572DA39 + + +# Published runtime bytes are distinct from development API jars. +basemetals_public_sha256=F3053F23D2415476FC52426A24E3B0B828198A678FBD5DD789923DB2063E0FEB +orespawn_public_sha256=1BDEDCBB179CB5A3B169E5C8A6B301E3888AE15B94108B0AEC627D705CFAD833 diff --git a/src/main/java/zone/moddev/mc/steamadvantage/SteamAdvantage.java b/src/main/java/zone/moddev/mc/basesteam/SteamAdvantage.java similarity index 66% rename from src/main/java/zone/moddev/mc/steamadvantage/SteamAdvantage.java rename to src/main/java/zone/moddev/mc/basesteam/SteamAdvantage.java index 5d04607..5ef3722 100644 --- a/src/main/java/zone/moddev/mc/steamadvantage/SteamAdvantage.java +++ b/src/main/java/zone/moddev/mc/basesteam/SteamAdvantage.java @@ -1,8 +1,9 @@ -package zone.moddev.mc.steamadvantage; +package zone.moddev.mc.basesteam; import java.util.HashMap; import java.util.Map; import java.io.IOException; +import java.nio.file.Path; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @@ -18,24 +19,25 @@ import cyano.poweradvantage.api.migration.LegacyConfigMigration; import cyano.poweradvantage.api.migration.LegacyConfigMigration.Mapping; import cyano.poweradvantage.api.migration.LegacyConfigMigration.ValueType; -import zone.moddev.mc.steamadvantage.config.SteamAdvantageConfig; -import zone.moddev.mc.steamadvantage.init.Blocks; -import zone.moddev.mc.steamadvantage.init.Enchantments; -import zone.moddev.mc.steamadvantage.init.Entities; -import zone.moddev.mc.steamadvantage.init.GUI; -import zone.moddev.mc.steamadvantage.init.Items; -import zone.moddev.mc.steamadvantage.init.Recipes; -import zone.moddev.mc.steamadvantage.init.TreasureChests; -import zone.moddev.mc.steamadvantage.init.Villages; -import zone.moddev.mc.steamadvantage.migration.SteamLegacyMigrations; -import zone.moddev.mc.steamadvantage.recipe.RecipeConditions; +import zone.moddev.mc.basesteam.config.SteamAdvantageConfig; +import zone.moddev.mc.basesteam.init.Blocks; +import zone.moddev.mc.basesteam.init.Enchantments; +import zone.moddev.mc.basesteam.init.Entities; +import zone.moddev.mc.basesteam.init.GUI; +import zone.moddev.mc.basesteam.init.Items; +import zone.moddev.mc.basesteam.init.Recipes; +import zone.moddev.mc.basesteam.init.TreasureChests; +import zone.moddev.mc.basesteam.init.Villages; +import zone.moddev.mc.basesteam.migration.SteamLegacyMigrations; +import zone.moddev.mc.basesteam.migration.SteamConfigMigration; +import zone.moddev.mc.basesteam.recipe.RecipeConditions; -/** Forge 1.16 entry point for Steam Advantage. */ +/** Forge 1.17 entry point for baseSteam. */ @Mod(SteamAdvantage.MODID) public final class SteamAdvantage { - public static final String MODID = "steamadvantage"; - public static final String NAME = "Steam Advantage"; - public static final String VERSION = "2.2.8.116051"; + public static final String MODID = "basesteam"; + public static final String NAME = "baseSteam"; + public static final String VERSION = "2.2.10.117011"; public static final Logger LOGGER = LogManager.getLogger(MODID); public static float MUSKET_DAMAGE = 20.0F; @@ -58,13 +60,20 @@ public SteamAdvantage() { DistExecutor.runWhenOn(Dist.CLIENT, () -> () -> { FMLJavaModLoadingContext.get().getModEventBus().addListener( - zone.moddev.mc.steamadvantage.graphics.ClientRegistration::onClientSetup); + zone.moddev.mc.basesteam.graphics.ClientRegistration::onClientSetup); + FMLJavaModLoadingContext.get().getModEventBus().addListener( + zone.moddev.mc.basesteam.graphics.ClientRegistration::registerRenderers); }); } private static void migrateLegacyConfiguration() { try { - LegacyConfigMigration.Result result = LegacyConfigMigration.migrate(FMLPaths.CONFIGDIR.get(), MODID, + Path configDirectory = FMLPaths.CONFIGDIR.get(); + if (SteamConfigMigration.copyLegacyCommonConfig(configDirectory)) { + LOGGER.info("Copied Steam Advantage settings into basesteam-common.toml"); + } + LegacyConfigMigration.Result result = LegacyConfigMigration.migrate(configDirectory, MODID, + SteamLegacyMigrations.LEGACY_MODID, Mapping.of("options", "musket_damage", "options", "musketDamage", ValueType.DOUBLE), Mapping.of("options", "musket_reload_time", "options", "musketReloadTime", ValueType.INTEGER), Mapping.of("options", "musket_allowed", "options", "musketAllowed", ValueType.BOOLEAN), @@ -85,6 +94,6 @@ private void commonSetup(FMLCommonSetupEvent event) { Recipes.init(); TreasureChests.init(FMLPaths.CONFIGDIR.get()); Villages.init(); - LOGGER.info("Steam Advantage {} common setup complete", VERSION); + LOGGER.info("baseSteam {} common setup complete", VERSION); } } diff --git a/src/main/java/zone/moddev/mc/basesteam/blocks/DrillBitBlock.java b/src/main/java/zone/moddev/mc/basesteam/blocks/DrillBitBlock.java new file mode 100644 index 0000000..600bbdb --- /dev/null +++ b/src/main/java/zone/moddev/mc/basesteam/blocks/DrillBitBlock.java @@ -0,0 +1,72 @@ +package zone.moddev.mc.basesteam.blocks; + +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.EntityBlock; +import net.minecraft.world.level.material.Material; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.entity.Entity; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.core.Direction; +import java.util.Collections; +import java.util.List; +import net.minecraft.core.BlockPos; +import net.minecraft.world.phys.shapes.VoxelShape; +import net.minecraft.world.phys.shapes.Shapes; +import net.minecraft.world.phys.shapes.CollisionContext; +import net.minecraft.world.level.storage.loot.LootContext; +import net.minecraft.world.level.Explosion; +import net.minecraft.world.level.BlockGetter; +import net.minecraft.world.level.Level; +import net.minecraft.world.item.ItemStack; +import zone.moddev.mc.basesteam.init.Power; + +/** Hidden moving drill helper. It deliberately has no item form or drops. */ +public class DrillBitBlock extends Block implements EntityBlock { + private static final VoxelShape SHAPE = Shapes.box(0.25D, 0.25D, 0.25D, 0.75D, 0.75D, 0.75D); + + public DrillBitBlock() { + super(Block.Properties.of(Material.METAL).strength(5.0F, 2000.0F).noOcclusion()); + } + + @Override public BlockEntity newBlockEntity(BlockPos pos, BlockState state) { return new DrillBitTileEntity(pos, state); } + + @Override + public net.minecraft.world.level.block.entity.BlockEntityTicker getTicker( + Level level, BlockState state, net.minecraft.world.level.block.entity.BlockEntityType type) { + return type == zone.moddev.mc.basesteam.init.Entities.DRILLBIT + ? (world, pos, blockState, tile) -> ((DrillBitTileEntity) tile).tick() : null; + } + @Override public VoxelShape getShape(BlockState state, BlockGetter world, BlockPos pos, CollisionContext context) { return SHAPE; } + @Override public VoxelShape getCollisionShape(BlockState state, BlockGetter world, BlockPos pos, CollisionContext context) { return SHAPE; } + @Override public List getDrops(BlockState state, LootContext.Builder context) { return Collections.emptyList(); } + + @Override + public void entityInside(BlockState state, Level world, BlockPos pos, Entity victim) { + victim.hurt(Power.machine_damage, 2.0F); + } + + @Override + public void onRemove(BlockState state, Level world, BlockPos pos, BlockState newState, boolean moving) { + if (state.getBlock() != newState.getBlock()) { + BlockEntity tile = world.getBlockEntity(pos); + if (!world.isClientSide && tile instanceof DrillBitTileEntity) { + ((DrillBitTileEntity) tile).destroyLine(false); + } + } + super.onRemove(state, world, pos, newState, moving); + } + + @Override + public void wasExploded(Level world, BlockPos pos, Explosion explosion) { + destroyNeighbors(world, pos); + super.wasExploded(world, pos, explosion); + } + + private void destroyNeighbors(Level world, BlockPos pos) { + if (world.isClientSide) return; + for (Direction side : Direction.values()) { + BlockEntity tile = world.getBlockEntity(pos.relative(side)); + if (tile instanceof DrillBitTileEntity) ((DrillBitTileEntity) tile).destroyLine(); + } + } +} diff --git a/src/main/java/zone/moddev/mc/steamadvantage/blocks/DrillBitTileEntity.java b/src/main/java/zone/moddev/mc/basesteam/blocks/DrillBitTileEntity.java similarity index 64% rename from src/main/java/zone/moddev/mc/steamadvantage/blocks/DrillBitTileEntity.java rename to src/main/java/zone/moddev/mc/basesteam/blocks/DrillBitTileEntity.java index b0872e2..9d29989 100644 --- a/src/main/java/zone/moddev/mc/steamadvantage/blocks/DrillBitTileEntity.java +++ b/src/main/java/zone/moddev/mc/basesteam/blocks/DrillBitTileEntity.java @@ -1,29 +1,31 @@ -package zone.moddev.mc.steamadvantage.blocks; +package zone.moddev.mc.basesteam.blocks; -import zone.moddev.mc.steamadvantage.init.Blocks; -import net.minecraft.block.BlockState; -import net.minecraft.nbt.CompoundNBT; -import net.minecraft.network.NetworkManager; -import net.minecraft.network.play.server.SUpdateTileEntityPacket; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.Direction; -import net.minecraft.tileentity.ITickableTileEntity; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; +import zone.moddev.mc.basesteam.init.Blocks; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.network.Connection; +import net.minecraft.network.protocol.game.ClientboundBlockEntityDataPacket; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.core.Direction; +import net.minecraft.core.BlockPos; +import net.minecraft.world.level.Level; import java.util.ArrayList; import java.util.List; -public class DrillBitTileEntity extends TileEntity implements ITickableTileEntity{ +public class DrillBitTileEntity extends BlockEntity{ public final static float ROTATION_PER_TICK = 360f / 20f; // in degrees, 20 ticks per revolution public float rotation = 0; private Direction direction = Direction.DOWN; - public DrillBitTileEntity(){ - super(zone.moddev.mc.steamadvantage.init.Entities.DRILLBIT); + public DrillBitTileEntity() { + this(BlockPos.ZERO, new DrillBitBlock().defaultBlockState()); + } + + public DrillBitTileEntity(BlockPos pos, BlockState state) { + super(zone.moddev.mc.basesteam.init.Entities.DRILLBIT, pos, state); } - @Override public void tick(){ if(hasLevel() && getLevel().isClientSide){ rotation = ROTATION_PER_TICK * (getLevel().getGameTime() % 20); @@ -39,9 +41,9 @@ public Direction.Axis getDirection(){ return direction.getAxis(); } - public static void createDrillBitBlock(World w, BlockPos coord, Direction dir){ - w.setBlockAndUpdate(coord, zone.moddev.mc.steamadvantage.init.Blocks.drillbit.defaultBlockState()); - TileEntity tile = w.getBlockEntity(coord); + public static void createDrillBitBlock(Level w, BlockPos coord, Direction dir){ + w.setBlockAndUpdate(coord, zone.moddev.mc.basesteam.init.Blocks.drillbit.defaultBlockState()); + BlockEntity tile = w.getBlockEntity(coord); if(tile instanceof DrillBitTileEntity) ((DrillBitTileEntity) tile).setDirection(dir); } @@ -76,7 +78,7 @@ private void collectLine(List line, Direction f){ } @Override - public CompoundNBT save(CompoundNBT root){ + public CompoundTag save(CompoundTag root){ super.save(root); writeDirectionToNBT(root); return root; @@ -84,38 +86,38 @@ public CompoundNBT save(CompoundNBT root){ @Override - public void load(net.minecraft.block.BlockState state, CompoundNBT root){ - super.load(state, root); + public void load(CompoundTag root){ + super.load(root); readDirectionFromNBT(root); } @Override - public CompoundNBT getUpdateTag() { - return save(new CompoundNBT()); + public CompoundTag getUpdateTag() { + return save(new CompoundTag()); } /** * Turns the data field NBT into a network packet */ @Override - public SUpdateTileEntityPacket getUpdatePacket(){ - CompoundNBT nbtTag = new CompoundNBT(); + public ClientboundBlockEntityDataPacket getUpdatePacket(){ + CompoundTag nbtTag = new CompoundTag(); writeDirectionToNBT(nbtTag); - return new SUpdateTileEntityPacket(this.getBlockPos(), 0, nbtTag); + return new ClientboundBlockEntityDataPacket(this.getBlockPos(), 0, nbtTag); } /** * Receives the network packet made by getDescriptionPacket() */ @Override - public void onDataPacket(NetworkManager net, SUpdateTileEntityPacket packet) { + public void onDataPacket(Connection net, ClientboundBlockEntityDataPacket packet) { readDirectionFromNBT(packet.getTag()); } - private void writeDirectionToNBT(CompoundNBT root) { + private void writeDirectionToNBT(CompoundTag root) { root.putByte("dir", (byte)direction.get3DDataValue()); } - private void readDirectionFromNBT(CompoundNBT root) { + private void readDirectionFromNBT(CompoundTag root) { if(root.contains("dir")){ this.direction = decodeDirection(root.getByte("dir")); } else if(root.contains("d")){ diff --git a/src/main/java/zone/moddev/mc/basesteam/blocks/PlatformBlock.java b/src/main/java/zone/moddev/mc/basesteam/blocks/PlatformBlock.java new file mode 100644 index 0000000..d1f5bb7 --- /dev/null +++ b/src/main/java/zone/moddev/mc/basesteam/blocks/PlatformBlock.java @@ -0,0 +1,53 @@ +package zone.moddev.mc.basesteam.blocks; + +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.material.Material; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.block.state.properties.IntegerProperty; +import net.minecraft.world.level.block.state.StateDefinition; +import java.util.Collections; +import java.util.List; +import net.minecraft.core.BlockPos; +import net.minecraft.world.phys.shapes.VoxelShape; +import net.minecraft.world.phys.shapes.Shapes; +import net.minecraft.world.phys.shapes.CollisionContext; +import net.minecraft.world.level.storage.loot.LootContext; +import net.minecraft.world.level.BlockGetter; +import net.minecraft.world.level.Level; +import zone.moddev.mc.basesteam.init.Blocks; + +/** Hidden elevator platform segments. HEIGHT preserves the legacy metadata values 0-4. */ +public class PlatformBlock extends Block { + public static final IntegerProperty HEIGHT = IntegerProperty.create("height", 0, 4); + private static final VoxelShape[] SHAPES = new VoxelShape[] { + Shapes.box(0.25D, 0.0D, 0.25D, 0.75D, 1.0D, 0.75D), + Shapes.box(0.0D, 0.0D, 0.0D, 1.0D, 0.25D, 1.0D), + Shapes.box(0.0D, 0.0D, 0.0D, 1.0D, 0.50D, 1.0D), + Shapes.box(0.0D, 0.0D, 0.0D, 1.0D, 0.75D, 1.0D), + Shapes.block() + }; + + public PlatformBlock() { + super(Block.Properties.of(Material.METAL).strength(5.0F, 2000.0F).noOcclusion() + .isRedstoneConductor((state, world, pos) -> false) + .isSuffocating((state, world, pos) -> false) + .isViewBlocking((state, world, pos) -> false)); + registerDefaultState(getStateDefinition().any().setValue(HEIGHT, 1)); + } + + @Override protected void createBlockStateDefinition(StateDefinition.Builder builder) { builder.add(HEIGHT); } + @Override public VoxelShape getShape(BlockState state, BlockGetter world, BlockPos pos, CollisionContext context) { return SHAPES[state.getValue(HEIGHT)]; } + @Override public VoxelShape getCollisionShape(BlockState state, BlockGetter world, BlockPos pos, CollisionContext context) { return SHAPES[state.getValue(HEIGHT)]; } + @Override public List getDrops(BlockState state, LootContext.Builder context) { return Collections.emptyList(); } + + @Override + public void neighborChanged(BlockState state, Level world, BlockPos pos, Block block, BlockPos fromPos, boolean moving) { + if (!canBlockStay(world, pos)) world.destroyBlock(pos, true); + } + + public boolean canBlockStay(Level world, BlockPos pos) { + Block below = world.getBlockState(pos.below()).getBlock(); + return below == this || below == Blocks.steam_elevator_platform || below == Blocks.steam_elevator; + } +} diff --git a/src/main/java/zone/moddev/mc/basesteam/blocks/PumpPipeBlock.java b/src/main/java/zone/moddev/mc/basesteam/blocks/PumpPipeBlock.java new file mode 100644 index 0000000..b37defc --- /dev/null +++ b/src/main/java/zone/moddev/mc/basesteam/blocks/PumpPipeBlock.java @@ -0,0 +1,50 @@ +package zone.moddev.mc.basesteam.blocks; + +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.material.Material; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.item.ItemStack; +import java.util.Collections; +import java.util.List; +import net.minecraft.core.BlockPos; +import net.minecraft.world.phys.shapes.VoxelShape; +import net.minecraft.world.phys.shapes.Shapes; +import net.minecraft.world.phys.shapes.CollisionContext; +import net.minecraft.world.level.storage.loot.LootContext; +import net.minecraft.world.level.Explosion; +import net.minecraft.world.level.BlockGetter; +import net.minecraft.world.level.Level; + +/** Hidden pipe shaft placed beneath a steam pump. */ +public class PumpPipeBlock extends Block { + private static final VoxelShape SHAPE = Shapes.box(0.0D, 0.25D, 0.0D, 0.75D, 1.0D, 1.0D); + + public PumpPipeBlock() { + super(Block.Properties.of(Material.METAL).strength(5.0F, 10.0F).noOcclusion()); + } + + @Override public VoxelShape getShape(BlockState state, BlockGetter world, BlockPos pos, CollisionContext context) { return SHAPE; } + @Override public VoxelShape getCollisionShape(BlockState state, BlockGetter world, BlockPos pos, CollisionContext context) { return SHAPE; } + @Override public List getDrops(BlockState state, LootContext.Builder context) { return Collections.emptyList(); } + + @Override + public void onRemove(BlockState state, Level world, BlockPos pos, BlockState newState, boolean moving) { + if (state.getBlock() != newState.getBlock()) destroyShaft(world, pos); + super.onRemove(state, world, pos, newState, moving); + } + + @Override + public void wasExploded(Level world, BlockPos pos, Explosion explosion) { + destroyShaft(world, pos); + super.wasExploded(world, pos, explosion); + } + + private void destroyShaft(Level world, BlockPos pos) { + if (world.isClientSide) return; + BlockPos cursor = pos.below(); + while (cursor.getY() > 0 && world.getBlockState(cursor).getBlock() == this) { + world.destroyBlock(cursor, false); + cursor = cursor.below(); + } + } +} diff --git a/src/main/java/zone/moddev/mc/steamadvantage/blocks/SteamPipeBlock.java b/src/main/java/zone/moddev/mc/basesteam/blocks/SteamPipeBlock.java similarity index 57% rename from src/main/java/zone/moddev/mc/steamadvantage/blocks/SteamPipeBlock.java rename to src/main/java/zone/moddev/mc/basesteam/blocks/SteamPipeBlock.java index 1926307..d4c0b1d 100644 --- a/src/main/java/zone/moddev/mc/steamadvantage/blocks/SteamPipeBlock.java +++ b/src/main/java/zone/moddev/mc/basesteam/blocks/SteamPipeBlock.java @@ -1,7 +1,7 @@ -package zone.moddev.mc.steamadvantage.blocks; +package zone.moddev.mc.basesteam.blocks; -import zone.moddev.mc.steamadvantage.init.Power; -import net.minecraft.block.material.Material; +import zone.moddev.mc.basesteam.init.Power; +import net.minecraft.world.level.material.Material; public class SteamPipeBlock extends cyano.poweradvantage.api.simple.BlockSimplePowerConduit{ diff --git a/src/main/java/zone/moddev/mc/basesteam/blocks/SteamTrackBlock.java b/src/main/java/zone/moddev/mc/basesteam/blocks/SteamTrackBlock.java new file mode 100644 index 0000000..8de83d9 --- /dev/null +++ b/src/main/java/zone/moddev/mc/basesteam/blocks/SteamTrackBlock.java @@ -0,0 +1,23 @@ +package zone.moddev.mc.basesteam.blocks; + +import cyano.poweradvantage.api.simple.BlockSimplePowerConduit; +import net.minecraft.world.level.material.Material; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.core.BlockPos; +import net.minecraft.world.phys.shapes.VoxelShape; +import net.minecraft.world.phys.shapes.Shapes; +import net.minecraft.world.phys.shapes.CollisionContext; +import net.minecraft.world.level.BlockGetter; +import zone.moddev.mc.basesteam.init.Power; + +public class SteamTrackBlock extends BlockSimplePowerConduit { + public SteamTrackBlock() { + super(Properties.of(Material.PISTON).strength(0.75F).noOcclusion() + .isRedstoneConductor((state, world, pos) -> false) + .isSuffocating((state, world, pos) -> false) + .isViewBlocking((state, world, pos) -> false), + 2.0F / 16.0F, Power.steam_power); + } + @Override public VoxelShape getShape(BlockState state, BlockGetter world, BlockPos pos, CollisionContext context) { return Shapes.block(); } + @Override public VoxelShape getCollisionShape(BlockState state, BlockGetter world, BlockPos pos, CollisionContext context) { return Shapes.block(); } +} diff --git a/src/main/java/zone/moddev/mc/basesteam/compat/BaseMetalsCompat.java b/src/main/java/zone/moddev/mc/basesteam/compat/BaseMetalsCompat.java new file mode 100644 index 0000000..7ca5a48 --- /dev/null +++ b/src/main/java/zone/moddev/mc/basesteam/compat/BaseMetalsCompat.java @@ -0,0 +1,60 @@ +package zone.moddev.mc.basesteam.compat; + +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.SimpleContainer; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.crafting.Recipe; +import net.minecraft.world.level.Level; +import net.minecraftforge.fml.ModList; +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, not mutable runtime registrations. */ + 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 boolean hasCrusherRecipe(Level world, ItemStack input) { + return getCrusherRecipeOutput(world, input) != null; + } + + public static ItemStack getCrusherRecipeOutput(Level world, ItemStack input) { + if (world == null || input == null || input.isEmpty()) return null; + if (isLoaded()) { + SimpleContainer inventory = new SimpleContainer(1); + inventory.setItem(0, input.copy()); + for (Recipe candidate : world.getRecipeManager().getRecipes()) { + if (candidate instanceof CrushingRecipe && candidate.matches(inventory, world)) { + return candidate.getResultItem().copy(); + } + } + } + return getVanillaCrusherOutput(input); + } + + public static ItemStack getCrusherRecipeOutput(Level world, BlockState input) { + return input == null ? null : getCrusherRecipeOutput(world, new ItemStack(input.getBlock())); + } + + private static ItemStack getVanillaCrusherOutput(ItemStack input) { + Item item = input.getItem(); + if (item == net.minecraft.world.level.block.Blocks.STONE.asItem()) return new ItemStack(net.minecraft.world.level.block.Blocks.COBBLESTONE); + if (item == net.minecraft.world.level.block.Blocks.COBBLESTONE.asItem()) return new ItemStack(net.minecraft.world.level.block.Blocks.GRAVEL); + if (item == net.minecraft.world.level.block.Blocks.GRAVEL.asItem()) return new ItemStack(net.minecraft.world.level.block.Blocks.SAND); + if (item == net.minecraft.world.level.block.Blocks.SANDSTONE.asItem()) return new ItemStack(net.minecraft.world.level.block.Blocks.SAND, 4); + if (item == net.minecraft.world.level.block.Blocks.RED_SANDSTONE.asItem()) return new ItemStack(net.minecraft.world.level.block.Blocks.RED_SAND, 4); + if (item == net.minecraft.world.level.block.Blocks.GLASS.asItem()) return new ItemStack(net.minecraft.world.level.block.Blocks.SAND); + if (item == net.minecraft.world.level.block.Blocks.GLOWSTONE.asItem()) return new ItemStack(net.minecraft.world.item.Items.GLOWSTONE_DUST, 4); + if (item == net.minecraft.world.level.block.Blocks.SUGAR_CANE.asItem()) return new ItemStack(net.minecraft.world.item.Items.SUGAR, 2); + if (item == net.minecraft.world.item.Items.BONE) return new ItemStack(net.minecraft.world.item.Items.BONE_MEAL, 3); + if (item == net.minecraft.world.item.Items.BLAZE_ROD) return new ItemStack(net.minecraft.world.item.Items.BLAZE_POWDER, 2); + return null; + } +} diff --git a/src/main/java/zone/moddev/mc/steamadvantage/config/SteamAdvantageConfig.java b/src/main/java/zone/moddev/mc/basesteam/config/SteamAdvantageConfig.java similarity index 90% rename from src/main/java/zone/moddev/mc/steamadvantage/config/SteamAdvantageConfig.java rename to src/main/java/zone/moddev/mc/basesteam/config/SteamAdvantageConfig.java index 12340a7..0020733 100644 --- a/src/main/java/zone/moddev/mc/steamadvantage/config/SteamAdvantageConfig.java +++ b/src/main/java/zone/moddev/mc/basesteam/config/SteamAdvantageConfig.java @@ -1,8 +1,8 @@ -package zone.moddev.mc.steamadvantage.config; +package zone.moddev.mc.basesteam.config; import net.minecraftforge.common.ForgeConfigSpec; -import net.minecraftforge.fml.config.ModConfig; -import zone.moddev.mc.steamadvantage.SteamAdvantage; +import net.minecraftforge.fml.event.config.ModConfigEvent; +import zone.moddev.mc.basesteam.SteamAdvantage; /** Common configuration retaining the legacy gameplay defaults. */ public final class SteamAdvantageConfig { @@ -29,7 +29,7 @@ public final class SteamAdvantageConfig { private SteamAdvantageConfig() {} - public static void onConfigLoading(ModConfig.Loading event) { + public static void onConfigLoading(ModConfigEvent.Loading event) { if (event.getConfig().getSpec() != SPEC) return; loaded = true; apply(); diff --git a/src/main/java/zone/moddev/mc/steamadvantage/enchantments/HighExplosiveEnchantment.java b/src/main/java/zone/moddev/mc/basesteam/enchantments/HighExplosiveEnchantment.java similarity index 51% rename from src/main/java/zone/moddev/mc/steamadvantage/enchantments/HighExplosiveEnchantment.java rename to src/main/java/zone/moddev/mc/basesteam/enchantments/HighExplosiveEnchantment.java index 57593c0..7981c7c 100644 --- a/src/main/java/zone/moddev/mc/steamadvantage/enchantments/HighExplosiveEnchantment.java +++ b/src/main/java/zone/moddev/mc/basesteam/enchantments/HighExplosiveEnchantment.java @@ -1,14 +1,14 @@ -package zone.moddev.mc.steamadvantage.enchantments; +package zone.moddev.mc.basesteam.enchantments; -import zone.moddev.mc.steamadvantage.init.Items; -import net.minecraft.enchantment.EnchantmentType; -import net.minecraft.inventory.EquipmentSlotType; -import net.minecraft.item.ItemStack; +import zone.moddev.mc.basesteam.init.Items; +import net.minecraft.world.item.enchantment.EnchantmentCategory; +import net.minecraft.world.entity.EquipmentSlot; +import net.minecraft.world.item.ItemStack; -public class HighExplosiveEnchantment extends net.minecraft.enchantment.Enchantment{ +public class HighExplosiveEnchantment extends net.minecraft.world.item.enchantment.Enchantment{ public HighExplosiveEnchantment() { - super(Rarity.UNCOMMON,EnchantmentType.BREAKABLE,new EquipmentSlotType[]{EquipmentSlotType.MAINHAND}); + super(Rarity.UNCOMMON,EnchantmentCategory.BREAKABLE,new EquipmentSlot[]{EquipmentSlot.MAINHAND}); } diff --git a/src/main/java/zone/moddev/mc/steamadvantage/enchantments/PowderlessEnchantment.java b/src/main/java/zone/moddev/mc/basesteam/enchantments/PowderlessEnchantment.java similarity index 50% rename from src/main/java/zone/moddev/mc/steamadvantage/enchantments/PowderlessEnchantment.java rename to src/main/java/zone/moddev/mc/basesteam/enchantments/PowderlessEnchantment.java index 6afd069..2eb00b1 100644 --- a/src/main/java/zone/moddev/mc/steamadvantage/enchantments/PowderlessEnchantment.java +++ b/src/main/java/zone/moddev/mc/basesteam/enchantments/PowderlessEnchantment.java @@ -1,14 +1,14 @@ -package zone.moddev.mc.steamadvantage.enchantments; +package zone.moddev.mc.basesteam.enchantments; -import zone.moddev.mc.steamadvantage.init.Items; -import net.minecraft.enchantment.EnchantmentType; -import net.minecraft.inventory.EquipmentSlotType; -import net.minecraft.item.ItemStack; +import zone.moddev.mc.basesteam.init.Items; +import net.minecraft.world.item.enchantment.EnchantmentCategory; +import net.minecraft.world.entity.EquipmentSlot; +import net.minecraft.world.item.ItemStack; -public class PowderlessEnchantment extends net.minecraft.enchantment.Enchantment{ +public class PowderlessEnchantment extends net.minecraft.world.item.enchantment.Enchantment{ public PowderlessEnchantment() { - super(Rarity.VERY_RARE,EnchantmentType.BREAKABLE,new EquipmentSlotType[]{EquipmentSlotType.MAINHAND}); + super(Rarity.VERY_RARE,EnchantmentCategory.BREAKABLE,new EquipmentSlot[]{EquipmentSlot.MAINHAND}); } diff --git a/src/main/java/zone/moddev/mc/steamadvantage/enchantments/RapidReloadEnchantment.java b/src/main/java/zone/moddev/mc/basesteam/enchantments/RapidReloadEnchantment.java similarity index 50% rename from src/main/java/zone/moddev/mc/steamadvantage/enchantments/RapidReloadEnchantment.java rename to src/main/java/zone/moddev/mc/basesteam/enchantments/RapidReloadEnchantment.java index 6e560c1..e7dc406 100644 --- a/src/main/java/zone/moddev/mc/steamadvantage/enchantments/RapidReloadEnchantment.java +++ b/src/main/java/zone/moddev/mc/basesteam/enchantments/RapidReloadEnchantment.java @@ -1,14 +1,14 @@ -package zone.moddev.mc.steamadvantage.enchantments; +package zone.moddev.mc.basesteam.enchantments; -import zone.moddev.mc.steamadvantage.init.Items; -import net.minecraft.enchantment.EnchantmentType; -import net.minecraft.inventory.EquipmentSlotType; -import net.minecraft.item.ItemStack; +import zone.moddev.mc.basesteam.init.Items; +import net.minecraft.world.item.enchantment.EnchantmentCategory; +import net.minecraft.world.entity.EquipmentSlot; +import net.minecraft.world.item.ItemStack; -public class RapidReloadEnchantment extends net.minecraft.enchantment.Enchantment{ +public class RapidReloadEnchantment extends net.minecraft.world.item.enchantment.Enchantment{ public RapidReloadEnchantment() { - super(Rarity.RARE,EnchantmentType.BREAKABLE,new EquipmentSlotType[]{EquipmentSlotType.MAINHAND}); + super(Rarity.RARE,EnchantmentCategory.BREAKABLE,new EquipmentSlot[]{EquipmentSlot.MAINHAND}); } diff --git a/src/main/java/zone/moddev/mc/steamadvantage/enchantments/RecoilEnchantment.java b/src/main/java/zone/moddev/mc/basesteam/enchantments/RecoilEnchantment.java similarity index 52% rename from src/main/java/zone/moddev/mc/steamadvantage/enchantments/RecoilEnchantment.java rename to src/main/java/zone/moddev/mc/basesteam/enchantments/RecoilEnchantment.java index 4f666a5..e75db1d 100644 --- a/src/main/java/zone/moddev/mc/steamadvantage/enchantments/RecoilEnchantment.java +++ b/src/main/java/zone/moddev/mc/basesteam/enchantments/RecoilEnchantment.java @@ -1,14 +1,14 @@ -package zone.moddev.mc.steamadvantage.enchantments; +package zone.moddev.mc.basesteam.enchantments; -import zone.moddev.mc.steamadvantage.init.Items; -import net.minecraft.enchantment.EnchantmentType; -import net.minecraft.inventory.EquipmentSlotType; -import net.minecraft.item.ItemStack; +import zone.moddev.mc.basesteam.init.Items; +import net.minecraft.world.item.enchantment.EnchantmentCategory; +import net.minecraft.world.entity.EquipmentSlot; +import net.minecraft.world.item.ItemStack; -public class RecoilEnchantment extends net.minecraft.enchantment.Enchantment{ +public class RecoilEnchantment extends net.minecraft.world.item.enchantment.Enchantment{ public RecoilEnchantment() { - super(Rarity.COMMON,EnchantmentType.BREAKABLE,new EquipmentSlotType[]{EquipmentSlotType.MAINHAND}); + super(Rarity.COMMON,EnchantmentCategory.BREAKABLE,new EquipmentSlot[]{EquipmentSlot.MAINHAND}); } diff --git a/src/main/java/zone/moddev/mc/basesteam/graphics/ClientRegistration.java b/src/main/java/zone/moddev/mc/basesteam/graphics/ClientRegistration.java new file mode 100644 index 0000000..2c02d43 --- /dev/null +++ b/src/main/java/zone/moddev/mc/basesteam/graphics/ClientRegistration.java @@ -0,0 +1,32 @@ +package zone.moddev.mc.basesteam.graphics; + +import net.minecraftforge.client.event.EntityRenderersEvent; +import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent; +import net.minecraft.client.renderer.RenderType; +import net.minecraft.client.renderer.ItemBlockRenderTypes; +import net.minecraft.client.renderer.item.ItemProperties; +import net.minecraft.resources.ResourceLocation; +import zone.moddev.mc.basesteam.init.Items; +import zone.moddev.mc.basesteam.items.MusketItem; +import zone.moddev.mc.basesteam.init.Blocks; +import zone.moddev.mc.basesteam.init.Entities; + +/** Client-only renderer registration. */ +public final class ClientRegistration { + private ClientRegistration() {} + + public static void registerRenderers(EntityRenderersEvent.RegisterRenderers event) { + event.registerBlockEntityRenderer(Entities.DRILLBIT, DrillBitRenderer::new); + } + + public static void onClientSetup(FMLClientSetupEvent event) { + event.enqueueWork(() -> { + ItemBlockRenderTypes.setRenderLayer(Blocks.steam_track, RenderType.cutout()); + ItemProperties.register(Items.blackpowder_musket, new ResourceLocation("loaded"), + (item, world, entity, seed) -> MusketItem.isLoaded(item) ? 1.0F : 0.0F); + ItemProperties.register(Items.blackpowder_musket, new ResourceLocation("loading"), + (item, world, entity, seed) -> entity != null && entity.isUsingItem() + && entity.getUseItem() == item ? 1.0F : 0.0F); + }); + } +} diff --git a/src/main/java/zone/moddev/mc/steamadvantage/graphics/DrillBitRenderer.java b/src/main/java/zone/moddev/mc/basesteam/graphics/DrillBitRenderer.java similarity index 78% rename from src/main/java/zone/moddev/mc/steamadvantage/graphics/DrillBitRenderer.java rename to src/main/java/zone/moddev/mc/basesteam/graphics/DrillBitRenderer.java index eaf2a4f..c161489 100644 --- a/src/main/java/zone/moddev/mc/steamadvantage/graphics/DrillBitRenderer.java +++ b/src/main/java/zone/moddev/mc/basesteam/graphics/DrillBitRenderer.java @@ -1,37 +1,36 @@ -package zone.moddev.mc.steamadvantage.graphics; +package zone.moddev.mc.basesteam.graphics; -import com.mojang.blaze3d.matrix.MatrixStack; -import com.mojang.blaze3d.vertex.IVertexBuilder; -import net.minecraft.client.renderer.IRenderTypeBuffer; +import com.mojang.blaze3d.vertex.PoseStack; +import com.mojang.blaze3d.vertex.VertexConsumer; +import net.minecraft.client.renderer.MultiBufferSource; import net.minecraft.client.renderer.RenderType; -import net.minecraft.util.math.vector.Vector3f; -import net.minecraft.client.renderer.tileentity.TileEntityRenderer; -import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher; -import net.minecraft.util.Direction; -import net.minecraft.util.ResourceLocation; +import com.mojang.math.Vector3f; +import net.minecraft.client.renderer.blockentity.BlockEntityRenderer; +import net.minecraft.client.renderer.blockentity.BlockEntityRendererProvider.Context; +import net.minecraft.core.Direction; +import net.minecraft.resources.ResourceLocation; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; -import zone.moddev.mc.steamadvantage.SteamAdvantage; -import zone.moddev.mc.steamadvantage.blocks.DrillBitTileEntity; +import zone.moddev.mc.basesteam.SteamAdvantage; +import zone.moddev.mc.basesteam.blocks.DrillBitTileEntity; @OnlyIn(Dist.CLIENT) -public class DrillBitRenderer extends TileEntityRenderer { +public class DrillBitRenderer implements BlockEntityRenderer { private static final ResourceLocation TEXTURE = new ResourceLocation(SteamAdvantage.MODID, "textures/entity/drill_bit.png"); - public DrillBitRenderer(TileEntityRendererDispatcher dispatcher) { - super(dispatcher); + public DrillBitRenderer(Context dispatcher) { } @Override - public void render(DrillBitTileEntity tile, float partialTick, MatrixStack matrices, - IRenderTypeBuffer buffers, int light, int overlay) { + public void render(DrillBitTileEntity tile, float partialTick, PoseStack matrices, + MultiBufferSource buffers, int light, int overlay) { renderGeometry(tile.getDirection(), tile.rotation + DrillBitTileEntity.ROTATION_PER_TICK * partialTick, matrices, buffers.getBuffer(RenderType.entityTranslucent(TEXTURE)), light, overlay); } - static void renderGeometry(Direction.Axis axis, float rotation, MatrixStack matrices, - IVertexBuilder vertices, int light, int overlay) { + static void renderGeometry(Direction.Axis axis, float rotation, PoseStack matrices, + VertexConsumer vertices, int light, int overlay) { matrices.pushPose(); try { matrices.translate(0.5D, 0.5D, 0.5D); @@ -40,7 +39,7 @@ static void renderGeometry(Direction.Axis axis, float rotation, MatrixStack matr if (axis != Direction.Axis.Z) matrices.mulPose(Vector3f.ZP.rotationDegrees(90.0F)); } matrices.mulPose(Vector3f.YP.rotationDegrees(rotation)); - MatrixStack.Entry transform = matrices.last(); + PoseStack.Pose transform = matrices.last(); final float radius = 0.25F; // Retain the original six quads and UV layout; native buffers supply lighting and overlay. vertex(transform, vertices, radius, 0.5F, -radius, 0, 0, 0, 0, -1, light, overlay); @@ -77,7 +76,7 @@ static void renderGeometry(Direction.Axis axis, float rotation, MatrixStack matr } } - private static void vertex(MatrixStack.Entry transform, IVertexBuilder vertices, + private static void vertex(PoseStack.Pose transform, VertexConsumer vertices, float x, float y, float z, float u, float v, float normalX, float normalY, float normalZ, int light, int overlay) { vertices.vertex(transform.pose(), x, y, z).color(255, 255, 255, 255).uv(u, v) diff --git a/src/main/java/zone/moddev/mc/steamadvantage/gui/BlastFurnaceGUI.java b/src/main/java/zone/moddev/mc/basesteam/gui/BlastFurnaceGUI.java similarity index 82% rename from src/main/java/zone/moddev/mc/steamadvantage/gui/BlastFurnaceGUI.java rename to src/main/java/zone/moddev/mc/basesteam/gui/BlastFurnaceGUI.java index 78e8d9a..204d4cd 100644 --- a/src/main/java/zone/moddev/mc/steamadvantage/gui/BlastFurnaceGUI.java +++ b/src/main/java/zone/moddev/mc/basesteam/gui/BlastFurnaceGUI.java @@ -1,14 +1,14 @@ -package zone.moddev.mc.steamadvantage.gui; +package zone.moddev.mc.basesteam.gui; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.inventory.container.Slot; -import net.minecraft.item.ItemStack; -import net.minecraft.util.ResourceLocation; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.inventory.Slot; +import net.minecraft.world.item.ItemStack; +import net.minecraft.resources.ResourceLocation; import cyano.poweradvantage.api.simple.SimpleMachineGUI; -import zone.moddev.mc.poweradvantage.math.Integer2D; -import zone.moddev.mc.steamadvantage.SteamAdvantage; -import zone.moddev.mc.steamadvantage.machines.BlastFurnaceTileEntity; +import zone.moddev.mc.basepower.math.Integer2D; +import zone.moddev.mc.basesteam.SteamAdvantage; +import zone.moddev.mc.basesteam.machines.BlastFurnaceTileEntity; public class BlastFurnaceGUI extends SimpleMachineGUI{ @@ -19,10 +19,10 @@ public BlastFurnaceGUI() { ); for(int i = 4; i < 7; i++)super.specialSlots.put(i, (SlotContext c)->new Slot(c.machineInventory,c.slotIndex,c.screenPositionX,c.screenPositionY){ @Override - public ItemStack onTake(PlayerEntity player, ItemStack stack) + public void onTake(Player player, ItemStack stack) { stack.onCraftedBy(player.level, player, stack.getCount()); - return super.onTake(player, stack); + super.onTake(player, stack); } @Override public boolean mayPlace(ItemStack stack){ return false; } @@ -47,7 +47,7 @@ public ItemStack onTake(PlayerEntity player, ItemStack stack) * @param guiContainer This is the instance of GUIContainer that is drawing * the GUI. You need to use it to draw on the screen. For example:
-net.minecraft.client.Minecraft.getInstance().getTextureManager().bind(arrowTexture);
+com.mojang.blaze3d.systems.RenderSystem.setShaderTexture(0, arrowTexture);
 guiContainer.blit(x+79, y+35, 0, 0, arrowLength, 17); // x, y, textureOffsetX, textureOffsetY, width, height)
 	   
* @param x This is the x coordinate (in pixels) from the top-left corner of diff --git a/src/main/java/zone/moddev/mc/steamadvantage/gui/CoalBoilerGUI.java b/src/main/java/zone/moddev/mc/basesteam/gui/CoalBoilerGUI.java similarity index 87% rename from src/main/java/zone/moddev/mc/steamadvantage/gui/CoalBoilerGUI.java rename to src/main/java/zone/moddev/mc/basesteam/gui/CoalBoilerGUI.java index f561885..28026a5 100644 --- a/src/main/java/zone/moddev/mc/steamadvantage/gui/CoalBoilerGUI.java +++ b/src/main/java/zone/moddev/mc/basesteam/gui/CoalBoilerGUI.java @@ -1,11 +1,11 @@ -package zone.moddev.mc.steamadvantage.gui; +package zone.moddev.mc.basesteam.gui; -import net.minecraft.util.ResourceLocation; +import net.minecraft.resources.ResourceLocation; import cyano.poweradvantage.api.simple.SimpleMachineGUI; -import zone.moddev.mc.poweradvantage.math.Integer2D; -import zone.moddev.mc.steamadvantage.SteamAdvantage; -import zone.moddev.mc.steamadvantage.machines.CoalBoilerTileEntity; +import zone.moddev.mc.basepower.math.Integer2D; +import zone.moddev.mc.basesteam.SteamAdvantage; +import zone.moddev.mc.basesteam.machines.CoalBoilerTileEntity; public class CoalBoilerGUI extends SimpleMachineGUI{ @@ -34,7 +34,7 @@ public CoalBoilerGUI() { * @param guiContainer This is the instance of GUIContainer that is drawing * the GUI. You need to use it to draw on the screen. For example:
-net.minecraft.client.Minecraft.getInstance().getTextureManager().bind(arrowTexture);
+com.mojang.blaze3d.systems.RenderSystem.setShaderTexture(0, arrowTexture);
 guiContainer.blit(x+79, y+35, 0, 0, arrowLength, 17); // x, y, textureOffsetX, textureOffsetY, width, height)
 	   
* @param x This is the x coordinate (in pixels) from the top-left corner of diff --git a/src/main/java/zone/moddev/mc/steamadvantage/gui/ElectricBoilerGUI.java b/src/main/java/zone/moddev/mc/basesteam/gui/ElectricBoilerGUI.java similarity index 87% rename from src/main/java/zone/moddev/mc/steamadvantage/gui/ElectricBoilerGUI.java rename to src/main/java/zone/moddev/mc/basesteam/gui/ElectricBoilerGUI.java index 6794718..a23ac18 100644 --- a/src/main/java/zone/moddev/mc/steamadvantage/gui/ElectricBoilerGUI.java +++ b/src/main/java/zone/moddev/mc/basesteam/gui/ElectricBoilerGUI.java @@ -1,11 +1,11 @@ -package zone.moddev.mc.steamadvantage.gui; +package zone.moddev.mc.basesteam.gui; -import net.minecraft.util.ResourceLocation; +import net.minecraft.resources.ResourceLocation; import cyano.poweradvantage.api.simple.SimpleMachineGUI; -import zone.moddev.mc.poweradvantage.math.Integer2D; -import zone.moddev.mc.steamadvantage.SteamAdvantage; -import zone.moddev.mc.steamadvantage.machines.ElectricBoilerTileEntity; +import zone.moddev.mc.basepower.math.Integer2D; +import zone.moddev.mc.basesteam.SteamAdvantage; +import zone.moddev.mc.basesteam.machines.ElectricBoilerTileEntity; public class ElectricBoilerGUI extends SimpleMachineGUI{ @@ -34,7 +34,7 @@ public ElectricBoilerGUI() { * @param guiContainer This is the instance of GUIContainer that is drawing * the GUI. You need to use it to draw on the screen. For example:
-net.minecraft.client.Minecraft.getInstance().getTextureManager().bind(arrowTexture);
+com.mojang.blaze3d.systems.RenderSystem.setShaderTexture(0, arrowTexture);
 guiContainer.blit(x+79, y+35, 0, 0, arrowLength, 17); // x, y, textureOffsetX, textureOffsetY, width, height)
 	   
* @param x This is the x coordinate (in pixels) from the top-left corner of diff --git a/src/main/java/zone/moddev/mc/steamadvantage/gui/GUIHelper.java b/src/main/java/zone/moddev/mc/basesteam/gui/GUIHelper.java similarity index 81% rename from src/main/java/zone/moddev/mc/steamadvantage/gui/GUIHelper.java rename to src/main/java/zone/moddev/mc/basesteam/gui/GUIHelper.java index a1085ee..2130ccb 100644 --- a/src/main/java/zone/moddev/mc/steamadvantage/gui/GUIHelper.java +++ b/src/main/java/zone/moddev/mc/basesteam/gui/GUIHelper.java @@ -1,12 +1,12 @@ -package zone.moddev.mc.steamadvantage.gui; +package zone.moddev.mc.basesteam.gui; import cyano.poweradvantage.api.simple.SimpleMachineGUI.GUIContainer; -import zone.moddev.mc.poweradvantage.gui.FluidTankGUI; -import net.minecraft.client.renderer.Tessellator; -import net.minecraft.client.renderer.BufferBuilder; -import net.minecraft.client.renderer.vertex.DefaultVertexFormats; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.math.MathHelper; +import zone.moddev.mc.basepower.gui.FluidTankGUI; +import com.mojang.blaze3d.vertex.Tesselator; +import com.mojang.blaze3d.vertex.BufferBuilder; +import com.mojang.blaze3d.vertex.DefaultVertexFormat; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.util.Mth; import cyano.poweradvantage.api.fluid.FluidStack; @net.minecraftforge.api.distmarker.OnlyIn(net.minecraftforge.api.distmarker.Dist.CLIENT) @@ -41,10 +41,10 @@ public static void drawNeedle(float pivotX, float pivotY, float zLevel, float angle = (1f - value) * PI; float offsetX = pivotX; float offsetY = pivotY; - BufferBuilder renderer = Tessellator.getInstance().getBuilder(); + BufferBuilder renderer = Tesselator.getInstance().getBuilder(); - float sin = MathHelper.sin(angle); - float cos = MathHelper.cos(angle); + float sin = Mth.sin(angle); + float cos = Mth.cos(angle); float tipX = cos * needleL + offsetX; float tipY = -sin * needleL + offsetY; @@ -75,13 +75,14 @@ public static void drawNeedle(float pivotX, float pivotY, float zLevel, v[2] = v[1]; v[3] = v[0]; - renderer.begin(7, DefaultVertexFormats.POSITION_TEX); + com.mojang.blaze3d.systems.RenderSystem.setShader(net.minecraft.client.renderer.GameRenderer::getPositionTexShader); + renderer.begin(com.mojang.blaze3d.vertex.VertexFormat.Mode.QUADS, DefaultVertexFormat.POSITION_TEX); // (x, y, z, u, v) for(int i = 3; i >= 0; i--){ renderer.vertex(x[i], y[i], zLevel).uv(u[i],v[i]).endVertex();; } - net.minecraft.client.renderer.Tessellator.getInstance().end(); + com.mojang.blaze3d.vertex.Tesselator.getInstance().end(); } @@ -111,7 +112,7 @@ public static void drawFluidBar(FluidStack fs, float barHeight, int xPos, int yP if(barHeight > 0){ FluidTankGUI.drawFluidFilledRectangle(guiContainer,fs,x+xPos, y+yPos+barSlotHeight-h,w, h,z); } - net.minecraft.client.Minecraft.getInstance().getTextureManager().bind(displayImage); + com.mojang.blaze3d.systems.RenderSystem.setShaderTexture(0, displayImage); guiContainer.blit(x+xPos-texMarginW, y+yPos-texMarginH, texOverlayX, texOverlayY, texOverlayW, texOverlayH); // x, y, textureOffsetX, textureOffsetY, width, height) } diff --git a/src/main/java/zone/moddev/mc/steamadvantage/gui/GeothermalBoilerGUI.java b/src/main/java/zone/moddev/mc/basesteam/gui/GeothermalBoilerGUI.java similarity index 87% rename from src/main/java/zone/moddev/mc/steamadvantage/gui/GeothermalBoilerGUI.java rename to src/main/java/zone/moddev/mc/basesteam/gui/GeothermalBoilerGUI.java index 4443823..e134547 100644 --- a/src/main/java/zone/moddev/mc/steamadvantage/gui/GeothermalBoilerGUI.java +++ b/src/main/java/zone/moddev/mc/basesteam/gui/GeothermalBoilerGUI.java @@ -1,11 +1,11 @@ -package zone.moddev.mc.steamadvantage.gui; +package zone.moddev.mc.basesteam.gui; -import net.minecraft.util.ResourceLocation; +import net.minecraft.resources.ResourceLocation; import cyano.poweradvantage.api.simple.SimpleMachineGUI; -import zone.moddev.mc.poweradvantage.math.Integer2D; -import zone.moddev.mc.steamadvantage.SteamAdvantage; -import zone.moddev.mc.steamadvantage.machines.GeothermalBoilerTileEntity; +import zone.moddev.mc.basepower.math.Integer2D; +import zone.moddev.mc.basesteam.SteamAdvantage; +import zone.moddev.mc.basesteam.machines.GeothermalBoilerTileEntity; public class GeothermalBoilerGUI extends SimpleMachineGUI{ @@ -34,7 +34,7 @@ public GeothermalBoilerGUI() { * @param guiContainer This is the instance of GUIContainer that is drawing * the GUI. You need to use it to draw on the screen. For example:
-net.minecraft.client.Minecraft.getInstance().getTextureManager().bind(arrowTexture);
+com.mojang.blaze3d.systems.RenderSystem.setShaderTexture(0, arrowTexture);
 guiContainer.blit(x+79, y+35, 0, 0, arrowLength, 17); // x, y, textureOffsetX, textureOffsetY, width, height)
 	   
* @param x This is the x coordinate (in pixels) from the top-left corner of diff --git a/src/main/java/zone/moddev/mc/steamadvantage/gui/OilBoilerGUI.java b/src/main/java/zone/moddev/mc/basesteam/gui/OilBoilerGUI.java similarity index 88% rename from src/main/java/zone/moddev/mc/steamadvantage/gui/OilBoilerGUI.java rename to src/main/java/zone/moddev/mc/basesteam/gui/OilBoilerGUI.java index 13347ef..77a8404 100644 --- a/src/main/java/zone/moddev/mc/steamadvantage/gui/OilBoilerGUI.java +++ b/src/main/java/zone/moddev/mc/basesteam/gui/OilBoilerGUI.java @@ -1,11 +1,11 @@ -package zone.moddev.mc.steamadvantage.gui; +package zone.moddev.mc.basesteam.gui; import cyano.poweradvantage.api.simple.SimpleMachineGUI; -import zone.moddev.mc.poweradvantage.math.Integer2D; -import zone.moddev.mc.steamadvantage.SteamAdvantage; -import zone.moddev.mc.steamadvantage.machines.OilBoilerTileEntity; -import net.minecraft.util.ResourceLocation; +import zone.moddev.mc.basepower.math.Integer2D; +import zone.moddev.mc.basesteam.SteamAdvantage; +import zone.moddev.mc.basesteam.machines.OilBoilerTileEntity; +import net.minecraft.resources.ResourceLocation; import cyano.poweradvantage.api.fluid.FluidStack; public class OilBoilerGUI extends SimpleMachineGUI{ @@ -34,7 +34,7 @@ public OilBoilerGUI() { * @param guiContainer This is the instance of GUIContainer that is drawing * the GUI. You need to use it to draw on the screen. For example:
-net.minecraft.client.Minecraft.getInstance().getTextureManager().bind(arrowTexture);
+com.mojang.blaze3d.systems.RenderSystem.setShaderTexture(0, arrowTexture);
 guiContainer.blit(x+79, y+35, 0, 0, arrowLength, 17); // x, y, textureOffsetX, textureOffsetY, width, height)
 	   
* @param x This is the x coordinate (in pixels) from the top-left corner of diff --git a/src/main/java/zone/moddev/mc/steamadvantage/gui/RockCrusherGUI.java b/src/main/java/zone/moddev/mc/basesteam/gui/RockCrusherGUI.java similarity index 86% rename from src/main/java/zone/moddev/mc/steamadvantage/gui/RockCrusherGUI.java rename to src/main/java/zone/moddev/mc/basesteam/gui/RockCrusherGUI.java index 2bf5e53..48d8b0e 100644 --- a/src/main/java/zone/moddev/mc/steamadvantage/gui/RockCrusherGUI.java +++ b/src/main/java/zone/moddev/mc/basesteam/gui/RockCrusherGUI.java @@ -1,11 +1,11 @@ -package zone.moddev.mc.steamadvantage.gui; +package zone.moddev.mc.basesteam.gui; -import net.minecraft.util.ResourceLocation; +import net.minecraft.resources.ResourceLocation; import cyano.poweradvantage.api.simple.SimpleMachineGUI; -import zone.moddev.mc.poweradvantage.math.Integer2D; -import zone.moddev.mc.steamadvantage.SteamAdvantage; -import zone.moddev.mc.steamadvantage.machines.RockCrusherTileEntity; +import zone.moddev.mc.basepower.math.Integer2D; +import zone.moddev.mc.basesteam.SteamAdvantage; +import zone.moddev.mc.basesteam.machines.RockCrusherTileEntity; public class RockCrusherGUI extends SimpleMachineGUI{ @@ -33,7 +33,7 @@ public RockCrusherGUI() { * @param guiContainer This is the instance of GUIContainer that is drawing * the GUI. You need to use it to draw on the screen. For example:
-net.minecraft.client.Minecraft.getInstance().getTextureManager().bind(arrowTexture);
+com.mojang.blaze3d.systems.RenderSystem.setShaderTexture(0, arrowTexture);
 guiContainer.blit(x+79, y+35, 0, 0, arrowLength, 17); // x, y, textureOffsetX, textureOffsetY, width, height)
 	   
* @param x This is the x coordinate (in pixels) from the top-left corner of diff --git a/src/main/java/zone/moddev/mc/steamadvantage/gui/SteamDrillGUI.java b/src/main/java/zone/moddev/mc/basesteam/gui/SteamDrillGUI.java similarity index 86% rename from src/main/java/zone/moddev/mc/steamadvantage/gui/SteamDrillGUI.java rename to src/main/java/zone/moddev/mc/basesteam/gui/SteamDrillGUI.java index ce7811d..a1d01a1 100644 --- a/src/main/java/zone/moddev/mc/steamadvantage/gui/SteamDrillGUI.java +++ b/src/main/java/zone/moddev/mc/basesteam/gui/SteamDrillGUI.java @@ -1,11 +1,11 @@ -package zone.moddev.mc.steamadvantage.gui; +package zone.moddev.mc.basesteam.gui; -import net.minecraft.util.ResourceLocation; +import net.minecraft.resources.ResourceLocation; import cyano.poweradvantage.api.simple.SimpleMachineGUI; -import zone.moddev.mc.poweradvantage.math.Integer2D; -import zone.moddev.mc.steamadvantage.SteamAdvantage; -import zone.moddev.mc.steamadvantage.machines.SteamDrillTileEntity; +import zone.moddev.mc.basepower.math.Integer2D; +import zone.moddev.mc.basesteam.SteamAdvantage; +import zone.moddev.mc.basesteam.machines.SteamDrillTileEntity; public class SteamDrillGUI extends SimpleMachineGUI{ @@ -33,7 +33,7 @@ public SteamDrillGUI() { * @param guiContainer This is the instance of GUIContainer that is drawing * the GUI. You need to use it to draw on the screen. For example:
-net.minecraft.client.Minecraft.getInstance().getTextureManager().bind(arrowTexture);
+com.mojang.blaze3d.systems.RenderSystem.setShaderTexture(0, arrowTexture);
 guiContainer.blit(x+79, y+35, 0, 0, arrowLength, 17); // x, y, textureOffsetX, textureOffsetY, width, height)
 	   
* @param x This is the x coordinate (in pixels) from the top-left corner of diff --git a/src/main/java/zone/moddev/mc/steamadvantage/gui/SteamPumpGUI.java b/src/main/java/zone/moddev/mc/basesteam/gui/SteamPumpGUI.java similarity index 87% rename from src/main/java/zone/moddev/mc/steamadvantage/gui/SteamPumpGUI.java rename to src/main/java/zone/moddev/mc/basesteam/gui/SteamPumpGUI.java index 26f0595..47e53e9 100644 --- a/src/main/java/zone/moddev/mc/steamadvantage/gui/SteamPumpGUI.java +++ b/src/main/java/zone/moddev/mc/basesteam/gui/SteamPumpGUI.java @@ -1,11 +1,11 @@ -package zone.moddev.mc.steamadvantage.gui; +package zone.moddev.mc.basesteam.gui; import cyano.poweradvantage.api.simple.SimpleMachineGUI; -import zone.moddev.mc.poweradvantage.math.Integer2D; -import zone.moddev.mc.steamadvantage.SteamAdvantage; -import zone.moddev.mc.steamadvantage.machines.SteamPumpTileEntity; -import net.minecraft.util.ResourceLocation; +import zone.moddev.mc.basepower.math.Integer2D; +import zone.moddev.mc.basesteam.SteamAdvantage; +import zone.moddev.mc.basesteam.machines.SteamPumpTileEntity; +import net.minecraft.resources.ResourceLocation; import cyano.poweradvantage.api.fluid.FluidStack; public class SteamPumpGUI extends SimpleMachineGUI{ @@ -34,7 +34,7 @@ public SteamPumpGUI() { * @param guiContainer This is the instance of GUIContainer that is drawing * the GUI. You need to use it to draw on the screen. For example:
-net.minecraft.client.Minecraft.getInstance().getTextureManager().bind(arrowTexture);
+com.mojang.blaze3d.systems.RenderSystem.setShaderTexture(0, arrowTexture);
 guiContainer.blit(x+79, y+35, 0, 0, arrowLength, 17); // x, y, textureOffsetX, textureOffsetY, width, height)
 	   
* @param x This is the x coordinate (in pixels) from the top-left corner of diff --git a/src/main/java/zone/moddev/mc/steamadvantage/gui/SteamStillGUI.java b/src/main/java/zone/moddev/mc/basesteam/gui/SteamStillGUI.java similarity index 88% rename from src/main/java/zone/moddev/mc/steamadvantage/gui/SteamStillGUI.java rename to src/main/java/zone/moddev/mc/basesteam/gui/SteamStillGUI.java index 89961ec..b999cc8 100644 --- a/src/main/java/zone/moddev/mc/steamadvantage/gui/SteamStillGUI.java +++ b/src/main/java/zone/moddev/mc/basesteam/gui/SteamStillGUI.java @@ -1,11 +1,11 @@ -package zone.moddev.mc.steamadvantage.gui; +package zone.moddev.mc.basesteam.gui; import cyano.poweradvantage.api.simple.SimpleMachineGUI; -import zone.moddev.mc.poweradvantage.math.Integer2D; -import zone.moddev.mc.steamadvantage.SteamAdvantage; -import zone.moddev.mc.steamadvantage.machines.SteamStillTileEntity; -import net.minecraft.util.ResourceLocation; +import zone.moddev.mc.basepower.math.Integer2D; +import zone.moddev.mc.basesteam.SteamAdvantage; +import zone.moddev.mc.basesteam.machines.SteamStillTileEntity; +import net.minecraft.resources.ResourceLocation; import cyano.poweradvantage.api.fluid.FluidStack; public class SteamStillGUI extends SimpleMachineGUI{ @@ -34,7 +34,7 @@ public SteamStillGUI() { * @param guiContainer This is the instance of GUIContainer that is drawing * the GUI. You need to use it to draw on the screen. For example:
-net.minecraft.client.Minecraft.getInstance().getTextureManager().bind(arrowTexture);
+com.mojang.blaze3d.systems.RenderSystem.setShaderTexture(0, arrowTexture);
 guiContainer.blit(x+79, y+35, 0, 0, arrowLength, 17); // x, y, textureOffsetX, textureOffsetY, width, height)
 	   
* @param x This is the x coordinate (in pixels) from the top-left corner of diff --git a/src/main/java/zone/moddev/mc/steamadvantage/gui/SteamTankGUI.java b/src/main/java/zone/moddev/mc/basesteam/gui/SteamTankGUI.java similarity index 85% rename from src/main/java/zone/moddev/mc/steamadvantage/gui/SteamTankGUI.java rename to src/main/java/zone/moddev/mc/basesteam/gui/SteamTankGUI.java index 46bc447..467afac 100644 --- a/src/main/java/zone/moddev/mc/steamadvantage/gui/SteamTankGUI.java +++ b/src/main/java/zone/moddev/mc/basesteam/gui/SteamTankGUI.java @@ -1,11 +1,11 @@ -package zone.moddev.mc.steamadvantage.gui; +package zone.moddev.mc.basesteam.gui; -import net.minecraft.util.ResourceLocation; +import net.minecraft.resources.ResourceLocation; import cyano.poweradvantage.api.simple.SimpleMachineGUI; -import zone.moddev.mc.poweradvantage.math.Integer2D; -import zone.moddev.mc.steamadvantage.SteamAdvantage; -import zone.moddev.mc.steamadvantage.machines.SteamTankTileEntity; +import zone.moddev.mc.basepower.math.Integer2D; +import zone.moddev.mc.basesteam.SteamAdvantage; +import zone.moddev.mc.basesteam.machines.SteamTankTileEntity; public class SteamTankGUI extends SimpleMachineGUI{ @@ -33,7 +33,7 @@ public SteamTankGUI() { * @param guiContainer This is the instance of GUIContainer that is drawing * the GUI. You need to use it to draw on the screen. For example:
-net.minecraft.client.Minecraft.getInstance().getTextureManager().bind(arrowTexture);
+com.mojang.blaze3d.systems.RenderSystem.setShaderTexture(0, arrowTexture);
 guiContainer.blit(x+79, y+35, 0, 0, arrowLength, 17); // x, y, textureOffsetX, textureOffsetY, width, height)
 	   
* @param x This is the x coordinate (in pixels) from the top-left corner of diff --git a/src/main/java/zone/moddev/mc/steamadvantage/init/Blocks.java b/src/main/java/zone/moddev/mc/basesteam/init/Blocks.java similarity index 74% rename from src/main/java/zone/moddev/mc/steamadvantage/init/Blocks.java rename to src/main/java/zone/moddev/mc/basesteam/init/Blocks.java index 8cec5d5..ec84c9f 100644 --- a/src/main/java/zone/moddev/mc/steamadvantage/init/Blocks.java +++ b/src/main/java/zone/moddev/mc/basesteam/init/Blocks.java @@ -1,35 +1,35 @@ -package zone.moddev.mc.steamadvantage.init; +package zone.moddev.mc.basesteam.init; import java.util.LinkedHashMap; import java.util.Map; import cyano.poweradvantage.api.GUIBlock; -import net.minecraft.block.Block; -import net.minecraft.block.BlockState; -import net.minecraft.item.Item; -import net.minecraft.item.BlockItem; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.BlockItem; import net.minecraftforge.event.RegistryEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.common.Mod; -import zone.moddev.mc.poweradvantage.blocks.BlockPowerSwitch; -import zone.moddev.mc.poweradvantage.init.ItemGroups; -import zone.moddev.mc.steamadvantage.SteamAdvantage; -import zone.moddev.mc.steamadvantage.blocks.DrillBitBlock; -import zone.moddev.mc.steamadvantage.blocks.PlatformBlock; -import zone.moddev.mc.steamadvantage.blocks.PumpPipeBlock; -import zone.moddev.mc.steamadvantage.blocks.SteamPipeBlock; -import zone.moddev.mc.steamadvantage.blocks.SteamTrackBlock; -import zone.moddev.mc.steamadvantage.machines.BlastFurnaceBlock; -import zone.moddev.mc.steamadvantage.machines.CoalBoilerBlock; -import zone.moddev.mc.steamadvantage.machines.ElectricBoilerBlock; -import zone.moddev.mc.steamadvantage.machines.GeothermalBoilerBlock; -import zone.moddev.mc.steamadvantage.machines.OilBoilerBlock; -import zone.moddev.mc.steamadvantage.machines.RockCrusherBlock; -import zone.moddev.mc.steamadvantage.machines.SteamDrillBlock; -import zone.moddev.mc.steamadvantage.machines.SteamElevatorBlock; -import zone.moddev.mc.steamadvantage.machines.SteamPumpBlock; -import zone.moddev.mc.steamadvantage.machines.SteamStillBlock; -import zone.moddev.mc.steamadvantage.machines.SteamTankBlock; +import zone.moddev.mc.basepower.blocks.BlockPowerSwitch; +import zone.moddev.mc.basepower.init.ItemGroups; +import zone.moddev.mc.basesteam.SteamAdvantage; +import zone.moddev.mc.basesteam.blocks.DrillBitBlock; +import zone.moddev.mc.basesteam.blocks.PlatformBlock; +import zone.moddev.mc.basesteam.blocks.PumpPipeBlock; +import zone.moddev.mc.basesteam.blocks.SteamPipeBlock; +import zone.moddev.mc.basesteam.blocks.SteamTrackBlock; +import zone.moddev.mc.basesteam.machines.BlastFurnaceBlock; +import zone.moddev.mc.basesteam.machines.CoalBoilerBlock; +import zone.moddev.mc.basesteam.machines.ElectricBoilerBlock; +import zone.moddev.mc.basesteam.machines.GeothermalBoilerBlock; +import zone.moddev.mc.basesteam.machines.OilBoilerBlock; +import zone.moddev.mc.basesteam.machines.RockCrusherBlock; +import zone.moddev.mc.basesteam.machines.SteamDrillBlock; +import zone.moddev.mc.basesteam.machines.SteamElevatorBlock; +import zone.moddev.mc.basesteam.machines.SteamPumpBlock; +import zone.moddev.mc.basesteam.machines.SteamStillBlock; +import zone.moddev.mc.basesteam.machines.SteamTankBlock; @Mod.EventBusSubscriber(modid = SteamAdvantage.MODID, bus = Mod.EventBusSubscriber.Bus.MOD) public final class Blocks { diff --git a/src/main/java/zone/moddev/mc/steamadvantage/init/Enchantments.java b/src/main/java/zone/moddev/mc/basesteam/init/Enchantments.java similarity index 73% rename from src/main/java/zone/moddev/mc/steamadvantage/init/Enchantments.java rename to src/main/java/zone/moddev/mc/basesteam/init/Enchantments.java index 98c3a9e..6e08b32 100644 --- a/src/main/java/zone/moddev/mc/steamadvantage/init/Enchantments.java +++ b/src/main/java/zone/moddev/mc/basesteam/init/Enchantments.java @@ -1,12 +1,12 @@ -package zone.moddev.mc.steamadvantage.init; +package zone.moddev.mc.basesteam.init; -import zone.moddev.mc.steamadvantage.SteamAdvantage; -import zone.moddev.mc.steamadvantage.enchantments.HighExplosiveEnchantment; -import zone.moddev.mc.steamadvantage.enchantments.PowderlessEnchantment; -import zone.moddev.mc.steamadvantage.enchantments.RapidReloadEnchantment; -import zone.moddev.mc.steamadvantage.enchantments.RecoilEnchantment; -import net.minecraft.enchantment.Enchantment; -import net.minecraft.util.ResourceLocation; +import zone.moddev.mc.basesteam.SteamAdvantage; +import zone.moddev.mc.basesteam.enchantments.HighExplosiveEnchantment; +import zone.moddev.mc.basesteam.enchantments.PowderlessEnchantment; +import zone.moddev.mc.basesteam.enchantments.RapidReloadEnchantment; +import zone.moddev.mc.basesteam.enchantments.RecoilEnchantment; +import net.minecraft.world.item.enchantment.Enchantment; +import net.minecraft.resources.ResourceLocation; import net.minecraftforge.event.RegistryEvent; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.eventbus.api.SubscribeEvent; diff --git a/src/main/java/zone/moddev/mc/basesteam/init/Entities.java b/src/main/java/zone/moddev/mc/basesteam/init/Entities.java new file mode 100644 index 0000000..5d7004d --- /dev/null +++ b/src/main/java/zone/moddev/mc/basesteam/init/Entities.java @@ -0,0 +1,66 @@ +package zone.moddev.mc.basesteam.init; + + +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraft.world.level.block.Block; +import net.minecraftforge.event.RegistryEvent; +import net.minecraftforge.eventbus.api.SubscribeEvent; +import net.minecraftforge.fml.common.Mod; +import zone.moddev.mc.basesteam.SteamAdvantage; +import zone.moddev.mc.basesteam.blocks.DrillBitTileEntity; +import zone.moddev.mc.basesteam.machines.BlastFurnaceTileEntity; +import zone.moddev.mc.basesteam.machines.CoalBoilerTileEntity; +import zone.moddev.mc.basesteam.machines.ElectricBoilerTileEntity; +import zone.moddev.mc.basesteam.machines.GeothermalBoilerTileEntity; +import zone.moddev.mc.basesteam.machines.OilBoilerTileEntity; +import zone.moddev.mc.basesteam.machines.RockCrusherTileEntity; +import zone.moddev.mc.basesteam.machines.SteamDrillTileEntity; +import zone.moddev.mc.basesteam.machines.SteamElevatorTileEntity; +import zone.moddev.mc.basesteam.machines.SteamPumpTileEntity; +import zone.moddev.mc.basesteam.machines.SteamStillTileEntity; +import zone.moddev.mc.basesteam.machines.SteamTankTileEntity; + +/** Stable tile entity registrations; registry names are unchanged from 1.12. */ +@Mod.EventBusSubscriber(modid = SteamAdvantage.MODID, bus = Mod.EventBusSubscriber.Bus.MOD) +public final class Entities { + public static BlockEntityType STEAM_BOILER_COAL; + public static BlockEntityType STEAM_BOILER_ELECTRIC; + public static BlockEntityType STEAM_BOILER_GEOTHERMAL; + public static BlockEntityType STEAM_TANK; + public static BlockEntityType STEAM_FURNACE; + public static BlockEntityType STEAM_CRUSHER; + public static BlockEntityType STEAM_DRILL; + public static BlockEntityType STEAM_ELEVATOR; + public static BlockEntityType DRILLBIT; + public static BlockEntityType STEAM_STILL; + public static BlockEntityType STEAM_PUMP; + public static BlockEntityType STEAM_BOILER_OIL; + + private Entities() {} + public static void init() {} + + @SubscribeEvent + public static void register(RegistryEvent.Register> event) { + STEAM_BOILER_COAL = register(event, "steam_boiler_coal", CoalBoilerTileEntity::new, Blocks.steam_boiler_coal); + STEAM_BOILER_ELECTRIC = register(event, "steam_boiler_electric", ElectricBoilerTileEntity::new, Blocks.steam_boiler_electric); + STEAM_BOILER_GEOTHERMAL = register(event, "steam_boiler_geothermal", GeothermalBoilerTileEntity::new, Blocks.steam_boiler_geothermal); + STEAM_TANK = register(event, "steam_tank", SteamTankTileEntity::new, Blocks.steam_tank); + STEAM_FURNACE = register(event, "steam_furnace", BlastFurnaceTileEntity::new, Blocks.steam_furnace); + STEAM_CRUSHER = register(event, "steam_crusher", RockCrusherTileEntity::new, Blocks.steam_crusher); + STEAM_DRILL = register(event, "steam_drill", SteamDrillTileEntity::new, Blocks.steam_drill); + STEAM_ELEVATOR = register(event, "steam_elevator", SteamElevatorTileEntity::new, Blocks.steam_elevator); + DRILLBIT = register(event, "drillbit", DrillBitTileEntity::new, Blocks.drillbit); + STEAM_STILL = register(event, "steam_still", SteamStillTileEntity::new, Blocks.steam_still); + STEAM_PUMP = register(event, "steam_pump", SteamPumpTileEntity::new, Blocks.steam_pump); + STEAM_BOILER_OIL = register(event, "steam_boiler_oil", OilBoilerTileEntity::new, Blocks.steam_boiler_oil); + } + + private static BlockEntityType register( + RegistryEvent.Register> event, String id, BlockEntityType.BlockEntitySupplier factory, Block block) { + BlockEntityType type = BlockEntityType.Builder.of(factory, block).build(null); + type.setRegistryName(SteamAdvantage.MODID, id); + event.getRegistry().register(type); + return type; + } +} diff --git a/src/main/java/zone/moddev/mc/steamadvantage/init/GUI.java b/src/main/java/zone/moddev/mc/basesteam/init/GUI.java similarity index 86% rename from src/main/java/zone/moddev/mc/steamadvantage/init/GUI.java rename to src/main/java/zone/moddev/mc/basesteam/init/GUI.java index d064e07..7699ef5 100644 --- a/src/main/java/zone/moddev/mc/steamadvantage/init/GUI.java +++ b/src/main/java/zone/moddev/mc/basesteam/init/GUI.java @@ -1,8 +1,8 @@ -package zone.moddev.mc.steamadvantage.init; +package zone.moddev.mc.basesteam.init; -import zone.moddev.mc.poweradvantage.PowerAdvantage; -import zone.moddev.mc.poweradvantage.registry.MachineGUIRegistry; -import zone.moddev.mc.steamadvantage.gui.*; +import zone.moddev.mc.basepower.PowerAdvantage; +import zone.moddev.mc.basepower.registry.MachineGUIRegistry; +import zone.moddev.mc.basesteam.gui.*; public class GUI { diff --git a/src/main/java/zone/moddev/mc/steamadvantage/init/Items.java b/src/main/java/zone/moddev/mc/basesteam/init/Items.java similarity index 88% rename from src/main/java/zone/moddev/mc/steamadvantage/init/Items.java rename to src/main/java/zone/moddev/mc/basesteam/init/Items.java index 360f796..1a2ab28 100644 --- a/src/main/java/zone/moddev/mc/steamadvantage/init/Items.java +++ b/src/main/java/zone/moddev/mc/basesteam/init/Items.java @@ -1,16 +1,16 @@ -package zone.moddev.mc.steamadvantage.init; +package zone.moddev.mc.basesteam.init; import java.util.LinkedHashMap; import java.util.Map; import java.util.Set; -import net.minecraft.item.Item; +import net.minecraft.world.item.Item; import net.minecraftforge.event.RegistryEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.common.Mod; -import zone.moddev.mc.poweradvantage.init.ItemGroups; -import zone.moddev.mc.steamadvantage.SteamAdvantage; -import zone.moddev.mc.steamadvantage.items.MusketItem; +import zone.moddev.mc.basepower.init.ItemGroups; +import zone.moddev.mc.basesteam.SteamAdvantage; +import zone.moddev.mc.basesteam.items.MusketItem; @Mod.EventBusSubscriber(modid = SteamAdvantage.MODID, bus = Mod.EventBusSubscriber.Bus.MOD) public final class Items { diff --git a/src/main/java/zone/moddev/mc/steamadvantage/init/Power.java b/src/main/java/zone/moddev/mc/basesteam/init/Power.java similarity index 80% rename from src/main/java/zone/moddev/mc/steamadvantage/init/Power.java rename to src/main/java/zone/moddev/mc/basesteam/init/Power.java index 94fcab3..a27a2d3 100644 --- a/src/main/java/zone/moddev/mc/steamadvantage/init/Power.java +++ b/src/main/java/zone/moddev/mc/basesteam/init/Power.java @@ -1,6 +1,6 @@ -package zone.moddev.mc.steamadvantage.init; +package zone.moddev.mc.basesteam.init; -import net.minecraft.util.DamageSource; +import net.minecraft.world.damagesource.DamageSource; import cyano.poweradvantage.api.ConduitType; public abstract class Power { diff --git a/src/main/java/zone/moddev/mc/steamadvantage/init/Recipes.java b/src/main/java/zone/moddev/mc/basesteam/init/Recipes.java similarity index 79% rename from src/main/java/zone/moddev/mc/steamadvantage/init/Recipes.java rename to src/main/java/zone/moddev/mc/basesteam/init/Recipes.java index 833e953..838a313 100644 --- a/src/main/java/zone/moddev/mc/steamadvantage/init/Recipes.java +++ b/src/main/java/zone/moddev/mc/basesteam/init/Recipes.java @@ -1,9 +1,9 @@ -package zone.moddev.mc.steamadvantage.init; +package zone.moddev.mc.basesteam.init; -import net.minecraft.item.ItemStack; -import zone.moddev.mc.poweradvantage.PowerAdvantage; -import zone.moddev.mc.poweradvantage.RecipeMode; -import zone.moddev.mc.steamadvantage.compat.BaseMetalsCompat; +import net.minecraft.world.item.ItemStack; +import zone.moddev.mc.basepower.PowerAdvantage; +import zone.moddev.mc.basepower.RecipeMode; +import zone.moddev.mc.basesteam.compat.BaseMetalsCompat; public class Recipes { @@ -19,7 +19,7 @@ public static void init(){ RecipeMode recipeMode = PowerAdvantage.recipeMode; if(recipeMode == RecipeMode.APOCALYPTIC){ - BaseMetalsCompat.addCrusherRecipe(Items.steam_governor, new ItemStack(zone.moddev.mc.poweradvantage.init.Items.sprocket,2)); + BaseMetalsCompat.addCrusherRecipe(Items.steam_governor, new ItemStack(zone.moddev.mc.basepower.init.Items.sprocket,2)); BaseMetalsCompat.addCrusherRecipe(Blocks.steam_crusher, new ItemStack(Items.steam_governor,2)); BaseMetalsCompat.addCrusherRecipe(Blocks.steam_furnace, new ItemStack(Items.steam_governor,2)); diff --git a/src/main/java/zone/moddev/mc/steamadvantage/init/TreasureChests.java b/src/main/java/zone/moddev/mc/basesteam/init/TreasureChests.java similarity index 84% rename from src/main/java/zone/moddev/mc/steamadvantage/init/TreasureChests.java rename to src/main/java/zone/moddev/mc/basesteam/init/TreasureChests.java index 9d45ff2..bb25bb1 100644 --- a/src/main/java/zone/moddev/mc/steamadvantage/init/TreasureChests.java +++ b/src/main/java/zone/moddev/mc/basesteam/init/TreasureChests.java @@ -1,6 +1,6 @@ -package zone.moddev.mc.steamadvantage.init; +package zone.moddev.mc.basesteam.init; -import zone.moddev.mc.steamadvantage.SteamAdvantage; +import zone.moddev.mc.basesteam.SteamAdvantage; import java.io.IOException; import java.nio.charset.Charset; @@ -39,7 +39,7 @@ private static void writeLootFile(Path file, String content){ private static final String LOOT_POOL = "{\n" + " \"pools\": [\n" + " {\n" + - " \"__comment\":\"25% chance of a Steam Advantage item\",\n" + + " \"__comment\":\"25% chance of a baseSteam item\",\n" + " \"rolls\": 1,\n" + " \"entries\": [\n" + " {\n" + @@ -48,7 +48,7 @@ private static void writeLootFile(Path file, String content){ " },\n" + " {\n" + " \"type\": \"item\",\n" + - " \"name\": \"steamadvantage:steam_governor\",\n" + + " \"name\": \"basesteam:steam_governor\",\n" + " \"weight\": 50,\n" + " \"functions\": [\n" + " {\n" + @@ -62,7 +62,7 @@ private static void writeLootFile(Path file, String content){ " },\n" + " {\n" + " \"type\": \"item\",\n" + - " \"name\": \"steamadvantage:steam_pipe\",\n" + + " \"name\": \"basesteam:steam_pipe\",\n" + " \"weight\": 25,\n" + " \"functions\": [\n" + " {\n" + @@ -76,7 +76,7 @@ private static void writeLootFile(Path file, String content){ " },\n" + " {\n" + " \"type\": \"item\",\n" + - " \"name\": \"steamadvantage:blackpowder_cartridge\",\n" + + " \"name\": \"basesteam:blackpowder_cartridge\",\n" + " \"weight\": 50,\n" + " \"functions\": [\n" + " {\n" + @@ -90,14 +90,14 @@ private static void writeLootFile(Path file, String content){ " },\n" + " {\n" + " \"type\": \"item\",\n" + - " \"name\": \"steamadvantage:musket\",\n" + - " \"entryName\": \"steamadvantage:musket_plain\",\n" + + " \"name\": \"basesteam:musket\",\n" + + " \"entryName\": \"basesteam:musket_plain\",\n" + " \"weight\": 18\n" + " },\n" + " {\n" + " \"type\": \"item\",\n" + - " \"name\": \"steamadvantage:musket\",\n" + - " \"entryName\": \"steamadvantage:musket_enchanted\",\n" + + " \"name\": \"basesteam:musket\",\n" + + " \"entryName\": \"basesteam:musket_enchanted\",\n" + " \"weight\": 2,\n" + " \"functions\": [\n" + " {\n" + diff --git a/src/main/java/zone/moddev/mc/steamadvantage/init/Villages.java b/src/main/java/zone/moddev/mc/basesteam/init/Villages.java similarity index 76% rename from src/main/java/zone/moddev/mc/steamadvantage/init/Villages.java rename to src/main/java/zone/moddev/mc/basesteam/init/Villages.java index 22e12cd..af6dbcf 100644 --- a/src/main/java/zone/moddev/mc/steamadvantage/init/Villages.java +++ b/src/main/java/zone/moddev/mc/basesteam/init/Villages.java @@ -1,17 +1,17 @@ -package zone.moddev.mc.steamadvantage.init; +package zone.moddev.mc.basesteam.init; import java.util.List; import java.util.Random; -import net.minecraft.enchantment.EnchantmentHelper; -import net.minecraft.entity.merchant.villager.VillagerProfession; -import net.minecraft.entity.merchant.villager.VillagerTrades; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.item.MerchantOffer; +import net.minecraft.world.item.enchantment.EnchantmentHelper; +import net.minecraft.world.entity.npc.VillagerProfession; +import net.minecraft.world.entity.npc.VillagerTrades; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.trading.MerchantOffer; import net.minecraftforge.event.village.VillagerTradesEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.common.Mod; -import zone.moddev.mc.steamadvantage.SteamAdvantage; +import zone.moddev.mc.basesteam.SteamAdvantage; /** Legacy smith careers map to their native 1.14 professions; prices and levels are unchanged. */ @Mod.EventBusSubscriber(modid = SteamAdvantage.MODID) @@ -22,7 +22,7 @@ public static void init() {} @SubscribeEvent public static void addTrades(VillagerTradesEvent event) { VillagerProfession profession = event.getType(); - List novice = event.getTrades().get(1); + List novice = event.getTrades().get(1); if (profession == VillagerProfession.ARMORER || profession == VillagerProfession.TOOLSMITH || profession == VillagerProfession.WEAPONSMITH || profession == VillagerProfession.LIBRARIAN) { novice.add(sell(Items.steam_governor, -4, -1)); @@ -43,7 +43,7 @@ public static void addTrades(VillagerTradesEvent event) { } } - private static VillagerTrades.ITrade sell(Item item, int min, int max) { + private static VillagerTrades.ItemListing sell(Item item, int min, int max) { return (trader, random) -> { int price = randomPrice(random, min, max); return offer(price < 0 ? 1 : price, new ItemStack(item, price < 0 ? -price : 1)); @@ -55,6 +55,6 @@ private static int randomPrice(Random random, int min, int max) { } private static MerchantOffer offer(int emeralds, ItemStack output) { - return new MerchantOffer(new ItemStack(net.minecraft.item.Items.EMERALD, emeralds), output, 7, 1, 0.0F); + return new MerchantOffer(new ItemStack(net.minecraft.world.item.Items.EMERALD, emeralds), output, 7, 1, 0.0F); } } diff --git a/src/main/java/zone/moddev/mc/steamadvantage/items/MusketItem.java b/src/main/java/zone/moddev/mc/basesteam/items/MusketItem.java similarity index 53% rename from src/main/java/zone/moddev/mc/steamadvantage/items/MusketItem.java rename to src/main/java/zone/moddev/mc/basesteam/items/MusketItem.java index 0f802fd..9963874 100644 --- a/src/main/java/zone/moddev/mc/steamadvantage/items/MusketItem.java +++ b/src/main/java/zone/moddev/mc/basesteam/items/MusketItem.java @@ -1,7 +1,7 @@ -package zone.moddev.mc.steamadvantage.items; +package zone.moddev.mc.basesteam.items; -import static zone.moddev.mc.steamadvantage.util.SoundHelper.playBigSoundAtPosition; -import static zone.moddev.mc.steamadvantage.util.SoundHelper.playSoundAtPosition; +import static zone.moddev.mc.basesteam.util.SoundHelper.playBigSoundAtPosition; +import static zone.moddev.mc.basesteam.util.SoundHelper.playSoundAtPosition; import java.util.List; import java.util.Optional; @@ -9,53 +9,53 @@ import com.google.common.collect.HashMultimap; import com.google.common.collect.Multimap; -import zone.moddev.mc.steamadvantage.SteamAdvantage; -import zone.moddev.mc.steamadvantage.init.Enchantments; -import zone.moddev.mc.steamadvantage.init.Power; -import net.minecraft.block.TNTBlock; -import net.minecraft.block.SoundType; -import net.minecraft.block.material.Material; -import net.minecraft.block.BlockState; -import net.minecraft.enchantment.EnchantmentHelper; -import net.minecraft.entity.Entity; -import net.minecraft.entity.LivingEntity; -import net.minecraft.entity.ai.attributes.Attributes; -import net.minecraft.entity.ai.attributes.Attribute; -import net.minecraft.entity.ai.attributes.AttributeModifier; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.entity.player.ServerPlayerEntity; -import net.minecraft.util.SoundEvents; -import net.minecraft.inventory.EquipmentSlotType; -import net.minecraft.item.UseAction; -import net.minecraft.item.ItemStack; -import net.minecraft.item.Item; -import net.minecraft.particles.ParticleTypes; -import net.minecraft.nbt.CompoundNBT; -import net.minecraft.network.play.server.SEntityVelocityPacket; -import net.minecraft.util.ActionResult; -import net.minecraft.util.Hand; -import net.minecraft.particles.IParticleData; -import net.minecraft.util.ResourceLocation; -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.math.RayTraceResult; -import net.minecraft.util.math.BlockRayTraceResult; -import net.minecraft.util.math.EntityRayTraceResult; -import net.minecraft.util.math.RayTraceContext; -import net.minecraft.util.math.vector.Vector3d; -import net.minecraft.util.text.ITextComponent; -import net.minecraft.util.text.TranslationTextComponent; -import net.minecraft.world.World; -import net.minecraft.world.Explosion; -import net.minecraft.world.server.ServerWorld; +import zone.moddev.mc.basesteam.SteamAdvantage; +import zone.moddev.mc.basesteam.init.Enchantments; +import zone.moddev.mc.basesteam.init.Power; +import net.minecraft.world.level.block.TntBlock; +import net.minecraft.world.level.block.SoundType; +import net.minecraft.world.level.material.Material; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.item.enchantment.EnchantmentHelper; +import net.minecraft.world.entity.Entity; +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.entity.ai.attributes.Attributes; +import net.minecraft.world.entity.ai.attributes.Attribute; +import net.minecraft.world.entity.ai.attributes.AttributeModifier; +import net.minecraft.world.entity.player.Player; +import net.minecraft.server.level.ServerPlayer; +import net.minecraft.sounds.SoundEvents; +import net.minecraft.world.entity.EquipmentSlot; +import net.minecraft.world.item.UseAnim; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.Item; +import net.minecraft.core.particles.ParticleTypes; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.network.protocol.game.ClientboundSetEntityMotionPacket; +import net.minecraft.world.InteractionResultHolder; +import net.minecraft.world.InteractionHand; +import net.minecraft.core.particles.ParticleOptions; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.sounds.SoundSource; +import net.minecraft.sounds.SoundEvent; +import net.minecraft.world.phys.AABB; +import net.minecraft.core.BlockPos; +import net.minecraft.world.phys.HitResult; +import net.minecraft.world.phys.BlockHitResult; +import net.minecraft.world.phys.EntityHitResult; +import net.minecraft.world.level.ClipContext; +import net.minecraft.world.phys.Vec3; +import net.minecraft.network.chat.Component; +import net.minecraft.network.chat.TranslatableComponent; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.Explosion; +import net.minecraft.server.level.ServerLevel; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraft.tags.ItemTags; @SuppressWarnings("deprecation") -public class MusketItem extends net.minecraft.item.Item{ +public class MusketItem extends net.minecraft.world.item.Item{ public static final String NBT_DATA_KEY_LOADED = "loaded"; @@ -86,29 +86,29 @@ public int getEnchantmentValue(){ } @Override - public UseAction getUseAnimation(ItemStack stack){ + public UseAnim getUseAnimation(ItemStack stack){ if(isLoaded(stack)){ - return UseAction.BOW; + return UseAnim.BOW; } else { - return UseAction.BLOCK; + return UseAnim.BLOCK; } } @Override - public ActionResult use(World world, PlayerEntity playerEntity, Hand hand){ + public InteractionResultHolder use(Level world, Player playerEntity, InteractionHand hand){ ItemStack srcItemStack = playerEntity.getItemInHand(hand); - if(hand != Hand.MAIN_HAND) return ActionResult.pass(srcItemStack); - if(isNotLoaded(srcItemStack) && !hasAmmo(playerEntity, srcItemStack)) return ActionResult.fail(srcItemStack); + if(hand != InteractionHand.MAIN_HAND) return InteractionResultHolder.pass(srcItemStack); + if(isNotLoaded(srcItemStack) && !hasAmmo(playerEntity, srcItemStack)) return InteractionResultHolder.fail(srcItemStack); if(isNotLoaded(srcItemStack) && EnchantmentHelper.getItemEnchantmentLevel(Enchantments.rapid_reload, srcItemStack) > 0){ // instant reload decrementAmmo(playerEntity,srcItemStack); startLoad(srcItemStack); playSound(SoundEvents.LEVER_CLICK,world,playerEntity); finishLoad(srcItemStack); - return ActionResult.success(srcItemStack); + return InteractionResultHolder.success(srcItemStack); } playerEntity.startUsingItem(hand); - return ActionResult.success(srcItemStack); + return InteractionResultHolder.success(srcItemStack); } @Override @@ -123,7 +123,7 @@ public void onUsingTick(ItemStack stack, LivingEntity player, int count){ * provided to the PlayerEntity.setItemInUse(stack, duration). */ @Override - public ItemStack finishUsingItem (ItemStack srcItemStack, World world, LivingEntity playerEntity) + public ItemStack finishUsingItem (ItemStack srcItemStack, Level world, LivingEntity playerEntity) { // if(isNotLoaded(srcItemStack) && hasAmmo(playerEntity,srcItemStack)){ decrementAmmo(playerEntity,srcItemStack); @@ -134,7 +134,7 @@ public ItemStack finishUsingItem (ItemStack srcItemStack, World world, LivingEnt } @Override - public void releaseUsing(ItemStack stack, World worldIn, LivingEntity playerIn, int timeLeft) { + public void releaseUsing(ItemStack stack, Level worldIn, LivingEntity playerIn, int timeLeft) { if(isAlmostLoaded(stack)){ finishLoad(stack); } else if(isLoaded(stack)){ @@ -143,62 +143,62 @@ public void releaseUsing(ItemStack stack, World worldIn, LivingEntity playerIn, } protected void fire(ItemStack srcItemStack, LivingEntity playerEntity, - World world) { - final boolean isPlayer = playerEntity instanceof PlayerEntity; + Level world) { + final boolean isPlayer = playerEntity instanceof Player; unload(srcItemStack); - if(isPlayer && !((PlayerEntity)playerEntity).isCreative()){ - srcItemStack.hurtAndBreak(1, playerEntity, entity -> entity.broadcastBreakEvent(EquipmentSlotType.MAINHAND)); + if(isPlayer && !((Player)playerEntity).isCreative()){ + srcItemStack.hurtAndBreak(1, playerEntity, entity -> entity.broadcastBreakEvent(EquipmentSlot.MAINHAND)); } - Vector3d lookVector = playerEntity.getLookAngle(); + Vec3 lookVector = playerEntity.getLookAngle(); spawnParticle(ParticleTypes.EXPLOSION_EMITTER, world, playerEntity.getX()+lookVector.x, playerEntity.getY()+playerEntity.getEyeHeight()+lookVector.y, playerEntity.getZ() + lookVector.z); if(world.isClientSide){ - playerEntity.xRot -= 15; + playerEntity.setXRot(playerEntity.getXRot() - 15); return; } playSound(SoundEvents.FLINTANDSTEEL_USE,world,playerEntity); - playBigSoundAtPosition(playerEntity.getX(),playerEntity.getY(),playerEntity.getZ(), SoundEvents.FIREWORK_ROCKET_BLAST,SoundCategory.PLAYERS,2F,0.5F,world); + playBigSoundAtPosition(playerEntity.getX(),playerEntity.getY(),playerEntity.getZ(), SoundEvents.FIREWORK_ROCKET_BLAST,SoundSource.PLAYERS,2F,0.5F,world); - Vector3d start = new Vector3d(playerEntity.getX(), playerEntity.getY()+playerEntity.getEyeHeight(),playerEntity.getZ()); + Vec3 start = new Vec3(playerEntity.getX(), playerEntity.getY()+playerEntity.getEyeHeight(),playerEntity.getZ()); start.add(MAX_RANGE * lookVector.x, MAX_RANGE * lookVector.y, MAX_RANGE * lookVector.z); - RayTraceResult rayTrace = rayTraceBlocksAndEntities(world,MAX_RANGE,playerEntity); + HitResult rayTrace = rayTraceBlocksAndEntities(world,MAX_RANGE,playerEntity); if(rayTrace == null){ // no collisions return; } final float explodeFactor = 0.75f; - if(rayTrace instanceof EntityRayTraceResult){ - Entity e = ((EntityRayTraceResult) rayTrace).getEntity(); + if(rayTrace instanceof EntityHitResult){ + Entity e = ((EntityHitResult) rayTrace).getEntity(); e.hurt(Power.musket_damage, getShotDamage()); if(EnchantmentHelper.getItemEnchantmentLevel(Enchantments.high_explosive, srcItemStack) > 0){ int lvl = EnchantmentHelper.getItemEnchantmentLevel(Enchantments.high_explosive, srcItemStack); world.explode(playerEntity, e.getX(), e.getY()+0.5, e.getZ(), explodeFactor * lvl, - Explosion.Mode.BREAK); - AxisAlignedBB fireArea = new AxisAlignedBB(e.getX()-lvl, e.getY()-lvl, e.getZ()-lvl, + Explosion.BlockInteraction.BREAK); + AABB fireArea = new AABB(e.getX()-lvl, e.getY()-lvl, e.getZ()-lvl, e.getX()+lvl, e.getY()+lvl, e.getZ()+lvl); List collateralDamage = world.getEntitiesOfClass(LivingEntity.class, fireArea); for(LivingEntity victim : collateralDamage){ victim.setSecondsOnFire(lvl); } } - } else if(rayTrace.getType() == RayTraceResult.Type.BLOCK){ + } else if(rayTrace.getType() == HitResult.Type.BLOCK){ playSoundAtPosition(rayTrace.getLocation().x, rayTrace.getLocation().y, rayTrace.getLocation().z, - SoundEvents.GRAVEL_HIT, SoundCategory.BLOCKS, 1f, 1f, world); - BlockPos coord = ((BlockRayTraceResult) rayTrace).getBlockPos(); - if(coord.getY()>= 0 && coord.getY() <= 255 && !world.isEmptyBlock(coord)){ + SoundEvents.GRAVEL_HIT, SoundSource.BLOCKS, 1f, 1f, world); + BlockPos coord = ((BlockHitResult) rayTrace).getBlockPos(); + if(!world.isOutsideBuildHeight(coord) && world.hasChunkAt(coord) && !world.isEmptyBlock(coord)){ BlockState bs = world.getBlockState(coord); Material blockMat = bs.getMaterial(); - if(blockMat == net.minecraft.block.material.Material.GLASS - || blockMat == net.minecraft.block.material.Material.LEAVES - || blockMat == net.minecraft.block.material.Material.DECORATION - || blockMat == net.minecraft.block.material.Material.PLANT - || blockMat == net.minecraft.block.material.Material.REPLACEABLE_PLANT - || blockMat == net.minecraft.block.material.Material.WEB){ + if(blockMat == net.minecraft.world.level.material.Material.GLASS + || blockMat == net.minecraft.world.level.material.Material.LEAVES + || blockMat == net.minecraft.world.level.material.Material.DECORATION + || blockMat == net.minecraft.world.level.material.Material.PLANT + || blockMat == net.minecraft.world.level.material.Material.REPLACEABLE_PLANT + || blockMat == net.minecraft.world.level.material.Material.WEB){ world.destroyBlock(coord, true); - } else if (blockMat == net.minecraft.block.material.Material.EXPLOSIVE){ - if(world.getBlockState(coord).getBlock() instanceof TNTBlock){ - TNTBlock.explode(world, coord); + } else if (blockMat == net.minecraft.world.level.material.Material.EXPLOSIVE){ + if(world.getBlockState(coord).getBlock() instanceof TntBlock){ + TntBlock.explode(world, coord); world.removeBlock(coord, false); } } @@ -207,8 +207,8 @@ protected void fire(ItemStack srcItemStack, LivingEntity playerEntity, int lvl = EnchantmentHelper.getItemEnchantmentLevel(Enchantments.high_explosive, srcItemStack); world.explode(playerEntity, rayTrace.getLocation().x, rayTrace.getLocation().y, rayTrace.getLocation().z, explodeFactor * lvl, - Explosion.Mode.BREAK); - AxisAlignedBB fireArea = new AxisAlignedBB(rayTrace.getLocation().x-lvl, rayTrace.getLocation().y-lvl, rayTrace.getLocation().z-lvl, + Explosion.BlockInteraction.BREAK); + AABB fireArea = new AABB(rayTrace.getLocation().x-lvl, rayTrace.getLocation().y-lvl, rayTrace.getLocation().z-lvl, rayTrace.getLocation().x+lvl, rayTrace.getLocation().y+lvl, rayTrace.getLocation().z+lvl); List collateralDamage = world.getEntitiesOfClass(LivingEntity.class, fireArea); for(LivingEntity victim : collateralDamage){ @@ -216,7 +216,7 @@ protected void fire(ItemStack srcItemStack, LivingEntity playerEntity, } } } - if(rayTrace.getType() != RayTraceResult.Type.MISS){ + if(rayTrace.getType() != HitResult.Type.MISS){ spawnParticle(ParticleTypes.LARGE_SMOKE, world, rayTrace.getLocation().x, rayTrace.getLocation().y, rayTrace.getLocation().z); spawnParticle(ParticleTypes.EXPLOSION, world, @@ -231,17 +231,17 @@ protected void fire(ItemStack srcItemStack, LivingEntity playerEntity, playerEntity.push(c * recoil * lookVector.x * lateral, c * recoil * lookVector.y, c * recoil * lookVector.z * lateral); - if(playerEntity instanceof ServerPlayerEntity){ + if(playerEntity instanceof ServerPlayer){ // send update packet from server - ((ServerPlayerEntity) playerEntity).connection.send(new SEntityVelocityPacket(playerEntity)); + ((ServerPlayer) playerEntity).connection.send(new ClientboundSetEntityMotionPacket(playerEntity)); } } } - private void spawnParticle(IParticleData p, World w, double x, double y, double z) { - if(w instanceof ServerWorld) { - ((ServerWorld) w).sendParticles(p, x, y, z, 1, 0, 0, 0, 0); + private void spawnParticle(ParticleOptions p, Level w, double x, double y, double z) { + if(w instanceof ServerLevel) { + ((ServerLevel) w).sendParticles(p, x, y, z, 1, 0, 0, 0, 0); } else { w.addParticle(p, x, y, z, 0, 0, 0); } @@ -250,65 +250,65 @@ private void spawnParticle(IParticleData p, World w, double x, double y, double @Override public boolean hurtEnemy(ItemStack stack, LivingEntity target, LivingEntity attacker) { - stack.hurtAndBreak(1, attacker, entity -> entity.broadcastBreakEvent(EquipmentSlotType.MAINHAND)); + stack.hurtAndBreak(1, attacker, entity -> entity.broadcastBreakEvent(EquipmentSlot.MAINHAND)); return true; } /** plays a sound at the player location */ - protected void playSound(SoundEvent sound, World world, Entity e){ + protected void playSound(SoundEvent sound, Level world, Entity e){ if (!world.isClientSide) { - playSoundAtPosition(e.getX(), e.getY(), e.getZ(), sound,SoundCategory.PLAYERS,1F,1F,world); + playSoundAtPosition(e.getX(), e.getY(), e.getZ(), sound,SoundSource.PLAYERS,1F,1F,world); } } public static void startLoad(ItemStack musket){ - CompoundNBT data; + CompoundTag data; if(musket.hasTag()){ data = musket.getTag(); } else { - data = new CompoundNBT(); + data = new CompoundTag(); } data.putByte(NBT_DATA_KEY_LOADED, (byte)2); musket.setTag(data); } public static void finishLoad(ItemStack musket){ - CompoundNBT data; + CompoundTag data; if(musket.hasTag()){ data = musket.getTag(); } else { - data = new CompoundNBT(); + data = new CompoundTag(); } data.putByte(NBT_DATA_KEY_LOADED, (byte)1); musket.setTag(data); } public static void unload(ItemStack musket){ - CompoundNBT data; + CompoundTag data; if(musket.hasTag()){ data = musket.getTag(); } else { - data = new CompoundNBT(); + data = new CompoundTag(); } data.putByte(NBT_DATA_KEY_LOADED, (byte)0); musket.setTag(data); } public static boolean isLoaded(ItemStack musket){ - CompoundNBT data = musket.getTag(); + CompoundTag data = musket.getTag(); if(data == null) return false; return data.contains(NBT_DATA_KEY_LOADED) && data.getByte(NBT_DATA_KEY_LOADED) == 1; } public static boolean isNotLoaded(ItemStack musket){ - CompoundNBT data = musket.getTag(); + CompoundTag data = musket.getTag(); if(data == null || !data.contains(NBT_DATA_KEY_LOADED)) return true; return data.contains(NBT_DATA_KEY_LOADED) && data.getByte(NBT_DATA_KEY_LOADED) == 0; } public static boolean isAlmostLoaded(ItemStack musket){ - CompoundNBT data = musket.getTag(); + CompoundTag data = musket.getTag(); if(data == null) return false; return data.contains(NBT_DATA_KEY_LOADED) && data.getByte(NBT_DATA_KEY_LOADED) == 2; } @@ -316,13 +316,13 @@ public static boolean isAlmostLoaded(ItemStack musket){ public static boolean hasAmmo(LivingEntity e, ItemStack musket) { - if(e instanceof PlayerEntity) { - PlayerEntity playerEntity = (PlayerEntity) e; + if(e instanceof Player) { + Player playerEntity = (Player) e; if (playerEntity.isCreative() - || EnchantmentHelper.getItemEnchantmentLevel(net.minecraft.enchantment.Enchantments.INFINITY_ARROWS, musket) > 0 + || EnchantmentHelper.getItemEnchantmentLevel(net.minecraft.world.item.enchantment.Enchantments.INFINITY_ARROWS, musket) > 0 || EnchantmentHelper.getItemEnchantmentLevel(Enchantments.powderless, musket) > 0) return true; - for (int i = 0; i < playerEntity.inventory.items.size(); i++) { - ItemStack inventoryStack = playerEntity.inventory.items.get(i); + for (int i = 0; i < playerEntity.getInventory().items.size(); i++) { + ItemStack inventoryStack = playerEntity.getInventory().items.get(i); if (inventoryStack.isEmpty()) continue; if (ItemTags.getAllTags().getTagOrEmpty(BLACKPOWDER_AMMO_TAG).contains(inventoryStack.getItem())) return true; } @@ -332,17 +332,17 @@ public static boolean hasAmmo(LivingEntity e, ItemStack musket) { public static void decrementAmmo(LivingEntity e, ItemStack musket) { - if(e instanceof PlayerEntity) { - PlayerEntity playerEntity = (PlayerEntity) e; + if(e instanceof Player) { + Player playerEntity = (Player) e; if (playerEntity.isCreative() - || EnchantmentHelper.getItemEnchantmentLevel(net.minecraft.enchantment.Enchantments.INFINITY_ARROWS, musket) > 0 + || EnchantmentHelper.getItemEnchantmentLevel(net.minecraft.world.item.enchantment.Enchantments.INFINITY_ARROWS, musket) > 0 || EnchantmentHelper.getItemEnchantmentLevel(Enchantments.powderless, musket) > 0) return; - for (int i = 0; i < playerEntity.inventory.items.size(); i++) { - ItemStack inventoryStack = playerEntity.inventory.items.get(i); + for (int i = 0; i < playerEntity.getInventory().items.size(); i++) { + ItemStack inventoryStack = playerEntity.getInventory().items.get(i); if (inventoryStack.isEmpty()) continue; if (ItemTags.getAllTags().getTagOrEmpty(BLACKPOWDER_AMMO_TAG).contains(inventoryStack.getItem())) { inventoryStack.shrink(1); - if (inventoryStack.isEmpty()) playerEntity.inventory.items.set(i, ItemStack.EMPTY); + if (inventoryStack.isEmpty()) playerEntity.getInventory().items.set(i, ItemStack.EMPTY); return; } } @@ -350,21 +350,24 @@ public static void decrementAmmo(LivingEntity e, ItemStack musket) { } - public static RayTraceResult rayTraceBlocksAndEntities(World w, double maxRange, LivingEntity source){ - Vector3d rayOrigin = new Vector3d(source.getX(), source.getY() + source.getEyeHeight(), source.getZ()); - Vector3d rayDirection = source.getLookAngle(); - BlockRayTraceResult terrainHit = w.clip(new RayTraceContext(rayOrigin, rayOrigin.add(rayDirection.scale(maxRange)), - RayTraceContext.BlockMode.COLLIDER, RayTraceContext.FluidMode.SOURCE_ONLY, source)); - Vector3d rayEnd = terrainHit.getLocation(); - AxisAlignedBB aoi = new AxisAlignedBB(rayOrigin, rayEnd).inflate(1.0D); + public static HitResult rayTraceBlocksAndEntities(Level w, double maxRange, LivingEntity source){ + Vec3 rayOrigin = new Vec3(source.getX(), source.getY() + source.getEyeHeight(), source.getZ()); + Vec3 rayDirection = source.getLookAngle(); + Vec3 loadedEnd = loadedRayEnd(rayOrigin, rayOrigin.add(rayDirection.scale(maxRange)), w::hasChunkAt); + if(loadedEnd.equals(rayOrigin)) return BlockHitResult.miss(rayOrigin, + net.minecraft.core.Direction.getNearest(rayDirection.x, rayDirection.y, rayDirection.z), new BlockPos(rayOrigin)); + BlockHitResult terrainHit = w.clip(new ClipContext(rayOrigin, loadedEnd, + ClipContext.Block.COLLIDER, ClipContext.Fluid.SOURCE_ONLY, source)); + Vec3 rayEnd = terrainHit.getLocation(); + AABB aoi = new AABB(rayOrigin, rayEnd).inflate(1.0D); // Server spatial entity queries can synchronously generate chunks around the shooter. - Iterable entities = w instanceof ServerWorld ? ((ServerWorld)w).getAllEntities() : w.getEntities(source, aoi); + Iterable entities = w instanceof ServerLevel ? ((ServerLevel)w).getAllEntities() : w.getEntities(source, aoi); double closestDistSqr = rayOrigin.distanceToSqr(rayEnd); Entity closestEntity = null; - Vector3d closestHit = null; + Vec3 closestHit = null; for(Entity e : entities){ - if(e == source || e.removed || e.isSpectator() || !aoi.intersects(e.getBoundingBox())) continue; - Optional hit = rayHitBeforeTerrain(rayOrigin, rayEnd, e.getBoundingBox()); + if(e == source || e.isRemoved() || e.isSpectator() || !aoi.intersects(e.getBoundingBox())) continue; + Optional hit = rayHitBeforeTerrain(rayOrigin, rayEnd, e.getBoundingBox()); if(hit.isPresent()){ double distSqr = rayOrigin.distanceToSqr(hit.get()); if(distSqr < closestDistSqr){ @@ -374,18 +377,29 @@ public static RayTraceResult rayTraceBlocksAndEntities(World w, double maxRange, } } } - return closestEntity == null ? terrainHit : new EntityRayTraceResult(closestEntity, closestHit); + return closestEntity == null ? terrainHit : new EntityHitResult(closestEntity, closestHit); } - static Optional rayHitBeforeTerrain(Vector3d origin, Vector3d terrainEnd, AxisAlignedBB target){ - Optional hit = target.contains(origin) ? Optional.of(origin) : target.clip(origin, terrainEnd); + static Vec3 loadedRayEnd(Vec3 origin, Vec3 end, java.util.function.Predicate loaded) { + if(!loaded.test(new BlockPos(origin))) return origin; + // Reuse native voxel traversal so even a grazing diagonal cannot enter an unloaded chunk. + Vec3 boundary = net.minecraft.world.level.BlockGetter.traverseBlocks(origin, end, loaded, + (test, pos) -> test.test(pos) ? null : new AABB(pos).clip(origin, end).orElse(origin), + test -> end); + if(boundary.equals(end)) return end; + return origin.distanceToSqr(boundary) <= 0.00000001D ? origin + : boundary.subtract(end.subtract(origin).normalize().scale(0.0001D)); + } + + static Optional rayHitBeforeTerrain(Vec3 origin, Vec3 terrainEnd, AABB target){ + Optional hit = target.contains(origin) ? Optional.of(origin) : target.clip(origin, terrainEnd); return hit.filter(point -> origin.distanceToSqr(point) < origin.distanceToSqr(terrainEnd)); } - public static boolean rayIntersectsBoundingBox(Vector3d rayOrigin, Vector3d rayDirection, AxisAlignedBB box){ + public static boolean rayIntersectsBoundingBox(Vec3 rayOrigin, Vec3 rayDirection, AABB box){ if(box == null) return false; // algorithm from http://gamedev.stackexchange.com/questions/18436/most-efficient-aabb-vs-ray-collision-algorithms - Vector3d inverse = new Vector3d(1.0 / rayDirection.x, 1.0 / rayDirection.y, 1.0 / rayDirection.z); + Vec3 inverse = new Vec3(1.0 / rayDirection.x, 1.0 / rayDirection.y, 1.0 / rayDirection.z); double t1 = (box.minX - rayOrigin.x)*inverse.x; double t2 = (box.maxX- rayOrigin.x)*inverse.x; double t3 = (box.minY - rayOrigin.y)*inverse.y; @@ -429,23 +443,23 @@ private static double min(double a, double b){ } @Override - public void appendHoverText(ItemStack stack, World world, List list, net.minecraft.client.util.ITooltipFlag flag){ + public void appendHoverText(ItemStack stack, Level world, List list, net.minecraft.world.item.TooltipFlag flag){ super.appendHoverText(stack,world,list,flag); - list.add(new TranslationTextComponent("tooltip.musket.damage", (int)MusketItem.getShotDamage())); + list.add(new TranslatableComponent("tooltip.musket.damage", (int)MusketItem.getShotDamage())); if(isLoaded(stack)){ - list.add(new TranslationTextComponent("tooltip.musket.loaded")); + list.add(new TranslatableComponent("tooltip.musket.loaded")); } else { - list.add(new TranslationTextComponent("tooltip.musket.unloaded")); - list.add(new TranslationTextComponent("tooltip.musket.ammo", new TranslationTextComponent("item.steamadvantage.blackpowder_cartridge"))); + list.add(new TranslatableComponent("tooltip.musket.unloaded")); + list.add(new TranslatableComponent("tooltip.musket.ammo", new TranslatableComponent("item.basesteam.blackpowder_cartridge"))); } } /** Sets melee attack damage */ @Override - public Multimap getAttributeModifiers(EquipmentSlotType slot, ItemStack stack) + public Multimap getAttributeModifiers(EquipmentSlot slot, ItemStack stack) { Multimap multimap = HashMultimap.create(); - if(slot != EquipmentSlotType.MAINHAND) return multimap; + if(slot != EquipmentSlot.MAINHAND) return multimap; multimap.put(Attributes.ATTACK_DAMAGE, new AttributeModifier(BASE_ATTACK_DAMAGE_UUID, "Weapon modifier", (double)getMeleeDamage(), AttributeModifier.Operation.ADDITION)); return multimap; } diff --git a/src/main/java/zone/moddev/mc/steamadvantage/machines/BlastFurnaceBlock.java b/src/main/java/zone/moddev/mc/basesteam/machines/BlastFurnaceBlock.java similarity index 63% rename from src/main/java/zone/moddev/mc/steamadvantage/machines/BlastFurnaceBlock.java rename to src/main/java/zone/moddev/mc/basesteam/machines/BlastFurnaceBlock.java index b720793..c2db0bf 100644 --- a/src/main/java/zone/moddev/mc/steamadvantage/machines/BlastFurnaceBlock.java +++ b/src/main/java/zone/moddev/mc/basesteam/machines/BlastFurnaceBlock.java @@ -1,12 +1,12 @@ -package zone.moddev.mc.steamadvantage.machines; +package zone.moddev.mc.basesteam.machines; import cyano.poweradvantage.api.ConduitType; import cyano.poweradvantage.api.PoweredEntity; -import zone.moddev.mc.steamadvantage.init.Power; -import net.minecraft.block.material.Material; -import net.minecraft.block.BlockState; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; +import zone.moddev.mc.basesteam.init.Power; +import net.minecraft.world.level.material.Material; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.core.BlockPos; +import net.minecraft.world.level.Level; /** @@ -21,8 +21,8 @@ public BlastFurnaceBlock() { } @Override - public PoweredEntity newBlockEntity(net.minecraft.world.IBlockReader world) { - return new BlastFurnaceTileEntity(); + public PoweredEntity newBlockEntity(net.minecraft.core.BlockPos pos, BlockState state) { + return new BlastFurnaceTileEntity(pos, state); } @Override @@ -31,7 +31,7 @@ public boolean hasAnalogOutputSignal(BlockState bs) { } @Override - public int getAnalogOutputSignal(BlockState bs, World world, BlockPos coord) { + public int getAnalogOutputSignal(BlockState bs, Level world, BlockPos coord) { if(world.getBlockEntity(coord) instanceof BlastFurnaceTileEntity){ return ((BlastFurnaceTileEntity)world.getBlockEntity(coord)).getComparatorOutput(); } diff --git a/src/main/java/zone/moddev/mc/steamadvantage/machines/BlastFurnaceTileEntity.java b/src/main/java/zone/moddev/mc/basesteam/machines/BlastFurnaceTileEntity.java similarity index 84% rename from src/main/java/zone/moddev/mc/steamadvantage/machines/BlastFurnaceTileEntity.java rename to src/main/java/zone/moddev/mc/basesteam/machines/BlastFurnaceTileEntity.java index 198fca5..8b5ae96 100644 --- a/src/main/java/zone/moddev/mc/steamadvantage/machines/BlastFurnaceTileEntity.java +++ b/src/main/java/zone/moddev/mc/basesteam/machines/BlastFurnaceTileEntity.java @@ -1,24 +1,24 @@ -package zone.moddev.mc.steamadvantage.machines; +package zone.moddev.mc.basesteam.machines; import cyano.poweradvantage.api.ConduitType; -import zone.moddev.mc.steamadvantage.init.Power; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.util.SoundEvents; -import net.minecraft.item.ItemStack; -import net.minecraft.inventory.Inventory; -import net.minecraft.item.crafting.IRecipe; -import net.minecraft.util.text.StringTextComponent; -import net.minecraft.item.crafting.IRecipeType; -import net.minecraft.nbt.CompoundNBT; -import net.minecraft.tileentity.AbstractFurnaceTileEntity; -import net.minecraft.util.Direction; -import net.minecraft.util.SoundCategory; +import zone.moddev.mc.basesteam.init.Power; +import net.minecraft.world.entity.player.Player; +import net.minecraft.sounds.SoundEvents; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.SimpleContainer; +import net.minecraft.world.item.crafting.Recipe; +import net.minecraft.network.chat.TextComponent; +import net.minecraft.world.item.crafting.RecipeType; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.world.level.block.entity.AbstractFurnaceBlockEntity; +import net.minecraft.core.Direction; +import net.minecraft.sounds.SoundSource; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; import java.util.Arrays; -import static zone.moddev.mc.steamadvantage.util.SoundHelper.playSoundAtTileEntity; +import static zone.moddev.mc.basesteam.util.SoundHelper.playSoundAtTileEntity; public class BlastFurnaceTileEntity extends cyano.poweradvantage.api.simple.TileEntitySimplePowerMachine{ @@ -46,8 +46,13 @@ public void onLoad() { redstoneInitialized = false; } + /** Detached convenience constructor for tests; native factories always pass position and state. */ public BlastFurnaceTileEntity() { - super(zone.moddev.mc.steamadvantage.init.Entities.STEAM_FURNACE, Power.steam_power, 200, "tile.steamadvantage.steam_furnace.name"); + this(net.minecraft.core.BlockPos.ZERO, new BlastFurnaceBlock().defaultBlockState()); + } + + public BlastFurnaceTileEntity(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) { + super(zone.moddev.mc.basesteam.init.Entities.STEAM_FURNACE, pos, state, Power.steam_power, 200, "tile.basesteam.steam_furnace.name"); allSlots = new int[inventory.length]; for(int i = 0; i < allSlots.length; i++){ allSlots[i] = i; @@ -88,7 +93,7 @@ public void tickUpdate(boolean isServerWorld) { burnTime = fuel; totalBurnTime = fuel; decrementFuel(); - playSoundAtTileEntity( SoundEvents.FURNACE_FIRE_CRACKLE, SoundCategory.AMBIENT, 0.5f, 1f, this); + playSoundAtTileEntity( SoundEvents.FURNACE_FIRE_CRACKLE, SoundSource.AMBIENT, 0.5f, 1f, this); } energyDecay(); } @@ -114,7 +119,7 @@ public void tickUpdate(boolean isServerWorld) { inventory[slot].shrink(1); if(inventory[slot].isEmpty()){inventory[slot] = null;} // decrement the input slot if(!smeltSuccess){ - playSoundAtTileEntity(SoundEvents.FIRE_EXTINGUISH, SoundCategory.AMBIENT, 0.5f, 1f, this); + playSoundAtTileEntity(SoundEvents.FIRE_EXTINGUISH, SoundSource.AMBIENT, 0.5f, 1f, this); } smeltSuccess = true; } @@ -199,7 +204,7 @@ private void energyDecay() { private int getFuelBurnTime(ItemStack item) { if(item == null) return 0; - return zone.moddev.mc.steamadvantage.util.FurnaceFuelHelper.getBurnTime(item); + return zone.moddev.mc.basesteam.util.FurnaceFuelHelper.getBurnTime(item); } private void decrementFuel() { @@ -264,7 +269,7 @@ public void onDataFieldUpdate() { @Override - public CompoundNBT save(CompoundNBT tagRoot){ + public CompoundTag save(CompoundTag tagRoot){ super.save(tagRoot); prepareDataFieldsForSync(); tagRoot.putIntArray("Data", getDataFieldArray()); @@ -272,8 +277,8 @@ public CompoundNBT save(CompoundNBT tagRoot){ } @Override - public void load(net.minecraft.block.BlockState state, CompoundNBT tagRoot){ - super.load(state, tagRoot); + public void load(CompoundTag tagRoot){ + super.load(tagRoot); if(tagRoot.contains("Data")){ int[] data = tagRoot.getIntArray("Data"); System.arraycopy(data, 0, this.getDataFieldArray(), 0, Math.min(data.length,this.getDataFieldArray().length)); @@ -330,9 +335,9 @@ public boolean canPlaceItem(final int slot, final ItemStack item) { private ItemStack getSmeltingResult(ItemStack input) { if (input == null || input.isEmpty() || getLevel() == null) return ItemStack.EMPTY; - Inventory inventory = new Inventory(1); + SimpleContainer inventory = new SimpleContainer(1); inventory.setItem(0, input); - return getLevel().getRecipeManager().getRecipeFor(IRecipeType.SMELTING, inventory, getLevel()) + return getLevel().getRecipeManager().getRecipeFor(RecipeType.SMELTING, inventory, getLevel()) .map(recipe -> recipe.assemble(inventory)).orElse(ItemStack.EMPTY); } @@ -348,7 +353,7 @@ public boolean isPowerSource(ConduitType powerType) { } @Override - public boolean stillValid(PlayerEntity player) { + public boolean stillValid(Player player) { return true; } } diff --git a/src/main/java/zone/moddev/mc/steamadvantage/machines/CoalBoilerBlock.java b/src/main/java/zone/moddev/mc/basesteam/machines/CoalBoilerBlock.java similarity index 65% rename from src/main/java/zone/moddev/mc/steamadvantage/machines/CoalBoilerBlock.java rename to src/main/java/zone/moddev/mc/basesteam/machines/CoalBoilerBlock.java index 769986c..d1bd7ac 100644 --- a/src/main/java/zone/moddev/mc/steamadvantage/machines/CoalBoilerBlock.java +++ b/src/main/java/zone/moddev/mc/basesteam/machines/CoalBoilerBlock.java @@ -1,15 +1,15 @@ -package zone.moddev.mc.steamadvantage.machines; +package zone.moddev.mc.basesteam.machines; import cyano.poweradvantage.api.ConduitType; import cyano.poweradvantage.api.PoweredEntity; -import zone.moddev.mc.poweradvantage.conduitnetwork.ConduitRegistry; -import zone.moddev.mc.poweradvantage.init.Fluids; -import zone.moddev.mc.steamadvantage.init.Power; -import net.minecraft.block.material.Material; -import net.minecraft.block.BlockState; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.Explosion; -import net.minecraft.world.World; +import zone.moddev.mc.basepower.conduitnetwork.ConduitRegistry; +import zone.moddev.mc.basepower.init.Fluids; +import zone.moddev.mc.basesteam.init.Power; +import net.minecraft.world.level.material.Material; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.core.BlockPos; +import net.minecraft.world.level.Explosion; +import net.minecraft.world.level.Level; /** @@ -26,8 +26,8 @@ public CoalBoilerBlock() { } @Override - public PoweredEntity newBlockEntity(net.minecraft.world.IBlockReader world) { - return new CoalBoilerTileEntity(); + public PoweredEntity newBlockEntity(net.minecraft.core.BlockPos pos, BlockState state) { + return new CoalBoilerTileEntity(pos, state); } @Override @@ -36,7 +36,7 @@ public boolean hasAnalogOutputSignal(BlockState bs) { } @Override - public int getAnalogOutputSignal(BlockState bs, World world, BlockPos coord) { + public int getAnalogOutputSignal(BlockState bs, Level world, BlockPos coord) { if(world.getBlockEntity(coord) instanceof CoalBoilerTileEntity){ return ((CoalBoilerTileEntity)world.getBlockEntity(coord)).getComparatorOutput(); } diff --git a/src/main/java/zone/moddev/mc/steamadvantage/machines/CoalBoilerTileEntity.java b/src/main/java/zone/moddev/mc/basesteam/machines/CoalBoilerTileEntity.java similarity index 82% rename from src/main/java/zone/moddev/mc/steamadvantage/machines/CoalBoilerTileEntity.java rename to src/main/java/zone/moddev/mc/basesteam/machines/CoalBoilerTileEntity.java index da142c8..be5bad7 100644 --- a/src/main/java/zone/moddev/mc/steamadvantage/machines/CoalBoilerTileEntity.java +++ b/src/main/java/zone/moddev/mc/basesteam/machines/CoalBoilerTileEntity.java @@ -1,25 +1,25 @@ -package zone.moddev.mc.steamadvantage.machines; +package zone.moddev.mc.basesteam.machines; -import static zone.moddev.mc.steamadvantage.util.SoundHelper.playSoundAtTileEntity; +import static zone.moddev.mc.basesteam.util.SoundHelper.playSoundAtTileEntity; import cyano.poweradvantage.api.ConduitType; import cyano.poweradvantage.api.PowerRequest; import cyano.poweradvantage.api.fluid.FluidRequest; -import zone.moddev.mc.poweradvantage.init.Fluids; -import zone.moddev.mc.steamadvantage.init.Power; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.util.SoundEvents; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.CompoundNBT; -import net.minecraft.tileentity.AbstractFurnaceTileEntity; -import net.minecraft.util.Direction; -import net.minecraft.util.SoundCategory; -import net.minecraft.fluid.Fluid; +import zone.moddev.mc.basepower.init.Fluids; +import zone.moddev.mc.basesteam.init.Power; +import net.minecraft.world.entity.player.Player; +import net.minecraft.sounds.SoundEvents; +import net.minecraft.world.item.ItemStack; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.world.level.block.entity.AbstractFurnaceBlockEntity; +import net.minecraft.core.Direction; +import net.minecraft.sounds.SoundSource; +import net.minecraft.world.level.material.Fluid; import cyano.poweradvantage.api.fluid.FluidStack; import cyano.poweradvantage.api.fluid.FluidTank; import cyano.poweradvantage.api.fluid.FluidTankInfo; -import zone.moddev.mc.steamadvantage.util.LegacyFluidHandler; +import zone.moddev.mc.basesteam.util.LegacyFluidHandler; @SuppressWarnings("deprecation") public class CoalBoilerTileEntity extends cyano.poweradvantage.api.simple.TileEntitySimplePowerMachine implements LegacyFluidHandler{ @@ -37,8 +37,13 @@ public class CoalBoilerTileEntity extends cyano.poweradvantage.api.simple.TileEn private final int[] dataSyncArray = new int[4]; + /** Detached convenience constructor for tests; native factories always pass position and state. */ public CoalBoilerTileEntity() { - super(zone.moddev.mc.steamadvantage.init.Entities.STEAM_BOILER_COAL, new ConduitType[]{Power.steam_power,Fluids.fluidConduit_general}, new float[]{1000,1000}, "tile.steamadvantage.steam_boiler_coal.name"); + this(net.minecraft.core.BlockPos.ZERO, new CoalBoilerBlock().defaultBlockState()); + } + + public CoalBoilerTileEntity(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) { + super(zone.moddev.mc.basesteam.init.Entities.STEAM_BOILER_COAL, pos, state, new ConduitType[]{Power.steam_power,Fluids.fluidConduit_general}, new float[]{1000,1000}, "tile.basesteam.steam_boiler_coal.name"); tank = new FluidTank(FluidTank.BUCKET_VOLUME * 4) { @Override protected void onContentsChanged() { @@ -64,11 +69,11 @@ public void tickUpdate(boolean isServerWorld) { boilWater(); // play steam sounds occasionally if(getLevel().random.nextInt(100) == 0){ - playSoundAtTileEntity(SoundEvents.FIRE_EXTINGUISH, SoundCategory.AMBIENT, 0.5f, 1f, this); + playSoundAtTileEntity(SoundEvents.FIRE_EXTINGUISH, SoundSource.AMBIENT, 0.5f, 1f, this); } if(timeSinceSound > 200){ if(getTank().getFluidAmount() > 0){ - playSoundAtTileEntity( SoundEvents.LAVA_AMBIENT, SoundCategory.AMBIENT, 0.3f, 1f, this); + playSoundAtTileEntity( SoundEvents.LAVA_AMBIENT, SoundSource.AMBIENT, 0.3f, 1f, this); } timeSinceSound = 0; } @@ -105,7 +110,7 @@ private void energyDecay() { private int getFuelBurnTime() { if(inventory[0] == null) return 0; - return zone.moddev.mc.steamadvantage.util.FurnaceFuelHelper.getBurnTime(inventory[0]); + return zone.moddev.mc.basesteam.util.FurnaceFuelHelper.getBurnTime(inventory[0]); } @@ -198,7 +203,7 @@ public void prepareDataFieldsForSync() { @Override public void onDataFieldUpdate() { this.setEnergy(Float.intBitsToFloat(dataSyncArray[0]), Power.steam_power); - this.getTank().setFluid(new FluidStack(net.minecraft.fluid.Fluids.WATER,dataSyncArray[1])); + this.getTank().setFluid(new FluidStack(net.minecraft.world.level.material.Fluids.WATER,dataSyncArray[1])); this.burnTime = dataSyncArray[2]; this.totalBurnTime = dataSyncArray[3]; } @@ -209,9 +214,9 @@ public void onDataFieldUpdate() { * @param tagRoot An NBT tag */ @Override - public CompoundNBT save(final CompoundNBT tagRoot) { + public CompoundTag save(final CompoundTag tagRoot) { super.save(tagRoot); - CompoundNBT tankTag = new CompoundNBT(); + CompoundTag tankTag = new CompoundTag(); this.getTank().writeToNBT(tankTag); tagRoot.put("Tank", tankTag); if(this.burnTime > 0)tagRoot.putInt("BurnTime", this.burnTime); @@ -223,10 +228,10 @@ public CompoundNBT save(final CompoundNBT tagRoot) { * @param tagRoot An NBT tag */ @Override - public void load(net.minecraft.block.BlockState state, final CompoundNBT tagRoot) { - super.load(state, tagRoot); + public void load(final CompoundTag tagRoot) { + super.load(tagRoot); if (tagRoot.contains("Tank")) { - CompoundNBT tankTag = tagRoot.getCompound("Tank"); + CompoundTag tankTag = tagRoot.getCompound("Tank"); getTank().readFromNBT(tankTag); if(tankTag.contains("Empty")){ // empty the tank if NBT says its empty (not default behavior of Tank.read(...) ) @@ -272,13 +277,13 @@ public boolean isPowerSource(ConduitType type){ @Override public float addEnergy(float amount, ConduitType type){ if(Fluids.isFluidType(type)){ - if(Fluids.conduitTypeToFluid(type) == net.minecraft.fluid.Fluids.WATER){ + if(Fluids.conduitTypeToFluid(type) == net.minecraft.world.level.material.Fluids.WATER){ if(this.canFill(null, Fluids.conduitTypeToFluid(type))){ return this.fill(null, new FluidStack(Fluids.conduitTypeToFluid(type),(int)amount), true); } else { return 0; } - } else if(Fluids.conduitTypeToFluid(type) == net.minecraft.fluid.Fluids.LAVA){ + } else if(Fluids.conduitTypeToFluid(type) == net.minecraft.world.level.material.Fluids.LAVA){ burnTime += (int)(amount * LAVA_TO_BURN_TICKS); totalBurnTime = (int)(LAVA_REQUEST_SIZE * LAVA_TO_BURN_TICKS); return amount; @@ -324,12 +329,12 @@ public float subtractEnergy(float amount, ConduitType type){ @Override public PowerRequest getPowerRequest(ConduitType offer) { - if(Fluids.conduitTypeToFluid(offer) == net.minecraft.fluid.Fluids.WATER){ + if(Fluids.conduitTypeToFluid(offer) == net.minecraft.world.level.material.Fluids.WATER){ PowerRequest request = new FluidRequest(FluidRequest.MEDIUM_PRIORITY+1, (getTank().getCapacity() - getTank().getFluidAmount()), this); return request; - } else if(Fluids.conduitTypeToFluid(offer) == net.minecraft.fluid.Fluids.LAVA + } else if(Fluids.conduitTypeToFluid(offer) == net.minecraft.world.level.material.Fluids.LAVA && burnTime <= 0 && getFuelBurnTime() <= 0 && getTank().getFluidAmount() > 0 && !redstone){ @@ -402,7 +407,7 @@ public FluidStack drain(Direction face, int amount, boolean forReal) { */ @Override public boolean canFill(Direction face, Fluid fluid) { - if(fluid != net.minecraft.fluid.Fluids.WATER) return false; + if(fluid != net.minecraft.world.level.material.Fluids.WATER) return false; if(getTank().getFluid() == null) return true; return getTank().getFluidAmount() <= getTank().getCapacity() && fluid.equals(getTank().getFluid().getFluid()); } @@ -433,11 +438,11 @@ public FluidTankInfo[] getTankInfo(Direction face) { @Override public boolean canPlaceItem(final int slot, final ItemStack item) { - return super.canPlaceItem(slot, item) && zone.moddev.mc.steamadvantage.util.FurnaceFuelHelper.getBurnTime(item) > 0; + return super.canPlaceItem(slot, item) && zone.moddev.mc.basesteam.util.FurnaceFuelHelper.getBurnTime(item) > 0; } @Override - public boolean stillValid(PlayerEntity player) { + public boolean stillValid(Player player) { return true; } } diff --git a/src/main/java/zone/moddev/mc/steamadvantage/machines/ElectricBoilerBlock.java b/src/main/java/zone/moddev/mc/basesteam/machines/ElectricBoilerBlock.java similarity index 59% rename from src/main/java/zone/moddev/mc/steamadvantage/machines/ElectricBoilerBlock.java rename to src/main/java/zone/moddev/mc/basesteam/machines/ElectricBoilerBlock.java index ab595f8..c701c1d 100644 --- a/src/main/java/zone/moddev/mc/steamadvantage/machines/ElectricBoilerBlock.java +++ b/src/main/java/zone/moddev/mc/basesteam/machines/ElectricBoilerBlock.java @@ -1,15 +1,15 @@ -package zone.moddev.mc.steamadvantage.machines; +package zone.moddev.mc.basesteam.machines; import cyano.poweradvantage.api.ConduitType; import cyano.poweradvantage.api.PoweredEntity; -import zone.moddev.mc.poweradvantage.conduitnetwork.ConduitRegistry; -import zone.moddev.mc.poweradvantage.init.Fluids; -import zone.moddev.mc.steamadvantage.init.Power; -import net.minecraft.block.material.Material; -import net.minecraft.block.BlockState; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.Explosion; -import net.minecraft.world.World; +import zone.moddev.mc.basepower.conduitnetwork.ConduitRegistry; +import zone.moddev.mc.basepower.init.Fluids; +import zone.moddev.mc.basesteam.init.Power; +import net.minecraft.world.level.material.Material; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.core.BlockPos; +import net.minecraft.world.level.Explosion; +import net.minecraft.world.level.Level; @@ -21,8 +21,8 @@ public ElectricBoilerBlock() { } @Override - public PoweredEntity newBlockEntity(net.minecraft.world.IBlockReader world) { - return new ElectricBoilerTileEntity(); + public PoweredEntity newBlockEntity(net.minecraft.core.BlockPos pos, BlockState state) { + return new ElectricBoilerTileEntity(pos, state); } @Override @@ -31,7 +31,7 @@ public boolean hasAnalogOutputSignal(BlockState bs) { } @Override - public int getAnalogOutputSignal(BlockState bs, World world, BlockPos coord) { + public int getAnalogOutputSignal(BlockState bs, Level world, BlockPos coord) { if(world.getBlockEntity(coord) instanceof ElectricBoilerTileEntity){ return ((ElectricBoilerTileEntity)world.getBlockEntity(coord)).getComparatorOutput(); } diff --git a/src/main/java/zone/moddev/mc/steamadvantage/machines/ElectricBoilerTileEntity.java b/src/main/java/zone/moddev/mc/basesteam/machines/ElectricBoilerTileEntity.java similarity index 84% rename from src/main/java/zone/moddev/mc/steamadvantage/machines/ElectricBoilerTileEntity.java rename to src/main/java/zone/moddev/mc/basesteam/machines/ElectricBoilerTileEntity.java index 43a2648..a3ec491 100644 --- a/src/main/java/zone/moddev/mc/steamadvantage/machines/ElectricBoilerTileEntity.java +++ b/src/main/java/zone/moddev/mc/basesteam/machines/ElectricBoilerTileEntity.java @@ -1,24 +1,24 @@ -package zone.moddev.mc.steamadvantage.machines; +package zone.moddev.mc.basesteam.machines; -import static zone.moddev.mc.steamadvantage.util.SoundHelper.playSoundAtTileEntity; +import static zone.moddev.mc.basesteam.util.SoundHelper.playSoundAtTileEntity; import cyano.poweradvantage.api.ConduitType; import cyano.poweradvantage.api.PowerRequest; import cyano.poweradvantage.api.fluid.FluidRequest; -import zone.moddev.mc.poweradvantage.init.Fluids; -import zone.moddev.mc.steamadvantage.init.Power; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.util.SoundEvents; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.CompoundNBT; -import net.minecraft.util.Direction; -import net.minecraft.util.SoundCategory; -import net.minecraft.fluid.Fluid; +import zone.moddev.mc.basepower.init.Fluids; +import zone.moddev.mc.basesteam.init.Power; +import net.minecraft.world.entity.player.Player; +import net.minecraft.sounds.SoundEvents; +import net.minecraft.world.item.ItemStack; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.core.Direction; +import net.minecraft.sounds.SoundSource; +import net.minecraft.world.level.material.Fluid; import cyano.poweradvantage.api.fluid.FluidStack; import cyano.poweradvantage.api.fluid.FluidTank; import cyano.poweradvantage.api.fluid.FluidTankInfo; -import zone.moddev.mc.steamadvantage.util.LegacyFluidHandler; +import zone.moddev.mc.basesteam.util.LegacyFluidHandler; @SuppressWarnings("deprecation") public class ElectricBoilerTileEntity extends cyano.poweradvantage.api.simple.TileEntitySimplePowerMachine implements LegacyFluidHandler{ @@ -36,10 +36,15 @@ public class ElectricBoilerTileEntity extends cyano.poweradvantage.api.simple.Ti private final int[] dataSyncArray = new int[3]; + /** Detached convenience constructor for tests; native factories always pass position and state. */ public ElectricBoilerTileEntity() { - super(zone.moddev.mc.steamadvantage.init.Entities.STEAM_BOILER_ELECTRIC, new ConduitType[]{Power.steam_power, ELECTRIC_POWER, Fluids.fluidConduit_general}, + this(net.minecraft.core.BlockPos.ZERO, new ElectricBoilerBlock().defaultBlockState()); + } + + public ElectricBoilerTileEntity(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) { + super(zone.moddev.mc.basesteam.init.Entities.STEAM_BOILER_ELECTRIC, pos, state, new ConduitType[]{Power.steam_power, ELECTRIC_POWER, Fluids.fluidConduit_general}, new float[]{100, MAX_ELECTRICITY, 1000}, - "tile.steamadvantage.steam_boiler_electric.name"); + "tile.basesteam.steam_boiler_electric.name"); tank = new FluidTank(FluidTank.BUCKET_VOLUME * 2) { @Override protected void onContentsChanged() { @@ -64,11 +69,11 @@ public void tickUpdate(boolean isServerWorld) { boilWater(); // play steam sounds occasionally if(getLevel().random.nextInt(100) == 0){ - playSoundAtTileEntity( SoundEvents.FIRE_EXTINGUISH, SoundCategory.AMBIENT, 0.5f, 1f, this); + playSoundAtTileEntity( SoundEvents.FIRE_EXTINGUISH, SoundSource.AMBIENT, 0.5f, 1f, this); } if(timeSinceSound > 200){ if(getTank().getFluidAmount() > 0){ - playSoundAtTileEntity( SoundEvents.LAVA_AMBIENT, SoundCategory.AMBIENT, 0.3f, 1f, this); + playSoundAtTileEntity( SoundEvents.LAVA_AMBIENT, SoundSource.AMBIENT, 0.3f, 1f, this); } timeSinceSound = 0; } @@ -92,7 +97,7 @@ private void energyDecay() { } @Override - public boolean stillValid(PlayerEntity player) { + public boolean stillValid(Player player) { return true; } @@ -172,7 +177,7 @@ public void prepareDataFieldsForSync() { @Override public void onDataFieldUpdate() { this.setEnergy(Float.intBitsToFloat(dataSyncArray[0]), Power.steam_power); - this.getTank().setFluid(new FluidStack(net.minecraft.fluid.Fluids.WATER,dataSyncArray[1])); + this.getTank().setFluid(new FluidStack(net.minecraft.world.level.material.Fluids.WATER,dataSyncArray[1])); this.setEnergy(Float.intBitsToFloat(dataSyncArray[2]),ELECTRIC_POWER); } @@ -182,9 +187,9 @@ public void onDataFieldUpdate() { * @param tagRoot An NBT tag */ @Override - public CompoundNBT save(final CompoundNBT tagRoot) { + public CompoundTag save(final CompoundTag tagRoot) { super.save(tagRoot); - CompoundNBT tankTag = new CompoundNBT(); + CompoundTag tankTag = new CompoundTag(); this.getTank().writeToNBT(tankTag); tagRoot.put("Tank", tankTag); if(getEnergy(ELECTRIC_POWER) > 0)tagRoot.putFloat("Electricity", getEnergy(ELECTRIC_POWER)); @@ -195,10 +200,10 @@ public CompoundNBT save(final CompoundNBT tagRoot) { * @param tagRoot An NBT tag */ @Override - public void load(net.minecraft.block.BlockState state, final CompoundNBT tagRoot) { - super.load(state, tagRoot); + public void load(final CompoundTag tagRoot) { + super.load(tagRoot); if (tagRoot.contains("Tank")) { - CompoundNBT tankTag = tagRoot.getCompound("Tank"); + CompoundTag tankTag = tagRoot.getCompound("Tank"); getTank().readFromNBT(tankTag); if(tankTag.contains("Empty")){ // empty the tank if NBT says its empty (not default behavior of Tank.read(...) ) @@ -237,7 +242,7 @@ public boolean isPowerSource(ConduitType type){ @Override public float addEnergy(float amount, ConduitType type){ if(Fluids.isFluidType(type)){ - if(Fluids.conduitTypeToFluid(type) == net.minecraft.fluid.Fluids.WATER){ + if(Fluids.conduitTypeToFluid(type) == net.minecraft.world.level.material.Fluids.WATER){ if(this.canFill(null, Fluids.conduitTypeToFluid(type))){ return this.fill(null, new FluidStack(Fluids.conduitTypeToFluid(type),(int)amount), true); } else { @@ -285,7 +290,7 @@ public float subtractEnergy(float amount, ConduitType type){ @Override public PowerRequest getPowerRequest(ConduitType offer) { - if(Fluids.isFluidType(offer) && Fluids.conduitTypeToFluid(offer) == net.minecraft.fluid.Fluids.WATER){ + if(Fluids.isFluidType(offer) && Fluids.conduitTypeToFluid(offer) == net.minecraft.world.level.material.Fluids.WATER){ PowerRequest request = new FluidRequest(FluidRequest.MEDIUM_PRIORITY+1, (getTank().getCapacity() - getTank().getFluidAmount()), this); @@ -354,7 +359,7 @@ public FluidStack drain(Direction face, int amount, boolean forReal) { */ @Override public boolean canFill(Direction face, Fluid fluid) { - if(fluid != net.minecraft.fluid.Fluids.WATER) return false; + if(fluid != net.minecraft.world.level.material.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/zone/moddev/mc/steamadvantage/machines/GeothermalBoilerBlock.java b/src/main/java/zone/moddev/mc/basesteam/machines/GeothermalBoilerBlock.java similarity index 60% rename from src/main/java/zone/moddev/mc/steamadvantage/machines/GeothermalBoilerBlock.java rename to src/main/java/zone/moddev/mc/basesteam/machines/GeothermalBoilerBlock.java index 4008652..c710bd0 100644 --- a/src/main/java/zone/moddev/mc/steamadvantage/machines/GeothermalBoilerBlock.java +++ b/src/main/java/zone/moddev/mc/basesteam/machines/GeothermalBoilerBlock.java @@ -1,15 +1,15 @@ -package zone.moddev.mc.steamadvantage.machines; +package zone.moddev.mc.basesteam.machines; import cyano.poweradvantage.api.ConduitType; import cyano.poweradvantage.api.PoweredEntity; -import zone.moddev.mc.poweradvantage.conduitnetwork.ConduitRegistry; -import zone.moddev.mc.poweradvantage.init.Fluids; -import zone.moddev.mc.steamadvantage.init.Power; -import net.minecraft.block.material.Material; -import net.minecraft.block.BlockState; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.Explosion; -import net.minecraft.world.World; +import zone.moddev.mc.basepower.conduitnetwork.ConduitRegistry; +import zone.moddev.mc.basepower.init.Fluids; +import zone.moddev.mc.basesteam.init.Power; +import net.minecraft.world.level.material.Material; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.core.BlockPos; +import net.minecraft.world.level.Explosion; +import net.minecraft.world.level.Level; public class GeothermalBoilerBlock extends cyano.poweradvantage.api.simple.BlockSimplePowerMachine{ @@ -18,8 +18,8 @@ public GeothermalBoilerBlock() { } @Override - public PoweredEntity newBlockEntity(net.minecraft.world.IBlockReader world) { - return new GeothermalBoilerTileEntity(); + public PoweredEntity newBlockEntity(net.minecraft.core.BlockPos pos, BlockState state) { + return new GeothermalBoilerTileEntity(pos, state); } @Override @@ -28,7 +28,7 @@ public boolean hasAnalogOutputSignal(BlockState bs) { } @Override - public int getAnalogOutputSignal(BlockState bs, World world, BlockPos coord) { + public int getAnalogOutputSignal(BlockState bs, Level world, BlockPos coord) { if(world.getBlockEntity(coord) instanceof GeothermalBoilerTileEntity){ return ((GeothermalBoilerTileEntity)world.getBlockEntity(coord)).getComparatorOutput(); } diff --git a/src/main/java/zone/moddev/mc/steamadvantage/machines/GeothermalBoilerTileEntity.java b/src/main/java/zone/moddev/mc/basesteam/machines/GeothermalBoilerTileEntity.java similarity index 82% rename from src/main/java/zone/moddev/mc/steamadvantage/machines/GeothermalBoilerTileEntity.java rename to src/main/java/zone/moddev/mc/basesteam/machines/GeothermalBoilerTileEntity.java index f08af3d..46d8581 100644 --- a/src/main/java/zone/moddev/mc/steamadvantage/machines/GeothermalBoilerTileEntity.java +++ b/src/main/java/zone/moddev/mc/basesteam/machines/GeothermalBoilerTileEntity.java @@ -1,27 +1,27 @@ -package zone.moddev.mc.steamadvantage.machines; +package zone.moddev.mc.basesteam.machines; -import zone.moddev.mc.steamadvantage.util.LegacyFluidHandler; +import zone.moddev.mc.basesteam.util.LegacyFluidHandler; import cyano.poweradvantage.api.ConduitType; import cyano.poweradvantage.api.PowerRequest; import cyano.poweradvantage.api.fluid.FluidRequest; -import zone.moddev.mc.poweradvantage.init.Fluids; -import zone.moddev.mc.steamadvantage.init.Power; -import net.minecraft.block.Block; -import net.minecraft.block.BlockState; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.util.SoundEvents; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.CompoundNBT; -import net.minecraft.util.Direction; -import net.minecraft.util.SoundCategory; -import net.minecraft.util.math.BlockPos; -import net.minecraft.fluid.Fluid; +import zone.moddev.mc.basepower.init.Fluids; +import zone.moddev.mc.basesteam.init.Power; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.entity.player.Player; +import net.minecraft.sounds.SoundEvents; +import net.minecraft.world.item.ItemStack; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.core.Direction; +import net.minecraft.sounds.SoundSource; +import net.minecraft.core.BlockPos; +import net.minecraft.world.level.material.Fluid; import cyano.poweradvantage.api.fluid.FluidStack; import cyano.poweradvantage.api.fluid.FluidTank; import cyano.poweradvantage.api.fluid.FluidTankInfo; -import static zone.moddev.mc.steamadvantage.util.SoundHelper.playSoundAtTileEntity; +import static zone.moddev.mc.basesteam.util.SoundHelper.playSoundAtTileEntity; @SuppressWarnings("deprecation") public class GeothermalBoilerTileEntity extends cyano.poweradvantage.api.simple.TileEntitySimplePowerMachine implements LegacyFluidHandler{ @@ -41,8 +41,13 @@ public class GeothermalBoilerTileEntity extends cyano.poweradvantage.api.simple. private final int[] dataSyncArray = new int[3]; + /** Detached convenience constructor for tests; native factories always pass position and state. */ public GeothermalBoilerTileEntity() { - super(zone.moddev.mc.steamadvantage.init.Entities.STEAM_BOILER_GEOTHERMAL, new ConduitType[]{Power.steam_power,Fluids.fluidConduit_general}, new float[]{100,1000}, "tile.steamadvantage.steam_boiler_geothermal.name"); + this(net.minecraft.core.BlockPos.ZERO, new GeothermalBoilerBlock().defaultBlockState()); + } + + public GeothermalBoilerTileEntity(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) { + super(zone.moddev.mc.basesteam.init.Entities.STEAM_BOILER_GEOTHERMAL, pos, state, new ConduitType[]{Power.steam_power,Fluids.fluidConduit_general}, new float[]{100,1000}, "tile.basesteam.steam_boiler_geothermal.name"); tank = new FluidTank(FluidTank.BUCKET_VOLUME * 2) { @Override protected void onContentsChanged() { @@ -56,7 +61,7 @@ protected void onContentsChanged() { } @Override - public boolean stillValid(PlayerEntity player) { + public boolean stillValid(Player player) { return true; } @@ -72,11 +77,11 @@ public void tickUpdate(boolean isServerWorld) { boilWater(); // play steam sounds occasionally if(getLevel().random.nextInt(100) == 0){ - playSoundAtTileEntity( SoundEvents.FIRE_EXTINGUISH, SoundCategory.AMBIENT, 0.5f, 1f, this); + playSoundAtTileEntity( SoundEvents.FIRE_EXTINGUISH, SoundSource.AMBIENT, 0.5f, 1f, this); } if(timeSinceSound > 200){ if(getTank().getFluidAmount() > 0){ - playSoundAtTileEntity( SoundEvents.LAVA_AMBIENT, SoundCategory.AMBIENT, 0.3f, 1f, this); + playSoundAtTileEntity( SoundEvents.LAVA_AMBIENT, SoundSource.AMBIENT, 0.3f, 1f, this); } timeSinceSound = 0; } @@ -113,13 +118,12 @@ private void updateTemperature(){ temperature = Math.max(0, Math.min(MAX_TEMPERATURE, temperature + delta) - 1); } - private static float thermalEnergy(BlockState bs){ + static float thermalEnergy(BlockState bs){ Block b = bs.getBlock(); - if(b == net.minecraft.block.Blocks.FIRE){ + if(b == net.minecraft.world.level.block.Blocks.FIRE){ return 200; - } else if(bs.getFluidState().getType().isSame(net.minecraft.fluid.Fluids.LAVA)) { - // Forge 1.13 native fluids no longer expose the old temperature property. - return (1300 - 372) * 0.5f; + } else if(bs.getFluidState().getType().isSame(net.minecraft.world.level.material.Fluids.LAVA)) { + return (bs.getFluidState().getType().getAttributes().getTemperature() - 372) * 0.5f; } else { return 0; } @@ -206,7 +210,7 @@ public void prepareDataFieldsForSync() { @Override public void onDataFieldUpdate() { this.setEnergy(Float.intBitsToFloat(dataSyncArray[0]), Power.steam_power); - this.getTank().setFluid(new FluidStack(net.minecraft.fluid.Fluids.WATER,dataSyncArray[1])); + this.getTank().setFluid(new FluidStack(net.minecraft.world.level.material.Fluids.WATER,dataSyncArray[1])); this.temperature = Float.intBitsToFloat(dataSyncArray[2]); } @@ -216,9 +220,9 @@ public void onDataFieldUpdate() { * @param tagRoot An NBT tag */ @Override - public CompoundNBT save(final CompoundNBT tagRoot) { + public CompoundTag save(final CompoundTag tagRoot) { super.save(tagRoot); - CompoundNBT tankTag = new CompoundNBT(); + CompoundTag tankTag = new CompoundTag(); this.getTank().writeToNBT(tankTag); tagRoot.put("Tank", tankTag); if(this.temperature > 0)tagRoot.putFloat("Temperature", this.temperature); @@ -229,10 +233,10 @@ public CompoundNBT save(final CompoundNBT tagRoot) { * @param tagRoot An NBT tag */ @Override - public void load(net.minecraft.block.BlockState state, final CompoundNBT tagRoot) { - super.load(state, tagRoot); + public void load(final CompoundTag tagRoot) { + super.load(tagRoot); if (tagRoot.contains("Tank")) { - CompoundNBT tankTag = tagRoot.getCompound("Tank"); + CompoundTag tankTag = tagRoot.getCompound("Tank"); getTank().readFromNBT(tankTag); if(tankTag.contains("Empty")){ // empty the tank if NBT says its empty (not default behavior of Tank.read(...) ) @@ -273,7 +277,7 @@ public boolean isPowerSource(ConduitType type){ @Override public float addEnergy(float amount, ConduitType type){ if(Fluids.isFluidType(type)){ - if(Fluids.conduitTypeToFluid(type) == net.minecraft.fluid.Fluids.WATER){ + if(Fluids.conduitTypeToFluid(type) == net.minecraft.world.level.material.Fluids.WATER){ if(this.canFill(null, Fluids.conduitTypeToFluid(type))){ return this.fill(null, new FluidStack(Fluids.conduitTypeToFluid(type),(int)amount), true); } else { @@ -321,7 +325,7 @@ public float subtractEnergy(float amount, ConduitType type){ @Override public PowerRequest getPowerRequest(ConduitType offer) { - if(Fluids.conduitTypeToFluid(offer) == net.minecraft.fluid.Fluids.WATER){ + if(Fluids.conduitTypeToFluid(offer) == net.minecraft.world.level.material.Fluids.WATER){ PowerRequest request = new FluidRequest(FluidRequest.MEDIUM_PRIORITY+1, (getTank().getCapacity() - getTank().getFluidAmount()), this); @@ -390,7 +394,7 @@ public FluidStack drain(Direction face, int amount, boolean forReal) { */ @Override public boolean canFill(Direction face, Fluid fluid) { - if(fluid != net.minecraft.fluid.Fluids.WATER) return false; + if(fluid != net.minecraft.world.level.material.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/zone/moddev/mc/steamadvantage/machines/OilBoilerBlock.java b/src/main/java/zone/moddev/mc/basesteam/machines/OilBoilerBlock.java similarity index 64% rename from src/main/java/zone/moddev/mc/steamadvantage/machines/OilBoilerBlock.java rename to src/main/java/zone/moddev/mc/basesteam/machines/OilBoilerBlock.java index 63d82df..92c2ee5 100644 --- a/src/main/java/zone/moddev/mc/steamadvantage/machines/OilBoilerBlock.java +++ b/src/main/java/zone/moddev/mc/basesteam/machines/OilBoilerBlock.java @@ -1,15 +1,15 @@ -package zone.moddev.mc.steamadvantage.machines; +package zone.moddev.mc.basesteam.machines; import cyano.poweradvantage.api.ConduitType; import cyano.poweradvantage.api.PoweredEntity; -import zone.moddev.mc.poweradvantage.conduitnetwork.ConduitRegistry; -import zone.moddev.mc.poweradvantage.init.Fluids; -import zone.moddev.mc.steamadvantage.init.Power; -import net.minecraft.block.material.Material; -import net.minecraft.block.BlockState; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.Explosion; -import net.minecraft.world.World; +import zone.moddev.mc.basepower.conduitnetwork.ConduitRegistry; +import zone.moddev.mc.basepower.init.Fluids; +import zone.moddev.mc.basesteam.init.Power; +import net.minecraft.world.level.material.Material; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.core.BlockPos; +import net.minecraft.world.level.Explosion; +import net.minecraft.world.level.Level; /** @@ -26,8 +26,8 @@ public OilBoilerBlock() { } @Override - public PoweredEntity newBlockEntity(net.minecraft.world.IBlockReader world) { - return new OilBoilerTileEntity(); + public PoweredEntity newBlockEntity(net.minecraft.core.BlockPos pos, BlockState state) { + return new OilBoilerTileEntity(pos, state); } @Override @@ -36,7 +36,7 @@ public boolean hasAnalogOutputSignal(BlockState bs) { } @Override - public int getAnalogOutputSignal(BlockState bs, World world, BlockPos coord) { + public int getAnalogOutputSignal(BlockState bs, Level world, BlockPos coord) { if(world.getBlockEntity(coord) instanceof OilBoilerTileEntity){ return ((OilBoilerTileEntity)world.getBlockEntity(coord)).getComparatorOutput(); } diff --git a/src/main/java/zone/moddev/mc/steamadvantage/machines/OilBoilerTileEntity.java b/src/main/java/zone/moddev/mc/basesteam/machines/OilBoilerTileEntity.java similarity index 84% rename from src/main/java/zone/moddev/mc/steamadvantage/machines/OilBoilerTileEntity.java rename to src/main/java/zone/moddev/mc/basesteam/machines/OilBoilerTileEntity.java index 0a63f2a..7affee0 100644 --- a/src/main/java/zone/moddev/mc/steamadvantage/machines/OilBoilerTileEntity.java +++ b/src/main/java/zone/moddev/mc/basesteam/machines/OilBoilerTileEntity.java @@ -1,26 +1,26 @@ -package zone.moddev.mc.steamadvantage.machines; +package zone.moddev.mc.basesteam.machines; -import zone.moddev.mc.poweradvantage.util.FluidIdHelper; +import zone.moddev.mc.basepower.util.FluidIdHelper; -import zone.moddev.mc.steamadvantage.util.LegacyFluidHandler; +import zone.moddev.mc.basesteam.util.LegacyFluidHandler; import cyano.poweradvantage.api.ConduitType; import cyano.poweradvantage.api.FluidCategoryRegistry; import cyano.poweradvantage.api.PowerRequest; import cyano.poweradvantage.api.fluid.FluidRequest; -import zone.moddev.mc.poweradvantage.init.Fluids; -import zone.moddev.mc.poweradvantage.registry.FuelRegistry; -import zone.moddev.mc.steamadvantage.SteamAdvantage; -import zone.moddev.mc.steamadvantage.init.Power; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.util.SoundEvents; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.CompoundNBT; -import net.minecraft.util.Direction; -import net.minecraft.util.SoundCategory; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.registry.Registry; -import net.minecraft.fluid.Fluid; +import zone.moddev.mc.basepower.init.Fluids; +import zone.moddev.mc.basepower.registry.FuelRegistry; +import zone.moddev.mc.basesteam.SteamAdvantage; +import zone.moddev.mc.basesteam.init.Power; +import net.minecraft.world.entity.player.Player; +import net.minecraft.sounds.SoundEvents; +import net.minecraft.world.item.ItemStack; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.core.Direction; +import net.minecraft.sounds.SoundSource; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.core.Registry; +import net.minecraft.world.level.material.Fluid; import cyano.poweradvantage.api.fluid.FluidStack; import cyano.poweradvantage.api.fluid.FluidTank; import cyano.poweradvantage.api.fluid.FluidTankInfo; @@ -28,7 +28,7 @@ import java.util.HashMap; import java.util.Map; -import static zone.moddev.mc.steamadvantage.util.SoundHelper.playSoundAtTileEntity; +import static zone.moddev.mc.basesteam.util.SoundHelper.playSoundAtTileEntity; @SuppressWarnings("deprecation") public class OilBoilerTileEntity extends cyano.poweradvantage.api.simple.TileEntitySimplePowerMachine implements LegacyFluidHandler{ @@ -44,8 +44,13 @@ public class OilBoilerTileEntity extends cyano.poweradvantage.api.simple.TileEnt private final int[] dataSyncArray = new int[6]; + /** Detached convenience constructor for tests; native factories always pass position and state. */ public OilBoilerTileEntity() { - super(zone.moddev.mc.steamadvantage.init.Entities.STEAM_BOILER_OIL, new ConduitType[]{Power.steam_power, Fluids.fluidConduit_general}, new float[]{1000,1000}, "tile.steamadvantage.steam_boiler_oil.name"); + this(net.minecraft.core.BlockPos.ZERO, new OilBoilerBlock().defaultBlockState()); + } + + public OilBoilerTileEntity(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) { + super(zone.moddev.mc.basesteam.init.Entities.STEAM_BOILER_OIL, pos, state, new ConduitType[]{Power.steam_power, Fluids.fluidConduit_general}, new float[]{1000,1000}, "tile.basesteam.steam_boiler_oil.name"); waterTank = new FluidTank(FluidTank.BUCKET_VOLUME * 4); fuelTank = new FluidTank(FluidTank.BUCKET_VOLUME * 4); } @@ -63,11 +68,11 @@ public void tickUpdate(boolean isServerWorld) { boilWater(); // play steam sounds occasionally if(getLevel().random.nextInt(100) == 0){ - playSoundAtTileEntity( SoundEvents.FIRE_EXTINGUISH, SoundCategory.AMBIENT, 0.5f, 1f, this); + playSoundAtTileEntity( SoundEvents.FIRE_EXTINGUISH, SoundSource.AMBIENT, 0.5f, 1f, this); } if(timeSinceSound > 200){ if(getWaterTank().getFluidAmount() > 0){ - playSoundAtTileEntity( SoundEvents.LAVA_AMBIENT, SoundCategory.AMBIENT, 0.3f, 1f, this); + playSoundAtTileEntity( SoundEvents.LAVA_AMBIENT, SoundSource.AMBIENT, 0.3f, 1f, this); } timeSinceSound = 0; } @@ -88,7 +93,7 @@ public void tickUpdate(boolean isServerWorld) { } @Override - public boolean stillValid(PlayerEntity player) { + public boolean stillValid(Player player) { return true; } @@ -121,7 +126,7 @@ private static Float getBurnTimePerBucketFor(Fluid fluid){ } // second, check universal bucket fuel registry int vol = FluidTank.BUCKET_VOLUME; - ItemStack bucket = fluid.getBucket() == net.minecraft.item.Items.AIR + ItemStack bucket = fluid.getBucket() == net.minecraft.world.item.Items.AIR ? ItemStack.EMPTY : new ItemStack(fluid.getBucket()); if(bucket.isEmpty()){ flammibilityCache.put(fluid,0f); @@ -241,13 +246,13 @@ public void prepareDataFieldsForSync() { dataSyncArray[4] = this.getFuelTank().getFluidAmount(); dataSyncArray[5] = (getFuelTank().getFluid() != null && getFuelTank().getFluid().getFluid() != null ? FluidIdHelper.getFluidId(getFuelTank().getFluid().getFluid()) - : FluidIdHelper.getFluidId(net.minecraft.fluid.Fluids.WATER)); + : FluidIdHelper.getFluidId(net.minecraft.world.level.material.Fluids.WATER)); } @Override public void onDataFieldUpdate() { this.setEnergy(Float.intBitsToFloat(dataSyncArray[0]), Power.steam_power); - this.getWaterTank().setFluid(new FluidStack(net.minecraft.fluid.Fluids.WATER,dataSyncArray[1])); + this.getWaterTank().setFluid(new FluidStack(net.minecraft.world.level.material.Fluids.WATER,dataSyncArray[1])); this.burnTime = dataSyncArray[2]; this.totalBurnTime = dataSyncArray[3]; this.getFuelTank().setFluid(new FluidStack(FluidIdHelper.getFluid(dataSyncArray[5]),dataSyncArray[4])); @@ -259,12 +264,12 @@ public void onDataFieldUpdate() { * @param tagRoot An NBT tag */ @Override - public CompoundNBT save(final CompoundNBT tagRoot) { + public CompoundTag save(final CompoundTag tagRoot) { super.save(tagRoot); - CompoundNBT tankTag = new CompoundNBT(); + CompoundTag tankTag = new CompoundTag(); this.getWaterTank().writeToNBT(tankTag); tagRoot.put("WaterTank", tankTag); - CompoundNBT tankTag2 = new CompoundNBT(); + CompoundTag tankTag2 = new CompoundTag(); this.getFuelTank().writeToNBT(tankTag2); tagRoot.put("FuelTank", tankTag2); if(this.burnTime > 0)tagRoot.putInt("BurnTime", this.burnTime); @@ -276,10 +281,10 @@ public CompoundNBT save(final CompoundNBT tagRoot) { * @param tagRoot An NBT tag */ @Override - public void load(net.minecraft.block.BlockState state, final CompoundNBT tagRoot) { - super.load(state, tagRoot); + public void load(final CompoundTag tagRoot) { + super.load(tagRoot); if (tagRoot.contains("WaterTank")) { - CompoundNBT tankTag = tagRoot.getCompound("WaterTank"); + CompoundTag tankTag = tagRoot.getCompound("WaterTank"); getWaterTank().readFromNBT(tankTag); if(tankTag.contains("Empty")){ // empty the tank if NBT says its empty (not default behavior of Tank.read(...) ) @@ -287,7 +292,7 @@ public void load(net.minecraft.block.BlockState state, final CompoundNBT tagRoot } } if (tagRoot.contains("FuelTank")) { - CompoundNBT tankTag = tagRoot.getCompound("FuelTank"); + CompoundTag tankTag = tagRoot.getCompound("FuelTank"); getFuelTank().readFromNBT(tankTag); if(tankTag.contains("Empty")){ // empty the tank if NBT says its empty (not default behavior of Tank.read(...) ) @@ -350,7 +355,7 @@ public float addEnergy(float amount, ConduitType type){ public void setEnergy(float amount,ConduitType type) { if(Fluids.isFluidType(type) && !ConduitType.areSameType(Fluids.fluidConduit_general,type)){ Fluid f = Fluids.conduitTypeToFluid(type); - if(f == net.minecraft.fluid.Fluids.WATER){ + if(f == net.minecraft.world.level.material.Fluids.WATER){ this.getWaterTank().setFluid(new FluidStack(f,(int)amount)); }else{ this.getFuelTank().setFluid(new FluidStack(f,(int)amount)); @@ -383,7 +388,7 @@ public float subtractEnergy(float amount, ConduitType type){ @Override public PowerRequest getPowerRequest(ConduitType offer) { if(this.redstone) return PowerRequest.REQUEST_NOTHING; - if(Fluids.conduitTypeToFluid(offer) == net.minecraft.fluid.Fluids.WATER){ + if(Fluids.conduitTypeToFluid(offer) == net.minecraft.world.level.material.Fluids.WATER){ PowerRequest request = new FluidRequest(FluidRequest.MEDIUM_PRIORITY+1, (getWaterTank().getCapacity() - getWaterTank().getFluidAmount()), this); @@ -414,7 +419,7 @@ public PowerRequest getPowerRequest(ConduitType offer) { @Override public int fill(Direction face, FluidStack fluid, boolean forReal) { if(fluid == null) return 0; - if(fluid.getFluid() == net.minecraft.fluid.Fluids.WATER){ + if(fluid.getFluid() == net.minecraft.world.level.material.Fluids.WATER){ if(getWaterTank().getFluidAmount() <= 0 || getWaterTank().getFluid().getFluid().equals(fluid.getFluid())){ return getWaterTank().fill(fluid, forReal); } @@ -434,7 +439,7 @@ public int fill(Direction face, FluidStack fluid, boolean forReal) { @Override public FluidStack drain(Direction face, FluidStack fluid, boolean forReal) { if(fluid == null) return null; - if(fluid.getFluid() == net.minecraft.fluid.Fluids.WATER && getWaterTank().getFluidAmount() > 0 && getWaterTank().getFluid().getFluid().equals(net.minecraft.fluid.Fluids.WATER)){ + if(fluid.getFluid() == net.minecraft.world.level.material.Fluids.WATER && getWaterTank().getFluidAmount() > 0 && getWaterTank().getFluid().getFluid().equals(net.minecraft.world.level.material.Fluids.WATER)){ return getWaterTank().drain(fluid.amount,forReal); } else if(getFuelTank().getFluidAmount() > 0 && getFuelTank().getFluid().getFluid().equals(fluid.getFluid())){ return getFuelTank().drain(fluid.amount,forReal); @@ -465,7 +470,7 @@ public FluidStack drain(Direction face, int amount, boolean forReal) { */ @Override public boolean canFill(Direction face, Fluid fluid) { - if(fluid == net.minecraft.fluid.Fluids.WATER) { + if(fluid == net.minecraft.world.level.material.Fluids.WATER) { if(getWaterTank().getFluidAmount() <= 0) return true; return getWaterTank().getFluidAmount() <= getWaterTank().getCapacity() && fluid.equals(getWaterTank().getFluid().getFluid()); } else if(getBurnTimePerBucketFor(fluid) > 0){ @@ -482,7 +487,7 @@ public boolean canFill(Direction face, Fluid fluid) { @Override public boolean canDrain(Direction face, Fluid fluid) { if(fluid == null) return false; - if(fluid == net.minecraft.fluid.Fluids.WATER) { + if(fluid == net.minecraft.world.level.material.Fluids.WATER) { return getWaterTank().getFluidAmount() > 0 && fluid.equals(getWaterTank().getFluid().getFluid()); } else { return getFuelTank().getFluidAmount() > 0 && fluid.equals(getFuelTank().getFluid().getFluid()); diff --git a/src/main/java/zone/moddev/mc/steamadvantage/machines/RockCrusherBlock.java b/src/main/java/zone/moddev/mc/basesteam/machines/RockCrusherBlock.java similarity index 62% rename from src/main/java/zone/moddev/mc/steamadvantage/machines/RockCrusherBlock.java rename to src/main/java/zone/moddev/mc/basesteam/machines/RockCrusherBlock.java index 378fbbe..d40da62 100644 --- a/src/main/java/zone/moddev/mc/steamadvantage/machines/RockCrusherBlock.java +++ b/src/main/java/zone/moddev/mc/basesteam/machines/RockCrusherBlock.java @@ -1,12 +1,12 @@ -package zone.moddev.mc.steamadvantage.machines; +package zone.moddev.mc.basesteam.machines; import cyano.poweradvantage.api.ConduitType; import cyano.poweradvantage.api.PoweredEntity; -import zone.moddev.mc.steamadvantage.init.Power; -import net.minecraft.block.material.Material; -import net.minecraft.block.BlockState; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; +import zone.moddev.mc.basesteam.init.Power; +import net.minecraft.world.level.material.Material; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.core.BlockPos; +import net.minecraft.world.level.Level; /** @@ -21,8 +21,8 @@ public RockCrusherBlock() { } @Override - public PoweredEntity newBlockEntity(net.minecraft.world.IBlockReader world) { - return new RockCrusherTileEntity(); + public PoweredEntity newBlockEntity(net.minecraft.core.BlockPos pos, BlockState state) { + return new RockCrusherTileEntity(pos, state); } @Override @@ -31,7 +31,7 @@ public boolean hasAnalogOutputSignal(BlockState bs) { } @Override - public int getAnalogOutputSignal(BlockState bs, World world, BlockPos coord) { + public int getAnalogOutputSignal(BlockState bs, Level world, BlockPos coord) { if(world.getBlockEntity(coord) instanceof RockCrusherTileEntity){ return ((RockCrusherTileEntity)world.getBlockEntity(coord)).getComparatorOutput(); } diff --git a/src/main/java/zone/moddev/mc/steamadvantage/machines/RockCrusherTileEntity.java b/src/main/java/zone/moddev/mc/basesteam/machines/RockCrusherTileEntity.java similarity index 83% rename from src/main/java/zone/moddev/mc/steamadvantage/machines/RockCrusherTileEntity.java rename to src/main/java/zone/moddev/mc/basesteam/machines/RockCrusherTileEntity.java index 9c894a8..a7304d4 100644 --- a/src/main/java/zone/moddev/mc/steamadvantage/machines/RockCrusherTileEntity.java +++ b/src/main/java/zone/moddev/mc/basesteam/machines/RockCrusherTileEntity.java @@ -1,16 +1,16 @@ -package zone.moddev.mc.steamadvantage.machines; +package zone.moddev.mc.basesteam.machines; import cyano.poweradvantage.api.ConduitType; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.util.SoundEvents; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.CompoundNBT; -import net.minecraft.util.Direction; -import zone.moddev.mc.steamadvantage.compat.BaseMetalsCompat; -import zone.moddev.mc.steamadvantage.init.Power; -import net.minecraft.util.SoundCategory; +import net.minecraft.world.entity.player.Player; +import net.minecraft.sounds.SoundEvents; +import net.minecraft.world.item.ItemStack; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.core.Direction; +import zone.moddev.mc.basesteam.compat.BaseMetalsCompat; +import zone.moddev.mc.basesteam.init.Power; +import net.minecraft.sounds.SoundSource; -import static zone.moddev.mc.steamadvantage.util.SoundHelper.playSoundAtTileEntity; +import static zone.moddev.mc.basesteam.util.SoundHelper.playSoundAtTileEntity; public class RockCrusherTileEntity extends cyano.poweradvantage.api.simple.TileEntitySimplePowerMachine{ @@ -24,8 +24,13 @@ public class RockCrusherTileEntity extends cyano.poweradvantage.api.simple.TileE private int progress = 0; + /** Detached convenience constructor for tests; native factories always pass position and state. */ public RockCrusherTileEntity() { - super(zone.moddev.mc.steamadvantage.init.Entities.STEAM_CRUSHER, Power.steam_power, 50, "tile.steamadvantage.steam_crusher.name"); + this(net.minecraft.core.BlockPos.ZERO, new RockCrusherBlock().defaultBlockState()); + } + + public RockCrusherTileEntity(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) { + super(zone.moddev.mc.basesteam.init.Entities.STEAM_CRUSHER, pos, state, Power.steam_power, 50, "tile.basesteam.steam_crusher.name"); allSlots = new int[inventory.length]; for(int i = 0; i < allSlots.length; i++){ allSlots[i] = i; @@ -82,7 +87,7 @@ public void tickUpdate(boolean isServerWorld) { // play steam sounds occasionally timeSinceLastSteamBurst++; if(timeSinceLastSteamBurst > 50){ - playSoundAtTileEntity( SoundEvents.FIRE_EXTINGUISH, SoundCategory.AMBIENT, 0.5f, 1f, this); + playSoundAtTileEntity( SoundEvents.FIRE_EXTINGUISH, SoundSource.AMBIENT, 0.5f, 1f, this); timeSinceLastSteamBurst = 0; } } else if (progress > 0){ @@ -99,7 +104,7 @@ public void tickUpdate(boolean isServerWorld) { inventory[0].shrink(1); if(inventory[0].isEmpty()){inventory[0] = null;} // decrement the input slot progress = 0; - playSoundAtTileEntity( SoundEvents.GRAVEL_BREAK, SoundCategory.AMBIENT, 0.5f, 0.2f, this); + playSoundAtTileEntity( SoundEvents.GRAVEL_BREAK, SoundSource.AMBIENT, 0.5f, 0.2f, this); } } else if (progress > 0){ // cannot crush, undo progress @@ -112,7 +117,7 @@ public void tickUpdate(boolean isServerWorld) { } @Override - public boolean stillValid(PlayerEntity player) { + public boolean stillValid(Player player) { return true; } @@ -194,15 +199,15 @@ private int canAddToOutputInventory(ItemStack output) { } @Override - public CompoundNBT save(CompoundNBT tagRoot){ + public CompoundTag save(CompoundTag tagRoot){ super.save(tagRoot); tagRoot.putShort("progress",(short)progress); return tagRoot; } @Override - public void load(net.minecraft.block.BlockState state, CompoundNBT tagRoot){ - super.load(state, tagRoot); + public void load(CompoundTag tagRoot){ + super.load(tagRoot); if(tagRoot.contains("progress")){ progress = tagRoot.getShort("progress"); } diff --git a/src/main/java/zone/moddev/mc/steamadvantage/machines/SteamDrillBlock.java b/src/main/java/zone/moddev/mc/basesteam/machines/SteamDrillBlock.java similarity index 73% rename from src/main/java/zone/moddev/mc/steamadvantage/machines/SteamDrillBlock.java rename to src/main/java/zone/moddev/mc/basesteam/machines/SteamDrillBlock.java index 0a9fa2b..268ad58 100644 --- a/src/main/java/zone/moddev/mc/steamadvantage/machines/SteamDrillBlock.java +++ b/src/main/java/zone/moddev/mc/basesteam/machines/SteamDrillBlock.java @@ -1,26 +1,26 @@ -package zone.moddev.mc.steamadvantage.machines; +package zone.moddev.mc.basesteam.machines; import cyano.poweradvantage.api.*; import cyano.poweradvantage.api.simple.TileEntitySimplePowerMachine; -import zone.moddev.mc.poweradvantage.conduitnetwork.ConduitRegistry; -import zone.moddev.mc.steamadvantage.blocks.DrillBitTileEntity; -import zone.moddev.mc.steamadvantage.init.Power; -import net.minecraft.block.material.Material; -import net.minecraft.state.DirectionProperty; -import net.minecraft.state.StateContainer; -import net.minecraft.state.properties.BlockStateProperties; -import net.minecraft.block.BlockState; -import net.minecraft.entity.LivingEntity; -import net.minecraft.inventory.IInventory; -import net.minecraft.inventory.InventoryHelper; -import net.minecraft.item.Item; -import net.minecraft.item.BlockItemUseContext; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.Direction; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.Explosion; -import net.minecraft.world.World; +import zone.moddev.mc.basepower.conduitnetwork.ConduitRegistry; +import zone.moddev.mc.basesteam.blocks.DrillBitTileEntity; +import zone.moddev.mc.basesteam.init.Power; +import net.minecraft.world.level.material.Material; +import net.minecraft.world.level.block.state.properties.DirectionProperty; +import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.properties.BlockStateProperties; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.Container; +import net.minecraft.world.Containers; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.context.BlockPlaceContext; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.core.Direction; +import net.minecraft.core.BlockPos; +import net.minecraft.world.level.Explosion; +import net.minecraft.world.level.Level; import java.util.Random; @@ -40,7 +40,7 @@ public SteamDrillBlock(){ * Override of default block behavior */ @Override - public void onPlace(final BlockState state, final World world, final BlockPos coord, final BlockState oldState, final boolean moving) { + public void onPlace(final BlockState state, final Level world, final BlockPos coord, final BlockState oldState, final boolean moving) { super.onPlace(state, world, coord, oldState, moving); ConduitRegistry.getInstance().conduitBlockPlacedEvent(world, coord, Power.steam_power); } @@ -48,7 +48,7 @@ public void onPlace(final BlockState state, final World world, final BlockPos co * This method is called when the block is removed from the world by an entity. */ @Override - public void onRemove(BlockState state, World w, BlockPos coord, BlockState newState, boolean isMoving){ + public void onRemove(BlockState state, Level w, BlockPos coord, BlockState newState, boolean isMoving){ if (state.getBlock() != newState.getBlock()) { destroyNeighbors(w, coord, state); ConduitRegistry.getInstance().conduitBlockRemovedEvent(w, coord, Power.steam_power); @@ -59,7 +59,7 @@ public void onRemove(BlockState state, World w, BlockPos coord, BlockState newSt * This method is called when the block is destroyed by an explosion. */ @Override - public void wasExploded(World w, BlockPos coord, Explosion boom){ + public void wasExploded(Level w, BlockPos coord, Explosion boom){ destroyNeighbors(w,coord,w.getBlockState(coord)); ConduitRegistry.getInstance().conduitBlockRemovedEvent(w, coord, Power.steam_power); super.wasExploded(w, coord, boom); @@ -67,7 +67,7 @@ public void wasExploded(World w, BlockPos coord, Explosion boom){ - private void destroyNeighbors(World w, BlockPos coord, BlockState state) { + private void destroyNeighbors(Level w, BlockPos coord, BlockState state) { if(w.isClientSide) return; // destroy connected drill bits for(int i = 0; i < 6; i++){ @@ -85,8 +85,8 @@ private void destroyNeighbors(World w, BlockPos coord, BlockState state) { * TileEntitySimplePowerConsumer. */ @Override - public PoweredEntity newBlockEntity(final net.minecraft.world.IBlockReader world){ - return new SteamDrillTileEntity(); + public PoweredEntity newBlockEntity(net.minecraft.core.BlockPos pos, BlockState state){ + return new SteamDrillTileEntity(pos, state); } /** @@ -120,7 +120,7 @@ public boolean isPowerSource(ConduitType t){ * Creates the blockstate of this block when it is placed in the world */ @Override - public BlockState getStateForPlacement(final BlockItemUseContext context) { + public BlockState getStateForPlacement(final BlockPlaceContext context) { return this.defaultBlockState().setValue(FACING, context.getClickedFace().getOpposite()); } @@ -128,10 +128,10 @@ public BlockState getStateForPlacement(final BlockItemUseContext context) { * Creates the blockstate of this block when it is placed in the world */ @Override - public void setPlacedBy(final World world, final BlockPos coord, final BlockState bs, + public void setPlacedBy(final Level world, final BlockPos coord, final BlockState bs, final LivingEntity placer, final ItemStack srcItemStack) { if (srcItemStack.hasCustomHoverName()) { - final TileEntity tileEntity = world.getBlockEntity(coord); + final BlockEntity tileEntity = world.getBlockEntity(coord); if (tileEntity instanceof PoweredEntity){ ((PoweredEntity)tileEntity).setCustomInventoryName(srcItemStack.getDisplayName().getString()); } @@ -183,8 +183,8 @@ public boolean hasAnalogOutputSignal(BlockState bs){ * @return a number from 0 to 15 */ @Override - public int getAnalogOutputSignal(BlockState bs, final World world, final BlockPos coord){ - TileEntity te = world.getBlockEntity(coord); + public int getAnalogOutputSignal(BlockState bs, final Level world, final BlockPos coord){ + BlockEntity te = world.getBlockEntity(coord); if(te instanceof SteamDrillTileEntity){ return ((SteamDrillTileEntity)te).getComparatorOutput(); } else { @@ -196,7 +196,7 @@ public int getAnalogOutputSignal(BlockState bs, final World world, final BlockPo * Creates a blockstate */ @Override - protected void createBlockStateDefinition(StateContainer.Builder builder) { + protected void createBlockStateDefinition(StateDefinition.Builder builder) { builder.add(FACING); } diff --git a/src/main/java/zone/moddev/mc/steamadvantage/machines/SteamDrillTileEntity.java b/src/main/java/zone/moddev/mc/basesteam/machines/SteamDrillTileEntity.java similarity index 84% rename from src/main/java/zone/moddev/mc/steamadvantage/machines/SteamDrillTileEntity.java rename to src/main/java/zone/moddev/mc/basesteam/machines/SteamDrillTileEntity.java index 9ea501f..c2de70e 100644 --- a/src/main/java/zone/moddev/mc/steamadvantage/machines/SteamDrillTileEntity.java +++ b/src/main/java/zone/moddev/mc/basesteam/machines/SteamDrillTileEntity.java @@ -1,33 +1,33 @@ -package zone.moddev.mc.steamadvantage.machines; +package zone.moddev.mc.basesteam.machines; import cyano.poweradvantage.api.ConduitType; -import zone.moddev.mc.poweradvantage.util.InventoryWrapper; -import zone.moddev.mc.steamadvantage.blocks.DrillBitTileEntity; -import zone.moddev.mc.steamadvantage.compat.BaseMetalsCompat; -import zone.moddev.mc.steamadvantage.init.Blocks; -import zone.moddev.mc.steamadvantage.init.Power; -import net.minecraft.block.Block; -import net.minecraft.block.BlockState; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.util.SoundEvents; -import net.minecraft.inventory.IInventory; -import net.minecraft.inventory.ISidedInventory; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.CompoundNBT; -import net.minecraft.nbt.NBTUtil; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.Direction; -import net.minecraft.util.NonNullList; -import net.minecraft.util.SoundCategory; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; -import net.minecraft.world.server.ServerWorld; +import zone.moddev.mc.basepower.util.InventoryWrapper; +import zone.moddev.mc.basesteam.blocks.DrillBitTileEntity; +import zone.moddev.mc.basesteam.compat.BaseMetalsCompat; +import zone.moddev.mc.basesteam.init.Blocks; +import zone.moddev.mc.basesteam.init.Power; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.entity.player.Player; +import net.minecraft.sounds.SoundEvents; +import net.minecraft.world.Container; +import net.minecraft.world.WorldlyContainer; +import net.minecraft.world.item.ItemStack; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.nbt.NbtUtils; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.core.Direction; +import net.minecraft.core.NonNullList; +import net.minecraft.sounds.SoundSource; +import net.minecraft.core.BlockPos; +import net.minecraft.world.level.Level; +import net.minecraft.server.level.ServerLevel; import java.util.Arrays; import java.util.List; -import static zone.moddev.mc.steamadvantage.util.SoundHelper.playSoundAtPosition; -import static zone.moddev.mc.steamadvantage.util.SoundHelper.playSoundAtTileEntity; +import static zone.moddev.mc.basesteam.util.SoundHelper.playSoundAtPosition; +import static zone.moddev.mc.basesteam.util.SoundHelper.playSoundAtTileEntity; @SuppressWarnings("deprecation") public class SteamDrillTileEntity extends cyano.poweradvantage.api.simple.TileEntitySimplePowerMachine{ @@ -44,7 +44,7 @@ public class SteamDrillTileEntity extends cyano.poweradvantage.api.simple.TileEn private int progressGoal = 0; private BlockPos targetBlockCoord = null; private BlockState targetBlockState = null; - private CompoundNBT savedTargetState = null; + private CompoundTag savedTargetState = null; private Block targetBlock = null; private List targetBlockItems = null; private Direction oldDir = null; @@ -53,8 +53,13 @@ public class SteamDrillTileEntity extends cyano.poweradvantage.api.simple.TileEn private boolean deferred = false; + /** Detached convenience constructor for tests; native factories always pass position and state. */ public SteamDrillTileEntity() { - super(zone.moddev.mc.steamadvantage.init.Entities.STEAM_DRILL, Power.steam_power, 50, "tile.steamadvantage.steam_drill.name"); + this(net.minecraft.core.BlockPos.ZERO, new SteamDrillBlock().defaultBlockState()); + } + + public SteamDrillTileEntity(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) { + super(zone.moddev.mc.basesteam.init.Entities.STEAM_DRILL, pos, state, Power.steam_power, 50, "tile.basesteam.steam_drill.name"); } @@ -89,8 +94,8 @@ public void tickUpdate(boolean isServerWorld) { progress++; if(progress >= progressGoal){ // Mined it! - playSoundAtPosition(targetBlockCoord.getX()+0.5, targetBlockCoord.getY()+0.5, targetBlockCoord.getZ()+0.5, targetBlock.getSoundType(targetBlockState, powerAdvantageWorld(), targetBlockCoord, null).getPlaceSound(), SoundCategory.BLOCKS, 0.5f, 1f, this.powerAdvantageWorld()); - playSoundAtTileEntity( SoundEvents.FIRE_EXTINGUISH, SoundCategory.AMBIENT, 0.5f, 1f, this); + playSoundAtPosition(targetBlockCoord.getX()+0.5, targetBlockCoord.getY()+0.5, targetBlockCoord.getZ()+0.5, targetBlock.getSoundType(targetBlockState, powerAdvantageWorld(), targetBlockCoord, null).getPlaceSound(), SoundSource.BLOCKS, 0.5f, 1f, this.powerAdvantageWorld()); + playSoundAtTileEntity( SoundEvents.FIRE_EXTINGUISH, SoundSource.AMBIENT, 0.5f, 1f, this); powerAdvantageWorld().removeBlock(targetBlockCoord, false); for(ItemStack item : targetBlockItems){ addItem(item); @@ -173,24 +178,23 @@ private boolean followTrack(){ // clone this block into neighboring block this.untargetBlock(); - World w = powerAdvantageWorld(); + Level w = powerAdvantageWorld(); BlockPos currentPos = powerAdvantagePos(); BlockPos nextPos = currentPos.relative(trackDir); BlockState trackState = w.getBlockState(nextPos); w.setBlock(nextPos, w.getBlockState(currentPos), 2); - TileEntity movedTile = w.getBlockEntity(nextPos); + BlockEntity movedTile = w.getBlockEntity(nextPos); if(!(movedTile instanceof SteamDrillTileEntity)){ w.setBlock(nextPos, trackState, 2); return false; } SteamDrillTileEntity te = (SteamDrillTileEntity)movedTile; - CompoundNBT dataTransfer = new CompoundNBT(); + CompoundTag dataTransfer = new CompoundTag(); this.save(dataTransfer); dataTransfer.putInt("x", nextPos.getX()); dataTransfer.putInt("y", nextPos.getY()); dataTransfer.putInt("z", nextPos.getZ()); - te.load(w.getBlockState(nextPos), dataTransfer); - te.setPosition(nextPos); + te.load(dataTransfer); te.clearRemoved(); te.subtractEnergy(ENERGY_COST_MOVE, Power.steam_power); te.setChanged(); @@ -198,7 +202,7 @@ private boolean followTrack(){ // replace this block with steam pipe destroyDrillBit(drillDirection); - w.setBlockAndUpdate(currentPos.relative(drillDirection), zone.moddev.mc.poweradvantage.init.Blocks.steel_frame.defaultBlockState()); + w.setBlockAndUpdate(currentPos.relative(drillDirection), zone.moddev.mc.basepower.init.Blocks.steel_frame.defaultBlockState()); w.setBlock(currentPos, Blocks.steam_pipe.defaultBlockState(), 2); return true; } @@ -287,7 +291,7 @@ public void onDataFieldUpdate() { if(hitEnd){ boolean moved = followTrack(); if(moved){ - zone.moddev.mc.poweradvantage.conduitnetwork.ConduitRegistry.getInstance() + zone.moddev.mc.basepower.conduitnetwork.ConduitRegistry.getInstance() .conduitBlockRemovedEvent(powerAdvantageWorld(), powerAdvantagePos(), Power.steam_power); return; } @@ -317,7 +321,7 @@ public void onDataFieldUpdate() { private void destroyDrillBit(Direction f) { BlockPos n = powerAdvantagePos().relative(f); - while(powerAdvantageWorld().getBlockState(n).getBlock() == zone.moddev.mc.steamadvantage.init.Blocks.drillbit){ + while(powerAdvantageWorld().getBlockState(n).getBlock() == zone.moddev.mc.basesteam.init.Blocks.drillbit){ powerAdvantageWorld().removeBlock(n, false); n = n.relative(f); } @@ -328,14 +332,14 @@ private void targetBlock (BlockPos n){ targetBlockCoord = n; progressGoal = this.getBlockStrength(n); targetBlockState = powerAdvantageWorld().getBlockState(n); - savedTargetState = NBTUtil.writeBlockState(targetBlockState); + savedTargetState = NbtUtils.writeBlockState(targetBlockState); targetBlock = targetBlockState.getBlock(); ItemStack crusherOutput = BaseMetalsCompat.getCrusherRecipeOutput(powerAdvantageWorld(), targetBlockState); if(crusherOutput != null){ targetBlockItems = Arrays.asList(crusherOutput); } else { NonNullList drops = NonNullList.create(); - drops.addAll(Block.getDrops(targetBlockState, (ServerWorld) powerAdvantageWorld(), n, + drops.addAll(Block.getDrops(targetBlockState, (ServerLevel) powerAdvantageWorld(), n, powerAdvantageWorld().getBlockEntity(n))); targetBlockItems = drops; } @@ -347,7 +351,7 @@ private void restoreTargetBlock(){ || !powerAdvantageWorld().hasChunkAt(targetBlockCoord)) return; int savedProgress = progress; if(savedTargetState != null && !savedTargetState.equals( - NBTUtil.writeBlockState(powerAdvantageWorld().getBlockState(targetBlockCoord)))){ + NbtUtils.writeBlockState(powerAdvantageWorld().getBlockState(targetBlockCoord)))){ untargetBlock(); return; } @@ -412,7 +416,7 @@ private boolean hasRedstoneSignal() { private boolean canMine(BlockPos coord){ Block b = powerAdvantageWorld().getBlockState(coord).getBlock(); - return !(b == net.minecraft.block.Blocks.BEDROCK || b == net.minecraft.block.Blocks.BARRIER); + return !(b == net.minecraft.world.level.block.Blocks.BEDROCK || b == net.minecraft.world.level.block.Blocks.BARRIER); } private int getBlockStrength(BlockPos coord){ @@ -427,9 +431,9 @@ private int getBlockStrength(BlockPos coord){ private void inventoryTransfer(BlockPos adj, Direction otherFace) { - TileEntity te = powerAdvantageWorld().getBlockEntity(adj); - if(te instanceof IInventory ){ - ISidedInventory inv = InventoryWrapper.wrap((IInventory)te); + BlockEntity te = powerAdvantageWorld().getBlockEntity(adj); + if(te instanceof Container ){ + WorldlyContainer inv = InventoryWrapper.wrap((Container)te); int[] accessibleSlots = inv.getSlotsForFace(otherFace); if(accessibleSlots.length == 0) return; for(int mySlot = 0; mySlot < this.inventory.length; mySlot++){ @@ -466,7 +470,7 @@ private void inventoryTransfer(BlockPos adj, Direction otherFace) { } @Override - public CompoundNBT save(CompoundNBT tagRoot){ + public CompoundTag save(CompoundTag tagRoot){ super.save(tagRoot); tagRoot.putShort("progress",(short)progress); // getFacing refreshes this during normal ticks. World lookups here can @@ -482,8 +486,8 @@ public CompoundNBT save(CompoundNBT tagRoot){ } @Override - public void load(net.minecraft.block.BlockState state, CompoundNBT tagRoot){ - super.load(state, tagRoot); + public void load(CompoundTag tagRoot){ + super.load(tagRoot); untargetBlock(); savedFacing = null; oldDir = null; @@ -540,7 +544,7 @@ public boolean isPowerSource(ConduitType conduitType) { } @Override - public boolean stillValid(PlayerEntity player) { + public boolean stillValid(Player player) { return true; } } diff --git a/src/main/java/zone/moddev/mc/steamadvantage/machines/SteamElevatorBlock.java b/src/main/java/zone/moddev/mc/basesteam/machines/SteamElevatorBlock.java similarity index 62% rename from src/main/java/zone/moddev/mc/steamadvantage/machines/SteamElevatorBlock.java rename to src/main/java/zone/moddev/mc/basesteam/machines/SteamElevatorBlock.java index 01c652e..18042db 100644 --- a/src/main/java/zone/moddev/mc/steamadvantage/machines/SteamElevatorBlock.java +++ b/src/main/java/zone/moddev/mc/basesteam/machines/SteamElevatorBlock.java @@ -1,12 +1,12 @@ -package zone.moddev.mc.steamadvantage.machines; +package zone.moddev.mc.basesteam.machines; import cyano.poweradvantage.api.ConduitType; import cyano.poweradvantage.api.PoweredEntity; -import zone.moddev.mc.steamadvantage.init.Power; -import net.minecraft.block.material.Material; -import net.minecraft.block.BlockState; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; +import zone.moddev.mc.basesteam.init.Power; +import net.minecraft.world.level.material.Material; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.core.BlockPos; +import net.minecraft.world.level.Level; /** @@ -21,8 +21,8 @@ public SteamElevatorBlock() { } @Override - public PoweredEntity newBlockEntity(net.minecraft.world.IBlockReader world) { - return new SteamElevatorTileEntity(); + public PoweredEntity newBlockEntity(net.minecraft.core.BlockPos pos, BlockState state) { + return new SteamElevatorTileEntity(pos, state); } @Override @@ -31,7 +31,7 @@ public boolean hasAnalogOutputSignal(BlockState bs) { } @Override - public int getAnalogOutputSignal(BlockState bs, World world, BlockPos coord) { + public int getAnalogOutputSignal(BlockState bs, Level world, BlockPos coord) { if(world.getBlockEntity(coord) instanceof SteamElevatorTileEntity){ return ((SteamElevatorTileEntity)world.getBlockEntity(coord)).getComparatorOutput(); } diff --git a/src/main/java/zone/moddev/mc/steamadvantage/machines/SteamElevatorTileEntity.java b/src/main/java/zone/moddev/mc/basesteam/machines/SteamElevatorTileEntity.java similarity index 70% rename from src/main/java/zone/moddev/mc/steamadvantage/machines/SteamElevatorTileEntity.java rename to src/main/java/zone/moddev/mc/basesteam/machines/SteamElevatorTileEntity.java index 8240537..cfee4fb 100644 --- a/src/main/java/zone/moddev/mc/steamadvantage/machines/SteamElevatorTileEntity.java +++ b/src/main/java/zone/moddev/mc/basesteam/machines/SteamElevatorTileEntity.java @@ -1,20 +1,20 @@ -package zone.moddev.mc.steamadvantage.machines; +package zone.moddev.mc.basesteam.machines; import cyano.poweradvantage.api.ConduitType; -import zone.moddev.mc.steamadvantage.init.Blocks; -import zone.moddev.mc.steamadvantage.init.Power; -import net.minecraft.entity.Entity; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.util.SoundEvents; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.CompoundNBT; -import net.minecraft.util.SoundCategory; -import net.minecraft.util.math.AxisAlignedBB; -import net.minecraft.util.math.BlockPos; +import zone.moddev.mc.basesteam.init.Blocks; +import zone.moddev.mc.basesteam.init.Power; +import net.minecraft.world.entity.Entity; +import net.minecraft.world.entity.player.Player; +import net.minecraft.sounds.SoundEvents; +import net.minecraft.world.item.ItemStack; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.sounds.SoundSource; +import net.minecraft.world.phys.AABB; +import net.minecraft.core.BlockPos; import java.util.List; -import static zone.moddev.mc.steamadvantage.util.SoundHelper.playSoundAtTileEntity; +import static zone.moddev.mc.basesteam.util.SoundHelper.playSoundAtTileEntity; public class SteamElevatorTileEntity extends cyano.poweradvantage.api.simple.TileEntitySimplePowerMachine{ @@ -28,8 +28,13 @@ public class SteamElevatorTileEntity extends cyano.poweradvantage.api.simple.Til private boolean above = false; + /** Detached convenience constructor for tests; native factories always pass position and state. */ public SteamElevatorTileEntity() { - super(zone.moddev.mc.steamadvantage.init.Entities.STEAM_ELEVATOR, Power.steam_power, STEAM_PER_ELEVATOR_MOVE*2, "tile.steamadvantage.steam_elevator.name"); + this(net.minecraft.core.BlockPos.ZERO, new SteamElevatorBlock().defaultBlockState()); + } + + public SteamElevatorTileEntity(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) { + super(zone.moddev.mc.basesteam.init.Entities.STEAM_ELEVATOR, pos, state, Power.steam_power, STEAM_PER_ELEVATOR_MOVE*2, "tile.basesteam.steam_elevator.name"); } private boolean redstone = true; @@ -52,8 +57,8 @@ public void tickUpdate(boolean isServerWorld) { private boolean moveUp(){ if(this.getEnergy(Power.steam_power) < STEAM_PER_ELEVATOR_MOVE) return false; this.subtractEnergy(STEAM_PER_ELEVATOR_MOVE, Power.steam_power); - playSoundAtTileEntity( SoundEvents.FIRE_EXTINGUISH, SoundCategory.AMBIENT, 0.5f, 1f, this); - playSoundAtTileEntity( SoundEvents.PISTON_EXTEND, SoundCategory.BLOCKS, 0.5f, 1f, this); + playSoundAtTileEntity( SoundEvents.FIRE_EXTINGUISH, SoundSource.AMBIENT, 0.5f, 1f, this); + playSoundAtTileEntity( SoundEvents.PISTON_EXTEND, SoundSource.BLOCKS, 0.5f, 1f, this); int dist = 0; BlockPos p = this.getBlockPos().above(); while(p.getY() < 256 && dist < MAX_RANGE && getLevel().isEmptyBlock(p)){ @@ -75,7 +80,7 @@ private boolean moveUp(){ } // move people List passengers = getLevel().getEntitiesOfClass(Entity.class, - new AxisAlignedBB(getBlockPos().getX(),getBlockPos().getY()+1,getBlockPos().getZ(), + new AABB(getBlockPos().getX(),getBlockPos().getY()+1,getBlockPos().getZ(), getBlockPos().getX()+1, topPos.getY(), getBlockPos().getZ()+1)); for(Entity e : passengers){ @@ -88,8 +93,8 @@ private boolean moveUp(){ private boolean moveDown(){ if(this.getEnergy(Power.steam_power) < STEAM_PER_ELEVATOR_MOVE) return false; this.subtractEnergy(STEAM_PER_ELEVATOR_MOVE, Power.steam_power); - playSoundAtTileEntity( SoundEvents.FIRE_EXTINGUISH, SoundCategory.AMBIENT, 0.5f, 1f, this); - playSoundAtTileEntity( SoundEvents.PISTON_CONTRACT, SoundCategory.BLOCKS, 0.5f, 1f, this); + playSoundAtTileEntity( SoundEvents.FIRE_EXTINGUISH, SoundSource.AMBIENT, 0.5f, 1f, this); + playSoundAtTileEntity( SoundEvents.PISTON_CONTRACT, SoundSource.BLOCKS, 0.5f, 1f, this); // scan up the piston and clear it BlockPos destination = this.getBlockPos().above(); BlockPos p = destination; @@ -103,7 +108,7 @@ private boolean moveDown(){ } // move people List passengers = getLevel().getEntitiesOfClass(Entity.class, - new AxisAlignedBB(p.getX(),p.getY(),p.getZ(), p.getX()+1, p.getY()+2, p.getZ()+1)); + new AABB(p.getX(),p.getY(),p.getZ(), p.getX()+1, p.getY()+2, p.getZ()+1)); for(Entity e : passengers){ e.teleportTo(e.getX(), destination.getY()+smallAmount,e.getZ()); @@ -167,15 +172,15 @@ public void onDataFieldUpdate() { @Override - public CompoundNBT save(CompoundNBT tagRoot){ + public CompoundTag save(CompoundTag tagRoot){ super.save(tagRoot); tagRoot.putBoolean("up",above); return tagRoot; } @Override - public void load(net.minecraft.block.BlockState state, CompoundNBT tagRoot){ - super.load(state, tagRoot); + public void load(CompoundTag tagRoot){ + super.load(tagRoot); if(tagRoot.contains("up")){ above = tagRoot.getBoolean("up"); } @@ -200,7 +205,7 @@ public boolean isPowerSource(ConduitType conduitType) { } @Override - public boolean stillValid(PlayerEntity player) { + public boolean stillValid(Player player) { return true; } } diff --git a/src/main/java/zone/moddev/mc/steamadvantage/machines/SteamPumpBlock.java b/src/main/java/zone/moddev/mc/basesteam/machines/SteamPumpBlock.java similarity index 65% rename from src/main/java/zone/moddev/mc/steamadvantage/machines/SteamPumpBlock.java rename to src/main/java/zone/moddev/mc/basesteam/machines/SteamPumpBlock.java index cab9bf8..4830820 100644 --- a/src/main/java/zone/moddev/mc/steamadvantage/machines/SteamPumpBlock.java +++ b/src/main/java/zone/moddev/mc/basesteam/machines/SteamPumpBlock.java @@ -1,16 +1,16 @@ -package zone.moddev.mc.steamadvantage.machines; +package zone.moddev.mc.basesteam.machines; import cyano.poweradvantage.api.ConduitType; import cyano.poweradvantage.api.PoweredEntity; -import zone.moddev.mc.poweradvantage.conduitnetwork.ConduitRegistry; -import zone.moddev.mc.poweradvantage.init.Fluids; -import zone.moddev.mc.steamadvantage.init.Blocks; -import zone.moddev.mc.steamadvantage.init.Power; -import net.minecraft.block.material.Material; -import net.minecraft.block.BlockState; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.Explosion; -import net.minecraft.world.World; +import zone.moddev.mc.basepower.conduitnetwork.ConduitRegistry; +import zone.moddev.mc.basepower.init.Fluids; +import zone.moddev.mc.basesteam.init.Blocks; +import zone.moddev.mc.basesteam.init.Power; +import net.minecraft.world.level.material.Material; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.core.BlockPos; +import net.minecraft.world.level.Explosion; +import net.minecraft.world.level.Level; /** @@ -27,8 +27,8 @@ public SteamPumpBlock() { } @Override - public PoweredEntity newBlockEntity(net.minecraft.world.IBlockReader world) { - return new SteamPumpTileEntity(); + public PoweredEntity newBlockEntity(net.minecraft.core.BlockPos pos, BlockState state) { + return new SteamPumpTileEntity(pos, state); } @Override @@ -37,7 +37,7 @@ public boolean hasAnalogOutputSignal(BlockState bs) { } @Override - public int getAnalogOutputSignal(BlockState bs, World world, BlockPos coord) { + public int getAnalogOutputSignal(BlockState bs, Level world, BlockPos coord) { if(world.getBlockEntity(coord) instanceof SteamPumpTileEntity){ return ((SteamPumpTileEntity)world.getBlockEntity(coord)).getComparatorOutput(); } @@ -57,19 +57,19 @@ public boolean isPowerSource(ConduitType type){ return !ConduitType.areSameType(Power.steam_power, type); } @Override - public void onRemove(BlockState state, World w, BlockPos coord, BlockState newState, boolean isMoving) { + public void onRemove(BlockState state, Level w, BlockPos coord, BlockState newState, boolean isMoving) { if (state.getBlock() != newState.getBlock()) destroyPipe(w, coord); super.onRemove(state, w, coord, newState, isMoving); } @Override - public void wasExploded(World w, BlockPos coord, Explosion boom){ + public void wasExploded(Level w, BlockPos coord, Explosion boom){ destroyPipe(w, coord); super.wasExploded(w, coord, boom); } - private void destroyPipe(World w, BlockPos coord) { + private void destroyPipe(Level w, BlockPos coord) { if(w.isClientSide) return; // destroy connected drill bits BlockPos c = coord.below(); diff --git a/src/main/java/zone/moddev/mc/steamadvantage/machines/SteamPumpTileEntity.java b/src/main/java/zone/moddev/mc/basesteam/machines/SteamPumpTileEntity.java similarity index 80% rename from src/main/java/zone/moddev/mc/steamadvantage/machines/SteamPumpTileEntity.java rename to src/main/java/zone/moddev/mc/basesteam/machines/SteamPumpTileEntity.java index dc61101..f8316fa 100644 --- a/src/main/java/zone/moddev/mc/steamadvantage/machines/SteamPumpTileEntity.java +++ b/src/main/java/zone/moddev/mc/basesteam/machines/SteamPumpTileEntity.java @@ -1,28 +1,28 @@ -package zone.moddev.mc.steamadvantage.machines; +package zone.moddev.mc.basesteam.machines; -import zone.moddev.mc.poweradvantage.util.FluidIdHelper; +import zone.moddev.mc.basepower.util.FluidIdHelper; -import zone.moddev.mc.steamadvantage.util.LegacyFluidHandler; +import zone.moddev.mc.basesteam.util.LegacyFluidHandler; import cyano.poweradvantage.api.ConduitType; import cyano.poweradvantage.api.PowerRequest; -import zone.moddev.mc.poweradvantage.conduitnetwork.ConduitRegistry; -import zone.moddev.mc.poweradvantage.init.Fluids; -import zone.moddev.mc.poweradvantage.util.FluidHandlerHelper; -import zone.moddev.mc.steamadvantage.init.Power; -import net.minecraft.block.BlockState; -import net.minecraft.block.IBucketPickupHandler; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.util.SoundEvents; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.CompoundNBT; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.Direction; -import net.minecraft.util.SoundCategory; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; -import net.minecraft.world.IWorld; -import net.minecraft.fluid.Fluid; +import zone.moddev.mc.basepower.conduitnetwork.ConduitRegistry; +import zone.moddev.mc.basepower.init.Fluids; +import zone.moddev.mc.basepower.util.FluidHandlerHelper; +import zone.moddev.mc.basesteam.init.Power; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.block.BucketPickup; +import net.minecraft.world.entity.player.Player; +import net.minecraft.sounds.SoundEvents; +import net.minecraft.world.item.ItemStack; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.core.Direction; +import net.minecraft.sounds.SoundSource; +import net.minecraft.core.BlockPos; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.LevelAccessor; +import net.minecraft.world.level.material.Fluid; import cyano.poweradvantage.api.fluid.FluidStack; import cyano.poweradvantage.api.fluid.FluidTank; import cyano.poweradvantage.api.fluid.FluidTankInfo; @@ -31,7 +31,7 @@ import java.util.HashSet; import java.util.Set; -import static zone.moddev.mc.steamadvantage.util.SoundHelper.playSoundAtTileEntity; +import static zone.moddev.mc.basesteam.util.SoundHelper.playSoundAtTileEntity; @SuppressWarnings("deprecation") public class SteamPumpTileEntity extends cyano.poweradvantage.api.simple.TileEntitySimplePowerMachine implements LegacyFluidHandler{ @@ -49,8 +49,13 @@ public class SteamPumpTileEntity extends cyano.poweradvantage.api.simple.TileEnt private final int[] dataSyncArray = new int[4]; private byte timeUntilNextPump = PUMP_INTERVAL; + /** Detached convenience constructor for tests; native factories always pass position and state. */ public SteamPumpTileEntity() { - super(zone.moddev.mc.steamadvantage.init.Entities.STEAM_PUMP, new ConduitType[]{Power.steam_power,Fluids.fluidConduit_general}, new float[]{300f,1000f}, "tile.steamadvantage.steam_pump.name"); + this(net.minecraft.core.BlockPos.ZERO, new SteamPumpBlock().defaultBlockState()); + } + + public SteamPumpTileEntity(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) { + super(zone.moddev.mc.basesteam.init.Entities.STEAM_PUMP, pos, state, new ConduitType[]{Power.steam_power,Fluids.fluidConduit_general}, new float[]{300f,1000f}, "tile.basesteam.steam_pump.name"); tank = new FluidTank(FluidTank.BUCKET_VOLUME); } @@ -64,18 +69,18 @@ public void tickUpdate(boolean isServerWorld) { if(!redstone){ if(timeUntilNextPump > 0) timeUntilNextPump--; if(timeUntilNextPump == 0 && getTank().getFluidAmount() <= 0){ - World w = getLevel(); + Level w = getLevel(); boolean success = false; BlockPos target = this.getBlockPos().below(); - while(target.getY() > 0 && w.getBlockState(target).getBlock() == zone.moddev.mc.steamadvantage.init.Blocks.pump_pipe_steam){ + while(target.getY() > 0 && w.getBlockState(target).getBlock() == zone.moddev.mc.basesteam.init.Blocks.pump_pipe_steam){ target = target.below(); } if(target.getY() > 0 && w.isEmptyBlock(target) && getEnergy(Power.steam_power) >= ENERGY_COST_PIPE){ // place pipe - w.setBlockAndUpdate(target, zone.moddev.mc.steamadvantage.init.Blocks.pump_pipe_steam.defaultBlockState()); + w.setBlockAndUpdate(target, zone.moddev.mc.basesteam.init.Blocks.pump_pipe_steam.defaultBlockState()); this.subtractEnergy(ENERGY_COST_PIPE, Power.steam_power); timeUntilNextPump = PIPE_INTERVAL; - playSoundAtTileEntity( SoundEvents.STONE_PLACE, SoundCategory.BLOCKS, 0.3f, 1f, this); + playSoundAtTileEntity( SoundEvents.STONE_PLACE, SoundSource.BLOCKS, 0.3f, 1f, this); } else { // pump fluids BlockPos fluidSource = null; @@ -93,7 +98,7 @@ public void tickUpdate(boolean isServerWorld) { if(f != null && getEnergy(Power.steam_power) >= cost && getTank().fill(new FluidStack(f,FluidTank.BUCKET_VOLUME), false) == FluidTank.BUCKET_VOLUME){ Fluid collected = pickupSource(w, fluidSource, blockstate); - if(collected != net.minecraft.fluid.Fluids.EMPTY){ + if(collected != net.minecraft.world.level.material.Fluids.EMPTY){ this.getTank().fill(new FluidStack(collected,FluidTank.BUCKET_VOLUME), true); this.subtractEnergy(cost, Power.steam_power); success = true; @@ -103,15 +108,15 @@ && getTank().fill(new FluidStack(f,FluidTank.BUCKET_VOLUME), false) == FluidTank timeUntilNextPump = PUMP_INTERVAL; } if(success){ - playSoundAtTileEntity( SoundEvents.FIRE_EXTINGUISH, SoundCategory.AMBIENT, 0.5f, 1f, this); - playSoundAtTileEntity( SoundEvents.PISTON_EXTEND, SoundCategory.BLOCKS, 0.3f, 1f, this); + playSoundAtTileEntity( SoundEvents.FIRE_EXTINGUISH, SoundSource.AMBIENT, 0.5f, 1f, this); + playSoundAtTileEntity( SoundEvents.PISTON_EXTEND, SoundSource.BLOCKS, 0.3f, 1f, this); timeToSound = 14; } } } if(timeToSound == 1){ - playSoundAtTileEntity( SoundEvents.PISTON_CONTRACT, SoundCategory.BLOCKS, 0.3f, 1f, this); - playSoundAtTileEntity( SoundEvents.BUCKET_FILL, SoundCategory.BLOCKS, 1f, 1f, this); + playSoundAtTileEntity( SoundEvents.PISTON_CONTRACT, SoundSource.BLOCKS, 0.3f, 1f, this); + playSoundAtTileEntity( SoundEvents.BUCKET_FILL, SoundSource.BLOCKS, 1f, 1f, this); } if(timeToSound > 0) timeToSound--; energyDecay(); @@ -124,13 +129,13 @@ private Fluid getFluid(BlockState blockstate) { return blockstate.getFluidState().isEmpty() ? null : blockstate.getFluidState().getType(); } - static Fluid pickupSource(IWorld world, BlockPos pos, BlockState state) { - if(!state.getFluidState().isSource() || !(state.getBlock() instanceof IBucketPickupHandler)){ - return net.minecraft.fluid.Fluids.EMPTY; + static Fluid pickupSource(LevelAccessor world, BlockPos pos, BlockState state) { + if(!state.getFluidState().isSource() || !(state.getBlock() instanceof BucketPickup)){ + return net.minecraft.world.level.material.Fluids.EMPTY; } // Native pickup preserves waterlogged hosts; unsupported blocks have no destructive fallback. - Fluid collected = ((IBucketPickupHandler)state.getBlock()).takeLiquid(world, pos, state); - return collected == null ? net.minecraft.fluid.Fluids.EMPTY : collected; + ItemStack collected = ((BucketPickup)state.getBlock()).pickupBlock(world, pos, state); + return collected.isEmpty() ? net.minecraft.world.level.material.Fluids.EMPTY : state.getFluidState().getType(); } @@ -167,7 +172,7 @@ private boolean isSourceBlock( BlockPos coord){ private boolean isFluidBlock(BlockPos coord) { - World w = getLevel(); + Level w = getLevel(); if(w.hasChunkAt(coord) == false) return false; return !w.getFluidState(coord).isEmpty(); } @@ -196,7 +201,7 @@ public void powerUpdate(){ FluidStack fluid = getTank().getFluid(); ConduitType type = Fluids.fluidToConduitType(fluid.getFluid()); float availableAmount = getTank().getFluidAmount(); - float delta = ConduitRegistry.transmitPowerToConsumers(availableAmount, zone.moddev.mc.poweradvantage.init.Fluids.fluidConduit_general, type, + float delta = ConduitRegistry.transmitPowerToConsumers(availableAmount, zone.moddev.mc.basepower.init.Fluids.fluidConduit_general, type, PowerRequest.LAST_PRIORITY, getLevel(), getBlockPos(), this); if(delta > 0){ getTank().drain(Math.max((int)delta,1),true); // no free energy! @@ -206,7 +211,7 @@ public void powerUpdate(){ if(getTank().getFluidAmount() <= 0) break; Direction dir = Direction.values()[i]; BlockPos nPos = getBlockPos().relative(dir); - TileEntity neighbor = getLevel().getBlockEntity(nPos); + BlockEntity neighbor = getLevel().getBlockEntity(nPos); IAdvantageFluidHandler handler = FluidHandlerHelper.getHandler(neighbor, dir.getOpposite()); if(handler != null){ int d = handler.fill(dir.getOpposite(), fluid, true); @@ -262,7 +267,7 @@ public int[] getDataFieldArray() { public void prepareDataFieldsForSync() { dataSyncArray[0] = Float.floatToRawIntBits(this.getEnergy(Power.steam_power)); dataSyncArray[1] = this.getTank().getFluidAmount(); - dataSyncArray[2] = (this.getTank().getFluidAmount() > 0 ? FluidIdHelper.getFluidId(this.getTank().getFluid().getFluid()) : FluidIdHelper.getFluidId(net.minecraft.fluid.Fluids.WATER)); + dataSyncArray[2] = (this.getTank().getFluidAmount() > 0 ? FluidIdHelper.getFluidId(this.getTank().getFluid().getFluid()) : FluidIdHelper.getFluidId(net.minecraft.world.level.material.Fluids.WATER)); dataSyncArray[3] = this.timeUntilNextPump; } @@ -279,9 +284,9 @@ public void onDataFieldUpdate() { * @param tagRoot An NBT tag */ @Override - public CompoundNBT save(final CompoundNBT tagRoot) { + public CompoundTag save(final CompoundTag tagRoot) { super.save(tagRoot); - CompoundNBT tankTag = new CompoundNBT(); + CompoundTag tankTag = new CompoundTag(); this.getTank().writeToNBT(tankTag); tagRoot.put("Tank", tankTag); tagRoot.putByte("NextPump", (byte)this.timeUntilNextPump); @@ -292,11 +297,11 @@ public CompoundNBT save(final CompoundNBT tagRoot) { * @param tagRoot An NBT tag */ @Override - public void load(net.minecraft.block.BlockState state, final CompoundNBT tagRoot) { - super.load(state, tagRoot); + public void load(final CompoundTag tagRoot) { + super.load(tagRoot); String tankKey = tagRoot.contains("Tank") ? "Tank" : "TankOut"; if (tagRoot.contains(tankKey)) { - CompoundNBT tankTag = tagRoot.getCompound(tankKey); + CompoundTag tankTag = tagRoot.getCompound(tankKey); getTank().readFromNBT(tankTag); if(tankTag.contains("Empty")){ // empty the tank if NBT says its empty (not default behavior of Tank.read(...) ) @@ -323,7 +328,7 @@ public boolean isPowerSink(ConduitType type){ @Override public boolean isPowerSource(ConduitType type){ - return zone.moddev.mc.poweradvantage.init.Fluids.isFluidType(type); + return zone.moddev.mc.basepower.init.Fluids.isFluidType(type); } /** * Adds "energy" as a fluid to the FluidTank returned by getTank(). This implementation ignores @@ -462,7 +467,7 @@ public boolean canPlaceItem(final int slot, final ItemStack item) { @Override - public boolean stillValid(PlayerEntity player) { + public boolean stillValid(Player player) { return true; } } diff --git a/src/main/java/zone/moddev/mc/steamadvantage/machines/SteamStillBlock.java b/src/main/java/zone/moddev/mc/basesteam/machines/SteamStillBlock.java similarity index 62% rename from src/main/java/zone/moddev/mc/steamadvantage/machines/SteamStillBlock.java rename to src/main/java/zone/moddev/mc/basesteam/machines/SteamStillBlock.java index 54611ef..9828a27 100644 --- a/src/main/java/zone/moddev/mc/steamadvantage/machines/SteamStillBlock.java +++ b/src/main/java/zone/moddev/mc/basesteam/machines/SteamStillBlock.java @@ -1,15 +1,15 @@ -package zone.moddev.mc.steamadvantage.machines; +package zone.moddev.mc.basesteam.machines; import cyano.poweradvantage.api.ConduitType; import cyano.poweradvantage.api.PoweredEntity; -import zone.moddev.mc.poweradvantage.conduitnetwork.ConduitRegistry; -import zone.moddev.mc.poweradvantage.init.Fluids; -import zone.moddev.mc.steamadvantage.init.Power; -import net.minecraft.block.material.Material; -import net.minecraft.block.BlockState; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.Explosion; -import net.minecraft.world.World; +import zone.moddev.mc.basepower.conduitnetwork.ConduitRegistry; +import zone.moddev.mc.basepower.init.Fluids; +import zone.moddev.mc.basesteam.init.Power; +import net.minecraft.world.level.material.Material; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.core.BlockPos; +import net.minecraft.world.level.Explosion; +import net.minecraft.world.level.Level; /** @@ -26,8 +26,8 @@ public SteamStillBlock() { } @Override - public PoweredEntity newBlockEntity(net.minecraft.world.IBlockReader world) { - return new SteamStillTileEntity(); + public PoweredEntity newBlockEntity(net.minecraft.core.BlockPos pos, BlockState state) { + return new SteamStillTileEntity(pos, state); } @Override @@ -36,7 +36,7 @@ public boolean hasAnalogOutputSignal(BlockState bs) { } @Override - public int getAnalogOutputSignal(BlockState bs, World world, BlockPos coord) { + public int getAnalogOutputSignal(BlockState bs, Level world, BlockPos coord) { if(world.getBlockEntity(coord) instanceof SteamStillTileEntity){ return ((SteamStillTileEntity)world.getBlockEntity(coord)).getComparatorOutput(); } diff --git a/src/main/java/zone/moddev/mc/steamadvantage/machines/SteamStillTileEntity.java b/src/main/java/zone/moddev/mc/basesteam/machines/SteamStillTileEntity.java similarity index 86% rename from src/main/java/zone/moddev/mc/steamadvantage/machines/SteamStillTileEntity.java rename to src/main/java/zone/moddev/mc/basesteam/machines/SteamStillTileEntity.java index c06041e..738143b 100644 --- a/src/main/java/zone/moddev/mc/steamadvantage/machines/SteamStillTileEntity.java +++ b/src/main/java/zone/moddev/mc/basesteam/machines/SteamStillTileEntity.java @@ -1,29 +1,29 @@ -package zone.moddev.mc.steamadvantage.machines; +package zone.moddev.mc.basesteam.machines; -import zone.moddev.mc.poweradvantage.util.FluidIdHelper; +import zone.moddev.mc.basepower.util.FluidIdHelper; -import zone.moddev.mc.steamadvantage.util.LegacyFluidHandler; +import zone.moddev.mc.basesteam.util.LegacyFluidHandler; import cyano.poweradvantage.api.ConduitType; import cyano.poweradvantage.api.PowerRequest; import cyano.poweradvantage.api.fluid.FluidRequest; -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.steamadvantage.init.Power; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.util.SoundEvents; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.CompoundNBT; -import net.minecraft.util.Direction; -import net.minecraft.util.SoundCategory; -import net.minecraft.fluid.Fluid; +import zone.moddev.mc.basepower.conduitnetwork.ConduitRegistry; +import zone.moddev.mc.basepower.init.Fluids; +import zone.moddev.mc.basepower.registry.still.recipe.DistillationRecipe; +import zone.moddev.mc.basepower.registry.still.recipe.DistillationRecipeRegistry; +import zone.moddev.mc.basesteam.init.Power; +import net.minecraft.world.entity.player.Player; +import net.minecraft.sounds.SoundEvents; +import net.minecraft.world.item.ItemStack; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.core.Direction; +import net.minecraft.sounds.SoundSource; +import net.minecraft.world.level.material.Fluid; import cyano.poweradvantage.api.fluid.FluidStack; import cyano.poweradvantage.api.fluid.FluidTank; import cyano.poweradvantage.api.fluid.FluidTankInfo; -import static zone.moddev.mc.steamadvantage.util.SoundHelper.playSoundAtTileEntity; +import static zone.moddev.mc.basesteam.util.SoundHelper.playSoundAtTileEntity; @SuppressWarnings("deprecation") public class SteamStillTileEntity extends cyano.poweradvantage.api.simple.TileEntitySimplePowerMachine implements LegacyFluidHandler{ @@ -36,8 +36,13 @@ public class SteamStillTileEntity extends cyano.poweradvantage.api.simple.TileEn private final int[] dataSyncArray = new int[5]; + /** Detached convenience constructor for tests; native factories always pass position and state. */ public SteamStillTileEntity() { - super(zone.moddev.mc.steamadvantage.init.Entities.STEAM_STILL, new ConduitType[]{Power.steam_power, Fluids.fluidConduit_general}, new float[]{100,1000}, "tile.steamadvantage.steam_still.name"); + this(net.minecraft.core.BlockPos.ZERO, new SteamStillBlock().defaultBlockState()); + } + + public SteamStillTileEntity(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) { + super(zone.moddev.mc.basesteam.init.Entities.STEAM_STILL, pos, state, new ConduitType[]{Power.steam_power, Fluids.fluidConduit_general}, new float[]{100,1000}, "tile.basesteam.steam_still.name"); outputTank = new FluidTank(FluidTank.BUCKET_VOLUME ); inputTank = new FluidTank(FluidTank.BUCKET_VOLUME); } @@ -56,7 +61,7 @@ && getEnergy(Power.steam_power) > steamPerDistill && canDistill(getInputTank().getFluid()) && distill()){ this.subtractEnergy(steamPerDistill, Power.steam_power); if(timeSinceSound > 200){ - playSoundAtTileEntity(SoundEvents.LAVA_AMBIENT, SoundCategory.AMBIENT, 0.3f, 1.5f, this); + playSoundAtTileEntity(SoundEvents.LAVA_AMBIENT, SoundSource.AMBIENT, 0.3f, 1.5f, this); timeSinceSound = 0; } timeSinceSound++; @@ -90,7 +95,7 @@ public void powerUpdate(){ if(this.getOutputTank().getFluidAmount() > 0){ ConduitType type = Fluids.fluidToConduitType(getOutputTank().getFluid().getFluid()); float availableAmount = getOutputTank().getFluidAmount(); - float delta = ConduitRegistry.transmitPowerToConsumers(availableAmount, zone.moddev.mc.poweradvantage.init.Fluids.fluidConduit_general, type, + float delta = ConduitRegistry.transmitPowerToConsumers(availableAmount, zone.moddev.mc.basepower.init.Fluids.fluidConduit_general, type, this.getMinimumSinkPriority(), getLevel(), getBlockPos(), this); if(delta > 0){ getOutputTank().drain(Math.max((int)delta,1),true); // no free energy! @@ -153,9 +158,9 @@ public int[] getDataFieldArray() { public void prepareDataFieldsForSync() { dataSyncArray[0] = Float.floatToRawIntBits(this.getEnergy(Power.steam_power)); dataSyncArray[1] = this.getOutputTank().getFluidAmount(); - dataSyncArray[2] = FluidIdHelper.getFluidId(this.getOutputTank().getFluidAmount() > 0 ? this.getOutputTank().getFluid().getFluid() : net.minecraft.fluid.Fluids.WATER); + dataSyncArray[2] = FluidIdHelper.getFluidId(this.getOutputTank().getFluidAmount() > 0 ? this.getOutputTank().getFluid().getFluid() : net.minecraft.world.level.material.Fluids.WATER); dataSyncArray[3] = inputTank.getFluidAmount(); - dataSyncArray[4] = FluidIdHelper.getFluidId(inputTank.getFluidAmount() > 0 ? inputTank.getFluid().getFluid() : net.minecraft.fluid.Fluids.WATER); + dataSyncArray[4] = FluidIdHelper.getFluidId(inputTank.getFluidAmount() > 0 ? inputTank.getFluid().getFluid() : net.minecraft.world.level.material.Fluids.WATER); } @Override @@ -171,12 +176,12 @@ public void onDataFieldUpdate() { * @param tagRoot An NBT tag */ @Override - public CompoundNBT save(final CompoundNBT tagRoot) { + public CompoundTag save(final CompoundTag tagRoot) { super.save(tagRoot); - CompoundNBT tankTag = new CompoundNBT(); + CompoundTag tankTag = new CompoundTag(); this.getOutputTank().writeToNBT(tankTag); tagRoot.put("TankOut", tankTag); - CompoundNBT tankTag2 = new CompoundNBT(); + CompoundTag tankTag2 = new CompoundTag(); this.getInputTank().writeToNBT(tankTag2); tagRoot.put("TankIn", tankTag2); return tagRoot; @@ -186,10 +191,10 @@ public CompoundNBT save(final CompoundNBT tagRoot) { * @param tagRoot An NBT tag */ @Override - public void load(net.minecraft.block.BlockState state, final CompoundNBT tagRoot) { - super.load(state, tagRoot); + public void load(final CompoundTag tagRoot) { + super.load(tagRoot); if (tagRoot.contains("TankOut")) { - CompoundNBT tankTag = tagRoot.getCompound("TankOut"); + CompoundTag tankTag = tagRoot.getCompound("TankOut"); getOutputTank().readFromNBT(tankTag); if(tankTag.contains("Empty")){ // empty the tank if NBT says its empty (not default behavior of Tank.read(...) ) @@ -198,7 +203,7 @@ public void load(net.minecraft.block.BlockState state, final CompoundNBT tagRoot } if (tagRoot.contains("TankIn")) { - CompoundNBT tankTag = tagRoot.getCompound("TankIn"); + CompoundTag tankTag = tagRoot.getCompound("TankIn"); getInputTank().readFromNBT(tankTag); if(tankTag.contains("Empty")){ // empty the tank if NBT says its empty (not default behavior of Tank.read(...) ) @@ -438,7 +443,7 @@ public boolean canPlaceItem(final int slot, final ItemStack item) { } @Override - public boolean stillValid(PlayerEntity player) { + public boolean stillValid(Player player) { return true; } } diff --git a/src/main/java/zone/moddev/mc/steamadvantage/machines/SteamTankBlock.java b/src/main/java/zone/moddev/mc/basesteam/machines/SteamTankBlock.java similarity index 55% rename from src/main/java/zone/moddev/mc/steamadvantage/machines/SteamTankBlock.java rename to src/main/java/zone/moddev/mc/basesteam/machines/SteamTankBlock.java index 966bbbf..415a981 100644 --- a/src/main/java/zone/moddev/mc/steamadvantage/machines/SteamTankBlock.java +++ b/src/main/java/zone/moddev/mc/basesteam/machines/SteamTankBlock.java @@ -1,13 +1,13 @@ -package zone.moddev.mc.steamadvantage.machines; +package zone.moddev.mc.basesteam.machines; import cyano.poweradvantage.api.ConduitType; import cyano.poweradvantage.api.PoweredEntity; -import zone.moddev.mc.steamadvantage.init.Power; -import net.minecraft.block.material.Material; -import net.minecraft.block.BlockState; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; +import zone.moddev.mc.basesteam.init.Power; +import net.minecraft.world.level.material.Material; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.core.BlockPos; +import net.minecraft.world.level.Level; public class SteamTankBlock extends cyano.poweradvantage.api.simple.BlockSimplePowerMachine { @@ -16,8 +16,8 @@ public SteamTankBlock(){ } @Override - public PoweredEntity newBlockEntity(net.minecraft.world.IBlockReader world) { - return new SteamTankTileEntity(); + public PoweredEntity newBlockEntity(net.minecraft.core.BlockPos pos, BlockState state) { + return new SteamTankTileEntity(pos, state); } @Override @@ -26,8 +26,8 @@ public boolean hasAnalogOutputSignal(BlockState bs) { } @Override - public int getAnalogOutputSignal(BlockState bs, World world, BlockPos coord) { - TileEntity te = world.getBlockEntity(coord); + public int getAnalogOutputSignal(BlockState bs, Level world, BlockPos coord) { + BlockEntity te = world.getBlockEntity(coord); if(te instanceof SteamTankTileEntity){ return (int)(15 * ((SteamTankTileEntity)te).getSteamLevel()); } else{ diff --git a/src/main/java/zone/moddev/mc/steamadvantage/machines/SteamTankTileEntity.java b/src/main/java/zone/moddev/mc/basesteam/machines/SteamTankTileEntity.java similarity index 77% rename from src/main/java/zone/moddev/mc/steamadvantage/machines/SteamTankTileEntity.java rename to src/main/java/zone/moddev/mc/basesteam/machines/SteamTankTileEntity.java index 1cac8fb..8130990 100644 --- a/src/main/java/zone/moddev/mc/steamadvantage/machines/SteamTankTileEntity.java +++ b/src/main/java/zone/moddev/mc/basesteam/machines/SteamTankTileEntity.java @@ -1,12 +1,12 @@ -package zone.moddev.mc.steamadvantage.machines; +package zone.moddev.mc.basesteam.machines; import cyano.poweradvantage.api.ConduitType; import cyano.poweradvantage.api.PowerRequest; import cyano.poweradvantage.api.fluid.FluidTank; -import zone.moddev.mc.steamadvantage.init.Power; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.item.ItemStack; -import net.minecraft.fluid.Fluid; +import zone.moddev.mc.basesteam.init.Power; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.material.Fluid; @SuppressWarnings("deprecation") public class SteamTankTileEntity extends cyano.poweradvantage.api.simple.TileEntitySimplePowerMachine { @@ -14,8 +14,13 @@ public class SteamTankTileEntity extends cyano.poweradvantage.api.simple.TileEn private final ItemStack[] inventory = new ItemStack[0]; private final int[] dataSyncArray = new int[1]; + /** Detached convenience constructor for tests; native factories always pass position and state. */ public SteamTankTileEntity() { - super(zone.moddev.mc.steamadvantage.init.Entities.STEAM_TANK, Power.steam_power, FluidTank.BUCKET_VOLUME * 10, "tile.steamadvantage.steam_tank.name"); + this(net.minecraft.core.BlockPos.ZERO, new SteamTankBlock().defaultBlockState()); + } + + public SteamTankTileEntity(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) { + super(zone.moddev.mc.basesteam.init.Entities.STEAM_TANK, pos, state, Power.steam_power, FluidTank.BUCKET_VOLUME * 10, "tile.basesteam.steam_tank.name"); } private boolean redstone = true; @@ -116,7 +121,7 @@ public float getSteamLevel(){ } @Override - public boolean stillValid(PlayerEntity player) { + public boolean stillValid(Player player) { return true; } } diff --git a/src/main/java/zone/moddev/mc/basesteam/migration/SteamConfigMigration.java b/src/main/java/zone/moddev/mc/basesteam/migration/SteamConfigMigration.java new file mode 100644 index 0000000..9e6ef4a --- /dev/null +++ b/src/main/java/zone/moddev/mc/basesteam/migration/SteamConfigMigration.java @@ -0,0 +1,24 @@ +package zone.moddev.mc.basesteam.migration; + +import java.io.IOException; +import java.nio.file.FileAlreadyExistsException; +import java.nio.file.Files; +import java.nio.file.Path; + +import zone.moddev.mc.basesteam.SteamAdvantage; + +public final class SteamConfigMigration { + private SteamConfigMigration() {} + + public static boolean copyLegacyCommonConfig(Path configDirectory) throws IOException { + Path target = configDirectory.resolve(SteamAdvantage.MODID + "-common.toml"); + Path source = configDirectory.resolve(SteamLegacyMigrations.LEGACY_MODID + "-common.toml"); + if (Files.exists(target) || !Files.isRegularFile(source)) return false; + try { + Files.copy(source, target); + return true; + } catch (FileAlreadyExistsException alreadyMigrated) { + return false; + } + } +} diff --git a/src/main/java/zone/moddev/mc/steamadvantage/migration/SteamLegacyMigrations.java b/src/main/java/zone/moddev/mc/basesteam/migration/SteamLegacyMigrations.java similarity index 71% rename from src/main/java/zone/moddev/mc/steamadvantage/migration/SteamLegacyMigrations.java rename to src/main/java/zone/moddev/mc/basesteam/migration/SteamLegacyMigrations.java index fd9e157..c11864a 100644 --- a/src/main/java/zone/moddev/mc/steamadvantage/migration/SteamLegacyMigrations.java +++ b/src/main/java/zone/moddev/mc/basesteam/migration/SteamLegacyMigrations.java @@ -1,19 +1,20 @@ -package zone.moddev.mc.steamadvantage.migration; +package zone.moddev.mc.basesteam.migration; import cyano.poweradvantage.api.migration.LegacyMigrationApi; import cyano.poweradvantage.api.simple.BlockSimplePowerMachine; -import net.minecraft.block.Block; -import net.minecraft.block.BlockState; -import net.minecraft.nbt.CompoundNBT; -import net.minecraft.util.Direction; -import net.minecraft.util.ResourceLocation; -import zone.moddev.mc.poweradvantage.blocks.BlockPowerSwitch; -import zone.moddev.mc.steamadvantage.SteamAdvantage; -import zone.moddev.mc.steamadvantage.blocks.PlatformBlock; -import zone.moddev.mc.steamadvantage.machines.SteamDrillBlock; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.core.Direction; +import net.minecraft.resources.ResourceLocation; +import zone.moddev.mc.basepower.blocks.BlockPowerSwitch; +import zone.moddev.mc.basesteam.SteamAdvantage; +import zone.moddev.mc.basesteam.blocks.PlatformBlock; +import zone.moddev.mc.basesteam.machines.SteamDrillBlock; -/** Registers SteamAdvantage's 1.10 and 1.12 identities with PowerAdvantage's shared migration hook. */ +/** Registers old Steam identities and state codecs with basePower's shared migration hook. */ public final class SteamLegacyMigrations { + public static final String LEGACY_MODID = "steamadvantage"; private static boolean registered; private SteamLegacyMigrations() {} @@ -21,7 +22,7 @@ private SteamLegacyMigrations() {} public static synchronized void register() { if (registered) return; - LegacyMigrationApi.registerNamespace(SteamAdvantage.MODID); + LegacyMigrationApi.registerNamespaceAlias(LEGACY_MODID, SteamAdvantage.MODID); for (String path : new String[] { "steam_pipe", "steam_track", "steam_boiler_coal", "steam_boiler_electric", "steam_boiler_geothermal", "steam_tank", "steam_furnace", "steam_crusher", @@ -44,16 +45,13 @@ public static synchronized void register() { registerTile("steam_boiler_oil"); LegacyMigrationApi.registerDurableItem(id("musket")); - LegacyMigrationApi.registerNbtMigration("steamadvantage:persistence_keys", + LegacyMigrationApi.registerNbtMigration("basesteam:persistence_keys", SteamLegacyMigrations::repairPersistenceKeys); registered = true; } private static void registerTile(String path) { - String current = id(path).toString(); - LegacyMigrationApi.registerTileEntityAlias(current, current); - LegacyMigrationApi.registerTileEntityAlias(SteamAdvantage.MODID + "." + path, current); - LegacyMigrationApi.registerTileEntityAlias("minecraft:" + SteamAdvantage.MODID + "." + path, current); + LegacyMigrationApi.registerTileEntityAliases(id(path)); } private static BlockState decodeState(Block block, int metadata) { @@ -81,7 +79,7 @@ static int legacyPlatformHeight(int metadata) { return Math.min(metadata & 15, 4); } - static boolean repairPersistenceKeys(CompoundNBT compound) { + static boolean repairPersistenceKeys(CompoundTag compound) { String id = compound.getString("id"); boolean changed = false; if (isTile(id, "steam_pump") && !compound.contains("Tank", 10) && compound.contains("TankOut", 10)) { @@ -97,8 +95,13 @@ static boolean repairPersistenceKeys(CompoundNBT compound) { } private static boolean isTile(String value, String path) { - return id(path).toString().equalsIgnoreCase(value) - || (SteamAdvantage.MODID + "." + path).equalsIgnoreCase(value); + return matchesTileId(value, SteamAdvantage.MODID, path) || matchesTileId(value, LEGACY_MODID, path); + } + + private static boolean matchesTileId(String value, String namespace, String path) { + String dotted = namespace + "." + path; + return (namespace + ":" + path).equalsIgnoreCase(value) + || dotted.equalsIgnoreCase(value) || ("minecraft:" + dotted).equalsIgnoreCase(value); } private static ResourceLocation id(String path) { diff --git a/src/main/java/zone/moddev/mc/steamadvantage/recipe/RecipeConditions.java b/src/main/java/zone/moddev/mc/basesteam/recipe/RecipeConditions.java similarity index 83% rename from src/main/java/zone/moddev/mc/steamadvantage/recipe/RecipeConditions.java rename to src/main/java/zone/moddev/mc/basesteam/recipe/RecipeConditions.java index 7994d45..22d3568 100644 --- a/src/main/java/zone/moddev/mc/steamadvantage/recipe/RecipeConditions.java +++ b/src/main/java/zone/moddev/mc/basesteam/recipe/RecipeConditions.java @@ -1,15 +1,15 @@ -package zone.moddev.mc.steamadvantage.recipe; +package zone.moddev.mc.basesteam.recipe; import com.google.gson.JsonObject; import java.util.Locale; -import net.minecraft.util.JSONUtils; -import net.minecraft.util.ResourceLocation; +import net.minecraft.util.GsonHelper; +import net.minecraft.resources.ResourceLocation; import net.minecraftforge.common.crafting.CraftingHelper; import net.minecraftforge.common.crafting.conditions.ICondition; import net.minecraftforge.common.crafting.conditions.IConditionSerializer; -import zone.moddev.mc.poweradvantage.PowerAdvantage; -import zone.moddev.mc.poweradvantage.RecipeMode; -import zone.moddev.mc.steamadvantage.SteamAdvantage; +import zone.moddev.mc.basepower.PowerAdvantage; +import zone.moddev.mc.basepower.RecipeMode; +import zone.moddev.mc.basesteam.SteamAdvantage; /** Registers the data-pack conditions used by SteamAdvantage recipes. */ public final class RecipeConditions { @@ -22,7 +22,7 @@ public static synchronized void register() { CraftingHelper.register(new IConditionSerializer() { @Override public ResourceLocation getID() { return ModeCondition.ID; } @Override public ModeCondition read(JsonObject json) { - return new ModeCondition(RecipeMode.valueOf(JSONUtils.getAsString(json, "mode").toUpperCase(Locale.ROOT))); + return new ModeCondition(RecipeMode.valueOf(GsonHelper.getAsString(json, "mode").toUpperCase(Locale.ROOT))); } @Override public void write(JsonObject json, ModeCondition condition) { json.addProperty("mode", condition.mode.name()); diff --git a/src/main/java/zone/moddev/mc/steamadvantage/util/FurnaceFuelHelper.java b/src/main/java/zone/moddev/mc/basesteam/util/FurnaceFuelHelper.java similarity index 78% rename from src/main/java/zone/moddev/mc/steamadvantage/util/FurnaceFuelHelper.java rename to src/main/java/zone/moddev/mc/basesteam/util/FurnaceFuelHelper.java index 4e91d3a..bdbb53a 100644 --- a/src/main/java/zone/moddev/mc/steamadvantage/util/FurnaceFuelHelper.java +++ b/src/main/java/zone/moddev/mc/basesteam/util/FurnaceFuelHelper.java @@ -1,6 +1,6 @@ -package zone.moddev.mc.steamadvantage.util; +package zone.moddev.mc.basesteam.util; -import net.minecraft.item.ItemStack; +import net.minecraft.world.item.ItemStack; import net.minecraftforge.common.ForgeHooks; /** Forge-aware access to the vanilla furnace fuel calculation. */ diff --git a/src/main/java/zone/moddev/mc/steamadvantage/util/LegacyFluidHandler.java b/src/main/java/zone/moddev/mc/basesteam/util/LegacyFluidHandler.java similarity index 83% rename from src/main/java/zone/moddev/mc/steamadvantage/util/LegacyFluidHandler.java rename to src/main/java/zone/moddev/mc/basesteam/util/LegacyFluidHandler.java index 9d88309..a08870e 100644 --- a/src/main/java/zone/moddev/mc/steamadvantage/util/LegacyFluidHandler.java +++ b/src/main/java/zone/moddev/mc/basesteam/util/LegacyFluidHandler.java @@ -1,4 +1,4 @@ -package zone.moddev.mc.steamadvantage.util; +package zone.moddev.mc.basesteam.util; import cyano.poweradvantage.api.fluid.IAdvantageFluidHandler; diff --git a/src/main/java/zone/moddev/mc/basesteam/util/SoundHelper.java b/src/main/java/zone/moddev/mc/basesteam/util/SoundHelper.java new file mode 100644 index 0000000..7359457 --- /dev/null +++ b/src/main/java/zone/moddev/mc/basesteam/util/SoundHelper.java @@ -0,0 +1,52 @@ +package zone.moddev.mc.basesteam.util; + +import net.minecraft.world.entity.player.Player; +import net.minecraft.server.level.ServerPlayer; +import net.minecraft.network.protocol.game.ClientboundCustomSoundPacket; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.entity.EntitySelector; +import net.minecraft.sounds.SoundSource; +import net.minecraft.sounds.SoundEvent; +import net.minecraft.world.phys.AABB; +import net.minecraft.core.BlockPos; +import net.minecraft.world.phys.Vec3; +import net.minecraft.world.level.Level; + +public class SoundHelper { + + public static void playSoundAtTileEntity(SoundEvent sound, SoundSource soundType, float volume, float pitch, BlockEntity te){ + final BlockPos pos = te.getBlockPos(); + final Vec3 center = new Vec3(pos.getX()+0.5,pos.getY()+0.5,pos.getZ()+0.5); + playSoundAtPosition(center.x, center.y, center.z, sound, soundType, volume, pitch, te.getLevel()); + } + + public static void playSoundAtPosition(double x, double y, double z, SoundEvent sound, SoundSource soundType, float volume, float pitch, Level serverWorld){ + if(serverWorld.isClientSide) return; + final double range = 16; + final AABB area = new AABB( + x - range, y - range, z - range, + x + range, y + range, z + range); + for(Player candidate : serverWorld.players()){ + if(!(candidate instanceof ServerPlayer) || !EntitySelector.NO_SPECTATORS.test(candidate) + || !area.intersects(candidate.getBoundingBox())) continue; + ServerPlayer player = (ServerPlayer) candidate; + if(player.connection != null) player.connection.send(new ClientboundCustomSoundPacket(sound.getRegistryName(), soundType, + new Vec3(x, y, z), volume, pitch)); + } + } + + public static void playBigSoundAtPosition(double x, double y, double z, SoundEvent sound, SoundSource soundType, float volume, float pitch, Level serverWorld){ + if(serverWorld.isClientSide) return; + final double range = 50; + final AABB area = new AABB( + x - range, y - range, z - range, + x + range, y + range, z + range); + for(Player candidate : serverWorld.players()){ + if(!(candidate instanceof ServerPlayer) || !EntitySelector.NO_SPECTATORS.test(candidate) + || !area.intersects(candidate.getBoundingBox())) continue; + ServerPlayer player = (ServerPlayer) candidate; + if(player.connection != null) player.connection.send(new ClientboundCustomSoundPacket(sound.getRegistryName(), soundType, + new Vec3(x, y, z), volume, pitch)); + } + } +} diff --git a/src/main/java/zone/moddev/mc/steamadvantage/blocks/DrillBitBlock.java b/src/main/java/zone/moddev/mc/steamadvantage/blocks/DrillBitBlock.java deleted file mode 100644 index c489aed..0000000 --- a/src/main/java/zone/moddev/mc/steamadvantage/blocks/DrillBitBlock.java +++ /dev/null @@ -1,65 +0,0 @@ -package zone.moddev.mc.steamadvantage.blocks; - -import net.minecraft.block.Block; -import net.minecraft.block.ITileEntityProvider; -import net.minecraft.block.material.Material; -import net.minecraft.block.BlockState; -import net.minecraft.entity.Entity; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.Direction; -import java.util.Collections; -import java.util.List; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.shapes.VoxelShape; -import net.minecraft.util.math.shapes.VoxelShapes; -import net.minecraft.util.math.shapes.ISelectionContext; -import net.minecraft.loot.LootContext; -import net.minecraft.world.Explosion; -import net.minecraft.world.IBlockReader; -import net.minecraft.world.World; -import net.minecraft.item.ItemStack; -import zone.moddev.mc.steamadvantage.init.Power; - -/** Hidden moving drill helper. It deliberately has no item form or drops. */ -public class DrillBitBlock extends Block implements ITileEntityProvider { - private static final VoxelShape SHAPE = VoxelShapes.box(0.25D, 0.25D, 0.25D, 0.75D, 0.75D, 0.75D); - - public DrillBitBlock() { - super(Block.Properties.of(Material.METAL).strength(5.0F, 2000.0F).noOcclusion()); - } - - @Override public TileEntity newBlockEntity(IBlockReader world) { return new DrillBitTileEntity(); } - @Override public VoxelShape getShape(BlockState state, IBlockReader world, BlockPos pos, ISelectionContext context) { return SHAPE; } - @Override public VoxelShape getCollisionShape(BlockState state, IBlockReader world, BlockPos pos, ISelectionContext context) { return SHAPE; } - @Override public List getDrops(BlockState state, LootContext.Builder context) { return Collections.emptyList(); } - - @Override - public void entityInside(BlockState state, World world, BlockPos pos, Entity victim) { - victim.hurt(Power.machine_damage, 2.0F); - } - - @Override - public void onRemove(BlockState state, World world, BlockPos pos, BlockState newState, boolean moving) { - if (state.getBlock() != newState.getBlock()) { - TileEntity tile = world.getBlockEntity(pos); - if (!world.isClientSide && tile instanceof DrillBitTileEntity) { - ((DrillBitTileEntity) tile).destroyLine(false); - } - } - super.onRemove(state, world, pos, newState, moving); - } - - @Override - public void wasExploded(World world, BlockPos pos, Explosion explosion) { - destroyNeighbors(world, pos); - super.wasExploded(world, pos, explosion); - } - - private void destroyNeighbors(World world, BlockPos pos) { - if (world.isClientSide) return; - for (Direction side : Direction.values()) { - TileEntity tile = world.getBlockEntity(pos.relative(side)); - if (tile instanceof DrillBitTileEntity) ((DrillBitTileEntity) tile).destroyLine(); - } - } -} diff --git a/src/main/java/zone/moddev/mc/steamadvantage/blocks/PlatformBlock.java b/src/main/java/zone/moddev/mc/steamadvantage/blocks/PlatformBlock.java deleted file mode 100644 index 383603d..0000000 --- a/src/main/java/zone/moddev/mc/steamadvantage/blocks/PlatformBlock.java +++ /dev/null @@ -1,53 +0,0 @@ -package zone.moddev.mc.steamadvantage.blocks; - -import net.minecraft.block.Block; -import net.minecraft.block.material.Material; -import net.minecraft.block.BlockState; -import net.minecraft.item.ItemStack; -import net.minecraft.state.IntegerProperty; -import net.minecraft.state.StateContainer; -import java.util.Collections; -import java.util.List; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.shapes.VoxelShape; -import net.minecraft.util.math.shapes.VoxelShapes; -import net.minecraft.util.math.shapes.ISelectionContext; -import net.minecraft.loot.LootContext; -import net.minecraft.world.IBlockReader; -import net.minecraft.world.World; -import zone.moddev.mc.steamadvantage.init.Blocks; - -/** Hidden elevator platform segments. HEIGHT preserves the legacy metadata values 0-4. */ -public class PlatformBlock extends Block { - public static final IntegerProperty HEIGHT = IntegerProperty.create("height", 0, 4); - private static final VoxelShape[] SHAPES = new VoxelShape[] { - VoxelShapes.box(0.25D, 0.0D, 0.25D, 0.75D, 1.0D, 0.75D), - VoxelShapes.box(0.0D, 0.0D, 0.0D, 1.0D, 0.25D, 1.0D), - VoxelShapes.box(0.0D, 0.0D, 0.0D, 1.0D, 0.50D, 1.0D), - VoxelShapes.box(0.0D, 0.0D, 0.0D, 1.0D, 0.75D, 1.0D), - VoxelShapes.block() - }; - - public PlatformBlock() { - super(Block.Properties.of(Material.METAL).strength(5.0F, 2000.0F).noOcclusion() - .isRedstoneConductor((state, world, pos) -> false) - .isSuffocating((state, world, pos) -> false) - .isViewBlocking((state, world, pos) -> false)); - registerDefaultState(getStateDefinition().any().setValue(HEIGHT, 1)); - } - - @Override protected void createBlockStateDefinition(StateContainer.Builder builder) { builder.add(HEIGHT); } - @Override public VoxelShape getShape(BlockState state, IBlockReader world, BlockPos pos, ISelectionContext context) { return SHAPES[state.getValue(HEIGHT)]; } - @Override public VoxelShape getCollisionShape(BlockState state, IBlockReader world, BlockPos pos, ISelectionContext context) { return SHAPES[state.getValue(HEIGHT)]; } - @Override public List getDrops(BlockState state, LootContext.Builder context) { return Collections.emptyList(); } - - @Override - public void neighborChanged(BlockState state, World world, BlockPos pos, Block block, BlockPos fromPos, boolean moving) { - if (!canBlockStay(world, pos)) world.destroyBlock(pos, true); - } - - public boolean canBlockStay(World world, BlockPos pos) { - Block below = world.getBlockState(pos.below()).getBlock(); - return below == this || below == Blocks.steam_elevator_platform || below == Blocks.steam_elevator; - } -} diff --git a/src/main/java/zone/moddev/mc/steamadvantage/blocks/PumpPipeBlock.java b/src/main/java/zone/moddev/mc/steamadvantage/blocks/PumpPipeBlock.java deleted file mode 100644 index 52a6654..0000000 --- a/src/main/java/zone/moddev/mc/steamadvantage/blocks/PumpPipeBlock.java +++ /dev/null @@ -1,50 +0,0 @@ -package zone.moddev.mc.steamadvantage.blocks; - -import net.minecraft.block.Block; -import net.minecraft.block.material.Material; -import net.minecraft.block.BlockState; -import net.minecraft.item.ItemStack; -import java.util.Collections; -import java.util.List; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.shapes.VoxelShape; -import net.minecraft.util.math.shapes.VoxelShapes; -import net.minecraft.util.math.shapes.ISelectionContext; -import net.minecraft.loot.LootContext; -import net.minecraft.world.Explosion; -import net.minecraft.world.IBlockReader; -import net.minecraft.world.World; - -/** Hidden pipe shaft placed beneath a steam pump. */ -public class PumpPipeBlock extends Block { - private static final VoxelShape SHAPE = VoxelShapes.box(0.0D, 0.25D, 0.0D, 0.75D, 1.0D, 1.0D); - - public PumpPipeBlock() { - super(Block.Properties.of(Material.METAL).strength(5.0F, 10.0F).noOcclusion()); - } - - @Override public VoxelShape getShape(BlockState state, IBlockReader world, BlockPos pos, ISelectionContext context) { return SHAPE; } - @Override public VoxelShape getCollisionShape(BlockState state, IBlockReader world, BlockPos pos, ISelectionContext context) { return SHAPE; } - @Override public List getDrops(BlockState state, LootContext.Builder context) { return Collections.emptyList(); } - - @Override - public void onRemove(BlockState state, World world, BlockPos pos, BlockState newState, boolean moving) { - if (state.getBlock() != newState.getBlock()) destroyShaft(world, pos); - super.onRemove(state, world, pos, newState, moving); - } - - @Override - public void wasExploded(World world, BlockPos pos, Explosion explosion) { - destroyShaft(world, pos); - super.wasExploded(world, pos, explosion); - } - - private void destroyShaft(World world, BlockPos pos) { - if (world.isClientSide) return; - BlockPos cursor = pos.below(); - while (cursor.getY() > 0 && world.getBlockState(cursor).getBlock() == this) { - world.destroyBlock(cursor, false); - cursor = cursor.below(); - } - } -} diff --git a/src/main/java/zone/moddev/mc/steamadvantage/blocks/SteamTrackBlock.java b/src/main/java/zone/moddev/mc/steamadvantage/blocks/SteamTrackBlock.java deleted file mode 100644 index 7037ecf..0000000 --- a/src/main/java/zone/moddev/mc/steamadvantage/blocks/SteamTrackBlock.java +++ /dev/null @@ -1,23 +0,0 @@ -package zone.moddev.mc.steamadvantage.blocks; - -import cyano.poweradvantage.api.simple.BlockSimplePowerConduit; -import net.minecraft.block.material.Material; -import net.minecraft.block.BlockState; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.shapes.VoxelShape; -import net.minecraft.util.math.shapes.VoxelShapes; -import net.minecraft.util.math.shapes.ISelectionContext; -import net.minecraft.world.IBlockReader; -import zone.moddev.mc.steamadvantage.init.Power; - -public class SteamTrackBlock extends BlockSimplePowerConduit { - public SteamTrackBlock() { - super(Properties.of(Material.PISTON).strength(0.75F).noOcclusion() - .isRedstoneConductor((state, world, pos) -> false) - .isSuffocating((state, world, pos) -> false) - .isViewBlocking((state, world, pos) -> false), - 2.0F / 16.0F, Power.steam_power); - } - @Override public VoxelShape getShape(BlockState state, IBlockReader world, BlockPos pos, ISelectionContext context) { return VoxelShapes.block(); } - @Override public VoxelShape getCollisionShape(BlockState state, IBlockReader world, BlockPos pos, ISelectionContext context) { return VoxelShapes.block(); } -} diff --git a/src/main/java/zone/moddev/mc/steamadvantage/compat/BaseMetalsCompat.java b/src/main/java/zone/moddev/mc/steamadvantage/compat/BaseMetalsCompat.java deleted file mode 100644 index 591ff4e..0000000 --- a/src/main/java/zone/moddev/mc/steamadvantage/compat/BaseMetalsCompat.java +++ /dev/null @@ -1,60 +0,0 @@ -package zone.moddev.mc.steamadvantage.compat; - -import net.minecraft.block.Block; -import net.minecraft.block.BlockState; -import net.minecraft.inventory.Inventory; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.item.crafting.IRecipe; -import net.minecraft.world.World; -import net.minecraftforge.fml.ModList; -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, not mutable runtime registrations. */ - 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 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()) { - Inventory inventory = new Inventory(1); - inventory.setItem(0, input.copy()); - for (IRecipe candidate : world.getRecipeManager().getRecipes()) { - if (candidate instanceof CrushingRecipe && candidate.matches(inventory, world)) { - return candidate.getResultItem().copy(); - } - } - } - return getVanillaCrusherOutput(input); - } - - public static ItemStack getCrusherRecipeOutput(World world, BlockState input) { - return input == null ? null : getCrusherRecipeOutput(world, new ItemStack(input.getBlock())); - } - - private static ItemStack getVanillaCrusherOutput(ItemStack input) { - Item item = input.getItem(); - if (item == net.minecraft.block.Blocks.STONE.asItem()) return new ItemStack(net.minecraft.block.Blocks.COBBLESTONE); - if (item == net.minecraft.block.Blocks.COBBLESTONE.asItem()) return new ItemStack(net.minecraft.block.Blocks.GRAVEL); - if (item == net.minecraft.block.Blocks.GRAVEL.asItem()) return new ItemStack(net.minecraft.block.Blocks.SAND); - if (item == net.minecraft.block.Blocks.SANDSTONE.asItem()) return new ItemStack(net.minecraft.block.Blocks.SAND, 4); - if (item == net.minecraft.block.Blocks.RED_SANDSTONE.asItem()) return new ItemStack(net.minecraft.block.Blocks.RED_SAND, 4); - if (item == net.minecraft.block.Blocks.GLASS.asItem()) return new ItemStack(net.minecraft.block.Blocks.SAND); - if (item == net.minecraft.block.Blocks.GLOWSTONE.asItem()) return new ItemStack(net.minecraft.item.Items.GLOWSTONE_DUST, 4); - if (item == net.minecraft.block.Blocks.SUGAR_CANE.asItem()) return new ItemStack(net.minecraft.item.Items.SUGAR, 2); - if (item == net.minecraft.item.Items.BONE) return new ItemStack(net.minecraft.item.Items.BONE_MEAL, 3); - if (item == net.minecraft.item.Items.BLAZE_ROD) return new ItemStack(net.minecraft.item.Items.BLAZE_POWDER, 2); - return null; - } -} diff --git a/src/main/java/zone/moddev/mc/steamadvantage/graphics/ClientRegistration.java b/src/main/java/zone/moddev/mc/steamadvantage/graphics/ClientRegistration.java deleted file mode 100644 index 0fd41de..0000000 --- a/src/main/java/zone/moddev/mc/steamadvantage/graphics/ClientRegistration.java +++ /dev/null @@ -1,29 +0,0 @@ -package zone.moddev.mc.steamadvantage.graphics; - -import net.minecraftforge.fml.client.registry.ClientRegistry; -import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent; -import net.minecraft.client.renderer.RenderType; -import net.minecraft.client.renderer.RenderTypeLookup; -import net.minecraft.item.ItemModelsProperties; -import net.minecraft.util.ResourceLocation; -import zone.moddev.mc.steamadvantage.init.Items; -import zone.moddev.mc.steamadvantage.items.MusketItem; -import zone.moddev.mc.steamadvantage.init.Blocks; -import zone.moddev.mc.steamadvantage.init.Entities; - -/** Client-only renderer registration. */ -public final class ClientRegistration { - private ClientRegistration() {} - - public static void onClientSetup(FMLClientSetupEvent event) { - event.enqueueWork(() -> { - ClientRegistry.bindTileEntityRenderer(Entities.DRILLBIT, DrillBitRenderer::new); - RenderTypeLookup.setRenderLayer(Blocks.steam_track, RenderType.cutout()); - ItemModelsProperties.register(Items.blackpowder_musket, new ResourceLocation("loaded"), - (item, world, entity) -> MusketItem.isLoaded(item) ? 1.0F : 0.0F); - ItemModelsProperties.register(Items.blackpowder_musket, new ResourceLocation("loading"), - (item, world, entity) -> entity != null && entity.isUsingItem() - && entity.getUseItem() == item ? 1.0F : 0.0F); - }); - } -} diff --git a/src/main/java/zone/moddev/mc/steamadvantage/init/Entities.java b/src/main/java/zone/moddev/mc/steamadvantage/init/Entities.java deleted file mode 100644 index 0f26c0f..0000000 --- a/src/main/java/zone/moddev/mc/steamadvantage/init/Entities.java +++ /dev/null @@ -1,67 +0,0 @@ -package zone.moddev.mc.steamadvantage.init; - -import java.util.function.Supplier; - -import net.minecraft.tileentity.TileEntity; -import net.minecraft.tileentity.TileEntityType; -import net.minecraft.block.Block; -import net.minecraftforge.event.RegistryEvent; -import net.minecraftforge.eventbus.api.SubscribeEvent; -import net.minecraftforge.fml.common.Mod; -import zone.moddev.mc.steamadvantage.SteamAdvantage; -import zone.moddev.mc.steamadvantage.blocks.DrillBitTileEntity; -import zone.moddev.mc.steamadvantage.machines.BlastFurnaceTileEntity; -import zone.moddev.mc.steamadvantage.machines.CoalBoilerTileEntity; -import zone.moddev.mc.steamadvantage.machines.ElectricBoilerTileEntity; -import zone.moddev.mc.steamadvantage.machines.GeothermalBoilerTileEntity; -import zone.moddev.mc.steamadvantage.machines.OilBoilerTileEntity; -import zone.moddev.mc.steamadvantage.machines.RockCrusherTileEntity; -import zone.moddev.mc.steamadvantage.machines.SteamDrillTileEntity; -import zone.moddev.mc.steamadvantage.machines.SteamElevatorTileEntity; -import zone.moddev.mc.steamadvantage.machines.SteamPumpTileEntity; -import zone.moddev.mc.steamadvantage.machines.SteamStillTileEntity; -import zone.moddev.mc.steamadvantage.machines.SteamTankTileEntity; - -/** Stable tile entity registrations; registry names are unchanged from 1.12. */ -@Mod.EventBusSubscriber(modid = SteamAdvantage.MODID, bus = Mod.EventBusSubscriber.Bus.MOD) -public final class Entities { - public static TileEntityType STEAM_BOILER_COAL; - public static TileEntityType STEAM_BOILER_ELECTRIC; - public static TileEntityType STEAM_BOILER_GEOTHERMAL; - public static TileEntityType STEAM_TANK; - public static TileEntityType STEAM_FURNACE; - public static TileEntityType STEAM_CRUSHER; - public static TileEntityType STEAM_DRILL; - public static TileEntityType STEAM_ELEVATOR; - public static TileEntityType DRILLBIT; - public static TileEntityType STEAM_STILL; - public static TileEntityType STEAM_PUMP; - public static TileEntityType STEAM_BOILER_OIL; - - private Entities() {} - public static void init() {} - - @SubscribeEvent - public static void register(RegistryEvent.Register> event) { - STEAM_BOILER_COAL = register(event, "steam_boiler_coal", CoalBoilerTileEntity::new, Blocks.steam_boiler_coal); - STEAM_BOILER_ELECTRIC = register(event, "steam_boiler_electric", ElectricBoilerTileEntity::new, Blocks.steam_boiler_electric); - STEAM_BOILER_GEOTHERMAL = register(event, "steam_boiler_geothermal", GeothermalBoilerTileEntity::new, Blocks.steam_boiler_geothermal); - STEAM_TANK = register(event, "steam_tank", SteamTankTileEntity::new, Blocks.steam_tank); - STEAM_FURNACE = register(event, "steam_furnace", BlastFurnaceTileEntity::new, Blocks.steam_furnace); - STEAM_CRUSHER = register(event, "steam_crusher", RockCrusherTileEntity::new, Blocks.steam_crusher); - STEAM_DRILL = register(event, "steam_drill", SteamDrillTileEntity::new, Blocks.steam_drill); - STEAM_ELEVATOR = register(event, "steam_elevator", SteamElevatorTileEntity::new, Blocks.steam_elevator); - DRILLBIT = register(event, "drillbit", DrillBitTileEntity::new, Blocks.drillbit); - STEAM_STILL = register(event, "steam_still", SteamStillTileEntity::new, Blocks.steam_still); - STEAM_PUMP = register(event, "steam_pump", SteamPumpTileEntity::new, Blocks.steam_pump); - STEAM_BOILER_OIL = register(event, "steam_boiler_oil", OilBoilerTileEntity::new, Blocks.steam_boiler_oil); - } - - private static TileEntityType register( - RegistryEvent.Register> event, String id, Supplier factory, Block block) { - TileEntityType type = TileEntityType.Builder.of(factory, block).build(null); - type.setRegistryName(SteamAdvantage.MODID, id); - event.getRegistry().register(type); - return type; - } -} diff --git a/src/main/java/zone/moddev/mc/steamadvantage/util/SoundHelper.java b/src/main/java/zone/moddev/mc/steamadvantage/util/SoundHelper.java deleted file mode 100644 index 8cccc05..0000000 --- a/src/main/java/zone/moddev/mc/steamadvantage/util/SoundHelper.java +++ /dev/null @@ -1,52 +0,0 @@ -package zone.moddev.mc.steamadvantage.util; - -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.entity.player.ServerPlayerEntity; -import net.minecraft.network.play.server.SPlaySoundPacket; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.EntityPredicates; -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.math.vector.Vector3d; -import net.minecraft.world.World; - -public class SoundHelper { - - public static void playSoundAtTileEntity(SoundEvent sound, SoundCategory soundType, float volume, float pitch, TileEntity te){ - final BlockPos pos = te.getBlockPos(); - final Vector3d center = new Vector3d(pos.getX()+0.5,pos.getY()+0.5,pos.getZ()+0.5); - playSoundAtPosition(center.x, center.y, center.z, sound, soundType, volume, pitch, te.getLevel()); - } - - public static void playSoundAtPosition(double x, double y, double z, SoundEvent sound, SoundCategory soundType, float volume, float pitch, World serverWorld){ - if(serverWorld.isClientSide) return; - final double range = 16; - final AxisAlignedBB area = new AxisAlignedBB( - x - range, y - range, z - range, - x + range, y + range, z + range); - for(PlayerEntity candidate : serverWorld.players()){ - if(!(candidate instanceof ServerPlayerEntity) || !EntityPredicates.NO_SPECTATORS.test(candidate) - || !area.intersects(candidate.getBoundingBox())) continue; - ServerPlayerEntity player = (ServerPlayerEntity) candidate; - if(player.connection != null) player.connection.send(new SPlaySoundPacket(sound.getRegistryName(), soundType, - new Vector3d(x, y, z), volume, pitch)); - } - } - - public static void playBigSoundAtPosition(double x, double y, double z, SoundEvent sound, SoundCategory soundType, float volume, float pitch, World serverWorld){ - if(serverWorld.isClientSide) return; - final double range = 50; - final AxisAlignedBB area = new AxisAlignedBB( - x - range, y - range, z - range, - x + range, y + range, z + range); - for(PlayerEntity candidate : serverWorld.players()){ - if(!(candidate instanceof ServerPlayerEntity) || !EntityPredicates.NO_SPECTATORS.test(candidate) - || !area.intersects(candidate.getBoundingBox())) continue; - ServerPlayerEntity player = (ServerPlayerEntity) candidate; - if(player.connection != null) player.connection.send(new SPlaySoundPacket(sound.getRegistryName(), soundType, - new Vector3d(x, y, z), volume, pitch)); - } - } -} diff --git a/src/main/resources/META-INF/mods.toml b/src/main/resources/META-INF/mods.toml index 676ecd8..28891ea 100644 --- a/src/main/resources/META-INF/mods.toml +++ b/src/main/resources/META-INF/mods.toml @@ -1,38 +1,38 @@ modLoader="javafml" loaderVersion="${loader_version_range}" license="GPL-3.0-only" -issueTrackerURL="https://github.com/MinecraftModDevelopmentMods/SteamAdvantage/issues" +issueTrackerURL="https://github.com/MinecraftModDevelopmentMods/baseSteam/issues" [[mods]] -modId="steamadvantage" +modId="basesteam" version="${version}" -displayName="Steam Advantage" -displayURL="https://www.curseforge.com/minecraft/mc-mods/steam-advantage" +displayName="baseSteam" +displayURL="https://www.curseforge.com/minecraft/mc-mods/basesteam" authors="DrCyano, the MMD Team" -description='''Steam-powered machines and infrastructure for the Power Advantage platform.''' +description='''Steam-powered machines and infrastructure for basePower.''' -[[dependencies.steamadvantage]] -modId="poweradvantage" +[[dependencies.basesteam]] +modId="basepower" mandatory=true -versionRange="[2.4.7.116051,3.0.0)" +versionRange="[2.4.9.117011,3.0.0)" ordering="AFTER" side="BOTH" -[[dependencies.steamadvantage]] +[[dependencies.basesteam]] modId="basemetals" mandatory=false -versionRange="[3.1.1.116051,4.0.0)" +versionRange="[3.1.1.117011,4.0.0)" ordering="AFTER" side="BOTH" -[[dependencies.steamadvantage]] +[[dependencies.basesteam]] modId="forge" mandatory=true versionRange="${forge_version_range}" ordering="NONE" side="BOTH" -[[dependencies.steamadvantage]] +[[dependencies.basesteam]] modId="minecraft" mandatory=true versionRange="${minecraft_version_range}" diff --git a/src/main/resources/assets/basesteam/blockstates/drillbit.json b/src/main/resources/assets/basesteam/blockstates/drillbit.json new file mode 100644 index 0000000..fb4f3bb --- /dev/null +++ b/src/main/resources/assets/basesteam/blockstates/drillbit.json @@ -0,0 +1,5 @@ +{ + "variants": { + "": { "model": "basesteam:block/drillbit" } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/basesteam/blockstates/platform.json b/src/main/resources/assets/basesteam/blockstates/platform.json new file mode 100644 index 0000000..dfb6c5a --- /dev/null +++ b/src/main/resources/assets/basesteam/blockstates/platform.json @@ -0,0 +1,9 @@ +{ + "variants": { + "height=0": { "model": "basesteam:block/platform_shaft" }, + "height=1": { "model": "basesteam:block/platform1" }, + "height=2": { "model": "basesteam:block/platform2" }, + "height=3": { "model": "basesteam:block/platform3" }, + "height=4": { "model": "basesteam:block/platform4" } + } +} diff --git a/src/main/resources/assets/basesteam/blockstates/pump_pipe_steam.json b/src/main/resources/assets/basesteam/blockstates/pump_pipe_steam.json new file mode 100644 index 0000000..1f6c9c3 --- /dev/null +++ b/src/main/resources/assets/basesteam/blockstates/pump_pipe_steam.json @@ -0,0 +1,5 @@ +{ + "variants": { + "": {"model": "basepower:block/fluid_pipe_ns", "x": 90, "y": 0, "uvlock": false } + } +} diff --git a/src/main/resources/assets/basesteam/blockstates/steam_boiler_coal.json b/src/main/resources/assets/basesteam/blockstates/steam_boiler_coal.json new file mode 100644 index 0000000..90590a2 --- /dev/null +++ b/src/main/resources/assets/basesteam/blockstates/steam_boiler_coal.json @@ -0,0 +1,8 @@ +{ + "variants": { + "facing=east": { "model": "basesteam:block/steam_boiler_coal", "y": 90 }, + "facing=north": { "model": "basesteam:block/steam_boiler_coal" }, + "facing=south": { "model": "basesteam:block/steam_boiler_coal", "y": 180 }, + "facing=west": { "model": "basesteam:block/steam_boiler_coal", "y": 270 } + } +} diff --git a/src/main/resources/assets/basesteam/blockstates/steam_boiler_electric.json b/src/main/resources/assets/basesteam/blockstates/steam_boiler_electric.json new file mode 100644 index 0000000..48562bd --- /dev/null +++ b/src/main/resources/assets/basesteam/blockstates/steam_boiler_electric.json @@ -0,0 +1,8 @@ +{ + "variants": { + "facing=east": { "model": "basesteam:block/steam_boiler_electric", "y": 90 }, + "facing=north": { "model": "basesteam:block/steam_boiler_electric" }, + "facing=south": { "model": "basesteam:block/steam_boiler_electric", "y": 180 }, + "facing=west": { "model": "basesteam:block/steam_boiler_electric", "y": 270 } + } +} diff --git a/src/main/resources/assets/basesteam/blockstates/steam_boiler_geothermal.json b/src/main/resources/assets/basesteam/blockstates/steam_boiler_geothermal.json new file mode 100644 index 0000000..b74a449 --- /dev/null +++ b/src/main/resources/assets/basesteam/blockstates/steam_boiler_geothermal.json @@ -0,0 +1,8 @@ +{ + "variants": { + "facing=east": { "model": "basesteam:block/steam_boiler_geothermal", "y": 90 }, + "facing=north": { "model": "basesteam:block/steam_boiler_geothermal" }, + "facing=south": { "model": "basesteam:block/steam_boiler_geothermal", "y": 180 }, + "facing=west": { "model": "basesteam:block/steam_boiler_geothermal", "y": 270 } + } +} diff --git a/src/main/resources/assets/basesteam/blockstates/steam_boiler_oil.json b/src/main/resources/assets/basesteam/blockstates/steam_boiler_oil.json new file mode 100644 index 0000000..8e1862f --- /dev/null +++ b/src/main/resources/assets/basesteam/blockstates/steam_boiler_oil.json @@ -0,0 +1,8 @@ +{ + "variants": { + "facing=east": { "model": "basesteam:block/steam_boiler_oil", "x":270, "y": 90 }, + "facing=north": { "model": "basesteam:block/steam_boiler_oil", "x":270 }, + "facing=south": { "model": "basesteam:block/steam_boiler_oil", "x":270, "y": 180 }, + "facing=west": { "model": "basesteam:block/steam_boiler_oil", "x":270, "y": 270 } + } +} diff --git a/src/main/resources/assets/basesteam/blockstates/steam_crusher.json b/src/main/resources/assets/basesteam/blockstates/steam_crusher.json new file mode 100644 index 0000000..8a19f59 --- /dev/null +++ b/src/main/resources/assets/basesteam/blockstates/steam_crusher.json @@ -0,0 +1,8 @@ +{ + "variants": { + "facing=east": { "model": "basesteam:block/steam_crusher", "y": 90 }, + "facing=north": { "model": "basesteam:block/steam_crusher" }, + "facing=south": { "model": "basesteam:block/steam_crusher", "y": 180 }, + "facing=west": { "model": "basesteam:block/steam_crusher", "y": 270 } + } +} diff --git a/src/main/resources/assets/basesteam/blockstates/steam_drill.json b/src/main/resources/assets/basesteam/blockstates/steam_drill.json new file mode 100644 index 0000000..d2d5c70 --- /dev/null +++ b/src/main/resources/assets/basesteam/blockstates/steam_drill.json @@ -0,0 +1,10 @@ +{ + "variants": { + "facing=down": { "model": "basesteam:block/steam_drill", "x": 90 }, + "facing=up": { "model": "basesteam:block/steam_drill", "x": 270 }, + "facing=east": { "model": "basesteam:block/steam_drill", "y": 90 }, + "facing=north": { "model": "basesteam:block/steam_drill" }, + "facing=south": { "model": "basesteam:block/steam_drill", "y": 180 }, + "facing=west": { "model": "basesteam:block/steam_drill", "y": 270 } + } +} diff --git a/src/main/resources/assets/basesteam/blockstates/steam_elevator.json b/src/main/resources/assets/basesteam/blockstates/steam_elevator.json new file mode 100644 index 0000000..19f6c1e --- /dev/null +++ b/src/main/resources/assets/basesteam/blockstates/steam_elevator.json @@ -0,0 +1,8 @@ +{ + "variants": { + "facing=east": { "model": "basesteam:block/steam_elevator", "y": 90}, + "facing=north": { "model": "basesteam:block/steam_elevator" }, + "facing=south": { "model": "basesteam:block/steam_elevator", "y": 180}, + "facing=west": { "model": "basesteam:block/steam_elevator", "y": 270} + } +} diff --git a/src/main/resources/assets/basesteam/blockstates/steam_furnace.json b/src/main/resources/assets/basesteam/blockstates/steam_furnace.json new file mode 100644 index 0000000..43b0cd1 --- /dev/null +++ b/src/main/resources/assets/basesteam/blockstates/steam_furnace.json @@ -0,0 +1,8 @@ +{ + "variants": { + "facing=east": { "model": "basesteam:block/steam_furnace", "y": 90 }, + "facing=north": { "model": "basesteam:block/steam_furnace" }, + "facing=south": { "model": "basesteam:block/steam_furnace", "y": 180 }, + "facing=west": { "model": "basesteam:block/steam_furnace", "y": 270 } + } +} diff --git a/src/main/resources/assets/basesteam/blockstates/steam_pipe.json b/src/main/resources/assets/basesteam/blockstates/steam_pipe.json new file mode 100644 index 0000000..20a8cc1 --- /dev/null +++ b/src/main/resources/assets/basesteam/blockstates/steam_pipe.json @@ -0,0 +1,70 @@ +{ + "__comment": "blockstate parameters MUST be in alphabetical order!", + "variants": { + "down=false,east=false,north=false,south=false,up=false,west=false": { "model": "basesteam:block/steam_pipe_ensw", "x": 0, "y": 0, "uvlock": false }, + "down=true,east=false,north=false,south=false,up=false,west=false": { "model": "basesteam:block/steam_pipe_n", "x": 90, "y": 0, "uvlock": false }, + "down=false,east=true,north=false,south=false,up=false,west=false": { "model": "basesteam:block/steam_pipe_n", "x": 0, "y": 90, "uvlock": false }, + "down=false,east=false,north=true,south=false,up=false,west=false": { "model": "basesteam:block/steam_pipe_n", "x": 0, "y": 0, "uvlock": false }, + "down=false,east=false,north=false,south=true,up=false,west=false": { "model": "basesteam:block/steam_pipe_n", "x": 0, "y": 180, "uvlock": false }, + "down=false,east=false,north=false,south=false,up=true,west=false": { "model": "basesteam:block/steam_pipe_n", "x": 270, "y": 0, "uvlock": false }, + "down=false,east=false,north=false,south=false,up=false,west=true": { "model": "basesteam:block/steam_pipe_n", "x": 0, "y": 270, "uvlock": false }, + "down=true,east=true,north=false,south=false,up=false,west=false": { "model": "basesteam:block/steam_pipe_nw", "x": 90, "y": 180, "uvlock": false }, + "down=true,east=false,north=true,south=false,up=false,west=false": { "model": "basesteam:block/steam_pipe_nw", "x": 90, "y": 90, "uvlock": false }, + "down=true,east=false,north=false,south=true,up=false,west=false": { "model": "basesteam:block/steam_pipe_nw", "x": 90, "y": 270, "uvlock": false }, + "down=true,east=false,north=false,south=false,up=true,west=false": { "model": "basesteam:block/steam_pipe_ns", "x": 90, "y": 0, "uvlock": false }, + "down=true,east=false,north=false,south=false,up=false,west=true": { "model": "basesteam:block/steam_pipe_nw", "x": 90, "y": 0, "uvlock": false }, + "down=false,east=true,north=true,south=false,up=false,west=false": { "model": "basesteam:block/steam_pipe_nw", "x": 0, "y": 90, "uvlock": false }, + "down=false,east=true,north=false,south=true,up=false,west=false": { "model": "basesteam:block/steam_pipe_nw", "x": 0, "y": 180, "uvlock": false }, + "down=false,east=true,north=false,south=false,up=true,west=false": { "model": "basesteam:block/steam_pipe_nw", "x": 270, "y": 180, "uvlock": false }, + "down=false,east=true,north=false,south=false,up=false,west=true": { "model": "basesteam:block/steam_pipe_ns", "x": 0, "y": 90, "uvlock": false }, + "down=false,east=false,north=true,south=true,up=false,west=false": { "model": "basesteam:block/steam_pipe_ns", "x": 0, "y": 0, "uvlock": false }, + "down=false,east=false,north=true,south=false,up=true,west=false": { "model": "basesteam:block/steam_pipe_nw", "x": 270, "y": 90, "uvlock": false }, + "down=false,east=false,north=true,south=false,up=false,west=true": { "model": "basesteam:block/steam_pipe_nw", "x": 0, "y": 0, "uvlock": false }, + "down=false,east=false,north=false,south=true,up=true,west=false": { "model": "basesteam:block/steam_pipe_nw", "x": 270, "y": 270, "uvlock": false }, + "down=false,east=false,north=false,south=true,up=false,west=true": { "model": "basesteam:block/steam_pipe_nw", "x": 0, "y": 270, "uvlock": false }, + "down=false,east=false,north=false,south=false,up=true,west=true": { "model": "basesteam:block/steam_pipe_nw", "x": 270, "y": 0, "uvlock": false }, + "down=true,east=true,north=true,south=false,up=false,west=false": { "model": "basesteam:block/steam_pipe_nuw", "x": 90, "y": 90, "uvlock": false }, + "down=true,east=true,north=false,south=true,up=false,west=false": { "model": "basesteam:block/steam_pipe_nuw", "x": 90, "y": 180, "uvlock": false }, + "down=true,east=true,north=false,south=false,up=true,west=false": { "model": "basesteam:block/steam_pipe_dnu", "x": 0, "y": 90, "uvlock": false }, + "down=true,east=true,north=false,south=false,up=false,west=true": { "model": "basesteam:block/steam_pipe_dnu", "x": 90, "y": 90, "uvlock": false }, + "down=true,east=false,north=true,south=true,up=false,west=false": { "model": "basesteam:block/steam_pipe_dnu", "x": 90, "y": 0, "uvlock": false }, + "down=true,east=false,north=true,south=false,up=true,west=false": { "model": "basesteam:block/steam_pipe_dnu", "x": 0, "y": 0, "uvlock": false }, + "down=true,east=false,north=true,south=false,up=false,west=true": { "model": "basesteam:block/steam_pipe_nuw", "x": 90, "y": 0, "uvlock": false }, + "down=true,east=false,north=false,south=true,up=true,west=false": { "model": "basesteam:block/steam_pipe_dnu", "x": 0, "y": 180, "uvlock": false }, + "down=true,east=false,north=false,south=true,up=false,west=true": { "model": "basesteam:block/steam_pipe_nuw", "x": 90, "y": 270, "uvlock": false }, + "down=true,east=false,north=false,south=false,up=true,west=true": { "model": "basesteam:block/steam_pipe_dnu", "x": 0, "y": 270, "uvlock": false }, + "down=false,east=true,north=true,south=true,up=false,west=false": { "model": "basesteam:block/steam_pipe_nsw", "x": 0, "y": 180, "uvlock": false }, + "down=false,east=true,north=true,south=false,up=true,west=false": { "model": "basesteam:block/steam_pipe_nuw", "x": 0, "y": 90, "uvlock": false }, + "down=false,east=true,north=true,south=false,up=false,west=true": { "model": "basesteam:block/steam_pipe_nsw", "x": 0, "y": 90, "uvlock": false }, + "down=false,east=true,north=false,south=true,up=true,west=false": { "model": "basesteam:block/steam_pipe_nuw", "x": 0, "y": 180, "uvlock": false }, + "down=false,east=true,north=false,south=true,up=false,west=true": { "model": "basesteam:block/steam_pipe_nsw", "x": 0, "y": 270, "uvlock": false }, + "down=false,east=true,north=false,south=false,up=true,west=true": { "model": "basesteam:block/steam_pipe_dnu", "x": 270, "y": 90, "uvlock": false }, + "down=false,east=false,north=true,south=true,up=true,west=false": { "model": "basesteam:block/steam_pipe_dnu", "x": 270, "y": 0, "uvlock": false }, + "down=false,east=false,north=true,south=true,up=false,west=true": { "model": "basesteam:block/steam_pipe_nsw", "x": 0, "y": 0, "uvlock": false }, + "down=false,east=false,north=true,south=false,up=true,west=true": { "model": "basesteam:block/steam_pipe_nuw", "x": 0, "y": 0, "uvlock": false }, + "down=false,east=false,north=false,south=true,up=true,west=true": { "model": "basesteam:block/steam_pipe_nuw", "x": 0, "y": 270, "uvlock": false }, + "down=true,east=true,north=true,south=true,up=false,west=false": { "model": "basesteam:block/steam_pipe_nsuw", "x": 180, "y": 180, "uvlock": false }, + "down=true,east=true,north=true,south=false,up=true,west=false": { "model": "basesteam:block/steam_pipe_nsuw", "x": 90, "y": 90, "uvlock": false }, + "down=true,east=true,north=true,south=false,up=false,west=true": { "model": "basesteam:block/steam_pipe_nsuw", "x": 180, "y": 90, "uvlock": false }, + "down=true,east=true,north=false,south=true,up=true,west=false": { "model": "basesteam:block/steam_pipe_nsuw", "x": 90, "y": 180, "uvlock": false }, + "down=true,east=true,north=false,south=true,up=false,west=true": { "model": "basesteam:block/steam_pipe_nsuw", "x": 180, "y": 270, "uvlock": false }, + "down=true,east=true,north=false,south=false,up=true,west=true": { "model": "basesteam:block/steam_pipe_ensw", "x": 90, "y": 0, "uvlock": false }, + "down=true,east=false,north=true,south=true,up=true,west=false": { "model": "basesteam:block/steam_pipe_ensw", "x": 90, "y": 90, "uvlock": false }, + "down=true,east=false,north=true,south=true,up=false,west=true": { "model": "basesteam:block/steam_pipe_nsuw", "x": 180, "y": 0, "uvlock": false }, + "down=true,east=false,north=true,south=false,up=true,west=true": { "model": "basesteam:block/steam_pipe_nsuw", "x": 90, "y": 0, "uvlock": false }, + "down=true,east=false,north=false,south=true,up=true,west=true": { "model": "basesteam:block/steam_pipe_nsuw", "x": 90, "y": 270, "uvlock": false }, + "down=false,east=true,north=true,south=true,up=true,west=false": { "model": "basesteam:block/steam_pipe_nsuw", "x": 0, "y": 180, "uvlock": false }, + "down=false,east=true,north=true,south=true,up=false,west=true": { "model": "basesteam:block/steam_pipe_ensw", "x": 0, "y": 0, "uvlock": false }, + "down=false,east=true,north=true,south=false,up=true,west=true": { "model": "basesteam:block/steam_pipe_nsuw", "x": 0, "y": 90, "uvlock": false }, + "down=false,east=true,north=false,south=true,up=true,west=true": { "model": "basesteam:block/steam_pipe_nsuw", "x": 0, "y": 270, "uvlock": false }, + "down=false,east=false,north=true,south=true,up=true,west=true": { "model": "basesteam:block/steam_pipe_nsuw", "x": 0, "y": 0, "uvlock": false }, + "down=true,east=true,north=true,south=true,up=true,west=false": { "model": "basesteam:block/steam_pipe_desuw", "x": 0, "y": 270, "uvlock": false }, + "down=true,east=true,north=true,south=true,up=false,west=true": { "model": "basesteam:block/steam_pipe_desuw", "x": 270, "y": 0, "uvlock": false }, + "down=true,east=true,north=true,south=false,up=true,west=true": { "model": "basesteam:block/steam_pipe_desuw", "x": 0, "y": 180, "uvlock": false }, + "down=true,east=true,north=false,south=true,up=true,west=true": { "model": "basesteam:block/steam_pipe_desuw", "x": 0, "y": 0, "uvlock": false }, + "down=true,east=false,north=true,south=true,up=true,west=true": { "model": "basesteam:block/steam_pipe_desuw", "x": 0, "y": 90, "uvlock": false }, + "down=false,east=true,north=true,south=true,up=true,west=true": { "model": "basesteam:block/steam_pipe_desuw", "x": 90, "y": 0, "uvlock": false }, + "down=true,east=true,north=true,south=true,up=true,west=true": { "model": "basesteam:block/steam_pipe_densuw", "x": 0, "y": 0, "uvlock": false } + + } +} \ No newline at end of file diff --git a/src/main/resources/assets/basesteam/blockstates/steam_pump.json b/src/main/resources/assets/basesteam/blockstates/steam_pump.json new file mode 100644 index 0000000..5b0a200 --- /dev/null +++ b/src/main/resources/assets/basesteam/blockstates/steam_pump.json @@ -0,0 +1,8 @@ +{ + "variants": { + "facing=east": { "model": "basesteam:block/steam_pump", "y": 90 }, + "facing=north": { "model": "basesteam:block/steam_pump" }, + "facing=south": { "model": "basesteam:block/steam_pump", "y": 180 }, + "facing=west": { "model": "basesteam:block/steam_pump", "y": 270 } + } +} diff --git a/src/main/resources/assets/basesteam/blockstates/steam_still.json b/src/main/resources/assets/basesteam/blockstates/steam_still.json new file mode 100644 index 0000000..34f6798 --- /dev/null +++ b/src/main/resources/assets/basesteam/blockstates/steam_still.json @@ -0,0 +1,8 @@ +{ + "variants": { + "facing=east": { "model": "basesteam:block/steam_still", "y": 90 }, + "facing=north": { "model": "basesteam:block/steam_still" }, + "facing=south": { "model": "basesteam:block/steam_still", "y": 180 }, + "facing=west": { "model": "basesteam:block/steam_still", "y": 270 } + } +} diff --git a/src/main/resources/assets/basesteam/blockstates/steam_switch.json b/src/main/resources/assets/basesteam/blockstates/steam_switch.json new file mode 100644 index 0000000..c83cb49 --- /dev/null +++ b/src/main/resources/assets/basesteam/blockstates/steam_switch.json @@ -0,0 +1,6 @@ +{ + "variants": { + "active=false": { "model": "basesteam:block/steam_switch_off"}, + "active=true": { "model": "basesteam:block/steam_switch_on"} + } +} diff --git a/src/main/resources/assets/basesteam/blockstates/steam_tank.json b/src/main/resources/assets/basesteam/blockstates/steam_tank.json new file mode 100644 index 0000000..348f050 --- /dev/null +++ b/src/main/resources/assets/basesteam/blockstates/steam_tank.json @@ -0,0 +1,8 @@ +{ + "variants": { + "facing=east": { "model": "basesteam:block/steam_tank", "y": 90, "uvlock": true }, + "facing=north": { "model": "basesteam:block/steam_tank", "uvlock": true }, + "facing=south": { "model": "basesteam:block/steam_tank", "y": 180, "uvlock": true }, + "facing=west": { "model": "basesteam:block/steam_tank", "y": 270, "uvlock": true } + } +} diff --git a/src/main/resources/assets/basesteam/blockstates/steam_track.json b/src/main/resources/assets/basesteam/blockstates/steam_track.json new file mode 100644 index 0000000..ffb9e0c --- /dev/null +++ b/src/main/resources/assets/basesteam/blockstates/steam_track.json @@ -0,0 +1,70 @@ +{ + "__comment": "blockstate parameters MUST be in alphabetical order!", + "variants": { + "down=false,east=false,north=false,south=false,up=false,west=false": { "model": "basesteam:block/steam_track_ensw", "x": 0, "y": 0, "uvlock": false }, + "down=true,east=false,north=false,south=false,up=false,west=false": { "model": "basesteam:block/steam_track_n", "x": 90, "y": 0, "uvlock": false }, + "down=false,east=true,north=false,south=false,up=false,west=false": { "model": "basesteam:block/steam_track_n", "x": 0, "y": 90, "uvlock": false }, + "down=false,east=false,north=true,south=false,up=false,west=false": { "model": "basesteam:block/steam_track_n", "x": 0, "y": 0, "uvlock": false }, + "down=false,east=false,north=false,south=true,up=false,west=false": { "model": "basesteam:block/steam_track_n", "x": 0, "y": 180, "uvlock": false }, + "down=false,east=false,north=false,south=false,up=true,west=false": { "model": "basesteam:block/steam_track_n", "x": 270, "y": 0, "uvlock": false }, + "down=false,east=false,north=false,south=false,up=false,west=true": { "model": "basesteam:block/steam_track_n", "x": 0, "y": 270, "uvlock": false }, + "down=true,east=true,north=false,south=false,up=false,west=false": { "model": "basesteam:block/steam_track_nw", "x": 90, "y": 180, "uvlock": false }, + "down=true,east=false,north=true,south=false,up=false,west=false": { "model": "basesteam:block/steam_track_nw", "x": 90, "y": 90, "uvlock": false }, + "down=true,east=false,north=false,south=true,up=false,west=false": { "model": "basesteam:block/steam_track_nw", "x": 90, "y": 270, "uvlock": false }, + "down=true,east=false,north=false,south=false,up=true,west=false": { "model": "basesteam:block/steam_track_ns", "x": 90, "y": 0, "uvlock": false }, + "down=true,east=false,north=false,south=false,up=false,west=true": { "model": "basesteam:block/steam_track_nw", "x": 90, "y": 0, "uvlock": false }, + "down=false,east=true,north=true,south=false,up=false,west=false": { "model": "basesteam:block/steam_track_nw", "x": 0, "y": 90, "uvlock": false }, + "down=false,east=true,north=false,south=true,up=false,west=false": { "model": "basesteam:block/steam_track_nw", "x": 0, "y": 180, "uvlock": false }, + "down=false,east=true,north=false,south=false,up=true,west=false": { "model": "basesteam:block/steam_track_nw", "x": 270, "y": 180, "uvlock": false }, + "down=false,east=true,north=false,south=false,up=false,west=true": { "model": "basesteam:block/steam_track_ns", "x": 0, "y": 90, "uvlock": false }, + "down=false,east=false,north=true,south=true,up=false,west=false": { "model": "basesteam:block/steam_track_ns", "x": 0, "y": 0, "uvlock": false }, + "down=false,east=false,north=true,south=false,up=true,west=false": { "model": "basesteam:block/steam_track_nw", "x": 270, "y": 90, "uvlock": false }, + "down=false,east=false,north=true,south=false,up=false,west=true": { "model": "basesteam:block/steam_track_nw", "x": 0, "y": 0, "uvlock": false }, + "down=false,east=false,north=false,south=true,up=true,west=false": { "model": "basesteam:block/steam_track_nw", "x": 270, "y": 270, "uvlock": false }, + "down=false,east=false,north=false,south=true,up=false,west=true": { "model": "basesteam:block/steam_track_nw", "x": 0, "y": 270, "uvlock": false }, + "down=false,east=false,north=false,south=false,up=true,west=true": { "model": "basesteam:block/steam_track_nw", "x": 270, "y": 0, "uvlock": false }, + "down=true,east=true,north=true,south=false,up=false,west=false": { "model": "basesteam:block/steam_track_nuw", "x": 90, "y": 90, "uvlock": false }, + "down=true,east=true,north=false,south=true,up=false,west=false": { "model": "basesteam:block/steam_track_nuw", "x": 90, "y": 180, "uvlock": false }, + "down=true,east=true,north=false,south=false,up=true,west=false": { "model": "basesteam:block/steam_track_dnu", "x": 0, "y": 90, "uvlock": false }, + "down=true,east=true,north=false,south=false,up=false,west=true": { "model": "basesteam:block/steam_track_dnu", "x": 90, "y": 90, "uvlock": false }, + "down=true,east=false,north=true,south=true,up=false,west=false": { "model": "basesteam:block/steam_track_dnu", "x": 90, "y": 0, "uvlock": false }, + "down=true,east=false,north=true,south=false,up=true,west=false": { "model": "basesteam:block/steam_track_dnu", "x": 0, "y": 0, "uvlock": false }, + "down=true,east=false,north=true,south=false,up=false,west=true": { "model": "basesteam:block/steam_track_nuw", "x": 90, "y": 0, "uvlock": false }, + "down=true,east=false,north=false,south=true,up=true,west=false": { "model": "basesteam:block/steam_track_dnu", "x": 0, "y": 180, "uvlock": false }, + "down=true,east=false,north=false,south=true,up=false,west=true": { "model": "basesteam:block/steam_track_nuw", "x": 90, "y": 270, "uvlock": false }, + "down=true,east=false,north=false,south=false,up=true,west=true": { "model": "basesteam:block/steam_track_dnu", "x": 0, "y": 270, "uvlock": false }, + "down=false,east=true,north=true,south=true,up=false,west=false": { "model": "basesteam:block/steam_track_nsw", "x": 0, "y": 180, "uvlock": false }, + "down=false,east=true,north=true,south=false,up=true,west=false": { "model": "basesteam:block/steam_track_nuw", "x": 0, "y": 90, "uvlock": false }, + "down=false,east=true,north=true,south=false,up=false,west=true": { "model": "basesteam:block/steam_track_nsw", "x": 0, "y": 90, "uvlock": false }, + "down=false,east=true,north=false,south=true,up=true,west=false": { "model": "basesteam:block/steam_track_nuw", "x": 0, "y": 180, "uvlock": false }, + "down=false,east=true,north=false,south=true,up=false,west=true": { "model": "basesteam:block/steam_track_nsw", "x": 0, "y": 270, "uvlock": false }, + "down=false,east=true,north=false,south=false,up=true,west=true": { "model": "basesteam:block/steam_track_dnu", "x": 270, "y": 90, "uvlock": false }, + "down=false,east=false,north=true,south=true,up=true,west=false": { "model": "basesteam:block/steam_track_dnu", "x": 270, "y": 0, "uvlock": false }, + "down=false,east=false,north=true,south=true,up=false,west=true": { "model": "basesteam:block/steam_track_nsw", "x": 0, "y": 0, "uvlock": false }, + "down=false,east=false,north=true,south=false,up=true,west=true": { "model": "basesteam:block/steam_track_nuw", "x": 0, "y": 0, "uvlock": false }, + "down=false,east=false,north=false,south=true,up=true,west=true": { "model": "basesteam:block/steam_track_nuw", "x": 0, "y": 270, "uvlock": false }, + "down=true,east=true,north=true,south=true,up=false,west=false": { "model": "basesteam:block/steam_track_nsuw", "x": 180, "y": 180, "uvlock": false }, + "down=true,east=true,north=true,south=false,up=true,west=false": { "model": "basesteam:block/steam_track_nsuw", "x": 90, "y": 90, "uvlock": false }, + "down=true,east=true,north=true,south=false,up=false,west=true": { "model": "basesteam:block/steam_track_nsuw", "x": 180, "y": 90, "uvlock": false }, + "down=true,east=true,north=false,south=true,up=true,west=false": { "model": "basesteam:block/steam_track_nsuw", "x": 90, "y": 180, "uvlock": false }, + "down=true,east=true,north=false,south=true,up=false,west=true": { "model": "basesteam:block/steam_track_nsuw", "x": 180, "y": 270, "uvlock": false }, + "down=true,east=true,north=false,south=false,up=true,west=true": { "model": "basesteam:block/steam_track_ensw", "x": 90, "y": 0, "uvlock": false }, + "down=true,east=false,north=true,south=true,up=true,west=false": { "model": "basesteam:block/steam_track_ensw", "x": 90, "y": 90, "uvlock": false }, + "down=true,east=false,north=true,south=true,up=false,west=true": { "model": "basesteam:block/steam_track_nsuw", "x": 180, "y": 0, "uvlock": false }, + "down=true,east=false,north=true,south=false,up=true,west=true": { "model": "basesteam:block/steam_track_nsuw", "x": 90, "y": 0, "uvlock": false }, + "down=true,east=false,north=false,south=true,up=true,west=true": { "model": "basesteam:block/steam_track_nsuw", "x": 90, "y": 270, "uvlock": false }, + "down=false,east=true,north=true,south=true,up=true,west=false": { "model": "basesteam:block/steam_track_nsuw", "x": 0, "y": 180, "uvlock": false }, + "down=false,east=true,north=true,south=true,up=false,west=true": { "model": "basesteam:block/steam_track_ensw", "x": 0, "y": 0, "uvlock": false }, + "down=false,east=true,north=true,south=false,up=true,west=true": { "model": "basesteam:block/steam_track_nsuw", "x": 0, "y": 90, "uvlock": false }, + "down=false,east=true,north=false,south=true,up=true,west=true": { "model": "basesteam:block/steam_track_nsuw", "x": 0, "y": 270, "uvlock": false }, + "down=false,east=false,north=true,south=true,up=true,west=true": { "model": "basesteam:block/steam_track_nsuw", "x": 0, "y": 0, "uvlock": false }, + "down=true,east=true,north=true,south=true,up=true,west=false": { "model": "basesteam:block/steam_track_desuw", "x": 0, "y": 270, "uvlock": false }, + "down=true,east=true,north=true,south=true,up=false,west=true": { "model": "basesteam:block/steam_track_desuw", "x": 270, "y": 0, "uvlock": false }, + "down=true,east=true,north=true,south=false,up=true,west=true": { "model": "basesteam:block/steam_track_desuw", "x": 0, "y": 180, "uvlock": false }, + "down=true,east=true,north=false,south=true,up=true,west=true": { "model": "basesteam:block/steam_track_desuw", "x": 0, "y": 0, "uvlock": false }, + "down=true,east=false,north=true,south=true,up=true,west=true": { "model": "basesteam:block/steam_track_desuw", "x": 0, "y": 90, "uvlock": false }, + "down=false,east=true,north=true,south=true,up=true,west=true": { "model": "basesteam:block/steam_track_desuw", "x": 90, "y": 0, "uvlock": false }, + "down=true,east=true,north=true,south=true,up=true,west=true": { "model": "basesteam:block/steam_track_densuw", "x": 0, "y": 0, "uvlock": false } + + } +} \ No newline at end of file diff --git a/src/main/resources/assets/basesteam/lang/de_de.json b/src/main/resources/assets/basesteam/lang/de_de.json new file mode 100644 index 0000000..f1ea3d8 --- /dev/null +++ b/src/main/resources/assets/basesteam/lang/de_de.json @@ -0,0 +1,57 @@ +{ + "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.basesteam.steam_governor.name": "Dampfkraft Steuerventil", + "tile.basesteam.steam_pipe.name": "Dampfrohr", + "tile.basesteam.steam_boiler_coal.name": "Dampfkraft Kessel", + "tile.basesteam.steam_tank.name": "Dampftank", + "tile.basesteam.steam_furnace.name": "Dampfkraft Ofen", + "tile.basesteam.steam_crusher.name": "Dampfkraft Steinbrecher", + "tile.basesteam.drillbit.name": "Bohrer", + "tile.basesteam.steam_drill.name": "Dampfkraft Bohrmaschine", + "item.basesteam.steam_drill_bit.name": "Bohrer", + "death.attack.steam_machine": "%1$s wurde zwischen die Zahnräder einer Maschine geschliffen", + "death.attack.steam_machine.player": "%1$s wurde zwischen die Zahnräder einer Maschine von %2$s geschliffen", + "tile.basesteam.steam_elevator.name": "Dampfkraft Aufzug", + "tile.basesteam.platform.name": "Dampfkraft Aufzugplattform", + "death.attack.musket": "%1$s wurde angeschossen", + "death.attack.musket.player": "%1$s schuss %2$s tot", + "item.basesteam.blackpowder_cartridge.name": "Schießpulver Patrone", + "item.basesteam.musket.name": "Schießpulver Muskete", + "tooltip.musket.damage": "Shot befasst %x Schäden", + "tooltip.musket.ammo": "Erfordert %x zu laden", + "tooltip.musket.loaded": "Geladen", + "tooltip.musket.unloaded": "Nicht geladen", + "enchantment.powderless": "Unendlich Munition", + "enchantment.rapid_reload": "Schnell neu laden", + "enchantment.high_explosive": "Bombe", + "enchantment.recoil": "Rückstoß", + "tile.basesteam.steam_track.name": "Dampfkraftzug", + "tile.basesteam.steam_boiler_electric.name": "Elektro-Dampfkessel", + "tile.basesteam.steam_boiler_geothermal.name": "Geothermische Dampfkessel", + "tile.basesteam.steam_switch.name": "Dampfventil", + "tile.basesteam.steam_still.name": "Dampfkraft Brennerei", + "tile.basesteam.steam_pump.name": "Dampfkraft Pumpe", + "tile.basesteam.steam_boiler_oil.name": "Ölfeuerung Dampfkraft Kessel", + "tile.basesteam.pump_pipe_steam.name": "Pumpenrohr", + "item.basesteam.steam_governor": "Dampfkraft Steuerventil", + "block.basesteam.steam_pipe": "Dampfrohr", + "block.basesteam.steam_boiler_coal": "Dampfkraft Kessel", + "block.basesteam.steam_tank": "Dampftank", + "block.basesteam.steam_furnace": "Dampfkraft Ofen", + "block.basesteam.steam_crusher": "Dampfkraft Steinbrecher", + "block.basesteam.drillbit": "Bohrer", + "block.basesteam.steam_drill": "Dampfkraft Bohrmaschine", + "item.basesteam.steam_drill_bit": "Bohrer", + "block.basesteam.steam_elevator": "Dampfkraft Aufzug", + "block.basesteam.platform": "Dampfkraft Aufzugplattform", + "item.basesteam.blackpowder_cartridge": "Schießpulver Patrone", + "item.basesteam.musket": "Schießpulver Muskete", + "block.basesteam.steam_track": "Dampfkraftzug", + "block.basesteam.steam_boiler_electric": "Elektro-Dampfkessel", + "block.basesteam.steam_boiler_geothermal": "Geothermische Dampfkessel", + "block.basesteam.steam_switch": "Dampfventil", + "block.basesteam.steam_still": "Dampfkraft Brennerei", + "block.basesteam.steam_pump": "Dampfkraft Pumpe", + "block.basesteam.steam_boiler_oil": "Ölfeuerung Dampfkraft Kessel", + "block.basesteam.pump_pipe_steam": "Pumpenrohr" +} diff --git a/src/main/resources/assets/basesteam/lang/en_au.json b/src/main/resources/assets/basesteam/lang/en_au.json new file mode 100644 index 0000000..fd31c69 --- /dev/null +++ b/src/main/resources/assets/basesteam/lang/en_au.json @@ -0,0 +1,57 @@ +{ + "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.basesteam.steam_governor.name": "Steam Governor", + "tile.basesteam.steam_pipe.name": "Brass Steam Pipe", + "tile.basesteam.steam_boiler_coal.name": "Coal-Fired Steam Boiler", + "tile.basesteam.steam_tank.name": "Steam Boiler Tank", + "tile.basesteam.steam_furnace.name": "Steam-Powered Furnace", + "tile.basesteam.steam_crusher.name": "Steam-Powered Rock Crusher", + "tile.basesteam.drillbit.name": "Drill", + "tile.basesteam.steam_drill.name": "Steam-Powered Drill", + "item.basesteam.steam_drill_bit.name": "Drill Bit", + "death.attack.steam_machine": "%1$s was ground between the gears of a machine", + "death.attack.steam_machine.player": "%1$s was fed into the gears of a machine by %2$s", + "tile.basesteam.steam_elevator.name": "Steam-Powered Elevator", + "tile.basesteam.platform.name": "Steam Elevator Platform", + "death.attack.musket": "%1$s got shot", + "death.attack.musket.player": "%2$s shot %1$s dead", + "item.basesteam.blackpowder_cartridge.name": "Black-Powder Cartridge", + "item.basesteam.musket.name": "Black-Powder Musket", + "tooltip.musket.damage": "Shot deals %x damage", + "tooltip.musket.ammo": "Requires %x to reload", + "tooltip.musket.loaded": "Loaded", + "tooltip.musket.unloaded": "Not loaded", + "enchantment.powderless": "Powderless", + "enchantment.rapid_reload": "Quick Reload", + "enchantment.high_explosive": "High-Explosive", + "enchantment.recoil": "Recoil", + "tile.basesteam.steam_track.name": "Steam Track", + "tile.basesteam.steam_boiler_electric.name": "Electric Steam Boiler", + "tile.basesteam.steam_boiler_geothermal.name": "Geothermal Steam Boiler", + "tile.basesteam.steam_switch.name": "Steam Switch Valve", + "tile.basesteam.steam_still.name": "Steam-Powered Still", + "tile.basesteam.steam_pump.name": "Steam-Powered Pump", + "tile.basesteam.steam_boiler_oil.name": "Oil-Burning Steam Boiler", + "tile.basesteam.pump_pipe_steam.name": "Pump Pipe", + "item.basesteam.steam_governor": "Steam Governor", + "block.basesteam.steam_pipe": "Brass Steam Pipe", + "block.basesteam.steam_boiler_coal": "Coal-Fired Steam Boiler", + "block.basesteam.steam_tank": "Steam Boiler Tank", + "block.basesteam.steam_furnace": "Steam-Powered Furnace", + "block.basesteam.steam_crusher": "Steam-Powered Rock Crusher", + "block.basesteam.drillbit": "Drill", + "block.basesteam.steam_drill": "Steam-Powered Drill", + "item.basesteam.steam_drill_bit": "Drill Bit", + "block.basesteam.steam_elevator": "Steam-Powered Elevator", + "block.basesteam.platform": "Steam Elevator Platform", + "item.basesteam.blackpowder_cartridge": "Black-Powder Cartridge", + "item.basesteam.musket": "Black-Powder Musket", + "block.basesteam.steam_track": "Steam Track", + "block.basesteam.steam_boiler_electric": "Electric Steam Boiler", + "block.basesteam.steam_boiler_geothermal": "Geothermal Steam Boiler", + "block.basesteam.steam_switch": "Steam Switch Valve", + "block.basesteam.steam_still": "Steam-Powered Still", + "block.basesteam.steam_pump": "Steam-Powered Pump", + "block.basesteam.steam_boiler_oil": "Oil-Burning Steam Boiler", + "block.basesteam.pump_pipe_steam": "Pump Pipe" +} diff --git a/src/main/resources/assets/basesteam/lang/en_ca.json b/src/main/resources/assets/basesteam/lang/en_ca.json new file mode 100644 index 0000000..cb50321 --- /dev/null +++ b/src/main/resources/assets/basesteam/lang/en_ca.json @@ -0,0 +1,56 @@ +{ + "item.basesteam.steam_governor.name": "Steam Governor", + "tile.basesteam.steam_pipe.name": "Brass Steam Pipe", + "tile.basesteam.steam_boiler_coal.name": "Coal-Fired Steam Boiler", + "tile.basesteam.steam_tank.name": "Steam Boiler Tank", + "tile.basesteam.steam_furnace.name": "Steam-Powered Furnace", + "tile.basesteam.steam_crusher.name": "Steam-Powered Rock Crusher", + "tile.basesteam.drillbit.name": "Drill", + "tile.basesteam.steam_drill.name": "Steam-Powered Drill", + "item.basesteam.steam_drill_bit.name": "Drill Bit", + "death.attack.steam_machine": "%1$s was ground between the gears of a machine", + "death.attack.steam_machine.player": "%1$s was fed into the gears of a machine by %2$s", + "tile.basesteam.steam_elevator.name": "Steam-Powered Elevator", + "tile.basesteam.platform.name": "Steam Elevator Platform", + "death.attack.musket": "%1$s got shot", + "death.attack.musket.player": "%2$s shot %1$s dead", + "item.basesteam.blackpowder_cartridge.name": "Black-Powder Cartridge", + "item.basesteam.musket.name": "Black-Powder Musket", + "tooltip.musket.damage": "Shot deals %x damage", + "tooltip.musket.ammo": "Requires %x to reload", + "tooltip.musket.loaded": "Loaded", + "tooltip.musket.unloaded": "Not loaded", + "enchantment.powderless": "Powderless", + "enchantment.rapid_reload": "Quick Reload", + "enchantment.high_explosive": "High-Explosive", + "enchantment.recoil": "Recoil", + "tile.basesteam.steam_track.name": "Steam Track", + "tile.basesteam.steam_boiler_electric.name": "Electric Steam Boiler", + "tile.basesteam.steam_boiler_geothermal.name": "Geothermal Steam Boiler", + "tile.basesteam.steam_switch.name": "Steam Switch Valve", + "tile.basesteam.steam_still.name": "Steam-Powered Still", + "tile.basesteam.steam_pump.name": "Steam-Powered Pump", + "tile.basesteam.steam_boiler_oil.name": "Oil-Burning Steam Boiler", + "tile.basesteam.pump_pipe_steam.name": "Pump Pipe", + "item.basesteam.steam_governor": "Steam Governor", + "block.basesteam.steam_pipe": "Brass Steam Pipe", + "block.basesteam.steam_boiler_coal": "Coal-Fired Steam Boiler", + "block.basesteam.steam_tank": "Steam Boiler Tank", + "block.basesteam.steam_furnace": "Steam-Powered Furnace", + "block.basesteam.steam_crusher": "Steam-Powered Rock Crusher", + "block.basesteam.drillbit": "Drill", + "block.basesteam.steam_drill": "Steam-Powered Drill", + "item.basesteam.steam_drill_bit": "Drill Bit", + "block.basesteam.steam_elevator": "Steam-Powered Elevator", + "block.basesteam.platform": "Steam Elevator Platform", + "item.basesteam.blackpowder_cartridge": "Black-Powder Cartridge", + "item.basesteam.musket": "Black-Powder Musket", + "block.basesteam.steam_track": "Steam Track", + "block.basesteam.steam_boiler_electric": "Electric Steam Boiler", + "block.basesteam.steam_boiler_geothermal": "Geothermal Steam Boiler", + "block.basesteam.steam_switch": "Steam Switch Valve", + "block.basesteam.steam_still": "Steam-Powered Still", + "block.basesteam.steam_pump": "Steam-Powered Pump", + "block.basesteam.steam_boiler_oil": "Oil-Burning Steam Boiler", + "block.basesteam.pump_pipe_steam": "Pump Pipe" +} diff --git a/src/main/resources/assets/basesteam/lang/en_en.json b/src/main/resources/assets/basesteam/lang/en_en.json new file mode 100644 index 0000000..cb50321 --- /dev/null +++ b/src/main/resources/assets/basesteam/lang/en_en.json @@ -0,0 +1,56 @@ +{ + "item.basesteam.steam_governor.name": "Steam Governor", + "tile.basesteam.steam_pipe.name": "Brass Steam Pipe", + "tile.basesteam.steam_boiler_coal.name": "Coal-Fired Steam Boiler", + "tile.basesteam.steam_tank.name": "Steam Boiler Tank", + "tile.basesteam.steam_furnace.name": "Steam-Powered Furnace", + "tile.basesteam.steam_crusher.name": "Steam-Powered Rock Crusher", + "tile.basesteam.drillbit.name": "Drill", + "tile.basesteam.steam_drill.name": "Steam-Powered Drill", + "item.basesteam.steam_drill_bit.name": "Drill Bit", + "death.attack.steam_machine": "%1$s was ground between the gears of a machine", + "death.attack.steam_machine.player": "%1$s was fed into the gears of a machine by %2$s", + "tile.basesteam.steam_elevator.name": "Steam-Powered Elevator", + "tile.basesteam.platform.name": "Steam Elevator Platform", + "death.attack.musket": "%1$s got shot", + "death.attack.musket.player": "%2$s shot %1$s dead", + "item.basesteam.blackpowder_cartridge.name": "Black-Powder Cartridge", + "item.basesteam.musket.name": "Black-Powder Musket", + "tooltip.musket.damage": "Shot deals %x damage", + "tooltip.musket.ammo": "Requires %x to reload", + "tooltip.musket.loaded": "Loaded", + "tooltip.musket.unloaded": "Not loaded", + "enchantment.powderless": "Powderless", + "enchantment.rapid_reload": "Quick Reload", + "enchantment.high_explosive": "High-Explosive", + "enchantment.recoil": "Recoil", + "tile.basesteam.steam_track.name": "Steam Track", + "tile.basesteam.steam_boiler_electric.name": "Electric Steam Boiler", + "tile.basesteam.steam_boiler_geothermal.name": "Geothermal Steam Boiler", + "tile.basesteam.steam_switch.name": "Steam Switch Valve", + "tile.basesteam.steam_still.name": "Steam-Powered Still", + "tile.basesteam.steam_pump.name": "Steam-Powered Pump", + "tile.basesteam.steam_boiler_oil.name": "Oil-Burning Steam Boiler", + "tile.basesteam.pump_pipe_steam.name": "Pump Pipe", + "item.basesteam.steam_governor": "Steam Governor", + "block.basesteam.steam_pipe": "Brass Steam Pipe", + "block.basesteam.steam_boiler_coal": "Coal-Fired Steam Boiler", + "block.basesteam.steam_tank": "Steam Boiler Tank", + "block.basesteam.steam_furnace": "Steam-Powered Furnace", + "block.basesteam.steam_crusher": "Steam-Powered Rock Crusher", + "block.basesteam.drillbit": "Drill", + "block.basesteam.steam_drill": "Steam-Powered Drill", + "item.basesteam.steam_drill_bit": "Drill Bit", + "block.basesteam.steam_elevator": "Steam-Powered Elevator", + "block.basesteam.platform": "Steam Elevator Platform", + "item.basesteam.blackpowder_cartridge": "Black-Powder Cartridge", + "item.basesteam.musket": "Black-Powder Musket", + "block.basesteam.steam_track": "Steam Track", + "block.basesteam.steam_boiler_electric": "Electric Steam Boiler", + "block.basesteam.steam_boiler_geothermal": "Geothermal Steam Boiler", + "block.basesteam.steam_switch": "Steam Switch Valve", + "block.basesteam.steam_still": "Steam-Powered Still", + "block.basesteam.steam_pump": "Steam-Powered Pump", + "block.basesteam.steam_boiler_oil": "Oil-Burning Steam Boiler", + "block.basesteam.pump_pipe_steam": "Pump Pipe" +} diff --git a/src/main/resources/assets/basesteam/lang/en_gb.json b/src/main/resources/assets/basesteam/lang/en_gb.json new file mode 100644 index 0000000..cb50321 --- /dev/null +++ b/src/main/resources/assets/basesteam/lang/en_gb.json @@ -0,0 +1,56 @@ +{ + "item.basesteam.steam_governor.name": "Steam Governor", + "tile.basesteam.steam_pipe.name": "Brass Steam Pipe", + "tile.basesteam.steam_boiler_coal.name": "Coal-Fired Steam Boiler", + "tile.basesteam.steam_tank.name": "Steam Boiler Tank", + "tile.basesteam.steam_furnace.name": "Steam-Powered Furnace", + "tile.basesteam.steam_crusher.name": "Steam-Powered Rock Crusher", + "tile.basesteam.drillbit.name": "Drill", + "tile.basesteam.steam_drill.name": "Steam-Powered Drill", + "item.basesteam.steam_drill_bit.name": "Drill Bit", + "death.attack.steam_machine": "%1$s was ground between the gears of a machine", + "death.attack.steam_machine.player": "%1$s was fed into the gears of a machine by %2$s", + "tile.basesteam.steam_elevator.name": "Steam-Powered Elevator", + "tile.basesteam.platform.name": "Steam Elevator Platform", + "death.attack.musket": "%1$s got shot", + "death.attack.musket.player": "%2$s shot %1$s dead", + "item.basesteam.blackpowder_cartridge.name": "Black-Powder Cartridge", + "item.basesteam.musket.name": "Black-Powder Musket", + "tooltip.musket.damage": "Shot deals %x damage", + "tooltip.musket.ammo": "Requires %x to reload", + "tooltip.musket.loaded": "Loaded", + "tooltip.musket.unloaded": "Not loaded", + "enchantment.powderless": "Powderless", + "enchantment.rapid_reload": "Quick Reload", + "enchantment.high_explosive": "High-Explosive", + "enchantment.recoil": "Recoil", + "tile.basesteam.steam_track.name": "Steam Track", + "tile.basesteam.steam_boiler_electric.name": "Electric Steam Boiler", + "tile.basesteam.steam_boiler_geothermal.name": "Geothermal Steam Boiler", + "tile.basesteam.steam_switch.name": "Steam Switch Valve", + "tile.basesteam.steam_still.name": "Steam-Powered Still", + "tile.basesteam.steam_pump.name": "Steam-Powered Pump", + "tile.basesteam.steam_boiler_oil.name": "Oil-Burning Steam Boiler", + "tile.basesteam.pump_pipe_steam.name": "Pump Pipe", + "item.basesteam.steam_governor": "Steam Governor", + "block.basesteam.steam_pipe": "Brass Steam Pipe", + "block.basesteam.steam_boiler_coal": "Coal-Fired Steam Boiler", + "block.basesteam.steam_tank": "Steam Boiler Tank", + "block.basesteam.steam_furnace": "Steam-Powered Furnace", + "block.basesteam.steam_crusher": "Steam-Powered Rock Crusher", + "block.basesteam.drillbit": "Drill", + "block.basesteam.steam_drill": "Steam-Powered Drill", + "item.basesteam.steam_drill_bit": "Drill Bit", + "block.basesteam.steam_elevator": "Steam-Powered Elevator", + "block.basesteam.platform": "Steam Elevator Platform", + "item.basesteam.blackpowder_cartridge": "Black-Powder Cartridge", + "item.basesteam.musket": "Black-Powder Musket", + "block.basesteam.steam_track": "Steam Track", + "block.basesteam.steam_boiler_electric": "Electric Steam Boiler", + "block.basesteam.steam_boiler_geothermal": "Geothermal Steam Boiler", + "block.basesteam.steam_switch": "Steam Switch Valve", + "block.basesteam.steam_still": "Steam-Powered Still", + "block.basesteam.steam_pump": "Steam-Powered Pump", + "block.basesteam.steam_boiler_oil": "Oil-Burning Steam Boiler", + "block.basesteam.pump_pipe_steam": "Pump Pipe" +} diff --git a/src/main/resources/assets/basesteam/lang/en_pt.json b/src/main/resources/assets/basesteam/lang/en_pt.json new file mode 100644 index 0000000..dfef46f --- /dev/null +++ b/src/main/resources/assets/basesteam/lang/en_pt.json @@ -0,0 +1,57 @@ +{ + "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.basesteam.steam_governor.name": "Steam Gov'ner", + "tile.basesteam.steam_pipe.name": "Brass Pipe", + "tile.basesteam.steam_boiler_coal.name": "Boiler", + "tile.basesteam.steam_tank.name": "Clockwerk Boiler Tank", + "tile.basesteam.steam_furnace.name": "Clockwerk Furnace", + "tile.basesteam.steam_crusher.name": "Clockwerk Stone-Chewer", + "tile.basesteam.drillbit.name": "Drill", + "tile.basesteam.steam_drill.name": "Clockwerk Drill", + "item.basesteam.steam_drill_bit.name": "Drill Bit", + "death.attack.steam_machine": "%1$s kissed the iron maiden", + "death.attack.steam_machine.player": "%1$s convinced %2$s to kiss the iron maiden", + "tile.basesteam.steam_elevator.name": "Clockwerk Plank-Raiser", + "tile.basesteam.platform.name": "Mecha-Plank", + "death.attack.musket": "%1$s got shot", + "death.attack.musket.player": "%2$s filled %1$s full of daylight", + "item.basesteam.blackpowder_cartridge.name": "Death Ball", + "item.basesteam.musket.name": "Blunderbuss", + "tooltip.musket.damage": "Shot deals %x damage", + "tooltip.musket.ammo": "Requires %x to reload", + "tooltip.musket.loaded": "Loaded", + "tooltip.musket.unloaded": "Not loaded", + "enchantment.powderless": "Unending Glory", + "enchantment.rapid_reload": "Faster Blaster", + "enchantment.high_explosive": "Big Boom", + "enchantment.recoil": "Kickback", + "tile.basesteam.steam_track.name": "Steam Path", + "tile.basesteam.steam_boiler_electric.name": "Lightnin' Boiler", + "tile.basesteam.steam_boiler_geothermal.name": "Lava Boiler", + "tile.basesteam.steam_switch.name": "Steam Valve", + "tile.basesteam.steam_still.name": "Clockwerk 'Stillery", + "tile.basesteam.steam_pump.name": "Clockwerk Bilge Pump", + "tile.basesteam.steam_boiler_oil.name": "Oil Boiler", + "tile.basesteam.pump_pipe_steam.name": "Pump Pipe", + "item.basesteam.steam_governor": "Steam Gov'ner", + "block.basesteam.steam_pipe": "Brass Pipe", + "block.basesteam.steam_boiler_coal": "Boiler", + "block.basesteam.steam_tank": "Clockwerk Boiler Tank", + "block.basesteam.steam_furnace": "Clockwerk Furnace", + "block.basesteam.steam_crusher": "Clockwerk Stone-Chewer", + "block.basesteam.drillbit": "Drill", + "block.basesteam.steam_drill": "Clockwerk Drill", + "item.basesteam.steam_drill_bit": "Drill Bit", + "block.basesteam.steam_elevator": "Clockwerk Plank-Raiser", + "block.basesteam.platform": "Mecha-Plank", + "item.basesteam.blackpowder_cartridge": "Death Ball", + "item.basesteam.musket": "Blunderbuss", + "block.basesteam.steam_track": "Steam Path", + "block.basesteam.steam_boiler_electric": "Lightnin' Boiler", + "block.basesteam.steam_boiler_geothermal": "Lava Boiler", + "block.basesteam.steam_switch": "Steam Valve", + "block.basesteam.steam_still": "Clockwerk 'Stillery", + "block.basesteam.steam_pump": "Clockwerk Bilge Pump", + "block.basesteam.steam_boiler_oil": "Oil Boiler", + "block.basesteam.pump_pipe_steam": "Pump Pipe" +} diff --git a/src/main/resources/assets/basesteam/lang/en_us.json b/src/main/resources/assets/basesteam/lang/en_us.json new file mode 100644 index 0000000..fd31c69 --- /dev/null +++ b/src/main/resources/assets/basesteam/lang/en_us.json @@ -0,0 +1,57 @@ +{ + "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.basesteam.steam_governor.name": "Steam Governor", + "tile.basesteam.steam_pipe.name": "Brass Steam Pipe", + "tile.basesteam.steam_boiler_coal.name": "Coal-Fired Steam Boiler", + "tile.basesteam.steam_tank.name": "Steam Boiler Tank", + "tile.basesteam.steam_furnace.name": "Steam-Powered Furnace", + "tile.basesteam.steam_crusher.name": "Steam-Powered Rock Crusher", + "tile.basesteam.drillbit.name": "Drill", + "tile.basesteam.steam_drill.name": "Steam-Powered Drill", + "item.basesteam.steam_drill_bit.name": "Drill Bit", + "death.attack.steam_machine": "%1$s was ground between the gears of a machine", + "death.attack.steam_machine.player": "%1$s was fed into the gears of a machine by %2$s", + "tile.basesteam.steam_elevator.name": "Steam-Powered Elevator", + "tile.basesteam.platform.name": "Steam Elevator Platform", + "death.attack.musket": "%1$s got shot", + "death.attack.musket.player": "%2$s shot %1$s dead", + "item.basesteam.blackpowder_cartridge.name": "Black-Powder Cartridge", + "item.basesteam.musket.name": "Black-Powder Musket", + "tooltip.musket.damage": "Shot deals %x damage", + "tooltip.musket.ammo": "Requires %x to reload", + "tooltip.musket.loaded": "Loaded", + "tooltip.musket.unloaded": "Not loaded", + "enchantment.powderless": "Powderless", + "enchantment.rapid_reload": "Quick Reload", + "enchantment.high_explosive": "High-Explosive", + "enchantment.recoil": "Recoil", + "tile.basesteam.steam_track.name": "Steam Track", + "tile.basesteam.steam_boiler_electric.name": "Electric Steam Boiler", + "tile.basesteam.steam_boiler_geothermal.name": "Geothermal Steam Boiler", + "tile.basesteam.steam_switch.name": "Steam Switch Valve", + "tile.basesteam.steam_still.name": "Steam-Powered Still", + "tile.basesteam.steam_pump.name": "Steam-Powered Pump", + "tile.basesteam.steam_boiler_oil.name": "Oil-Burning Steam Boiler", + "tile.basesteam.pump_pipe_steam.name": "Pump Pipe", + "item.basesteam.steam_governor": "Steam Governor", + "block.basesteam.steam_pipe": "Brass Steam Pipe", + "block.basesteam.steam_boiler_coal": "Coal-Fired Steam Boiler", + "block.basesteam.steam_tank": "Steam Boiler Tank", + "block.basesteam.steam_furnace": "Steam-Powered Furnace", + "block.basesteam.steam_crusher": "Steam-Powered Rock Crusher", + "block.basesteam.drillbit": "Drill", + "block.basesteam.steam_drill": "Steam-Powered Drill", + "item.basesteam.steam_drill_bit": "Drill Bit", + "block.basesteam.steam_elevator": "Steam-Powered Elevator", + "block.basesteam.platform": "Steam Elevator Platform", + "item.basesteam.blackpowder_cartridge": "Black-Powder Cartridge", + "item.basesteam.musket": "Black-Powder Musket", + "block.basesteam.steam_track": "Steam Track", + "block.basesteam.steam_boiler_electric": "Electric Steam Boiler", + "block.basesteam.steam_boiler_geothermal": "Geothermal Steam Boiler", + "block.basesteam.steam_switch": "Steam Switch Valve", + "block.basesteam.steam_still": "Steam-Powered Still", + "block.basesteam.steam_pump": "Steam-Powered Pump", + "block.basesteam.steam_boiler_oil": "Oil-Burning Steam Boiler", + "block.basesteam.pump_pipe_steam": "Pump Pipe" +} diff --git a/src/main/resources/assets/basesteam/lang/es_es.json b/src/main/resources/assets/basesteam/lang/es_es.json new file mode 100644 index 0000000..55913cc --- /dev/null +++ b/src/main/resources/assets/basesteam/lang/es_es.json @@ -0,0 +1,57 @@ +{ + "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.basesteam.steam_governor.name": "Controlar de Vapor", + "tile.basesteam.steam_pipe.name": "Latón Tubo de Vapor", + "tile.basesteam.steam_boiler_coal.name": "Caldera de Vapor con Carbón", + "tile.basesteam.steam_tank.name": "Tanque de Vapor", + "tile.basesteam.steam_furnace.name": "Vapor del Horno Accionado", + "tile.basesteam.steam_crusher.name": "Vapor Trituradora de Piedra Accionado", + "tile.basesteam.drillbit.name": "Broca", + "tile.basesteam.steam_drill.name": "Vapor Taladro Accionado", + "item.basesteam.steam_drill_bit.name": "Broca", + "death.attack.steam_machine": "%1$s se molió entre los engranajes de una máquina", + "death.attack.steam_machine.player": "%1$s se molió entre los engranajes de una máquina de %2$s", + "tile.basesteam.steam_elevator.name": "Ascensor a Vapor", + "tile.basesteam.platform.name": "Vapor Plataforma Ascensor", + "death.attack.musket": "%1$s recibió un disparo", + "death.attack.musket.player": "%2$s tiro %1$s muertos", + "item.basesteam.blackpowder_cartridge.name": "Cartucho de Pólvora", + "item.basesteam.musket.name": "Mosquete", + "tooltip.musket.damage": "Disparo trata %x daños", + "tooltip.musket.ammo": "Requiere %x para recargar", + "tooltip.musket.loaded": "Cargado", + "tooltip.musket.unloaded": "No cargado", + "enchantment.powderless": "Munición Infinita", + "enchantment.rapid_reload": "Rápidamente Actualizar", + "enchantment.high_explosive": "Bomba", + "enchantment.recoil": "Retroceso", + "tile.basesteam.steam_track.name": "Vía a Vapor", + "tile.basesteam.steam_boiler_electric.name": "Caldera de Vapor Eléctrica", + "tile.basesteam.steam_boiler_geothermal.name": "Caldera de Vapor Geotérmico", + "tile.basesteam.steam_switch.name": "Válvula de Vapor", + "tile.basesteam.steam_still.name": "Vapor Destilería", + "tile.basesteam.steam_pump.name": "Vapor de la Bomba Accionada", + "tile.basesteam.steam_boiler_oil.name": "Caldera de Vapor con Aceite", + "tile.basesteam.pump_pipe_steam.name": "Tubería de la Bomba", + "item.basesteam.steam_governor": "Controlar de Vapor", + "block.basesteam.steam_pipe": "Latón Tubo de Vapor", + "block.basesteam.steam_boiler_coal": "Caldera de Vapor con Carbón", + "block.basesteam.steam_tank": "Tanque de Vapor", + "block.basesteam.steam_furnace": "Vapor del Horno Accionado", + "block.basesteam.steam_crusher": "Vapor Trituradora de Piedra Accionado", + "block.basesteam.drillbit": "Broca", + "block.basesteam.steam_drill": "Vapor Taladro Accionado", + "item.basesteam.steam_drill_bit": "Broca", + "block.basesteam.steam_elevator": "Ascensor a Vapor", + "block.basesteam.platform": "Vapor Plataforma Ascensor", + "item.basesteam.blackpowder_cartridge": "Cartucho de Pólvora", + "item.basesteam.musket": "Mosquete", + "block.basesteam.steam_track": "Vía a Vapor", + "block.basesteam.steam_boiler_electric": "Caldera de Vapor Eléctrica", + "block.basesteam.steam_boiler_geothermal": "Caldera de Vapor Geotérmico", + "block.basesteam.steam_switch": "Válvula de Vapor", + "block.basesteam.steam_still": "Vapor Destilería", + "block.basesteam.steam_pump": "Vapor de la Bomba Accionada", + "block.basesteam.steam_boiler_oil": "Caldera de Vapor con Aceite", + "block.basesteam.pump_pipe_steam": "Tubería de la Bomba" +} diff --git a/src/main/resources/assets/basesteam/lang/es_mx.json b/src/main/resources/assets/basesteam/lang/es_mx.json new file mode 100644 index 0000000..55913cc --- /dev/null +++ b/src/main/resources/assets/basesteam/lang/es_mx.json @@ -0,0 +1,57 @@ +{ + "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.basesteam.steam_governor.name": "Controlar de Vapor", + "tile.basesteam.steam_pipe.name": "Latón Tubo de Vapor", + "tile.basesteam.steam_boiler_coal.name": "Caldera de Vapor con Carbón", + "tile.basesteam.steam_tank.name": "Tanque de Vapor", + "tile.basesteam.steam_furnace.name": "Vapor del Horno Accionado", + "tile.basesteam.steam_crusher.name": "Vapor Trituradora de Piedra Accionado", + "tile.basesteam.drillbit.name": "Broca", + "tile.basesteam.steam_drill.name": "Vapor Taladro Accionado", + "item.basesteam.steam_drill_bit.name": "Broca", + "death.attack.steam_machine": "%1$s se molió entre los engranajes de una máquina", + "death.attack.steam_machine.player": "%1$s se molió entre los engranajes de una máquina de %2$s", + "tile.basesteam.steam_elevator.name": "Ascensor a Vapor", + "tile.basesteam.platform.name": "Vapor Plataforma Ascensor", + "death.attack.musket": "%1$s recibió un disparo", + "death.attack.musket.player": "%2$s tiro %1$s muertos", + "item.basesteam.blackpowder_cartridge.name": "Cartucho de Pólvora", + "item.basesteam.musket.name": "Mosquete", + "tooltip.musket.damage": "Disparo trata %x daños", + "tooltip.musket.ammo": "Requiere %x para recargar", + "tooltip.musket.loaded": "Cargado", + "tooltip.musket.unloaded": "No cargado", + "enchantment.powderless": "Munición Infinita", + "enchantment.rapid_reload": "Rápidamente Actualizar", + "enchantment.high_explosive": "Bomba", + "enchantment.recoil": "Retroceso", + "tile.basesteam.steam_track.name": "Vía a Vapor", + "tile.basesteam.steam_boiler_electric.name": "Caldera de Vapor Eléctrica", + "tile.basesteam.steam_boiler_geothermal.name": "Caldera de Vapor Geotérmico", + "tile.basesteam.steam_switch.name": "Válvula de Vapor", + "tile.basesteam.steam_still.name": "Vapor Destilería", + "tile.basesteam.steam_pump.name": "Vapor de la Bomba Accionada", + "tile.basesteam.steam_boiler_oil.name": "Caldera de Vapor con Aceite", + "tile.basesteam.pump_pipe_steam.name": "Tubería de la Bomba", + "item.basesteam.steam_governor": "Controlar de Vapor", + "block.basesteam.steam_pipe": "Latón Tubo de Vapor", + "block.basesteam.steam_boiler_coal": "Caldera de Vapor con Carbón", + "block.basesteam.steam_tank": "Tanque de Vapor", + "block.basesteam.steam_furnace": "Vapor del Horno Accionado", + "block.basesteam.steam_crusher": "Vapor Trituradora de Piedra Accionado", + "block.basesteam.drillbit": "Broca", + "block.basesteam.steam_drill": "Vapor Taladro Accionado", + "item.basesteam.steam_drill_bit": "Broca", + "block.basesteam.steam_elevator": "Ascensor a Vapor", + "block.basesteam.platform": "Vapor Plataforma Ascensor", + "item.basesteam.blackpowder_cartridge": "Cartucho de Pólvora", + "item.basesteam.musket": "Mosquete", + "block.basesteam.steam_track": "Vía a Vapor", + "block.basesteam.steam_boiler_electric": "Caldera de Vapor Eléctrica", + "block.basesteam.steam_boiler_geothermal": "Caldera de Vapor Geotérmico", + "block.basesteam.steam_switch": "Válvula de Vapor", + "block.basesteam.steam_still": "Vapor Destilería", + "block.basesteam.steam_pump": "Vapor de la Bomba Accionada", + "block.basesteam.steam_boiler_oil": "Caldera de Vapor con Aceite", + "block.basesteam.pump_pipe_steam": "Tubería de la Bomba" +} diff --git a/src/main/resources/assets/basesteam/lang/fr_ca.json b/src/main/resources/assets/basesteam/lang/fr_ca.json new file mode 100644 index 0000000..3d043db --- /dev/null +++ b/src/main/resources/assets/basesteam/lang/fr_ca.json @@ -0,0 +1,57 @@ +{ + "language_support_goals": "english (en_US,en_EN,en_CA,en_GB, en_AU, en_PT), french (fr_FR,fr_CA), spanish (es_MX,es_ES), chinese (zh_CN), japanese (ja_JA), portugese (pt_BR), german (de_DE), italian (it_IT), korean (ko_KR)", + "item.basesteam.steam_governor.name": "Régulateur de vapeur", + "tile.basesteam.steam_pipe.name": "Tuyau de vapeur en laiton", + "tile.basesteam.steam_boiler_coal.name": "Chaudière à vapeur bois-charbon", + "tile.basesteam.steam_tank.name": "Réservoir de chaudière à vapeur", + "tile.basesteam.steam_furnace.name": "Four alimenté à la vapeur", + "tile.basesteam.steam_crusher.name": "Broyeur de roches alimenté à la vapeur", + "tile.basesteam.drillbit.name": "Foret", + "tile.basesteam.steam_drill.name": "Foret alimenté à la vapeur", + "item.basesteam.steam_drill_bit.name": "Morceau de foret", + "death.attack.steam_machine": "%1$s a été écrasé dans les engrenages d'une machine", + "death.attack.steam_machine.player": "%1$s a été poussé dans les engrenages d'une machine par %2$s", + "tile.basesteam.steam_elevator.name": "Ascenseur alimenté à la vapeur", + "tile.basesteam.platform.name": "Plate-forme ascenceur à vapeur", + "death.attack.musket": "%1$s got shot", + "death.attack.musket.player": "%2$s shot %1$s dead", + "item.basesteam.blackpowder_cartridge.name": "Cartouche de poudre noire", + "item.basesteam.musket.name": "Mousquet à poudre noire", + "tooltip.musket.damage": "Le tir provoque %x dégats", + "tooltip.musket.ammo": "Demande %x pour recharger", + "tooltip.musket.loaded": "Chargé", + "tooltip.musket.unloaded": "Non chargé", + "enchantment.powderless": "Sans poudre", + "enchantment.rapid_reload": "Rechargement rapide", + "enchantment.high_explosive": "High-Explosif", + "enchantment.recoil": "Recul", + "tile.basesteam.steam_track.name": "Trace de vapeur", + "tile.basesteam.steam_boiler_electric.name": "Chaudière à Vapeur Électrique", + "tile.basesteam.steam_boiler_geothermal.name": "Chaudière à Vapeur Géothermique", + "tile.basesteam.steam_switch.name": "Soupape de vapeur", + "tile.basesteam.steam_still.name": "Vapeur distillerie alimenté", + "tile.basesteam.steam_pump.name": "Vapeur pompe alimentée", + "tile.basesteam.steam_boiler_oil.name": "Chaudière à l'huile", + "tile.basesteam.pump_pipe_steam.name": "Tubería de la Bomba", + "item.basesteam.steam_governor": "Régulateur de vapeur", + "block.basesteam.steam_pipe": "Tuyau de vapeur en laiton", + "block.basesteam.steam_boiler_coal": "Chaudière à vapeur bois-charbon", + "block.basesteam.steam_tank": "Réservoir de chaudière à vapeur", + "block.basesteam.steam_furnace": "Four alimenté à la vapeur", + "block.basesteam.steam_crusher": "Broyeur de roches alimenté à la vapeur", + "block.basesteam.drillbit": "Foret", + "block.basesteam.steam_drill": "Foret alimenté à la vapeur", + "item.basesteam.steam_drill_bit": "Morceau de foret", + "block.basesteam.steam_elevator": "Ascenseur alimenté à la vapeur", + "block.basesteam.platform": "Plate-forme ascenceur à vapeur", + "item.basesteam.blackpowder_cartridge": "Cartouche de poudre noire", + "item.basesteam.musket": "Mousquet à poudre noire", + "block.basesteam.steam_track": "Trace de vapeur", + "block.basesteam.steam_boiler_electric": "Chaudière à Vapeur Électrique", + "block.basesteam.steam_boiler_geothermal": "Chaudière à Vapeur Géothermique", + "block.basesteam.steam_switch": "Soupape de vapeur", + "block.basesteam.steam_still": "Vapeur distillerie alimenté", + "block.basesteam.steam_pump": "Vapeur pompe alimentée", + "block.basesteam.steam_boiler_oil": "Chaudière à l'huile", + "block.basesteam.pump_pipe_steam": "Tubería de la Bomba" +} diff --git a/src/main/resources/assets/basesteam/lang/fr_fr.json b/src/main/resources/assets/basesteam/lang/fr_fr.json new file mode 100644 index 0000000..3d043db --- /dev/null +++ b/src/main/resources/assets/basesteam/lang/fr_fr.json @@ -0,0 +1,57 @@ +{ + "language_support_goals": "english (en_US,en_EN,en_CA,en_GB, en_AU, en_PT), french (fr_FR,fr_CA), spanish (es_MX,es_ES), chinese (zh_CN), japanese (ja_JA), portugese (pt_BR), german (de_DE), italian (it_IT), korean (ko_KR)", + "item.basesteam.steam_governor.name": "Régulateur de vapeur", + "tile.basesteam.steam_pipe.name": "Tuyau de vapeur en laiton", + "tile.basesteam.steam_boiler_coal.name": "Chaudière à vapeur bois-charbon", + "tile.basesteam.steam_tank.name": "Réservoir de chaudière à vapeur", + "tile.basesteam.steam_furnace.name": "Four alimenté à la vapeur", + "tile.basesteam.steam_crusher.name": "Broyeur de roches alimenté à la vapeur", + "tile.basesteam.drillbit.name": "Foret", + "tile.basesteam.steam_drill.name": "Foret alimenté à la vapeur", + "item.basesteam.steam_drill_bit.name": "Morceau de foret", + "death.attack.steam_machine": "%1$s a été écrasé dans les engrenages d'une machine", + "death.attack.steam_machine.player": "%1$s a été poussé dans les engrenages d'une machine par %2$s", + "tile.basesteam.steam_elevator.name": "Ascenseur alimenté à la vapeur", + "tile.basesteam.platform.name": "Plate-forme ascenceur à vapeur", + "death.attack.musket": "%1$s got shot", + "death.attack.musket.player": "%2$s shot %1$s dead", + "item.basesteam.blackpowder_cartridge.name": "Cartouche de poudre noire", + "item.basesteam.musket.name": "Mousquet à poudre noire", + "tooltip.musket.damage": "Le tir provoque %x dégats", + "tooltip.musket.ammo": "Demande %x pour recharger", + "tooltip.musket.loaded": "Chargé", + "tooltip.musket.unloaded": "Non chargé", + "enchantment.powderless": "Sans poudre", + "enchantment.rapid_reload": "Rechargement rapide", + "enchantment.high_explosive": "High-Explosif", + "enchantment.recoil": "Recul", + "tile.basesteam.steam_track.name": "Trace de vapeur", + "tile.basesteam.steam_boiler_electric.name": "Chaudière à Vapeur Électrique", + "tile.basesteam.steam_boiler_geothermal.name": "Chaudière à Vapeur Géothermique", + "tile.basesteam.steam_switch.name": "Soupape de vapeur", + "tile.basesteam.steam_still.name": "Vapeur distillerie alimenté", + "tile.basesteam.steam_pump.name": "Vapeur pompe alimentée", + "tile.basesteam.steam_boiler_oil.name": "Chaudière à l'huile", + "tile.basesteam.pump_pipe_steam.name": "Tubería de la Bomba", + "item.basesteam.steam_governor": "Régulateur de vapeur", + "block.basesteam.steam_pipe": "Tuyau de vapeur en laiton", + "block.basesteam.steam_boiler_coal": "Chaudière à vapeur bois-charbon", + "block.basesteam.steam_tank": "Réservoir de chaudière à vapeur", + "block.basesteam.steam_furnace": "Four alimenté à la vapeur", + "block.basesteam.steam_crusher": "Broyeur de roches alimenté à la vapeur", + "block.basesteam.drillbit": "Foret", + "block.basesteam.steam_drill": "Foret alimenté à la vapeur", + "item.basesteam.steam_drill_bit": "Morceau de foret", + "block.basesteam.steam_elevator": "Ascenseur alimenté à la vapeur", + "block.basesteam.platform": "Plate-forme ascenceur à vapeur", + "item.basesteam.blackpowder_cartridge": "Cartouche de poudre noire", + "item.basesteam.musket": "Mousquet à poudre noire", + "block.basesteam.steam_track": "Trace de vapeur", + "block.basesteam.steam_boiler_electric": "Chaudière à Vapeur Électrique", + "block.basesteam.steam_boiler_geothermal": "Chaudière à Vapeur Géothermique", + "block.basesteam.steam_switch": "Soupape de vapeur", + "block.basesteam.steam_still": "Vapeur distillerie alimenté", + "block.basesteam.steam_pump": "Vapeur pompe alimentée", + "block.basesteam.steam_boiler_oil": "Chaudière à l'huile", + "block.basesteam.pump_pipe_steam": "Tubería de la Bomba" +} diff --git a/src/main/resources/assets/basesteam/lang/it_it.json b/src/main/resources/assets/basesteam/lang/it_it.json new file mode 100644 index 0000000..f769210 --- /dev/null +++ b/src/main/resources/assets/basesteam/lang/it_it.json @@ -0,0 +1,56 @@ +{ + "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.basesteam.steam_governor.name": "Valvola di Controllo", + "tile.basesteam.steam_pipe.name": "Ottone Tubo di Vapore", + "tile.basesteam.steam_boiler_coal.name": "Caldaia di Vapore", + "tile.basesteam.steam_tank.name": "Carro a Vapore", + "tile.basesteam.steam_furnace.name": "Forno a Vapore Alimentata", + "tile.basesteam.steam_crusher.name": "Polverizzatore Masso a Vapore Alimentata", + "tile.basesteam.drillbit.name": "Trapano", + "tile.basesteam.steam_drill.name": "Trapano a Vapore", + "item.basesteam.steam_drill_bit.name": "Trapano", + "death.attack.steam_machine": "%1$s è stato macinato tra gli ingranaggi di una macchina", + "death.attack.steam_machine.player": "%1$s è stato macinato tra gli ingranaggi di una macchina di %2$s", + "tile.basesteam.steam_elevator.name": "Ascensore a Vapore", + "tile.basesteam.platform.name": "Ascensore a Vapore Piattaforma", + "death.attack.musket": "%1$s hanno sparato", + "death.attack.musket.player": "%2$s colpo %1$s morti", + "item.basesteam.blackpowder_cartridge.name": "Cartuccia Polvere da Sparo", + "item.basesteam.musket.name": "Moschetto", + "tooltip.musket.damage": "Girato occupa %x danni", + "tooltip.musket.ammo": "Richiede %x per ricaricare", + "tooltip.musket.loaded": "Caricato", + "tooltip.musket.unloaded": "Non caricato", + "enchantment.powderless": "Munizioni Infinite", + "enchantment.rapid_reload": "Rapidamente Reload", + "enchantment.high_explosive": "Bomba", + "enchantment.recoil": "Rinculo", + "tile.basesteam.steam_track.name": "Pista a Vapore", + "tile.basesteam.steam_boiler_electric.name": "Caldaia a Vapore Elettrica", + "tile.basesteam.steam_boiler_geothermal.name": "Caldaia a Vapore Geotermico", + "tile.basesteam.steam_switch.name": "Valvola del Vapore", + "tile.basesteam.steam_still.name": "A Vapore Alimentata Distilleria", + "tile.basesteam.steam_pump.name": "Pompa Alimentata a Vapore", + "tile.basesteam.steam_boiler_oil.name": "Caldaia ad Olio Combustibile", + "tile.electricadvantage.pump_pipe_steam.name": "Tubo Pompa", + "item.basesteam.steam_governor": "Valvola di Controllo", + "block.basesteam.steam_pipe": "Ottone Tubo di Vapore", + "block.basesteam.steam_boiler_coal": "Caldaia di Vapore", + "block.basesteam.steam_tank": "Carro a Vapore", + "block.basesteam.steam_furnace": "Forno a Vapore Alimentata", + "block.basesteam.steam_crusher": "Polverizzatore Masso a Vapore Alimentata", + "block.basesteam.drillbit": "Trapano", + "block.basesteam.steam_drill": "Trapano a Vapore", + "item.basesteam.steam_drill_bit": "Trapano", + "block.basesteam.steam_elevator": "Ascensore a Vapore", + "block.basesteam.platform": "Ascensore a Vapore Piattaforma", + "item.basesteam.blackpowder_cartridge": "Cartuccia Polvere da Sparo", + "item.basesteam.musket": "Moschetto", + "block.basesteam.steam_track": "Pista a Vapore", + "block.basesteam.steam_boiler_electric": "Caldaia a Vapore Elettrica", + "block.basesteam.steam_boiler_geothermal": "Caldaia a Vapore Geotermico", + "block.basesteam.steam_switch": "Valvola del Vapore", + "block.basesteam.steam_still": "A Vapore Alimentata Distilleria", + "block.basesteam.steam_pump": "Pompa Alimentata a Vapore", + "block.basesteam.steam_boiler_oil": "Caldaia ad Olio Combustibile" +} diff --git a/src/main/resources/assets/basesteam/lang/ja_jp.json b/src/main/resources/assets/basesteam/lang/ja_jp.json new file mode 100644 index 0000000..ef3d8c1 --- /dev/null +++ b/src/main/resources/assets/basesteam/lang/ja_jp.json @@ -0,0 +1,57 @@ +{ + "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.basesteam.steam_governor.name": "コントロールバルブスチーム", + "tile.basesteam.steam_pipe.name": "真鍮蒸気管", + "tile.basesteam.steam_boiler_coal.name": "蒸気ボイラ", + "tile.basesteam.steam_tank.name": "スチームタンク", + "tile.basesteam.steam_furnace.name": "蒸気動力炉", + "tile.basesteam.steam_crusher.name": "スチームパワードロッククラッシャー", + "tile.basesteam.drillbit.name": "ドリルビット", + "tile.basesteam.steam_drill.name": "蒸気ドリル", + "item.basesteam.steam_drill_bit.name": "ドリルビット", + "death.attack.steam_machine": "%1$s 機械の歯車の間に粉砕しました", + "death.attack.steam_machine.player": "%1$s %2$s による機械の歯車の間に粉砕し、", + "tile.basesteam.steam_elevator.name": "スチームパワードエレベーター", + "tile.basesteam.platform.name": "エレベータープラットフォームスチーム", + "death.attack.musket": "%1$sは撃たれました", + "death.attack.musket.player": "%2$sのショット%1$sの死", + "item.basesteam.blackpowder_cartridge.name": "火薬カートリッジ", + "item.basesteam.musket.name": "マスケット銃", + "tooltip.musket.damage": "ショットは、%x点のダメージを与えます", + "tooltip.musket.ammo": "リロードするには、%xを必要とし", + "tooltip.musket.loaded": "ロードされました", + "tooltip.musket.unloaded": "ロードされていません", + "enchantment.powderless": "無限の弾薬", + "enchantment.rapid_reload": "素早くリロード", + "enchantment.high_explosive": "爆弾", + "enchantment.recoil": "リコイル", + "tile.basesteam.steam_track.name": "蒸気トレース", + "tile.basesteam.steam_boiler_electric.name": "電気蒸気ボイラ", + "tile.basesteam.steam_boiler_geothermal.name": "地熱蒸気ボイラー", + "tile.basesteam.steam_switch.name": "蒸気弁", + "tile.basesteam.steam_still.name": "蒸気駆動の蒸留所", + "tile.basesteam.steam_pump.name": "蒸気駆動のポンプ", + "tile.basesteam.steam_boiler_oil.name": "石油燃焼ボイラー", + "tile.basesteam.pump_pipe_steam.name": "ポンプ配管", + "item.basesteam.steam_governor": "コントロールバルブスチーム", + "block.basesteam.steam_pipe": "真鍮蒸気管", + "block.basesteam.steam_boiler_coal": "蒸気ボイラ", + "block.basesteam.steam_tank": "スチームタンク", + "block.basesteam.steam_furnace": "蒸気動力炉", + "block.basesteam.steam_crusher": "スチームパワードロッククラッシャー", + "block.basesteam.drillbit": "ドリルビット", + "block.basesteam.steam_drill": "蒸気ドリル", + "item.basesteam.steam_drill_bit": "ドリルビット", + "block.basesteam.steam_elevator": "スチームパワードエレベーター", + "block.basesteam.platform": "エレベータープラットフォームスチーム", + "item.basesteam.blackpowder_cartridge": "火薬カートリッジ", + "item.basesteam.musket": "マスケット銃", + "block.basesteam.steam_track": "蒸気トレース", + "block.basesteam.steam_boiler_electric": "電気蒸気ボイラ", + "block.basesteam.steam_boiler_geothermal": "地熱蒸気ボイラー", + "block.basesteam.steam_switch": "蒸気弁", + "block.basesteam.steam_still": "蒸気駆動の蒸留所", + "block.basesteam.steam_pump": "蒸気駆動のポンプ", + "block.basesteam.steam_boiler_oil": "石油燃焼ボイラー", + "block.basesteam.pump_pipe_steam": "ポンプ配管" +} diff --git a/src/main/resources/assets/basesteam/lang/ko_kr.json b/src/main/resources/assets/basesteam/lang/ko_kr.json new file mode 100644 index 0000000..dfaec56 --- /dev/null +++ b/src/main/resources/assets/basesteam/lang/ko_kr.json @@ -0,0 +1,57 @@ +{ + "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.basesteam.steam_governor.name": "제어 밸브 증기", + "tile.basesteam.steam_pipe.name": "황동 증기 파이프", + "tile.basesteam.steam_boiler_coal.name": "증기 보일러", + "tile.basesteam.steam_tank.name": "스팀 탱크", + "tile.basesteam.steam_furnace.name": "증기 구동 전기로", + "tile.basesteam.steam_crusher.name": "증기 구동 록 크러셔", + "tile.basesteam.drillbit.name": "드릴 비트", + "tile.basesteam.steam_drill.name": "증기 구동 드릴", + "item.basesteam.steam_drill_bit.name": "드릴 비트", + "death.attack.steam_machine": "%1$s 기계의 기어 사이 분쇄", + "death.attack.steam_machine.player": "%1$s %2$s 에 의해 기계의 기어 사이에 분쇄", + "tile.basesteam.steam_elevator.name": "증기 구동 엘리베이터", + "tile.basesteam.platform.name": "엘리베이터 플랫폼 스팀", + "death.attack.musket": "%1$s는 총에 맞았", + "death.attack.musket.player": "%2$s 샷% %1$s죽은", + "item.basesteam.blackpowder_cartridge.name": "화약 카트리지", + "item.basesteam.musket.name": "구식 보병 총", + "tooltip.musket.damage": "총 의 %x의 피해를", + "tooltip.musket.ammo": "다시로드 %x를 필요", + "tooltip.musket.loaded": "로드", + "tooltip.musket.unloaded": "로드되지", + "enchantment.powderless": "무한 탄약", + "enchantment.rapid_reload": "신속하게 다시로드", + "enchantment.high_explosive": "폭탄", + "enchantment.recoil": "뒷걸음질", + "tile.basesteam.steam_track.name": "증기 선로", + "tile.basesteam.steam_boiler_electric.name": "전기 스팀 보일러", + "tile.basesteam.steam_boiler_geothermal.name": "지열 증기 보일러", + "tile.basesteam.steam_switch.name": "스팀 밸브", + "tile.basesteam.steam_still.name": "증기 구동 증류소", + "tile.basesteam.steam_pump.name": "증기 구동 펌프", + "tile.basesteam.steam_boiler_oil.name": "기름 연소 보일러", + "tile.basesteam.pump_pipe_steam.name": "펌프 파이프", + "item.basesteam.steam_governor": "제어 밸브 증기", + "block.basesteam.steam_pipe": "황동 증기 파이프", + "block.basesteam.steam_boiler_coal": "증기 보일러", + "block.basesteam.steam_tank": "스팀 탱크", + "block.basesteam.steam_furnace": "증기 구동 전기로", + "block.basesteam.steam_crusher": "증기 구동 록 크러셔", + "block.basesteam.drillbit": "드릴 비트", + "block.basesteam.steam_drill": "증기 구동 드릴", + "item.basesteam.steam_drill_bit": "드릴 비트", + "block.basesteam.steam_elevator": "증기 구동 엘리베이터", + "block.basesteam.platform": "엘리베이터 플랫폼 스팀", + "item.basesteam.blackpowder_cartridge": "화약 카트리지", + "item.basesteam.musket": "구식 보병 총", + "block.basesteam.steam_track": "증기 선로", + "block.basesteam.steam_boiler_electric": "전기 스팀 보일러", + "block.basesteam.steam_boiler_geothermal": "지열 증기 보일러", + "block.basesteam.steam_switch": "스팀 밸브", + "block.basesteam.steam_still": "증기 구동 증류소", + "block.basesteam.steam_pump": "증기 구동 펌프", + "block.basesteam.steam_boiler_oil": "기름 연소 보일러", + "block.basesteam.pump_pipe_steam": "펌프 파이프" +} diff --git a/src/main/resources/assets/basesteam/lang/pt_br.json b/src/main/resources/assets/basesteam/lang/pt_br.json new file mode 100644 index 0000000..384f48b --- /dev/null +++ b/src/main/resources/assets/basesteam/lang/pt_br.json @@ -0,0 +1,57 @@ +{ + "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.basesteam.steam_governor.name": "Válvula de Controle de Vapor", + "tile.basesteam.steam_pipe.name": "Latão Tubo de Vapor", + "tile.basesteam.steam_boiler_coal.name": "Caldeira a Vapor", + "tile.basesteam.steam_tank.name": "Tanque Vapor", + "tile.basesteam.steam_furnace.name": "Psto Vapor Forno", + "tile.basesteam.steam_crusher.name": "Psto Vapor Rocha Afiador", + "tile.basesteam.drillbit.name": "Broca", + "tile.basesteam.steam_drill.name": "Psto Vapor Broca", + "item.basesteam.steam_drill_bit.name": "Broca", + "death.attack.steam_machine": "%1$s was ground between the gears of a machine", + "death.attack.steam_machine.player": "%1$s was fed into the gears of a machine by %2$s", + "tile.basesteam.steam_elevator.name": "Vapor Elevador Alimentado", + "tile.basesteam.platform.name": "Vapor Elevador Plataforma", + "death.attack.musket": "%1$s foi baleado", + "death.attack.musket.player": "%2$s tiro %1$s mortos", + "item.basesteam.blackpowder_cartridge.name": "Pólvora Cartridge", + "item.basesteam.musket.name": "Mosquete", + "tooltip.musket.damage": "Plano lida %x danos", + "tooltip.musket.ammo": "Requer %x para recarregar", + "tooltip.musket.loaded": "Carregado", + "tooltip.musket.unloaded": "Não loaded", + "enchantment.powderless": "Infinito Munições", + "enchantment.rapid_reload": "Rapidamente Reload", + "enchantment.high_explosive": "Bomba", + "enchantment.recoil": "Recuo", + "tile.basesteam.steam_track.name": "Pista de Vapor", + "tile.basesteam.steam_boiler_electric.name": "Caldeira de Vapor Elétrica", + "tile.basesteam.steam_boiler_geothermal.name": "Caldeira a Vapor de Lava", + "tile.basesteam.steam_switch.name": "Válvula de Vapor", + "tile.basesteam.steam_still.name": "Destilaria vapor Alimentado", + "tile.basesteam.steam_pump.name": "Pomba de Vapor Alimentado", + "tile.basesteam.steam_boiler_oil.name": "Óleo de Caldeira Ardente", + "tile.basesteam.pump_pipe_steam.name": "Tubo de Bomba", + "item.basesteam.steam_governor": "Válvula de Controle de Vapor", + "block.basesteam.steam_pipe": "Latão Tubo de Vapor", + "block.basesteam.steam_boiler_coal": "Caldeira a Vapor", + "block.basesteam.steam_tank": "Tanque Vapor", + "block.basesteam.steam_furnace": "Psto Vapor Forno", + "block.basesteam.steam_crusher": "Psto Vapor Rocha Afiador", + "block.basesteam.drillbit": "Broca", + "block.basesteam.steam_drill": "Psto Vapor Broca", + "item.basesteam.steam_drill_bit": "Broca", + "block.basesteam.steam_elevator": "Vapor Elevador Alimentado", + "block.basesteam.platform": "Vapor Elevador Plataforma", + "item.basesteam.blackpowder_cartridge": "Pólvora Cartridge", + "item.basesteam.musket": "Mosquete", + "block.basesteam.steam_track": "Pista de Vapor", + "block.basesteam.steam_boiler_electric": "Caldeira de Vapor Elétrica", + "block.basesteam.steam_boiler_geothermal": "Caldeira a Vapor de Lava", + "block.basesteam.steam_switch": "Válvula de Vapor", + "block.basesteam.steam_still": "Destilaria vapor Alimentado", + "block.basesteam.steam_pump": "Pomba de Vapor Alimentado", + "block.basesteam.steam_boiler_oil": "Óleo de Caldeira Ardente", + "block.basesteam.pump_pipe_steam": "Tubo de Bomba" +} diff --git a/src/main/resources/assets/basesteam/lang/zh_cn.json b/src/main/resources/assets/basesteam/lang/zh_cn.json new file mode 100644 index 0000000..ddbedb5 --- /dev/null +++ b/src/main/resources/assets/basesteam/lang/zh_cn.json @@ -0,0 +1,57 @@ +{ + "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.basesteam.steam_governor.name": "蒸汽調節閥", + "tile.basesteam.steam_pipe.name": "黃銅蒸汽管", + "tile.basesteam.steam_boiler_coal.name": "蒸汽鍋爐", + "tile.basesteam.steam_tank.name": "蒸汽坦克", + "tile.basesteam.steam_furnace.name": "蒸汽動力爐", + "tile.basesteam.steam_crusher.name": "蒸汽動力岩石破碎機", + "tile.basesteam.drillbit.name": "鑽頭", + "tile.basesteam.steam_drill.name": "蒸汽動鑽", + "item.basesteam.steam_drill_bit.name": "鑽頭", + "death.attack.steam_machine": "%1$s是一台機器的齒輪之間的地面", + "death.attack.steam_machine.player": "%1$s是一機多用%2$s齒輪之間的地面", + "tile.basesteam.steam_elevator.name": "蒸汽動力電梯", + "tile.basesteam.platform.name": "蒸汽電梯平台", + "death.attack.musket": "%1$s被射殺", + "death.attack.musket.player": "%2$s射門%1$s死了", + "item.basesteam.blackpowder_cartridge.name": "火藥盒", + "item.basesteam.musket.name": "滑膛槍", + "tooltip.musket.damage": "射擊涉及%x點傷害", + "tooltip.musket.ammo": "需要%x重裝", + "tooltip.musket.loaded": "加載", + "tooltip.musket.unloaded": "未加載", + "enchantment.powderless": "無限彈藥", + "enchantment.rapid_reload": "快速刷新", + "enchantment.high_explosive": "炸彈", + "enchantment.recoil": "後坐力", + "tile.basesteam.steam_track.name": "蒸汽路径", + "tile.basesteam.steam_boiler_electric.name": "電熱蒸汽鍋爐", + "tile.basesteam.steam_boiler_geothermal.name": "地熱蒸汽鍋爐", + "tile.basesteam.steam_switch.name": "蒸汽閥", + "tile.basesteam.steam_still.name": "蒸汽動力酒廠", + "tile.basesteam.steam_pump.name": "蒸汽動力泵", + "tile.basesteam.steam_boiler_oil.name": "燃油鍋爐", + "tile.basesteam.pump_pipe_steam.name": "泵管", + "item.basesteam.steam_governor": "蒸汽調節閥", + "block.basesteam.steam_pipe": "黃銅蒸汽管", + "block.basesteam.steam_boiler_coal": "蒸汽鍋爐", + "block.basesteam.steam_tank": "蒸汽坦克", + "block.basesteam.steam_furnace": "蒸汽動力爐", + "block.basesteam.steam_crusher": "蒸汽動力岩石破碎機", + "block.basesteam.drillbit": "鑽頭", + "block.basesteam.steam_drill": "蒸汽動鑽", + "item.basesteam.steam_drill_bit": "鑽頭", + "block.basesteam.steam_elevator": "蒸汽動力電梯", + "block.basesteam.platform": "蒸汽電梯平台", + "item.basesteam.blackpowder_cartridge": "火藥盒", + "item.basesteam.musket": "滑膛槍", + "block.basesteam.steam_track": "蒸汽路径", + "block.basesteam.steam_boiler_electric": "電熱蒸汽鍋爐", + "block.basesteam.steam_boiler_geothermal": "地熱蒸汽鍋爐", + "block.basesteam.steam_switch": "蒸汽閥", + "block.basesteam.steam_still": "蒸汽動力酒廠", + "block.basesteam.steam_pump": "蒸汽動力泵", + "block.basesteam.steam_boiler_oil": "燃油鍋爐", + "block.basesteam.pump_pipe_steam": "泵管" +} diff --git a/src/main/resources/assets/steamadvantage/models/block/drillbit.json b/src/main/resources/assets/basesteam/models/block/drillbit.json similarity index 82% rename from src/main/resources/assets/steamadvantage/models/block/drillbit.json rename to src/main/resources/assets/basesteam/models/block/drillbit.json index 436e452..0146395 100644 --- a/src/main/resources/assets/steamadvantage/models/block/drillbit.json +++ b/src/main/resources/assets/basesteam/models/block/drillbit.json @@ -1,8 +1,8 @@ { "parent": "block/block", "textures": { - "all": "poweradvantage:materials/steel", - "particle": "poweradvantage:materials/steel" + "all": "basepower:materials/steel", + "particle": "basepower:materials/steel" }, "elements": [ { "from": [ 7, 7, 7 ], diff --git a/src/main/resources/assets/steamadvantage/models/block/platform1.json b/src/main/resources/assets/basesteam/models/block/platform1.json similarity index 79% rename from src/main/resources/assets/steamadvantage/models/block/platform1.json rename to src/main/resources/assets/basesteam/models/block/platform1.json index 495365c..1acb7a7 100644 --- a/src/main/resources/assets/steamadvantage/models/block/platform1.json +++ b/src/main/resources/assets/basesteam/models/block/platform1.json @@ -1,9 +1,9 @@ { "parent": "block/block", "textures": { - "shaft": "poweradvantage:materials/steel", - "platform": "steamadvantage:blocks/platform_top", - "particle": "poweradvantage:materials/steel" + "shaft": "basepower:materials/steel", + "platform": "basesteam:blocks/platform_top", + "particle": "basepower:materials/steel" }, "elements": [ { "from": [ 0, 0, 0 ], diff --git a/src/main/resources/assets/steamadvantage/models/block/platform2.json b/src/main/resources/assets/basesteam/models/block/platform2.json similarity index 88% rename from src/main/resources/assets/steamadvantage/models/block/platform2.json rename to src/main/resources/assets/basesteam/models/block/platform2.json index a725ae5..3505d47 100644 --- a/src/main/resources/assets/steamadvantage/models/block/platform2.json +++ b/src/main/resources/assets/basesteam/models/block/platform2.json @@ -1,9 +1,9 @@ { "parent": "block/block", "textures": { - "shaft": "poweradvantage:materials/steel", - "platform": "steamadvantage:blocks/platform_top", - "particle": "poweradvantage:materials/steel" + "shaft": "basepower:materials/steel", + "platform": "basesteam:blocks/platform_top", + "particle": "basepower:materials/steel" }, "elements": [ { "from": [ 0, 4, 0 ], diff --git a/src/main/resources/assets/steamadvantage/models/block/platform3.json b/src/main/resources/assets/basesteam/models/block/platform3.json similarity index 88% rename from src/main/resources/assets/steamadvantage/models/block/platform3.json rename to src/main/resources/assets/basesteam/models/block/platform3.json index 10fde4c..205bc53 100644 --- a/src/main/resources/assets/steamadvantage/models/block/platform3.json +++ b/src/main/resources/assets/basesteam/models/block/platform3.json @@ -1,9 +1,9 @@ { "parent": "block/block", "textures": { - "shaft": "poweradvantage:materials/steel", - "platform": "steamadvantage:blocks/platform_top", - "particle": "poweradvantage:materials/steel" + "shaft": "basepower:materials/steel", + "platform": "basesteam:blocks/platform_top", + "particle": "basepower:materials/steel" }, "elements": [ { "from": [ 0, 8, 0 ], diff --git a/src/main/resources/assets/steamadvantage/models/block/platform4.json b/src/main/resources/assets/basesteam/models/block/platform4.json similarity index 88% rename from src/main/resources/assets/steamadvantage/models/block/platform4.json rename to src/main/resources/assets/basesteam/models/block/platform4.json index 4be9a3d..aa31f76 100644 --- a/src/main/resources/assets/steamadvantage/models/block/platform4.json +++ b/src/main/resources/assets/basesteam/models/block/platform4.json @@ -1,9 +1,9 @@ { "parent": "block/block", "textures": { - "shaft": "poweradvantage:materials/steel", - "platform": "steamadvantage:blocks/platform_top", - "particle": "poweradvantage:materials/steel" + "shaft": "basepower:materials/steel", + "platform": "basesteam:blocks/platform_top", + "particle": "basepower:materials/steel" }, "elements": [ { "from": [ 0, 12, 0 ], diff --git a/src/main/resources/assets/steamadvantage/models/block/platform_shaft.json b/src/main/resources/assets/basesteam/models/block/platform_shaft.json similarity index 79% rename from src/main/resources/assets/steamadvantage/models/block/platform_shaft.json rename to src/main/resources/assets/basesteam/models/block/platform_shaft.json index b38c2a9..4f6489e 100644 --- a/src/main/resources/assets/steamadvantage/models/block/platform_shaft.json +++ b/src/main/resources/assets/basesteam/models/block/platform_shaft.json @@ -1,9 +1,9 @@ { "parent": "block/block", "textures": { - "shaft": "poweradvantage:materials/steel", - "platform": "steamadvantage:blocks/platform_top", - "particle": "poweradvantage:materials/steel" + "shaft": "basepower:materials/steel", + "platform": "basesteam:blocks/platform_top", + "particle": "basepower:materials/steel" }, "elements": [ { "from": [ 4, 0, 4 ], diff --git a/src/main/resources/assets/basesteam/models/block/steam_boiler_coal.json b/src/main/resources/assets/basesteam/models/block/steam_boiler_coal.json new file mode 100644 index 0000000..5e8a389 --- /dev/null +++ b/src/main/resources/assets/basesteam/models/block/steam_boiler_coal.json @@ -0,0 +1,11 @@ +{ + "parent": "basesteam:block/steam_machine_base", + "textures": { + "front": "basesteam:blocks/coal_boiler_front", + "top": "basesteam:materials/bolted_iron", + "bottom": "basesteam:materials/bolted_iron", + "back": "basesteam:materials/bolted_iron", + "side": "basesteam:materials/bolted_iron", + "metal": "basesteam:materials/bolted_iron" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/basesteam/models/block/steam_boiler_electric.json b/src/main/resources/assets/basesteam/models/block/steam_boiler_electric.json new file mode 100644 index 0000000..0910f43 --- /dev/null +++ b/src/main/resources/assets/basesteam/models/block/steam_boiler_electric.json @@ -0,0 +1,11 @@ +{ + "parent": "basesteam:block/steam_machine_base", + "textures": { + "front": "basesteam:blocks/electric_boiler_front", + "top": "basesteam:materials/bolted_iron", + "bottom": "basesteam:materials/bolted_iron", + "back": "basesteam:blocks/electric_boiler_back", + "side": "basesteam:materials/bolted_iron", + "metal": "basesteam:materials/bolted_iron" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/basesteam/models/block/steam_boiler_geothermal.json b/src/main/resources/assets/basesteam/models/block/steam_boiler_geothermal.json new file mode 100644 index 0000000..b4d730c --- /dev/null +++ b/src/main/resources/assets/basesteam/models/block/steam_boiler_geothermal.json @@ -0,0 +1,11 @@ +{ + "parent": "basesteam:block/steam_machine_base", + "textures": { + "front": "basesteam:blocks/geothermal_boiler_side", + "top": "basesteam:blocks/geothermal_boiler_top", + "bottom": "basesteam:materials/bolted_iron", + "back": "basesteam:blocks/geothermal_boiler_side", + "side": "basesteam:blocks/geothermal_boiler_side", + "metal": "basesteam:materials/bolted_iron" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/steamadvantage/models/block/steam_boiler_oil.json b/src/main/resources/assets/basesteam/models/block/steam_boiler_oil.json similarity index 96% rename from src/main/resources/assets/steamadvantage/models/block/steam_boiler_oil.json rename to src/main/resources/assets/basesteam/models/block/steam_boiler_oil.json index 7cd98fd..7d4c77b 100644 --- a/src/main/resources/assets/steamadvantage/models/block/steam_boiler_oil.json +++ b/src/main/resources/assets/basesteam/models/block/steam_boiler_oil.json @@ -1,9 +1,9 @@ { "parent": "block/block", "textures": { - "side": "steamadvantage:materials/iron", - "end": "steamadvantage:blocks/oil_tank_end", - "particle": "steamadvantage:materials/bolted_iron" + "side": "basesteam:materials/iron", + "end": "basesteam:blocks/oil_tank_end", + "particle": "basesteam:materials/bolted_iron" }, "elements": [ { diff --git a/src/main/resources/assets/basesteam/models/block/steam_crusher.json b/src/main/resources/assets/basesteam/models/block/steam_crusher.json new file mode 100644 index 0000000..6157aed --- /dev/null +++ b/src/main/resources/assets/basesteam/models/block/steam_crusher.json @@ -0,0 +1,11 @@ +{ + "parent": "basesteam:block/steam_machine_base", + "textures": { + "front": "basesteam:blocks/rock_crusher_front", + "top": "basesteam:blocks/rock_crusher_top", + "bottom": "basesteam:materials/bolted_iron", + "back": "basesteam:materials/iron", + "side": "basesteam:materials/iron", + "metal": "basesteam:materials/iron" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/steamadvantage/models/block/steam_drill.json b/src/main/resources/assets/basesteam/models/block/steam_drill.json similarity index 93% rename from src/main/resources/assets/steamadvantage/models/block/steam_drill.json rename to src/main/resources/assets/basesteam/models/block/steam_drill.json index 9a5e035..d8b8c2e 100644 --- a/src/main/resources/assets/steamadvantage/models/block/steam_drill.json +++ b/src/main/resources/assets/basesteam/models/block/steam_drill.json @@ -1,12 +1,12 @@ { "parent": "block/block", "textures": { - "support": "poweradvantage:materials/steel", - "side": "steamadvantage:materials/bolted_iron", - "top": "steamadvantage:blocks/steam_drill_top", - "bottom": "steamadvantage:blocks/steam_drill_bottom", - "foot": "poweradvantage:materials/steel_dark", - "particle": "steamadvantage:materials/iron" + "support": "basepower:materials/steel", + "side": "basesteam:materials/bolted_iron", + "top": "basesteam:blocks/steam_drill_top", + "bottom": "basesteam:blocks/steam_drill_bottom", + "foot": "basepower:materials/steel_dark", + "particle": "basesteam:materials/iron" }, "elements": [ { diff --git a/src/main/resources/assets/basesteam/models/block/steam_elevator.json b/src/main/resources/assets/basesteam/models/block/steam_elevator.json new file mode 100644 index 0000000..7f61734 --- /dev/null +++ b/src/main/resources/assets/basesteam/models/block/steam_elevator.json @@ -0,0 +1,11 @@ +{ + "parent": "basesteam:block/steam_machine_base", + "textures": { + "front": "basesteam:blocks/steam_elevator_side", + "top": "basesteam:blocks/platform_top", + "bottom": "basesteam:materials/bolted_iron", + "back": "basesteam:blocks/steam_elevator_side", + "side": "basesteam:blocks/steam_elevator_side", + "metal": "basesteam:materials/iron" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/basesteam/models/block/steam_furnace.json b/src/main/resources/assets/basesteam/models/block/steam_furnace.json new file mode 100644 index 0000000..43a6c30 --- /dev/null +++ b/src/main/resources/assets/basesteam/models/block/steam_furnace.json @@ -0,0 +1,11 @@ +{ + "parent": "basesteam:block/steam_machine_base", + "textures": { + "front": "basesteam:blocks/steam_furnace_front", + "top": "basesteam:blocks/steam_furnace_top", + "bottom": "basesteam:materials/bolted_iron", + "back": "basesteam:materials/iron", + "side": "basesteam:materials/iron", + "metal": "basesteam:materials/iron" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/steamadvantage/models/block/steam_machine_base.json b/src/main/resources/assets/basesteam/models/block/steam_machine_base.json similarity index 100% rename from src/main/resources/assets/steamadvantage/models/block/steam_machine_base.json rename to src/main/resources/assets/basesteam/models/block/steam_machine_base.json diff --git a/src/main/resources/assets/basesteam/models/block/steam_pipe_0.json b/src/main/resources/assets/basesteam/models/block/steam_pipe_0.json new file mode 100644 index 0000000..644738a --- /dev/null +++ b/src/main/resources/assets/basesteam/models/block/steam_pipe_0.json @@ -0,0 +1,7 @@ +{ + "parent": "basepower:block/pipe2_0", + "textures": { + "texture": "basesteam:blocks/steam_pipe", + "particle": "basepower:materials/brass" + } +} diff --git a/src/main/resources/assets/basesteam/models/block/steam_pipe_densuw.json b/src/main/resources/assets/basesteam/models/block/steam_pipe_densuw.json new file mode 100644 index 0000000..711e09e --- /dev/null +++ b/src/main/resources/assets/basesteam/models/block/steam_pipe_densuw.json @@ -0,0 +1,7 @@ +{ + "parent": "basepower:block/pipe2_densuw", + "textures": { + "texture": "basesteam:blocks/steam_pipe", + "particle": "basepower:materials/brass" + } +} diff --git a/src/main/resources/assets/basesteam/models/block/steam_pipe_desuw.json b/src/main/resources/assets/basesteam/models/block/steam_pipe_desuw.json new file mode 100644 index 0000000..0a556bb --- /dev/null +++ b/src/main/resources/assets/basesteam/models/block/steam_pipe_desuw.json @@ -0,0 +1,7 @@ +{ + "parent": "basepower:block/pipe2_desuw", + "textures": { + "texture": "basesteam:blocks/steam_pipe", + "particle": "basepower:materials/brass" + } +} diff --git a/src/main/resources/assets/basesteam/models/block/steam_pipe_dnu.json b/src/main/resources/assets/basesteam/models/block/steam_pipe_dnu.json new file mode 100644 index 0000000..508840a --- /dev/null +++ b/src/main/resources/assets/basesteam/models/block/steam_pipe_dnu.json @@ -0,0 +1,7 @@ +{ + "parent": "basepower:block/pipe2_dnu", + "textures": { + "texture": "basesteam:blocks/steam_pipe", + "particle": "basepower:materials/brass" + } +} diff --git a/src/main/resources/assets/basesteam/models/block/steam_pipe_ensw.json b/src/main/resources/assets/basesteam/models/block/steam_pipe_ensw.json new file mode 100644 index 0000000..688103a --- /dev/null +++ b/src/main/resources/assets/basesteam/models/block/steam_pipe_ensw.json @@ -0,0 +1,7 @@ +{ + "parent": "basepower:block/pipe2_ensw", + "textures": { + "texture": "basesteam:blocks/steam_pipe", + "particle": "basepower:materials/brass" + } +} diff --git a/src/main/resources/assets/basesteam/models/block/steam_pipe_n.json b/src/main/resources/assets/basesteam/models/block/steam_pipe_n.json new file mode 100644 index 0000000..08113de --- /dev/null +++ b/src/main/resources/assets/basesteam/models/block/steam_pipe_n.json @@ -0,0 +1,7 @@ +{ + "parent": "basepower:block/pipe2_n", + "textures": { + "texture": "basesteam:blocks/steam_pipe", + "particle": "basepower:materials/brass" + } +} diff --git a/src/main/resources/assets/basesteam/models/block/steam_pipe_ns.json b/src/main/resources/assets/basesteam/models/block/steam_pipe_ns.json new file mode 100644 index 0000000..655e81d --- /dev/null +++ b/src/main/resources/assets/basesteam/models/block/steam_pipe_ns.json @@ -0,0 +1,7 @@ +{ + "parent": "basepower:block/pipe2_ns", + "textures": { + "texture": "basesteam:blocks/steam_pipe", + "particle": "basepower:materials/brass" + } +} diff --git a/src/main/resources/assets/basesteam/models/block/steam_pipe_nsuw.json b/src/main/resources/assets/basesteam/models/block/steam_pipe_nsuw.json new file mode 100644 index 0000000..37e306e --- /dev/null +++ b/src/main/resources/assets/basesteam/models/block/steam_pipe_nsuw.json @@ -0,0 +1,7 @@ +{ + "parent": "basepower:block/pipe2_nsuw", + "textures": { + "texture": "basesteam:blocks/steam_pipe", + "particle": "basepower:materials/brass" + } +} diff --git a/src/main/resources/assets/basesteam/models/block/steam_pipe_nsw.json b/src/main/resources/assets/basesteam/models/block/steam_pipe_nsw.json new file mode 100644 index 0000000..5716ac7 --- /dev/null +++ b/src/main/resources/assets/basesteam/models/block/steam_pipe_nsw.json @@ -0,0 +1,7 @@ +{ + "parent": "basepower:block/pipe2_nsw", + "textures": { + "texture": "basesteam:blocks/steam_pipe", + "particle": "basepower:materials/brass" + } +} diff --git a/src/main/resources/assets/basesteam/models/block/steam_pipe_nuw.json b/src/main/resources/assets/basesteam/models/block/steam_pipe_nuw.json new file mode 100644 index 0000000..77d81ad --- /dev/null +++ b/src/main/resources/assets/basesteam/models/block/steam_pipe_nuw.json @@ -0,0 +1,7 @@ +{ + "parent": "basepower:block/pipe2_nuw", + "textures": { + "texture": "basesteam:blocks/steam_pipe", + "particle": "basepower:materials/brass" + } +} diff --git a/src/main/resources/assets/basesteam/models/block/steam_pipe_nw.json b/src/main/resources/assets/basesteam/models/block/steam_pipe_nw.json new file mode 100644 index 0000000..d3d5e91 --- /dev/null +++ b/src/main/resources/assets/basesteam/models/block/steam_pipe_nw.json @@ -0,0 +1,7 @@ +{ + "parent": "basepower:block/pipe2_nw", + "textures": { + "texture": "basesteam:blocks/steam_pipe", + "particle": "basepower:materials/brass" + } +} diff --git a/src/main/resources/assets/basesteam/models/block/steam_pump.json b/src/main/resources/assets/basesteam/models/block/steam_pump.json new file mode 100644 index 0000000..769837b --- /dev/null +++ b/src/main/resources/assets/basesteam/models/block/steam_pump.json @@ -0,0 +1,11 @@ +{ + "parent": "basesteam:block/steam_machine_base", + "textures": { + "front": "basesteam:blocks/steam_pump_front", + "top": "basesteam:materials/bolted_iron", + "bottom": "basesteam:materials/bolted_iron", + "back": "basesteam:blocks/steam_pump_side", + "side": "basesteam:blocks/steam_pump_side", + "metal": "basesteam:materials/bolted_iron" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/steamadvantage/models/block/steam_still.json b/src/main/resources/assets/basesteam/models/block/steam_still.json similarity index 96% rename from src/main/resources/assets/steamadvantage/models/block/steam_still.json rename to src/main/resources/assets/basesteam/models/block/steam_still.json index 66d79f9..4b77bf1 100644 --- a/src/main/resources/assets/steamadvantage/models/block/steam_still.json +++ b/src/main/resources/assets/basesteam/models/block/steam_still.json @@ -1,9 +1,9 @@ { "parent": "block/block", "textures": { - "tank": "steamadvantage:materials/bolted_copper", - "base": "steamadvantage:materials/bolted_iron", - "particle": "steamadvantage:materials/bolted_iron" + "tank": "basesteam:materials/bolted_copper", + "base": "basesteam:materials/bolted_iron", + "particle": "basesteam:materials/bolted_iron" }, "elements": [ { diff --git a/src/main/resources/assets/basesteam/models/block/steam_switch_off.json b/src/main/resources/assets/basesteam/models/block/steam_switch_off.json new file mode 100644 index 0000000..2b072b0 --- /dev/null +++ b/src/main/resources/assets/basesteam/models/block/steam_switch_off.json @@ -0,0 +1,7 @@ +{ + "parent": "block/cube_all", + "textures": { + "all": "basesteam:blocks/steam_switch_off", + "particle": "basesteam:materials/bolted_iron" + } +} diff --git a/src/main/resources/assets/basesteam/models/block/steam_switch_on.json b/src/main/resources/assets/basesteam/models/block/steam_switch_on.json new file mode 100644 index 0000000..f5181f0 --- /dev/null +++ b/src/main/resources/assets/basesteam/models/block/steam_switch_on.json @@ -0,0 +1,7 @@ +{ + "parent": "block/cube_all", + "textures": { + "all": "basesteam:blocks/steam_switch_on", + "particle": "basesteam:materials/bolted_iron" + } +} diff --git a/src/main/resources/assets/steamadvantage/models/block/steam_tank.json b/src/main/resources/assets/basesteam/models/block/steam_tank.json similarity index 94% rename from src/main/resources/assets/steamadvantage/models/block/steam_tank.json rename to src/main/resources/assets/basesteam/models/block/steam_tank.json index b0f8acc..f69ce7b 100644 --- a/src/main/resources/assets/steamadvantage/models/block/steam_tank.json +++ b/src/main/resources/assets/basesteam/models/block/steam_tank.json @@ -1,10 +1,10 @@ { "parent": "block/block", "textures": { - "top": "steamadvantage:materials/bolted_copper", - "bottom": "steamadvantage:materials/bolted_copper", - "side": "steamadvantage:materials/bolted_copper", - "particle": "steamadvantage:materials/bolted_copper" + "top": "basesteam:materials/bolted_copper", + "bottom": "basesteam:materials/bolted_copper", + "side": "basesteam:materials/bolted_copper", + "particle": "basesteam:materials/bolted_copper" }, "elements": [ { diff --git a/src/main/resources/assets/steamadvantage/models/block/steam_track_0.json b/src/main/resources/assets/basesteam/models/block/steam_track_0.json similarity index 90% rename from src/main/resources/assets/steamadvantage/models/block/steam_track_0.json rename to src/main/resources/assets/basesteam/models/block/steam_track_0.json index 7707620..0750c36 100644 --- a/src/main/resources/assets/steamadvantage/models/block/steam_track_0.json +++ b/src/main/resources/assets/basesteam/models/block/steam_track_0.json @@ -1,9 +1,9 @@ { - "parent": "poweradvantage:block/steel_frame", + "parent": "basepower:block/steel_frame", "textures": { - "texture": "steamadvantage:blocks/steam_pipe", - "particle": "poweradvantage:materials/brass", - "face": "poweradvantage:blocks/steel_frame" + "texture": "basesteam:blocks/steam_pipe", + "particle": "basepower:materials/brass", + "face": "basepower:blocks/steel_frame" }, "elements": [ { "from": [ 6, 6, 6 ], diff --git a/src/main/resources/assets/steamadvantage/models/block/steam_track_densuw.json b/src/main/resources/assets/basesteam/models/block/steam_track_densuw.json similarity index 95% rename from src/main/resources/assets/steamadvantage/models/block/steam_track_densuw.json rename to src/main/resources/assets/basesteam/models/block/steam_track_densuw.json index 2447eb0..7430fd1 100644 --- a/src/main/resources/assets/steamadvantage/models/block/steam_track_densuw.json +++ b/src/main/resources/assets/basesteam/models/block/steam_track_densuw.json @@ -1,9 +1,9 @@ { - "parent": "poweradvantage:block/steel_frame", + "parent": "basepower:block/steel_frame", "textures": { - "texture": "steamadvantage:blocks/steam_pipe", - "particle": "poweradvantage:materials/brass", - "face": "poweradvantage:blocks/steel_frame" + "texture": "basesteam:blocks/steam_pipe", + "particle": "basepower:materials/brass", + "face": "basepower:blocks/steel_frame" }, "elements": [ { "__comment": "down", diff --git a/src/main/resources/assets/steamadvantage/models/block/steam_track_desuw.json b/src/main/resources/assets/basesteam/models/block/steam_track_desuw.json similarity index 95% rename from src/main/resources/assets/steamadvantage/models/block/steam_track_desuw.json rename to src/main/resources/assets/basesteam/models/block/steam_track_desuw.json index 5cd2bfd..04263e2 100644 --- a/src/main/resources/assets/steamadvantage/models/block/steam_track_desuw.json +++ b/src/main/resources/assets/basesteam/models/block/steam_track_desuw.json @@ -1,9 +1,9 @@ { - "parent": "poweradvantage:block/steel_frame", + "parent": "basepower:block/steel_frame", "textures": { - "texture": "steamadvantage:blocks/steam_pipe", - "particle": "poweradvantage:materials/brass", - "face": "poweradvantage:blocks/steel_frame" + "texture": "basesteam:blocks/steam_pipe", + "particle": "basepower:materials/brass", + "face": "basepower:blocks/steel_frame" }, "elements": [ { "from": [ 6, 6, 6 ], diff --git a/src/main/resources/assets/steamadvantage/models/block/steam_track_dnu.json b/src/main/resources/assets/basesteam/models/block/steam_track_dnu.json similarity index 94% rename from src/main/resources/assets/steamadvantage/models/block/steam_track_dnu.json rename to src/main/resources/assets/basesteam/models/block/steam_track_dnu.json index bfa5a5d..81635ae 100644 --- a/src/main/resources/assets/steamadvantage/models/block/steam_track_dnu.json +++ b/src/main/resources/assets/basesteam/models/block/steam_track_dnu.json @@ -1,9 +1,9 @@ { - "parent": "poweradvantage:block/steel_frame", + "parent": "basepower:block/steel_frame", "textures": { - "texture": "steamadvantage:blocks/steam_pipe", - "particle": "poweradvantage:materials/brass", - "face": "poweradvantage:blocks/steel_frame" + "texture": "basesteam:blocks/steam_pipe", + "particle": "basepower:materials/brass", + "face": "basepower:blocks/steel_frame" }, "elements": [ { "from": [ 6, 6, 6 ], diff --git a/src/main/resources/assets/steamadvantage/models/block/steam_track_ensw.json b/src/main/resources/assets/basesteam/models/block/steam_track_ensw.json similarity index 94% rename from src/main/resources/assets/steamadvantage/models/block/steam_track_ensw.json rename to src/main/resources/assets/basesteam/models/block/steam_track_ensw.json index 42d4358..9195ff2 100644 --- a/src/main/resources/assets/steamadvantage/models/block/steam_track_ensw.json +++ b/src/main/resources/assets/basesteam/models/block/steam_track_ensw.json @@ -1,9 +1,9 @@ { - "parent": "poweradvantage:block/steel_frame", + "parent": "basepower:block/steel_frame", "textures": { - "texture": "steamadvantage:blocks/steam_pipe", - "particle": "poweradvantage:materials/brass", - "face": "poweradvantage:blocks/steel_frame" + "texture": "basesteam:blocks/steam_pipe", + "particle": "basepower:materials/brass", + "face": "basepower:blocks/steel_frame" }, "elements": [ { "from": [ 6, 6, 6 ], diff --git a/src/main/resources/assets/steamadvantage/models/block/steam_track_n.json b/src/main/resources/assets/basesteam/models/block/steam_track_n.json similarity index 93% rename from src/main/resources/assets/steamadvantage/models/block/steam_track_n.json rename to src/main/resources/assets/basesteam/models/block/steam_track_n.json index b65f00d..7bcdce2 100644 --- a/src/main/resources/assets/steamadvantage/models/block/steam_track_n.json +++ b/src/main/resources/assets/basesteam/models/block/steam_track_n.json @@ -1,9 +1,9 @@ { - "parent": "poweradvantage:block/steel_frame", + "parent": "basepower:block/steel_frame", "textures": { - "texture": "steamadvantage:blocks/steam_pipe", - "particle": "poweradvantage:materials/brass", - "face": "poweradvantage:blocks/steel_frame" + "texture": "basesteam:blocks/steam_pipe", + "particle": "basepower:materials/brass", + "face": "basepower:blocks/steel_frame" }, "elements": [ { "__comment": "north-south", diff --git a/src/main/resources/assets/steamadvantage/models/block/steam_track_ns.json b/src/main/resources/assets/basesteam/models/block/steam_track_ns.json similarity index 94% rename from src/main/resources/assets/steamadvantage/models/block/steam_track_ns.json rename to src/main/resources/assets/basesteam/models/block/steam_track_ns.json index 9bd1b74..81e41f2 100644 --- a/src/main/resources/assets/steamadvantage/models/block/steam_track_ns.json +++ b/src/main/resources/assets/basesteam/models/block/steam_track_ns.json @@ -1,9 +1,9 @@ { - "parent": "poweradvantage:block/steel_frame", + "parent": "basepower:block/steel_frame", "textures": { - "texture": "steamadvantage:blocks/steam_pipe", - "particle": "poweradvantage:materials/brass", - "face": "poweradvantage:blocks/steel_frame" + "texture": "basesteam:blocks/steam_pipe", + "particle": "basepower:materials/brass", + "face": "basepower:blocks/steel_frame" }, "elements": [ { "__comment": "north-south", diff --git a/src/main/resources/assets/steamadvantage/models/block/steam_track_nsuw.json b/src/main/resources/assets/basesteam/models/block/steam_track_nsuw.json similarity index 95% rename from src/main/resources/assets/steamadvantage/models/block/steam_track_nsuw.json rename to src/main/resources/assets/basesteam/models/block/steam_track_nsuw.json index f1375c6..ff91233 100644 --- a/src/main/resources/assets/steamadvantage/models/block/steam_track_nsuw.json +++ b/src/main/resources/assets/basesteam/models/block/steam_track_nsuw.json @@ -1,9 +1,9 @@ { - "parent": "poweradvantage:block/steel_frame", + "parent": "basepower:block/steel_frame", "textures": { - "texture": "steamadvantage:blocks/steam_pipe", - "particle": "poweradvantage:materials/brass", - "face": "poweradvantage:blocks/steel_frame" + "texture": "basesteam:blocks/steam_pipe", + "particle": "basepower:materials/brass", + "face": "basepower:blocks/steel_frame" }, "elements": [ { "from": [ 6, 6, 6 ], diff --git a/src/main/resources/assets/steamadvantage/models/block/steam_track_nsw.json b/src/main/resources/assets/basesteam/models/block/steam_track_nsw.json similarity index 94% rename from src/main/resources/assets/steamadvantage/models/block/steam_track_nsw.json rename to src/main/resources/assets/basesteam/models/block/steam_track_nsw.json index 82a4f0e..775a307 100644 --- a/src/main/resources/assets/steamadvantage/models/block/steam_track_nsw.json +++ b/src/main/resources/assets/basesteam/models/block/steam_track_nsw.json @@ -1,9 +1,9 @@ { - "parent": "poweradvantage:block/steel_frame", + "parent": "basepower:block/steel_frame", "textures": { - "texture": "steamadvantage:blocks/steam_pipe", - "particle": "poweradvantage:materials/brass", - "face": "poweradvantage:blocks/steel_frame" + "texture": "basesteam:blocks/steam_pipe", + "particle": "basepower:materials/brass", + "face": "basepower:blocks/steel_frame" }, "elements": [ { "from": [ 6, 6, 6 ], diff --git a/src/main/resources/assets/steamadvantage/models/block/steam_track_nuw.json b/src/main/resources/assets/basesteam/models/block/steam_track_nuw.json similarity index 94% rename from src/main/resources/assets/steamadvantage/models/block/steam_track_nuw.json rename to src/main/resources/assets/basesteam/models/block/steam_track_nuw.json index 8b35e3a..c37df03 100644 --- a/src/main/resources/assets/steamadvantage/models/block/steam_track_nuw.json +++ b/src/main/resources/assets/basesteam/models/block/steam_track_nuw.json @@ -1,9 +1,9 @@ { - "parent": "poweradvantage:block/steel_frame", + "parent": "basepower:block/steel_frame", "textures": { - "texture": "steamadvantage:blocks/steam_pipe", - "particle": "poweradvantage:materials/brass", - "face": "poweradvantage:blocks/steel_frame" + "texture": "basesteam:blocks/steam_pipe", + "particle": "basepower:materials/brass", + "face": "basepower:blocks/steel_frame" }, "elements": [ { "from": [ 6, 6, 6 ], diff --git a/src/main/resources/assets/steamadvantage/models/block/steam_track_nw.json b/src/main/resources/assets/basesteam/models/block/steam_track_nw.json similarity index 93% rename from src/main/resources/assets/steamadvantage/models/block/steam_track_nw.json rename to src/main/resources/assets/basesteam/models/block/steam_track_nw.json index 2e9221f..e9f0d90 100644 --- a/src/main/resources/assets/steamadvantage/models/block/steam_track_nw.json +++ b/src/main/resources/assets/basesteam/models/block/steam_track_nw.json @@ -1,9 +1,9 @@ { - "parent": "poweradvantage:block/steel_frame", + "parent": "basepower:block/steel_frame", "textures": { - "texture": "steamadvantage:blocks/steam_pipe", - "particle": "poweradvantage:materials/brass", - "face": "poweradvantage:blocks/steel_frame" + "texture": "basesteam:blocks/steam_pipe", + "particle": "basepower:materials/brass", + "face": "basepower:blocks/steel_frame" }, "elements": [ { "from": [ 6, 6, 6 ], diff --git a/src/main/resources/assets/basesteam/models/item/blackpowder_cartridge.json b/src/main/resources/assets/basesteam/models/item/blackpowder_cartridge.json new file mode 100644 index 0000000..5dc7979 --- /dev/null +++ b/src/main/resources/assets/basesteam/models/item/blackpowder_cartridge.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "basesteam:items/blackpowder_cartridge" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/steamadvantage/models/item/drillbit.json b/src/main/resources/assets/basesteam/models/item/drillbit.json similarity index 88% rename from src/main/resources/assets/steamadvantage/models/item/drillbit.json rename to src/main/resources/assets/basesteam/models/item/drillbit.json index 6f73058..3a95734 100644 --- a/src/main/resources/assets/steamadvantage/models/item/drillbit.json +++ b/src/main/resources/assets/basesteam/models/item/drillbit.json @@ -1,7 +1,7 @@ { "textures": { - "drill": "steamadvantage:entity/drill_bit", - "particle": "poweradvantage:materials/steel" + "drill": "basesteam:entity/drill_bit", + "particle": "basepower:materials/steel" }, "elements": [ diff --git a/src/main/resources/assets/steamadvantage/models/item/musket.json b/src/main/resources/assets/basesteam/models/item/musket.json similarity index 64% rename from src/main/resources/assets/steamadvantage/models/item/musket.json rename to src/main/resources/assets/basesteam/models/item/musket.json index e7970e6..ca93dee 100644 --- a/src/main/resources/assets/steamadvantage/models/item/musket.json +++ b/src/main/resources/assets/basesteam/models/item/musket.json @@ -6,20 +6,20 @@ "loaded": 0, "loading": 0 }, - "model": "steamadvantage:item/musket_unloaded" + "model": "basesteam:item/musket_unloaded" }, { "predicate": { "loaded": 0, "loading": 1 }, - "model": "steamadvantage:item/musket_loading" + "model": "basesteam:item/musket_loading" }, { "predicate": { "loaded": 1 }, - "model": "steamadvantage:item/musket_loaded" + "model": "basesteam:item/musket_loaded" } ] } \ No newline at end of file diff --git a/src/main/resources/assets/steamadvantage/models/item/musket_loaded.json b/src/main/resources/assets/basesteam/models/item/musket_loaded.json similarity index 91% rename from src/main/resources/assets/steamadvantage/models/item/musket_loaded.json rename to src/main/resources/assets/basesteam/models/item/musket_loaded.json index 51d11c3..c19f6fc 100644 --- a/src/main/resources/assets/steamadvantage/models/item/musket_loaded.json +++ b/src/main/resources/assets/basesteam/models/item/musket_loaded.json @@ -1,9 +1,9 @@ { "textures": { - "stock": "poweradvantage:materials/wood", - "barrel": "poweradvantage:materials/steel_dark", - "tip": "steamadvantage:materials/steel_dark_hole", - "particle": "poweradvantage:materials/steel_dark" + "stock": "basepower:materials/wood", + "barrel": "basepower:materials/steel_dark", + "tip": "basesteam:materials/steel_dark_hole", + "particle": "basepower:materials/steel_dark" }, "elements": [ { diff --git a/src/main/resources/assets/steamadvantage/models/item/musket_loading.json b/src/main/resources/assets/basesteam/models/item/musket_loading.json similarity index 91% rename from src/main/resources/assets/steamadvantage/models/item/musket_loading.json rename to src/main/resources/assets/basesteam/models/item/musket_loading.json index ab81f79..798e273 100644 --- a/src/main/resources/assets/steamadvantage/models/item/musket_loading.json +++ b/src/main/resources/assets/basesteam/models/item/musket_loading.json @@ -1,9 +1,9 @@ { "textures": { - "stock": "poweradvantage:materials/wood", - "barrel": "poweradvantage:materials/steel_dark", - "tip": "steamadvantage:materials/steel_dark_hole", - "particle": "poweradvantage:materials/steel_dark" + "stock": "basepower:materials/wood", + "barrel": "basepower:materials/steel_dark", + "tip": "basesteam:materials/steel_dark_hole", + "particle": "basepower:materials/steel_dark" }, "elements": [ { diff --git a/src/main/resources/assets/steamadvantage/models/item/musket_unloaded.json b/src/main/resources/assets/basesteam/models/item/musket_unloaded.json similarity index 91% rename from src/main/resources/assets/steamadvantage/models/item/musket_unloaded.json rename to src/main/resources/assets/basesteam/models/item/musket_unloaded.json index 21fd9e6..eb9c1f9 100644 --- a/src/main/resources/assets/steamadvantage/models/item/musket_unloaded.json +++ b/src/main/resources/assets/basesteam/models/item/musket_unloaded.json @@ -1,9 +1,9 @@ { "textures": { - "stock": "poweradvantage:materials/wood", - "barrel": "poweradvantage:materials/steel_dark", - "tip": "steamadvantage:materials/steel_dark_hole", - "particle": "poweradvantage:materials/steel_dark" + "stock": "basepower:materials/wood", + "barrel": "basepower:materials/steel_dark", + "tip": "basesteam:materials/steel_dark_hole", + "particle": "basepower:materials/steel_dark" }, "elements": [ { diff --git a/src/main/resources/assets/basesteam/models/item/platform.json b/src/main/resources/assets/basesteam/models/item/platform.json new file mode 100644 index 0000000..9be581b --- /dev/null +++ b/src/main/resources/assets/basesteam/models/item/platform.json @@ -0,0 +1,4 @@ +{ + "parent": "basesteam:block/platform3", + "ambientocclusion": false +} \ No newline at end of file diff --git a/src/main/resources/assets/basesteam/models/item/pump_pipe_steam.json b/src/main/resources/assets/basesteam/models/item/pump_pipe_steam.json new file mode 100644 index 0000000..2cfca62 --- /dev/null +++ b/src/main/resources/assets/basesteam/models/item/pump_pipe_steam.json @@ -0,0 +1,4 @@ +{ + "parent": "basepower:block/fluid_pipe_ns", + "ambientocclusion": false +} \ No newline at end of file diff --git a/src/main/resources/assets/basesteam/models/item/steam_boiler_coal.json b/src/main/resources/assets/basesteam/models/item/steam_boiler_coal.json new file mode 100644 index 0000000..45187b0 --- /dev/null +++ b/src/main/resources/assets/basesteam/models/item/steam_boiler_coal.json @@ -0,0 +1,4 @@ +{ + "parent": "basesteam:block/steam_boiler_coal", + "ambientocclusion": false +} \ No newline at end of file diff --git a/src/main/resources/assets/basesteam/models/item/steam_boiler_electric.json b/src/main/resources/assets/basesteam/models/item/steam_boiler_electric.json new file mode 100644 index 0000000..d9811da --- /dev/null +++ b/src/main/resources/assets/basesteam/models/item/steam_boiler_electric.json @@ -0,0 +1,4 @@ +{ + "parent": "basesteam:block/steam_boiler_electric", + "ambientocclusion": false +} \ No newline at end of file diff --git a/src/main/resources/assets/basesteam/models/item/steam_boiler_geothermal.json b/src/main/resources/assets/basesteam/models/item/steam_boiler_geothermal.json new file mode 100644 index 0000000..f6a29ea --- /dev/null +++ b/src/main/resources/assets/basesteam/models/item/steam_boiler_geothermal.json @@ -0,0 +1,4 @@ +{ + "parent": "basesteam:block/steam_boiler_geothermal", + "ambientocclusion": false +} \ No newline at end of file diff --git a/src/main/resources/assets/basesteam/models/item/steam_boiler_oil.json b/src/main/resources/assets/basesteam/models/item/steam_boiler_oil.json new file mode 100644 index 0000000..cb6bfeb --- /dev/null +++ b/src/main/resources/assets/basesteam/models/item/steam_boiler_oil.json @@ -0,0 +1,4 @@ +{ + "parent": "basesteam:block/steam_boiler_oil", + "ambientocclusion": false +} \ No newline at end of file diff --git a/src/main/resources/assets/basesteam/models/item/steam_crusher.json b/src/main/resources/assets/basesteam/models/item/steam_crusher.json new file mode 100644 index 0000000..f4f6fbd --- /dev/null +++ b/src/main/resources/assets/basesteam/models/item/steam_crusher.json @@ -0,0 +1,4 @@ +{ + "parent": "basesteam:block/steam_crusher", + "ambientocclusion": false +} \ No newline at end of file diff --git a/src/main/resources/assets/basesteam/models/item/steam_drill.json b/src/main/resources/assets/basesteam/models/item/steam_drill.json new file mode 100644 index 0000000..e9f232e --- /dev/null +++ b/src/main/resources/assets/basesteam/models/item/steam_drill.json @@ -0,0 +1,4 @@ +{ + "parent": "basesteam:block/steam_drill", + "ambientocclusion": false +} \ No newline at end of file diff --git a/src/main/resources/assets/steamadvantage/models/item/steam_drill_bit.json b/src/main/resources/assets/basesteam/models/item/steam_drill_bit.json similarity index 50% rename from src/main/resources/assets/steamadvantage/models/item/steam_drill_bit.json rename to src/main/resources/assets/basesteam/models/item/steam_drill_bit.json index 1690dee..059ce30 100644 --- a/src/main/resources/assets/steamadvantage/models/item/steam_drill_bit.json +++ b/src/main/resources/assets/basesteam/models/item/steam_drill_bit.json @@ -1,6 +1,6 @@ { "parent": "item/generated", "textures": { - "layer0": "steamadvantage:items/steam_drill_bit" + "layer0": "basesteam:items/steam_drill_bit" } } \ No newline at end of file diff --git a/src/main/resources/assets/basesteam/models/item/steam_elevator.json b/src/main/resources/assets/basesteam/models/item/steam_elevator.json new file mode 100644 index 0000000..093ee3c --- /dev/null +++ b/src/main/resources/assets/basesteam/models/item/steam_elevator.json @@ -0,0 +1,4 @@ +{ + "parent": "basesteam:block/steam_elevator", + "ambientocclusion": false +} \ No newline at end of file diff --git a/src/main/resources/assets/basesteam/models/item/steam_furnace.json b/src/main/resources/assets/basesteam/models/item/steam_furnace.json new file mode 100644 index 0000000..1adc5f0 --- /dev/null +++ b/src/main/resources/assets/basesteam/models/item/steam_furnace.json @@ -0,0 +1,4 @@ +{ + "parent": "basesteam:block/steam_furnace", + "ambientocclusion": false +} \ No newline at end of file diff --git a/src/main/resources/assets/steamadvantage/models/item/steam_governor.json b/src/main/resources/assets/basesteam/models/item/steam_governor.json similarity index 50% rename from src/main/resources/assets/steamadvantage/models/item/steam_governor.json rename to src/main/resources/assets/basesteam/models/item/steam_governor.json index 0cf3778..6f5fe39 100644 --- a/src/main/resources/assets/steamadvantage/models/item/steam_governor.json +++ b/src/main/resources/assets/basesteam/models/item/steam_governor.json @@ -1,6 +1,6 @@ { "parent": "item/generated", "textures": { - "layer0": "steamadvantage:items/steam_governor" + "layer0": "basesteam:items/steam_governor" } } \ No newline at end of file diff --git a/src/main/resources/assets/basesteam/models/item/steam_pipe.json b/src/main/resources/assets/basesteam/models/item/steam_pipe.json new file mode 100644 index 0000000..40f679a --- /dev/null +++ b/src/main/resources/assets/basesteam/models/item/steam_pipe.json @@ -0,0 +1,4 @@ +{ + "parent": "basesteam:block/steam_pipe_ns", + "ambientocclusion": false +} \ No newline at end of file diff --git a/src/main/resources/assets/basesteam/models/item/steam_pump.json b/src/main/resources/assets/basesteam/models/item/steam_pump.json new file mode 100644 index 0000000..c3dffe3 --- /dev/null +++ b/src/main/resources/assets/basesteam/models/item/steam_pump.json @@ -0,0 +1,4 @@ +{ + "parent": "basesteam:block/steam_pump", + "ambientocclusion": false +} \ No newline at end of file diff --git a/src/main/resources/assets/basesteam/models/item/steam_still.json b/src/main/resources/assets/basesteam/models/item/steam_still.json new file mode 100644 index 0000000..e608376 --- /dev/null +++ b/src/main/resources/assets/basesteam/models/item/steam_still.json @@ -0,0 +1,4 @@ +{ + "parent": "basesteam:block/steam_still", + "ambientocclusion": false +} \ No newline at end of file diff --git a/src/main/resources/assets/basesteam/models/item/steam_switch.json b/src/main/resources/assets/basesteam/models/item/steam_switch.json new file mode 100644 index 0000000..55520aa --- /dev/null +++ b/src/main/resources/assets/basesteam/models/item/steam_switch.json @@ -0,0 +1,3 @@ +{ + "parent": "basesteam:block/steam_switch_on" +} \ No newline at end of file diff --git a/src/main/resources/assets/basesteam/models/item/steam_tank.json b/src/main/resources/assets/basesteam/models/item/steam_tank.json new file mode 100644 index 0000000..29cce2c --- /dev/null +++ b/src/main/resources/assets/basesteam/models/item/steam_tank.json @@ -0,0 +1,3 @@ +{ + "parent": "basesteam:block/steam_tank" +} \ No newline at end of file diff --git a/src/main/resources/assets/basesteam/models/item/steam_track.json b/src/main/resources/assets/basesteam/models/item/steam_track.json new file mode 100644 index 0000000..094e2f2 --- /dev/null +++ b/src/main/resources/assets/basesteam/models/item/steam_track.json @@ -0,0 +1,3 @@ +{ + "parent": "basesteam:block/steam_track_ns" +} \ No newline at end of file diff --git a/src/main/resources/assets/steamadvantage/textures/blocks/coal_boiler_front.png b/src/main/resources/assets/basesteam/textures/blocks/coal_boiler_front.png similarity index 100% rename from src/main/resources/assets/steamadvantage/textures/blocks/coal_boiler_front.png rename to src/main/resources/assets/basesteam/textures/blocks/coal_boiler_front.png diff --git a/src/main/resources/assets/steamadvantage/textures/blocks/electric_boiler_back.png b/src/main/resources/assets/basesteam/textures/blocks/electric_boiler_back.png similarity index 100% rename from src/main/resources/assets/steamadvantage/textures/blocks/electric_boiler_back.png rename to src/main/resources/assets/basesteam/textures/blocks/electric_boiler_back.png diff --git a/src/main/resources/assets/steamadvantage/textures/blocks/electric_boiler_front.png b/src/main/resources/assets/basesteam/textures/blocks/electric_boiler_front.png similarity index 100% rename from src/main/resources/assets/steamadvantage/textures/blocks/electric_boiler_front.png rename to src/main/resources/assets/basesteam/textures/blocks/electric_boiler_front.png diff --git a/src/main/resources/assets/steamadvantage/textures/blocks/geothermal_boiler_side.png b/src/main/resources/assets/basesteam/textures/blocks/geothermal_boiler_side.png similarity index 100% rename from src/main/resources/assets/steamadvantage/textures/blocks/geothermal_boiler_side.png rename to src/main/resources/assets/basesteam/textures/blocks/geothermal_boiler_side.png diff --git a/src/main/resources/assets/steamadvantage/textures/blocks/geothermal_boiler_top.png b/src/main/resources/assets/basesteam/textures/blocks/geothermal_boiler_top.png similarity index 100% rename from src/main/resources/assets/steamadvantage/textures/blocks/geothermal_boiler_top.png rename to src/main/resources/assets/basesteam/textures/blocks/geothermal_boiler_top.png diff --git a/src/main/resources/assets/steamadvantage/textures/blocks/oil_tank_end.png b/src/main/resources/assets/basesteam/textures/blocks/oil_tank_end.png similarity index 100% rename from src/main/resources/assets/steamadvantage/textures/blocks/oil_tank_end.png rename to src/main/resources/assets/basesteam/textures/blocks/oil_tank_end.png diff --git a/src/main/resources/assets/steamadvantage/textures/blocks/platform_top.png b/src/main/resources/assets/basesteam/textures/blocks/platform_top.png similarity index 100% rename from src/main/resources/assets/steamadvantage/textures/blocks/platform_top.png rename to src/main/resources/assets/basesteam/textures/blocks/platform_top.png diff --git a/src/main/resources/assets/steamadvantage/textures/blocks/rock_crusher_front.png b/src/main/resources/assets/basesteam/textures/blocks/rock_crusher_front.png similarity index 100% rename from src/main/resources/assets/steamadvantage/textures/blocks/rock_crusher_front.png rename to src/main/resources/assets/basesteam/textures/blocks/rock_crusher_front.png diff --git a/src/main/resources/assets/steamadvantage/textures/blocks/rock_crusher_top.png b/src/main/resources/assets/basesteam/textures/blocks/rock_crusher_top.png similarity index 100% rename from src/main/resources/assets/steamadvantage/textures/blocks/rock_crusher_top.png rename to src/main/resources/assets/basesteam/textures/blocks/rock_crusher_top.png diff --git a/src/main/resources/assets/steamadvantage/textures/blocks/steam_drill_bottom.png b/src/main/resources/assets/basesteam/textures/blocks/steam_drill_bottom.png similarity index 100% rename from src/main/resources/assets/steamadvantage/textures/blocks/steam_drill_bottom.png rename to src/main/resources/assets/basesteam/textures/blocks/steam_drill_bottom.png diff --git a/src/main/resources/assets/steamadvantage/textures/blocks/steam_drill_top.png b/src/main/resources/assets/basesteam/textures/blocks/steam_drill_top.png similarity index 100% rename from src/main/resources/assets/steamadvantage/textures/blocks/steam_drill_top.png rename to src/main/resources/assets/basesteam/textures/blocks/steam_drill_top.png diff --git a/src/main/resources/assets/steamadvantage/textures/blocks/steam_elevator_side.png b/src/main/resources/assets/basesteam/textures/blocks/steam_elevator_side.png similarity index 100% rename from src/main/resources/assets/steamadvantage/textures/blocks/steam_elevator_side.png rename to src/main/resources/assets/basesteam/textures/blocks/steam_elevator_side.png diff --git a/src/main/resources/assets/steamadvantage/textures/blocks/steam_furnace_front.png b/src/main/resources/assets/basesteam/textures/blocks/steam_furnace_front.png similarity index 100% rename from src/main/resources/assets/steamadvantage/textures/blocks/steam_furnace_front.png rename to src/main/resources/assets/basesteam/textures/blocks/steam_furnace_front.png diff --git a/src/main/resources/assets/steamadvantage/textures/blocks/steam_furnace_top.png b/src/main/resources/assets/basesteam/textures/blocks/steam_furnace_top.png similarity index 100% rename from src/main/resources/assets/steamadvantage/textures/blocks/steam_furnace_top.png rename to src/main/resources/assets/basesteam/textures/blocks/steam_furnace_top.png diff --git a/src/main/resources/assets/steamadvantage/textures/blocks/steam_pipe.png b/src/main/resources/assets/basesteam/textures/blocks/steam_pipe.png similarity index 100% rename from src/main/resources/assets/steamadvantage/textures/blocks/steam_pipe.png rename to src/main/resources/assets/basesteam/textures/blocks/steam_pipe.png diff --git a/src/main/resources/assets/steamadvantage/textures/blocks/steam_pump_front.png b/src/main/resources/assets/basesteam/textures/blocks/steam_pump_front.png similarity index 100% rename from src/main/resources/assets/steamadvantage/textures/blocks/steam_pump_front.png rename to src/main/resources/assets/basesteam/textures/blocks/steam_pump_front.png diff --git a/src/main/resources/assets/steamadvantage/textures/blocks/steam_pump_side.png b/src/main/resources/assets/basesteam/textures/blocks/steam_pump_side.png similarity index 100% rename from src/main/resources/assets/steamadvantage/textures/blocks/steam_pump_side.png rename to src/main/resources/assets/basesteam/textures/blocks/steam_pump_side.png diff --git a/src/main/resources/assets/steamadvantage/textures/blocks/steam_switch_off.png b/src/main/resources/assets/basesteam/textures/blocks/steam_switch_off.png similarity index 100% rename from src/main/resources/assets/steamadvantage/textures/blocks/steam_switch_off.png rename to src/main/resources/assets/basesteam/textures/blocks/steam_switch_off.png diff --git a/src/main/resources/assets/steamadvantage/textures/blocks/steam_switch_on.png b/src/main/resources/assets/basesteam/textures/blocks/steam_switch_on.png similarity index 100% rename from src/main/resources/assets/steamadvantage/textures/blocks/steam_switch_on.png rename to src/main/resources/assets/basesteam/textures/blocks/steam_switch_on.png diff --git a/src/main/resources/assets/steamadvantage/textures/entity/drill_bit.png b/src/main/resources/assets/basesteam/textures/entity/drill_bit.png similarity index 100% rename from src/main/resources/assets/steamadvantage/textures/entity/drill_bit.png rename to src/main/resources/assets/basesteam/textures/entity/drill_bit.png diff --git a/src/main/resources/assets/steamadvantage/textures/gui/container/coal_boiler.png b/src/main/resources/assets/basesteam/textures/gui/container/coal_boiler.png similarity index 100% rename from src/main/resources/assets/steamadvantage/textures/gui/container/coal_boiler.png rename to src/main/resources/assets/basesteam/textures/gui/container/coal_boiler.png diff --git a/src/main/resources/assets/steamadvantage/textures/gui/container/electric_boiler.png b/src/main/resources/assets/basesteam/textures/gui/container/electric_boiler.png similarity index 100% rename from src/main/resources/assets/steamadvantage/textures/gui/container/electric_boiler.png rename to src/main/resources/assets/basesteam/textures/gui/container/electric_boiler.png diff --git a/src/main/resources/assets/steamadvantage/textures/gui/container/geothermal_boiler.png b/src/main/resources/assets/basesteam/textures/gui/container/geothermal_boiler.png similarity index 100% rename from src/main/resources/assets/steamadvantage/textures/gui/container/geothermal_boiler.png rename to src/main/resources/assets/basesteam/textures/gui/container/geothermal_boiler.png diff --git a/src/main/resources/assets/steamadvantage/textures/gui/container/oil_boiler.png b/src/main/resources/assets/basesteam/textures/gui/container/oil_boiler.png similarity index 100% rename from src/main/resources/assets/steamadvantage/textures/gui/container/oil_boiler.png rename to src/main/resources/assets/basesteam/textures/gui/container/oil_boiler.png diff --git a/src/main/resources/assets/steamadvantage/textures/gui/container/rock_crusher.png b/src/main/resources/assets/basesteam/textures/gui/container/rock_crusher.png similarity index 100% rename from src/main/resources/assets/steamadvantage/textures/gui/container/rock_crusher.png rename to src/main/resources/assets/basesteam/textures/gui/container/rock_crusher.png diff --git a/src/main/resources/assets/steamadvantage/textures/gui/container/steam_drill.png b/src/main/resources/assets/basesteam/textures/gui/container/steam_drill.png similarity index 100% rename from src/main/resources/assets/steamadvantage/textures/gui/container/steam_drill.png rename to src/main/resources/assets/basesteam/textures/gui/container/steam_drill.png diff --git a/src/main/resources/assets/steamadvantage/textures/gui/container/steam_furnace.png b/src/main/resources/assets/basesteam/textures/gui/container/steam_furnace.png similarity index 100% rename from src/main/resources/assets/steamadvantage/textures/gui/container/steam_furnace.png rename to src/main/resources/assets/basesteam/textures/gui/container/steam_furnace.png diff --git a/src/main/resources/assets/steamadvantage/textures/gui/container/steam_pump.png b/src/main/resources/assets/basesteam/textures/gui/container/steam_pump.png similarity index 100% rename from src/main/resources/assets/steamadvantage/textures/gui/container/steam_pump.png rename to src/main/resources/assets/basesteam/textures/gui/container/steam_pump.png diff --git a/src/main/resources/assets/steamadvantage/textures/gui/container/steam_still.png b/src/main/resources/assets/basesteam/textures/gui/container/steam_still.png similarity index 100% rename from src/main/resources/assets/steamadvantage/textures/gui/container/steam_still.png rename to src/main/resources/assets/basesteam/textures/gui/container/steam_still.png diff --git a/src/main/resources/assets/steamadvantage/textures/gui/container/steam_tank.png b/src/main/resources/assets/basesteam/textures/gui/container/steam_tank.png similarity index 100% rename from src/main/resources/assets/steamadvantage/textures/gui/container/steam_tank.png rename to src/main/resources/assets/basesteam/textures/gui/container/steam_tank.png diff --git a/src/main/resources/assets/steamadvantage/textures/items/blackpowder_cartridge.png b/src/main/resources/assets/basesteam/textures/items/blackpowder_cartridge.png similarity index 100% rename from src/main/resources/assets/steamadvantage/textures/items/blackpowder_cartridge.png rename to src/main/resources/assets/basesteam/textures/items/blackpowder_cartridge.png diff --git a/src/main/resources/assets/steamadvantage/textures/items/steam_drill_bit.png b/src/main/resources/assets/basesteam/textures/items/steam_drill_bit.png similarity index 100% rename from src/main/resources/assets/steamadvantage/textures/items/steam_drill_bit.png rename to src/main/resources/assets/basesteam/textures/items/steam_drill_bit.png diff --git a/src/main/resources/assets/steamadvantage/textures/items/steam_governor.png b/src/main/resources/assets/basesteam/textures/items/steam_governor.png similarity index 100% rename from src/main/resources/assets/steamadvantage/textures/items/steam_governor.png rename to src/main/resources/assets/basesteam/textures/items/steam_governor.png diff --git a/src/main/resources/assets/steamadvantage/textures/materials/bolted_brass.png b/src/main/resources/assets/basesteam/textures/materials/bolted_brass.png similarity index 100% rename from src/main/resources/assets/steamadvantage/textures/materials/bolted_brass.png rename to src/main/resources/assets/basesteam/textures/materials/bolted_brass.png diff --git a/src/main/resources/assets/steamadvantage/textures/materials/bolted_copper.png b/src/main/resources/assets/basesteam/textures/materials/bolted_copper.png similarity index 100% rename from src/main/resources/assets/steamadvantage/textures/materials/bolted_copper.png rename to src/main/resources/assets/basesteam/textures/materials/bolted_copper.png diff --git a/src/main/resources/assets/steamadvantage/textures/materials/bolted_iron.png b/src/main/resources/assets/basesteam/textures/materials/bolted_iron.png similarity index 100% rename from src/main/resources/assets/steamadvantage/textures/materials/bolted_iron.png rename to src/main/resources/assets/basesteam/textures/materials/bolted_iron.png diff --git a/src/main/resources/assets/steamadvantage/textures/materials/iron.png b/src/main/resources/assets/basesteam/textures/materials/iron.png similarity index 100% rename from src/main/resources/assets/steamadvantage/textures/materials/iron.png rename to src/main/resources/assets/basesteam/textures/materials/iron.png diff --git a/src/main/resources/assets/steamadvantage/textures/materials/steel_dark_hole.png b/src/main/resources/assets/basesteam/textures/materials/steel_dark_hole.png similarity index 100% rename from src/main/resources/assets/steamadvantage/textures/materials/steel_dark_hole.png rename to src/main/resources/assets/basesteam/textures/materials/steel_dark_hole.png diff --git a/src/main/resources/assets/steamadvantage/textures/materials/wood_panel.png b/src/main/resources/assets/basesteam/textures/materials/wood_panel.png similarity index 100% rename from src/main/resources/assets/steamadvantage/textures/materials/wood_panel.png rename to src/main/resources/assets/basesteam/textures/materials/wood_panel.png diff --git a/src/main/resources/assets/steamadvantage/blockstates/drillbit.json b/src/main/resources/assets/steamadvantage/blockstates/drillbit.json deleted file mode 100644 index 11193f9..0000000 --- a/src/main/resources/assets/steamadvantage/blockstates/drillbit.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "variants": { - "": { "model": "steamadvantage:block/drillbit" } - } -} \ No newline at end of file diff --git a/src/main/resources/assets/steamadvantage/blockstates/platform.json b/src/main/resources/assets/steamadvantage/blockstates/platform.json deleted file mode 100644 index 1164d69..0000000 --- a/src/main/resources/assets/steamadvantage/blockstates/platform.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "variants": { - "height=0": { "model": "steamadvantage:block/platform_shaft" }, - "height=1": { "model": "steamadvantage:block/platform1" }, - "height=2": { "model": "steamadvantage:block/platform2" }, - "height=3": { "model": "steamadvantage:block/platform3" }, - "height=4": { "model": "steamadvantage:block/platform4" } - } -} diff --git a/src/main/resources/assets/steamadvantage/blockstates/pump_pipe_steam.json b/src/main/resources/assets/steamadvantage/blockstates/pump_pipe_steam.json deleted file mode 100644 index a25407b..0000000 --- a/src/main/resources/assets/steamadvantage/blockstates/pump_pipe_steam.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "variants": { - "": {"model": "poweradvantage:block/fluid_pipe_ns", "x": 90, "y": 0, "uvlock": false } - } -} diff --git a/src/main/resources/assets/steamadvantage/blockstates/steam_boiler_coal.json b/src/main/resources/assets/steamadvantage/blockstates/steam_boiler_coal.json deleted file mode 100644 index fec399a..0000000 --- a/src/main/resources/assets/steamadvantage/blockstates/steam_boiler_coal.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "variants": { - "facing=east": { "model": "steamadvantage:block/steam_boiler_coal", "y": 90 }, - "facing=north": { "model": "steamadvantage:block/steam_boiler_coal" }, - "facing=south": { "model": "steamadvantage:block/steam_boiler_coal", "y": 180 }, - "facing=west": { "model": "steamadvantage:block/steam_boiler_coal", "y": 270 } - } -} diff --git a/src/main/resources/assets/steamadvantage/blockstates/steam_boiler_electric.json b/src/main/resources/assets/steamadvantage/blockstates/steam_boiler_electric.json deleted file mode 100644 index 0425ce6..0000000 --- a/src/main/resources/assets/steamadvantage/blockstates/steam_boiler_electric.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "variants": { - "facing=east": { "model": "steamadvantage:block/steam_boiler_electric", "y": 90 }, - "facing=north": { "model": "steamadvantage:block/steam_boiler_electric" }, - "facing=south": { "model": "steamadvantage:block/steam_boiler_electric", "y": 180 }, - "facing=west": { "model": "steamadvantage:block/steam_boiler_electric", "y": 270 } - } -} diff --git a/src/main/resources/assets/steamadvantage/blockstates/steam_boiler_geothermal.json b/src/main/resources/assets/steamadvantage/blockstates/steam_boiler_geothermal.json deleted file mode 100644 index 5ee6510..0000000 --- a/src/main/resources/assets/steamadvantage/blockstates/steam_boiler_geothermal.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "variants": { - "facing=east": { "model": "steamadvantage:block/steam_boiler_geothermal", "y": 90 }, - "facing=north": { "model": "steamadvantage:block/steam_boiler_geothermal" }, - "facing=south": { "model": "steamadvantage:block/steam_boiler_geothermal", "y": 180 }, - "facing=west": { "model": "steamadvantage:block/steam_boiler_geothermal", "y": 270 } - } -} diff --git a/src/main/resources/assets/steamadvantage/blockstates/steam_boiler_oil.json b/src/main/resources/assets/steamadvantage/blockstates/steam_boiler_oil.json deleted file mode 100644 index 047758d..0000000 --- a/src/main/resources/assets/steamadvantage/blockstates/steam_boiler_oil.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "variants": { - "facing=east": { "model": "steamadvantage:block/steam_boiler_oil", "x":270, "y": 90 }, - "facing=north": { "model": "steamadvantage:block/steam_boiler_oil", "x":270 }, - "facing=south": { "model": "steamadvantage:block/steam_boiler_oil", "x":270, "y": 180 }, - "facing=west": { "model": "steamadvantage:block/steam_boiler_oil", "x":270, "y": 270 } - } -} diff --git a/src/main/resources/assets/steamadvantage/blockstates/steam_crusher.json b/src/main/resources/assets/steamadvantage/blockstates/steam_crusher.json deleted file mode 100644 index f59a3de..0000000 --- a/src/main/resources/assets/steamadvantage/blockstates/steam_crusher.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "variants": { - "facing=east": { "model": "steamadvantage:block/steam_crusher", "y": 90 }, - "facing=north": { "model": "steamadvantage:block/steam_crusher" }, - "facing=south": { "model": "steamadvantage:block/steam_crusher", "y": 180 }, - "facing=west": { "model": "steamadvantage:block/steam_crusher", "y": 270 } - } -} diff --git a/src/main/resources/assets/steamadvantage/blockstates/steam_drill.json b/src/main/resources/assets/steamadvantage/blockstates/steam_drill.json deleted file mode 100644 index 7dcd03a..0000000 --- a/src/main/resources/assets/steamadvantage/blockstates/steam_drill.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "variants": { - "facing=down": { "model": "steamadvantage:block/steam_drill", "x": 90 }, - "facing=up": { "model": "steamadvantage:block/steam_drill", "x": 270 }, - "facing=east": { "model": "steamadvantage:block/steam_drill", "y": 90 }, - "facing=north": { "model": "steamadvantage:block/steam_drill" }, - "facing=south": { "model": "steamadvantage:block/steam_drill", "y": 180 }, - "facing=west": { "model": "steamadvantage:block/steam_drill", "y": 270 } - } -} diff --git a/src/main/resources/assets/steamadvantage/blockstates/steam_elevator.json b/src/main/resources/assets/steamadvantage/blockstates/steam_elevator.json deleted file mode 100644 index 43d6a7d..0000000 --- a/src/main/resources/assets/steamadvantage/blockstates/steam_elevator.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "variants": { - "facing=east": { "model": "steamadvantage:block/steam_elevator", "y": 90}, - "facing=north": { "model": "steamadvantage:block/steam_elevator" }, - "facing=south": { "model": "steamadvantage:block/steam_elevator", "y": 180}, - "facing=west": { "model": "steamadvantage:block/steam_elevator", "y": 270} - } -} diff --git a/src/main/resources/assets/steamadvantage/blockstates/steam_furnace.json b/src/main/resources/assets/steamadvantage/blockstates/steam_furnace.json deleted file mode 100644 index 74a07fa..0000000 --- a/src/main/resources/assets/steamadvantage/blockstates/steam_furnace.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "variants": { - "facing=east": { "model": "steamadvantage:block/steam_furnace", "y": 90 }, - "facing=north": { "model": "steamadvantage:block/steam_furnace" }, - "facing=south": { "model": "steamadvantage:block/steam_furnace", "y": 180 }, - "facing=west": { "model": "steamadvantage:block/steam_furnace", "y": 270 } - } -} diff --git a/src/main/resources/assets/steamadvantage/blockstates/steam_pipe.json b/src/main/resources/assets/steamadvantage/blockstates/steam_pipe.json deleted file mode 100644 index 26d2eee..0000000 --- a/src/main/resources/assets/steamadvantage/blockstates/steam_pipe.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "__comment": "blockstate parameters MUST be in alphabetical order!", - "variants": { - "down=false,east=false,north=false,south=false,up=false,west=false": { "model": "steamadvantage:block/steam_pipe_ensw", "x": 0, "y": 0, "uvlock": false }, - "down=true,east=false,north=false,south=false,up=false,west=false": { "model": "steamadvantage:block/steam_pipe_n", "x": 90, "y": 0, "uvlock": false }, - "down=false,east=true,north=false,south=false,up=false,west=false": { "model": "steamadvantage:block/steam_pipe_n", "x": 0, "y": 90, "uvlock": false }, - "down=false,east=false,north=true,south=false,up=false,west=false": { "model": "steamadvantage:block/steam_pipe_n", "x": 0, "y": 0, "uvlock": false }, - "down=false,east=false,north=false,south=true,up=false,west=false": { "model": "steamadvantage:block/steam_pipe_n", "x": 0, "y": 180, "uvlock": false }, - "down=false,east=false,north=false,south=false,up=true,west=false": { "model": "steamadvantage:block/steam_pipe_n", "x": 270, "y": 0, "uvlock": false }, - "down=false,east=false,north=false,south=false,up=false,west=true": { "model": "steamadvantage:block/steam_pipe_n", "x": 0, "y": 270, "uvlock": false }, - "down=true,east=true,north=false,south=false,up=false,west=false": { "model": "steamadvantage:block/steam_pipe_nw", "x": 90, "y": 180, "uvlock": false }, - "down=true,east=false,north=true,south=false,up=false,west=false": { "model": "steamadvantage:block/steam_pipe_nw", "x": 90, "y": 90, "uvlock": false }, - "down=true,east=false,north=false,south=true,up=false,west=false": { "model": "steamadvantage:block/steam_pipe_nw", "x": 90, "y": 270, "uvlock": false }, - "down=true,east=false,north=false,south=false,up=true,west=false": { "model": "steamadvantage:block/steam_pipe_ns", "x": 90, "y": 0, "uvlock": false }, - "down=true,east=false,north=false,south=false,up=false,west=true": { "model": "steamadvantage:block/steam_pipe_nw", "x": 90, "y": 0, "uvlock": false }, - "down=false,east=true,north=true,south=false,up=false,west=false": { "model": "steamadvantage:block/steam_pipe_nw", "x": 0, "y": 90, "uvlock": false }, - "down=false,east=true,north=false,south=true,up=false,west=false": { "model": "steamadvantage:block/steam_pipe_nw", "x": 0, "y": 180, "uvlock": false }, - "down=false,east=true,north=false,south=false,up=true,west=false": { "model": "steamadvantage:block/steam_pipe_nw", "x": 270, "y": 180, "uvlock": false }, - "down=false,east=true,north=false,south=false,up=false,west=true": { "model": "steamadvantage:block/steam_pipe_ns", "x": 0, "y": 90, "uvlock": false }, - "down=false,east=false,north=true,south=true,up=false,west=false": { "model": "steamadvantage:block/steam_pipe_ns", "x": 0, "y": 0, "uvlock": false }, - "down=false,east=false,north=true,south=false,up=true,west=false": { "model": "steamadvantage:block/steam_pipe_nw", "x": 270, "y": 90, "uvlock": false }, - "down=false,east=false,north=true,south=false,up=false,west=true": { "model": "steamadvantage:block/steam_pipe_nw", "x": 0, "y": 0, "uvlock": false }, - "down=false,east=false,north=false,south=true,up=true,west=false": { "model": "steamadvantage:block/steam_pipe_nw", "x": 270, "y": 270, "uvlock": false }, - "down=false,east=false,north=false,south=true,up=false,west=true": { "model": "steamadvantage:block/steam_pipe_nw", "x": 0, "y": 270, "uvlock": false }, - "down=false,east=false,north=false,south=false,up=true,west=true": { "model": "steamadvantage:block/steam_pipe_nw", "x": 270, "y": 0, "uvlock": false }, - "down=true,east=true,north=true,south=false,up=false,west=false": { "model": "steamadvantage:block/steam_pipe_nuw", "x": 90, "y": 90, "uvlock": false }, - "down=true,east=true,north=false,south=true,up=false,west=false": { "model": "steamadvantage:block/steam_pipe_nuw", "x": 90, "y": 180, "uvlock": false }, - "down=true,east=true,north=false,south=false,up=true,west=false": { "model": "steamadvantage:block/steam_pipe_dnu", "x": 0, "y": 90, "uvlock": false }, - "down=true,east=true,north=false,south=false,up=false,west=true": { "model": "steamadvantage:block/steam_pipe_dnu", "x": 90, "y": 90, "uvlock": false }, - "down=true,east=false,north=true,south=true,up=false,west=false": { "model": "steamadvantage:block/steam_pipe_dnu", "x": 90, "y": 0, "uvlock": false }, - "down=true,east=false,north=true,south=false,up=true,west=false": { "model": "steamadvantage:block/steam_pipe_dnu", "x": 0, "y": 0, "uvlock": false }, - "down=true,east=false,north=true,south=false,up=false,west=true": { "model": "steamadvantage:block/steam_pipe_nuw", "x": 90, "y": 0, "uvlock": false }, - "down=true,east=false,north=false,south=true,up=true,west=false": { "model": "steamadvantage:block/steam_pipe_dnu", "x": 0, "y": 180, "uvlock": false }, - "down=true,east=false,north=false,south=true,up=false,west=true": { "model": "steamadvantage:block/steam_pipe_nuw", "x": 90, "y": 270, "uvlock": false }, - "down=true,east=false,north=false,south=false,up=true,west=true": { "model": "steamadvantage:block/steam_pipe_dnu", "x": 0, "y": 270, "uvlock": false }, - "down=false,east=true,north=true,south=true,up=false,west=false": { "model": "steamadvantage:block/steam_pipe_nsw", "x": 0, "y": 180, "uvlock": false }, - "down=false,east=true,north=true,south=false,up=true,west=false": { "model": "steamadvantage:block/steam_pipe_nuw", "x": 0, "y": 90, "uvlock": false }, - "down=false,east=true,north=true,south=false,up=false,west=true": { "model": "steamadvantage:block/steam_pipe_nsw", "x": 0, "y": 90, "uvlock": false }, - "down=false,east=true,north=false,south=true,up=true,west=false": { "model": "steamadvantage:block/steam_pipe_nuw", "x": 0, "y": 180, "uvlock": false }, - "down=false,east=true,north=false,south=true,up=false,west=true": { "model": "steamadvantage:block/steam_pipe_nsw", "x": 0, "y": 270, "uvlock": false }, - "down=false,east=true,north=false,south=false,up=true,west=true": { "model": "steamadvantage:block/steam_pipe_dnu", "x": 270, "y": 90, "uvlock": false }, - "down=false,east=false,north=true,south=true,up=true,west=false": { "model": "steamadvantage:block/steam_pipe_dnu", "x": 270, "y": 0, "uvlock": false }, - "down=false,east=false,north=true,south=true,up=false,west=true": { "model": "steamadvantage:block/steam_pipe_nsw", "x": 0, "y": 0, "uvlock": false }, - "down=false,east=false,north=true,south=false,up=true,west=true": { "model": "steamadvantage:block/steam_pipe_nuw", "x": 0, "y": 0, "uvlock": false }, - "down=false,east=false,north=false,south=true,up=true,west=true": { "model": "steamadvantage:block/steam_pipe_nuw", "x": 0, "y": 270, "uvlock": false }, - "down=true,east=true,north=true,south=true,up=false,west=false": { "model": "steamadvantage:block/steam_pipe_nsuw", "x": 180, "y": 180, "uvlock": false }, - "down=true,east=true,north=true,south=false,up=true,west=false": { "model": "steamadvantage:block/steam_pipe_nsuw", "x": 90, "y": 90, "uvlock": false }, - "down=true,east=true,north=true,south=false,up=false,west=true": { "model": "steamadvantage:block/steam_pipe_nsuw", "x": 180, "y": 90, "uvlock": false }, - "down=true,east=true,north=false,south=true,up=true,west=false": { "model": "steamadvantage:block/steam_pipe_nsuw", "x": 90, "y": 180, "uvlock": false }, - "down=true,east=true,north=false,south=true,up=false,west=true": { "model": "steamadvantage:block/steam_pipe_nsuw", "x": 180, "y": 270, "uvlock": false }, - "down=true,east=true,north=false,south=false,up=true,west=true": { "model": "steamadvantage:block/steam_pipe_ensw", "x": 90, "y": 0, "uvlock": false }, - "down=true,east=false,north=true,south=true,up=true,west=false": { "model": "steamadvantage:block/steam_pipe_ensw", "x": 90, "y": 90, "uvlock": false }, - "down=true,east=false,north=true,south=true,up=false,west=true": { "model": "steamadvantage:block/steam_pipe_nsuw", "x": 180, "y": 0, "uvlock": false }, - "down=true,east=false,north=true,south=false,up=true,west=true": { "model": "steamadvantage:block/steam_pipe_nsuw", "x": 90, "y": 0, "uvlock": false }, - "down=true,east=false,north=false,south=true,up=true,west=true": { "model": "steamadvantage:block/steam_pipe_nsuw", "x": 90, "y": 270, "uvlock": false }, - "down=false,east=true,north=true,south=true,up=true,west=false": { "model": "steamadvantage:block/steam_pipe_nsuw", "x": 0, "y": 180, "uvlock": false }, - "down=false,east=true,north=true,south=true,up=false,west=true": { "model": "steamadvantage:block/steam_pipe_ensw", "x": 0, "y": 0, "uvlock": false }, - "down=false,east=true,north=true,south=false,up=true,west=true": { "model": "steamadvantage:block/steam_pipe_nsuw", "x": 0, "y": 90, "uvlock": false }, - "down=false,east=true,north=false,south=true,up=true,west=true": { "model": "steamadvantage:block/steam_pipe_nsuw", "x": 0, "y": 270, "uvlock": false }, - "down=false,east=false,north=true,south=true,up=true,west=true": { "model": "steamadvantage:block/steam_pipe_nsuw", "x": 0, "y": 0, "uvlock": false }, - "down=true,east=true,north=true,south=true,up=true,west=false": { "model": "steamadvantage:block/steam_pipe_desuw", "x": 0, "y": 270, "uvlock": false }, - "down=true,east=true,north=true,south=true,up=false,west=true": { "model": "steamadvantage:block/steam_pipe_desuw", "x": 270, "y": 0, "uvlock": false }, - "down=true,east=true,north=true,south=false,up=true,west=true": { "model": "steamadvantage:block/steam_pipe_desuw", "x": 0, "y": 180, "uvlock": false }, - "down=true,east=true,north=false,south=true,up=true,west=true": { "model": "steamadvantage:block/steam_pipe_desuw", "x": 0, "y": 0, "uvlock": false }, - "down=true,east=false,north=true,south=true,up=true,west=true": { "model": "steamadvantage:block/steam_pipe_desuw", "x": 0, "y": 90, "uvlock": false }, - "down=false,east=true,north=true,south=true,up=true,west=true": { "model": "steamadvantage:block/steam_pipe_desuw", "x": 90, "y": 0, "uvlock": false }, - "down=true,east=true,north=true,south=true,up=true,west=true": { "model": "steamadvantage:block/steam_pipe_densuw", "x": 0, "y": 0, "uvlock": false } - - } -} \ No newline at end of file diff --git a/src/main/resources/assets/steamadvantage/blockstates/steam_pump.json b/src/main/resources/assets/steamadvantage/blockstates/steam_pump.json deleted file mode 100644 index de4ee6c..0000000 --- a/src/main/resources/assets/steamadvantage/blockstates/steam_pump.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "variants": { - "facing=east": { "model": "steamadvantage:block/steam_pump", "y": 90 }, - "facing=north": { "model": "steamadvantage:block/steam_pump" }, - "facing=south": { "model": "steamadvantage:block/steam_pump", "y": 180 }, - "facing=west": { "model": "steamadvantage:block/steam_pump", "y": 270 } - } -} diff --git a/src/main/resources/assets/steamadvantage/blockstates/steam_still.json b/src/main/resources/assets/steamadvantage/blockstates/steam_still.json deleted file mode 100644 index dacd7c7..0000000 --- a/src/main/resources/assets/steamadvantage/blockstates/steam_still.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "variants": { - "facing=east": { "model": "steamadvantage:block/steam_still", "y": 90 }, - "facing=north": { "model": "steamadvantage:block/steam_still" }, - "facing=south": { "model": "steamadvantage:block/steam_still", "y": 180 }, - "facing=west": { "model": "steamadvantage:block/steam_still", "y": 270 } - } -} diff --git a/src/main/resources/assets/steamadvantage/blockstates/steam_switch.json b/src/main/resources/assets/steamadvantage/blockstates/steam_switch.json deleted file mode 100644 index 8e68320..0000000 --- a/src/main/resources/assets/steamadvantage/blockstates/steam_switch.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "variants": { - "active=false": { "model": "steamadvantage:block/steam_switch_off"}, - "active=true": { "model": "steamadvantage:block/steam_switch_on"} - } -} diff --git a/src/main/resources/assets/steamadvantage/blockstates/steam_tank.json b/src/main/resources/assets/steamadvantage/blockstates/steam_tank.json deleted file mode 100644 index ac7be61..0000000 --- a/src/main/resources/assets/steamadvantage/blockstates/steam_tank.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "variants": { - "facing=east": { "model": "steamadvantage:block/steam_tank", "y": 90, "uvlock": true }, - "facing=north": { "model": "steamadvantage:block/steam_tank", "uvlock": true }, - "facing=south": { "model": "steamadvantage:block/steam_tank", "y": 180, "uvlock": true }, - "facing=west": { "model": "steamadvantage:block/steam_tank", "y": 270, "uvlock": true } - } -} diff --git a/src/main/resources/assets/steamadvantage/blockstates/steam_track.json b/src/main/resources/assets/steamadvantage/blockstates/steam_track.json deleted file mode 100644 index a536b3e..0000000 --- a/src/main/resources/assets/steamadvantage/blockstates/steam_track.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "__comment": "blockstate parameters MUST be in alphabetical order!", - "variants": { - "down=false,east=false,north=false,south=false,up=false,west=false": { "model": "steamadvantage:block/steam_track_ensw", "x": 0, "y": 0, "uvlock": false }, - "down=true,east=false,north=false,south=false,up=false,west=false": { "model": "steamadvantage:block/steam_track_n", "x": 90, "y": 0, "uvlock": false }, - "down=false,east=true,north=false,south=false,up=false,west=false": { "model": "steamadvantage:block/steam_track_n", "x": 0, "y": 90, "uvlock": false }, - "down=false,east=false,north=true,south=false,up=false,west=false": { "model": "steamadvantage:block/steam_track_n", "x": 0, "y": 0, "uvlock": false }, - "down=false,east=false,north=false,south=true,up=false,west=false": { "model": "steamadvantage:block/steam_track_n", "x": 0, "y": 180, "uvlock": false }, - "down=false,east=false,north=false,south=false,up=true,west=false": { "model": "steamadvantage:block/steam_track_n", "x": 270, "y": 0, "uvlock": false }, - "down=false,east=false,north=false,south=false,up=false,west=true": { "model": "steamadvantage:block/steam_track_n", "x": 0, "y": 270, "uvlock": false }, - "down=true,east=true,north=false,south=false,up=false,west=false": { "model": "steamadvantage:block/steam_track_nw", "x": 90, "y": 180, "uvlock": false }, - "down=true,east=false,north=true,south=false,up=false,west=false": { "model": "steamadvantage:block/steam_track_nw", "x": 90, "y": 90, "uvlock": false }, - "down=true,east=false,north=false,south=true,up=false,west=false": { "model": "steamadvantage:block/steam_track_nw", "x": 90, "y": 270, "uvlock": false }, - "down=true,east=false,north=false,south=false,up=true,west=false": { "model": "steamadvantage:block/steam_track_ns", "x": 90, "y": 0, "uvlock": false }, - "down=true,east=false,north=false,south=false,up=false,west=true": { "model": "steamadvantage:block/steam_track_nw", "x": 90, "y": 0, "uvlock": false }, - "down=false,east=true,north=true,south=false,up=false,west=false": { "model": "steamadvantage:block/steam_track_nw", "x": 0, "y": 90, "uvlock": false }, - "down=false,east=true,north=false,south=true,up=false,west=false": { "model": "steamadvantage:block/steam_track_nw", "x": 0, "y": 180, "uvlock": false }, - "down=false,east=true,north=false,south=false,up=true,west=false": { "model": "steamadvantage:block/steam_track_nw", "x": 270, "y": 180, "uvlock": false }, - "down=false,east=true,north=false,south=false,up=false,west=true": { "model": "steamadvantage:block/steam_track_ns", "x": 0, "y": 90, "uvlock": false }, - "down=false,east=false,north=true,south=true,up=false,west=false": { "model": "steamadvantage:block/steam_track_ns", "x": 0, "y": 0, "uvlock": false }, - "down=false,east=false,north=true,south=false,up=true,west=false": { "model": "steamadvantage:block/steam_track_nw", "x": 270, "y": 90, "uvlock": false }, - "down=false,east=false,north=true,south=false,up=false,west=true": { "model": "steamadvantage:block/steam_track_nw", "x": 0, "y": 0, "uvlock": false }, - "down=false,east=false,north=false,south=true,up=true,west=false": { "model": "steamadvantage:block/steam_track_nw", "x": 270, "y": 270, "uvlock": false }, - "down=false,east=false,north=false,south=true,up=false,west=true": { "model": "steamadvantage:block/steam_track_nw", "x": 0, "y": 270, "uvlock": false }, - "down=false,east=false,north=false,south=false,up=true,west=true": { "model": "steamadvantage:block/steam_track_nw", "x": 270, "y": 0, "uvlock": false }, - "down=true,east=true,north=true,south=false,up=false,west=false": { "model": "steamadvantage:block/steam_track_nuw", "x": 90, "y": 90, "uvlock": false }, - "down=true,east=true,north=false,south=true,up=false,west=false": { "model": "steamadvantage:block/steam_track_nuw", "x": 90, "y": 180, "uvlock": false }, - "down=true,east=true,north=false,south=false,up=true,west=false": { "model": "steamadvantage:block/steam_track_dnu", "x": 0, "y": 90, "uvlock": false }, - "down=true,east=true,north=false,south=false,up=false,west=true": { "model": "steamadvantage:block/steam_track_dnu", "x": 90, "y": 90, "uvlock": false }, - "down=true,east=false,north=true,south=true,up=false,west=false": { "model": "steamadvantage:block/steam_track_dnu", "x": 90, "y": 0, "uvlock": false }, - "down=true,east=false,north=true,south=false,up=true,west=false": { "model": "steamadvantage:block/steam_track_dnu", "x": 0, "y": 0, "uvlock": false }, - "down=true,east=false,north=true,south=false,up=false,west=true": { "model": "steamadvantage:block/steam_track_nuw", "x": 90, "y": 0, "uvlock": false }, - "down=true,east=false,north=false,south=true,up=true,west=false": { "model": "steamadvantage:block/steam_track_dnu", "x": 0, "y": 180, "uvlock": false }, - "down=true,east=false,north=false,south=true,up=false,west=true": { "model": "steamadvantage:block/steam_track_nuw", "x": 90, "y": 270, "uvlock": false }, - "down=true,east=false,north=false,south=false,up=true,west=true": { "model": "steamadvantage:block/steam_track_dnu", "x": 0, "y": 270, "uvlock": false }, - "down=false,east=true,north=true,south=true,up=false,west=false": { "model": "steamadvantage:block/steam_track_nsw", "x": 0, "y": 180, "uvlock": false }, - "down=false,east=true,north=true,south=false,up=true,west=false": { "model": "steamadvantage:block/steam_track_nuw", "x": 0, "y": 90, "uvlock": false }, - "down=false,east=true,north=true,south=false,up=false,west=true": { "model": "steamadvantage:block/steam_track_nsw", "x": 0, "y": 90, "uvlock": false }, - "down=false,east=true,north=false,south=true,up=true,west=false": { "model": "steamadvantage:block/steam_track_nuw", "x": 0, "y": 180, "uvlock": false }, - "down=false,east=true,north=false,south=true,up=false,west=true": { "model": "steamadvantage:block/steam_track_nsw", "x": 0, "y": 270, "uvlock": false }, - "down=false,east=true,north=false,south=false,up=true,west=true": { "model": "steamadvantage:block/steam_track_dnu", "x": 270, "y": 90, "uvlock": false }, - "down=false,east=false,north=true,south=true,up=true,west=false": { "model": "steamadvantage:block/steam_track_dnu", "x": 270, "y": 0, "uvlock": false }, - "down=false,east=false,north=true,south=true,up=false,west=true": { "model": "steamadvantage:block/steam_track_nsw", "x": 0, "y": 0, "uvlock": false }, - "down=false,east=false,north=true,south=false,up=true,west=true": { "model": "steamadvantage:block/steam_track_nuw", "x": 0, "y": 0, "uvlock": false }, - "down=false,east=false,north=false,south=true,up=true,west=true": { "model": "steamadvantage:block/steam_track_nuw", "x": 0, "y": 270, "uvlock": false }, - "down=true,east=true,north=true,south=true,up=false,west=false": { "model": "steamadvantage:block/steam_track_nsuw", "x": 180, "y": 180, "uvlock": false }, - "down=true,east=true,north=true,south=false,up=true,west=false": { "model": "steamadvantage:block/steam_track_nsuw", "x": 90, "y": 90, "uvlock": false }, - "down=true,east=true,north=true,south=false,up=false,west=true": { "model": "steamadvantage:block/steam_track_nsuw", "x": 180, "y": 90, "uvlock": false }, - "down=true,east=true,north=false,south=true,up=true,west=false": { "model": "steamadvantage:block/steam_track_nsuw", "x": 90, "y": 180, "uvlock": false }, - "down=true,east=true,north=false,south=true,up=false,west=true": { "model": "steamadvantage:block/steam_track_nsuw", "x": 180, "y": 270, "uvlock": false }, - "down=true,east=true,north=false,south=false,up=true,west=true": { "model": "steamadvantage:block/steam_track_ensw", "x": 90, "y": 0, "uvlock": false }, - "down=true,east=false,north=true,south=true,up=true,west=false": { "model": "steamadvantage:block/steam_track_ensw", "x": 90, "y": 90, "uvlock": false }, - "down=true,east=false,north=true,south=true,up=false,west=true": { "model": "steamadvantage:block/steam_track_nsuw", "x": 180, "y": 0, "uvlock": false }, - "down=true,east=false,north=true,south=false,up=true,west=true": { "model": "steamadvantage:block/steam_track_nsuw", "x": 90, "y": 0, "uvlock": false }, - "down=true,east=false,north=false,south=true,up=true,west=true": { "model": "steamadvantage:block/steam_track_nsuw", "x": 90, "y": 270, "uvlock": false }, - "down=false,east=true,north=true,south=true,up=true,west=false": { "model": "steamadvantage:block/steam_track_nsuw", "x": 0, "y": 180, "uvlock": false }, - "down=false,east=true,north=true,south=true,up=false,west=true": { "model": "steamadvantage:block/steam_track_ensw", "x": 0, "y": 0, "uvlock": false }, - "down=false,east=true,north=true,south=false,up=true,west=true": { "model": "steamadvantage:block/steam_track_nsuw", "x": 0, "y": 90, "uvlock": false }, - "down=false,east=true,north=false,south=true,up=true,west=true": { "model": "steamadvantage:block/steam_track_nsuw", "x": 0, "y": 270, "uvlock": false }, - "down=false,east=false,north=true,south=true,up=true,west=true": { "model": "steamadvantage:block/steam_track_nsuw", "x": 0, "y": 0, "uvlock": false }, - "down=true,east=true,north=true,south=true,up=true,west=false": { "model": "steamadvantage:block/steam_track_desuw", "x": 0, "y": 270, "uvlock": false }, - "down=true,east=true,north=true,south=true,up=false,west=true": { "model": "steamadvantage:block/steam_track_desuw", "x": 270, "y": 0, "uvlock": false }, - "down=true,east=true,north=true,south=false,up=true,west=true": { "model": "steamadvantage:block/steam_track_desuw", "x": 0, "y": 180, "uvlock": false }, - "down=true,east=true,north=false,south=true,up=true,west=true": { "model": "steamadvantage:block/steam_track_desuw", "x": 0, "y": 0, "uvlock": false }, - "down=true,east=false,north=true,south=true,up=true,west=true": { "model": "steamadvantage:block/steam_track_desuw", "x": 0, "y": 90, "uvlock": false }, - "down=false,east=true,north=true,south=true,up=true,west=true": { "model": "steamadvantage:block/steam_track_desuw", "x": 90, "y": 0, "uvlock": false }, - "down=true,east=true,north=true,south=true,up=true,west=true": { "model": "steamadvantage:block/steam_track_densuw", "x": 0, "y": 0, "uvlock": false } - - } -} \ No newline at end of file diff --git a/src/main/resources/assets/steamadvantage/lang/de_de.json b/src/main/resources/assets/steamadvantage/lang/de_de.json deleted file mode 100644 index e32d5ae..0000000 --- a/src/main/resources/assets/steamadvantage/lang/de_de.json +++ /dev/null @@ -1,57 +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.steamadvantage.steam_governor.name": "Dampfkraft Steuerventil", - "tile.steamadvantage.steam_pipe.name": "Dampfrohr", - "tile.steamadvantage.steam_boiler_coal.name": "Dampfkraft Kessel", - "tile.steamadvantage.steam_tank.name": "Dampftank", - "tile.steamadvantage.steam_furnace.name": "Dampfkraft Ofen", - "tile.steamadvantage.steam_crusher.name": "Dampfkraft Steinbrecher", - "tile.steamadvantage.drillbit.name": "Bohrer", - "tile.steamadvantage.steam_drill.name": "Dampfkraft Bohrmaschine", - "item.steamadvantage.steam_drill_bit.name": "Bohrer", - "death.attack.steam_machine": "%1$s wurde zwischen die Zahnräder einer Maschine geschliffen", - "death.attack.steam_machine.player": "%1$s wurde zwischen die Zahnräder einer Maschine von %2$s geschliffen", - "tile.steamadvantage.steam_elevator.name": "Dampfkraft Aufzug", - "tile.steamadvantage.platform.name": "Dampfkraft Aufzugplattform", - "death.attack.musket": "%1$s wurde angeschossen", - "death.attack.musket.player": "%1$s schuss %2$s tot", - "item.steamadvantage.blackpowder_cartridge.name": "Schießpulver Patrone", - "item.steamadvantage.musket.name": "Schießpulver Muskete", - "tooltip.musket.damage": "Shot befasst %x Schäden", - "tooltip.musket.ammo": "Erfordert %x zu laden", - "tooltip.musket.loaded": "Geladen", - "tooltip.musket.unloaded": "Nicht geladen", - "enchantment.powderless": "Unendlich Munition", - "enchantment.rapid_reload": "Schnell neu laden", - "enchantment.high_explosive": "Bombe", - "enchantment.recoil": "Rückstoß", - "tile.steamadvantage.steam_track.name": "Dampfkraftzug", - "tile.steamadvantage.steam_boiler_electric.name": "Elektro-Dampfkessel", - "tile.steamadvantage.steam_boiler_geothermal.name": "Geothermische Dampfkessel", - "tile.steamadvantage.steam_switch.name": "Dampfventil", - "tile.steamadvantage.steam_still.name": "Dampfkraft Brennerei", - "tile.steamadvantage.steam_pump.name": "Dampfkraft Pumpe", - "tile.steamadvantage.steam_boiler_oil.name": "Ölfeuerung Dampfkraft Kessel", - "tile.steamadvantage.pump_pipe_steam.name": "Pumpenrohr", - "item.steamadvantage.steam_governor": "Dampfkraft Steuerventil", - "block.steamadvantage.steam_pipe": "Dampfrohr", - "block.steamadvantage.steam_boiler_coal": "Dampfkraft Kessel", - "block.steamadvantage.steam_tank": "Dampftank", - "block.steamadvantage.steam_furnace": "Dampfkraft Ofen", - "block.steamadvantage.steam_crusher": "Dampfkraft Steinbrecher", - "block.steamadvantage.drillbit": "Bohrer", - "block.steamadvantage.steam_drill": "Dampfkraft Bohrmaschine", - "item.steamadvantage.steam_drill_bit": "Bohrer", - "block.steamadvantage.steam_elevator": "Dampfkraft Aufzug", - "block.steamadvantage.platform": "Dampfkraft Aufzugplattform", - "item.steamadvantage.blackpowder_cartridge": "Schießpulver Patrone", - "item.steamadvantage.musket": "Schießpulver Muskete", - "block.steamadvantage.steam_track": "Dampfkraftzug", - "block.steamadvantage.steam_boiler_electric": "Elektro-Dampfkessel", - "block.steamadvantage.steam_boiler_geothermal": "Geothermische Dampfkessel", - "block.steamadvantage.steam_switch": "Dampfventil", - "block.steamadvantage.steam_still": "Dampfkraft Brennerei", - "block.steamadvantage.steam_pump": "Dampfkraft Pumpe", - "block.steamadvantage.steam_boiler_oil": "Ölfeuerung Dampfkraft Kessel", - "block.steamadvantage.pump_pipe_steam": "Pumpenrohr" -} diff --git a/src/main/resources/assets/steamadvantage/lang/en_au.json b/src/main/resources/assets/steamadvantage/lang/en_au.json deleted file mode 100644 index 1b47053..0000000 --- a/src/main/resources/assets/steamadvantage/lang/en_au.json +++ /dev/null @@ -1,57 +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.steamadvantage.steam_governor.name": "Steam Governor", - "tile.steamadvantage.steam_pipe.name": "Brass Steam Pipe", - "tile.steamadvantage.steam_boiler_coal.name": "Coal-Fired Steam Boiler", - "tile.steamadvantage.steam_tank.name": "Steam Boiler Tank", - "tile.steamadvantage.steam_furnace.name": "Steam-Powered Furnace", - "tile.steamadvantage.steam_crusher.name": "Steam-Powered Rock Crusher", - "tile.steamadvantage.drillbit.name": "Drill", - "tile.steamadvantage.steam_drill.name": "Steam-Powered Drill", - "item.steamadvantage.steam_drill_bit.name": "Drill Bit", - "death.attack.steam_machine": "%1$s was ground between the gears of a machine", - "death.attack.steam_machine.player": "%1$s was fed into the gears of a machine by %2$s", - "tile.steamadvantage.steam_elevator.name": "Steam-Powered Elevator", - "tile.steamadvantage.platform.name": "Steam Elevator Platform", - "death.attack.musket": "%1$s got shot", - "death.attack.musket.player": "%2$s shot %1$s dead", - "item.steamadvantage.blackpowder_cartridge.name": "Black-Powder Cartridge", - "item.steamadvantage.musket.name": "Black-Powder Musket", - "tooltip.musket.damage": "Shot deals %x damage", - "tooltip.musket.ammo": "Requires %x to reload", - "tooltip.musket.loaded": "Loaded", - "tooltip.musket.unloaded": "Not loaded", - "enchantment.powderless": "Powderless", - "enchantment.rapid_reload": "Quick Reload", - "enchantment.high_explosive": "High-Explosive", - "enchantment.recoil": "Recoil", - "tile.steamadvantage.steam_track.name": "Steam Track", - "tile.steamadvantage.steam_boiler_electric.name": "Electric Steam Boiler", - "tile.steamadvantage.steam_boiler_geothermal.name": "Geothermal Steam Boiler", - "tile.steamadvantage.steam_switch.name": "Steam Switch Valve", - "tile.steamadvantage.steam_still.name": "Steam-Powered Still", - "tile.steamadvantage.steam_pump.name": "Steam-Powered Pump", - "tile.steamadvantage.steam_boiler_oil.name": "Oil-Burning Steam Boiler", - "tile.steamadvantage.pump_pipe_steam.name": "Pump Pipe", - "item.steamadvantage.steam_governor": "Steam Governor", - "block.steamadvantage.steam_pipe": "Brass Steam Pipe", - "block.steamadvantage.steam_boiler_coal": "Coal-Fired Steam Boiler", - "block.steamadvantage.steam_tank": "Steam Boiler Tank", - "block.steamadvantage.steam_furnace": "Steam-Powered Furnace", - "block.steamadvantage.steam_crusher": "Steam-Powered Rock Crusher", - "block.steamadvantage.drillbit": "Drill", - "block.steamadvantage.steam_drill": "Steam-Powered Drill", - "item.steamadvantage.steam_drill_bit": "Drill Bit", - "block.steamadvantage.steam_elevator": "Steam-Powered Elevator", - "block.steamadvantage.platform": "Steam Elevator Platform", - "item.steamadvantage.blackpowder_cartridge": "Black-Powder Cartridge", - "item.steamadvantage.musket": "Black-Powder Musket", - "block.steamadvantage.steam_track": "Steam Track", - "block.steamadvantage.steam_boiler_electric": "Electric Steam Boiler", - "block.steamadvantage.steam_boiler_geothermal": "Geothermal Steam Boiler", - "block.steamadvantage.steam_switch": "Steam Switch Valve", - "block.steamadvantage.steam_still": "Steam-Powered Still", - "block.steamadvantage.steam_pump": "Steam-Powered Pump", - "block.steamadvantage.steam_boiler_oil": "Oil-Burning Steam Boiler", - "block.steamadvantage.pump_pipe_steam": "Pump Pipe" -} diff --git a/src/main/resources/assets/steamadvantage/lang/en_ca.json b/src/main/resources/assets/steamadvantage/lang/en_ca.json deleted file mode 100644 index 5c66bc3..0000000 --- a/src/main/resources/assets/steamadvantage/lang/en_ca.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "item.steamadvantage.steam_governor.name": "Steam Governor", - "tile.steamadvantage.steam_pipe.name": "Brass Steam Pipe", - "tile.steamadvantage.steam_boiler_coal.name": "Coal-Fired Steam Boiler", - "tile.steamadvantage.steam_tank.name": "Steam Boiler Tank", - "tile.steamadvantage.steam_furnace.name": "Steam-Powered Furnace", - "tile.steamadvantage.steam_crusher.name": "Steam-Powered Rock Crusher", - "tile.steamadvantage.drillbit.name": "Drill", - "tile.steamadvantage.steam_drill.name": "Steam-Powered Drill", - "item.steamadvantage.steam_drill_bit.name": "Drill Bit", - "death.attack.steam_machine": "%1$s was ground between the gears of a machine", - "death.attack.steam_machine.player": "%1$s was fed into the gears of a machine by %2$s", - "tile.steamadvantage.steam_elevator.name": "Steam-Powered Elevator", - "tile.steamadvantage.platform.name": "Steam Elevator Platform", - "death.attack.musket": "%1$s got shot", - "death.attack.musket.player": "%2$s shot %1$s dead", - "item.steamadvantage.blackpowder_cartridge.name": "Black-Powder Cartridge", - "item.steamadvantage.musket.name": "Black-Powder Musket", - "tooltip.musket.damage": "Shot deals %x damage", - "tooltip.musket.ammo": "Requires %x to reload", - "tooltip.musket.loaded": "Loaded", - "tooltip.musket.unloaded": "Not loaded", - "enchantment.powderless": "Powderless", - "enchantment.rapid_reload": "Quick Reload", - "enchantment.high_explosive": "High-Explosive", - "enchantment.recoil": "Recoil", - "tile.steamadvantage.steam_track.name": "Steam Track", - "tile.steamadvantage.steam_boiler_electric.name": "Electric Steam Boiler", - "tile.steamadvantage.steam_boiler_geothermal.name": "Geothermal Steam Boiler", - "tile.steamadvantage.steam_switch.name": "Steam Switch Valve", - "tile.steamadvantage.steam_still.name": "Steam-Powered Still", - "tile.steamadvantage.steam_pump.name": "Steam-Powered Pump", - "tile.steamadvantage.steam_boiler_oil.name": "Oil-Burning Steam Boiler", - "tile.steamadvantage.pump_pipe_steam.name": "Pump Pipe", - "item.steamadvantage.steam_governor": "Steam Governor", - "block.steamadvantage.steam_pipe": "Brass Steam Pipe", - "block.steamadvantage.steam_boiler_coal": "Coal-Fired Steam Boiler", - "block.steamadvantage.steam_tank": "Steam Boiler Tank", - "block.steamadvantage.steam_furnace": "Steam-Powered Furnace", - "block.steamadvantage.steam_crusher": "Steam-Powered Rock Crusher", - "block.steamadvantage.drillbit": "Drill", - "block.steamadvantage.steam_drill": "Steam-Powered Drill", - "item.steamadvantage.steam_drill_bit": "Drill Bit", - "block.steamadvantage.steam_elevator": "Steam-Powered Elevator", - "block.steamadvantage.platform": "Steam Elevator Platform", - "item.steamadvantage.blackpowder_cartridge": "Black-Powder Cartridge", - "item.steamadvantage.musket": "Black-Powder Musket", - "block.steamadvantage.steam_track": "Steam Track", - "block.steamadvantage.steam_boiler_electric": "Electric Steam Boiler", - "block.steamadvantage.steam_boiler_geothermal": "Geothermal Steam Boiler", - "block.steamadvantage.steam_switch": "Steam Switch Valve", - "block.steamadvantage.steam_still": "Steam-Powered Still", - "block.steamadvantage.steam_pump": "Steam-Powered Pump", - "block.steamadvantage.steam_boiler_oil": "Oil-Burning Steam Boiler", - "block.steamadvantage.pump_pipe_steam": "Pump Pipe" -} diff --git a/src/main/resources/assets/steamadvantage/lang/en_en.json b/src/main/resources/assets/steamadvantage/lang/en_en.json deleted file mode 100644 index 5c66bc3..0000000 --- a/src/main/resources/assets/steamadvantage/lang/en_en.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "item.steamadvantage.steam_governor.name": "Steam Governor", - "tile.steamadvantage.steam_pipe.name": "Brass Steam Pipe", - "tile.steamadvantage.steam_boiler_coal.name": "Coal-Fired Steam Boiler", - "tile.steamadvantage.steam_tank.name": "Steam Boiler Tank", - "tile.steamadvantage.steam_furnace.name": "Steam-Powered Furnace", - "tile.steamadvantage.steam_crusher.name": "Steam-Powered Rock Crusher", - "tile.steamadvantage.drillbit.name": "Drill", - "tile.steamadvantage.steam_drill.name": "Steam-Powered Drill", - "item.steamadvantage.steam_drill_bit.name": "Drill Bit", - "death.attack.steam_machine": "%1$s was ground between the gears of a machine", - "death.attack.steam_machine.player": "%1$s was fed into the gears of a machine by %2$s", - "tile.steamadvantage.steam_elevator.name": "Steam-Powered Elevator", - "tile.steamadvantage.platform.name": "Steam Elevator Platform", - "death.attack.musket": "%1$s got shot", - "death.attack.musket.player": "%2$s shot %1$s dead", - "item.steamadvantage.blackpowder_cartridge.name": "Black-Powder Cartridge", - "item.steamadvantage.musket.name": "Black-Powder Musket", - "tooltip.musket.damage": "Shot deals %x damage", - "tooltip.musket.ammo": "Requires %x to reload", - "tooltip.musket.loaded": "Loaded", - "tooltip.musket.unloaded": "Not loaded", - "enchantment.powderless": "Powderless", - "enchantment.rapid_reload": "Quick Reload", - "enchantment.high_explosive": "High-Explosive", - "enchantment.recoil": "Recoil", - "tile.steamadvantage.steam_track.name": "Steam Track", - "tile.steamadvantage.steam_boiler_electric.name": "Electric Steam Boiler", - "tile.steamadvantage.steam_boiler_geothermal.name": "Geothermal Steam Boiler", - "tile.steamadvantage.steam_switch.name": "Steam Switch Valve", - "tile.steamadvantage.steam_still.name": "Steam-Powered Still", - "tile.steamadvantage.steam_pump.name": "Steam-Powered Pump", - "tile.steamadvantage.steam_boiler_oil.name": "Oil-Burning Steam Boiler", - "tile.steamadvantage.pump_pipe_steam.name": "Pump Pipe", - "item.steamadvantage.steam_governor": "Steam Governor", - "block.steamadvantage.steam_pipe": "Brass Steam Pipe", - "block.steamadvantage.steam_boiler_coal": "Coal-Fired Steam Boiler", - "block.steamadvantage.steam_tank": "Steam Boiler Tank", - "block.steamadvantage.steam_furnace": "Steam-Powered Furnace", - "block.steamadvantage.steam_crusher": "Steam-Powered Rock Crusher", - "block.steamadvantage.drillbit": "Drill", - "block.steamadvantage.steam_drill": "Steam-Powered Drill", - "item.steamadvantage.steam_drill_bit": "Drill Bit", - "block.steamadvantage.steam_elevator": "Steam-Powered Elevator", - "block.steamadvantage.platform": "Steam Elevator Platform", - "item.steamadvantage.blackpowder_cartridge": "Black-Powder Cartridge", - "item.steamadvantage.musket": "Black-Powder Musket", - "block.steamadvantage.steam_track": "Steam Track", - "block.steamadvantage.steam_boiler_electric": "Electric Steam Boiler", - "block.steamadvantage.steam_boiler_geothermal": "Geothermal Steam Boiler", - "block.steamadvantage.steam_switch": "Steam Switch Valve", - "block.steamadvantage.steam_still": "Steam-Powered Still", - "block.steamadvantage.steam_pump": "Steam-Powered Pump", - "block.steamadvantage.steam_boiler_oil": "Oil-Burning Steam Boiler", - "block.steamadvantage.pump_pipe_steam": "Pump Pipe" -} diff --git a/src/main/resources/assets/steamadvantage/lang/en_gb.json b/src/main/resources/assets/steamadvantage/lang/en_gb.json deleted file mode 100644 index 5c66bc3..0000000 --- a/src/main/resources/assets/steamadvantage/lang/en_gb.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "item.steamadvantage.steam_governor.name": "Steam Governor", - "tile.steamadvantage.steam_pipe.name": "Brass Steam Pipe", - "tile.steamadvantage.steam_boiler_coal.name": "Coal-Fired Steam Boiler", - "tile.steamadvantage.steam_tank.name": "Steam Boiler Tank", - "tile.steamadvantage.steam_furnace.name": "Steam-Powered Furnace", - "tile.steamadvantage.steam_crusher.name": "Steam-Powered Rock Crusher", - "tile.steamadvantage.drillbit.name": "Drill", - "tile.steamadvantage.steam_drill.name": "Steam-Powered Drill", - "item.steamadvantage.steam_drill_bit.name": "Drill Bit", - "death.attack.steam_machine": "%1$s was ground between the gears of a machine", - "death.attack.steam_machine.player": "%1$s was fed into the gears of a machine by %2$s", - "tile.steamadvantage.steam_elevator.name": "Steam-Powered Elevator", - "tile.steamadvantage.platform.name": "Steam Elevator Platform", - "death.attack.musket": "%1$s got shot", - "death.attack.musket.player": "%2$s shot %1$s dead", - "item.steamadvantage.blackpowder_cartridge.name": "Black-Powder Cartridge", - "item.steamadvantage.musket.name": "Black-Powder Musket", - "tooltip.musket.damage": "Shot deals %x damage", - "tooltip.musket.ammo": "Requires %x to reload", - "tooltip.musket.loaded": "Loaded", - "tooltip.musket.unloaded": "Not loaded", - "enchantment.powderless": "Powderless", - "enchantment.rapid_reload": "Quick Reload", - "enchantment.high_explosive": "High-Explosive", - "enchantment.recoil": "Recoil", - "tile.steamadvantage.steam_track.name": "Steam Track", - "tile.steamadvantage.steam_boiler_electric.name": "Electric Steam Boiler", - "tile.steamadvantage.steam_boiler_geothermal.name": "Geothermal Steam Boiler", - "tile.steamadvantage.steam_switch.name": "Steam Switch Valve", - "tile.steamadvantage.steam_still.name": "Steam-Powered Still", - "tile.steamadvantage.steam_pump.name": "Steam-Powered Pump", - "tile.steamadvantage.steam_boiler_oil.name": "Oil-Burning Steam Boiler", - "tile.steamadvantage.pump_pipe_steam.name": "Pump Pipe", - "item.steamadvantage.steam_governor": "Steam Governor", - "block.steamadvantage.steam_pipe": "Brass Steam Pipe", - "block.steamadvantage.steam_boiler_coal": "Coal-Fired Steam Boiler", - "block.steamadvantage.steam_tank": "Steam Boiler Tank", - "block.steamadvantage.steam_furnace": "Steam-Powered Furnace", - "block.steamadvantage.steam_crusher": "Steam-Powered Rock Crusher", - "block.steamadvantage.drillbit": "Drill", - "block.steamadvantage.steam_drill": "Steam-Powered Drill", - "item.steamadvantage.steam_drill_bit": "Drill Bit", - "block.steamadvantage.steam_elevator": "Steam-Powered Elevator", - "block.steamadvantage.platform": "Steam Elevator Platform", - "item.steamadvantage.blackpowder_cartridge": "Black-Powder Cartridge", - "item.steamadvantage.musket": "Black-Powder Musket", - "block.steamadvantage.steam_track": "Steam Track", - "block.steamadvantage.steam_boiler_electric": "Electric Steam Boiler", - "block.steamadvantage.steam_boiler_geothermal": "Geothermal Steam Boiler", - "block.steamadvantage.steam_switch": "Steam Switch Valve", - "block.steamadvantage.steam_still": "Steam-Powered Still", - "block.steamadvantage.steam_pump": "Steam-Powered Pump", - "block.steamadvantage.steam_boiler_oil": "Oil-Burning Steam Boiler", - "block.steamadvantage.pump_pipe_steam": "Pump Pipe" -} diff --git a/src/main/resources/assets/steamadvantage/lang/en_pt.json b/src/main/resources/assets/steamadvantage/lang/en_pt.json deleted file mode 100644 index d3723f4..0000000 --- a/src/main/resources/assets/steamadvantage/lang/en_pt.json +++ /dev/null @@ -1,57 +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.steamadvantage.steam_governor.name": "Steam Gov'ner", - "tile.steamadvantage.steam_pipe.name": "Brass Pipe", - "tile.steamadvantage.steam_boiler_coal.name": "Boiler", - "tile.steamadvantage.steam_tank.name": "Clockwerk Boiler Tank", - "tile.steamadvantage.steam_furnace.name": "Clockwerk Furnace", - "tile.steamadvantage.steam_crusher.name": "Clockwerk Stone-Chewer", - "tile.steamadvantage.drillbit.name": "Drill", - "tile.steamadvantage.steam_drill.name": "Clockwerk Drill", - "item.steamadvantage.steam_drill_bit.name": "Drill Bit", - "death.attack.steam_machine": "%1$s kissed the iron maiden", - "death.attack.steam_machine.player": "%1$s convinced %2$s to kiss the iron maiden", - "tile.steamadvantage.steam_elevator.name": "Clockwerk Plank-Raiser", - "tile.steamadvantage.platform.name": "Mecha-Plank", - "death.attack.musket": "%1$s got shot", - "death.attack.musket.player": "%2$s filled %1$s full of daylight", - "item.steamadvantage.blackpowder_cartridge.name": "Death Ball", - "item.steamadvantage.musket.name": "Blunderbuss", - "tooltip.musket.damage": "Shot deals %x damage", - "tooltip.musket.ammo": "Requires %x to reload", - "tooltip.musket.loaded": "Loaded", - "tooltip.musket.unloaded": "Not loaded", - "enchantment.powderless": "Unending Glory", - "enchantment.rapid_reload": "Faster Blaster", - "enchantment.high_explosive": "Big Boom", - "enchantment.recoil": "Kickback", - "tile.steamadvantage.steam_track.name": "Steam Path", - "tile.steamadvantage.steam_boiler_electric.name": "Lightnin' Boiler", - "tile.steamadvantage.steam_boiler_geothermal.name": "Lava Boiler", - "tile.steamadvantage.steam_switch.name": "Steam Valve", - "tile.steamadvantage.steam_still.name": "Clockwerk 'Stillery", - "tile.steamadvantage.steam_pump.name": "Clockwerk Bilge Pump", - "tile.steamadvantage.steam_boiler_oil.name": "Oil Boiler", - "tile.steamadvantage.pump_pipe_steam.name": "Pump Pipe", - "item.steamadvantage.steam_governor": "Steam Gov'ner", - "block.steamadvantage.steam_pipe": "Brass Pipe", - "block.steamadvantage.steam_boiler_coal": "Boiler", - "block.steamadvantage.steam_tank": "Clockwerk Boiler Tank", - "block.steamadvantage.steam_furnace": "Clockwerk Furnace", - "block.steamadvantage.steam_crusher": "Clockwerk Stone-Chewer", - "block.steamadvantage.drillbit": "Drill", - "block.steamadvantage.steam_drill": "Clockwerk Drill", - "item.steamadvantage.steam_drill_bit": "Drill Bit", - "block.steamadvantage.steam_elevator": "Clockwerk Plank-Raiser", - "block.steamadvantage.platform": "Mecha-Plank", - "item.steamadvantage.blackpowder_cartridge": "Death Ball", - "item.steamadvantage.musket": "Blunderbuss", - "block.steamadvantage.steam_track": "Steam Path", - "block.steamadvantage.steam_boiler_electric": "Lightnin' Boiler", - "block.steamadvantage.steam_boiler_geothermal": "Lava Boiler", - "block.steamadvantage.steam_switch": "Steam Valve", - "block.steamadvantage.steam_still": "Clockwerk 'Stillery", - "block.steamadvantage.steam_pump": "Clockwerk Bilge Pump", - "block.steamadvantage.steam_boiler_oil": "Oil Boiler", - "block.steamadvantage.pump_pipe_steam": "Pump Pipe" -} diff --git a/src/main/resources/assets/steamadvantage/lang/en_us.json b/src/main/resources/assets/steamadvantage/lang/en_us.json deleted file mode 100644 index 1b47053..0000000 --- a/src/main/resources/assets/steamadvantage/lang/en_us.json +++ /dev/null @@ -1,57 +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.steamadvantage.steam_governor.name": "Steam Governor", - "tile.steamadvantage.steam_pipe.name": "Brass Steam Pipe", - "tile.steamadvantage.steam_boiler_coal.name": "Coal-Fired Steam Boiler", - "tile.steamadvantage.steam_tank.name": "Steam Boiler Tank", - "tile.steamadvantage.steam_furnace.name": "Steam-Powered Furnace", - "tile.steamadvantage.steam_crusher.name": "Steam-Powered Rock Crusher", - "tile.steamadvantage.drillbit.name": "Drill", - "tile.steamadvantage.steam_drill.name": "Steam-Powered Drill", - "item.steamadvantage.steam_drill_bit.name": "Drill Bit", - "death.attack.steam_machine": "%1$s was ground between the gears of a machine", - "death.attack.steam_machine.player": "%1$s was fed into the gears of a machine by %2$s", - "tile.steamadvantage.steam_elevator.name": "Steam-Powered Elevator", - "tile.steamadvantage.platform.name": "Steam Elevator Platform", - "death.attack.musket": "%1$s got shot", - "death.attack.musket.player": "%2$s shot %1$s dead", - "item.steamadvantage.blackpowder_cartridge.name": "Black-Powder Cartridge", - "item.steamadvantage.musket.name": "Black-Powder Musket", - "tooltip.musket.damage": "Shot deals %x damage", - "tooltip.musket.ammo": "Requires %x to reload", - "tooltip.musket.loaded": "Loaded", - "tooltip.musket.unloaded": "Not loaded", - "enchantment.powderless": "Powderless", - "enchantment.rapid_reload": "Quick Reload", - "enchantment.high_explosive": "High-Explosive", - "enchantment.recoil": "Recoil", - "tile.steamadvantage.steam_track.name": "Steam Track", - "tile.steamadvantage.steam_boiler_electric.name": "Electric Steam Boiler", - "tile.steamadvantage.steam_boiler_geothermal.name": "Geothermal Steam Boiler", - "tile.steamadvantage.steam_switch.name": "Steam Switch Valve", - "tile.steamadvantage.steam_still.name": "Steam-Powered Still", - "tile.steamadvantage.steam_pump.name": "Steam-Powered Pump", - "tile.steamadvantage.steam_boiler_oil.name": "Oil-Burning Steam Boiler", - "tile.steamadvantage.pump_pipe_steam.name": "Pump Pipe", - "item.steamadvantage.steam_governor": "Steam Governor", - "block.steamadvantage.steam_pipe": "Brass Steam Pipe", - "block.steamadvantage.steam_boiler_coal": "Coal-Fired Steam Boiler", - "block.steamadvantage.steam_tank": "Steam Boiler Tank", - "block.steamadvantage.steam_furnace": "Steam-Powered Furnace", - "block.steamadvantage.steam_crusher": "Steam-Powered Rock Crusher", - "block.steamadvantage.drillbit": "Drill", - "block.steamadvantage.steam_drill": "Steam-Powered Drill", - "item.steamadvantage.steam_drill_bit": "Drill Bit", - "block.steamadvantage.steam_elevator": "Steam-Powered Elevator", - "block.steamadvantage.platform": "Steam Elevator Platform", - "item.steamadvantage.blackpowder_cartridge": "Black-Powder Cartridge", - "item.steamadvantage.musket": "Black-Powder Musket", - "block.steamadvantage.steam_track": "Steam Track", - "block.steamadvantage.steam_boiler_electric": "Electric Steam Boiler", - "block.steamadvantage.steam_boiler_geothermal": "Geothermal Steam Boiler", - "block.steamadvantage.steam_switch": "Steam Switch Valve", - "block.steamadvantage.steam_still": "Steam-Powered Still", - "block.steamadvantage.steam_pump": "Steam-Powered Pump", - "block.steamadvantage.steam_boiler_oil": "Oil-Burning Steam Boiler", - "block.steamadvantage.pump_pipe_steam": "Pump Pipe" -} diff --git a/src/main/resources/assets/steamadvantage/lang/es_es.json b/src/main/resources/assets/steamadvantage/lang/es_es.json deleted file mode 100644 index 76dbcb9..0000000 --- a/src/main/resources/assets/steamadvantage/lang/es_es.json +++ /dev/null @@ -1,57 +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.steamadvantage.steam_governor.name": "Controlar de Vapor", - "tile.steamadvantage.steam_pipe.name": "Latón Tubo de Vapor", - "tile.steamadvantage.steam_boiler_coal.name": "Caldera de Vapor con Carbón", - "tile.steamadvantage.steam_tank.name": "Tanque de Vapor", - "tile.steamadvantage.steam_furnace.name": "Vapor del Horno Accionado", - "tile.steamadvantage.steam_crusher.name": "Vapor Trituradora de Piedra Accionado", - "tile.steamadvantage.drillbit.name": "Broca", - "tile.steamadvantage.steam_drill.name": "Vapor Taladro Accionado", - "item.steamadvantage.steam_drill_bit.name": "Broca", - "death.attack.steam_machine": "%1$s se molió entre los engranajes de una máquina", - "death.attack.steam_machine.player": "%1$s se molió entre los engranajes de una máquina de %2$s", - "tile.steamadvantage.steam_elevator.name": "Ascensor a Vapor", - "tile.steamadvantage.platform.name": "Vapor Plataforma Ascensor", - "death.attack.musket": "%1$s recibió un disparo", - "death.attack.musket.player": "%2$s tiro %1$s muertos", - "item.steamadvantage.blackpowder_cartridge.name": "Cartucho de Pólvora", - "item.steamadvantage.musket.name": "Mosquete", - "tooltip.musket.damage": "Disparo trata %x daños", - "tooltip.musket.ammo": "Requiere %x para recargar", - "tooltip.musket.loaded": "Cargado", - "tooltip.musket.unloaded": "No cargado", - "enchantment.powderless": "Munición Infinita", - "enchantment.rapid_reload": "Rápidamente Actualizar", - "enchantment.high_explosive": "Bomba", - "enchantment.recoil": "Retroceso", - "tile.steamadvantage.steam_track.name": "Vía a Vapor", - "tile.steamadvantage.steam_boiler_electric.name": "Caldera de Vapor Eléctrica", - "tile.steamadvantage.steam_boiler_geothermal.name": "Caldera de Vapor Geotérmico", - "tile.steamadvantage.steam_switch.name": "Válvula de Vapor", - "tile.steamadvantage.steam_still.name": "Vapor Destilería", - "tile.steamadvantage.steam_pump.name": "Vapor de la Bomba Accionada", - "tile.steamadvantage.steam_boiler_oil.name": "Caldera de Vapor con Aceite", - "tile.steamadvantage.pump_pipe_steam.name": "Tubería de la Bomba", - "item.steamadvantage.steam_governor": "Controlar de Vapor", - "block.steamadvantage.steam_pipe": "Latón Tubo de Vapor", - "block.steamadvantage.steam_boiler_coal": "Caldera de Vapor con Carbón", - "block.steamadvantage.steam_tank": "Tanque de Vapor", - "block.steamadvantage.steam_furnace": "Vapor del Horno Accionado", - "block.steamadvantage.steam_crusher": "Vapor Trituradora de Piedra Accionado", - "block.steamadvantage.drillbit": "Broca", - "block.steamadvantage.steam_drill": "Vapor Taladro Accionado", - "item.steamadvantage.steam_drill_bit": "Broca", - "block.steamadvantage.steam_elevator": "Ascensor a Vapor", - "block.steamadvantage.platform": "Vapor Plataforma Ascensor", - "item.steamadvantage.blackpowder_cartridge": "Cartucho de Pólvora", - "item.steamadvantage.musket": "Mosquete", - "block.steamadvantage.steam_track": "Vía a Vapor", - "block.steamadvantage.steam_boiler_electric": "Caldera de Vapor Eléctrica", - "block.steamadvantage.steam_boiler_geothermal": "Caldera de Vapor Geotérmico", - "block.steamadvantage.steam_switch": "Válvula de Vapor", - "block.steamadvantage.steam_still": "Vapor Destilería", - "block.steamadvantage.steam_pump": "Vapor de la Bomba Accionada", - "block.steamadvantage.steam_boiler_oil": "Caldera de Vapor con Aceite", - "block.steamadvantage.pump_pipe_steam": "Tubería de la Bomba" -} diff --git a/src/main/resources/assets/steamadvantage/lang/es_mx.json b/src/main/resources/assets/steamadvantage/lang/es_mx.json deleted file mode 100644 index 76dbcb9..0000000 --- a/src/main/resources/assets/steamadvantage/lang/es_mx.json +++ /dev/null @@ -1,57 +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.steamadvantage.steam_governor.name": "Controlar de Vapor", - "tile.steamadvantage.steam_pipe.name": "Latón Tubo de Vapor", - "tile.steamadvantage.steam_boiler_coal.name": "Caldera de Vapor con Carbón", - "tile.steamadvantage.steam_tank.name": "Tanque de Vapor", - "tile.steamadvantage.steam_furnace.name": "Vapor del Horno Accionado", - "tile.steamadvantage.steam_crusher.name": "Vapor Trituradora de Piedra Accionado", - "tile.steamadvantage.drillbit.name": "Broca", - "tile.steamadvantage.steam_drill.name": "Vapor Taladro Accionado", - "item.steamadvantage.steam_drill_bit.name": "Broca", - "death.attack.steam_machine": "%1$s se molió entre los engranajes de una máquina", - "death.attack.steam_machine.player": "%1$s se molió entre los engranajes de una máquina de %2$s", - "tile.steamadvantage.steam_elevator.name": "Ascensor a Vapor", - "tile.steamadvantage.platform.name": "Vapor Plataforma Ascensor", - "death.attack.musket": "%1$s recibió un disparo", - "death.attack.musket.player": "%2$s tiro %1$s muertos", - "item.steamadvantage.blackpowder_cartridge.name": "Cartucho de Pólvora", - "item.steamadvantage.musket.name": "Mosquete", - "tooltip.musket.damage": "Disparo trata %x daños", - "tooltip.musket.ammo": "Requiere %x para recargar", - "tooltip.musket.loaded": "Cargado", - "tooltip.musket.unloaded": "No cargado", - "enchantment.powderless": "Munición Infinita", - "enchantment.rapid_reload": "Rápidamente Actualizar", - "enchantment.high_explosive": "Bomba", - "enchantment.recoil": "Retroceso", - "tile.steamadvantage.steam_track.name": "Vía a Vapor", - "tile.steamadvantage.steam_boiler_electric.name": "Caldera de Vapor Eléctrica", - "tile.steamadvantage.steam_boiler_geothermal.name": "Caldera de Vapor Geotérmico", - "tile.steamadvantage.steam_switch.name": "Válvula de Vapor", - "tile.steamadvantage.steam_still.name": "Vapor Destilería", - "tile.steamadvantage.steam_pump.name": "Vapor de la Bomba Accionada", - "tile.steamadvantage.steam_boiler_oil.name": "Caldera de Vapor con Aceite", - "tile.steamadvantage.pump_pipe_steam.name": "Tubería de la Bomba", - "item.steamadvantage.steam_governor": "Controlar de Vapor", - "block.steamadvantage.steam_pipe": "Latón Tubo de Vapor", - "block.steamadvantage.steam_boiler_coal": "Caldera de Vapor con Carbón", - "block.steamadvantage.steam_tank": "Tanque de Vapor", - "block.steamadvantage.steam_furnace": "Vapor del Horno Accionado", - "block.steamadvantage.steam_crusher": "Vapor Trituradora de Piedra Accionado", - "block.steamadvantage.drillbit": "Broca", - "block.steamadvantage.steam_drill": "Vapor Taladro Accionado", - "item.steamadvantage.steam_drill_bit": "Broca", - "block.steamadvantage.steam_elevator": "Ascensor a Vapor", - "block.steamadvantage.platform": "Vapor Plataforma Ascensor", - "item.steamadvantage.blackpowder_cartridge": "Cartucho de Pólvora", - "item.steamadvantage.musket": "Mosquete", - "block.steamadvantage.steam_track": "Vía a Vapor", - "block.steamadvantage.steam_boiler_electric": "Caldera de Vapor Eléctrica", - "block.steamadvantage.steam_boiler_geothermal": "Caldera de Vapor Geotérmico", - "block.steamadvantage.steam_switch": "Válvula de Vapor", - "block.steamadvantage.steam_still": "Vapor Destilería", - "block.steamadvantage.steam_pump": "Vapor de la Bomba Accionada", - "block.steamadvantage.steam_boiler_oil": "Caldera de Vapor con Aceite", - "block.steamadvantage.pump_pipe_steam": "Tubería de la Bomba" -} diff --git a/src/main/resources/assets/steamadvantage/lang/fr_ca.json b/src/main/resources/assets/steamadvantage/lang/fr_ca.json deleted file mode 100644 index 35a5f1a..0000000 --- a/src/main/resources/assets/steamadvantage/lang/fr_ca.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "language_support_goals": "english (en_US,en_EN,en_CA,en_GB, en_AU, en_PT), french (fr_FR,fr_CA), spanish (es_MX,es_ES), chinese (zh_CN), japanese (ja_JA), portugese (pt_BR), german (de_DE), italian (it_IT), korean (ko_KR)", - "item.steamadvantage.steam_governor.name": "Régulateur de vapeur", - "tile.steamadvantage.steam_pipe.name": "Tuyau de vapeur en laiton", - "tile.steamadvantage.steam_boiler_coal.name": "Chaudière à vapeur bois-charbon", - "tile.steamadvantage.steam_tank.name": "Réservoir de chaudière à vapeur", - "tile.steamadvantage.steam_furnace.name": "Four alimenté à la vapeur", - "tile.steamadvantage.steam_crusher.name": "Broyeur de roches alimenté à la vapeur", - "tile.steamadvantage.drillbit.name": "Foret", - "tile.steamadvantage.steam_drill.name": "Foret alimenté à la vapeur", - "item.steamadvantage.steam_drill_bit.name": "Morceau de foret", - "death.attack.steam_machine": "%1$s a été écrasé dans les engrenages d'une machine", - "death.attack.steam_machine.player": "%1$s a été poussé dans les engrenages d'une machine par %2$s", - "tile.steamadvantage.steam_elevator.name": "Ascenseur alimenté à la vapeur", - "tile.steamadvantage.platform.name": "Plate-forme ascenceur à vapeur", - "death.attack.musket": "%1$s got shot", - "death.attack.musket.player": "%2$s shot %1$s dead", - "item.steamadvantage.blackpowder_cartridge.name": "Cartouche de poudre noire", - "item.steamadvantage.musket.name": "Mousquet à poudre noire", - "tooltip.musket.damage": "Le tir provoque %x dégats", - "tooltip.musket.ammo": "Demande %x pour recharger", - "tooltip.musket.loaded": "Chargé", - "tooltip.musket.unloaded": "Non chargé", - "enchantment.powderless": "Sans poudre", - "enchantment.rapid_reload": "Rechargement rapide", - "enchantment.high_explosive": "High-Explosif", - "enchantment.recoil": "Recul", - "tile.steamadvantage.steam_track.name": "Trace de vapeur", - "tile.steamadvantage.steam_boiler_electric.name": "Chaudière à Vapeur Électrique", - "tile.steamadvantage.steam_boiler_geothermal.name": "Chaudière à Vapeur Géothermique", - "tile.steamadvantage.steam_switch.name": "Soupape de vapeur", - "tile.steamadvantage.steam_still.name": "Vapeur distillerie alimenté", - "tile.steamadvantage.steam_pump.name": "Vapeur pompe alimentée", - "tile.steamadvantage.steam_boiler_oil.name": "Chaudière à l'huile", - "tile.steamadvantage.pump_pipe_steam.name": "Tubería de la Bomba", - "item.steamadvantage.steam_governor": "Régulateur de vapeur", - "block.steamadvantage.steam_pipe": "Tuyau de vapeur en laiton", - "block.steamadvantage.steam_boiler_coal": "Chaudière à vapeur bois-charbon", - "block.steamadvantage.steam_tank": "Réservoir de chaudière à vapeur", - "block.steamadvantage.steam_furnace": "Four alimenté à la vapeur", - "block.steamadvantage.steam_crusher": "Broyeur de roches alimenté à la vapeur", - "block.steamadvantage.drillbit": "Foret", - "block.steamadvantage.steam_drill": "Foret alimenté à la vapeur", - "item.steamadvantage.steam_drill_bit": "Morceau de foret", - "block.steamadvantage.steam_elevator": "Ascenseur alimenté à la vapeur", - "block.steamadvantage.platform": "Plate-forme ascenceur à vapeur", - "item.steamadvantage.blackpowder_cartridge": "Cartouche de poudre noire", - "item.steamadvantage.musket": "Mousquet à poudre noire", - "block.steamadvantage.steam_track": "Trace de vapeur", - "block.steamadvantage.steam_boiler_electric": "Chaudière à Vapeur Électrique", - "block.steamadvantage.steam_boiler_geothermal": "Chaudière à Vapeur Géothermique", - "block.steamadvantage.steam_switch": "Soupape de vapeur", - "block.steamadvantage.steam_still": "Vapeur distillerie alimenté", - "block.steamadvantage.steam_pump": "Vapeur pompe alimentée", - "block.steamadvantage.steam_boiler_oil": "Chaudière à l'huile", - "block.steamadvantage.pump_pipe_steam": "Tubería de la Bomba" -} diff --git a/src/main/resources/assets/steamadvantage/lang/fr_fr.json b/src/main/resources/assets/steamadvantage/lang/fr_fr.json deleted file mode 100644 index 35a5f1a..0000000 --- a/src/main/resources/assets/steamadvantage/lang/fr_fr.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "language_support_goals": "english (en_US,en_EN,en_CA,en_GB, en_AU, en_PT), french (fr_FR,fr_CA), spanish (es_MX,es_ES), chinese (zh_CN), japanese (ja_JA), portugese (pt_BR), german (de_DE), italian (it_IT), korean (ko_KR)", - "item.steamadvantage.steam_governor.name": "Régulateur de vapeur", - "tile.steamadvantage.steam_pipe.name": "Tuyau de vapeur en laiton", - "tile.steamadvantage.steam_boiler_coal.name": "Chaudière à vapeur bois-charbon", - "tile.steamadvantage.steam_tank.name": "Réservoir de chaudière à vapeur", - "tile.steamadvantage.steam_furnace.name": "Four alimenté à la vapeur", - "tile.steamadvantage.steam_crusher.name": "Broyeur de roches alimenté à la vapeur", - "tile.steamadvantage.drillbit.name": "Foret", - "tile.steamadvantage.steam_drill.name": "Foret alimenté à la vapeur", - "item.steamadvantage.steam_drill_bit.name": "Morceau de foret", - "death.attack.steam_machine": "%1$s a été écrasé dans les engrenages d'une machine", - "death.attack.steam_machine.player": "%1$s a été poussé dans les engrenages d'une machine par %2$s", - "tile.steamadvantage.steam_elevator.name": "Ascenseur alimenté à la vapeur", - "tile.steamadvantage.platform.name": "Plate-forme ascenceur à vapeur", - "death.attack.musket": "%1$s got shot", - "death.attack.musket.player": "%2$s shot %1$s dead", - "item.steamadvantage.blackpowder_cartridge.name": "Cartouche de poudre noire", - "item.steamadvantage.musket.name": "Mousquet à poudre noire", - "tooltip.musket.damage": "Le tir provoque %x dégats", - "tooltip.musket.ammo": "Demande %x pour recharger", - "tooltip.musket.loaded": "Chargé", - "tooltip.musket.unloaded": "Non chargé", - "enchantment.powderless": "Sans poudre", - "enchantment.rapid_reload": "Rechargement rapide", - "enchantment.high_explosive": "High-Explosif", - "enchantment.recoil": "Recul", - "tile.steamadvantage.steam_track.name": "Trace de vapeur", - "tile.steamadvantage.steam_boiler_electric.name": "Chaudière à Vapeur Électrique", - "tile.steamadvantage.steam_boiler_geothermal.name": "Chaudière à Vapeur Géothermique", - "tile.steamadvantage.steam_switch.name": "Soupape de vapeur", - "tile.steamadvantage.steam_still.name": "Vapeur distillerie alimenté", - "tile.steamadvantage.steam_pump.name": "Vapeur pompe alimentée", - "tile.steamadvantage.steam_boiler_oil.name": "Chaudière à l'huile", - "tile.steamadvantage.pump_pipe_steam.name": "Tubería de la Bomba", - "item.steamadvantage.steam_governor": "Régulateur de vapeur", - "block.steamadvantage.steam_pipe": "Tuyau de vapeur en laiton", - "block.steamadvantage.steam_boiler_coal": "Chaudière à vapeur bois-charbon", - "block.steamadvantage.steam_tank": "Réservoir de chaudière à vapeur", - "block.steamadvantage.steam_furnace": "Four alimenté à la vapeur", - "block.steamadvantage.steam_crusher": "Broyeur de roches alimenté à la vapeur", - "block.steamadvantage.drillbit": "Foret", - "block.steamadvantage.steam_drill": "Foret alimenté à la vapeur", - "item.steamadvantage.steam_drill_bit": "Morceau de foret", - "block.steamadvantage.steam_elevator": "Ascenseur alimenté à la vapeur", - "block.steamadvantage.platform": "Plate-forme ascenceur à vapeur", - "item.steamadvantage.blackpowder_cartridge": "Cartouche de poudre noire", - "item.steamadvantage.musket": "Mousquet à poudre noire", - "block.steamadvantage.steam_track": "Trace de vapeur", - "block.steamadvantage.steam_boiler_electric": "Chaudière à Vapeur Électrique", - "block.steamadvantage.steam_boiler_geothermal": "Chaudière à Vapeur Géothermique", - "block.steamadvantage.steam_switch": "Soupape de vapeur", - "block.steamadvantage.steam_still": "Vapeur distillerie alimenté", - "block.steamadvantage.steam_pump": "Vapeur pompe alimentée", - "block.steamadvantage.steam_boiler_oil": "Chaudière à l'huile", - "block.steamadvantage.pump_pipe_steam": "Tubería de la Bomba" -} diff --git a/src/main/resources/assets/steamadvantage/lang/it_it.json b/src/main/resources/assets/steamadvantage/lang/it_it.json deleted file mode 100644 index e5a9066..0000000 --- a/src/main/resources/assets/steamadvantage/lang/it_it.json +++ /dev/null @@ -1,56 +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.steamadvantage.steam_governor.name": "Valvola di Controllo", - "tile.steamadvantage.steam_pipe.name": "Ottone Tubo di Vapore", - "tile.steamadvantage.steam_boiler_coal.name": "Caldaia di Vapore", - "tile.steamadvantage.steam_tank.name": "Carro a Vapore", - "tile.steamadvantage.steam_furnace.name": "Forno a Vapore Alimentata", - "tile.steamadvantage.steam_crusher.name": "Polverizzatore Masso a Vapore Alimentata", - "tile.steamadvantage.drillbit.name": "Trapano", - "tile.steamadvantage.steam_drill.name": "Trapano a Vapore", - "item.steamadvantage.steam_drill_bit.name": "Trapano", - "death.attack.steam_machine": "%1$s è stato macinato tra gli ingranaggi di una macchina", - "death.attack.steam_machine.player": "%1$s è stato macinato tra gli ingranaggi di una macchina di %2$s", - "tile.steamadvantage.steam_elevator.name": "Ascensore a Vapore", - "tile.steamadvantage.platform.name": "Ascensore a Vapore Piattaforma", - "death.attack.musket": "%1$s hanno sparato", - "death.attack.musket.player": "%2$s colpo %1$s morti", - "item.steamadvantage.blackpowder_cartridge.name": "Cartuccia Polvere da Sparo", - "item.steamadvantage.musket.name": "Moschetto", - "tooltip.musket.damage": "Girato occupa %x danni", - "tooltip.musket.ammo": "Richiede %x per ricaricare", - "tooltip.musket.loaded": "Caricato", - "tooltip.musket.unloaded": "Non caricato", - "enchantment.powderless": "Munizioni Infinite", - "enchantment.rapid_reload": "Rapidamente Reload", - "enchantment.high_explosive": "Bomba", - "enchantment.recoil": "Rinculo", - "tile.steamadvantage.steam_track.name": "Pista a Vapore", - "tile.steamadvantage.steam_boiler_electric.name": "Caldaia a Vapore Elettrica", - "tile.steamadvantage.steam_boiler_geothermal.name": "Caldaia a Vapore Geotermico", - "tile.steamadvantage.steam_switch.name": "Valvola del Vapore", - "tile.steamadvantage.steam_still.name": "A Vapore Alimentata Distilleria", - "tile.steamadvantage.steam_pump.name": "Pompa Alimentata a Vapore", - "tile.steamadvantage.steam_boiler_oil.name": "Caldaia ad Olio Combustibile", - "tile.electricadvantage.pump_pipe_steam.name": "Tubo Pompa", - "item.steamadvantage.steam_governor": "Valvola di Controllo", - "block.steamadvantage.steam_pipe": "Ottone Tubo di Vapore", - "block.steamadvantage.steam_boiler_coal": "Caldaia di Vapore", - "block.steamadvantage.steam_tank": "Carro a Vapore", - "block.steamadvantage.steam_furnace": "Forno a Vapore Alimentata", - "block.steamadvantage.steam_crusher": "Polverizzatore Masso a Vapore Alimentata", - "block.steamadvantage.drillbit": "Trapano", - "block.steamadvantage.steam_drill": "Trapano a Vapore", - "item.steamadvantage.steam_drill_bit": "Trapano", - "block.steamadvantage.steam_elevator": "Ascensore a Vapore", - "block.steamadvantage.platform": "Ascensore a Vapore Piattaforma", - "item.steamadvantage.blackpowder_cartridge": "Cartuccia Polvere da Sparo", - "item.steamadvantage.musket": "Moschetto", - "block.steamadvantage.steam_track": "Pista a Vapore", - "block.steamadvantage.steam_boiler_electric": "Caldaia a Vapore Elettrica", - "block.steamadvantage.steam_boiler_geothermal": "Caldaia a Vapore Geotermico", - "block.steamadvantage.steam_switch": "Valvola del Vapore", - "block.steamadvantage.steam_still": "A Vapore Alimentata Distilleria", - "block.steamadvantage.steam_pump": "Pompa Alimentata a Vapore", - "block.steamadvantage.steam_boiler_oil": "Caldaia ad Olio Combustibile" -} diff --git a/src/main/resources/assets/steamadvantage/lang/ja_jp.json b/src/main/resources/assets/steamadvantage/lang/ja_jp.json deleted file mode 100644 index 17f11dd..0000000 --- a/src/main/resources/assets/steamadvantage/lang/ja_jp.json +++ /dev/null @@ -1,57 +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.steamadvantage.steam_governor.name": "コントロールバルブスチーム", - "tile.steamadvantage.steam_pipe.name": "真鍮蒸気管", - "tile.steamadvantage.steam_boiler_coal.name": "蒸気ボイラ", - "tile.steamadvantage.steam_tank.name": "スチームタンク", - "tile.steamadvantage.steam_furnace.name": "蒸気動力炉", - "tile.steamadvantage.steam_crusher.name": "スチームパワードロッククラッシャー", - "tile.steamadvantage.drillbit.name": "ドリルビット", - "tile.steamadvantage.steam_drill.name": "蒸気ドリル", - "item.steamadvantage.steam_drill_bit.name": "ドリルビット", - "death.attack.steam_machine": "%1$s 機械の歯車の間に粉砕しました", - "death.attack.steam_machine.player": "%1$s %2$s による機械の歯車の間に粉砕し、", - "tile.steamadvantage.steam_elevator.name": "スチームパワードエレベーター", - "tile.steamadvantage.platform.name": "エレベータープラットフォームスチーム", - "death.attack.musket": "%1$sは撃たれました", - "death.attack.musket.player": "%2$sのショット%1$sの死", - "item.steamadvantage.blackpowder_cartridge.name": "火薬カートリッジ", - "item.steamadvantage.musket.name": "マスケット銃", - "tooltip.musket.damage": "ショットは、%x点のダメージを与えます", - "tooltip.musket.ammo": "リロードするには、%xを必要とし", - "tooltip.musket.loaded": "ロードされました", - "tooltip.musket.unloaded": "ロードされていません", - "enchantment.powderless": "無限の弾薬", - "enchantment.rapid_reload": "素早くリロード", - "enchantment.high_explosive": "爆弾", - "enchantment.recoil": "リコイル", - "tile.steamadvantage.steam_track.name": "蒸気トレース", - "tile.steamadvantage.steam_boiler_electric.name": "電気蒸気ボイラ", - "tile.steamadvantage.steam_boiler_geothermal.name": "地熱蒸気ボイラー", - "tile.steamadvantage.steam_switch.name": "蒸気弁", - "tile.steamadvantage.steam_still.name": "蒸気駆動の蒸留所", - "tile.steamadvantage.steam_pump.name": "蒸気駆動のポンプ", - "tile.steamadvantage.steam_boiler_oil.name": "石油燃焼ボイラー", - "tile.steamadvantage.pump_pipe_steam.name": "ポンプ配管", - "item.steamadvantage.steam_governor": "コントロールバルブスチーム", - "block.steamadvantage.steam_pipe": "真鍮蒸気管", - "block.steamadvantage.steam_boiler_coal": "蒸気ボイラ", - "block.steamadvantage.steam_tank": "スチームタンク", - "block.steamadvantage.steam_furnace": "蒸気動力炉", - "block.steamadvantage.steam_crusher": "スチームパワードロッククラッシャー", - "block.steamadvantage.drillbit": "ドリルビット", - "block.steamadvantage.steam_drill": "蒸気ドリル", - "item.steamadvantage.steam_drill_bit": "ドリルビット", - "block.steamadvantage.steam_elevator": "スチームパワードエレベーター", - "block.steamadvantage.platform": "エレベータープラットフォームスチーム", - "item.steamadvantage.blackpowder_cartridge": "火薬カートリッジ", - "item.steamadvantage.musket": "マスケット銃", - "block.steamadvantage.steam_track": "蒸気トレース", - "block.steamadvantage.steam_boiler_electric": "電気蒸気ボイラ", - "block.steamadvantage.steam_boiler_geothermal": "地熱蒸気ボイラー", - "block.steamadvantage.steam_switch": "蒸気弁", - "block.steamadvantage.steam_still": "蒸気駆動の蒸留所", - "block.steamadvantage.steam_pump": "蒸気駆動のポンプ", - "block.steamadvantage.steam_boiler_oil": "石油燃焼ボイラー", - "block.steamadvantage.pump_pipe_steam": "ポンプ配管" -} diff --git a/src/main/resources/assets/steamadvantage/lang/ko_kr.json b/src/main/resources/assets/steamadvantage/lang/ko_kr.json deleted file mode 100644 index 5572ab0..0000000 --- a/src/main/resources/assets/steamadvantage/lang/ko_kr.json +++ /dev/null @@ -1,57 +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.steamadvantage.steam_governor.name": "제어 밸브 증기", - "tile.steamadvantage.steam_pipe.name": "황동 증기 파이프", - "tile.steamadvantage.steam_boiler_coal.name": "증기 보일러", - "tile.steamadvantage.steam_tank.name": "스팀 탱크", - "tile.steamadvantage.steam_furnace.name": "증기 구동 전기로", - "tile.steamadvantage.steam_crusher.name": "증기 구동 록 크러셔", - "tile.steamadvantage.drillbit.name": "드릴 비트", - "tile.steamadvantage.steam_drill.name": "증기 구동 드릴", - "item.steamadvantage.steam_drill_bit.name": "드릴 비트", - "death.attack.steam_machine": "%1$s 기계의 기어 사이 분쇄", - "death.attack.steam_machine.player": "%1$s %2$s 에 의해 기계의 기어 사이에 분쇄", - "tile.steamadvantage.steam_elevator.name": "증기 구동 엘리베이터", - "tile.steamadvantage.platform.name": "엘리베이터 플랫폼 스팀", - "death.attack.musket": "%1$s는 총에 맞았", - "death.attack.musket.player": "%2$s 샷% %1$s죽은", - "item.steamadvantage.blackpowder_cartridge.name": "화약 카트리지", - "item.steamadvantage.musket.name": "구식 보병 총", - "tooltip.musket.damage": "총 의 %x의 피해를", - "tooltip.musket.ammo": "다시로드 %x를 필요", - "tooltip.musket.loaded": "로드", - "tooltip.musket.unloaded": "로드되지", - "enchantment.powderless": "무한 탄약", - "enchantment.rapid_reload": "신속하게 다시로드", - "enchantment.high_explosive": "폭탄", - "enchantment.recoil": "뒷걸음질", - "tile.steamadvantage.steam_track.name": "증기 선로", - "tile.steamadvantage.steam_boiler_electric.name": "전기 스팀 보일러", - "tile.steamadvantage.steam_boiler_geothermal.name": "지열 증기 보일러", - "tile.steamadvantage.steam_switch.name": "스팀 밸브", - "tile.steamadvantage.steam_still.name": "증기 구동 증류소", - "tile.steamadvantage.steam_pump.name": "증기 구동 펌프", - "tile.steamadvantage.steam_boiler_oil.name": "기름 연소 보일러", - "tile.steamadvantage.pump_pipe_steam.name": "펌프 파이프", - "item.steamadvantage.steam_governor": "제어 밸브 증기", - "block.steamadvantage.steam_pipe": "황동 증기 파이프", - "block.steamadvantage.steam_boiler_coal": "증기 보일러", - "block.steamadvantage.steam_tank": "스팀 탱크", - "block.steamadvantage.steam_furnace": "증기 구동 전기로", - "block.steamadvantage.steam_crusher": "증기 구동 록 크러셔", - "block.steamadvantage.drillbit": "드릴 비트", - "block.steamadvantage.steam_drill": "증기 구동 드릴", - "item.steamadvantage.steam_drill_bit": "드릴 비트", - "block.steamadvantage.steam_elevator": "증기 구동 엘리베이터", - "block.steamadvantage.platform": "엘리베이터 플랫폼 스팀", - "item.steamadvantage.blackpowder_cartridge": "화약 카트리지", - "item.steamadvantage.musket": "구식 보병 총", - "block.steamadvantage.steam_track": "증기 선로", - "block.steamadvantage.steam_boiler_electric": "전기 스팀 보일러", - "block.steamadvantage.steam_boiler_geothermal": "지열 증기 보일러", - "block.steamadvantage.steam_switch": "스팀 밸브", - "block.steamadvantage.steam_still": "증기 구동 증류소", - "block.steamadvantage.steam_pump": "증기 구동 펌프", - "block.steamadvantage.steam_boiler_oil": "기름 연소 보일러", - "block.steamadvantage.pump_pipe_steam": "펌프 파이프" -} diff --git a/src/main/resources/assets/steamadvantage/lang/pt_br.json b/src/main/resources/assets/steamadvantage/lang/pt_br.json deleted file mode 100644 index 5f8396c..0000000 --- a/src/main/resources/assets/steamadvantage/lang/pt_br.json +++ /dev/null @@ -1,57 +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.steamadvantage.steam_governor.name": "Válvula de Controle de Vapor", - "tile.steamadvantage.steam_pipe.name": "Latão Tubo de Vapor", - "tile.steamadvantage.steam_boiler_coal.name": "Caldeira a Vapor", - "tile.steamadvantage.steam_tank.name": "Tanque Vapor", - "tile.steamadvantage.steam_furnace.name": "Psto Vapor Forno", - "tile.steamadvantage.steam_crusher.name": "Psto Vapor Rocha Afiador", - "tile.steamadvantage.drillbit.name": "Broca", - "tile.steamadvantage.steam_drill.name": "Psto Vapor Broca", - "item.steamadvantage.steam_drill_bit.name": "Broca", - "death.attack.steam_machine": "%1$s was ground between the gears of a machine", - "death.attack.steam_machine.player": "%1$s was fed into the gears of a machine by %2$s", - "tile.steamadvantage.steam_elevator.name": "Vapor Elevador Alimentado", - "tile.steamadvantage.platform.name": "Vapor Elevador Plataforma", - "death.attack.musket": "%1$s foi baleado", - "death.attack.musket.player": "%2$s tiro %1$s mortos", - "item.steamadvantage.blackpowder_cartridge.name": "Pólvora Cartridge", - "item.steamadvantage.musket.name": "Mosquete", - "tooltip.musket.damage": "Plano lida %x danos", - "tooltip.musket.ammo": "Requer %x para recarregar", - "tooltip.musket.loaded": "Carregado", - "tooltip.musket.unloaded": "Não loaded", - "enchantment.powderless": "Infinito Munições", - "enchantment.rapid_reload": "Rapidamente Reload", - "enchantment.high_explosive": "Bomba", - "enchantment.recoil": "Recuo", - "tile.steamadvantage.steam_track.name": "Pista de Vapor", - "tile.steamadvantage.steam_boiler_electric.name": "Caldeira de Vapor Elétrica", - "tile.steamadvantage.steam_boiler_geothermal.name": "Caldeira a Vapor de Lava", - "tile.steamadvantage.steam_switch.name": "Válvula de Vapor", - "tile.steamadvantage.steam_still.name": "Destilaria vapor Alimentado", - "tile.steamadvantage.steam_pump.name": "Pomba de Vapor Alimentado", - "tile.steamadvantage.steam_boiler_oil.name": "Óleo de Caldeira Ardente", - "tile.steamadvantage.pump_pipe_steam.name": "Tubo de Bomba", - "item.steamadvantage.steam_governor": "Válvula de Controle de Vapor", - "block.steamadvantage.steam_pipe": "Latão Tubo de Vapor", - "block.steamadvantage.steam_boiler_coal": "Caldeira a Vapor", - "block.steamadvantage.steam_tank": "Tanque Vapor", - "block.steamadvantage.steam_furnace": "Psto Vapor Forno", - "block.steamadvantage.steam_crusher": "Psto Vapor Rocha Afiador", - "block.steamadvantage.drillbit": "Broca", - "block.steamadvantage.steam_drill": "Psto Vapor Broca", - "item.steamadvantage.steam_drill_bit": "Broca", - "block.steamadvantage.steam_elevator": "Vapor Elevador Alimentado", - "block.steamadvantage.platform": "Vapor Elevador Plataforma", - "item.steamadvantage.blackpowder_cartridge": "Pólvora Cartridge", - "item.steamadvantage.musket": "Mosquete", - "block.steamadvantage.steam_track": "Pista de Vapor", - "block.steamadvantage.steam_boiler_electric": "Caldeira de Vapor Elétrica", - "block.steamadvantage.steam_boiler_geothermal": "Caldeira a Vapor de Lava", - "block.steamadvantage.steam_switch": "Válvula de Vapor", - "block.steamadvantage.steam_still": "Destilaria vapor Alimentado", - "block.steamadvantage.steam_pump": "Pomba de Vapor Alimentado", - "block.steamadvantage.steam_boiler_oil": "Óleo de Caldeira Ardente", - "block.steamadvantage.pump_pipe_steam": "Tubo de Bomba" -} diff --git a/src/main/resources/assets/steamadvantage/lang/zh_cn.json b/src/main/resources/assets/steamadvantage/lang/zh_cn.json deleted file mode 100644 index cec439c..0000000 --- a/src/main/resources/assets/steamadvantage/lang/zh_cn.json +++ /dev/null @@ -1,57 +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.steamadvantage.steam_governor.name": "蒸汽調節閥", - "tile.steamadvantage.steam_pipe.name": "黃銅蒸汽管", - "tile.steamadvantage.steam_boiler_coal.name": "蒸汽鍋爐", - "tile.steamadvantage.steam_tank.name": "蒸汽坦克", - "tile.steamadvantage.steam_furnace.name": "蒸汽動力爐", - "tile.steamadvantage.steam_crusher.name": "蒸汽動力岩石破碎機", - "tile.steamadvantage.drillbit.name": "鑽頭", - "tile.steamadvantage.steam_drill.name": "蒸汽動鑽", - "item.steamadvantage.steam_drill_bit.name": "鑽頭", - "death.attack.steam_machine": "%1$s是一台機器的齒輪之間的地面", - "death.attack.steam_machine.player": "%1$s是一機多用%2$s齒輪之間的地面", - "tile.steamadvantage.steam_elevator.name": "蒸汽動力電梯", - "tile.steamadvantage.platform.name": "蒸汽電梯平台", - "death.attack.musket": "%1$s被射殺", - "death.attack.musket.player": "%2$s射門%1$s死了", - "item.steamadvantage.blackpowder_cartridge.name": "火藥盒", - "item.steamadvantage.musket.name": "滑膛槍", - "tooltip.musket.damage": "射擊涉及%x點傷害", - "tooltip.musket.ammo": "需要%x重裝", - "tooltip.musket.loaded": "加載", - "tooltip.musket.unloaded": "未加載", - "enchantment.powderless": "無限彈藥", - "enchantment.rapid_reload": "快速刷新", - "enchantment.high_explosive": "炸彈", - "enchantment.recoil": "後坐力", - "tile.steamadvantage.steam_track.name": "蒸汽路径", - "tile.steamadvantage.steam_boiler_electric.name": "電熱蒸汽鍋爐", - "tile.steamadvantage.steam_boiler_geothermal.name": "地熱蒸汽鍋爐", - "tile.steamadvantage.steam_switch.name": "蒸汽閥", - "tile.steamadvantage.steam_still.name": "蒸汽動力酒廠", - "tile.steamadvantage.steam_pump.name": "蒸汽動力泵", - "tile.steamadvantage.steam_boiler_oil.name": "燃油鍋爐", - "tile.steamadvantage.pump_pipe_steam.name": "泵管", - "item.steamadvantage.steam_governor": "蒸汽調節閥", - "block.steamadvantage.steam_pipe": "黃銅蒸汽管", - "block.steamadvantage.steam_boiler_coal": "蒸汽鍋爐", - "block.steamadvantage.steam_tank": "蒸汽坦克", - "block.steamadvantage.steam_furnace": "蒸汽動力爐", - "block.steamadvantage.steam_crusher": "蒸汽動力岩石破碎機", - "block.steamadvantage.drillbit": "鑽頭", - "block.steamadvantage.steam_drill": "蒸汽動鑽", - "item.steamadvantage.steam_drill_bit": "鑽頭", - "block.steamadvantage.steam_elevator": "蒸汽動力電梯", - "block.steamadvantage.platform": "蒸汽電梯平台", - "item.steamadvantage.blackpowder_cartridge": "火藥盒", - "item.steamadvantage.musket": "滑膛槍", - "block.steamadvantage.steam_track": "蒸汽路径", - "block.steamadvantage.steam_boiler_electric": "電熱蒸汽鍋爐", - "block.steamadvantage.steam_boiler_geothermal": "地熱蒸汽鍋爐", - "block.steamadvantage.steam_switch": "蒸汽閥", - "block.steamadvantage.steam_still": "蒸汽動力酒廠", - "block.steamadvantage.steam_pump": "蒸汽動力泵", - "block.steamadvantage.steam_boiler_oil": "燃油鍋爐", - "block.steamadvantage.pump_pipe_steam": "泵管" -} diff --git a/src/main/resources/assets/steamadvantage/models/block/steam_boiler_coal.json b/src/main/resources/assets/steamadvantage/models/block/steam_boiler_coal.json deleted file mode 100644 index 91b0804..0000000 --- a/src/main/resources/assets/steamadvantage/models/block/steam_boiler_coal.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "parent": "steamadvantage:block/steam_machine_base", - "textures": { - "front": "steamadvantage:blocks/coal_boiler_front", - "top": "steamadvantage:materials/bolted_iron", - "bottom": "steamadvantage:materials/bolted_iron", - "back": "steamadvantage:materials/bolted_iron", - "side": "steamadvantage:materials/bolted_iron", - "metal": "steamadvantage:materials/bolted_iron" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/steamadvantage/models/block/steam_boiler_electric.json b/src/main/resources/assets/steamadvantage/models/block/steam_boiler_electric.json deleted file mode 100644 index 7aa5073..0000000 --- a/src/main/resources/assets/steamadvantage/models/block/steam_boiler_electric.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "parent": "steamadvantage:block/steam_machine_base", - "textures": { - "front": "steamadvantage:blocks/electric_boiler_front", - "top": "steamadvantage:materials/bolted_iron", - "bottom": "steamadvantage:materials/bolted_iron", - "back": "steamadvantage:blocks/electric_boiler_back", - "side": "steamadvantage:materials/bolted_iron", - "metal": "steamadvantage:materials/bolted_iron" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/steamadvantage/models/block/steam_boiler_geothermal.json b/src/main/resources/assets/steamadvantage/models/block/steam_boiler_geothermal.json deleted file mode 100644 index 62f5f42..0000000 --- a/src/main/resources/assets/steamadvantage/models/block/steam_boiler_geothermal.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "parent": "steamadvantage:block/steam_machine_base", - "textures": { - "front": "steamadvantage:blocks/geothermal_boiler_side", - "top": "steamadvantage:blocks/geothermal_boiler_top", - "bottom": "steamadvantage:materials/bolted_iron", - "back": "steamadvantage:blocks/geothermal_boiler_side", - "side": "steamadvantage:blocks/geothermal_boiler_side", - "metal": "steamadvantage:materials/bolted_iron" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/steamadvantage/models/block/steam_crusher.json b/src/main/resources/assets/steamadvantage/models/block/steam_crusher.json deleted file mode 100644 index fe96116..0000000 --- a/src/main/resources/assets/steamadvantage/models/block/steam_crusher.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "parent": "steamadvantage:block/steam_machine_base", - "textures": { - "front": "steamadvantage:blocks/rock_crusher_front", - "top": "steamadvantage:blocks/rock_crusher_top", - "bottom": "steamadvantage:materials/bolted_iron", - "back": "steamadvantage:materials/iron", - "side": "steamadvantage:materials/iron", - "metal": "steamadvantage:materials/iron" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/steamadvantage/models/block/steam_elevator.json b/src/main/resources/assets/steamadvantage/models/block/steam_elevator.json deleted file mode 100644 index 0cee437..0000000 --- a/src/main/resources/assets/steamadvantage/models/block/steam_elevator.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "parent": "steamadvantage:block/steam_machine_base", - "textures": { - "front": "steamadvantage:blocks/steam_elevator_side", - "top": "steamadvantage:blocks/platform_top", - "bottom": "steamadvantage:materials/bolted_iron", - "back": "steamadvantage:blocks/steam_elevator_side", - "side": "steamadvantage:blocks/steam_elevator_side", - "metal": "steamadvantage:materials/iron" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/steamadvantage/models/block/steam_furnace.json b/src/main/resources/assets/steamadvantage/models/block/steam_furnace.json deleted file mode 100644 index bbcb428..0000000 --- a/src/main/resources/assets/steamadvantage/models/block/steam_furnace.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "parent": "steamadvantage:block/steam_machine_base", - "textures": { - "front": "steamadvantage:blocks/steam_furnace_front", - "top": "steamadvantage:blocks/steam_furnace_top", - "bottom": "steamadvantage:materials/bolted_iron", - "back": "steamadvantage:materials/iron", - "side": "steamadvantage:materials/iron", - "metal": "steamadvantage:materials/iron" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/steamadvantage/models/block/steam_pipe_0.json b/src/main/resources/assets/steamadvantage/models/block/steam_pipe_0.json deleted file mode 100644 index a35d584..0000000 --- a/src/main/resources/assets/steamadvantage/models/block/steam_pipe_0.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "parent": "poweradvantage:block/pipe2_0", - "textures": { - "texture": "steamadvantage:blocks/steam_pipe", - "particle": "poweradvantage:materials/brass" - } -} diff --git a/src/main/resources/assets/steamadvantage/models/block/steam_pipe_densuw.json b/src/main/resources/assets/steamadvantage/models/block/steam_pipe_densuw.json deleted file mode 100644 index 93ab08d..0000000 --- a/src/main/resources/assets/steamadvantage/models/block/steam_pipe_densuw.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "parent": "poweradvantage:block/pipe2_densuw", - "textures": { - "texture": "steamadvantage:blocks/steam_pipe", - "particle": "poweradvantage:materials/brass" - } -} diff --git a/src/main/resources/assets/steamadvantage/models/block/steam_pipe_desuw.json b/src/main/resources/assets/steamadvantage/models/block/steam_pipe_desuw.json deleted file mode 100644 index 4993e67..0000000 --- a/src/main/resources/assets/steamadvantage/models/block/steam_pipe_desuw.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "parent": "poweradvantage:block/pipe2_desuw", - "textures": { - "texture": "steamadvantage:blocks/steam_pipe", - "particle": "poweradvantage:materials/brass" - } -} diff --git a/src/main/resources/assets/steamadvantage/models/block/steam_pipe_dnu.json b/src/main/resources/assets/steamadvantage/models/block/steam_pipe_dnu.json deleted file mode 100644 index 4cae90e..0000000 --- a/src/main/resources/assets/steamadvantage/models/block/steam_pipe_dnu.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "parent": "poweradvantage:block/pipe2_dnu", - "textures": { - "texture": "steamadvantage:blocks/steam_pipe", - "particle": "poweradvantage:materials/brass" - } -} diff --git a/src/main/resources/assets/steamadvantage/models/block/steam_pipe_ensw.json b/src/main/resources/assets/steamadvantage/models/block/steam_pipe_ensw.json deleted file mode 100644 index 8ed57c6..0000000 --- a/src/main/resources/assets/steamadvantage/models/block/steam_pipe_ensw.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "parent": "poweradvantage:block/pipe2_ensw", - "textures": { - "texture": "steamadvantage:blocks/steam_pipe", - "particle": "poweradvantage:materials/brass" - } -} diff --git a/src/main/resources/assets/steamadvantage/models/block/steam_pipe_n.json b/src/main/resources/assets/steamadvantage/models/block/steam_pipe_n.json deleted file mode 100644 index c1d38d8..0000000 --- a/src/main/resources/assets/steamadvantage/models/block/steam_pipe_n.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "parent": "poweradvantage:block/pipe2_n", - "textures": { - "texture": "steamadvantage:blocks/steam_pipe", - "particle": "poweradvantage:materials/brass" - } -} diff --git a/src/main/resources/assets/steamadvantage/models/block/steam_pipe_ns.json b/src/main/resources/assets/steamadvantage/models/block/steam_pipe_ns.json deleted file mode 100644 index 944b4a0..0000000 --- a/src/main/resources/assets/steamadvantage/models/block/steam_pipe_ns.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "parent": "poweradvantage:block/pipe2_ns", - "textures": { - "texture": "steamadvantage:blocks/steam_pipe", - "particle": "poweradvantage:materials/brass" - } -} diff --git a/src/main/resources/assets/steamadvantage/models/block/steam_pipe_nsuw.json b/src/main/resources/assets/steamadvantage/models/block/steam_pipe_nsuw.json deleted file mode 100644 index 5be9ee5..0000000 --- a/src/main/resources/assets/steamadvantage/models/block/steam_pipe_nsuw.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "parent": "poweradvantage:block/pipe2_nsuw", - "textures": { - "texture": "steamadvantage:blocks/steam_pipe", - "particle": "poweradvantage:materials/brass" - } -} diff --git a/src/main/resources/assets/steamadvantage/models/block/steam_pipe_nsw.json b/src/main/resources/assets/steamadvantage/models/block/steam_pipe_nsw.json deleted file mode 100644 index 8c4f15e..0000000 --- a/src/main/resources/assets/steamadvantage/models/block/steam_pipe_nsw.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "parent": "poweradvantage:block/pipe2_nsw", - "textures": { - "texture": "steamadvantage:blocks/steam_pipe", - "particle": "poweradvantage:materials/brass" - } -} diff --git a/src/main/resources/assets/steamadvantage/models/block/steam_pipe_nuw.json b/src/main/resources/assets/steamadvantage/models/block/steam_pipe_nuw.json deleted file mode 100644 index 7ee493e..0000000 --- a/src/main/resources/assets/steamadvantage/models/block/steam_pipe_nuw.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "parent": "poweradvantage:block/pipe2_nuw", - "textures": { - "texture": "steamadvantage:blocks/steam_pipe", - "particle": "poweradvantage:materials/brass" - } -} diff --git a/src/main/resources/assets/steamadvantage/models/block/steam_pipe_nw.json b/src/main/resources/assets/steamadvantage/models/block/steam_pipe_nw.json deleted file mode 100644 index 0c47c13..0000000 --- a/src/main/resources/assets/steamadvantage/models/block/steam_pipe_nw.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "parent": "poweradvantage:block/pipe2_nw", - "textures": { - "texture": "steamadvantage:blocks/steam_pipe", - "particle": "poweradvantage:materials/brass" - } -} diff --git a/src/main/resources/assets/steamadvantage/models/block/steam_pump.json b/src/main/resources/assets/steamadvantage/models/block/steam_pump.json deleted file mode 100644 index 6fd1359..0000000 --- a/src/main/resources/assets/steamadvantage/models/block/steam_pump.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "parent": "steamadvantage:block/steam_machine_base", - "textures": { - "front": "steamadvantage:blocks/steam_pump_front", - "top": "steamadvantage:materials/bolted_iron", - "bottom": "steamadvantage:materials/bolted_iron", - "back": "steamadvantage:blocks/steam_pump_side", - "side": "steamadvantage:blocks/steam_pump_side", - "metal": "steamadvantage:materials/bolted_iron" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/steamadvantage/models/block/steam_switch_off.json b/src/main/resources/assets/steamadvantage/models/block/steam_switch_off.json deleted file mode 100644 index 0240d9c..0000000 --- a/src/main/resources/assets/steamadvantage/models/block/steam_switch_off.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "parent": "block/cube_all", - "textures": { - "all": "steamadvantage:blocks/steam_switch_off", - "particle": "steamadvantage:materials/bolted_iron" - } -} diff --git a/src/main/resources/assets/steamadvantage/models/block/steam_switch_on.json b/src/main/resources/assets/steamadvantage/models/block/steam_switch_on.json deleted file mode 100644 index f4b45e8..0000000 --- a/src/main/resources/assets/steamadvantage/models/block/steam_switch_on.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "parent": "block/cube_all", - "textures": { - "all": "steamadvantage:blocks/steam_switch_on", - "particle": "steamadvantage:materials/bolted_iron" - } -} diff --git a/src/main/resources/assets/steamadvantage/models/item/blackpowder_cartridge.json b/src/main/resources/assets/steamadvantage/models/item/blackpowder_cartridge.json deleted file mode 100644 index 730d96f..0000000 --- a/src/main/resources/assets/steamadvantage/models/item/blackpowder_cartridge.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "item/generated", - "textures": { - "layer0": "steamadvantage:items/blackpowder_cartridge" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/steamadvantage/models/item/platform.json b/src/main/resources/assets/steamadvantage/models/item/platform.json deleted file mode 100644 index 2008393..0000000 --- a/src/main/resources/assets/steamadvantage/models/item/platform.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "parent": "steamadvantage:block/platform3", - "ambientocclusion": false -} \ No newline at end of file diff --git a/src/main/resources/assets/steamadvantage/models/item/pump_pipe_steam.json b/src/main/resources/assets/steamadvantage/models/item/pump_pipe_steam.json deleted file mode 100644 index 097b735..0000000 --- a/src/main/resources/assets/steamadvantage/models/item/pump_pipe_steam.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "parent": "poweradvantage:block/fluid_pipe_ns", - "ambientocclusion": false -} \ No newline at end of file diff --git a/src/main/resources/assets/steamadvantage/models/item/steam_boiler_coal.json b/src/main/resources/assets/steamadvantage/models/item/steam_boiler_coal.json deleted file mode 100644 index cfd2a54..0000000 --- a/src/main/resources/assets/steamadvantage/models/item/steam_boiler_coal.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "parent": "steamadvantage:block/steam_boiler_coal", - "ambientocclusion": false -} \ No newline at end of file diff --git a/src/main/resources/assets/steamadvantage/models/item/steam_boiler_electric.json b/src/main/resources/assets/steamadvantage/models/item/steam_boiler_electric.json deleted file mode 100644 index 99e828d..0000000 --- a/src/main/resources/assets/steamadvantage/models/item/steam_boiler_electric.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "parent": "steamadvantage:block/steam_boiler_electric", - "ambientocclusion": false -} \ No newline at end of file diff --git a/src/main/resources/assets/steamadvantage/models/item/steam_boiler_geothermal.json b/src/main/resources/assets/steamadvantage/models/item/steam_boiler_geothermal.json deleted file mode 100644 index 252dac8..0000000 --- a/src/main/resources/assets/steamadvantage/models/item/steam_boiler_geothermal.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "parent": "steamadvantage:block/steam_boiler_geothermal", - "ambientocclusion": false -} \ No newline at end of file diff --git a/src/main/resources/assets/steamadvantage/models/item/steam_boiler_oil.json b/src/main/resources/assets/steamadvantage/models/item/steam_boiler_oil.json deleted file mode 100644 index 08fcfc4..0000000 --- a/src/main/resources/assets/steamadvantage/models/item/steam_boiler_oil.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "parent": "steamadvantage:block/steam_boiler_oil", - "ambientocclusion": false -} \ No newline at end of file diff --git a/src/main/resources/assets/steamadvantage/models/item/steam_crusher.json b/src/main/resources/assets/steamadvantage/models/item/steam_crusher.json deleted file mode 100644 index 0c1cc66..0000000 --- a/src/main/resources/assets/steamadvantage/models/item/steam_crusher.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "parent": "steamadvantage:block/steam_crusher", - "ambientocclusion": false -} \ No newline at end of file diff --git a/src/main/resources/assets/steamadvantage/models/item/steam_drill.json b/src/main/resources/assets/steamadvantage/models/item/steam_drill.json deleted file mode 100644 index c150718..0000000 --- a/src/main/resources/assets/steamadvantage/models/item/steam_drill.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "parent": "steamadvantage:block/steam_drill", - "ambientocclusion": false -} \ No newline at end of file diff --git a/src/main/resources/assets/steamadvantage/models/item/steam_elevator.json b/src/main/resources/assets/steamadvantage/models/item/steam_elevator.json deleted file mode 100644 index 3317c2f..0000000 --- a/src/main/resources/assets/steamadvantage/models/item/steam_elevator.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "parent": "steamadvantage:block/steam_elevator", - "ambientocclusion": false -} \ No newline at end of file diff --git a/src/main/resources/assets/steamadvantage/models/item/steam_furnace.json b/src/main/resources/assets/steamadvantage/models/item/steam_furnace.json deleted file mode 100644 index 5c3b783..0000000 --- a/src/main/resources/assets/steamadvantage/models/item/steam_furnace.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "parent": "steamadvantage:block/steam_furnace", - "ambientocclusion": false -} \ No newline at end of file diff --git a/src/main/resources/assets/steamadvantage/models/item/steam_pipe.json b/src/main/resources/assets/steamadvantage/models/item/steam_pipe.json deleted file mode 100644 index 9af65b0..0000000 --- a/src/main/resources/assets/steamadvantage/models/item/steam_pipe.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "parent": "steamadvantage:block/steam_pipe_ns", - "ambientocclusion": false -} \ No newline at end of file diff --git a/src/main/resources/assets/steamadvantage/models/item/steam_pump.json b/src/main/resources/assets/steamadvantage/models/item/steam_pump.json deleted file mode 100644 index 9b2def0..0000000 --- a/src/main/resources/assets/steamadvantage/models/item/steam_pump.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "parent": "steamadvantage:block/steam_pump", - "ambientocclusion": false -} \ No newline at end of file diff --git a/src/main/resources/assets/steamadvantage/models/item/steam_still.json b/src/main/resources/assets/steamadvantage/models/item/steam_still.json deleted file mode 100644 index 917f2a8..0000000 --- a/src/main/resources/assets/steamadvantage/models/item/steam_still.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "parent": "steamadvantage:block/steam_still", - "ambientocclusion": false -} \ No newline at end of file diff --git a/src/main/resources/assets/steamadvantage/models/item/steam_switch.json b/src/main/resources/assets/steamadvantage/models/item/steam_switch.json deleted file mode 100644 index d8faa25..0000000 --- a/src/main/resources/assets/steamadvantage/models/item/steam_switch.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "steamadvantage:block/steam_switch_on" -} \ No newline at end of file diff --git a/src/main/resources/assets/steamadvantage/models/item/steam_tank.json b/src/main/resources/assets/steamadvantage/models/item/steam_tank.json deleted file mode 100644 index 2545a10..0000000 --- a/src/main/resources/assets/steamadvantage/models/item/steam_tank.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "steamadvantage:block/steam_tank" -} \ No newline at end of file diff --git a/src/main/resources/assets/steamadvantage/models/item/steam_track.json b/src/main/resources/assets/steamadvantage/models/item/steam_track.json deleted file mode 100644 index e7664c8..0000000 --- a/src/main/resources/assets/steamadvantage/models/item/steam_track.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "steamadvantage:block/steam_track_ns" -} \ No newline at end of file diff --git a/src/main/resources/data/steamadvantage/advancements/recipes/blackpowder_cartridge.json b/src/main/resources/data/basesteam/advancements/recipes/blackpowder_cartridge.json similarity index 78% rename from src/main/resources/data/steamadvantage/advancements/recipes/blackpowder_cartridge.json rename to src/main/resources/data/basesteam/advancements/recipes/blackpowder_cartridge.json index 87fc6e3..9a653eb 100644 --- a/src/main/resources/data/steamadvantage/advancements/recipes/blackpowder_cartridge.json +++ b/src/main/resources/data/basesteam/advancements/recipes/blackpowder_cartridge.json @@ -16,7 +16,9 @@ "conditions": { "items": [ { - "item": "minecraft:gunpowder" + "items": [ + "minecraft:gunpowder" + ] } ] } @@ -26,7 +28,9 @@ "conditions": { "items": [ { - "item": "minecraft:paper" + "items": [ + "minecraft:paper" + ] } ] } @@ -34,7 +38,7 @@ "has_recipe": { "trigger": "minecraft:recipe_unlocked", "conditions": { - "recipe": "steamadvantage:blackpowder_cartridge" + "recipe": "basesteam:blackpowder_cartridge" } } }, @@ -48,7 +52,7 @@ ], "rewards": { "recipes": [ - "steamadvantage:blackpowder_cartridge" + "basesteam:blackpowder_cartridge" ] } } diff --git a/src/main/resources/data/steamadvantage/advancements/recipes/musket_left_normal.json b/src/main/resources/data/basesteam/advancements/recipes/musket_left_normal.json similarity index 84% rename from src/main/resources/data/steamadvantage/advancements/recipes/musket_left_normal.json rename to src/main/resources/data/basesteam/advancements/recipes/musket_left_normal.json index 904b751..04b53e5 100644 --- a/src/main/resources/data/steamadvantage/advancements/recipes/musket_left_normal.json +++ b/src/main/resources/data/basesteam/advancements/recipes/musket_left_normal.json @@ -6,7 +6,9 @@ "conditions": { "items": [ { - "item": "minecraft:flint_and_steel" + "items": [ + "minecraft:flint_and_steel" + ] } ] } @@ -34,7 +36,7 @@ "has_recipe": { "trigger": "minecraft:recipe_unlocked", "conditions": { - "recipe": "steamadvantage:musket_left_normal" + "recipe": "basesteam:musket_left_normal" } } }, @@ -48,7 +50,7 @@ ], "rewards": { "recipes": [ - "steamadvantage:musket_left_normal" + "basesteam:musket_left_normal" ] } } diff --git a/src/main/resources/data/steamadvantage/advancements/recipes/musket_left_tech.json b/src/main/resources/data/basesteam/advancements/recipes/musket_left_tech.json similarity index 84% rename from src/main/resources/data/steamadvantage/advancements/recipes/musket_left_tech.json rename to src/main/resources/data/basesteam/advancements/recipes/musket_left_tech.json index 225dfd3..915f749 100644 --- a/src/main/resources/data/steamadvantage/advancements/recipes/musket_left_tech.json +++ b/src/main/resources/data/basesteam/advancements/recipes/musket_left_tech.json @@ -6,7 +6,9 @@ "conditions": { "items": [ { - "item": "minecraft:flint_and_steel" + "items": [ + "minecraft:flint_and_steel" + ] } ] } @@ -34,7 +36,7 @@ "has_recipe": { "trigger": "minecraft:recipe_unlocked", "conditions": { - "recipe": "steamadvantage:musket_left_tech" + "recipe": "basesteam:musket_left_tech" } } }, @@ -48,7 +50,7 @@ ], "rewards": { "recipes": [ - "steamadvantage:musket_left_tech" + "basesteam:musket_left_tech" ] } } diff --git a/src/main/resources/data/steamadvantage/advancements/recipes/musket_right_normal.json b/src/main/resources/data/basesteam/advancements/recipes/musket_right_normal.json similarity index 84% rename from src/main/resources/data/steamadvantage/advancements/recipes/musket_right_normal.json rename to src/main/resources/data/basesteam/advancements/recipes/musket_right_normal.json index d18e04c..4985bb5 100644 --- a/src/main/resources/data/steamadvantage/advancements/recipes/musket_right_normal.json +++ b/src/main/resources/data/basesteam/advancements/recipes/musket_right_normal.json @@ -6,7 +6,9 @@ "conditions": { "items": [ { - "item": "minecraft:flint_and_steel" + "items": [ + "minecraft:flint_and_steel" + ] } ] } @@ -34,7 +36,7 @@ "has_recipe": { "trigger": "minecraft:recipe_unlocked", "conditions": { - "recipe": "steamadvantage:musket_right_normal" + "recipe": "basesteam:musket_right_normal" } } }, @@ -48,7 +50,7 @@ ], "rewards": { "recipes": [ - "steamadvantage:musket_right_normal" + "basesteam:musket_right_normal" ] } } diff --git a/src/main/resources/data/steamadvantage/advancements/recipes/musket_right_tech.json b/src/main/resources/data/basesteam/advancements/recipes/musket_right_tech.json similarity index 84% rename from src/main/resources/data/steamadvantage/advancements/recipes/musket_right_tech.json rename to src/main/resources/data/basesteam/advancements/recipes/musket_right_tech.json index 7ad1324..cb87d9a 100644 --- a/src/main/resources/data/steamadvantage/advancements/recipes/musket_right_tech.json +++ b/src/main/resources/data/basesteam/advancements/recipes/musket_right_tech.json @@ -6,7 +6,9 @@ "conditions": { "items": [ { - "item": "minecraft:flint_and_steel" + "items": [ + "minecraft:flint_and_steel" + ] } ] } @@ -34,7 +36,7 @@ "has_recipe": { "trigger": "minecraft:recipe_unlocked", "conditions": { - "recipe": "steamadvantage:musket_right_tech" + "recipe": "basesteam:musket_right_tech" } } }, @@ -48,7 +50,7 @@ ], "rewards": { "recipes": [ - "steamadvantage:musket_right_tech" + "basesteam:musket_right_tech" ] } } diff --git a/src/main/resources/data/steamadvantage/advancements/recipes/steam_boiler_coal.json b/src/main/resources/data/basesteam/advancements/recipes/steam_boiler_coal.json similarity index 92% rename from src/main/resources/data/steamadvantage/advancements/recipes/steam_boiler_coal.json rename to src/main/resources/data/basesteam/advancements/recipes/steam_boiler_coal.json index 5c8cd8d..c5cf8b8 100644 --- a/src/main/resources/data/steamadvantage/advancements/recipes/steam_boiler_coal.json +++ b/src/main/resources/data/basesteam/advancements/recipes/steam_boiler_coal.json @@ -44,7 +44,7 @@ "has_recipe": { "trigger": "minecraft:recipe_unlocked", "conditions": { - "recipe": "steamadvantage:steam_boiler_coal" + "recipe": "basesteam:steam_boiler_coal" } } }, @@ -59,7 +59,7 @@ ], "rewards": { "recipes": [ - "steamadvantage:steam_boiler_coal" + "basesteam:steam_boiler_coal" ] } } diff --git a/src/main/resources/data/steamadvantage/advancements/recipes/steam_boiler_electric.json b/src/main/resources/data/basesteam/advancements/recipes/steam_boiler_electric.json similarity index 89% rename from src/main/resources/data/steamadvantage/advancements/recipes/steam_boiler_electric.json rename to src/main/resources/data/basesteam/advancements/recipes/steam_boiler_electric.json index d4256dd..ee88613 100644 --- a/src/main/resources/data/steamadvantage/advancements/recipes/steam_boiler_electric.json +++ b/src/main/resources/data/basesteam/advancements/recipes/steam_boiler_electric.json @@ -16,7 +16,9 @@ "conditions": { "items": [ { - "item": "minecraft:bucket" + "items": [ + "minecraft:bucket" + ] } ] } @@ -54,7 +56,7 @@ "has_recipe": { "trigger": "minecraft:recipe_unlocked", "conditions": { - "recipe": "steamadvantage:steam_boiler_electric" + "recipe": "basesteam:steam_boiler_electric" } } }, @@ -70,7 +72,7 @@ ], "rewards": { "recipes": [ - "steamadvantage:steam_boiler_electric" + "basesteam:steam_boiler_electric" ] } } diff --git a/src/main/resources/data/steamadvantage/advancements/recipes/steam_boiler_geothermal.json b/src/main/resources/data/basesteam/advancements/recipes/steam_boiler_geothermal.json similarity index 89% rename from src/main/resources/data/steamadvantage/advancements/recipes/steam_boiler_geothermal.json rename to src/main/resources/data/basesteam/advancements/recipes/steam_boiler_geothermal.json index 5b5241b..8b237ae 100644 --- a/src/main/resources/data/steamadvantage/advancements/recipes/steam_boiler_geothermal.json +++ b/src/main/resources/data/basesteam/advancements/recipes/steam_boiler_geothermal.json @@ -16,7 +16,9 @@ "conditions": { "items": [ { - "item": "minecraft:obsidian" + "items": [ + "minecraft:obsidian" + ] } ] } @@ -54,7 +56,7 @@ "has_recipe": { "trigger": "minecraft:recipe_unlocked", "conditions": { - "recipe": "steamadvantage:steam_boiler_geothermal" + "recipe": "basesteam:steam_boiler_geothermal" } } }, @@ -70,7 +72,7 @@ ], "rewards": { "recipes": [ - "steamadvantage:steam_boiler_geothermal" + "basesteam:steam_boiler_geothermal" ] } } diff --git a/src/main/resources/data/steamadvantage/advancements/recipes/steam_boiler_oil.json b/src/main/resources/data/basesteam/advancements/recipes/steam_boiler_oil.json similarity index 85% rename from src/main/resources/data/steamadvantage/advancements/recipes/steam_boiler_oil.json rename to src/main/resources/data/basesteam/advancements/recipes/steam_boiler_oil.json index 81655b4..fcb4908 100644 --- a/src/main/resources/data/steamadvantage/advancements/recipes/steam_boiler_oil.json +++ b/src/main/resources/data/basesteam/advancements/recipes/steam_boiler_oil.json @@ -6,7 +6,9 @@ "conditions": { "items": [ { - "item": "minecraft:furnace" + "items": [ + "minecraft:furnace" + ] } ] } @@ -16,7 +18,9 @@ "conditions": { "items": [ { - "item": "minecraft:bucket" + "items": [ + "minecraft:bucket" + ] } ] } @@ -54,7 +58,7 @@ "has_recipe": { "trigger": "minecraft:recipe_unlocked", "conditions": { - "recipe": "steamadvantage:steam_boiler_oil" + "recipe": "basesteam:steam_boiler_oil" } } }, @@ -70,7 +74,7 @@ ], "rewards": { "recipes": [ - "steamadvantage:steam_boiler_oil" + "basesteam:steam_boiler_oil" ] } } diff --git a/src/main/resources/data/steamadvantage/advancements/recipes/steam_crusher.json b/src/main/resources/data/basesteam/advancements/recipes/steam_crusher.json similarity index 90% rename from src/main/resources/data/steamadvantage/advancements/recipes/steam_crusher.json rename to src/main/resources/data/basesteam/advancements/recipes/steam_crusher.json index 877473f..fc6b38b 100644 --- a/src/main/resources/data/steamadvantage/advancements/recipes/steam_crusher.json +++ b/src/main/resources/data/basesteam/advancements/recipes/steam_crusher.json @@ -6,7 +6,9 @@ "conditions": { "items": [ { - "item": "minecraft:piston" + "items": [ + "minecraft:piston" + ] } ] } @@ -54,7 +56,7 @@ "has_recipe": { "trigger": "minecraft:recipe_unlocked", "conditions": { - "recipe": "steamadvantage:steam_crusher" + "recipe": "basesteam:steam_crusher" } } }, @@ -70,7 +72,7 @@ ], "rewards": { "recipes": [ - "steamadvantage:steam_crusher" + "basesteam:steam_crusher" ] } } diff --git a/src/main/resources/data/steamadvantage/advancements/recipes/steam_drill.json b/src/main/resources/data/basesteam/advancements/recipes/steam_drill.json similarity index 88% rename from src/main/resources/data/steamadvantage/advancements/recipes/steam_drill.json rename to src/main/resources/data/basesteam/advancements/recipes/steam_drill.json index 31bd734..98c6f52 100644 --- a/src/main/resources/data/steamadvantage/advancements/recipes/steam_drill.json +++ b/src/main/resources/data/basesteam/advancements/recipes/steam_drill.json @@ -6,7 +6,9 @@ "conditions": { "items": [ { - "item": "steamadvantage:steam_drill_bit" + "items": [ + "basesteam:steam_drill_bit" + ] } ] } @@ -44,7 +46,7 @@ "has_recipe": { "trigger": "minecraft:recipe_unlocked", "conditions": { - "recipe": "steamadvantage:steam_drill" + "recipe": "basesteam:steam_drill" } } }, @@ -59,7 +61,7 @@ ], "rewards": { "recipes": [ - "steamadvantage:steam_drill" + "basesteam:steam_drill" ] } } diff --git a/src/main/resources/data/steamadvantage/advancements/recipes/steam_drill_bit.json b/src/main/resources/data/basesteam/advancements/recipes/steam_drill_bit.json similarity index 91% rename from src/main/resources/data/steamadvantage/advancements/recipes/steam_drill_bit.json rename to src/main/resources/data/basesteam/advancements/recipes/steam_drill_bit.json index 7d79943..172d81a 100644 --- a/src/main/resources/data/steamadvantage/advancements/recipes/steam_drill_bit.json +++ b/src/main/resources/data/basesteam/advancements/recipes/steam_drill_bit.json @@ -34,7 +34,7 @@ "has_recipe": { "trigger": "minecraft:recipe_unlocked", "conditions": { - "recipe": "steamadvantage:steam_drill_bit" + "recipe": "basesteam:steam_drill_bit" } } }, @@ -48,7 +48,7 @@ ], "rewards": { "recipes": [ - "steamadvantage:steam_drill_bit" + "basesteam:steam_drill_bit" ] } } diff --git a/src/main/resources/data/steamadvantage/advancements/recipes/steam_drill_diamond_pickaxe_normal.json b/src/main/resources/data/basesteam/advancements/recipes/steam_drill_diamond_pickaxe_normal.json similarity index 85% rename from src/main/resources/data/steamadvantage/advancements/recipes/steam_drill_diamond_pickaxe_normal.json rename to src/main/resources/data/basesteam/advancements/recipes/steam_drill_diamond_pickaxe_normal.json index 1c10065..64c6670 100644 --- a/src/main/resources/data/steamadvantage/advancements/recipes/steam_drill_diamond_pickaxe_normal.json +++ b/src/main/resources/data/basesteam/advancements/recipes/steam_drill_diamond_pickaxe_normal.json @@ -6,7 +6,9 @@ "conditions": { "items": [ { - "item": "minecraft:diamond_pickaxe" + "items": [ + "minecraft:diamond_pickaxe" + ] } ] } @@ -44,7 +46,7 @@ "has_recipe": { "trigger": "minecraft:recipe_unlocked", "conditions": { - "recipe": "steamadvantage:steam_drill_diamond_pickaxe_normal" + "recipe": "basesteam:steam_drill_diamond_pickaxe_normal" } } }, @@ -59,7 +61,7 @@ ], "rewards": { "recipes": [ - "steamadvantage:steam_drill_diamond_pickaxe_normal" + "basesteam:steam_drill_diamond_pickaxe_normal" ] } } diff --git a/src/main/resources/data/steamadvantage/advancements/recipes/steam_elevator.json b/src/main/resources/data/basesteam/advancements/recipes/steam_elevator.json similarity index 90% rename from src/main/resources/data/steamadvantage/advancements/recipes/steam_elevator.json rename to src/main/resources/data/basesteam/advancements/recipes/steam_elevator.json index eda9c30..4fc3417 100644 --- a/src/main/resources/data/steamadvantage/advancements/recipes/steam_elevator.json +++ b/src/main/resources/data/basesteam/advancements/recipes/steam_elevator.json @@ -6,7 +6,9 @@ "conditions": { "items": [ { - "item": "minecraft:piston" + "items": [ + "minecraft:piston" + ] } ] } @@ -54,7 +56,7 @@ "has_recipe": { "trigger": "minecraft:recipe_unlocked", "conditions": { - "recipe": "steamadvantage:steam_elevator" + "recipe": "basesteam:steam_elevator" } } }, @@ -70,7 +72,7 @@ ], "rewards": { "recipes": [ - "steamadvantage:steam_elevator" + "basesteam:steam_elevator" ] } } diff --git a/src/main/resources/data/steamadvantage/advancements/recipes/steam_furnace.json b/src/main/resources/data/basesteam/advancements/recipes/steam_furnace.json similarity index 88% rename from src/main/resources/data/steamadvantage/advancements/recipes/steam_furnace.json rename to src/main/resources/data/basesteam/advancements/recipes/steam_furnace.json index 7bb33ff..e51aa11 100644 --- a/src/main/resources/data/steamadvantage/advancements/recipes/steam_furnace.json +++ b/src/main/resources/data/basesteam/advancements/recipes/steam_furnace.json @@ -6,7 +6,9 @@ "conditions": { "items": [ { - "item": "minecraft:furnace" + "items": [ + "minecraft:furnace" + ] } ] } @@ -44,7 +46,7 @@ "has_recipe": { "trigger": "minecraft:recipe_unlocked", "conditions": { - "recipe": "steamadvantage:steam_furnace" + "recipe": "basesteam:steam_furnace" } } }, @@ -59,7 +61,7 @@ ], "rewards": { "recipes": [ - "steamadvantage:steam_furnace" + "basesteam:steam_furnace" ] } } diff --git a/src/main/resources/data/steamadvantage/advancements/recipes/steam_governor_apocalyptic.json b/src/main/resources/data/basesteam/advancements/recipes/steam_governor_apocalyptic.json similarity index 89% rename from src/main/resources/data/steamadvantage/advancements/recipes/steam_governor_apocalyptic.json rename to src/main/resources/data/basesteam/advancements/recipes/steam_governor_apocalyptic.json index 7b08fae..5e20e0e 100644 --- a/src/main/resources/data/steamadvantage/advancements/recipes/steam_governor_apocalyptic.json +++ b/src/main/resources/data/basesteam/advancements/recipes/steam_governor_apocalyptic.json @@ -34,7 +34,7 @@ "has_recipe": { "trigger": "minecraft:recipe_unlocked", "conditions": { - "recipe": "steamadvantage:steam_governor_apocalyptic" + "recipe": "basesteam:steam_governor_apocalyptic" } } }, @@ -48,7 +48,7 @@ ], "rewards": { "recipes": [ - "steamadvantage:steam_governor_apocalyptic" + "basesteam:steam_governor_apocalyptic" ] } } diff --git a/src/main/resources/data/steamadvantage/advancements/recipes/steam_governor_normal.json b/src/main/resources/data/basesteam/advancements/recipes/steam_governor_normal.json similarity index 87% rename from src/main/resources/data/steamadvantage/advancements/recipes/steam_governor_normal.json rename to src/main/resources/data/basesteam/advancements/recipes/steam_governor_normal.json index a743e6a..72d611a 100644 --- a/src/main/resources/data/steamadvantage/advancements/recipes/steam_governor_normal.json +++ b/src/main/resources/data/basesteam/advancements/recipes/steam_governor_normal.json @@ -24,7 +24,7 @@ "has_recipe": { "trigger": "minecraft:recipe_unlocked", "conditions": { - "recipe": "steamadvantage:steam_governor_normal" + "recipe": "basesteam:steam_governor_normal" } } }, @@ -37,7 +37,7 @@ ], "rewards": { "recipes": [ - "steamadvantage:steam_governor_normal" + "basesteam:steam_governor_normal" ] } } diff --git a/src/main/resources/data/steamadvantage/advancements/recipes/steam_governor_tech.json b/src/main/resources/data/basesteam/advancements/recipes/steam_governor_tech.json similarity index 90% rename from src/main/resources/data/steamadvantage/advancements/recipes/steam_governor_tech.json rename to src/main/resources/data/basesteam/advancements/recipes/steam_governor_tech.json index c4fa9fc..b6192ba 100644 --- a/src/main/resources/data/steamadvantage/advancements/recipes/steam_governor_tech.json +++ b/src/main/resources/data/basesteam/advancements/recipes/steam_governor_tech.json @@ -34,7 +34,7 @@ "has_recipe": { "trigger": "minecraft:recipe_unlocked", "conditions": { - "recipe": "steamadvantage:steam_governor_tech" + "recipe": "basesteam:steam_governor_tech" } } }, @@ -48,7 +48,7 @@ ], "rewards": { "recipes": [ - "steamadvantage:steam_governor_tech" + "basesteam:steam_governor_tech" ] } } diff --git a/src/main/resources/data/steamadvantage/advancements/recipes/steam_pipe.json b/src/main/resources/data/basesteam/advancements/recipes/steam_pipe.json similarity index 86% rename from src/main/resources/data/steamadvantage/advancements/recipes/steam_pipe.json rename to src/main/resources/data/basesteam/advancements/recipes/steam_pipe.json index 128ed3e..7e3b4ca 100644 --- a/src/main/resources/data/steamadvantage/advancements/recipes/steam_pipe.json +++ b/src/main/resources/data/basesteam/advancements/recipes/steam_pipe.json @@ -14,7 +14,7 @@ "has_recipe": { "trigger": "minecraft:recipe_unlocked", "conditions": { - "recipe": "steamadvantage:steam_pipe" + "recipe": "basesteam:steam_pipe" } } }, @@ -26,7 +26,7 @@ ], "rewards": { "recipes": [ - "steamadvantage:steam_pipe" + "basesteam:steam_pipe" ] } } diff --git a/src/main/resources/data/steamadvantage/advancements/recipes/steam_pump.json b/src/main/resources/data/basesteam/advancements/recipes/steam_pump.json similarity index 86% rename from src/main/resources/data/steamadvantage/advancements/recipes/steam_pump.json rename to src/main/resources/data/basesteam/advancements/recipes/steam_pump.json index 3e83c88..8998c41 100644 --- a/src/main/resources/data/steamadvantage/advancements/recipes/steam_pump.json +++ b/src/main/resources/data/basesteam/advancements/recipes/steam_pump.json @@ -6,7 +6,9 @@ "conditions": { "items": [ { - "item": "minecraft:piston" + "items": [ + "minecraft:piston" + ] } ] } @@ -16,7 +18,9 @@ "conditions": { "items": [ { - "item": "minecraft:bucket" + "items": [ + "minecraft:bucket" + ] } ] } @@ -54,7 +58,7 @@ "has_recipe": { "trigger": "minecraft:recipe_unlocked", "conditions": { - "recipe": "steamadvantage:steam_pump" + "recipe": "basesteam:steam_pump" } } }, @@ -70,7 +74,7 @@ ], "rewards": { "recipes": [ - "steamadvantage:steam_pump" + "basesteam:steam_pump" ] } } diff --git a/src/main/resources/data/steamadvantage/advancements/recipes/steam_still.json b/src/main/resources/data/basesteam/advancements/recipes/steam_still.json similarity index 88% rename from src/main/resources/data/steamadvantage/advancements/recipes/steam_still.json rename to src/main/resources/data/basesteam/advancements/recipes/steam_still.json index bff7fde..c72229f 100644 --- a/src/main/resources/data/steamadvantage/advancements/recipes/steam_still.json +++ b/src/main/resources/data/basesteam/advancements/recipes/steam_still.json @@ -6,7 +6,9 @@ "conditions": { "items": [ { - "item": "minecraft:bucket" + "items": [ + "minecraft:bucket" + ] } ] } @@ -44,7 +46,7 @@ "has_recipe": { "trigger": "minecraft:recipe_unlocked", "conditions": { - "recipe": "steamadvantage:steam_still" + "recipe": "basesteam:steam_still" } } }, @@ -59,7 +61,7 @@ ], "rewards": { "recipes": [ - "steamadvantage:steam_still" + "basesteam:steam_still" ] } } diff --git a/src/main/resources/data/steamadvantage/advancements/recipes/steam_switch.json b/src/main/resources/data/basesteam/advancements/recipes/steam_switch.json similarity index 86% rename from src/main/resources/data/steamadvantage/advancements/recipes/steam_switch.json rename to src/main/resources/data/basesteam/advancements/recipes/steam_switch.json index 6cfb907..db368c6 100644 --- a/src/main/resources/data/steamadvantage/advancements/recipes/steam_switch.json +++ b/src/main/resources/data/basesteam/advancements/recipes/steam_switch.json @@ -6,7 +6,9 @@ "conditions": { "items": [ { - "item": "minecraft:lever" + "items": [ + "minecraft:lever" + ] } ] } @@ -34,7 +36,7 @@ "has_recipe": { "trigger": "minecraft:recipe_unlocked", "conditions": { - "recipe": "steamadvantage:steam_switch" + "recipe": "basesteam:steam_switch" } } }, @@ -48,7 +50,7 @@ ], "rewards": { "recipes": [ - "steamadvantage:steam_switch" + "basesteam:steam_switch" ] } } diff --git a/src/main/resources/data/steamadvantage/advancements/recipes/steam_tank.json b/src/main/resources/data/basesteam/advancements/recipes/steam_tank.json similarity index 92% rename from src/main/resources/data/steamadvantage/advancements/recipes/steam_tank.json rename to src/main/resources/data/basesteam/advancements/recipes/steam_tank.json index ad0c1e8..56abcab 100644 --- a/src/main/resources/data/steamadvantage/advancements/recipes/steam_tank.json +++ b/src/main/resources/data/basesteam/advancements/recipes/steam_tank.json @@ -34,7 +34,7 @@ "has_recipe": { "trigger": "minecraft:recipe_unlocked", "conditions": { - "recipe": "steamadvantage:steam_tank" + "recipe": "basesteam:steam_tank" } } }, @@ -48,7 +48,7 @@ ], "rewards": { "recipes": [ - "steamadvantage:steam_tank" + "basesteam:steam_tank" ] } } diff --git a/src/main/resources/data/steamadvantage/advancements/recipes/steam_track.json b/src/main/resources/data/basesteam/advancements/recipes/steam_track.json similarity index 74% rename from src/main/resources/data/steamadvantage/advancements/recipes/steam_track.json rename to src/main/resources/data/basesteam/advancements/recipes/steam_track.json index 86b973b..573d89c 100644 --- a/src/main/resources/data/steamadvantage/advancements/recipes/steam_track.json +++ b/src/main/resources/data/basesteam/advancements/recipes/steam_track.json @@ -6,7 +6,9 @@ "conditions": { "items": [ { - "item": "steamadvantage:steam_pipe" + "items": [ + "basesteam:steam_pipe" + ] } ] } @@ -16,7 +18,9 @@ "conditions": { "items": [ { - "item": "poweradvantage:steel_frame" + "items": [ + "basepower:steel_frame" + ] } ] } @@ -24,7 +28,7 @@ "has_recipe": { "trigger": "minecraft:recipe_unlocked", "conditions": { - "recipe": "steamadvantage:steam_track" + "recipe": "basesteam:steam_track" } } }, @@ -37,7 +41,7 @@ ], "rewards": { "recipes": [ - "steamadvantage:steam_track" + "basesteam:steam_track" ] } } diff --git a/src/main/resources/data/steamadvantage/loot_tables/blocks/steam_switch.json b/src/main/resources/data/basesteam/loot_tables/blocks/steam_boiler_coal.json similarity index 68% rename from src/main/resources/data/steamadvantage/loot_tables/blocks/steam_switch.json rename to src/main/resources/data/basesteam/loot_tables/blocks/steam_boiler_coal.json index f44009c..f819ea0 100644 --- a/src/main/resources/data/steamadvantage/loot_tables/blocks/steam_switch.json +++ b/src/main/resources/data/basesteam/loot_tables/blocks/steam_boiler_coal.json @@ -1,4 +1,4 @@ { "type": "minecraft:block", - "pools": [{"rolls": 1, "entries": [{"type": "minecraft:item", "name": "steamadvantage:steam_switch"}], "conditions": [{"condition": "minecraft:survives_explosion"}]}] + "pools": [{"rolls": 1, "entries": [{"type": "minecraft:item", "name": "basesteam:steam_boiler_coal"}], "conditions": [{"condition": "minecraft:survives_explosion"}]}] } diff --git a/src/main/resources/data/steamadvantage/loot_tables/blocks/steam_boiler_oil.json b/src/main/resources/data/basesteam/loot_tables/blocks/steam_boiler_electric.json similarity index 68% rename from src/main/resources/data/steamadvantage/loot_tables/blocks/steam_boiler_oil.json rename to src/main/resources/data/basesteam/loot_tables/blocks/steam_boiler_electric.json index 41f6305..9c2a682 100644 --- a/src/main/resources/data/steamadvantage/loot_tables/blocks/steam_boiler_oil.json +++ b/src/main/resources/data/basesteam/loot_tables/blocks/steam_boiler_electric.json @@ -1,4 +1,4 @@ { "type": "minecraft:block", - "pools": [{"rolls": 1, "entries": [{"type": "minecraft:item", "name": "steamadvantage:steam_boiler_oil"}], "conditions": [{"condition": "minecraft:survives_explosion"}]}] + "pools": [{"rolls": 1, "entries": [{"type": "minecraft:item", "name": "basesteam:steam_boiler_electric"}], "conditions": [{"condition": "minecraft:survives_explosion"}]}] } diff --git a/src/main/resources/data/basesteam/loot_tables/blocks/steam_boiler_geothermal.json b/src/main/resources/data/basesteam/loot_tables/blocks/steam_boiler_geothermal.json new file mode 100644 index 0000000..2549b85 --- /dev/null +++ b/src/main/resources/data/basesteam/loot_tables/blocks/steam_boiler_geothermal.json @@ -0,0 +1,4 @@ +{ + "type": "minecraft:block", + "pools": [{"rolls": 1, "entries": [{"type": "minecraft:item", "name": "basesteam:steam_boiler_geothermal"}], "conditions": [{"condition": "minecraft:survives_explosion"}]}] +} diff --git a/src/main/resources/data/steamadvantage/loot_tables/blocks/steam_track.json b/src/main/resources/data/basesteam/loot_tables/blocks/steam_boiler_oil.json similarity index 68% rename from src/main/resources/data/steamadvantage/loot_tables/blocks/steam_track.json rename to src/main/resources/data/basesteam/loot_tables/blocks/steam_boiler_oil.json index bf38f1f..3a708de 100644 --- a/src/main/resources/data/steamadvantage/loot_tables/blocks/steam_track.json +++ b/src/main/resources/data/basesteam/loot_tables/blocks/steam_boiler_oil.json @@ -1,4 +1,4 @@ { "type": "minecraft:block", - "pools": [{"rolls": 1, "entries": [{"type": "minecraft:item", "name": "steamadvantage:steam_track"}], "conditions": [{"condition": "minecraft:survives_explosion"}]}] + "pools": [{"rolls": 1, "entries": [{"type": "minecraft:item", "name": "basesteam:steam_boiler_oil"}], "conditions": [{"condition": "minecraft:survives_explosion"}]}] } diff --git a/src/main/resources/data/basesteam/loot_tables/blocks/steam_crusher.json b/src/main/resources/data/basesteam/loot_tables/blocks/steam_crusher.json new file mode 100644 index 0000000..93c07d5 --- /dev/null +++ b/src/main/resources/data/basesteam/loot_tables/blocks/steam_crusher.json @@ -0,0 +1,4 @@ +{ + "type": "minecraft:block", + "pools": [{"rolls": 1, "entries": [{"type": "minecraft:item", "name": "basesteam:steam_crusher"}], "conditions": [{"condition": "minecraft:survives_explosion"}]}] +} diff --git a/src/main/resources/data/basesteam/loot_tables/blocks/steam_drill.json b/src/main/resources/data/basesteam/loot_tables/blocks/steam_drill.json new file mode 100644 index 0000000..8010abf --- /dev/null +++ b/src/main/resources/data/basesteam/loot_tables/blocks/steam_drill.json @@ -0,0 +1,4 @@ +{ + "type": "minecraft:block", + "pools": [{"rolls": 1, "entries": [{"type": "minecraft:item", "name": "basesteam:steam_drill"}], "conditions": [{"condition": "minecraft:survives_explosion"}]}] +} diff --git a/src/main/resources/data/basesteam/loot_tables/blocks/steam_elevator.json b/src/main/resources/data/basesteam/loot_tables/blocks/steam_elevator.json new file mode 100644 index 0000000..60cce6e --- /dev/null +++ b/src/main/resources/data/basesteam/loot_tables/blocks/steam_elevator.json @@ -0,0 +1,4 @@ +{ + "type": "minecraft:block", + "pools": [{"rolls": 1, "entries": [{"type": "minecraft:item", "name": "basesteam:steam_elevator"}], "conditions": [{"condition": "minecraft:survives_explosion"}]}] +} diff --git a/src/main/resources/data/basesteam/loot_tables/blocks/steam_furnace.json b/src/main/resources/data/basesteam/loot_tables/blocks/steam_furnace.json new file mode 100644 index 0000000..c4892e8 --- /dev/null +++ b/src/main/resources/data/basesteam/loot_tables/blocks/steam_furnace.json @@ -0,0 +1,4 @@ +{ + "type": "minecraft:block", + "pools": [{"rolls": 1, "entries": [{"type": "minecraft:item", "name": "basesteam:steam_furnace"}], "conditions": [{"condition": "minecraft:survives_explosion"}]}] +} diff --git a/src/main/resources/data/basesteam/loot_tables/blocks/steam_pipe.json b/src/main/resources/data/basesteam/loot_tables/blocks/steam_pipe.json new file mode 100644 index 0000000..3f13bdf --- /dev/null +++ b/src/main/resources/data/basesteam/loot_tables/blocks/steam_pipe.json @@ -0,0 +1,4 @@ +{ + "type": "minecraft:block", + "pools": [{"rolls": 1, "entries": [{"type": "minecraft:item", "name": "basesteam:steam_pipe"}], "conditions": [{"condition": "minecraft:survives_explosion"}]}] +} diff --git a/src/main/resources/data/basesteam/loot_tables/blocks/steam_pump.json b/src/main/resources/data/basesteam/loot_tables/blocks/steam_pump.json new file mode 100644 index 0000000..3ac2804 --- /dev/null +++ b/src/main/resources/data/basesteam/loot_tables/blocks/steam_pump.json @@ -0,0 +1,4 @@ +{ + "type": "minecraft:block", + "pools": [{"rolls": 1, "entries": [{"type": "minecraft:item", "name": "basesteam:steam_pump"}], "conditions": [{"condition": "minecraft:survives_explosion"}]}] +} diff --git a/src/main/resources/data/basesteam/loot_tables/blocks/steam_still.json b/src/main/resources/data/basesteam/loot_tables/blocks/steam_still.json new file mode 100644 index 0000000..69aee45 --- /dev/null +++ b/src/main/resources/data/basesteam/loot_tables/blocks/steam_still.json @@ -0,0 +1,4 @@ +{ + "type": "minecraft:block", + "pools": [{"rolls": 1, "entries": [{"type": "minecraft:item", "name": "basesteam:steam_still"}], "conditions": [{"condition": "minecraft:survives_explosion"}]}] +} diff --git a/src/main/resources/data/basesteam/loot_tables/blocks/steam_switch.json b/src/main/resources/data/basesteam/loot_tables/blocks/steam_switch.json new file mode 100644 index 0000000..3c1b408 --- /dev/null +++ b/src/main/resources/data/basesteam/loot_tables/blocks/steam_switch.json @@ -0,0 +1,4 @@ +{ + "type": "minecraft:block", + "pools": [{"rolls": 1, "entries": [{"type": "minecraft:item", "name": "basesteam:steam_switch"}], "conditions": [{"condition": "minecraft:survives_explosion"}]}] +} diff --git a/src/main/resources/data/basesteam/loot_tables/blocks/steam_tank.json b/src/main/resources/data/basesteam/loot_tables/blocks/steam_tank.json new file mode 100644 index 0000000..9836b86 --- /dev/null +++ b/src/main/resources/data/basesteam/loot_tables/blocks/steam_tank.json @@ -0,0 +1,4 @@ +{ + "type": "minecraft:block", + "pools": [{"rolls": 1, "entries": [{"type": "minecraft:item", "name": "basesteam:steam_tank"}], "conditions": [{"condition": "minecraft:survives_explosion"}]}] +} diff --git a/src/main/resources/data/basesteam/loot_tables/blocks/steam_track.json b/src/main/resources/data/basesteam/loot_tables/blocks/steam_track.json new file mode 100644 index 0000000..d754fd5 --- /dev/null +++ b/src/main/resources/data/basesteam/loot_tables/blocks/steam_track.json @@ -0,0 +1,4 @@ +{ + "type": "minecraft:block", + "pools": [{"rolls": 1, "entries": [{"type": "minecraft:item", "name": "basesteam:steam_track"}], "conditions": [{"condition": "minecraft:survives_explosion"}]}] +} diff --git a/src/main/resources/data/steamadvantage/loot_tables/chests/advantage_parts.json b/src/main/resources/data/basesteam/loot_tables/chests/advantage_parts.json similarity index 73% rename from src/main/resources/data/steamadvantage/loot_tables/chests/advantage_parts.json rename to src/main/resources/data/basesteam/loot_tables/chests/advantage_parts.json index 0edf0a3..6980d6b 100644 --- a/src/main/resources/data/steamadvantage/loot_tables/chests/advantage_parts.json +++ b/src/main/resources/data/basesteam/loot_tables/chests/advantage_parts.json @@ -1,7 +1,7 @@ { "pools": [ { - "__comment": "25% chance of a Steam Advantage item", + "__comment": "25% chance of a baseSteam item", "rolls": 1, "entries": [ { @@ -10,7 +10,7 @@ }, { "type": "item", - "name": "steamadvantage:steam_governor", + "name": "basesteam:steam_governor", "weight": 50, "functions": [ { @@ -24,7 +24,7 @@ }, { "type": "item", - "name": "steamadvantage:steam_pipe", + "name": "basesteam:steam_pipe", "weight": 25, "functions": [ { @@ -38,7 +38,7 @@ }, { "type": "item", - "name": "steamadvantage:blackpowder_cartridge", + "name": "basesteam:blackpowder_cartridge", "weight": 50, "functions": [ { @@ -52,14 +52,14 @@ }, { "type": "item", - "name": "steamadvantage:musket", - "entryName": "steamadvantage:musket_plain", + "name": "basesteam:musket", + "entryName": "basesteam:musket_plain", "weight": 18 }, { "type": "item", - "name": "steamadvantage:musket", - "entryName": "steamadvantage:musket_enchanted", + "name": "basesteam:musket", + "entryName": "basesteam:musket_enchanted", "weight": 2, "functions": [ { @@ -70,7 +70,7 @@ ] } ], - "name": "steamadvantage_legacy_parts_0" + "name": "basesteam_legacy_parts_0" } ] } diff --git a/src/main/resources/data/steamadvantage/recipes/blackpowder_cartridge.json b/src/main/resources/data/basesteam/recipes/blackpowder_cartridge.json similarity index 70% rename from src/main/resources/data/steamadvantage/recipes/blackpowder_cartridge.json rename to src/main/resources/data/basesteam/recipes/blackpowder_cartridge.json index f677e54..818807a 100644 --- a/src/main/resources/data/steamadvantage/recipes/blackpowder_cartridge.json +++ b/src/main/resources/data/basesteam/recipes/blackpowder_cartridge.json @@ -17,12 +17,12 @@ } }, "result": { - "item": "steamadvantage:blackpowder_cartridge" + "item": "basesteam:blackpowder_cartridge" }, - "group": "steamadvantage:blackpowder_cartridge", + "group": "basesteam:blackpowder_cartridge", "conditions": [ { - "type": "poweradvantage:tag_not_empty", + "type": "basepower:tag_not_empty", "tag": "forge:nuggets/lead" } ] diff --git a/src/main/resources/data/basesteam/recipes/crushing_steam_boiler_coal.json b/src/main/resources/data/basesteam/recipes/crushing_steam_boiler_coal.json new file mode 100644 index 0000000..3bfe4ee --- /dev/null +++ b/src/main/resources/data/basesteam/recipes/crushing_steam_boiler_coal.json @@ -0,0 +1,6 @@ +{ + "type": "basemetals:crushing", + "ingredient": { "item": "basesteam:steam_boiler_coal" }, + "result": { "item": "basesteam:steam_governor", "count": 2 }, + "conditions": [{ "type": "forge:mod_loaded", "modid": "basemetals" }, { "type": "basesteam:recipe_mode", "mode": "APOCALYPTIC" }] +} diff --git a/src/main/resources/data/basesteam/recipes/crushing_steam_boiler_electric.json b/src/main/resources/data/basesteam/recipes/crushing_steam_boiler_electric.json new file mode 100644 index 0000000..5f93ca7 --- /dev/null +++ b/src/main/resources/data/basesteam/recipes/crushing_steam_boiler_electric.json @@ -0,0 +1,6 @@ +{ + "type": "basemetals:crushing", + "ingredient": { "item": "basesteam:steam_boiler_electric" }, + "result": { "item": "basesteam:steam_governor", "count": 2 }, + "conditions": [{ "type": "forge:mod_loaded", "modid": "basemetals" }, { "type": "basesteam:recipe_mode", "mode": "APOCALYPTIC" }] +} diff --git a/src/main/resources/data/basesteam/recipes/crushing_steam_boiler_geothermal.json b/src/main/resources/data/basesteam/recipes/crushing_steam_boiler_geothermal.json new file mode 100644 index 0000000..b629b3e --- /dev/null +++ b/src/main/resources/data/basesteam/recipes/crushing_steam_boiler_geothermal.json @@ -0,0 +1,6 @@ +{ + "type": "basemetals:crushing", + "ingredient": { "item": "basesteam:steam_boiler_geothermal" }, + "result": { "item": "basesteam:steam_governor", "count": 2 }, + "conditions": [{ "type": "forge:mod_loaded", "modid": "basemetals" }, { "type": "basesteam:recipe_mode", "mode": "APOCALYPTIC" }] +} diff --git a/src/main/resources/data/basesteam/recipes/crushing_steam_crusher.json b/src/main/resources/data/basesteam/recipes/crushing_steam_crusher.json new file mode 100644 index 0000000..b0ba42c --- /dev/null +++ b/src/main/resources/data/basesteam/recipes/crushing_steam_crusher.json @@ -0,0 +1,6 @@ +{ + "type": "basemetals:crushing", + "ingredient": { "item": "basesteam:steam_crusher" }, + "result": { "item": "basesteam:steam_governor", "count": 2 }, + "conditions": [{ "type": "forge:mod_loaded", "modid": "basemetals" }, { "type": "basesteam:recipe_mode", "mode": "APOCALYPTIC" }] +} diff --git a/src/main/resources/data/basesteam/recipes/crushing_steam_drill.json b/src/main/resources/data/basesteam/recipes/crushing_steam_drill.json new file mode 100644 index 0000000..63e3603 --- /dev/null +++ b/src/main/resources/data/basesteam/recipes/crushing_steam_drill.json @@ -0,0 +1,6 @@ +{ + "type": "basemetals:crushing", + "ingredient": { "item": "basesteam:steam_drill" }, + "result": { "item": "basesteam:steam_governor", "count": 2 }, + "conditions": [{ "type": "forge:mod_loaded", "modid": "basemetals" }, { "type": "basesteam:recipe_mode", "mode": "APOCALYPTIC" }] +} diff --git a/src/main/resources/data/basesteam/recipes/crushing_steam_elevator.json b/src/main/resources/data/basesteam/recipes/crushing_steam_elevator.json new file mode 100644 index 0000000..6088244 --- /dev/null +++ b/src/main/resources/data/basesteam/recipes/crushing_steam_elevator.json @@ -0,0 +1,6 @@ +{ + "type": "basemetals:crushing", + "ingredient": { "item": "basesteam:steam_elevator" }, + "result": { "item": "basesteam:steam_governor", "count": 3 }, + "conditions": [{ "type": "forge:mod_loaded", "modid": "basemetals" }, { "type": "basesteam:recipe_mode", "mode": "APOCALYPTIC" }] +} diff --git a/src/main/resources/data/basesteam/recipes/crushing_steam_furnace.json b/src/main/resources/data/basesteam/recipes/crushing_steam_furnace.json new file mode 100644 index 0000000..3d826a5 --- /dev/null +++ b/src/main/resources/data/basesteam/recipes/crushing_steam_furnace.json @@ -0,0 +1,6 @@ +{ + "type": "basemetals:crushing", + "ingredient": { "item": "basesteam:steam_furnace" }, + "result": { "item": "basesteam:steam_governor", "count": 2 }, + "conditions": [{ "type": "forge:mod_loaded", "modid": "basemetals" }, { "type": "basesteam:recipe_mode", "mode": "APOCALYPTIC" }] +} diff --git a/src/main/resources/data/basesteam/recipes/crushing_steam_governor.json b/src/main/resources/data/basesteam/recipes/crushing_steam_governor.json new file mode 100644 index 0000000..5b044fc --- /dev/null +++ b/src/main/resources/data/basesteam/recipes/crushing_steam_governor.json @@ -0,0 +1,6 @@ +{ + "type": "basemetals:crushing", + "ingredient": { "item": "basesteam:steam_governor" }, + "result": { "item": "basepower:sprocket", "count": 2 }, + "conditions": [{ "type": "forge:mod_loaded", "modid": "basemetals" }, { "type": "basesteam:recipe_mode", "mode": "APOCALYPTIC" }] +} diff --git a/src/main/resources/data/basesteam/recipes/crushing_steam_tank.json b/src/main/resources/data/basesteam/recipes/crushing_steam_tank.json new file mode 100644 index 0000000..e773c7b --- /dev/null +++ b/src/main/resources/data/basesteam/recipes/crushing_steam_tank.json @@ -0,0 +1,6 @@ +{ + "type": "basemetals:crushing", + "ingredient": { "item": "basesteam:steam_tank" }, + "result": { "item": "basesteam:steam_governor" }, + "conditions": [{ "type": "forge:mod_loaded", "modid": "basemetals" }, { "type": "basesteam:recipe_mode", "mode": "APOCALYPTIC" }] +} diff --git a/src/main/resources/data/steamadvantage/recipes/musket_left_normal.json b/src/main/resources/data/basesteam/recipes/musket_left_normal.json similarity index 65% rename from src/main/resources/data/steamadvantage/recipes/musket_left_normal.json rename to src/main/resources/data/basesteam/recipes/musket_left_normal.json index 372ce23..daff48a 100644 --- a/src/main/resources/data/steamadvantage/recipes/musket_left_normal.json +++ b/src/main/resources/data/basesteam/recipes/musket_left_normal.json @@ -16,20 +16,20 @@ } }, "result": { - "item": "steamadvantage:musket" + "item": "basesteam:musket" }, "conditions": [ { - "type": "steamadvantage:recipe_mode", + "type": "basesteam:recipe_mode", "mode": "NORMAL" }, { - "type": "steamadvantage:musket_enabled" + "type": "basesteam:musket_enabled" }, { - "type": "poweradvantage:tag_not_empty", + "type": "basepower:tag_not_empty", "tag": "forge:ingots/steel" } ], - "group": "steamadvantage:musket" + "group": "basesteam:musket" } diff --git a/src/main/resources/data/steamadvantage/recipes/musket_left_tech.json b/src/main/resources/data/basesteam/recipes/musket_left_tech.json similarity index 66% rename from src/main/resources/data/steamadvantage/recipes/musket_left_tech.json rename to src/main/resources/data/basesteam/recipes/musket_left_tech.json index 86eaea3..ede6426 100644 --- a/src/main/resources/data/steamadvantage/recipes/musket_left_tech.json +++ b/src/main/resources/data/basesteam/recipes/musket_left_tech.json @@ -16,20 +16,20 @@ } }, "result": { - "item": "steamadvantage:musket" + "item": "basesteam:musket" }, "conditions": [ { - "type": "steamadvantage:recipe_mode", + "type": "basesteam:recipe_mode", "mode": "TECH_PROGRESSION" }, { - "type": "steamadvantage:musket_enabled" + "type": "basesteam:musket_enabled" }, { - "type": "poweradvantage:tag_not_empty", + "type": "basepower:tag_not_empty", "tag": "forge:ingots/steel" } ], - "group": "steamadvantage:musket" + "group": "basesteam:musket" } diff --git a/src/main/resources/data/steamadvantage/recipes/musket_right_normal.json b/src/main/resources/data/basesteam/recipes/musket_right_normal.json similarity index 65% rename from src/main/resources/data/steamadvantage/recipes/musket_right_normal.json rename to src/main/resources/data/basesteam/recipes/musket_right_normal.json index f5a9303..a195847 100644 --- a/src/main/resources/data/steamadvantage/recipes/musket_right_normal.json +++ b/src/main/resources/data/basesteam/recipes/musket_right_normal.json @@ -16,20 +16,20 @@ } }, "result": { - "item": "steamadvantage:musket" + "item": "basesteam:musket" }, "conditions": [ { - "type": "steamadvantage:recipe_mode", + "type": "basesteam:recipe_mode", "mode": "NORMAL" }, { - "type": "steamadvantage:musket_enabled" + "type": "basesteam:musket_enabled" }, { - "type": "poweradvantage:tag_not_empty", + "type": "basepower:tag_not_empty", "tag": "forge:ingots/steel" } ], - "group": "steamadvantage:musket" + "group": "basesteam:musket" } diff --git a/src/main/resources/data/steamadvantage/recipes/musket_right_tech.json b/src/main/resources/data/basesteam/recipes/musket_right_tech.json similarity index 66% rename from src/main/resources/data/steamadvantage/recipes/musket_right_tech.json rename to src/main/resources/data/basesteam/recipes/musket_right_tech.json index 2ba3b46..8c9650d 100644 --- a/src/main/resources/data/steamadvantage/recipes/musket_right_tech.json +++ b/src/main/resources/data/basesteam/recipes/musket_right_tech.json @@ -16,20 +16,20 @@ } }, "result": { - "item": "steamadvantage:musket" + "item": "basesteam:musket" }, "conditions": [ { - "type": "steamadvantage:recipe_mode", + "type": "basesteam:recipe_mode", "mode": "TECH_PROGRESSION" }, { - "type": "steamadvantage:musket_enabled" + "type": "basesteam:musket_enabled" }, { - "type": "poweradvantage:tag_not_empty", + "type": "basepower:tag_not_empty", "tag": "forge:ingots/steel" } ], - "group": "steamadvantage:musket" + "group": "basesteam:musket" } diff --git a/src/main/resources/data/steamadvantage/recipes/steam_boiler_coal.json b/src/main/resources/data/basesteam/recipes/steam_boiler_coal.json similarity index 65% rename from src/main/resources/data/steamadvantage/recipes/steam_boiler_coal.json rename to src/main/resources/data/basesteam/recipes/steam_boiler_coal.json index 6db646b..5e8d3f4 100644 --- a/src/main/resources/data/steamadvantage/recipes/steam_boiler_coal.json +++ b/src/main/resources/data/basesteam/recipes/steam_boiler_coal.json @@ -19,24 +19,24 @@ } }, "result": { - "item": "steamadvantage:steam_boiler_coal" + "item": "basesteam:steam_boiler_coal" }, - "group": "steamadvantage:steam_boiler_coal", + "group": "basesteam:steam_boiler_coal", "conditions": [ { - "type": "poweradvantage:tag_not_empty", + "type": "basepower:tag_not_empty", "tag": "forge:conduits/steam" }, { - "type": "poweradvantage:tag_not_empty", + "type": "basepower:tag_not_empty", "tag": "forge:frames/steel" }, { - "type": "poweradvantage:tag_not_empty", + "type": "basepower:tag_not_empty", "tag": "forge:governors" }, { - "type": "poweradvantage:tag_not_empty", + "type": "basepower:tag_not_empty", "tag": "forge:plates/iron" } ] diff --git a/src/main/resources/data/steamadvantage/recipes/steam_boiler_electric.json b/src/main/resources/data/basesteam/recipes/steam_boiler_electric.json similarity index 66% rename from src/main/resources/data/steamadvantage/recipes/steam_boiler_electric.json rename to src/main/resources/data/basesteam/recipes/steam_boiler_electric.json index 671decc..e522c0c 100644 --- a/src/main/resources/data/steamadvantage/recipes/steam_boiler_electric.json +++ b/src/main/resources/data/basesteam/recipes/steam_boiler_electric.json @@ -23,24 +23,24 @@ } }, "result": { - "item": "steamadvantage:steam_boiler_electric" + "item": "basesteam:steam_boiler_electric" }, - "group": "steamadvantage:steam_boiler_electric", + "group": "basesteam:steam_boiler_electric", "conditions": [ { - "type": "poweradvantage:tag_not_empty", + "type": "basepower:tag_not_empty", "tag": "forge:frames/steel" }, { - "type": "poweradvantage:tag_not_empty", + "type": "basepower:tag_not_empty", "tag": "forge:governors" }, { - "type": "poweradvantage:tag_not_empty", + "type": "basepower:tag_not_empty", "tag": "forge:plates/iron" }, { - "type": "poweradvantage:tag_not_empty", + "type": "basepower:tag_not_empty", "tag": "forge:wires" } ] diff --git a/src/main/resources/data/steamadvantage/recipes/steam_boiler_geothermal.json b/src/main/resources/data/basesteam/recipes/steam_boiler_geothermal.json similarity index 67% rename from src/main/resources/data/steamadvantage/recipes/steam_boiler_geothermal.json rename to src/main/resources/data/basesteam/recipes/steam_boiler_geothermal.json index 027f7f8..0ed84b3 100644 --- a/src/main/resources/data/steamadvantage/recipes/steam_boiler_geothermal.json +++ b/src/main/resources/data/basesteam/recipes/steam_boiler_geothermal.json @@ -23,24 +23,24 @@ } }, "result": { - "item": "steamadvantage:steam_boiler_geothermal" + "item": "basesteam:steam_boiler_geothermal" }, - "group": "steamadvantage:steam_boiler_geothermal", + "group": "basesteam:steam_boiler_geothermal", "conditions": [ { - "type": "poweradvantage:tag_not_empty", + "type": "basepower:tag_not_empty", "tag": "forge:conduits/steam" }, { - "type": "poweradvantage:tag_not_empty", + "type": "basepower:tag_not_empty", "tag": "forge:frames/steel" }, { - "type": "poweradvantage:tag_not_empty", + "type": "basepower:tag_not_empty", "tag": "forge:governors" }, { - "type": "poweradvantage:tag_not_empty", + "type": "basepower:tag_not_empty", "tag": "forge:plates/iron" } ] diff --git a/src/main/resources/data/steamadvantage/recipes/steam_boiler_oil.json b/src/main/resources/data/basesteam/recipes/steam_boiler_oil.json similarity index 70% rename from src/main/resources/data/steamadvantage/recipes/steam_boiler_oil.json rename to src/main/resources/data/basesteam/recipes/steam_boiler_oil.json index ffd0c03..9197d3f 100644 --- a/src/main/resources/data/steamadvantage/recipes/steam_boiler_oil.json +++ b/src/main/resources/data/basesteam/recipes/steam_boiler_oil.json @@ -23,20 +23,20 @@ } }, "result": { - "item": "steamadvantage:steam_boiler_oil" + "item": "basesteam:steam_boiler_oil" }, - "group": "steamadvantage:steam_boiler_oil", + "group": "basesteam:steam_boiler_oil", "conditions": [ { - "type": "poweradvantage:tag_not_empty", + "type": "basepower:tag_not_empty", "tag": "forge:frames/steel" }, { - "type": "poweradvantage:tag_not_empty", + "type": "basepower:tag_not_empty", "tag": "forge:governors" }, { - "type": "poweradvantage:tag_not_empty", + "type": "basepower:tag_not_empty", "tag": "forge:plates/iron" } ] diff --git a/src/main/resources/data/steamadvantage/recipes/steam_crusher.json b/src/main/resources/data/basesteam/recipes/steam_crusher.json similarity index 69% rename from src/main/resources/data/steamadvantage/recipes/steam_crusher.json rename to src/main/resources/data/basesteam/recipes/steam_crusher.json index a572272..86f52b9 100644 --- a/src/main/resources/data/steamadvantage/recipes/steam_crusher.json +++ b/src/main/resources/data/basesteam/recipes/steam_crusher.json @@ -23,24 +23,24 @@ } }, "result": { - "item": "steamadvantage:steam_crusher" + "item": "basesteam:steam_crusher" }, - "group": "steamadvantage:steam_crusher", + "group": "basesteam:steam_crusher", "conditions": [ { - "type": "poweradvantage:tag_not_empty", + "type": "basepower:tag_not_empty", "tag": "forge:frames/steel" }, { - "type": "poweradvantage:tag_not_empty", + "type": "basepower:tag_not_empty", "tag": "forge:governors" }, { - "type": "poweradvantage:tag_not_empty", + "type": "basepower:tag_not_empty", "tag": "forge:plates/iron" }, { - "type": "poweradvantage:tag_not_empty", + "type": "basepower:tag_not_empty", "tag": "forge:storage_blocks/steel" } ] diff --git a/src/main/resources/data/steamadvantage/recipes/steam_drill.json b/src/main/resources/data/basesteam/recipes/steam_drill.json similarity index 62% rename from src/main/resources/data/steamadvantage/recipes/steam_drill.json rename to src/main/resources/data/basesteam/recipes/steam_drill.json index f872051..66a8ab0 100644 --- a/src/main/resources/data/steamadvantage/recipes/steam_drill.json +++ b/src/main/resources/data/basesteam/recipes/steam_drill.json @@ -6,7 +6,7 @@ ], "key": { "X": { - "item": "steamadvantage:steam_drill_bit" + "item": "basesteam:steam_drill_bit" }, "g": { "tag": "forge:governors" @@ -19,20 +19,20 @@ } }, "result": { - "item": "steamadvantage:steam_drill" + "item": "basesteam:steam_drill" }, - "group": "steamadvantage:steam_drill", + "group": "basesteam:steam_drill", "conditions": [ { - "type": "poweradvantage:tag_not_empty", + "type": "basepower:tag_not_empty", "tag": "forge:frames/steel" }, { - "type": "poweradvantage:tag_not_empty", + "type": "basepower:tag_not_empty", "tag": "forge:governors" }, { - "type": "poweradvantage:tag_not_empty", + "type": "basepower:tag_not_empty", "tag": "forge:plates/iron" } ] diff --git a/src/main/resources/data/steamadvantage/recipes/steam_drill_bit.json b/src/main/resources/data/basesteam/recipes/steam_drill_bit.json similarity index 65% rename from src/main/resources/data/steamadvantage/recipes/steam_drill_bit.json rename to src/main/resources/data/basesteam/recipes/steam_drill_bit.json index 397c0d6..28e9cfd 100644 --- a/src/main/resources/data/steamadvantage/recipes/steam_drill_bit.json +++ b/src/main/resources/data/basesteam/recipes/steam_drill_bit.json @@ -17,20 +17,20 @@ } }, "result": { - "item": "steamadvantage:steam_drill_bit" + "item": "basesteam:steam_drill_bit" }, - "group": "steamadvantage:steam_drill_bit", + "group": "basesteam:steam_drill_bit", "conditions": [ { - "type": "poweradvantage:tag_not_empty", + "type": "basepower:tag_not_empty", "tag": "forge:gems/diamond" }, { - "type": "poweradvantage:tag_not_empty", + "type": "basepower:tag_not_empty", "tag": "forge:ingots/steel" }, { - "type": "poweradvantage:tag_not_empty", + "type": "basepower:tag_not_empty", "tag": "forge:sprockets" } ] diff --git a/src/main/resources/data/steamadvantage/recipes/steam_drill_diamond_pickaxe_normal.json b/src/main/resources/data/basesteam/recipes/steam_drill_diamond_pickaxe_normal.json similarity index 66% rename from src/main/resources/data/steamadvantage/recipes/steam_drill_diamond_pickaxe_normal.json rename to src/main/resources/data/basesteam/recipes/steam_drill_diamond_pickaxe_normal.json index f718de3..d433383 100644 --- a/src/main/resources/data/steamadvantage/recipes/steam_drill_diamond_pickaxe_normal.json +++ b/src/main/resources/data/basesteam/recipes/steam_drill_diamond_pickaxe_normal.json @@ -19,25 +19,25 @@ } }, "result": { - "item": "steamadvantage:steam_drill" + "item": "basesteam:steam_drill" }, "conditions": [ { - "type": "steamadvantage:recipe_mode", + "type": "basesteam:recipe_mode", "mode": "NORMAL" }, { - "type": "poweradvantage:tag_not_empty", + "type": "basepower:tag_not_empty", "tag": "forge:frames/steel" }, { - "type": "poweradvantage:tag_not_empty", + "type": "basepower:tag_not_empty", "tag": "forge:governors" }, { - "type": "poweradvantage:tag_not_empty", + "type": "basepower:tag_not_empty", "tag": "forge:plates/iron" } ], - "group": "steamadvantage:steam_drill" + "group": "basesteam:steam_drill" } diff --git a/src/main/resources/data/steamadvantage/recipes/steam_elevator.json b/src/main/resources/data/basesteam/recipes/steam_elevator.json similarity index 68% rename from src/main/resources/data/steamadvantage/recipes/steam_elevator.json rename to src/main/resources/data/basesteam/recipes/steam_elevator.json index cb90152..7b5bc50 100644 --- a/src/main/resources/data/steamadvantage/recipes/steam_elevator.json +++ b/src/main/resources/data/basesteam/recipes/steam_elevator.json @@ -23,24 +23,24 @@ } }, "result": { - "item": "steamadvantage:steam_elevator" + "item": "basesteam:steam_elevator" }, - "group": "steamadvantage:steam_elevator", + "group": "basesteam:steam_elevator", "conditions": [ { - "type": "poweradvantage:tag_not_empty", + "type": "basepower:tag_not_empty", "tag": "forge:frames/steel" }, { - "type": "poweradvantage:tag_not_empty", + "type": "basepower:tag_not_empty", "tag": "forge:governors" }, { - "type": "poweradvantage:tag_not_empty", + "type": "basepower:tag_not_empty", "tag": "forge:plates/iron" }, { - "type": "poweradvantage:tag_not_empty", + "type": "basepower:tag_not_empty", "tag": "forge:sprockets" } ] diff --git a/src/main/resources/data/steamadvantage/recipes/steam_furnace.json b/src/main/resources/data/basesteam/recipes/steam_furnace.json similarity index 68% rename from src/main/resources/data/steamadvantage/recipes/steam_furnace.json rename to src/main/resources/data/basesteam/recipes/steam_furnace.json index 642b304..7ae6714 100644 --- a/src/main/resources/data/steamadvantage/recipes/steam_furnace.json +++ b/src/main/resources/data/basesteam/recipes/steam_furnace.json @@ -19,20 +19,20 @@ } }, "result": { - "item": "steamadvantage:steam_furnace" + "item": "basesteam:steam_furnace" }, - "group": "steamadvantage:steam_furnace", + "group": "basesteam:steam_furnace", "conditions": [ { - "type": "poweradvantage:tag_not_empty", + "type": "basepower:tag_not_empty", "tag": "forge:frames/steel" }, { - "type": "poweradvantage:tag_not_empty", + "type": "basepower:tag_not_empty", "tag": "forge:governors" }, { - "type": "poweradvantage:tag_not_empty", + "type": "basepower:tag_not_empty", "tag": "forge:plates/iron" } ] diff --git a/src/main/resources/data/steamadvantage/recipes/steam_governor_apocalyptic.json b/src/main/resources/data/basesteam/recipes/steam_governor_apocalyptic.json similarity index 65% rename from src/main/resources/data/steamadvantage/recipes/steam_governor_apocalyptic.json rename to src/main/resources/data/basesteam/recipes/steam_governor_apocalyptic.json index 56eb2d9..171a860 100644 --- a/src/main/resources/data/steamadvantage/recipes/steam_governor_apocalyptic.json +++ b/src/main/resources/data/basesteam/recipes/steam_governor_apocalyptic.json @@ -20,25 +20,25 @@ } }, "result": { - "item": "steamadvantage:steam_governor" + "item": "basesteam:steam_governor" }, "conditions": [ { - "type": "steamadvantage:recipe_mode", + "type": "basesteam:recipe_mode", "mode": "APOCALYPTIC" }, { - "type": "poweradvantage:tag_not_empty", + "type": "basepower:tag_not_empty", "tag": "forge:ingots/brass" }, { - "type": "poweradvantage:tag_not_empty", + "type": "basepower:tag_not_empty", "tag": "forge:rods" }, { - "type": "poweradvantage:tag_not_empty", + "type": "basepower:tag_not_empty", "tag": "forge:sprockets" } ], - "group": "steamadvantage:steam_governor" + "group": "basesteam:steam_governor" } diff --git a/src/main/resources/data/steamadvantage/recipes/steam_governor_normal.json b/src/main/resources/data/basesteam/recipes/steam_governor_normal.json similarity index 68% rename from src/main/resources/data/steamadvantage/recipes/steam_governor_normal.json rename to src/main/resources/data/basesteam/recipes/steam_governor_normal.json index 6dbea01..230f301 100644 --- a/src/main/resources/data/steamadvantage/recipes/steam_governor_normal.json +++ b/src/main/resources/data/basesteam/recipes/steam_governor_normal.json @@ -20,21 +20,21 @@ } }, "result": { - "item": "steamadvantage:steam_governor" + "item": "basesteam:steam_governor" }, "conditions": [ { - "type": "steamadvantage:recipe_mode", + "type": "basesteam:recipe_mode", "mode": "NORMAL" }, { - "type": "poweradvantage:tag_not_empty", + "type": "basepower:tag_not_empty", "tag": "forge:ingots/brass" }, { - "type": "poweradvantage:tag_not_empty", + "type": "basepower:tag_not_empty", "tag": "forge:nuggets/iron" } ], - "group": "steamadvantage:steam_governor" + "group": "basesteam:steam_governor" } diff --git a/src/main/resources/data/steamadvantage/recipes/steam_governor_tech.json b/src/main/resources/data/basesteam/recipes/steam_governor_tech.json similarity index 65% rename from src/main/resources/data/steamadvantage/recipes/steam_governor_tech.json rename to src/main/resources/data/basesteam/recipes/steam_governor_tech.json index eb07874..c831ace 100644 --- a/src/main/resources/data/steamadvantage/recipes/steam_governor_tech.json +++ b/src/main/resources/data/basesteam/recipes/steam_governor_tech.json @@ -20,25 +20,25 @@ } }, "result": { - "item": "steamadvantage:steam_governor" + "item": "basesteam:steam_governor" }, "conditions": [ { - "type": "steamadvantage:recipe_mode", + "type": "basesteam:recipe_mode", "mode": "TECH_PROGRESSION" }, { - "type": "poweradvantage:tag_not_empty", + "type": "basepower:tag_not_empty", "tag": "forge:ingots/brass" }, { - "type": "poweradvantage:tag_not_empty", + "type": "basepower:tag_not_empty", "tag": "forge:rods" }, { - "type": "poweradvantage:tag_not_empty", + "type": "basepower:tag_not_empty", "tag": "forge:sprockets" } ], - "group": "steamadvantage:steam_governor" + "group": "basesteam:steam_governor" } diff --git a/src/main/resources/data/steamadvantage/recipes/steam_pipe.json b/src/main/resources/data/basesteam/recipes/steam_pipe.json similarity index 67% rename from src/main/resources/data/steamadvantage/recipes/steam_pipe.json rename to src/main/resources/data/basesteam/recipes/steam_pipe.json index 5ef549c..d2ee4bf 100644 --- a/src/main/resources/data/steamadvantage/recipes/steam_pipe.json +++ b/src/main/resources/data/basesteam/recipes/steam_pipe.json @@ -11,13 +11,13 @@ } }, "result": { - "item": "steamadvantage:steam_pipe", + "item": "basesteam:steam_pipe", "count": 6 }, - "group": "steamadvantage:steam_pipe", + "group": "basesteam:steam_pipe", "conditions": [ { - "type": "poweradvantage:tag_not_empty", + "type": "basepower:tag_not_empty", "tag": "forge:ingots/brass" } ] diff --git a/src/main/resources/data/steamadvantage/recipes/steam_pump.json b/src/main/resources/data/basesteam/recipes/steam_pump.json similarity index 71% rename from src/main/resources/data/steamadvantage/recipes/steam_pump.json rename to src/main/resources/data/basesteam/recipes/steam_pump.json index 8de30eb..a3b22c0 100644 --- a/src/main/resources/data/steamadvantage/recipes/steam_pump.json +++ b/src/main/resources/data/basesteam/recipes/steam_pump.json @@ -23,20 +23,20 @@ } }, "result": { - "item": "steamadvantage:steam_pump" + "item": "basesteam:steam_pump" }, - "group": "steamadvantage:steam_pump", + "group": "basesteam:steam_pump", "conditions": [ { - "type": "poweradvantage:tag_not_empty", + "type": "basepower:tag_not_empty", "tag": "forge:frames/steel" }, { - "type": "poweradvantage:tag_not_empty", + "type": "basepower:tag_not_empty", "tag": "forge:governors" }, { - "type": "poweradvantage:tag_not_empty", + "type": "basepower:tag_not_empty", "tag": "forge:plates/iron" } ] diff --git a/src/main/resources/data/steamadvantage/recipes/steam_still.json b/src/main/resources/data/basesteam/recipes/steam_still.json similarity index 71% rename from src/main/resources/data/steamadvantage/recipes/steam_still.json rename to src/main/resources/data/basesteam/recipes/steam_still.json index dbfe1d0..049a2b6 100644 --- a/src/main/resources/data/steamadvantage/recipes/steam_still.json +++ b/src/main/resources/data/basesteam/recipes/steam_still.json @@ -23,20 +23,20 @@ } }, "result": { - "item": "steamadvantage:steam_still" + "item": "basesteam:steam_still" }, - "group": "steamadvantage:steam_still", + "group": "basesteam:steam_still", "conditions": [ { - "type": "poweradvantage:tag_not_empty", + "type": "basepower:tag_not_empty", "tag": "forge:frames/steel" }, { - "type": "poweradvantage:tag_not_empty", + "type": "basepower:tag_not_empty", "tag": "forge:governors" }, { - "type": "poweradvantage:tag_not_empty", + "type": "basepower:tag_not_empty", "tag": "forge:plates/iron" } ] diff --git a/src/main/resources/data/steamadvantage/recipes/steam_switch.json b/src/main/resources/data/basesteam/recipes/steam_switch.json similarity index 68% rename from src/main/resources/data/steamadvantage/recipes/steam_switch.json rename to src/main/resources/data/basesteam/recipes/steam_switch.json index 512dbbc..69b8889 100644 --- a/src/main/resources/data/steamadvantage/recipes/steam_switch.json +++ b/src/main/resources/data/basesteam/recipes/steam_switch.json @@ -16,16 +16,16 @@ } }, "result": { - "item": "steamadvantage:steam_switch" + "item": "basesteam:steam_switch" }, - "group": "steamadvantage:steam_switch", + "group": "basesteam:steam_switch", "conditions": [ { - "type": "poweradvantage:tag_not_empty", + "type": "basepower:tag_not_empty", "tag": "forge:conduits/steam" }, { - "type": "poweradvantage:tag_not_empty", + "type": "basepower:tag_not_empty", "tag": "forge:frames/steel" } ] diff --git a/src/main/resources/data/steamadvantage/recipes/steam_tank.json b/src/main/resources/data/basesteam/recipes/steam_tank.json similarity index 67% rename from src/main/resources/data/steamadvantage/recipes/steam_tank.json rename to src/main/resources/data/basesteam/recipes/steam_tank.json index 2ec9ff1..acf8b40 100644 --- a/src/main/resources/data/steamadvantage/recipes/steam_tank.json +++ b/src/main/resources/data/basesteam/recipes/steam_tank.json @@ -17,20 +17,20 @@ } }, "result": { - "item": "steamadvantage:steam_tank" + "item": "basesteam:steam_tank" }, - "group": "steamadvantage:steam_tank", + "group": "basesteam:steam_tank", "conditions": [ { - "type": "poweradvantage:tag_not_empty", + "type": "basepower:tag_not_empty", "tag": "forge:conduits/steam" }, { - "type": "poweradvantage:tag_not_empty", + "type": "basepower:tag_not_empty", "tag": "forge:governors" }, { - "type": "poweradvantage:tag_not_empty", + "type": "basepower:tag_not_empty", "tag": "forge:plates/copper" } ] diff --git a/src/main/resources/data/basesteam/recipes/steam_track.json b/src/main/resources/data/basesteam/recipes/steam_track.json new file mode 100644 index 0000000..725fb3e --- /dev/null +++ b/src/main/resources/data/basesteam/recipes/steam_track.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "ingredients": [ + { + "item": "basesteam:steam_pipe" + }, + { + "item": "basepower:steel_frame" + } + ], + "result": { + "item": "basesteam:steam_track" + }, + "group": "basesteam:steam_track" +} diff --git a/src/main/resources/data/forge/tags/items/ammo/blackpowder.json b/src/main/resources/data/forge/tags/items/ammo/blackpowder.json index db1807c..53965df 100644 --- a/src/main/resources/data/forge/tags/items/ammo/blackpowder.json +++ b/src/main/resources/data/forge/tags/items/ammo/blackpowder.json @@ -1,4 +1,4 @@ { "replace": false, - "values": ["steamadvantage:blackpowder_cartridge"] + "values": ["basesteam:blackpowder_cartridge"] } diff --git a/src/main/resources/data/forge/tags/items/conduits/steam.json b/src/main/resources/data/forge/tags/items/conduits/steam.json index 28868b7..c9055e2 100644 --- a/src/main/resources/data/forge/tags/items/conduits/steam.json +++ b/src/main/resources/data/forge/tags/items/conduits/steam.json @@ -1,4 +1,4 @@ { "replace": false, - "values": ["steamadvantage:steam_pipe"] + "values": ["basesteam:steam_pipe"] } diff --git a/src/main/resources/data/forge/tags/items/governors/brass.json b/src/main/resources/data/forge/tags/items/governors/brass.json index 1997d16..b37a593 100644 --- a/src/main/resources/data/forge/tags/items/governors/brass.json +++ b/src/main/resources/data/forge/tags/items/governors/brass.json @@ -1,4 +1,4 @@ { "replace": false, - "values": ["steamadvantage:steam_governor"] + "values": ["basesteam:steam_governor"] } diff --git a/src/main/resources/data/forge/tags/items/guns.json b/src/main/resources/data/forge/tags/items/guns.json index ac2e893..92bce1d 100644 --- a/src/main/resources/data/forge/tags/items/guns.json +++ b/src/main/resources/data/forge/tags/items/guns.json @@ -1,4 +1,4 @@ { "replace": false, - "values": ["steamadvantage:musket"] + "values": ["basesteam:musket"] } diff --git a/src/main/resources/data/minecraft/tags/blocks/mineable/pickaxe.json b/src/main/resources/data/minecraft/tags/blocks/mineable/pickaxe.json new file mode 100644 index 0000000..63c0d6b --- /dev/null +++ b/src/main/resources/data/minecraft/tags/blocks/mineable/pickaxe.json @@ -0,0 +1,22 @@ +{ + "replace": false, + "values": [ + "basesteam:steam_pipe", + "basesteam:steam_track", + "basesteam:steam_boiler_coal", + "basesteam:steam_boiler_electric", + "basesteam:steam_boiler_geothermal", + "basesteam:steam_tank", + "basesteam:steam_furnace", + "basesteam:steam_crusher", + "basesteam:steam_drill", + "basesteam:steam_elevator", + "basesteam:steam_switch", + "basesteam:steam_still", + "basesteam:steam_pump", + "basesteam:steam_boiler_oil", + "basesteam:platform", + "basesteam:drillbit", + "basesteam:pump_pipe_steam" + ] +} diff --git a/src/main/resources/data/steamadvantage/loot_tables/blocks/steam_boiler_coal.json b/src/main/resources/data/steamadvantage/loot_tables/blocks/steam_boiler_coal.json deleted file mode 100644 index 52d3197..0000000 --- a/src/main/resources/data/steamadvantage/loot_tables/blocks/steam_boiler_coal.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "type": "minecraft:block", - "pools": [{"rolls": 1, "entries": [{"type": "minecraft:item", "name": "steamadvantage:steam_boiler_coal"}], "conditions": [{"condition": "minecraft:survives_explosion"}]}] -} diff --git a/src/main/resources/data/steamadvantage/loot_tables/blocks/steam_boiler_electric.json b/src/main/resources/data/steamadvantage/loot_tables/blocks/steam_boiler_electric.json deleted file mode 100644 index 31528b9..0000000 --- a/src/main/resources/data/steamadvantage/loot_tables/blocks/steam_boiler_electric.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "type": "minecraft:block", - "pools": [{"rolls": 1, "entries": [{"type": "minecraft:item", "name": "steamadvantage:steam_boiler_electric"}], "conditions": [{"condition": "minecraft:survives_explosion"}]}] -} diff --git a/src/main/resources/data/steamadvantage/loot_tables/blocks/steam_boiler_geothermal.json b/src/main/resources/data/steamadvantage/loot_tables/blocks/steam_boiler_geothermal.json deleted file mode 100644 index 087e912..0000000 --- a/src/main/resources/data/steamadvantage/loot_tables/blocks/steam_boiler_geothermal.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "type": "minecraft:block", - "pools": [{"rolls": 1, "entries": [{"type": "minecraft:item", "name": "steamadvantage:steam_boiler_geothermal"}], "conditions": [{"condition": "minecraft:survives_explosion"}]}] -} diff --git a/src/main/resources/data/steamadvantage/loot_tables/blocks/steam_crusher.json b/src/main/resources/data/steamadvantage/loot_tables/blocks/steam_crusher.json deleted file mode 100644 index bbb3022..0000000 --- a/src/main/resources/data/steamadvantage/loot_tables/blocks/steam_crusher.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "type": "minecraft:block", - "pools": [{"rolls": 1, "entries": [{"type": "minecraft:item", "name": "steamadvantage:steam_crusher"}], "conditions": [{"condition": "minecraft:survives_explosion"}]}] -} diff --git a/src/main/resources/data/steamadvantage/loot_tables/blocks/steam_drill.json b/src/main/resources/data/steamadvantage/loot_tables/blocks/steam_drill.json deleted file mode 100644 index 24f06cc..0000000 --- a/src/main/resources/data/steamadvantage/loot_tables/blocks/steam_drill.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "type": "minecraft:block", - "pools": [{"rolls": 1, "entries": [{"type": "minecraft:item", "name": "steamadvantage:steam_drill"}], "conditions": [{"condition": "minecraft:survives_explosion"}]}] -} diff --git a/src/main/resources/data/steamadvantage/loot_tables/blocks/steam_elevator.json b/src/main/resources/data/steamadvantage/loot_tables/blocks/steam_elevator.json deleted file mode 100644 index 5706289..0000000 --- a/src/main/resources/data/steamadvantage/loot_tables/blocks/steam_elevator.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "type": "minecraft:block", - "pools": [{"rolls": 1, "entries": [{"type": "minecraft:item", "name": "steamadvantage:steam_elevator"}], "conditions": [{"condition": "minecraft:survives_explosion"}]}] -} diff --git a/src/main/resources/data/steamadvantage/loot_tables/blocks/steam_furnace.json b/src/main/resources/data/steamadvantage/loot_tables/blocks/steam_furnace.json deleted file mode 100644 index dcebd5b..0000000 --- a/src/main/resources/data/steamadvantage/loot_tables/blocks/steam_furnace.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "type": "minecraft:block", - "pools": [{"rolls": 1, "entries": [{"type": "minecraft:item", "name": "steamadvantage:steam_furnace"}], "conditions": [{"condition": "minecraft:survives_explosion"}]}] -} diff --git a/src/main/resources/data/steamadvantage/loot_tables/blocks/steam_pipe.json b/src/main/resources/data/steamadvantage/loot_tables/blocks/steam_pipe.json deleted file mode 100644 index ec6970d..0000000 --- a/src/main/resources/data/steamadvantage/loot_tables/blocks/steam_pipe.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "type": "minecraft:block", - "pools": [{"rolls": 1, "entries": [{"type": "minecraft:item", "name": "steamadvantage:steam_pipe"}], "conditions": [{"condition": "minecraft:survives_explosion"}]}] -} diff --git a/src/main/resources/data/steamadvantage/loot_tables/blocks/steam_pump.json b/src/main/resources/data/steamadvantage/loot_tables/blocks/steam_pump.json deleted file mode 100644 index 668b722..0000000 --- a/src/main/resources/data/steamadvantage/loot_tables/blocks/steam_pump.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "type": "minecraft:block", - "pools": [{"rolls": 1, "entries": [{"type": "minecraft:item", "name": "steamadvantage:steam_pump"}], "conditions": [{"condition": "minecraft:survives_explosion"}]}] -} diff --git a/src/main/resources/data/steamadvantage/loot_tables/blocks/steam_still.json b/src/main/resources/data/steamadvantage/loot_tables/blocks/steam_still.json deleted file mode 100644 index cc4a602..0000000 --- a/src/main/resources/data/steamadvantage/loot_tables/blocks/steam_still.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "type": "minecraft:block", - "pools": [{"rolls": 1, "entries": [{"type": "minecraft:item", "name": "steamadvantage:steam_still"}], "conditions": [{"condition": "minecraft:survives_explosion"}]}] -} diff --git a/src/main/resources/data/steamadvantage/loot_tables/blocks/steam_tank.json b/src/main/resources/data/steamadvantage/loot_tables/blocks/steam_tank.json deleted file mode 100644 index 5aca3a2..0000000 --- a/src/main/resources/data/steamadvantage/loot_tables/blocks/steam_tank.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "type": "minecraft:block", - "pools": [{"rolls": 1, "entries": [{"type": "minecraft:item", "name": "steamadvantage:steam_tank"}], "conditions": [{"condition": "minecraft:survives_explosion"}]}] -} diff --git a/src/main/resources/data/steamadvantage/recipes/crushing_steam_boiler_coal.json b/src/main/resources/data/steamadvantage/recipes/crushing_steam_boiler_coal.json deleted file mode 100644 index ea3b7af..0000000 --- a/src/main/resources/data/steamadvantage/recipes/crushing_steam_boiler_coal.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "type": "basemetals:crushing", - "ingredient": { "item": "steamadvantage:steam_boiler_coal" }, - "result": { "item": "steamadvantage:steam_governor", "count": 2 }, - "conditions": [{ "type": "steamadvantage:recipe_mode", "mode": "APOCALYPTIC" }] -} diff --git a/src/main/resources/data/steamadvantage/recipes/crushing_steam_boiler_electric.json b/src/main/resources/data/steamadvantage/recipes/crushing_steam_boiler_electric.json deleted file mode 100644 index e5db1e1..0000000 --- a/src/main/resources/data/steamadvantage/recipes/crushing_steam_boiler_electric.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "type": "basemetals:crushing", - "ingredient": { "item": "steamadvantage:steam_boiler_electric" }, - "result": { "item": "steamadvantage:steam_governor", "count": 2 }, - "conditions": [{ "type": "steamadvantage:recipe_mode", "mode": "APOCALYPTIC" }] -} diff --git a/src/main/resources/data/steamadvantage/recipes/crushing_steam_boiler_geothermal.json b/src/main/resources/data/steamadvantage/recipes/crushing_steam_boiler_geothermal.json deleted file mode 100644 index eb383af..0000000 --- a/src/main/resources/data/steamadvantage/recipes/crushing_steam_boiler_geothermal.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "type": "basemetals:crushing", - "ingredient": { "item": "steamadvantage:steam_boiler_geothermal" }, - "result": { "item": "steamadvantage:steam_governor", "count": 2 }, - "conditions": [{ "type": "steamadvantage:recipe_mode", "mode": "APOCALYPTIC" }] -} diff --git a/src/main/resources/data/steamadvantage/recipes/crushing_steam_crusher.json b/src/main/resources/data/steamadvantage/recipes/crushing_steam_crusher.json deleted file mode 100644 index ab487f9..0000000 --- a/src/main/resources/data/steamadvantage/recipes/crushing_steam_crusher.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "type": "basemetals:crushing", - "ingredient": { "item": "steamadvantage:steam_crusher" }, - "result": { "item": "steamadvantage:steam_governor", "count": 2 }, - "conditions": [{ "type": "steamadvantage:recipe_mode", "mode": "APOCALYPTIC" }] -} diff --git a/src/main/resources/data/steamadvantage/recipes/crushing_steam_drill.json b/src/main/resources/data/steamadvantage/recipes/crushing_steam_drill.json deleted file mode 100644 index 033ddb1..0000000 --- a/src/main/resources/data/steamadvantage/recipes/crushing_steam_drill.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "type": "basemetals:crushing", - "ingredient": { "item": "steamadvantage:steam_drill" }, - "result": { "item": "steamadvantage:steam_governor", "count": 2 }, - "conditions": [{ "type": "steamadvantage:recipe_mode", "mode": "APOCALYPTIC" }] -} diff --git a/src/main/resources/data/steamadvantage/recipes/crushing_steam_elevator.json b/src/main/resources/data/steamadvantage/recipes/crushing_steam_elevator.json deleted file mode 100644 index edc587d..0000000 --- a/src/main/resources/data/steamadvantage/recipes/crushing_steam_elevator.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "type": "basemetals:crushing", - "ingredient": { "item": "steamadvantage:steam_elevator" }, - "result": { "item": "steamadvantage:steam_governor", "count": 3 }, - "conditions": [{ "type": "steamadvantage:recipe_mode", "mode": "APOCALYPTIC" }] -} diff --git a/src/main/resources/data/steamadvantage/recipes/crushing_steam_furnace.json b/src/main/resources/data/steamadvantage/recipes/crushing_steam_furnace.json deleted file mode 100644 index 17389fd..0000000 --- a/src/main/resources/data/steamadvantage/recipes/crushing_steam_furnace.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "type": "basemetals:crushing", - "ingredient": { "item": "steamadvantage:steam_furnace" }, - "result": { "item": "steamadvantage:steam_governor", "count": 2 }, - "conditions": [{ "type": "steamadvantage:recipe_mode", "mode": "APOCALYPTIC" }] -} diff --git a/src/main/resources/data/steamadvantage/recipes/crushing_steam_governor.json b/src/main/resources/data/steamadvantage/recipes/crushing_steam_governor.json deleted file mode 100644 index 2c95255..0000000 --- a/src/main/resources/data/steamadvantage/recipes/crushing_steam_governor.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "type": "basemetals:crushing", - "ingredient": { "item": "steamadvantage:steam_governor" }, - "result": { "item": "poweradvantage:sprocket", "count": 2 }, - "conditions": [{ "type": "steamadvantage:recipe_mode", "mode": "APOCALYPTIC" }] -} diff --git a/src/main/resources/data/steamadvantage/recipes/crushing_steam_tank.json b/src/main/resources/data/steamadvantage/recipes/crushing_steam_tank.json deleted file mode 100644 index 5cadc84..0000000 --- a/src/main/resources/data/steamadvantage/recipes/crushing_steam_tank.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "type": "basemetals:crushing", - "ingredient": { "item": "steamadvantage:steam_tank" }, - "result": { "item": "steamadvantage:steam_governor" }, - "conditions": [{ "type": "steamadvantage:recipe_mode", "mode": "APOCALYPTIC" }] -} diff --git a/src/main/resources/data/steamadvantage/recipes/steam_track.json b/src/main/resources/data/steamadvantage/recipes/steam_track.json deleted file mode 100644 index fd4546c..0000000 --- a/src/main/resources/data/steamadvantage/recipes/steam_track.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "type": "minecraft:crafting_shapeless", - "ingredients": [ - { - "item": "steamadvantage:steam_pipe" - }, - { - "item": "poweradvantage:steel_frame" - } - ], - "result": { - "item": "steamadvantage:steam_track" - }, - "group": "steamadvantage:steam_track" -} diff --git a/src/main/resources/pack.mcmeta b/src/main/resources/pack.mcmeta index 9adca15..776bb89 100644 --- a/src/main/resources/pack.mcmeta +++ b/src/main/resources/pack.mcmeta @@ -1,6 +1,6 @@ { "pack":{ - "pack_format":6, - "description":"Steam Advantage" + "pack_format":7, + "description":"baseSteam" } } diff --git a/src/test/java/zone/moddev/mc/steamadvantage/blocks/DrillBitPersistenceTest.java b/src/test/java/zone/moddev/mc/basesteam/blocks/DrillBitPersistenceTest.java similarity index 72% rename from src/test/java/zone/moddev/mc/steamadvantage/blocks/DrillBitPersistenceTest.java rename to src/test/java/zone/moddev/mc/basesteam/blocks/DrillBitPersistenceTest.java index 69b15ba..cef319c 100644 --- a/src/test/java/zone/moddev/mc/steamadvantage/blocks/DrillBitPersistenceTest.java +++ b/src/test/java/zone/moddev/mc/basesteam/blocks/DrillBitPersistenceTest.java @@ -1,20 +1,20 @@ -package zone.moddev.mc.steamadvantage.blocks; +package zone.moddev.mc.basesteam.blocks; -import net.minecraft.nbt.CompoundNBT; -import net.minecraft.util.Direction; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.core.Direction; import org.junit.Test; import static org.junit.Assert.*; public class DrillBitPersistenceTest { @org.junit.BeforeClass public static void bootstrapNativeRegistries() { - net.minecraft.util.registry.Bootstrap.bootStrap(); + net.minecraft.SharedConstants.tryDetectVersion(); net.minecraft.server.Bootstrap.bootStrap(); } @Test public void allSixDirectionsSurviveNativeUpdatePackets() { for (Direction direction : Direction.values()) { DrillBitTileEntity tile = new DrillBitTileEntity(); tile.setDirection(direction); - CompoundNBT packet = tile.getUpdatePacket().getTag(); + CompoundTag packet = tile.getUpdatePacket().getTag(); assertEquals(direction.get3DDataValue(), packet.getByte("dir")); DrillBitTileEntity restored = new DrillBitTileEntity(); restored.onDataPacket(null, tile.getUpdatePacket()); @@ -24,21 +24,21 @@ public class DrillBitPersistenceTest { } @Test public void oldDirectionKeyRemainsReadableAndCanonicalKeyWins() { - CompoundNBT tag = new CompoundNBT(); + CompoundTag tag = new CompoundTag(); tag.putByte("d", (byte) Direction.EAST.get3DDataValue()); DrillBitTileEntity tile = new DrillBitTileEntity(); - tile.load(net.minecraft.block.Blocks.AIR.defaultBlockState(), tag); + tile.load(tag); assertEquals(Direction.Axis.X, tile.getDirection()); tag.putByte("dir", (byte) Direction.NORTH.get3DDataValue()); - tile.load(net.minecraft.block.Blocks.AIR.defaultBlockState(), tag); + tile.load(tag); assertEquals(Direction.Axis.Z, tile.getDirection()); } @Test public void invalidDirectionFallsBackToDown() { - CompoundNBT tag = new CompoundNBT(); + CompoundTag tag = new CompoundTag(); tag.putByte("dir", (byte) 127); DrillBitTileEntity tile = new DrillBitTileEntity(); - tile.load(net.minecraft.block.Blocks.AIR.defaultBlockState(), tag); + tile.load(tag); assertEquals(Direction.DOWN.get3DDataValue(), tile.getUpdatePacket().getTag().getByte("dir")); } } diff --git a/src/test/java/zone/moddev/mc/steamadvantage/graphics/DrillBitRendererTest.java b/src/test/java/zone/moddev/mc/basesteam/graphics/DrillBitRendererTest.java similarity index 78% rename from src/test/java/zone/moddev/mc/steamadvantage/graphics/DrillBitRendererTest.java rename to src/test/java/zone/moddev/mc/basesteam/graphics/DrillBitRendererTest.java index 27bf46d..4961fdd 100644 --- a/src/test/java/zone/moddev/mc/steamadvantage/graphics/DrillBitRendererTest.java +++ b/src/test/java/zone/moddev/mc/basesteam/graphics/DrillBitRendererTest.java @@ -1,10 +1,10 @@ -package zone.moddev.mc.steamadvantage.graphics; +package zone.moddev.mc.basesteam.graphics; -import com.mojang.blaze3d.matrix.MatrixStack; -import com.mojang.blaze3d.vertex.IVertexBuilder; +import com.mojang.blaze3d.vertex.PoseStack; +import com.mojang.blaze3d.vertex.VertexConsumer; import java.util.ArrayList; import java.util.List; -import net.minecraft.util.Direction; +import net.minecraft.core.Direction; import org.junit.Test; import static org.junit.Assert.*; @@ -16,8 +16,8 @@ public class DrillBitRendererTest { @Test public void everyFacingKeepsLegacyDimensionsUvsAndNativeVertexAttributes() { for (Direction facing : Direction.values()) { RecordingBuffer buffer = new RecordingBuffer(); - MatrixStack matrices = new MatrixStack(); - MatrixStack.Entry caller = matrices.last(); + PoseStack matrices = new PoseStack(); + PoseStack.Pose caller = matrices.last(); DrillBitRenderer.renderGeometry(facing.getAxis(), 0, matrices, buffer, LIGHT, OVERLAY); assertSame(caller, matrices.last()); assertEquals(24, buffer.vertices.size()); @@ -51,15 +51,15 @@ public class DrillBitRendererTest { @Test public void rotationTransformsBothPositionsAndNormals() { RecordingBuffer buffer = new RecordingBuffer(); - DrillBitRenderer.renderGeometry(Direction.Axis.Y, 90, new MatrixStack(), buffer, LIGHT, OVERLAY); + DrillBitRenderer.renderGeometry(Direction.Axis.Y, 90, new PoseStack(), buffer, LIGHT, OVERLAY); Vertex first = buffer.vertices.get(0); assertArrayEquals(new double[] { 0.25D, 1, 0.25D }, first.position, EPSILON); assertArrayEquals(new float[] { -1, 0, 0 }, first.normal, (float) EPSILON); } @Test public void failedVertexSubmissionRestoresTheCallerMatrix() { - MatrixStack matrices = new MatrixStack(); - MatrixStack.Entry caller = matrices.last(); + PoseStack matrices = new PoseStack(); + PoseStack.Pose caller = matrices.last(); try { DrillBitRenderer.renderGeometry(Direction.Axis.X, 37, matrices, new RecordingBuffer() { @Override public void endVertex() { throw new IllegalStateException("submission failed"); } @@ -79,25 +79,31 @@ private static final class Vertex { int overlay, light; } - private static class RecordingBuffer implements IVertexBuilder { + private static class RecordingBuffer implements VertexConsumer { final List vertices = new ArrayList<>(); private Vertex vertex = new Vertex(); - @Override public IVertexBuilder vertex(double x, double y, double z) { + @Override public VertexConsumer vertex(double x, double y, double z) { vertex.position[0] = x; vertex.position[1] = y; vertex.position[2] = z; return this; } - @Override public IVertexBuilder color(int red, int green, int blue, int alpha) { + @Override public VertexConsumer color(int red, int green, int blue, int alpha) { vertex.color[0] = red; vertex.color[1] = green; vertex.color[2] = blue; vertex.color[3] = alpha; return this; } - @Override public IVertexBuilder uv(float u, float v) { vertex.u = u; vertex.v = v; return this; } - @Override public IVertexBuilder overlayCoords(int u, int v) { vertex.overlay = u | v << 16; return this; } - @Override public IVertexBuilder uv2(int u, int v) { vertex.light = u | v << 16; return this; } - @Override public IVertexBuilder normal(float x, float y, float z) { + @Override public VertexConsumer uv(float u, float v) { vertex.u = u; vertex.v = v; return this; } + @Override public VertexConsumer overlayCoords(int u, int v) { vertex.overlay = u | v << 16; return this; } + @Override public VertexConsumer uv2(int u, int v) { vertex.light = u | v << 16; return this; } + @Override public VertexConsumer normal(float x, float y, float z) { vertex.normal[0] = x; vertex.normal[1] = y; vertex.normal[2] = z; return this; } @Override public void endVertex() { vertices.add(vertex); vertex = new Vertex(); } + @Override public void defaultColor(int red, int green, int blue, int alpha) { + throw new AssertionError("Drill vertices must retain their explicit colour attributes"); + } + @Override public void unsetDefaultColor() { + throw new AssertionError("Drill rendering must not change the caller's default colour state"); + } } } diff --git a/src/test/java/zone/moddev/mc/steamadvantage/gui/GUIHelperTest.java b/src/test/java/zone/moddev/mc/basesteam/gui/GUIHelperTest.java similarity index 94% rename from src/test/java/zone/moddev/mc/steamadvantage/gui/GUIHelperTest.java rename to src/test/java/zone/moddev/mc/basesteam/gui/GUIHelperTest.java index 07316fd..1de5899 100644 --- a/src/test/java/zone/moddev/mc/steamadvantage/gui/GUIHelperTest.java +++ b/src/test/java/zone/moddev/mc/basesteam/gui/GUIHelperTest.java @@ -1,4 +1,4 @@ -package zone.moddev.mc.steamadvantage.gui; +package zone.moddev.mc.basesteam.gui; import org.junit.Test; import static org.junit.Assert.*; diff --git a/src/test/java/zone/moddev/mc/basesteam/items/MusketLoadedChunkBoundaryTest.java b/src/test/java/zone/moddev/mc/basesteam/items/MusketLoadedChunkBoundaryTest.java new file mode 100644 index 0000000..cc98808 --- /dev/null +++ b/src/test/java/zone/moddev/mc/basesteam/items/MusketLoadedChunkBoundaryTest.java @@ -0,0 +1,45 @@ +package zone.moddev.mc.basesteam.items; + +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.world.phys.Vec3; +import org.junit.Test; +import static org.junit.Assert.*; + +public class MusketLoadedChunkBoundaryTest { + @Test public void allSixDirectionsStopBeforeUnloadedNativeBlocks() { + Vec3 origin = new Vec3(8.5, 80.5, 8.5); + for (Direction direction : Direction.values()) { + Vec3 end = origin.add(direction.getStepX() * 64, direction.getStepY() * 64, direction.getStepZ() * 64); + Vec3 actual = MusketItem.loadedRayEnd(origin, end, + pos -> pos.getX() >= 0 && pos.getX() < 16 && pos.getZ() >= 0 && pos.getZ() < 16 + && pos.getY() >= 64 && pos.getY() < 96); + assertTrue(direction.toString(), origin.distanceToSqr(actual) < origin.distanceToSqr(end)); + BlockPos stopped = new BlockPos(actual); + assertTrue(stopped.getX() >= 0 && stopped.getX() < 16); + assertTrue(stopped.getZ() >= 0 && stopped.getZ() < 16); + assertTrue(stopped.getY() >= 64 && stopped.getY() < 96); + } + } + + @Test public void loadedShotsKeepTheFullOriginalRange() { + Vec3 origin = new Vec3(-16.5, 80.5, -32.5); + Vec3 end = origin.add(64, 0, 0); + assertEquals(end, MusketItem.loadedRayEnd(origin, end, pos -> true)); + assertEquals(origin, MusketItem.loadedRayEnd(origin, end, pos -> false)); + } + + @Test public void aGrazingDiagonalCannotSkipTheFirstMissingBlock() { + Vec3 origin = new Vec3(15.99999, 80.5, 15.9); + Vec3 end = origin.add(1, 0, 64); + Vec3 actual = MusketItem.loadedRayEnd(origin, end, pos -> pos.getX() < 16 && pos.getZ() < 16); + assertTrue(actual.x < 16); + assertTrue(actual.z < 16); + assertTrue(origin.distanceToSqr(actual) < 0.01D); + } + + @Test public void aBoundaryBesideTheMuzzleCannotReverseTheRay() { + Vec3 origin = new Vec3(15.999999, 80.5, 8.5); + assertEquals(origin, MusketItem.loadedRayEnd(origin, origin.add(64, 0, 0), pos -> pos.getX() < 16)); + } +} diff --git a/src/test/java/zone/moddev/mc/steamadvantage/items/MusketPersistenceTest.java b/src/test/java/zone/moddev/mc/basesteam/items/MusketPersistenceTest.java similarity index 61% rename from src/test/java/zone/moddev/mc/steamadvantage/items/MusketPersistenceTest.java rename to src/test/java/zone/moddev/mc/basesteam/items/MusketPersistenceTest.java index 875a5a5..4562c03 100644 --- a/src/test/java/zone/moddev/mc/steamadvantage/items/MusketPersistenceTest.java +++ b/src/test/java/zone/moddev/mc/basesteam/items/MusketPersistenceTest.java @@ -1,21 +1,21 @@ -package zone.moddev.mc.steamadvantage.items; +package zone.moddev.mc.basesteam.items; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.CompoundNBT; -import net.minecraft.util.math.AxisAlignedBB; -import net.minecraft.util.math.vector.Vector3d; +import net.minecraft.world.item.ItemStack; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.world.phys.AABB; +import net.minecraft.world.phys.Vec3; import org.junit.Test; import org.junit.BeforeClass; import static org.junit.Assert.*; public class MusketPersistenceTest { @BeforeClass public static void bootstrapNativeRegistries() { - net.minecraft.util.registry.Bootstrap.bootStrap(); + net.minecraft.SharedConstants.tryDetectVersion(); net.minecraft.server.Bootstrap.bootStrap(); } @Test public void loadingCycleKeepsLegacyByteValuesAndOtherNbt() { - ItemStack stack = new ItemStack(net.minecraft.item.Items.STICK); - CompoundNBT tag = new CompoundNBT(); + ItemStack stack = new ItemStack(net.minecraft.world.item.Items.STICK); + CompoundTag tag = new CompoundTag(); tag.putString("owner", "legacy"); stack.setTag(tag); assertTrue(MusketItem.isNotLoaded(stack)); @@ -32,11 +32,11 @@ public class MusketPersistenceTest { } @Test public void rayIntersectionSupportsEveryAxisAndRejectsTargetsBehind() { - Vector3d origin = new Vector3d(0, 0, 0); - for (net.minecraft.util.Direction direction : net.minecraft.util.Direction.values()) { - Vector3d ray = new Vector3d(direction.getStepX(), direction.getStepY(), direction.getStepZ()); - Vector3d center = ray.scale(5); - AxisAlignedBB ahead = new AxisAlignedBB(center.x - 0.5, center.y - 0.5, center.z - 0.5, + Vec3 origin = new Vec3(0, 0, 0); + for (net.minecraft.core.Direction direction : net.minecraft.core.Direction.values()) { + Vec3 ray = new Vec3(direction.getStepX(), direction.getStepY(), direction.getStepZ()); + Vec3 center = ray.scale(5); + AABB ahead = new AABB(center.x - 0.5, center.y - 0.5, center.z - 0.5, center.x + 0.5, center.y + 0.5, center.z + 0.5); assertTrue(MusketItem.rayIntersectsBoundingBox(origin, ray, ahead)); assertFalse(MusketItem.rayIntersectsBoundingBox(origin, ray.scale(-1), ahead)); diff --git a/src/test/java/zone/moddev/mc/steamadvantage/items/MusketTargetingContractTest.java b/src/test/java/zone/moddev/mc/basesteam/items/MusketTargetingContractTest.java similarity index 64% rename from src/test/java/zone/moddev/mc/steamadvantage/items/MusketTargetingContractTest.java rename to src/test/java/zone/moddev/mc/basesteam/items/MusketTargetingContractTest.java index 7bec481..621ae07 100644 --- a/src/test/java/zone/moddev/mc/steamadvantage/items/MusketTargetingContractTest.java +++ b/src/test/java/zone/moddev/mc/basesteam/items/MusketTargetingContractTest.java @@ -1,10 +1,10 @@ -package zone.moddev.mc.steamadvantage.items; +package zone.moddev.mc.basesteam.items; import java.io.InputStream; import java.util.Optional; -import net.minecraft.util.Direction; -import net.minecraft.util.math.AxisAlignedBB; -import net.minecraft.util.math.vector.Vector3d; +import net.minecraft.core.Direction; +import net.minecraft.world.phys.AABB; +import net.minecraft.world.phys.Vec3; import org.junit.BeforeClass; import org.junit.Test; import org.objectweb.asm.ClassReader; @@ -16,41 +16,41 @@ public class MusketTargetingContractTest { @BeforeClass public static void bootstrap() { - net.minecraft.util.registry.Bootstrap.bootStrap(); + net.minecraft.SharedConstants.tryDetectVersion(); net.minecraft.server.Bootstrap.bootStrap(); } @Test public void nearerTerrainRejectsTargetsBehindItOnEveryAxis() { - Vector3d origin = Vector3d.ZERO; + Vec3 origin = Vec3.ZERO; for (Direction direction : Direction.values()) { - Vector3d ray = new Vector3d(direction.getStepX(), direction.getStepY(), direction.getStepZ()); + Vec3 ray = new Vec3(direction.getStepX(), direction.getStepY(), direction.getStepZ()); assertFalse(direction.toString(), MusketItem.rayHitBeforeTerrain(origin, ray.scale(3), around(ray.scale(5))).isPresent()); - Optional hit = MusketItem.rayHitBeforeTerrain(origin, ray.scale(8), around(ray.scale(5))); + Optional hit = MusketItem.rayHitBeforeTerrain(origin, ray.scale(8), around(ray.scale(5))); assertTrue(direction.toString(), hit.isPresent()); assertEquals(4.5 * 4.5, origin.distanceToSqr(hit.get()), 0.000001); } } @Test public void terrainWinsAnExactTieWithTheEntitySurface() { - assertFalse(MusketItem.rayHitBeforeTerrain(Vector3d.ZERO, new Vector3d(0, 0, 4.5), - around(new Vector3d(0, 0, 5))).isPresent()); + assertFalse(MusketItem.rayHitBeforeTerrain(Vec3.ZERO, new Vec3(0, 0, 4.5), + around(new Vec3(0, 0, 5))).isPresent()); } @Test public void finiteSegmentRejectsOffRayBehindAndBeyondRangeTargets() { - Vector3d end = new Vector3d(0, 0, 64); - assertFalse(MusketItem.rayHitBeforeTerrain(Vector3d.ZERO, end, around(new Vector3d(2, 0, 5))).isPresent()); - assertFalse(MusketItem.rayHitBeforeTerrain(Vector3d.ZERO, end, around(new Vector3d(0, 0, -5))).isPresent()); - assertFalse(MusketItem.rayHitBeforeTerrain(Vector3d.ZERO, end, around(new Vector3d(0, 0, 65))).isPresent()); + Vec3 end = new Vec3(0, 0, 64); + assertFalse(MusketItem.rayHitBeforeTerrain(Vec3.ZERO, end, around(new Vec3(2, 0, 5))).isPresent()); + assertFalse(MusketItem.rayHitBeforeTerrain(Vec3.ZERO, end, around(new Vec3(0, 0, -5))).isPresent()); + assertFalse(MusketItem.rayHitBeforeTerrain(Vec3.ZERO, end, around(new Vec3(0, 0, 65))).isPresent()); } @Test public void overlappingEntityStartsAtZeroDistance() { - Optional hit = MusketItem.rayHitBeforeTerrain(Vector3d.ZERO, new Vector3d(0, 0, 8), around(Vector3d.ZERO)); + Optional hit = MusketItem.rayHitBeforeTerrain(Vec3.ZERO, new Vec3(0, 0, 8), around(Vec3.ZERO)); assertTrue(hit.isPresent()); - assertEquals(Vector3d.ZERO, hit.get()); + assertEquals(Vec3.ZERO, hit.get()); } @Test public void targetingUsesLoadedServerEntitiesAndTerrainBeforeEntitySelection() throws Exception { ClassNode node = new ClassNode(); - try (InputStream input = getClass().getResourceAsStream("/zone/moddev/mc/steamadvantage/items/MusketItem.class")) { + try (InputStream input = getClass().getResourceAsStream("/zone/moddev/mc/basesteam/items/MusketItem.class")) { assertNotNull(input); new ClassReader(input).accept(node, 0); } @@ -61,7 +61,7 @@ public class MusketTargetingContractTest { if (!(instruction instanceof MethodInsnNode)) continue; MethodInsnNode call = (MethodInsnNode) instruction; if (call.name.equals("clip")) terrain = true; - if (call.owner.equals("net/minecraft/world/server/ServerWorld") && call.name.equals("getAllEntities")) { + if (call.owner.equals("net/minecraft/server/level/ServerLevel") && call.name.equals("getAllEntities")) { assertTrue("Terrain must be traced before selecting entities", terrain); loadedEntities = true; } @@ -73,8 +73,8 @@ public class MusketTargetingContractTest { assertTrue("Loaded-entity iteration must preserve the previous spectator exclusion", spectatorFilter); } - private static AxisAlignedBB around(Vector3d center) { - return new AxisAlignedBB(center.x - 0.5, center.y - 0.5, center.z - 0.5, + private static AABB around(Vec3 center) { + return new AABB(center.x - 0.5, center.y - 0.5, center.z - 0.5, center.x + 0.5, center.y + 0.5, center.z + 0.5); } } diff --git a/src/test/java/zone/moddev/mc/steamadvantage/machines/CoalBoilerFillPersistenceTest.java b/src/test/java/zone/moddev/mc/basesteam/machines/CoalBoilerFillPersistenceTest.java similarity index 77% rename from src/test/java/zone/moddev/mc/steamadvantage/machines/CoalBoilerFillPersistenceTest.java rename to src/test/java/zone/moddev/mc/basesteam/machines/CoalBoilerFillPersistenceTest.java index be87d84..577d75a 100644 --- a/src/test/java/zone/moddev/mc/steamadvantage/machines/CoalBoilerFillPersistenceTest.java +++ b/src/test/java/zone/moddev/mc/basesteam/machines/CoalBoilerFillPersistenceTest.java @@ -1,11 +1,11 @@ -package zone.moddev.mc.steamadvantage.machines; +package zone.moddev.mc.basesteam.machines; import static org.junit.Assert.*; import cyano.poweradvantage.api.ConduitType; -import zone.moddev.mc.poweradvantage.init.Fluids; -import net.minecraft.nbt.CompoundNBT; -import net.minecraft.world.World; +import zone.moddev.mc.basepower.init.Fluids; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.world.level.Level; import cyano.poweradvantage.api.fluid.FluidStack; import org.junit.BeforeClass; import org.junit.Test; @@ -13,14 +13,14 @@ /** Save-notification unit witness; actual disk persistence is checked by the native restart rig. */ public class CoalBoilerFillPersistenceTest { @BeforeClass public static void bootstrap() { - net.minecraft.util.registry.Bootstrap.bootStrap(); - if (zone.moddev.mc.steamadvantage.init.Entities.STEAM_BOILER_COAL == null) - zone.moddev.mc.steamadvantage.init.Entities.STEAM_BOILER_COAL = net.minecraft.tileentity.TileEntityType.Builder.of(CoalBoilerTileEntity::new, net.minecraft.block.Blocks.STONE).build(null); + net.minecraft.SharedConstants.tryDetectVersion(); net.minecraft.server.Bootstrap.bootStrap(); + if (zone.moddev.mc.basesteam.init.Entities.STEAM_BOILER_COAL == null) + zone.moddev.mc.basesteam.init.Entities.STEAM_BOILER_COAL = net.minecraft.world.level.block.entity.BlockEntityType.Builder.of(CoalBoilerTileEntity::new, net.minecraft.world.level.block.Blocks.STONE).build(null); } @Test public void acceptingTheLastFiveMillibucketsRequestsSavingBeforeAnyTick() { SaveWitnessBoiler boiler = seeded(3995); - FluidStack offered = new FluidStack(net.minecraft.fluid.Fluids.WATER, 5); + FluidStack offered = new FluidStack(net.minecraft.world.level.material.Fluids.WATER, 5); assertEquals(5, boiler.fill(null, offered, true)); assertEquals(4000, boiler.getTank().getFluidAmount()); @@ -30,7 +30,7 @@ public class CoalBoilerFillPersistenceTest { @Test public void partialAcceptanceSavesOnlyTheQuantityActuallyAccepted() { SaveWitnessBoiler boiler = seeded(3995); - FluidStack offered = new FluidStack(net.minecraft.fluid.Fluids.WATER, 100); + FluidStack offered = new FluidStack(net.minecraft.world.level.material.Fluids.WATER, 100); assertEquals(5, boiler.fill(null, offered, true)); assertEquals(4000, boiler.getTank().getFluidAmount()); @@ -40,7 +40,7 @@ public class CoalBoilerFillPersistenceTest { @Test public void waterAcceptedThroughTheNetworkAlsoRequestsSavingImmediately() { SaveWitnessBoiler boiler = seeded(3995); - ConduitType water = Fluids.fluidToConduitType(net.minecraft.fluid.Fluids.WATER); + ConduitType water = Fluids.fluidToConduitType(net.minecraft.world.level.material.Fluids.WATER); assertEquals(5, boiler.addEnergy(5, water), 0); assertEquals(4000, boiler.getTank().getFluidAmount()); @@ -49,7 +49,7 @@ public class CoalBoilerFillPersistenceTest { @Test public void simulationNeitherChangesTheTankNorRequestsSaving() { SaveWitnessBoiler boiler = seeded(3995); - FluidStack offered = new FluidStack(net.minecraft.fluid.Fluids.WATER, 100); + FluidStack offered = new FluidStack(net.minecraft.world.level.material.Fluids.WATER, 100); assertEquals(5, boiler.fill(null, offered, false)); assertEquals(3995, boiler.getTank().getFluidAmount()); @@ -60,17 +60,17 @@ public class CoalBoilerFillPersistenceTest { @Test public void aFullTankRejectsInputWithoutRequestingSaving() { SaveWitnessBoiler boiler = seeded(4000); - assertEquals(0, boiler.fill(null, new FluidStack(net.minecraft.fluid.Fluids.WATER, 5), true)); + assertEquals(0, boiler.fill(null, new FluidStack(net.minecraft.world.level.material.Fluids.WATER, 5), true)); assertEquals(4000, boiler.getTank().getFluidAmount()); assertUnchangedSave(boiler, 4000); } @Test public void mismatchedFluidIsNotCreditedOrSaved() { SaveWitnessBoiler boiler = seeded(3995); - FluidStack offered = new FluidStack(net.minecraft.fluid.Fluids.LAVA, 5); + FluidStack offered = new FluidStack(net.minecraft.world.level.material.Fluids.LAVA, 5); assertEquals(0, boiler.fill(null, offered, true)); - assertSame(net.minecraft.fluid.Fluids.WATER, boiler.getTank().getFluid().getFluid()); + assertSame(net.minecraft.world.level.material.Fluids.WATER, boiler.getTank().getFluid().getFluid()); assertEquals(3995, boiler.getTank().getFluidAmount()); assertEquals(5, offered.amount); assertUnchangedSave(boiler, 3995); @@ -79,25 +79,25 @@ public class CoalBoilerFillPersistenceTest { @Test public void aZeroQuantityDoesNotRequestSaving() { SaveWitnessBoiler boiler = seeded(3995); - assertEquals(0, boiler.fill(null, new FluidStack(net.minecraft.fluid.Fluids.WATER, 0), true)); + assertEquals(0, boiler.fill(null, new FluidStack(net.minecraft.world.level.material.Fluids.WATER, 0), true)); assertEquals(3995, boiler.getTank().getFluidAmount()); assertUnchangedSave(boiler, 3995); } @Test public void theImmediateSaveWitnessRetainsFluidIdentityAndTypedNbt() { SaveWitnessBoiler boiler = new SaveWitnessBoiler(); - FluidStack offered = new FluidStack(net.minecraft.fluid.Fluids.WATER, 5); - offered.tag = new CompoundNBT(); + FluidStack offered = new FluidStack(net.minecraft.world.level.material.Fluids.WATER, 5); + offered.tag = new CompoundTag(); offered.tag.putString("AdvWorksWitness", "external-fill-before-next-tick"); offered.tag.putShort("TypedWitness", (short) 7); - CompoundNBT original = offered.tag.copy(); + CompoundTag original = offered.tag.copy(); boiler.rememberSavedTank(); assertEquals(5, boiler.fill(null, offered, true)); assertSaved(boiler, 5); FluidStack saved = FluidStack.loadFluidStackFromNBT(boiler.savedTank); assertNotNull(saved); - assertSame(net.minecraft.fluid.Fluids.WATER, saved.getFluid()); + assertSame(net.minecraft.world.level.material.Fluids.WATER, saved.getFluid()); assertEquals(original, saved.tag); assertEquals(original, offered.tag); assertEquals(5, offered.amount); @@ -106,8 +106,8 @@ public class CoalBoilerFillPersistenceTest { @Test public void emptyRequestedDrainReturnsNullWithoutDereferencingAMissingFluid() { SaveWitnessBoiler boiler = new SaveWitnessBoiler(); boiler.rememberSavedTank(); - assertNull(boiler.drain(null, new FluidStack(net.minecraft.fluid.Fluids.WATER, 5), true)); - assertNull(boiler.drain(null, new FluidStack(net.minecraft.fluid.Fluids.WATER, 5), false)); + assertNull(boiler.drain(null, new FluidStack(net.minecraft.world.level.material.Fluids.WATER, 5), true)); + assertNull(boiler.drain(null, new FluidStack(net.minecraft.world.level.material.Fluids.WATER, 5), false)); assertEquals(0, boiler.dirtyCalls); } @@ -115,7 +115,7 @@ public class CoalBoilerFillPersistenceTest { SaveWitnessBoiler boiler = seeded(10); assertEquals(0, boiler.fill(null, null, true)); assertNull(boiler.drain(null, (FluidStack)null, true)); - assertNull(boiler.drain(null, new FluidStack(net.minecraft.fluid.Fluids.WATER, 0), true)); + assertNull(boiler.drain(null, new FluidStack(net.minecraft.world.level.material.Fluids.WATER, 0), true)); assertNull(boiler.drain(null, 0, true)); assertNull(boiler.drain(null, -1, true)); assertEquals(10, boiler.getTank().getFluidAmount()); @@ -124,8 +124,8 @@ public class CoalBoilerFillPersistenceTest { @Test public void mismatchedRequestedDrainReturnsNullRatherThanAZeroStack() { SaveWitnessBoiler boiler = seeded(10); - assertNull(boiler.drain(null, new FluidStack(net.minecraft.fluid.Fluids.LAVA, 5), true)); - assertNull(boiler.drain(null, new FluidStack(net.minecraft.fluid.Fluids.LAVA, 5), false)); + assertNull(boiler.drain(null, new FluidStack(net.minecraft.world.level.material.Fluids.LAVA, 5), true)); + assertNull(boiler.drain(null, new FluidStack(net.minecraft.world.level.material.Fluids.LAVA, 5), false)); assertEquals(10, boiler.getTank().getFluidAmount()); assertUnchangedSave(boiler, 10); } @@ -154,20 +154,20 @@ public class CoalBoilerFillPersistenceTest { assertEquals(0, boiler.getTank().getFluidAmount()); assertSaved(boiler, 0); assertNull(FluidStack.loadFluidStackFromNBT(boiler.savedTank)); - assertNull(boiler.drain(null, new FluidStack(net.minecraft.fluid.Fluids.WATER, 5), true)); + assertNull(boiler.drain(null, new FluidStack(net.minecraft.world.level.material.Fluids.WATER, 5), true)); } @Test public void clientSideTankChangesDoNotRequestServerSaving() { SaveWitnessBoiler boiler = seeded(3995); boiler.saveWorld = world(true); - assertEquals(5, boiler.fill(null, new FluidStack(net.minecraft.fluid.Fluids.WATER, 5), true)); + assertEquals(5, boiler.fill(null, new FluidStack(net.minecraft.world.level.material.Fluids.WATER, 5), true)); assertEquals(4000, boiler.getTank().getFluidAmount()); assertUnchangedSave(boiler, 3995); } private static SaveWitnessBoiler seeded(int amount) { SaveWitnessBoiler boiler = new SaveWitnessBoiler(); - boiler.getTank().setFluid(new FluidStack(net.minecraft.fluid.Fluids.WATER, amount)); + boiler.getTank().setFluid(new FluidStack(net.minecraft.world.level.material.Fluids.WATER, amount)); boiler.rememberSavedTank(); return boiler; } @@ -185,17 +185,17 @@ private static void assertUnchangedSave(SaveWitnessBoiler boiler, int amount) { private static final class SaveWitnessBoiler extends CoalBoilerTileEntity { int dirtyCalls; - CompoundNBT savedTank; + CompoundTag savedTank; SaveWorld saveWorld = world(false); - @Override public World getLevel() { return saveWorld; } + @Override public Level getLevel() { return saveWorld; } void rememberSavedTank() { dirtyCalls = 0; - savedTank = getTank().writeToNBT(new CompoundNBT()).copy(); + savedTank = getTank().writeToNBT(new CompoundTag()).copy(); } @Override public void setChanged() { dirtyCalls++; // Record only the notification payload; do not impersonate a native server save. - savedTank = getTank().writeToNBT(new CompoundNBT()).copy(); + savedTank = getTank().writeToNBT(new CompoundTag()).copy(); } } @@ -205,7 +205,7 @@ private static SaveWorld world(boolean remote) { java.lang.reflect.Field field = allocator.getDeclaredField("theUnsafe"); field.setAccessible(true); SaveWorld world = (SaveWorld) allocator.getMethod("allocateInstance", Class.class).invoke(field.get(null), SaveWorld.class); - java.lang.reflect.Field side = World.class.getDeclaredField("isClientSide"); + java.lang.reflect.Field side = Level.class.getDeclaredField("isClientSide"); side.setAccessible(true); side.setBoolean(world, remote); return world; @@ -213,7 +213,7 @@ private static SaveWorld world(boolean remote) { throw new AssertionError("Cannot prepare the save-notification world", failure); } } - private static final class SaveWorld extends net.minecraft.world.server.ServerWorld { + private static final class SaveWorld extends net.minecraft.server.level.ServerLevel { private SaveWorld() { super(null, null, null, null, null, null, null, null, false, 0L, java.util.Collections.emptyList(), false); } } } diff --git a/src/test/java/zone/moddev/mc/basesteam/machines/GeothermalNativeTemperatureTest.java b/src/test/java/zone/moddev/mc/basesteam/machines/GeothermalNativeTemperatureTest.java new file mode 100644 index 0000000..74ae745 --- /dev/null +++ b/src/test/java/zone/moddev/mc/basesteam/machines/GeothermalNativeTemperatureTest.java @@ -0,0 +1,25 @@ +package zone.moddev.mc.basesteam.machines; + +import net.minecraft.world.level.block.Blocks; +import net.minecraft.world.level.block.state.properties.BlockStateProperties; +import net.minecraft.world.level.material.Fluids; +import org.junit.BeforeClass; +import org.junit.Test; +import static org.junit.Assert.*; + +public class GeothermalNativeTemperatureTest { + @BeforeClass public static void bootstrap() { net.minecraft.SharedConstants.tryDetectVersion(); net.minecraft.server.Bootstrap.bootStrap(); } + + @Test public void nativeLavaTemperaturePreservesTheExistingHeatInput() { + assertEquals(1300, Fluids.LAVA.getAttributes().getTemperature()); + assertEquals(464, GeothermalBoilerTileEntity.thermalEnergy(Blocks.LAVA.defaultBlockState()), 0); + assertEquals(464, GeothermalBoilerTileEntity.thermalEnergy(Blocks.LAVA.defaultBlockState() + .setValue(BlockStateProperties.LEVEL, 7)), 0); + } + + @Test public void ordinaryFireWaterAndColdBlocksKeepTheirExistingHeatInput() { + assertEquals(200, GeothermalBoilerTileEntity.thermalEnergy(Blocks.FIRE.defaultBlockState()), 0); + assertEquals(0, GeothermalBoilerTileEntity.thermalEnergy(Blocks.WATER.defaultBlockState()), 0); + assertEquals(0, GeothermalBoilerTileEntity.thermalEnergy(Blocks.STONE.defaultBlockState()), 0); + } +} diff --git a/src/test/java/zone/moddev/mc/steamadvantage/machines/RockCrusherComparatorTest.java b/src/test/java/zone/moddev/mc/basesteam/machines/RockCrusherComparatorTest.java similarity index 62% rename from src/test/java/zone/moddev/mc/steamadvantage/machines/RockCrusherComparatorTest.java rename to src/test/java/zone/moddev/mc/basesteam/machines/RockCrusherComparatorTest.java index 9130272..db3f983 100644 --- a/src/test/java/zone/moddev/mc/steamadvantage/machines/RockCrusherComparatorTest.java +++ b/src/test/java/zone/moddev/mc/basesteam/machines/RockCrusherComparatorTest.java @@ -1,16 +1,16 @@ -package zone.moddev.mc.steamadvantage.machines; +package zone.moddev.mc.basesteam.machines; import static org.junit.Assert.assertEquals; -import net.minecraft.item.ItemStack; -import net.minecraft.item.Items; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.Items; import org.junit.BeforeClass; import org.junit.Test; public class RockCrusherComparatorTest { @BeforeClass public static void bootstrap() { - net.minecraft.util.registry.Bootstrap.bootStrap(); - if (zone.moddev.mc.steamadvantage.init.Entities.STEAM_CRUSHER == null) - zone.moddev.mc.steamadvantage.init.Entities.STEAM_CRUSHER = net.minecraft.tileentity.TileEntityType.Builder.of(RockCrusherTileEntity::new, net.minecraft.block.Blocks.STONE).build(null); + net.minecraft.SharedConstants.tryDetectVersion(); net.minecraft.server.Bootstrap.bootStrap(); + if (zone.moddev.mc.basesteam.init.Entities.STEAM_CRUSHER == null) + zone.moddev.mc.basesteam.init.Entities.STEAM_CRUSHER = net.minecraft.world.level.block.entity.BlockEntityType.Builder.of(RockCrusherTileEntity::new, net.minecraft.world.level.block.Blocks.STONE).build(null); } @Test public void emptyInputHasNoComparatorSignal() { assertSignal(0, 0); } @Test public void oneItemGivesSignalOne() { assertSignal(1, 1); } diff --git a/src/test/java/zone/moddev/mc/steamadvantage/machines/RockCrusherReloadRedstoneTest.java b/src/test/java/zone/moddev/mc/basesteam/machines/RockCrusherReloadRedstoneTest.java similarity index 76% rename from src/test/java/zone/moddev/mc/steamadvantage/machines/RockCrusherReloadRedstoneTest.java rename to src/test/java/zone/moddev/mc/basesteam/machines/RockCrusherReloadRedstoneTest.java index 5145892..a881395 100644 --- a/src/test/java/zone/moddev/mc/steamadvantage/machines/RockCrusherReloadRedstoneTest.java +++ b/src/test/java/zone/moddev/mc/basesteam/machines/RockCrusherReloadRedstoneTest.java @@ -1,20 +1,20 @@ -package zone.moddev.mc.steamadvantage.machines; +package zone.moddev.mc.basesteam.machines; import static org.junit.Assert.*; import java.lang.reflect.Field; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; -import net.minecraft.world.server.ServerWorld; +import net.minecraft.core.BlockPos; +import net.minecraft.world.level.Level; +import net.minecraft.server.level.ServerLevel; import org.junit.BeforeClass; import org.junit.Test; public class RockCrusherReloadRedstoneTest { @BeforeClass public static void bootstrap() { - net.minecraft.util.registry.Bootstrap.bootStrap(); - if (zone.moddev.mc.steamadvantage.init.Entities.STEAM_CRUSHER == null) - zone.moddev.mc.steamadvantage.init.Entities.STEAM_CRUSHER = net.minecraft.tileentity.TileEntityType.Builder.of(RockCrusherTileEntity::new, net.minecraft.block.Blocks.STONE).build(null); - if (zone.moddev.mc.steamadvantage.init.Entities.STEAM_FURNACE == null) - zone.moddev.mc.steamadvantage.init.Entities.STEAM_FURNACE = net.minecraft.tileentity.TileEntityType.Builder.of(BlastFurnaceTileEntity::new, net.minecraft.block.Blocks.STONE).build(null); + net.minecraft.SharedConstants.tryDetectVersion(); net.minecraft.server.Bootstrap.bootStrap(); + if (zone.moddev.mc.basesteam.init.Entities.STEAM_CRUSHER == null) + zone.moddev.mc.basesteam.init.Entities.STEAM_CRUSHER = net.minecraft.world.level.block.entity.BlockEntityType.Builder.of(RockCrusherTileEntity::new, net.minecraft.world.level.block.Blocks.STONE).build(null); + if (zone.moddev.mc.basesteam.init.Entities.STEAM_FURNACE == null) + zone.moddev.mc.basesteam.init.Entities.STEAM_FURNACE = net.minecraft.world.level.block.entity.BlockEntityType.Builder.of(BlastFurnaceTileEntity::new, net.minecraft.world.level.block.Blocks.STONE).build(null); } @Test public void resumedWorkCannotBeDecrementedBeforeTheFirstLiveControlSample() throws Exception { @@ -72,14 +72,14 @@ private static ControlWorld world() throws Exception { } private static final class ProbeCrusher extends RockCrusherTileEntity { ControlWorld testWorld; - @Override public World getLevel() { return testWorld; } + @Override public Level getLevel() { return testWorld; } } private static final class ProbeFurnace extends BlastFurnaceTileEntity { ControlWorld testWorld; - @Override public World getLevel() { return testWorld; } + @Override public Level getLevel() { return testWorld; } } private static final class ControlSample extends RuntimeException {} - private static final class ControlWorld extends ServerWorld { + private static final class ControlWorld extends ServerLevel { boolean powered, stopAtFirstSample; int samples; private ControlWorld() { super(null, null, null, null, null, null, null, null, false, 0L, java.util.Collections.emptyList(), false); } diff --git a/src/test/java/zone/moddev/mc/steamadvantage/machines/SteamDrillPersistenceTest.java b/src/test/java/zone/moddev/mc/basesteam/machines/SteamDrillPersistenceTest.java similarity index 77% rename from src/test/java/zone/moddev/mc/steamadvantage/machines/SteamDrillPersistenceTest.java rename to src/test/java/zone/moddev/mc/basesteam/machines/SteamDrillPersistenceTest.java index 699107e..aa31e89 100644 --- a/src/test/java/zone/moddev/mc/steamadvantage/machines/SteamDrillPersistenceTest.java +++ b/src/test/java/zone/moddev/mc/basesteam/machines/SteamDrillPersistenceTest.java @@ -1,11 +1,11 @@ -package zone.moddev.mc.steamadvantage.machines; +package zone.moddev.mc.basesteam.machines; -import net.minecraft.nbt.CompoundNBT; -import net.minecraft.nbt.ListNBT; -import net.minecraft.item.ItemStack; -import net.minecraft.util.Direction; -import net.minecraft.util.math.BlockPos; -import zone.moddev.mc.steamadvantage.init.Power; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.nbt.ListTag; +import net.minecraft.world.item.ItemStack; +import net.minecraft.core.Direction; +import net.minecraft.core.BlockPos; +import zone.moddev.mc.basesteam.init.Power; import java.lang.reflect.Field; import java.io.InputStream; import java.lang.reflect.Method; @@ -25,33 +25,33 @@ public class SteamDrillPersistenceTest { @BeforeClass public static void bootstrapNativeRegistries() { - net.minecraft.util.registry.Bootstrap.bootStrap(); + net.minecraft.SharedConstants.tryDetectVersion(); net.minecraft.server.Bootstrap.bootStrap(); } @Test public void retainsLegacyProgressUntilWorldIsAttached() { SteamDrillTileEntity drill = new SteamDrillTileEntity(); - drill.load(net.minecraft.block.Blocks.AIR.defaultBlockState(), target(94)); + drill.load(target(94)); drill.prepareDataFieldsForSync(); assertEquals(94, drill.getDataFieldArray()[1]); } @Test public void clearsPreviousProgressOnReadingAnUntargetedTile() { SteamDrillTileEntity drill = new SteamDrillTileEntity(); - drill.load(net.minecraft.block.Blocks.AIR.defaultBlockState(), target(94)); - drill.load(net.minecraft.block.Blocks.AIR.defaultBlockState(), new CompoundNBT()); + drill.load(target(94)); + drill.load(new CompoundTag()); drill.prepareDataFieldsForSync(); assertEquals(0, drill.getDataFieldArray()[1]); } @Test public void preservesAllSixFacingsTargetAndWorkUntilWorldIsAttached() throws Exception { for (Direction facing : Direction.values()) { - CompoundNBT tag = target(94); + CompoundTag tag = target(94); tag.putByte("Facing", (byte) facing.get3DDataValue()); - CompoundNBT state = new CompoundNBT(); + CompoundTag state = new CompoundTag(); state.putString("Name", "minecraft:stone"); tag.put("TargetState", state); SteamDrillTileEntity drill = new SteamDrillTileEntity(); - drill.load(net.minecraft.block.Blocks.AIR.defaultBlockState(), tag); + drill.load(tag); assertEquals(facing, field(drill, "savedFacing")); assertEquals(new BlockPos(2048, 80, 2049), field(drill, "targetBlockCoord")); assertEquals(state, field(drill, "savedTargetState")); @@ -63,31 +63,31 @@ public class SteamDrillPersistenceTest { @Test public void loadingAnotherTileDoesNotKeepPreviousFacing() throws Exception { SteamDrillTileEntity drill = new SteamDrillTileEntity(); - CompoundNBT tag = target(94); + CompoundTag tag = target(94); tag.putByte("Facing", (byte) Direction.UP.get3DDataValue()); - drill.load(net.minecraft.block.Blocks.AIR.defaultBlockState(), tag); - drill.load(net.minecraft.block.Blocks.AIR.defaultBlockState(), target(12)); + drill.load(tag); + drill.load(target(12)); assertNull(field(drill, "savedFacing")); tag.putByte("Facing", (byte) 127); - drill.load(net.minecraft.block.Blocks.AIR.defaultBlockState(), tag); + drill.load(tag); assertNull(field(drill, "savedFacing")); } @Test public void legacyEnergyAndOutputInventorySurviveDeferredRestore() { - CompoundNBT tag = target(94); + CompoundTag tag = target(94); tag.putIntArray("Energy", new int[] { Float.floatToIntBits(37.5F) }); - ListNBT items = new ListNBT(); - CompoundNBT stack = new CompoundNBT(); + ListTag items = new ListTag(); + CompoundTag stack = new CompoundTag(); stack.putString("id", "minecraft:cobblestone"); stack.putByte("Count", (byte) 23); stack.putByte("Slot", (byte) 4); items.add(stack); tag.put("Items", items); SteamDrillTileEntity drill = new SteamDrillTileEntity(); - drill.load(net.minecraft.block.Blocks.AIR.defaultBlockState(), tag); + drill.load(tag); assertEquals(37.5F, drill.getEnergy(Power.steam_power), 0.0F); ItemStack output = drill.getItem(4); - assertEquals(net.minecraft.item.Items.COBBLESTONE, output.getItem()); + assertEquals(net.minecraft.world.item.Items.COBBLESTONE, output.getItem()); assertEquals(23, output.getCount()); } @@ -119,14 +119,13 @@ public class SteamDrillPersistenceTest { infer.setAccessible(true); BlockPos origin = new BlockPos(2048, 80, 2048); for (Direction direction : Direction.values()) { - CompoundNBT tag = target(94); + CompoundTag tag = target(94); BlockPos target = origin.relative(direction, 3); tag.putInt("targetX", target.getX()); tag.putInt("targetY", target.getY()); tag.putInt("targetZ", target.getZ()); - SteamDrillTileEntity drill = new SteamDrillTileEntity(); - drill.load(net.minecraft.block.Blocks.AIR.defaultBlockState(), tag); - drill.setPosition(origin); + SteamDrillTileEntity drill = new SteamDrillTileEntity(origin, new SteamDrillBlock().defaultBlockState()); + drill.load(tag); assertNull(field(drill, "savedFacing")); assertEquals(direction, infer.invoke(drill)); } @@ -138,8 +137,8 @@ private static Object field(SteamDrillTileEntity drill, String name) throws Exce return field.get(drill); } - private static CompoundNBT target(int progress) { - CompoundNBT tag = new CompoundNBT(); + private static CompoundTag target(int progress) { + CompoundTag tag = new CompoundTag(); tag.putShort("progress", (short) progress); tag.putInt("targetX", 2048); tag.putInt("targetY", 80); diff --git a/src/test/java/zone/moddev/mc/steamadvantage/machines/SteamMachinePersistenceTest.java b/src/test/java/zone/moddev/mc/basesteam/machines/SteamMachinePersistenceTest.java similarity index 69% rename from src/test/java/zone/moddev/mc/steamadvantage/machines/SteamMachinePersistenceTest.java rename to src/test/java/zone/moddev/mc/basesteam/machines/SteamMachinePersistenceTest.java index 1b424db..2e2c4b4 100644 --- a/src/test/java/zone/moddev/mc/steamadvantage/machines/SteamMachinePersistenceTest.java +++ b/src/test/java/zone/moddev/mc/basesteam/machines/SteamMachinePersistenceTest.java @@ -1,23 +1,22 @@ -package zone.moddev.mc.steamadvantage.machines; +package zone.moddev.mc.basesteam.machines; import cyano.poweradvantage.api.fluid.FluidStack; -import java.util.function.Supplier; -import net.minecraft.block.Blocks; -import net.minecraft.nbt.CompoundNBT; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.tileentity.TileEntityType; -import net.minecraft.util.ResourceLocation; +import net.minecraft.world.level.block.Blocks; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraft.resources.ResourceLocation; import net.minecraftforge.registries.ForgeRegistries; import net.minecraftforge.registries.ForgeRegistry; import org.junit.BeforeClass; import org.junit.Test; -import zone.moddev.mc.steamadvantage.init.Entities; -import zone.moddev.mc.steamadvantage.init.Power; +import zone.moddev.mc.basesteam.init.Entities; +import zone.moddev.mc.basesteam.init.Power; import static org.junit.Assert.*; public class SteamMachinePersistenceTest { @BeforeClass public static void bootstrapNativeTypes() { - net.minecraft.util.registry.Bootstrap.bootStrap(); + net.minecraft.SharedConstants.tryDetectVersion(); net.minecraft.server.Bootstrap.bootStrap(); Entities.STEAM_BOILER_COAL = type("steam_boiler_coal", CoalBoilerTileEntity::new); Entities.STEAM_BOILER_ELECTRIC = type("steam_boiler_electric", ElectricBoilerTileEntity::new); Entities.STEAM_BOILER_GEOTHERMAL = type("steam_boiler_geothermal", GeothermalBoilerTileEntity::new); @@ -29,7 +28,7 @@ public class SteamMachinePersistenceTest { @Test public void levelsAndDecayRetainExactBinaryFractions() { CoalBoilerTileEntity coal = new CoalBoilerTileEntity(); coal.setEnergy(375.0F, Power.steam_power); - coal.getTank().fill(new FluidStack(net.minecraft.fluid.Fluids.WATER, 1500), true); + coal.getTank().fill(new FluidStack(net.minecraft.world.level.material.Fluids.WATER, 1500), true); assertEquals(0.375F, coal.getSteamLevel(), 0.0F); assertEquals(0.375F, coal.getWaterLevel(), 0.0F); ElectricBoilerTileEntity electric = new ElectricBoilerTileEntity(); @@ -52,91 +51,91 @@ public class SteamMachinePersistenceTest { } @Test public void coalAndElectricStateSurviveNativeSaveLoad() { - CompoundNBT tag = state(37.5F); + CompoundTag tag = state(37.5F); tag.put("Tank", water(1500)); tag.putInt("BurnTime", 127); tag.putInt("BurnTimeTotal", 1600); CoalBoilerTileEntity coal = new CoalBoilerTileEntity(); - coal.load(Blocks.AIR.defaultBlockState(), tag); - CompoundNBT saved = coal.save(new CompoundNBT()); - assertEquals("steamadvantage:steam_boiler_coal", saved.getString("id")); + coal.load(tag); + CompoundTag saved = coal.save(new CompoundTag()); + assertEquals("basesteam:steam_boiler_coal", saved.getString("id")); assertEquals(127, saved.getInt("BurnTime")); assertEquals(1600, saved.getInt("BurnTimeTotal")); CoalBoilerTileEntity restored = new CoalBoilerTileEntity(); - restored.load(Blocks.AIR.defaultBlockState(), saved); + restored.load(saved); assertEquals(37.5F, restored.getEnergy(Power.steam_power), 0.0F); assertEquals(1500, restored.getTank().getFluidAmount()); tag.putFloat("Electricity", 60.0F); ElectricBoilerTileEntity electric = new ElectricBoilerTileEntity(); - electric.load(Blocks.AIR.defaultBlockState(), tag); + electric.load(tag); ElectricBoilerTileEntity electricRestored = new ElectricBoilerTileEntity(); - electricRestored.load(Blocks.AIR.defaultBlockState(), electric.save(new CompoundNBT())); + electricRestored.load(electric.save(new CompoundTag())); assertEquals(37.5F, electricRestored.getEnergy(Power.steam_power), 0.0F); assertEquals(60.0F, electricRestored.getEnergy(ElectricBoilerTileEntity.ELECTRIC_POWER), 0.0F); assertEquals(1500, electricRestored.getTank().getFluidAmount()); } @Test public void pumpAliasAndGeothermalMisspellingRemainReadable() { - CompoundNBT tag = state(37.5F); + CompoundTag tag = state(37.5F); tag.put("TankOut", water(750)); tag.putByte("NextPump", (byte) 11); SteamPumpTileEntity pump = new SteamPumpTileEntity(); - pump.load(Blocks.AIR.defaultBlockState(), tag); - CompoundNBT saved = pump.save(new CompoundNBT()); + pump.load(tag); + CompoundTag saved = pump.save(new CompoundTag()); assertEquals(750, saved.getCompound("Tank").getInt("Amount")); assertEquals(11, saved.getByte("NextPump")); SteamPumpTileEntity pumpRestored = new SteamPumpTileEntity(); - pumpRestored.load(Blocks.AIR.defaultBlockState(), saved); + pumpRestored.load(saved); assertEquals(750, pumpRestored.getTank().getFluidAmount()); assertEquals(37.5F, pumpRestored.getEnergy(Power.steam_power), 0.0F); tag.putFloat("Tempoerature", 412.5F); GeothermalBoilerTileEntity geothermal = new GeothermalBoilerTileEntity(); - geothermal.load(Blocks.AIR.defaultBlockState(), tag); - assertEquals(412.5F, geothermal.save(new CompoundNBT()).getFloat("Temperature"), 0.0F); + geothermal.load(tag); + assertEquals(412.5F, geothermal.save(new CompoundTag()).getFloat("Temperature"), 0.0F); tag.putFloat("Temperature", 500.0F); - geothermal.load(Blocks.AIR.defaultBlockState(), tag); - assertEquals(500.0F, geothermal.save(new CompoundNBT()).getFloat("Temperature"), 0.0F); + geothermal.load(tag); + assertEquals(500.0F, geothermal.save(new CompoundTag()).getFloat("Temperature"), 0.0F); } @Test public void stillKeepsSeparateTanksAndExplicitlyEmptyReloads() { - CompoundNBT tag = state(37.5F); + CompoundTag tag = state(37.5F); tag.put("TankIn", water(625)); tag.put("TankOut", water(375)); SteamStillTileEntity still = new SteamStillTileEntity(); - still.load(Blocks.AIR.defaultBlockState(), tag); + still.load(tag); SteamStillTileEntity restored = new SteamStillTileEntity(); - restored.load(Blocks.AIR.defaultBlockState(), still.save(new CompoundNBT())); + restored.load(still.save(new CompoundTag())); assertEquals(625, restored.getInputTank().getFluidAmount()); assertEquals(375, restored.getOutputTank().getFluidAmount()); assertEquals(37.5F, restored.getEnergy(Power.steam_power), 0.0F); tag.put("TankIn", water(0)); tag.put("TankOut", water(0)); - restored.load(Blocks.AIR.defaultBlockState(), tag); + restored.load(tag); assertEquals(0, restored.getInputTank().getFluidAmount()); assertEquals(0, restored.getOutputTank().getFluidAmount()); } - private static CompoundNBT state(float steam) { - CompoundNBT tag = new CompoundNBT(); + private static CompoundTag state(float steam) { + CompoundTag tag = new CompoundTag(); tag.putIntArray("Energy", new int[] {Float.floatToIntBits(steam)}); return tag; } - private static CompoundNBT water(int amount) { - CompoundNBT tag = new CompoundNBT(); + private static CompoundTag water(int amount) { + CompoundTag tag = new CompoundTag(); tag.putString("FluidName", "minecraft:water"); tag.putInt("Amount", amount); return tag; } - private static TileEntityType type(String id, Supplier factory) { - ForgeRegistry> registry = - (ForgeRegistry>) ForgeRegistries.TILE_ENTITIES; + private static BlockEntityType type(String id, BlockEntityType.BlockEntitySupplier factory) { + ForgeRegistry> registry = + (ForgeRegistry>) ForgeRegistries.BLOCK_ENTITIES; boolean locked = registry.isLocked(); registry.unfreeze(); try { - TileEntityType type = TileEntityType.Builder.of(factory, Blocks.STONE).build(null); - type.setRegistryName(new ResourceLocation("steamadvantage", id)); + BlockEntityType type = BlockEntityType.Builder.of(factory, Blocks.STONE).build(null); + type.setRegistryName(new ResourceLocation("basesteam", id)); registry.register(type); return type; } finally { diff --git a/src/test/java/zone/moddev/mc/steamadvantage/machines/SteamOperationalPumpSourceTest.java b/src/test/java/zone/moddev/mc/basesteam/machines/SteamOperationalPumpSourceTest.java similarity index 80% rename from src/test/java/zone/moddev/mc/steamadvantage/machines/SteamOperationalPumpSourceTest.java rename to src/test/java/zone/moddev/mc/basesteam/machines/SteamOperationalPumpSourceTest.java index 6bcda79..a0a4148 100644 --- a/src/test/java/zone/moddev/mc/steamadvantage/machines/SteamOperationalPumpSourceTest.java +++ b/src/test/java/zone/moddev/mc/basesteam/machines/SteamOperationalPumpSourceTest.java @@ -1,18 +1,18 @@ -package zone.moddev.mc.steamadvantage.machines; +package zone.moddev.mc.basesteam.machines; import java.io.InputStream; import java.lang.reflect.Proxy; -import net.minecraft.block.Block; -import net.minecraft.block.BlockState; -import net.minecraft.block.Blocks; -import net.minecraft.block.IBucketPickupHandler; -import net.minecraft.block.material.Material; -import net.minecraft.fluid.Fluid; -import net.minecraft.fluid.FluidState; -import net.minecraft.fluid.Fluids; -import net.minecraft.state.properties.BlockStateProperties; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.IWorld; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.block.Blocks; +import net.minecraft.world.level.block.BucketPickup; +import net.minecraft.world.level.material.Material; +import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.FluidState; +import net.minecraft.world.level.material.Fluids; +import net.minecraft.world.level.block.state.properties.BlockStateProperties; +import net.minecraft.core.BlockPos; +import net.minecraft.world.level.LevelAccessor; import org.junit.BeforeClass; import org.junit.Test; import org.objectweb.asm.ClassReader; @@ -29,7 +29,7 @@ public class SteamOperationalPumpSourceTest { private static final BlockPos SOURCE = new BlockPos(8, 80, 8); @BeforeClass public static void bootstrap() { - net.minecraft.util.registry.Bootstrap.bootStrap(); + net.minecraft.SharedConstants.tryDetectVersion(); net.minecraft.server.Bootstrap.bootStrap(); } @Test public void nativePickupRetainsTheSlabAndOnlyClearsItsWater() { @@ -80,7 +80,7 @@ public class SteamOperationalPumpSourceTest { @Test public void pumpUsesNativePickupBeforeCreditWithoutDestructiveFallback() throws Exception { ClassNode node = new ClassNode(); try (InputStream input = getClass().getResourceAsStream( - "/zone/moddev/mc/steamadvantage/machines/SteamPumpTileEntity.class")) { + "/zone/moddev/mc/basesteam/machines/SteamPumpTileEntity.class")) { assertNotNull(input); new ClassReader(input).accept(node, 0); } @@ -92,11 +92,11 @@ public class SteamOperationalPumpSourceTest { if (instruction instanceof FieldInsnNode) { FieldInsnNode field = (FieldInsnNode) instruction; assertFalse("Caller must not erase waterlogged hosts with AIR", - field.getOpcode() == Opcodes.GETSTATIC && field.owner.equals("net/minecraft/block/Blocks") + field.getOpcode() == Opcodes.GETSTATIC && field.owner.equals("net/minecraft/world/level/block/Blocks") && field.name.equals("AIR")); } else if (instruction instanceof TypeInsnNode) { TypeInsnNode type = (TypeInsnNode) instruction; - if (type.getOpcode() == Opcodes.INSTANCEOF && type.desc.equals("net/minecraft/block/IBucketPickupHandler")) nativeGuard = true; + if (type.getOpcode() == Opcodes.INSTANCEOF && type.desc.equals("net/minecraft/world/level/block/BucketPickup")) nativeGuard = true; } else if (instruction instanceof MethodInsnNode) { MethodInsnNode call = (MethodInsnNode) instruction; assertFalse("No destructive fallback when native pickup is unavailable", @@ -104,7 +104,7 @@ public class SteamOperationalPumpSourceTest { if (candidate == pickup) { assertFalse("Pickup policy delegates block mutation to the native handler", call.name.equals("setBlock") || call.name.equals("setBlockAndUpdate")); - if (call.owner.equals("net/minecraft/block/IBucketPickupHandler") && call.name.equals("takeLiquid")) nativePickup = true; + if (call.owner.equals("net/minecraft/world/level/block/BucketPickup") && call.name.equals("pickupBlock")) nativePickup = true; } else { if (call.name.equals("pickupSource")) extraction = index; if (call.owner.equals("cyano/poweradvantage/api/fluid/FluidTank") && call.name.equals("fill")) fill = index; @@ -122,20 +122,21 @@ private static MethodNode method(ClassNode node, String name) { .orElseThrow(() -> new AssertionError("Missing pump method " + name)); } - private static final class RefusingSource extends Block implements IBucketPickupHandler { + private static final class RefusingSource extends Block implements BucketPickup { private RefusingSource() { super(Block.Properties.of(Material.STONE)); } @Override public FluidState getFluidState(BlockState state) { return Fluids.WATER.defaultFluidState(); } - @Override public Fluid takeLiquid(IWorld world, BlockPos pos, BlockState state) { return Fluids.EMPTY; } + @Override public net.minecraft.world.item.ItemStack pickupBlock(LevelAccessor world, BlockPos pos, BlockState state) { return net.minecraft.world.item.ItemStack.EMPTY; } + @Override public java.util.Optional getPickupSound() { return java.util.Optional.empty(); } } private static final class PickupWorld { private BlockState state; private int writes; - private final IWorld world; + private final LevelAccessor world; private PickupWorld(BlockState initial) { state = initial; - world = (IWorld) Proxy.newProxyInstance(IWorld.class.getClassLoader(), new Class[]{IWorld.class}, + world = (LevelAccessor) Proxy.newProxyInstance(LevelAccessor.class.getClassLoader(), new Class[]{LevelAccessor.class}, (proxy, method, arguments) -> { if (method.getName().equals("setBlock")) { assertEquals(SOURCE, arguments[0]); diff --git a/src/test/java/zone/moddev/mc/steamadvantage/machines/SteamOperationalStillCapacityTest.java b/src/test/java/zone/moddev/mc/basesteam/machines/SteamOperationalStillCapacityTest.java similarity index 85% rename from src/test/java/zone/moddev/mc/steamadvantage/machines/SteamOperationalStillCapacityTest.java rename to src/test/java/zone/moddev/mc/basesteam/machines/SteamOperationalStillCapacityTest.java index 1bb617f..5a5117f 100644 --- a/src/test/java/zone/moddev/mc/steamadvantage/machines/SteamOperationalStillCapacityTest.java +++ b/src/test/java/zone/moddev/mc/basesteam/machines/SteamOperationalStillCapacityTest.java @@ -1,23 +1,23 @@ -package zone.moddev.mc.steamadvantage.machines; +package zone.moddev.mc.basesteam.machines; import cyano.poweradvantage.api.fluid.FluidStack; import java.lang.reflect.Method; -import net.minecraft.block.Blocks; -import net.minecraft.fluid.Fluids; -import net.minecraft.tileentity.TileEntityType; +import net.minecraft.world.level.block.Blocks; +import net.minecraft.world.level.material.Fluids; +import net.minecraft.world.level.block.entity.BlockEntityType; import org.junit.BeforeClass; import org.junit.Test; -import zone.moddev.mc.poweradvantage.registry.still.recipe.DistillationRecipe; -import zone.moddev.mc.poweradvantage.registry.still.recipe.ExplicitFluidReference; -import zone.moddev.mc.steamadvantage.init.Entities; +import zone.moddev.mc.basepower.registry.still.recipe.DistillationRecipe; +import zone.moddev.mc.basepower.registry.still.recipe.ExplicitFluidReference; +import zone.moddev.mc.basesteam.init.Entities; import static org.junit.Assert.*; /** Pure capacity planning; native operating regressions live in SteamOperationalCases. */ public class SteamOperationalStillCapacityTest { @BeforeClass public static void bootstrap() { - net.minecraft.util.registry.Bootstrap.bootStrap(); + net.minecraft.SharedConstants.tryDetectVersion(); net.minecraft.server.Bootstrap.bootStrap(); if (Entities.STEAM_STILL == null) { - Entities.STEAM_STILL = TileEntityType.Builder.of(SteamStillTileEntity::new, Blocks.STONE).build(null); + Entities.STEAM_STILL = BlockEntityType.Builder.of(SteamStillTileEntity::new, Blocks.STONE).build(null); } } diff --git a/src/test/java/zone/moddev/mc/steamadvantage/machines/WaterBoilerFluidBoundaryTest.java b/src/test/java/zone/moddev/mc/basesteam/machines/WaterBoilerFluidBoundaryTest.java similarity index 60% rename from src/test/java/zone/moddev/mc/steamadvantage/machines/WaterBoilerFluidBoundaryTest.java rename to src/test/java/zone/moddev/mc/basesteam/machines/WaterBoilerFluidBoundaryTest.java index b0b3fa7..ba783ac 100644 --- a/src/test/java/zone/moddev/mc/steamadvantage/machines/WaterBoilerFluidBoundaryTest.java +++ b/src/test/java/zone/moddev/mc/basesteam/machines/WaterBoilerFluidBoundaryTest.java @@ -1,9 +1,9 @@ -package zone.moddev.mc.steamadvantage.machines; +package zone.moddev.mc.basesteam.machines; import static org.junit.Assert.*; import java.lang.reflect.Method; import java.util.*; -import net.minecraft.nbt.CompoundNBT; +import net.minecraft.nbt.CompoundTag; import cyano.poweradvantage.api.fluid.FluidStack; import cyano.poweradvantage.api.fluid.FluidTank; import org.junit.Before; @@ -25,13 +25,13 @@ public static Collection boilers() { private FluidTank tank; public WaterBoilerFluidBoundaryTest(Class type) { this.type = type; } @BeforeClass public static void bootstrap() { - net.minecraft.util.registry.Bootstrap.bootStrap(); - if (zone.moddev.mc.steamadvantage.init.Entities.STEAM_BOILER_COAL == null) - zone.moddev.mc.steamadvantage.init.Entities.STEAM_BOILER_COAL = net.minecraft.tileentity.TileEntityType.Builder.of(CoalBoilerTileEntity::new, net.minecraft.block.Blocks.STONE).build(null); - if (zone.moddev.mc.steamadvantage.init.Entities.STEAM_BOILER_ELECTRIC == null) - zone.moddev.mc.steamadvantage.init.Entities.STEAM_BOILER_ELECTRIC = net.minecraft.tileentity.TileEntityType.Builder.of(ElectricBoilerTileEntity::new, net.minecraft.block.Blocks.STONE).build(null); - if (zone.moddev.mc.steamadvantage.init.Entities.STEAM_BOILER_GEOTHERMAL == null) - zone.moddev.mc.steamadvantage.init.Entities.STEAM_BOILER_GEOTHERMAL = net.minecraft.tileentity.TileEntityType.Builder.of(GeothermalBoilerTileEntity::new, net.minecraft.block.Blocks.STONE).build(null); + net.minecraft.SharedConstants.tryDetectVersion(); net.minecraft.server.Bootstrap.bootStrap(); + if (zone.moddev.mc.basesteam.init.Entities.STEAM_BOILER_COAL == null) + zone.moddev.mc.basesteam.init.Entities.STEAM_BOILER_COAL = net.minecraft.world.level.block.entity.BlockEntityType.Builder.of(CoalBoilerTileEntity::new, net.minecraft.world.level.block.Blocks.STONE).build(null); + if (zone.moddev.mc.basesteam.init.Entities.STEAM_BOILER_ELECTRIC == null) + zone.moddev.mc.basesteam.init.Entities.STEAM_BOILER_ELECTRIC = net.minecraft.world.level.block.entity.BlockEntityType.Builder.of(ElectricBoilerTileEntity::new, net.minecraft.world.level.block.Blocks.STONE).build(null); + if (zone.moddev.mc.basesteam.init.Entities.STEAM_BOILER_GEOTHERMAL == null) + zone.moddev.mc.basesteam.init.Entities.STEAM_BOILER_GEOTHERMAL = net.minecraft.world.level.block.entity.BlockEntityType.Builder.of(GeothermalBoilerTileEntity::new, net.minecraft.world.level.block.Blocks.STONE).build(null); } @Before public void createActualBoiler() throws Exception { boiler = type.getConstructor().newInstance(); @@ -41,36 +41,36 @@ public static Collection boilers() { @Test public void emptyTankRejectsLavaInSimulationAndExecutionWithoutChangingTheOffer() throws Exception { for (boolean execute : new boolean[]{false, true}) { stock(0); - FluidStack lava = new FluidStack(net.minecraft.fluid.Fluids.LAVA, 5); - CompoundNBT original = lava.writeToNBT(new CompoundNBT()).copy(); - assertEquals(Boolean.FALSE, type.getMethod("canFill", net.minecraft.util.Direction.class, net.minecraft.fluid.Fluid.class).invoke(boiler, null, net.minecraft.fluid.Fluids.LAVA)); + FluidStack lava = new FluidStack(net.minecraft.world.level.material.Fluids.LAVA, 5); + CompoundTag original = lava.writeToNBT(new CompoundTag()).copy(); + assertEquals(Boolean.FALSE, type.getMethod("canFill", net.minecraft.core.Direction.class, net.minecraft.world.level.material.Fluid.class).invoke(boiler, null, net.minecraft.world.level.material.Fluids.LAVA)); assertEquals(0, fill(lava, execute)); assertEquals(0, tank.getFluidAmount()); - assertEquals(original, lava.writeToNBT(new CompoundNBT())); + assertEquals(original, lava.writeToNBT(new CompoundTag())); } } @Test public void emptyTankStillAcceptsWaterWithoutChangingTheOffer() throws Exception { - FluidStack offered = new FluidStack(net.minecraft.fluid.Fluids.WATER, 5); - CompoundNBT original = offered.writeToNBT(new CompoundNBT()).copy(); - assertEquals(Boolean.TRUE, type.getMethod("canFill", net.minecraft.util.Direction.class, net.minecraft.fluid.Fluid.class).invoke(boiler, null, net.minecraft.fluid.Fluids.WATER)); + FluidStack offered = new FluidStack(net.minecraft.world.level.material.Fluids.WATER, 5); + CompoundTag original = offered.writeToNBT(new CompoundTag()).copy(); + assertEquals(Boolean.TRUE, type.getMethod("canFill", net.minecraft.core.Direction.class, net.minecraft.world.level.material.Fluid.class).invoke(boiler, null, net.minecraft.world.level.material.Fluids.WATER)); assertEquals(5, fill(offered, true)); assertEquals(5, tank.getFluidAmount()); - assertSame(net.minecraft.fluid.Fluids.WATER, tank.getFluid().getFluid()); - assertEquals(original, offered.writeToNBT(new CompoundNBT())); + assertSame(net.minecraft.world.level.material.Fluids.WATER, tank.getFluid().getFluid()); + assertEquals(original, offered.writeToNBT(new CompoundTag())); } @Test public void seededTankRejectsMismatchedFillAndDrain() throws Exception { stock(100); - FluidStack lava = new FluidStack(net.minecraft.fluid.Fluids.LAVA, 5); - CompoundNBT original = lava.writeToNBT(new CompoundNBT()).copy(); + FluidStack lava = new FluidStack(net.minecraft.world.level.material.Fluids.LAVA, 5); + CompoundTag original = lava.writeToNBT(new CompoundTag()).copy(); for (boolean execute : new boolean[]{false, true}) { assertEquals(0, fill(lava, execute)); assertNull(drain(lava, execute)); } assertEquals(100, tank.getFluidAmount()); - assertSame(net.minecraft.fluid.Fluids.WATER, tank.getFluid().getFluid()); - assertEquals(original, lava.writeToNBT(new CompoundNBT())); + assertSame(net.minecraft.world.level.material.Fluids.WATER, tank.getFluid().getFluid()); + assertEquals(original, lava.writeToNBT(new CompoundTag())); } @Test public void nullFillIsSafeOnEmptyAndSeededTanks() throws Exception { @@ -85,7 +85,7 @@ public static Collection boilers() { @Test public void zeroAndNegativeFillsDoNotChangeTheTank() throws Exception { stock(100); for (int amount : new int[]{0, -5}) { - FluidStack request = new FluidStack(net.minecraft.fluid.Fluids.WATER, amount); + FluidStack request = new FluidStack(net.minecraft.world.level.material.Fluids.WATER, amount); request.amount = amount; assertEquals(0, fill(request, false)); assertEquals(0, fill(request, true)); @@ -94,8 +94,8 @@ public static Collection boilers() { } @Test public void typedDrainOnAnEmptyTankReturnsNull() throws Exception { - assertNull(drain(new FluidStack(net.minecraft.fluid.Fluids.WATER, 5), false)); - assertNull(drain(new FluidStack(net.minecraft.fluid.Fluids.WATER, 5), true)); + assertNull(drain(new FluidStack(net.minecraft.world.level.material.Fluids.WATER, 5), false)); + assertNull(drain(new FluidStack(net.minecraft.world.level.material.Fluids.WATER, 5), true)); assertEquals(0, tank.getFluidAmount()); } @@ -111,7 +111,7 @@ public static Collection boilers() { @Test public void zeroAndNegativeTypedDrainsReturnNull() throws Exception { stock(100); for (int amount : new int[]{0, -5}) { - FluidStack request = new FluidStack(net.minecraft.fluid.Fluids.WATER, amount); + FluidStack request = new FluidStack(net.minecraft.world.level.material.Fluids.WATER, amount); request.amount = amount; assertNull(drain(request, false)); assertNull(drain(request, true)); @@ -130,37 +130,37 @@ public static Collection boilers() { @Test public void matchingSimulationKeepsAllStockAndTheFiniteRequestUnchanged() throws Exception { stock(100); - FluidStack request = new FluidStack(net.minecraft.fluid.Fluids.WATER, 5); - CompoundNBT original = request.writeToNBT(new CompoundNBT()).copy(); + FluidStack request = new FluidStack(net.minecraft.world.level.material.Fluids.WATER, 5); + CompoundTag original = request.writeToNBT(new CompoundTag()).copy(); assertEquals(5, fill(request, false)); assertEquals(5, drain(request, false).amount); assertEquals(5, drain(5, false).amount); assertEquals(100, tank.getFluidAmount()); - assertEquals(original, request.writeToNBT(new CompoundNBT())); + assertEquals(original, request.writeToNBT(new CompoundTag())); } @Test public void aRealMatchingDrainReturnsOnlyTheRequestedWater() throws Exception { stock(100); - FluidStack request = new FluidStack(net.minecraft.fluid.Fluids.WATER, 5); + FluidStack request = new FluidStack(net.minecraft.world.level.material.Fluids.WATER, 5); FluidStack result = drain(request, true); assertNotNull(result); - assertSame(net.minecraft.fluid.Fluids.WATER, result.getFluid()); + assertSame(net.minecraft.world.level.material.Fluids.WATER, result.getFluid()); assertEquals(5, result.amount); assertEquals(95, tank.getFluidAmount()); assertEquals(5, request.amount); } - private void stock(int amount) { tank.setFluid(amount == 0 ? null : new FluidStack(net.minecraft.fluid.Fluids.WATER, amount)); } + private void stock(int amount) { tank.setFluid(amount == 0 ? null : new FluidStack(net.minecraft.world.level.material.Fluids.WATER, amount)); } private int fill(FluidStack offered, boolean execute) throws Exception { - Method method = type.getMethod("fill", net.minecraft.util.Direction.class, FluidStack.class, boolean.class); + Method method = type.getMethod("fill", net.minecraft.core.Direction.class, FluidStack.class, boolean.class); return ((Number) method.invoke(boiler, null, offered, execute)).intValue(); } private FluidStack drain(FluidStack request, boolean execute) throws Exception { - return (FluidStack) type.getMethod("drain", net.minecraft.util.Direction.class, FluidStack.class, boolean.class) + return (FluidStack) type.getMethod("drain", net.minecraft.core.Direction.class, FluidStack.class, boolean.class) .invoke(boiler, null, request, execute); } private FluidStack drain(int amount, boolean execute) throws Exception { - return (FluidStack) type.getMethod("drain", net.minecraft.util.Direction.class, int.class, boolean.class) + return (FluidStack) type.getMethod("drain", net.minecraft.core.Direction.class, int.class, boolean.class) .invoke(boiler, null, amount, execute); } } diff --git a/src/test/java/zone/moddev/mc/steamadvantage/machines/WaterBoilerTankNotificationTest.java b/src/test/java/zone/moddev/mc/basesteam/machines/WaterBoilerTankNotificationTest.java similarity index 79% rename from src/test/java/zone/moddev/mc/steamadvantage/machines/WaterBoilerTankNotificationTest.java rename to src/test/java/zone/moddev/mc/basesteam/machines/WaterBoilerTankNotificationTest.java index 23213de..3b7e066 100644 --- a/src/test/java/zone/moddev/mc/steamadvantage/machines/WaterBoilerTankNotificationTest.java +++ b/src/test/java/zone/moddev/mc/basesteam/machines/WaterBoilerTankNotificationTest.java @@ -1,11 +1,11 @@ -package zone.moddev.mc.steamadvantage.machines; +package zone.moddev.mc.basesteam.machines; import static org.junit.Assert.*; import cyano.poweradvantage.api.IPowerMachine; -import zone.moddev.mc.poweradvantage.init.Fluids; +import zone.moddev.mc.basepower.init.Fluids; import java.util.*; -import net.minecraft.nbt.CompoundNBT; -import net.minecraft.world.World; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.world.level.Level; import cyano.poweradvantage.api.fluid.FluidStack; import cyano.poweradvantage.api.fluid.FluidTank; import org.junit.BeforeClass; @@ -23,11 +23,11 @@ public class WaterBoilerTankNotificationTest { private Probe probe; public WaterBoilerTankNotificationTest(String type) { this.type = type; } @BeforeClass public static void bootstrap() { - net.minecraft.util.registry.Bootstrap.bootStrap(); - if (zone.moddev.mc.steamadvantage.init.Entities.STEAM_BOILER_ELECTRIC == null) - zone.moddev.mc.steamadvantage.init.Entities.STEAM_BOILER_ELECTRIC = net.minecraft.tileentity.TileEntityType.Builder.of(ElectricBoilerTileEntity::new, net.minecraft.block.Blocks.STONE).build(null); - if (zone.moddev.mc.steamadvantage.init.Entities.STEAM_BOILER_GEOTHERMAL == null) - zone.moddev.mc.steamadvantage.init.Entities.STEAM_BOILER_GEOTHERMAL = net.minecraft.tileentity.TileEntityType.Builder.of(GeothermalBoilerTileEntity::new, net.minecraft.block.Blocks.STONE).build(null); + net.minecraft.SharedConstants.tryDetectVersion(); net.minecraft.server.Bootstrap.bootStrap(); + if (zone.moddev.mc.basesteam.init.Entities.STEAM_BOILER_ELECTRIC == null) + zone.moddev.mc.basesteam.init.Entities.STEAM_BOILER_ELECTRIC = net.minecraft.world.level.block.entity.BlockEntityType.Builder.of(ElectricBoilerTileEntity::new, net.minecraft.world.level.block.Blocks.STONE).build(null); + if (zone.moddev.mc.basesteam.init.Entities.STEAM_BOILER_GEOTHERMAL == null) + zone.moddev.mc.basesteam.init.Entities.STEAM_BOILER_GEOTHERMAL = net.minecraft.world.level.block.entity.BlockEntityType.Builder.of(GeothermalBoilerTileEntity::new, net.minecraft.world.level.block.Blocks.STONE).build(null); } @Before public void createRealBoiler() { probe = type.equals("electric") ? new ElectricProbe() : new GeothermalProbe(); @@ -42,7 +42,7 @@ public class WaterBoilerTankNotificationTest { } @Test public void networkAcceptedWaterAlsoRequestsSavingBeforeAnyTick() { - assertEquals(5, probe.machine().addEnergy(5, Fluids.fluidToConduitType(net.minecraft.fluid.Fluids.WATER)), 0); + assertEquals(5, probe.machine().addEnergy(5, Fluids.fluidToConduitType(net.minecraft.world.level.material.Fluids.WATER)), 0); saved(5); } @@ -95,7 +95,7 @@ public class WaterBoilerTankNotificationTest { assertEquals(10, probe.save().savedTank.getInt("Amount")); } - private static FluidStack water(int amount) { return new FluidStack(net.minecraft.fluid.Fluids.WATER, amount); } + private static FluidStack water(int amount) { return new FluidStack(net.minecraft.world.level.material.Fluids.WATER, amount); } private void stock(int amount) { probe.tank().setFluid(water(amount)); probe.save().remember(probe.tank()); } private void saved(int amount) { assertTrue("Real server-side tank mutation must notify its owner immediately", probe.save().dirtyCalls > 0); @@ -108,11 +108,11 @@ private void unchanged(int amount) { assertEquals(amount, probe.save().savedTank.getInt("Amount")); } private int fill(FluidStack offer, boolean execute) throws Exception { - return ((Number) probe.machine().getClass().getMethod("fill", net.minecraft.util.Direction.class, FluidStack.class, boolean.class) + return ((Number) probe.machine().getClass().getMethod("fill", net.minecraft.core.Direction.class, FluidStack.class, boolean.class) .invoke(probe.machine(), null, offer, execute)).intValue(); } private FluidStack drain(int amount, boolean execute) throws Exception { - return (FluidStack) probe.machine().getClass().getMethod("drain", net.minecraft.util.Direction.class, int.class, boolean.class) + return (FluidStack) probe.machine().getClass().getMethod("drain", net.minecraft.core.Direction.class, int.class, boolean.class) .invoke(probe.machine(), null, amount, execute); } private interface Probe { @@ -123,14 +123,14 @@ private interface Probe { } private static final class SaveWitness { int dirtyCalls; - CompoundNBT savedTank; - void remember(FluidTank tank) { dirtyCalls = 0; savedTank = tank.writeToNBT(new CompoundNBT()).copy(); } - void changed(FluidTank tank) { dirtyCalls++; savedTank = tank.writeToNBT(new CompoundNBT()).copy(); } + CompoundTag savedTank; + void remember(FluidTank tank) { dirtyCalls = 0; savedTank = tank.writeToNBT(new CompoundTag()).copy(); } + void changed(FluidTank tank) { dirtyCalls++; savedTank = tank.writeToNBT(new CompoundTag()).copy(); } } private static final class ElectricProbe extends ElectricBoilerTileEntity implements Probe { private final SaveWitness witness = new SaveWitness(); - private World testWorld = world(false); - @Override public World getLevel() { return testWorld; } + private Level testWorld = world(false); + @Override public Level getLevel() { return testWorld; } @Override public void setChanged() { witness.changed(getTank()); } @Override public FluidTank tank() { return getTank(); } @Override public SaveWitness save() { return witness; } @@ -139,27 +139,27 @@ private static final class ElectricProbe extends ElectricBoilerTileEntity implem } private static final class GeothermalProbe extends GeothermalBoilerTileEntity implements Probe { private final SaveWitness witness = new SaveWitness(); - private World testWorld = world(false); - @Override public World getLevel() { return testWorld; } + private Level testWorld = world(false); + @Override public Level getLevel() { return testWorld; } @Override public void setChanged() { witness.changed(getTank()); } @Override public FluidTank tank() { return getTank(); } @Override public SaveWitness save() { return witness; } @Override public IPowerMachine machine() { return this; } @Override public void side(boolean client) { testWorld = world(client); } } - private static World world(boolean client) { + private static Level world(boolean client) { try { Class allocator = Class.forName("sun.misc.Unsafe"); java.lang.reflect.Field field = allocator.getDeclaredField("theUnsafe"); field.setAccessible(true); SaveWorld world = (SaveWorld) allocator.getMethod("allocateInstance", Class.class).invoke(field.get(null), SaveWorld.class); - java.lang.reflect.Field clientField = World.class.getDeclaredField("isClientSide"); + java.lang.reflect.Field clientField = Level.class.getDeclaredField("isClientSide"); clientField.setAccessible(true); clientField.setBoolean(world, client); return world; } catch (ReflectiveOperationException failure) { throw new AssertionError(failure); } } - private static final class SaveWorld extends net.minecraft.world.server.ServerWorld { + private static final class SaveWorld extends net.minecraft.server.level.ServerLevel { private SaveWorld() { super(null, null, null, null, null, null, null, null, false, 0L, java.util.Collections.emptyList(), false); } } } diff --git a/src/test/java/zone/moddev/mc/basesteam/migration/SteamConfigMigrationTest.java b/src/test/java/zone/moddev/mc/basesteam/migration/SteamConfigMigrationTest.java new file mode 100644 index 0000000..36d2789 --- /dev/null +++ b/src/test/java/zone/moddev/mc/basesteam/migration/SteamConfigMigrationTest.java @@ -0,0 +1,33 @@ +package zone.moddev.mc.basesteam.migration; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; + +import java.nio.file.Files; +import java.nio.file.Path; + +import org.junit.Rule; +import org.junit.Test; +import org.junit.rules.TemporaryFolder; + +public class SteamConfigMigrationTest { + @Rule public TemporaryFolder temp = new TemporaryFolder(); + + @Test public void preservesPreviousCommonSettingsAndNeverOverwritesCurrentSettings() throws Exception { + Path dir = temp.getRoot().toPath(); + Path oldConfig = dir.resolve("steamadvantage-common.toml"); + Path newConfig = dir.resolve("basesteam-common.toml"); + String oldSettings = "[options]\nmusketDamage = 31.0\n"; + assertFalse(SteamConfigMigration.copyLegacyCommonConfig(dir)); + assertFalse(Files.exists(newConfig)); + Files.writeString(oldConfig, oldSettings); + assertTrue(SteamConfigMigration.copyLegacyCommonConfig(dir)); + assertEquals(oldSettings, Files.readString(newConfig)); + String currentSettings = "[options]\nmusketDamage = 12.0\n"; + Files.writeString(newConfig, currentSettings); + assertFalse(SteamConfigMigration.copyLegacyCommonConfig(dir)); + assertEquals(currentSettings, Files.readString(newConfig)); + assertEquals(oldSettings, Files.readString(oldConfig)); + } +} diff --git a/src/test/java/zone/moddev/mc/basesteam/migration/SteamLegacyMigrationsTest.java b/src/test/java/zone/moddev/mc/basesteam/migration/SteamLegacyMigrationsTest.java new file mode 100644 index 0000000..cb378ab --- /dev/null +++ b/src/test/java/zone/moddev/mc/basesteam/migration/SteamLegacyMigrationsTest.java @@ -0,0 +1,98 @@ +package zone.moddev.mc.basesteam.migration; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; + +import cyano.poweradvantage.api.migration.LegacyMigrationApi; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.core.Direction; +import net.minecraft.resources.ResourceLocation; +import org.junit.Test; + +public class SteamLegacyMigrationsTest { + @Test public void preservesAllSixDrillFacings() { + for (Direction facing : Direction.values()) { + assertEquals(facing, SteamLegacyMigrations.legacyDrillFacing(facing.get3DDataValue())); + } + } + + @Test public void clampsLegacyPlatformHeight() { + assertEquals(0, SteamLegacyMigrations.legacyPlatformHeight(0)); + assertEquals(3, SteamLegacyMigrations.legacyPlatformHeight(3)); + assertEquals(4, SteamLegacyMigrations.legacyPlatformHeight(15)); + } + + @Test public void repairsLegacyPumpAndGeothermalKeysWithoutOverwritingCanonicalState() { + CompoundTag pump = new CompoundTag(); + pump.putString("id", "steamadvantage.steam_pump"); + CompoundTag oldTank = new CompoundTag(); + oldTank.putInt("Amount", 1250); + pump.put("TankOut", oldTank); + assertTrue(SteamLegacyMigrations.repairPersistenceKeys(pump)); + assertEquals(1250, pump.getCompound("Tank").getInt("Amount")); + + CompoundTag boiler = new CompoundTag(); + boiler.putString("id", "steamadvantage:steam_boiler_geothermal"); + boiler.putFloat("Tempoerature", 412.5F); + assertTrue(SteamLegacyMigrations.repairPersistenceKeys(boiler)); + assertEquals(412.5F, boiler.getFloat("Temperature"), 0.0F); + + CompoundTag canonical = new CompoundTag(); + canonical.putString("id", "basesteam:steam_boiler_geothermal"); + canonical.putFloat("Temperature", 500.0F); + canonical.putFloat("Tempoerature", 100.0F); + assertFalse(SteamLegacyMigrations.repairPersistenceKeys(canonical)); + assertEquals(500.0F, canonical.getFloat("Temperature"), 0.0F); + } + + @Test public void aliasesLegacyTileIds() { + SteamLegacyMigrations.register(); + for (String path : new String[] {"steam_boiler_coal", "steam_boiler_electric", "steam_boiler_geothermal", + "steam_tank", "steam_furnace", "steam_crusher", "steam_drill", "steam_elevator", + "drillbit", "steam_still", "steam_pump", "steam_boiler_oil"}) { + for (String source : legacyTileIds(path)) { + assertEquals(source, "basesteam:" + path, LegacyMigrationApi.tileTarget(source)); + } + } + } + + @Test public void namespaceAliasRetainsNativePathsAndLegacyCodecs() { + SteamLegacyMigrations.register(); + assertTrue(LegacyMigrationApi.handlesNamespace("steamadvantage")); + assertTrue(LegacyMigrationApi.handlesNamespace("basesteam")); + for (String path : new String[] {"steam_pipe", "steam_track", "steam_boiler_coal", "steam_boiler_electric", + "steam_boiler_geothermal", "steam_tank", "steam_furnace", "steam_crusher", "steam_drill", + "drillbit", "platform", "steam_elevator", "steam_switch", "pump_pipe_steam", "steam_still", + "steam_pump", "steam_boiler_oil"}) { + ResourceLocation current = new ResourceLocation("basesteam", path); + assertEquals(current, LegacyMigrationApi.blockTarget(new ResourceLocation("steamadvantage", path))); + assertTrue(path, LegacyMigrationApi.blockStateCodecs().containsKey(current)); + } + ResourceLocation oldMusket = new ResourceLocation("steamadvantage:musket"); + assertEquals(new ResourceLocation("basesteam:musket"), LegacyMigrationApi.itemTarget(oldMusket)); + assertTrue(LegacyMigrationApi.isDurableItem(oldMusket)); + assertEquals(new ResourceLocation("basesteam:rapid_reload"), + LegacyMigrationApi.registryTarget(new ResourceLocation("steamadvantage:rapid_reload"))); + } + + @Test public void repairsOldKeysForBothNamespacesWithoutDependingOnRemapOrder() { + for (String source : legacyTileIds("steam_pump")) { + CompoundTag pump = new CompoundTag(); + pump.putString("id", source); + CompoundTag tank = new CompoundTag(); + tank.putInt("Amount", 1250); + pump.put("TankOut", tank); + assertTrue(source, SteamLegacyMigrations.repairPersistenceKeys(pump)); + assertEquals(source, pump.getString("id")); + assertEquals(tank, pump.getCompound("Tank")); + assertFalse(SteamLegacyMigrations.repairPersistenceKeys(pump)); + } + } + + private static String[] legacyTileIds(String path) { + return new String[] {"steamadvantage:" + path, "steamadvantage." + path, + "minecraft:steamadvantage." + path, "basesteam:" + path, "basesteam." + path, + "minecraft:basesteam." + path}; + } +} diff --git a/src/test/java/zone/moddev/mc/basesteam/resources/BuildWorkflowContractTest.java b/src/test/java/zone/moddev/mc/basesteam/resources/BuildWorkflowContractTest.java new file mode 100644 index 0000000..f84caa6 --- /dev/null +++ b/src/test/java/zone/moddev/mc/basesteam/resources/BuildWorkflowContractTest.java @@ -0,0 +1,50 @@ +package zone.moddev.mc.basesteam.resources; + +import java.nio.charset.StandardCharsets; +import java.nio.file.Files; +import java.nio.file.Paths; +import org.junit.Test; +import static org.junit.Assert.*; + +public class BuildWorkflowContractTest { + @Test public void everyHostedBuildUsesPinnedToolchainProjectProperties() throws Exception { + java.util.Properties pins = new java.util.Properties(); + try (java.io.Reader reader = Files.newBufferedReader(Paths.get("gradle.properties"), StandardCharsets.UTF_8)) { + pins.load(reader); + } + for (String key : new String[] {"poweradvantage_source_ref", "poweradvantage_deobf_sha256", + "basemetals_source_commit", "basemetals_deobf_sha256"}) { + assertTrue(key, pins.getProperty(key, "").matches( + key.endsWith("_sha256") ? "[A-F0-9]{64}" : "[a-f0-9]{40}")); + } + for (String name : new String[] {"ci.yml", "codeql-analysis.yml"}) { + String source = new String(Files.readAllBytes(Paths.get(".github/workflows", name)), + StandardCharsets.UTF_8); + assertTrue(name, source.contains("ref: ${{ env.BASEMETALS_SOURCE_REF }}")); + assertTrue(name, source.contains("BaseMetals-" + pins.getProperty("basemetals_version") + "-deobf.jar")); + assertTrue(name, source.contains("repository: " + pins.getProperty("poweradvantage_source_repository"))); + assertTrue(name, source.contains("basePower-" + pins.getProperty("poweradvantage_version") + "-deobf.jar")); + assertTrue(name, source.contains("ref: b56e2b62a1a6ea4d1dd96f8646a87801a817dbdf")); + assertTrue(name, source.contains("ref: ${{ env.POWERADVANTAGE_SOURCE_REF }}")); + assertTrue(name, source.contains("The exact basePower 1.17 dependency pin is pending.")); + assertTrue(name, source.contains("The exact Base Metals 1.17 dependency pin is pending.")); + assertTrue(name, source.contains("^[a-f0-9]{40}$")); + assertTrue(name, source.contains("^[A-F0-9]{64}$")); + int pinCheck = source.indexOf("Validate coordinated dependency pins"); + assertTrue(name, pinCheck >= 0 && pinCheck < source.indexOf("Check out pinned Base Metals") + && pinCheck < source.indexOf("Check out basePower 1.17.1")); + assertFalse(name, source.contains("-Ppoweradvantage_source_ref=")); + assertTrue(name, source.contains("-Porg.gradle.java.installations.paths=")); + assertTrue(name, source.contains("-Porg.gradle.java.installations.auto-detect=false")); + assertTrue(name, source.contains("-Porg.gradle.java.installations.auto-download=false")); + assertFalse(name, source.contains("-Dorg.gradle.java.installations.")); + assertTrue(name, source.contains("jar unitBootstrapJar verifyReleaseDependencies")); + assertTrue(name, source.contains("-PforgeCapabilityBootstrapJar=${{ steps.dependencies.outputs.bootstrap }}")); + for (String line : source.split("\\R")) { + if (line.contains("./gradlew ") && !line.contains("chmod")) { + assertTrue(name + ": " + line, line.contains("./gradlew $MMD_GRADLE_TOOLCHAINS ")); + } + } + } + } +} diff --git a/src/test/java/zone/moddev/mc/steamadvantage/resources/ClientResourceContractTest.java b/src/test/java/zone/moddev/mc/basesteam/resources/ClientResourceContractTest.java similarity index 92% rename from src/test/java/zone/moddev/mc/steamadvantage/resources/ClientResourceContractTest.java rename to src/test/java/zone/moddev/mc/basesteam/resources/ClientResourceContractTest.java index 0a025d5..044bf76 100644 --- a/src/test/java/zone/moddev/mc/steamadvantage/resources/ClientResourceContractTest.java +++ b/src/test/java/zone/moddev/mc/basesteam/resources/ClientResourceContractTest.java @@ -1,4 +1,4 @@ -package zone.moddev.mc.steamadvantage.resources; +package zone.moddev.mc.basesteam.resources; import com.google.gson.JsonElement; import com.google.gson.JsonObject; @@ -15,7 +15,7 @@ public class ClientResourceContractTest { private static final Path ROOT = Paths.get("src/main/resources"); - private static final Path ASSETS = ROOT.resolve("assets/steamadvantage"); + private static final Path ASSETS = ROOT.resolve("assets/basesteam"); @Test public void blockstatesUseLiteralModelPaths() throws Exception { try (Stream files = Files.walk(ASSETS.resolve("blockstates"))) { @@ -55,7 +55,7 @@ public class ClientResourceContractTest { JsonObject locale = read(file); for (Map.Entry entry : locale.entrySet()) { String key = entry.getKey(); - if (!(key.startsWith("tile.steamadvantage.") || key.startsWith("item.steamadvantage.")) + if (!(key.startsWith("tile.basesteam.") || key.startsWith("item.basesteam.")) || !key.endsWith(".name")) continue; String alias = key.substring(0, key.length() - 5); if (alias.startsWith("tile.")) alias = "block." + alias.substring(5); @@ -80,7 +80,7 @@ private static void reference(String id, String directory, String suffix, Path f 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 = "steamadvantage".equals(namespace) ? Files.isRegularFile(ROOT.resolve(resource)) + boolean exists = "basesteam".equals(namespace) ? Files.isRegularFile(ROOT.resolve(resource)) : ClientResourceContractTest.class.getClassLoader().getResource(resource) != null; assertTrue(file + " references missing " + resource, exists); } diff --git a/src/test/java/zone/moddev/mc/basesteam/resources/NativeBlockEntityContractTest.java b/src/test/java/zone/moddev/mc/basesteam/resources/NativeBlockEntityContractTest.java new file mode 100644 index 0000000..f9f1f74 --- /dev/null +++ b/src/test/java/zone/moddev/mc/basesteam/resources/NativeBlockEntityContractTest.java @@ -0,0 +1,67 @@ +package zone.moddev.mc.basesteam.resources; + +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.EntityBlock; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraft.world.level.block.state.BlockState; +import org.junit.BeforeClass; +import org.junit.Test; +import zone.moddev.mc.basesteam.blocks.DrillBitBlock; +import zone.moddev.mc.basesteam.blocks.DrillBitTileEntity; +import zone.moddev.mc.basesteam.init.Entities; +import zone.moddev.mc.basesteam.init.Power; +import zone.moddev.mc.basesteam.machines.*; +import static org.junit.Assert.*; + +public class NativeBlockEntityContractTest { + @BeforeClass public static void bootstrap() { net.minecraft.SharedConstants.tryDetectVersion(); net.minecraft.server.Bootstrap.bootStrap(); } + + @Test public void everyProductionFactoryOwnsItsActualNativePositionAndState() { + BlockPos pos = new BlockPos(2053, 81, -2049); + for (Block block : new Block[] { new CoalBoilerBlock(), new ElectricBoilerBlock(), + new GeothermalBoilerBlock(), new OilBoilerBlock(), new BlastFurnaceBlock(), + new RockCrusherBlock(), new SteamDrillBlock(), new SteamElevatorBlock(), + new SteamPumpBlock(), new SteamStillBlock(), new SteamTankBlock(), new DrillBitBlock() }) { + BlockState state = block.defaultBlockState(); + BlockEntity tile = ((EntityBlock) block).newBlockEntity(pos, state); + assertNotNull(block.getClass().getName(), tile); + assertEquals(pos, tile.getBlockPos()); + assertSame(state, tile.getBlockState()); + } + } + + @Test public void drillLoadCannotReplaceDestinationNativePositionOrFacing() { + BlockPos destination = new BlockPos(-2050, 83, 2048); + for (Direction direction : Direction.values()) { + BlockState state = new SteamDrillBlock().defaultBlockState().setValue(SteamDrillBlock.FACING, direction); + SteamDrillTileEntity drill = new SteamDrillTileEntity(destination, state); + CompoundTag saved = new CompoundTag(); + saved.putInt("x", 7); saved.putInt("y", 9); saved.putInt("z", 11); + saved.putIntArray("Energy", new int[] { Float.floatToIntBits(37.5F) }); + saved.putByte("Facing", (byte) direction.get3DDataValue()); + drill.load(saved); + assertEquals(destination, drill.getBlockPos()); + assertSame(state, drill.getBlockState()); + assertEquals(direction, drill.getBlockState().getValue(SteamDrillBlock.FACING)); + assertEquals(37.5F, drill.getEnergy(Power.steam_power), 0); + } + } + + @Test public void helperTickerIsExplicitAndRejectsUnrelatedNativeTypes() { + DrillBitBlock block = new DrillBitBlock(); + BlockEntityType previous = Entities.DRILLBIT; + try { + Entities.DRILLBIT = BlockEntityType.Builder.of(DrillBitTileEntity::new, block).build(null); + assertNotNull(block.getTicker(null, block.defaultBlockState(), Entities.DRILLBIT)); + assertNull(block.getTicker(null, block.defaultBlockState(), BlockEntityType.FURNACE)); + DrillBitTileEntity tile = new DrillBitTileEntity(new BlockPos(17, 80, 31), block.defaultBlockState()); + block.getTicker(null, block.defaultBlockState(), Entities.DRILLBIT) + .tick(null, tile.getBlockPos(), tile.getBlockState(), tile); + assertEquals(0, tile.rotation, 0); + } finally { Entities.DRILLBIT = previous; } + } +} diff --git a/src/test/java/zone/moddev/mc/steamadvantage/resources/NativeBlockPropertiesTest.java b/src/test/java/zone/moddev/mc/basesteam/resources/NativeBlockPropertiesTest.java similarity index 65% rename from src/test/java/zone/moddev/mc/steamadvantage/resources/NativeBlockPropertiesTest.java rename to src/test/java/zone/moddev/mc/basesteam/resources/NativeBlockPropertiesTest.java index 4f56087..f1114bb 100644 --- a/src/test/java/zone/moddev/mc/steamadvantage/resources/NativeBlockPropertiesTest.java +++ b/src/test/java/zone/moddev/mc/basesteam/resources/NativeBlockPropertiesTest.java @@ -1,24 +1,24 @@ -package zone.moddev.mc.steamadvantage.resources; +package zone.moddev.mc.basesteam.resources; import java.util.Arrays; import java.util.Collection; import java.util.Collections; -import net.minecraft.block.Block; -import net.minecraft.block.BlockState; -import net.minecraft.util.Direction; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.shapes.IBooleanFunction; -import net.minecraft.util.math.shapes.VoxelShape; -import net.minecraft.util.math.shapes.VoxelShapes; -import net.minecraft.util.registry.Bootstrap; -import net.minecraft.world.EmptyBlockReader; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.core.Direction; +import net.minecraft.core.BlockPos; +import net.minecraft.world.phys.shapes.BooleanOp; +import net.minecraft.world.phys.shapes.VoxelShape; +import net.minecraft.world.phys.shapes.Shapes; +import net.minecraft.server.Bootstrap; +import net.minecraft.world.level.EmptyBlockGetter; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.Parameterized; -import zone.moddev.mc.steamadvantage.blocks.PlatformBlock; -import zone.moddev.mc.steamadvantage.blocks.SteamTrackBlock; +import zone.moddev.mc.basesteam.blocks.PlatformBlock; +import zone.moddev.mc.basesteam.blocks.SteamTrackBlock; import static org.junit.Assert.*; @RunWith(Parameterized.class) @@ -35,7 +35,7 @@ public static Collection cases() { @Parameterized.Parameter(1) public int height; private Block block; - @BeforeClass public static void bootstrapNativeRegistries() { Bootstrap.bootStrap(); } + @BeforeClass public static void bootstrapNativeRegistries() { net.minecraft.SharedConstants.tryDetectVersion(); Bootstrap.bootStrap(); } @Before public void createNativeBlockAndStateCaches() { block = height < 0 ? new SteamTrackBlock() : new PlatformBlock(); @@ -48,7 +48,7 @@ public static Collection cases() { @Test public void remainsNonOpaque() { for (BlockState state : states()) { - assertFalse(state.toString(), state.isSolidRender(EmptyBlockReader.INSTANCE, BlockPos.ZERO)); + assertFalse(state.toString(), state.isSolidRender(EmptyBlockGetter.INSTANCE, BlockPos.ZERO)); } } @@ -56,13 +56,13 @@ public static Collection cases() { // Native opacity is 1, not 0, for a non-solid block with a full-cube outline. int expected = height < 0 || height == 4 ? 1 : 0; for (BlockState state : states()) { - assertEquals(state.toString(), expected, state.getLightBlock(EmptyBlockReader.INSTANCE, BlockPos.ZERO)); + assertEquals(state.toString(), expected, state.getLightBlock(EmptyBlockGetter.INSTANCE, BlockPos.ZERO)); } } @Test public void remainsANonNormalCube() { for (BlockState state : states()) { - assertFalse(state.toString(), state.isRedstoneConductor(EmptyBlockReader.INSTANCE, BlockPos.ZERO)); + assertFalse(state.toString(), state.isRedstoneConductor(EmptyBlockGetter.INSTANCE, BlockPos.ZERO)); } } @@ -78,29 +78,29 @@ public static Collection cases() { @Test public void retainsExactNativeStrengthAndHarvestLevel() { for (BlockState state : states()) { assertEquals(height < 0 ? 0.75F : 5.0F, - state.getDestroySpeed(EmptyBlockReader.INSTANCE, BlockPos.ZERO), 0.0F); - assertEquals(-1, state.getHarvestLevel()); - assertNull(state.getHarvestTool()); + state.getDestroySpeed(EmptyBlockGetter.INSTANCE, BlockPos.ZERO), 0.0F); + assertFalse("Native tags must not add a mandatory harvest tool or tier", + state.requiresCorrectToolForDrops()); } } @Test public void fullCollisionHelpersNeitherSuffocateNorBlockTheView() { for (BlockState state : states()) { - assertFalse(state.toString(), state.isSuffocating(EmptyBlockReader.INSTANCE, BlockPos.ZERO)); - assertFalse(state.toString(), state.isViewBlocking(EmptyBlockReader.INSTANCE, BlockPos.ZERO)); + assertFalse(state.toString(), state.isSuffocating(EmptyBlockGetter.INSTANCE, BlockPos.ZERO)); + assertFalse(state.toString(), state.isViewBlocking(EmptyBlockGetter.INSTANCE, BlockPos.ZERO)); } } @Test public void preservesOutlineAndCollisionShapes() { - VoxelShape expected = height < 0 || height == 4 ? VoxelShapes.block() - : height == 0 ? VoxelShapes.box(0.25D, 0.0D, 0.25D, 0.75D, 1.0D, 0.75D) - : VoxelShapes.box(0.0D, 0.0D, 0.0D, 1.0D, height * 0.25D, 1.0D); + VoxelShape expected = height < 0 || height == 4 ? Shapes.block() + : height == 0 ? Shapes.box(0.25D, 0.0D, 0.25D, 0.75D, 1.0D, 0.75D) + : Shapes.box(0.0D, 0.0D, 0.0D, 1.0D, height * 0.25D, 1.0D); if (height < 0) assertEquals(64, states().size()); for (BlockState state : states()) { - assertFalse(state + " outline", VoxelShapes.joinIsNotEmpty(expected, - state.getShape(EmptyBlockReader.INSTANCE, BlockPos.ZERO), IBooleanFunction.NOT_SAME)); - assertFalse(state + " collision", VoxelShapes.joinIsNotEmpty(expected, - state.getCollisionShape(EmptyBlockReader.INSTANCE, BlockPos.ZERO), IBooleanFunction.NOT_SAME)); + assertFalse(state + " outline", Shapes.joinIsNotEmpty(expected, + state.getShape(EmptyBlockGetter.INSTANCE, BlockPos.ZERO), BooleanOp.NOT_SAME)); + assertFalse(state + " collision", Shapes.joinIsNotEmpty(expected, + state.getCollisionShape(EmptyBlockGetter.INSTANCE, BlockPos.ZERO), BooleanOp.NOT_SAME)); } } diff --git a/src/test/java/zone/moddev/mc/basesteam/resources/NativeFuelContractTest.java b/src/test/java/zone/moddev/mc/basesteam/resources/NativeFuelContractTest.java new file mode 100644 index 0000000..29310df --- /dev/null +++ b/src/test/java/zone/moddev/mc/basesteam/resources/NativeFuelContractTest.java @@ -0,0 +1,58 @@ +package zone.moddev.mc.basesteam.resources; + +import net.minecraft.world.item.Item; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.Items; +import net.minecraft.world.item.crafting.RecipeType; +import net.minecraft.server.packs.PackType; +import net.minecraft.server.packs.resources.SimpleReloadableResourceManager; +import net.minecraft.server.packs.VanillaPackResources; +import net.minecraft.tags.TagCollection; +import net.minecraft.tags.TagContainer; +import net.minecraft.tags.SerializationTags; +import net.minecraft.tags.TagLoader; +import net.minecraft.tags.StaticTags; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.core.Registry; +import net.minecraftforge.common.ForgeHooks; +import org.junit.BeforeClass; +import org.junit.Test; +import zone.moddev.mc.basesteam.util.FurnaceFuelHelper; +import static org.junit.Assert.*; + +public class NativeFuelContractTest { + @BeforeClass public static void bootstrapNativeFuel() { + net.minecraft.SharedConstants.tryDetectVersion(); net.minecraft.server.Bootstrap.bootStrap(); + // Standalone tests need the actual vanilla item tags before the native fuel map. + try (SimpleReloadableResourceManager resources = + new SimpleReloadableResourceManager(PackType.SERVER_DATA)) { + resources.add(new VanillaPackResources(null, "minecraft")); + TagLoader reader = + new TagLoader<>(Registry.ITEM::getOptional, "tags/items"); + TagCollection items = reader.loadAndBuild(resources); + assertTrue(items.getAllTags().containsKey(new ResourceLocation("minecraft:non_flammable_wood"))); + TagContainer current = SerializationTags.getInstance(); + TagContainer loaded = new TagContainer.Builder() + .add(Registry.ITEM_REGISTRY, items).build(); + StaticTags.resetAll(loaded); + SerializationTags.bind(loaded); + } + ForgeHooks.updateBurns(); + } + + @Test public void keepsExactVanillaAndEmptyFuelValues() { + assertEquals(0, FurnaceFuelHelper.getBurnTime(ItemStack.EMPTY)); + assertEquals(1600, FurnaceFuelHelper.getBurnTime(new ItemStack(Items.COAL))); + assertEquals(20000, FurnaceFuelHelper.getBurnTime(new ItemStack(Items.LAVA_BUCKET))); + } + + @Test public void retainsTheForgeItemBurnTimeOverride() { + Item item = new Item(new Item.Properties()) { + @Override public int getBurnTime(ItemStack stack, RecipeType recipeType) { + assertNull(recipeType); + return 237; + } + }; + assertEquals(237, FurnaceFuelHelper.getBurnTime(new ItemStack(item))); + } +} diff --git a/src/test/java/zone/moddev/mc/steamadvantage/resources/NativeLootContractTest.java b/src/test/java/zone/moddev/mc/basesteam/resources/NativeLootContractTest.java similarity index 85% rename from src/test/java/zone/moddev/mc/steamadvantage/resources/NativeLootContractTest.java rename to src/test/java/zone/moddev/mc/basesteam/resources/NativeLootContractTest.java index f6b4075..8259db7 100644 --- a/src/test/java/zone/moddev/mc/steamadvantage/resources/NativeLootContractTest.java +++ b/src/test/java/zone/moddev/mc/basesteam/resources/NativeLootContractTest.java @@ -1,4 +1,4 @@ -package zone.moddev.mc.steamadvantage.resources; +package zone.moddev.mc.basesteam.resources; import com.google.gson.JsonObject; import com.google.gson.JsonParser; @@ -12,7 +12,7 @@ public class NativeLootContractTest { private static final Path ROOT = Paths.get("src/main/resources"); - private static final Path TABLES = ROOT.resolve("data/steamadvantage/loot_tables/blocks"); + private static final Path TABLES = ROOT.resolve("data/basesteam/loot_tables/blocks"); @Test public void ordinaryBlocksKeepOneSelfDropWithExplosionSurvival() throws Exception { for (String id : new String[] { "steam_pipe", "steam_track", "steam_boiler_coal", @@ -27,7 +27,7 @@ public class NativeLootContractTest { assertEquals(1, pool.getAsJsonArray("entries").size()); JsonObject entry = pool.getAsJsonArray("entries").get(0).getAsJsonObject(); assertEquals("minecraft:item", entry.get("type").getAsString()); - assertEquals("steamadvantage:" + id, entry.get("name").getAsString()); + assertEquals("basesteam:" + id, entry.get("name").getAsString()); assertEquals("minecraft:survives_explosion", pool.getAsJsonArray("conditions") .get(0).getAsJsonObject().get("condition").getAsString()); } @@ -39,8 +39,8 @@ public class NativeLootContractTest { } } - @Test public void packUsesNative116Format() throws Exception { - assertEquals(6, read(ROOT.resolve("pack.mcmeta")).getAsJsonObject("pack").get("pack_format").getAsInt()); + @Test public void packUsesNative117Format() throws Exception { + assertEquals(7, read(ROOT.resolve("pack.mcmeta")).getAsJsonObject("pack").get("pack_format").getAsInt()); } private static JsonObject read(Path path) throws Exception { diff --git a/src/test/java/zone/moddev/mc/basesteam/resources/OptionalCrushingRecipeContractTest.java b/src/test/java/zone/moddev/mc/basesteam/resources/OptionalCrushingRecipeContractTest.java new file mode 100644 index 0000000..e57f3f2 --- /dev/null +++ b/src/test/java/zone/moddev/mc/basesteam/resources/OptionalCrushingRecipeContractTest.java @@ -0,0 +1,116 @@ +package zone.moddev.mc.basesteam.resources; + +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParser; +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.Arrays; +import java.util.LinkedHashMap; +import java.util.Map; +import java.util.stream.Stream; +import net.minecraftforge.common.crafting.conditions.ModLoadedCondition; +import org.junit.BeforeClass; +import org.junit.Test; +import static org.junit.Assert.*; + +public class OptionalCrushingRecipeContractTest { + private static final Path RECIPES = Paths.get("src/main/resources/data/basesteam/recipes"); + private static final String[] MACHINES = {"steam_boiler_coal", "steam_boiler_electric", + "steam_boiler_geothermal", "steam_crusher", "steam_drill", "steam_elevator", + "steam_furnace", "steam_governor", "steam_tank"}; + + @BeforeClass public static void bootstrapNativeRegistries() { + net.minecraft.SharedConstants.tryDetectVersion(); + net.minecraft.server.Bootstrap.bootStrap(); + } + + private static JsonObject json(String text) { + return new JsonParser().parse(text).getAsJsonObject(); + } + + private static Map crushingRecipes() throws Exception { + Map result = new LinkedHashMap<>(); + try (Stream files = Files.list(RECIPES)) { + for (Path path : (Iterable) files.filter(p -> p.toString().endsWith(".json"))::iterator) { + try (Reader reader = Files.newBufferedReader(path, StandardCharsets.UTF_8)) { + JsonObject recipe = new JsonParser().parse(reader).getAsJsonObject(); + if ("basemetals:crushing".equals(recipe.get("type").getAsString())) + result.put(path.getFileName().toString(), recipe); + } + } + } + return result; + } + + private static boolean baseGuard(JsonElement value) { + if (value == null || !value.isJsonObject()) return false; + JsonObject condition = value.getAsJsonObject(); + if (condition.size() != 2 || !condition.has("type") || !condition.has("modid")) return false; + for (String field : Arrays.asList("type", "modid")) + if (!condition.get(field).isJsonPrimitive() + || !condition.getAsJsonPrimitive(field).isString()) return false; + return "forge:mod_loaded".equals(condition.get("type").getAsString()) + && "basemetals".equals(condition.get("modid").getAsString()); + } + + @Test public void everyOptionalSerializerIsGuardedBeforeItsApocalypticCondition() throws Exception { + Map recipes = crushingRecipes(); + assertEquals("Keep the exact nine optional processing variants", 9, recipes.size()); + for (String machine : MACHINES) { + String name = "crushing_" + machine + ".json"; + JsonObject recipe = recipes.get(name); + assertNotNull(name, recipe); + assertEquals(name, 2, recipe.getAsJsonArray("conditions").size()); + assertTrue(name + " must skip the unavailable serializer", baseGuard( + recipe.getAsJsonArray("conditions").get(0))); + JsonObject mode = recipe.getAsJsonArray("conditions").get(1).getAsJsonObject(); + assertEquals(name, 2, mode.size()); + assertEquals("basesteam:recipe_mode", mode.get("type").getAsString()); + assertEquals("APOCALYPTIC", mode.get("mode").getAsString()); + } + } + + @Test public void malformedOrUnrelatedProviderConditionsCannotSatisfyTheGuard() { + assertTrue(baseGuard(json("{\"type\":\"forge:mod_loaded\",\"modid\":\"basemetals\"}"))); + for (String condition : Arrays.asList("{}", + "{\"type\":\"basesteam:recipe_mode\",\"mode\":\"APOCALYPTIC\"}", + "{\"type\":\"forge:mod_loaded\",\"modid\":\"basesteam\"}", + "{\"type\":\"forge:mod_loaded\",\"modid\":false}", + "{\"type\":\"forge:mod_loaded\",\"modid\":[\"basemetals\"]}", + "{\"type\":\"forge:mod_loaded\",\"modId\":\"basemetals\"}", + "{\"type\":\"forge:mod_loaded\",\"modid\":\"basemetals\",\"extra\":true}")) + assertFalse(condition, baseGuard(json(condition))); + } + + @Test public void nativeForge37SerializerRetainsTheExactProviderIdentity() { + JsonObject guard = json("{\"type\":\"forge:mod_loaded\",\"modid\":\"basemetals\"}"); + ModLoadedCondition condition = ModLoadedCondition.Serializer.INSTANCE.read(guard); + assertEquals("forge:mod_loaded", ModLoadedCondition.Serializer.INSTANCE.getID().toString()); + JsonObject encoded = new JsonObject(); + ModLoadedCondition.Serializer.INSTANCE.write(encoded, condition); + assertEquals("basemetals", encoded.get("modid").getAsString()); + assertThrows(RuntimeException.class, () -> ModLoadedCondition.Serializer.INSTANCE.read(json("{}"))); + } + + @Test public void processingInputsOutputsAndQuantitiesRemainExactlyTheSame() throws Exception { + Map recipes = crushingRecipes(); + for (String machine : MACHINES) { + JsonObject recipe = recipes.get("crushing_" + machine + ".json"); + assertEquals("Only the original payload plus conditions is expected", 4, recipe.size()); + JsonObject ingredient = recipe.getAsJsonObject("ingredient"); + assertEquals(1, ingredient.size()); + assertEquals("basesteam:" + machine, ingredient.get("item").getAsString()); + JsonObject output = recipe.getAsJsonObject("result"); + assertEquals(machine.equals("steam_tank") ? 1 : 2, output.size()); + assertEquals(machine.equals("steam_governor") ? "basepower:sprocket" + : "basesteam:steam_governor", output.get("item").getAsString()); + int amount = machine.equals("steam_tank") ? 1 : machine.equals("steam_elevator") ? 3 : 2; + assertEquals(!machine.equals("steam_tank"), output.has("count")); + assertEquals(amount, output.has("count") ? output.get("count").getAsInt() : 1); + } + } +} diff --git a/src/test/java/zone/moddev/mc/steamadvantage/resources/RecipeRegistrationThreadTest.java b/src/test/java/zone/moddev/mc/basesteam/resources/RecipeRegistrationThreadTest.java similarity index 92% rename from src/test/java/zone/moddev/mc/steamadvantage/resources/RecipeRegistrationThreadTest.java rename to src/test/java/zone/moddev/mc/basesteam/resources/RecipeRegistrationThreadTest.java index 20b6b22..a0fe2b8 100644 --- a/src/test/java/zone/moddev/mc/steamadvantage/resources/RecipeRegistrationThreadTest.java +++ b/src/test/java/zone/moddev/mc/basesteam/resources/RecipeRegistrationThreadTest.java @@ -1,4 +1,4 @@ -package zone.moddev.mc.steamadvantage.resources; +package zone.moddev.mc.basesteam.resources; import java.io.InputStream; import org.junit.Test; @@ -14,11 +14,11 @@ public class RecipeRegistrationThreadTest { @Test public void sharedForgeConditionsAreRegisteredAfterParallelSetup() throws Exception { ClassNode node = new ClassNode(); - try (InputStream input = getClass().getResourceAsStream("/zone/moddev/mc/steamadvantage/SteamAdvantage.class")) { + try (InputStream input = getClass().getResourceAsStream("/zone/moddev/mc/basesteam/SteamAdvantage.class")) { assertNotNull(input); new ClassReader(input).accept(node, 0); } - String conditions = "zone/moddev/mc/steamadvantage/recipe/RecipeConditions"; + String conditions = "zone/moddev/mc/basesteam/recipe/RecipeConditions"; int queued = 0; for (MethodNode method : node.methods) { boolean registrationRunnable = false; diff --git a/src/test/java/zone/moddev/mc/steamadvantage/resources/RecipeUnlockContractTest.java b/src/test/java/zone/moddev/mc/basesteam/resources/RecipeUnlockContractTest.java similarity index 56% rename from src/test/java/zone/moddev/mc/steamadvantage/resources/RecipeUnlockContractTest.java rename to src/test/java/zone/moddev/mc/basesteam/resources/RecipeUnlockContractTest.java index a2811b2..926c421 100644 --- a/src/test/java/zone/moddev/mc/steamadvantage/resources/RecipeUnlockContractTest.java +++ b/src/test/java/zone/moddev/mc/basesteam/resources/RecipeUnlockContractTest.java @@ -1,4 +1,4 @@ -package zone.moddev.mc.steamadvantage.resources; +package zone.moddev.mc.basesteam.resources; import com.google.gson.JsonArray; import com.google.gson.JsonElement; @@ -17,15 +17,23 @@ import java.util.Set; import java.util.stream.Collectors; import java.util.stream.Stream; +import net.minecraft.advancements.critereon.ItemPredicate; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.Items; +import org.junit.BeforeClass; import org.junit.Test; import static org.junit.Assert.*; public class RecipeUnlockContractTest { - private static final String MOD = "steamadvantage"; + private static final String MOD = "basesteam"; 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")); + @BeforeClass public static void bootstrapNativeRegistries() { + net.minecraft.SharedConstants.tryDetectVersion(); net.minecraft.server.Bootstrap.bootStrap(); + } + @Test public void everyCraftingRecipeHasExactlyOneUnlockAndProcessingHasNone() throws IOException { Set expected = new LinkedHashSet<>(); for (Path file : files(DATA.resolve("recipes"))) { @@ -61,9 +69,9 @@ public class RecipeUnlockContractTest { 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) + Set expected = choices.stream().map(RecipeUnlockContractTest::ingredientKey) .filter(key -> !IGNORED.contains(key)).collect(Collectors.toCollection(LinkedHashSet::new)); - if (expected.isEmpty()) for (JsonObject choice : choices) expected.add(predicateKey(choice)); + if (expected.isEmpty()) for (JsonObject choice : choices) expected.add(ingredientKey(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()); @@ -100,6 +108,52 @@ public class RecipeUnlockContractTest { } } + @Test public void nativeSingletonPredicatesKeepRecipeIngredientSemantics() { + JsonObject ingredient = new JsonParser().parse("{\"item\":\"minecraft:string\"}").getAsJsonObject(); + JsonObject predicate = new JsonParser().parse("{\"items\":[\"minecraft:string\"]}").getAsJsonObject(); + assertEquals("item:minecraft:string", predicateKey(predicate)); + assertEquals(ingredientKey(ingredient), predicateKey(predicate)); + JsonObject tag = new JsonParser().parse("{\"tag\":\"minecraft:planks\"}").getAsJsonObject(); + assertEquals("tag:minecraft:planks", predicateKey(tag)); + assertEquals(ingredientKey(tag), predicateKey(tag)); + assertThrows("Legacy item predicates must not compare equal to native predicates", + AssertionError.class, () -> predicateKey(ingredient)); + } + + @Test public void malformedOrBroadItemPredicatesAreRejected() { + for (String json : new String[]{"{}", "{\"items\":[]}", + "{\"items\":[\"minecraft:string\",\"minecraft:stone\"]}", + "{\"items\":\"minecraft:string\"}", "{\"items\":[1]}", "{\"items\":[null]}", + "{\"tag\":[\"minecraft:planks\"]}", + "{\"items\":[\"minecraft:string\"],\"item\":\"minecraft:stone\"}", + "{\"items\":[\"minecraft:string\"],\"tag\":\"minecraft:planks\"}"}) { + JsonObject predicate = new JsonParser().parse(json).getAsJsonObject(); + assertThrows(json, AssertionError.class, () -> predicateKey(predicate)); + } + } + + @Test public void nativeMusketUnlockPredicateRejectsUnrelatedInventory() throws IOException { + JsonObject unlock = read(DATA.resolve("advancements/recipes/musket_right_normal.json")); + JsonObject predicate = unlock.getAsJsonObject("criteria").getAsJsonObject("has_ingredient_1") + .getAsJsonObject("conditions").getAsJsonArray("items").get(0).getAsJsonObject(); + assertEquals("item:minecraft:flint_and_steel", predicateKey(predicate)); + ItemPredicate nativePredicate = ItemPredicate.fromJson(predicate); + assertTrue(nativePredicate.matches(new ItemStack(Items.FLINT_AND_STEEL))); + assertFalse("String alone must not unlock a musket", nativePredicate.matches(new ItemStack(Items.STRING))); + assertFalse("Unrelated inventory must not act as an ANY predicate", nativePredicate.matches(new ItemStack(Items.STONE))); + } + + @Test public void nativeParserNegativeControlExposesIgnoredLegacyItemField() { + JsonObject legacy = new JsonParser().parse("{\"item\":\"minecraft:string\"}").getAsJsonObject(); + ItemPredicate unrestricted = ItemPredicate.fromJson(legacy); + assertTrue("The old field is ignored by the native parser", unrestricted.matches(new ItemStack(Items.STONE))); + assertThrows(AssertionError.class, () -> predicateKey(legacy)); + JsonObject singleton = new JsonParser().parse("{\"items\":[\"minecraft:string\"]}").getAsJsonObject(); + ItemPredicate restricted = ItemPredicate.fromJson(singleton); + assertTrue(restricted.matches(new ItemStack(Items.STRING))); + assertFalse("Native singleton must not become ANY", restricted.matches(new ItemStack(Items.STONE))); + } + private static boolean crafting(JsonObject recipe) { String type = recipe.get("type").getAsString(); return type.equals("minecraft:crafting_shaped") || type.equals("minecraft:crafting_shapeless") @@ -107,8 +161,28 @@ private static boolean crafting(JsonObject recipe) { } private static String predicateKey(JsonObject predicate) { - String type = predicate.has("tag") ? "tag" : "item"; - return type + ":" + predicate.get(type).getAsString(); + assertEquals("Only one native item or tag predicate is expected", 1, predicate.size()); + assertFalse("Native advancement predicates must not use the ignored legacy item field", predicate.has("item")); + if (predicate.has("tag")) { + JsonElement tag = predicate.get("tag"); + assertTrue("Tag predicate must contain a string", tag.isJsonPrimitive() && tag.getAsJsonPrimitive().isString()); + return "tag:" + tag.getAsString(); + } + assertTrue("Native item predicate requires an items array", predicate.has("items") && predicate.get("items").isJsonArray()); + JsonArray items = predicate.getAsJsonArray("items"); + assertEquals("Discovery must identify exactly one recipe ingredient", 1, items.size()); + JsonElement item = items.get(0); + assertTrue("Item predicate must contain a string ID", item.isJsonPrimitive() && item.getAsJsonPrimitive().isString()); + return "item:" + item.getAsString(); + } + + private static String ingredientKey(JsonObject ingredient) { + assertEquals("Only one recipe item or tag ingredient is expected", 1, ingredient.size()); + String type = ingredient.has("tag") ? "tag" : "item"; + assertTrue("Recipe ingredients retain singular item or tag syntax", ingredient.has(type)); + JsonElement value = ingredient.get(type); + assertTrue("Recipe ingredient must contain a string ID", value.isJsonPrimitive() && value.getAsJsonPrimitive().isString()); + return type + ":" + value.getAsString(); } private static void collect(JsonElement element, List result) { diff --git a/src/test/java/zone/moddev/mc/steamadvantage/resources/WorldOnlyConduitContractTest.java b/src/test/java/zone/moddev/mc/basesteam/resources/WorldOnlyConduitContractTest.java similarity index 82% rename from src/test/java/zone/moddev/mc/steamadvantage/resources/WorldOnlyConduitContractTest.java rename to src/test/java/zone/moddev/mc/basesteam/resources/WorldOnlyConduitContractTest.java index afdcf8b..4fa2877 100644 --- a/src/test/java/zone/moddev/mc/steamadvantage/resources/WorldOnlyConduitContractTest.java +++ b/src/test/java/zone/moddev/mc/basesteam/resources/WorldOnlyConduitContractTest.java @@ -1,4 +1,4 @@ -package zone.moddev.mc.steamadvantage.resources; +package zone.moddev.mc.basesteam.resources; import java.io.InputStream; import org.junit.Test; @@ -15,7 +15,7 @@ public class WorldOnlyConduitContractTest { for (String type : new String[] {"SteamDrillBlock", "SteamDrillTileEntity"}) { ClassNode node = new ClassNode(); try (InputStream input = getClass().getResourceAsStream( - "/zone/moddev/mc/steamadvantage/machines/" + type + ".class")) { + "/zone/moddev/mc/basesteam/machines/" + type + ".class")) { assertNotNull(input); new ClassReader(input).accept(node, 0); } @@ -23,10 +23,10 @@ public class WorldOnlyConduitContractTest { for (AbstractInsnNode instruction : method.instructions.toArray()) { if (!(instruction instanceof MethodInsnNode)) continue; MethodInsnNode call = (MethodInsnNode) instruction; - if (!call.owner.equals("zone/moddev/mc/poweradvantage/conduitnetwork/ConduitRegistry") + if (!call.owner.equals("zone/moddev/mc/basepower/conduitnetwork/ConduitRegistry") || !call.name.startsWith("conduitBlock")) continue; assertTrue(type + "." + method.name + call.desc, - call.desc.startsWith("(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;")); + call.desc.startsWith("(Lnet/minecraft/world/level/Level;Lnet/minecraft/core/BlockPos;")); callbacks++; } } diff --git a/src/test/java/zone/moddev/mc/steamadvantage/util/SoundHelperLoadedPlayersTest.java b/src/test/java/zone/moddev/mc/basesteam/util/SoundHelperLoadedPlayersTest.java similarity index 84% rename from src/test/java/zone/moddev/mc/steamadvantage/util/SoundHelperLoadedPlayersTest.java rename to src/test/java/zone/moddev/mc/basesteam/util/SoundHelperLoadedPlayersTest.java index ec74fd1..3a874e9 100644 --- a/src/test/java/zone/moddev/mc/steamadvantage/util/SoundHelperLoadedPlayersTest.java +++ b/src/test/java/zone/moddev/mc/basesteam/util/SoundHelperLoadedPlayersTest.java @@ -1,7 +1,7 @@ -package zone.moddev.mc.steamadvantage.util; +package zone.moddev.mc.basesteam.util; import java.io.InputStream; -import net.minecraft.util.math.AxisAlignedBB; +import net.minecraft.world.phys.AABB; import org.junit.Test; import org.objectweb.asm.ClassReader; import org.objectweb.asm.Opcodes; @@ -45,7 +45,7 @@ public class SoundHelperLoadedPlayersTest { for (AbstractInsnNode instruction : method.instructions.toArray()) { if (instruction instanceof FieldInsnNode) { FieldInsnNode field = (FieldInsnNode) instruction; - if (field.getOpcode() == Opcodes.GETSTATIC && field.owner.equals("net/minecraft/util/EntityPredicates") + if (field.getOpcode() == Opcodes.GETSTATIC && field.owner.equals("net/minecraft/world/entity/EntitySelector") && field.name.equals("NO_SPECTATORS")) predicate = method.instructions.indexOf(instruction); } else if (instruction instanceof MethodInsnNode) { MethodInsnNode call = (MethodInsnNode) instruction; @@ -56,7 +56,7 @@ public class SoundHelperLoadedPlayersTest { assertTrue(method.name + " rejects a false native spectator predicate", guard instanceof JumpInsnNode && guard.getOpcode() == Opcodes.IFEQ); } - if (call.owner.equals("net/minecraft/network/play/server/SPlaySoundPacket") && call.name.equals("")) { + if (call.owner.equals("net/minecraft/network/protocol/game/ClientboundCustomSoundPacket") && call.name.equals("")) { packet = method.instructions.indexOf(instruction); } } @@ -70,16 +70,16 @@ public class SoundHelperLoadedPlayersTest { @Test public void rangeSelectionKeepsStrictAabbOverlapNotDistanceOrPlayerCenter() { for (double radius : new double[]{16, 50}) { - AxisAlignedBB area = new AxisAlignedBB(-radius, -radius, -radius, radius, radius, radius); + AABB area = new AABB(-radius, -radius, -radius, radius, radius, radius); assertTrue("An overlapping player body is included even with its center outside the cube", - area.intersects(new AxisAlignedBB(radius - 0.1, -0.5, -0.3, radius + 0.5, 1.3, 0.3))); + area.intersects(new AABB(radius - 0.1, -0.5, -0.3, radius + 0.5, 1.3, 0.3))); assertTrue("Corner overlap remains included, not replaced with a spherical radius", - area.intersects(new AxisAlignedBB(radius - 0.1, radius - 0.1, radius - 0.1, + area.intersects(new AABB(radius - 0.1, radius - 0.1, radius - 0.1, radius + 0.5, radius + 1.7, radius + 0.5))); assertFalse("Merely touching the positive boundary is not an intersection", - area.intersects(new AxisAlignedBB(radius, -0.5, -0.3, radius + 0.6, 1.3, 0.3))); + area.intersects(new AABB(radius, -0.5, -0.3, radius + 0.6, 1.3, 0.3))); assertFalse("Merely touching the negative boundary is not an intersection", - area.intersects(new AxisAlignedBB(-radius - 0.6, -0.5, -0.3, -radius, 1.3, 0.3))); + area.intersects(new AABB(-radius - 0.6, -0.5, -0.3, -radius, 1.3, 0.3))); } } @@ -93,15 +93,15 @@ private static void verifyDispatch(String name, double radius) throws Exception MethodInsnNode call = (MethodInsnNode) instruction; if (call.name.equals("players")) playerLists++; if (call.name.equals("getBoundingBox")) bounds++; - if (call.owner.equals("net/minecraft/util/math/AxisAlignedBB") && call.name.equals("intersects") - && call.desc.equals("(Lnet/minecraft/util/math/AxisAlignedBB;)Z")) intersections++; - if (call.owner.equals("net/minecraft/network/play/server/SPlaySoundPacket") && call.name.equals("")) soundPackets++; + if (call.owner.equals("net/minecraft/world/phys/AABB") && call.name.equals("intersects") + && call.desc.equals("(Lnet/minecraft/world/phys/AABB;)Z")) intersections++; + if (call.owner.equals("net/minecraft/network/protocol/game/ClientboundCustomSoundPacket") && call.name.equals("")) soundPackets++; } else if (instruction instanceof LdcInsnNode) { Object value = ((LdcInsnNode) instruction).cst; if (value instanceof Double && ((Double) value).doubleValue() == radius) correctRadius = true; } else if (instruction instanceof TypeInsnNode) { TypeInsnNode type = (TypeInsnNode) instruction; - if (type.getOpcode() == Opcodes.INSTANCEOF && type.desc.equals("net/minecraft/entity/player/ServerPlayerEntity")) serverPlayer = true; + if (type.getOpcode() == Opcodes.INSTANCEOF && type.desc.equals("net/minecraft/server/level/ServerPlayer")) serverPlayer = true; } else if (instruction instanceof FieldInsnNode) { FieldInsnNode field = (FieldInsnNode) instruction; if (field.getOpcode() == Opcodes.GETFIELD && field.name.equals("connection")) connection = true; @@ -119,7 +119,7 @@ private static void verifyDispatch(String name, double radius) throws Exception private static ClassNode soundHelper() throws Exception { ClassNode node = new ClassNode(); try (InputStream input = SoundHelperLoadedPlayersTest.class.getResourceAsStream( - "/zone/moddev/mc/steamadvantage/util/SoundHelper.class")) { + "/zone/moddev/mc/basesteam/util/SoundHelper.class")) { assertNotNull("Compiled SoundHelper is available", input); new ClassReader(input).accept(node, 0); } diff --git a/src/test/java/zone/moddev/mc/steamadvantage/migration/SteamLegacyMigrationsTest.java b/src/test/java/zone/moddev/mc/steamadvantage/migration/SteamLegacyMigrationsTest.java deleted file mode 100644 index 088b40f..0000000 --- a/src/test/java/zone/moddev/mc/steamadvantage/migration/SteamLegacyMigrationsTest.java +++ /dev/null @@ -1,57 +0,0 @@ -package zone.moddev.mc.steamadvantage.migration; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; - -import cyano.poweradvantage.api.migration.LegacyMigrationApi; -import net.minecraft.nbt.CompoundNBT; -import net.minecraft.util.Direction; -import org.junit.Test; - -public class SteamLegacyMigrationsTest { - @Test public void preservesAllSixDrillFacings() { - for (Direction facing : Direction.values()) { - assertEquals(facing, SteamLegacyMigrations.legacyDrillFacing(facing.get3DDataValue())); - } - } - - @Test public void clampsLegacyPlatformHeight() { - assertEquals(0, SteamLegacyMigrations.legacyPlatformHeight(0)); - assertEquals(3, SteamLegacyMigrations.legacyPlatformHeight(3)); - assertEquals(4, SteamLegacyMigrations.legacyPlatformHeight(15)); - } - - @Test public void repairsLegacyPumpAndGeothermalKeysWithoutOverwritingCanonicalState() { - CompoundNBT pump = new CompoundNBT(); - pump.putString("id", "steamadvantage.steam_pump"); - CompoundNBT oldTank = new CompoundNBT(); - oldTank.putInt("Amount", 1250); - pump.put("TankOut", oldTank); - assertTrue(SteamLegacyMigrations.repairPersistenceKeys(pump)); - assertEquals(1250, pump.getCompound("Tank").getInt("Amount")); - - CompoundNBT boiler = new CompoundNBT(); - boiler.putString("id", "steamadvantage:steam_boiler_geothermal"); - boiler.putFloat("Tempoerature", 412.5F); - assertTrue(SteamLegacyMigrations.repairPersistenceKeys(boiler)); - assertEquals(412.5F, boiler.getFloat("Temperature"), 0.0F); - - CompoundNBT canonical = new CompoundNBT(); - canonical.putString("id", "steamadvantage:steam_boiler_geothermal"); - canonical.putFloat("Temperature", 500.0F); - canonical.putFloat("Tempoerature", 100.0F); - assertFalse(SteamLegacyMigrations.repairPersistenceKeys(canonical)); - assertEquals(500.0F, canonical.getFloat("Temperature"), 0.0F); - } - - @Test public void aliasesLegacyTileIds() { - SteamLegacyMigrations.register(); - assertEquals("steamadvantage:steam_pump", - LegacyMigrationApi.tileTarget("steamadvantage.steam_pump")); - assertEquals("steamadvantage:steam_drill", - LegacyMigrationApi.tileTarget("steamadvantage.steam_drill")); - assertEquals("steamadvantage:steam_drill", - LegacyMigrationApi.tileTarget("minecraft:steamadvantage.steam_drill")); - } -} diff --git a/src/test/java/zone/moddev/mc/steamadvantage/resources/BuildWorkflowContractTest.java b/src/test/java/zone/moddev/mc/steamadvantage/resources/BuildWorkflowContractTest.java deleted file mode 100644 index 0046834..0000000 --- a/src/test/java/zone/moddev/mc/steamadvantage/resources/BuildWorkflowContractTest.java +++ /dev/null @@ -1,45 +0,0 @@ -package zone.moddev.mc.steamadvantage.resources; - -import java.nio.charset.StandardCharsets; -import java.nio.file.Files; -import java.nio.file.Paths; -import org.junit.Test; -import static org.junit.Assert.*; - -public class BuildWorkflowContractTest { - @Test public void everyHostedBuildUsesPinnedToolchainProjectProperties() throws Exception { - String powerSource = "bcb75bfa91c14751ebf1e31865e1ec0ffa82c0b7"; - String powerHash = "2FB923944A456B4F26AB2F9212C646469CE3F49BFD4DAE894C15559B48908386"; - String properties = new String(Files.readAllBytes(Paths.get("gradle.properties")), - StandardCharsets.UTF_8); - assertTrue(properties.contains("poweradvantage_source_ref=" + powerSource)); - assertTrue(properties.contains("poweradvantage_deobf_sha256=" + powerHash)); - for (String name : new String[] {"build.gradle", "README.md"}) { - String source = new String(Files.readAllBytes(Paths.get(name)), StandardCharsets.UTF_8); - assertTrue(name, source.contains(powerSource)); - assertTrue(name, source.contains(powerHash)); - } - for (String name : new String[] {"ci.yml", "codeql-analysis.yml"}) { - String source = new String(Files.readAllBytes(Paths.get(".github/workflows", name)), - StandardCharsets.UTF_8); - assertTrue(name, source.contains("ref: 995f6cc4dd2d5eecc628a42e5c43fa5390c24bca")); - assertTrue(name, source.contains("BaseMetals-3.1.1.116051-deobf.jar")); - assertTrue(name, source.contains("ref: a113e5d767169189f0e35ade1e173a12d550b00e")); - assertTrue(name, source.contains("ref: " + powerSource)); - assertTrue(name, source.contains("Final Power 1.16 dependency pin is pending.")); - assertTrue(name, source.contains("^[a-f0-9]{40}$")); - assertTrue(name, source.contains("^[A-F0-9]{64}$")); - assertTrue(name, source.indexOf("Validate final Power source pin") - < source.indexOf("Check out PowerAdvantage 1.16.5")); - assertTrue(name, source.contains("-Porg.gradle.java.installations.paths=")); - assertTrue(name, source.contains("-Porg.gradle.java.installations.auto-detect=false")); - assertTrue(name, source.contains("-Porg.gradle.java.installations.auto-download=false")); - assertFalse(name, source.contains("-Dorg.gradle.java.installations.")); - for (String line : source.split("\\R")) { - if (line.contains("./gradlew ") && !line.contains("chmod")) { - assertTrue(name + ": " + line, line.contains("./gradlew $MMD_GRADLE_TOOLCHAINS ")); - } - } - } - } -} diff --git a/src/test/java/zone/moddev/mc/steamadvantage/resources/NativeFuelContractTest.java b/src/test/java/zone/moddev/mc/steamadvantage/resources/NativeFuelContractTest.java deleted file mode 100644 index 89a65d7..0000000 --- a/src/test/java/zone/moddev/mc/steamadvantage/resources/NativeFuelContractTest.java +++ /dev/null @@ -1,57 +0,0 @@ -package zone.moddev.mc.steamadvantage.resources; - -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.item.Items; -import net.minecraft.item.crafting.IRecipeType; -import net.minecraft.resources.ResourcePackType; -import net.minecraft.resources.SimpleReloadableResourceManager; -import net.minecraft.resources.VanillaPack; -import net.minecraft.tags.ITagCollection; -import net.minecraft.tags.ITagCollectionSupplier; -import net.minecraft.tags.TagCollectionManager; -import net.minecraft.tags.TagCollectionReader; -import net.minecraft.tags.TagRegistryManager; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.registry.Registry; -import net.minecraftforge.common.ForgeHooks; -import org.junit.BeforeClass; -import org.junit.Test; -import zone.moddev.mc.steamadvantage.util.FurnaceFuelHelper; -import static org.junit.Assert.*; - -public class NativeFuelContractTest { - @BeforeClass public static void bootstrapNativeFuel() { - net.minecraft.util.registry.Bootstrap.bootStrap(); - // Standalone tests need the actual vanilla item tags before the native fuel map. - try (SimpleReloadableResourceManager resources = - new SimpleReloadableResourceManager(ResourcePackType.SERVER_DATA)) { - resources.add(new VanillaPack("minecraft")); - TagCollectionReader reader = - new TagCollectionReader<>(Registry.ITEM::getOptional, "tags/items", "item"); - ITagCollection items = reader.load(reader.prepare(resources, Runnable::run).join()); - assertTrue(items.getAllTags().containsKey(new ResourceLocation("minecraft:non_flammable_wood"))); - ITagCollectionSupplier current = TagCollectionManager.getInstance(); - TagRegistryManager.get(new ResourceLocation("minecraft:item")).reset( - ITagCollectionSupplier.of(current.getBlocks(), items, - current.getFluids(), current.getEntityTypes())); - } - ForgeHooks.updateBurns(); - } - - @Test public void keepsExactVanillaAndEmptyFuelValues() { - assertEquals(0, FurnaceFuelHelper.getBurnTime(ItemStack.EMPTY)); - assertEquals(1600, FurnaceFuelHelper.getBurnTime(new ItemStack(Items.COAL))); - assertEquals(20000, FurnaceFuelHelper.getBurnTime(new ItemStack(Items.LAVA_BUCKET))); - } - - @Test public void retainsTheForgeItemBurnTimeOverride() { - Item item = new Item(new Item.Properties()) { - @Override public int getBurnTime(ItemStack stack, IRecipeType recipeType) { - assertNull(recipeType); - return 237; - } - }; - assertEquals(237, FurnaceFuelHelper.getBurnTime(new ItemStack(item))); - } -} diff --git a/tools/generate-recipe-unlocks.js b/tools/generate-recipe-unlocks.js index 2714622..4c3e37c 100644 --- a/tools/generate-recipe-unlocks.js +++ b/tools/generate-recipe-unlocks.js @@ -30,7 +30,8 @@ for (const file of fs.readdirSync(recipes).filter(name => name.endsWith('.json') const criteria = {}; unique.forEach((ingredient, index) => { criteria[`has_ingredient_${index + 1}`] = { - trigger: 'minecraft:inventory_changed', conditions: {items: [ingredient]} + trigger: 'minecraft:inventory_changed', + conditions: {items: [ingredient.item ? {items: [ingredient.item]} : ingredient]} }; }); criteria.has_recipe = {trigger: 'minecraft:recipe_unlocked', conditions: {recipe: id}}; diff --git a/tools/verify-native-port.js b/tools/verify-native-port.js new file mode 100644 index 0000000..d36cd4f --- /dev/null +++ b/tools/verify-native-port.js @@ -0,0 +1,89 @@ +'use strict'; + +const assert = require('node:assert/strict'); +const fs = require('node:fs'); +const path = require('node:path'); +const root = path.resolve(__dirname, '..'); +const read = name => fs.readFileSync(path.join(root, name), 'utf8'); +const mod = 'basesteam'; +const java = 'src/main/java/zone/moddev/mc/basesteam'; +const resources = 'src/main/resources'; +const assets = `${resources}/assets/${mod}`; +const data = `${resources}/data/${mod}`; +function files(dir) { + return fs.readdirSync(path.join(root, dir), { withFileTypes: true }).flatMap(entry => { + const name = `${dir}/${entry.name}`; + return entry.isDirectory() ? files(name) : [name]; + }); +} +const json = new Map(); +for (const name of files(resources).filter(name => /\.(json|mcmeta)$/.test(name))) { + const text = read(name); + assert(!/steamadvantage|poweradvantage/.test(name + text), name); + json.set(name, JSON.parse(text)); +} +assert.deepEqual(json.get(`${resources}/pack.mcmeta`).pack, {pack_format: 7, description: 'baseSteam'}); +const metadata = read(`${resources}/META-INF/mods.toml`); +assert.match(metadata, /modId="basesteam"/); +assert.match(metadata, /modId="basepower"\r?\nmandatory=true\r?\nversionRange="\[2\.4\.9\.117011,3\.0\.0\)"/); +assert.match(metadata, /modId="basemetals"\r?\nmandatory=false/); +assert.doesNotMatch(metadata, /dependencies\.steamadvantage|modId="(?:steamadvantage|poweradvantage)"/); + +function verifyLocalAsset(id, directory, extension, name) { + if (!id.startsWith(`${mod}:`)) return; + const target = `${assets}/${directory}/${id.slice(mod.length + 1)}${extension}`; + assert(fs.existsSync(path.join(root, target)), `${name} references missing ${target}`); +} +function verifyModelReferences(value, name) { + if (Array.isArray(value)) value.forEach(child => verifyModelReferences(child, name)); + else if (value && typeof value === 'object') { + for (const [key, child] of Object.entries(value)) { + if (typeof child === 'string' && (key === 'model' || key === 'parent')) { + verifyLocalAsset(child, 'models', '.json', name); + } else if (key === 'textures' && child && !Array.isArray(child)) { + for (const texture of Object.values(child)) verifyLocalAsset(texture, 'textures', '.png', name); + } else verifyModelReferences(child, name); + } + } +} +for (const [name, content] of json) { + if (name.startsWith(assets)) verifyModelReferences(content, name); +} +const source = files('src/main/java').filter(name => name.endsWith('.java')); +for (const name of source) { + const text = read(name); + assert(!/net\.minecraft\.(?:block|tileentity|entity|item|inventory)\./.test(text), name); + assert(!/setPosition\(|setLevelAndPosition\(|ITickableTileEntity|\[native code\]/.test(text), name); + assert(!/getDeclaredField\("(?:level|world|worldPosition)"\)/.test(text), name); + assert(!/zone\.moddev\.mc\.(?:steamadvantage|poweradvantage)\b/.test(text), name); +} +const machines = `${java}/machines`; +for (const name of files(machines).filter(name => name.endsWith('Block.java'))) { + assert(/newBlockEntity\(net\.minecraft\.core\.BlockPos pos, BlockState state\)/.test(read(name)), name); + assert(/return new \w+TileEntity\(pos, state\)/.test(read(name)), name); +} +for (const file of ['Blocks', 'Items']) { + const text = read(`${java}/init/${file}.java`); + assert(text.includes('import zone.moddev.mc.basepower.init.ItemGroups;')); + assert(text.includes('.tab(ItemGroups.tab_powerAdvantage)')); +} +const migration = read(`${java}/migration/SteamLegacyMigrations.java`); +assert.match(migration, /LEGACY_MODID = "steamadvantage"/); +assert.match(migration, /registerNamespaceAlias\(LEGACY_MODID, SteamAdvantage.MODID\)/); +assert.match(migration, /registerTileEntityAliases\(id\(path\)\)/); +const entities = read(`${java}/init/Entities.java`); +assert(entities.includes('BlockEntityType.BlockEntitySupplier factory')); +const ids = [...entities.matchAll(/register\(event, "([^"]+)"/g)].map(match => match[1]); +assert.equal(ids.length, 12); +const pickaxe = json.get(`${resources}/data/minecraft/tags/blocks/mineable/pickaxe.json`); +assert.equal(pickaxe.replace, false); +assert.equal(new Set(pickaxe.values).size, 17); +for (const id of ids) assert(pickaxe.values.includes(`${mod}:${id}`), id); +for (const id of pickaxe.values.map(value => value.split(':')[1]).filter(id => !['drillbit', 'platform', 'pump_pipe_steam'].includes(id))) { + const loot = json.get(`${data}/loot_tables/blocks/${id}.json`); + assert.equal(loot.pools[0].entries[0].name, `${mod}:${id}`); +} +const tests = files('src/test/java').filter(name => name.endsWith('.java')); +const testCount = tests.reduce((sum, name) => sum + (read(name).match(/@Test\b/g) || []).length, 0); +console.log(`BASESTEAM_NATIVE117_SOURCE_PASS json=${json.size} java=${source.length} factories=${ids.length} harvest=${pickaxe.values.length} testMethods=${testCount}`); +console.log('Source checks only. Compilation, executed tests, packaged runtime and manual acceptance are separate.');