diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f6f963f4..7c208682 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -6,5 +6,25 @@ on: jobs: build: - uses: TwelveIterationMods/Workflows/.github/workflows/build.yml@v2 - secrets: inherit + runs-on: ubuntu-latest + strategy: + matrix: + loader: [fabric, forge, neoforge] + steps: + - name: Checkout repository + uses: actions/checkout@v3 + - name: Validate gradle wrapper + uses: gradle/wrapper-validation-action@v1 + - name: Setup JDK + uses: actions/setup-java@v3 + with: + java-version: 21 + distribution: temurin + - name: Make gradle wrapper executable + run: chmod +x ./gradlew + - name: Build + run: ./gradlew :${{ matrix.loader }}:build + env: + GPR_USERNAME: ${{secrets.GPR_USERNAME}} + GPR_TOKEN: ${{secrets.GPR_TOKEN}} + GPR_BUILD_NUMBER: ${{github.run_number}} \ No newline at end of file diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml new file mode 100644 index 00000000..38ac5aaf --- /dev/null +++ b/.github/workflows/publish-release.yml @@ -0,0 +1,78 @@ +name: publish-release +on: + workflow_dispatch: + inputs: + bump: + description: 'The bump in version for this release' + required: true + type: choice + default: patch + options: + - major + - minor + - patch + +jobs: + create-release: + runs-on: ubuntu-latest + outputs: + ref: v${{ steps.bump-version.outputs.version }} + version: ${{ steps.bump-version.outputs.version }} + steps: + - name: Checkout repository + uses: actions/checkout@v3 + - name: Extracting version from properties + shell: bash + run: echo "version=$(cat gradle.properties | grep -w "\bversion" | cut -d= -f2)" >> $GITHUB_OUTPUT + id: extract-version + - name: Bumping version + uses: TwelveIterationMods/bump-version@v1 + with: + version: ${{ steps.extract-version.outputs.version }} + bump: ${{ inputs.bump }} + id: bump-version + - name: Updating version properties + run: | + sed -i "s/^\s*version\s*=.*/version = ${{ steps.bump-version.outputs.version }}/g" gradle.properties + git config user.name "GitHub Actions" + git config user.email "<>" + git commit -am "Set version to ${{ steps.bump-version.outputs.version }}" + git push origin ${BRANCH_NAME} + git tag -a "v${{ steps.bump-version.outputs.version }}" -m "Release ${{ steps.bump-version.outputs.version }}" + git push origin "v${{ steps.bump-version.outputs.version }}" + shell: bash + env: + BRANCH_NAME: ${{ github.head_ref || github.ref_name }} + publish-release: + runs-on: ubuntu-latest + permissions: + packages: write + strategy: + matrix: + loader: [ common, fabric, forge, neoforge ] + site: [ curseforge, modrinth, publish ] + exclude: + - loader: common + site: curseforge + - loader: common + site: modrinth + steps: + - name: Checkout repository + uses: actions/checkout@v3 + with: + ref: ${{ needs.create-release.outputs.ref }} + - name: Validate gradle wrapper + uses: gradle/wrapper-validation-action@v1 + - name: Setup JDK + uses: actions/setup-java@v3 + with: + java-version: 21 + distribution: temurin + - name: Make gradle wrapper executable + run: chmod +x ./gradlew + - name: Publish + run: ./gradlew :${{ matrix.loader }}:${{ matrix.site }} '-Pversion=${{needs.create-release.outputs.version}}' '-PtwelveIterationsNexusUsername=${{ secrets.NEXUS_USER }}' '-PtwelveIterationsNexusPassword=${{ secrets.NEXUS_PASSWORD }}' + env: + CURSEFORGE_TOKEN: ${{secrets.CURSEFORGE_TOKEN}} + MODRINTH_TOKEN: ${{secrets.MODRINTH_TOKEN}} + needs: create-release \ No newline at end of file diff --git a/.github/workflows/publish-snapshot.yml b/.github/workflows/publish-snapshot.yml new file mode 100644 index 00000000..9b366875 --- /dev/null +++ b/.github/workflows/publish-snapshot.yml @@ -0,0 +1,38 @@ +name: publish-snapshot +on: + push: + tags: + - '*' + +jobs: + publish-snapshot: + runs-on: ubuntu-latest + permissions: + packages: write + strategy: + matrix: + loader: [common, fabric, forge, neoforge] + steps: + - name: Checkout repository + uses: actions/checkout@v3 + - name: Validate gradle wrapper + uses: gradle/wrapper-validation-action@v1 + - name: Setup JDK + uses: actions/setup-java@v3 + with: + java-version: 21 + distribution: temurin + - name: Make gradle wrapper executable + run: chmod +x ./gradlew + - name: Extracting version from properties + shell: bash + run: echo "version=$(cat gradle.properties | grep -w "\bversion" | cut -d= -f2)" >> $GITHUB_OUTPUT + id: extract-version + - name: Bumping version + uses: TwelveIterationMods/bump-version@v1 + with: + version: ${{ steps.extract-version.outputs.version }} + bump: minor + id: bump-version + - name: Publish + run: ./gradlew :${{ matrix.loader }}:publish '-Pversion=${{ steps.bump-version.outputs.version }}-SNAPSHOT' '-PtwelveIterationsNexusUsername=${{ secrets.NEXUS_USER }}' '-PtwelveIterationsNexusPassword=${{ secrets.NEXUS_PASSWORD }}' \ No newline at end of file diff --git a/.gitignore b/.gitignore index 205974a0..b0b24114 100644 --- a/.gitignore +++ b/.gitignore @@ -24,4 +24,4 @@ runs runserver logs -shared/src/generated/resources/.cache \ No newline at end of file +common/src/generated/resources/.cache \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index cbc9b5d1..14cd3dfc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +Updated to Minecraft 1.20.6 + - Fixed deepslate waystones using wrong sounds - Fixed error when breaking portstones - Fixed error in JEI compatibility diff --git a/build.gradle b/build.gradle index 77dde715..40bf5891 100644 --- a/build.gradle +++ b/build.gradle @@ -1,5 +1,5 @@ plugins { - id 'fabric-loom' version '1.4-SNAPSHOT' apply(false) + id 'fabric-loom' version '1.6-SNAPSHOT' apply(false) // id 'org.spongepowered.gradle.vanilla' version '0.2.1-SNAPSHOT' apply(false) // this causes ForgeGradle to fail in reobf id "org.jetbrains.gradle.plugin.idea-ext" version "1.1.7" // this is required for VanillaGradle and NeoForge to exist in harmony id 'org.spongepowered.mixin' version '0.7-SNAPSHOT' apply(false) @@ -8,87 +8,10 @@ plugins { } subprojects { - apply plugin: 'java' - - java.toolchain.languageVersion = JavaLanguageVersion.of(java_version) - java.withSourcesJar() - java.withJavadocJar() - - jar { - from(rootProject.file("LICENSE")) { - rename { "${it}_${mod_id}" } - } - manifest { - attributes([ - "Specification-Title" : mod_id, - "Specification-Vendor" : "BlayTheNinth", - "Specification-Version" : project.jar.archiveVersion, - "Implementation-Title" : project.name, - "Implementation-Version" : project.jar.archiveVersion, - "Implementation-Vendor" : "BlayTheNinth" - ]) - } - } - - sourcesJar { - from(rootProject.file("LICENSE")) { - rename { "${it}_${mod_id}" } - } - } - - repositories { - mavenCentral() - - maven { url "https://maven.twelveiterations.com/repository/maven-public/" } - } - - apply from: rootProject.file('repositories.gradle') - - tasks.withType(JavaCompile).configureEach { - it.options.encoding = 'UTF-8' - it.options.getRelease().set(java_version.toInteger()) - } - - tasks.withType(Javadoc).configureEach { - failOnError false - } - - processResources { - def expandProps = [ - "version": version, - "group": project.group, //Else we target the task's group. - "minecraft_version": minecraft_version, - "forge_version": forge_version, - "forge_loader_version_range": forge_loader_version_range, - "forge_version_range": forge_version_range, - "minecraft_version_range": minecraft_version_range, - "fabric_version": fabric_version, - "fabric_loader_version": fabric_loader_version, - "mod_name": mod_name, - "mod_main": mod_main, - "mod_id": mod_id, - "homepage": homepage, - "issues": issues, - "sources": sources, - "license": license, - "description": project.description, - "neoforge_version": neoforge_version, - "neoforge_version_range": neoforge_version_range, - "neoforge_loader_version_range": neoforge_loader_version_range, - "balm_version_range": balm_version_range, - "pack_format_number": pack_format_number - ] - - filesMatching(['pack.mcmeta', 'fabric.mod.json', 'META-INF/mods.toml', '*.mixins.json']) { - expand expandProps - } - inputs.properties(expandProps) - } - - // Disables Gradle's custom module metadata from being published to maven. The - // metadata includes mapped dependencies which are not reasonably consumable by - // other mod developers. - tasks.withType(GenerateModuleMetadata).configureEach { - enabled = false - } + configurations.all { + resolutionStrategy { + cacheChangingModulesFor 60, 'seconds' + cacheDynamicVersionsFor 60, 'seconds' + } + } } \ No newline at end of file diff --git a/buildSrc/build.gradle b/buildSrc/build.gradle new file mode 100644 index 00000000..1957c339 --- /dev/null +++ b/buildSrc/build.gradle @@ -0,0 +1,3 @@ +plugins { + id 'groovy-gradle-plugin' +} \ No newline at end of file diff --git a/buildSrc/src/main/groovy/multiloader-common.gradle b/buildSrc/src/main/groovy/multiloader-common.gradle new file mode 100644 index 00000000..eae07504 --- /dev/null +++ b/buildSrc/src/main/groovy/multiloader-common.gradle @@ -0,0 +1,123 @@ +plugins { + id 'java-library' + id 'maven-publish' +} + +base { + archivesName = "${mod_id}-${project.name}" + version = "${version}+${minecraft_version}" +} + +java { + toolchain.languageVersion = JavaLanguageVersion.of(java_version) + withSourcesJar() + withJavadocJar() +} + +repositories { + mavenCentral() + // https://docs.gradle.org/current/userguide/declaring_repositories.html#declaring_content_exclusively_found_in_one_repository + exclusiveContent { + forRepository { + maven { + name = 'Sponge' + url = 'https://repo.spongepowered.org/repository/maven-public' + } + } + filter { includeGroupAndSubgroups("org.spongepowered") } + } + maven { url "https://maven.twelveiterations.com/repository/maven-public/" } +} + +dependencies { + implementation 'org.jetbrains:annotations:24.1.0' +} + +// Declare capabilities on the outgoing configurations. +// Read more about capabilities here: https://docs.gradle.org/current/userguide/component_capabilities.html#sec:declaring-additional-capabilities-for-a-local-component +['apiElements', 'runtimeElements', 'sourcesElements', 'javadocElements'].each { variant -> + configurations."$variant".outgoing { + capability("$group:$mod_id-${project.name}:$version") + capability("$group:$mod_id:$version") + } + publishing.publications.configureEach { + suppressPomMetadataWarningsFor(variant) + } +} + +sourcesJar { + from(rootProject.file("LICENSE")) { + rename { "${it}_${mod_name}" } + } +} + +jar { + from(rootProject.file("LICENSE")) { + rename { "${it}_${mod_name}" } + } + + manifest { + attributes([ + 'Specification-Title' : mod_name, + 'Specification-Vendor' : mod_author, + 'Specification-Version' : project.jar.archiveVersion, + 'Implementation-Title' : project.name, + 'Implementation-Version': project.jar.archiveVersion, + 'Implementation-Vendor' : mod_author, + 'Built-On-Minecraft' : minecraft_version + ]) + } +} + +processResources { + def expandProps = [ + "version": version, + "group": project.group, //Else we target the task's group. + "minecraft_version": minecraft_version, + "forge_version": forge_version, + "forge_loader_version_range": forge_loader_version_range, + "forge_version_range": forge_version_range, + "minecraft_version_range": minecraft_version_range, + "fabric_version": fabric_version, + "fabric_loader_version": fabric_loader_version, + "mod_name": mod_name, + "mod_author": mod_author, + "mod_id": mod_id, + "license": license, + "description": project.description, + "neoforge_version": neoforge_version, + "neoforge_version_range": neoforge_version_range, + "neoforge_loader_version_range": neoforge_loader_version_range, + "credits": credits, + "java_version": java_version, + "pack_format_number": pack_format_number, + "homepage": homepage, + "issues": issues, + "sources": sources, + "balm_version_range": balm_version_range, + ] + + filesMatching(['pack.mcmeta', 'fabric.mod.json', 'META-INF/mods.toml', 'META-INF/neoforge.mods.toml', '*.mixins.json']) { + expand expandProps + } + inputs.properties(expandProps) +} + +publishing { + publications { + register('mavenJava', MavenPublication) { + version = project.version + (!project.version.endsWith("SNAPSHOT") ? "+" + minecraft_version : "") + artifactId base.archivesName.get() + from components.java + } + } + repositories { + maven { + var releasesRepoUrl = "https://maven.twelveiterations.com/repository/maven-releases/" + var snapshotsRepoUrl = "https://maven.twelveiterations.com/repository/maven-snapshots/" + url = uri(version.toString().endsWith("SNAPSHOT") ? snapshotsRepoUrl : releasesRepoUrl) + name = "twelveIterationsNexus" + credentials(PasswordCredentials) + } + } +} \ No newline at end of file diff --git a/buildSrc/src/main/groovy/multiloader-loader.gradle b/buildSrc/src/main/groovy/multiloader-loader.gradle new file mode 100644 index 00000000..dc8ed7c4 --- /dev/null +++ b/buildSrc/src/main/groovy/multiloader-loader.gradle @@ -0,0 +1,52 @@ +plugins { + id 'multiloader-common' +} + +configurations { + commonJava { + canBeResolved = true + } + commonResources { + canBeResolved = true + } + commonGeneratedResources { + canBeResolved = true + } +} + +dependencies { + compileOnly(project(':common')) { + capabilities { + requireCapability "$group:$mod_id" + } + } + commonJava project(path: ':common', configuration: 'commonJava') + commonResources project(path: ':common', configuration: 'commonResources') + commonGeneratedResources project(path: ':common', configuration: 'commonGeneratedResources') +} + +tasks.named('compileJava', JavaCompile) { + dependsOn(configurations.commonJava) + source(configurations.commonJava) +} + +processResources { + dependsOn(configurations.commonResources) + dependsOn(configurations.commonGeneratedResources) + from(configurations.commonResources) + from(configurations.commonGeneratedResources) +} + +tasks.named('javadoc', Javadoc).configure { + dependsOn(configurations.commonJava) + source(configurations.commonJava) +} + +tasks.named("sourcesJar", Jar) { + dependsOn(configurations.commonJava) + from(configurations.commonJava) + dependsOn(configurations.commonResources) + from(configurations.commonResources) + dependsOn(configurations.commonGeneratedResources) + from(configurations.commonGeneratedResources) +} \ No newline at end of file diff --git a/common/build.gradle b/common/build.gradle new file mode 100644 index 00000000..f0d5fe89 --- /dev/null +++ b/common/build.gradle @@ -0,0 +1,60 @@ +plugins { + id 'multiloader-common' + id 'org.spongepowered.gradle.vanilla' version '0.2.1-SNAPSHOT' +} + +base { + archivesName = "${mod_id}-common-${minecraft_version}" +} + +minecraft { + version(minecraft_version) + def aw = file("src/main/resources/${mod_id}.accesswidener") + if (aw.exists()) { + accessWideners(aw) + } +} + +dependencies { + compileOnly "org.spongepowered:mixin:$mixin_version" +} + +apply from: rootProject.file('repositories.gradle') +apply from: 'dependencies.gradle' + +configurations { + commonJava { + canBeResolved = false + canBeConsumed = true + } + commonResources { + canBeResolved = false + canBeConsumed = true + } + commonGeneratedResources { + canBeResolved = false + canBeConsumed = true + } +} + +sourceSets { + generated { + resources { + srcDir 'src/generated/resources' + } + } +} + +artifacts { + commonJava sourceSets.main.java.sourceDirectories.singleFile + commonResources sourceSets.main.resources.sourceDirectories.singleFile + commonGeneratedResources sourceSets.generated.resources.sourceDirectories.singleFile +} + +sourceSets { + main { + java { + srcDir 'src/shell/java' + } + } +} \ No newline at end of file diff --git a/shared/dependencies.gradle b/common/dependencies.gradle similarity index 74% rename from shared/dependencies.gradle rename to common/dependencies.gradle index 5a17bb81..2fd2a1c6 100644 --- a/shared/dependencies.gradle +++ b/common/dependencies.gradle @@ -1,4 +1,7 @@ dependencies { + implementation("net.blay09.mods:balm-common:${balm_version}") { + changing = balm_version.endsWith("SNAPSHOT") + } compileOnly "info.journeymap:journeymap-api:${journeymap_api_common_version}" compileOnly "mcp.mobius.waila:wthit-api:mojmap-$wthit_version" compileOnly "mezz.jei:jei-$jei_minecraft_version-common-api:$jei_version" diff --git a/shared/src/generated/resources/assets/waystones/blockstates/black_sharestone.json b/common/src/generated/resources/assets/waystones/blockstates/black_sharestone.json similarity index 100% rename from shared/src/generated/resources/assets/waystones/blockstates/black_sharestone.json rename to common/src/generated/resources/assets/waystones/blockstates/black_sharestone.json diff --git a/shared/src/generated/resources/assets/waystones/blockstates/blackstone_waystone.json b/common/src/generated/resources/assets/waystones/blockstates/blackstone_waystone.json similarity index 100% rename from shared/src/generated/resources/assets/waystones/blockstates/blackstone_waystone.json rename to common/src/generated/resources/assets/waystones/blockstates/blackstone_waystone.json diff --git a/shared/src/generated/resources/assets/waystones/blockstates/blue_sharestone.json b/common/src/generated/resources/assets/waystones/blockstates/blue_sharestone.json similarity index 100% rename from shared/src/generated/resources/assets/waystones/blockstates/blue_sharestone.json rename to common/src/generated/resources/assets/waystones/blockstates/blue_sharestone.json diff --git a/shared/src/generated/resources/assets/waystones/blockstates/brown_sharestone.json b/common/src/generated/resources/assets/waystones/blockstates/brown_sharestone.json similarity index 100% rename from shared/src/generated/resources/assets/waystones/blockstates/brown_sharestone.json rename to common/src/generated/resources/assets/waystones/blockstates/brown_sharestone.json diff --git a/shared/src/generated/resources/assets/waystones/blockstates/cyan_sharestone.json b/common/src/generated/resources/assets/waystones/blockstates/cyan_sharestone.json similarity index 100% rename from shared/src/generated/resources/assets/waystones/blockstates/cyan_sharestone.json rename to common/src/generated/resources/assets/waystones/blockstates/cyan_sharestone.json diff --git a/shared/src/generated/resources/assets/waystones/blockstates/deepslate_waystone.json b/common/src/generated/resources/assets/waystones/blockstates/deepslate_waystone.json similarity index 100% rename from shared/src/generated/resources/assets/waystones/blockstates/deepslate_waystone.json rename to common/src/generated/resources/assets/waystones/blockstates/deepslate_waystone.json diff --git a/shared/src/generated/resources/assets/waystones/blockstates/end_stone_waystone.json b/common/src/generated/resources/assets/waystones/blockstates/end_stone_waystone.json similarity index 100% rename from shared/src/generated/resources/assets/waystones/blockstates/end_stone_waystone.json rename to common/src/generated/resources/assets/waystones/blockstates/end_stone_waystone.json diff --git a/shared/src/generated/resources/assets/waystones/blockstates/gray_sharestone.json b/common/src/generated/resources/assets/waystones/blockstates/gray_sharestone.json similarity index 100% rename from shared/src/generated/resources/assets/waystones/blockstates/gray_sharestone.json rename to common/src/generated/resources/assets/waystones/blockstates/gray_sharestone.json diff --git a/shared/src/generated/resources/assets/waystones/blockstates/green_sharestone.json b/common/src/generated/resources/assets/waystones/blockstates/green_sharestone.json similarity index 100% rename from shared/src/generated/resources/assets/waystones/blockstates/green_sharestone.json rename to common/src/generated/resources/assets/waystones/blockstates/green_sharestone.json diff --git a/shared/src/generated/resources/assets/waystones/blockstates/landing_stone.json b/common/src/generated/resources/assets/waystones/blockstates/landing_stone.json similarity index 100% rename from shared/src/generated/resources/assets/waystones/blockstates/landing_stone.json rename to common/src/generated/resources/assets/waystones/blockstates/landing_stone.json diff --git a/shared/src/generated/resources/assets/waystones/blockstates/light_blue_sharestone.json b/common/src/generated/resources/assets/waystones/blockstates/light_blue_sharestone.json similarity index 100% rename from shared/src/generated/resources/assets/waystones/blockstates/light_blue_sharestone.json rename to common/src/generated/resources/assets/waystones/blockstates/light_blue_sharestone.json diff --git a/shared/src/generated/resources/assets/waystones/blockstates/light_gray_sharestone.json b/common/src/generated/resources/assets/waystones/blockstates/light_gray_sharestone.json similarity index 100% rename from shared/src/generated/resources/assets/waystones/blockstates/light_gray_sharestone.json rename to common/src/generated/resources/assets/waystones/blockstates/light_gray_sharestone.json diff --git a/shared/src/generated/resources/assets/waystones/blockstates/lime_sharestone.json b/common/src/generated/resources/assets/waystones/blockstates/lime_sharestone.json similarity index 100% rename from shared/src/generated/resources/assets/waystones/blockstates/lime_sharestone.json rename to common/src/generated/resources/assets/waystones/blockstates/lime_sharestone.json diff --git a/shared/src/generated/resources/assets/waystones/blockstates/magenta_sharestone.json b/common/src/generated/resources/assets/waystones/blockstates/magenta_sharestone.json similarity index 100% rename from shared/src/generated/resources/assets/waystones/blockstates/magenta_sharestone.json rename to common/src/generated/resources/assets/waystones/blockstates/magenta_sharestone.json diff --git a/shared/src/generated/resources/assets/waystones/blockstates/mossy_waystone.json b/common/src/generated/resources/assets/waystones/blockstates/mossy_waystone.json similarity index 100% rename from shared/src/generated/resources/assets/waystones/blockstates/mossy_waystone.json rename to common/src/generated/resources/assets/waystones/blockstates/mossy_waystone.json diff --git a/shared/src/generated/resources/assets/waystones/blockstates/orange_sharestone.json b/common/src/generated/resources/assets/waystones/blockstates/orange_sharestone.json similarity index 100% rename from shared/src/generated/resources/assets/waystones/blockstates/orange_sharestone.json rename to common/src/generated/resources/assets/waystones/blockstates/orange_sharestone.json diff --git a/shared/src/generated/resources/assets/waystones/blockstates/pink_sharestone.json b/common/src/generated/resources/assets/waystones/blockstates/pink_sharestone.json similarity index 100% rename from shared/src/generated/resources/assets/waystones/blockstates/pink_sharestone.json rename to common/src/generated/resources/assets/waystones/blockstates/pink_sharestone.json diff --git a/shared/src/generated/resources/assets/waystones/blockstates/portstone.json b/common/src/generated/resources/assets/waystones/blockstates/portstone.json similarity index 100% rename from shared/src/generated/resources/assets/waystones/blockstates/portstone.json rename to common/src/generated/resources/assets/waystones/blockstates/portstone.json diff --git a/shared/src/generated/resources/assets/waystones/blockstates/purple_sharestone.json b/common/src/generated/resources/assets/waystones/blockstates/purple_sharestone.json similarity index 100% rename from shared/src/generated/resources/assets/waystones/blockstates/purple_sharestone.json rename to common/src/generated/resources/assets/waystones/blockstates/purple_sharestone.json diff --git a/shared/src/generated/resources/assets/waystones/blockstates/red_sharestone.json b/common/src/generated/resources/assets/waystones/blockstates/red_sharestone.json similarity index 100% rename from shared/src/generated/resources/assets/waystones/blockstates/red_sharestone.json rename to common/src/generated/resources/assets/waystones/blockstates/red_sharestone.json diff --git a/shared/src/generated/resources/assets/waystones/blockstates/sandy_waystone.json b/common/src/generated/resources/assets/waystones/blockstates/sandy_waystone.json similarity index 100% rename from shared/src/generated/resources/assets/waystones/blockstates/sandy_waystone.json rename to common/src/generated/resources/assets/waystones/blockstates/sandy_waystone.json diff --git a/shared/src/generated/resources/assets/waystones/blockstates/sharestone.json b/common/src/generated/resources/assets/waystones/blockstates/sharestone.json similarity index 100% rename from shared/src/generated/resources/assets/waystones/blockstates/sharestone.json rename to common/src/generated/resources/assets/waystones/blockstates/sharestone.json diff --git a/shared/src/generated/resources/assets/waystones/blockstates/warp_plate.json b/common/src/generated/resources/assets/waystones/blockstates/warp_plate.json similarity index 100% rename from shared/src/generated/resources/assets/waystones/blockstates/warp_plate.json rename to common/src/generated/resources/assets/waystones/blockstates/warp_plate.json diff --git a/shared/src/generated/resources/assets/waystones/blockstates/waystone.json b/common/src/generated/resources/assets/waystones/blockstates/waystone.json similarity index 100% rename from shared/src/generated/resources/assets/waystones/blockstates/waystone.json rename to common/src/generated/resources/assets/waystones/blockstates/waystone.json diff --git a/shared/src/generated/resources/assets/waystones/blockstates/white_sharestone.json b/common/src/generated/resources/assets/waystones/blockstates/white_sharestone.json similarity index 100% rename from shared/src/generated/resources/assets/waystones/blockstates/white_sharestone.json rename to common/src/generated/resources/assets/waystones/blockstates/white_sharestone.json diff --git a/shared/src/generated/resources/assets/waystones/blockstates/yellow_sharestone.json b/common/src/generated/resources/assets/waystones/blockstates/yellow_sharestone.json similarity index 100% rename from shared/src/generated/resources/assets/waystones/blockstates/yellow_sharestone.json rename to common/src/generated/resources/assets/waystones/blockstates/yellow_sharestone.json diff --git a/shared/src/generated/resources/assets/waystones/models/item/attuned_shard.json b/common/src/generated/resources/assets/waystones/models/item/attuned_shard.json similarity index 100% rename from shared/src/generated/resources/assets/waystones/models/item/attuned_shard.json rename to common/src/generated/resources/assets/waystones/models/item/attuned_shard.json diff --git a/shared/src/generated/resources/assets/waystones/models/item/black_sharestone.json b/common/src/generated/resources/assets/waystones/models/item/black_sharestone.json similarity index 100% rename from shared/src/generated/resources/assets/waystones/models/item/black_sharestone.json rename to common/src/generated/resources/assets/waystones/models/item/black_sharestone.json diff --git a/shared/src/generated/resources/assets/waystones/models/item/blue_sharestone.json b/common/src/generated/resources/assets/waystones/models/item/blue_sharestone.json similarity index 100% rename from shared/src/generated/resources/assets/waystones/models/item/blue_sharestone.json rename to common/src/generated/resources/assets/waystones/models/item/blue_sharestone.json diff --git a/shared/src/generated/resources/assets/waystones/models/item/bound_scroll.json b/common/src/generated/resources/assets/waystones/models/item/bound_scroll.json similarity index 100% rename from shared/src/generated/resources/assets/waystones/models/item/bound_scroll.json rename to common/src/generated/resources/assets/waystones/models/item/bound_scroll.json diff --git a/shared/src/generated/resources/assets/waystones/models/item/brown_sharestone.json b/common/src/generated/resources/assets/waystones/models/item/brown_sharestone.json similarity index 100% rename from shared/src/generated/resources/assets/waystones/models/item/brown_sharestone.json rename to common/src/generated/resources/assets/waystones/models/item/brown_sharestone.json diff --git a/shared/src/generated/resources/assets/waystones/models/item/crumbling_attuned_shard.json b/common/src/generated/resources/assets/waystones/models/item/crumbling_attuned_shard.json similarity index 100% rename from shared/src/generated/resources/assets/waystones/models/item/crumbling_attuned_shard.json rename to common/src/generated/resources/assets/waystones/models/item/crumbling_attuned_shard.json diff --git a/shared/src/generated/resources/assets/waystones/models/item/cyan_sharestone.json b/common/src/generated/resources/assets/waystones/models/item/cyan_sharestone.json similarity index 100% rename from shared/src/generated/resources/assets/waystones/models/item/cyan_sharestone.json rename to common/src/generated/resources/assets/waystones/models/item/cyan_sharestone.json diff --git a/shared/src/generated/resources/assets/waystones/models/item/gray_sharestone.json b/common/src/generated/resources/assets/waystones/models/item/gray_sharestone.json similarity index 100% rename from shared/src/generated/resources/assets/waystones/models/item/gray_sharestone.json rename to common/src/generated/resources/assets/waystones/models/item/gray_sharestone.json diff --git a/shared/src/generated/resources/assets/waystones/models/item/green_sharestone.json b/common/src/generated/resources/assets/waystones/models/item/green_sharestone.json similarity index 100% rename from shared/src/generated/resources/assets/waystones/models/item/green_sharestone.json rename to common/src/generated/resources/assets/waystones/models/item/green_sharestone.json diff --git a/shared/src/generated/resources/assets/waystones/models/item/landing_stone.json b/common/src/generated/resources/assets/waystones/models/item/landing_stone.json similarity index 100% rename from shared/src/generated/resources/assets/waystones/models/item/landing_stone.json rename to common/src/generated/resources/assets/waystones/models/item/landing_stone.json diff --git a/shared/src/generated/resources/assets/waystones/models/item/light_blue_sharestone.json b/common/src/generated/resources/assets/waystones/models/item/light_blue_sharestone.json similarity index 100% rename from shared/src/generated/resources/assets/waystones/models/item/light_blue_sharestone.json rename to common/src/generated/resources/assets/waystones/models/item/light_blue_sharestone.json diff --git a/shared/src/generated/resources/assets/waystones/models/item/light_gray_sharestone.json b/common/src/generated/resources/assets/waystones/models/item/light_gray_sharestone.json similarity index 100% rename from shared/src/generated/resources/assets/waystones/models/item/light_gray_sharestone.json rename to common/src/generated/resources/assets/waystones/models/item/light_gray_sharestone.json diff --git a/shared/src/generated/resources/assets/waystones/models/item/lime_sharestone.json b/common/src/generated/resources/assets/waystones/models/item/lime_sharestone.json similarity index 100% rename from shared/src/generated/resources/assets/waystones/models/item/lime_sharestone.json rename to common/src/generated/resources/assets/waystones/models/item/lime_sharestone.json diff --git a/shared/src/generated/resources/assets/waystones/models/item/magenta_sharestone.json b/common/src/generated/resources/assets/waystones/models/item/magenta_sharestone.json similarity index 100% rename from shared/src/generated/resources/assets/waystones/models/item/magenta_sharestone.json rename to common/src/generated/resources/assets/waystones/models/item/magenta_sharestone.json diff --git a/shared/src/generated/resources/assets/waystones/models/item/orange_sharestone.json b/common/src/generated/resources/assets/waystones/models/item/orange_sharestone.json similarity index 100% rename from shared/src/generated/resources/assets/waystones/models/item/orange_sharestone.json rename to common/src/generated/resources/assets/waystones/models/item/orange_sharestone.json diff --git a/shared/src/generated/resources/assets/waystones/models/item/pink_sharestone.json b/common/src/generated/resources/assets/waystones/models/item/pink_sharestone.json similarity index 100% rename from shared/src/generated/resources/assets/waystones/models/item/pink_sharestone.json rename to common/src/generated/resources/assets/waystones/models/item/pink_sharestone.json diff --git a/shared/src/generated/resources/assets/waystones/models/item/purple_sharestone.json b/common/src/generated/resources/assets/waystones/models/item/purple_sharestone.json similarity index 100% rename from shared/src/generated/resources/assets/waystones/models/item/purple_sharestone.json rename to common/src/generated/resources/assets/waystones/models/item/purple_sharestone.json diff --git a/shared/src/generated/resources/assets/waystones/models/item/red_sharestone.json b/common/src/generated/resources/assets/waystones/models/item/red_sharestone.json similarity index 100% rename from shared/src/generated/resources/assets/waystones/models/item/red_sharestone.json rename to common/src/generated/resources/assets/waystones/models/item/red_sharestone.json diff --git a/shared/src/generated/resources/assets/waystones/models/item/return_scroll.json b/common/src/generated/resources/assets/waystones/models/item/return_scroll.json similarity index 100% rename from shared/src/generated/resources/assets/waystones/models/item/return_scroll.json rename to common/src/generated/resources/assets/waystones/models/item/return_scroll.json diff --git a/shared/src/generated/resources/assets/waystones/models/item/warp_dust.json b/common/src/generated/resources/assets/waystones/models/item/warp_dust.json similarity index 100% rename from shared/src/generated/resources/assets/waystones/models/item/warp_dust.json rename to common/src/generated/resources/assets/waystones/models/item/warp_dust.json diff --git a/shared/src/generated/resources/assets/waystones/models/item/warp_plate.json b/common/src/generated/resources/assets/waystones/models/item/warp_plate.json similarity index 100% rename from shared/src/generated/resources/assets/waystones/models/item/warp_plate.json rename to common/src/generated/resources/assets/waystones/models/item/warp_plate.json diff --git a/shared/src/generated/resources/assets/waystones/models/item/warp_scroll.json b/common/src/generated/resources/assets/waystones/models/item/warp_scroll.json similarity index 100% rename from shared/src/generated/resources/assets/waystones/models/item/warp_scroll.json rename to common/src/generated/resources/assets/waystones/models/item/warp_scroll.json diff --git a/shared/src/generated/resources/assets/waystones/models/item/warp_stone.json b/common/src/generated/resources/assets/waystones/models/item/warp_stone.json similarity index 100% rename from shared/src/generated/resources/assets/waystones/models/item/warp_stone.json rename to common/src/generated/resources/assets/waystones/models/item/warp_stone.json diff --git a/shared/src/generated/resources/assets/waystones/models/item/white_sharestone.json b/common/src/generated/resources/assets/waystones/models/item/white_sharestone.json similarity index 100% rename from shared/src/generated/resources/assets/waystones/models/item/white_sharestone.json rename to common/src/generated/resources/assets/waystones/models/item/white_sharestone.json diff --git a/shared/src/generated/resources/assets/waystones/models/item/yellow_sharestone.json b/common/src/generated/resources/assets/waystones/models/item/yellow_sharestone.json similarity index 100% rename from shared/src/generated/resources/assets/waystones/models/item/yellow_sharestone.json rename to common/src/generated/resources/assets/waystones/models/item/yellow_sharestone.json diff --git a/shared/src/generated/resources/data/minecraft/tags/blocks/mineable/pickaxe.json b/common/src/generated/resources/data/minecraft/tags/blocks/mineable/pickaxe.json similarity index 97% rename from shared/src/generated/resources/data/minecraft/tags/blocks/mineable/pickaxe.json rename to common/src/generated/resources/data/minecraft/tags/blocks/mineable/pickaxe.json index 2b53f517..f20f9c52 100644 --- a/shared/src/generated/resources/data/minecraft/tags/blocks/mineable/pickaxe.json +++ b/common/src/generated/resources/data/minecraft/tags/blocks/mineable/pickaxe.json @@ -1,5 +1,4 @@ { - "replace": false, "values": [ "waystones:waystone", "waystones:sandy_waystone", diff --git a/shared/src/generated/resources/data/waystones/advancements/recipes/decorations/black_sharestone.json b/common/src/generated/resources/data/waystones/advancements/recipes/decorations/black_sharestone.json similarity index 92% rename from shared/src/generated/resources/data/waystones/advancements/recipes/decorations/black_sharestone.json rename to common/src/generated/resources/data/waystones/advancements/recipes/decorations/black_sharestone.json index ddc6098c..ed41b2db 100644 --- a/shared/src/generated/resources/data/waystones/advancements/recipes/decorations/black_sharestone.json +++ b/common/src/generated/resources/data/waystones/advancements/recipes/decorations/black_sharestone.json @@ -5,7 +5,7 @@ "conditions": { "items": [ { - "tag": "waystones:sharestones" + "items": "#waystones:sharestones" } ] }, diff --git a/shared/src/generated/resources/data/waystones/advancements/recipes/decorations/blackstone_waystone.json b/common/src/generated/resources/data/waystones/advancements/recipes/decorations/blackstone_waystone.json similarity index 88% rename from shared/src/generated/resources/data/waystones/advancements/recipes/decorations/blackstone_waystone.json rename to common/src/generated/resources/data/waystones/advancements/recipes/decorations/blackstone_waystone.json index 34e34ce1..532f64f3 100644 --- a/shared/src/generated/resources/data/waystones/advancements/recipes/decorations/blackstone_waystone.json +++ b/common/src/generated/resources/data/waystones/advancements/recipes/decorations/blackstone_waystone.json @@ -11,9 +11,7 @@ "conditions": { "items": [ { - "items": [ - "waystones:warp_stone" - ] + "items": "waystones:warp_stone" } ] }, diff --git a/shared/src/generated/resources/data/waystones/advancements/recipes/decorations/blue_sharestone.json b/common/src/generated/resources/data/waystones/advancements/recipes/decorations/blue_sharestone.json similarity index 92% rename from shared/src/generated/resources/data/waystones/advancements/recipes/decorations/blue_sharestone.json rename to common/src/generated/resources/data/waystones/advancements/recipes/decorations/blue_sharestone.json index 3f636a59..eedc89b5 100644 --- a/shared/src/generated/resources/data/waystones/advancements/recipes/decorations/blue_sharestone.json +++ b/common/src/generated/resources/data/waystones/advancements/recipes/decorations/blue_sharestone.json @@ -5,7 +5,7 @@ "conditions": { "items": [ { - "tag": "waystones:sharestones" + "items": "#waystones:sharestones" } ] }, diff --git a/shared/src/generated/resources/data/waystones/advancements/recipes/decorations/brown_sharestone.json b/common/src/generated/resources/data/waystones/advancements/recipes/decorations/brown_sharestone.json similarity index 92% rename from shared/src/generated/resources/data/waystones/advancements/recipes/decorations/brown_sharestone.json rename to common/src/generated/resources/data/waystones/advancements/recipes/decorations/brown_sharestone.json index a7c41ed7..0268df9f 100644 --- a/shared/src/generated/resources/data/waystones/advancements/recipes/decorations/brown_sharestone.json +++ b/common/src/generated/resources/data/waystones/advancements/recipes/decorations/brown_sharestone.json @@ -5,7 +5,7 @@ "conditions": { "items": [ { - "tag": "waystones:sharestones" + "items": "#waystones:sharestones" } ] }, diff --git a/shared/src/generated/resources/data/waystones/advancements/recipes/decorations/cyan_sharestone.json b/common/src/generated/resources/data/waystones/advancements/recipes/decorations/cyan_sharestone.json similarity index 92% rename from shared/src/generated/resources/data/waystones/advancements/recipes/decorations/cyan_sharestone.json rename to common/src/generated/resources/data/waystones/advancements/recipes/decorations/cyan_sharestone.json index b07938bf..f499bfa6 100644 --- a/shared/src/generated/resources/data/waystones/advancements/recipes/decorations/cyan_sharestone.json +++ b/common/src/generated/resources/data/waystones/advancements/recipes/decorations/cyan_sharestone.json @@ -5,7 +5,7 @@ "conditions": { "items": [ { - "tag": "waystones:sharestones" + "items": "#waystones:sharestones" } ] }, diff --git a/shared/src/generated/resources/data/waystones/advancements/recipes/decorations/deepslate_waystone.json b/common/src/generated/resources/data/waystones/advancements/recipes/decorations/deepslate_waystone.json similarity index 87% rename from shared/src/generated/resources/data/waystones/advancements/recipes/decorations/deepslate_waystone.json rename to common/src/generated/resources/data/waystones/advancements/recipes/decorations/deepslate_waystone.json index 125d634a..6b47a9c1 100644 --- a/shared/src/generated/resources/data/waystones/advancements/recipes/decorations/deepslate_waystone.json +++ b/common/src/generated/resources/data/waystones/advancements/recipes/decorations/deepslate_waystone.json @@ -11,9 +11,7 @@ "conditions": { "items": [ { - "items": [ - "waystones:warp_stone" - ] + "items": "waystones:warp_stone" } ] }, diff --git a/shared/src/generated/resources/data/waystones/advancements/recipes/decorations/end_stone_waystone.json b/common/src/generated/resources/data/waystones/advancements/recipes/decorations/end_stone_waystone.json similarity index 87% rename from shared/src/generated/resources/data/waystones/advancements/recipes/decorations/end_stone_waystone.json rename to common/src/generated/resources/data/waystones/advancements/recipes/decorations/end_stone_waystone.json index aeec3cff..b6c0a560 100644 --- a/shared/src/generated/resources/data/waystones/advancements/recipes/decorations/end_stone_waystone.json +++ b/common/src/generated/resources/data/waystones/advancements/recipes/decorations/end_stone_waystone.json @@ -11,9 +11,7 @@ "conditions": { "items": [ { - "items": [ - "waystones:warp_stone" - ] + "items": "waystones:warp_stone" } ] }, diff --git a/shared/src/generated/resources/data/waystones/advancements/recipes/decorations/gray_sharestone.json b/common/src/generated/resources/data/waystones/advancements/recipes/decorations/gray_sharestone.json similarity index 92% rename from shared/src/generated/resources/data/waystones/advancements/recipes/decorations/gray_sharestone.json rename to common/src/generated/resources/data/waystones/advancements/recipes/decorations/gray_sharestone.json index c764a661..80250e08 100644 --- a/shared/src/generated/resources/data/waystones/advancements/recipes/decorations/gray_sharestone.json +++ b/common/src/generated/resources/data/waystones/advancements/recipes/decorations/gray_sharestone.json @@ -5,7 +5,7 @@ "conditions": { "items": [ { - "tag": "waystones:sharestones" + "items": "#waystones:sharestones" } ] }, diff --git a/shared/src/generated/resources/data/waystones/advancements/recipes/decorations/green_sharestone.json b/common/src/generated/resources/data/waystones/advancements/recipes/decorations/green_sharestone.json similarity index 92% rename from shared/src/generated/resources/data/waystones/advancements/recipes/decorations/green_sharestone.json rename to common/src/generated/resources/data/waystones/advancements/recipes/decorations/green_sharestone.json index a8d0f7bc..665dc914 100644 --- a/shared/src/generated/resources/data/waystones/advancements/recipes/decorations/green_sharestone.json +++ b/common/src/generated/resources/data/waystones/advancements/recipes/decorations/green_sharestone.json @@ -5,7 +5,7 @@ "conditions": { "items": [ { - "tag": "waystones:sharestones" + "items": "#waystones:sharestones" } ] }, diff --git a/shared/src/generated/resources/data/waystones/advancements/recipes/decorations/landing_stone.json b/common/src/generated/resources/data/waystones/advancements/recipes/decorations/landing_stone.json similarity index 87% rename from shared/src/generated/resources/data/waystones/advancements/recipes/decorations/landing_stone.json rename to common/src/generated/resources/data/waystones/advancements/recipes/decorations/landing_stone.json index b0101011..1fe7f7fb 100644 --- a/shared/src/generated/resources/data/waystones/advancements/recipes/decorations/landing_stone.json +++ b/common/src/generated/resources/data/waystones/advancements/recipes/decorations/landing_stone.json @@ -11,9 +11,7 @@ "conditions": { "items": [ { - "items": [ - "waystones:warp_dust" - ] + "items": "waystones:warp_dust" } ] }, diff --git a/shared/src/generated/resources/data/waystones/advancements/recipes/decorations/light_blue_sharestone.json b/common/src/generated/resources/data/waystones/advancements/recipes/decorations/light_blue_sharestone.json similarity index 92% rename from shared/src/generated/resources/data/waystones/advancements/recipes/decorations/light_blue_sharestone.json rename to common/src/generated/resources/data/waystones/advancements/recipes/decorations/light_blue_sharestone.json index 642ea9c3..3b8989db 100644 --- a/shared/src/generated/resources/data/waystones/advancements/recipes/decorations/light_blue_sharestone.json +++ b/common/src/generated/resources/data/waystones/advancements/recipes/decorations/light_blue_sharestone.json @@ -5,7 +5,7 @@ "conditions": { "items": [ { - "tag": "waystones:sharestones" + "items": "#waystones:sharestones" } ] }, diff --git a/shared/src/generated/resources/data/waystones/advancements/recipes/decorations/light_gray_sharestone.json b/common/src/generated/resources/data/waystones/advancements/recipes/decorations/light_gray_sharestone.json similarity index 92% rename from shared/src/generated/resources/data/waystones/advancements/recipes/decorations/light_gray_sharestone.json rename to common/src/generated/resources/data/waystones/advancements/recipes/decorations/light_gray_sharestone.json index 5b00b5e5..3d3dde5d 100644 --- a/shared/src/generated/resources/data/waystones/advancements/recipes/decorations/light_gray_sharestone.json +++ b/common/src/generated/resources/data/waystones/advancements/recipes/decorations/light_gray_sharestone.json @@ -5,7 +5,7 @@ "conditions": { "items": [ { - "tag": "waystones:sharestones" + "items": "#waystones:sharestones" } ] }, diff --git a/shared/src/generated/resources/data/waystones/advancements/recipes/decorations/lime_sharestone.json b/common/src/generated/resources/data/waystones/advancements/recipes/decorations/lime_sharestone.json similarity index 92% rename from shared/src/generated/resources/data/waystones/advancements/recipes/decorations/lime_sharestone.json rename to common/src/generated/resources/data/waystones/advancements/recipes/decorations/lime_sharestone.json index 5a03e971..e93c2603 100644 --- a/shared/src/generated/resources/data/waystones/advancements/recipes/decorations/lime_sharestone.json +++ b/common/src/generated/resources/data/waystones/advancements/recipes/decorations/lime_sharestone.json @@ -5,7 +5,7 @@ "conditions": { "items": [ { - "tag": "waystones:sharestones" + "items": "#waystones:sharestones" } ] }, diff --git a/shared/src/generated/resources/data/waystones/advancements/recipes/decorations/magenta_sharestone.json b/common/src/generated/resources/data/waystones/advancements/recipes/decorations/magenta_sharestone.json similarity index 92% rename from shared/src/generated/resources/data/waystones/advancements/recipes/decorations/magenta_sharestone.json rename to common/src/generated/resources/data/waystones/advancements/recipes/decorations/magenta_sharestone.json index 65499ed4..18ffdd89 100644 --- a/shared/src/generated/resources/data/waystones/advancements/recipes/decorations/magenta_sharestone.json +++ b/common/src/generated/resources/data/waystones/advancements/recipes/decorations/magenta_sharestone.json @@ -5,7 +5,7 @@ "conditions": { "items": [ { - "tag": "waystones:sharestones" + "items": "#waystones:sharestones" } ] }, diff --git a/shared/src/generated/resources/data/waystones/advancements/recipes/decorations/mossy_waystone.json b/common/src/generated/resources/data/waystones/advancements/recipes/decorations/mossy_waystone.json similarity index 87% rename from shared/src/generated/resources/data/waystones/advancements/recipes/decorations/mossy_waystone.json rename to common/src/generated/resources/data/waystones/advancements/recipes/decorations/mossy_waystone.json index 44600221..a6f400e0 100644 --- a/shared/src/generated/resources/data/waystones/advancements/recipes/decorations/mossy_waystone.json +++ b/common/src/generated/resources/data/waystones/advancements/recipes/decorations/mossy_waystone.json @@ -11,9 +11,7 @@ "conditions": { "items": [ { - "items": [ - "waystones:warp_stone" - ] + "items": "waystones:warp_stone" } ] }, diff --git a/shared/src/generated/resources/data/waystones/advancements/recipes/decorations/mossy_waystone_from_vines.json b/common/src/generated/resources/data/waystones/advancements/recipes/decorations/mossy_waystone_from_vines.json similarity index 88% rename from shared/src/generated/resources/data/waystones/advancements/recipes/decorations/mossy_waystone_from_vines.json rename to common/src/generated/resources/data/waystones/advancements/recipes/decorations/mossy_waystone_from_vines.json index 57741ed3..c5cf198b 100644 --- a/shared/src/generated/resources/data/waystones/advancements/recipes/decorations/mossy_waystone_from_vines.json +++ b/common/src/generated/resources/data/waystones/advancements/recipes/decorations/mossy_waystone_from_vines.json @@ -11,9 +11,7 @@ "conditions": { "items": [ { - "items": [ - "waystones:waystone" - ] + "items": "waystones:waystone" } ] }, diff --git a/shared/src/generated/resources/data/waystones/advancements/recipes/decorations/orange_sharestone.json b/common/src/generated/resources/data/waystones/advancements/recipes/decorations/orange_sharestone.json similarity index 92% rename from shared/src/generated/resources/data/waystones/advancements/recipes/decorations/orange_sharestone.json rename to common/src/generated/resources/data/waystones/advancements/recipes/decorations/orange_sharestone.json index c210286e..95d239dc 100644 --- a/shared/src/generated/resources/data/waystones/advancements/recipes/decorations/orange_sharestone.json +++ b/common/src/generated/resources/data/waystones/advancements/recipes/decorations/orange_sharestone.json @@ -5,7 +5,7 @@ "conditions": { "items": [ { - "tag": "waystones:sharestones" + "items": "#waystones:sharestones" } ] }, diff --git a/shared/src/generated/resources/data/waystones/advancements/recipes/decorations/pink_sharestone.json b/common/src/generated/resources/data/waystones/advancements/recipes/decorations/pink_sharestone.json similarity index 92% rename from shared/src/generated/resources/data/waystones/advancements/recipes/decorations/pink_sharestone.json rename to common/src/generated/resources/data/waystones/advancements/recipes/decorations/pink_sharestone.json index b8affaf0..bd6999b1 100644 --- a/shared/src/generated/resources/data/waystones/advancements/recipes/decorations/pink_sharestone.json +++ b/common/src/generated/resources/data/waystones/advancements/recipes/decorations/pink_sharestone.json @@ -5,7 +5,7 @@ "conditions": { "items": [ { - "tag": "waystones:sharestones" + "items": "#waystones:sharestones" } ] }, diff --git a/shared/src/generated/resources/data/waystones/advancements/recipes/decorations/portstone.json b/common/src/generated/resources/data/waystones/advancements/recipes/decorations/portstone.json similarity index 87% rename from shared/src/generated/resources/data/waystones/advancements/recipes/decorations/portstone.json rename to common/src/generated/resources/data/waystones/advancements/recipes/decorations/portstone.json index 8ea485f0..46f984e2 100644 --- a/shared/src/generated/resources/data/waystones/advancements/recipes/decorations/portstone.json +++ b/common/src/generated/resources/data/waystones/advancements/recipes/decorations/portstone.json @@ -11,9 +11,7 @@ "conditions": { "items": [ { - "items": [ - "waystones:warp_stone" - ] + "items": "waystones:warp_stone" } ] }, diff --git a/shared/src/generated/resources/data/waystones/advancements/recipes/decorations/purple_sharestone.json b/common/src/generated/resources/data/waystones/advancements/recipes/decorations/purple_sharestone.json similarity index 92% rename from shared/src/generated/resources/data/waystones/advancements/recipes/decorations/purple_sharestone.json rename to common/src/generated/resources/data/waystones/advancements/recipes/decorations/purple_sharestone.json index 41b800d6..2415c00c 100644 --- a/shared/src/generated/resources/data/waystones/advancements/recipes/decorations/purple_sharestone.json +++ b/common/src/generated/resources/data/waystones/advancements/recipes/decorations/purple_sharestone.json @@ -5,7 +5,7 @@ "conditions": { "items": [ { - "tag": "waystones:sharestones" + "items": "#waystones:sharestones" } ] }, diff --git a/shared/src/generated/resources/data/waystones/advancements/recipes/decorations/red_sharestone.json b/common/src/generated/resources/data/waystones/advancements/recipes/decorations/red_sharestone.json similarity index 92% rename from shared/src/generated/resources/data/waystones/advancements/recipes/decorations/red_sharestone.json rename to common/src/generated/resources/data/waystones/advancements/recipes/decorations/red_sharestone.json index 044499bc..4e681dfe 100644 --- a/shared/src/generated/resources/data/waystones/advancements/recipes/decorations/red_sharestone.json +++ b/common/src/generated/resources/data/waystones/advancements/recipes/decorations/red_sharestone.json @@ -5,7 +5,7 @@ "conditions": { "items": [ { - "tag": "waystones:sharestones" + "items": "#waystones:sharestones" } ] }, diff --git a/shared/src/generated/resources/data/waystones/advancements/recipes/decorations/return_scroll.json b/common/src/generated/resources/data/waystones/advancements/recipes/decorations/return_scroll.json similarity index 88% rename from shared/src/generated/resources/data/waystones/advancements/recipes/decorations/return_scroll.json rename to common/src/generated/resources/data/waystones/advancements/recipes/decorations/return_scroll.json index b82f4759..75b51da5 100644 --- a/shared/src/generated/resources/data/waystones/advancements/recipes/decorations/return_scroll.json +++ b/common/src/generated/resources/data/waystones/advancements/recipes/decorations/return_scroll.json @@ -5,9 +5,7 @@ "conditions": { "items": [ { - "items": [ - "minecraft:paper" - ] + "items": "minecraft:paper" } ] }, diff --git a/shared/src/generated/resources/data/waystones/advancements/recipes/decorations/sandy_waystone.json b/common/src/generated/resources/data/waystones/advancements/recipes/decorations/sandy_waystone.json similarity index 87% rename from shared/src/generated/resources/data/waystones/advancements/recipes/decorations/sandy_waystone.json rename to common/src/generated/resources/data/waystones/advancements/recipes/decorations/sandy_waystone.json index 0ab30322..1af7ca1d 100644 --- a/shared/src/generated/resources/data/waystones/advancements/recipes/decorations/sandy_waystone.json +++ b/common/src/generated/resources/data/waystones/advancements/recipes/decorations/sandy_waystone.json @@ -11,9 +11,7 @@ "conditions": { "items": [ { - "items": [ - "waystones:warp_stone" - ] + "items": "waystones:warp_stone" } ] }, diff --git a/shared/src/generated/resources/data/waystones/advancements/recipes/decorations/sharestone.json b/common/src/generated/resources/data/waystones/advancements/recipes/decorations/sharestone.json similarity index 87% rename from shared/src/generated/resources/data/waystones/advancements/recipes/decorations/sharestone.json rename to common/src/generated/resources/data/waystones/advancements/recipes/decorations/sharestone.json index 3c163aa5..ae2a8f18 100644 --- a/shared/src/generated/resources/data/waystones/advancements/recipes/decorations/sharestone.json +++ b/common/src/generated/resources/data/waystones/advancements/recipes/decorations/sharestone.json @@ -11,9 +11,7 @@ "conditions": { "items": [ { - "items": [ - "waystones:warp_stone" - ] + "items": "waystones:warp_stone" } ] }, diff --git a/shared/src/generated/resources/data/waystones/advancements/recipes/decorations/sharestone_from_dyed.json b/common/src/generated/resources/data/waystones/advancements/recipes/decorations/sharestone_from_dyed.json similarity index 91% rename from shared/src/generated/resources/data/waystones/advancements/recipes/decorations/sharestone_from_dyed.json rename to common/src/generated/resources/data/waystones/advancements/recipes/decorations/sharestone_from_dyed.json index 083d10a9..1579348d 100644 --- a/shared/src/generated/resources/data/waystones/advancements/recipes/decorations/sharestone_from_dyed.json +++ b/common/src/generated/resources/data/waystones/advancements/recipes/decorations/sharestone_from_dyed.json @@ -5,7 +5,7 @@ "conditions": { "items": [ { - "tag": "waystones:dyed_sharestones" + "items": "#waystones:dyed_sharestones" } ] }, diff --git a/shared/src/generated/resources/data/waystones/advancements/recipes/decorations/warp_dust.json b/common/src/generated/resources/data/waystones/advancements/recipes/decorations/warp_dust.json similarity index 87% rename from shared/src/generated/resources/data/waystones/advancements/recipes/decorations/warp_dust.json rename to common/src/generated/resources/data/waystones/advancements/recipes/decorations/warp_dust.json index 7a7e66ae..90d7ccc1 100644 --- a/shared/src/generated/resources/data/waystones/advancements/recipes/decorations/warp_dust.json +++ b/common/src/generated/resources/data/waystones/advancements/recipes/decorations/warp_dust.json @@ -5,9 +5,7 @@ "conditions": { "items": [ { - "items": [ - "minecraft:ender_pearl" - ] + "items": "minecraft:ender_pearl" } ] }, diff --git a/shared/src/generated/resources/data/waystones/advancements/recipes/decorations/warp_plate.json b/common/src/generated/resources/data/waystones/advancements/recipes/decorations/warp_plate.json similarity index 87% rename from shared/src/generated/resources/data/waystones/advancements/recipes/decorations/warp_plate.json rename to common/src/generated/resources/data/waystones/advancements/recipes/decorations/warp_plate.json index e5a1ecc4..75b23369 100644 --- a/shared/src/generated/resources/data/waystones/advancements/recipes/decorations/warp_plate.json +++ b/common/src/generated/resources/data/waystones/advancements/recipes/decorations/warp_plate.json @@ -11,9 +11,7 @@ "conditions": { "items": [ { - "items": [ - "waystones:warp_dust" - ] + "items": "waystones:warp_dust" } ] }, diff --git a/shared/src/generated/resources/data/waystones/advancements/recipes/decorations/warp_scroll.json b/common/src/generated/resources/data/waystones/advancements/recipes/decorations/warp_scroll.json similarity index 87% rename from shared/src/generated/resources/data/waystones/advancements/recipes/decorations/warp_scroll.json rename to common/src/generated/resources/data/waystones/advancements/recipes/decorations/warp_scroll.json index 9603b7d3..8b6e3e53 100644 --- a/shared/src/generated/resources/data/waystones/advancements/recipes/decorations/warp_scroll.json +++ b/common/src/generated/resources/data/waystones/advancements/recipes/decorations/warp_scroll.json @@ -5,9 +5,7 @@ "conditions": { "items": [ { - "items": [ - "minecraft:ender_pearl" - ] + "items": "minecraft:ender_pearl" } ] }, diff --git a/shared/src/generated/resources/data/waystones/advancements/recipes/decorations/warp_stone.json b/common/src/generated/resources/data/waystones/advancements/recipes/decorations/warp_stone.json similarity index 87% rename from shared/src/generated/resources/data/waystones/advancements/recipes/decorations/warp_stone.json rename to common/src/generated/resources/data/waystones/advancements/recipes/decorations/warp_stone.json index 655acaeb..1fc21440 100644 --- a/shared/src/generated/resources/data/waystones/advancements/recipes/decorations/warp_stone.json +++ b/common/src/generated/resources/data/waystones/advancements/recipes/decorations/warp_stone.json @@ -5,9 +5,7 @@ "conditions": { "items": [ { - "items": [ - "minecraft:ender_pearl" - ] + "items": "minecraft:ender_pearl" } ] }, diff --git a/shared/src/generated/resources/data/waystones/advancements/recipes/decorations/waystone.json b/common/src/generated/resources/data/waystones/advancements/recipes/decorations/waystone.json similarity index 87% rename from shared/src/generated/resources/data/waystones/advancements/recipes/decorations/waystone.json rename to common/src/generated/resources/data/waystones/advancements/recipes/decorations/waystone.json index 9d918efc..766c3052 100644 --- a/shared/src/generated/resources/data/waystones/advancements/recipes/decorations/waystone.json +++ b/common/src/generated/resources/data/waystones/advancements/recipes/decorations/waystone.json @@ -11,9 +11,7 @@ "conditions": { "items": [ { - "items": [ - "waystones:warp_stone" - ] + "items": "waystones:warp_stone" } ] }, diff --git a/shared/src/generated/resources/data/waystones/advancements/recipes/decorations/white_sharestone.json b/common/src/generated/resources/data/waystones/advancements/recipes/decorations/white_sharestone.json similarity index 92% rename from shared/src/generated/resources/data/waystones/advancements/recipes/decorations/white_sharestone.json rename to common/src/generated/resources/data/waystones/advancements/recipes/decorations/white_sharestone.json index 15511e6a..db79ff0f 100644 --- a/shared/src/generated/resources/data/waystones/advancements/recipes/decorations/white_sharestone.json +++ b/common/src/generated/resources/data/waystones/advancements/recipes/decorations/white_sharestone.json @@ -5,7 +5,7 @@ "conditions": { "items": [ { - "tag": "waystones:sharestones" + "items": "#waystones:sharestones" } ] }, diff --git a/shared/src/generated/resources/data/waystones/advancements/recipes/decorations/yellow_sharestone.json b/common/src/generated/resources/data/waystones/advancements/recipes/decorations/yellow_sharestone.json similarity index 92% rename from shared/src/generated/resources/data/waystones/advancements/recipes/decorations/yellow_sharestone.json rename to common/src/generated/resources/data/waystones/advancements/recipes/decorations/yellow_sharestone.json index 95f07f6a..ac9c96fe 100644 --- a/shared/src/generated/resources/data/waystones/advancements/recipes/decorations/yellow_sharestone.json +++ b/common/src/generated/resources/data/waystones/advancements/recipes/decorations/yellow_sharestone.json @@ -5,7 +5,7 @@ "conditions": { "items": [ { - "tag": "waystones:sharestones" + "items": "#waystones:sharestones" } ] }, diff --git a/shared/src/generated/resources/data/waystones/loot_tables/blocks/black_sharestone.json b/common/src/generated/resources/data/waystones/loot_tables/blocks/black_sharestone.json similarity index 66% rename from shared/src/generated/resources/data/waystones/loot_tables/blocks/black_sharestone.json rename to common/src/generated/resources/data/waystones/loot_tables/blocks/black_sharestone.json index fcc56a8b..5393a587 100644 --- a/shared/src/generated/resources/data/waystones/loot_tables/blocks/black_sharestone.json +++ b/common/src/generated/resources/data/waystones/loot_tables/blocks/black_sharestone.json @@ -27,25 +27,20 @@ { "condition": "minecraft:match_tool", "predicate": { - "enchantments": [ - { - "enchantment": "minecraft:silk_touch", - "levels": { - "min": 1 + "predicates": { + "minecraft:enchantments": [ + { + "enchantment": "minecraft:silk_touch", + "levels": { + "min": 1 + } } - } - ] + ] + } } } ], - "function": "minecraft:copy_nbt", - "ops": [ - { - "op": "replace", - "source": "UUID", - "target": "UUID" - } - ], + "function": "minecraft:copy_components", "source": "block_entity" } ], diff --git a/shared/src/generated/resources/data/waystones/loot_tables/blocks/blackstone_waystone.json b/common/src/generated/resources/data/waystones/loot_tables/blocks/blackstone_waystone.json similarity index 66% rename from shared/src/generated/resources/data/waystones/loot_tables/blocks/blackstone_waystone.json rename to common/src/generated/resources/data/waystones/loot_tables/blocks/blackstone_waystone.json index 5e5a4815..21724bf0 100644 --- a/shared/src/generated/resources/data/waystones/loot_tables/blocks/blackstone_waystone.json +++ b/common/src/generated/resources/data/waystones/loot_tables/blocks/blackstone_waystone.json @@ -27,25 +27,20 @@ { "condition": "minecraft:match_tool", "predicate": { - "enchantments": [ - { - "enchantment": "minecraft:silk_touch", - "levels": { - "min": 1 + "predicates": { + "minecraft:enchantments": [ + { + "enchantment": "minecraft:silk_touch", + "levels": { + "min": 1 + } } - } - ] + ] + } } } ], - "function": "minecraft:copy_nbt", - "ops": [ - { - "op": "replace", - "source": "UUID", - "target": "UUID" - } - ], + "function": "minecraft:copy_components", "source": "block_entity" } ], diff --git a/shared/src/generated/resources/data/waystones/loot_tables/blocks/blue_sharestone.json b/common/src/generated/resources/data/waystones/loot_tables/blocks/blue_sharestone.json similarity index 66% rename from shared/src/generated/resources/data/waystones/loot_tables/blocks/blue_sharestone.json rename to common/src/generated/resources/data/waystones/loot_tables/blocks/blue_sharestone.json index 2e66d189..d3298ccc 100644 --- a/shared/src/generated/resources/data/waystones/loot_tables/blocks/blue_sharestone.json +++ b/common/src/generated/resources/data/waystones/loot_tables/blocks/blue_sharestone.json @@ -27,25 +27,20 @@ { "condition": "minecraft:match_tool", "predicate": { - "enchantments": [ - { - "enchantment": "minecraft:silk_touch", - "levels": { - "min": 1 + "predicates": { + "minecraft:enchantments": [ + { + "enchantment": "minecraft:silk_touch", + "levels": { + "min": 1 + } } - } - ] + ] + } } } ], - "function": "minecraft:copy_nbt", - "ops": [ - { - "op": "replace", - "source": "UUID", - "target": "UUID" - } - ], + "function": "minecraft:copy_components", "source": "block_entity" } ], diff --git a/shared/src/generated/resources/data/waystones/loot_tables/blocks/brown_sharestone.json b/common/src/generated/resources/data/waystones/loot_tables/blocks/brown_sharestone.json similarity index 66% rename from shared/src/generated/resources/data/waystones/loot_tables/blocks/brown_sharestone.json rename to common/src/generated/resources/data/waystones/loot_tables/blocks/brown_sharestone.json index 9d87c7c4..5c19be36 100644 --- a/shared/src/generated/resources/data/waystones/loot_tables/blocks/brown_sharestone.json +++ b/common/src/generated/resources/data/waystones/loot_tables/blocks/brown_sharestone.json @@ -27,25 +27,20 @@ { "condition": "minecraft:match_tool", "predicate": { - "enchantments": [ - { - "enchantment": "minecraft:silk_touch", - "levels": { - "min": 1 + "predicates": { + "minecraft:enchantments": [ + { + "enchantment": "minecraft:silk_touch", + "levels": { + "min": 1 + } } - } - ] + ] + } } } ], - "function": "minecraft:copy_nbt", - "ops": [ - { - "op": "replace", - "source": "UUID", - "target": "UUID" - } - ], + "function": "minecraft:copy_components", "source": "block_entity" } ], diff --git a/shared/src/generated/resources/data/waystones/loot_tables/blocks/cyan_sharestone.json b/common/src/generated/resources/data/waystones/loot_tables/blocks/cyan_sharestone.json similarity index 66% rename from shared/src/generated/resources/data/waystones/loot_tables/blocks/cyan_sharestone.json rename to common/src/generated/resources/data/waystones/loot_tables/blocks/cyan_sharestone.json index 7737e31d..1d000cf3 100644 --- a/shared/src/generated/resources/data/waystones/loot_tables/blocks/cyan_sharestone.json +++ b/common/src/generated/resources/data/waystones/loot_tables/blocks/cyan_sharestone.json @@ -27,25 +27,20 @@ { "condition": "minecraft:match_tool", "predicate": { - "enchantments": [ - { - "enchantment": "minecraft:silk_touch", - "levels": { - "min": 1 + "predicates": { + "minecraft:enchantments": [ + { + "enchantment": "minecraft:silk_touch", + "levels": { + "min": 1 + } } - } - ] + ] + } } } ], - "function": "minecraft:copy_nbt", - "ops": [ - { - "op": "replace", - "source": "UUID", - "target": "UUID" - } - ], + "function": "minecraft:copy_components", "source": "block_entity" } ], diff --git a/shared/src/generated/resources/data/waystones/loot_tables/blocks/deepslate_waystone.json b/common/src/generated/resources/data/waystones/loot_tables/blocks/deepslate_waystone.json similarity index 66% rename from shared/src/generated/resources/data/waystones/loot_tables/blocks/deepslate_waystone.json rename to common/src/generated/resources/data/waystones/loot_tables/blocks/deepslate_waystone.json index 06f40edd..de62fa07 100644 --- a/shared/src/generated/resources/data/waystones/loot_tables/blocks/deepslate_waystone.json +++ b/common/src/generated/resources/data/waystones/loot_tables/blocks/deepslate_waystone.json @@ -27,25 +27,20 @@ { "condition": "minecraft:match_tool", "predicate": { - "enchantments": [ - { - "enchantment": "minecraft:silk_touch", - "levels": { - "min": 1 + "predicates": { + "minecraft:enchantments": [ + { + "enchantment": "minecraft:silk_touch", + "levels": { + "min": 1 + } } - } - ] + ] + } } } ], - "function": "minecraft:copy_nbt", - "ops": [ - { - "op": "replace", - "source": "UUID", - "target": "UUID" - } - ], + "function": "minecraft:copy_components", "source": "block_entity" } ], diff --git a/shared/src/generated/resources/data/waystones/loot_tables/blocks/end_stone_waystone.json b/common/src/generated/resources/data/waystones/loot_tables/blocks/end_stone_waystone.json similarity index 66% rename from shared/src/generated/resources/data/waystones/loot_tables/blocks/end_stone_waystone.json rename to common/src/generated/resources/data/waystones/loot_tables/blocks/end_stone_waystone.json index 1a769ba9..497f52e0 100644 --- a/shared/src/generated/resources/data/waystones/loot_tables/blocks/end_stone_waystone.json +++ b/common/src/generated/resources/data/waystones/loot_tables/blocks/end_stone_waystone.json @@ -27,25 +27,20 @@ { "condition": "minecraft:match_tool", "predicate": { - "enchantments": [ - { - "enchantment": "minecraft:silk_touch", - "levels": { - "min": 1 + "predicates": { + "minecraft:enchantments": [ + { + "enchantment": "minecraft:silk_touch", + "levels": { + "min": 1 + } } - } - ] + ] + } } } ], - "function": "minecraft:copy_nbt", - "ops": [ - { - "op": "replace", - "source": "UUID", - "target": "UUID" - } - ], + "function": "minecraft:copy_components", "source": "block_entity" } ], diff --git a/shared/src/generated/resources/data/waystones/loot_tables/blocks/gray_sharestone.json b/common/src/generated/resources/data/waystones/loot_tables/blocks/gray_sharestone.json similarity index 66% rename from shared/src/generated/resources/data/waystones/loot_tables/blocks/gray_sharestone.json rename to common/src/generated/resources/data/waystones/loot_tables/blocks/gray_sharestone.json index 9c40f78e..062ff554 100644 --- a/shared/src/generated/resources/data/waystones/loot_tables/blocks/gray_sharestone.json +++ b/common/src/generated/resources/data/waystones/loot_tables/blocks/gray_sharestone.json @@ -27,25 +27,20 @@ { "condition": "minecraft:match_tool", "predicate": { - "enchantments": [ - { - "enchantment": "minecraft:silk_touch", - "levels": { - "min": 1 + "predicates": { + "minecraft:enchantments": [ + { + "enchantment": "minecraft:silk_touch", + "levels": { + "min": 1 + } } - } - ] + ] + } } } ], - "function": "minecraft:copy_nbt", - "ops": [ - { - "op": "replace", - "source": "UUID", - "target": "UUID" - } - ], + "function": "minecraft:copy_components", "source": "block_entity" } ], diff --git a/shared/src/generated/resources/data/waystones/loot_tables/blocks/green_sharestone.json b/common/src/generated/resources/data/waystones/loot_tables/blocks/green_sharestone.json similarity index 66% rename from shared/src/generated/resources/data/waystones/loot_tables/blocks/green_sharestone.json rename to common/src/generated/resources/data/waystones/loot_tables/blocks/green_sharestone.json index 6342e081..9de4f313 100644 --- a/shared/src/generated/resources/data/waystones/loot_tables/blocks/green_sharestone.json +++ b/common/src/generated/resources/data/waystones/loot_tables/blocks/green_sharestone.json @@ -27,25 +27,20 @@ { "condition": "minecraft:match_tool", "predicate": { - "enchantments": [ - { - "enchantment": "minecraft:silk_touch", - "levels": { - "min": 1 + "predicates": { + "minecraft:enchantments": [ + { + "enchantment": "minecraft:silk_touch", + "levels": { + "min": 1 + } } - } - ] + ] + } } } ], - "function": "minecraft:copy_nbt", - "ops": [ - { - "op": "replace", - "source": "UUID", - "target": "UUID" - } - ], + "function": "minecraft:copy_components", "source": "block_entity" } ], diff --git a/shared/src/generated/resources/data/waystones/loot_tables/blocks/landing_stone.json b/common/src/generated/resources/data/waystones/loot_tables/blocks/landing_stone.json similarity index 58% rename from shared/src/generated/resources/data/waystones/loot_tables/blocks/landing_stone.json rename to common/src/generated/resources/data/waystones/loot_tables/blocks/landing_stone.json index d3412975..f6877bf4 100644 --- a/shared/src/generated/resources/data/waystones/loot_tables/blocks/landing_stone.json +++ b/common/src/generated/resources/data/waystones/loot_tables/blocks/landing_stone.json @@ -20,25 +20,20 @@ { "condition": "minecraft:match_tool", "predicate": { - "enchantments": [ - { - "enchantment": "minecraft:silk_touch", - "levels": { - "min": 1 + "predicates": { + "minecraft:enchantments": [ + { + "enchantment": "minecraft:silk_touch", + "levels": { + "min": 1 + } } - } - ] + ] + } } } ], - "function": "minecraft:copy_nbt", - "ops": [ - { - "op": "replace", - "source": "UUID", - "target": "UUID" - } - ], + "function": "minecraft:copy_components", "source": "block_entity" }, { @@ -46,14 +41,16 @@ { "condition": "minecraft:match_tool", "predicate": { - "enchantments": [ - { - "enchantment": "minecraft:silk_touch", - "levels": { - "min": 1 + "predicates": { + "minecraft:enchantments": [ + { + "enchantment": "minecraft:silk_touch", + "levels": { + "min": 1 + } } - } - ] + ] + } } } ], diff --git a/shared/src/generated/resources/data/waystones/loot_tables/blocks/light_blue_sharestone.json b/common/src/generated/resources/data/waystones/loot_tables/blocks/light_blue_sharestone.json similarity index 66% rename from shared/src/generated/resources/data/waystones/loot_tables/blocks/light_blue_sharestone.json rename to common/src/generated/resources/data/waystones/loot_tables/blocks/light_blue_sharestone.json index 5b4df047..190bea3e 100644 --- a/shared/src/generated/resources/data/waystones/loot_tables/blocks/light_blue_sharestone.json +++ b/common/src/generated/resources/data/waystones/loot_tables/blocks/light_blue_sharestone.json @@ -27,25 +27,20 @@ { "condition": "minecraft:match_tool", "predicate": { - "enchantments": [ - { - "enchantment": "minecraft:silk_touch", - "levels": { - "min": 1 + "predicates": { + "minecraft:enchantments": [ + { + "enchantment": "minecraft:silk_touch", + "levels": { + "min": 1 + } } - } - ] + ] + } } } ], - "function": "minecraft:copy_nbt", - "ops": [ - { - "op": "replace", - "source": "UUID", - "target": "UUID" - } - ], + "function": "minecraft:copy_components", "source": "block_entity" } ], diff --git a/shared/src/generated/resources/data/waystones/loot_tables/blocks/light_gray_sharestone.json b/common/src/generated/resources/data/waystones/loot_tables/blocks/light_gray_sharestone.json similarity index 66% rename from shared/src/generated/resources/data/waystones/loot_tables/blocks/light_gray_sharestone.json rename to common/src/generated/resources/data/waystones/loot_tables/blocks/light_gray_sharestone.json index 3fc14156..2f24fd72 100644 --- a/shared/src/generated/resources/data/waystones/loot_tables/blocks/light_gray_sharestone.json +++ b/common/src/generated/resources/data/waystones/loot_tables/blocks/light_gray_sharestone.json @@ -27,25 +27,20 @@ { "condition": "minecraft:match_tool", "predicate": { - "enchantments": [ - { - "enchantment": "minecraft:silk_touch", - "levels": { - "min": 1 + "predicates": { + "minecraft:enchantments": [ + { + "enchantment": "minecraft:silk_touch", + "levels": { + "min": 1 + } } - } - ] + ] + } } } ], - "function": "minecraft:copy_nbt", - "ops": [ - { - "op": "replace", - "source": "UUID", - "target": "UUID" - } - ], + "function": "minecraft:copy_components", "source": "block_entity" } ], diff --git a/shared/src/generated/resources/data/waystones/loot_tables/blocks/lime_sharestone.json b/common/src/generated/resources/data/waystones/loot_tables/blocks/lime_sharestone.json similarity index 66% rename from shared/src/generated/resources/data/waystones/loot_tables/blocks/lime_sharestone.json rename to common/src/generated/resources/data/waystones/loot_tables/blocks/lime_sharestone.json index e0ec79d9..9a7ff2a5 100644 --- a/shared/src/generated/resources/data/waystones/loot_tables/blocks/lime_sharestone.json +++ b/common/src/generated/resources/data/waystones/loot_tables/blocks/lime_sharestone.json @@ -27,25 +27,20 @@ { "condition": "minecraft:match_tool", "predicate": { - "enchantments": [ - { - "enchantment": "minecraft:silk_touch", - "levels": { - "min": 1 + "predicates": { + "minecraft:enchantments": [ + { + "enchantment": "minecraft:silk_touch", + "levels": { + "min": 1 + } } - } - ] + ] + } } } ], - "function": "minecraft:copy_nbt", - "ops": [ - { - "op": "replace", - "source": "UUID", - "target": "UUID" - } - ], + "function": "minecraft:copy_components", "source": "block_entity" } ], diff --git a/shared/src/generated/resources/data/waystones/loot_tables/blocks/magenta_sharestone.json b/common/src/generated/resources/data/waystones/loot_tables/blocks/magenta_sharestone.json similarity index 66% rename from shared/src/generated/resources/data/waystones/loot_tables/blocks/magenta_sharestone.json rename to common/src/generated/resources/data/waystones/loot_tables/blocks/magenta_sharestone.json index 0642fa19..8ecec5af 100644 --- a/shared/src/generated/resources/data/waystones/loot_tables/blocks/magenta_sharestone.json +++ b/common/src/generated/resources/data/waystones/loot_tables/blocks/magenta_sharestone.json @@ -27,25 +27,20 @@ { "condition": "minecraft:match_tool", "predicate": { - "enchantments": [ - { - "enchantment": "minecraft:silk_touch", - "levels": { - "min": 1 + "predicates": { + "minecraft:enchantments": [ + { + "enchantment": "minecraft:silk_touch", + "levels": { + "min": 1 + } } - } - ] + ] + } } } ], - "function": "minecraft:copy_nbt", - "ops": [ - { - "op": "replace", - "source": "UUID", - "target": "UUID" - } - ], + "function": "minecraft:copy_components", "source": "block_entity" } ], diff --git a/shared/src/generated/resources/data/waystones/loot_tables/blocks/mossy_waystone.json b/common/src/generated/resources/data/waystones/loot_tables/blocks/mossy_waystone.json similarity index 66% rename from shared/src/generated/resources/data/waystones/loot_tables/blocks/mossy_waystone.json rename to common/src/generated/resources/data/waystones/loot_tables/blocks/mossy_waystone.json index 0d6891a7..b426e31b 100644 --- a/shared/src/generated/resources/data/waystones/loot_tables/blocks/mossy_waystone.json +++ b/common/src/generated/resources/data/waystones/loot_tables/blocks/mossy_waystone.json @@ -27,25 +27,20 @@ { "condition": "minecraft:match_tool", "predicate": { - "enchantments": [ - { - "enchantment": "minecraft:silk_touch", - "levels": { - "min": 1 + "predicates": { + "minecraft:enchantments": [ + { + "enchantment": "minecraft:silk_touch", + "levels": { + "min": 1 + } } - } - ] + ] + } } } ], - "function": "minecraft:copy_nbt", - "ops": [ - { - "op": "replace", - "source": "UUID", - "target": "UUID" - } - ], + "function": "minecraft:copy_components", "source": "block_entity" } ], diff --git a/shared/src/generated/resources/data/waystones/loot_tables/blocks/orange_sharestone.json b/common/src/generated/resources/data/waystones/loot_tables/blocks/orange_sharestone.json similarity index 66% rename from shared/src/generated/resources/data/waystones/loot_tables/blocks/orange_sharestone.json rename to common/src/generated/resources/data/waystones/loot_tables/blocks/orange_sharestone.json index 93f88f96..71822d21 100644 --- a/shared/src/generated/resources/data/waystones/loot_tables/blocks/orange_sharestone.json +++ b/common/src/generated/resources/data/waystones/loot_tables/blocks/orange_sharestone.json @@ -27,25 +27,20 @@ { "condition": "minecraft:match_tool", "predicate": { - "enchantments": [ - { - "enchantment": "minecraft:silk_touch", - "levels": { - "min": 1 + "predicates": { + "minecraft:enchantments": [ + { + "enchantment": "minecraft:silk_touch", + "levels": { + "min": 1 + } } - } - ] + ] + } } } ], - "function": "minecraft:copy_nbt", - "ops": [ - { - "op": "replace", - "source": "UUID", - "target": "UUID" - } - ], + "function": "minecraft:copy_components", "source": "block_entity" } ], diff --git a/shared/src/generated/resources/data/waystones/loot_tables/blocks/pink_sharestone.json b/common/src/generated/resources/data/waystones/loot_tables/blocks/pink_sharestone.json similarity index 66% rename from shared/src/generated/resources/data/waystones/loot_tables/blocks/pink_sharestone.json rename to common/src/generated/resources/data/waystones/loot_tables/blocks/pink_sharestone.json index 3111b771..8b456867 100644 --- a/shared/src/generated/resources/data/waystones/loot_tables/blocks/pink_sharestone.json +++ b/common/src/generated/resources/data/waystones/loot_tables/blocks/pink_sharestone.json @@ -27,25 +27,20 @@ { "condition": "minecraft:match_tool", "predicate": { - "enchantments": [ - { - "enchantment": "minecraft:silk_touch", - "levels": { - "min": 1 + "predicates": { + "minecraft:enchantments": [ + { + "enchantment": "minecraft:silk_touch", + "levels": { + "min": 1 + } } - } - ] + ] + } } } ], - "function": "minecraft:copy_nbt", - "ops": [ - { - "op": "replace", - "source": "UUID", - "target": "UUID" - } - ], + "function": "minecraft:copy_components", "source": "block_entity" } ], diff --git a/shared/src/generated/resources/data/waystones/loot_tables/blocks/portstone.json b/common/src/generated/resources/data/waystones/loot_tables/blocks/portstone.json similarity index 65% rename from shared/src/generated/resources/data/waystones/loot_tables/blocks/portstone.json rename to common/src/generated/resources/data/waystones/loot_tables/blocks/portstone.json index 1a650a58..4e519a42 100644 --- a/shared/src/generated/resources/data/waystones/loot_tables/blocks/portstone.json +++ b/common/src/generated/resources/data/waystones/loot_tables/blocks/portstone.json @@ -27,25 +27,20 @@ { "condition": "minecraft:match_tool", "predicate": { - "enchantments": [ - { - "enchantment": "minecraft:silk_touch", - "levels": { - "min": 1 + "predicates": { + "minecraft:enchantments": [ + { + "enchantment": "minecraft:silk_touch", + "levels": { + "min": 1 + } } - } - ] + ] + } } } ], - "function": "minecraft:copy_nbt", - "ops": [ - { - "op": "replace", - "source": "UUID", - "target": "UUID" - } - ], + "function": "minecraft:copy_components", "source": "block_entity" } ], diff --git a/shared/src/generated/resources/data/waystones/loot_tables/blocks/purple_sharestone.json b/common/src/generated/resources/data/waystones/loot_tables/blocks/purple_sharestone.json similarity index 66% rename from shared/src/generated/resources/data/waystones/loot_tables/blocks/purple_sharestone.json rename to common/src/generated/resources/data/waystones/loot_tables/blocks/purple_sharestone.json index c0f214ac..f9a3e864 100644 --- a/shared/src/generated/resources/data/waystones/loot_tables/blocks/purple_sharestone.json +++ b/common/src/generated/resources/data/waystones/loot_tables/blocks/purple_sharestone.json @@ -27,25 +27,20 @@ { "condition": "minecraft:match_tool", "predicate": { - "enchantments": [ - { - "enchantment": "minecraft:silk_touch", - "levels": { - "min": 1 + "predicates": { + "minecraft:enchantments": [ + { + "enchantment": "minecraft:silk_touch", + "levels": { + "min": 1 + } } - } - ] + ] + } } } ], - "function": "minecraft:copy_nbt", - "ops": [ - { - "op": "replace", - "source": "UUID", - "target": "UUID" - } - ], + "function": "minecraft:copy_components", "source": "block_entity" } ], diff --git a/shared/src/generated/resources/data/waystones/loot_tables/blocks/red_sharestone.json b/common/src/generated/resources/data/waystones/loot_tables/blocks/red_sharestone.json similarity index 66% rename from shared/src/generated/resources/data/waystones/loot_tables/blocks/red_sharestone.json rename to common/src/generated/resources/data/waystones/loot_tables/blocks/red_sharestone.json index 32398c48..3e3325b4 100644 --- a/shared/src/generated/resources/data/waystones/loot_tables/blocks/red_sharestone.json +++ b/common/src/generated/resources/data/waystones/loot_tables/blocks/red_sharestone.json @@ -27,25 +27,20 @@ { "condition": "minecraft:match_tool", "predicate": { - "enchantments": [ - { - "enchantment": "minecraft:silk_touch", - "levels": { - "min": 1 + "predicates": { + "minecraft:enchantments": [ + { + "enchantment": "minecraft:silk_touch", + "levels": { + "min": 1 + } } - } - ] + ] + } } } ], - "function": "minecraft:copy_nbt", - "ops": [ - { - "op": "replace", - "source": "UUID", - "target": "UUID" - } - ], + "function": "minecraft:copy_components", "source": "block_entity" } ], diff --git a/shared/src/generated/resources/data/waystones/loot_tables/blocks/sandy_waystone.json b/common/src/generated/resources/data/waystones/loot_tables/blocks/sandy_waystone.json similarity index 66% rename from shared/src/generated/resources/data/waystones/loot_tables/blocks/sandy_waystone.json rename to common/src/generated/resources/data/waystones/loot_tables/blocks/sandy_waystone.json index be32695b..9001d929 100644 --- a/shared/src/generated/resources/data/waystones/loot_tables/blocks/sandy_waystone.json +++ b/common/src/generated/resources/data/waystones/loot_tables/blocks/sandy_waystone.json @@ -27,25 +27,20 @@ { "condition": "minecraft:match_tool", "predicate": { - "enchantments": [ - { - "enchantment": "minecraft:silk_touch", - "levels": { - "min": 1 + "predicates": { + "minecraft:enchantments": [ + { + "enchantment": "minecraft:silk_touch", + "levels": { + "min": 1 + } } - } - ] + ] + } } } ], - "function": "minecraft:copy_nbt", - "ops": [ - { - "op": "replace", - "source": "UUID", - "target": "UUID" - } - ], + "function": "minecraft:copy_components", "source": "block_entity" } ], diff --git a/shared/src/generated/resources/data/waystones/loot_tables/blocks/sharestone.json b/common/src/generated/resources/data/waystones/loot_tables/blocks/sharestone.json similarity index 65% rename from shared/src/generated/resources/data/waystones/loot_tables/blocks/sharestone.json rename to common/src/generated/resources/data/waystones/loot_tables/blocks/sharestone.json index e7113dcd..fcdf0b86 100644 --- a/shared/src/generated/resources/data/waystones/loot_tables/blocks/sharestone.json +++ b/common/src/generated/resources/data/waystones/loot_tables/blocks/sharestone.json @@ -27,25 +27,20 @@ { "condition": "minecraft:match_tool", "predicate": { - "enchantments": [ - { - "enchantment": "minecraft:silk_touch", - "levels": { - "min": 1 + "predicates": { + "minecraft:enchantments": [ + { + "enchantment": "minecraft:silk_touch", + "levels": { + "min": 1 + } } - } - ] + ] + } } } ], - "function": "minecraft:copy_nbt", - "ops": [ - { - "op": "replace", - "source": "UUID", - "target": "UUID" - } - ], + "function": "minecraft:copy_components", "source": "block_entity" } ], diff --git a/shared/src/generated/resources/data/waystones/loot_tables/blocks/warp_plate.json b/common/src/generated/resources/data/waystones/loot_tables/blocks/warp_plate.json similarity index 58% rename from shared/src/generated/resources/data/waystones/loot_tables/blocks/warp_plate.json rename to common/src/generated/resources/data/waystones/loot_tables/blocks/warp_plate.json index a5d03d6c..f4f222e0 100644 --- a/shared/src/generated/resources/data/waystones/loot_tables/blocks/warp_plate.json +++ b/common/src/generated/resources/data/waystones/loot_tables/blocks/warp_plate.json @@ -20,25 +20,20 @@ { "condition": "minecraft:match_tool", "predicate": { - "enchantments": [ - { - "enchantment": "minecraft:silk_touch", - "levels": { - "min": 1 + "predicates": { + "minecraft:enchantments": [ + { + "enchantment": "minecraft:silk_touch", + "levels": { + "min": 1 + } } - } - ] + ] + } } } ], - "function": "minecraft:copy_nbt", - "ops": [ - { - "op": "replace", - "source": "UUID", - "target": "UUID" - } - ], + "function": "minecraft:copy_components", "source": "block_entity" }, { @@ -46,14 +41,16 @@ { "condition": "minecraft:match_tool", "predicate": { - "enchantments": [ - { - "enchantment": "minecraft:silk_touch", - "levels": { - "min": 1 + "predicates": { + "minecraft:enchantments": [ + { + "enchantment": "minecraft:silk_touch", + "levels": { + "min": 1 + } } - } - ] + ] + } } } ], diff --git a/shared/src/generated/resources/data/waystones/loot_tables/blocks/waystone.json b/common/src/generated/resources/data/waystones/loot_tables/blocks/waystone.json similarity index 65% rename from shared/src/generated/resources/data/waystones/loot_tables/blocks/waystone.json rename to common/src/generated/resources/data/waystones/loot_tables/blocks/waystone.json index 09ba5157..600aff41 100644 --- a/shared/src/generated/resources/data/waystones/loot_tables/blocks/waystone.json +++ b/common/src/generated/resources/data/waystones/loot_tables/blocks/waystone.json @@ -27,25 +27,20 @@ { "condition": "minecraft:match_tool", "predicate": { - "enchantments": [ - { - "enchantment": "minecraft:silk_touch", - "levels": { - "min": 1 + "predicates": { + "minecraft:enchantments": [ + { + "enchantment": "minecraft:silk_touch", + "levels": { + "min": 1 + } } - } - ] + ] + } } } ], - "function": "minecraft:copy_nbt", - "ops": [ - { - "op": "replace", - "source": "UUID", - "target": "UUID" - } - ], + "function": "minecraft:copy_components", "source": "block_entity" } ], diff --git a/shared/src/generated/resources/data/waystones/loot_tables/blocks/white_sharestone.json b/common/src/generated/resources/data/waystones/loot_tables/blocks/white_sharestone.json similarity index 66% rename from shared/src/generated/resources/data/waystones/loot_tables/blocks/white_sharestone.json rename to common/src/generated/resources/data/waystones/loot_tables/blocks/white_sharestone.json index 8beee6c8..751a781b 100644 --- a/shared/src/generated/resources/data/waystones/loot_tables/blocks/white_sharestone.json +++ b/common/src/generated/resources/data/waystones/loot_tables/blocks/white_sharestone.json @@ -27,25 +27,20 @@ { "condition": "minecraft:match_tool", "predicate": { - "enchantments": [ - { - "enchantment": "minecraft:silk_touch", - "levels": { - "min": 1 + "predicates": { + "minecraft:enchantments": [ + { + "enchantment": "minecraft:silk_touch", + "levels": { + "min": 1 + } } - } - ] + ] + } } } ], - "function": "minecraft:copy_nbt", - "ops": [ - { - "op": "replace", - "source": "UUID", - "target": "UUID" - } - ], + "function": "minecraft:copy_components", "source": "block_entity" } ], diff --git a/shared/src/generated/resources/data/waystones/loot_tables/blocks/yellow_sharestone.json b/common/src/generated/resources/data/waystones/loot_tables/blocks/yellow_sharestone.json similarity index 66% rename from shared/src/generated/resources/data/waystones/loot_tables/blocks/yellow_sharestone.json rename to common/src/generated/resources/data/waystones/loot_tables/blocks/yellow_sharestone.json index bd0c6d91..6e2e1162 100644 --- a/shared/src/generated/resources/data/waystones/loot_tables/blocks/yellow_sharestone.json +++ b/common/src/generated/resources/data/waystones/loot_tables/blocks/yellow_sharestone.json @@ -27,25 +27,20 @@ { "condition": "minecraft:match_tool", "predicate": { - "enchantments": [ - { - "enchantment": "minecraft:silk_touch", - "levels": { - "min": 1 + "predicates": { + "minecraft:enchantments": [ + { + "enchantment": "minecraft:silk_touch", + "levels": { + "min": 1 + } } - } - ] + ] + } } } ], - "function": "minecraft:copy_nbt", - "ops": [ - { - "op": "replace", - "source": "UUID", - "target": "UUID" - } - ], + "function": "minecraft:copy_components", "source": "block_entity" } ], diff --git a/shared/src/generated/resources/data/waystones/recipes/black_sharestone.json b/common/src/generated/resources/data/waystones/recipes/black_sharestone.json similarity index 78% rename from shared/src/generated/resources/data/waystones/recipes/black_sharestone.json rename to common/src/generated/resources/data/waystones/recipes/black_sharestone.json index 4a056a36..acce6111 100644 --- a/shared/src/generated/resources/data/waystones/recipes/black_sharestone.json +++ b/common/src/generated/resources/data/waystones/recipes/black_sharestone.json @@ -10,6 +10,7 @@ } ], "result": { - "item": "waystones:black_sharestone" + "count": 1, + "id": "waystones:black_sharestone" } } \ No newline at end of file diff --git a/shared/src/generated/resources/data/waystones/recipes/blackstone_waystone.json b/common/src/generated/resources/data/waystones/recipes/blackstone_waystone.json similarity index 84% rename from shared/src/generated/resources/data/waystones/recipes/blackstone_waystone.json rename to common/src/generated/resources/data/waystones/recipes/blackstone_waystone.json index fcacbaa7..914d3d81 100644 --- a/shared/src/generated/resources/data/waystones/recipes/blackstone_waystone.json +++ b/common/src/generated/resources/data/waystones/recipes/blackstone_waystone.json @@ -18,6 +18,7 @@ "OOO" ], "result": { - "item": "waystones:blackstone_waystone" + "count": 1, + "id": "waystones:blackstone_waystone" } } \ No newline at end of file diff --git a/shared/src/generated/resources/data/waystones/recipes/blue_sharestone.json b/common/src/generated/resources/data/waystones/recipes/blue_sharestone.json similarity index 78% rename from shared/src/generated/resources/data/waystones/recipes/blue_sharestone.json rename to common/src/generated/resources/data/waystones/recipes/blue_sharestone.json index 6146707a..149a6bee 100644 --- a/shared/src/generated/resources/data/waystones/recipes/blue_sharestone.json +++ b/common/src/generated/resources/data/waystones/recipes/blue_sharestone.json @@ -10,6 +10,7 @@ } ], "result": { - "item": "waystones:blue_sharestone" + "count": 1, + "id": "waystones:blue_sharestone" } } \ No newline at end of file diff --git a/shared/src/generated/resources/data/waystones/recipes/brown_sharestone.json b/common/src/generated/resources/data/waystones/recipes/brown_sharestone.json similarity index 78% rename from shared/src/generated/resources/data/waystones/recipes/brown_sharestone.json rename to common/src/generated/resources/data/waystones/recipes/brown_sharestone.json index 3b0adfe6..3dd86e7a 100644 --- a/shared/src/generated/resources/data/waystones/recipes/brown_sharestone.json +++ b/common/src/generated/resources/data/waystones/recipes/brown_sharestone.json @@ -10,6 +10,7 @@ } ], "result": { - "item": "waystones:brown_sharestone" + "count": 1, + "id": "waystones:brown_sharestone" } } \ No newline at end of file diff --git a/shared/src/generated/resources/data/waystones/recipes/cyan_sharestone.json b/common/src/generated/resources/data/waystones/recipes/cyan_sharestone.json similarity index 78% rename from shared/src/generated/resources/data/waystones/recipes/cyan_sharestone.json rename to common/src/generated/resources/data/waystones/recipes/cyan_sharestone.json index b63f9363..b8bb672b 100644 --- a/shared/src/generated/resources/data/waystones/recipes/cyan_sharestone.json +++ b/common/src/generated/resources/data/waystones/recipes/cyan_sharestone.json @@ -10,6 +10,7 @@ } ], "result": { - "item": "waystones:cyan_sharestone" + "count": 1, + "id": "waystones:cyan_sharestone" } } \ No newline at end of file diff --git a/shared/src/generated/resources/data/waystones/recipes/deepslate_waystone.json b/common/src/generated/resources/data/waystones/recipes/deepslate_waystone.json similarity index 84% rename from shared/src/generated/resources/data/waystones/recipes/deepslate_waystone.json rename to common/src/generated/resources/data/waystones/recipes/deepslate_waystone.json index 15deb27e..bf74fc4b 100644 --- a/shared/src/generated/resources/data/waystones/recipes/deepslate_waystone.json +++ b/common/src/generated/resources/data/waystones/recipes/deepslate_waystone.json @@ -18,6 +18,7 @@ "OOO" ], "result": { - "item": "waystones:deepslate_waystone" + "count": 1, + "id": "waystones:deepslate_waystone" } } \ No newline at end of file diff --git a/shared/src/generated/resources/data/waystones/recipes/end_stone_waystone.json b/common/src/generated/resources/data/waystones/recipes/end_stone_waystone.json similarity index 84% rename from shared/src/generated/resources/data/waystones/recipes/end_stone_waystone.json rename to common/src/generated/resources/data/waystones/recipes/end_stone_waystone.json index 6f7f463c..becfbf09 100644 --- a/shared/src/generated/resources/data/waystones/recipes/end_stone_waystone.json +++ b/common/src/generated/resources/data/waystones/recipes/end_stone_waystone.json @@ -18,6 +18,7 @@ "OOO" ], "result": { - "item": "waystones:end_stone_waystone" + "count": 1, + "id": "waystones:end_stone_waystone" } } \ No newline at end of file diff --git a/shared/src/generated/resources/data/waystones/recipes/gray_sharestone.json b/common/src/generated/resources/data/waystones/recipes/gray_sharestone.json similarity index 78% rename from shared/src/generated/resources/data/waystones/recipes/gray_sharestone.json rename to common/src/generated/resources/data/waystones/recipes/gray_sharestone.json index 20a02938..191f722c 100644 --- a/shared/src/generated/resources/data/waystones/recipes/gray_sharestone.json +++ b/common/src/generated/resources/data/waystones/recipes/gray_sharestone.json @@ -10,6 +10,7 @@ } ], "result": { - "item": "waystones:gray_sharestone" + "count": 1, + "id": "waystones:gray_sharestone" } } \ No newline at end of file diff --git a/shared/src/generated/resources/data/waystones/recipes/green_sharestone.json b/common/src/generated/resources/data/waystones/recipes/green_sharestone.json similarity index 78% rename from shared/src/generated/resources/data/waystones/recipes/green_sharestone.json rename to common/src/generated/resources/data/waystones/recipes/green_sharestone.json index 33cbd83a..73783f66 100644 --- a/shared/src/generated/resources/data/waystones/recipes/green_sharestone.json +++ b/common/src/generated/resources/data/waystones/recipes/green_sharestone.json @@ -10,6 +10,7 @@ } ], "result": { - "item": "waystones:green_sharestone" + "count": 1, + "id": "waystones:green_sharestone" } } \ No newline at end of file diff --git a/shared/src/generated/resources/data/waystones/recipes/landing_stone.json b/common/src/generated/resources/data/waystones/recipes/landing_stone.json similarity index 85% rename from shared/src/generated/resources/data/waystones/recipes/landing_stone.json rename to common/src/generated/resources/data/waystones/recipes/landing_stone.json index 46928257..4ce1c0ac 100644 --- a/shared/src/generated/resources/data/waystones/recipes/landing_stone.json +++ b/common/src/generated/resources/data/waystones/recipes/landing_stone.json @@ -18,6 +18,7 @@ " S " ], "result": { - "item": "waystones:landing_stone" + "count": 1, + "id": "waystones:landing_stone" } } \ No newline at end of file diff --git a/shared/src/generated/resources/data/waystones/recipes/light_blue_sharestone.json b/common/src/generated/resources/data/waystones/recipes/light_blue_sharestone.json similarity index 77% rename from shared/src/generated/resources/data/waystones/recipes/light_blue_sharestone.json rename to common/src/generated/resources/data/waystones/recipes/light_blue_sharestone.json index 9c75a5af..7b8c1b18 100644 --- a/shared/src/generated/resources/data/waystones/recipes/light_blue_sharestone.json +++ b/common/src/generated/resources/data/waystones/recipes/light_blue_sharestone.json @@ -10,6 +10,7 @@ } ], "result": { - "item": "waystones:light_blue_sharestone" + "count": 1, + "id": "waystones:light_blue_sharestone" } } \ No newline at end of file diff --git a/shared/src/generated/resources/data/waystones/recipes/light_gray_sharestone.json b/common/src/generated/resources/data/waystones/recipes/light_gray_sharestone.json similarity index 77% rename from shared/src/generated/resources/data/waystones/recipes/light_gray_sharestone.json rename to common/src/generated/resources/data/waystones/recipes/light_gray_sharestone.json index 0e984af6..a889c537 100644 --- a/shared/src/generated/resources/data/waystones/recipes/light_gray_sharestone.json +++ b/common/src/generated/resources/data/waystones/recipes/light_gray_sharestone.json @@ -10,6 +10,7 @@ } ], "result": { - "item": "waystones:light_gray_sharestone" + "count": 1, + "id": "waystones:light_gray_sharestone" } } \ No newline at end of file diff --git a/shared/src/generated/resources/data/waystones/recipes/lime_sharestone.json b/common/src/generated/resources/data/waystones/recipes/lime_sharestone.json similarity index 78% rename from shared/src/generated/resources/data/waystones/recipes/lime_sharestone.json rename to common/src/generated/resources/data/waystones/recipes/lime_sharestone.json index 77391926..3032d228 100644 --- a/shared/src/generated/resources/data/waystones/recipes/lime_sharestone.json +++ b/common/src/generated/resources/data/waystones/recipes/lime_sharestone.json @@ -10,6 +10,7 @@ } ], "result": { - "item": "waystones:lime_sharestone" + "count": 1, + "id": "waystones:lime_sharestone" } } \ No newline at end of file diff --git a/shared/src/generated/resources/data/waystones/recipes/magenta_sharestone.json b/common/src/generated/resources/data/waystones/recipes/magenta_sharestone.json similarity index 77% rename from shared/src/generated/resources/data/waystones/recipes/magenta_sharestone.json rename to common/src/generated/resources/data/waystones/recipes/magenta_sharestone.json index be4105e1..b727f59a 100644 --- a/shared/src/generated/resources/data/waystones/recipes/magenta_sharestone.json +++ b/common/src/generated/resources/data/waystones/recipes/magenta_sharestone.json @@ -10,6 +10,7 @@ } ], "result": { - "item": "waystones:magenta_sharestone" + "count": 1, + "id": "waystones:magenta_sharestone" } } \ No newline at end of file diff --git a/shared/src/generated/resources/data/waystones/recipes/mossy_waystone.json b/common/src/generated/resources/data/waystones/recipes/mossy_waystone.json similarity index 85% rename from shared/src/generated/resources/data/waystones/recipes/mossy_waystone.json rename to common/src/generated/resources/data/waystones/recipes/mossy_waystone.json index 22273b3e..010d431c 100644 --- a/shared/src/generated/resources/data/waystones/recipes/mossy_waystone.json +++ b/common/src/generated/resources/data/waystones/recipes/mossy_waystone.json @@ -18,6 +18,7 @@ "OOO" ], "result": { - "item": "waystones:mossy_waystone" + "count": 1, + "id": "waystones:mossy_waystone" } } \ No newline at end of file diff --git a/shared/src/generated/resources/data/waystones/recipes/mossy_waystone_from_vines.json b/common/src/generated/resources/data/waystones/recipes/mossy_waystone_from_vines.json similarity index 84% rename from shared/src/generated/resources/data/waystones/recipes/mossy_waystone_from_vines.json rename to common/src/generated/resources/data/waystones/recipes/mossy_waystone_from_vines.json index 034bcf15..27b89043 100644 --- a/shared/src/generated/resources/data/waystones/recipes/mossy_waystone_from_vines.json +++ b/common/src/generated/resources/data/waystones/recipes/mossy_waystone_from_vines.json @@ -16,6 +16,7 @@ } ], "result": { - "item": "waystones:mossy_waystone" + "count": 1, + "id": "waystones:mossy_waystone" } } \ No newline at end of file diff --git a/shared/src/generated/resources/data/waystones/recipes/orange_sharestone.json b/common/src/generated/resources/data/waystones/recipes/orange_sharestone.json similarity index 78% rename from shared/src/generated/resources/data/waystones/recipes/orange_sharestone.json rename to common/src/generated/resources/data/waystones/recipes/orange_sharestone.json index 7ff3165e..fda64ead 100644 --- a/shared/src/generated/resources/data/waystones/recipes/orange_sharestone.json +++ b/common/src/generated/resources/data/waystones/recipes/orange_sharestone.json @@ -10,6 +10,7 @@ } ], "result": { - "item": "waystones:orange_sharestone" + "count": 1, + "id": "waystones:orange_sharestone" } } \ No newline at end of file diff --git a/shared/src/generated/resources/data/waystones/recipes/pink_sharestone.json b/common/src/generated/resources/data/waystones/recipes/pink_sharestone.json similarity index 78% rename from shared/src/generated/resources/data/waystones/recipes/pink_sharestone.json rename to common/src/generated/resources/data/waystones/recipes/pink_sharestone.json index b2177cdf..4d0215d1 100644 --- a/shared/src/generated/resources/data/waystones/recipes/pink_sharestone.json +++ b/common/src/generated/resources/data/waystones/recipes/pink_sharestone.json @@ -10,6 +10,7 @@ } ], "result": { - "item": "waystones:pink_sharestone" + "count": 1, + "id": "waystones:pink_sharestone" } } \ No newline at end of file diff --git a/shared/src/generated/resources/data/waystones/recipes/portstone.json b/common/src/generated/resources/data/waystones/recipes/portstone.json similarity index 87% rename from shared/src/generated/resources/data/waystones/recipes/portstone.json rename to common/src/generated/resources/data/waystones/recipes/portstone.json index 5635653a..3afe87fd 100644 --- a/shared/src/generated/resources/data/waystones/recipes/portstone.json +++ b/common/src/generated/resources/data/waystones/recipes/portstone.json @@ -18,6 +18,7 @@ "BBB" ], "result": { - "item": "waystones:portstone" + "count": 1, + "id": "waystones:portstone" } } \ No newline at end of file diff --git a/shared/src/generated/resources/data/waystones/recipes/purple_sharestone.json b/common/src/generated/resources/data/waystones/recipes/purple_sharestone.json similarity index 78% rename from shared/src/generated/resources/data/waystones/recipes/purple_sharestone.json rename to common/src/generated/resources/data/waystones/recipes/purple_sharestone.json index d69b723c..5c93cb26 100644 --- a/shared/src/generated/resources/data/waystones/recipes/purple_sharestone.json +++ b/common/src/generated/resources/data/waystones/recipes/purple_sharestone.json @@ -10,6 +10,7 @@ } ], "result": { - "item": "waystones:purple_sharestone" + "count": 1, + "id": "waystones:purple_sharestone" } } \ No newline at end of file diff --git a/shared/src/generated/resources/data/waystones/recipes/red_sharestone.json b/common/src/generated/resources/data/waystones/recipes/red_sharestone.json similarity index 78% rename from shared/src/generated/resources/data/waystones/recipes/red_sharestone.json rename to common/src/generated/resources/data/waystones/recipes/red_sharestone.json index b795972e..df49b4f3 100644 --- a/shared/src/generated/resources/data/waystones/recipes/red_sharestone.json +++ b/common/src/generated/resources/data/waystones/recipes/red_sharestone.json @@ -10,6 +10,7 @@ } ], "result": { - "item": "waystones:red_sharestone" + "count": 1, + "id": "waystones:red_sharestone" } } \ No newline at end of file diff --git a/shared/src/generated/resources/data/waystones/recipes/return_scroll.json b/common/src/generated/resources/data/waystones/recipes/return_scroll.json similarity index 88% rename from shared/src/generated/resources/data/waystones/recipes/return_scroll.json rename to common/src/generated/resources/data/waystones/recipes/return_scroll.json index f3ac7336..a9bfb375 100644 --- a/shared/src/generated/resources/data/waystones/recipes/return_scroll.json +++ b/common/src/generated/resources/data/waystones/recipes/return_scroll.json @@ -18,6 +18,6 @@ ], "result": { "count": 3, - "item": "waystones:return_scroll" + "id": "waystones:return_scroll" } } \ No newline at end of file diff --git a/shared/src/generated/resources/data/waystones/recipes/sandy_waystone.json b/common/src/generated/resources/data/waystones/recipes/sandy_waystone.json similarity index 85% rename from shared/src/generated/resources/data/waystones/recipes/sandy_waystone.json rename to common/src/generated/resources/data/waystones/recipes/sandy_waystone.json index a27f6c33..cb255509 100644 --- a/shared/src/generated/resources/data/waystones/recipes/sandy_waystone.json +++ b/common/src/generated/resources/data/waystones/recipes/sandy_waystone.json @@ -18,6 +18,7 @@ "OOO" ], "result": { - "item": "waystones:sandy_waystone" + "count": 1, + "id": "waystones:sandy_waystone" } } \ No newline at end of file diff --git a/shared/src/generated/resources/data/waystones/recipes/sharestone.json b/common/src/generated/resources/data/waystones/recipes/sharestone.json similarity index 86% rename from shared/src/generated/resources/data/waystones/recipes/sharestone.json rename to common/src/generated/resources/data/waystones/recipes/sharestone.json index 168107ae..64fb4a99 100644 --- a/shared/src/generated/resources/data/waystones/recipes/sharestone.json +++ b/common/src/generated/resources/data/waystones/recipes/sharestone.json @@ -18,6 +18,7 @@ "OOO" ], "result": { - "item": "waystones:sharestone" + "count": 1, + "id": "waystones:sharestone" } } \ No newline at end of file diff --git a/shared/src/generated/resources/data/waystones/recipes/sharestone_from_dyed.json b/common/src/generated/resources/data/waystones/recipes/sharestone_from_dyed.json similarity index 81% rename from shared/src/generated/resources/data/waystones/recipes/sharestone_from_dyed.json rename to common/src/generated/resources/data/waystones/recipes/sharestone_from_dyed.json index 75d1f763..efccad48 100644 --- a/shared/src/generated/resources/data/waystones/recipes/sharestone_from_dyed.json +++ b/common/src/generated/resources/data/waystones/recipes/sharestone_from_dyed.json @@ -10,6 +10,7 @@ } ], "result": { - "item": "waystones:sharestone" + "count": 1, + "id": "waystones:sharestone" } } \ No newline at end of file diff --git a/shared/src/generated/resources/data/waystones/recipes/warp_dust.json b/common/src/generated/resources/data/waystones/recipes/warp_dust.json similarity index 87% rename from shared/src/generated/resources/data/waystones/recipes/warp_dust.json rename to common/src/generated/resources/data/waystones/recipes/warp_dust.json index f056a82f..ae349d7e 100644 --- a/shared/src/generated/resources/data/waystones/recipes/warp_dust.json +++ b/common/src/generated/resources/data/waystones/recipes/warp_dust.json @@ -11,6 +11,6 @@ ], "result": { "count": 4, - "item": "waystones:warp_dust" + "id": "waystones:warp_dust" } } \ No newline at end of file diff --git a/shared/src/generated/resources/data/waystones/recipes/warp_plate.json b/common/src/generated/resources/data/waystones/recipes/warp_plate.json similarity index 86% rename from shared/src/generated/resources/data/waystones/recipes/warp_plate.json rename to common/src/generated/resources/data/waystones/recipes/warp_plate.json index d587fb74..ddbbacd6 100644 --- a/shared/src/generated/resources/data/waystones/recipes/warp_plate.json +++ b/common/src/generated/resources/data/waystones/recipes/warp_plate.json @@ -18,6 +18,7 @@ "SWS" ], "result": { - "item": "waystones:warp_plate" + "count": 1, + "id": "waystones:warp_plate" } } \ No newline at end of file diff --git a/shared/src/generated/resources/data/waystones/recipes/warp_scroll.json b/common/src/generated/resources/data/waystones/recipes/warp_scroll.json similarity index 91% rename from shared/src/generated/resources/data/waystones/recipes/warp_scroll.json rename to common/src/generated/resources/data/waystones/recipes/warp_scroll.json index 87c75059..b470deea 100644 --- a/shared/src/generated/resources/data/waystones/recipes/warp_scroll.json +++ b/common/src/generated/resources/data/waystones/recipes/warp_scroll.json @@ -22,6 +22,6 @@ ], "result": { "count": 3, - "item": "waystones:warp_scroll" + "id": "waystones:warp_scroll" } } \ No newline at end of file diff --git a/shared/src/generated/resources/data/waystones/recipes/warp_stone.json b/common/src/generated/resources/data/waystones/recipes/warp_stone.json similarity index 86% rename from shared/src/generated/resources/data/waystones/recipes/warp_stone.json rename to common/src/generated/resources/data/waystones/recipes/warp_stone.json index 3fd426fb..62daf052 100644 --- a/shared/src/generated/resources/data/waystones/recipes/warp_stone.json +++ b/common/src/generated/resources/data/waystones/recipes/warp_stone.json @@ -18,6 +18,7 @@ "DED" ], "result": { - "item": "waystones:warp_stone" + "count": 1, + "id": "waystones:warp_stone" } } \ No newline at end of file diff --git a/shared/src/generated/resources/data/waystones/recipes/waystone.json b/common/src/generated/resources/data/waystones/recipes/waystone.json similarity index 86% rename from shared/src/generated/resources/data/waystones/recipes/waystone.json rename to common/src/generated/resources/data/waystones/recipes/waystone.json index b776a9af..91c9f591 100644 --- a/shared/src/generated/resources/data/waystones/recipes/waystone.json +++ b/common/src/generated/resources/data/waystones/recipes/waystone.json @@ -18,6 +18,7 @@ "OOO" ], "result": { - "item": "waystones:waystone" + "count": 1, + "id": "waystones:waystone" } } \ No newline at end of file diff --git a/shared/src/generated/resources/data/waystones/recipes/white_sharestone.json b/common/src/generated/resources/data/waystones/recipes/white_sharestone.json similarity index 78% rename from shared/src/generated/resources/data/waystones/recipes/white_sharestone.json rename to common/src/generated/resources/data/waystones/recipes/white_sharestone.json index 8a37d57e..77aabe23 100644 --- a/shared/src/generated/resources/data/waystones/recipes/white_sharestone.json +++ b/common/src/generated/resources/data/waystones/recipes/white_sharestone.json @@ -10,6 +10,7 @@ } ], "result": { - "item": "waystones:white_sharestone" + "count": 1, + "id": "waystones:white_sharestone" } } \ No newline at end of file diff --git a/shared/src/generated/resources/data/waystones/recipes/yellow_sharestone.json b/common/src/generated/resources/data/waystones/recipes/yellow_sharestone.json similarity index 78% rename from shared/src/generated/resources/data/waystones/recipes/yellow_sharestone.json rename to common/src/generated/resources/data/waystones/recipes/yellow_sharestone.json index be8f1f49..25b20b64 100644 --- a/shared/src/generated/resources/data/waystones/recipes/yellow_sharestone.json +++ b/common/src/generated/resources/data/waystones/recipes/yellow_sharestone.json @@ -10,6 +10,7 @@ } ], "result": { - "item": "waystones:yellow_sharestone" + "count": 1, + "id": "waystones:yellow_sharestone" } } \ No newline at end of file diff --git a/shared/src/generated/resources/data/waystones/tags/blocks/dyed_sharestones.json b/common/src/generated/resources/data/waystones/tags/blocks/dyed_sharestones.json similarity index 96% rename from shared/src/generated/resources/data/waystones/tags/blocks/dyed_sharestones.json rename to common/src/generated/resources/data/waystones/tags/blocks/dyed_sharestones.json index b4261755..8ca8458f 100644 --- a/shared/src/generated/resources/data/waystones/tags/blocks/dyed_sharestones.json +++ b/common/src/generated/resources/data/waystones/tags/blocks/dyed_sharestones.json @@ -1,5 +1,4 @@ { - "replace": false, "values": [ "waystones:white_sharestone", "waystones:orange_sharestone", diff --git a/shared/src/generated/resources/data/waystones/tags/blocks/is_teleport_target.json b/common/src/generated/resources/data/waystones/tags/blocks/is_teleport_target.json similarity index 97% rename from shared/src/generated/resources/data/waystones/tags/blocks/is_teleport_target.json rename to common/src/generated/resources/data/waystones/tags/blocks/is_teleport_target.json index 2b53f517..f20f9c52 100644 --- a/shared/src/generated/resources/data/waystones/tags/blocks/is_teleport_target.json +++ b/common/src/generated/resources/data/waystones/tags/blocks/is_teleport_target.json @@ -1,5 +1,4 @@ { - "replace": false, "values": [ "waystones:waystone", "waystones:sandy_waystone", diff --git a/shared/src/generated/resources/data/waystones/tags/blocks/sharestones.json b/common/src/generated/resources/data/waystones/tags/blocks/sharestones.json similarity index 96% rename from shared/src/generated/resources/data/waystones/tags/blocks/sharestones.json rename to common/src/generated/resources/data/waystones/tags/blocks/sharestones.json index 3cff5d11..aefd82d0 100644 --- a/shared/src/generated/resources/data/waystones/tags/blocks/sharestones.json +++ b/common/src/generated/resources/data/waystones/tags/blocks/sharestones.json @@ -1,5 +1,4 @@ { - "replace": false, "values": [ "waystones:sharestone", "waystones:white_sharestone", diff --git a/shared/src/generated/resources/data/waystones/tags/blocks/waystones.json b/common/src/generated/resources/data/waystones/tags/blocks/waystones.json similarity index 91% rename from shared/src/generated/resources/data/waystones/tags/blocks/waystones.json rename to common/src/generated/resources/data/waystones/tags/blocks/waystones.json index 96079d6f..2bac38aa 100644 --- a/shared/src/generated/resources/data/waystones/tags/blocks/waystones.json +++ b/common/src/generated/resources/data/waystones/tags/blocks/waystones.json @@ -1,5 +1,4 @@ { - "replace": false, "values": [ "waystones:waystone", "waystones:sandy_waystone", diff --git a/shared/src/generated/resources/data/waystones/tags/items/bound_scrolls.json b/common/src/generated/resources/data/waystones/tags/items/bound_scrolls.json similarity index 71% rename from shared/src/generated/resources/data/waystones/tags/items/bound_scrolls.json rename to common/src/generated/resources/data/waystones/tags/items/bound_scrolls.json index d816f023..a36baf86 100644 --- a/shared/src/generated/resources/data/waystones/tags/items/bound_scrolls.json +++ b/common/src/generated/resources/data/waystones/tags/items/bound_scrolls.json @@ -1,5 +1,4 @@ { - "replace": false, "values": [ "waystones:bound_scroll" ] diff --git a/shared/src/generated/resources/data/waystones/tags/items/dyed_sharestones.json b/common/src/generated/resources/data/waystones/tags/items/dyed_sharestones.json similarity index 96% rename from shared/src/generated/resources/data/waystones/tags/items/dyed_sharestones.json rename to common/src/generated/resources/data/waystones/tags/items/dyed_sharestones.json index b4261755..8ca8458f 100644 --- a/shared/src/generated/resources/data/waystones/tags/items/dyed_sharestones.json +++ b/common/src/generated/resources/data/waystones/tags/items/dyed_sharestones.json @@ -1,5 +1,4 @@ { - "replace": false, "values": [ "waystones:white_sharestone", "waystones:orange_sharestone", diff --git a/shared/src/generated/resources/data/waystones/tags/items/return_scrolls.json b/common/src/generated/resources/data/waystones/tags/items/return_scrolls.json similarity index 71% rename from shared/src/generated/resources/data/waystones/tags/items/return_scrolls.json rename to common/src/generated/resources/data/waystones/tags/items/return_scrolls.json index 30d1bc2a..68dc7f24 100644 --- a/shared/src/generated/resources/data/waystones/tags/items/return_scrolls.json +++ b/common/src/generated/resources/data/waystones/tags/items/return_scrolls.json @@ -1,5 +1,4 @@ { - "replace": false, "values": [ "waystones:return_scroll" ] diff --git a/common/src/generated/resources/data/waystones/tags/items/scrolls.json b/common/src/generated/resources/data/waystones/tags/items/scrolls.json new file mode 100644 index 00000000..9fe85358 --- /dev/null +++ b/common/src/generated/resources/data/waystones/tags/items/scrolls.json @@ -0,0 +1,7 @@ +{ + "values": [ + "waystones:warp_scroll", + "waystones:return_scroll", + "waystones:bound_scroll" + ] +} \ No newline at end of file diff --git a/shared/src/generated/resources/data/waystones/tags/items/sharestones.json b/common/src/generated/resources/data/waystones/tags/items/sharestones.json similarity index 96% rename from shared/src/generated/resources/data/waystones/tags/items/sharestones.json rename to common/src/generated/resources/data/waystones/tags/items/sharestones.json index 3cff5d11..aefd82d0 100644 --- a/shared/src/generated/resources/data/waystones/tags/items/sharestones.json +++ b/common/src/generated/resources/data/waystones/tags/items/sharestones.json @@ -1,5 +1,4 @@ { - "replace": false, "values": [ "waystones:sharestone", "waystones:white_sharestone", diff --git a/shared/src/generated/resources/data/waystones/tags/items/single_use_warp_shards.json b/common/src/generated/resources/data/waystones/tags/items/single_use_warp_shards.json similarity index 75% rename from shared/src/generated/resources/data/waystones/tags/items/single_use_warp_shards.json rename to common/src/generated/resources/data/waystones/tags/items/single_use_warp_shards.json index 498e0da2..3cd7a8b9 100644 --- a/shared/src/generated/resources/data/waystones/tags/items/single_use_warp_shards.json +++ b/common/src/generated/resources/data/waystones/tags/items/single_use_warp_shards.json @@ -1,5 +1,4 @@ { - "replace": false, "values": [ "waystones:crumbling_attuned_shard" ] diff --git a/shared/src/generated/resources/data/waystones/tags/items/warp_scrolls.json b/common/src/generated/resources/data/waystones/tags/items/warp_scrolls.json similarity index 71% rename from shared/src/generated/resources/data/waystones/tags/items/warp_scrolls.json rename to common/src/generated/resources/data/waystones/tags/items/warp_scrolls.json index a5644858..ef062056 100644 --- a/shared/src/generated/resources/data/waystones/tags/items/warp_scrolls.json +++ b/common/src/generated/resources/data/waystones/tags/items/warp_scrolls.json @@ -1,5 +1,4 @@ { - "replace": false, "values": [ "waystones:warp_scroll" ] diff --git a/shared/src/generated/resources/data/waystones/tags/items/warp_shards.json b/common/src/generated/resources/data/waystones/tags/items/warp_shards.json similarity index 82% rename from shared/src/generated/resources/data/waystones/tags/items/warp_shards.json rename to common/src/generated/resources/data/waystones/tags/items/warp_shards.json index 7d265917..2112e358 100644 --- a/shared/src/generated/resources/data/waystones/tags/items/warp_shards.json +++ b/common/src/generated/resources/data/waystones/tags/items/warp_shards.json @@ -1,5 +1,4 @@ { - "replace": false, "values": [ "waystones:attuned_shard", "waystones:crumbling_attuned_shard" diff --git a/shared/src/generated/resources/data/waystones/tags/items/warp_stones.json b/common/src/generated/resources/data/waystones/tags/items/warp_stones.json similarity index 70% rename from shared/src/generated/resources/data/waystones/tags/items/warp_stones.json rename to common/src/generated/resources/data/waystones/tags/items/warp_stones.json index 6515823a..93ac20eb 100644 --- a/shared/src/generated/resources/data/waystones/tags/items/warp_stones.json +++ b/common/src/generated/resources/data/waystones/tags/items/warp_stones.json @@ -1,5 +1,4 @@ { - "replace": false, "values": [ "waystones:warp_stone" ] diff --git a/shared/src/generated/resources/data/waystones/tags/items/waystones.json b/common/src/generated/resources/data/waystones/tags/items/waystones.json similarity index 91% rename from shared/src/generated/resources/data/waystones/tags/items/waystones.json rename to common/src/generated/resources/data/waystones/tags/items/waystones.json index e8bce3fe..11eac22d 100644 --- a/shared/src/generated/resources/data/waystones/tags/items/waystones.json +++ b/common/src/generated/resources/data/waystones/tags/items/waystones.json @@ -1,5 +1,4 @@ { - "replace": false, "values": [ "waystones:waystone", "waystones:mossy_waystone", diff --git a/shared/src/generated/resources/data/waystones/tags/worldgen/biome/is_desert.json b/common/src/generated/resources/data/waystones/tags/worldgen/biome/is_desert.json similarity index 68% rename from shared/src/generated/resources/data/waystones/tags/worldgen/biome/is_desert.json rename to common/src/generated/resources/data/waystones/tags/worldgen/biome/is_desert.json index ff757c03..f1a8ccb6 100644 --- a/shared/src/generated/resources/data/waystones/tags/worldgen/biome/is_desert.json +++ b/common/src/generated/resources/data/waystones/tags/worldgen/biome/is_desert.json @@ -1,5 +1,4 @@ { - "replace": false, "values": [ "minecraft:desert" ] diff --git a/shared/src/generated/resources/data/waystones/tags/worldgen/biome/is_mushroom.json b/common/src/generated/resources/data/waystones/tags/worldgen/biome/is_mushroom.json similarity index 72% rename from shared/src/generated/resources/data/waystones/tags/worldgen/biome/is_mushroom.json rename to common/src/generated/resources/data/waystones/tags/worldgen/biome/is_mushroom.json index f97ef264..05d85d95 100644 --- a/shared/src/generated/resources/data/waystones/tags/worldgen/biome/is_mushroom.json +++ b/common/src/generated/resources/data/waystones/tags/worldgen/biome/is_mushroom.json @@ -1,5 +1,4 @@ { - "replace": false, "values": [ "minecraft:mushroom_fields" ] diff --git a/shared/src/generated/resources/data/waystones/tags/worldgen/biome/is_swamp.json b/common/src/generated/resources/data/waystones/tags/worldgen/biome/is_swamp.json similarity index 78% rename from shared/src/generated/resources/data/waystones/tags/worldgen/biome/is_swamp.json rename to common/src/generated/resources/data/waystones/tags/worldgen/biome/is_swamp.json index 47144e62..0f5eb22e 100644 --- a/shared/src/generated/resources/data/waystones/tags/worldgen/biome/is_swamp.json +++ b/common/src/generated/resources/data/waystones/tags/worldgen/biome/is_swamp.json @@ -1,5 +1,4 @@ { - "replace": false, "values": [ "minecraft:swamp", "minecraft:mangrove_swamp" diff --git a/shared/src/main/java/net/blay09/mods/waystones/InternalClientMethodsImpl.java b/common/src/main/java/net/blay09/mods/waystones/InternalClientMethodsImpl.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/InternalClientMethodsImpl.java rename to common/src/main/java/net/blay09/mods/waystones/InternalClientMethodsImpl.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/InternalMethodsImpl.java b/common/src/main/java/net/blay09/mods/waystones/InternalMethodsImpl.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/InternalMethodsImpl.java rename to common/src/main/java/net/blay09/mods/waystones/InternalMethodsImpl.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/Waystones.java b/common/src/main/java/net/blay09/mods/waystones/Waystones.java similarity index 94% rename from shared/src/main/java/net/blay09/mods/waystones/Waystones.java rename to common/src/main/java/net/blay09/mods/waystones/Waystones.java index 376e5e9d..698d9711 100644 --- a/shared/src/main/java/net/blay09/mods/waystones/Waystones.java +++ b/common/src/main/java/net/blay09/mods/waystones/Waystones.java @@ -5,6 +5,7 @@ import net.blay09.mods.waystones.block.ModBlocks; import net.blay09.mods.waystones.block.entity.ModBlockEntities; import net.blay09.mods.waystones.command.ModCommands; +import net.blay09.mods.waystones.component.ModComponents; import net.blay09.mods.waystones.config.WaystonesConfig; import net.blay09.mods.waystones.requirement.RequirementRegistry; import net.blay09.mods.waystones.handler.ModEventHandlers; @@ -38,6 +39,7 @@ public static void initialize() { ModWorldGen.initialize(Balm.getWorldGen()); ModRecipes.initialize(Balm.getRecipes()); ModCommands.initialize(Balm.getCommands()); + ModComponents.initialize(Balm.getComponents()); if (WaystonesConfig.getActive().compatibility.blueMap) { Balm.initializeIfLoaded("bluemap", "net.blay09.mods.waystones.compat.BlueMapIntegration"); diff --git a/shared/src/main/java/net/blay09/mods/waystones/api/InternalMethods.java b/common/src/main/java/net/blay09/mods/waystones/api/InternalMethods.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/api/InternalMethods.java rename to common/src/main/java/net/blay09/mods/waystones/api/InternalMethods.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/api/MutableWaystone.java b/common/src/main/java/net/blay09/mods/waystones/api/MutableWaystone.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/api/MutableWaystone.java rename to common/src/main/java/net/blay09/mods/waystones/api/MutableWaystone.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/api/TeleportDestination.java b/common/src/main/java/net/blay09/mods/waystones/api/TeleportDestination.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/api/TeleportDestination.java rename to common/src/main/java/net/blay09/mods/waystones/api/TeleportDestination.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/api/TeleportFlags.java b/common/src/main/java/net/blay09/mods/waystones/api/TeleportFlags.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/api/TeleportFlags.java rename to common/src/main/java/net/blay09/mods/waystones/api/TeleportFlags.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/api/Waystone.java b/common/src/main/java/net/blay09/mods/waystones/api/Waystone.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/api/Waystone.java rename to common/src/main/java/net/blay09/mods/waystones/api/Waystone.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/api/WaystoneCooldowns.java b/common/src/main/java/net/blay09/mods/waystones/api/WaystoneCooldowns.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/api/WaystoneCooldowns.java rename to common/src/main/java/net/blay09/mods/waystones/api/WaystoneCooldowns.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/api/WaystoneManager.java b/common/src/main/java/net/blay09/mods/waystones/api/WaystoneManager.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/api/WaystoneManager.java rename to common/src/main/java/net/blay09/mods/waystones/api/WaystoneManager.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/api/WaystoneOrigin.java b/common/src/main/java/net/blay09/mods/waystones/api/WaystoneOrigin.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/api/WaystoneOrigin.java rename to common/src/main/java/net/blay09/mods/waystones/api/WaystoneOrigin.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/api/WaystoneStyle.java b/common/src/main/java/net/blay09/mods/waystones/api/WaystoneStyle.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/api/WaystoneStyle.java rename to common/src/main/java/net/blay09/mods/waystones/api/WaystoneStyle.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/api/WaystoneStyles.java b/common/src/main/java/net/blay09/mods/waystones/api/WaystoneStyles.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/api/WaystoneStyles.java rename to common/src/main/java/net/blay09/mods/waystones/api/WaystoneStyles.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/api/WaystoneTeleportContext.java b/common/src/main/java/net/blay09/mods/waystones/api/WaystoneTeleportContext.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/api/WaystoneTeleportContext.java rename to common/src/main/java/net/blay09/mods/waystones/api/WaystoneTeleportContext.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/api/WaystoneTypes.java b/common/src/main/java/net/blay09/mods/waystones/api/WaystoneTypes.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/api/WaystoneTypes.java rename to common/src/main/java/net/blay09/mods/waystones/api/WaystoneTypes.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/api/WaystoneVisibility.java b/common/src/main/java/net/blay09/mods/waystones/api/WaystoneVisibility.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/api/WaystoneVisibility.java rename to common/src/main/java/net/blay09/mods/waystones/api/WaystoneVisibility.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/api/WaystonesAPI.java b/common/src/main/java/net/blay09/mods/waystones/api/WaystonesAPI.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/api/WaystonesAPI.java rename to common/src/main/java/net/blay09/mods/waystones/api/WaystonesAPI.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/api/client/InternalClientMethods.java b/common/src/main/java/net/blay09/mods/waystones/api/client/InternalClientMethods.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/api/client/InternalClientMethods.java rename to common/src/main/java/net/blay09/mods/waystones/api/client/InternalClientMethods.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/api/client/WaystonesClientAPI.java b/common/src/main/java/net/blay09/mods/waystones/api/client/WaystonesClientAPI.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/api/client/WaystonesClientAPI.java rename to common/src/main/java/net/blay09/mods/waystones/api/client/WaystonesClientAPI.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/api/error/WaystoneEditError.java b/common/src/main/java/net/blay09/mods/waystones/api/error/WaystoneEditError.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/api/error/WaystoneEditError.java rename to common/src/main/java/net/blay09/mods/waystones/api/error/WaystoneEditError.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/api/error/WaystoneTeleportError.java b/common/src/main/java/net/blay09/mods/waystones/api/error/WaystoneTeleportError.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/api/error/WaystoneTeleportError.java rename to common/src/main/java/net/blay09/mods/waystones/api/error/WaystoneTeleportError.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/api/event/EventResult.java b/common/src/main/java/net/blay09/mods/waystones/api/event/EventResult.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/api/event/EventResult.java rename to common/src/main/java/net/blay09/mods/waystones/api/event/EventResult.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/api/event/GenerateWaystoneNameEvent.java b/common/src/main/java/net/blay09/mods/waystones/api/event/GenerateWaystoneNameEvent.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/api/event/GenerateWaystoneNameEvent.java rename to common/src/main/java/net/blay09/mods/waystones/api/event/GenerateWaystoneNameEvent.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/api/event/WaystoneActivatedEvent.java b/common/src/main/java/net/blay09/mods/waystones/api/event/WaystoneActivatedEvent.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/api/event/WaystoneActivatedEvent.java rename to common/src/main/java/net/blay09/mods/waystones/api/event/WaystoneActivatedEvent.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/api/event/WaystoneInitializedEvent.java b/common/src/main/java/net/blay09/mods/waystones/api/event/WaystoneInitializedEvent.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/api/event/WaystoneInitializedEvent.java rename to common/src/main/java/net/blay09/mods/waystones/api/event/WaystoneInitializedEvent.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/api/event/WaystoneRemoveReceivedEvent.java b/common/src/main/java/net/blay09/mods/waystones/api/event/WaystoneRemoveReceivedEvent.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/api/event/WaystoneRemoveReceivedEvent.java rename to common/src/main/java/net/blay09/mods/waystones/api/event/WaystoneRemoveReceivedEvent.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/api/event/WaystoneRemovedEvent.java b/common/src/main/java/net/blay09/mods/waystones/api/event/WaystoneRemovedEvent.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/api/event/WaystoneRemovedEvent.java rename to common/src/main/java/net/blay09/mods/waystones/api/event/WaystoneRemovedEvent.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/api/event/WaystoneTeleportEvent.java b/common/src/main/java/net/blay09/mods/waystones/api/event/WaystoneTeleportEvent.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/api/event/WaystoneTeleportEvent.java rename to common/src/main/java/net/blay09/mods/waystones/api/event/WaystoneTeleportEvent.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/api/event/WaystoneUpdateReceivedEvent.java b/common/src/main/java/net/blay09/mods/waystones/api/event/WaystoneUpdateReceivedEvent.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/api/event/WaystoneUpdateReceivedEvent.java rename to common/src/main/java/net/blay09/mods/waystones/api/event/WaystoneUpdateReceivedEvent.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/api/event/WaystoneUpdatedEvent.java b/common/src/main/java/net/blay09/mods/waystones/api/event/WaystoneUpdatedEvent.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/api/event/WaystoneUpdatedEvent.java rename to common/src/main/java/net/blay09/mods/waystones/api/event/WaystoneUpdatedEvent.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/api/event/WaystonesListReceivedEvent.java b/common/src/main/java/net/blay09/mods/waystones/api/event/WaystonesListReceivedEvent.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/api/event/WaystonesListReceivedEvent.java rename to common/src/main/java/net/blay09/mods/waystones/api/event/WaystonesListReceivedEvent.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/api/event/WaystonesLoadedEvent.java b/common/src/main/java/net/blay09/mods/waystones/api/event/WaystonesLoadedEvent.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/api/event/WaystonesLoadedEvent.java rename to common/src/main/java/net/blay09/mods/waystones/api/event/WaystonesLoadedEvent.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/api/requirement/ConditionResolver.java b/common/src/main/java/net/blay09/mods/waystones/api/requirement/ConditionResolver.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/api/requirement/ConditionResolver.java rename to common/src/main/java/net/blay09/mods/waystones/api/requirement/ConditionResolver.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/api/requirement/ParameterSerializer.java b/common/src/main/java/net/blay09/mods/waystones/api/requirement/ParameterSerializer.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/api/requirement/ParameterSerializer.java rename to common/src/main/java/net/blay09/mods/waystones/api/requirement/ParameterSerializer.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/api/requirement/RequirementFunction.java b/common/src/main/java/net/blay09/mods/waystones/api/requirement/RequirementFunction.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/api/requirement/RequirementFunction.java rename to common/src/main/java/net/blay09/mods/waystones/api/requirement/RequirementFunction.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/api/requirement/RequirementType.java b/common/src/main/java/net/blay09/mods/waystones/api/requirement/RequirementType.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/api/requirement/RequirementType.java rename to common/src/main/java/net/blay09/mods/waystones/api/requirement/RequirementType.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/api/requirement/VariableResolver.java b/common/src/main/java/net/blay09/mods/waystones/api/requirement/VariableResolver.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/api/requirement/VariableResolver.java rename to common/src/main/java/net/blay09/mods/waystones/api/requirement/VariableResolver.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/api/requirement/WarpRequirement.java b/common/src/main/java/net/blay09/mods/waystones/api/requirement/WarpRequirement.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/api/requirement/WarpRequirement.java rename to common/src/main/java/net/blay09/mods/waystones/api/requirement/WarpRequirement.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/api/requirement/WarpRequirementModifierFunction.java b/common/src/main/java/net/blay09/mods/waystones/api/requirement/WarpRequirementModifierFunction.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/api/requirement/WarpRequirementModifierFunction.java rename to common/src/main/java/net/blay09/mods/waystones/api/requirement/WarpRequirementModifierFunction.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/api/requirement/WarpRequirementsContext.java b/common/src/main/java/net/blay09/mods/waystones/api/requirement/WarpRequirementsContext.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/api/requirement/WarpRequirementsContext.java rename to common/src/main/java/net/blay09/mods/waystones/api/requirement/WarpRequirementsContext.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/api/trait/IAttunementItem.java b/common/src/main/java/net/blay09/mods/waystones/api/trait/IAttunementItem.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/api/trait/IAttunementItem.java rename to common/src/main/java/net/blay09/mods/waystones/api/trait/IAttunementItem.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/api/trait/IFOVOnUse.java b/common/src/main/java/net/blay09/mods/waystones/api/trait/IFOVOnUse.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/api/trait/IFOVOnUse.java rename to common/src/main/java/net/blay09/mods/waystones/api/trait/IFOVOnUse.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/api/trait/IResetUseOnDamage.java b/common/src/main/java/net/blay09/mods/waystones/api/trait/IResetUseOnDamage.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/api/trait/IResetUseOnDamage.java rename to common/src/main/java/net/blay09/mods/waystones/api/trait/IResetUseOnDamage.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/block/LandingStoneBlock.java b/common/src/main/java/net/blay09/mods/waystones/block/LandingStoneBlock.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/block/LandingStoneBlock.java rename to common/src/main/java/net/blay09/mods/waystones/block/LandingStoneBlock.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/block/ModBlocks.java b/common/src/main/java/net/blay09/mods/waystones/block/ModBlocks.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/block/ModBlocks.java rename to common/src/main/java/net/blay09/mods/waystones/block/ModBlocks.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/block/PortstoneBlock.java b/common/src/main/java/net/blay09/mods/waystones/block/PortstoneBlock.java similarity index 86% rename from shared/src/main/java/net/blay09/mods/waystones/block/PortstoneBlock.java rename to common/src/main/java/net/blay09/mods/waystones/block/PortstoneBlock.java index 3df0ef49..3148005b 100644 --- a/shared/src/main/java/net/blay09/mods/waystones/block/PortstoneBlock.java +++ b/common/src/main/java/net/blay09/mods/waystones/block/PortstoneBlock.java @@ -3,6 +3,7 @@ import com.mojang.serialization.MapCodec; import net.blay09.mods.balm.api.Balm; import net.blay09.mods.balm.api.menu.BalmMenuProvider; +import net.blay09.mods.waystones.api.Waystone; import net.blay09.mods.waystones.block.entity.PortstoneBlockEntity; import net.blay09.mods.waystones.core.PlayerWaystoneManager; import net.blay09.mods.waystones.menu.ModMenus; @@ -12,13 +13,16 @@ import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.network.RegistryFriendlyByteBuf; import net.minecraft.network.chat.Component; +import net.minecraft.network.codec.StreamCodec; import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; import net.minecraft.world.entity.player.Inventory; import net.minecraft.world.entity.player.Player; import net.minecraft.world.inventory.AbstractContainerMenu; +import net.minecraft.world.item.Item; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.TooltipFlag; import net.minecraft.world.level.BlockGetter; @@ -36,6 +40,7 @@ import net.minecraft.world.phys.shapes.VoxelShape; import org.jetbrains.annotations.Nullable; +import java.util.Collection; import java.util.Collections; import java.util.List; @@ -123,11 +128,11 @@ public BlockEntity newBlockEntity(BlockPos pos, BlockState state) { } @Override - public InteractionResult use(BlockState state, Level world, BlockPos pos, Player player, InteractionHand hand, BlockHitResult blockHitResult) { + public InteractionResult useWithoutItem(BlockState state, Level world, BlockPos pos, Player player, BlockHitResult blockHitResult) { if (!world.isClientSide) { final var waystones = PlayerWaystoneManager.getTargetsForPlayer(player); PlayerWaystoneManager.ensureSortingIndex(player, waystones); - Balm.getNetworking().openGui(player, new BalmMenuProvider() { + Balm.getNetworking().openGui(player, new BalmMenuProvider>() { @Override public Component getDisplayName() { return Component.translatable("block.waystones.portstone"); @@ -139,8 +144,13 @@ public AbstractContainerMenu createMenu(int windowId, Inventory inventory, Playe } @Override - public void writeScreenOpeningData(ServerPlayer player, FriendlyByteBuf buf) { - WaystoneImpl.writeList(buf, waystones); + public Collection getScreenOpeningData(ServerPlayer serverPlayer) { + return waystones; + } + + @Override + public StreamCodec> getScreenStreamCodec() { + return WaystoneImpl.LIST_STREAM_CODEC; } }); } @@ -154,17 +164,17 @@ protected void createBlockStateDefinition(StateDefinition.Builder list, TooltipFlag flag) { + public void appendHoverText(ItemStack stack, Item.TooltipContext context, List list, TooltipFlag flag) { var component = Component.translatable("tooltip.waystones.portstone"); component.withStyle(ChatFormatting.GRAY); list.add(component); - super.appendHoverText(stack, world, list, flag); + super.appendHoverText(stack, context, list, flag); } @Override diff --git a/shared/src/main/java/net/blay09/mods/waystones/block/SharestoneBlock.java b/common/src/main/java/net/blay09/mods/waystones/block/SharestoneBlock.java similarity index 95% rename from shared/src/main/java/net/blay09/mods/waystones/block/SharestoneBlock.java rename to common/src/main/java/net/blay09/mods/waystones/block/SharestoneBlock.java index a0281af3..8eb7d2bd 100644 --- a/shared/src/main/java/net/blay09/mods/waystones/block/SharestoneBlock.java +++ b/common/src/main/java/net/blay09/mods/waystones/block/SharestoneBlock.java @@ -13,6 +13,7 @@ import net.minecraft.world.InteractionResult; import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.DyeColor; +import net.minecraft.world.item.Item; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.TooltipFlag; import net.minecraft.world.level.BlockGetter; @@ -82,12 +83,12 @@ protected InteractionResult handleActivation(Level world, BlockPos pos, Player p } @Override - public void appendHoverText(ItemStack stack, @Nullable BlockGetter world, List list, TooltipFlag flag) { + public void appendHoverText(ItemStack stack, Item.TooltipContext context, List list, TooltipFlag flag) { var component = Component.translatable(color != null ? "tooltip.waystones." + color.getSerializedName() + "_sharestone" : "tooltip.waystones.sharestone"); component.withStyle(ChatFormatting.GRAY); list.add(component); - super.appendHoverText(stack, world, list, flag); + super.appendHoverText(stack, context, list, flag); } @Override diff --git a/shared/src/main/java/net/blay09/mods/waystones/block/WarpPlateBlock.java b/common/src/main/java/net/blay09/mods/waystones/block/WarpPlateBlock.java similarity index 97% rename from shared/src/main/java/net/blay09/mods/waystones/block/WarpPlateBlock.java rename to common/src/main/java/net/blay09/mods/waystones/block/WarpPlateBlock.java index d162e3b3..7551f41e 100644 --- a/shared/src/main/java/net/blay09/mods/waystones/block/WarpPlateBlock.java +++ b/common/src/main/java/net/blay09/mods/waystones/block/WarpPlateBlock.java @@ -9,6 +9,8 @@ import net.blay09.mods.waystones.core.WaystoneProxy; import net.minecraft.ChatFormatting; import net.minecraft.core.BlockPos; +import net.minecraft.core.component.DataComponentType; +import net.minecraft.core.component.DataComponents; import net.minecraft.core.particles.ParticleTypes; import net.minecraft.network.chat.Component; import net.minecraft.network.chat.Style; @@ -78,7 +80,7 @@ protected boolean canSilkTouch() { public void setPlacedBy(Level world, BlockPos pos, BlockState state, @Nullable LivingEntity placer, ItemStack stack) { super.setPlacedBy(world, pos, state, placer, stack); - if (stack.hasCustomHoverName()) { + if (stack.has(DataComponents.CUSTOM_NAME)) { BlockEntity tileEntity = world.getBlockEntity(pos); if (tileEntity instanceof WarpPlateBlockEntity warpPlate) { warpPlate.setCustomName(stack.getHoverName()); diff --git a/shared/src/main/java/net/blay09/mods/waystones/block/WaystoneBlock.java b/common/src/main/java/net/blay09/mods/waystones/block/WaystoneBlock.java similarity index 97% rename from shared/src/main/java/net/blay09/mods/waystones/block/WaystoneBlock.java rename to common/src/main/java/net/blay09/mods/waystones/block/WaystoneBlock.java index 8ad08ef3..b5d09583 100644 --- a/shared/src/main/java/net/blay09/mods/waystones/block/WaystoneBlock.java +++ b/common/src/main/java/net/blay09/mods/waystones/block/WaystoneBlock.java @@ -153,7 +153,7 @@ protected void createBlockStateDefinition(StateDefinition.Builder list, TooltipFlag flag) { - super.appendHoverText(stack, world, list, flag); + public void appendHoverText(ItemStack stack, Item.TooltipContext context, List list, TooltipFlag flag) { + super.appendHoverText(stack, context, list, flag); - CompoundTag tag = stack.getTag(); - if (tag != null && tag.contains("UUID", IntArrayTag.TAG_INT_ARRAY)) { - WaystoneProxy waystone = new WaystoneProxy(null, NbtUtils.loadUUID(Objects.requireNonNull(tag.get("UUID")))); + final var waystoneUid = stack.get(ModComponents.waystone.get()); + if (waystoneUid != null) { + WaystoneProxy waystone = new WaystoneProxy(null, waystoneUid); if (waystone.isValid()) { addWaystoneNameToTooltip(list, waystone); } @@ -283,25 +285,31 @@ protected void addWaystoneNameToTooltip(List tooltip, WaystoneProxy w } @Override - public InteractionResult use(BlockState state, Level world, BlockPos pos, Player player, InteractionHand hand, BlockHitResult blockHitResult) { - BlockEntity blockEntity = world.getBlockEntity(pos); - if (blockEntity instanceof WaystoneBlockEntityBase) { - WaystoneBlockEntityBase waystoneTileEntity = (WaystoneBlockEntityBase) blockEntity; - InteractionResult result = handleDebugActions(world, player, hand, waystoneTileEntity); - if (result != null) { - return result; - } + protected ItemInteractionResult useItemOn(ItemStack itemStack, BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, BlockHitResult blockHitResult) { + final var blockEntity = level.getBlockEntity(pos); + if (!(blockEntity instanceof WaystoneBlockEntityBase waystoneBlockEntity)) { + return ItemInteractionResult.FAIL; + } - Waystone waystone = waystoneTileEntity.getWaystone(); - result = handleEditActions(world, player, waystoneTileEntity, waystone); - if (result != null) { - return result; - } + return handleDebugActions(level, player, itemStack, waystoneBlockEntity); + } - result = handleActivation(world, pos, player, waystoneTileEntity, waystone); - if (result != null) { - return result; - } + @Override + public InteractionResult useWithoutItem(BlockState state, Level level, BlockPos pos, Player player, BlockHitResult blockHitResult) { + final var blockEntity = level.getBlockEntity(pos); + if (!(blockEntity instanceof WaystoneBlockEntityBase waystoneBlockEntity)) { + return InteractionResult.FAIL; + } + + Waystone waystone = waystoneBlockEntity.getWaystone(); + InteractionResult result = handleEditActions(level, player, waystoneBlockEntity, waystone); + if (result != null) { + return result; + } + + result = handleActivation(level, pos, player, waystoneBlockEntity, waystone); + if (result != null) { + return result; } return InteractionResult.FAIL; @@ -323,10 +331,10 @@ public void setPlacedBy(Level world, BlockPos pos, BlockState state, @Nullable L if (blockEntity instanceof WaystoneBlockEntityBase) { if (!world.isClientSide) { - CompoundTag tag = stack.getTag(); + final var waystoneUid = stack.get(ModComponents.waystone.get()); WaystoneProxy existingWaystone = null; - if (tag != null && tag.contains("UUID", IntArrayTag.TAG_INT_ARRAY)) { - existingWaystone = new WaystoneProxy(world.getServer(), NbtUtils.loadUUID(Objects.requireNonNull(tag.get("UUID")))); + if (waystoneUid != null) { + existingWaystone = new WaystoneProxy(world.getServer(), waystoneUid); } if (existingWaystone != null && existingWaystone.isValid() && existingWaystone.getBackingWaystone() instanceof WaystoneImpl) { diff --git a/shared/src/main/java/net/blay09/mods/waystones/block/entity/LandingStoneBlockEntity.java b/common/src/main/java/net/blay09/mods/waystones/block/entity/LandingStoneBlockEntity.java similarity index 80% rename from shared/src/main/java/net/blay09/mods/waystones/block/entity/LandingStoneBlockEntity.java rename to common/src/main/java/net/blay09/mods/waystones/block/entity/LandingStoneBlockEntity.java index 0c58b46b..a4c0e742 100644 --- a/shared/src/main/java/net/blay09/mods/waystones/block/entity/LandingStoneBlockEntity.java +++ b/common/src/main/java/net/blay09/mods/waystones/block/entity/LandingStoneBlockEntity.java @@ -2,12 +2,12 @@ import net.blay09.mods.balm.api.menu.BalmMenuProvider; import net.blay09.mods.waystones.api.WaystoneTypes; -import net.blay09.mods.waystones.core.WaystoneImpl; import net.blay09.mods.waystones.core.WaystonePermissionManager; import net.blay09.mods.waystones.menu.WaystoneMenu; import net.minecraft.core.BlockPos; -import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.network.RegistryFriendlyByteBuf; import net.minecraft.network.chat.Component; +import net.minecraft.network.codec.StreamCodec; import net.minecraft.resources.ResourceLocation; import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.MenuProvider; @@ -30,7 +30,7 @@ protected ResourceLocation getWaystoneType() { @Override public MenuProvider getMenuProvider() { - return new BalmMenuProvider() { + return new BalmMenuProvider() { @Override public Component getDisplayName() { return Component.translatable("container.waystones.landing_stone"); @@ -43,11 +43,14 @@ public AbstractContainerMenu createMenu(int windowId, Inventory inventory, Playe } @Override - public void writeScreenOpeningData(ServerPlayer player, FriendlyByteBuf buf) { - buf.writeBlockPos(worldPosition); - WaystoneImpl.write(buf, getWaystone()); + public StreamCodec getScreenStreamCodec() { + return WaystoneMenu.STREAM_CODEC; + } + + @Override + public WaystoneMenu.Data getScreenOpeningData(ServerPlayer player) { final var error = WaystonePermissionManager.mayEditWaystone(player, player.level(), getWaystone()); - buf.writeBoolean(error.isEmpty()); + return new WaystoneMenu.Data(worldPosition, getWaystone(), error.isEmpty()); } }; } diff --git a/shared/src/main/java/net/blay09/mods/waystones/block/entity/ModBlockEntities.java b/common/src/main/java/net/blay09/mods/waystones/block/entity/ModBlockEntities.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/block/entity/ModBlockEntities.java rename to common/src/main/java/net/blay09/mods/waystones/block/entity/ModBlockEntities.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/block/entity/PortstoneBlockEntity.java b/common/src/main/java/net/blay09/mods/waystones/block/entity/PortstoneBlockEntity.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/block/entity/PortstoneBlockEntity.java rename to common/src/main/java/net/blay09/mods/waystones/block/entity/PortstoneBlockEntity.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/block/entity/SharestoneBlockEntity.java b/common/src/main/java/net/blay09/mods/waystones/block/entity/SharestoneBlockEntity.java similarity index 73% rename from shared/src/main/java/net/blay09/mods/waystones/block/entity/SharestoneBlockEntity.java rename to common/src/main/java/net/blay09/mods/waystones/block/entity/SharestoneBlockEntity.java index e0f96439..5e6fbd96 100644 --- a/shared/src/main/java/net/blay09/mods/waystones/block/entity/SharestoneBlockEntity.java +++ b/common/src/main/java/net/blay09/mods/waystones/block/entity/SharestoneBlockEntity.java @@ -9,8 +9,9 @@ import net.blay09.mods.waystones.menu.WaystoneSelectionMenu; import net.blay09.mods.waystones.menu.WaystoneMenu; import net.minecraft.core.BlockPos; -import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.network.RegistryFriendlyByteBuf; import net.minecraft.network.chat.Component; +import net.minecraft.network.codec.StreamCodec; import net.minecraft.resources.ResourceLocation; import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.MenuProvider; @@ -44,7 +45,7 @@ public void initializeWaystone(ServerLevelAccessor world, @Nullable LivingEntity @Override public MenuProvider getMenuProvider() { - return new BalmMenuProvider() { + return new BalmMenuProvider() { @Override public Component getDisplayName() { return Component.translatable("container.waystones.waystone_selection"); @@ -59,16 +60,20 @@ public AbstractContainerMenu createMenu(int windowId, Inventory playerInventory, } @Override - public void writeScreenOpeningData(ServerPlayer player, FriendlyByteBuf buf) { - buf.writeBlockPos(worldPosition); - WaystoneImpl.writeList(buf, PlayerWaystoneManager.getTargetsForWaystone(player, getWaystone())); + public WaystoneSelectionMenu.Data getScreenOpeningData(ServerPlayer serverPlayer) { + return new WaystoneSelectionMenu.Data(worldPosition, PlayerWaystoneManager.getTargetsForWaystone(serverPlayer, getWaystone())); + } + + @Override + public StreamCodec getScreenStreamCodec() { + return WaystoneSelectionMenu.STREAM_CODEC; } }; } @Override - public BalmMenuProvider getSettingsMenuProvider() { - return new BalmMenuProvider() { + public BalmMenuProvider getSettingsMenuProvider() { + return new BalmMenuProvider<>() { @Override public Component getDisplayName() { return Component.translatable("container.waystones.sharestone"); @@ -81,11 +86,14 @@ public AbstractContainerMenu createMenu(int windowId, Inventory inventory, Playe } @Override - public void writeScreenOpeningData(ServerPlayer player, FriendlyByteBuf buf) { - buf.writeBlockPos(worldPosition); - WaystoneImpl.write(buf, getWaystone()); - final var error = WaystonePermissionManager.mayEditWaystone(player, player.level(), getWaystone()); - buf.writeBoolean(error.isEmpty()); + public WaystoneMenu.Data getScreenOpeningData(ServerPlayer serverPlayer) { + final var error = WaystonePermissionManager.mayEditWaystone(serverPlayer, serverPlayer.level(), getWaystone()); + return new WaystoneMenu.Data(worldPosition, getWaystone(), error.isEmpty()); + } + + @Override + public StreamCodec getScreenStreamCodec() { + return WaystoneMenu.STREAM_CODEC; } }; } diff --git a/shared/src/main/java/net/blay09/mods/waystones/block/entity/WarpPlateBlockEntity.java b/common/src/main/java/net/blay09/mods/waystones/block/entity/WarpPlateBlockEntity.java similarity index 94% rename from shared/src/main/java/net/blay09/mods/waystones/block/entity/WarpPlateBlockEntity.java rename to common/src/main/java/net/blay09/mods/waystones/block/entity/WarpPlateBlockEntity.java index 507d771a..2b40f4ff 100644 --- a/shared/src/main/java/net/blay09/mods/waystones/block/entity/WarpPlateBlockEntity.java +++ b/common/src/main/java/net/blay09/mods/waystones/block/entity/WarpPlateBlockEntity.java @@ -14,9 +14,12 @@ import net.blay09.mods.waystones.worldgen.namegen.NameGeneratorManager; import net.minecraft.ChatFormatting; import net.minecraft.core.BlockPos; +import net.minecraft.core.HolderLookup; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.network.RegistryFriendlyByteBuf; import net.minecraft.network.chat.Component; +import net.minecraft.network.codec.StreamCodec; import net.minecraft.resources.ResourceLocation; import net.minecraft.server.level.ServerPlayer; import net.minecraft.util.Mth; @@ -75,22 +78,22 @@ protected ResourceLocation getWaystoneType() { } @Override - public void saveAdditional(CompoundTag tag) { - super.saveAdditional(tag); + public void saveAdditional(CompoundTag tag, HolderLookup.Provider provider) { + super.saveAdditional(tag, provider); if (customName != null) { - tag.putString("CustomName", Component.Serializer.toJson(customName)); + tag.putString("CustomName", Component.Serializer.toJson(customName, provider)); } tag.putInt("LastAttunementSlot", lastAttunementSlot); } @Override - public void load(CompoundTag compound) { - super.load(compound); + public void loadAdditional(CompoundTag compound, HolderLookup.Provider provider) { + super.loadAdditional(compound, provider); if (compound.contains("CustomName")) { - customName = Component.Serializer.fromJson(compound.getString("CustomName")); + customName = Component.Serializer.fromJson(compound.getString("CustomName"), provider); } lastAttunementSlot = compound.getInt("LastAttunementSlot"); @@ -103,7 +106,7 @@ public MenuProvider getMenuProvider() { @Override public MenuProvider getSettingsMenuProvider() { - return new BalmMenuProvider() { + return new BalmMenuProvider() { @Override public Component getDisplayName() { return WarpPlateBlockEntity.this.getDisplayName(); @@ -115,8 +118,13 @@ public AbstractContainerMenu createMenu(int i, Inventory playerInventory, Player } @Override - public void writeScreenOpeningData(ServerPlayer player, FriendlyByteBuf buf) { - buf.writeBlockPos(worldPosition); + public BlockPos getScreenOpeningData(ServerPlayer serverPlayer) { + return worldPosition; + } + + @Override + public StreamCodec getScreenStreamCodec() { + return BlockPos.STREAM_CODEC.cast(); } }; } @@ -273,7 +281,7 @@ private void applyWarpPlateEffects(Entity entity) { if (entity instanceof LivingEntity) { if (fireSeconds > 0) { - entity.setSecondsOnFire(fireSeconds); + entity.setRemainingFireTicks(fireSeconds * 20); } if (poisonSeconds > 0) { ((LivingEntity) entity).addEffect(new MobEffectInstance(MobEffects.POISON, poisonSeconds * 20, potency)); diff --git a/shared/src/main/java/net/blay09/mods/waystones/block/entity/WaystoneBlockEntity.java b/common/src/main/java/net/blay09/mods/waystones/block/entity/WaystoneBlockEntity.java similarity index 69% rename from shared/src/main/java/net/blay09/mods/waystones/block/entity/WaystoneBlockEntity.java rename to common/src/main/java/net/blay09/mods/waystones/block/entity/WaystoneBlockEntity.java index cddbc82c..3c2070ff 100644 --- a/shared/src/main/java/net/blay09/mods/waystones/block/entity/WaystoneBlockEntity.java +++ b/common/src/main/java/net/blay09/mods/waystones/block/entity/WaystoneBlockEntity.java @@ -2,15 +2,15 @@ import net.blay09.mods.balm.api.menu.BalmMenuProvider; import net.blay09.mods.waystones.core.PlayerWaystoneManager; -import net.blay09.mods.waystones.core.WaystoneImpl; import net.blay09.mods.waystones.core.WaystonePermissionManager; import net.blay09.mods.waystones.menu.ModMenus; import net.blay09.mods.waystones.menu.WaystoneSelectionMenu; import net.blay09.mods.waystones.menu.WaystoneMenu; import net.blay09.mods.waystones.api.WaystoneTypes; import net.minecraft.core.BlockPos; -import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.network.RegistryFriendlyByteBuf; import net.minecraft.network.chat.Component; +import net.minecraft.network.codec.StreamCodec; import net.minecraft.resources.ResourceLocation; import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.entity.player.Inventory; @@ -32,8 +32,8 @@ protected ResourceLocation getWaystoneType() { } @Override - public BalmMenuProvider getMenuProvider() { - return new BalmMenuProvider() { + public BalmMenuProvider getMenuProvider() { + return new BalmMenuProvider<>() { @Override public Component getDisplayName() { return Component.translatable("container.waystones.waystone_selection"); @@ -47,17 +47,20 @@ public AbstractContainerMenu createMenu(int windowId, Inventory playerInventory, } @Override - public void writeScreenOpeningData(ServerPlayer player, FriendlyByteBuf buf) { - buf.writeBlockPos(worldPosition); - final var waystones = PlayerWaystoneManager.getTargetsForWaystone(player, getWaystone()); - WaystoneImpl.writeList(buf, waystones); + public WaystoneSelectionMenu.Data getScreenOpeningData(ServerPlayer serverPlayer) { + return new WaystoneSelectionMenu.Data(worldPosition, PlayerWaystoneManager.getTargetsForWaystone(serverPlayer, getWaystone())); + } + + @Override + public StreamCodec getScreenStreamCodec() { + return WaystoneSelectionMenu.STREAM_CODEC; } }; } @Override public BalmMenuProvider getSettingsMenuProvider() { - return new BalmMenuProvider() { + return new BalmMenuProvider() { @Override public Component getDisplayName() { return Component.translatable("container.waystones.waystone"); @@ -70,11 +73,14 @@ public AbstractContainerMenu createMenu(int windowId, Inventory inventory, Playe } @Override - public void writeScreenOpeningData(ServerPlayer player, FriendlyByteBuf buf) { - buf.writeBlockPos(worldPosition); - WaystoneImpl.write(buf, getWaystone()); - final var error = WaystonePermissionManager.mayEditWaystone(player, player.level(), getWaystone()); - buf.writeBoolean(error.isEmpty()); + public WaystoneMenu.Data getScreenOpeningData(ServerPlayer serverPlayer) { + final var error = WaystonePermissionManager.mayEditWaystone(serverPlayer, serverPlayer.level(), getWaystone()); + return new WaystoneMenu.Data(worldPosition, getWaystone(), error.isEmpty()); + } + + @Override + public StreamCodec getScreenStreamCodec() { + return WaystoneMenu.STREAM_CODEC; } }; } diff --git a/shared/src/main/java/net/blay09/mods/waystones/block/entity/WaystoneBlockEntityBase.java b/common/src/main/java/net/blay09/mods/waystones/block/entity/WaystoneBlockEntityBase.java similarity index 95% rename from shared/src/main/java/net/blay09/mods/waystones/block/entity/WaystoneBlockEntityBase.java rename to common/src/main/java/net/blay09/mods/waystones/block/entity/WaystoneBlockEntityBase.java index 9bf348c2..1d31f054 100644 --- a/shared/src/main/java/net/blay09/mods/waystones/block/entity/WaystoneBlockEntityBase.java +++ b/common/src/main/java/net/blay09/mods/waystones/block/entity/WaystoneBlockEntityBase.java @@ -10,11 +10,13 @@ import net.blay09.mods.waystones.api.WaystonesAPI; import net.blay09.mods.waystones.block.WaystoneBlock; import net.blay09.mods.waystones.block.WaystoneBlockBase; +import net.blay09.mods.waystones.component.ModComponents; import net.blay09.mods.waystones.core.*; import net.blay09.mods.waystones.recipe.ModRecipes; import net.blay09.mods.waystones.recipe.WaystoneRecipe; import net.minecraft.client.Minecraft; import net.minecraft.core.BlockPos; +import net.minecraft.core.HolderLookup; import net.minecraft.core.NonNullList; import net.minecraft.core.RegistryAccess; import net.minecraft.nbt.CompoundTag; @@ -75,10 +77,8 @@ public WaystoneBlockEntityBase(BlockEntityType blockEntityType, BlockPos bloc } @Override - protected void saveAdditional(CompoundTag tag) { - super.saveAdditional(tag); - - ContainerHelper.saveAllItems(tag, items); + protected void saveAdditional(CompoundTag tag, HolderLookup.Provider provider) { + ContainerHelper.saveAllItems(tag, items, provider); if (waystone.isValid()) { tag.put("UUID", NbtUtils.createUUID(waystone.getWaystoneUid())); @@ -91,17 +91,15 @@ protected void saveAdditional(CompoundTag tag) { } @Override - public void load(CompoundTag compound) { - super.load(compound); - - ContainerHelper.loadAllItems(compound, items); + public void loadAdditional(CompoundTag compound, HolderLookup.Provider provider) { + ContainerHelper.loadAllItems(compound, items, provider); if (compound.contains("UUID", Tag.TAG_INT_ARRAY)) { waystoneUid = NbtUtils.loadUUID(Objects.requireNonNull(compound.get("UUID"))); } if (compound.contains("Waystone", Tag.TAG_COMPOUND)) { - var syncedWaystone = WaystoneImpl.read(compound.getCompound("Waystone")); + var syncedWaystone = WaystoneImpl.read(compound.getCompound("Waystone"), provider); WaystoneManagerImpl.get(null).updateWaystone(syncedWaystone); waystone = new WaystoneProxy(null, syncedWaystone.getWaystoneUid()); } @@ -112,7 +110,7 @@ public void load(CompoundTag compound) { @Override public void writeUpdateTag(CompoundTag tag) { - tag.put("Waystone", WaystoneImpl.write(getWaystone(), new CompoundTag())); + tag.put("Waystone", WaystoneImpl.write(getWaystone(), new CompoundTag(), level.registryAccess())); } @Override @@ -212,8 +210,7 @@ public void initializeFromExisting(ServerLevelAccessor world, WaystoneImpl exist setChanged(); sync(); - CompoundTag tag = itemStack.getTag(); - completedFirstAttunement = tag != null && tag.getBoolean("CompletedFirstAttunement"); + completedFirstAttunement = itemStack.has(ModComponents.warpPlateCompletedFirstAttunement.get()); if (!isCompletedFirstAttunement()) { initializeInventory(world); diff --git a/shared/src/main/java/net/blay09/mods/waystones/client/InventoryButtonGuiHandler.java b/common/src/main/java/net/blay09/mods/waystones/client/InventoryButtonGuiHandler.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/client/InventoryButtonGuiHandler.java rename to common/src/main/java/net/blay09/mods/waystones/client/InventoryButtonGuiHandler.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/client/ModClientEventHandlers.java b/common/src/main/java/net/blay09/mods/waystones/client/ModClientEventHandlers.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/client/ModClientEventHandlers.java rename to common/src/main/java/net/blay09/mods/waystones/client/ModClientEventHandlers.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/client/ModRenderers.java b/common/src/main/java/net/blay09/mods/waystones/client/ModRenderers.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/client/ModRenderers.java rename to common/src/main/java/net/blay09/mods/waystones/client/ModRenderers.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/client/ModScreens.java b/common/src/main/java/net/blay09/mods/waystones/client/ModScreens.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/client/ModScreens.java rename to common/src/main/java/net/blay09/mods/waystones/client/ModScreens.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/client/ModTextures.java b/common/src/main/java/net/blay09/mods/waystones/client/ModTextures.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/client/ModTextures.java rename to common/src/main/java/net/blay09/mods/waystones/client/ModTextures.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/client/WaystonesClient.java b/common/src/main/java/net/blay09/mods/waystones/client/WaystonesClient.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/client/WaystonesClient.java rename to common/src/main/java/net/blay09/mods/waystones/client/WaystonesClient.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/client/gui/screen/AdminSelectionScreen.java b/common/src/main/java/net/blay09/mods/waystones/client/gui/screen/AdminSelectionScreen.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/client/gui/screen/AdminSelectionScreen.java rename to common/src/main/java/net/blay09/mods/waystones/client/gui/screen/AdminSelectionScreen.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/client/gui/screen/InventoryButtonReturnConfirmScreen.java b/common/src/main/java/net/blay09/mods/waystones/client/gui/screen/InventoryButtonReturnConfirmScreen.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/client/gui/screen/InventoryButtonReturnConfirmScreen.java rename to common/src/main/java/net/blay09/mods/waystones/client/gui/screen/InventoryButtonReturnConfirmScreen.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/client/gui/screen/SharestoneSelectionScreen.java b/common/src/main/java/net/blay09/mods/waystones/client/gui/screen/SharestoneSelectionScreen.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/client/gui/screen/SharestoneSelectionScreen.java rename to common/src/main/java/net/blay09/mods/waystones/client/gui/screen/SharestoneSelectionScreen.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/client/gui/screen/WarpPlateScreen.java b/common/src/main/java/net/blay09/mods/waystones/client/gui/screen/WarpPlateScreen.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/client/gui/screen/WarpPlateScreen.java rename to common/src/main/java/net/blay09/mods/waystones/client/gui/screen/WarpPlateScreen.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/client/gui/screen/WaystoneScreen.java b/common/src/main/java/net/blay09/mods/waystones/client/gui/screen/WaystoneScreen.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/client/gui/screen/WaystoneScreen.java rename to common/src/main/java/net/blay09/mods/waystones/client/gui/screen/WaystoneScreen.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/client/gui/screen/WaystoneSelectionScreen.java b/common/src/main/java/net/blay09/mods/waystones/client/gui/screen/WaystoneSelectionScreen.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/client/gui/screen/WaystoneSelectionScreen.java rename to common/src/main/java/net/blay09/mods/waystones/client/gui/screen/WaystoneSelectionScreen.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/client/gui/screen/WaystoneSelectionScreenBase.java b/common/src/main/java/net/blay09/mods/waystones/client/gui/screen/WaystoneSelectionScreenBase.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/client/gui/screen/WaystoneSelectionScreenBase.java rename to common/src/main/java/net/blay09/mods/waystones/client/gui/screen/WaystoneSelectionScreenBase.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/client/gui/widget/ITooltipProvider.java b/common/src/main/java/net/blay09/mods/waystones/client/gui/widget/ITooltipProvider.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/client/gui/widget/ITooltipProvider.java rename to common/src/main/java/net/blay09/mods/waystones/client/gui/widget/ITooltipProvider.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/client/gui/widget/RemoveWaystoneButton.java b/common/src/main/java/net/blay09/mods/waystones/client/gui/widget/RemoveWaystoneButton.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/client/gui/widget/RemoveWaystoneButton.java rename to common/src/main/java/net/blay09/mods/waystones/client/gui/widget/RemoveWaystoneButton.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/client/gui/widget/SortWaystoneButton.java b/common/src/main/java/net/blay09/mods/waystones/client/gui/widget/SortWaystoneButton.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/client/gui/widget/SortWaystoneButton.java rename to common/src/main/java/net/blay09/mods/waystones/client/gui/widget/SortWaystoneButton.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/client/gui/widget/WaystoneButton.java b/common/src/main/java/net/blay09/mods/waystones/client/gui/widget/WaystoneButton.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/client/gui/widget/WaystoneButton.java rename to common/src/main/java/net/blay09/mods/waystones/client/gui/widget/WaystoneButton.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/client/gui/widget/WaystoneInventoryButton.java b/common/src/main/java/net/blay09/mods/waystones/client/gui/widget/WaystoneInventoryButton.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/client/gui/widget/WaystoneInventoryButton.java rename to common/src/main/java/net/blay09/mods/waystones/client/gui/widget/WaystoneInventoryButton.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/client/gui/widget/WaystoneVisbilityButton.java b/common/src/main/java/net/blay09/mods/waystones/client/gui/widget/WaystoneVisbilityButton.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/client/gui/widget/WaystoneVisbilityButton.java rename to common/src/main/java/net/blay09/mods/waystones/client/gui/widget/WaystoneVisbilityButton.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/client/render/PortstoneModel.java b/common/src/main/java/net/blay09/mods/waystones/client/render/PortstoneModel.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/client/render/PortstoneModel.java rename to common/src/main/java/net/blay09/mods/waystones/client/render/PortstoneModel.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/client/render/PortstoneRenderer.java b/common/src/main/java/net/blay09/mods/waystones/client/render/PortstoneRenderer.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/client/render/PortstoneRenderer.java rename to common/src/main/java/net/blay09/mods/waystones/client/render/PortstoneRenderer.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/client/render/SharestoneModel.java b/common/src/main/java/net/blay09/mods/waystones/client/render/SharestoneModel.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/client/render/SharestoneModel.java rename to common/src/main/java/net/blay09/mods/waystones/client/render/SharestoneModel.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/client/render/SharestoneRenderer.java b/common/src/main/java/net/blay09/mods/waystones/client/render/SharestoneRenderer.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/client/render/SharestoneRenderer.java rename to common/src/main/java/net/blay09/mods/waystones/client/render/SharestoneRenderer.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/client/render/WaystoneModel.java b/common/src/main/java/net/blay09/mods/waystones/client/render/WaystoneModel.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/client/render/WaystoneModel.java rename to common/src/main/java/net/blay09/mods/waystones/client/render/WaystoneModel.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/client/render/WaystoneRenderer.java b/common/src/main/java/net/blay09/mods/waystones/client/render/WaystoneRenderer.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/client/render/WaystoneRenderer.java rename to common/src/main/java/net/blay09/mods/waystones/client/render/WaystoneRenderer.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/client/requirement/CombinedRequirementRenderer.java b/common/src/main/java/net/blay09/mods/waystones/client/requirement/CombinedRequirementRenderer.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/client/requirement/CombinedRequirementRenderer.java rename to common/src/main/java/net/blay09/mods/waystones/client/requirement/CombinedRequirementRenderer.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/client/requirement/CooldownRequirementRenderer.java b/common/src/main/java/net/blay09/mods/waystones/client/requirement/CooldownRequirementRenderer.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/client/requirement/CooldownRequirementRenderer.java rename to common/src/main/java/net/blay09/mods/waystones/client/requirement/CooldownRequirementRenderer.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/client/requirement/ExperienceLevelRequirementRenderer.java b/common/src/main/java/net/blay09/mods/waystones/client/requirement/ExperienceLevelRequirementRenderer.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/client/requirement/ExperienceLevelRequirementRenderer.java rename to common/src/main/java/net/blay09/mods/waystones/client/requirement/ExperienceLevelRequirementRenderer.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/client/requirement/ExperiencePointsRequirementRenderer.java b/common/src/main/java/net/blay09/mods/waystones/client/requirement/ExperiencePointsRequirementRenderer.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/client/requirement/ExperiencePointsRequirementRenderer.java rename to common/src/main/java/net/blay09/mods/waystones/client/requirement/ExperiencePointsRequirementRenderer.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/client/requirement/ItemRequirementRenderer.java b/common/src/main/java/net/blay09/mods/waystones/client/requirement/ItemRequirementRenderer.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/client/requirement/ItemRequirementRenderer.java rename to common/src/main/java/net/blay09/mods/waystones/client/requirement/ItemRequirementRenderer.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/client/requirement/RefuseRequirementRenderer.java b/common/src/main/java/net/blay09/mods/waystones/client/requirement/RefuseRequirementRenderer.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/client/requirement/RefuseRequirementRenderer.java rename to common/src/main/java/net/blay09/mods/waystones/client/requirement/RefuseRequirementRenderer.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/client/requirement/RequirementClientRegistry.java b/common/src/main/java/net/blay09/mods/waystones/client/requirement/RequirementClientRegistry.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/client/requirement/RequirementClientRegistry.java rename to common/src/main/java/net/blay09/mods/waystones/client/requirement/RequirementClientRegistry.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/client/requirement/RequirementRenderer.java b/common/src/main/java/net/blay09/mods/waystones/client/requirement/RequirementRenderer.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/client/requirement/RequirementRenderer.java rename to common/src/main/java/net/blay09/mods/waystones/client/requirement/RequirementRenderer.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/command/CountWaystonesCommand.java b/common/src/main/java/net/blay09/mods/waystones/command/CountWaystonesCommand.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/command/CountWaystonesCommand.java rename to common/src/main/java/net/blay09/mods/waystones/command/CountWaystonesCommand.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/command/ModCommands.java b/common/src/main/java/net/blay09/mods/waystones/command/ModCommands.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/command/ModCommands.java rename to common/src/main/java/net/blay09/mods/waystones/command/ModCommands.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/command/OpenPlayerWaystonesGuiCommand.java b/common/src/main/java/net/blay09/mods/waystones/command/OpenPlayerWaystonesGuiCommand.java similarity index 78% rename from shared/src/main/java/net/blay09/mods/waystones/command/OpenPlayerWaystonesGuiCommand.java rename to common/src/main/java/net/blay09/mods/waystones/command/OpenPlayerWaystonesGuiCommand.java index 2dde2fef..52ecee23 100644 --- a/shared/src/main/java/net/blay09/mods/waystones/command/OpenPlayerWaystonesGuiCommand.java +++ b/common/src/main/java/net/blay09/mods/waystones/command/OpenPlayerWaystonesGuiCommand.java @@ -6,6 +6,7 @@ import net.blay09.mods.balm.api.Balm; import net.blay09.mods.balm.api.menu.BalmMenuProvider; import net.blay09.mods.waystones.api.TeleportFlags; +import net.blay09.mods.waystones.api.Waystone; import net.blay09.mods.waystones.comparator.WaystoneComparators; import net.blay09.mods.waystones.core.PlayerWaystoneManager; import net.blay09.mods.waystones.core.WaystoneImpl; @@ -14,12 +15,16 @@ import net.minecraft.commands.CommandSourceStack; import net.minecraft.commands.arguments.selector.EntitySelector; import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.network.RegistryFriendlyByteBuf; import net.minecraft.network.chat.Component; +import net.minecraft.network.codec.StreamCodec; import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.entity.player.Inventory; import net.minecraft.world.entity.player.Player; import net.minecraft.world.inventory.AbstractContainerMenu; +import java.util.Collection; +import java.util.List; import java.util.Set; public class OpenPlayerWaystonesGuiCommand implements Command { @@ -28,7 +33,7 @@ public int run(CommandContext ctx) throws CommandSyntaxExcep ServerPlayer target = ctx.getArgument("player", EntitySelector.class).findSinglePlayer(ctx.getSource()); ServerPlayer op = ctx.getSource().getPlayerOrException(); final var waystones = PlayerWaystoneManager.getActivatedWaystones(target).stream().sorted(WaystoneComparators.forAdminInspection(op, target)).toList(); - BalmMenuProvider menuProvider = new BalmMenuProvider() { + final var menuProvider = new BalmMenuProvider>() { @Override public Component getDisplayName() { return Component.translatable("container.waystones.waystone_admin_selection", target.getScoreboardName()); @@ -40,8 +45,13 @@ public AbstractContainerMenu createMenu(int windowId, Inventory playerInventory, } @Override - public void writeScreenOpeningData(ServerPlayer player, FriendlyByteBuf buf) { - WaystoneImpl.writeList(buf, waystones); + public Collection getScreenOpeningData(ServerPlayer serverPlayer) { + return waystones; + } + + @Override + public StreamCodec> getScreenStreamCodec() { + return WaystoneImpl.LIST_STREAM_CODEC; } }; Balm.getNetworking().openGui(op, menuProvider); diff --git a/shared/src/main/java/net/blay09/mods/waystones/command/WaystoneOwnership.java b/common/src/main/java/net/blay09/mods/waystones/command/WaystoneOwnership.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/command/WaystoneOwnership.java rename to common/src/main/java/net/blay09/mods/waystones/command/WaystoneOwnership.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/comparator/DistanceToPlayerComparator.java b/common/src/main/java/net/blay09/mods/waystones/comparator/DistanceToPlayerComparator.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/comparator/DistanceToPlayerComparator.java rename to common/src/main/java/net/blay09/mods/waystones/comparator/DistanceToPlayerComparator.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/comparator/PreferOwnedComparator.java b/common/src/main/java/net/blay09/mods/waystones/comparator/PreferOwnedComparator.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/comparator/PreferOwnedComparator.java rename to common/src/main/java/net/blay09/mods/waystones/comparator/PreferOwnedComparator.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/comparator/PreferSameDimensionComparator.java b/common/src/main/java/net/blay09/mods/waystones/comparator/PreferSameDimensionComparator.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/comparator/PreferSameDimensionComparator.java rename to common/src/main/java/net/blay09/mods/waystones/comparator/PreferSameDimensionComparator.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/comparator/UserSortingComparator.java b/common/src/main/java/net/blay09/mods/waystones/comparator/UserSortingComparator.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/comparator/UserSortingComparator.java rename to common/src/main/java/net/blay09/mods/waystones/comparator/UserSortingComparator.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/comparator/WaystoneComparators.java b/common/src/main/java/net/blay09/mods/waystones/comparator/WaystoneComparators.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/comparator/WaystoneComparators.java rename to common/src/main/java/net/blay09/mods/waystones/comparator/WaystoneComparators.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/compat/BlueMapIntegration.java b/common/src/main/java/net/blay09/mods/waystones/compat/BlueMapIntegration.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/compat/BlueMapIntegration.java rename to common/src/main/java/net/blay09/mods/waystones/compat/BlueMapIntegration.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/compat/Compat.java b/common/src/main/java/net/blay09/mods/waystones/compat/Compat.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/compat/Compat.java rename to common/src/main/java/net/blay09/mods/waystones/compat/Compat.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/compat/DynmapIntegration.java b/common/src/main/java/net/blay09/mods/waystones/compat/DynmapIntegration.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/compat/DynmapIntegration.java rename to common/src/main/java/net/blay09/mods/waystones/compat/DynmapIntegration.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/compat/JourneyMapIntegration.java b/common/src/main/java/net/blay09/mods/waystones/compat/JourneyMapIntegration.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/compat/JourneyMapIntegration.java rename to common/src/main/java/net/blay09/mods/waystones/compat/JourneyMapIntegration.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/compat/WTHITIntegration.java b/common/src/main/java/net/blay09/mods/waystones/compat/WTHITIntegration.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/compat/WTHITIntegration.java rename to common/src/main/java/net/blay09/mods/waystones/compat/WTHITIntegration.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/compat/WaystonesWailaUtils.java b/common/src/main/java/net/blay09/mods/waystones/compat/WaystonesWailaUtils.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/compat/WaystonesWailaUtils.java rename to common/src/main/java/net/blay09/mods/waystones/compat/WaystonesWailaUtils.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/compat/jei/AttunedShardJeiRecipe.java b/common/src/main/java/net/blay09/mods/waystones/compat/jei/AttunedShardJeiRecipe.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/compat/jei/AttunedShardJeiRecipe.java rename to common/src/main/java/net/blay09/mods/waystones/compat/jei/AttunedShardJeiRecipe.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/compat/jei/JEIAddon.java b/common/src/main/java/net/blay09/mods/waystones/compat/jei/JEIAddon.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/compat/jei/JEIAddon.java rename to common/src/main/java/net/blay09/mods/waystones/compat/jei/JEIAddon.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/compat/jei/WaystoneJeiRecipeCategory.java b/common/src/main/java/net/blay09/mods/waystones/compat/jei/WaystoneJeiRecipeCategory.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/compat/jei/WaystoneJeiRecipeCategory.java rename to common/src/main/java/net/blay09/mods/waystones/compat/jei/WaystoneJeiRecipeCategory.java diff --git a/common/src/main/java/net/blay09/mods/waystones/component/ModComponents.java b/common/src/main/java/net/blay09/mods/waystones/component/ModComponents.java new file mode 100644 index 00000000..a1a37783 --- /dev/null +++ b/common/src/main/java/net/blay09/mods/waystones/component/ModComponents.java @@ -0,0 +1,24 @@ +package net.blay09.mods.waystones.component; + +import com.mojang.serialization.Codec; +import net.blay09.mods.balm.api.DeferredObject; +import net.blay09.mods.balm.api.component.BalmComponents; +import net.blay09.mods.waystones.Waystones; +import net.minecraft.core.UUIDUtil; +import net.minecraft.core.component.DataComponentType; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.util.Unit; + +import java.util.UUID; + +public class ModComponents { + public static DeferredObject> waystone; + public static DeferredObject> attunement; + public static DeferredObject> warpPlateCompletedFirstAttunement; + + public static void initialize(BalmComponents components) { + waystone = components.registerComponent(() -> DataComponentType.builder().persistent(UUIDUtil.CODEC).build(), new ResourceLocation(Waystones.MOD_ID, "waystone")); + attunement = components.registerComponent(() -> DataComponentType.builder().persistent(UUIDUtil.CODEC).build(), new ResourceLocation(Waystones.MOD_ID, "attunement")); + warpPlateCompletedFirstAttunement = components.registerComponent(() -> DataComponentType.builder().persistent(Codec.unit(Unit.INSTANCE)).build(), new ResourceLocation(Waystones.MOD_ID, "warp_plate_completed_first_attunement")); + } +} diff --git a/shared/src/main/java/net/blay09/mods/waystones/config/DimensionalWarp.java b/common/src/main/java/net/blay09/mods/waystones/config/DimensionalWarp.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/config/DimensionalWarp.java rename to common/src/main/java/net/blay09/mods/waystones/config/DimensionalWarp.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/config/InventoryButtonMode.java b/common/src/main/java/net/blay09/mods/waystones/config/InventoryButtonMode.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/config/InventoryButtonMode.java rename to common/src/main/java/net/blay09/mods/waystones/config/InventoryButtonMode.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/config/WaystonesConfig.java b/common/src/main/java/net/blay09/mods/waystones/config/WaystonesConfig.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/config/WaystonesConfig.java rename to common/src/main/java/net/blay09/mods/waystones/config/WaystonesConfig.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/config/WaystonesConfigData.java b/common/src/main/java/net/blay09/mods/waystones/config/WaystonesConfigData.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/config/WaystonesConfigData.java rename to common/src/main/java/net/blay09/mods/waystones/config/WaystonesConfigData.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/config/WorldGenStyle.java b/common/src/main/java/net/blay09/mods/waystones/config/WorldGenStyle.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/config/WorldGenStyle.java rename to common/src/main/java/net/blay09/mods/waystones/config/WorldGenStyle.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/core/IPlayerWaystoneData.java b/common/src/main/java/net/blay09/mods/waystones/core/IPlayerWaystoneData.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/core/IPlayerWaystoneData.java rename to common/src/main/java/net/blay09/mods/waystones/core/IPlayerWaystoneData.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/core/InMemoryPlayerWaystoneData.java b/common/src/main/java/net/blay09/mods/waystones/core/InMemoryPlayerWaystoneData.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/core/InMemoryPlayerWaystoneData.java rename to common/src/main/java/net/blay09/mods/waystones/core/InMemoryPlayerWaystoneData.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/core/InvalidWaystone.java b/common/src/main/java/net/blay09/mods/waystones/core/InvalidWaystone.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/core/InvalidWaystone.java rename to common/src/main/java/net/blay09/mods/waystones/core/InvalidWaystone.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/core/PersistentPlayerWaystoneData.java b/common/src/main/java/net/blay09/mods/waystones/core/PersistentPlayerWaystoneData.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/core/PersistentPlayerWaystoneData.java rename to common/src/main/java/net/blay09/mods/waystones/core/PersistentPlayerWaystoneData.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/core/PlayerWaystoneManager.java b/common/src/main/java/net/blay09/mods/waystones/core/PlayerWaystoneManager.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/core/PlayerWaystoneManager.java rename to common/src/main/java/net/blay09/mods/waystones/core/PlayerWaystoneManager.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/core/WaystoneImpl.java b/common/src/main/java/net/blay09/mods/waystones/core/WaystoneImpl.java similarity index 81% rename from shared/src/main/java/net/blay09/mods/waystones/core/WaystoneImpl.java rename to common/src/main/java/net/blay09/mods/waystones/core/WaystoneImpl.java index 9d762166..3e25581b 100644 --- a/shared/src/main/java/net/blay09/mods/waystones/core/WaystoneImpl.java +++ b/common/src/main/java/net/blay09/mods/waystones/core/WaystoneImpl.java @@ -1,31 +1,33 @@ package net.blay09.mods.waystones.core; -import com.google.common.collect.Lists; import net.blay09.mods.waystones.api.*; import net.blay09.mods.waystones.api.WaystoneTypes; -import net.blay09.mods.waystones.block.WaystoneBlock; import net.blay09.mods.waystones.tag.ModBlockTags; import net.minecraft.core.BlockPos; -import net.minecraft.core.Direction; +import net.minecraft.core.HolderLookup; import net.minecraft.core.registries.Registries; import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.NbtUtils; -import net.minecraft.nbt.Tag; -import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.network.RegistryFriendlyByteBuf; import net.minecraft.network.chat.Component; +import net.minecraft.network.chat.ComponentSerialization; +import net.minecraft.network.codec.ByteBufCodecs; +import net.minecraft.network.codec.StreamCodec; import net.minecraft.resources.ResourceKey; import net.minecraft.resources.ResourceLocation; import net.minecraft.server.level.ServerLevel; import net.minecraft.world.entity.player.Player; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.phys.Vec3; import org.jetbrains.annotations.Nullable; import java.util.*; public class WaystoneImpl implements Waystone, MutableWaystone { + public static final StreamCodec STREAM_CODEC = StreamCodec.of(WaystoneImpl::write, WaystoneImpl::read); + public static final StreamCodec> LIST_STREAM_CODEC = STREAM_CODEC.apply(ByteBufCodecs.collection(ArrayList::new)); + private final ResourceLocation waystoneType; private final UUID waystoneUid; private final WaystoneOrigin origin; @@ -127,7 +129,7 @@ public boolean isValidInLevel(ServerLevel level) { return state.is(ModBlockTags.IS_TELEPORT_TARGET); } - public static List readList(FriendlyByteBuf buf) { + public static List readList(RegistryFriendlyByteBuf buf) { int size = buf.readShort(); List waystones = new ArrayList<>(size); for (int i = 0; i < size; i++) { @@ -136,10 +138,10 @@ public static List readList(FriendlyByteBuf buf) { return waystones; } - public static Waystone read(FriendlyByteBuf buf) { + public static Waystone read(RegistryFriendlyByteBuf buf) { final var waystoneUid = buf.readUUID(); final var waystoneType = buf.readResourceLocation(); - final var name = buf.readComponent(); + final var name = ComponentSerialization.STREAM_CODEC.decode(buf); final var visibility = buf.readEnum(WaystoneVisibility.class); final var dimension = ResourceKey.create(Registries.DIMENSION, new ResourceLocation(buf.readUtf(250))); final var pos = buf.readBlockPos(); @@ -151,14 +153,18 @@ public static Waystone read(FriendlyByteBuf buf) { return waystone; } - public static Waystone read(CompoundTag compound) { + private static BlockPos readLegacyBlockPos(CompoundTag compound) { + return new BlockPos(compound.getInt("x"), compound.getInt("y"), compound.getInt("z")); + } + + public static Waystone read(CompoundTag compound, HolderLookup.Provider provider) { final var waystoneUid = NbtUtils.loadUUID(Objects.requireNonNull(compound.get("WaystoneUid"))); final var legacyName = compound.getString("Name"); final var name = compound.contains("NameV2") - ? Component.Serializer.fromJson(compound.getString("NameV2")) + ? Component.Serializer.fromJson(compound.getString("NameV2"), provider) : Component.literal(legacyName); final var dimensionType = ResourceKey.create(Registries.DIMENSION, new ResourceLocation(compound.getString("World"))); - final var pos = NbtUtils.readBlockPos(compound.getCompound("BlockPos")); + final var pos = NbtUtils.readBlockPos(compound, "BlockPos").orElseGet(() -> readLegacyBlockPos(compound.getCompound("BlockPos"))); final var legacyWasGenerated = compound.getBoolean("WasGenerated"); var origin = legacyWasGenerated ? WaystoneOrigin.WILDERNESS : WaystoneOrigin.UNKNOWN; if (compound.contains("Origin")) { @@ -179,27 +185,27 @@ public static Waystone read(CompoundTag compound) { return waystone; } - public static void writeList(FriendlyByteBuf buf, Collection waystones) { + public static void writeList(RegistryFriendlyByteBuf buf, Collection waystones) { buf.writeShort(waystones.size()); for (Waystone waystone : waystones) { write(buf, waystone); } } - public static void write(FriendlyByteBuf buf, Waystone waystone) { + public static void write(RegistryFriendlyByteBuf buf, Waystone waystone) { buf.writeUUID(waystone.getWaystoneUid()); buf.writeResourceLocation(waystone.getWaystoneType()); - buf.writeComponent(waystone.getName()); + ComponentSerialization.STREAM_CODEC.encode(buf, waystone.getName()); buf.writeEnum(waystone.getVisibility()); buf.writeResourceLocation(waystone.getDimension().location()); buf.writeBlockPos(waystone.getPos()); buf.writeEnum(waystone.getOrigin()); } - public static CompoundTag write(Waystone waystone, CompoundTag compound) { + public static CompoundTag write(Waystone waystone, CompoundTag compound, HolderLookup.Provider provider) { compound.put("WaystoneUid", NbtUtils.createUUID(waystone.getWaystoneUid())); compound.putString("Type", waystone.getWaystoneType().toString()); - compound.putString("NameV2", Component.Serializer.toJson(waystone.getName())); + compound.putString("NameV2", Component.Serializer.toJson(waystone.getName(), provider)); compound.putString("World", waystone.getDimension().location().toString()); compound.put("BlockPos", NbtUtils.writeBlockPos(waystone.getPos())); compound.putString("Origin", waystone.getOrigin().name()); diff --git a/shared/src/main/java/net/blay09/mods/waystones/core/WaystoneManagerImpl.java b/common/src/main/java/net/blay09/mods/waystones/core/WaystoneManagerImpl.java similarity index 95% rename from shared/src/main/java/net/blay09/mods/waystones/core/WaystoneManagerImpl.java rename to common/src/main/java/net/blay09/mods/waystones/core/WaystoneManagerImpl.java index eeeeb46b..b7df0edf 100644 --- a/shared/src/main/java/net/blay09/mods/waystones/core/WaystoneManagerImpl.java +++ b/common/src/main/java/net/blay09/mods/waystones/core/WaystoneManagerImpl.java @@ -9,6 +9,7 @@ import net.blay09.mods.waystones.api.event.WaystonesLoadedEvent; import net.blay09.mods.waystones.block.entity.WaystoneBlockEntityBase; import net.minecraft.core.BlockPos; +import net.minecraft.core.HolderLookup; import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.ListTag; import net.minecraft.nbt.Tag; @@ -91,12 +92,12 @@ public List getGlobalWaystones() { return waystones.values().stream().filter(it -> it.getVisibility() == WaystoneVisibility.GLOBAL).collect(Collectors.toList()); } - public static WaystoneManagerImpl read(CompoundTag tagCompound) { + public static WaystoneManagerImpl read(CompoundTag tagCompound, HolderLookup.Provider provider) { WaystoneManagerImpl waystoneManager = new WaystoneManagerImpl(); ListTag tagList = tagCompound.getList(TAG_WAYSTONES, Tag.TAG_COMPOUND); for (Tag tag : tagList) { CompoundTag compound = (CompoundTag) tag; - Waystone waystone = WaystoneImpl.read(compound); + Waystone waystone = WaystoneImpl.read(compound, provider); waystoneManager.waystones.put(waystone.getWaystoneUid(), waystone); } Balm.getEvents().fireEvent(new WaystonesLoadedEvent(waystoneManager)); @@ -104,10 +105,10 @@ public static WaystoneManagerImpl read(CompoundTag tagCompound) { } @Override - public CompoundTag save(CompoundTag tagCompound) { + public CompoundTag save(CompoundTag tagCompound, HolderLookup.Provider provider) { ListTag tagList = new ListTag(); for (Waystone waystone : waystones.values()) { - tagList.add(WaystoneImpl.write(waystone, new CompoundTag())); + tagList.add(WaystoneImpl.write(waystone, new CompoundTag(), provider)); } tagCompound.put(TAG_WAYSTONES, tagList); return tagCompound; diff --git a/shared/src/main/java/net/blay09/mods/waystones/core/WaystonePermissionManager.java b/common/src/main/java/net/blay09/mods/waystones/core/WaystonePermissionManager.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/core/WaystonePermissionManager.java rename to common/src/main/java/net/blay09/mods/waystones/core/WaystonePermissionManager.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/core/WaystoneProxy.java b/common/src/main/java/net/blay09/mods/waystones/core/WaystoneProxy.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/core/WaystoneProxy.java rename to common/src/main/java/net/blay09/mods/waystones/core/WaystoneProxy.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/core/WaystoneSyncManager.java b/common/src/main/java/net/blay09/mods/waystones/core/WaystoneSyncManager.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/core/WaystoneSyncManager.java rename to common/src/main/java/net/blay09/mods/waystones/core/WaystoneSyncManager.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/core/WaystoneTeleportContextImpl.java b/common/src/main/java/net/blay09/mods/waystones/core/WaystoneTeleportContextImpl.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/core/WaystoneTeleportContextImpl.java rename to common/src/main/java/net/blay09/mods/waystones/core/WaystoneTeleportContextImpl.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/core/WaystoneTeleportManager.java b/common/src/main/java/net/blay09/mods/waystones/core/WaystoneTeleportManager.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/core/WaystoneTeleportManager.java rename to common/src/main/java/net/blay09/mods/waystones/core/WaystoneTeleportManager.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/core/WaystoneUserSettings.java b/common/src/main/java/net/blay09/mods/waystones/core/WaystoneUserSettings.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/core/WaystoneUserSettings.java rename to common/src/main/java/net/blay09/mods/waystones/core/WaystoneUserSettings.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/core/WaystoneUserVisibility.java b/common/src/main/java/net/blay09/mods/waystones/core/WaystoneUserVisibility.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/core/WaystoneUserVisibility.java rename to common/src/main/java/net/blay09/mods/waystones/core/WaystoneUserVisibility.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/handler/LoginHandler.java b/common/src/main/java/net/blay09/mods/waystones/handler/LoginHandler.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/handler/LoginHandler.java rename to common/src/main/java/net/blay09/mods/waystones/handler/LoginHandler.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/handler/ModEventHandlers.java b/common/src/main/java/net/blay09/mods/waystones/handler/ModEventHandlers.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/handler/ModEventHandlers.java rename to common/src/main/java/net/blay09/mods/waystones/handler/ModEventHandlers.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/handler/WarpDamageResetHandler.java b/common/src/main/java/net/blay09/mods/waystones/handler/WarpDamageResetHandler.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/handler/WarpDamageResetHandler.java rename to common/src/main/java/net/blay09/mods/waystones/handler/WarpDamageResetHandler.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/handler/WarpStoneFOVHandler.java b/common/src/main/java/net/blay09/mods/waystones/handler/WarpStoneFOVHandler.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/handler/WarpStoneFOVHandler.java rename to common/src/main/java/net/blay09/mods/waystones/handler/WarpStoneFOVHandler.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/handler/WaystoneActivationStatHandler.java b/common/src/main/java/net/blay09/mods/waystones/handler/WaystoneActivationStatHandler.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/handler/WaystoneActivationStatHandler.java rename to common/src/main/java/net/blay09/mods/waystones/handler/WaystoneActivationStatHandler.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/item/AbstractAttunedShardItem.java b/common/src/main/java/net/blay09/mods/waystones/item/AbstractAttunedShardItem.java similarity index 74% rename from shared/src/main/java/net/blay09/mods/waystones/item/AbstractAttunedShardItem.java rename to common/src/main/java/net/blay09/mods/waystones/item/AbstractAttunedShardItem.java index c11b4a89..a4d65cef 100644 --- a/shared/src/main/java/net/blay09/mods/waystones/item/AbstractAttunedShardItem.java +++ b/common/src/main/java/net/blay09/mods/waystones/item/AbstractAttunedShardItem.java @@ -5,24 +5,20 @@ import net.blay09.mods.waystones.api.Waystone; import net.blay09.mods.waystones.api.WaystoneTypes; import net.blay09.mods.waystones.block.WarpPlateBlock; +import net.blay09.mods.waystones.component.ModComponents; import net.blay09.mods.waystones.core.InvalidWaystone; import net.blay09.mods.waystones.core.WaystoneProxy; import net.blay09.mods.waystones.menu.WarpPlateMenu; import net.minecraft.ChatFormatting; -import net.minecraft.nbt.CompoundTag; -import net.minecraft.nbt.NbtUtils; -import net.minecraft.nbt.Tag; import net.minecraft.network.chat.Component; import net.minecraft.server.MinecraftServer; import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.Item; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.TooltipFlag; -import net.minecraft.world.level.Level; import org.jetbrains.annotations.Nullable; import java.util.List; -import java.util.Objects; import java.util.Optional; public abstract class AbstractAttunedShardItem extends Item implements IAttunementItem { @@ -38,8 +34,8 @@ public boolean isFoil(ItemStack itemStack) { } @Override - public void appendHoverText(ItemStack stack, @Nullable Level world, List list, TooltipFlag flag) { - super.appendHoverText(stack, world, list, flag); + public void appendHoverText(ItemStack stack, TooltipContext context, List list, TooltipFlag flag) { + super.appendHoverText(stack, context, list, flag); final var attunedWaystone = getWaystoneAttunedTo(null, null, stack).orElse(InvalidWaystone.INSTANCE); if (!attunedWaystone.isValid()) { @@ -70,26 +66,15 @@ public void appendHoverText(ItemStack stack, @Nullable Level world, List getWaystoneAttunedTo(MinecraftServer server, Player player, ItemStack itemStack) { - CompoundTag compound = itemStack.getTag(); - if (compound != null && compound.contains("AttunedToWaystone", Tag.TAG_INT_ARRAY)) { - return Optional.of(new WaystoneProxy(server, NbtUtils.loadUUID(Objects.requireNonNull(compound.get("AttunedToWaystone"))))); - } - - return Optional.empty(); + return Optional.ofNullable(itemStack.get(ModComponents.attunement.get())).map(attunement -> new WaystoneProxy(server, attunement)); } @Override public void setWaystoneAttunedTo(ItemStack itemStack, @Nullable Waystone waystone) { - CompoundTag tagCompound = itemStack.getTag(); - if (tagCompound == null) { - tagCompound = new CompoundTag(); - itemStack.setTag(tagCompound); - } - if (waystone != null) { - tagCompound.put("AttunedToWaystone", NbtUtils.createUUID(waystone.getWaystoneUid())); + itemStack.set(ModComponents.attunement.get(), waystone.getWaystoneUid()); } else { - tagCompound.remove("AttunedToWaystone"); + itemStack.remove(ModComponents.attunement.get()); } } } diff --git a/shared/src/main/java/net/blay09/mods/waystones/item/AttunedShardItem.java b/common/src/main/java/net/blay09/mods/waystones/item/AttunedShardItem.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/item/AttunedShardItem.java rename to common/src/main/java/net/blay09/mods/waystones/item/AttunedShardItem.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/item/BoundScrollItem.java b/common/src/main/java/net/blay09/mods/waystones/item/BoundScrollItem.java similarity index 79% rename from shared/src/main/java/net/blay09/mods/waystones/item/BoundScrollItem.java rename to common/src/main/java/net/blay09/mods/waystones/item/BoundScrollItem.java index 6ef7b977..1dd57c80 100644 --- a/shared/src/main/java/net/blay09/mods/waystones/item/BoundScrollItem.java +++ b/common/src/main/java/net/blay09/mods/waystones/item/BoundScrollItem.java @@ -5,6 +5,7 @@ import net.blay09.mods.waystones.api.trait.IAttunementItem; import net.blay09.mods.waystones.api.trait.IFOVOnUse; import net.blay09.mods.waystones.api.trait.IResetUseOnDamage; +import net.blay09.mods.waystones.component.ModComponents; import net.blay09.mods.waystones.config.WaystonesConfig; import net.blay09.mods.waystones.core.WaystoneProxy; import net.minecraft.ChatFormatting; @@ -55,31 +56,20 @@ public ItemStack finishUsingItem(ItemStack stack, Level world, LivingEntity enti @Override public Optional getWaystoneAttunedTo(MinecraftServer server, Player player, ItemStack itemStack) { - CompoundTag compound = itemStack.getTag(); - if (compound != null && compound.contains("AttunedToWaystone", Tag.TAG_INT_ARRAY)) { - return Optional.of(new WaystoneProxy(server, NbtUtils.loadUUID(Objects.requireNonNull(compound.get("AttunedToWaystone"))))); - } - - return Optional.empty(); + return Optional.ofNullable(itemStack.get(ModComponents.attunement.get())).map(attunement -> new WaystoneProxy(server, attunement)); } @Override public void setWaystoneAttunedTo(ItemStack itemStack, @Nullable Waystone waystone) { - CompoundTag tagCompound = itemStack.getTag(); - if (tagCompound == null) { - tagCompound = new CompoundTag(); - itemStack.setTag(tagCompound); - } - if (waystone != null) { - tagCompound.put("AttunedToWaystone", NbtUtils.createUUID(waystone.getWaystoneUid())); + itemStack.set(ModComponents.attunement.get(), waystone.getWaystoneUid()); } else { - tagCompound.remove("AttunedToWaystone"); + itemStack.remove(ModComponents.attunement.get()); } } @Override - public void appendHoverText(ItemStack itemStack, @Nullable Level world, List list, TooltipFlag flag) { + public void appendHoverText(ItemStack itemStack, TooltipContext context, List list, TooltipFlag flag) { final var player = Balm.getProxy().getClientPlayer(); if (player == null) { return; diff --git a/shared/src/main/java/net/blay09/mods/waystones/item/CrumblingAttunedShardItem.java b/common/src/main/java/net/blay09/mods/waystones/item/CrumblingAttunedShardItem.java similarity index 84% rename from shared/src/main/java/net/blay09/mods/waystones/item/CrumblingAttunedShardItem.java rename to common/src/main/java/net/blay09/mods/waystones/item/CrumblingAttunedShardItem.java index c112ae87..b7b7132b 100644 --- a/shared/src/main/java/net/blay09/mods/waystones/item/CrumblingAttunedShardItem.java +++ b/common/src/main/java/net/blay09/mods/waystones/item/CrumblingAttunedShardItem.java @@ -8,8 +8,6 @@ import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.TooltipFlag; -import net.minecraft.world.level.Level; -import org.jetbrains.annotations.Nullable; import java.util.List; @@ -20,8 +18,8 @@ public CrumblingAttunedShardItem(Properties properties) { } @Override - public void appendHoverText(ItemStack stack, @Nullable Level world, List list, TooltipFlag flag) { - super.appendHoverText(stack, world, list, flag); + public void appendHoverText(ItemStack stack, TooltipContext context, List list, TooltipFlag flag) { + super.appendHoverText(stack, context, list, flag); final var attunedWarpPlate = getWaystoneAttunedTo(null, null, stack).orElse(InvalidWaystone.INSTANCE); if (attunedWarpPlate.isValid()) { diff --git a/shared/src/main/java/net/blay09/mods/waystones/item/ModItems.java b/common/src/main/java/net/blay09/mods/waystones/item/ModItems.java similarity index 93% rename from shared/src/main/java/net/blay09/mods/waystones/item/ModItems.java rename to common/src/main/java/net/blay09/mods/waystones/item/ModItems.java index 01c9eb31..e3c9b095 100644 --- a/shared/src/main/java/net/blay09/mods/waystones/item/ModItems.java +++ b/common/src/main/java/net/blay09/mods/waystones/item/ModItems.java @@ -30,7 +30,7 @@ public static void initialize(BalmItems items) { items.registerItem(() -> attunedShard = new AttunedShardItem(items.itemProperties()), id("attuned_shard")); items.registerItem(() -> crumblingAttunedShard = new CrumblingAttunedShardItem(items.itemProperties()), id("crumbling_attuned_shard")); - creativeModeTab = items.registerCreativeModeTab(id("waystones"), () -> new ItemStack(ModBlocks.waystone)); + creativeModeTab = items.registerCreativeModeTab(() -> new ItemStack(ModBlocks.waystone), id("waystones")); } private static ResourceLocation id(String name) { diff --git a/shared/src/main/java/net/blay09/mods/waystones/item/ReturnScrollItem.java b/common/src/main/java/net/blay09/mods/waystones/item/ReturnScrollItem.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/item/ReturnScrollItem.java rename to common/src/main/java/net/blay09/mods/waystones/item/ReturnScrollItem.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/item/ScrollItemBase.java b/common/src/main/java/net/blay09/mods/waystones/item/ScrollItemBase.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/item/ScrollItemBase.java rename to common/src/main/java/net/blay09/mods/waystones/item/ScrollItemBase.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/item/WarpDustItem.java b/common/src/main/java/net/blay09/mods/waystones/item/WarpDustItem.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/item/WarpDustItem.java rename to common/src/main/java/net/blay09/mods/waystones/item/WarpDustItem.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/item/WarpScrollItem.java b/common/src/main/java/net/blay09/mods/waystones/item/WarpScrollItem.java similarity index 79% rename from shared/src/main/java/net/blay09/mods/waystones/item/WarpScrollItem.java rename to common/src/main/java/net/blay09/mods/waystones/item/WarpScrollItem.java index 6e1c44f3..e4ff536d 100644 --- a/shared/src/main/java/net/blay09/mods/waystones/item/WarpScrollItem.java +++ b/common/src/main/java/net/blay09/mods/waystones/item/WarpScrollItem.java @@ -2,6 +2,7 @@ import net.blay09.mods.balm.api.Balm; import net.blay09.mods.balm.api.menu.BalmMenuProvider; +import net.blay09.mods.waystones.api.Waystone; import net.blay09.mods.waystones.api.trait.IResetUseOnDamage; import net.blay09.mods.waystones.config.WaystonesConfig; import net.blay09.mods.waystones.core.PlayerWaystoneManager; @@ -9,7 +10,9 @@ import net.blay09.mods.waystones.menu.ModMenus; import net.blay09.mods.waystones.menu.WaystoneSelectionMenu; import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.network.RegistryFriendlyByteBuf; import net.minecraft.network.chat.Component; +import net.minecraft.network.codec.StreamCodec; import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.entity.LivingEntity; import net.minecraft.world.entity.player.Inventory; @@ -18,7 +21,9 @@ import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.Level; +import java.util.Collection; import java.util.Collections; +import java.util.List; public class WarpScrollItem extends ScrollItemBase implements IResetUseOnDamage { @@ -36,7 +41,7 @@ public ItemStack finishUsingItem(ItemStack itemStack, Level world, LivingEntity if (!world.isClientSide && entity instanceof ServerPlayer player) { final var waystones = PlayerWaystoneManager.getTargetsForItem(player, itemStack); PlayerWaystoneManager.ensureSortingIndex(player, waystones); - Balm.getNetworking().openGui(((ServerPlayer) entity), new BalmMenuProvider() { + Balm.getNetworking().openGui(((ServerPlayer) entity), new BalmMenuProvider>() { @Override public Component getDisplayName() { return Component.translatable("container.waystones.waystone_selection"); @@ -47,9 +52,15 @@ public AbstractContainerMenu createMenu(int windowId, Inventory playerInventory, return new WaystoneSelectionMenu(ModMenus.warpScrollSelection.get(), null, windowId, waystones, Collections.emptySet()); } + + @Override + public Collection getScreenOpeningData(ServerPlayer serverPlayer) { + return waystones; + } + @Override - public void writeScreenOpeningData(ServerPlayer player, FriendlyByteBuf buf) { - WaystoneImpl.writeList(buf, waystones); + public StreamCodec> getScreenStreamCodec() { + return WaystoneImpl.LIST_STREAM_CODEC; } }); } diff --git a/shared/src/main/java/net/blay09/mods/waystones/item/WarpStoneItem.java b/common/src/main/java/net/blay09/mods/waystones/item/WarpStoneItem.java similarity index 91% rename from shared/src/main/java/net/blay09/mods/waystones/item/WarpStoneItem.java rename to common/src/main/java/net/blay09/mods/waystones/item/WarpStoneItem.java index 3e9666af..8366f21c 100644 --- a/shared/src/main/java/net/blay09/mods/waystones/item/WarpStoneItem.java +++ b/common/src/main/java/net/blay09/mods/waystones/item/WarpStoneItem.java @@ -2,6 +2,7 @@ import net.blay09.mods.balm.api.Balm; import net.blay09.mods.balm.api.menu.BalmMenuProvider; +import net.blay09.mods.waystones.api.Waystone; import net.blay09.mods.waystones.api.trait.IResetUseOnDamage; import net.blay09.mods.waystones.compat.Compat; import net.blay09.mods.waystones.config.WaystonesConfig; @@ -11,7 +12,9 @@ import net.blay09.mods.waystones.menu.WaystoneSelectionMenu; import net.minecraft.core.particles.ParticleTypes; import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.network.RegistryFriendlyByteBuf; import net.minecraft.network.chat.Component; +import net.minecraft.network.codec.StreamCodec; import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvents; import net.minecraft.sounds.SoundSource; @@ -19,6 +22,7 @@ import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; import net.minecraft.world.InteractionResultHolder; +import net.minecraft.world.entity.EquipmentSlot; import net.minecraft.world.entity.HumanoidArm; import net.minecraft.world.entity.LivingEntity; import net.minecraft.world.entity.player.Inventory; @@ -30,7 +34,9 @@ import net.minecraft.world.level.Level; import net.minecraft.world.phys.Vec3; +import java.util.Collection; import java.util.Collections; +import java.util.List; import java.util.Random; public class WarpStoneItem extends Item implements IResetUseOnDamage { @@ -130,7 +136,7 @@ public ItemStack finishUsingItem(ItemStack itemStack, Level world, LivingEntity final var hand = player.getUsedItemHand(); final var waystones = PlayerWaystoneManager.getTargetsForItem(player, itemStack); PlayerWaystoneManager.ensureSortingIndex(player, waystones); - Balm.getNetworking().openGui(player, new BalmMenuProvider() { + Balm.getNetworking().openGui(player, new BalmMenuProvider>() { @Override public Component getDisplayName() { return Component.translatable("container.waystones.waystone_selection"); @@ -139,12 +145,17 @@ public Component getDisplayName() { @Override public AbstractContainerMenu createMenu(int windowId, Inventory playerInventory, Player player) { return new WaystoneSelectionMenu(ModMenus.warpStoneSelection.get(), null, windowId, waystones, Collections.emptySet()) - .setPostTeleportHandler(context -> itemStack.hurtAndBreak(1, player, it -> it.broadcastBreakEvent(hand))); + .setPostTeleportHandler(context -> itemStack.hurtAndBreak(1, player, LivingEntity.getSlotForHand(hand))); } @Override - public void writeScreenOpeningData(ServerPlayer player, FriendlyByteBuf buf) { - WaystoneImpl.writeList(buf, waystones); + public Collection getScreenOpeningData(ServerPlayer serverPlayer) { + return waystones; + } + + @Override + public StreamCodec> getScreenStreamCodec() { + return WaystoneImpl.LIST_STREAM_CODEC; } }); } diff --git a/common/src/main/java/net/blay09/mods/waystones/menu/ModMenus.java b/common/src/main/java/net/blay09/mods/waystones/menu/ModMenus.java new file mode 100644 index 00000000..c254e914 --- /dev/null +++ b/common/src/main/java/net/blay09/mods/waystones/menu/ModMenus.java @@ -0,0 +1,179 @@ +package net.blay09.mods.waystones.menu; + +import net.blay09.mods.balm.api.DeferredObject; +import net.blay09.mods.balm.api.menu.BalmMenuFactory; +import net.blay09.mods.balm.api.menu.BalmMenus; +import net.blay09.mods.waystones.Waystones; +import net.blay09.mods.waystones.api.TeleportFlags; +import net.blay09.mods.waystones.api.Waystone; +import net.blay09.mods.waystones.block.entity.WarpPlateBlockEntity; +import net.blay09.mods.waystones.block.entity.WaystoneBlockEntity; +import net.blay09.mods.waystones.block.entity.WaystoneBlockEntityBase; +import net.blay09.mods.waystones.core.WaystoneImpl; +import net.minecraft.core.BlockPos; +import net.minecraft.network.RegistryFriendlyByteBuf; +import net.minecraft.network.codec.StreamCodec; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.entity.player.Inventory; +import net.minecraft.world.inventory.MenuType; +import net.minecraft.world.level.block.entity.BlockEntity; +import org.jetbrains.annotations.NotNull; + +import java.util.Collection; +import java.util.Collections; +import java.util.Set; + +public class ModMenus { + public static DeferredObject> waystoneSelection; + public static DeferredObject> warpScrollSelection; + public static DeferredObject> warpStoneSelection; + public static DeferredObject> portstoneSelection; + public static DeferredObject> inventorySelection; + public static DeferredObject> adminSelection; + public static DeferredObject> sharestoneSelection; + public static DeferredObject> warpPlate; + public static DeferredObject> waystoneSettings; + + public static void initialize(BalmMenus menus) { + waystoneSelection = menus.registerMenu(id("waystone_selection"), new BalmMenuFactory() { + @Override + public WaystoneSelectionMenu create(int windowId, Inventory inventory, WaystoneSelectionMenu.Data data) { + final var blockEntity = inventory.player.level().getBlockEntity(data.pos()); + if (blockEntity instanceof WaystoneBlockEntity waystone) { + return new WaystoneSelectionMenu(ModMenus.waystoneSelection.get(), + waystone.getWaystone(), + windowId, + data.waystones(), + Collections.emptySet()); + } + + return null; + } + + @Override + public StreamCodec getStreamCodec() { + return WaystoneSelectionMenu.STREAM_CODEC; + } + }); + + warpScrollSelection = menus.registerMenu(id("warp_scroll_selection"), new BalmMenuFactory>() { + @Override + public WaystoneSelectionMenu create(int windowId, Inventory inventory, Collection waystones) { + return new WaystoneSelectionMenu(ModMenus.warpScrollSelection.get(), null, windowId, waystones, Collections.emptySet()); + } + + @Override + public StreamCodec> getStreamCodec() { + return WaystoneImpl.LIST_STREAM_CODEC; + } + }); + + warpStoneSelection = menus.registerMenu(id("warp_stone_selection"), new BalmMenuFactory>() { + @Override + public WaystoneSelectionMenu create(int windowId, Inventory inventory, Collection waystones) { + return new WaystoneSelectionMenu(ModMenus.warpStoneSelection.get(), null, windowId, waystones, Collections.emptySet()); + } + + @Override + public StreamCodec> getStreamCodec() { + return WaystoneImpl.LIST_STREAM_CODEC; + } + }); + + portstoneSelection = menus.registerMenu(id("portstone_selection"), new BalmMenuFactory>() { + @Override + public WaystoneSelectionMenu create(int windowId, Inventory inventory, Collection waystones) { + return new WaystoneSelectionMenu(ModMenus.waystoneSelection.get(), null, windowId, waystones, Collections.emptySet()); + } + + @Override + public StreamCodec> getStreamCodec() { + return WaystoneImpl.LIST_STREAM_CODEC; + } + }); + + sharestoneSelection = menus.registerMenu(id("sharestone_selection"), new BalmMenuFactory() { + @Override + public WaystoneSelectionMenu create(int windowId, Inventory inventory, WaystoneSelectionMenu.Data data) { + final var blockEntity = inventory.player.level().getBlockEntity(data.pos()); + if (blockEntity instanceof WaystoneBlockEntity waystone) { + return new WaystoneSelectionMenu(ModMenus.sharestoneSelection.get(), + waystone.getWaystone(), + windowId, + data.waystones(), + Collections.emptySet()); + } + + return null; + } + + @Override + public StreamCodec getStreamCodec() { + return WaystoneSelectionMenu.STREAM_CODEC; + } + }); + + inventorySelection = menus.registerMenu(id("inventory_selection"), new BalmMenuFactory>() { + @Override + public WaystoneSelectionMenu create(int windowId, Inventory inventory, Collection waystones) { + return new WaystoneSelectionMenu(ModMenus.inventorySelection.get(), null, windowId, waystones, Set.of(TeleportFlags.INVENTORY_BUTTON)); + } + + @Override + public StreamCodec> getStreamCodec() { + return WaystoneImpl.LIST_STREAM_CODEC; + } + }); + + adminSelection = menus.registerMenu(id("admin_selection"), new BalmMenuFactory>() { + @Override + public WaystoneSelectionMenu create(int windowId, Inventory inventory, Collection waystones) { + return new WaystoneSelectionMenu(ModMenus.adminSelection.get(), null, windowId, waystones, Set.of(TeleportFlags.ADMIN)); + } + + @Override + public StreamCodec> getStreamCodec() { + return WaystoneImpl.LIST_STREAM_CODEC; + } + }); + + warpPlate = menus.registerMenu(id("warp_plate"), new BalmMenuFactory() { + @Override + public WarpPlateMenu create(int windowId, Inventory inventory, BlockPos pos) { + final var blockEntity = inventory.player.level().getBlockEntity(pos); + if (blockEntity instanceof WarpPlateBlockEntity warpPlate) { + return new WarpPlateMenu(windowId, warpPlate, warpPlate.getContainerData(), inventory); + } + return null; + } + + @Override + public StreamCodec getStreamCodec() { + return BlockPos.STREAM_CODEC.cast(); + } + }); + + waystoneSettings = menus.registerMenu(id("waystone"), new BalmMenuFactory() { + @Override + public WaystoneMenu create(int windowId, Inventory inventory, WaystoneMenu.Data data) { + BlockEntity blockEntity = inventory.player.level().getBlockEntity(data.pos()); + if (blockEntity instanceof WaystoneBlockEntityBase waystoneBlockEntity) { + return new WaystoneMenu(windowId, data.waystone(), waystoneBlockEntity, waystoneBlockEntity.getContainerData(), inventory, data.canEdit()); + } + + return null; + } + + @Override + public StreamCodec getStreamCodec() { + return WaystoneMenu.STREAM_CODEC; + } + }); + } + + @NotNull + private static ResourceLocation id(String name) { + return new ResourceLocation(Waystones.MOD_ID, name); + } + +} diff --git a/shared/src/main/java/net/blay09/mods/waystones/menu/WarpPlateAttunementSlot.java b/common/src/main/java/net/blay09/mods/waystones/menu/WarpPlateAttunementSlot.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/menu/WarpPlateAttunementSlot.java rename to common/src/main/java/net/blay09/mods/waystones/menu/WarpPlateAttunementSlot.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/menu/WarpPlateMenu.java b/common/src/main/java/net/blay09/mods/waystones/menu/WarpPlateMenu.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/menu/WarpPlateMenu.java rename to common/src/main/java/net/blay09/mods/waystones/menu/WarpPlateMenu.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/menu/WaystoneMenu.java b/common/src/main/java/net/blay09/mods/waystones/menu/WaystoneMenu.java similarity index 86% rename from shared/src/main/java/net/blay09/mods/waystones/menu/WaystoneMenu.java rename to common/src/main/java/net/blay09/mods/waystones/menu/WaystoneMenu.java index 5b801695..cf71c513 100644 --- a/shared/src/main/java/net/blay09/mods/waystones/menu/WaystoneMenu.java +++ b/common/src/main/java/net/blay09/mods/waystones/menu/WaystoneMenu.java @@ -1,12 +1,14 @@ package net.blay09.mods.waystones.menu; import net.blay09.mods.waystones.api.Waystone; -import net.blay09.mods.waystones.api.WaystoneTypes; import net.blay09.mods.waystones.api.WaystoneVisibility; import net.blay09.mods.waystones.block.entity.WaystoneBlockEntityBase; -import net.blay09.mods.waystones.config.WaystonesConfig; +import net.blay09.mods.waystones.core.WaystoneImpl; import net.blay09.mods.waystones.core.WaystonePermissionManager; import net.minecraft.core.BlockPos; +import net.minecraft.network.RegistryFriendlyByteBuf; +import net.minecraft.network.codec.ByteBufCodecs; +import net.minecraft.network.codec.StreamCodec; import net.minecraft.world.entity.player.Inventory; import net.minecraft.world.entity.player.Player; import net.minecraft.world.inventory.AbstractContainerMenu; @@ -19,6 +21,18 @@ public class WaystoneMenu extends AbstractContainerMenu { + public record Data(BlockPos pos, Waystone waystone, boolean canEdit) { + } + + public static final StreamCodec STREAM_CODEC = StreamCodec.composite( + BlockPos.STREAM_CODEC.cast(), + WaystoneMenu.Data::pos, + WaystoneImpl.STREAM_CODEC, + WaystoneMenu.Data::waystone, + ByteBufCodecs.BOOL, + WaystoneMenu.Data::canEdit, + WaystoneMenu.Data::new); + private final Player player; private final Waystone waystone; private final WaystoneBlockEntityBase blockEntity; diff --git a/shared/src/main/java/net/blay09/mods/waystones/menu/WaystoneSelectionMenu.java b/common/src/main/java/net/blay09/mods/waystones/menu/WaystoneSelectionMenu.java similarity index 81% rename from shared/src/main/java/net/blay09/mods/waystones/menu/WaystoneSelectionMenu.java rename to common/src/main/java/net/blay09/mods/waystones/menu/WaystoneSelectionMenu.java index 786abbae..706eeef9 100644 --- a/shared/src/main/java/net/blay09/mods/waystones/menu/WaystoneSelectionMenu.java +++ b/common/src/main/java/net/blay09/mods/waystones/menu/WaystoneSelectionMenu.java @@ -2,7 +2,10 @@ import net.blay09.mods.waystones.api.Waystone; import net.blay09.mods.waystones.api.WaystoneTeleportContext; +import net.blay09.mods.waystones.core.WaystoneImpl; import net.minecraft.core.BlockPos; +import net.minecraft.network.RegistryFriendlyByteBuf; +import net.minecraft.network.codec.StreamCodec; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.entity.player.Player; import net.minecraft.world.inventory.AbstractContainerMenu; @@ -16,6 +19,16 @@ public class WaystoneSelectionMenu extends AbstractContainerMenu { + public record Data(BlockPos pos, Collection waystones) { + } + + public static final StreamCodec STREAM_CODEC = StreamCodec.composite( + BlockPos.STREAM_CODEC.cast(), + Data::pos, + WaystoneImpl.LIST_STREAM_CODEC, + Data::waystones, + Data::new); + private final Waystone fromWaystone; private final Collection waystones; private final Set flags; diff --git a/shared/src/main/java/net/blay09/mods/waystones/mixin/JigsawPlacementPlacerMixin.java b/common/src/main/java/net/blay09/mods/waystones/mixin/JigsawPlacementPlacerMixin.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/mixin/JigsawPlacementPlacerMixin.java rename to common/src/main/java/net/blay09/mods/waystones/mixin/JigsawPlacementPlacerMixin.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/mixin/SinglePoolElementMixin.java b/common/src/main/java/net/blay09/mods/waystones/mixin/SinglePoolElementMixin.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/mixin/SinglePoolElementMixin.java rename to common/src/main/java/net/blay09/mods/waystones/mixin/SinglePoolElementMixin.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/mixin/StructureTemplatePoolAccessor.java b/common/src/main/java/net/blay09/mods/waystones/mixin/StructureTemplatePoolAccessor.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/mixin/StructureTemplatePoolAccessor.java rename to common/src/main/java/net/blay09/mods/waystones/mixin/StructureTemplatePoolAccessor.java diff --git a/common/src/main/java/net/blay09/mods/waystones/network/ModNetworking.java b/common/src/main/java/net/blay09/mods/waystones/network/ModNetworking.java new file mode 100644 index 00000000..55a0370e --- /dev/null +++ b/common/src/main/java/net/blay09/mods/waystones/network/ModNetworking.java @@ -0,0 +1,28 @@ +package net.blay09.mods.waystones.network; + +import net.blay09.mods.balm.api.network.BalmNetworking; +import net.blay09.mods.balm.api.network.SyncConfigMessage; +import net.blay09.mods.waystones.config.WaystonesConfigData; +import net.blay09.mods.waystones.network.message.*; + +public class ModNetworking { + + public static void initialize(BalmNetworking networking) { + networking.registerServerboundPacket(InventoryButtonMessage.TYPE, InventoryButtonMessage.class, InventoryButtonMessage::encode, InventoryButtonMessage::decode, InventoryButtonMessage::handle); + networking.registerServerboundPacket(EditWaystoneMessage.TYPE, EditWaystoneMessage.class, EditWaystoneMessage::encode, EditWaystoneMessage::decode, EditWaystoneMessage::handle); + networking.registerServerboundPacket(SelectWaystoneMessage.TYPE, SelectWaystoneMessage.class, SelectWaystoneMessage::encode, SelectWaystoneMessage::decode, SelectWaystoneMessage::handle); + networking.registerServerboundPacket(SortWaystoneMessage.TYPE, SortWaystoneMessage.class, SortWaystoneMessage::encode, SortWaystoneMessage::decode, SortWaystoneMessage::handle); + networking.registerServerboundPacket(RemoveWaystoneMessage.TYPE, RemoveWaystoneMessage.class, RemoveWaystoneMessage::encode, RemoveWaystoneMessage::decode, RemoveWaystoneMessage::handle); + networking.registerServerboundPacket(RequestEditWaystoneMessage.TYPE, RequestEditWaystoneMessage.class, RequestEditWaystoneMessage::encode, RequestEditWaystoneMessage::decode, RequestEditWaystoneMessage::handle); + + networking.registerClientboundPacket(UpdateWaystoneMessage.TYPE, UpdateWaystoneMessage.class, UpdateWaystoneMessage::encode, UpdateWaystoneMessage::decode, UpdateWaystoneMessage::handle); + networking.registerClientboundPacket(WaystoneRemovedMessage.TYPE, WaystoneRemovedMessage.class, WaystoneRemovedMessage::encode, WaystoneRemovedMessage::decode, WaystoneRemovedMessage::handle); + networking.registerClientboundPacket(KnownWaystonesMessage.TYPE, KnownWaystonesMessage.class, KnownWaystonesMessage::encode, KnownWaystonesMessage::decode, KnownWaystonesMessage::handle); + networking.registerClientboundPacket(SortingIndexMessage.TYPE, SortingIndexMessage.class, SortingIndexMessage::encode, SortingIndexMessage::decode, SortingIndexMessage::handle); + networking.registerClientboundPacket(TeleportEffectMessage.TYPE, TeleportEffectMessage.class, TeleportEffectMessage::encode, TeleportEffectMessage::decode, TeleportEffectMessage::handle); + networking.registerClientboundPacket(PlayerWaystoneCooldownsMessage.TYPE, PlayerWaystoneCooldownsMessage.class, PlayerWaystoneCooldownsMessage::encode, PlayerWaystoneCooldownsMessage::decode, PlayerWaystoneCooldownsMessage::handle); + + SyncConfigMessage.register(SyncWaystonesConfigMessage.TYPE, SyncWaystonesConfigMessage.class, SyncWaystonesConfigMessage::new, WaystonesConfigData.class, WaystonesConfigData::new); + } + +} diff --git a/shared/src/main/java/net/blay09/mods/waystones/network/message/EditWaystoneMessage.java b/common/src/main/java/net/blay09/mods/waystones/network/message/EditWaystoneMessage.java similarity index 86% rename from shared/src/main/java/net/blay09/mods/waystones/network/message/EditWaystoneMessage.java rename to common/src/main/java/net/blay09/mods/waystones/network/message/EditWaystoneMessage.java index 50f7b647..6fa244f5 100644 --- a/shared/src/main/java/net/blay09/mods/waystones/network/message/EditWaystoneMessage.java +++ b/common/src/main/java/net/blay09/mods/waystones/network/message/EditWaystoneMessage.java @@ -7,12 +7,17 @@ import net.blay09.mods.waystones.menu.WaystoneMenu; import net.minecraft.network.FriendlyByteBuf; import net.minecraft.network.chat.Component; +import net.minecraft.network.protocol.common.custom.CustomPacketPayload; +import net.minecraft.resources.ResourceLocation; import net.minecraft.server.MinecraftServer; import net.minecraft.server.level.ServerPlayer; import java.util.UUID; -public class EditWaystoneMessage { +public class EditWaystoneMessage implements CustomPacketPayload { + + public static final CustomPacketPayload.Type TYPE = new CustomPacketPayload.Type<>(new ResourceLocation(Waystones.MOD_ID, + "edit_waystone")); private final UUID waystoneUid; private final String name; @@ -24,7 +29,7 @@ public EditWaystoneMessage(UUID waystoneUid, String name, WaystoneVisibility vis this.visibility = visibility; } - public static void encode(EditWaystoneMessage message, FriendlyByteBuf buf) { + public static void encode(FriendlyByteBuf buf, EditWaystoneMessage message) { buf.writeUUID(message.waystoneUid); buf.writeUtf(message.name); buf.writeEnum(message.visibility); @@ -68,7 +73,8 @@ public static void handle(ServerPlayer player, EditWaystoneMessage message) { final var legalName = makeNameLegal(player.server, message.name); backingWaystone.setName(legalName); - if (visibility == WaystoneVisibility.GLOBAL && (WaystonePermissionManager.isAllowedVisibility(visibility) || WaystonePermissionManager.skipsPermissions(player))) { + if (visibility == WaystoneVisibility.GLOBAL && (WaystonePermissionManager.isAllowedVisibility(visibility) || WaystonePermissionManager.skipsPermissions( + player))) { if (backingWaystone.getVisibility() != WaystoneVisibility.GLOBAL) { PlayerWaystoneManager.activeWaystoneForEveryone(player.server, backingWaystone); } @@ -92,4 +98,9 @@ private static Component makeNameLegal(MinecraftServer server, String input) { return Component.literal(input); } + + @Override + public Type type() { + return TYPE; + } } diff --git a/shared/src/main/java/net/blay09/mods/waystones/network/message/InventoryButtonMessage.java b/common/src/main/java/net/blay09/mods/waystones/network/message/InventoryButtonMessage.java similarity index 70% rename from shared/src/main/java/net/blay09/mods/waystones/network/message/InventoryButtonMessage.java rename to common/src/main/java/net/blay09/mods/waystones/network/message/InventoryButtonMessage.java index 0d5d61f0..5a36da2e 100644 --- a/shared/src/main/java/net/blay09/mods/waystones/network/message/InventoryButtonMessage.java +++ b/common/src/main/java/net/blay09/mods/waystones/network/message/InventoryButtonMessage.java @@ -2,6 +2,7 @@ import net.blay09.mods.balm.api.Balm; import net.blay09.mods.balm.api.menu.BalmMenuProvider; +import net.blay09.mods.waystones.Waystones; import net.blay09.mods.waystones.api.Waystone; import net.blay09.mods.waystones.api.TeleportFlags; import net.blay09.mods.waystones.api.WaystonesAPI; @@ -12,17 +13,25 @@ import net.blay09.mods.waystones.menu.WaystoneSelectionMenu; import net.blay09.mods.waystones.core.PlayerWaystoneManager; import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.network.RegistryFriendlyByteBuf; import net.minecraft.network.chat.Component; +import net.minecraft.network.codec.StreamCodec; +import net.minecraft.network.protocol.common.custom.CustomPacketPayload; +import net.minecraft.resources.ResourceLocation; import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.entity.player.Inventory; import net.minecraft.world.entity.player.Player; import net.minecraft.world.inventory.AbstractContainerMenu; +import java.util.Collection; import java.util.Set; -public class InventoryButtonMessage { +public class InventoryButtonMessage implements CustomPacketPayload { - public static void encode(InventoryButtonMessage message, FriendlyByteBuf buf) { + public static final CustomPacketPayload.Type TYPE = new CustomPacketPayload.Type<>(new ResourceLocation(Waystones.MOD_ID, + "inventory_button")); + + public static void encode(FriendlyByteBuf buf, InventoryButtonMessage message) { } public static InventoryButtonMessage decode(FriendlyByteBuf buf) { @@ -51,7 +60,7 @@ public static void handle(final ServerPlayer player, InventoryButtonMessage mess } else if (inventoryButtonMode.isReturnToAny()) { final var waystones = PlayerWaystoneManager.getTargetsForInventoryButton(player); PlayerWaystoneManager.ensureSortingIndex(player, waystones); - final BalmMenuProvider containerProvider = new BalmMenuProvider() { + final var containerProvider = new BalmMenuProvider>() { @Override public Component getDisplayName() { return Component.translatable("container.waystones.waystone_selection"); @@ -63,12 +72,21 @@ public AbstractContainerMenu createMenu(int windowId, Inventory playerInventory, } @Override - public void writeScreenOpeningData(ServerPlayer player, FriendlyByteBuf buf) { - WaystoneImpl.writeList(buf, waystones); + public Collection getScreenOpeningData(ServerPlayer serverPlayer) { + return waystones; + } + + @Override + public StreamCodec> getScreenStreamCodec() { + return WaystoneImpl.LIST_STREAM_CODEC; } }; Balm.getNetworking().openGui(player, containerProvider); } } + @Override + public Type type() { + return TYPE; + } } diff --git a/shared/src/main/java/net/blay09/mods/waystones/network/message/KnownWaystonesMessage.java b/common/src/main/java/net/blay09/mods/waystones/network/message/KnownWaystonesMessage.java similarity index 74% rename from shared/src/main/java/net/blay09/mods/waystones/network/message/KnownWaystonesMessage.java rename to common/src/main/java/net/blay09/mods/waystones/network/message/KnownWaystonesMessage.java index d53ac81a..5346ae84 100644 --- a/shared/src/main/java/net/blay09/mods/waystones/network/message/KnownWaystonesMessage.java +++ b/common/src/main/java/net/blay09/mods/waystones/network/message/KnownWaystonesMessage.java @@ -2,11 +2,13 @@ import net.blay09.mods.balm.api.Balm; import net.blay09.mods.balm.api.BalmEnvironment; +import net.blay09.mods.waystones.Waystones; import net.blay09.mods.waystones.api.Waystone; import net.blay09.mods.waystones.api.event.WaystonesListReceivedEvent; import net.blay09.mods.waystones.api.WaystoneTypes; import net.blay09.mods.waystones.core.*; -import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.network.RegistryFriendlyByteBuf; +import net.minecraft.network.protocol.common.custom.CustomPacketPayload; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.entity.player.Player; @@ -14,7 +16,10 @@ import java.util.Collection; import java.util.List; -public class KnownWaystonesMessage { +public class KnownWaystonesMessage implements CustomPacketPayload { + + public static final CustomPacketPayload.Type TYPE = new CustomPacketPayload.Type<>(new ResourceLocation(Waystones.MOD_ID, + "known_waystones")); private final ResourceLocation type; private final Collection waystones; @@ -24,7 +29,7 @@ public KnownWaystonesMessage(ResourceLocation type, Collection wayston this.waystones = waystones; } - public static void encode(KnownWaystonesMessage message, FriendlyByteBuf buf) { + public static void encode(RegistryFriendlyByteBuf buf, KnownWaystonesMessage message) { buf.writeResourceLocation(message.type); buf.writeShort(message.waystones.size()); for (Waystone waystone : message.waystones) { @@ -32,7 +37,7 @@ public static void encode(KnownWaystonesMessage message, FriendlyByteBuf buf) { } } - public static KnownWaystonesMessage decode(FriendlyByteBuf buf) { + public static KnownWaystonesMessage decode(RegistryFriendlyByteBuf buf) { ResourceLocation type = buf.readResourceLocation(); int waystoneCount = buf.readShort(); List waystones = new ArrayList<>(); @@ -55,4 +60,9 @@ public static void handle(Player player, KnownWaystonesMessage message) { WaystoneManagerImpl.get(player.getServer()).updateWaystone(waystone); } } + + @Override + public Type type() { + return TYPE; + } } diff --git a/shared/src/main/java/net/blay09/mods/waystones/network/message/PlayerWaystoneCooldownsMessage.java b/common/src/main/java/net/blay09/mods/waystones/network/message/PlayerWaystoneCooldownsMessage.java similarity index 69% rename from shared/src/main/java/net/blay09/mods/waystones/network/message/PlayerWaystoneCooldownsMessage.java rename to common/src/main/java/net/blay09/mods/waystones/network/message/PlayerWaystoneCooldownsMessage.java index b7f12e3e..6da44464 100644 --- a/shared/src/main/java/net/blay09/mods/waystones/network/message/PlayerWaystoneCooldownsMessage.java +++ b/common/src/main/java/net/blay09/mods/waystones/network/message/PlayerWaystoneCooldownsMessage.java @@ -1,14 +1,19 @@ package net.blay09.mods.waystones.network.message; +import net.blay09.mods.waystones.Waystones; import net.blay09.mods.waystones.core.PlayerWaystoneManager; import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.network.protocol.common.custom.CustomPacketPayload; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.entity.player.Player; import java.util.HashMap; import java.util.Map; -public class PlayerWaystoneCooldownsMessage { +public class PlayerWaystoneCooldownsMessage implements CustomPacketPayload { + + public static final CustomPacketPayload.Type TYPE = new CustomPacketPayload.Type<>(new ResourceLocation(Waystones.MOD_ID, + "player_waystone_cooldowns")); private final Map cooldowns; @@ -16,7 +21,7 @@ public PlayerWaystoneCooldownsMessage(Map cooldowns) { this.cooldowns = cooldowns; } - public static void encode(PlayerWaystoneCooldownsMessage message, FriendlyByteBuf buf) { + public static void encode(FriendlyByteBuf buf, PlayerWaystoneCooldownsMessage message) { buf.writeByte(message.cooldowns.size()); for (Map.Entry entry : message.cooldowns.entrySet()) { buf.writeResourceLocation(entry.getKey()); @@ -36,4 +41,9 @@ public static PlayerWaystoneCooldownsMessage decode(FriendlyByteBuf buf) { public static void handle(Player player, PlayerWaystoneCooldownsMessage message) { message.cooldowns.forEach((key, timestamp) -> PlayerWaystoneManager.setCooldownUntil(player, key, timestamp)); } + + @Override + public Type type() { + return TYPE; + } } diff --git a/shared/src/main/java/net/blay09/mods/waystones/network/message/RemoveWaystoneMessage.java b/common/src/main/java/net/blay09/mods/waystones/network/message/RemoveWaystoneMessage.java similarity index 81% rename from shared/src/main/java/net/blay09/mods/waystones/network/message/RemoveWaystoneMessage.java rename to common/src/main/java/net/blay09/mods/waystones/network/message/RemoveWaystoneMessage.java index d57c101b..e146a1d2 100644 --- a/shared/src/main/java/net/blay09/mods/waystones/network/message/RemoveWaystoneMessage.java +++ b/common/src/main/java/net/blay09/mods/waystones/network/message/RemoveWaystoneMessage.java @@ -1,11 +1,14 @@ package net.blay09.mods.waystones.network.message; +import net.blay09.mods.waystones.Waystones; import net.blay09.mods.waystones.api.Waystone; import net.blay09.mods.waystones.api.WaystoneVisibility; import net.blay09.mods.waystones.block.WaystoneBlock; import net.blay09.mods.waystones.core.*; import net.minecraft.core.BlockPos; import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.network.protocol.common.custom.CustomPacketPayload; +import net.minecraft.resources.ResourceLocation; import net.minecraft.server.level.ServerLevel; import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.level.block.state.BlockState; @@ -13,7 +16,10 @@ import java.util.Objects; import java.util.UUID; -public class RemoveWaystoneMessage { +public class RemoveWaystoneMessage implements CustomPacketPayload { + + public static final CustomPacketPayload.Type TYPE = new CustomPacketPayload.Type<>(new ResourceLocation(Waystones.MOD_ID, + "remove_waystone")); private final UUID waystoneUid; @@ -21,7 +27,7 @@ public RemoveWaystoneMessage(UUID waystoneUid) { this.waystoneUid = waystoneUid; } - public static void encode(RemoveWaystoneMessage message, FriendlyByteBuf buf) { + public static void encode(FriendlyByteBuf buf, RemoveWaystoneMessage message) { buf.writeUUID(message.waystoneUid); } @@ -54,4 +60,8 @@ public static void handle(ServerPlayer player, RemoveWaystoneMessage message) { } } + @Override + public Type type() { + return TYPE; + } } diff --git a/shared/src/main/java/net/blay09/mods/waystones/network/message/RequestEditWaystoneMessage.java b/common/src/main/java/net/blay09/mods/waystones/network/message/RequestEditWaystoneMessage.java similarity index 67% rename from shared/src/main/java/net/blay09/mods/waystones/network/message/RequestEditWaystoneMessage.java rename to common/src/main/java/net/blay09/mods/waystones/network/message/RequestEditWaystoneMessage.java index ce42ce6d..f13f1a4e 100644 --- a/shared/src/main/java/net/blay09/mods/waystones/network/message/RequestEditWaystoneMessage.java +++ b/common/src/main/java/net/blay09/mods/waystones/network/message/RequestEditWaystoneMessage.java @@ -1,12 +1,18 @@ package net.blay09.mods.waystones.network.message; import net.blay09.mods.balm.api.Balm; +import net.blay09.mods.waystones.Waystones; import net.blay09.mods.waystones.block.entity.WaystoneBlockEntityBase; import net.minecraft.core.BlockPos; import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.network.protocol.common.custom.CustomPacketPayload; +import net.minecraft.resources.ResourceLocation; import net.minecraft.server.level.ServerPlayer; -public class RequestEditWaystoneMessage { +public class RequestEditWaystoneMessage implements CustomPacketPayload { + + public static final CustomPacketPayload.Type TYPE = new CustomPacketPayload.Type<>(new ResourceLocation(Waystones.MOD_ID, + "request_edit_waystone")); private final BlockPos pos; @@ -14,7 +20,7 @@ public RequestEditWaystoneMessage(BlockPos pos) { this.pos = pos; } - public static void encode(RequestEditWaystoneMessage message, FriendlyByteBuf buf) { + public static void encode(FriendlyByteBuf buf, RequestEditWaystoneMessage message) { buf.writeBlockPos(message.pos); } @@ -37,5 +43,10 @@ public static void handle(ServerPlayer player, RequestEditWaystoneMessage messag } } } + + @Override + public Type type() { + return TYPE; + } } diff --git a/shared/src/main/java/net/blay09/mods/waystones/network/message/SelectWaystoneMessage.java b/common/src/main/java/net/blay09/mods/waystones/network/message/SelectWaystoneMessage.java similarity index 77% rename from shared/src/main/java/net/blay09/mods/waystones/network/message/SelectWaystoneMessage.java rename to common/src/main/java/net/blay09/mods/waystones/network/message/SelectWaystoneMessage.java index 8d0efc94..8d310843 100644 --- a/shared/src/main/java/net/blay09/mods/waystones/network/message/SelectWaystoneMessage.java +++ b/common/src/main/java/net/blay09/mods/waystones/network/message/SelectWaystoneMessage.java @@ -7,11 +7,15 @@ import net.blay09.mods.waystones.menu.WaystoneSelectionMenu; import net.blay09.mods.waystones.core.WaystoneProxy; import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.network.protocol.common.custom.CustomPacketPayload; +import net.minecraft.resources.ResourceLocation; import net.minecraft.server.level.ServerPlayer; import java.util.UUID; -public class SelectWaystoneMessage { +public class SelectWaystoneMessage implements CustomPacketPayload { + + public static final CustomPacketPayload.Type TYPE = new CustomPacketPayload.Type<>(new ResourceLocation(Waystones.MOD_ID, "select_waystone")); private final UUID waystoneUid; @@ -19,7 +23,7 @@ public SelectWaystoneMessage(UUID waystoneUid) { this.waystoneUid = waystoneUid; } - public static void encode(SelectWaystoneMessage message, FriendlyByteBuf buf) { + public static void encode(FriendlyByteBuf buf, SelectWaystoneMessage message) { buf.writeUUID(message.waystoneUid); } @@ -50,5 +54,8 @@ public static void handle(final ServerPlayer player, SelectWaystoneMessage messa player.closeContainer(); } - + @Override + public Type type() { + return TYPE; + } } diff --git a/shared/src/main/java/net/blay09/mods/waystones/network/message/SortWaystoneMessage.java b/common/src/main/java/net/blay09/mods/waystones/network/message/SortWaystoneMessage.java similarity index 73% rename from shared/src/main/java/net/blay09/mods/waystones/network/message/SortWaystoneMessage.java rename to common/src/main/java/net/blay09/mods/waystones/network/message/SortWaystoneMessage.java index 5b245370..74235b23 100644 --- a/shared/src/main/java/net/blay09/mods/waystones/network/message/SortWaystoneMessage.java +++ b/common/src/main/java/net/blay09/mods/waystones/network/message/SortWaystoneMessage.java @@ -1,12 +1,17 @@ package net.blay09.mods.waystones.network.message; +import net.blay09.mods.waystones.Waystones; import net.blay09.mods.waystones.core.PlayerWaystoneManager; import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.network.protocol.common.custom.CustomPacketPayload; +import net.minecraft.resources.ResourceLocation; import net.minecraft.server.level.ServerPlayer; import java.util.UUID; -public class SortWaystoneMessage { +public class SortWaystoneMessage implements CustomPacketPayload { + + public static final CustomPacketPayload.Type TYPE = new CustomPacketPayload.Type<>(new ResourceLocation(Waystones.MOD_ID, "sort_waystone")); public static final UUID SORT_FIRST = UUID.fromString("00000000-0000-0000-0000-000000000000"); public static final UUID SORT_LAST = UUID.fromString("ffffffff-ffff-ffff-ffff-ffffffffffff"); @@ -19,7 +24,7 @@ public SortWaystoneMessage(UUID waystoneUid, UUID otherWaystoneUid) { this.otherWaystoneUid = otherWaystoneUid; } - public static void encode(SortWaystoneMessage message, FriendlyByteBuf buf) { + public static void encode(FriendlyByteBuf buf, SortWaystoneMessage message) { buf.writeUUID(message.waystoneUid); buf.writeUUID(message.otherWaystoneUid); } @@ -44,4 +49,8 @@ public static void handle(ServerPlayer player, SortWaystoneMessage message) { } } + @Override + public Type type() { + return TYPE; + } } diff --git a/shared/src/main/java/net/blay09/mods/waystones/network/message/SortingIndexMessage.java b/common/src/main/java/net/blay09/mods/waystones/network/message/SortingIndexMessage.java similarity index 69% rename from shared/src/main/java/net/blay09/mods/waystones/network/message/SortingIndexMessage.java rename to common/src/main/java/net/blay09/mods/waystones/network/message/SortingIndexMessage.java index c13f9d81..b12074fa 100644 --- a/shared/src/main/java/net/blay09/mods/waystones/network/message/SortingIndexMessage.java +++ b/common/src/main/java/net/blay09/mods/waystones/network/message/SortingIndexMessage.java @@ -1,16 +1,22 @@ package net.blay09.mods.waystones.network.message; import net.blay09.mods.balm.api.BalmEnvironment; +import net.blay09.mods.waystones.Waystones; import net.blay09.mods.waystones.core.InMemoryPlayerWaystoneData; import net.blay09.mods.waystones.core.PlayerWaystoneManager; import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.network.protocol.common.custom.CustomPacketPayload; +import net.minecraft.resources.ResourceLocation; import net.minecraft.world.entity.player.Player; import java.util.ArrayList; import java.util.List; import java.util.UUID; -public class SortingIndexMessage { +public class SortingIndexMessage implements CustomPacketPayload { + + public static final CustomPacketPayload.Type TYPE = new CustomPacketPayload.Type<>(new ResourceLocation(Waystones.MOD_ID, + "sorting_index")); private final List sortingIndex; @@ -18,7 +24,7 @@ public SortingIndexMessage(List sortingIndex) { this.sortingIndex = sortingIndex; } - public static void encode(SortingIndexMessage message, FriendlyByteBuf buf) { + public static void encode(FriendlyByteBuf buf, SortingIndexMessage message) { buf.writeShort(message.sortingIndex.size()); for (final var waystoneUid : message.sortingIndex) { buf.writeUUID(waystoneUid); @@ -38,4 +44,9 @@ public static void handle(Player player, SortingIndexMessage message) { final var playerWaystoneData = (InMemoryPlayerWaystoneData) PlayerWaystoneManager.getPlayerWaystoneData(BalmEnvironment.CLIENT); playerWaystoneData.setSortingIndex(player, message.sortingIndex); } + + @Override + public Type type() { + return TYPE; + } } diff --git a/common/src/main/java/net/blay09/mods/waystones/network/message/SyncWaystonesConfigMessage.java b/common/src/main/java/net/blay09/mods/waystones/network/message/SyncWaystonesConfigMessage.java new file mode 100644 index 00000000..78ee45e0 --- /dev/null +++ b/common/src/main/java/net/blay09/mods/waystones/network/message/SyncWaystonesConfigMessage.java @@ -0,0 +1,16 @@ +package net.blay09.mods.waystones.network.message; + +import net.blay09.mods.balm.api.network.SyncConfigMessage; +import net.blay09.mods.waystones.Waystones; +import net.blay09.mods.waystones.config.WaystonesConfigData; +import net.minecraft.network.protocol.common.custom.CustomPacketPayload; +import net.minecraft.resources.ResourceLocation; + +public class SyncWaystonesConfigMessage extends SyncConfigMessage { + + public static final CustomPacketPayload.Type TYPE = new CustomPacketPayload.Type<>(new ResourceLocation(Waystones.MOD_ID, "sync_config")); + + public SyncWaystonesConfigMessage(WaystonesConfigData data) { + super(TYPE, data); + } +} diff --git a/shared/src/main/java/net/blay09/mods/waystones/network/message/TeleportEffectMessage.java b/common/src/main/java/net/blay09/mods/waystones/network/message/TeleportEffectMessage.java similarity index 65% rename from shared/src/main/java/net/blay09/mods/waystones/network/message/TeleportEffectMessage.java rename to common/src/main/java/net/blay09/mods/waystones/network/message/TeleportEffectMessage.java index f0877227..aa377d81 100644 --- a/shared/src/main/java/net/blay09/mods/waystones/network/message/TeleportEffectMessage.java +++ b/common/src/main/java/net/blay09/mods/waystones/network/message/TeleportEffectMessage.java @@ -1,12 +1,18 @@ package net.blay09.mods.waystones.network.message; +import net.blay09.mods.waystones.Waystones; import net.minecraft.core.BlockPos; import net.minecraft.core.particles.ParticleTypes; import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.network.protocol.common.custom.CustomPacketPayload; +import net.minecraft.resources.ResourceLocation; import net.minecraft.world.entity.player.Player; import net.minecraft.world.level.Level; -public class TeleportEffectMessage { +public class TeleportEffectMessage implements CustomPacketPayload { + + public static final CustomPacketPayload.Type TYPE = new CustomPacketPayload.Type<>(new ResourceLocation(Waystones.MOD_ID, + "teleport_effect")); private final BlockPos pos; @@ -14,7 +20,7 @@ public TeleportEffectMessage(BlockPos pos) { this.pos = pos; } - public static void encode(TeleportEffectMessage message, FriendlyByteBuf buf) { + public static void encode(FriendlyByteBuf buf, TeleportEffectMessage message) { buf.writeBlockPos(message.pos); } @@ -31,4 +37,9 @@ public static void handle(Player player, TeleportEffectMessage message) { } } } + + @Override + public Type type() { + return TYPE; + } } diff --git a/shared/src/main/java/net/blay09/mods/waystones/network/message/UpdateWaystoneMessage.java b/common/src/main/java/net/blay09/mods/waystones/network/message/UpdateWaystoneMessage.java similarity index 54% rename from shared/src/main/java/net/blay09/mods/waystones/network/message/UpdateWaystoneMessage.java rename to common/src/main/java/net/blay09/mods/waystones/network/message/UpdateWaystoneMessage.java index 53ae67fb..0f8519c7 100644 --- a/shared/src/main/java/net/blay09/mods/waystones/network/message/UpdateWaystoneMessage.java +++ b/common/src/main/java/net/blay09/mods/waystones/network/message/UpdateWaystoneMessage.java @@ -1,13 +1,20 @@ package net.blay09.mods.waystones.network.message; import net.blay09.mods.balm.api.Balm; +import net.blay09.mods.waystones.Waystones; import net.blay09.mods.waystones.api.Waystone; import net.blay09.mods.waystones.api.event.WaystoneUpdateReceivedEvent; import net.blay09.mods.waystones.core.*; import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.network.RegistryFriendlyByteBuf; +import net.minecraft.network.protocol.common.custom.CustomPacketPayload; +import net.minecraft.resources.ResourceLocation; import net.minecraft.world.entity.player.Player; -public class UpdateWaystoneMessage { +public class UpdateWaystoneMessage implements CustomPacketPayload { + + public static final CustomPacketPayload.Type TYPE = new CustomPacketPayload.Type<>(new ResourceLocation(Waystones.MOD_ID, + "update_waystone")); private final Waystone waystone; @@ -15,11 +22,11 @@ public UpdateWaystoneMessage(Waystone waystone) { this.waystone = waystone; } - public static void encode(UpdateWaystoneMessage message, FriendlyByteBuf buf) { + public static void encode(RegistryFriendlyByteBuf buf, UpdateWaystoneMessage message) { WaystoneImpl.write(buf, message.waystone); } - public static UpdateWaystoneMessage decode(FriendlyByteBuf buf) { + public static UpdateWaystoneMessage decode(RegistryFriendlyByteBuf buf) { return new UpdateWaystoneMessage(WaystoneImpl.read(buf)); } @@ -27,4 +34,9 @@ public static void handle(Player player, UpdateWaystoneMessage message) { WaystoneManagerImpl.get(player.getServer()).updateWaystone(message.waystone); Balm.getEvents().fireEvent(new WaystoneUpdateReceivedEvent(message.waystone)); } + + @Override + public Type type() { + return TYPE; + } } diff --git a/shared/src/main/java/net/blay09/mods/waystones/network/message/WaystoneRemovedMessage.java b/common/src/main/java/net/blay09/mods/waystones/network/message/WaystoneRemovedMessage.java similarity index 69% rename from shared/src/main/java/net/blay09/mods/waystones/network/message/WaystoneRemovedMessage.java rename to common/src/main/java/net/blay09/mods/waystones/network/message/WaystoneRemovedMessage.java index 4c739ddb..4b226b79 100644 --- a/shared/src/main/java/net/blay09/mods/waystones/network/message/WaystoneRemovedMessage.java +++ b/common/src/main/java/net/blay09/mods/waystones/network/message/WaystoneRemovedMessage.java @@ -1,14 +1,19 @@ package net.blay09.mods.waystones.network.message; import net.blay09.mods.balm.api.Balm; +import net.blay09.mods.waystones.Waystones; import net.blay09.mods.waystones.api.event.WaystoneRemoveReceivedEvent; import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.network.protocol.common.custom.CustomPacketPayload; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.entity.player.Player; import java.util.UUID; -public class WaystoneRemovedMessage { +public class WaystoneRemovedMessage implements CustomPacketPayload { + + public static final CustomPacketPayload.Type TYPE = new CustomPacketPayload.Type<>(new ResourceLocation(Waystones.MOD_ID, + "waystone_removed")); private final ResourceLocation waystoneType; private final UUID waystoneId; @@ -20,7 +25,7 @@ public WaystoneRemovedMessage(ResourceLocation waystoneType, UUID waystoneId, bo this.wasDestroyed = wasDestroyed; } - public static void encode(WaystoneRemovedMessage message, FriendlyByteBuf buf) { + public static void encode(FriendlyByteBuf buf, WaystoneRemovedMessage message) { buf.writeResourceLocation(message.waystoneType); buf.writeUUID(message.waystoneId); buf.writeBoolean(message.wasDestroyed); @@ -33,4 +38,9 @@ public static WaystoneRemovedMessage decode(FriendlyByteBuf buf) { public static void handle(Player player, WaystoneRemovedMessage message) { Balm.getEvents().fireEvent(new WaystoneRemoveReceivedEvent(message.waystoneType, message.waystoneId, message.wasDestroyed)); } + + @Override + public Type type() { + return TYPE; + } } diff --git a/shared/src/main/java/net/blay09/mods/waystones/recipe/ModRecipes.java b/common/src/main/java/net/blay09/mods/waystones/recipe/ModRecipes.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/recipe/ModRecipes.java rename to common/src/main/java/net/blay09/mods/waystones/recipe/ModRecipes.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/recipe/WaystoneRecipe.java b/common/src/main/java/net/blay09/mods/waystones/recipe/WaystoneRecipe.java similarity index 75% rename from shared/src/main/java/net/blay09/mods/waystones/recipe/WaystoneRecipe.java rename to common/src/main/java/net/blay09/mods/waystones/recipe/WaystoneRecipe.java index 7127cb2e..e3a69b7c 100644 --- a/shared/src/main/java/net/blay09/mods/waystones/recipe/WaystoneRecipe.java +++ b/common/src/main/java/net/blay09/mods/waystones/recipe/WaystoneRecipe.java @@ -1,12 +1,13 @@ package net.blay09.mods.waystones.recipe; -import com.mojang.serialization.Codec; import com.mojang.serialization.DataResult; +import com.mojang.serialization.MapCodec; import com.mojang.serialization.codecs.RecordCodecBuilder; import net.blay09.mods.waystones.block.ModBlocks; +import net.minecraft.core.HolderLookup; import net.minecraft.core.NonNullList; -import net.minecraft.core.RegistryAccess; -import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.network.RegistryFriendlyByteBuf; +import net.minecraft.network.codec.StreamCodec; import net.minecraft.world.Container; import net.minecraft.world.entity.player.StackedContents; import net.minecraft.world.item.ItemStack; @@ -54,12 +55,12 @@ public boolean matches(Container inventory, Level level) { } @Override - public ItemStack assemble(Container inventory, RegistryAccess registryAccess) { + public ItemStack assemble(Container inventory, HolderLookup.Provider provider) { return this.resultItem.copy(); } @Override - public ItemStack getResultItem(RegistryAccess registryAccess) { + public ItemStack getResultItem(HolderLookup.Provider provider) { return this.resultItem; } @@ -104,8 +105,8 @@ public RecipeType getType() { static class Serializer implements RecipeSerializer { - private static final Codec CODEC = RecordCodecBuilder.create(instance -> instance.group( - ItemStack.ITEM_WITH_COUNT_CODEC.fieldOf("result").forGetter(recipe -> recipe.resultItem), + private static final MapCodec CODEC = RecordCodecBuilder.mapCodec(instance -> instance.group( + ItemStack.CODEC.fieldOf("result").forGetter(recipe -> recipe.resultItem), Ingredient.CODEC.fieldOf("primary").forGetter(recipe -> recipe.primaryIngredient), Ingredient.CODEC.listOf().fieldOf("secondary") .flatXmap(secondary -> { @@ -118,29 +119,32 @@ static class Serializer implements RecipeSerializer { .apply(instance, WaystoneRecipe::new)); @Override - public Codec codec() { + public MapCodec codec() { return CODEC; } @Override - public WaystoneRecipe fromNetwork(FriendlyByteBuf buf) { - final var resultItem = buf.readItem(); - final var primaryIngredient = Ingredient.fromNetwork(buf); + public StreamCodec streamCodec() { + return StreamCodec.of(WaystoneRecipe.Serializer::toNetwork, WaystoneRecipe.Serializer::fromNetwork); + } + + private static WaystoneRecipe fromNetwork(RegistryFriendlyByteBuf buf) { + final var resultItem = ItemStack.OPTIONAL_STREAM_CODEC.decode(buf); + final var primaryIngredient = Ingredient.CONTENTS_STREAM_CODEC.decode(buf); final var secondaryCount = buf.readVarInt(); final NonNullList secondaryIngredients = NonNullList.createWithCapacity(secondaryCount); for (int i = 0; i < secondaryCount; i++) { - secondaryIngredients.add(Ingredient.fromNetwork(buf)); + secondaryIngredients.add(Ingredient.CONTENTS_STREAM_CODEC.decode(buf)); } return new WaystoneRecipe(resultItem, primaryIngredient, secondaryIngredients); } - @Override - public void toNetwork(FriendlyByteBuf buf, WaystoneRecipe recipe) { - buf.writeItem(recipe.resultItem); - recipe.primaryIngredient.toNetwork(buf); + private static void toNetwork(RegistryFriendlyByteBuf buf, WaystoneRecipe recipe) { + ItemStack.OPTIONAL_STREAM_CODEC.encode(buf, recipe.resultItem); + Ingredient.CONTENTS_STREAM_CODEC.encode(buf, recipe.primaryIngredient); buf.writeVarInt(recipe.secondaryIngredients.size()); for (Ingredient ingredient : recipe.secondaryIngredients) { - ingredient.toNetwork(buf); + Ingredient.CONTENTS_STREAM_CODEC.encode(buf, ingredient); } } } diff --git a/shared/src/main/java/net/blay09/mods/waystones/requirement/CombinedRequirement.java b/common/src/main/java/net/blay09/mods/waystones/requirement/CombinedRequirement.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/requirement/CombinedRequirement.java rename to common/src/main/java/net/blay09/mods/waystones/requirement/CombinedRequirement.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/requirement/ConfiguredCondition.java b/common/src/main/java/net/blay09/mods/waystones/requirement/ConfiguredCondition.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/requirement/ConfiguredCondition.java rename to common/src/main/java/net/blay09/mods/waystones/requirement/ConfiguredCondition.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/requirement/ConfiguredRequirement.java b/common/src/main/java/net/blay09/mods/waystones/requirement/ConfiguredRequirement.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/requirement/ConfiguredRequirement.java rename to common/src/main/java/net/blay09/mods/waystones/requirement/ConfiguredRequirement.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/requirement/ConfiguredRequirementModifier.java b/common/src/main/java/net/blay09/mods/waystones/requirement/ConfiguredRequirementModifier.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/requirement/ConfiguredRequirementModifier.java rename to common/src/main/java/net/blay09/mods/waystones/requirement/ConfiguredRequirementModifier.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/requirement/CooldownRequirement.java b/common/src/main/java/net/blay09/mods/waystones/requirement/CooldownRequirement.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/requirement/CooldownRequirement.java rename to common/src/main/java/net/blay09/mods/waystones/requirement/CooldownRequirement.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/requirement/CooldownRequirementType.java b/common/src/main/java/net/blay09/mods/waystones/requirement/CooldownRequirementType.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/requirement/CooldownRequirementType.java rename to common/src/main/java/net/blay09/mods/waystones/requirement/CooldownRequirementType.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/requirement/ExperienceLevelRequirement.java b/common/src/main/java/net/blay09/mods/waystones/requirement/ExperienceLevelRequirement.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/requirement/ExperienceLevelRequirement.java rename to common/src/main/java/net/blay09/mods/waystones/requirement/ExperienceLevelRequirement.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/requirement/ExperienceLevelRequirementType.java b/common/src/main/java/net/blay09/mods/waystones/requirement/ExperienceLevelRequirementType.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/requirement/ExperienceLevelRequirementType.java rename to common/src/main/java/net/blay09/mods/waystones/requirement/ExperienceLevelRequirementType.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/requirement/ExperiencePointsRequirement.java b/common/src/main/java/net/blay09/mods/waystones/requirement/ExperiencePointsRequirement.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/requirement/ExperiencePointsRequirement.java rename to common/src/main/java/net/blay09/mods/waystones/requirement/ExperiencePointsRequirement.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/requirement/ExperiencePointsRequirementType.java b/common/src/main/java/net/blay09/mods/waystones/requirement/ExperiencePointsRequirementType.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/requirement/ExperiencePointsRequirementType.java rename to common/src/main/java/net/blay09/mods/waystones/requirement/ExperiencePointsRequirementType.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/requirement/ItemRequirement.java b/common/src/main/java/net/blay09/mods/waystones/requirement/ItemRequirement.java similarity index 94% rename from shared/src/main/java/net/blay09/mods/waystones/requirement/ItemRequirement.java rename to common/src/main/java/net/blay09/mods/waystones/requirement/ItemRequirement.java index bee92b33..2b509592 100644 --- a/shared/src/main/java/net/blay09/mods/waystones/requirement/ItemRequirement.java +++ b/common/src/main/java/net/blay09/mods/waystones/requirement/ItemRequirement.java @@ -23,7 +23,7 @@ public boolean canAfford(Player player) { int count = 0; for (int i = 0; i < player.getInventory().getContainerSize(); i++) { final var slotStack = player.getInventory().getItem(i); - if (ItemStack.isSameItemSameTags(itemStack, slotStack)) { + if (ItemStack.isSameItemSameComponents(itemStack, slotStack)) { count += slotStack.getCount(); if (count >= this.count) { @@ -41,7 +41,7 @@ public void consume(Player player) { for (int i = 0; i < player.getInventory().getContainerSize(); i++) { final var leftToConsume = this.count - consumed; final var slotStack = player.getInventory().getItem(i); - if (ItemStack.isSameItemSameTags(itemStack, slotStack)) { + if (ItemStack.isSameItemSameComponents(itemStack, slotStack)) { final var count = Math.min(slotStack.getCount(), leftToConsume); slotStack.shrink(count); consumed += count; diff --git a/shared/src/main/java/net/blay09/mods/waystones/requirement/ItemRequirementType.java b/common/src/main/java/net/blay09/mods/waystones/requirement/ItemRequirementType.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/requirement/ItemRequirementType.java rename to common/src/main/java/net/blay09/mods/waystones/requirement/ItemRequirementType.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/requirement/NoRequirement.java b/common/src/main/java/net/blay09/mods/waystones/requirement/NoRequirement.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/requirement/NoRequirement.java rename to common/src/main/java/net/blay09/mods/waystones/requirement/NoRequirement.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/requirement/RefuseRequirement.java b/common/src/main/java/net/blay09/mods/waystones/requirement/RefuseRequirement.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/requirement/RefuseRequirement.java rename to common/src/main/java/net/blay09/mods/waystones/requirement/RefuseRequirement.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/requirement/RequirementModifierParser.java b/common/src/main/java/net/blay09/mods/waystones/requirement/RequirementModifierParser.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/requirement/RequirementModifierParser.java rename to common/src/main/java/net/blay09/mods/waystones/requirement/RequirementModifierParser.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/requirement/RequirementRegistry.java b/common/src/main/java/net/blay09/mods/waystones/requirement/RequirementRegistry.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/requirement/RequirementRegistry.java rename to common/src/main/java/net/blay09/mods/waystones/requirement/RequirementRegistry.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/requirement/WarpRequirementsContextImpl.java b/common/src/main/java/net/blay09/mods/waystones/requirement/WarpRequirementsContextImpl.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/requirement/WarpRequirementsContextImpl.java rename to common/src/main/java/net/blay09/mods/waystones/requirement/WarpRequirementsContextImpl.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/stats/ModStats.java b/common/src/main/java/net/blay09/mods/waystones/stats/ModStats.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/stats/ModStats.java rename to common/src/main/java/net/blay09/mods/waystones/stats/ModStats.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/tag/ModBiomeTags.java b/common/src/main/java/net/blay09/mods/waystones/tag/ModBiomeTags.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/tag/ModBiomeTags.java rename to common/src/main/java/net/blay09/mods/waystones/tag/ModBiomeTags.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/tag/ModBlockTags.java b/common/src/main/java/net/blay09/mods/waystones/tag/ModBlockTags.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/tag/ModBlockTags.java rename to common/src/main/java/net/blay09/mods/waystones/tag/ModBlockTags.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/tag/ModItemTags.java b/common/src/main/java/net/blay09/mods/waystones/tag/ModItemTags.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/tag/ModItemTags.java rename to common/src/main/java/net/blay09/mods/waystones/tag/ModItemTags.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/worldgen/ModWorldGen.java b/common/src/main/java/net/blay09/mods/waystones/worldgen/ModWorldGen.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/worldgen/ModWorldGen.java rename to common/src/main/java/net/blay09/mods/waystones/worldgen/ModWorldGen.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/worldgen/WaystoneFeature.java b/common/src/main/java/net/blay09/mods/waystones/worldgen/WaystoneFeature.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/worldgen/WaystoneFeature.java rename to common/src/main/java/net/blay09/mods/waystones/worldgen/WaystoneFeature.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/worldgen/WaystonePlacement.java b/common/src/main/java/net/blay09/mods/waystones/worldgen/WaystonePlacement.java similarity index 93% rename from shared/src/main/java/net/blay09/mods/waystones/worldgen/WaystonePlacement.java rename to common/src/main/java/net/blay09/mods/waystones/worldgen/WaystonePlacement.java index dedf0976..2153c396 100644 --- a/shared/src/main/java/net/blay09/mods/waystones/worldgen/WaystonePlacement.java +++ b/common/src/main/java/net/blay09/mods/waystones/worldgen/WaystonePlacement.java @@ -1,6 +1,7 @@ package net.blay09.mods.waystones.worldgen; import com.mojang.serialization.Codec; +import com.mojang.serialization.MapCodec; import com.mojang.serialization.codecs.RecordCodecBuilder; import net.blay09.mods.waystones.config.WaystonesConfig; import net.minecraft.core.BlockPos; @@ -19,7 +20,7 @@ public class WaystonePlacement extends PlacementModifier { - public static final Codec CODEC = RecordCodecBuilder.create((builder) -> builder.group(Heightmap.Types.CODEC.fieldOf("heightmap").forGetter((placement) -> placement.heightmap)).apply(builder, WaystonePlacement::new)); + public static final MapCodec CODEC = RecordCodecBuilder.mapCodec((builder) -> builder.group(Heightmap.Types.CODEC.fieldOf("heightmap").forGetter((placement) -> placement.heightmap)).apply(builder, WaystonePlacement::new)); private final Heightmap.Types heightmap; diff --git a/shared/src/main/java/net/blay09/mods/waystones/worldgen/WaystoneStructurePoolElement.java b/common/src/main/java/net/blay09/mods/waystones/worldgen/WaystoneStructurePoolElement.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/worldgen/WaystoneStructurePoolElement.java rename to common/src/main/java/net/blay09/mods/waystones/worldgen/WaystoneStructurePoolElement.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/worldgen/namegen/BiomeNameGenerator.java b/common/src/main/java/net/blay09/mods/waystones/worldgen/namegen/BiomeNameGenerator.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/worldgen/namegen/BiomeNameGenerator.java rename to common/src/main/java/net/blay09/mods/waystones/worldgen/namegen/BiomeNameGenerator.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/worldgen/namegen/CustomNameGenerator.java b/common/src/main/java/net/blay09/mods/waystones/worldgen/namegen/CustomNameGenerator.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/worldgen/namegen/CustomNameGenerator.java rename to common/src/main/java/net/blay09/mods/waystones/worldgen/namegen/CustomNameGenerator.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/worldgen/namegen/LiteralNameGenerator.java b/common/src/main/java/net/blay09/mods/waystones/worldgen/namegen/LiteralNameGenerator.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/worldgen/namegen/LiteralNameGenerator.java rename to common/src/main/java/net/blay09/mods/waystones/worldgen/namegen/LiteralNameGenerator.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/worldgen/namegen/MixedNameGenerator.java b/common/src/main/java/net/blay09/mods/waystones/worldgen/namegen/MixedNameGenerator.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/worldgen/namegen/MixedNameGenerator.java rename to common/src/main/java/net/blay09/mods/waystones/worldgen/namegen/MixedNameGenerator.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/worldgen/namegen/MrPorkNameGenerator.java b/common/src/main/java/net/blay09/mods/waystones/worldgen/namegen/MrPorkNameGenerator.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/worldgen/namegen/MrPorkNameGenerator.java rename to common/src/main/java/net/blay09/mods/waystones/worldgen/namegen/MrPorkNameGenerator.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/worldgen/namegen/NameGenerationMode.java b/common/src/main/java/net/blay09/mods/waystones/worldgen/namegen/NameGenerationMode.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/worldgen/namegen/NameGenerationMode.java rename to common/src/main/java/net/blay09/mods/waystones/worldgen/namegen/NameGenerationMode.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/worldgen/namegen/NameGenerator.java b/common/src/main/java/net/blay09/mods/waystones/worldgen/namegen/NameGenerator.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/worldgen/namegen/NameGenerator.java rename to common/src/main/java/net/blay09/mods/waystones/worldgen/namegen/NameGenerator.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/worldgen/namegen/NameGeneratorManager.java b/common/src/main/java/net/blay09/mods/waystones/worldgen/namegen/NameGeneratorManager.java similarity index 96% rename from shared/src/main/java/net/blay09/mods/waystones/worldgen/namegen/NameGeneratorManager.java rename to common/src/main/java/net/blay09/mods/waystones/worldgen/namegen/NameGeneratorManager.java index d7b833a5..48dae8ec 100644 --- a/shared/src/main/java/net/blay09/mods/waystones/worldgen/namegen/NameGeneratorManager.java +++ b/common/src/main/java/net/blay09/mods/waystones/worldgen/namegen/NameGeneratorManager.java @@ -6,6 +6,7 @@ import net.blay09.mods.waystones.api.event.GenerateWaystoneNameEvent; import net.blay09.mods.waystones.api.Waystone; import net.blay09.mods.waystones.config.WaystonesConfig; +import net.minecraft.core.HolderLookup; import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.ListTag; import net.minecraft.nbt.StringTag; @@ -72,7 +73,7 @@ private Component resolveDuplicate(Component name) { return tryName; } - public static NameGeneratorManager load(CompoundTag compound) { + public static NameGeneratorManager load(CompoundTag compound, HolderLookup.Provider provider) { NameGeneratorManager nameGenerator = new NameGeneratorManager(); ListTag tagList = compound.getList(USED_NAMES, Tag.TAG_STRING); for (Tag tag : tagList) { @@ -82,7 +83,7 @@ public static NameGeneratorManager load(CompoundTag compound) { } @Override - public CompoundTag save(CompoundTag compound) { + public CompoundTag save(CompoundTag compound, HolderLookup.Provider provider) { ListTag tagList = new ListTag(); for (String entry : usedNames) { tagList.add(StringTag.valueOf(entry)); diff --git a/shared/src/main/java/net/blay09/mods/waystones/worldgen/namegen/RomanNumber.java b/common/src/main/java/net/blay09/mods/waystones/worldgen/namegen/RomanNumber.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/worldgen/namegen/RomanNumber.java rename to common/src/main/java/net/blay09/mods/waystones/worldgen/namegen/RomanNumber.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/worldgen/namegen/SequencedNameGenerator.java b/common/src/main/java/net/blay09/mods/waystones/worldgen/namegen/SequencedNameGenerator.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/worldgen/namegen/SequencedNameGenerator.java rename to common/src/main/java/net/blay09/mods/waystones/worldgen/namegen/SequencedNameGenerator.java diff --git a/shared/src/main/java/net/blay09/mods/waystones/worldgen/namegen/TemplateNameGenerator.java b/common/src/main/java/net/blay09/mods/waystones/worldgen/namegen/TemplateNameGenerator.java similarity index 100% rename from shared/src/main/java/net/blay09/mods/waystones/worldgen/namegen/TemplateNameGenerator.java rename to common/src/main/java/net/blay09/mods/waystones/worldgen/namegen/TemplateNameGenerator.java diff --git a/shared/src/main/resources/assets/minecraft/atlases/blocks.json b/common/src/main/resources/assets/minecraft/atlases/blocks.json similarity index 100% rename from shared/src/main/resources/assets/minecraft/atlases/blocks.json rename to common/src/main/resources/assets/minecraft/atlases/blocks.json diff --git a/shared/src/main/resources/assets/minecraft/textures/waystone_overlays/portstone.png b/common/src/main/resources/assets/minecraft/textures/waystone_overlays/portstone.png similarity index 100% rename from shared/src/main/resources/assets/minecraft/textures/waystone_overlays/portstone.png rename to common/src/main/resources/assets/minecraft/textures/waystone_overlays/portstone.png diff --git a/shared/src/main/resources/assets/minecraft/textures/waystone_overlays/sharestone_color.png b/common/src/main/resources/assets/minecraft/textures/waystone_overlays/sharestone_color.png similarity index 100% rename from shared/src/main/resources/assets/minecraft/textures/waystone_overlays/sharestone_color.png rename to common/src/main/resources/assets/minecraft/textures/waystone_overlays/sharestone_color.png diff --git a/shared/src/main/resources/assets/minecraft/textures/waystone_overlays/waystone_active.png b/common/src/main/resources/assets/minecraft/textures/waystone_overlays/waystone_active.png similarity index 100% rename from shared/src/main/resources/assets/minecraft/textures/waystone_overlays/waystone_active.png rename to common/src/main/resources/assets/minecraft/textures/waystone_overlays/waystone_active.png diff --git a/shared/src/main/resources/assets/waystones/lang/cs_cz.json b/common/src/main/resources/assets/waystones/lang/cs_cz.json similarity index 100% rename from shared/src/main/resources/assets/waystones/lang/cs_cz.json rename to common/src/main/resources/assets/waystones/lang/cs_cz.json diff --git a/shared/src/main/resources/assets/waystones/lang/de_de.json b/common/src/main/resources/assets/waystones/lang/de_de.json similarity index 100% rename from shared/src/main/resources/assets/waystones/lang/de_de.json rename to common/src/main/resources/assets/waystones/lang/de_de.json diff --git a/shared/src/main/resources/assets/waystones/lang/en_us.json b/common/src/main/resources/assets/waystones/lang/en_us.json similarity index 100% rename from shared/src/main/resources/assets/waystones/lang/en_us.json rename to common/src/main/resources/assets/waystones/lang/en_us.json diff --git a/shared/src/main/resources/assets/waystones/lang/es_ar.json b/common/src/main/resources/assets/waystones/lang/es_ar.json similarity index 100% rename from shared/src/main/resources/assets/waystones/lang/es_ar.json rename to common/src/main/resources/assets/waystones/lang/es_ar.json diff --git a/shared/src/main/resources/assets/waystones/lang/es_cl.json b/common/src/main/resources/assets/waystones/lang/es_cl.json similarity index 100% rename from shared/src/main/resources/assets/waystones/lang/es_cl.json rename to common/src/main/resources/assets/waystones/lang/es_cl.json diff --git a/shared/src/main/resources/assets/waystones/lang/es_es.json b/common/src/main/resources/assets/waystones/lang/es_es.json similarity index 100% rename from shared/src/main/resources/assets/waystones/lang/es_es.json rename to common/src/main/resources/assets/waystones/lang/es_es.json diff --git a/shared/src/main/resources/assets/waystones/lang/es_mx.json b/common/src/main/resources/assets/waystones/lang/es_mx.json similarity index 100% rename from shared/src/main/resources/assets/waystones/lang/es_mx.json rename to common/src/main/resources/assets/waystones/lang/es_mx.json diff --git a/shared/src/main/resources/assets/waystones/lang/fr_fr.json b/common/src/main/resources/assets/waystones/lang/fr_fr.json similarity index 100% rename from shared/src/main/resources/assets/waystones/lang/fr_fr.json rename to common/src/main/resources/assets/waystones/lang/fr_fr.json diff --git a/shared/src/main/resources/assets/waystones/lang/hu_hu.json b/common/src/main/resources/assets/waystones/lang/hu_hu.json similarity index 100% rename from shared/src/main/resources/assets/waystones/lang/hu_hu.json rename to common/src/main/resources/assets/waystones/lang/hu_hu.json diff --git a/shared/src/main/resources/assets/waystones/lang/it_it.json b/common/src/main/resources/assets/waystones/lang/it_it.json similarity index 100% rename from shared/src/main/resources/assets/waystones/lang/it_it.json rename to common/src/main/resources/assets/waystones/lang/it_it.json diff --git a/shared/src/main/resources/assets/waystones/lang/ja_jp.json b/common/src/main/resources/assets/waystones/lang/ja_jp.json similarity index 99% rename from shared/src/main/resources/assets/waystones/lang/ja_jp.json rename to common/src/main/resources/assets/waystones/lang/ja_jp.json index 71aa25d7..3818e492 100644 --- a/shared/src/main/resources/assets/waystones/lang/ja_jp.json +++ b/common/src/main/resources/assets/waystones/lang/ja_jp.json @@ -1,197 +1,197 @@ -{ - "itemGroup.waystones.waystones": "転移ポイント", - "block.waystones.waystone": "転移ポイント", - "block.waystones.mossy_waystone": "苔むした転移ポイント", - "block.waystones.sandy_waystone": "砂岩の転移ポイント", - "block.waystones.sharestone": "無色の共有転移ポイント", - "block.waystones.white_sharestone": "白色の共有転移ポイント", - "block.waystones.orange_sharestone": "橙色の共有転移ポイント", - "block.waystones.magenta_sharestone": "赤紫色の共有転移ポイント", - "block.waystones.light_blue_sharestone": "空色の共有転移ポイント", - "block.waystones.yellow_sharestone": "黄色の共有転移ポイント", - "block.waystones.lime_sharestone": "黄緑色の共有転移ポイント", - "block.waystones.pink_sharestone": "桃色の共有転移ポイント", - "block.waystones.gray_sharestone": "灰色の共有転移ポイント", - "block.waystones.light_gray_sharestone": "薄灰色の共有転移ポイント", - "block.waystones.cyan_sharestone": "青緑色の共有転移ポイント", - "block.waystones.purple_sharestone": "紫色の共有転移ポイント", - "block.waystones.blue_sharestone": "青色の共有転移ポイント", - "block.waystones.brown_sharestone": "茶色の共有転移ポイント", - "block.waystones.green_sharestone": "緑色の共有転移ポイント", - "block.waystones.red_sharestone": "赤色の共有転移ポイント", - "block.waystones.black_sharestone": "黒色の共有転移ポイント", - "block.waystones.warp_plate": "ワーププレート", - "block.waystones.portstone": "片道転移ポイント", - "item.waystones.warp_scroll": "転移の巻物", - "item.waystones.warp_scroll_bound": "転移の巻物(行先固定)", - "item.waystones.return_scroll": "帰還の巻物", - "item.waystones.warp_stone": "ワープストーン", - "item.waystones.bound_scroll": "固定転移の巻物", - "item.waystones.warp_dust": "ワープダスト", - "item.waystones.attuned_shard": "ワーププレートの欠片", - "container.waystones.waystone_selection": "転移先を選択してください:", - "container.waystones.waystone_settings": "転移ポイントの名前を入力:", - "container.waystones.warp_plate": "ワーププレート", - "gui.waystones.waystone_selection.next_page": "次ページ", - "gui.waystones.waystone_selection.previous_page": "前ページ", - "gui.waystones.waystone_selection.current_location": "現在位置: %s", - "gui.waystones.waystone_selection.unnamed_waystone": "<未設定>", - "gui.waystones.waystone_selection.hold_shift_to_delete": "シフトを押しながらブロック使用で非活性化", - "gui.waystones.waystone_selection.click_to_delete": "ブロック使用で非活性化", - "gui.waystones.waystone_selection.deleting_global_for_all": "全員使用可能な転移ポイントを非活性化します!", - "gui.waystones.waystone_selection.no_waystones_activated": "活性化している転移ポイントがありません", - "gui.waystones.waystone_selection.level_requirement": "必要レベル: %d", - "gui.waystones.waystone_settings.is_global": "全員使用可能", - "gui.waystones.inventory.no_waystones_activated": "活性化している転移ポイントがありません", - "gui.waystones.inventory.confirm_return": "本当にこの転移ポイントに転移しますか?", - "gui.waystones.inventory.confirm_return_bound_to": "転移先: %s", - "gui.waystones.inventory.return_to_waystone": "転移ポイントに転移", - "gui.waystones.inventory.return_to_nearest_waystone": "最も近くの転移ポイントに転移", - "chat.waystones.waystone_activated": "転移ポイント%sを活性化しました", - "chat.waystones.scroll_bound": "転移先を%sに設定しました", - "chat.waystones.scroll_not_yet_bound": "この巻物は転移先が設定されていません", - "chat.waystones.cannot_dimension_warp": "異なるディメンジョンには転移できません", - "chat.waystones.waystone_missing": "転移先の転移ポイントが移動したか破壊されています", - "chat.waystones.cannot_transport_leashed": "Mobを連れたままでは転移できません", - "chat.waystones.cannot_transport_leashed_dimensional": "Mobを連れて異なるディメンジョンには転移できません", - "chat.waystones.cannot_transport_this_leashed": "このMobを連れたまま転移することはできません", - "chat.waystones.warpstone_not_charged": "このワープストーンはしばらくの間使えません", - "chat.waystones.only_owner_can_edit": "転移ポイントの名前は設置したプレイヤーのみが可能です", - "chat.waystones.only_creative_can_edit": "転移ポイントを全員使用可能にするには、クリエイティブモードである必要があります", - "chat.waystones.waystone_to_waystone_disabled": "転移ポイントに触ったが、何も起こらなかった", - "chat.waystones.warp_plate_has_no_target": "このワーププレートは転移先が設定されていません", - "chat.waystones.warp_plate_has_invalid_target": "このワーププレートは転移先設定が破損した欠片があります", - "tooltip.waystones.cooldown_left": "あと%d秒で使用可能", - "tooltip.waystones.bound_to": "転移先: %s", - "tooltip.waystones.bound_to_none": "未設定", - "tooltip.waystones.portstone": "設置場所からの転移だけが可能", - "tooltip.waystones.sharestone": "任意の無色の共有転移ポイントに移動できる", - "tooltip.waystones.white_sharestone": "任意の白色の共有転移ポイントに移動できる", - "tooltip.waystones.orange_sharestone": "任意の橙色の共有転移ポイントに移動できる", - "tooltip.waystones.magenta_sharestone": "任意の赤紫色の共有転移ポイントに移動できる", - "tooltip.waystones.light_blue_sharestone": "任意の空色の共有転移ポイントに移動できる", - "tooltip.waystones.yellow_sharestone": "任意の黄色の共有転移ポイントに移動できる", - "tooltip.waystones.lime_sharestone": "任意の黄緑色の共有転移ポイントに移動できる", - "tooltip.waystones.pink_sharestone": "任意の桃色の共有転移ポイントに移動できる", - "tooltip.waystones.gray_sharestone": "任意の灰色の共有転移ポイントに移動できる", - "tooltip.waystones.light_gray_sharestone": "任意の薄灰色の共有転移ポイントに移動できる", - "tooltip.waystones.cyan_sharestone": "任意の青紫色の共有転移ポイントに移動できる", - "tooltip.waystones.purple_sharestone": "任意の紫色の共有転移ポイントに移動できる", - "tooltip.waystones.blue_sharestone": "任意の青色の共有転移ポイントに移動できる", - "tooltip.waystones.brown_sharestone": "任意の茶色の共有転移ポイントに移動できる", - "tooltip.waystones.green_sharestone": "任意の緑色の共有転移ポイントに移動できる", - "tooltip.waystones.red_sharestone": "任意の赤色の共有転移ポイントに移動できる", - "tooltip.waystones.black_sharestone": "任意の黒色の共有転移ポイントに移動できる", - "tooltip.waystones.attuned_shard.move_to_other_warp_plate": "この欠片を、他のワーププレートに入れてください", - "tooltip.waystones.attuned_shard.plug_into_warp_plate": "この欠片をワーププレートに入れてください", - "tooltip.waystones.attuned_shard.attunement_lost": "この欠片は転移先の設定が破損しています", - "tooltip.waystones.not_enough_xp": "転移に必要なレベルが足りません!(%dレベル必要です)", - "tooltip.waystones.undiscovered": "未発見", - "stat.waystones.waystone_activated": "転移ポイントを活性化しました", - "waystones:warp_plate": "ワーププレート", - "config.waystones.title": "転移ポイント", - "config.waystones.xpCost": "必要レベル設定", - "config.waystones.xpCost.inverseXpCost": "近いほど必要レベルが上昇する", - "config.waystones.xpCost.inverseXpCost.tooltip": "trueの時、転移距離が近いほどレベルが多く必要になります。短距離の移動は他の方法を使うよう促せます。", - "config.waystones.xpCost.blocksPerXpLevel": "レベルあたりの移動ブロック数", - "config.waystones.xpCost.blocksPerXpLevel.tooltip": "レベルあたり移動可能なブロック数です。例えば、500に設定した場合の1000ブロック移動した場合の基準経験値は2となります。", - "config.waystones.xpCost.minimumBaseXpCost": "最低必要基準レベル", - "config.waystones.xpCost.minimumBaseXpCost.tooltip": "基準レベルの最低値です(実際の必要レベルはこれより小さくなります)", - "config.waystones.xpCost.maximumBaseXpCost": "最大必要基準レベル", - "config.waystones.xpCost.maximumBaseXpCost.tooltip": "基準レベルの最大値です(実際の必要レベルはこれより大きくなります)。0にすると、基準レベルが距離に依存しません", - "config.waystones.xpCost.xpCostPerLeashed": "同行Mobあたりの必要レベル", - "config.waystones.xpCost.xpCostPerLeashed.tooltip": "リードで同行するMob1体につき追加で必要になるレベルです。", - "config.waystones.xpCost.dimensionalWarpXpCost": "ディメンジョン間移動の必要レベル", - "config.waystones.xpCost.dimensionalWarpXpCost.tooltip": "ディメンジョン間移動する際に追加で必要になる基準レベルです。この場合ブロック間距離は無視されます", - "config.waystones.xpCost.globalWaystoneXpCostMultiplier": "共通転移ポイントの必要レベル倍率", - "config.waystones.xpCost.globalWaystoneXpCostMultiplier.tooltip": "インベントリのボタンやワープストーン経由で共通転移ポイントに移動した際の、クールダウンタイムにかかる倍率", - "config.waystones.xpCost.warpStoneXpCostMultiplier": "ワープストーンの必要レベル倍率", - "config.waystones.xpCost.warpStoneXpCostMultiplier.tooltip": "ワープストーンを使用した場合に基準レベルにかかる倍率(転移ポイントを使用した場合は対象外)", - "config.waystones.xpCost.sharestoneXpCostMultiplier": "共有転移ポイントの必要レベル倍率", - "config.waystones.xpCost.sharestoneXpCostMultiplier.tooltip": "共有転移ポイント間を移動した場合に基準レベルにかかる倍率", - "config.waystones.xpCost.waystoneXpCostMultiplier": "転移ポイントの必要レベル倍率", - "config.waystones.xpCost.waystoneXpCostMultiplier.tooltip": "転移ポイント間を移動した場合に基準レベルにかかる倍率", - "config.waystones.xpCost.portstoneXpCostMultiplier": "片道転移ポイントの必要レベル倍率", - "config.waystones.xpCost.portstoneXpCostMultiplier.tooltip": "片道転移ポイントから移動した場合に基準レベルにかかる倍率", - "config.waystones.xpCost.warpPlateXpCostMultiplier": "ワーププレートの必要レベル倍率", - "config.waystones.xpCost.warpPlateXpCostMultiplier.tooltip": "ワーププレート間を移動した場合に基準レベルにかかる倍率", - "config.waystones.xpCost.inventoryButtonXpCostMultiplier": "インベントリのワープボタンの必要レベル倍率", - "config.waystones.xpCost.inventoryButtonXpCostMultiplier.tooltip": "インベントリのワープボタンから移動した場合に基準レベルにかかる倍率", - "config.waystones.restrictions": "制限設定", - "config.waystones.restrictions.restrictToCreative": "クリエイティブモードに制限", - "config.waystones.restrictions.restrictToCreative.tooltip": "有効にすると、転移ポイントの変更・設置・破壊はクリエイティブモードのプレイヤーのみ可能になります。クラフトは他モードでも可能です。", - "config.waystones.restrictions.restrictRenameToOwner": "設置者以外名前変更不可", - "config.waystones.restrictions.restrictRenameToOwner.tooltip": "有効にすると、転移ポイントの設置者のみ名前の変更が可能になります", - "config.waystones.restrictions.generatedWaystonesUnbreakable": "自然生成された転移ポイントは破壊不可", - "config.waystones.restrictions.generatedWaystonesUnbreakable.tooltip": "有効にすると、ワールド生成時に生成された転移ポイントは破壊不可能になります", - "config.waystones.restrictions.transportLeashed": "Mobを連れて転移可能", - "config.waystones.restrictions.transportLeashed.tooltip": "有効にすると、リードで吊れているMobも一緒に転移できます", - "config.waystones.restrictions.transportLeashedDimensional": "Mobを連れてディメンジョン間を転移可能", - "config.waystones.restrictions.transportLeashedDimensional.tooltip": "有効にすると、リードで吊れているMobも一緒にディメンジョン間を転移できます", - "config.waystones.restrictions.leashedDenyList": "連れて転移できないMob", - "config.waystones.restrictions.leashedDenyList.tooltip": "リードで連れて転移できないMobのリスト", - "config.waystones.restrictions.dimensionalWarp": "ディメンジョン間の転移", - "config.waystones.restrictions.dimensionalWarp.tooltip": "'ALLOW'にするとディメンジョン間の転移を全員が利用可能になります。'GLOBAL_ONLY'にすると、共通転移ポイントのみディメンジョン間移動可能になります.'DENY'にするとディメンジョン間移動不可となります", - "config.waystones.restrictions.dimensionalWarpAllowList": "ディメンジョン間で転移可能なリスト", - "config.waystones.restrictions.dimensionalWarpAllowList.tooltip": "プレイヤーがディメンジョン間転移可能なディメンジョンのリスト。空文字列にすると、dimensionalWarpDenyListで禁止されたディメンジョンを除くすべてのディメンジョンで転移可能になります", - "config.waystones.restrictions.dimensionalWarpDenyList": "ディメンジョン間で転移不可能なリスト", - "config.waystones.restrictions.dimensionalWarpDenyList.tooltip": "プレイヤーがディメンジョン間転移可能なディメンジョンのリスト。dimensionalWarpAllowListが空文字列の場合のみ使われます", - "config.waystones.restrictions.allowWaystoneToWaystoneTeleport": "転移ポイント相互間の転移を許可する", - "config.waystones.restrictions.allowWaystoneToWaystoneTeleport.tooltip": "trueにすると、プレイヤーは単にブロック使用するだけで転移ポイント間を移動可能になります", - "config.waystones.restrictions.globalWaystoneSetupRequiresCreativeMode": "共通転移ポイントはクリエイティブモードでのみ設定可", - "config.waystones.restrictions.globalWaystoneSetupRequiresCreativeMode.tooltip": "falseにすると、クリエイティブモードでないプレイヤーでも転移ポイントを共通転移ポイントとして設定可能になります", - "config.waystones.cooldowns": "クールダウン設定", - "config.waystones.cooldowns.globalWaystoneCooldownMultiplier": "共通転移ポイントのクールダウン時間倍率", - "config.waystones.cooldowns.globalWaystoneCooldownMultiplier.tooltip": "インベントリのワープボタンかワープストーンを使用して共通転移ポイントに転移した場合にクールダウン時間にかかる倍率", - "config.waystones.cooldowns.warpStoneCooldown": "ワープストーンのクールダウン時間", - "config.waystones.cooldowns.warpStoneCooldown.tooltip": "ワープストーンを使用した場合のクールダウン時間。これはプレイヤー依存のため、全てのワープストーンは同じ時間を共有します", - "config.waystones.cooldowns.warpStoneUseTime": "ワープストーンのチャージ時間", - "config.waystones.cooldowns.warpStoneUseTime.tooltip": "ワープストーン使用時のチャージにかかるtick。アイテム使用を押している間進行します", - "config.waystones.cooldowns.scrollUseTime": "スクロールのチャージ間隔", - "config.waystones.cooldowns.scrollUseTime.tooltip": "スクロール使用時のチャージにかかるtick。アイテム使用を押している間進行します", - "config.waystones.cooldowns.warpPlateUseTime": "ワーププレートのチャージ時間", - "config.waystones.cooldowns.warpPlateUseTime.tooltip": "ワーププレート使用時のチャージにかかるtick。プレイヤーがプレート上に立たなければならない時間です", - "config.waystones.cooldowns.inventoryButtonCooldown": "インベントリのワープボタンの利用可能間隔", - "config.waystones.cooldowns.inventoryButtonCooldown.tooltip": "インベントリのワープボタンの使用ごとに必要になるクールダウン", - "config.waystones.inventoryButton": "インベントリのワープボタン設定", - "config.waystones.inventoryButton.inventoryButton": "インベントリのワープボタン使用", - "config.waystones.inventoryButton.inventoryButton.tooltip": "NONEにするとワープボタンを表示しません。'NEAREST'にするともっとも近い転移ポイントにのみ移動可能。'ANY'にすると、転移ポイントの一覧から選択可能。転移ポイント名を設定すると、特定の転移ポイントにのみ移動可能です", - "config.waystones.inventoryButton.warpButtonX": "ワープボタンのX座標", - "config.waystones.inventoryButton.warpButtonX.tooltip": "インベントリ画面でのワープボタンのX座標", - "config.waystones.inventoryButton.warpButtonY": "ワープボタンのY座標", - "config.waystones.inventoryButton.warpButtonY.tooltip": "インベントリ画面でのワープボタンのY座標", - "config.waystones.inventoryButton.creativeWarpButtonX": "クリエイティブインベントリでのワープボタンのX座標", - "config.waystones.inventoryButton.creativeWarpButtonX.tooltip": "クリエイティブインベントリでのワープボタンのX座標", - "config.waystones.inventoryButton.creativeWarpButtonY": "クリエイティブインベントリでのワープボタンのY座標", - "config.waystones.inventoryButton.creativeWarpButtonY.tooltip": "クリエイティブインベントリでのワープボタンのY座標", - "config.waystones.worldGen": "ワールド生成設定", - "config.waystones.worldGen.worldGenStyle": "ワールド生成のスタイル", - "config.waystones.worldGen.worldGenStyle.tooltip": "DEFAULTにすると通常テクスチャの転移ポイントのみを生成します。MOSSYやSANDYにすると、対応する亜種を生成します。BIOMEにすると、生成されるバイオームに応じて適切なものを生成します", - "config.waystones.worldGen.frequency": "ワールド上の生成頻度", - "config.waystones.worldGen.frequency.tooltip": "ワールドに転移ポイントが生成されるおおよそのチャンク距離。0にするとワールドに生成されません", - "config.waystones.worldGen.dimensionAllowList": "転移ポイント生成を許可するディメンジョンリスト", - "config.waystones.worldGen.dimensionAllowList.tooltip": "ワールド生成時に転移ポイントの生成を許可するワールドのリスト。空欄にすると、worldGenDimensionDenyListに記載されていない全てのディメンジョンで生成されます", - "config.waystones.worldGen.dimensionDenyList": "転移ポイント生成を許可しないディメンジョンリスト", - "config.waystones.worldGen.dimensionDenyList.tooltip": "ワールド生成時に転移ポイントの生成を禁止するワールドのリスト。worldGenDimensionAllowListが空の場合のみ使用されます", - "config.waystones.worldGen.nameGenerationMode": "転移ポイント名の生成モード", - "config.waystones.worldGen.nameGenerationMode.tooltip": "PRESET_FIRSTにすると、カスタム転移ポイント名リストから取得した名前を優先します。PRESET_ONLYにすると、カスタム転移ポイント名リストから取得した名前のみを使用します。MIXEDを使用すると、カスタム転移ポイント名リストから取得した名前とランダム生成した名前を混ぜて使用します", - "config.waystones.worldGen.customWaystoneNames": "カスタム転移ポイント名リスト", - "config.waystones.worldGen.customWaystoneNames.tooltip": "PRESET系の生成モード時にこれらの名前を使用します。詳しい情報はnameGenerationModeを参照してください", - "config.waystones.worldGen.spawnInVillages": "村の中に生成する", - "config.waystones.worldGen.spawnInVillages.tooltip": "trueにすると、村の生成時に転移ポイントが追加で生成されるようになります。一部の村は依然として転移ポイントなしで生成されます", - "config.waystones.worldGen.forceSpawnInVillages": "必ず村の中に生成する", - "config.waystones.worldGen.forceSpawnInVillages.tooltip": "全ての村で転移ポイントを可能な限り早く生成されるように強制します。加えて、転移ポイントが村の中心に生成されるようにします", - "config.waystones.client": "クライアント設定", - "config.waystones.client.disableTextGlow": "テキストを発光させない", - "config.waystones.client.disableTextGlow.tooltip": "enabledにすると、転移ポイント上の文字を発光させません", - "config.waystones.client.disableParticles": "パーティクルを表示しない", - "config.waystones.client.disableParticles.tooltip": "enabledにすると、転移ポイントが活性化されたときにパーティクルを表示しません", - "config.waystones.compatibility": "他MODとの相互運用", - "config.waystones.compatibility.displayWaystonesOnJourneyMap": "JourneyMapに転移ポイントを表示する", - "config.waystones.compatibility.displayWaystonesOnJourneyMap.tooltip": "enabledにすると、活性化された各転移ポイントがJourneyMapの中継地点として登録されます", - "config.waystones.compatibility.preferJourneyMapIntegration": "JourneyMap Integrationを優先する", - "config.waystones.compatibility.preferJourneyMapIntegration.tooltip": "enabledにすると、JourneyMapの中継地点として登録されるのはJourneyMap Integrationがインストールされていない場合のみとなります", - "waystones.iconCredits": "Icons by JoeCreates (CC-BY-SA 3.0)", - "waystones.map.untitled_waystone": "転移ポイント(名称未設定)", - "config.jade.plugin_waystones.waystone": "Waystones" +{ + "itemGroup.waystones.waystones": "転移ポイント", + "block.waystones.waystone": "転移ポイント", + "block.waystones.mossy_waystone": "苔むした転移ポイント", + "block.waystones.sandy_waystone": "砂岩の転移ポイント", + "block.waystones.sharestone": "無色の共有転移ポイント", + "block.waystones.white_sharestone": "白色の共有転移ポイント", + "block.waystones.orange_sharestone": "橙色の共有転移ポイント", + "block.waystones.magenta_sharestone": "赤紫色の共有転移ポイント", + "block.waystones.light_blue_sharestone": "空色の共有転移ポイント", + "block.waystones.yellow_sharestone": "黄色の共有転移ポイント", + "block.waystones.lime_sharestone": "黄緑色の共有転移ポイント", + "block.waystones.pink_sharestone": "桃色の共有転移ポイント", + "block.waystones.gray_sharestone": "灰色の共有転移ポイント", + "block.waystones.light_gray_sharestone": "薄灰色の共有転移ポイント", + "block.waystones.cyan_sharestone": "青緑色の共有転移ポイント", + "block.waystones.purple_sharestone": "紫色の共有転移ポイント", + "block.waystones.blue_sharestone": "青色の共有転移ポイント", + "block.waystones.brown_sharestone": "茶色の共有転移ポイント", + "block.waystones.green_sharestone": "緑色の共有転移ポイント", + "block.waystones.red_sharestone": "赤色の共有転移ポイント", + "block.waystones.black_sharestone": "黒色の共有転移ポイント", + "block.waystones.warp_plate": "ワーププレート", + "block.waystones.portstone": "片道転移ポイント", + "item.waystones.warp_scroll": "転移の巻物", + "item.waystones.warp_scroll_bound": "転移の巻物(行先固定)", + "item.waystones.return_scroll": "帰還の巻物", + "item.waystones.warp_stone": "ワープストーン", + "item.waystones.bound_scroll": "固定転移の巻物", + "item.waystones.warp_dust": "ワープダスト", + "item.waystones.attuned_shard": "ワーププレートの欠片", + "container.waystones.waystone_selection": "転移先を選択してください:", + "container.waystones.waystone_settings": "転移ポイントの名前を入力:", + "container.waystones.warp_plate": "ワーププレート", + "gui.waystones.waystone_selection.next_page": "次ページ", + "gui.waystones.waystone_selection.previous_page": "前ページ", + "gui.waystones.waystone_selection.current_location": "現在位置: %s", + "gui.waystones.waystone_selection.unnamed_waystone": "<未設定>", + "gui.waystones.waystone_selection.hold_shift_to_delete": "シフトを押しながらブロック使用で非活性化", + "gui.waystones.waystone_selection.click_to_delete": "ブロック使用で非活性化", + "gui.waystones.waystone_selection.deleting_global_for_all": "全員使用可能な転移ポイントを非活性化します!", + "gui.waystones.waystone_selection.no_waystones_activated": "活性化している転移ポイントがありません", + "gui.waystones.waystone_selection.level_requirement": "必要レベル: %d", + "gui.waystones.waystone_settings.is_global": "全員使用可能", + "gui.waystones.inventory.no_waystones_activated": "活性化している転移ポイントがありません", + "gui.waystones.inventory.confirm_return": "本当にこの転移ポイントに転移しますか?", + "gui.waystones.inventory.confirm_return_bound_to": "転移先: %s", + "gui.waystones.inventory.return_to_waystone": "転移ポイントに転移", + "gui.waystones.inventory.return_to_nearest_waystone": "最も近くの転移ポイントに転移", + "chat.waystones.waystone_activated": "転移ポイント%sを活性化しました", + "chat.waystones.scroll_bound": "転移先を%sに設定しました", + "chat.waystones.scroll_not_yet_bound": "この巻物は転移先が設定されていません", + "chat.waystones.cannot_dimension_warp": "異なるディメンジョンには転移できません", + "chat.waystones.waystone_missing": "転移先の転移ポイントが移動したか破壊されています", + "chat.waystones.cannot_transport_leashed": "Mobを連れたままでは転移できません", + "chat.waystones.cannot_transport_leashed_dimensional": "Mobを連れて異なるディメンジョンには転移できません", + "chat.waystones.cannot_transport_this_leashed": "このMobを連れたまま転移することはできません", + "chat.waystones.warpstone_not_charged": "このワープストーンはしばらくの間使えません", + "chat.waystones.only_owner_can_edit": "転移ポイントの名前は設置したプレイヤーのみが可能です", + "chat.waystones.only_creative_can_edit": "転移ポイントを全員使用可能にするには、クリエイティブモードである必要があります", + "chat.waystones.waystone_to_waystone_disabled": "転移ポイントに触ったが、何も起こらなかった", + "chat.waystones.warp_plate_has_no_target": "このワーププレートは転移先が設定されていません", + "chat.waystones.warp_plate_has_invalid_target": "このワーププレートは転移先設定が破損した欠片があります", + "tooltip.waystones.cooldown_left": "あと%d秒で使用可能", + "tooltip.waystones.bound_to": "転移先: %s", + "tooltip.waystones.bound_to_none": "未設定", + "tooltip.waystones.portstone": "設置場所からの転移だけが可能", + "tooltip.waystones.sharestone": "任意の無色の共有転移ポイントに移動できる", + "tooltip.waystones.white_sharestone": "任意の白色の共有転移ポイントに移動できる", + "tooltip.waystones.orange_sharestone": "任意の橙色の共有転移ポイントに移動できる", + "tooltip.waystones.magenta_sharestone": "任意の赤紫色の共有転移ポイントに移動できる", + "tooltip.waystones.light_blue_sharestone": "任意の空色の共有転移ポイントに移動できる", + "tooltip.waystones.yellow_sharestone": "任意の黄色の共有転移ポイントに移動できる", + "tooltip.waystones.lime_sharestone": "任意の黄緑色の共有転移ポイントに移動できる", + "tooltip.waystones.pink_sharestone": "任意の桃色の共有転移ポイントに移動できる", + "tooltip.waystones.gray_sharestone": "任意の灰色の共有転移ポイントに移動できる", + "tooltip.waystones.light_gray_sharestone": "任意の薄灰色の共有転移ポイントに移動できる", + "tooltip.waystones.cyan_sharestone": "任意の青紫色の共有転移ポイントに移動できる", + "tooltip.waystones.purple_sharestone": "任意の紫色の共有転移ポイントに移動できる", + "tooltip.waystones.blue_sharestone": "任意の青色の共有転移ポイントに移動できる", + "tooltip.waystones.brown_sharestone": "任意の茶色の共有転移ポイントに移動できる", + "tooltip.waystones.green_sharestone": "任意の緑色の共有転移ポイントに移動できる", + "tooltip.waystones.red_sharestone": "任意の赤色の共有転移ポイントに移動できる", + "tooltip.waystones.black_sharestone": "任意の黒色の共有転移ポイントに移動できる", + "tooltip.waystones.attuned_shard.move_to_other_warp_plate": "この欠片を、他のワーププレートに入れてください", + "tooltip.waystones.attuned_shard.plug_into_warp_plate": "この欠片をワーププレートに入れてください", + "tooltip.waystones.attuned_shard.attunement_lost": "この欠片は転移先の設定が破損しています", + "tooltip.waystones.not_enough_xp": "転移に必要なレベルが足りません!(%dレベル必要です)", + "tooltip.waystones.undiscovered": "未発見", + "stat.waystones.waystone_activated": "転移ポイントを活性化しました", + "waystones:warp_plate": "ワーププレート", + "config.waystones.title": "転移ポイント", + "config.waystones.xpCost": "必要レベル設定", + "config.waystones.xpCost.inverseXpCost": "近いほど必要レベルが上昇する", + "config.waystones.xpCost.inverseXpCost.tooltip": "trueの時、転移距離が近いほどレベルが多く必要になります。短距離の移動は他の方法を使うよう促せます。", + "config.waystones.xpCost.blocksPerXpLevel": "レベルあたりの移動ブロック数", + "config.waystones.xpCost.blocksPerXpLevel.tooltip": "レベルあたり移動可能なブロック数です。例えば、500に設定した場合の1000ブロック移動した場合の基準経験値は2となります。", + "config.waystones.xpCost.minimumBaseXpCost": "最低必要基準レベル", + "config.waystones.xpCost.minimumBaseXpCost.tooltip": "基準レベルの最低値です(実際の必要レベルはこれより小さくなります)", + "config.waystones.xpCost.maximumBaseXpCost": "最大必要基準レベル", + "config.waystones.xpCost.maximumBaseXpCost.tooltip": "基準レベルの最大値です(実際の必要レベルはこれより大きくなります)。0にすると、基準レベルが距離に依存しません", + "config.waystones.xpCost.xpCostPerLeashed": "同行Mobあたりの必要レベル", + "config.waystones.xpCost.xpCostPerLeashed.tooltip": "リードで同行するMob1体につき追加で必要になるレベルです。", + "config.waystones.xpCost.dimensionalWarpXpCost": "ディメンジョン間移動の必要レベル", + "config.waystones.xpCost.dimensionalWarpXpCost.tooltip": "ディメンジョン間移動する際に追加で必要になる基準レベルです。この場合ブロック間距離は無視されます", + "config.waystones.xpCost.globalWaystoneXpCostMultiplier": "共通転移ポイントの必要レベル倍率", + "config.waystones.xpCost.globalWaystoneXpCostMultiplier.tooltip": "インベントリのボタンやワープストーン経由で共通転移ポイントに移動した際の、クールダウンタイムにかかる倍率", + "config.waystones.xpCost.warpStoneXpCostMultiplier": "ワープストーンの必要レベル倍率", + "config.waystones.xpCost.warpStoneXpCostMultiplier.tooltip": "ワープストーンを使用した場合に基準レベルにかかる倍率(転移ポイントを使用した場合は対象外)", + "config.waystones.xpCost.sharestoneXpCostMultiplier": "共有転移ポイントの必要レベル倍率", + "config.waystones.xpCost.sharestoneXpCostMultiplier.tooltip": "共有転移ポイント間を移動した場合に基準レベルにかかる倍率", + "config.waystones.xpCost.waystoneXpCostMultiplier": "転移ポイントの必要レベル倍率", + "config.waystones.xpCost.waystoneXpCostMultiplier.tooltip": "転移ポイント間を移動した場合に基準レベルにかかる倍率", + "config.waystones.xpCost.portstoneXpCostMultiplier": "片道転移ポイントの必要レベル倍率", + "config.waystones.xpCost.portstoneXpCostMultiplier.tooltip": "片道転移ポイントから移動した場合に基準レベルにかかる倍率", + "config.waystones.xpCost.warpPlateXpCostMultiplier": "ワーププレートの必要レベル倍率", + "config.waystones.xpCost.warpPlateXpCostMultiplier.tooltip": "ワーププレート間を移動した場合に基準レベルにかかる倍率", + "config.waystones.xpCost.inventoryButtonXpCostMultiplier": "インベントリのワープボタンの必要レベル倍率", + "config.waystones.xpCost.inventoryButtonXpCostMultiplier.tooltip": "インベントリのワープボタンから移動した場合に基準レベルにかかる倍率", + "config.waystones.restrictions": "制限設定", + "config.waystones.restrictions.restrictToCreative": "クリエイティブモードに制限", + "config.waystones.restrictions.restrictToCreative.tooltip": "有効にすると、転移ポイントの変更・設置・破壊はクリエイティブモードのプレイヤーのみ可能になります。クラフトは他モードでも可能です。", + "config.waystones.restrictions.restrictRenameToOwner": "設置者以外名前変更不可", + "config.waystones.restrictions.restrictRenameToOwner.tooltip": "有効にすると、転移ポイントの設置者のみ名前の変更が可能になります", + "config.waystones.restrictions.generatedWaystonesUnbreakable": "自然生成された転移ポイントは破壊不可", + "config.waystones.restrictions.generatedWaystonesUnbreakable.tooltip": "有効にすると、ワールド生成時に生成された転移ポイントは破壊不可能になります", + "config.waystones.restrictions.transportLeashed": "Mobを連れて転移可能", + "config.waystones.restrictions.transportLeashed.tooltip": "有効にすると、リードで吊れているMobも一緒に転移できます", + "config.waystones.restrictions.transportLeashedDimensional": "Mobを連れてディメンジョン間を転移可能", + "config.waystones.restrictions.transportLeashedDimensional.tooltip": "有効にすると、リードで吊れているMobも一緒にディメンジョン間を転移できます", + "config.waystones.restrictions.leashedDenyList": "連れて転移できないMob", + "config.waystones.restrictions.leashedDenyList.tooltip": "リードで連れて転移できないMobのリスト", + "config.waystones.restrictions.dimensionalWarp": "ディメンジョン間の転移", + "config.waystones.restrictions.dimensionalWarp.tooltip": "'ALLOW'にするとディメンジョン間の転移を全員が利用可能になります。'GLOBAL_ONLY'にすると、共通転移ポイントのみディメンジョン間移動可能になります.'DENY'にするとディメンジョン間移動不可となります", + "config.waystones.restrictions.dimensionalWarpAllowList": "ディメンジョン間で転移可能なリスト", + "config.waystones.restrictions.dimensionalWarpAllowList.tooltip": "プレイヤーがディメンジョン間転移可能なディメンジョンのリスト。空文字列にすると、dimensionalWarpDenyListで禁止されたディメンジョンを除くすべてのディメンジョンで転移可能になります", + "config.waystones.restrictions.dimensionalWarpDenyList": "ディメンジョン間で転移不可能なリスト", + "config.waystones.restrictions.dimensionalWarpDenyList.tooltip": "プレイヤーがディメンジョン間転移可能なディメンジョンのリスト。dimensionalWarpAllowListが空文字列の場合のみ使われます", + "config.waystones.restrictions.allowWaystoneToWaystoneTeleport": "転移ポイント相互間の転移を許可する", + "config.waystones.restrictions.allowWaystoneToWaystoneTeleport.tooltip": "trueにすると、プレイヤーは単にブロック使用するだけで転移ポイント間を移動可能になります", + "config.waystones.restrictions.globalWaystoneSetupRequiresCreativeMode": "共通転移ポイントはクリエイティブモードでのみ設定可", + "config.waystones.restrictions.globalWaystoneSetupRequiresCreativeMode.tooltip": "falseにすると、クリエイティブモードでないプレイヤーでも転移ポイントを共通転移ポイントとして設定可能になります", + "config.waystones.cooldowns": "クールダウン設定", + "config.waystones.cooldowns.globalWaystoneCooldownMultiplier": "共通転移ポイントのクールダウン時間倍率", + "config.waystones.cooldowns.globalWaystoneCooldownMultiplier.tooltip": "インベントリのワープボタンかワープストーンを使用して共通転移ポイントに転移した場合にクールダウン時間にかかる倍率", + "config.waystones.cooldowns.warpStoneCooldown": "ワープストーンのクールダウン時間", + "config.waystones.cooldowns.warpStoneCooldown.tooltip": "ワープストーンを使用した場合のクールダウン時間。これはプレイヤー依存のため、全てのワープストーンは同じ時間を共有します", + "config.waystones.cooldowns.warpStoneUseTime": "ワープストーンのチャージ時間", + "config.waystones.cooldowns.warpStoneUseTime.tooltip": "ワープストーン使用時のチャージにかかるtick。アイテム使用を押している間進行します", + "config.waystones.cooldowns.scrollUseTime": "スクロールのチャージ間隔", + "config.waystones.cooldowns.scrollUseTime.tooltip": "スクロール使用時のチャージにかかるtick。アイテム使用を押している間進行します", + "config.waystones.cooldowns.warpPlateUseTime": "ワーププレートのチャージ時間", + "config.waystones.cooldowns.warpPlateUseTime.tooltip": "ワーププレート使用時のチャージにかかるtick。プレイヤーがプレート上に立たなければならない時間です", + "config.waystones.cooldowns.inventoryButtonCooldown": "インベントリのワープボタンの利用可能間隔", + "config.waystones.cooldowns.inventoryButtonCooldown.tooltip": "インベントリのワープボタンの使用ごとに必要になるクールダウン", + "config.waystones.inventoryButton": "インベントリのワープボタン設定", + "config.waystones.inventoryButton.inventoryButton": "インベントリのワープボタン使用", + "config.waystones.inventoryButton.inventoryButton.tooltip": "NONEにするとワープボタンを表示しません。'NEAREST'にするともっとも近い転移ポイントにのみ移動可能。'ANY'にすると、転移ポイントの一覧から選択可能。転移ポイント名を設定すると、特定の転移ポイントにのみ移動可能です", + "config.waystones.inventoryButton.warpButtonX": "ワープボタンのX座標", + "config.waystones.inventoryButton.warpButtonX.tooltip": "インベントリ画面でのワープボタンのX座標", + "config.waystones.inventoryButton.warpButtonY": "ワープボタンのY座標", + "config.waystones.inventoryButton.warpButtonY.tooltip": "インベントリ画面でのワープボタンのY座標", + "config.waystones.inventoryButton.creativeWarpButtonX": "クリエイティブインベントリでのワープボタンのX座標", + "config.waystones.inventoryButton.creativeWarpButtonX.tooltip": "クリエイティブインベントリでのワープボタンのX座標", + "config.waystones.inventoryButton.creativeWarpButtonY": "クリエイティブインベントリでのワープボタンのY座標", + "config.waystones.inventoryButton.creativeWarpButtonY.tooltip": "クリエイティブインベントリでのワープボタンのY座標", + "config.waystones.worldGen": "ワールド生成設定", + "config.waystones.worldGen.worldGenStyle": "ワールド生成のスタイル", + "config.waystones.worldGen.worldGenStyle.tooltip": "DEFAULTにすると通常テクスチャの転移ポイントのみを生成します。MOSSYやSANDYにすると、対応する亜種を生成します。BIOMEにすると、生成されるバイオームに応じて適切なものを生成します", + "config.waystones.worldGen.frequency": "ワールド上の生成頻度", + "config.waystones.worldGen.frequency.tooltip": "ワールドに転移ポイントが生成されるおおよそのチャンク距離。0にするとワールドに生成されません", + "config.waystones.worldGen.dimensionAllowList": "転移ポイント生成を許可するディメンジョンリスト", + "config.waystones.worldGen.dimensionAllowList.tooltip": "ワールド生成時に転移ポイントの生成を許可するワールドのリスト。空欄にすると、worldGenDimensionDenyListに記載されていない全てのディメンジョンで生成されます", + "config.waystones.worldGen.dimensionDenyList": "転移ポイント生成を許可しないディメンジョンリスト", + "config.waystones.worldGen.dimensionDenyList.tooltip": "ワールド生成時に転移ポイントの生成を禁止するワールドのリスト。worldGenDimensionAllowListが空の場合のみ使用されます", + "config.waystones.worldGen.nameGenerationMode": "転移ポイント名の生成モード", + "config.waystones.worldGen.nameGenerationMode.tooltip": "PRESET_FIRSTにすると、カスタム転移ポイント名リストから取得した名前を優先します。PRESET_ONLYにすると、カスタム転移ポイント名リストから取得した名前のみを使用します。MIXEDを使用すると、カスタム転移ポイント名リストから取得した名前とランダム生成した名前を混ぜて使用します", + "config.waystones.worldGen.customWaystoneNames": "カスタム転移ポイント名リスト", + "config.waystones.worldGen.customWaystoneNames.tooltip": "PRESET系の生成モード時にこれらの名前を使用します。詳しい情報はnameGenerationModeを参照してください", + "config.waystones.worldGen.spawnInVillages": "村の中に生成する", + "config.waystones.worldGen.spawnInVillages.tooltip": "trueにすると、村の生成時に転移ポイントが追加で生成されるようになります。一部の村は依然として転移ポイントなしで生成されます", + "config.waystones.worldGen.forceSpawnInVillages": "必ず村の中に生成する", + "config.waystones.worldGen.forceSpawnInVillages.tooltip": "全ての村で転移ポイントを可能な限り早く生成されるように強制します。加えて、転移ポイントが村の中心に生成されるようにします", + "config.waystones.client": "クライアント設定", + "config.waystones.client.disableTextGlow": "テキストを発光させない", + "config.waystones.client.disableTextGlow.tooltip": "enabledにすると、転移ポイント上の文字を発光させません", + "config.waystones.client.disableParticles": "パーティクルを表示しない", + "config.waystones.client.disableParticles.tooltip": "enabledにすると、転移ポイントが活性化されたときにパーティクルを表示しません", + "config.waystones.compatibility": "他MODとの相互運用", + "config.waystones.compatibility.displayWaystonesOnJourneyMap": "JourneyMapに転移ポイントを表示する", + "config.waystones.compatibility.displayWaystonesOnJourneyMap.tooltip": "enabledにすると、活性化された各転移ポイントがJourneyMapの中継地点として登録されます", + "config.waystones.compatibility.preferJourneyMapIntegration": "JourneyMap Integrationを優先する", + "config.waystones.compatibility.preferJourneyMapIntegration.tooltip": "enabledにすると、JourneyMapの中継地点として登録されるのはJourneyMap Integrationがインストールされていない場合のみとなります", + "waystones.iconCredits": "Icons by JoeCreates (CC-BY-SA 3.0)", + "waystones.map.untitled_waystone": "転移ポイント(名称未設定)", + "config.jade.plugin_waystones.waystone": "Waystones" } \ No newline at end of file diff --git a/shared/src/main/resources/assets/waystones/lang/ko_kr.json b/common/src/main/resources/assets/waystones/lang/ko_kr.json similarity index 100% rename from shared/src/main/resources/assets/waystones/lang/ko_kr.json rename to common/src/main/resources/assets/waystones/lang/ko_kr.json diff --git a/shared/src/main/resources/assets/waystones/lang/no_no.json b/common/src/main/resources/assets/waystones/lang/no_no.json similarity index 100% rename from shared/src/main/resources/assets/waystones/lang/no_no.json rename to common/src/main/resources/assets/waystones/lang/no_no.json diff --git a/shared/src/main/resources/assets/waystones/lang/pl_pl.json b/common/src/main/resources/assets/waystones/lang/pl_pl.json similarity index 100% rename from shared/src/main/resources/assets/waystones/lang/pl_pl.json rename to common/src/main/resources/assets/waystones/lang/pl_pl.json diff --git a/shared/src/main/resources/assets/waystones/lang/pt_br.json b/common/src/main/resources/assets/waystones/lang/pt_br.json similarity index 100% rename from shared/src/main/resources/assets/waystones/lang/pt_br.json rename to common/src/main/resources/assets/waystones/lang/pt_br.json diff --git a/shared/src/main/resources/assets/waystones/lang/pt_pt.json b/common/src/main/resources/assets/waystones/lang/pt_pt.json similarity index 100% rename from shared/src/main/resources/assets/waystones/lang/pt_pt.json rename to common/src/main/resources/assets/waystones/lang/pt_pt.json diff --git a/shared/src/main/resources/assets/waystones/lang/ru_ru.json b/common/src/main/resources/assets/waystones/lang/ru_ru.json similarity index 100% rename from shared/src/main/resources/assets/waystones/lang/ru_ru.json rename to common/src/main/resources/assets/waystones/lang/ru_ru.json diff --git a/shared/src/main/resources/assets/waystones/lang/sv_se.json b/common/src/main/resources/assets/waystones/lang/sv_se.json similarity index 100% rename from shared/src/main/resources/assets/waystones/lang/sv_se.json rename to common/src/main/resources/assets/waystones/lang/sv_se.json diff --git a/shared/src/main/resources/assets/waystones/lang/tr_tr.json b/common/src/main/resources/assets/waystones/lang/tr_tr.json similarity index 100% rename from shared/src/main/resources/assets/waystones/lang/tr_tr.json rename to common/src/main/resources/assets/waystones/lang/tr_tr.json diff --git a/shared/src/main/resources/assets/waystones/lang/uk_ua.json b/common/src/main/resources/assets/waystones/lang/uk_ua.json similarity index 100% rename from shared/src/main/resources/assets/waystones/lang/uk_ua.json rename to common/src/main/resources/assets/waystones/lang/uk_ua.json diff --git a/shared/src/main/resources/assets/waystones/lang/vi_vn.json b/common/src/main/resources/assets/waystones/lang/vi_vn.json similarity index 100% rename from shared/src/main/resources/assets/waystones/lang/vi_vn.json rename to common/src/main/resources/assets/waystones/lang/vi_vn.json diff --git a/shared/src/main/resources/assets/waystones/lang/zh_cn.json b/common/src/main/resources/assets/waystones/lang/zh_cn.json similarity index 100% rename from shared/src/main/resources/assets/waystones/lang/zh_cn.json rename to common/src/main/resources/assets/waystones/lang/zh_cn.json diff --git a/shared/src/main/resources/assets/waystones/lang/zh_tw.json b/common/src/main/resources/assets/waystones/lang/zh_tw.json similarity index 100% rename from shared/src/main/resources/assets/waystones/lang/zh_tw.json rename to common/src/main/resources/assets/waystones/lang/zh_tw.json diff --git a/shared/src/main/resources/assets/waystones/models/block/blackstone_waystone_bottom.json b/common/src/main/resources/assets/waystones/models/block/blackstone_waystone_bottom.json similarity index 100% rename from shared/src/main/resources/assets/waystones/models/block/blackstone_waystone_bottom.json rename to common/src/main/resources/assets/waystones/models/block/blackstone_waystone_bottom.json diff --git a/shared/src/main/resources/assets/waystones/models/block/blackstone_waystone_top.json b/common/src/main/resources/assets/waystones/models/block/blackstone_waystone_top.json similarity index 100% rename from shared/src/main/resources/assets/waystones/models/block/blackstone_waystone_top.json rename to common/src/main/resources/assets/waystones/models/block/blackstone_waystone_top.json diff --git a/shared/src/main/resources/assets/waystones/models/block/deepslate_waystone_bottom.json b/common/src/main/resources/assets/waystones/models/block/deepslate_waystone_bottom.json similarity index 100% rename from shared/src/main/resources/assets/waystones/models/block/deepslate_waystone_bottom.json rename to common/src/main/resources/assets/waystones/models/block/deepslate_waystone_bottom.json diff --git a/shared/src/main/resources/assets/waystones/models/block/deepslate_waystone_top.json b/common/src/main/resources/assets/waystones/models/block/deepslate_waystone_top.json similarity index 100% rename from shared/src/main/resources/assets/waystones/models/block/deepslate_waystone_top.json rename to common/src/main/resources/assets/waystones/models/block/deepslate_waystone_top.json diff --git a/shared/src/main/resources/assets/waystones/models/block/end_stone_waystone_bottom.json b/common/src/main/resources/assets/waystones/models/block/end_stone_waystone_bottom.json similarity index 100% rename from shared/src/main/resources/assets/waystones/models/block/end_stone_waystone_bottom.json rename to common/src/main/resources/assets/waystones/models/block/end_stone_waystone_bottom.json diff --git a/shared/src/main/resources/assets/waystones/models/block/end_stone_waystone_top.json b/common/src/main/resources/assets/waystones/models/block/end_stone_waystone_top.json similarity index 100% rename from shared/src/main/resources/assets/waystones/models/block/end_stone_waystone_top.json rename to common/src/main/resources/assets/waystones/models/block/end_stone_waystone_top.json diff --git a/shared/src/main/resources/assets/waystones/models/block/landing_stone.json b/common/src/main/resources/assets/waystones/models/block/landing_stone.json similarity index 100% rename from shared/src/main/resources/assets/waystones/models/block/landing_stone.json rename to common/src/main/resources/assets/waystones/models/block/landing_stone.json diff --git a/shared/src/main/resources/assets/waystones/models/block/mossy_waystone_bottom.json b/common/src/main/resources/assets/waystones/models/block/mossy_waystone_bottom.json similarity index 100% rename from shared/src/main/resources/assets/waystones/models/block/mossy_waystone_bottom.json rename to common/src/main/resources/assets/waystones/models/block/mossy_waystone_bottom.json diff --git a/shared/src/main/resources/assets/waystones/models/block/mossy_waystone_top.json b/common/src/main/resources/assets/waystones/models/block/mossy_waystone_top.json similarity index 100% rename from shared/src/main/resources/assets/waystones/models/block/mossy_waystone_top.json rename to common/src/main/resources/assets/waystones/models/block/mossy_waystone_top.json diff --git a/shared/src/main/resources/assets/waystones/models/block/portstone_bottom.json b/common/src/main/resources/assets/waystones/models/block/portstone_bottom.json similarity index 100% rename from shared/src/main/resources/assets/waystones/models/block/portstone_bottom.json rename to common/src/main/resources/assets/waystones/models/block/portstone_bottom.json diff --git a/shared/src/main/resources/assets/waystones/models/block/portstone_top.json b/common/src/main/resources/assets/waystones/models/block/portstone_top.json similarity index 100% rename from shared/src/main/resources/assets/waystones/models/block/portstone_top.json rename to common/src/main/resources/assets/waystones/models/block/portstone_top.json diff --git a/shared/src/main/resources/assets/waystones/models/block/sandy_waystone_bottom.json b/common/src/main/resources/assets/waystones/models/block/sandy_waystone_bottom.json similarity index 100% rename from shared/src/main/resources/assets/waystones/models/block/sandy_waystone_bottom.json rename to common/src/main/resources/assets/waystones/models/block/sandy_waystone_bottom.json diff --git a/shared/src/main/resources/assets/waystones/models/block/sandy_waystone_top.json b/common/src/main/resources/assets/waystones/models/block/sandy_waystone_top.json similarity index 100% rename from shared/src/main/resources/assets/waystones/models/block/sandy_waystone_top.json rename to common/src/main/resources/assets/waystones/models/block/sandy_waystone_top.json diff --git a/shared/src/main/resources/assets/waystones/models/block/sharestone_bottom.json b/common/src/main/resources/assets/waystones/models/block/sharestone_bottom.json similarity index 100% rename from shared/src/main/resources/assets/waystones/models/block/sharestone_bottom.json rename to common/src/main/resources/assets/waystones/models/block/sharestone_bottom.json diff --git a/shared/src/main/resources/assets/waystones/models/block/sharestone_top.json b/common/src/main/resources/assets/waystones/models/block/sharestone_top.json similarity index 100% rename from shared/src/main/resources/assets/waystones/models/block/sharestone_top.json rename to common/src/main/resources/assets/waystones/models/block/sharestone_top.json diff --git a/shared/src/main/resources/assets/waystones/models/block/warp_plate.json b/common/src/main/resources/assets/waystones/models/block/warp_plate.json similarity index 100% rename from shared/src/main/resources/assets/waystones/models/block/warp_plate.json rename to common/src/main/resources/assets/waystones/models/block/warp_plate.json diff --git a/shared/src/main/resources/assets/waystones/models/block/waystone_bottom.json b/common/src/main/resources/assets/waystones/models/block/waystone_bottom.json similarity index 100% rename from shared/src/main/resources/assets/waystones/models/block/waystone_bottom.json rename to common/src/main/resources/assets/waystones/models/block/waystone_bottom.json diff --git a/shared/src/main/resources/assets/waystones/models/block/waystone_top.json b/common/src/main/resources/assets/waystones/models/block/waystone_top.json similarity index 100% rename from shared/src/main/resources/assets/waystones/models/block/waystone_top.json rename to common/src/main/resources/assets/waystones/models/block/waystone_top.json diff --git a/shared/src/main/resources/assets/waystones/models/item/blackstone_waystone.json b/common/src/main/resources/assets/waystones/models/item/blackstone_waystone.json similarity index 100% rename from shared/src/main/resources/assets/waystones/models/item/blackstone_waystone.json rename to common/src/main/resources/assets/waystones/models/item/blackstone_waystone.json diff --git a/shared/src/main/resources/assets/waystones/models/item/deepslate_waystone.json b/common/src/main/resources/assets/waystones/models/item/deepslate_waystone.json similarity index 100% rename from shared/src/main/resources/assets/waystones/models/item/deepslate_waystone.json rename to common/src/main/resources/assets/waystones/models/item/deepslate_waystone.json diff --git a/shared/src/main/resources/assets/waystones/models/item/dyed_sharestone.json b/common/src/main/resources/assets/waystones/models/item/dyed_sharestone.json similarity index 100% rename from shared/src/main/resources/assets/waystones/models/item/dyed_sharestone.json rename to common/src/main/resources/assets/waystones/models/item/dyed_sharestone.json diff --git a/shared/src/main/resources/assets/waystones/models/item/end_stone_waystone.json b/common/src/main/resources/assets/waystones/models/item/end_stone_waystone.json similarity index 100% rename from shared/src/main/resources/assets/waystones/models/item/end_stone_waystone.json rename to common/src/main/resources/assets/waystones/models/item/end_stone_waystone.json diff --git a/shared/src/main/resources/assets/waystones/models/item/mossy_waystone.json b/common/src/main/resources/assets/waystones/models/item/mossy_waystone.json similarity index 100% rename from shared/src/main/resources/assets/waystones/models/item/mossy_waystone.json rename to common/src/main/resources/assets/waystones/models/item/mossy_waystone.json diff --git a/shared/src/main/resources/assets/waystones/models/item/portstone.json b/common/src/main/resources/assets/waystones/models/item/portstone.json similarity index 100% rename from shared/src/main/resources/assets/waystones/models/item/portstone.json rename to common/src/main/resources/assets/waystones/models/item/portstone.json diff --git a/shared/src/main/resources/assets/waystones/models/item/sandy_waystone.json b/common/src/main/resources/assets/waystones/models/item/sandy_waystone.json similarity index 100% rename from shared/src/main/resources/assets/waystones/models/item/sandy_waystone.json rename to common/src/main/resources/assets/waystones/models/item/sandy_waystone.json diff --git a/shared/src/main/resources/assets/waystones/models/item/sharestone.json b/common/src/main/resources/assets/waystones/models/item/sharestone.json similarity index 100% rename from shared/src/main/resources/assets/waystones/models/item/sharestone.json rename to common/src/main/resources/assets/waystones/models/item/sharestone.json diff --git a/shared/src/main/resources/assets/waystones/models/item/waystone.json b/common/src/main/resources/assets/waystones/models/item/waystone.json similarity index 100% rename from shared/src/main/resources/assets/waystones/models/item/waystone.json rename to common/src/main/resources/assets/waystones/models/item/waystone.json diff --git a/shared/src/main/resources/assets/waystones/textures/block/andesite_waystone.png b/common/src/main/resources/assets/waystones/textures/block/andesite_waystone.png similarity index 100% rename from shared/src/main/resources/assets/waystones/textures/block/andesite_waystone.png rename to common/src/main/resources/assets/waystones/textures/block/andesite_waystone.png diff --git a/shared/src/main/resources/assets/waystones/textures/block/blackstone_waystone.png b/common/src/main/resources/assets/waystones/textures/block/blackstone_waystone.png similarity index 100% rename from shared/src/main/resources/assets/waystones/textures/block/blackstone_waystone.png rename to common/src/main/resources/assets/waystones/textures/block/blackstone_waystone.png diff --git a/shared/src/main/resources/assets/waystones/textures/block/chiseled_sandstone_waystone.png b/common/src/main/resources/assets/waystones/textures/block/chiseled_sandstone_waystone.png similarity index 100% rename from shared/src/main/resources/assets/waystones/textures/block/chiseled_sandstone_waystone.png rename to common/src/main/resources/assets/waystones/textures/block/chiseled_sandstone_waystone.png diff --git a/shared/src/main/resources/assets/waystones/textures/block/deepslate_waystone.png b/common/src/main/resources/assets/waystones/textures/block/deepslate_waystone.png similarity index 100% rename from shared/src/main/resources/assets/waystones/textures/block/deepslate_waystone.png rename to common/src/main/resources/assets/waystones/textures/block/deepslate_waystone.png diff --git a/shared/src/main/resources/assets/waystones/textures/block/end_stone_waystone.png b/common/src/main/resources/assets/waystones/textures/block/end_stone_waystone.png similarity index 100% rename from shared/src/main/resources/assets/waystones/textures/block/end_stone_waystone.png rename to common/src/main/resources/assets/waystones/textures/block/end_stone_waystone.png diff --git a/shared/src/main/resources/assets/waystones/textures/block/landing_stone.png b/common/src/main/resources/assets/waystones/textures/block/landing_stone.png similarity index 100% rename from shared/src/main/resources/assets/waystones/textures/block/landing_stone.png rename to common/src/main/resources/assets/waystones/textures/block/landing_stone.png diff --git a/shared/src/main/resources/assets/waystones/textures/block/moss_template.png b/common/src/main/resources/assets/waystones/textures/block/moss_template.png similarity index 100% rename from shared/src/main/resources/assets/waystones/textures/block/moss_template.png rename to common/src/main/resources/assets/waystones/textures/block/moss_template.png diff --git a/shared/src/main/resources/assets/waystones/textures/block/mossy_andesite_waystone.png b/common/src/main/resources/assets/waystones/textures/block/mossy_andesite_waystone.png similarity index 100% rename from shared/src/main/resources/assets/waystones/textures/block/mossy_andesite_waystone.png rename to common/src/main/resources/assets/waystones/textures/block/mossy_andesite_waystone.png diff --git a/shared/src/main/resources/assets/waystones/textures/block/mossy_waystone.png b/common/src/main/resources/assets/waystones/textures/block/mossy_waystone.png similarity index 100% rename from shared/src/main/resources/assets/waystones/textures/block/mossy_waystone.png rename to common/src/main/resources/assets/waystones/textures/block/mossy_waystone.png diff --git a/shared/src/main/resources/assets/waystones/textures/block/warp_plate.png b/common/src/main/resources/assets/waystones/textures/block/warp_plate.png similarity index 100% rename from shared/src/main/resources/assets/waystones/textures/block/warp_plate.png rename to common/src/main/resources/assets/waystones/textures/block/warp_plate.png diff --git a/shared/src/main/resources/assets/waystones/textures/block/warp_plate_base.png b/common/src/main/resources/assets/waystones/textures/block/warp_plate_base.png similarity index 100% rename from shared/src/main/resources/assets/waystones/textures/block/warp_plate_base.png rename to common/src/main/resources/assets/waystones/textures/block/warp_plate_base.png diff --git a/shared/src/main/resources/assets/waystones/textures/block/warp_plate_inner.png b/common/src/main/resources/assets/waystones/textures/block/warp_plate_inner.png similarity index 100% rename from shared/src/main/resources/assets/waystones/textures/block/warp_plate_inner.png rename to common/src/main/resources/assets/waystones/textures/block/warp_plate_inner.png diff --git a/shared/src/main/resources/assets/waystones/textures/gui/checkbox.png b/common/src/main/resources/assets/waystones/textures/gui/checkbox.png similarity index 100% rename from shared/src/main/resources/assets/waystones/textures/gui/checkbox.png rename to common/src/main/resources/assets/waystones/textures/gui/checkbox.png diff --git a/shared/src/main/resources/assets/waystones/textures/gui/inventory_button.png b/common/src/main/resources/assets/waystones/textures/gui/inventory_button.png similarity index 100% rename from shared/src/main/resources/assets/waystones/textures/gui/inventory_button.png rename to common/src/main/resources/assets/waystones/textures/gui/inventory_button.png diff --git a/shared/src/main/resources/assets/waystones/textures/gui/jei/warp_plate.png b/common/src/main/resources/assets/waystones/textures/gui/jei/warp_plate.png similarity index 100% rename from shared/src/main/resources/assets/waystones/textures/gui/jei/warp_plate.png rename to common/src/main/resources/assets/waystones/textures/gui/jei/warp_plate.png diff --git a/shared/src/main/resources/assets/waystones/textures/gui/menu/warp_plate.png b/common/src/main/resources/assets/waystones/textures/gui/menu/warp_plate.png similarity index 100% rename from shared/src/main/resources/assets/waystones/textures/gui/menu/warp_plate.png rename to common/src/main/resources/assets/waystones/textures/gui/menu/warp_plate.png diff --git a/shared/src/main/resources/assets/waystones/textures/gui/menu/waystone.png b/common/src/main/resources/assets/waystones/textures/gui/menu/waystone.png similarity index 100% rename from shared/src/main/resources/assets/waystones/textures/gui/menu/waystone.png rename to common/src/main/resources/assets/waystones/textures/gui/menu/waystone.png diff --git a/shared/src/main/resources/assets/waystones/textures/item/attuned_shard.png b/common/src/main/resources/assets/waystones/textures/item/attuned_shard.png similarity index 100% rename from shared/src/main/resources/assets/waystones/textures/item/attuned_shard.png rename to common/src/main/resources/assets/waystones/textures/item/attuned_shard.png diff --git a/shared/src/main/resources/assets/waystones/textures/item/bound_scroll.png b/common/src/main/resources/assets/waystones/textures/item/bound_scroll.png similarity index 100% rename from shared/src/main/resources/assets/waystones/textures/item/bound_scroll.png rename to common/src/main/resources/assets/waystones/textures/item/bound_scroll.png diff --git a/shared/src/main/resources/assets/waystones/textures/item/crumbling_attuned_shard.png b/common/src/main/resources/assets/waystones/textures/item/crumbling_attuned_shard.png similarity index 100% rename from shared/src/main/resources/assets/waystones/textures/item/crumbling_attuned_shard.png rename to common/src/main/resources/assets/waystones/textures/item/crumbling_attuned_shard.png diff --git a/shared/src/main/resources/assets/waystones/textures/item/return_scroll.png b/common/src/main/resources/assets/waystones/textures/item/return_scroll.png similarity index 100% rename from shared/src/main/resources/assets/waystones/textures/item/return_scroll.png rename to common/src/main/resources/assets/waystones/textures/item/return_scroll.png diff --git a/shared/src/main/resources/assets/waystones/textures/item/warp_dust.png b/common/src/main/resources/assets/waystones/textures/item/warp_dust.png similarity index 100% rename from shared/src/main/resources/assets/waystones/textures/item/warp_dust.png rename to common/src/main/resources/assets/waystones/textures/item/warp_dust.png diff --git a/shared/src/main/resources/assets/waystones/textures/item/warp_scroll.png b/common/src/main/resources/assets/waystones/textures/item/warp_scroll.png similarity index 100% rename from shared/src/main/resources/assets/waystones/textures/item/warp_scroll.png rename to common/src/main/resources/assets/waystones/textures/item/warp_scroll.png diff --git a/shared/src/main/resources/assets/waystones/textures/item/warp_stone.png b/common/src/main/resources/assets/waystones/textures/item/warp_stone.png similarity index 100% rename from shared/src/main/resources/assets/waystones/textures/item/warp_stone.png rename to common/src/main/resources/assets/waystones/textures/item/warp_stone.png diff --git a/shared/src/main/resources/data/repurposed_structures/pool_additions/villages/badlands/houses.json b/common/src/main/resources/data/repurposed_structures/pool_additions/villages/badlands/houses.json similarity index 100% rename from shared/src/main/resources/data/repurposed_structures/pool_additions/villages/badlands/houses.json rename to common/src/main/resources/data/repurposed_structures/pool_additions/villages/badlands/houses.json diff --git a/shared/src/main/resources/data/repurposed_structures/pool_additions/villages/badlands/zombie/houses.json b/common/src/main/resources/data/repurposed_structures/pool_additions/villages/badlands/zombie/houses.json similarity index 100% rename from shared/src/main/resources/data/repurposed_structures/pool_additions/villages/badlands/zombie/houses.json rename to common/src/main/resources/data/repurposed_structures/pool_additions/villages/badlands/zombie/houses.json diff --git a/shared/src/main/resources/data/repurposed_structures/pool_additions/villages/bamboo/houses.json b/common/src/main/resources/data/repurposed_structures/pool_additions/villages/bamboo/houses.json similarity index 100% rename from shared/src/main/resources/data/repurposed_structures/pool_additions/villages/bamboo/houses.json rename to common/src/main/resources/data/repurposed_structures/pool_additions/villages/bamboo/houses.json diff --git a/shared/src/main/resources/data/repurposed_structures/pool_additions/villages/bamboo/zombie/houses.json b/common/src/main/resources/data/repurposed_structures/pool_additions/villages/bamboo/zombie/houses.json similarity index 100% rename from shared/src/main/resources/data/repurposed_structures/pool_additions/villages/bamboo/zombie/houses.json rename to common/src/main/resources/data/repurposed_structures/pool_additions/villages/bamboo/zombie/houses.json diff --git a/shared/src/main/resources/data/repurposed_structures/pool_additions/villages/birch/houses.json b/common/src/main/resources/data/repurposed_structures/pool_additions/villages/birch/houses.json similarity index 100% rename from shared/src/main/resources/data/repurposed_structures/pool_additions/villages/birch/houses.json rename to common/src/main/resources/data/repurposed_structures/pool_additions/villages/birch/houses.json diff --git a/shared/src/main/resources/data/repurposed_structures/pool_additions/villages/birch/zombie/houses.json b/common/src/main/resources/data/repurposed_structures/pool_additions/villages/birch/zombie/houses.json similarity index 100% rename from shared/src/main/resources/data/repurposed_structures/pool_additions/villages/birch/zombie/houses.json rename to common/src/main/resources/data/repurposed_structures/pool_additions/villages/birch/zombie/houses.json diff --git a/shared/src/main/resources/data/repurposed_structures/pool_additions/villages/cherry/houses.json b/common/src/main/resources/data/repurposed_structures/pool_additions/villages/cherry/houses.json similarity index 100% rename from shared/src/main/resources/data/repurposed_structures/pool_additions/villages/cherry/houses.json rename to common/src/main/resources/data/repurposed_structures/pool_additions/villages/cherry/houses.json diff --git a/shared/src/main/resources/data/repurposed_structures/pool_additions/villages/cherry/zombie/houses.json b/common/src/main/resources/data/repurposed_structures/pool_additions/villages/cherry/zombie/houses.json similarity index 100% rename from shared/src/main/resources/data/repurposed_structures/pool_additions/villages/cherry/zombie/houses.json rename to common/src/main/resources/data/repurposed_structures/pool_additions/villages/cherry/zombie/houses.json diff --git a/shared/src/main/resources/data/repurposed_structures/pool_additions/villages/dark_forest/houses.json b/common/src/main/resources/data/repurposed_structures/pool_additions/villages/dark_forest/houses.json similarity index 100% rename from shared/src/main/resources/data/repurposed_structures/pool_additions/villages/dark_forest/houses.json rename to common/src/main/resources/data/repurposed_structures/pool_additions/villages/dark_forest/houses.json diff --git a/shared/src/main/resources/data/repurposed_structures/pool_additions/villages/dark_forest/zombie/houses.json b/common/src/main/resources/data/repurposed_structures/pool_additions/villages/dark_forest/zombie/houses.json similarity index 100% rename from shared/src/main/resources/data/repurposed_structures/pool_additions/villages/dark_forest/zombie/houses.json rename to common/src/main/resources/data/repurposed_structures/pool_additions/villages/dark_forest/zombie/houses.json diff --git a/shared/src/main/resources/data/repurposed_structures/pool_additions/villages/giant_taiga/houses.json b/common/src/main/resources/data/repurposed_structures/pool_additions/villages/giant_taiga/houses.json similarity index 100% rename from shared/src/main/resources/data/repurposed_structures/pool_additions/villages/giant_taiga/houses.json rename to common/src/main/resources/data/repurposed_structures/pool_additions/villages/giant_taiga/houses.json diff --git a/shared/src/main/resources/data/repurposed_structures/pool_additions/villages/giant_taiga/zombie/houses.json b/common/src/main/resources/data/repurposed_structures/pool_additions/villages/giant_taiga/zombie/houses.json similarity index 100% rename from shared/src/main/resources/data/repurposed_structures/pool_additions/villages/giant_taiga/zombie/houses.json rename to common/src/main/resources/data/repurposed_structures/pool_additions/villages/giant_taiga/zombie/houses.json diff --git a/shared/src/main/resources/data/repurposed_structures/pool_additions/villages/jungle/houses.json b/common/src/main/resources/data/repurposed_structures/pool_additions/villages/jungle/houses.json similarity index 100% rename from shared/src/main/resources/data/repurposed_structures/pool_additions/villages/jungle/houses.json rename to common/src/main/resources/data/repurposed_structures/pool_additions/villages/jungle/houses.json diff --git a/shared/src/main/resources/data/repurposed_structures/pool_additions/villages/jungle/zombie/houses.json b/common/src/main/resources/data/repurposed_structures/pool_additions/villages/jungle/zombie/houses.json similarity index 100% rename from shared/src/main/resources/data/repurposed_structures/pool_additions/villages/jungle/zombie/houses.json rename to common/src/main/resources/data/repurposed_structures/pool_additions/villages/jungle/zombie/houses.json diff --git a/shared/src/main/resources/data/repurposed_structures/pool_additions/villages/mountains/houses.json b/common/src/main/resources/data/repurposed_structures/pool_additions/villages/mountains/houses.json similarity index 100% rename from shared/src/main/resources/data/repurposed_structures/pool_additions/villages/mountains/houses.json rename to common/src/main/resources/data/repurposed_structures/pool_additions/villages/mountains/houses.json diff --git a/shared/src/main/resources/data/repurposed_structures/pool_additions/villages/mountains/zombie/houses.json b/common/src/main/resources/data/repurposed_structures/pool_additions/villages/mountains/zombie/houses.json similarity index 100% rename from shared/src/main/resources/data/repurposed_structures/pool_additions/villages/mountains/zombie/houses.json rename to common/src/main/resources/data/repurposed_structures/pool_additions/villages/mountains/zombie/houses.json diff --git a/shared/src/main/resources/data/repurposed_structures/pool_additions/villages/mushroom/houses.json b/common/src/main/resources/data/repurposed_structures/pool_additions/villages/mushroom/houses.json similarity index 100% rename from shared/src/main/resources/data/repurposed_structures/pool_additions/villages/mushroom/houses.json rename to common/src/main/resources/data/repurposed_structures/pool_additions/villages/mushroom/houses.json diff --git a/shared/src/main/resources/data/repurposed_structures/pool_additions/villages/oak/houses.json b/common/src/main/resources/data/repurposed_structures/pool_additions/villages/oak/houses.json similarity index 100% rename from shared/src/main/resources/data/repurposed_structures/pool_additions/villages/oak/houses.json rename to common/src/main/resources/data/repurposed_structures/pool_additions/villages/oak/houses.json diff --git a/shared/src/main/resources/data/repurposed_structures/pool_additions/villages/oak/zombie/houses.json b/common/src/main/resources/data/repurposed_structures/pool_additions/villages/oak/zombie/houses.json similarity index 100% rename from shared/src/main/resources/data/repurposed_structures/pool_additions/villages/oak/zombie/houses.json rename to common/src/main/resources/data/repurposed_structures/pool_additions/villages/oak/zombie/houses.json diff --git a/shared/src/main/resources/data/repurposed_structures/pool_additions/villages/ocean/houses.json b/common/src/main/resources/data/repurposed_structures/pool_additions/villages/ocean/houses.json similarity index 100% rename from shared/src/main/resources/data/repurposed_structures/pool_additions/villages/ocean/houses.json rename to common/src/main/resources/data/repurposed_structures/pool_additions/villages/ocean/houses.json diff --git a/shared/src/main/resources/data/repurposed_structures/pool_additions/villages/swamp/houses.json b/common/src/main/resources/data/repurposed_structures/pool_additions/villages/swamp/houses.json similarity index 100% rename from shared/src/main/resources/data/repurposed_structures/pool_additions/villages/swamp/houses.json rename to common/src/main/resources/data/repurposed_structures/pool_additions/villages/swamp/houses.json diff --git a/shared/src/main/resources/data/repurposed_structures/pool_additions/villages/swamp/zombie/houses.json b/common/src/main/resources/data/repurposed_structures/pool_additions/villages/swamp/zombie/houses.json similarity index 100% rename from shared/src/main/resources/data/repurposed_structures/pool_additions/villages/swamp/zombie/houses.json rename to common/src/main/resources/data/repurposed_structures/pool_additions/villages/swamp/zombie/houses.json diff --git a/shared/src/main/resources/data/repurposed_structures/rs_pieces_spawn_counts_additions/village_badlands.json b/common/src/main/resources/data/repurposed_structures/rs_pieces_spawn_counts_additions/village_badlands.json similarity index 100% rename from shared/src/main/resources/data/repurposed_structures/rs_pieces_spawn_counts_additions/village_badlands.json rename to common/src/main/resources/data/repurposed_structures/rs_pieces_spawn_counts_additions/village_badlands.json diff --git a/shared/src/main/resources/data/repurposed_structures/rs_pieces_spawn_counts_additions/village_bamboo.json b/common/src/main/resources/data/repurposed_structures/rs_pieces_spawn_counts_additions/village_bamboo.json similarity index 100% rename from shared/src/main/resources/data/repurposed_structures/rs_pieces_spawn_counts_additions/village_bamboo.json rename to common/src/main/resources/data/repurposed_structures/rs_pieces_spawn_counts_additions/village_bamboo.json diff --git a/shared/src/main/resources/data/repurposed_structures/rs_pieces_spawn_counts_additions/village_birch.json b/common/src/main/resources/data/repurposed_structures/rs_pieces_spawn_counts_additions/village_birch.json similarity index 100% rename from shared/src/main/resources/data/repurposed_structures/rs_pieces_spawn_counts_additions/village_birch.json rename to common/src/main/resources/data/repurposed_structures/rs_pieces_spawn_counts_additions/village_birch.json diff --git a/shared/src/main/resources/data/repurposed_structures/rs_pieces_spawn_counts_additions/village_cherry.json b/common/src/main/resources/data/repurposed_structures/rs_pieces_spawn_counts_additions/village_cherry.json similarity index 100% rename from shared/src/main/resources/data/repurposed_structures/rs_pieces_spawn_counts_additions/village_cherry.json rename to common/src/main/resources/data/repurposed_structures/rs_pieces_spawn_counts_additions/village_cherry.json diff --git a/shared/src/main/resources/data/repurposed_structures/rs_pieces_spawn_counts_additions/village_dark_forest.json b/common/src/main/resources/data/repurposed_structures/rs_pieces_spawn_counts_additions/village_dark_forest.json similarity index 100% rename from shared/src/main/resources/data/repurposed_structures/rs_pieces_spawn_counts_additions/village_dark_forest.json rename to common/src/main/resources/data/repurposed_structures/rs_pieces_spawn_counts_additions/village_dark_forest.json diff --git a/shared/src/main/resources/data/repurposed_structures/rs_pieces_spawn_counts_additions/village_giant_taiga.json b/common/src/main/resources/data/repurposed_structures/rs_pieces_spawn_counts_additions/village_giant_taiga.json similarity index 100% rename from shared/src/main/resources/data/repurposed_structures/rs_pieces_spawn_counts_additions/village_giant_taiga.json rename to common/src/main/resources/data/repurposed_structures/rs_pieces_spawn_counts_additions/village_giant_taiga.json diff --git a/shared/src/main/resources/data/repurposed_structures/rs_pieces_spawn_counts_additions/village_jungle.json b/common/src/main/resources/data/repurposed_structures/rs_pieces_spawn_counts_additions/village_jungle.json similarity index 100% rename from shared/src/main/resources/data/repurposed_structures/rs_pieces_spawn_counts_additions/village_jungle.json rename to common/src/main/resources/data/repurposed_structures/rs_pieces_spawn_counts_additions/village_jungle.json diff --git a/shared/src/main/resources/data/repurposed_structures/rs_pieces_spawn_counts_additions/village_mountains.json b/common/src/main/resources/data/repurposed_structures/rs_pieces_spawn_counts_additions/village_mountains.json similarity index 100% rename from shared/src/main/resources/data/repurposed_structures/rs_pieces_spawn_counts_additions/village_mountains.json rename to common/src/main/resources/data/repurposed_structures/rs_pieces_spawn_counts_additions/village_mountains.json diff --git a/shared/src/main/resources/data/repurposed_structures/rs_pieces_spawn_counts_additions/village_mushroom.json b/common/src/main/resources/data/repurposed_structures/rs_pieces_spawn_counts_additions/village_mushroom.json similarity index 100% rename from shared/src/main/resources/data/repurposed_structures/rs_pieces_spawn_counts_additions/village_mushroom.json rename to common/src/main/resources/data/repurposed_structures/rs_pieces_spawn_counts_additions/village_mushroom.json diff --git a/shared/src/main/resources/data/repurposed_structures/rs_pieces_spawn_counts_additions/village_oak.json b/common/src/main/resources/data/repurposed_structures/rs_pieces_spawn_counts_additions/village_oak.json similarity index 100% rename from shared/src/main/resources/data/repurposed_structures/rs_pieces_spawn_counts_additions/village_oak.json rename to common/src/main/resources/data/repurposed_structures/rs_pieces_spawn_counts_additions/village_oak.json diff --git a/shared/src/main/resources/data/repurposed_structures/rs_pieces_spawn_counts_additions/village_ocean.json b/common/src/main/resources/data/repurposed_structures/rs_pieces_spawn_counts_additions/village_ocean.json similarity index 100% rename from shared/src/main/resources/data/repurposed_structures/rs_pieces_spawn_counts_additions/village_ocean.json rename to common/src/main/resources/data/repurposed_structures/rs_pieces_spawn_counts_additions/village_ocean.json diff --git a/shared/src/main/resources/data/repurposed_structures/rs_pieces_spawn_counts_additions/village_swamp.json b/common/src/main/resources/data/repurposed_structures/rs_pieces_spawn_counts_additions/village_swamp.json similarity index 100% rename from shared/src/main/resources/data/repurposed_structures/rs_pieces_spawn_counts_additions/village_swamp.json rename to common/src/main/resources/data/repurposed_structures/rs_pieces_spawn_counts_additions/village_swamp.json diff --git a/shared/src/main/resources/data/waystones/recipes/attuned_shard.json b/common/src/main/resources/data/waystones/recipes/attuned_shard.json similarity index 100% rename from shared/src/main/resources/data/waystones/recipes/attuned_shard.json rename to common/src/main/resources/data/waystones/recipes/attuned_shard.json diff --git a/shared/src/main/resources/data/waystones/recipes/bound_scroll.json b/common/src/main/resources/data/waystones/recipes/bound_scroll.json similarity index 100% rename from shared/src/main/resources/data/waystones/recipes/bound_scroll.json rename to common/src/main/resources/data/waystones/recipes/bound_scroll.json diff --git a/shared/src/main/resources/data/waystones/recipes/crumbling_attuned_shard.json b/common/src/main/resources/data/waystones/recipes/crumbling_attuned_shard.json similarity index 100% rename from shared/src/main/resources/data/waystones/recipes/crumbling_attuned_shard.json rename to common/src/main/resources/data/waystones/recipes/crumbling_attuned_shard.json diff --git a/shared/src/main/resources/data/waystones/structures/village/common/waystone.nbt b/common/src/main/resources/data/waystones/structures/village/common/waystone.nbt similarity index 100% rename from shared/src/main/resources/data/waystones/structures/village/common/waystone.nbt rename to common/src/main/resources/data/waystones/structures/village/common/waystone.nbt diff --git a/shared/src/main/resources/data/waystones/structures/village/common/waystone_waterlogged.nbt b/common/src/main/resources/data/waystones/structures/village/common/waystone_waterlogged.nbt similarity index 100% rename from shared/src/main/resources/data/waystones/structures/village/common/waystone_waterlogged.nbt rename to common/src/main/resources/data/waystones/structures/village/common/waystone_waterlogged.nbt diff --git a/shared/src/main/resources/data/waystones/structures/village/desert/waystone.nbt b/common/src/main/resources/data/waystones/structures/village/desert/waystone.nbt similarity index 100% rename from shared/src/main/resources/data/waystones/structures/village/desert/waystone.nbt rename to common/src/main/resources/data/waystones/structures/village/desert/waystone.nbt diff --git a/shared/src/main/resources/data/waystones/worldgen/configured_feature/blackstone_waystone.json b/common/src/main/resources/data/waystones/worldgen/configured_feature/blackstone_waystone.json similarity index 100% rename from shared/src/main/resources/data/waystones/worldgen/configured_feature/blackstone_waystone.json rename to common/src/main/resources/data/waystones/worldgen/configured_feature/blackstone_waystone.json diff --git a/shared/src/main/resources/data/waystones/worldgen/configured_feature/deepslate_waystone.json b/common/src/main/resources/data/waystones/worldgen/configured_feature/deepslate_waystone.json similarity index 100% rename from shared/src/main/resources/data/waystones/worldgen/configured_feature/deepslate_waystone.json rename to common/src/main/resources/data/waystones/worldgen/configured_feature/deepslate_waystone.json diff --git a/shared/src/main/resources/data/waystones/worldgen/configured_feature/end_stone_waystone.json b/common/src/main/resources/data/waystones/worldgen/configured_feature/end_stone_waystone.json similarity index 100% rename from shared/src/main/resources/data/waystones/worldgen/configured_feature/end_stone_waystone.json rename to common/src/main/resources/data/waystones/worldgen/configured_feature/end_stone_waystone.json diff --git a/shared/src/main/resources/data/waystones/worldgen/configured_feature/mossy_waystone.json b/common/src/main/resources/data/waystones/worldgen/configured_feature/mossy_waystone.json similarity index 100% rename from shared/src/main/resources/data/waystones/worldgen/configured_feature/mossy_waystone.json rename to common/src/main/resources/data/waystones/worldgen/configured_feature/mossy_waystone.json diff --git a/shared/src/main/resources/data/waystones/worldgen/configured_feature/sandy_waystone.json b/common/src/main/resources/data/waystones/worldgen/configured_feature/sandy_waystone.json similarity index 100% rename from shared/src/main/resources/data/waystones/worldgen/configured_feature/sandy_waystone.json rename to common/src/main/resources/data/waystones/worldgen/configured_feature/sandy_waystone.json diff --git a/shared/src/main/resources/data/waystones/worldgen/configured_feature/waystone.json b/common/src/main/resources/data/waystones/worldgen/configured_feature/waystone.json similarity index 100% rename from shared/src/main/resources/data/waystones/worldgen/configured_feature/waystone.json rename to common/src/main/resources/data/waystones/worldgen/configured_feature/waystone.json diff --git a/shared/src/main/resources/data/waystones/worldgen/placed_feature/blackstone_waystone.json b/common/src/main/resources/data/waystones/worldgen/placed_feature/blackstone_waystone.json similarity index 100% rename from shared/src/main/resources/data/waystones/worldgen/placed_feature/blackstone_waystone.json rename to common/src/main/resources/data/waystones/worldgen/placed_feature/blackstone_waystone.json diff --git a/shared/src/main/resources/data/waystones/worldgen/placed_feature/deepslate_waystone.json b/common/src/main/resources/data/waystones/worldgen/placed_feature/deepslate_waystone.json similarity index 100% rename from shared/src/main/resources/data/waystones/worldgen/placed_feature/deepslate_waystone.json rename to common/src/main/resources/data/waystones/worldgen/placed_feature/deepslate_waystone.json diff --git a/shared/src/main/resources/data/waystones/worldgen/placed_feature/end_stone_waystone.json b/common/src/main/resources/data/waystones/worldgen/placed_feature/end_stone_waystone.json similarity index 100% rename from shared/src/main/resources/data/waystones/worldgen/placed_feature/end_stone_waystone.json rename to common/src/main/resources/data/waystones/worldgen/placed_feature/end_stone_waystone.json diff --git a/shared/src/main/resources/data/waystones/worldgen/placed_feature/mossy_waystone.json b/common/src/main/resources/data/waystones/worldgen/placed_feature/mossy_waystone.json similarity index 100% rename from shared/src/main/resources/data/waystones/worldgen/placed_feature/mossy_waystone.json rename to common/src/main/resources/data/waystones/worldgen/placed_feature/mossy_waystone.json diff --git a/shared/src/main/resources/data/waystones/worldgen/placed_feature/sandy_waystone.json b/common/src/main/resources/data/waystones/worldgen/placed_feature/sandy_waystone.json similarity index 100% rename from shared/src/main/resources/data/waystones/worldgen/placed_feature/sandy_waystone.json rename to common/src/main/resources/data/waystones/worldgen/placed_feature/sandy_waystone.json diff --git a/shared/src/main/resources/data/waystones/worldgen/placed_feature/waystone.json b/common/src/main/resources/data/waystones/worldgen/placed_feature/waystone.json similarity index 100% rename from shared/src/main/resources/data/waystones/worldgen/placed_feature/waystone.json rename to common/src/main/resources/data/waystones/worldgen/placed_feature/waystone.json diff --git a/shared/src/main/resources/data/waystones/worldgen/template_pool/village/desert/waystones.json b/common/src/main/resources/data/waystones/worldgen/template_pool/village/desert/waystones.json similarity index 100% rename from shared/src/main/resources/data/waystones/worldgen/template_pool/village/desert/waystones.json rename to common/src/main/resources/data/waystones/worldgen/template_pool/village/desert/waystones.json diff --git a/shared/src/main/resources/data/waystones/worldgen/template_pool/village/plains/waystones.json b/common/src/main/resources/data/waystones/worldgen/template_pool/village/plains/waystones.json similarity index 100% rename from shared/src/main/resources/data/waystones/worldgen/template_pool/village/plains/waystones.json rename to common/src/main/resources/data/waystones/worldgen/template_pool/village/plains/waystones.json diff --git a/shared/src/main/resources/data/waystones/worldgen/template_pool/village/savanna/waystones.json b/common/src/main/resources/data/waystones/worldgen/template_pool/village/savanna/waystones.json similarity index 100% rename from shared/src/main/resources/data/waystones/worldgen/template_pool/village/savanna/waystones.json rename to common/src/main/resources/data/waystones/worldgen/template_pool/village/savanna/waystones.json diff --git a/shared/src/main/resources/data/waystones/worldgen/template_pool/village/snowy/waystones.json b/common/src/main/resources/data/waystones/worldgen/template_pool/village/snowy/waystones.json similarity index 100% rename from shared/src/main/resources/data/waystones/worldgen/template_pool/village/snowy/waystones.json rename to common/src/main/resources/data/waystones/worldgen/template_pool/village/snowy/waystones.json diff --git a/shared/src/main/resources/data/waystones/worldgen/template_pool/village/taiga/waystones.json b/common/src/main/resources/data/waystones/worldgen/template_pool/village/taiga/waystones.json similarity index 100% rename from shared/src/main/resources/data/waystones/worldgen/template_pool/village/taiga/waystones.json rename to common/src/main/resources/data/waystones/worldgen/template_pool/village/taiga/waystones.json diff --git a/shared/src/main/resources/pack.mcmeta b/common/src/main/resources/pack.mcmeta similarity index 100% rename from shared/src/main/resources/pack.mcmeta rename to common/src/main/resources/pack.mcmeta diff --git a/shared/src/main/resources/waila_plugins.json b/common/src/main/resources/waila_plugins.json similarity index 100% rename from shared/src/main/resources/waila_plugins.json rename to common/src/main/resources/waila_plugins.json diff --git a/shared/src/main/resources/waystones.mixins.json b/common/src/main/resources/waystones.mixins.json similarity index 100% rename from shared/src/main/resources/waystones.mixins.json rename to common/src/main/resources/waystones.mixins.json diff --git a/shared/src/main/resources/waystones.png b/common/src/main/resources/waystones.png similarity index 100% rename from shared/src/main/resources/waystones.png rename to common/src/main/resources/waystones.png diff --git a/fabric/build.gradle b/fabric/build.gradle index d16daa92..ec142375 100644 --- a/fabric/build.gradle +++ b/fabric/build.gradle @@ -1,133 +1,81 @@ plugins { - id 'fabric-loom' - id 'maven-publish' - id 'idea' - id 'net.darkhax.curseforgegradle' - id "com.modrinth.minotaur" -} - -base { - archivesName = "${mod_id}-fabric-${minecraft_version}" + id 'multiloader-loader' + id 'fabric-loom' + id 'net.darkhax.curseforgegradle' + id "com.modrinth.minotaur" } dependencies { - minecraft "com.mojang:minecraft:${minecraft_version}" - mappings loom.officialMojangMappings() - - modImplementation "net.fabricmc:fabric-loader:${fabric_loader_version}" - modImplementation "net.fabricmc.fabric-api:fabric-api:${fabric_version}" - - modImplementation("net.blay09.mods:balm-fabric:${balm_version}") { - transitive = false - changing = balm_version.endsWith("SNAPSHOT") - } - - implementation project(":shared") - - compileOnly "org.jetbrains:annotations:22.0.0" + minecraft "com.mojang:minecraft:${minecraft_version}" + mappings loom.officialMojangMappings() + modImplementation "net.fabricmc:fabric-loader:${fabric_loader_version}" + modImplementation "net.fabricmc.fabric-api:fabric-api:${fabric_version}" } +apply from: rootProject.file('repositories.gradle') apply from: 'dependencies.gradle' loom { - if (project(":shared").file("src/main/resources/${mod_id}.accesswidener").exists()) { - accessWidenerPath.set(project(":shared").file("src/main/resources/${mod_id}.accesswidener")) - } - - mixin { - defaultRefmapName.set("${mod_id}.refmap.json") - } - - runs { - client { - client() - setConfigName("fabric Client") - ideConfigGenerated(true) - runDir("run") - } - server { - server() - setConfigName("fabric Server") - ideConfigGenerated(true) - runDir("run") - } - data { - inherit client - setConfigName("fabric Data") - ideConfigGenerated(true) - runDir("build/datagen") - - vmArg "-Dfabric-api.datagen" - vmArg "-Dfabric-api.datagen.output-dir=${project(":shared").file("src/generated/resources")}" - vmArg "-Dfabric-api.datagen.modid=${mod_id}" - } - } -} - -sourceSets.main.resources.srcDir('src/generated/resources') - -tasks.withType(JavaCompile).configureEach { - source(project(":shared").sourceSets.main.allSource) -} -tasks.withType(Javadoc).configureEach { - source(project(":shared").sourceSets.main.allJava) -} -tasks.named("sourcesJar", Jar) { - from(project(":shared").sourceSets.main.allSource) -} - -processResources { - from project(":shared").sourceSets.main.resources -} - -publishing { - publications { - mavenJava(MavenPublication) { - artifactId = mod_id + "-fabric" - version = project.version + (!project.version.endsWith("SNAPSHOT") ? "+" + minecraft_version : "") - - from components.java - } - } - - repositories { - maven { - var releasesRepoUrl = "https://maven.twelveiterations.com/repository/maven-releases/" - var snapshotsRepoUrl = "https://maven.twelveiterations.com/repository/maven-snapshots/" - url = uri(version.toString().endsWith("SNAPSHOT") ? snapshotsRepoUrl : releasesRepoUrl) - name = "twelveIterationsNexus" - credentials(PasswordCredentials) - } - } + def aw = project(":common").file("src/main/resources/${mod_id}.accesswidener") + if (aw.exists()) { + accessWidenerPath.set(aw) + } + + mixin { + defaultRefmapName.set("${mod_id}.refmap.json") + } + + runs { + client { + client() + setConfigName("fabric Client") + ideConfigGenerated(true) + runDir("runs/client") + } + server { + server() + setConfigName("fabric Server") + ideConfigGenerated(true) + runDir("runs/server") + } + data { + inherit client + setConfigName("fabric Data") + ideConfigGenerated(true) + runDir("build/datagen") + + vmArg "-Dfabric-api.datagen" + vmArg "-Dfabric-api.datagen.output-dir=${project(":common").file("src/generated/resources")}" + vmArg "-Dfabric-api.datagen.modid=${mod_id}" + } + } } task curseforge(type: net.darkhax.curseforgegradle.TaskPublishCurseForge) { - dependsOn('build') - description = 'Publishes the Fabric build to CurseForge.' - group = 'publishing' + dependsOn('build') + description = 'Publishes the Fabric build to CurseForge.' + group = 'publishing' - apiToken = project.findProperty("curseforge.api_key") ?: System.getenv("CURSEFORGE_TOKEN") ?: "none" + apiToken = project.findProperty("curseforge.api_key") ?: System.getenv("CURSEFORGE_TOKEN") ?: "none" - def mainFile = upload(curseforge_fabric_project_id, file("${project.buildDir}/libs/${archivesBaseName}-${version}.jar")) - mainFile.changelog = rootProject.file('CHANGELOG.md').text - mainFile.addRequirement("fabric-api") - mainFile.addRequirement("balm-fabric") - project.minecraft_versions.split(',').toList().each { mainFile.addGameVersion(it) } - mainFile.releaseType = "release" + def mainFile = upload(curseforge_fabric_project_id, file("${project.buildDir}/libs/${archivesBaseName}-${version}.jar")) + mainFile.changelog = rootProject.file('CHANGELOG.md').text + mainFile.addRequirement("fabric-api") + project.minecraft_versions.split(',').toList().each { mainFile.addGameVersion(it) } + mainFile.releaseType = "release" } modrinth { - token = project.findProperty("modrinth.token") ?: System.getenv("MODRINTH_TOKEN") ?: "none" - projectId = project.modrinth_project_id - versionType = project.modrinth_release_type - versionNumber = project.version + "+fabric-" + project.minecraft_version - uploadFile = remapJar - changelog = rootProject.file("CHANGELOG.md").text - gameVersions = project.minecraft_versions.split(',').toList() - syncBodyFrom = rootProject.file("modpage.md").text - loaders = ['fabric'] - dependencies { - required.project "fabric-api" - required.project "balm" - } + token = project.findProperty("modrinth.token") ?: System.getenv("MODRINTH_TOKEN") ?: "none" + projectId = project.modrinth_project_id + versionType = project.modrinth_release_type + versionNumber = project.version + "+fabric-" + project.minecraft_version + uploadFile = remapJar + changelog = rootProject.file("CHANGELOG.md").text + gameVersions = project.minecraft_versions.split(',').toList() + syncBodyFrom = rootProject.file("modpage.md").text + loaders = ['fabric'] + dependencies { + required.project "fabric-api" + } } \ No newline at end of file diff --git a/fabric/dependencies.gradle b/fabric/dependencies.gradle index d75d4a92..56674435 100644 --- a/fabric/dependencies.gradle +++ b/fabric/dependencies.gradle @@ -1,4 +1,7 @@ dependencies { + modImplementation("net.blay09.mods:balm-fabric:${balm_version}") { + changing = balm_version.contains("SNAPSHOT") + } modCompileOnly "mezz.jei:jei-$jei_minecraft_version-common-api:$jei_version" if (jei_minecraft_version == minecraft_version) { modRuntimeOnly "mezz.jei:jei-$jei_minecraft_version-fabric:$jei_version" diff --git a/fabric/src/main/java/net/blay09/mods/waystones/datagen/ModBlockLootTableProvider.java b/fabric/src/main/java/net/blay09/mods/waystones/datagen/ModBlockLootTableProvider.java index 17a621ce..23d63416 100644 --- a/fabric/src/main/java/net/blay09/mods/waystones/datagen/ModBlockLootTableProvider.java +++ b/fabric/src/main/java/net/blay09/mods/waystones/datagen/ModBlockLootTableProvider.java @@ -5,20 +5,22 @@ import net.fabricmc.fabric.api.datagen.v1.FabricDataOutput; import net.fabricmc.fabric.api.datagen.v1.provider.FabricBlockLootTableProvider; import net.minecraft.advancements.critereon.StatePropertiesPredicate; +import net.minecraft.core.HolderLookup; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.state.properties.DoubleBlockHalf; import net.minecraft.world.level.storage.loot.LootPool; import net.minecraft.world.level.storage.loot.LootTable; import net.minecraft.world.level.storage.loot.entries.LootItem; +import net.minecraft.world.level.storage.loot.functions.CopyComponentsFunction; import net.minecraft.world.level.storage.loot.functions.CopyNameFunction; -import net.minecraft.world.level.storage.loot.functions.CopyNbtFunction; import net.minecraft.world.level.storage.loot.predicates.LootItemBlockStatePropertyCondition; -import net.minecraft.world.level.storage.loot.providers.nbt.ContextNbtProvider; import net.minecraft.world.level.storage.loot.providers.number.ConstantValue; +import java.util.concurrent.CompletableFuture; + public class ModBlockLootTableProvider extends FabricBlockLootTableProvider { - protected ModBlockLootTableProvider(FabricDataOutput dataOutput) { - super(dataOutput); + protected ModBlockLootTableProvider(FabricDataOutput dataOutput, CompletableFuture provider) { + super(dataOutput, provider); } @Override @@ -43,8 +45,7 @@ private LootTable.Builder createWaystoneLoot(Block block) { .withPool(applyExplosionCondition(block, LootPool.lootPool() .setRolls(ConstantValue.exactly(1f)) .add(LootItem.lootTableItem(block)) - .apply(CopyNbtFunction.copyData(ContextNbtProvider.BLOCK_ENTITY) - .copy("UUID", "UUID", CopyNbtFunction.MergeStrategy.REPLACE) + .apply(CopyComponentsFunction.copyComponents(CopyComponentsFunction.Source.BLOCK_ENTITY) .when(HAS_SILK_TOUCH))) .apply(CopyNameFunction.copyName(CopyNameFunction.NameSource.BLOCK_ENTITY) .when(HAS_SILK_TOUCH))); @@ -57,8 +58,7 @@ private LootTable.Builder createDoubleBlockWaystoneLoot(Block block) { .add(LootItem.lootTableItem(block)) .when(LootItemBlockStatePropertyCondition.hasBlockStateProperties(block) .setProperties(StatePropertiesPredicate.Builder.properties().hasProperty(WaystoneBlockBase.HALF, DoubleBlockHalf.LOWER))) - .apply(CopyNbtFunction.copyData(ContextNbtProvider.BLOCK_ENTITY) - .copy("UUID", "UUID", CopyNbtFunction.MergeStrategy.REPLACE) + .apply(CopyComponentsFunction.copyComponents(CopyComponentsFunction.Source.BLOCK_ENTITY) .when(HAS_SILK_TOUCH)))); } } diff --git a/fabric/src/main/java/net/blay09/mods/waystones/datagen/ModRecipeProvider.java b/fabric/src/main/java/net/blay09/mods/waystones/datagen/ModRecipeProvider.java index 372541c9..73a972d8 100644 --- a/fabric/src/main/java/net/blay09/mods/waystones/datagen/ModRecipeProvider.java +++ b/fabric/src/main/java/net/blay09/mods/waystones/datagen/ModRecipeProvider.java @@ -6,6 +6,7 @@ import net.blay09.mods.waystones.tag.ModItemTags; import net.fabricmc.fabric.api.datagen.v1.FabricDataOutput; import net.fabricmc.fabric.api.datagen.v1.provider.FabricRecipeProvider; +import net.minecraft.core.HolderLookup; import net.minecraft.data.recipes.RecipeCategory; import net.minecraft.data.recipes.RecipeOutput; import net.minecraft.resources.ResourceLocation; @@ -15,12 +16,14 @@ import net.minecraft.world.item.Items; import net.minecraft.world.level.block.Blocks; +import java.util.concurrent.CompletableFuture; + import static net.minecraft.data.recipes.ShapedRecipeBuilder.shaped; import static net.minecraft.data.recipes.ShapelessRecipeBuilder.shapeless; public class ModRecipeProvider extends FabricRecipeProvider { - public ModRecipeProvider(FabricDataOutput output) { - super(output); + public ModRecipeProvider(FabricDataOutput output, CompletableFuture provider) { + super(output, provider); } @Override diff --git a/fabric/src/main/java/net/blay09/mods/waystones/fabric/FabricWaystones.java b/fabric/src/main/java/net/blay09/mods/waystones/fabric/FabricWaystones.java index 40abd7f4..668bfb2c 100644 --- a/fabric/src/main/java/net/blay09/mods/waystones/fabric/FabricWaystones.java +++ b/fabric/src/main/java/net/blay09/mods/waystones/fabric/FabricWaystones.java @@ -1,6 +1,7 @@ package net.blay09.mods.waystones.fabric; import net.blay09.mods.balm.api.Balm; +import net.blay09.mods.balm.api.EmptyLoadContext; import net.blay09.mods.waystones.Waystones; import net.fabricmc.api.ModInitializer; import org.slf4j.Logger; @@ -14,7 +15,7 @@ public class FabricWaystones implements ModInitializer { @Override public void onInitialize() { - Balm.initialize(Waystones.MOD_ID, Waystones::initialize); + Balm.initialize(Waystones.MOD_ID, EmptyLoadContext.INSTANCE, Waystones::initialize); // TODO would be nice if we could use Balm.initializeIfLoaded here, but it might run too late at the moment) if (Balm.isModLoaded("repurposed_structures")) { diff --git a/fabric/src/main/java/net/blay09/mods/waystones/fabric/client/FabricWaystonesClient.java b/fabric/src/main/java/net/blay09/mods/waystones/fabric/client/FabricWaystonesClient.java index 38354229..d4fbf246 100644 --- a/fabric/src/main/java/net/blay09/mods/waystones/fabric/client/FabricWaystonesClient.java +++ b/fabric/src/main/java/net/blay09/mods/waystones/fabric/client/FabricWaystonesClient.java @@ -1,5 +1,6 @@ package net.blay09.mods.waystones.fabric.client; +import net.blay09.mods.balm.api.EmptyLoadContext; import net.blay09.mods.balm.api.client.BalmClient; import net.blay09.mods.waystones.Waystones; import net.blay09.mods.waystones.client.WaystonesClient; @@ -9,6 +10,6 @@ public class FabricWaystonesClient implements ClientModInitializer { @Override public void onInitializeClient() { - BalmClient.initialize(Waystones.MOD_ID, WaystonesClient::initialize); + BalmClient.initialize(Waystones.MOD_ID, EmptyLoadContext.INSTANCE, WaystonesClient::initialize); } } diff --git a/forge/build.gradle b/forge/build.gradle index 55e1be94..8d1b747f 100644 --- a/forge/build.gradle +++ b/forge/build.gradle @@ -1,16 +1,11 @@ plugins { - id 'idea' - id 'maven-publish' + id 'multiloader-loader' id 'net.minecraftforge.gradle' version '[6.0,6.2)' id 'org.spongepowered.mixin' id 'net.darkhax.curseforgegradle' id "com.modrinth.minotaur" } -base { - archivesName = "${mod_id}-forge-${minecraft_version}" -} - mixin { add(sourceSets.main, "${mod_id}.refmap.json") @@ -26,78 +21,49 @@ minecraft { // Automatically enable forge AccessTransformers if the file exists // This location is hardcoded in Forge and can not be changed. // https://github.com/MinecraftForge/MinecraftForge/blob/be1698bb1554f9c8fa2f58e32b9ab70bc4385e60/fmlloader/src/main/java/net/minecraftforge/fml/loading/moddiscovery/ModFile.java#L123 - if (file('src/main/resources/META-INF/accesstransformer.cfg').exists()) { - accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg') + def at = file('src/main/resources/META-INF/accesstransformer.cfg') + if (at.exists()) { + accessTransformer = at } runs { client { - workingDirectory project.file('run') + workingDirectory file('runs/client') ideaModule "${rootProject.name}.${project.name}.main" taskName "Client" - property 'mixin.env.remapRefMap', 'true' - property 'mixin.env.refMapRemappingFile', "${projectDir}/build/createSrgToMcp/output.srg" - property 'forge.enabledGameTestNamespaces', mod_id mods { modClientRun { source sourceSets.main - source project(":shared").sourceSets.main } } } server { - workingDirectory project.file('run') + workingDirectory file('runs/server') ideaModule "${rootProject.name}.${project.name}.main" taskName "Server" - property 'mixin.env.remapRefMap', 'true' - property 'mixin.env.refMapRemappingFile', "${projectDir}/build/createSrgToMcp/output.srg" - property 'forge.enabledGameTestNamespaces', mod_id mods { modServerRun { source sourceSets.main - source project(":shared").sourceSets.main - } - } - } - - gameTestServer { - workingDirectory project.file('run') - ideaModule "${rootProject.name}.${project.name}.main" - taskName "GameTest" - - property 'mixin.env.remapRefMap', 'true' - property 'mixin.env.refMapRemappingFile', "${projectDir}/build/createSrgToMcp/output.srg" - - property 'forge.enabledGameTestNamespaces', mod_id - - mods { - modGameTestRun { - source sourceSets.main - source project(":shared").sourceSets.main } } } data { - workingDirectory project.file('run') + workingDirectory file('runs/data') ideaModule "${rootProject.name}.${project.name}.main" args '--mod', mod_id, '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources/') taskName "Data" - property 'mixin.env.remapRefMap', 'true' - property 'mixin.env.refMapRemappingFile', "${projectDir}/build/createSrgToMcp/output.srg" - mods { modDataRun { source sourceSets.main - source project(":shared").sourceSets.main } } } @@ -109,54 +75,19 @@ sourceSets.main.resources.srcDir 'src/generated/resources' dependencies { minecraft "net.minecraftforge:forge:${minecraft_version}-${forge_version}" annotationProcessor "org.spongepowered:mixin:${mixin_version}:processor" - - implementation fg.deobf("net.blay09.mods:balm-forge:${balm_version}") { - changing = balm_version.endsWith("SNAPSHOT") - } - - compileOnly project(":shared") - - compileOnly "org.jetbrains:annotations:22.0.0" } +apply from: rootProject.file('repositories.gradle') apply from: 'dependencies.gradle' -tasks.withType(JavaCompile).configureEach { - source(project(":shared").sourceSets.main.allSource) -} -tasks.withType(Javadoc).configureEach { - source(project(":shared").sourceSets.main.allJava) -} -tasks.named("sourcesJar", Jar) { - from(project(":shared").sourceSets.main.allSource) -} - -processResources { - from project(":shared").sourceSets.main.resources -} - jar.finalizedBy('reobfJar') publishing { publications { mavenJava(MavenPublication) { - artifactId = mod_id + "-forge" - version = project.version + (!project.version.endsWith("SNAPSHOT") ? "+" + minecraft_version : "") - - from components.java fg.component(it) } } - - repositories { - maven { - var releasesRepoUrl = "https://maven.twelveiterations.com/repository/maven-releases/" - var snapshotsRepoUrl = "https://maven.twelveiterations.com/repository/maven-snapshots/" - url = uri(version.toString().endsWith("SNAPSHOT") ? snapshotsRepoUrl : releasesRepoUrl) - name = "twelveIterationsNexus" - credentials(PasswordCredentials) - } - } } task curseforge(type: net.darkhax.curseforgegradle.TaskPublishCurseForge) { @@ -168,7 +99,6 @@ task curseforge(type: net.darkhax.curseforgegradle.TaskPublishCurseForge) { def mainFile = upload(curseforge_forge_project_id, file("${project.buildDir}/libs/${archivesBaseName}-${version}.jar")) mainFile.changelog = rootProject.file('CHANGELOG.md').text - mainFile.addRequirement("balm") project.minecraft_versions.split(',').toList().each { mainFile.addGameVersion(it) } mainFile.releaseType = "release" } @@ -183,7 +113,4 @@ modrinth { gameVersions = project.minecraft_versions.split(',').toList() syncBodyFrom = rootProject.file("modpage.md").text loaders = ['forge'] - dependencies { - required.project "balm" - } } \ No newline at end of file diff --git a/forge/dependencies.gradle b/forge/dependencies.gradle index ea6306a8..064d4d5d 100644 --- a/forge/dependencies.gradle +++ b/forge/dependencies.gradle @@ -1,4 +1,7 @@ dependencies { + implementation fg.deobf("net.blay09.mods:balm-forge:${balm_version}") { + changing = balm_version.contains("SNAPSHOT") + } compileOnly fg.deobf(group: 'info.journeymap', name: 'journeymap-api', version: project.journeymap_api_forge_version, changing: true) compileOnly fg.deobf("mezz.jei:jei-$jei_minecraft_version-common-api:$jei_version") compileOnly fg.deobf("curse.maven:jade-324717:$jade_forge_version") diff --git a/gradle.properties b/gradle.properties index 0ce7c24c..c230b0e5 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,7 +3,7 @@ mod_id = waystones mod_name = Waystones mod_main=Waystones description=Teleport back to activated waystones. For Survival, Adventure or Servers. -version = 16.0.5 +version = 17.0.0 group = net.blay09.mods homepage=https://mods.twelveiterations.com/mc/waystones sources=https://github.com/TwelveIterationMods/Waystones @@ -26,29 +26,29 @@ journeymap_api_common_version=1.20.2-1.9-SNAPSHOT journeymap_api_forge_version=1.20.2-1.9-SNAPSHOT # Minecraft -minecraft_version = 1.20.4 -minecraft_versions = 1.20.4 -minecraft_version_range=[1.20.4,1.21) -pack_format_number=18 -java_version = 17 +minecraft_version = 1.20.6 +minecraft_versions = 1.20.6 +minecraft_version_range = [1.20.6,1.21) +pack_format_number = 18 +java_version = 21 # Balm -balm_version = 9.1.0-SNAPSHOT -balm_version_range = [9.0.0,) +balm_version = 10.1.0-SNAPSHOT +balm_version_range = [10.0.0,) # Forge -forge_version = 49.0.10 -forge_version_range=[49,) -forge_loader_version_range=[49,) +forge_version = 50.0.22 +forge_version_range = [50,) +forge_loader_version_range = [50,) # NeoForge -neoforge_version = 20.4.47-beta -neoforge_version_range=[20.4,) -neoforge_loader_version_range=[1,) +neoforge_version = 20.6.70-beta +neoforge_version_range = [20.6,) +neoforge_loader_version_range = [1,) # Fabric -fabric_version = 0.91.3+1.20.4 -fabric_loader_version = 0.15.3 +fabric_version = 0.98.0+1.20.6 +fabric_loader_version = 0.15.11 # Dependencies jei_minecraft_version=1.20.2 @@ -65,4 +65,6 @@ dynmap_version=3.4 # Gradle org.gradle.jvmargs=-Xmx3G -org.gradle.daemon=false \ No newline at end of file +org.gradle.daemon=false +mod_author = BlayTheNinth +credits = BlayTheNinth \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index db9a6b82..48c0a02c 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/neoforge/build.gradle b/neoforge/build.gradle index 79a43f85..a5886d7e 100644 --- a/neoforge/build.gradle +++ b/neoforge/build.gradle @@ -1,8 +1,6 @@ plugins { - id 'java-library' - id 'idea' - id 'maven-publish' - id 'net.neoforged.gradle.userdev' version '7.0.41' + id 'multiloader-loader' + id 'net.neoforged.gradle.userdev' version '7.0.124' id 'net.darkhax.curseforgegradle' id "com.modrinth.minotaur" } @@ -11,9 +9,11 @@ base { archivesName = "${mod_id}-neoforge-${minecraft_version}" } -if (file('src/main/resources/META-INF/accesstransformer.cfg').exists()) { - minecraft.accessTransformers.file file('src/main/resources/META-INF/accesstransformer.cfg') +def at = file('src/main/resources/META-INF/accesstransformer.cfg') +if (at.exists()) { + minecraft.accessTransformers.file at } + runs { configureEach { // Recommended logging data for a userdev environment @@ -61,58 +61,11 @@ sourceSets.main.resources { srcDir 'src/generated/resources' } dependencies { implementation "net.neoforged:neoforge:${neoforge_version}" - - implementation("net.blay09.mods:balm-neoforge:${balm_version}") { - changing = balm_version.endsWith("SNAPSHOT") - } - - compileOnly project(":shared") - - compileOnly "org.jetbrains:annotations:22.0.0" } +apply from: rootProject.file('repositories.gradle') apply from: 'dependencies.gradle' -// NeoGradle compiles the game, but we don't want to add our common code to the game's code -Spec notNeoTask = { Task it -> !it.name.startsWith("neo") } as Spec - -tasks.withType(JavaCompile).matching(notNeoTask).configureEach { - source(project(":shared").sourceSets.main.allSource) -} - -tasks.withType(Javadoc).matching(notNeoTask).configureEach { - source(project(":shared").sourceSets.main.allJava) -} - -tasks.named("sourcesJar", Jar) { - from(project(":shared").sourceSets.main.allSource) -} - -tasks.withType(ProcessResources).matching(notNeoTask).configureEach { - from project(":shared").sourceSets.main.resources -} - -publishing { - publications { - mavenJava(MavenPublication) { - artifactId = mod_id + "-neoforge" - version = project.version + (!project.version.endsWith("SNAPSHOT") ? "+" + minecraft_version : "") - - from components.java - } - } - - repositories { - maven { - var releasesRepoUrl = "https://maven.twelveiterations.com/repository/maven-releases/" - var snapshotsRepoUrl = "https://maven.twelveiterations.com/repository/maven-snapshots/" - url = uri(version.toString().endsWith("SNAPSHOT") ? snapshotsRepoUrl : releasesRepoUrl) - name = "twelveIterationsNexus" - credentials(PasswordCredentials) - } - } -} - task curseforge(type: net.darkhax.curseforgegradle.TaskPublishCurseForge) { dependsOn('build') description = 'Publishes the NeoForge build to CurseForge.' diff --git a/neoforge/dependencies.gradle b/neoforge/dependencies.gradle index dca80e00..0e4a74ac 100644 --- a/neoforge/dependencies.gradle +++ b/neoforge/dependencies.gradle @@ -1,11 +1,7 @@ -repositories { - // For JourneyMap - maven { - url = "https://jm.gserv.me/repository/maven-public/" - } -} - dependencies { + implementation("net.blay09.mods:balm-neoforge:${balm_version}") { + changing = balm_version.contains("SNAPSHOT") + } compileOnly group: 'info.journeymap', name: 'journeymap-api', version: project.journeymap_api_forge_version, changing: true compileOnly "mezz.jei:jei-$jei_minecraft_version-common-api:$jei_version" compileOnly "curse.maven:jade-324717:$jade_forge_version" diff --git a/neoforge/src/main/resources/META-INF/mods.toml b/neoforge/src/main/resources/META-INF/neoforge.mods.toml similarity index 100% rename from neoforge/src/main/resources/META-INF/mods.toml rename to neoforge/src/main/resources/META-INF/neoforge.mods.toml diff --git a/repositories.gradle b/repositories.gradle index 4b11d813..fdf38502 100644 --- a/repositories.gradle +++ b/repositories.gradle @@ -10,6 +10,8 @@ repositories { url = "https://maven.shedaniel.me/" content { includeGroup "me.shedaniel" + includeGroup "me.shedaniel.cloth" + includeGroup "dev.architectury" } } diff --git a/settings.gradle b/settings.gradle index 1ea574d5..a389f90d 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,30 +1,61 @@ pluginManagement { repositories { gradlePluginPortal() - maven { - name = 'Fabric' - url = 'https://maven.fabricmc.net/' + mavenCentral() + exclusiveContent { + forRepository { + maven { + name = 'Fabric' + url = uri("https://maven.fabricmc.net") + } + } + filter { + includeGroup("net.fabricmc") + includeGroup("fabric-loom") + } } - maven { - name = 'NeoForge' - url = 'https://maven.neoforged.net/releases/' + exclusiveContent { + forRepository { + maven { + name = 'NeoForge' + url = uri("https://maven.neoforged.net/releases") + } + } + filter { + includeGroupAndSubgroups("net.neoforged") + includeGroup("codechicken") + } } - maven { - name = 'Forge' - url = 'https://maven.minecraftforge.net/' + exclusiveContent { + forRepository { + maven { + name = 'Forge' + url = uri("https://maven.minecraftforge.net") + } + } + filter { + includeGroupAndSubgroups("net.minecraftforge") + } } - maven { - name = 'Sponge Snapshots' - url = 'https://repo.spongepowered.org/repository/maven-public/' + exclusiveContent { + forRepository { + maven { + name = 'Sponge Snapshots' + url = uri("https://repo.spongepowered.org/repository/maven-public") + } + } + filter { + includeGroupAndSubgroups("org.spongepowered") + } } } } plugins { - id 'org.gradle.toolchains.foojay-resolver-convention' version '0.5.0' + id 'org.gradle.toolchains.foojay-resolver-convention' version '0.8.0' } -include("shared") +include("common") include("fabric") include("forge") include("neoforge") \ No newline at end of file diff --git a/shared/build.gradle b/shared/build.gradle deleted file mode 100644 index deccd5b5..00000000 --- a/shared/build.gradle +++ /dev/null @@ -1,59 +0,0 @@ -plugins { - id 'idea' - id 'java' - id 'maven-publish' - id 'org.spongepowered.gradle.vanilla' version '0.2.1-SNAPSHOT' -} - -base { - archivesName = "${mod_id}-common-${minecraft_version}" -} - -minecraft { - version(minecraft_version) - if(file("src/main/resources/${mod_id}.accesswidener").exists()){ - accessWideners(file("src/main/resources/${mod_id}.accesswidener")) - } -} - -dependencies { - compileOnly "org.spongepowered:mixin:$mixin_version" - - compileOnly("net.blay09.mods:balm-common:$balm_version") { - exclude(group: "net.blay09.mods", module: "shared-bridge") - changing = balm_version.endsWith("SNAPSHOT") - } -} - -apply from: 'dependencies.gradle' - -sourceSets.main.resources.srcDir('src/generated/resources') - -publishing { - publications { - mavenJava(MavenPublication) { - artifactId = mod_id + "-common" - version = project.version + (!project.version.endsWith("SNAPSHOT") ? "+" + minecraft_version : "") - - artifact jar - - artifact sourcesJar { - archiveClassifier = 'sources' - } - - artifact project.javadocJar { - archiveClassifier = 'javadoc' - } - } - } - - repositories { - maven { - var releasesRepoUrl = "https://maven.twelveiterations.com/repository/maven-releases/" - var snapshotsRepoUrl = "https://maven.twelveiterations.com/repository/maven-snapshots/" - url = uri(version.toString().endsWith("SNAPSHOT") ? snapshotsRepoUrl : releasesRepoUrl) - name = "twelveIterationsNexus" - credentials(PasswordCredentials) - } - } -} \ No newline at end of file diff --git a/shared/src/main/java/net/blay09/mods/waystones/menu/ModMenus.java b/shared/src/main/java/net/blay09/mods/waystones/menu/ModMenus.java deleted file mode 100644 index 7ba3b0b2..00000000 --- a/shared/src/main/java/net/blay09/mods/waystones/menu/ModMenus.java +++ /dev/null @@ -1,115 +0,0 @@ -package net.blay09.mods.waystones.menu; - -import net.blay09.mods.balm.api.DeferredObject; -import net.blay09.mods.balm.api.menu.BalmMenus; -import net.blay09.mods.waystones.Waystones; -import net.blay09.mods.waystones.api.TeleportFlags; -import net.blay09.mods.waystones.block.entity.SharestoneBlockEntity; -import net.blay09.mods.waystones.block.entity.WarpPlateBlockEntity; -import net.blay09.mods.waystones.block.entity.WaystoneBlockEntity; -import net.blay09.mods.waystones.block.entity.WaystoneBlockEntityBase; -import net.blay09.mods.waystones.core.WaystoneImpl; -import net.minecraft.core.BlockPos; -import net.minecraft.resources.ResourceLocation; -import net.minecraft.world.inventory.MenuType; -import net.minecraft.world.level.block.entity.BlockEntity; -import org.jetbrains.annotations.NotNull; - -import java.util.Collections; -import java.util.Set; - -public class ModMenus { - public static DeferredObject> waystoneSelection; - public static DeferredObject> warpScrollSelection; - public static DeferredObject> warpStoneSelection; - public static DeferredObject> portstoneSelection; - public static DeferredObject> inventorySelection; - public static DeferredObject> adminSelection; - public static DeferredObject> sharestoneSelection; - public static DeferredObject> warpPlate; - public static DeferredObject> waystoneSettings; - - public static void initialize(BalmMenus menus) { - waystoneSelection = menus.registerMenu(id("waystone_selection"), (windowId, inventory, buf) -> { - final var pos = buf.readBlockPos(); - final var waystones = WaystoneImpl.readList(buf); - final var blockEntity = inventory.player.level().getBlockEntity(pos); - if (blockEntity instanceof WaystoneBlockEntity waystone) { - return new WaystoneSelectionMenu(ModMenus.waystoneSelection.get(), waystone.getWaystone(), windowId, waystones, Collections.emptySet()); - } - - return null; - }); - - warpScrollSelection = menus.registerMenu(id("warp_scroll_selection"), (windowId, inventory, buf) -> { - final var waystones = WaystoneImpl.readList(buf); - return new WaystoneSelectionMenu(ModMenus.warpScrollSelection.get(), null, windowId, waystones, Collections.emptySet()); - }); - - warpStoneSelection = menus.registerMenu(id("warp_stone_selection"), (windowId, inventory, buf) -> { - final var waystones = WaystoneImpl.readList(buf); - return new WaystoneSelectionMenu(ModMenus.warpStoneSelection.get(), null, windowId, waystones, Collections.emptySet()); - }); - - portstoneSelection = menus.registerMenu(id("portstone_selection"), (windowId, inventory, buf) -> { - final var waystones = WaystoneImpl.readList(buf); - return new WaystoneSelectionMenu(ModMenus.waystoneSelection.get(), null, windowId, waystones, Collections.emptySet()); - }); - - sharestoneSelection = menus.registerMenu(id("sharestone_selection"), (syncId, inventory, buf) -> { - final var pos = buf.readBlockPos(); - final var waystones = WaystoneImpl.readList(buf); - - final var blockEntity = inventory.player.level().getBlockEntity(pos); - if (blockEntity instanceof SharestoneBlockEntity sharestone) { - return new WaystoneSelectionMenu(ModMenus.sharestoneSelection.get(), - sharestone.getWaystone(), - syncId, - waystones, Collections.emptySet()); - } - - return null; - }); - - inventorySelection = menus.registerMenu(id("inventory_selection"), (syncId, inventory, buf) -> { - final var waystones = WaystoneImpl.readList(buf); - return new WaystoneSelectionMenu(ModMenus.inventorySelection.get(), null, syncId, waystones, Set.of(TeleportFlags.INVENTORY_BUTTON)); - }); - - adminSelection = menus.registerMenu(id("admin_selection"), (syncId, inventory, buf) -> { - final var waystones = WaystoneImpl.readList(buf); - return new WaystoneSelectionMenu(ModMenus.adminSelection.get(), null, syncId, waystones, Set.of(TeleportFlags.ADMIN)); - }); - - warpPlate = menus.registerMenu(id("warp_plate"), (windowId, inv, data) -> { - BlockPos pos = data.readBlockPos(); - - BlockEntity blockEntity = inv.player.level().getBlockEntity(pos); - if (blockEntity instanceof WarpPlateBlockEntity warpPlate) { - return new WarpPlateMenu(windowId, warpPlate, warpPlate.getContainerData(), inv); - } - - return null; - }); - - waystoneSettings = menus.registerMenu(id("waystone"), (windowId, inv, data) -> { - final var pos = data.readBlockPos(); - final var waystone = WaystoneImpl.read(data); - final var canEdit = data.readBoolean(); - - BlockEntity blockEntity = inv.player.level().getBlockEntity(pos); - if (blockEntity instanceof WaystoneBlockEntityBase waystoneBlockEntity) { - return new WaystoneMenu(windowId, waystone, waystoneBlockEntity, waystoneBlockEntity.getContainerData(), inv, canEdit); - } - - return null; - - }); - } - - @NotNull - private static ResourceLocation id(String name) { - return new ResourceLocation(Waystones.MOD_ID, name); - } - -} diff --git a/shared/src/main/java/net/blay09/mods/waystones/network/ModNetworking.java b/shared/src/main/java/net/blay09/mods/waystones/network/ModNetworking.java deleted file mode 100644 index 16930b9d..00000000 --- a/shared/src/main/java/net/blay09/mods/waystones/network/ModNetworking.java +++ /dev/null @@ -1,36 +0,0 @@ -package net.blay09.mods.waystones.network; - -import net.blay09.mods.balm.api.network.BalmNetworking; -import net.blay09.mods.balm.api.network.SyncConfigMessage; -import net.blay09.mods.waystones.Waystones; -import net.blay09.mods.waystones.config.WaystonesConfigData; -import net.blay09.mods.waystones.network.message.*; -import net.minecraft.resources.ResourceLocation; -import org.jetbrains.annotations.NotNull; - -public class ModNetworking { - - public static void initialize(BalmNetworking networking) { - networking.registerServerboundPacket(id("inventory_button"), InventoryButtonMessage.class, InventoryButtonMessage::encode, InventoryButtonMessage::decode, InventoryButtonMessage::handle); - networking.registerServerboundPacket(id("edit_waystone"), EditWaystoneMessage.class, EditWaystoneMessage::encode, EditWaystoneMessage::decode, EditWaystoneMessage::handle); - networking.registerServerboundPacket(id("select_waystone"), SelectWaystoneMessage.class, SelectWaystoneMessage::encode, SelectWaystoneMessage::decode, SelectWaystoneMessage::handle); - networking.registerServerboundPacket(id("sort_waystone"), SortWaystoneMessage.class, SortWaystoneMessage::encode, SortWaystoneMessage::decode, SortWaystoneMessage::handle); - networking.registerServerboundPacket(id("remove_waystone"), RemoveWaystoneMessage.class, RemoveWaystoneMessage::encode, RemoveWaystoneMessage::decode, RemoveWaystoneMessage::handle); - networking.registerServerboundPacket(id("request_edit_waystone"), RequestEditWaystoneMessage.class, RequestEditWaystoneMessage::encode, RequestEditWaystoneMessage::decode, RequestEditWaystoneMessage::handle); - - networking.registerClientboundPacket(id("waystone_update"), UpdateWaystoneMessage.class, UpdateWaystoneMessage::encode, UpdateWaystoneMessage::decode, UpdateWaystoneMessage::handle); - networking.registerClientboundPacket(id("waystone_removed"), WaystoneRemovedMessage.class, WaystoneRemovedMessage::encode, WaystoneRemovedMessage::decode, WaystoneRemovedMessage::handle); - networking.registerClientboundPacket(id("known_waystones"), KnownWaystonesMessage.class, KnownWaystonesMessage::encode, KnownWaystonesMessage::decode, KnownWaystonesMessage::handle); - networking.registerClientboundPacket(id("sorting_index"), SortingIndexMessage.class, SortingIndexMessage::encode, SortingIndexMessage::decode, SortingIndexMessage::handle); - networking.registerClientboundPacket(id("teleport_effect"), TeleportEffectMessage.class, TeleportEffectMessage::encode, TeleportEffectMessage::decode, TeleportEffectMessage::handle); - networking.registerClientboundPacket(id("waystone_cooldown"), PlayerWaystoneCooldownsMessage.class, PlayerWaystoneCooldownsMessage::encode, PlayerWaystoneCooldownsMessage::decode, PlayerWaystoneCooldownsMessage::handle); - - SyncConfigMessage.register(id("sync_config"), SyncWaystonesConfigMessage.class, SyncWaystonesConfigMessage::new, WaystonesConfigData.class, WaystonesConfigData::new); - } - - @NotNull - private static ResourceLocation id(String name) { - return new ResourceLocation(Waystones.MOD_ID, name); - } - -} diff --git a/shared/src/main/java/net/blay09/mods/waystones/network/message/SyncWaystonesConfigMessage.java b/shared/src/main/java/net/blay09/mods/waystones/network/message/SyncWaystonesConfigMessage.java deleted file mode 100644 index e5072980..00000000 --- a/shared/src/main/java/net/blay09/mods/waystones/network/message/SyncWaystonesConfigMessage.java +++ /dev/null @@ -1,10 +0,0 @@ -package net.blay09.mods.waystones.network.message; - -import net.blay09.mods.balm.api.network.SyncConfigMessage; -import net.blay09.mods.waystones.config.WaystonesConfigData; - -public class SyncWaystonesConfigMessage extends SyncConfigMessage { - public SyncWaystonesConfigMessage(WaystonesConfigData data) { - super(data); - } -}