diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 9c6d88ddb..211251a5d 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -257,7 +257,7 @@ with `refinedstorage2-platform-*` have dependencies on Minecraft. | `refinedstorage2-resource-api` | ✔️ | Contains API for handling resources. | | `refinedstorage2-storage-api` | ✔️ | Contains storage related functionality. | | `refinedstorage2-platform-api` | ✔️ | Implements the various Refined Storage API modules for use in Minecraft. | +| `refinedstorage2-platform-test` | ✔️ | This module is used in platform tests for various Minecraft related helpers. | | `refinedstorage2-platform-fabric` | ❌ | The platform module for Fabric. This module contains Fabric specific code. | | `refinedstorage2-platform-forge` | ❌ | The platform module for Forge. This module contains Forge specific code. | | `refinedstorage2-platform-common` | ❌ | Common mod code. Most gameplay code is in here. | -| `refinedstorage2-platform-test` | ❌ | This module is used in platform tests for various Minecraft related helpers. | diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml index b6f6fbe5a..7a08bd796 100644 --- a/.github/workflows/publish-release.yml +++ b/.github/workflows/publish-release.yml @@ -141,6 +141,18 @@ jobs: access-token: ${{ secrets.TWITTER_ACCESS_TOKEN }} access-token-secret: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }} + announce-mastodon: + name: Announce to Mastodon + runs-on: ubuntu-latest + needs: [ deploy-github-releases, extract-version-number ] + steps: + - name: Announce to Mastodon + uses: rzr/fediverse-action@master + with: + access-token: ${{ secrets.MASTODON_TOKEN }} + host: 'anvil.social' + message: "Refined Storage v${{ needs.extract-version-number.outputs.version }} has been released! ${{ needs.deploy-github-releases.outputs.release-url }}" + sync-develop: name: Sync develop runs-on: ubuntu-latest diff --git a/.gitignore b/.gitignore index 99b4502b7..458f87e78 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,4 @@ refinedstorage2-platform-forge/run/ out/ /bin/ logs/ +.cache/ diff --git a/CHANGELOG.md b/CHANGELOG.md index 5d6182bd4..bff39312b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,40 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +## [2.0.0-milestone.2.8] - 2023-03-04 + +### Fixed + +- Fixed Disk Drive having 9 slots instead of 8. +- Fixed slow world loading. + +### Added + +- The upgrade slots now show their supported upgrades. +- Different Cable colors. They only connect to same colored cables or the default cable. +- Colored variant of exporters, importers and external storages. They connect the same way as colored cables. +- Support for using the R/U keys in JEI and REI on Grid slots and filtering slots +- Crafting Grid. +- JEI and REI recipe transfer integration for the Crafting Grid. +- The crafting matrix in the Crafting Grid now has a button and keybinding to clear to the player inventory. + The keybinding is only available on Forge. +- A config option to clear items from the Crafting Grid crafting matrix to the player or network inventory. +- Support for collapsable entries for REI. +- Pressing CTRL + SHIFT on the crafting result slot filters the Grid view based on the items in the crafting matrix. + The reason for this is that you can quickly see how much you have left in the storage network. + +### Changed + +- The button to clear to the network inventory next to the crafting matrix in the Crafting Grid is now disabled if + the Crafting Grid is inactive. +- The keybinding to clear the Crafting Grid matrix to the network inventory is only available on Forge. +- The JEI recipe transfer integration for the Crafting Grid now only supports regular crafting recipes. +- Decreased amount of logging to the info level. Now most logging happens on the debug level. + +### Removed + +- Removed amount of stacks and max stacks stored on item storage tooltips. + ## [2.0.0-milestone.2.7] - 2023-01-31 ### Added @@ -294,7 +328,9 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - The Grid can now use smooth scrolling. - The Grid now has syntax highlighting for the search query. -[Unreleased]: https://github.com/refinedmods/refinedstorage2/compare/v2.0.0-milestone.2.7...HEAD +[Unreleased]: https://github.com/refinedmods/refinedstorage2/compare/v2.0.0-milestone.2.8...HEAD + +[2.0.0-milestone.2.8]: https://github.com/refinedmods/refinedstorage2/compare/v2.0.0-milestone.2.7...v2.0.0-milestone.2.8 [2.0.0-milestone.2.7]: https://github.com/refinedmods/refinedstorage2/compare/v2.0.0-milestone.2.6...v2.0.0-milestone.2.7 diff --git a/build.gradle b/build.gradle index 0cab55ac6..925884ed3 100644 --- a/build.gradle +++ b/build.gradle @@ -80,29 +80,36 @@ subprojects { } } - apply plugin: "maven-publish" - publishing { - repositories { - maven { - name = "GitHubPackages" - url = uri("https://maven.pkg.github.com/refinedmods/refinedstorage2") - credentials { - username = System.getenv("GITHUB_ACTOR") - password = System.getenv("GITHUB_TOKEN") + if (!(project.name in [ + 'refinedstorage2-platform-common', + 'refinedstorage2-platform-fabric', + 'refinedstorage2-platform-forge', + 'refinedstorage2-network' + ])) { + apply plugin: "maven-publish" + publishing { + repositories { + maven { + name = "GitHubPackages" + url = uri("https://maven.pkg.github.com/refinedmods/refinedstorage2") + credentials { + username = System.getenv("GITHUB_ACTOR") + password = System.getenv("GITHUB_TOKEN") + } } - } - maven { - name = "CreeperHost" - url = uri("https://maven.creeperhost.net/release") - credentials { - username = System.getenv("CREEPERHOST_MAVEN_USERNAME") - password = System.getenv("CREEPERHOST_MAVEN_TOKEN") + maven { + name = "CreeperHost" + url = uri("https://maven.creeperhost.net/release") + credentials { + username = System.getenv("CREEPERHOST_MAVEN_USERNAME") + password = System.getenv("CREEPERHOST_MAVEN_TOKEN") + } } } - } - publications { - gpr(MavenPublication) { - from(components.java) + publications { + gpr(MavenPublication) { + from(components.java) + } } } } @@ -113,8 +120,14 @@ subprojects { } task allJavadoc(type: Javadoc) { - source subprojects*.sourceSets.main.allJava - classpath += files(subprojects*.sourceSets.main.compileClasspath) + // platform modules (besides API) doesn't need Javadoc. + // For Fabric it even fails due to a mixin target being private. + def projects = getSubprojects() + .stream() + .filter { p -> p.name != "refinedstorage2-platform-fabric" && p.name != "refinedstorage2-platform-forge" && p.name != "refinedstorage2-platform-common" } + .toList() + source projects*.sourceSets.main.allJava + classpath += files(projects*.sourceSets.main.compileClasspath) destinationDir = file("build/docs/javadoc") } @@ -144,7 +157,7 @@ sonarqube { property "sonar.coverage.jacoco.xmlReportPaths", "${project.buildDir}/reports/jacoco/codeCoverageReport/codeCoverageReport.xml" // These project have less tests because they depend on Minecraft a lot, making it difficult to test. property "sonar.coverage.exclusions", "refinedstorage2-platform-forge/**/*,refinedstorage2-platform-fabric/**/*,refinedstorage2-platform-common/**/*,refinedstorage2-platform-api/**/*" - // JEI/REI code is duplicated as reusing it in a common module isn't possible/too difficult. - property "sonar.cpd.exclusions", "refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/jei/*,refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/rei/*,refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/jei/*,refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/rei/*" + // TODO: REI code is duplicated as reusing it in a common module isn't possible/too difficult. Fix this. + property "sonar.cpd.exclusions", "refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/recipemod/rei/*,refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/recipemod/rei/*" } } diff --git a/refinedstorage2-core-api/build.gradle b/refinedstorage2-core-api/build.gradle index 19cc4608c..a868e7c72 100644 --- a/refinedstorage2-core-api/build.gradle +++ b/refinedstorage2-core-api/build.gradle @@ -1,7 +1,11 @@ +plugins { + id 'java-library' +} + archivesBaseName = 'refinedstorage2-core-api' dependencies { - implementation libs.apiguardian + api libs.apiguardian testImplementation testLibs.junit.api testImplementation testLibs.junit.params testRuntimeOnly testLibs.junit.engine diff --git a/refinedstorage2-core-api/src/main/java/com/refinedmods/refinedstorage2/api/core/util/Randomizer.java b/refinedstorage2-core-api/src/main/java/com/refinedmods/refinedstorage2/api/core/util/Randomizer.java deleted file mode 100644 index 83dc6b43c..000000000 --- a/refinedstorage2-core-api/src/main/java/com/refinedmods/refinedstorage2/api/core/util/Randomizer.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.refinedmods.refinedstorage2.api.core.util; - -import java.util.List; - -import org.apiguardian.api.API; - -@API(status = API.Status.STABLE, since = "2.0.0-milestone.2.4") -public interface Randomizer { - void shuffle(List list); -} diff --git a/refinedstorage2-core-api/src/test/java/com/refinedmods/refinedstorage2/api/core/QuantityFormatterTest.java b/refinedstorage2-core-api/src/test/java/com/refinedmods/refinedstorage2/api/core/QuantityFormatterTest.java deleted file mode 100644 index b37d3286a..000000000 --- a/refinedstorage2-core-api/src/test/java/com/refinedmods/refinedstorage2/api/core/QuantityFormatterTest.java +++ /dev/null @@ -1,77 +0,0 @@ -package com.refinedmods.refinedstorage2.api.core; - -import org.junit.jupiter.api.Test; - -import static org.assertj.core.api.Assertions.assertThat; - -class QuantityFormatterTest { - @Test - void shouldFormatWithUnitsForSmallNumber() { - // Act & assert - assertThat(QuantityFormatter.formatWithUnits(0)).isEqualTo("0"); - assertThat(QuantityFormatter.formatWithUnits(1)).isEqualTo("1"); - assertThat(QuantityFormatter.formatWithUnits(10)).isEqualTo("10"); - assertThat(QuantityFormatter.formatWithUnits(105)).isEqualTo("105"); - } - - @Test - void shouldFormatWithUnitsForThousands() { - // Act & assert - assertThat(QuantityFormatter.formatWithUnits(1000)).isEqualTo("1K"); - assertThat(QuantityFormatter.formatWithUnits(1510)).isEqualTo("1.5K"); - - assertThat(QuantityFormatter.formatWithUnits(10_000)).isEqualTo("10K"); - assertThat(QuantityFormatter.formatWithUnits(10_510)).isEqualTo("10.5K"); - assertThat(QuantityFormatter.formatWithUnits(99_999)).isEqualTo("99.9K"); - - assertThat(QuantityFormatter.formatWithUnits(100_000)).isEqualTo("100K"); - assertThat(QuantityFormatter.formatWithUnits(100_500)).isEqualTo("100K"); - assertThat(QuantityFormatter.formatWithUnits(100_999)).isEqualTo("100K"); - - assertThat(QuantityFormatter.formatWithUnits(101_000)).isEqualTo("101K"); - assertThat(QuantityFormatter.formatWithUnits(101_500)).isEqualTo("101K"); - assertThat(QuantityFormatter.formatWithUnits(101_999)).isEqualTo("101K"); - } - - @Test - void shouldFormatWithUnitsForMillions() { - // Act & assert - assertThat(QuantityFormatter.formatWithUnits(1_000_000)).isEqualTo("1M"); - assertThat(QuantityFormatter.formatWithUnits(1_510_000)).isEqualTo("1.5M"); - - assertThat(QuantityFormatter.formatWithUnits(10_000_000)).isEqualTo("10M"); - assertThat(QuantityFormatter.formatWithUnits(10_510_000)).isEqualTo("10.5M"); - assertThat(QuantityFormatter.formatWithUnits(99_999_999)).isEqualTo("99.9M"); - - assertThat(QuantityFormatter.formatWithUnits(100_000_000)).isEqualTo("100M"); - assertThat(QuantityFormatter.formatWithUnits(100_510_000)).isEqualTo("100M"); - assertThat(QuantityFormatter.formatWithUnits(100_999_000)).isEqualTo("100M"); - - assertThat(QuantityFormatter.formatWithUnits(101_000_000)).isEqualTo("101M"); - assertThat(QuantityFormatter.formatWithUnits(101_510_000)).isEqualTo("101M"); - assertThat(QuantityFormatter.formatWithUnits(101_999_000)).isEqualTo("101M"); - } - - @Test - void shouldFormatWithUnitsForBillions() { - // Act & assert - assertThat(QuantityFormatter.formatWithUnits(1_000_000_000)).isEqualTo("1B"); - assertThat(QuantityFormatter.formatWithUnits(1_010_000_000)).isEqualTo("1B"); - assertThat(QuantityFormatter.formatWithUnits(1_100_000_000)).isEqualTo("1.1B"); - assertThat(QuantityFormatter.formatWithUnits(1_100_001_000)).isEqualTo("1.1B"); - assertThat(QuantityFormatter.formatWithUnits(1_920_001_000)).isEqualTo("1.9B"); - } - - @Test - void shouldFormatWithoutUnits() { - // Act & assert - assertThat(QuantityFormatter.format(0)).isEqualTo("0"); - assertThat(QuantityFormatter.format(1)).isEqualTo("1"); - assertThat(QuantityFormatter.format(10)).isEqualTo("10"); - assertThat(QuantityFormatter.format(105)).isEqualTo("105"); - assertThat(QuantityFormatter.format(1050)).isEqualTo("1,050"); - assertThat(QuantityFormatter.format(10500)).isEqualTo("10,500"); - assertThat(QuantityFormatter.format(100500)).isEqualTo("100,500"); - assertThat(QuantityFormatter.format(1000500)).isEqualTo("1,000,500"); - } -} diff --git a/refinedstorage2-grid-api/build.gradle b/refinedstorage2-grid-api/build.gradle index 33af40804..de2668b1a 100644 --- a/refinedstorage2-grid-api/build.gradle +++ b/refinedstorage2-grid-api/build.gradle @@ -1,7 +1,11 @@ +plugins { + id 'java-library' +} + archivesBaseName = 'refinedstorage2-grid-api' dependencies { - implementation libs.apiguardian + api libs.apiguardian implementation libs.slf4j.api testImplementation testLibs.junit.api testImplementation testLibs.junit.params diff --git a/refinedstorage2-grid-api/src/main/java/com/refinedmods/refinedstorage2/api/grid/view/GridView.java b/refinedstorage2-grid-api/src/main/java/com/refinedmods/refinedstorage2/api/grid/view/GridView.java index e04aedba2..eb13710ac 100644 --- a/refinedstorage2-grid-api/src/main/java/com/refinedmods/refinedstorage2/api/grid/view/GridView.java +++ b/refinedstorage2-grid-api/src/main/java/com/refinedmods/refinedstorage2/api/grid/view/GridView.java @@ -1,5 +1,6 @@ package com.refinedmods.refinedstorage2.api.grid.view; +import com.refinedmods.refinedstorage2.api.resource.list.ResourceList; import com.refinedmods.refinedstorage2.api.storage.tracked.TrackedResource; import java.util.List; @@ -34,8 +35,9 @@ public interface GridView { /** * @param predicate the filter + * @return the previous filtering predicate */ - void setFilterAndSort(Predicate predicate); + Predicate setFilterAndSort(Predicate predicate); /** * Preventing sorting means that the changes will still arrive at the backing list and view list, but, @@ -82,5 +84,10 @@ public interface GridView { /** * @return the view list */ - List getAll(); + List getViewList(); + + /** + * @return a copy of the backing list + */ + ResourceList copyBackingList(); } diff --git a/refinedstorage2-grid-api/src/main/java/com/refinedmods/refinedstorage2/api/grid/view/GridViewImpl.java b/refinedstorage2-grid-api/src/main/java/com/refinedmods/refinedstorage2/api/grid/view/GridViewImpl.java index 58b29c23b..d97a504a2 100644 --- a/refinedstorage2-grid-api/src/main/java/com/refinedmods/refinedstorage2/api/grid/view/GridViewImpl.java +++ b/refinedstorage2-grid-api/src/main/java/com/refinedmods/refinedstorage2/api/grid/view/GridViewImpl.java @@ -3,6 +3,7 @@ import com.refinedmods.refinedstorage2.api.core.CoreValidations; import com.refinedmods.refinedstorage2.api.resource.ResourceAmount; import com.refinedmods.refinedstorage2.api.resource.list.ResourceList; +import com.refinedmods.refinedstorage2.api.resource.list.ResourceListImpl; import com.refinedmods.refinedstorage2.api.resource.list.ResourceListOperationResult; import com.refinedmods.refinedstorage2.api.storage.tracked.TrackedResource; @@ -69,9 +70,11 @@ public void setSortingType(final GridSortingType sortingType) { } @Override - public void setFilterAndSort(final Predicate predicate) { + public Predicate setFilterAndSort(final Predicate predicate) { + final Predicate previousPredicate = filter; this.filter = predicate; sort(); + return previousPredicate; } @Override @@ -237,7 +240,14 @@ private Comparator getComparator() { } @Override - public List getAll() { + public List getViewList() { return viewList; } + + @Override + public ResourceList copyBackingList() { + final ResourceList copy = new ResourceListImpl<>(); + backingList.getAll().forEach(copy::add); + return copy; + } } diff --git a/refinedstorage2-grid-api/src/test/java/com/refinedmods/refinedstorage2/api/grid/view/GridViewImplTest.java b/refinedstorage2-grid-api/src/test/java/com/refinedmods/refinedstorage2/api/grid/view/GridViewImplTest.java index d3cbc9835..97c023a78 100644 --- a/refinedstorage2-grid-api/src/test/java/com/refinedmods/refinedstorage2/api/grid/view/GridViewImplTest.java +++ b/refinedstorage2-grid-api/src/test/java/com/refinedmods/refinedstorage2/api/grid/view/GridViewImplTest.java @@ -1,10 +1,12 @@ package com.refinedmods.refinedstorage2.api.grid.view; import com.refinedmods.refinedstorage2.api.resource.ResourceAmount; +import com.refinedmods.refinedstorage2.api.resource.list.ResourceList; import com.refinedmods.refinedstorage2.api.storage.tracked.TrackedResource; import java.util.Comparator; import java.util.Optional; +import java.util.function.Predicate; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -23,8 +25,8 @@ class GridViewImplTest { void setUp() { viewBuilder = new GridViewBuilderImpl( resourceAmount -> Optional.of(new GridResourceImpl(resourceAmount)), - (view) -> Comparator.comparing(GridResource::getName), - (view) -> Comparator.comparing(GridResource::getAmount) + view -> Comparator.comparing(GridResource::getName), + view -> Comparator.comparing(GridResource::getAmount) ); } @@ -47,7 +49,7 @@ void shouldAddResourcesWithSameNameButDifferentIdentity() { view.onChange(new ResourceWithMetadata("A", 2), 1, null); // Assert - assertThat(view.getAll()).usingRecursiveFieldByFieldElementComparator().containsExactly( + assertThat(view.getViewList()).usingRecursiveFieldByFieldElementComparator().containsExactly( new GridResourceWithMetadata(new ResourceAmount<>( new ResourceWithMetadata("A", 1), 1 )), @@ -69,7 +71,7 @@ void shouldPreserveOrderWhenSortingAndTwoResourcesHaveTheSameQuantity() { view.onChange("B", 15, null); view.onChange("C", 2, null); - assertThat(view.getAll()).usingRecursiveFieldByFieldElementComparator().containsExactly( + assertThat(view.getViewList()).usingRecursiveFieldByFieldElementComparator().containsExactly( new GridResourceImpl("B", 15), new GridResourceImpl("A", 15), new GridResourceImpl("C", 2) @@ -81,7 +83,7 @@ void shouldPreserveOrderWhenSortingAndTwoResourcesHaveTheSameQuantity() { view.onChange("B", -15, null); view.onChange("B", 15, null); - assertThat(view.getAll()).usingRecursiveFieldByFieldElementComparator().containsExactly( + assertThat(view.getViewList()).usingRecursiveFieldByFieldElementComparator().containsExactly( new GridResourceImpl("B", 15), new GridResourceImpl("A", 15), new GridResourceImpl("C", 2) @@ -103,11 +105,17 @@ void shouldLoadResourcesAndRetrieveTrackedResourcesProperly() { final Optional a = view.getTrackedResource("A"); final Optional b = view.getTrackedResource("B"); final Optional d = view.getTrackedResource("D"); + final ResourceList backingList = view.copyBackingList(); // Assert assertThat(a).get().usingRecursiveComparison().isEqualTo(new TrackedResource("RaoulA", 2)); assertThat(b).isEmpty(); assertThat(d).isEmpty(); + assertThat(backingList.getAll()).usingRecursiveFieldByFieldElementComparator().containsExactlyInAnyOrder( + new ResourceAmount<>("A", 2), + new ResourceAmount<>("B", 2), + new ResourceAmount<>("D", 1) + ); } @Test @@ -127,14 +135,44 @@ void shouldInsertNewResource() { view.onChange("A", 12, null); // Assert - assertThat(view.getAll()).usingRecursiveFieldByFieldElementComparator().containsExactly( + assertThat(view.getViewList()).usingRecursiveFieldByFieldElementComparator().containsExactly( new GridResourceImpl("D", 10), new GridResourceImpl("A", 12), new GridResourceImpl("B", 15) ); + assertThat(view.copyBackingList().getAll()) + .usingRecursiveFieldByFieldElementComparator() + .containsExactlyInAnyOrder( + new ResourceAmount<>("D", 10), + new ResourceAmount<>("A", 12), + new ResourceAmount<>("B", 15) + ); verify(listener, times(1)).run(); } + @Test + void shouldSetFilterAndSort() { + // Arrange + final GridView view = viewBuilder + .withResource("A", 10, null) + .withResource("B", 10, null) + .build(); + + final Predicate filterA = resource -> resource.getName().equals("A"); + final Predicate filterB = resource -> resource.getName().equals("B"); + + // Act + final Predicate previousFilter1 = view.setFilterAndSort(filterA); + final Predicate previousFilter2 = view.setFilterAndSort(filterB); + + // Assert + assertThat(previousFilter1).isNotNull(); + assertThat(previousFilter2).isEqualTo(filterA); + assertThat(view.getViewList()).usingRecursiveFieldByFieldElementComparator().containsExactly( + new GridResourceImpl("B", 10) + ); + } + @Test void shouldNotInsertNewResourceWhenFilteringProhibitsIt() { // Arrange @@ -152,7 +190,7 @@ void shouldNotInsertNewResourceWhenFilteringProhibitsIt() { view.onChange("A", 12, null); // Assert - assertThat(view.getAll()).usingRecursiveFieldByFieldElementComparator().containsExactly( + assertThat(view.getViewList()).usingRecursiveFieldByFieldElementComparator().containsExactly( new GridResourceImpl("D", 10), new GridResourceImpl("B", 15) ); @@ -197,11 +235,18 @@ void shouldUpdateExistingResource() { view.onChange("B", 5, null); // Assert - assertThat(view.getAll()).usingRecursiveFieldByFieldElementComparator().containsExactly( + assertThat(view.getViewList()).usingRecursiveFieldByFieldElementComparator().containsExactly( new GridResourceImpl("D", 10), new GridResourceImpl("B", 11), new GridResourceImpl("A", 15) ); + assertThat(view.copyBackingList().getAll()) + .usingRecursiveFieldByFieldElementComparator() + .containsExactlyInAnyOrder( + new ResourceAmount<>("D", 10), + new ResourceAmount<>("B", 11), + new ResourceAmount<>("A", 15) + ); verify(listener, times(1)).run(); } @@ -223,10 +268,17 @@ void shouldNotUpdateExistingResourceWhenFilteringProhibitsIt() { view.onChange("B", 5, null); // Assert - assertThat(view.getAll()).usingRecursiveFieldByFieldElementComparator().containsExactly( + assertThat(view.getViewList()).usingRecursiveFieldByFieldElementComparator().containsExactly( new GridResourceImpl("D", 10), new GridResourceImpl("A", 15) ); + assertThat(view.copyBackingList().getAll()) + .usingRecursiveFieldByFieldElementComparator() + .containsExactlyInAnyOrder( + new ResourceAmount<>("B", 11), + new ResourceAmount<>("D", 10), + new ResourceAmount<>("A", 15) + ); verify(listener, never()).run(); } @@ -245,7 +297,7 @@ void shouldNotReorderExistingResourceWhenPreventingSorting() { view.setListener(listener); // Act & assert - assertThat(view.getAll()).usingRecursiveFieldByFieldElementComparator().containsExactly( + assertThat(view.getViewList()).usingRecursiveFieldByFieldElementComparator().containsExactly( new GridResourceImpl("B", 6), new GridResourceImpl("D", 10), new GridResourceImpl("A", 15) @@ -259,21 +311,35 @@ void shouldNotReorderExistingResourceWhenPreventingSorting() { view.onChange("B", 5, null); verify(listener, never()).run(); - assertThat(view.getAll()).usingRecursiveFieldByFieldElementComparator().containsExactly( + assertThat(view.getViewList()).usingRecursiveFieldByFieldElementComparator().containsExactly( new GridResourceImpl("B", 11), new GridResourceImpl("D", 10), new GridResourceImpl("A", 15) ); + assertThat(view.copyBackingList().getAll()) + .usingRecursiveFieldByFieldElementComparator() + .containsExactlyInAnyOrder( + new ResourceAmount<>("B", 11), + new ResourceAmount<>("D", 10), + new ResourceAmount<>("A", 15) + ); final boolean changed3 = view.setPreventSorting(false); assertThat(changed3).isTrue(); view.sort(); - assertThat(view.getAll()).usingRecursiveFieldByFieldElementComparator().containsExactly( + assertThat(view.getViewList()).usingRecursiveFieldByFieldElementComparator().containsExactly( new GridResourceImpl("D", 10), new GridResourceImpl("B", 11), new GridResourceImpl("A", 15) ); + assertThat(view.copyBackingList().getAll()) + .usingRecursiveFieldByFieldElementComparator() + .containsExactlyInAnyOrder( + new ResourceAmount<>("B", 11), + new ResourceAmount<>("D", 10), + new ResourceAmount<>("A", 15) + ); } @Test @@ -317,11 +383,18 @@ void shouldUpdateExistingResourceWhenPerformingPartialRemoval() { view.onChange("B", -7, null); // Assert - assertThat(view.getAll()).usingRecursiveFieldByFieldElementComparator().containsExactly( + assertThat(view.getViewList()).usingRecursiveFieldByFieldElementComparator().containsExactly( new GridResourceImpl("D", 10), new GridResourceImpl("B", 13), new GridResourceImpl("A", 15) ); + assertThat(view.copyBackingList().getAll()) + .usingRecursiveFieldByFieldElementComparator() + .containsExactlyInAnyOrder( + new ResourceAmount<>("D", 10), + new ResourceAmount<>("B", 13), + new ResourceAmount<>("A", 15) + ); verify(listener, times(1)).run(); } @@ -343,7 +416,7 @@ void shouldNotUpdateExistingResourceWhenPerformingPartialRemovalAndFilteringProh view.onChange("B", -7, null); // Assert - assertThat(view.getAll()).usingRecursiveFieldByFieldElementComparator().containsExactly( + assertThat(view.getViewList()).usingRecursiveFieldByFieldElementComparator().containsExactly( new GridResourceImpl("D", 10), new GridResourceImpl("A", 15) ); @@ -365,7 +438,7 @@ void shouldNotReorderExistingResourceWhenPerformingPartialRemovalAndPreventingSo view.setListener(listener); // Act & assert - assertThat(view.getAll()).usingRecursiveFieldByFieldElementComparator().containsExactly( + assertThat(view.getViewList()).usingRecursiveFieldByFieldElementComparator().containsExactly( new GridResourceImpl("D", 10), new GridResourceImpl("A", 15), new GridResourceImpl("B", 20) @@ -376,7 +449,7 @@ void shouldNotReorderExistingResourceWhenPerformingPartialRemovalAndPreventingSo view.onChange("B", -7, null); verify(listener, never()).run(); - assertThat(view.getAll()).usingRecursiveFieldByFieldElementComparator().containsExactly( + assertThat(view.getViewList()).usingRecursiveFieldByFieldElementComparator().containsExactly( new GridResourceImpl("D", 10), new GridResourceImpl("A", 15), new GridResourceImpl("B", 13) @@ -385,7 +458,7 @@ void shouldNotReorderExistingResourceWhenPerformingPartialRemovalAndPreventingSo view.setPreventSorting(false); view.sort(); - assertThat(view.getAll()).usingRecursiveFieldByFieldElementComparator().containsExactly( + assertThat(view.getViewList()).usingRecursiveFieldByFieldElementComparator().containsExactly( new GridResourceImpl("D", 10), new GridResourceImpl("B", 13), new GridResourceImpl("A", 15) @@ -410,10 +483,16 @@ void shouldRemoveExistingResourceCompletely() { view.onChange("B", -20, null); // Assert - assertThat(view.getAll()).usingRecursiveFieldByFieldElementComparator().containsExactly( + assertThat(view.getViewList()).usingRecursiveFieldByFieldElementComparator().containsExactly( new GridResourceImpl("D", 10), new GridResourceImpl("A", 15) ); + assertThat(view.copyBackingList().getAll()) + .usingRecursiveFieldByFieldElementComparator() + .containsExactlyInAnyOrder( + new ResourceAmount<>("D", 10), + new ResourceAmount<>("A", 15) + ); verify(listener, times(1)).run(); } @@ -432,7 +511,7 @@ void shouldNotReorderWhenRemovingExistingResourceCompletelyAndPreventingSorting( view.setListener(listener); // Act & assert - assertThat(view.getAll()).usingRecursiveFieldByFieldElementComparator().containsExactly( + assertThat(view.getViewList()).usingRecursiveFieldByFieldElementComparator().containsExactly( new GridResourceImpl("D", 10), new GridResourceImpl("A", 15), new GridResourceImpl("B", 20) @@ -442,19 +521,31 @@ void shouldNotReorderWhenRemovingExistingResourceCompletelyAndPreventingSorting( view.onChange("B", -20, null); verify(listener, never()).run(); - assertThat(view.getAll()).usingRecursiveFieldByFieldElementComparator().containsExactly( + assertThat(view.getViewList()).usingRecursiveFieldByFieldElementComparator().containsExactly( new GridResourceImpl("D", 10), new GridResourceImpl("A", 15), new GridResourceImpl("B", 20).zeroed() ); + assertThat(view.copyBackingList().getAll()) + .usingRecursiveFieldByFieldElementComparator() + .containsExactlyInAnyOrder( + new ResourceAmount<>("D", 10), + new ResourceAmount<>("A", 15) + ); view.setPreventSorting(false); view.sort(); - assertThat(view.getAll()).usingRecursiveFieldByFieldElementComparator().containsExactly( + assertThat(view.getViewList()).usingRecursiveFieldByFieldElementComparator().containsExactly( new GridResourceImpl("D", 10), new GridResourceImpl("A", 15) ); + assertThat(view.copyBackingList().getAll()) + .usingRecursiveFieldByFieldElementComparator() + .containsExactlyInAnyOrder( + new ResourceAmount<>("D", 10), + new ResourceAmount<>("A", 15) + ); } @Test @@ -472,7 +563,7 @@ void shouldReuseExistingResourceWhenPreventingSortingAndRemovingExistingResource view.setListener(listener); // Act & assert - assertThat(view.getAll()).usingRecursiveFieldByFieldElementComparator().containsExactly( + assertThat(view.getViewList()).usingRecursiveFieldByFieldElementComparator().containsExactly( new GridResourceImpl("D", 10), new GridResourceImpl("A", 15), new GridResourceImpl("B", 20) @@ -483,7 +574,7 @@ void shouldReuseExistingResourceWhenPreventingSortingAndRemovingExistingResource view.onChange("B", -20, null); verify(listener, never()).run(); - assertThat(view.getAll()).usingRecursiveFieldByFieldElementComparator().containsExactly( + assertThat(view.getViewList()).usingRecursiveFieldByFieldElementComparator().containsExactly( new GridResourceImpl("D", 10), new GridResourceImpl("A", 15), new GridResourceImpl("B", 20).zeroed() @@ -493,7 +584,7 @@ void shouldReuseExistingResourceWhenPreventingSortingAndRemovingExistingResource view.onChange("B", 5, null); verify(listener, never()).run(); - assertThat(view.getAll()).usingRecursiveFieldByFieldElementComparator().containsExactly( + assertThat(view.getViewList()).usingRecursiveFieldByFieldElementComparator().containsExactly( new GridResourceImpl("D", 10), new GridResourceImpl("A", 15), new GridResourceImpl("B", 5) @@ -503,7 +594,7 @@ void shouldReuseExistingResourceWhenPreventingSortingAndRemovingExistingResource view.onChange("B", 3, null); verify(listener, never()).run(); - assertThat(view.getAll()).usingRecursiveFieldByFieldElementComparator().containsExactly( + assertThat(view.getViewList()).usingRecursiveFieldByFieldElementComparator().containsExactly( new GridResourceImpl("D", 10), new GridResourceImpl("A", 15), new GridResourceImpl("B", 8) diff --git a/refinedstorage2-network-api/build.gradle b/refinedstorage2-network-api/build.gradle index a8adc2b82..c6ff3f134 100644 --- a/refinedstorage2-network-api/build.gradle +++ b/refinedstorage2-network-api/build.gradle @@ -1,7 +1,11 @@ +plugins { + id 'java-library' +} + archivesBaseName = 'refinedstorage2-network-api' dependencies { - implementation libs.apiguardian + api libs.apiguardian implementation project(':refinedstorage2-core-api') implementation project(':refinedstorage2-resource-api') implementation project(':refinedstorage2-storage-api') diff --git a/refinedstorage2-network-api/src/main/java/com/refinedmods/refinedstorage2/api/network/node/AbstractStorageNetworkNode.java b/refinedstorage2-network-api/src/main/java/com/refinedmods/refinedstorage2/api/network/node/AbstractStorageNetworkNode.java index 024f5cde3..253bccaab 100644 --- a/refinedstorage2-network-api/src/main/java/com/refinedmods/refinedstorage2/api/network/node/AbstractStorageNetworkNode.java +++ b/refinedstorage2-network-api/src/main/java/com/refinedmods/refinedstorage2/api/network/node/AbstractStorageNetworkNode.java @@ -62,7 +62,7 @@ private void trySortSources() { getRelevantStorageChannelTypes().forEach(type -> storage.getStorageChannel(type).sortSources()); } - protected abstract Set> getRelevantStorageChannelTypes(); + protected abstract Set> getRelevantStorageChannelTypes(); public void setFilterTemplates(final Set templates) { filter.setTemplates(templates); diff --git a/refinedstorage2-network-test/src/main/java/com/refinedmods/refinedstorage2/network/test/NetworkTestFixtures.java b/refinedstorage2-network-test/src/main/java/com/refinedmods/refinedstorage2/network/test/NetworkTestFixtures.java index c38e781dc..96ebf89ec 100644 --- a/refinedstorage2-network-test/src/main/java/com/refinedmods/refinedstorage2/network/test/NetworkTestFixtures.java +++ b/refinedstorage2-network-test/src/main/java/com/refinedmods/refinedstorage2/network/test/NetworkTestFixtures.java @@ -1,8 +1,6 @@ package com.refinedmods.refinedstorage2.network.test; import com.refinedmods.refinedstorage2.api.core.component.ComponentMapFactory; -import com.refinedmods.refinedstorage2.api.core.registry.OrderedRegistry; -import com.refinedmods.refinedstorage2.api.core.registry.OrderedRegistryImpl; import com.refinedmods.refinedstorage2.api.network.Network; import com.refinedmods.refinedstorage2.api.network.component.EnergyNetworkComponent; import com.refinedmods.refinedstorage2.api.network.component.NetworkComponent; @@ -13,10 +11,11 @@ import com.refinedmods.refinedstorage2.api.storage.channel.StorageChannelImpl; import com.refinedmods.refinedstorage2.api.storage.channel.StorageChannelType; +import java.util.Set; + public final class NetworkTestFixtures { public static final StorageChannelType STORAGE_CHANNEL_TYPE = StorageChannelImpl::new; - public static final OrderedRegistry> STORAGE_CHANNEL_TYPE_REGISTRY = - new OrderedRegistryImpl<>("default", STORAGE_CHANNEL_TYPE); + public static final Set> STORAGE_CHANNEL_TYPES = Set.of(STORAGE_CHANNEL_TYPE); public static final ComponentMapFactory NETWORK_COMPONENT_MAP_FACTORY = new ComponentMapFactory<>(); @@ -31,7 +30,7 @@ public final class NetworkTestFixtures { ); NETWORK_COMPONENT_MAP_FACTORY.addFactory( StorageNetworkComponent.class, - network -> new StorageNetworkComponentImpl(STORAGE_CHANNEL_TYPE_REGISTRY) + network -> new StorageNetworkComponentImpl(STORAGE_CHANNEL_TYPES) ); } diff --git a/refinedstorage2-network-test/src/main/java/com/refinedmods/refinedstorage2/network/test/nodefactory/ExternalStorageNetworkNodeFactory.java b/refinedstorage2-network-test/src/main/java/com/refinedmods/refinedstorage2/network/test/nodefactory/ExternalStorageNetworkNodeFactory.java index 87dc7b738..f4038d2c6 100644 --- a/refinedstorage2-network-test/src/main/java/com/refinedmods/refinedstorage2/network/test/nodefactory/ExternalStorageNetworkNodeFactory.java +++ b/refinedstorage2-network-test/src/main/java/com/refinedmods/refinedstorage2/network/test/nodefactory/ExternalStorageNetworkNodeFactory.java @@ -15,7 +15,7 @@ public class ExternalStorageNetworkNodeFactory extends AbstractNetworkNodeFactor protected ExternalStorageNetworkNode innerCreate(final AddNetworkNode ctx, final Map properties) { final ExternalStorageNetworkNode node = new ExternalStorageNetworkNode(getEnergyUsage(properties)); node.initialize( - NetworkTestFixtures.STORAGE_CHANNEL_TYPE_REGISTRY, + NetworkTestFixtures.STORAGE_CHANNEL_TYPES, () -> 0L, new TrackedStorageRepositoryProvider() { @Override diff --git a/refinedstorage2-network-test/src/main/java/com/refinedmods/refinedstorage2/network/test/nodefactory/GridNetworkNodeFactory.java b/refinedstorage2-network-test/src/main/java/com/refinedmods/refinedstorage2/network/test/nodefactory/GridNetworkNodeFactory.java index 7a069da43..57ab39ef7 100644 --- a/refinedstorage2-network-test/src/main/java/com/refinedmods/refinedstorage2/network/test/nodefactory/GridNetworkNodeFactory.java +++ b/refinedstorage2-network-test/src/main/java/com/refinedmods/refinedstorage2/network/test/nodefactory/GridNetworkNodeFactory.java @@ -9,9 +9,6 @@ public class GridNetworkNodeFactory extends AbstractNetworkNodeFactory { @Override protected GridNetworkNode innerCreate(final AddNetworkNode ctx, final Map properties) { - return new GridNetworkNode( - getEnergyUsage(properties), - NetworkTestFixtures.STORAGE_CHANNEL_TYPE_REGISTRY - ); + return new GridNetworkNode(getEnergyUsage(properties), NetworkTestFixtures.STORAGE_CHANNEL_TYPES); } } diff --git a/refinedstorage2-network-test/src/main/java/com/refinedmods/refinedstorage2/network/test/nodefactory/MultiStorageNetworkNodeFactory.java b/refinedstorage2-network-test/src/main/java/com/refinedmods/refinedstorage2/network/test/nodefactory/MultiStorageNetworkNodeFactory.java index af2dc1fd6..fb8194f0d 100644 --- a/refinedstorage2-network-test/src/main/java/com/refinedmods/refinedstorage2/network/test/nodefactory/MultiStorageNetworkNodeFactory.java +++ b/refinedstorage2-network-test/src/main/java/com/refinedmods/refinedstorage2/network/test/nodefactory/MultiStorageNetworkNodeFactory.java @@ -17,7 +17,7 @@ protected MultiStorageNetworkNode innerCreate(final AddNetworkNode ctx, final Ma return new MultiStorageNetworkNode( getEnergyUsage(properties), energyUsagePerStorage, - NetworkTestFixtures.STORAGE_CHANNEL_TYPE_REGISTRY, + NetworkTestFixtures.STORAGE_CHANNEL_TYPES, size ); } diff --git a/refinedstorage2-network/build.gradle b/refinedstorage2-network/build.gradle index 1645cc8a4..feeb7564a 100644 --- a/refinedstorage2-network/build.gradle +++ b/refinedstorage2-network/build.gradle @@ -2,7 +2,6 @@ archivesBaseName = 'refinedstorage2-network' dependencies { implementation libs.slf4j.api - implementation libs.apiguardian testRuntimeOnly libs.slf4j.impl testImplementation testLibs.junit.api testImplementation testLibs.junit.params diff --git a/refinedstorage2-network/src/main/java/com/refinedmods/refinedstorage2/api/network/impl/component/GraphNetworkComponent.java b/refinedstorage2-network/src/main/java/com/refinedmods/refinedstorage2/api/network/impl/component/GraphNetworkComponent.java index f013301b2..665101d10 100644 --- a/refinedstorage2-network/src/main/java/com/refinedmods/refinedstorage2/api/network/impl/component/GraphNetworkComponent.java +++ b/refinedstorage2-network/src/main/java/com/refinedmods/refinedstorage2/api/network/impl/component/GraphNetworkComponent.java @@ -27,24 +27,24 @@ public Set getContainers() { @Override public void onContainerAdded(final NetworkNodeContainer container) { - LOGGER.info("Container {} added to network {}", container, network.hashCode()); + LOGGER.debug("Container {} added to network {}", container, network.hashCode()); containers.add(container); } @Override public void onContainerRemoved(final NetworkNodeContainer container) { - LOGGER.info("Container {} removed from network {}", container, network.hashCode()); + LOGGER.debug("Container {} removed from network {}", container, network.hashCode()); containers.remove(container); } @Override public void onNetworkRemoved() { - LOGGER.info("Network {} is removed", network.hashCode()); + LOGGER.debug("Network {} is removed", network.hashCode()); } @Override public void onNetworkSplit(final Set networks) { - LOGGER.info( + LOGGER.debug( "Network {} has been split into {} other networks ({})", network.hashCode(), networks.size(), @@ -54,6 +54,6 @@ public void onNetworkSplit(final Set networks) { @Override public void onNetworkMergedWith(final Network newMainNetwork) { - LOGGER.info("Network {} has merged with network {}", newMainNetwork.hashCode(), this.network.hashCode()); + LOGGER.debug("Network {} has merged with network {}", newMainNetwork.hashCode(), this.network.hashCode()); } } diff --git a/refinedstorage2-network/src/main/java/com/refinedmods/refinedstorage2/api/network/impl/component/StorageNetworkComponentImpl.java b/refinedstorage2-network/src/main/java/com/refinedmods/refinedstorage2/api/network/impl/component/StorageNetworkComponentImpl.java index 41bdf2470..1842f564a 100644 --- a/refinedstorage2-network/src/main/java/com/refinedmods/refinedstorage2/api/network/impl/component/StorageNetworkComponentImpl.java +++ b/refinedstorage2-network/src/main/java/com/refinedmods/refinedstorage2/api/network/impl/component/StorageNetworkComponentImpl.java @@ -1,14 +1,14 @@ package com.refinedmods.refinedstorage2.api.network.impl.component; -import com.refinedmods.refinedstorage2.api.core.registry.OrderedRegistry; import com.refinedmods.refinedstorage2.api.network.component.StorageNetworkComponent; import com.refinedmods.refinedstorage2.api.network.component.StorageProvider; import com.refinedmods.refinedstorage2.api.network.node.container.NetworkNodeContainer; import com.refinedmods.refinedstorage2.api.storage.channel.StorageChannel; import com.refinedmods.refinedstorage2.api.storage.channel.StorageChannelType; -import java.util.HashMap; +import java.util.Collection; import java.util.Map; +import java.util.stream.Collectors; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -16,14 +16,13 @@ public class StorageNetworkComponentImpl implements StorageNetworkComponent { private static final Logger LOGGER = LoggerFactory.getLogger(StorageNetworkComponentImpl.class); - private final Map, StorageChannel> channels = new HashMap<>(); + private final Map, StorageChannel> channels; - public StorageNetworkComponentImpl( - final OrderedRegistry> storageChannelTypeRegistry - ) { - for (final StorageChannelType type : storageChannelTypeRegistry.getAll()) { - channels.put(type, type.create()); - } + public StorageNetworkComponentImpl(final Collection> storageChannelTypes) { + this.channels = storageChannelTypes.stream().collect(Collectors.toUnmodifiableMap( + type -> type, + StorageChannelType::create + )); } @Override @@ -40,7 +39,7 @@ private void tryAddStorageFromProviderToChannel(final StorageProvider provid final StorageChannelType type, final StorageChannel channel) { provider.getStorageForChannel(type).ifPresent(storage -> { - LOGGER.info("Adding source {} to channel {} from provider {}", storage, type, provider); + LOGGER.debug("Adding source {} to channel {} from provider {}", storage, type, provider); channel.addSource(storage); }); } @@ -61,7 +60,7 @@ private void tryRemoveStorageFromProviderFromChannel(final StorageProvider p final StorageChannelType type, final StorageChannel channel) { provider.getStorageForChannel(type).ifPresent(storage -> { - LOGGER.info("Removing source {} from channel {} of provider {}", storage, type, provider); + LOGGER.debug("Removing source {} from channel {} of provider {}", storage, type, provider); channel.removeSource(storage); }); } diff --git a/refinedstorage2-network/src/main/java/com/refinedmods/refinedstorage2/api/network/impl/node/exporter/scheduling/RandomExporterSchedulingMode.java b/refinedstorage2-network/src/main/java/com/refinedmods/refinedstorage2/api/network/impl/node/exporter/scheduling/RandomExporterSchedulingMode.java index 7d8af1eb2..9d75674d0 100644 --- a/refinedstorage2-network/src/main/java/com/refinedmods/refinedstorage2/api/network/impl/node/exporter/scheduling/RandomExporterSchedulingMode.java +++ b/refinedstorage2-network/src/main/java/com/refinedmods/refinedstorage2/api/network/impl/node/exporter/scheduling/RandomExporterSchedulingMode.java @@ -1,6 +1,5 @@ package com.refinedmods.refinedstorage2.api.network.impl.node.exporter.scheduling; -import com.refinedmods.refinedstorage2.api.core.util.Randomizer; import com.refinedmods.refinedstorage2.api.network.Network; import com.refinedmods.refinedstorage2.api.network.node.exporter.scheduling.ExporterSchedulingMode; import com.refinedmods.refinedstorage2.api.network.node.exporter.strategy.ExporterTransferStrategy; @@ -28,4 +27,8 @@ public void execute(final List templates, randomizer.shuffle(shuffledTemplates); FirstAvailableExporterSchedulingMode.INSTANCE.execute(shuffledTemplates, strategy, network, actor); } + + public interface Randomizer { + void shuffle(List list); + } } diff --git a/refinedstorage2-network/src/main/java/com/refinedmods/refinedstorage2/api/network/impl/node/externalstorage/ExternalStorageNetworkNode.java b/refinedstorage2-network/src/main/java/com/refinedmods/refinedstorage2/api/network/impl/node/externalstorage/ExternalStorageNetworkNode.java index 71be5d6cc..892b876b3 100644 --- a/refinedstorage2-network/src/main/java/com/refinedmods/refinedstorage2/api/network/impl/node/externalstorage/ExternalStorageNetworkNode.java +++ b/refinedstorage2-network/src/main/java/com/refinedmods/refinedstorage2/api/network/impl/node/externalstorage/ExternalStorageNetworkNode.java @@ -1,6 +1,5 @@ package com.refinedmods.refinedstorage2.api.network.impl.node.externalstorage; -import com.refinedmods.refinedstorage2.api.core.registry.OrderedRegistry; import com.refinedmods.refinedstorage2.api.network.component.StorageProvider; import com.refinedmods.refinedstorage2.api.network.node.AbstractStorageNetworkNode; import com.refinedmods.refinedstorage2.api.network.node.externalstorage.ExternalStorageProviderFactory; @@ -9,28 +8,30 @@ import com.refinedmods.refinedstorage2.api.storage.external.ExternalStorage; import com.refinedmods.refinedstorage2.api.storage.tracked.TrackedStorageRepository; -import java.util.HashMap; +import java.util.Collection; +import java.util.Collections; import java.util.Map; import java.util.Optional; import java.util.Set; import java.util.function.LongSupplier; +import java.util.stream.Collectors; import javax.annotation.Nullable; public class ExternalStorageNetworkNode extends AbstractStorageNetworkNode implements StorageProvider { private final long energyUsage; - private final Map, DynamicStorage> storages = new HashMap<>(); + private Map, DynamicStorage> storages = Collections.emptyMap(); public ExternalStorageNetworkNode(final long energyUsage) { this.energyUsage = energyUsage; } - public void initialize(final OrderedRegistry> storageChannelTypeRegistry, + public void initialize(final Collection> storageChannelTypes, final LongSupplier clock, final TrackedStorageRepositoryProvider trackedStorageRepositoryProvider) { - storageChannelTypeRegistry.getAll().forEach(type -> storages.put(type, new DynamicStorage<>( - trackedStorageRepositoryProvider.getRepository(type), - clock - ))); + this.storages = storageChannelTypes.stream().collect(Collectors.toUnmodifiableMap( + type -> type, + type -> new DynamicStorage<>(trackedStorageRepositoryProvider.getRepository(type), clock) + )); } @SuppressWarnings({"unchecked", "rawtypes"}) @@ -68,7 +69,7 @@ public long getEnergyUsage() { } @Override - protected Set> getRelevantStorageChannelTypes() { + protected Set> getRelevantStorageChannelTypes() { return storages.keySet(); } diff --git a/refinedstorage2-network/src/main/java/com/refinedmods/refinedstorage2/api/network/impl/node/grid/GridNetworkNode.java b/refinedstorage2-network/src/main/java/com/refinedmods/refinedstorage2/api/network/impl/node/grid/GridNetworkNode.java index 06a47ed15..32c1e5c69 100644 --- a/refinedstorage2-network/src/main/java/com/refinedmods/refinedstorage2/api/network/impl/node/grid/GridNetworkNode.java +++ b/refinedstorage2-network/src/main/java/com/refinedmods/refinedstorage2/api/network/impl/node/grid/GridNetworkNode.java @@ -1,7 +1,6 @@ package com.refinedmods.refinedstorage2.api.network.impl.node.grid; import com.refinedmods.refinedstorage2.api.core.CoreValidations; -import com.refinedmods.refinedstorage2.api.core.registry.OrderedRegistry; import com.refinedmods.refinedstorage2.api.grid.GridWatcher; import com.refinedmods.refinedstorage2.api.grid.service.GridService; import com.refinedmods.refinedstorage2.api.grid.service.GridServiceFactory; @@ -15,6 +14,7 @@ import com.refinedmods.refinedstorage2.api.storage.channel.StorageChannelType; import com.refinedmods.refinedstorage2.api.storage.tracked.TrackedResource; +import java.util.Collection; import java.util.HashMap; import java.util.HashSet; import java.util.List; @@ -24,16 +24,16 @@ import javax.annotation.Nullable; public class GridNetworkNode extends AbstractNetworkNode implements GridServiceFactory { - private final OrderedRegistry> storageChannelTypeRegistry; + private final Collection> storageChannelTypes; private final Set watchers = new HashSet<>(); private final Map, ResourceListListener>> storageChannelListeners = new HashMap<>(); private final long energyUsage; public GridNetworkNode(final long energyUsage, - final OrderedRegistry> storageChannelTypeRegistry) { + final Collection> storageChannelTypes) { this.energyUsage = energyUsage; - this.storageChannelTypeRegistry = storageChannelTypeRegistry; + this.storageChannelTypes = storageChannelTypes; } private StorageChannel getStorageChannel(final StorageChannelType type) { @@ -59,7 +59,7 @@ public long getEnergyUsage() { public void addWatcher(final GridWatcher watcher, final Class actorType) { CoreValidations.validateNotContains(watchers, watcher, "Watcher is already registered"); - storageChannelTypeRegistry.getAll().forEach(storageChannelType -> attachWatcherToStorageChannel( + storageChannelTypes.forEach(storageChannelType -> attachWatcherToStorageChannel( watcher, actorType, storageChannelType diff --git a/refinedstorage2-network/src/main/java/com/refinedmods/refinedstorage2/api/network/impl/node/multistorage/MultiStorageNetworkNode.java b/refinedstorage2-network/src/main/java/com/refinedmods/refinedstorage2/api/network/impl/node/multistorage/MultiStorageNetworkNode.java index d1a0ca20a..0d04df2f6 100644 --- a/refinedstorage2-network/src/main/java/com/refinedmods/refinedstorage2/api/network/impl/node/multistorage/MultiStorageNetworkNode.java +++ b/refinedstorage2-network/src/main/java/com/refinedmods/refinedstorage2/api/network/impl/node/multistorage/MultiStorageNetworkNode.java @@ -1,6 +1,5 @@ package com.refinedmods.refinedstorage2.api.network.impl.node.multistorage; -import com.refinedmods.refinedstorage2.api.core.registry.OrderedRegistry; import com.refinedmods.refinedstorage2.api.network.component.StorageProvider; import com.refinedmods.refinedstorage2.api.network.node.AbstractStorageNetworkNode; import com.refinedmods.refinedstorage2.api.storage.Storage; @@ -8,6 +7,7 @@ import java.util.ArrayList; import java.util.Arrays; +import java.util.Collection; import java.util.HashSet; import java.util.List; import java.util.Map; @@ -38,21 +38,21 @@ public class MultiStorageNetworkNode extends AbstractStorageNetworkNode implemen public MultiStorageNetworkNode(final long energyUsage, final long energyUsagePerStorage, - final OrderedRegistry> storageChannelTypeRegistry, + final Collection> storageChannelTypes, final int size) { this.energyUsage = energyUsage; this.energyUsagePerStorage = energyUsagePerStorage; - this.exposedStorages = createExposedStorages(storageChannelTypeRegistry); + this.exposedStorages = createExposedStorages(storageChannelTypes); this.cache = new MultiStorageInternalStorage[size]; } private Map, MultiStorageExposedStorage> createExposedStorages( - final OrderedRegistry> storageChannelTypeRegistry + final Collection> storageChannelTypes ) { - return storageChannelTypeRegistry - .getAll() - .stream() - .collect(Collectors.toUnmodifiableMap(Function.identity(), this::createExposedStorage)); + return storageChannelTypes.stream().collect(Collectors.toUnmodifiableMap( + Function.identity(), + this::createExposedStorage + )); } private MultiStorageExposedStorage createExposedStorage(final StorageChannelType type) { @@ -130,7 +130,7 @@ protected void onActiveChanged(final boolean newActive) { if (network == null) { return; } - LOGGER.info("Activeness got changed to {}, updating underlying internal storages", newActive); + LOGGER.debug("Activeness got changed to {}, updating underlying internal storages", newActive); if (newActive) { enableAllStorages(); } else { @@ -179,7 +179,7 @@ private MultiStorageStorageState getState(@Nullable final MultiStorageInternalSt } @Override - protected Set> getRelevantStorageChannelTypes() { + protected Set> getRelevantStorageChannelTypes() { return exposedStorages.keySet(); } diff --git a/refinedstorage2-network/src/main/java/com/refinedmods/refinedstorage2/api/network/impl/node/storage/StorageNetworkNode.java b/refinedstorage2-network/src/main/java/com/refinedmods/refinedstorage2/api/network/impl/node/storage/StorageNetworkNode.java index b5be90387..2a632ab58 100644 --- a/refinedstorage2-network/src/main/java/com/refinedmods/refinedstorage2/api/network/impl/node/storage/StorageNetworkNode.java +++ b/refinedstorage2-network/src/main/java/com/refinedmods/refinedstorage2/api/network/impl/node/storage/StorageNetworkNode.java @@ -28,7 +28,7 @@ public StorageNetworkNode(final long energyUsage, final StorageChannelType ty } public void setStorage(final Storage storage) { - LOGGER.info("Loading storage {}", storage); + LOGGER.debug("Loading storage {}", storage); this.internalStorage = storage; } @@ -38,7 +38,7 @@ protected void onActiveChanged(final boolean newActive) { if (network == null || internalStorage == null) { return; } - LOGGER.info("Storage activeness got changed to '{}', updating underlying storage", newActive); + LOGGER.debug("Storage activeness got changed to '{}', updating underlying storage", newActive); if (newActive) { exposedStorage.setDelegate(internalStorage); } else { @@ -60,7 +60,7 @@ public long getCapacity() { } @Override - protected Set> getRelevantStorageChannelTypes() { + protected Set> getRelevantStorageChannelTypes() { return Set.of(type); } diff --git a/refinedstorage2-network/src/test/java/com/refinedmods/refinedstorage2/api/network/impl/component/StorageNetworkComponentImplTest.java b/refinedstorage2-network/src/test/java/com/refinedmods/refinedstorage2/api/network/impl/component/StorageNetworkComponentImplTest.java index a79620c7a..4e222a64c 100644 --- a/refinedstorage2-network/src/test/java/com/refinedmods/refinedstorage2/api/network/impl/component/StorageNetworkComponentImplTest.java +++ b/refinedstorage2-network/src/test/java/com/refinedmods/refinedstorage2/api/network/impl/component/StorageNetworkComponentImplTest.java @@ -30,7 +30,7 @@ class StorageNetworkComponentImplTest { @BeforeEach void setUp() { - sut = new StorageNetworkComponentImpl(NetworkTestFixtures.STORAGE_CHANNEL_TYPE_REGISTRY); + sut = new StorageNetworkComponentImpl(NetworkTestFixtures.STORAGE_CHANNEL_TYPES); storage1 = new StorageNetworkNode<>(0, NetworkTestFixtures.STORAGE_CHANNEL_TYPE); storage1.setNetwork(new NetworkImpl(NetworkTestFixtures.NETWORK_COMPONENT_MAP_FACTORY)); diff --git a/refinedstorage2-network/src/test/java/com/refinedmods/refinedstorage2/api/network/impl/node/exporter/RandomExporterNetworkNodeTest.java b/refinedstorage2-network/src/test/java/com/refinedmods/refinedstorage2/api/network/impl/node/exporter/RandomExporterNetworkNodeTest.java index 735c8b6d9..d2f55511d 100644 --- a/refinedstorage2-network/src/test/java/com/refinedmods/refinedstorage2/api/network/impl/node/exporter/RandomExporterNetworkNodeTest.java +++ b/refinedstorage2-network/src/test/java/com/refinedmods/refinedstorage2/api/network/impl/node/exporter/RandomExporterNetworkNodeTest.java @@ -1,7 +1,6 @@ package com.refinedmods.refinedstorage2.api.network.impl.node.exporter; import com.refinedmods.refinedstorage2.api.core.Action; -import com.refinedmods.refinedstorage2.api.core.util.Randomizer; import com.refinedmods.refinedstorage2.api.network.impl.node.exporter.scheduling.RandomExporterSchedulingMode; import com.refinedmods.refinedstorage2.api.network.node.exporter.scheduling.ExporterSchedulingMode; import com.refinedmods.refinedstorage2.api.network.node.exporter.strategy.ExporterTransferStrategy; @@ -21,7 +20,7 @@ class RandomExporterNetworkNodeTest extends AbstractExporterNetworkNodeTest { @Override protected ExporterSchedulingMode createSchedulingMode() { - return new RandomExporterSchedulingMode(new Randomizer() { + return new RandomExporterSchedulingMode(new RandomExporterSchedulingMode.Randomizer() { @Override @SuppressWarnings("unchecked") public void shuffle(final List list) { diff --git a/refinedstorage2-platform-api/build.gradle b/refinedstorage2-platform-api/build.gradle index 3037b437d..2abfbe5c9 100644 --- a/refinedstorage2-platform-api/build.gradle +++ b/refinedstorage2-platform-api/build.gradle @@ -1,5 +1,6 @@ plugins { id 'java' + id 'java-library' alias(libs.plugins.mixin) } @@ -17,8 +18,7 @@ minecraft { } dependencies { - compileOnly libs.mixin - implementation libs.apiguardian + api libs.apiguardian implementation project(':refinedstorage2-core-api') implementation project(':refinedstorage2-storage-api') implementation project(':refinedstorage2-resource-api') diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/PlatformApi.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/PlatformApi.java index dd476d122..f416aaba7 100644 --- a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/PlatformApi.java +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/PlatformApi.java @@ -1,7 +1,6 @@ package com.refinedmods.refinedstorage2.platform.api; import com.refinedmods.refinedstorage2.api.core.component.ComponentMapFactory; -import com.refinedmods.refinedstorage2.api.core.registry.OrderedRegistry; import com.refinedmods.refinedstorage2.api.grid.service.GridServiceFactory; import com.refinedmods.refinedstorage2.api.network.Network; import com.refinedmods.refinedstorage2.api.network.component.NetworkComponent; @@ -15,10 +14,12 @@ import com.refinedmods.refinedstorage2.platform.api.grid.GridScrollingStrategy; import com.refinedmods.refinedstorage2.platform.api.grid.GridScrollingStrategyFactory; import com.refinedmods.refinedstorage2.platform.api.grid.GridSynchronizer; +import com.refinedmods.refinedstorage2.platform.api.integration.recipemod.IngredientConverter; import com.refinedmods.refinedstorage2.platform.api.item.StorageContainerHelper; import com.refinedmods.refinedstorage2.platform.api.network.node.exporter.ExporterTransferStrategyFactory; import com.refinedmods.refinedstorage2.platform.api.network.node.externalstorage.PlatformExternalStorageProviderFactory; import com.refinedmods.refinedstorage2.platform.api.network.node.importer.ImporterTransferStrategyFactory; +import com.refinedmods.refinedstorage2.platform.api.registry.PlatformRegistry; import com.refinedmods.refinedstorage2.platform.api.resource.ItemResource; import com.refinedmods.refinedstorage2.platform.api.resource.filter.FilteredResourceFactory; import com.refinedmods.refinedstorage2.platform.api.storage.StorageRepository; @@ -29,7 +30,6 @@ import java.util.Set; import net.minecraft.network.chat.MutableComponent; -import net.minecraft.resources.ResourceLocation; import net.minecraft.world.entity.player.Player; import net.minecraft.world.inventory.AbstractContainerMenu; import net.minecraft.world.level.Level; @@ -39,17 +39,17 @@ public interface PlatformApi { PlatformApi INSTANCE = new PlatformApiProxy(); - OrderedRegistry> getStorageTypeRegistry(); + PlatformRegistry> getStorageTypeRegistry(); StorageRepository getStorageRepository(Level level); StorageContainerHelper getStorageContainerHelper(); - OrderedRegistry> getStorageChannelTypeRegistry(); + PlatformRegistry> getStorageChannelTypeRegistry(); - OrderedRegistry getImporterTransferStrategyRegistry(); + PlatformRegistry getImporterTransferStrategyRegistry(); - OrderedRegistry getExporterTransferStrategyRegistry(); + PlatformRegistry getExporterTransferStrategyRegistry(); void addExternalStorageProviderFactory(StorageChannelType channelType, int priority, @@ -63,7 +63,7 @@ Set getExternalStorageProviderFactor ComponentMapFactory getNetworkComponentMapFactory(); - OrderedRegistry getGridSynchronizerRegistry(); + PlatformRegistry getGridSynchronizerRegistry(); UpgradeRegistry getUpgradeRegistry(); @@ -95,4 +95,8 @@ GridScrollingStrategy createGridScrollingStrategy(AbstractContainerMenu containe void addFilteredResourceFactory(FilteredResourceFactory factory); FilteredResourceFactory getFilteredResourceFactory(); + + void registerIngredientConverter(IngredientConverter converter); + + IngredientConverter getIngredientConverter(); } diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/PlatformApiProxy.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/PlatformApiProxy.java index 57970b06f..5f4e4db37 100644 --- a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/PlatformApiProxy.java +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/PlatformApiProxy.java @@ -1,7 +1,6 @@ package com.refinedmods.refinedstorage2.platform.api; import com.refinedmods.refinedstorage2.api.core.component.ComponentMapFactory; -import com.refinedmods.refinedstorage2.api.core.registry.OrderedRegistry; import com.refinedmods.refinedstorage2.api.grid.service.GridServiceFactory; import com.refinedmods.refinedstorage2.api.network.Network; import com.refinedmods.refinedstorage2.api.network.component.NetworkComponent; @@ -15,10 +14,12 @@ import com.refinedmods.refinedstorage2.platform.api.grid.GridScrollingStrategy; import com.refinedmods.refinedstorage2.platform.api.grid.GridScrollingStrategyFactory; import com.refinedmods.refinedstorage2.platform.api.grid.GridSynchronizer; +import com.refinedmods.refinedstorage2.platform.api.integration.recipemod.IngredientConverter; import com.refinedmods.refinedstorage2.platform.api.item.StorageContainerHelper; import com.refinedmods.refinedstorage2.platform.api.network.node.exporter.ExporterTransferStrategyFactory; import com.refinedmods.refinedstorage2.platform.api.network.node.externalstorage.PlatformExternalStorageProviderFactory; import com.refinedmods.refinedstorage2.platform.api.network.node.importer.ImporterTransferStrategyFactory; +import com.refinedmods.refinedstorage2.platform.api.registry.PlatformRegistry; import com.refinedmods.refinedstorage2.platform.api.resource.ItemResource; import com.refinedmods.refinedstorage2.platform.api.resource.filter.FilteredResourceFactory; import com.refinedmods.refinedstorage2.platform.api.storage.StorageRepository; @@ -30,7 +31,6 @@ import javax.annotation.Nullable; import net.minecraft.network.chat.MutableComponent; -import net.minecraft.resources.ResourceLocation; import net.minecraft.world.entity.player.Player; import net.minecraft.world.inventory.AbstractContainerMenu; import net.minecraft.world.level.Level; @@ -47,7 +47,7 @@ public void setDelegate(final PlatformApi delegate) { } @Override - public OrderedRegistry> getStorageTypeRegistry() { + public PlatformRegistry> getStorageTypeRegistry() { return ensureLoaded().getStorageTypeRegistry(); } @@ -62,17 +62,17 @@ public StorageContainerHelper getStorageContainerHelper() { } @Override - public OrderedRegistry> getStorageChannelTypeRegistry() { + public PlatformRegistry> getStorageChannelTypeRegistry() { return ensureLoaded().getStorageChannelTypeRegistry(); } @Override - public OrderedRegistry getImporterTransferStrategyRegistry() { + public PlatformRegistry getImporterTransferStrategyRegistry() { return ensureLoaded().getImporterTransferStrategyRegistry(); } @Override - public OrderedRegistry getExporterTransferStrategyRegistry() { + public PlatformRegistry getExporterTransferStrategyRegistry() { return ensureLoaded().getExporterTransferStrategyRegistry(); } @@ -101,7 +101,7 @@ public ComponentMapFactory getNetworkComponentMapFact } @Override - public OrderedRegistry getGridSynchronizerRegistry() { + public PlatformRegistry getGridSynchronizerRegistry() { return ensureLoaded().getGridSynchronizerRegistry(); } @@ -180,6 +180,16 @@ public FilteredResourceFactory getFilteredResourceFactory() { return ensureLoaded().getFilteredResourceFactory(); } + @Override + public void registerIngredientConverter(final IngredientConverter converter) { + ensureLoaded().registerIngredientConverter(converter); + } + + @Override + public IngredientConverter getIngredientConverter() { + return ensureLoaded().getIngredientConverter(); + } + private PlatformApi ensureLoaded() { if (delegate == null) { throw new IllegalStateException("Platform API not loaded yet"); diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/blockentity/AbstractNetworkNodeContainerBlockEntity.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/blockentity/AbstractNetworkNodeContainerBlockEntity.java index 782acb2c9..30ecaeb01 100644 --- a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/blockentity/AbstractNetworkNodeContainerBlockEntity.java +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/blockentity/AbstractNetworkNodeContainerBlockEntity.java @@ -66,7 +66,7 @@ public boolean canPerformOutgoingConnection(final Direction direction) { } @Override - public boolean canAcceptIncomingConnection(final Direction direction) { + public boolean canAcceptIncomingConnection(final Direction direction, final BlockState other) { return true; } diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/integration/package-info.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/integration/package-info.java new file mode 100644 index 000000000..0161aed3b --- /dev/null +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/integration/package-info.java @@ -0,0 +1,7 @@ +@ParametersAreNonnullByDefault +@FieldsAndMethodsAreNonnullByDefault +package com.refinedmods.refinedstorage2.platform.api.integration; + +import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/integration/recipemod/IngredientConverter.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/integration/recipemod/IngredientConverter.java new file mode 100644 index 000000000..2ccc2cb46 --- /dev/null +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/integration/recipemod/IngredientConverter.java @@ -0,0 +1,12 @@ +package com.refinedmods.refinedstorage2.platform.api.integration.recipemod; + +import java.util.Optional; + +import org.apiguardian.api.API; + +@API(status = API.Status.STABLE, since = "2.0.0-milestone.2.5") +public interface IngredientConverter { + Optional convertToResource(Object ingredient); + + Optional convertToIngredient(Object resource); +} diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/integration/recipemod/package-info.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/integration/recipemod/package-info.java new file mode 100644 index 000000000..daf4f55f7 --- /dev/null +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/integration/recipemod/package-info.java @@ -0,0 +1,7 @@ +@ParametersAreNonnullByDefault +@FieldsAndMethodsAreNonnullByDefault +package com.refinedmods.refinedstorage2.platform.api.integration.recipemod; + +import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/item/AbstractStorageContainerItem.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/item/AbstractStorageContainerItem.java index c619352f9..2b18688f8 100644 --- a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/item/AbstractStorageContainerItem.java +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/item/AbstractStorageContainerItem.java @@ -7,15 +7,18 @@ import com.refinedmods.refinedstorage2.platform.api.PlatformApi; import com.refinedmods.refinedstorage2.platform.api.storage.StorageRepository; +import java.util.List; import java.util.Optional; import javax.annotation.Nullable; +import net.minecraft.network.chat.Component; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResultHolder; import net.minecraft.world.entity.Entity; 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.apiguardian.api.API; @@ -66,6 +69,23 @@ public void inventoryTick(final ItemStack stack, } } + @Override + public void appendHoverText(final ItemStack stack, + @Nullable final Level level, + final List tooltip, + final TooltipFlag context) { + super.appendHoverText(stack, level, tooltip, context); + if (level == null) { + return; + } + final StorageRepository storageRepository = PlatformApi.INSTANCE.getStorageRepository(level); + helper.appendToTooltip(stack, storageRepository, tooltip, context, this::formatAmount, hasCapacity()); + } + + protected abstract boolean hasCapacity(); + + protected abstract String formatAmount(long amount); + protected abstract Storage createStorage(StorageRepository storageRepository); protected abstract ItemStack createPrimaryDisassemblyByproduct(int count); diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/item/AbstractUpgradeItem.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/item/AbstractUpgradeItem.java index 6eb2f95f2..dfc832e09 100644 --- a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/item/AbstractUpgradeItem.java +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/item/AbstractUpgradeItem.java @@ -41,11 +41,9 @@ public void appendHoverText(final ItemStack stack, "upgrade.supported_by" ).withStyle(ChatFormatting.WHITE)); for (final UpgradeInDestination upgradeInDestination : destinations) { - final MutableComponent name = - upgradeInDestination.destination().getName().copy().withStyle(ChatFormatting.GRAY); - final MutableComponent amount = - Component.literal("(" + upgradeInDestination.maxAmount() + ")").withStyle(ChatFormatting.YELLOW); - lines.add(name.append(" ").append(amount)); + final MutableComponent name = upgradeInDestination.destination().getName().copy(); + final MutableComponent amount = Component.literal("(" + upgradeInDestination.maxAmount() + ")"); + lines.add(name.append(" ").append(amount).withStyle(ChatFormatting.GRAY)); } } } diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/item/StorageContainerHelper.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/item/StorageContainerHelper.java index 95dbcf370..d69b5a77d 100644 --- a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/item/StorageContainerHelper.java +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/item/StorageContainerHelper.java @@ -36,10 +36,8 @@ void appendToTooltip(ItemStack stack, StorageRepository storageRepository, List tooltip, TooltipFlag context, - LongFunction quantityFormatter, - LongFunction stackInfoQuantityFormatter, - boolean showCapacityAndProgress, - boolean showStackingInfo); + LongFunction amountFormatter, + boolean hasCapacity); // TODO: remove - leaky abstraction Optional getId(ItemStack stack); diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/item/StorageContainerItem.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/item/StorageContainerItem.java index 68364f909..eb894e919 100644 --- a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/item/StorageContainerItem.java +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/item/StorageContainerItem.java @@ -14,6 +14,4 @@ public interface StorageContainerItem { Optional> resolve(StorageRepository storageRepository, ItemStack stack); Optional getInfo(StorageRepository storageRepository, ItemStack stack); - - boolean hasStacking(); } diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/item/block/AbstractStorageContainerBlockItem.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/item/block/AbstractStorageContainerBlockItem.java index f1141ef0b..828382572 100644 --- a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/item/block/AbstractStorageContainerBlockItem.java +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/item/block/AbstractStorageContainerBlockItem.java @@ -1,16 +1,21 @@ package com.refinedmods.refinedstorage2.platform.api.item.block; +import com.refinedmods.refinedstorage2.platform.api.PlatformApi; import com.refinedmods.refinedstorage2.platform.api.item.StorageContainerHelper; +import com.refinedmods.refinedstorage2.platform.api.storage.StorageRepository; +import java.util.List; import java.util.UUID; import javax.annotation.Nullable; import net.minecraft.core.BlockPos; +import net.minecraft.network.chat.Component; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResultHolder; import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.BlockItem; import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.TooltipFlag; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.entity.BlockEntity; @@ -60,6 +65,23 @@ private void updateBlockEntityTag(final BlockPos pos, helper.getId(stack).ifPresent(id -> updateBlockEntityWithStorageId(pos, level.getBlockEntity(pos), id)); } + @Override + public void appendHoverText(final ItemStack stack, + @Nullable final Level level, + final List tooltip, + final TooltipFlag context) { + super.appendHoverText(stack, level, tooltip, context); + if (level == null) { + return; + } + final StorageRepository storageRepository = PlatformApi.INSTANCE.getStorageRepository(level); + helper.appendToTooltip(stack, storageRepository, tooltip, context, this::formatAmount, hasCapacity()); + } + + protected abstract boolean hasCapacity(); + + protected abstract String formatAmount(long amount); + protected abstract ItemStack createPrimaryDisassemblyByproduct(int count); @Nullable diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/network/node/PlatformNetworkNodeContainer.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/network/node/PlatformNetworkNodeContainer.java index 05cfe852b..fdeaa6153 100644 --- a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/network/node/PlatformNetworkNodeContainer.java +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/network/node/PlatformNetworkNodeContainer.java @@ -4,6 +4,7 @@ import net.minecraft.core.Direction; import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.state.BlockState; import org.apiguardian.api.API; @API(status = API.Status.STABLE, since = "2.0.0-milestone.2.1") @@ -26,7 +27,8 @@ public interface PlatformNetworkNodeContainer extends NetworkNodeContainer { * com.refinedmods.refinedstorage2.platform.api.PlatformApi#requestNetworkNodeUpdate(NetworkNodeContainer, Level)}. * * @param direction the incoming direction + * @param other the state wanting to connect * @return whether the node can accept an incoming connection */ - boolean canAcceptIncomingConnection(Direction direction); + boolean canAcceptIncomingConnection(Direction direction, BlockState other); } diff --git a/refinedstorage2-core-api/src/main/java/com/refinedmods/refinedstorage2/api/core/registry/OrderedRegistry.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/registry/PlatformRegistry.java similarity index 74% rename from refinedstorage2-core-api/src/main/java/com/refinedmods/refinedstorage2/api/core/registry/OrderedRegistry.java rename to refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/registry/PlatformRegistry.java index 964dc1428..54f3e6745 100644 --- a/refinedstorage2-core-api/src/main/java/com/refinedmods/refinedstorage2/api/core/registry/OrderedRegistry.java +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/registry/PlatformRegistry.java @@ -1,19 +1,17 @@ -package com.refinedmods.refinedstorage2.api.core.registry; +package com.refinedmods.refinedstorage2.platform.api.registry; import java.util.List; import java.util.Optional; import javax.annotation.Nullable; +import net.minecraft.resources.ResourceLocation; import org.apiguardian.api.API; /** - * Represents a registry that keeps track of the order of registered values. - * - * @param the identifier type * @param the value type */ @API(status = API.Status.STABLE, since = "2.0.0-milestone.2.0") -public interface OrderedRegistry { +public interface PlatformRegistry { /** * Registers a value in the registry, identified by the id. * Duplicate IDs or values are not allowed. @@ -21,7 +19,7 @@ public interface OrderedRegistry { * @param id the id * @param value the value */ - void register(I id, T value); + void register(ResourceLocation id, T value); /** * @return whether if there is any other value, ignoring any default value @@ -32,21 +30,13 @@ public interface OrderedRegistry { * @param value the value * @return the id of the value, if present */ - Optional getId(T value); + Optional getId(T value); /** * @param id the id * @return the value, if present */ - Optional get(I id); - - /** - * @param id the id - * @return the value, if present, otherwise the default - */ - default T getOrElseDefault(I id) { - return get(id).orElseGet(this::getDefault); - } + Optional get(ResourceLocation id); /** * @return the default value diff --git a/refinedstorage2-core-api/src/main/java/com/refinedmods/refinedstorage2/api/core/registry/package-info.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/registry/package-info.java similarity index 76% rename from refinedstorage2-core-api/src/main/java/com/refinedmods/refinedstorage2/api/core/registry/package-info.java rename to refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/registry/package-info.java index 2b9581dbb..1a3cac5c8 100644 --- a/refinedstorage2-core-api/src/main/java/com/refinedmods/refinedstorage2/api/core/registry/package-info.java +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/registry/package-info.java @@ -1,6 +1,6 @@ @ParametersAreNonnullByDefault @FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.api.core.registry; +package com.refinedmods.refinedstorage2.platform.api.registry; import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/resource/FluidResource.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/resource/FluidResource.java index 739e73add..41555465c 100644 --- a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/resource/FluidResource.java +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/resource/FluidResource.java @@ -29,7 +29,7 @@ public FluidResource normalize() { return new FluidResource(fluid, null); } - @SuppressWarnings("deprecation") // forge deprecates Registry access + @SuppressWarnings({"deprecation", "RedundantSuppression"}) // forge deprecates Registry access public static CompoundTag toTag(final FluidResource fluidResource) { final CompoundTag tag = new CompoundTag(); if (fluidResource.tag() != null) { @@ -45,7 +45,7 @@ public static CompoundTag toTagWithAmount(final ResourceAmount re return tag; } - @SuppressWarnings("deprecation") // forge deprecates Registry access + @SuppressWarnings({"deprecation", "RedundantSuppression"}) // forge deprecates Registry access public static Optional fromTag(final CompoundTag tag) { final ResourceLocation id = new ResourceLocation(tag.getString(TAG_ID)); final Fluid fluid = BuiltInRegistries.FLUID.get(id); diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/resource/ItemResource.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/resource/ItemResource.java index 1f59eda40..b90391aab 100644 --- a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/resource/ItemResource.java +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/resource/ItemResource.java @@ -54,7 +54,7 @@ public static ItemResource ofItemStack(final ItemStack itemStack) { return new ItemResource(itemStack.getItem(), itemStack.getTag()); } - @SuppressWarnings("deprecation") // forge deprecates Registry access + @SuppressWarnings({"deprecation", "RedundantSuppression"}) // forge deprecates Registry access public static CompoundTag toTag(final ItemResource itemResource) { final CompoundTag tag = new CompoundTag(); if (itemResource.tag() != null) { @@ -70,7 +70,7 @@ public static CompoundTag toTagWithAmount(final ResourceAmount res return tag; } - @SuppressWarnings("deprecation") // forge deprecates Registry access + @SuppressWarnings({"deprecation", "RedundantSuppression"}) // forge deprecates Registry access public static Optional fromTag(final CompoundTag tag) { final ResourceLocation id = new ResourceLocation(tag.getString(TAG_ID)); final Item item = BuiltInRegistries.ITEM.get(id); diff --git a/refinedstorage2-core-api/src/main/java/com/refinedmods/refinedstorage2/api/core/QuantityFormatter.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/util/AmountFormatting.java similarity index 92% rename from refinedstorage2-core-api/src/main/java/com/refinedmods/refinedstorage2/api/core/QuantityFormatter.java rename to refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/util/AmountFormatting.java index b9df32449..9d88e3f8f 100644 --- a/refinedstorage2-core-api/src/main/java/com/refinedmods/refinedstorage2/api/core/QuantityFormatter.java +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/util/AmountFormatting.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.api.core; +package com.refinedmods.refinedstorage2.platform.api.util; import java.math.RoundingMode; import java.text.DecimalFormat; @@ -8,7 +8,7 @@ import org.apiguardian.api.API; @API(status = API.Status.STABLE, since = "2.0.0-milestone.1.0") -public final class QuantityFormatter { +public final class AmountFormatting { private static final DecimalFormat FORMATTER_WITH_UNITS = new DecimalFormat( "####0.#", DecimalFormatSymbols.getInstance(Locale.US) @@ -22,7 +22,7 @@ public final class QuantityFormatter { FORMATTER_WITH_UNITS.setRoundingMode(RoundingMode.FLOOR); } - private QuantityFormatter() { + private AmountFormatting() { } public static String formatWithUnits(final long qty) { diff --git a/refinedstorage2-core-api/src/main/java/com/refinedmods/refinedstorage2/api/core/util/package-info.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/util/package-info.java similarity index 78% rename from refinedstorage2-core-api/src/main/java/com/refinedmods/refinedstorage2/api/core/util/package-info.java rename to refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/util/package-info.java index 5cae35570..accc64647 100644 --- a/refinedstorage2-core-api/src/main/java/com/refinedmods/refinedstorage2/api/core/util/package-info.java +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/util/package-info.java @@ -1,6 +1,6 @@ @ParametersAreNonnullByDefault @FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.api.core.util; +package com.refinedmods.refinedstorage2.platform.api.util; import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; diff --git a/refinedstorage2-platform-api/src/test/java/com/refinedmods/refinedstorage2/platform/api/util/AmountFormattingTest.java b/refinedstorage2-platform-api/src/test/java/com/refinedmods/refinedstorage2/platform/api/util/AmountFormattingTest.java new file mode 100644 index 000000000..cb66bccf1 --- /dev/null +++ b/refinedstorage2-platform-api/src/test/java/com/refinedmods/refinedstorage2/platform/api/util/AmountFormattingTest.java @@ -0,0 +1,77 @@ +package com.refinedmods.refinedstorage2.platform.api.util; + +import org.junit.jupiter.api.Test; + +import static org.assertj.core.api.Assertions.assertThat; + +class AmountFormattingTest { + @Test + void shouldFormatWithUnitsForSmallNumber() { + // Act & assert + assertThat(AmountFormatting.formatWithUnits(0)).isEqualTo("0"); + assertThat(AmountFormatting.formatWithUnits(1)).isEqualTo("1"); + assertThat(AmountFormatting.formatWithUnits(10)).isEqualTo("10"); + assertThat(AmountFormatting.formatWithUnits(105)).isEqualTo("105"); + } + + @Test + void shouldFormatWithUnitsForThousands() { + // Act & assert + assertThat(AmountFormatting.formatWithUnits(1000)).isEqualTo("1K"); + assertThat(AmountFormatting.formatWithUnits(1510)).isEqualTo("1.5K"); + + assertThat(AmountFormatting.formatWithUnits(10_000)).isEqualTo("10K"); + assertThat(AmountFormatting.formatWithUnits(10_510)).isEqualTo("10.5K"); + assertThat(AmountFormatting.formatWithUnits(99_999)).isEqualTo("99.9K"); + + assertThat(AmountFormatting.formatWithUnits(100_000)).isEqualTo("100K"); + assertThat(AmountFormatting.formatWithUnits(100_500)).isEqualTo("100K"); + assertThat(AmountFormatting.formatWithUnits(100_999)).isEqualTo("100K"); + + assertThat(AmountFormatting.formatWithUnits(101_000)).isEqualTo("101K"); + assertThat(AmountFormatting.formatWithUnits(101_500)).isEqualTo("101K"); + assertThat(AmountFormatting.formatWithUnits(101_999)).isEqualTo("101K"); + } + + @Test + void shouldFormatWithUnitsForMillions() { + // Act & assert + assertThat(AmountFormatting.formatWithUnits(1_000_000)).isEqualTo("1M"); + assertThat(AmountFormatting.formatWithUnits(1_510_000)).isEqualTo("1.5M"); + + assertThat(AmountFormatting.formatWithUnits(10_000_000)).isEqualTo("10M"); + assertThat(AmountFormatting.formatWithUnits(10_510_000)).isEqualTo("10.5M"); + assertThat(AmountFormatting.formatWithUnits(99_999_999)).isEqualTo("99.9M"); + + assertThat(AmountFormatting.formatWithUnits(100_000_000)).isEqualTo("100M"); + assertThat(AmountFormatting.formatWithUnits(100_510_000)).isEqualTo("100M"); + assertThat(AmountFormatting.formatWithUnits(100_999_000)).isEqualTo("100M"); + + assertThat(AmountFormatting.formatWithUnits(101_000_000)).isEqualTo("101M"); + assertThat(AmountFormatting.formatWithUnits(101_510_000)).isEqualTo("101M"); + assertThat(AmountFormatting.formatWithUnits(101_999_000)).isEqualTo("101M"); + } + + @Test + void shouldFormatWithUnitsForBillions() { + // Act & assert + assertThat(AmountFormatting.formatWithUnits(1_000_000_000)).isEqualTo("1B"); + assertThat(AmountFormatting.formatWithUnits(1_010_000_000)).isEqualTo("1B"); + assertThat(AmountFormatting.formatWithUnits(1_100_000_000)).isEqualTo("1.1B"); + assertThat(AmountFormatting.formatWithUnits(1_100_001_000)).isEqualTo("1.1B"); + assertThat(AmountFormatting.formatWithUnits(1_920_001_000)).isEqualTo("1.9B"); + } + + @Test + void shouldFormatWithoutUnits() { + // Act & assert + assertThat(AmountFormatting.format(0)).isEqualTo("0"); + assertThat(AmountFormatting.format(1)).isEqualTo("1"); + assertThat(AmountFormatting.format(10)).isEqualTo("10"); + assertThat(AmountFormatting.format(105)).isEqualTo("105"); + assertThat(AmountFormatting.format(1050)).isEqualTo("1,050"); + assertThat(AmountFormatting.format(10500)).isEqualTo("10,500"); + assertThat(AmountFormatting.format(100500)).isEqualTo("100,500"); + assertThat(AmountFormatting.format(1000500)).isEqualTo("1,000,500"); + } +} diff --git a/refinedstorage2-platform-common/build.gradle b/refinedstorage2-platform-common/build.gradle index 23d17ba41..7b4d9bd72 100644 --- a/refinedstorage2-platform-common/build.gradle +++ b/refinedstorage2-platform-common/build.gradle @@ -5,6 +5,13 @@ plugins { archivesBaseName = 'refinedstorage2-platform-common' +repositories { + maven { + name = 'JEI' + url = "https://maven.blamejared.com/" + } +} + minecraft { version(libs.versions.minecraft.get()) } @@ -15,7 +22,7 @@ sourceSets { dependencies { compileOnly libs.mixin - implementation libs.apiguardian // mandatory as we import it from platform-api + implementation libs.jei.common.api implementation project(':refinedstorage2-platform-api') implementation project(':refinedstorage2-core-api') implementation project(':refinedstorage2-resource-api') diff --git a/refinedstorage2-platform-common/datagen/README.md b/refinedstorage2-platform-common/datagen/README.md deleted file mode 100644 index 6d564b0e4..000000000 --- a/refinedstorage2-platform-common/datagen/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# Data generation - -## How to run - -To run, use: `python3 generate.py`. \ No newline at end of file diff --git a/refinedstorage2-platform-common/datagen/colors.txt b/refinedstorage2-platform-common/datagen/colors.txt deleted file mode 100644 index e273a12ee..000000000 --- a/refinedstorage2-platform-common/datagen/colors.txt +++ /dev/null @@ -1,16 +0,0 @@ -white;white_dye -orange;orange_dye -magenta;magenta_dye -light_blue;light_blue_dye -yellow;yellow_dye -lime;lime_dye -pink;pink_dye -gray;gray_dye -light_gray;light_gray_dye -cyan;cyan_dye -purple;purple_dye -blue;blue_dye -brown;brown_dye -green;green_dye -red;red_dye -black;black_dye diff --git a/refinedstorage2-platform-common/datagen/generate.py b/refinedstorage2-platform-common/datagen/generate.py deleted file mode 100644 index 77b04208d..000000000 --- a/refinedstorage2-platform-common/datagen/generate.py +++ /dev/null @@ -1,303 +0,0 @@ -import os -import json -import shutil - -output_dir = '../src/generated/resources/' - -shutil.rmtree(output_dir) - - -def create_file(path, contents): - print('Generating ' + path) - try: - os.makedirs(os.path.dirname(path)) - except: - pass - with open(path, 'w') as file: - file.write(contents) - - -def to_json(data): - return json.dumps(data, indent=2) - - -def get_color_key(color, name): - if color == 'light_blue': - return name - return color + '_' + name - - -def generate_controller_block_model(color): - create_file(output_dir + '/assets/refinedstorage2/models/block/controller/' + color + '.json', to_json({ - 'parent': 'refinedstorage2:block/emissive_all_cutout', - 'textures': { - 'particle': 'refinedstorage2:block/controller/off', - 'all': 'refinedstorage2:block/controller/on', - 'cutout': 'refinedstorage2:block/controller/cutouts/' + color - } - })) - - -def generate_controller_blockstate(name, color): - create_file(output_dir + '/assets/refinedstorage2/blockstates/' + name + '.json', to_json({ - 'variants': { - 'energy_type=off': { - 'model': 'refinedstorage2:block/controller/off' - }, - 'energy_type=nearly_off': { - 'model': 'refinedstorage2:block/controller/nearly_off' - }, - 'energy_type=nearly_on': { - 'model': 'refinedstorage2:block/controller/nearly_on' - }, - 'energy_type=on': { - 'model': 'refinedstorage2:block/controller/' + color - } - } - })) - - -def generate_controller_item(name, color): - create_file(output_dir + '/assets/refinedstorage2/models/item/' + name + '.json', to_json({ - 'parent': 'item/generated', - 'overrides': [ - { - 'predicate': { - 'refinedstorage2:stored_in_controller': 0, - }, - 'model': 'refinedstorage2:block/controller/off' - }, - { - 'predicate': { - 'refinedstorage2:stored_in_controller': 0.01, - }, - 'model': 'refinedstorage2:block/controller/nearly_off' - }, - { - 'predicate': { - 'refinedstorage2:stored_in_controller': 0.3, - }, - 'model': 'refinedstorage2:block/controller/nearly_on' - }, - { - 'predicate': { - 'refinedstorage2:stored_in_controller': 0.4, - }, - 'model': 'refinedstorage2:block/controller/' + color - } - ] - })) - - -def generate_creative_controller_item(name, color): - create_file(output_dir + '/assets/refinedstorage2/models/item/' + name + '.json', to_json({ - 'parent': 'refinedstorage2:block/controller/' + color - })) - - -def generate_north_cutout_block_model(name, particle, north, east, south, west, up, down, cutout, emissive_cutout): - parent = 'refinedstorage2:block/emissive_north_cutout' if emissive_cutout else 'refinedstorage2:block/north_cutout' - - create_file(output_dir + '/assets/refinedstorage2/models/block/' + name + '.json', to_json({ - 'parent': parent, - 'textures': { - 'particle': particle, - 'north': north, - 'east': east, - 'south': south, - 'west': west, - 'up': up, - 'down': down, - 'cutout': cutout - } - })) - - -def generate_referencing_item_model(name, reference): - create_file(output_dir + '/assets/refinedstorage2/models/item/' + name + '.json', to_json({ - 'parent': reference - })) - - -bi_direction_rotations = { - 'up_north': { - 'x': -90, - 'y': 180 - }, - 'up_east': { - 'x': -90, - 'y': -90 - }, - 'up_south': { - 'x': -90, - 'y': 0 - }, - 'up_west': { - 'x': -90, - 'y': 90 - }, - 'down_north': { - 'x': 90 - }, - 'down_east': { - 'x': 90, - 'y': 90 - }, - 'down_south': { - 'x': 90, - 'y': 180 - }, - 'down_west': { - 'x': 90, - 'y': -90 - }, - 'north': {}, - 'east': { - 'y': 90 - }, - 'south': { - 'y': 180 - }, - 'west': { - 'y': 270 - } -} - - -def generate_blockstate_for_each_bi_direction_and_active(name, model_factory): - result = { - 'variants': {} - } - - for direction in bi_direction_rotations.keys(): - for active in [True, False]: - result['variants']['direction=' + direction + ',active=' + str(active).lower()] = { - 'model': model_factory(direction, active), - 'x': bi_direction_rotations[direction].get('x', 0), - 'y': bi_direction_rotations[direction].get('y', 0) - } - - create_file(output_dir + '/assets/refinedstorage2/blockstates/' + - name + '.json', to_json(result)) - - -def generate_recipe(name, data): - create_file(output_dir + '/data/refinedstorage2/recipes/' + - name + '.json', to_json(data)) - - -def generate_item_tag(name, data): - create_file(output_dir + '/data/refinedstorage2/tags/items/' + - name + '.json', to_json(data)) - - -def generate_simple_loot_table(name, block, functions=[]): - create_file(output_dir + '/data/refinedstorage2/loot_tables/blocks/' + name + '.json', to_json({ - 'type': 'minecraft:block', - 'pools': [ - { - 'rolls': 1, - 'entries': [ - { - 'type': 'minecraft:item', - 'functions': functions, - 'name': block - } - ], - 'conditions': [ - { - 'condition': 'minecraft:survives_explosion' - } - ] - } - ] - })) - - -with open('colors.txt') as colors_file: - color_entries = colors_file.read().splitlines() - color_names = list(map(lambda color: color.split(';')[0], color_entries)) - - for color_entry in color_entries: - color = color_entry.split(';')[0] - dye = color_entry.split(';')[1] - - generate_controller_block_model(color) - generate_controller_blockstate(get_color_key(color, 'controller'), color) - generate_controller_blockstate(get_color_key(color, 'creative_controller'), color) - generate_controller_item(get_color_key(color, 'controller'), color) - generate_creative_controller_item(get_color_key(color, 'creative_controller'), color) - - generate_north_cutout_block_model('grid/' + color, particle='refinedstorage2:block/grid/right', east='refinedstorage2:block/grid/right', south='refinedstorage2:block/grid/back', west='refinedstorage2:block/grid/left', - up='refinedstorage2:block/grid/top', down='refinedstorage2:block/bottom', north='refinedstorage2:block/grid/front', cutout='refinedstorage2:block/grid/cutouts/' + color, emissive_cutout=True) - generate_referencing_item_model( - get_color_key(color, 'grid'), 'refinedstorage2:block/grid/' + color) - generate_blockstate_for_each_bi_direction_and_active(get_color_key( - color, 'grid'), lambda direction, active: 'refinedstorage2:block/grid/' + color if active else 'refinedstorage2:block/grid/inactive') - - generate_simple_loot_table(get_color_key(color, 'grid'), 'refinedstorage2:' + get_color_key(color, 'grid')) - generate_simple_loot_table(get_color_key(color, 'controller'), 'refinedstorage2:' + get_color_key(color, 'controller')) - generate_simple_loot_table(get_color_key(color, 'creative_controller'), 'refinedstorage2:' + get_color_key(color, 'creative_controller')) - - generate_recipe('coloring/' + get_color_key(color, 'grid'), { - 'type': 'minecraft:crafting_shapeless', - 'ingredients': [ - { - 'tag': 'refinedstorage2:grids' - }, - { - 'item': 'minecraft:' + dye - } - ], - 'result': { - 'item': 'refinedstorage2:' + get_color_key(color, 'grid') - } - }) - - generate_recipe('coloring/' + get_color_key(color, 'controller'), { - 'type': 'minecraft:crafting_shapeless', - 'ingredients': [ - { - 'tag': 'refinedstorage2:controllers' - }, - { - 'item': 'minecraft:' + dye - } - ], - 'result': { - 'item': 'refinedstorage2:' + get_color_key(color, 'controller') - } - }) - - generate_item_tag('grids', { - 'replace': False, - 'values': list(map(lambda color: 'refinedstorage2:' + get_color_key(color, 'grid'), color_names)) - }) - - generate_item_tag('storage_disks', { - 'replace': False, - 'values': [ - 'refinedstorage2:1k_storage_disk', - 'refinedstorage2:4k_storage_disk', - 'refinedstorage2:16k_storage_disk', - 'refinedstorage2:64k_storage_disk' - ] - }) - - generate_item_tag('fluid_storage_disks', { - 'replace': False, - 'values': [ - 'refinedstorage2:64b_fluid_storage_disk', - 'refinedstorage2:256b_fluid_storage_disk', - 'refinedstorage2:1024b_fluid_storage_disk', - 'refinedstorage2:4096b_fluid_storage_disk' - ] - }) - - generate_item_tag('controllers', { - 'replace': False, - 'values': list(map(lambda color: 'refinedstorage2:' + get_color_key(color, 'controller'), color_names)) - }) - - generate_north_cutout_block_model('grid/inactive', particle='refinedstorage2:block/grid/right', east='refinedstorage2:block/grid/right', south='refinedstorage2:block/grid/back', west='refinedstorage2:block/grid/left', - up='refinedstorage2:block/grid/top', down='refinedstorage2:block/bottom', north='refinedstorage2:block/grid/front', cutout='refinedstorage2:block/grid/cutouts/inactive', emissive_cutout=False) diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/black_cable.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/black_cable.json new file mode 100644 index 000000000..728530d96 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/black_cable.json @@ -0,0 +1,62 @@ +{ + "multipart": [ + { + "apply": { + "model": "refinedstorage2:block/cable/core/black" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/black", + "x": 90 + }, + "when": { + "down": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/black", + "x": 270 + }, + "when": { + "up": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/black" + }, + "when": { + "north": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/black", + "x": 180 + }, + "when": { + "south": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/black", + "y": 270 + }, + "when": { + "west": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/black", + "y": 90 + }, + "when": { + "east": "true" + } + } + ] +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/black_controller.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/black_controller.json index a3d258488..8bed66975 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/black_controller.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/black_controller.json @@ -1,14 +1,14 @@ { "variants": { - "energy_type=off": { - "model": "refinedstorage2:block/controller/off" - }, "energy_type=nearly_off": { "model": "refinedstorage2:block/controller/nearly_off" }, "energy_type=nearly_on": { "model": "refinedstorage2:block/controller/nearly_on" }, + "energy_type=off": { + "model": "refinedstorage2:block/controller/off" + }, "energy_type=on": { "model": "refinedstorage2:block/controller/black" } diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/black_crafting_grid.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/black_crafting_grid.json new file mode 100644 index 000000000..5e0be93f4 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/black_crafting_grid.json @@ -0,0 +1,110 @@ +{ + "variants": { + "active=false,direction=down_east": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": 90, + "y": -90 + }, + "active=false,direction=down_north": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": 90 + }, + "active=false,direction=down_south": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": 90, + "y": 180 + }, + "active=false,direction=down_west": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": 90, + "y": 90 + }, + "active=false,direction=east": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "y": 90 + }, + "active=false,direction=north": { + "model": "refinedstorage2:block/crafting_grid/inactive" + }, + "active=false,direction=south": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "y": 180 + }, + "active=false,direction=up_east": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": -90, + "y": -90 + }, + "active=false,direction=up_north": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": -90, + "y": 180 + }, + "active=false,direction=up_south": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": -90 + }, + "active=false,direction=up_west": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": -90, + "y": 90 + }, + "active=false,direction=west": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "y": 270 + }, + "active=true,direction=down_east": { + "model": "refinedstorage2:block/crafting_grid/black", + "x": 90, + "y": -90 + }, + "active=true,direction=down_north": { + "model": "refinedstorage2:block/crafting_grid/black", + "x": 90 + }, + "active=true,direction=down_south": { + "model": "refinedstorage2:block/crafting_grid/black", + "x": 90, + "y": 180 + }, + "active=true,direction=down_west": { + "model": "refinedstorage2:block/crafting_grid/black", + "x": 90, + "y": 90 + }, + "active=true,direction=east": { + "model": "refinedstorage2:block/crafting_grid/black", + "y": 90 + }, + "active=true,direction=north": { + "model": "refinedstorage2:block/crafting_grid/black" + }, + "active=true,direction=south": { + "model": "refinedstorage2:block/crafting_grid/black", + "y": 180 + }, + "active=true,direction=up_east": { + "model": "refinedstorage2:block/crafting_grid/black", + "x": -90, + "y": -90 + }, + "active=true,direction=up_north": { + "model": "refinedstorage2:block/crafting_grid/black", + "x": -90, + "y": 180 + }, + "active=true,direction=up_south": { + "model": "refinedstorage2:block/crafting_grid/black", + "x": -90 + }, + "active=true,direction=up_west": { + "model": "refinedstorage2:block/crafting_grid/black", + "x": -90, + "y": 90 + }, + "active=true,direction=west": { + "model": "refinedstorage2:block/crafting_grid/black", + "y": 270 + } + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/black_creative_controller.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/black_creative_controller.json index a3d258488..8bed66975 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/black_creative_controller.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/black_creative_controller.json @@ -1,14 +1,14 @@ { "variants": { - "energy_type=off": { - "model": "refinedstorage2:block/controller/off" - }, "energy_type=nearly_off": { "model": "refinedstorage2:block/controller/nearly_off" }, "energy_type=nearly_on": { "model": "refinedstorage2:block/controller/nearly_on" }, + "energy_type=off": { + "model": "refinedstorage2:block/controller/off" + }, "energy_type=on": { "model": "refinedstorage2:block/controller/black" } diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/black_exporter.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/black_exporter.json new file mode 100644 index 000000000..7eee04f15 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/black_exporter.json @@ -0,0 +1,115 @@ +{ + "multipart": [ + { + "apply": { + "model": "refinedstorage2:block/cable/core/black" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/black", + "x": 90 + }, + "when": { + "down": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/black", + "x": 270 + }, + "when": { + "up": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/black" + }, + "when": { + "north": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/black", + "x": 180 + }, + "when": { + "south": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/black", + "y": 270 + }, + "when": { + "west": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/black", + "y": 90 + }, + "when": { + "east": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/exporter", + "x": 90 + }, + "when": { + "direction": "down" + } + }, + { + "apply": { + "model": "refinedstorage2:block/exporter", + "x": 270 + }, + "when": { + "direction": "up" + } + }, + { + "apply": { + "model": "refinedstorage2:block/exporter" + }, + "when": { + "direction": "north" + } + }, + { + "apply": { + "model": "refinedstorage2:block/exporter", + "x": 180 + }, + "when": { + "direction": "south" + } + }, + { + "apply": { + "model": "refinedstorage2:block/exporter", + "y": 270 + }, + "when": { + "direction": "west" + } + }, + { + "apply": { + "model": "refinedstorage2:block/exporter", + "y": 90 + }, + "when": { + "direction": "east" + } + } + ] +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/black_external_storage.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/black_external_storage.json new file mode 100644 index 000000000..61dcef10c --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/black_external_storage.json @@ -0,0 +1,115 @@ +{ + "multipart": [ + { + "apply": { + "model": "refinedstorage2:block/cable/core/black" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/black", + "x": 90 + }, + "when": { + "down": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/black", + "x": 270 + }, + "when": { + "up": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/black" + }, + "when": { + "north": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/black", + "x": 180 + }, + "when": { + "south": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/black", + "y": 270 + }, + "when": { + "west": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/black", + "y": 90 + }, + "when": { + "east": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/external_storage", + "x": 90 + }, + "when": { + "direction": "down" + } + }, + { + "apply": { + "model": "refinedstorage2:block/external_storage", + "x": 270 + }, + "when": { + "direction": "up" + } + }, + { + "apply": { + "model": "refinedstorage2:block/external_storage" + }, + "when": { + "direction": "north" + } + }, + { + "apply": { + "model": "refinedstorage2:block/external_storage", + "x": 180 + }, + "when": { + "direction": "south" + } + }, + { + "apply": { + "model": "refinedstorage2:block/external_storage", + "y": 270 + }, + "when": { + "direction": "west" + } + }, + { + "apply": { + "model": "refinedstorage2:block/external_storage", + "y": 90 + }, + "when": { + "direction": "east" + } + } + ] +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/black_grid.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/black_grid.json index 4a573bd00..1defb1e60 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/black_grid.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/black_grid.json @@ -1,123 +1,109 @@ { "variants": { - "direction=up_north,active=true": { - "model": "refinedstorage2:block/grid/black", - "x": -90, - "y": 180 + "active=false,direction=down_east": { + "model": "refinedstorage2:block/grid/inactive", + "x": 90, + "y": -90 }, - "direction=up_north,active=false": { + "active=false,direction=down_north": { "model": "refinedstorage2:block/grid/inactive", - "x": -90, + "x": 90 + }, + "active=false,direction=down_south": { + "model": "refinedstorage2:block/grid/inactive", + "x": 90, "y": 180 }, - "direction=up_east,active=true": { - "model": "refinedstorage2:block/grid/black", - "x": -90, - "y": -90 + "active=false,direction=down_west": { + "model": "refinedstorage2:block/grid/inactive", + "x": 90, + "y": 90 }, - "direction=up_east,active=false": { + "active=false,direction=east": { "model": "refinedstorage2:block/grid/inactive", - "x": -90, - "y": -90 + "y": 90 }, - "direction=up_south,active=true": { - "model": "refinedstorage2:block/grid/black", - "x": -90, - "y": 0 + "active=false,direction=north": { + "model": "refinedstorage2:block/grid/inactive" }, - "direction=up_south,active=false": { + "active=false,direction=south": { "model": "refinedstorage2:block/grid/inactive", - "x": -90, - "y": 0 + "y": 180 }, - "direction=up_west,active=true": { - "model": "refinedstorage2:block/grid/black", + "active=false,direction=up_east": { + "model": "refinedstorage2:block/grid/inactive", "x": -90, - "y": 90 + "y": -90 }, - "direction=up_west,active=false": { + "active=false,direction=up_north": { "model": "refinedstorage2:block/grid/inactive", "x": -90, - "y": 90 - }, - "direction=down_north,active=true": { - "model": "refinedstorage2:block/grid/black", - "x": 90, - "y": 0 + "y": 180 }, - "direction=down_north,active=false": { + "active=false,direction=up_south": { "model": "refinedstorage2:block/grid/inactive", - "x": 90, - "y": 0 + "x": -90 }, - "direction=down_east,active=true": { - "model": "refinedstorage2:block/grid/black", - "x": 90, + "active=false,direction=up_west": { + "model": "refinedstorage2:block/grid/inactive", + "x": -90, "y": 90 }, - "direction=down_east,active=false": { + "active=false,direction=west": { "model": "refinedstorage2:block/grid/inactive", - "x": 90, - "y": 90 + "y": 270 }, - "direction=down_south,active=true": { + "active=true,direction=down_east": { "model": "refinedstorage2:block/grid/black", "x": 90, - "y": 180 + "y": -90 }, - "direction=down_south,active=false": { - "model": "refinedstorage2:block/grid/inactive", - "x": 90, - "y": 180 + "active=true,direction=down_north": { + "model": "refinedstorage2:block/grid/black", + "x": 90 }, - "direction=down_west,active=true": { + "active=true,direction=down_south": { "model": "refinedstorage2:block/grid/black", "x": 90, - "y": -90 + "y": 180 }, - "direction=down_west,active=false": { - "model": "refinedstorage2:block/grid/inactive", + "active=true,direction=down_west": { + "model": "refinedstorage2:block/grid/black", "x": 90, - "y": -90 + "y": 90 }, - "direction=north,active=true": { + "active=true,direction=east": { "model": "refinedstorage2:block/grid/black", - "x": 0, - "y": 0 + "y": 90 }, - "direction=north,active=false": { - "model": "refinedstorage2:block/grid/inactive", - "x": 0, - "y": 0 + "active=true,direction=north": { + "model": "refinedstorage2:block/grid/black" }, - "direction=east,active=true": { + "active=true,direction=south": { "model": "refinedstorage2:block/grid/black", - "x": 0, - "y": 90 + "y": 180 }, - "direction=east,active=false": { - "model": "refinedstorage2:block/grid/inactive", - "x": 0, - "y": 90 + "active=true,direction=up_east": { + "model": "refinedstorage2:block/grid/black", + "x": -90, + "y": -90 }, - "direction=south,active=true": { + "active=true,direction=up_north": { "model": "refinedstorage2:block/grid/black", - "x": 0, + "x": -90, "y": 180 }, - "direction=south,active=false": { - "model": "refinedstorage2:block/grid/inactive", - "x": 0, - "y": 180 + "active=true,direction=up_south": { + "model": "refinedstorage2:block/grid/black", + "x": -90 }, - "direction=west,active=true": { + "active=true,direction=up_west": { "model": "refinedstorage2:block/grid/black", - "x": 0, - "y": 270 + "x": -90, + "y": 90 }, - "direction=west,active=false": { - "model": "refinedstorage2:block/grid/inactive", - "x": 0, + "active=true,direction=west": { + "model": "refinedstorage2:block/grid/black", "y": 270 } } diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/black_importer.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/black_importer.json new file mode 100644 index 000000000..b25420d28 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/black_importer.json @@ -0,0 +1,115 @@ +{ + "multipart": [ + { + "apply": { + "model": "refinedstorage2:block/cable/core/black" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/black", + "x": 90 + }, + "when": { + "down": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/black", + "x": 270 + }, + "when": { + "up": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/black" + }, + "when": { + "north": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/black", + "x": 180 + }, + "when": { + "south": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/black", + "y": 270 + }, + "when": { + "west": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/black", + "y": 90 + }, + "when": { + "east": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/importer", + "x": 90 + }, + "when": { + "direction": "down" + } + }, + { + "apply": { + "model": "refinedstorage2:block/importer", + "x": 270 + }, + "when": { + "direction": "up" + } + }, + { + "apply": { + "model": "refinedstorage2:block/importer" + }, + "when": { + "direction": "north" + } + }, + { + "apply": { + "model": "refinedstorage2:block/importer", + "x": 180 + }, + "when": { + "direction": "south" + } + }, + { + "apply": { + "model": "refinedstorage2:block/importer", + "y": 270 + }, + "when": { + "direction": "west" + } + }, + { + "apply": { + "model": "refinedstorage2:block/importer", + "y": 90 + }, + "when": { + "direction": "east" + } + } + ] +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/blue_cable.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/blue_cable.json new file mode 100644 index 000000000..626d83128 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/blue_cable.json @@ -0,0 +1,62 @@ +{ + "multipart": [ + { + "apply": { + "model": "refinedstorage2:block/cable/core/blue" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/blue", + "x": 90 + }, + "when": { + "down": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/blue", + "x": 270 + }, + "when": { + "up": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/blue" + }, + "when": { + "north": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/blue", + "x": 180 + }, + "when": { + "south": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/blue", + "y": 270 + }, + "when": { + "west": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/blue", + "y": 90 + }, + "when": { + "east": "true" + } + } + ] +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/blue_controller.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/blue_controller.json index 04631c4ef..d3a597ddf 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/blue_controller.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/blue_controller.json @@ -1,14 +1,14 @@ { "variants": { - "energy_type=off": { - "model": "refinedstorage2:block/controller/off" - }, "energy_type=nearly_off": { "model": "refinedstorage2:block/controller/nearly_off" }, "energy_type=nearly_on": { "model": "refinedstorage2:block/controller/nearly_on" }, + "energy_type=off": { + "model": "refinedstorage2:block/controller/off" + }, "energy_type=on": { "model": "refinedstorage2:block/controller/blue" } diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/blue_crafting_grid.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/blue_crafting_grid.json new file mode 100644 index 000000000..228f26de7 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/blue_crafting_grid.json @@ -0,0 +1,110 @@ +{ + "variants": { + "active=false,direction=down_east": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": 90, + "y": -90 + }, + "active=false,direction=down_north": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": 90 + }, + "active=false,direction=down_south": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": 90, + "y": 180 + }, + "active=false,direction=down_west": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": 90, + "y": 90 + }, + "active=false,direction=east": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "y": 90 + }, + "active=false,direction=north": { + "model": "refinedstorage2:block/crafting_grid/inactive" + }, + "active=false,direction=south": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "y": 180 + }, + "active=false,direction=up_east": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": -90, + "y": -90 + }, + "active=false,direction=up_north": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": -90, + "y": 180 + }, + "active=false,direction=up_south": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": -90 + }, + "active=false,direction=up_west": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": -90, + "y": 90 + }, + "active=false,direction=west": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "y": 270 + }, + "active=true,direction=down_east": { + "model": "refinedstorage2:block/crafting_grid/blue", + "x": 90, + "y": -90 + }, + "active=true,direction=down_north": { + "model": "refinedstorage2:block/crafting_grid/blue", + "x": 90 + }, + "active=true,direction=down_south": { + "model": "refinedstorage2:block/crafting_grid/blue", + "x": 90, + "y": 180 + }, + "active=true,direction=down_west": { + "model": "refinedstorage2:block/crafting_grid/blue", + "x": 90, + "y": 90 + }, + "active=true,direction=east": { + "model": "refinedstorage2:block/crafting_grid/blue", + "y": 90 + }, + "active=true,direction=north": { + "model": "refinedstorage2:block/crafting_grid/blue" + }, + "active=true,direction=south": { + "model": "refinedstorage2:block/crafting_grid/blue", + "y": 180 + }, + "active=true,direction=up_east": { + "model": "refinedstorage2:block/crafting_grid/blue", + "x": -90, + "y": -90 + }, + "active=true,direction=up_north": { + "model": "refinedstorage2:block/crafting_grid/blue", + "x": -90, + "y": 180 + }, + "active=true,direction=up_south": { + "model": "refinedstorage2:block/crafting_grid/blue", + "x": -90 + }, + "active=true,direction=up_west": { + "model": "refinedstorage2:block/crafting_grid/blue", + "x": -90, + "y": 90 + }, + "active=true,direction=west": { + "model": "refinedstorage2:block/crafting_grid/blue", + "y": 270 + } + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/blue_creative_controller.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/blue_creative_controller.json index 04631c4ef..d3a597ddf 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/blue_creative_controller.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/blue_creative_controller.json @@ -1,14 +1,14 @@ { "variants": { - "energy_type=off": { - "model": "refinedstorage2:block/controller/off" - }, "energy_type=nearly_off": { "model": "refinedstorage2:block/controller/nearly_off" }, "energy_type=nearly_on": { "model": "refinedstorage2:block/controller/nearly_on" }, + "energy_type=off": { + "model": "refinedstorage2:block/controller/off" + }, "energy_type=on": { "model": "refinedstorage2:block/controller/blue" } diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/blue_exporter.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/blue_exporter.json new file mode 100644 index 000000000..6eaae725a --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/blue_exporter.json @@ -0,0 +1,115 @@ +{ + "multipart": [ + { + "apply": { + "model": "refinedstorage2:block/cable/core/blue" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/blue", + "x": 90 + }, + "when": { + "down": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/blue", + "x": 270 + }, + "when": { + "up": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/blue" + }, + "when": { + "north": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/blue", + "x": 180 + }, + "when": { + "south": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/blue", + "y": 270 + }, + "when": { + "west": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/blue", + "y": 90 + }, + "when": { + "east": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/exporter", + "x": 90 + }, + "when": { + "direction": "down" + } + }, + { + "apply": { + "model": "refinedstorage2:block/exporter", + "x": 270 + }, + "when": { + "direction": "up" + } + }, + { + "apply": { + "model": "refinedstorage2:block/exporter" + }, + "when": { + "direction": "north" + } + }, + { + "apply": { + "model": "refinedstorage2:block/exporter", + "x": 180 + }, + "when": { + "direction": "south" + } + }, + { + "apply": { + "model": "refinedstorage2:block/exporter", + "y": 270 + }, + "when": { + "direction": "west" + } + }, + { + "apply": { + "model": "refinedstorage2:block/exporter", + "y": 90 + }, + "when": { + "direction": "east" + } + } + ] +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/blue_external_storage.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/blue_external_storage.json new file mode 100644 index 000000000..ea6e4ab4f --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/blue_external_storage.json @@ -0,0 +1,115 @@ +{ + "multipart": [ + { + "apply": { + "model": "refinedstorage2:block/cable/core/blue" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/blue", + "x": 90 + }, + "when": { + "down": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/blue", + "x": 270 + }, + "when": { + "up": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/blue" + }, + "when": { + "north": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/blue", + "x": 180 + }, + "when": { + "south": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/blue", + "y": 270 + }, + "when": { + "west": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/blue", + "y": 90 + }, + "when": { + "east": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/external_storage", + "x": 90 + }, + "when": { + "direction": "down" + } + }, + { + "apply": { + "model": "refinedstorage2:block/external_storage", + "x": 270 + }, + "when": { + "direction": "up" + } + }, + { + "apply": { + "model": "refinedstorage2:block/external_storage" + }, + "when": { + "direction": "north" + } + }, + { + "apply": { + "model": "refinedstorage2:block/external_storage", + "x": 180 + }, + "when": { + "direction": "south" + } + }, + { + "apply": { + "model": "refinedstorage2:block/external_storage", + "y": 270 + }, + "when": { + "direction": "west" + } + }, + { + "apply": { + "model": "refinedstorage2:block/external_storage", + "y": 90 + }, + "when": { + "direction": "east" + } + } + ] +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/blue_grid.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/blue_grid.json index d2368649a..f8ff49193 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/blue_grid.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/blue_grid.json @@ -1,123 +1,109 @@ { "variants": { - "direction=up_north,active=true": { - "model": "refinedstorage2:block/grid/blue", - "x": -90, - "y": 180 + "active=false,direction=down_east": { + "model": "refinedstorage2:block/grid/inactive", + "x": 90, + "y": -90 }, - "direction=up_north,active=false": { + "active=false,direction=down_north": { "model": "refinedstorage2:block/grid/inactive", - "x": -90, + "x": 90 + }, + "active=false,direction=down_south": { + "model": "refinedstorage2:block/grid/inactive", + "x": 90, "y": 180 }, - "direction=up_east,active=true": { - "model": "refinedstorage2:block/grid/blue", - "x": -90, - "y": -90 + "active=false,direction=down_west": { + "model": "refinedstorage2:block/grid/inactive", + "x": 90, + "y": 90 }, - "direction=up_east,active=false": { + "active=false,direction=east": { "model": "refinedstorage2:block/grid/inactive", - "x": -90, - "y": -90 + "y": 90 }, - "direction=up_south,active=true": { - "model": "refinedstorage2:block/grid/blue", - "x": -90, - "y": 0 + "active=false,direction=north": { + "model": "refinedstorage2:block/grid/inactive" }, - "direction=up_south,active=false": { + "active=false,direction=south": { "model": "refinedstorage2:block/grid/inactive", - "x": -90, - "y": 0 + "y": 180 }, - "direction=up_west,active=true": { - "model": "refinedstorage2:block/grid/blue", + "active=false,direction=up_east": { + "model": "refinedstorage2:block/grid/inactive", "x": -90, - "y": 90 + "y": -90 }, - "direction=up_west,active=false": { + "active=false,direction=up_north": { "model": "refinedstorage2:block/grid/inactive", "x": -90, - "y": 90 - }, - "direction=down_north,active=true": { - "model": "refinedstorage2:block/grid/blue", - "x": 90, - "y": 0 + "y": 180 }, - "direction=down_north,active=false": { + "active=false,direction=up_south": { "model": "refinedstorage2:block/grid/inactive", - "x": 90, - "y": 0 + "x": -90 }, - "direction=down_east,active=true": { - "model": "refinedstorage2:block/grid/blue", - "x": 90, + "active=false,direction=up_west": { + "model": "refinedstorage2:block/grid/inactive", + "x": -90, "y": 90 }, - "direction=down_east,active=false": { + "active=false,direction=west": { "model": "refinedstorage2:block/grid/inactive", - "x": 90, - "y": 90 + "y": 270 }, - "direction=down_south,active=true": { + "active=true,direction=down_east": { "model": "refinedstorage2:block/grid/blue", "x": 90, - "y": 180 + "y": -90 }, - "direction=down_south,active=false": { - "model": "refinedstorage2:block/grid/inactive", - "x": 90, - "y": 180 + "active=true,direction=down_north": { + "model": "refinedstorage2:block/grid/blue", + "x": 90 }, - "direction=down_west,active=true": { + "active=true,direction=down_south": { "model": "refinedstorage2:block/grid/blue", "x": 90, - "y": -90 + "y": 180 }, - "direction=down_west,active=false": { - "model": "refinedstorage2:block/grid/inactive", + "active=true,direction=down_west": { + "model": "refinedstorage2:block/grid/blue", "x": 90, - "y": -90 + "y": 90 }, - "direction=north,active=true": { + "active=true,direction=east": { "model": "refinedstorage2:block/grid/blue", - "x": 0, - "y": 0 + "y": 90 }, - "direction=north,active=false": { - "model": "refinedstorage2:block/grid/inactive", - "x": 0, - "y": 0 + "active=true,direction=north": { + "model": "refinedstorage2:block/grid/blue" }, - "direction=east,active=true": { + "active=true,direction=south": { "model": "refinedstorage2:block/grid/blue", - "x": 0, - "y": 90 + "y": 180 }, - "direction=east,active=false": { - "model": "refinedstorage2:block/grid/inactive", - "x": 0, - "y": 90 + "active=true,direction=up_east": { + "model": "refinedstorage2:block/grid/blue", + "x": -90, + "y": -90 }, - "direction=south,active=true": { + "active=true,direction=up_north": { "model": "refinedstorage2:block/grid/blue", - "x": 0, + "x": -90, "y": 180 }, - "direction=south,active=false": { - "model": "refinedstorage2:block/grid/inactive", - "x": 0, - "y": 180 + "active=true,direction=up_south": { + "model": "refinedstorage2:block/grid/blue", + "x": -90 }, - "direction=west,active=true": { + "active=true,direction=up_west": { "model": "refinedstorage2:block/grid/blue", - "x": 0, - "y": 270 + "x": -90, + "y": 90 }, - "direction=west,active=false": { - "model": "refinedstorage2:block/grid/inactive", - "x": 0, + "active=true,direction=west": { + "model": "refinedstorage2:block/grid/blue", "y": 270 } } diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/blue_importer.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/blue_importer.json new file mode 100644 index 000000000..4b09315b2 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/blue_importer.json @@ -0,0 +1,115 @@ +{ + "multipart": [ + { + "apply": { + "model": "refinedstorage2:block/cable/core/blue" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/blue", + "x": 90 + }, + "when": { + "down": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/blue", + "x": 270 + }, + "when": { + "up": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/blue" + }, + "when": { + "north": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/blue", + "x": 180 + }, + "when": { + "south": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/blue", + "y": 270 + }, + "when": { + "west": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/blue", + "y": 90 + }, + "when": { + "east": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/importer", + "x": 90 + }, + "when": { + "direction": "down" + } + }, + { + "apply": { + "model": "refinedstorage2:block/importer", + "x": 270 + }, + "when": { + "direction": "up" + } + }, + { + "apply": { + "model": "refinedstorage2:block/importer" + }, + "when": { + "direction": "north" + } + }, + { + "apply": { + "model": "refinedstorage2:block/importer", + "x": 180 + }, + "when": { + "direction": "south" + } + }, + { + "apply": { + "model": "refinedstorage2:block/importer", + "y": 270 + }, + "when": { + "direction": "west" + } + }, + { + "apply": { + "model": "refinedstorage2:block/importer", + "y": 90 + }, + "when": { + "direction": "east" + } + } + ] +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/brown_cable.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/brown_cable.json new file mode 100644 index 000000000..be7e51fd6 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/brown_cable.json @@ -0,0 +1,62 @@ +{ + "multipart": [ + { + "apply": { + "model": "refinedstorage2:block/cable/core/brown" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/brown", + "x": 90 + }, + "when": { + "down": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/brown", + "x": 270 + }, + "when": { + "up": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/brown" + }, + "when": { + "north": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/brown", + "x": 180 + }, + "when": { + "south": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/brown", + "y": 270 + }, + "when": { + "west": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/brown", + "y": 90 + }, + "when": { + "east": "true" + } + } + ] +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/brown_controller.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/brown_controller.json index 5f8d7d4a3..3bf0e3259 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/brown_controller.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/brown_controller.json @@ -1,14 +1,14 @@ { "variants": { - "energy_type=off": { - "model": "refinedstorage2:block/controller/off" - }, "energy_type=nearly_off": { "model": "refinedstorage2:block/controller/nearly_off" }, "energy_type=nearly_on": { "model": "refinedstorage2:block/controller/nearly_on" }, + "energy_type=off": { + "model": "refinedstorage2:block/controller/off" + }, "energy_type=on": { "model": "refinedstorage2:block/controller/brown" } diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/brown_crafting_grid.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/brown_crafting_grid.json new file mode 100644 index 000000000..25fb7469c --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/brown_crafting_grid.json @@ -0,0 +1,110 @@ +{ + "variants": { + "active=false,direction=down_east": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": 90, + "y": -90 + }, + "active=false,direction=down_north": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": 90 + }, + "active=false,direction=down_south": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": 90, + "y": 180 + }, + "active=false,direction=down_west": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": 90, + "y": 90 + }, + "active=false,direction=east": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "y": 90 + }, + "active=false,direction=north": { + "model": "refinedstorage2:block/crafting_grid/inactive" + }, + "active=false,direction=south": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "y": 180 + }, + "active=false,direction=up_east": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": -90, + "y": -90 + }, + "active=false,direction=up_north": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": -90, + "y": 180 + }, + "active=false,direction=up_south": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": -90 + }, + "active=false,direction=up_west": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": -90, + "y": 90 + }, + "active=false,direction=west": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "y": 270 + }, + "active=true,direction=down_east": { + "model": "refinedstorage2:block/crafting_grid/brown", + "x": 90, + "y": -90 + }, + "active=true,direction=down_north": { + "model": "refinedstorage2:block/crafting_grid/brown", + "x": 90 + }, + "active=true,direction=down_south": { + "model": "refinedstorage2:block/crafting_grid/brown", + "x": 90, + "y": 180 + }, + "active=true,direction=down_west": { + "model": "refinedstorage2:block/crafting_grid/brown", + "x": 90, + "y": 90 + }, + "active=true,direction=east": { + "model": "refinedstorage2:block/crafting_grid/brown", + "y": 90 + }, + "active=true,direction=north": { + "model": "refinedstorage2:block/crafting_grid/brown" + }, + "active=true,direction=south": { + "model": "refinedstorage2:block/crafting_grid/brown", + "y": 180 + }, + "active=true,direction=up_east": { + "model": "refinedstorage2:block/crafting_grid/brown", + "x": -90, + "y": -90 + }, + "active=true,direction=up_north": { + "model": "refinedstorage2:block/crafting_grid/brown", + "x": -90, + "y": 180 + }, + "active=true,direction=up_south": { + "model": "refinedstorage2:block/crafting_grid/brown", + "x": -90 + }, + "active=true,direction=up_west": { + "model": "refinedstorage2:block/crafting_grid/brown", + "x": -90, + "y": 90 + }, + "active=true,direction=west": { + "model": "refinedstorage2:block/crafting_grid/brown", + "y": 270 + } + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/brown_creative_controller.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/brown_creative_controller.json index 5f8d7d4a3..3bf0e3259 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/brown_creative_controller.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/brown_creative_controller.json @@ -1,14 +1,14 @@ { "variants": { - "energy_type=off": { - "model": "refinedstorage2:block/controller/off" - }, "energy_type=nearly_off": { "model": "refinedstorage2:block/controller/nearly_off" }, "energy_type=nearly_on": { "model": "refinedstorage2:block/controller/nearly_on" }, + "energy_type=off": { + "model": "refinedstorage2:block/controller/off" + }, "energy_type=on": { "model": "refinedstorage2:block/controller/brown" } diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/brown_exporter.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/brown_exporter.json new file mode 100644 index 000000000..07558e73a --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/brown_exporter.json @@ -0,0 +1,115 @@ +{ + "multipart": [ + { + "apply": { + "model": "refinedstorage2:block/cable/core/brown" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/brown", + "x": 90 + }, + "when": { + "down": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/brown", + "x": 270 + }, + "when": { + "up": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/brown" + }, + "when": { + "north": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/brown", + "x": 180 + }, + "when": { + "south": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/brown", + "y": 270 + }, + "when": { + "west": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/brown", + "y": 90 + }, + "when": { + "east": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/exporter", + "x": 90 + }, + "when": { + "direction": "down" + } + }, + { + "apply": { + "model": "refinedstorage2:block/exporter", + "x": 270 + }, + "when": { + "direction": "up" + } + }, + { + "apply": { + "model": "refinedstorage2:block/exporter" + }, + "when": { + "direction": "north" + } + }, + { + "apply": { + "model": "refinedstorage2:block/exporter", + "x": 180 + }, + "when": { + "direction": "south" + } + }, + { + "apply": { + "model": "refinedstorage2:block/exporter", + "y": 270 + }, + "when": { + "direction": "west" + } + }, + { + "apply": { + "model": "refinedstorage2:block/exporter", + "y": 90 + }, + "when": { + "direction": "east" + } + } + ] +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/brown_external_storage.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/brown_external_storage.json new file mode 100644 index 000000000..86e2bd0d3 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/brown_external_storage.json @@ -0,0 +1,115 @@ +{ + "multipart": [ + { + "apply": { + "model": "refinedstorage2:block/cable/core/brown" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/brown", + "x": 90 + }, + "when": { + "down": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/brown", + "x": 270 + }, + "when": { + "up": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/brown" + }, + "when": { + "north": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/brown", + "x": 180 + }, + "when": { + "south": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/brown", + "y": 270 + }, + "when": { + "west": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/brown", + "y": 90 + }, + "when": { + "east": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/external_storage", + "x": 90 + }, + "when": { + "direction": "down" + } + }, + { + "apply": { + "model": "refinedstorage2:block/external_storage", + "x": 270 + }, + "when": { + "direction": "up" + } + }, + { + "apply": { + "model": "refinedstorage2:block/external_storage" + }, + "when": { + "direction": "north" + } + }, + { + "apply": { + "model": "refinedstorage2:block/external_storage", + "x": 180 + }, + "when": { + "direction": "south" + } + }, + { + "apply": { + "model": "refinedstorage2:block/external_storage", + "y": 270 + }, + "when": { + "direction": "west" + } + }, + { + "apply": { + "model": "refinedstorage2:block/external_storage", + "y": 90 + }, + "when": { + "direction": "east" + } + } + ] +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/brown_grid.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/brown_grid.json index 32c6e4e89..734ac175a 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/brown_grid.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/brown_grid.json @@ -1,123 +1,109 @@ { "variants": { - "direction=up_north,active=true": { - "model": "refinedstorage2:block/grid/brown", - "x": -90, - "y": 180 + "active=false,direction=down_east": { + "model": "refinedstorage2:block/grid/inactive", + "x": 90, + "y": -90 }, - "direction=up_north,active=false": { + "active=false,direction=down_north": { "model": "refinedstorage2:block/grid/inactive", - "x": -90, + "x": 90 + }, + "active=false,direction=down_south": { + "model": "refinedstorage2:block/grid/inactive", + "x": 90, "y": 180 }, - "direction=up_east,active=true": { - "model": "refinedstorage2:block/grid/brown", - "x": -90, - "y": -90 + "active=false,direction=down_west": { + "model": "refinedstorage2:block/grid/inactive", + "x": 90, + "y": 90 }, - "direction=up_east,active=false": { + "active=false,direction=east": { "model": "refinedstorage2:block/grid/inactive", - "x": -90, - "y": -90 + "y": 90 }, - "direction=up_south,active=true": { - "model": "refinedstorage2:block/grid/brown", - "x": -90, - "y": 0 + "active=false,direction=north": { + "model": "refinedstorage2:block/grid/inactive" }, - "direction=up_south,active=false": { + "active=false,direction=south": { "model": "refinedstorage2:block/grid/inactive", - "x": -90, - "y": 0 + "y": 180 }, - "direction=up_west,active=true": { - "model": "refinedstorage2:block/grid/brown", + "active=false,direction=up_east": { + "model": "refinedstorage2:block/grid/inactive", "x": -90, - "y": 90 + "y": -90 }, - "direction=up_west,active=false": { + "active=false,direction=up_north": { "model": "refinedstorage2:block/grid/inactive", "x": -90, - "y": 90 - }, - "direction=down_north,active=true": { - "model": "refinedstorage2:block/grid/brown", - "x": 90, - "y": 0 + "y": 180 }, - "direction=down_north,active=false": { + "active=false,direction=up_south": { "model": "refinedstorage2:block/grid/inactive", - "x": 90, - "y": 0 + "x": -90 }, - "direction=down_east,active=true": { - "model": "refinedstorage2:block/grid/brown", - "x": 90, + "active=false,direction=up_west": { + "model": "refinedstorage2:block/grid/inactive", + "x": -90, "y": 90 }, - "direction=down_east,active=false": { + "active=false,direction=west": { "model": "refinedstorage2:block/grid/inactive", - "x": 90, - "y": 90 + "y": 270 }, - "direction=down_south,active=true": { + "active=true,direction=down_east": { "model": "refinedstorage2:block/grid/brown", "x": 90, - "y": 180 + "y": -90 }, - "direction=down_south,active=false": { - "model": "refinedstorage2:block/grid/inactive", - "x": 90, - "y": 180 + "active=true,direction=down_north": { + "model": "refinedstorage2:block/grid/brown", + "x": 90 }, - "direction=down_west,active=true": { + "active=true,direction=down_south": { "model": "refinedstorage2:block/grid/brown", "x": 90, - "y": -90 + "y": 180 }, - "direction=down_west,active=false": { - "model": "refinedstorage2:block/grid/inactive", + "active=true,direction=down_west": { + "model": "refinedstorage2:block/grid/brown", "x": 90, - "y": -90 + "y": 90 }, - "direction=north,active=true": { + "active=true,direction=east": { "model": "refinedstorage2:block/grid/brown", - "x": 0, - "y": 0 + "y": 90 }, - "direction=north,active=false": { - "model": "refinedstorage2:block/grid/inactive", - "x": 0, - "y": 0 + "active=true,direction=north": { + "model": "refinedstorage2:block/grid/brown" }, - "direction=east,active=true": { + "active=true,direction=south": { "model": "refinedstorage2:block/grid/brown", - "x": 0, - "y": 90 + "y": 180 }, - "direction=east,active=false": { - "model": "refinedstorage2:block/grid/inactive", - "x": 0, - "y": 90 + "active=true,direction=up_east": { + "model": "refinedstorage2:block/grid/brown", + "x": -90, + "y": -90 }, - "direction=south,active=true": { + "active=true,direction=up_north": { "model": "refinedstorage2:block/grid/brown", - "x": 0, + "x": -90, "y": 180 }, - "direction=south,active=false": { - "model": "refinedstorage2:block/grid/inactive", - "x": 0, - "y": 180 + "active=true,direction=up_south": { + "model": "refinedstorage2:block/grid/brown", + "x": -90 }, - "direction=west,active=true": { + "active=true,direction=up_west": { "model": "refinedstorage2:block/grid/brown", - "x": 0, - "y": 270 + "x": -90, + "y": 90 }, - "direction=west,active=false": { - "model": "refinedstorage2:block/grid/inactive", - "x": 0, + "active=true,direction=west": { + "model": "refinedstorage2:block/grid/brown", "y": 270 } } diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/brown_importer.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/brown_importer.json new file mode 100644 index 000000000..815e922f0 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/brown_importer.json @@ -0,0 +1,115 @@ +{ + "multipart": [ + { + "apply": { + "model": "refinedstorage2:block/cable/core/brown" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/brown", + "x": 90 + }, + "when": { + "down": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/brown", + "x": 270 + }, + "when": { + "up": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/brown" + }, + "when": { + "north": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/brown", + "x": 180 + }, + "when": { + "south": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/brown", + "y": 270 + }, + "when": { + "west": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/brown", + "y": 90 + }, + "when": { + "east": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/importer", + "x": 90 + }, + "when": { + "direction": "down" + } + }, + { + "apply": { + "model": "refinedstorage2:block/importer", + "x": 270 + }, + "when": { + "direction": "up" + } + }, + { + "apply": { + "model": "refinedstorage2:block/importer" + }, + "when": { + "direction": "north" + } + }, + { + "apply": { + "model": "refinedstorage2:block/importer", + "x": 180 + }, + "when": { + "direction": "south" + } + }, + { + "apply": { + "model": "refinedstorage2:block/importer", + "y": 270 + }, + "when": { + "direction": "west" + } + }, + { + "apply": { + "model": "refinedstorage2:block/importer", + "y": 90 + }, + "when": { + "direction": "east" + } + } + ] +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/cable.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/cable.json new file mode 100644 index 000000000..648e8f3e1 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/cable.json @@ -0,0 +1,62 @@ +{ + "multipart": [ + { + "apply": { + "model": "refinedstorage2:block/cable/core/gray" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/gray", + "x": 90 + }, + "when": { + "down": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/gray", + "x": 270 + }, + "when": { + "up": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/gray" + }, + "when": { + "north": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/gray", + "x": 180 + }, + "when": { + "south": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/gray", + "y": 270 + }, + "when": { + "west": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/gray", + "y": 90 + }, + "when": { + "east": "true" + } + } + ] +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/controller.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/controller.json index 9c006ab0b..7a51f2639 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/controller.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/controller.json @@ -1,14 +1,14 @@ { "variants": { - "energy_type=off": { - "model": "refinedstorage2:block/controller/off" - }, "energy_type=nearly_off": { "model": "refinedstorage2:block/controller/nearly_off" }, "energy_type=nearly_on": { "model": "refinedstorage2:block/controller/nearly_on" }, + "energy_type=off": { + "model": "refinedstorage2:block/controller/off" + }, "energy_type=on": { "model": "refinedstorage2:block/controller/light_blue" } diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/crafting_grid.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/crafting_grid.json new file mode 100644 index 000000000..4a5b3ff3d --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/crafting_grid.json @@ -0,0 +1,110 @@ +{ + "variants": { + "active=false,direction=down_east": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": 90, + "y": -90 + }, + "active=false,direction=down_north": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": 90 + }, + "active=false,direction=down_south": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": 90, + "y": 180 + }, + "active=false,direction=down_west": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": 90, + "y": 90 + }, + "active=false,direction=east": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "y": 90 + }, + "active=false,direction=north": { + "model": "refinedstorage2:block/crafting_grid/inactive" + }, + "active=false,direction=south": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "y": 180 + }, + "active=false,direction=up_east": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": -90, + "y": -90 + }, + "active=false,direction=up_north": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": -90, + "y": 180 + }, + "active=false,direction=up_south": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": -90 + }, + "active=false,direction=up_west": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": -90, + "y": 90 + }, + "active=false,direction=west": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "y": 270 + }, + "active=true,direction=down_east": { + "model": "refinedstorage2:block/crafting_grid/light_blue", + "x": 90, + "y": -90 + }, + "active=true,direction=down_north": { + "model": "refinedstorage2:block/crafting_grid/light_blue", + "x": 90 + }, + "active=true,direction=down_south": { + "model": "refinedstorage2:block/crafting_grid/light_blue", + "x": 90, + "y": 180 + }, + "active=true,direction=down_west": { + "model": "refinedstorage2:block/crafting_grid/light_blue", + "x": 90, + "y": 90 + }, + "active=true,direction=east": { + "model": "refinedstorage2:block/crafting_grid/light_blue", + "y": 90 + }, + "active=true,direction=north": { + "model": "refinedstorage2:block/crafting_grid/light_blue" + }, + "active=true,direction=south": { + "model": "refinedstorage2:block/crafting_grid/light_blue", + "y": 180 + }, + "active=true,direction=up_east": { + "model": "refinedstorage2:block/crafting_grid/light_blue", + "x": -90, + "y": -90 + }, + "active=true,direction=up_north": { + "model": "refinedstorage2:block/crafting_grid/light_blue", + "x": -90, + "y": 180 + }, + "active=true,direction=up_south": { + "model": "refinedstorage2:block/crafting_grid/light_blue", + "x": -90 + }, + "active=true,direction=up_west": { + "model": "refinedstorage2:block/crafting_grid/light_blue", + "x": -90, + "y": 90 + }, + "active=true,direction=west": { + "model": "refinedstorage2:block/crafting_grid/light_blue", + "y": 270 + } + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/creative_controller.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/creative_controller.json index 9c006ab0b..7a51f2639 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/creative_controller.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/creative_controller.json @@ -1,14 +1,14 @@ { "variants": { - "energy_type=off": { - "model": "refinedstorage2:block/controller/off" - }, "energy_type=nearly_off": { "model": "refinedstorage2:block/controller/nearly_off" }, "energy_type=nearly_on": { "model": "refinedstorage2:block/controller/nearly_on" }, + "energy_type=off": { + "model": "refinedstorage2:block/controller/off" + }, "energy_type=on": { "model": "refinedstorage2:block/controller/light_blue" } diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/cyan_cable.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/cyan_cable.json new file mode 100644 index 000000000..c90f395d1 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/cyan_cable.json @@ -0,0 +1,62 @@ +{ + "multipart": [ + { + "apply": { + "model": "refinedstorage2:block/cable/core/cyan" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/cyan", + "x": 90 + }, + "when": { + "down": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/cyan", + "x": 270 + }, + "when": { + "up": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/cyan" + }, + "when": { + "north": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/cyan", + "x": 180 + }, + "when": { + "south": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/cyan", + "y": 270 + }, + "when": { + "west": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/cyan", + "y": 90 + }, + "when": { + "east": "true" + } + } + ] +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/cyan_controller.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/cyan_controller.json index e176ca64a..d4d9fd4ae 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/cyan_controller.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/cyan_controller.json @@ -1,14 +1,14 @@ { "variants": { - "energy_type=off": { - "model": "refinedstorage2:block/controller/off" - }, "energy_type=nearly_off": { "model": "refinedstorage2:block/controller/nearly_off" }, "energy_type=nearly_on": { "model": "refinedstorage2:block/controller/nearly_on" }, + "energy_type=off": { + "model": "refinedstorage2:block/controller/off" + }, "energy_type=on": { "model": "refinedstorage2:block/controller/cyan" } diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/cyan_crafting_grid.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/cyan_crafting_grid.json new file mode 100644 index 000000000..ecf5b1149 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/cyan_crafting_grid.json @@ -0,0 +1,110 @@ +{ + "variants": { + "active=false,direction=down_east": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": 90, + "y": -90 + }, + "active=false,direction=down_north": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": 90 + }, + "active=false,direction=down_south": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": 90, + "y": 180 + }, + "active=false,direction=down_west": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": 90, + "y": 90 + }, + "active=false,direction=east": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "y": 90 + }, + "active=false,direction=north": { + "model": "refinedstorage2:block/crafting_grid/inactive" + }, + "active=false,direction=south": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "y": 180 + }, + "active=false,direction=up_east": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": -90, + "y": -90 + }, + "active=false,direction=up_north": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": -90, + "y": 180 + }, + "active=false,direction=up_south": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": -90 + }, + "active=false,direction=up_west": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": -90, + "y": 90 + }, + "active=false,direction=west": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "y": 270 + }, + "active=true,direction=down_east": { + "model": "refinedstorage2:block/crafting_grid/cyan", + "x": 90, + "y": -90 + }, + "active=true,direction=down_north": { + "model": "refinedstorage2:block/crafting_grid/cyan", + "x": 90 + }, + "active=true,direction=down_south": { + "model": "refinedstorage2:block/crafting_grid/cyan", + "x": 90, + "y": 180 + }, + "active=true,direction=down_west": { + "model": "refinedstorage2:block/crafting_grid/cyan", + "x": 90, + "y": 90 + }, + "active=true,direction=east": { + "model": "refinedstorage2:block/crafting_grid/cyan", + "y": 90 + }, + "active=true,direction=north": { + "model": "refinedstorage2:block/crafting_grid/cyan" + }, + "active=true,direction=south": { + "model": "refinedstorage2:block/crafting_grid/cyan", + "y": 180 + }, + "active=true,direction=up_east": { + "model": "refinedstorage2:block/crafting_grid/cyan", + "x": -90, + "y": -90 + }, + "active=true,direction=up_north": { + "model": "refinedstorage2:block/crafting_grid/cyan", + "x": -90, + "y": 180 + }, + "active=true,direction=up_south": { + "model": "refinedstorage2:block/crafting_grid/cyan", + "x": -90 + }, + "active=true,direction=up_west": { + "model": "refinedstorage2:block/crafting_grid/cyan", + "x": -90, + "y": 90 + }, + "active=true,direction=west": { + "model": "refinedstorage2:block/crafting_grid/cyan", + "y": 270 + } + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/cyan_creative_controller.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/cyan_creative_controller.json index e176ca64a..d4d9fd4ae 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/cyan_creative_controller.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/cyan_creative_controller.json @@ -1,14 +1,14 @@ { "variants": { - "energy_type=off": { - "model": "refinedstorage2:block/controller/off" - }, "energy_type=nearly_off": { "model": "refinedstorage2:block/controller/nearly_off" }, "energy_type=nearly_on": { "model": "refinedstorage2:block/controller/nearly_on" }, + "energy_type=off": { + "model": "refinedstorage2:block/controller/off" + }, "energy_type=on": { "model": "refinedstorage2:block/controller/cyan" } diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/cyan_exporter.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/cyan_exporter.json new file mode 100644 index 000000000..12c566f35 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/cyan_exporter.json @@ -0,0 +1,115 @@ +{ + "multipart": [ + { + "apply": { + "model": "refinedstorage2:block/cable/core/cyan" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/cyan", + "x": 90 + }, + "when": { + "down": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/cyan", + "x": 270 + }, + "when": { + "up": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/cyan" + }, + "when": { + "north": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/cyan", + "x": 180 + }, + "when": { + "south": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/cyan", + "y": 270 + }, + "when": { + "west": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/cyan", + "y": 90 + }, + "when": { + "east": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/exporter", + "x": 90 + }, + "when": { + "direction": "down" + } + }, + { + "apply": { + "model": "refinedstorage2:block/exporter", + "x": 270 + }, + "when": { + "direction": "up" + } + }, + { + "apply": { + "model": "refinedstorage2:block/exporter" + }, + "when": { + "direction": "north" + } + }, + { + "apply": { + "model": "refinedstorage2:block/exporter", + "x": 180 + }, + "when": { + "direction": "south" + } + }, + { + "apply": { + "model": "refinedstorage2:block/exporter", + "y": 270 + }, + "when": { + "direction": "west" + } + }, + { + "apply": { + "model": "refinedstorage2:block/exporter", + "y": 90 + }, + "when": { + "direction": "east" + } + } + ] +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/cyan_external_storage.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/cyan_external_storage.json new file mode 100644 index 000000000..e29d982a8 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/cyan_external_storage.json @@ -0,0 +1,115 @@ +{ + "multipart": [ + { + "apply": { + "model": "refinedstorage2:block/cable/core/cyan" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/cyan", + "x": 90 + }, + "when": { + "down": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/cyan", + "x": 270 + }, + "when": { + "up": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/cyan" + }, + "when": { + "north": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/cyan", + "x": 180 + }, + "when": { + "south": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/cyan", + "y": 270 + }, + "when": { + "west": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/cyan", + "y": 90 + }, + "when": { + "east": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/external_storage", + "x": 90 + }, + "when": { + "direction": "down" + } + }, + { + "apply": { + "model": "refinedstorage2:block/external_storage", + "x": 270 + }, + "when": { + "direction": "up" + } + }, + { + "apply": { + "model": "refinedstorage2:block/external_storage" + }, + "when": { + "direction": "north" + } + }, + { + "apply": { + "model": "refinedstorage2:block/external_storage", + "x": 180 + }, + "when": { + "direction": "south" + } + }, + { + "apply": { + "model": "refinedstorage2:block/external_storage", + "y": 270 + }, + "when": { + "direction": "west" + } + }, + { + "apply": { + "model": "refinedstorage2:block/external_storage", + "y": 90 + }, + "when": { + "direction": "east" + } + } + ] +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/cyan_grid.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/cyan_grid.json index 2b646eb6d..3b31d839d 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/cyan_grid.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/cyan_grid.json @@ -1,123 +1,109 @@ { "variants": { - "direction=up_north,active=true": { - "model": "refinedstorage2:block/grid/cyan", - "x": -90, - "y": 180 + "active=false,direction=down_east": { + "model": "refinedstorage2:block/grid/inactive", + "x": 90, + "y": -90 }, - "direction=up_north,active=false": { + "active=false,direction=down_north": { "model": "refinedstorage2:block/grid/inactive", - "x": -90, + "x": 90 + }, + "active=false,direction=down_south": { + "model": "refinedstorage2:block/grid/inactive", + "x": 90, "y": 180 }, - "direction=up_east,active=true": { - "model": "refinedstorage2:block/grid/cyan", - "x": -90, - "y": -90 + "active=false,direction=down_west": { + "model": "refinedstorage2:block/grid/inactive", + "x": 90, + "y": 90 }, - "direction=up_east,active=false": { + "active=false,direction=east": { "model": "refinedstorage2:block/grid/inactive", - "x": -90, - "y": -90 + "y": 90 }, - "direction=up_south,active=true": { - "model": "refinedstorage2:block/grid/cyan", - "x": -90, - "y": 0 + "active=false,direction=north": { + "model": "refinedstorage2:block/grid/inactive" }, - "direction=up_south,active=false": { + "active=false,direction=south": { "model": "refinedstorage2:block/grid/inactive", - "x": -90, - "y": 0 + "y": 180 }, - "direction=up_west,active=true": { - "model": "refinedstorage2:block/grid/cyan", + "active=false,direction=up_east": { + "model": "refinedstorage2:block/grid/inactive", "x": -90, - "y": 90 + "y": -90 }, - "direction=up_west,active=false": { + "active=false,direction=up_north": { "model": "refinedstorage2:block/grid/inactive", "x": -90, - "y": 90 - }, - "direction=down_north,active=true": { - "model": "refinedstorage2:block/grid/cyan", - "x": 90, - "y": 0 + "y": 180 }, - "direction=down_north,active=false": { + "active=false,direction=up_south": { "model": "refinedstorage2:block/grid/inactive", - "x": 90, - "y": 0 + "x": -90 }, - "direction=down_east,active=true": { - "model": "refinedstorage2:block/grid/cyan", - "x": 90, + "active=false,direction=up_west": { + "model": "refinedstorage2:block/grid/inactive", + "x": -90, "y": 90 }, - "direction=down_east,active=false": { + "active=false,direction=west": { "model": "refinedstorage2:block/grid/inactive", - "x": 90, - "y": 90 + "y": 270 }, - "direction=down_south,active=true": { + "active=true,direction=down_east": { "model": "refinedstorage2:block/grid/cyan", "x": 90, - "y": 180 + "y": -90 }, - "direction=down_south,active=false": { - "model": "refinedstorage2:block/grid/inactive", - "x": 90, - "y": 180 + "active=true,direction=down_north": { + "model": "refinedstorage2:block/grid/cyan", + "x": 90 }, - "direction=down_west,active=true": { + "active=true,direction=down_south": { "model": "refinedstorage2:block/grid/cyan", "x": 90, - "y": -90 + "y": 180 }, - "direction=down_west,active=false": { - "model": "refinedstorage2:block/grid/inactive", + "active=true,direction=down_west": { + "model": "refinedstorage2:block/grid/cyan", "x": 90, - "y": -90 + "y": 90 }, - "direction=north,active=true": { + "active=true,direction=east": { "model": "refinedstorage2:block/grid/cyan", - "x": 0, - "y": 0 + "y": 90 }, - "direction=north,active=false": { - "model": "refinedstorage2:block/grid/inactive", - "x": 0, - "y": 0 + "active=true,direction=north": { + "model": "refinedstorage2:block/grid/cyan" }, - "direction=east,active=true": { + "active=true,direction=south": { "model": "refinedstorage2:block/grid/cyan", - "x": 0, - "y": 90 + "y": 180 }, - "direction=east,active=false": { - "model": "refinedstorage2:block/grid/inactive", - "x": 0, - "y": 90 + "active=true,direction=up_east": { + "model": "refinedstorage2:block/grid/cyan", + "x": -90, + "y": -90 }, - "direction=south,active=true": { + "active=true,direction=up_north": { "model": "refinedstorage2:block/grid/cyan", - "x": 0, + "x": -90, "y": 180 }, - "direction=south,active=false": { - "model": "refinedstorage2:block/grid/inactive", - "x": 0, - "y": 180 + "active=true,direction=up_south": { + "model": "refinedstorage2:block/grid/cyan", + "x": -90 }, - "direction=west,active=true": { + "active=true,direction=up_west": { "model": "refinedstorage2:block/grid/cyan", - "x": 0, - "y": 270 + "x": -90, + "y": 90 }, - "direction=west,active=false": { - "model": "refinedstorage2:block/grid/inactive", - "x": 0, + "active=true,direction=west": { + "model": "refinedstorage2:block/grid/cyan", "y": 270 } } diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/cyan_importer.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/cyan_importer.json new file mode 100644 index 000000000..5e588f524 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/cyan_importer.json @@ -0,0 +1,115 @@ +{ + "multipart": [ + { + "apply": { + "model": "refinedstorage2:block/cable/core/cyan" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/cyan", + "x": 90 + }, + "when": { + "down": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/cyan", + "x": 270 + }, + "when": { + "up": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/cyan" + }, + "when": { + "north": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/cyan", + "x": 180 + }, + "when": { + "south": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/cyan", + "y": 270 + }, + "when": { + "west": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/cyan", + "y": 90 + }, + "when": { + "east": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/importer", + "x": 90 + }, + "when": { + "direction": "down" + } + }, + { + "apply": { + "model": "refinedstorage2:block/importer", + "x": 270 + }, + "when": { + "direction": "up" + } + }, + { + "apply": { + "model": "refinedstorage2:block/importer" + }, + "when": { + "direction": "north" + } + }, + { + "apply": { + "model": "refinedstorage2:block/importer", + "x": 180 + }, + "when": { + "direction": "south" + } + }, + { + "apply": { + "model": "refinedstorage2:block/importer", + "y": 270 + }, + "when": { + "direction": "west" + } + }, + { + "apply": { + "model": "refinedstorage2:block/importer", + "y": 90 + }, + "when": { + "direction": "east" + } + } + ] +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/exporter.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/exporter.json new file mode 100644 index 000000000..3c57b4213 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/exporter.json @@ -0,0 +1,115 @@ +{ + "multipart": [ + { + "apply": { + "model": "refinedstorage2:block/cable/core/gray" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/gray", + "x": 90 + }, + "when": { + "down": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/gray", + "x": 270 + }, + "when": { + "up": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/gray" + }, + "when": { + "north": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/gray", + "x": 180 + }, + "when": { + "south": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/gray", + "y": 270 + }, + "when": { + "west": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/gray", + "y": 90 + }, + "when": { + "east": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/exporter", + "x": 90 + }, + "when": { + "direction": "down" + } + }, + { + "apply": { + "model": "refinedstorage2:block/exporter", + "x": 270 + }, + "when": { + "direction": "up" + } + }, + { + "apply": { + "model": "refinedstorage2:block/exporter" + }, + "when": { + "direction": "north" + } + }, + { + "apply": { + "model": "refinedstorage2:block/exporter", + "x": 180 + }, + "when": { + "direction": "south" + } + }, + { + "apply": { + "model": "refinedstorage2:block/exporter", + "y": 270 + }, + "when": { + "direction": "west" + } + }, + { + "apply": { + "model": "refinedstorage2:block/exporter", + "y": 90 + }, + "when": { + "direction": "east" + } + } + ] +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/external_storage.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/external_storage.json new file mode 100644 index 000000000..6f28beac0 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/external_storage.json @@ -0,0 +1,115 @@ +{ + "multipart": [ + { + "apply": { + "model": "refinedstorage2:block/cable/core/gray" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/gray", + "x": 90 + }, + "when": { + "down": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/gray", + "x": 270 + }, + "when": { + "up": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/gray" + }, + "when": { + "north": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/gray", + "x": 180 + }, + "when": { + "south": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/gray", + "y": 270 + }, + "when": { + "west": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/gray", + "y": 90 + }, + "when": { + "east": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/external_storage", + "x": 90 + }, + "when": { + "direction": "down" + } + }, + { + "apply": { + "model": "refinedstorage2:block/external_storage", + "x": 270 + }, + "when": { + "direction": "up" + } + }, + { + "apply": { + "model": "refinedstorage2:block/external_storage" + }, + "when": { + "direction": "north" + } + }, + { + "apply": { + "model": "refinedstorage2:block/external_storage", + "x": 180 + }, + "when": { + "direction": "south" + } + }, + { + "apply": { + "model": "refinedstorage2:block/external_storage", + "y": 270 + }, + "when": { + "direction": "west" + } + }, + { + "apply": { + "model": "refinedstorage2:block/external_storage", + "y": 90 + }, + "when": { + "direction": "east" + } + } + ] +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/gray_controller.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/gray_controller.json index 81c738e48..57d651274 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/gray_controller.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/gray_controller.json @@ -1,14 +1,14 @@ { "variants": { - "energy_type=off": { - "model": "refinedstorage2:block/controller/off" - }, "energy_type=nearly_off": { "model": "refinedstorage2:block/controller/nearly_off" }, "energy_type=nearly_on": { "model": "refinedstorage2:block/controller/nearly_on" }, + "energy_type=off": { + "model": "refinedstorage2:block/controller/off" + }, "energy_type=on": { "model": "refinedstorage2:block/controller/gray" } diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/gray_crafting_grid.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/gray_crafting_grid.json new file mode 100644 index 000000000..f74dcf4b9 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/gray_crafting_grid.json @@ -0,0 +1,110 @@ +{ + "variants": { + "active=false,direction=down_east": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": 90, + "y": -90 + }, + "active=false,direction=down_north": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": 90 + }, + "active=false,direction=down_south": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": 90, + "y": 180 + }, + "active=false,direction=down_west": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": 90, + "y": 90 + }, + "active=false,direction=east": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "y": 90 + }, + "active=false,direction=north": { + "model": "refinedstorage2:block/crafting_grid/inactive" + }, + "active=false,direction=south": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "y": 180 + }, + "active=false,direction=up_east": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": -90, + "y": -90 + }, + "active=false,direction=up_north": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": -90, + "y": 180 + }, + "active=false,direction=up_south": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": -90 + }, + "active=false,direction=up_west": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": -90, + "y": 90 + }, + "active=false,direction=west": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "y": 270 + }, + "active=true,direction=down_east": { + "model": "refinedstorage2:block/crafting_grid/gray", + "x": 90, + "y": -90 + }, + "active=true,direction=down_north": { + "model": "refinedstorage2:block/crafting_grid/gray", + "x": 90 + }, + "active=true,direction=down_south": { + "model": "refinedstorage2:block/crafting_grid/gray", + "x": 90, + "y": 180 + }, + "active=true,direction=down_west": { + "model": "refinedstorage2:block/crafting_grid/gray", + "x": 90, + "y": 90 + }, + "active=true,direction=east": { + "model": "refinedstorage2:block/crafting_grid/gray", + "y": 90 + }, + "active=true,direction=north": { + "model": "refinedstorage2:block/crafting_grid/gray" + }, + "active=true,direction=south": { + "model": "refinedstorage2:block/crafting_grid/gray", + "y": 180 + }, + "active=true,direction=up_east": { + "model": "refinedstorage2:block/crafting_grid/gray", + "x": -90, + "y": -90 + }, + "active=true,direction=up_north": { + "model": "refinedstorage2:block/crafting_grid/gray", + "x": -90, + "y": 180 + }, + "active=true,direction=up_south": { + "model": "refinedstorage2:block/crafting_grid/gray", + "x": -90 + }, + "active=true,direction=up_west": { + "model": "refinedstorage2:block/crafting_grid/gray", + "x": -90, + "y": 90 + }, + "active=true,direction=west": { + "model": "refinedstorage2:block/crafting_grid/gray", + "y": 270 + } + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/gray_creative_controller.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/gray_creative_controller.json index 81c738e48..57d651274 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/gray_creative_controller.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/gray_creative_controller.json @@ -1,14 +1,14 @@ { "variants": { - "energy_type=off": { - "model": "refinedstorage2:block/controller/off" - }, "energy_type=nearly_off": { "model": "refinedstorage2:block/controller/nearly_off" }, "energy_type=nearly_on": { "model": "refinedstorage2:block/controller/nearly_on" }, + "energy_type=off": { + "model": "refinedstorage2:block/controller/off" + }, "energy_type=on": { "model": "refinedstorage2:block/controller/gray" } diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/gray_grid.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/gray_grid.json index 33d8d037b..a11aa6dcc 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/gray_grid.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/gray_grid.json @@ -1,123 +1,109 @@ { "variants": { - "direction=up_north,active=true": { - "model": "refinedstorage2:block/grid/gray", - "x": -90, - "y": 180 + "active=false,direction=down_east": { + "model": "refinedstorage2:block/grid/inactive", + "x": 90, + "y": -90 }, - "direction=up_north,active=false": { + "active=false,direction=down_north": { "model": "refinedstorage2:block/grid/inactive", - "x": -90, + "x": 90 + }, + "active=false,direction=down_south": { + "model": "refinedstorage2:block/grid/inactive", + "x": 90, "y": 180 }, - "direction=up_east,active=true": { - "model": "refinedstorage2:block/grid/gray", - "x": -90, - "y": -90 + "active=false,direction=down_west": { + "model": "refinedstorage2:block/grid/inactive", + "x": 90, + "y": 90 }, - "direction=up_east,active=false": { + "active=false,direction=east": { "model": "refinedstorage2:block/grid/inactive", - "x": -90, - "y": -90 + "y": 90 }, - "direction=up_south,active=true": { - "model": "refinedstorage2:block/grid/gray", - "x": -90, - "y": 0 + "active=false,direction=north": { + "model": "refinedstorage2:block/grid/inactive" }, - "direction=up_south,active=false": { + "active=false,direction=south": { "model": "refinedstorage2:block/grid/inactive", - "x": -90, - "y": 0 + "y": 180 }, - "direction=up_west,active=true": { - "model": "refinedstorage2:block/grid/gray", + "active=false,direction=up_east": { + "model": "refinedstorage2:block/grid/inactive", "x": -90, - "y": 90 + "y": -90 }, - "direction=up_west,active=false": { + "active=false,direction=up_north": { "model": "refinedstorage2:block/grid/inactive", "x": -90, - "y": 90 - }, - "direction=down_north,active=true": { - "model": "refinedstorage2:block/grid/gray", - "x": 90, - "y": 0 + "y": 180 }, - "direction=down_north,active=false": { + "active=false,direction=up_south": { "model": "refinedstorage2:block/grid/inactive", - "x": 90, - "y": 0 + "x": -90 }, - "direction=down_east,active=true": { - "model": "refinedstorage2:block/grid/gray", - "x": 90, + "active=false,direction=up_west": { + "model": "refinedstorage2:block/grid/inactive", + "x": -90, "y": 90 }, - "direction=down_east,active=false": { + "active=false,direction=west": { "model": "refinedstorage2:block/grid/inactive", - "x": 90, - "y": 90 + "y": 270 }, - "direction=down_south,active=true": { + "active=true,direction=down_east": { "model": "refinedstorage2:block/grid/gray", "x": 90, - "y": 180 + "y": -90 }, - "direction=down_south,active=false": { - "model": "refinedstorage2:block/grid/inactive", - "x": 90, - "y": 180 + "active=true,direction=down_north": { + "model": "refinedstorage2:block/grid/gray", + "x": 90 }, - "direction=down_west,active=true": { + "active=true,direction=down_south": { "model": "refinedstorage2:block/grid/gray", "x": 90, - "y": -90 + "y": 180 }, - "direction=down_west,active=false": { - "model": "refinedstorage2:block/grid/inactive", + "active=true,direction=down_west": { + "model": "refinedstorage2:block/grid/gray", "x": 90, - "y": -90 + "y": 90 }, - "direction=north,active=true": { + "active=true,direction=east": { "model": "refinedstorage2:block/grid/gray", - "x": 0, - "y": 0 + "y": 90 }, - "direction=north,active=false": { - "model": "refinedstorage2:block/grid/inactive", - "x": 0, - "y": 0 + "active=true,direction=north": { + "model": "refinedstorage2:block/grid/gray" }, - "direction=east,active=true": { + "active=true,direction=south": { "model": "refinedstorage2:block/grid/gray", - "x": 0, - "y": 90 + "y": 180 }, - "direction=east,active=false": { - "model": "refinedstorage2:block/grid/inactive", - "x": 0, - "y": 90 + "active=true,direction=up_east": { + "model": "refinedstorage2:block/grid/gray", + "x": -90, + "y": -90 }, - "direction=south,active=true": { + "active=true,direction=up_north": { "model": "refinedstorage2:block/grid/gray", - "x": 0, + "x": -90, "y": 180 }, - "direction=south,active=false": { - "model": "refinedstorage2:block/grid/inactive", - "x": 0, - "y": 180 + "active=true,direction=up_south": { + "model": "refinedstorage2:block/grid/gray", + "x": -90 }, - "direction=west,active=true": { + "active=true,direction=up_west": { "model": "refinedstorage2:block/grid/gray", - "x": 0, - "y": 270 + "x": -90, + "y": 90 }, - "direction=west,active=false": { - "model": "refinedstorage2:block/grid/inactive", - "x": 0, + "active=true,direction=west": { + "model": "refinedstorage2:block/grid/gray", "y": 270 } } diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/green_cable.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/green_cable.json new file mode 100644 index 000000000..b91e98e18 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/green_cable.json @@ -0,0 +1,62 @@ +{ + "multipart": [ + { + "apply": { + "model": "refinedstorage2:block/cable/core/green" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/green", + "x": 90 + }, + "when": { + "down": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/green", + "x": 270 + }, + "when": { + "up": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/green" + }, + "when": { + "north": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/green", + "x": 180 + }, + "when": { + "south": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/green", + "y": 270 + }, + "when": { + "west": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/green", + "y": 90 + }, + "when": { + "east": "true" + } + } + ] +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/green_controller.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/green_controller.json index d2a574c9e..4d3db4600 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/green_controller.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/green_controller.json @@ -1,14 +1,14 @@ { "variants": { - "energy_type=off": { - "model": "refinedstorage2:block/controller/off" - }, "energy_type=nearly_off": { "model": "refinedstorage2:block/controller/nearly_off" }, "energy_type=nearly_on": { "model": "refinedstorage2:block/controller/nearly_on" }, + "energy_type=off": { + "model": "refinedstorage2:block/controller/off" + }, "energy_type=on": { "model": "refinedstorage2:block/controller/green" } diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/green_crafting_grid.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/green_crafting_grid.json new file mode 100644 index 000000000..7d3ba40f9 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/green_crafting_grid.json @@ -0,0 +1,110 @@ +{ + "variants": { + "active=false,direction=down_east": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": 90, + "y": -90 + }, + "active=false,direction=down_north": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": 90 + }, + "active=false,direction=down_south": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": 90, + "y": 180 + }, + "active=false,direction=down_west": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": 90, + "y": 90 + }, + "active=false,direction=east": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "y": 90 + }, + "active=false,direction=north": { + "model": "refinedstorage2:block/crafting_grid/inactive" + }, + "active=false,direction=south": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "y": 180 + }, + "active=false,direction=up_east": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": -90, + "y": -90 + }, + "active=false,direction=up_north": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": -90, + "y": 180 + }, + "active=false,direction=up_south": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": -90 + }, + "active=false,direction=up_west": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": -90, + "y": 90 + }, + "active=false,direction=west": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "y": 270 + }, + "active=true,direction=down_east": { + "model": "refinedstorage2:block/crafting_grid/green", + "x": 90, + "y": -90 + }, + "active=true,direction=down_north": { + "model": "refinedstorage2:block/crafting_grid/green", + "x": 90 + }, + "active=true,direction=down_south": { + "model": "refinedstorage2:block/crafting_grid/green", + "x": 90, + "y": 180 + }, + "active=true,direction=down_west": { + "model": "refinedstorage2:block/crafting_grid/green", + "x": 90, + "y": 90 + }, + "active=true,direction=east": { + "model": "refinedstorage2:block/crafting_grid/green", + "y": 90 + }, + "active=true,direction=north": { + "model": "refinedstorage2:block/crafting_grid/green" + }, + "active=true,direction=south": { + "model": "refinedstorage2:block/crafting_grid/green", + "y": 180 + }, + "active=true,direction=up_east": { + "model": "refinedstorage2:block/crafting_grid/green", + "x": -90, + "y": -90 + }, + "active=true,direction=up_north": { + "model": "refinedstorage2:block/crafting_grid/green", + "x": -90, + "y": 180 + }, + "active=true,direction=up_south": { + "model": "refinedstorage2:block/crafting_grid/green", + "x": -90 + }, + "active=true,direction=up_west": { + "model": "refinedstorage2:block/crafting_grid/green", + "x": -90, + "y": 90 + }, + "active=true,direction=west": { + "model": "refinedstorage2:block/crafting_grid/green", + "y": 270 + } + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/green_creative_controller.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/green_creative_controller.json index d2a574c9e..4d3db4600 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/green_creative_controller.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/green_creative_controller.json @@ -1,14 +1,14 @@ { "variants": { - "energy_type=off": { - "model": "refinedstorage2:block/controller/off" - }, "energy_type=nearly_off": { "model": "refinedstorage2:block/controller/nearly_off" }, "energy_type=nearly_on": { "model": "refinedstorage2:block/controller/nearly_on" }, + "energy_type=off": { + "model": "refinedstorage2:block/controller/off" + }, "energy_type=on": { "model": "refinedstorage2:block/controller/green" } diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/green_exporter.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/green_exporter.json new file mode 100644 index 000000000..6fc14a5ae --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/green_exporter.json @@ -0,0 +1,115 @@ +{ + "multipart": [ + { + "apply": { + "model": "refinedstorage2:block/cable/core/green" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/green", + "x": 90 + }, + "when": { + "down": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/green", + "x": 270 + }, + "when": { + "up": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/green" + }, + "when": { + "north": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/green", + "x": 180 + }, + "when": { + "south": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/green", + "y": 270 + }, + "when": { + "west": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/green", + "y": 90 + }, + "when": { + "east": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/exporter", + "x": 90 + }, + "when": { + "direction": "down" + } + }, + { + "apply": { + "model": "refinedstorage2:block/exporter", + "x": 270 + }, + "when": { + "direction": "up" + } + }, + { + "apply": { + "model": "refinedstorage2:block/exporter" + }, + "when": { + "direction": "north" + } + }, + { + "apply": { + "model": "refinedstorage2:block/exporter", + "x": 180 + }, + "when": { + "direction": "south" + } + }, + { + "apply": { + "model": "refinedstorage2:block/exporter", + "y": 270 + }, + "when": { + "direction": "west" + } + }, + { + "apply": { + "model": "refinedstorage2:block/exporter", + "y": 90 + }, + "when": { + "direction": "east" + } + } + ] +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/green_external_storage.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/green_external_storage.json new file mode 100644 index 000000000..80c533ae0 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/green_external_storage.json @@ -0,0 +1,115 @@ +{ + "multipart": [ + { + "apply": { + "model": "refinedstorage2:block/cable/core/green" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/green", + "x": 90 + }, + "when": { + "down": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/green", + "x": 270 + }, + "when": { + "up": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/green" + }, + "when": { + "north": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/green", + "x": 180 + }, + "when": { + "south": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/green", + "y": 270 + }, + "when": { + "west": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/green", + "y": 90 + }, + "when": { + "east": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/external_storage", + "x": 90 + }, + "when": { + "direction": "down" + } + }, + { + "apply": { + "model": "refinedstorage2:block/external_storage", + "x": 270 + }, + "when": { + "direction": "up" + } + }, + { + "apply": { + "model": "refinedstorage2:block/external_storage" + }, + "when": { + "direction": "north" + } + }, + { + "apply": { + "model": "refinedstorage2:block/external_storage", + "x": 180 + }, + "when": { + "direction": "south" + } + }, + { + "apply": { + "model": "refinedstorage2:block/external_storage", + "y": 270 + }, + "when": { + "direction": "west" + } + }, + { + "apply": { + "model": "refinedstorage2:block/external_storage", + "y": 90 + }, + "when": { + "direction": "east" + } + } + ] +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/green_grid.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/green_grid.json index 2bc66b69d..81b3632c8 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/green_grid.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/green_grid.json @@ -1,123 +1,109 @@ { "variants": { - "direction=up_north,active=true": { - "model": "refinedstorage2:block/grid/green", - "x": -90, - "y": 180 + "active=false,direction=down_east": { + "model": "refinedstorage2:block/grid/inactive", + "x": 90, + "y": -90 }, - "direction=up_north,active=false": { + "active=false,direction=down_north": { "model": "refinedstorage2:block/grid/inactive", - "x": -90, + "x": 90 + }, + "active=false,direction=down_south": { + "model": "refinedstorage2:block/grid/inactive", + "x": 90, "y": 180 }, - "direction=up_east,active=true": { - "model": "refinedstorage2:block/grid/green", - "x": -90, - "y": -90 + "active=false,direction=down_west": { + "model": "refinedstorage2:block/grid/inactive", + "x": 90, + "y": 90 }, - "direction=up_east,active=false": { + "active=false,direction=east": { "model": "refinedstorage2:block/grid/inactive", - "x": -90, - "y": -90 + "y": 90 }, - "direction=up_south,active=true": { - "model": "refinedstorage2:block/grid/green", - "x": -90, - "y": 0 + "active=false,direction=north": { + "model": "refinedstorage2:block/grid/inactive" }, - "direction=up_south,active=false": { + "active=false,direction=south": { "model": "refinedstorage2:block/grid/inactive", - "x": -90, - "y": 0 + "y": 180 }, - "direction=up_west,active=true": { - "model": "refinedstorage2:block/grid/green", + "active=false,direction=up_east": { + "model": "refinedstorage2:block/grid/inactive", "x": -90, - "y": 90 + "y": -90 }, - "direction=up_west,active=false": { + "active=false,direction=up_north": { "model": "refinedstorage2:block/grid/inactive", "x": -90, - "y": 90 - }, - "direction=down_north,active=true": { - "model": "refinedstorage2:block/grid/green", - "x": 90, - "y": 0 + "y": 180 }, - "direction=down_north,active=false": { + "active=false,direction=up_south": { "model": "refinedstorage2:block/grid/inactive", - "x": 90, - "y": 0 + "x": -90 }, - "direction=down_east,active=true": { - "model": "refinedstorage2:block/grid/green", - "x": 90, + "active=false,direction=up_west": { + "model": "refinedstorage2:block/grid/inactive", + "x": -90, "y": 90 }, - "direction=down_east,active=false": { + "active=false,direction=west": { "model": "refinedstorage2:block/grid/inactive", - "x": 90, - "y": 90 + "y": 270 }, - "direction=down_south,active=true": { + "active=true,direction=down_east": { "model": "refinedstorage2:block/grid/green", "x": 90, - "y": 180 + "y": -90 }, - "direction=down_south,active=false": { - "model": "refinedstorage2:block/grid/inactive", - "x": 90, - "y": 180 + "active=true,direction=down_north": { + "model": "refinedstorage2:block/grid/green", + "x": 90 }, - "direction=down_west,active=true": { + "active=true,direction=down_south": { "model": "refinedstorage2:block/grid/green", "x": 90, - "y": -90 + "y": 180 }, - "direction=down_west,active=false": { - "model": "refinedstorage2:block/grid/inactive", + "active=true,direction=down_west": { + "model": "refinedstorage2:block/grid/green", "x": 90, - "y": -90 + "y": 90 }, - "direction=north,active=true": { + "active=true,direction=east": { "model": "refinedstorage2:block/grid/green", - "x": 0, - "y": 0 + "y": 90 }, - "direction=north,active=false": { - "model": "refinedstorage2:block/grid/inactive", - "x": 0, - "y": 0 + "active=true,direction=north": { + "model": "refinedstorage2:block/grid/green" }, - "direction=east,active=true": { + "active=true,direction=south": { "model": "refinedstorage2:block/grid/green", - "x": 0, - "y": 90 + "y": 180 }, - "direction=east,active=false": { - "model": "refinedstorage2:block/grid/inactive", - "x": 0, - "y": 90 + "active=true,direction=up_east": { + "model": "refinedstorage2:block/grid/green", + "x": -90, + "y": -90 }, - "direction=south,active=true": { + "active=true,direction=up_north": { "model": "refinedstorage2:block/grid/green", - "x": 0, + "x": -90, "y": 180 }, - "direction=south,active=false": { - "model": "refinedstorage2:block/grid/inactive", - "x": 0, - "y": 180 + "active=true,direction=up_south": { + "model": "refinedstorage2:block/grid/green", + "x": -90 }, - "direction=west,active=true": { + "active=true,direction=up_west": { "model": "refinedstorage2:block/grid/green", - "x": 0, - "y": 270 + "x": -90, + "y": 90 }, - "direction=west,active=false": { - "model": "refinedstorage2:block/grid/inactive", - "x": 0, + "active=true,direction=west": { + "model": "refinedstorage2:block/grid/green", "y": 270 } } diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/green_importer.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/green_importer.json new file mode 100644 index 000000000..2d1a2cdd8 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/green_importer.json @@ -0,0 +1,115 @@ +{ + "multipart": [ + { + "apply": { + "model": "refinedstorage2:block/cable/core/green" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/green", + "x": 90 + }, + "when": { + "down": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/green", + "x": 270 + }, + "when": { + "up": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/green" + }, + "when": { + "north": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/green", + "x": 180 + }, + "when": { + "south": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/green", + "y": 270 + }, + "when": { + "west": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/green", + "y": 90 + }, + "when": { + "east": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/importer", + "x": 90 + }, + "when": { + "direction": "down" + } + }, + { + "apply": { + "model": "refinedstorage2:block/importer", + "x": 270 + }, + "when": { + "direction": "up" + } + }, + { + "apply": { + "model": "refinedstorage2:block/importer" + }, + "when": { + "direction": "north" + } + }, + { + "apply": { + "model": "refinedstorage2:block/importer", + "x": 180 + }, + "when": { + "direction": "south" + } + }, + { + "apply": { + "model": "refinedstorage2:block/importer", + "y": 270 + }, + "when": { + "direction": "west" + } + }, + { + "apply": { + "model": "refinedstorage2:block/importer", + "y": 90 + }, + "when": { + "direction": "east" + } + } + ] +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/grid.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/grid.json index 0764dc174..ae2fcc6c4 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/grid.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/grid.json @@ -1,123 +1,109 @@ { "variants": { - "direction=up_north,active=true": { - "model": "refinedstorage2:block/grid/light_blue", - "x": -90, - "y": 180 + "active=false,direction=down_east": { + "model": "refinedstorage2:block/grid/inactive", + "x": 90, + "y": -90 }, - "direction=up_north,active=false": { + "active=false,direction=down_north": { "model": "refinedstorage2:block/grid/inactive", - "x": -90, + "x": 90 + }, + "active=false,direction=down_south": { + "model": "refinedstorage2:block/grid/inactive", + "x": 90, "y": 180 }, - "direction=up_east,active=true": { - "model": "refinedstorage2:block/grid/light_blue", - "x": -90, - "y": -90 + "active=false,direction=down_west": { + "model": "refinedstorage2:block/grid/inactive", + "x": 90, + "y": 90 }, - "direction=up_east,active=false": { + "active=false,direction=east": { "model": "refinedstorage2:block/grid/inactive", - "x": -90, - "y": -90 + "y": 90 }, - "direction=up_south,active=true": { - "model": "refinedstorage2:block/grid/light_blue", - "x": -90, - "y": 0 + "active=false,direction=north": { + "model": "refinedstorage2:block/grid/inactive" }, - "direction=up_south,active=false": { + "active=false,direction=south": { "model": "refinedstorage2:block/grid/inactive", - "x": -90, - "y": 0 + "y": 180 }, - "direction=up_west,active=true": { - "model": "refinedstorage2:block/grid/light_blue", + "active=false,direction=up_east": { + "model": "refinedstorage2:block/grid/inactive", "x": -90, - "y": 90 + "y": -90 }, - "direction=up_west,active=false": { + "active=false,direction=up_north": { "model": "refinedstorage2:block/grid/inactive", "x": -90, - "y": 90 - }, - "direction=down_north,active=true": { - "model": "refinedstorage2:block/grid/light_blue", - "x": 90, - "y": 0 + "y": 180 }, - "direction=down_north,active=false": { + "active=false,direction=up_south": { "model": "refinedstorage2:block/grid/inactive", - "x": 90, - "y": 0 + "x": -90 }, - "direction=down_east,active=true": { - "model": "refinedstorage2:block/grid/light_blue", - "x": 90, + "active=false,direction=up_west": { + "model": "refinedstorage2:block/grid/inactive", + "x": -90, "y": 90 }, - "direction=down_east,active=false": { + "active=false,direction=west": { "model": "refinedstorage2:block/grid/inactive", - "x": 90, - "y": 90 + "y": 270 }, - "direction=down_south,active=true": { + "active=true,direction=down_east": { "model": "refinedstorage2:block/grid/light_blue", "x": 90, - "y": 180 + "y": -90 }, - "direction=down_south,active=false": { - "model": "refinedstorage2:block/grid/inactive", - "x": 90, - "y": 180 + "active=true,direction=down_north": { + "model": "refinedstorage2:block/grid/light_blue", + "x": 90 }, - "direction=down_west,active=true": { + "active=true,direction=down_south": { "model": "refinedstorage2:block/grid/light_blue", "x": 90, - "y": -90 + "y": 180 }, - "direction=down_west,active=false": { - "model": "refinedstorage2:block/grid/inactive", + "active=true,direction=down_west": { + "model": "refinedstorage2:block/grid/light_blue", "x": 90, - "y": -90 + "y": 90 }, - "direction=north,active=true": { + "active=true,direction=east": { "model": "refinedstorage2:block/grid/light_blue", - "x": 0, - "y": 0 + "y": 90 }, - "direction=north,active=false": { - "model": "refinedstorage2:block/grid/inactive", - "x": 0, - "y": 0 + "active=true,direction=north": { + "model": "refinedstorage2:block/grid/light_blue" }, - "direction=east,active=true": { + "active=true,direction=south": { "model": "refinedstorage2:block/grid/light_blue", - "x": 0, - "y": 90 + "y": 180 }, - "direction=east,active=false": { - "model": "refinedstorage2:block/grid/inactive", - "x": 0, - "y": 90 + "active=true,direction=up_east": { + "model": "refinedstorage2:block/grid/light_blue", + "x": -90, + "y": -90 }, - "direction=south,active=true": { + "active=true,direction=up_north": { "model": "refinedstorage2:block/grid/light_blue", - "x": 0, + "x": -90, "y": 180 }, - "direction=south,active=false": { - "model": "refinedstorage2:block/grid/inactive", - "x": 0, - "y": 180 + "active=true,direction=up_south": { + "model": "refinedstorage2:block/grid/light_blue", + "x": -90 }, - "direction=west,active=true": { + "active=true,direction=up_west": { "model": "refinedstorage2:block/grid/light_blue", - "x": 0, - "y": 270 + "x": -90, + "y": 90 }, - "direction=west,active=false": { - "model": "refinedstorage2:block/grid/inactive", - "x": 0, + "active=true,direction=west": { + "model": "refinedstorage2:block/grid/light_blue", "y": 270 } } diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/importer.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/importer.json new file mode 100644 index 000000000..d172dcf54 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/importer.json @@ -0,0 +1,115 @@ +{ + "multipart": [ + { + "apply": { + "model": "refinedstorage2:block/cable/core/gray" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/gray", + "x": 90 + }, + "when": { + "down": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/gray", + "x": 270 + }, + "when": { + "up": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/gray" + }, + "when": { + "north": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/gray", + "x": 180 + }, + "when": { + "south": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/gray", + "y": 270 + }, + "when": { + "west": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/gray", + "y": 90 + }, + "when": { + "east": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/importer", + "x": 90 + }, + "when": { + "direction": "down" + } + }, + { + "apply": { + "model": "refinedstorage2:block/importer", + "x": 270 + }, + "when": { + "direction": "up" + } + }, + { + "apply": { + "model": "refinedstorage2:block/importer" + }, + "when": { + "direction": "north" + } + }, + { + "apply": { + "model": "refinedstorage2:block/importer", + "x": 180 + }, + "when": { + "direction": "south" + } + }, + { + "apply": { + "model": "refinedstorage2:block/importer", + "y": 270 + }, + "when": { + "direction": "west" + } + }, + { + "apply": { + "model": "refinedstorage2:block/importer", + "y": 90 + }, + "when": { + "direction": "east" + } + } + ] +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/light_blue_cable.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/light_blue_cable.json new file mode 100644 index 000000000..8b3120cbc --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/light_blue_cable.json @@ -0,0 +1,62 @@ +{ + "multipart": [ + { + "apply": { + "model": "refinedstorage2:block/cable/core/light_blue" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/light_blue", + "x": 90 + }, + "when": { + "down": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/light_blue", + "x": 270 + }, + "when": { + "up": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/light_blue" + }, + "when": { + "north": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/light_blue", + "x": 180 + }, + "when": { + "south": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/light_blue", + "y": 270 + }, + "when": { + "west": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/light_blue", + "y": 90 + }, + "when": { + "east": "true" + } + } + ] +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/light_blue_exporter.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/light_blue_exporter.json new file mode 100644 index 000000000..759fa81a2 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/light_blue_exporter.json @@ -0,0 +1,115 @@ +{ + "multipart": [ + { + "apply": { + "model": "refinedstorage2:block/cable/core/light_blue" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/light_blue", + "x": 90 + }, + "when": { + "down": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/light_blue", + "x": 270 + }, + "when": { + "up": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/light_blue" + }, + "when": { + "north": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/light_blue", + "x": 180 + }, + "when": { + "south": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/light_blue", + "y": 270 + }, + "when": { + "west": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/light_blue", + "y": 90 + }, + "when": { + "east": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/exporter", + "x": 90 + }, + "when": { + "direction": "down" + } + }, + { + "apply": { + "model": "refinedstorage2:block/exporter", + "x": 270 + }, + "when": { + "direction": "up" + } + }, + { + "apply": { + "model": "refinedstorage2:block/exporter" + }, + "when": { + "direction": "north" + } + }, + { + "apply": { + "model": "refinedstorage2:block/exporter", + "x": 180 + }, + "when": { + "direction": "south" + } + }, + { + "apply": { + "model": "refinedstorage2:block/exporter", + "y": 270 + }, + "when": { + "direction": "west" + } + }, + { + "apply": { + "model": "refinedstorage2:block/exporter", + "y": 90 + }, + "when": { + "direction": "east" + } + } + ] +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/light_blue_external_storage.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/light_blue_external_storage.json new file mode 100644 index 000000000..537c9f4e8 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/light_blue_external_storage.json @@ -0,0 +1,115 @@ +{ + "multipart": [ + { + "apply": { + "model": "refinedstorage2:block/cable/core/light_blue" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/light_blue", + "x": 90 + }, + "when": { + "down": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/light_blue", + "x": 270 + }, + "when": { + "up": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/light_blue" + }, + "when": { + "north": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/light_blue", + "x": 180 + }, + "when": { + "south": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/light_blue", + "y": 270 + }, + "when": { + "west": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/light_blue", + "y": 90 + }, + "when": { + "east": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/external_storage", + "x": 90 + }, + "when": { + "direction": "down" + } + }, + { + "apply": { + "model": "refinedstorage2:block/external_storage", + "x": 270 + }, + "when": { + "direction": "up" + } + }, + { + "apply": { + "model": "refinedstorage2:block/external_storage" + }, + "when": { + "direction": "north" + } + }, + { + "apply": { + "model": "refinedstorage2:block/external_storage", + "x": 180 + }, + "when": { + "direction": "south" + } + }, + { + "apply": { + "model": "refinedstorage2:block/external_storage", + "y": 270 + }, + "when": { + "direction": "west" + } + }, + { + "apply": { + "model": "refinedstorage2:block/external_storage", + "y": 90 + }, + "when": { + "direction": "east" + } + } + ] +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/light_blue_importer.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/light_blue_importer.json new file mode 100644 index 000000000..f4e91a59c --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/light_blue_importer.json @@ -0,0 +1,115 @@ +{ + "multipart": [ + { + "apply": { + "model": "refinedstorage2:block/cable/core/light_blue" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/light_blue", + "x": 90 + }, + "when": { + "down": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/light_blue", + "x": 270 + }, + "when": { + "up": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/light_blue" + }, + "when": { + "north": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/light_blue", + "x": 180 + }, + "when": { + "south": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/light_blue", + "y": 270 + }, + "when": { + "west": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/light_blue", + "y": 90 + }, + "when": { + "east": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/importer", + "x": 90 + }, + "when": { + "direction": "down" + } + }, + { + "apply": { + "model": "refinedstorage2:block/importer", + "x": 270 + }, + "when": { + "direction": "up" + } + }, + { + "apply": { + "model": "refinedstorage2:block/importer" + }, + "when": { + "direction": "north" + } + }, + { + "apply": { + "model": "refinedstorage2:block/importer", + "x": 180 + }, + "when": { + "direction": "south" + } + }, + { + "apply": { + "model": "refinedstorage2:block/importer", + "y": 270 + }, + "when": { + "direction": "west" + } + }, + { + "apply": { + "model": "refinedstorage2:block/importer", + "y": 90 + }, + "when": { + "direction": "east" + } + } + ] +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/light_gray_cable.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/light_gray_cable.json new file mode 100644 index 000000000..4d27e1ac2 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/light_gray_cable.json @@ -0,0 +1,62 @@ +{ + "multipart": [ + { + "apply": { + "model": "refinedstorage2:block/cable/core/light_gray" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/light_gray", + "x": 90 + }, + "when": { + "down": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/light_gray", + "x": 270 + }, + "when": { + "up": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/light_gray" + }, + "when": { + "north": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/light_gray", + "x": 180 + }, + "when": { + "south": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/light_gray", + "y": 270 + }, + "when": { + "west": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/light_gray", + "y": 90 + }, + "when": { + "east": "true" + } + } + ] +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/light_gray_controller.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/light_gray_controller.json index 32515eeed..4d0a041d5 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/light_gray_controller.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/light_gray_controller.json @@ -1,14 +1,14 @@ { "variants": { - "energy_type=off": { - "model": "refinedstorage2:block/controller/off" - }, "energy_type=nearly_off": { "model": "refinedstorage2:block/controller/nearly_off" }, "energy_type=nearly_on": { "model": "refinedstorage2:block/controller/nearly_on" }, + "energy_type=off": { + "model": "refinedstorage2:block/controller/off" + }, "energy_type=on": { "model": "refinedstorage2:block/controller/light_gray" } diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/light_gray_crafting_grid.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/light_gray_crafting_grid.json new file mode 100644 index 000000000..32f8e8cae --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/light_gray_crafting_grid.json @@ -0,0 +1,110 @@ +{ + "variants": { + "active=false,direction=down_east": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": 90, + "y": -90 + }, + "active=false,direction=down_north": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": 90 + }, + "active=false,direction=down_south": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": 90, + "y": 180 + }, + "active=false,direction=down_west": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": 90, + "y": 90 + }, + "active=false,direction=east": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "y": 90 + }, + "active=false,direction=north": { + "model": "refinedstorage2:block/crafting_grid/inactive" + }, + "active=false,direction=south": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "y": 180 + }, + "active=false,direction=up_east": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": -90, + "y": -90 + }, + "active=false,direction=up_north": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": -90, + "y": 180 + }, + "active=false,direction=up_south": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": -90 + }, + "active=false,direction=up_west": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": -90, + "y": 90 + }, + "active=false,direction=west": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "y": 270 + }, + "active=true,direction=down_east": { + "model": "refinedstorage2:block/crafting_grid/light_gray", + "x": 90, + "y": -90 + }, + "active=true,direction=down_north": { + "model": "refinedstorage2:block/crafting_grid/light_gray", + "x": 90 + }, + "active=true,direction=down_south": { + "model": "refinedstorage2:block/crafting_grid/light_gray", + "x": 90, + "y": 180 + }, + "active=true,direction=down_west": { + "model": "refinedstorage2:block/crafting_grid/light_gray", + "x": 90, + "y": 90 + }, + "active=true,direction=east": { + "model": "refinedstorage2:block/crafting_grid/light_gray", + "y": 90 + }, + "active=true,direction=north": { + "model": "refinedstorage2:block/crafting_grid/light_gray" + }, + "active=true,direction=south": { + "model": "refinedstorage2:block/crafting_grid/light_gray", + "y": 180 + }, + "active=true,direction=up_east": { + "model": "refinedstorage2:block/crafting_grid/light_gray", + "x": -90, + "y": -90 + }, + "active=true,direction=up_north": { + "model": "refinedstorage2:block/crafting_grid/light_gray", + "x": -90, + "y": 180 + }, + "active=true,direction=up_south": { + "model": "refinedstorage2:block/crafting_grid/light_gray", + "x": -90 + }, + "active=true,direction=up_west": { + "model": "refinedstorage2:block/crafting_grid/light_gray", + "x": -90, + "y": 90 + }, + "active=true,direction=west": { + "model": "refinedstorage2:block/crafting_grid/light_gray", + "y": 270 + } + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/light_gray_creative_controller.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/light_gray_creative_controller.json index 32515eeed..4d0a041d5 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/light_gray_creative_controller.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/light_gray_creative_controller.json @@ -1,14 +1,14 @@ { "variants": { - "energy_type=off": { - "model": "refinedstorage2:block/controller/off" - }, "energy_type=nearly_off": { "model": "refinedstorage2:block/controller/nearly_off" }, "energy_type=nearly_on": { "model": "refinedstorage2:block/controller/nearly_on" }, + "energy_type=off": { + "model": "refinedstorage2:block/controller/off" + }, "energy_type=on": { "model": "refinedstorage2:block/controller/light_gray" } diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/light_gray_exporter.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/light_gray_exporter.json new file mode 100644 index 000000000..23e703061 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/light_gray_exporter.json @@ -0,0 +1,115 @@ +{ + "multipart": [ + { + "apply": { + "model": "refinedstorage2:block/cable/core/light_gray" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/light_gray", + "x": 90 + }, + "when": { + "down": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/light_gray", + "x": 270 + }, + "when": { + "up": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/light_gray" + }, + "when": { + "north": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/light_gray", + "x": 180 + }, + "when": { + "south": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/light_gray", + "y": 270 + }, + "when": { + "west": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/light_gray", + "y": 90 + }, + "when": { + "east": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/exporter", + "x": 90 + }, + "when": { + "direction": "down" + } + }, + { + "apply": { + "model": "refinedstorage2:block/exporter", + "x": 270 + }, + "when": { + "direction": "up" + } + }, + { + "apply": { + "model": "refinedstorage2:block/exporter" + }, + "when": { + "direction": "north" + } + }, + { + "apply": { + "model": "refinedstorage2:block/exporter", + "x": 180 + }, + "when": { + "direction": "south" + } + }, + { + "apply": { + "model": "refinedstorage2:block/exporter", + "y": 270 + }, + "when": { + "direction": "west" + } + }, + { + "apply": { + "model": "refinedstorage2:block/exporter", + "y": 90 + }, + "when": { + "direction": "east" + } + } + ] +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/light_gray_external_storage.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/light_gray_external_storage.json new file mode 100644 index 000000000..10814dcd9 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/light_gray_external_storage.json @@ -0,0 +1,115 @@ +{ + "multipart": [ + { + "apply": { + "model": "refinedstorage2:block/cable/core/light_gray" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/light_gray", + "x": 90 + }, + "when": { + "down": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/light_gray", + "x": 270 + }, + "when": { + "up": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/light_gray" + }, + "when": { + "north": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/light_gray", + "x": 180 + }, + "when": { + "south": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/light_gray", + "y": 270 + }, + "when": { + "west": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/light_gray", + "y": 90 + }, + "when": { + "east": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/external_storage", + "x": 90 + }, + "when": { + "direction": "down" + } + }, + { + "apply": { + "model": "refinedstorage2:block/external_storage", + "x": 270 + }, + "when": { + "direction": "up" + } + }, + { + "apply": { + "model": "refinedstorage2:block/external_storage" + }, + "when": { + "direction": "north" + } + }, + { + "apply": { + "model": "refinedstorage2:block/external_storage", + "x": 180 + }, + "when": { + "direction": "south" + } + }, + { + "apply": { + "model": "refinedstorage2:block/external_storage", + "y": 270 + }, + "when": { + "direction": "west" + } + }, + { + "apply": { + "model": "refinedstorage2:block/external_storage", + "y": 90 + }, + "when": { + "direction": "east" + } + } + ] +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/light_gray_grid.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/light_gray_grid.json index 0c5d1575e..315545f65 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/light_gray_grid.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/light_gray_grid.json @@ -1,123 +1,109 @@ { "variants": { - "direction=up_north,active=true": { - "model": "refinedstorage2:block/grid/light_gray", - "x": -90, - "y": 180 + "active=false,direction=down_east": { + "model": "refinedstorage2:block/grid/inactive", + "x": 90, + "y": -90 }, - "direction=up_north,active=false": { + "active=false,direction=down_north": { "model": "refinedstorage2:block/grid/inactive", - "x": -90, + "x": 90 + }, + "active=false,direction=down_south": { + "model": "refinedstorage2:block/grid/inactive", + "x": 90, "y": 180 }, - "direction=up_east,active=true": { - "model": "refinedstorage2:block/grid/light_gray", - "x": -90, - "y": -90 + "active=false,direction=down_west": { + "model": "refinedstorage2:block/grid/inactive", + "x": 90, + "y": 90 }, - "direction=up_east,active=false": { + "active=false,direction=east": { "model": "refinedstorage2:block/grid/inactive", - "x": -90, - "y": -90 + "y": 90 }, - "direction=up_south,active=true": { - "model": "refinedstorage2:block/grid/light_gray", - "x": -90, - "y": 0 + "active=false,direction=north": { + "model": "refinedstorage2:block/grid/inactive" }, - "direction=up_south,active=false": { + "active=false,direction=south": { "model": "refinedstorage2:block/grid/inactive", - "x": -90, - "y": 0 + "y": 180 }, - "direction=up_west,active=true": { - "model": "refinedstorage2:block/grid/light_gray", + "active=false,direction=up_east": { + "model": "refinedstorage2:block/grid/inactive", "x": -90, - "y": 90 + "y": -90 }, - "direction=up_west,active=false": { + "active=false,direction=up_north": { "model": "refinedstorage2:block/grid/inactive", "x": -90, - "y": 90 - }, - "direction=down_north,active=true": { - "model": "refinedstorage2:block/grid/light_gray", - "x": 90, - "y": 0 + "y": 180 }, - "direction=down_north,active=false": { + "active=false,direction=up_south": { "model": "refinedstorage2:block/grid/inactive", - "x": 90, - "y": 0 + "x": -90 }, - "direction=down_east,active=true": { - "model": "refinedstorage2:block/grid/light_gray", - "x": 90, + "active=false,direction=up_west": { + "model": "refinedstorage2:block/grid/inactive", + "x": -90, "y": 90 }, - "direction=down_east,active=false": { + "active=false,direction=west": { "model": "refinedstorage2:block/grid/inactive", - "x": 90, - "y": 90 + "y": 270 }, - "direction=down_south,active=true": { + "active=true,direction=down_east": { "model": "refinedstorage2:block/grid/light_gray", "x": 90, - "y": 180 + "y": -90 }, - "direction=down_south,active=false": { - "model": "refinedstorage2:block/grid/inactive", - "x": 90, - "y": 180 + "active=true,direction=down_north": { + "model": "refinedstorage2:block/grid/light_gray", + "x": 90 }, - "direction=down_west,active=true": { + "active=true,direction=down_south": { "model": "refinedstorage2:block/grid/light_gray", "x": 90, - "y": -90 + "y": 180 }, - "direction=down_west,active=false": { - "model": "refinedstorage2:block/grid/inactive", + "active=true,direction=down_west": { + "model": "refinedstorage2:block/grid/light_gray", "x": 90, - "y": -90 + "y": 90 }, - "direction=north,active=true": { + "active=true,direction=east": { "model": "refinedstorage2:block/grid/light_gray", - "x": 0, - "y": 0 + "y": 90 }, - "direction=north,active=false": { - "model": "refinedstorage2:block/grid/inactive", - "x": 0, - "y": 0 + "active=true,direction=north": { + "model": "refinedstorage2:block/grid/light_gray" }, - "direction=east,active=true": { + "active=true,direction=south": { "model": "refinedstorage2:block/grid/light_gray", - "x": 0, - "y": 90 + "y": 180 }, - "direction=east,active=false": { - "model": "refinedstorage2:block/grid/inactive", - "x": 0, - "y": 90 + "active=true,direction=up_east": { + "model": "refinedstorage2:block/grid/light_gray", + "x": -90, + "y": -90 }, - "direction=south,active=true": { + "active=true,direction=up_north": { "model": "refinedstorage2:block/grid/light_gray", - "x": 0, + "x": -90, "y": 180 }, - "direction=south,active=false": { - "model": "refinedstorage2:block/grid/inactive", - "x": 0, - "y": 180 + "active=true,direction=up_south": { + "model": "refinedstorage2:block/grid/light_gray", + "x": -90 }, - "direction=west,active=true": { + "active=true,direction=up_west": { "model": "refinedstorage2:block/grid/light_gray", - "x": 0, - "y": 270 + "x": -90, + "y": 90 }, - "direction=west,active=false": { - "model": "refinedstorage2:block/grid/inactive", - "x": 0, + "active=true,direction=west": { + "model": "refinedstorage2:block/grid/light_gray", "y": 270 } } diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/light_gray_importer.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/light_gray_importer.json new file mode 100644 index 000000000..195968b11 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/light_gray_importer.json @@ -0,0 +1,115 @@ +{ + "multipart": [ + { + "apply": { + "model": "refinedstorage2:block/cable/core/light_gray" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/light_gray", + "x": 90 + }, + "when": { + "down": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/light_gray", + "x": 270 + }, + "when": { + "up": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/light_gray" + }, + "when": { + "north": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/light_gray", + "x": 180 + }, + "when": { + "south": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/light_gray", + "y": 270 + }, + "when": { + "west": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/light_gray", + "y": 90 + }, + "when": { + "east": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/importer", + "x": 90 + }, + "when": { + "direction": "down" + } + }, + { + "apply": { + "model": "refinedstorage2:block/importer", + "x": 270 + }, + "when": { + "direction": "up" + } + }, + { + "apply": { + "model": "refinedstorage2:block/importer" + }, + "when": { + "direction": "north" + } + }, + { + "apply": { + "model": "refinedstorage2:block/importer", + "x": 180 + }, + "when": { + "direction": "south" + } + }, + { + "apply": { + "model": "refinedstorage2:block/importer", + "y": 270 + }, + "when": { + "direction": "west" + } + }, + { + "apply": { + "model": "refinedstorage2:block/importer", + "y": 90 + }, + "when": { + "direction": "east" + } + } + ] +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/lime_cable.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/lime_cable.json new file mode 100644 index 000000000..5b770c0ce --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/lime_cable.json @@ -0,0 +1,62 @@ +{ + "multipart": [ + { + "apply": { + "model": "refinedstorage2:block/cable/core/lime" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/lime", + "x": 90 + }, + "when": { + "down": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/lime", + "x": 270 + }, + "when": { + "up": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/lime" + }, + "when": { + "north": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/lime", + "x": 180 + }, + "when": { + "south": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/lime", + "y": 270 + }, + "when": { + "west": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/lime", + "y": 90 + }, + "when": { + "east": "true" + } + } + ] +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/lime_controller.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/lime_controller.json index 947318f39..b13f7d03a 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/lime_controller.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/lime_controller.json @@ -1,14 +1,14 @@ { "variants": { - "energy_type=off": { - "model": "refinedstorage2:block/controller/off" - }, "energy_type=nearly_off": { "model": "refinedstorage2:block/controller/nearly_off" }, "energy_type=nearly_on": { "model": "refinedstorage2:block/controller/nearly_on" }, + "energy_type=off": { + "model": "refinedstorage2:block/controller/off" + }, "energy_type=on": { "model": "refinedstorage2:block/controller/lime" } diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/lime_crafting_grid.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/lime_crafting_grid.json new file mode 100644 index 000000000..786c942f8 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/lime_crafting_grid.json @@ -0,0 +1,110 @@ +{ + "variants": { + "active=false,direction=down_east": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": 90, + "y": -90 + }, + "active=false,direction=down_north": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": 90 + }, + "active=false,direction=down_south": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": 90, + "y": 180 + }, + "active=false,direction=down_west": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": 90, + "y": 90 + }, + "active=false,direction=east": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "y": 90 + }, + "active=false,direction=north": { + "model": "refinedstorage2:block/crafting_grid/inactive" + }, + "active=false,direction=south": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "y": 180 + }, + "active=false,direction=up_east": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": -90, + "y": -90 + }, + "active=false,direction=up_north": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": -90, + "y": 180 + }, + "active=false,direction=up_south": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": -90 + }, + "active=false,direction=up_west": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": -90, + "y": 90 + }, + "active=false,direction=west": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "y": 270 + }, + "active=true,direction=down_east": { + "model": "refinedstorage2:block/crafting_grid/lime", + "x": 90, + "y": -90 + }, + "active=true,direction=down_north": { + "model": "refinedstorage2:block/crafting_grid/lime", + "x": 90 + }, + "active=true,direction=down_south": { + "model": "refinedstorage2:block/crafting_grid/lime", + "x": 90, + "y": 180 + }, + "active=true,direction=down_west": { + "model": "refinedstorage2:block/crafting_grid/lime", + "x": 90, + "y": 90 + }, + "active=true,direction=east": { + "model": "refinedstorage2:block/crafting_grid/lime", + "y": 90 + }, + "active=true,direction=north": { + "model": "refinedstorage2:block/crafting_grid/lime" + }, + "active=true,direction=south": { + "model": "refinedstorage2:block/crafting_grid/lime", + "y": 180 + }, + "active=true,direction=up_east": { + "model": "refinedstorage2:block/crafting_grid/lime", + "x": -90, + "y": -90 + }, + "active=true,direction=up_north": { + "model": "refinedstorage2:block/crafting_grid/lime", + "x": -90, + "y": 180 + }, + "active=true,direction=up_south": { + "model": "refinedstorage2:block/crafting_grid/lime", + "x": -90 + }, + "active=true,direction=up_west": { + "model": "refinedstorage2:block/crafting_grid/lime", + "x": -90, + "y": 90 + }, + "active=true,direction=west": { + "model": "refinedstorage2:block/crafting_grid/lime", + "y": 270 + } + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/lime_creative_controller.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/lime_creative_controller.json index 947318f39..b13f7d03a 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/lime_creative_controller.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/lime_creative_controller.json @@ -1,14 +1,14 @@ { "variants": { - "energy_type=off": { - "model": "refinedstorage2:block/controller/off" - }, "energy_type=nearly_off": { "model": "refinedstorage2:block/controller/nearly_off" }, "energy_type=nearly_on": { "model": "refinedstorage2:block/controller/nearly_on" }, + "energy_type=off": { + "model": "refinedstorage2:block/controller/off" + }, "energy_type=on": { "model": "refinedstorage2:block/controller/lime" } diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/lime_exporter.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/lime_exporter.json new file mode 100644 index 000000000..67ab89cd8 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/lime_exporter.json @@ -0,0 +1,115 @@ +{ + "multipart": [ + { + "apply": { + "model": "refinedstorage2:block/cable/core/lime" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/lime", + "x": 90 + }, + "when": { + "down": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/lime", + "x": 270 + }, + "when": { + "up": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/lime" + }, + "when": { + "north": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/lime", + "x": 180 + }, + "when": { + "south": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/lime", + "y": 270 + }, + "when": { + "west": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/lime", + "y": 90 + }, + "when": { + "east": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/exporter", + "x": 90 + }, + "when": { + "direction": "down" + } + }, + { + "apply": { + "model": "refinedstorage2:block/exporter", + "x": 270 + }, + "when": { + "direction": "up" + } + }, + { + "apply": { + "model": "refinedstorage2:block/exporter" + }, + "when": { + "direction": "north" + } + }, + { + "apply": { + "model": "refinedstorage2:block/exporter", + "x": 180 + }, + "when": { + "direction": "south" + } + }, + { + "apply": { + "model": "refinedstorage2:block/exporter", + "y": 270 + }, + "when": { + "direction": "west" + } + }, + { + "apply": { + "model": "refinedstorage2:block/exporter", + "y": 90 + }, + "when": { + "direction": "east" + } + } + ] +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/lime_external_storage.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/lime_external_storage.json new file mode 100644 index 000000000..0c64af0de --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/lime_external_storage.json @@ -0,0 +1,115 @@ +{ + "multipart": [ + { + "apply": { + "model": "refinedstorage2:block/cable/core/lime" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/lime", + "x": 90 + }, + "when": { + "down": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/lime", + "x": 270 + }, + "when": { + "up": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/lime" + }, + "when": { + "north": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/lime", + "x": 180 + }, + "when": { + "south": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/lime", + "y": 270 + }, + "when": { + "west": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/lime", + "y": 90 + }, + "when": { + "east": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/external_storage", + "x": 90 + }, + "when": { + "direction": "down" + } + }, + { + "apply": { + "model": "refinedstorage2:block/external_storage", + "x": 270 + }, + "when": { + "direction": "up" + } + }, + { + "apply": { + "model": "refinedstorage2:block/external_storage" + }, + "when": { + "direction": "north" + } + }, + { + "apply": { + "model": "refinedstorage2:block/external_storage", + "x": 180 + }, + "when": { + "direction": "south" + } + }, + { + "apply": { + "model": "refinedstorage2:block/external_storage", + "y": 270 + }, + "when": { + "direction": "west" + } + }, + { + "apply": { + "model": "refinedstorage2:block/external_storage", + "y": 90 + }, + "when": { + "direction": "east" + } + } + ] +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/lime_grid.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/lime_grid.json index f9194277b..418690e39 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/lime_grid.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/lime_grid.json @@ -1,123 +1,109 @@ { "variants": { - "direction=up_north,active=true": { - "model": "refinedstorage2:block/grid/lime", - "x": -90, - "y": 180 + "active=false,direction=down_east": { + "model": "refinedstorage2:block/grid/inactive", + "x": 90, + "y": -90 }, - "direction=up_north,active=false": { + "active=false,direction=down_north": { "model": "refinedstorage2:block/grid/inactive", - "x": -90, + "x": 90 + }, + "active=false,direction=down_south": { + "model": "refinedstorage2:block/grid/inactive", + "x": 90, "y": 180 }, - "direction=up_east,active=true": { - "model": "refinedstorage2:block/grid/lime", - "x": -90, - "y": -90 + "active=false,direction=down_west": { + "model": "refinedstorage2:block/grid/inactive", + "x": 90, + "y": 90 }, - "direction=up_east,active=false": { + "active=false,direction=east": { "model": "refinedstorage2:block/grid/inactive", - "x": -90, - "y": -90 + "y": 90 }, - "direction=up_south,active=true": { - "model": "refinedstorage2:block/grid/lime", - "x": -90, - "y": 0 + "active=false,direction=north": { + "model": "refinedstorage2:block/grid/inactive" }, - "direction=up_south,active=false": { + "active=false,direction=south": { "model": "refinedstorage2:block/grid/inactive", - "x": -90, - "y": 0 + "y": 180 }, - "direction=up_west,active=true": { - "model": "refinedstorage2:block/grid/lime", + "active=false,direction=up_east": { + "model": "refinedstorage2:block/grid/inactive", "x": -90, - "y": 90 + "y": -90 }, - "direction=up_west,active=false": { + "active=false,direction=up_north": { "model": "refinedstorage2:block/grid/inactive", "x": -90, - "y": 90 - }, - "direction=down_north,active=true": { - "model": "refinedstorage2:block/grid/lime", - "x": 90, - "y": 0 + "y": 180 }, - "direction=down_north,active=false": { + "active=false,direction=up_south": { "model": "refinedstorage2:block/grid/inactive", - "x": 90, - "y": 0 + "x": -90 }, - "direction=down_east,active=true": { - "model": "refinedstorage2:block/grid/lime", - "x": 90, + "active=false,direction=up_west": { + "model": "refinedstorage2:block/grid/inactive", + "x": -90, "y": 90 }, - "direction=down_east,active=false": { + "active=false,direction=west": { "model": "refinedstorage2:block/grid/inactive", - "x": 90, - "y": 90 + "y": 270 }, - "direction=down_south,active=true": { + "active=true,direction=down_east": { "model": "refinedstorage2:block/grid/lime", "x": 90, - "y": 180 + "y": -90 }, - "direction=down_south,active=false": { - "model": "refinedstorage2:block/grid/inactive", - "x": 90, - "y": 180 + "active=true,direction=down_north": { + "model": "refinedstorage2:block/grid/lime", + "x": 90 }, - "direction=down_west,active=true": { + "active=true,direction=down_south": { "model": "refinedstorage2:block/grid/lime", "x": 90, - "y": -90 + "y": 180 }, - "direction=down_west,active=false": { - "model": "refinedstorage2:block/grid/inactive", + "active=true,direction=down_west": { + "model": "refinedstorage2:block/grid/lime", "x": 90, - "y": -90 + "y": 90 }, - "direction=north,active=true": { + "active=true,direction=east": { "model": "refinedstorage2:block/grid/lime", - "x": 0, - "y": 0 + "y": 90 }, - "direction=north,active=false": { - "model": "refinedstorage2:block/grid/inactive", - "x": 0, - "y": 0 + "active=true,direction=north": { + "model": "refinedstorage2:block/grid/lime" }, - "direction=east,active=true": { + "active=true,direction=south": { "model": "refinedstorage2:block/grid/lime", - "x": 0, - "y": 90 + "y": 180 }, - "direction=east,active=false": { - "model": "refinedstorage2:block/grid/inactive", - "x": 0, - "y": 90 + "active=true,direction=up_east": { + "model": "refinedstorage2:block/grid/lime", + "x": -90, + "y": -90 }, - "direction=south,active=true": { + "active=true,direction=up_north": { "model": "refinedstorage2:block/grid/lime", - "x": 0, + "x": -90, "y": 180 }, - "direction=south,active=false": { - "model": "refinedstorage2:block/grid/inactive", - "x": 0, - "y": 180 + "active=true,direction=up_south": { + "model": "refinedstorage2:block/grid/lime", + "x": -90 }, - "direction=west,active=true": { + "active=true,direction=up_west": { "model": "refinedstorage2:block/grid/lime", - "x": 0, - "y": 270 + "x": -90, + "y": 90 }, - "direction=west,active=false": { - "model": "refinedstorage2:block/grid/inactive", - "x": 0, + "active=true,direction=west": { + "model": "refinedstorage2:block/grid/lime", "y": 270 } } diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/lime_importer.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/lime_importer.json new file mode 100644 index 000000000..76caad9df --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/lime_importer.json @@ -0,0 +1,115 @@ +{ + "multipart": [ + { + "apply": { + "model": "refinedstorage2:block/cable/core/lime" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/lime", + "x": 90 + }, + "when": { + "down": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/lime", + "x": 270 + }, + "when": { + "up": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/lime" + }, + "when": { + "north": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/lime", + "x": 180 + }, + "when": { + "south": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/lime", + "y": 270 + }, + "when": { + "west": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/lime", + "y": 90 + }, + "when": { + "east": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/importer", + "x": 90 + }, + "when": { + "direction": "down" + } + }, + { + "apply": { + "model": "refinedstorage2:block/importer", + "x": 270 + }, + "when": { + "direction": "up" + } + }, + { + "apply": { + "model": "refinedstorage2:block/importer" + }, + "when": { + "direction": "north" + } + }, + { + "apply": { + "model": "refinedstorage2:block/importer", + "x": 180 + }, + "when": { + "direction": "south" + } + }, + { + "apply": { + "model": "refinedstorage2:block/importer", + "y": 270 + }, + "when": { + "direction": "west" + } + }, + { + "apply": { + "model": "refinedstorage2:block/importer", + "y": 90 + }, + "when": { + "direction": "east" + } + } + ] +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/magenta_cable.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/magenta_cable.json new file mode 100644 index 000000000..31f8984a6 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/magenta_cable.json @@ -0,0 +1,62 @@ +{ + "multipart": [ + { + "apply": { + "model": "refinedstorage2:block/cable/core/magenta" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/magenta", + "x": 90 + }, + "when": { + "down": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/magenta", + "x": 270 + }, + "when": { + "up": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/magenta" + }, + "when": { + "north": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/magenta", + "x": 180 + }, + "when": { + "south": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/magenta", + "y": 270 + }, + "when": { + "west": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/magenta", + "y": 90 + }, + "when": { + "east": "true" + } + } + ] +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/magenta_controller.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/magenta_controller.json index f0cb820e9..5374f4978 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/magenta_controller.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/magenta_controller.json @@ -1,14 +1,14 @@ { "variants": { - "energy_type=off": { - "model": "refinedstorage2:block/controller/off" - }, "energy_type=nearly_off": { "model": "refinedstorage2:block/controller/nearly_off" }, "energy_type=nearly_on": { "model": "refinedstorage2:block/controller/nearly_on" }, + "energy_type=off": { + "model": "refinedstorage2:block/controller/off" + }, "energy_type=on": { "model": "refinedstorage2:block/controller/magenta" } diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/magenta_crafting_grid.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/magenta_crafting_grid.json new file mode 100644 index 000000000..3716e9ec5 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/magenta_crafting_grid.json @@ -0,0 +1,110 @@ +{ + "variants": { + "active=false,direction=down_east": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": 90, + "y": -90 + }, + "active=false,direction=down_north": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": 90 + }, + "active=false,direction=down_south": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": 90, + "y": 180 + }, + "active=false,direction=down_west": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": 90, + "y": 90 + }, + "active=false,direction=east": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "y": 90 + }, + "active=false,direction=north": { + "model": "refinedstorage2:block/crafting_grid/inactive" + }, + "active=false,direction=south": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "y": 180 + }, + "active=false,direction=up_east": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": -90, + "y": -90 + }, + "active=false,direction=up_north": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": -90, + "y": 180 + }, + "active=false,direction=up_south": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": -90 + }, + "active=false,direction=up_west": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": -90, + "y": 90 + }, + "active=false,direction=west": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "y": 270 + }, + "active=true,direction=down_east": { + "model": "refinedstorage2:block/crafting_grid/magenta", + "x": 90, + "y": -90 + }, + "active=true,direction=down_north": { + "model": "refinedstorage2:block/crafting_grid/magenta", + "x": 90 + }, + "active=true,direction=down_south": { + "model": "refinedstorage2:block/crafting_grid/magenta", + "x": 90, + "y": 180 + }, + "active=true,direction=down_west": { + "model": "refinedstorage2:block/crafting_grid/magenta", + "x": 90, + "y": 90 + }, + "active=true,direction=east": { + "model": "refinedstorage2:block/crafting_grid/magenta", + "y": 90 + }, + "active=true,direction=north": { + "model": "refinedstorage2:block/crafting_grid/magenta" + }, + "active=true,direction=south": { + "model": "refinedstorage2:block/crafting_grid/magenta", + "y": 180 + }, + "active=true,direction=up_east": { + "model": "refinedstorage2:block/crafting_grid/magenta", + "x": -90, + "y": -90 + }, + "active=true,direction=up_north": { + "model": "refinedstorage2:block/crafting_grid/magenta", + "x": -90, + "y": 180 + }, + "active=true,direction=up_south": { + "model": "refinedstorage2:block/crafting_grid/magenta", + "x": -90 + }, + "active=true,direction=up_west": { + "model": "refinedstorage2:block/crafting_grid/magenta", + "x": -90, + "y": 90 + }, + "active=true,direction=west": { + "model": "refinedstorage2:block/crafting_grid/magenta", + "y": 270 + } + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/magenta_creative_controller.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/magenta_creative_controller.json index f0cb820e9..5374f4978 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/magenta_creative_controller.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/magenta_creative_controller.json @@ -1,14 +1,14 @@ { "variants": { - "energy_type=off": { - "model": "refinedstorage2:block/controller/off" - }, "energy_type=nearly_off": { "model": "refinedstorage2:block/controller/nearly_off" }, "energy_type=nearly_on": { "model": "refinedstorage2:block/controller/nearly_on" }, + "energy_type=off": { + "model": "refinedstorage2:block/controller/off" + }, "energy_type=on": { "model": "refinedstorage2:block/controller/magenta" } diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/magenta_exporter.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/magenta_exporter.json new file mode 100644 index 000000000..2813cce4d --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/magenta_exporter.json @@ -0,0 +1,115 @@ +{ + "multipart": [ + { + "apply": { + "model": "refinedstorage2:block/cable/core/magenta" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/magenta", + "x": 90 + }, + "when": { + "down": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/magenta", + "x": 270 + }, + "when": { + "up": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/magenta" + }, + "when": { + "north": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/magenta", + "x": 180 + }, + "when": { + "south": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/magenta", + "y": 270 + }, + "when": { + "west": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/magenta", + "y": 90 + }, + "when": { + "east": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/exporter", + "x": 90 + }, + "when": { + "direction": "down" + } + }, + { + "apply": { + "model": "refinedstorage2:block/exporter", + "x": 270 + }, + "when": { + "direction": "up" + } + }, + { + "apply": { + "model": "refinedstorage2:block/exporter" + }, + "when": { + "direction": "north" + } + }, + { + "apply": { + "model": "refinedstorage2:block/exporter", + "x": 180 + }, + "when": { + "direction": "south" + } + }, + { + "apply": { + "model": "refinedstorage2:block/exporter", + "y": 270 + }, + "when": { + "direction": "west" + } + }, + { + "apply": { + "model": "refinedstorage2:block/exporter", + "y": 90 + }, + "when": { + "direction": "east" + } + } + ] +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/magenta_external_storage.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/magenta_external_storage.json new file mode 100644 index 000000000..702fea690 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/magenta_external_storage.json @@ -0,0 +1,115 @@ +{ + "multipart": [ + { + "apply": { + "model": "refinedstorage2:block/cable/core/magenta" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/magenta", + "x": 90 + }, + "when": { + "down": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/magenta", + "x": 270 + }, + "when": { + "up": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/magenta" + }, + "when": { + "north": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/magenta", + "x": 180 + }, + "when": { + "south": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/magenta", + "y": 270 + }, + "when": { + "west": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/magenta", + "y": 90 + }, + "when": { + "east": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/external_storage", + "x": 90 + }, + "when": { + "direction": "down" + } + }, + { + "apply": { + "model": "refinedstorage2:block/external_storage", + "x": 270 + }, + "when": { + "direction": "up" + } + }, + { + "apply": { + "model": "refinedstorage2:block/external_storage" + }, + "when": { + "direction": "north" + } + }, + { + "apply": { + "model": "refinedstorage2:block/external_storage", + "x": 180 + }, + "when": { + "direction": "south" + } + }, + { + "apply": { + "model": "refinedstorage2:block/external_storage", + "y": 270 + }, + "when": { + "direction": "west" + } + }, + { + "apply": { + "model": "refinedstorage2:block/external_storage", + "y": 90 + }, + "when": { + "direction": "east" + } + } + ] +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/magenta_grid.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/magenta_grid.json index f0023ae81..04d3925f2 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/magenta_grid.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/magenta_grid.json @@ -1,123 +1,109 @@ { "variants": { - "direction=up_north,active=true": { - "model": "refinedstorage2:block/grid/magenta", - "x": -90, - "y": 180 + "active=false,direction=down_east": { + "model": "refinedstorage2:block/grid/inactive", + "x": 90, + "y": -90 }, - "direction=up_north,active=false": { + "active=false,direction=down_north": { "model": "refinedstorage2:block/grid/inactive", - "x": -90, + "x": 90 + }, + "active=false,direction=down_south": { + "model": "refinedstorage2:block/grid/inactive", + "x": 90, "y": 180 }, - "direction=up_east,active=true": { - "model": "refinedstorage2:block/grid/magenta", - "x": -90, - "y": -90 + "active=false,direction=down_west": { + "model": "refinedstorage2:block/grid/inactive", + "x": 90, + "y": 90 }, - "direction=up_east,active=false": { + "active=false,direction=east": { "model": "refinedstorage2:block/grid/inactive", - "x": -90, - "y": -90 + "y": 90 }, - "direction=up_south,active=true": { - "model": "refinedstorage2:block/grid/magenta", - "x": -90, - "y": 0 + "active=false,direction=north": { + "model": "refinedstorage2:block/grid/inactive" }, - "direction=up_south,active=false": { + "active=false,direction=south": { "model": "refinedstorage2:block/grid/inactive", - "x": -90, - "y": 0 + "y": 180 }, - "direction=up_west,active=true": { - "model": "refinedstorage2:block/grid/magenta", + "active=false,direction=up_east": { + "model": "refinedstorage2:block/grid/inactive", "x": -90, - "y": 90 + "y": -90 }, - "direction=up_west,active=false": { + "active=false,direction=up_north": { "model": "refinedstorage2:block/grid/inactive", "x": -90, - "y": 90 - }, - "direction=down_north,active=true": { - "model": "refinedstorage2:block/grid/magenta", - "x": 90, - "y": 0 + "y": 180 }, - "direction=down_north,active=false": { + "active=false,direction=up_south": { "model": "refinedstorage2:block/grid/inactive", - "x": 90, - "y": 0 + "x": -90 }, - "direction=down_east,active=true": { - "model": "refinedstorage2:block/grid/magenta", - "x": 90, + "active=false,direction=up_west": { + "model": "refinedstorage2:block/grid/inactive", + "x": -90, "y": 90 }, - "direction=down_east,active=false": { + "active=false,direction=west": { "model": "refinedstorage2:block/grid/inactive", - "x": 90, - "y": 90 + "y": 270 }, - "direction=down_south,active=true": { + "active=true,direction=down_east": { "model": "refinedstorage2:block/grid/magenta", "x": 90, - "y": 180 + "y": -90 }, - "direction=down_south,active=false": { - "model": "refinedstorage2:block/grid/inactive", - "x": 90, - "y": 180 + "active=true,direction=down_north": { + "model": "refinedstorage2:block/grid/magenta", + "x": 90 }, - "direction=down_west,active=true": { + "active=true,direction=down_south": { "model": "refinedstorage2:block/grid/magenta", "x": 90, - "y": -90 + "y": 180 }, - "direction=down_west,active=false": { - "model": "refinedstorage2:block/grid/inactive", + "active=true,direction=down_west": { + "model": "refinedstorage2:block/grid/magenta", "x": 90, - "y": -90 + "y": 90 }, - "direction=north,active=true": { + "active=true,direction=east": { "model": "refinedstorage2:block/grid/magenta", - "x": 0, - "y": 0 + "y": 90 }, - "direction=north,active=false": { - "model": "refinedstorage2:block/grid/inactive", - "x": 0, - "y": 0 + "active=true,direction=north": { + "model": "refinedstorage2:block/grid/magenta" }, - "direction=east,active=true": { + "active=true,direction=south": { "model": "refinedstorage2:block/grid/magenta", - "x": 0, - "y": 90 + "y": 180 }, - "direction=east,active=false": { - "model": "refinedstorage2:block/grid/inactive", - "x": 0, - "y": 90 + "active=true,direction=up_east": { + "model": "refinedstorage2:block/grid/magenta", + "x": -90, + "y": -90 }, - "direction=south,active=true": { + "active=true,direction=up_north": { "model": "refinedstorage2:block/grid/magenta", - "x": 0, + "x": -90, "y": 180 }, - "direction=south,active=false": { - "model": "refinedstorage2:block/grid/inactive", - "x": 0, - "y": 180 + "active=true,direction=up_south": { + "model": "refinedstorage2:block/grid/magenta", + "x": -90 }, - "direction=west,active=true": { + "active=true,direction=up_west": { "model": "refinedstorage2:block/grid/magenta", - "x": 0, - "y": 270 + "x": -90, + "y": 90 }, - "direction=west,active=false": { - "model": "refinedstorage2:block/grid/inactive", - "x": 0, + "active=true,direction=west": { + "model": "refinedstorage2:block/grid/magenta", "y": 270 } } diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/magenta_importer.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/magenta_importer.json new file mode 100644 index 000000000..b7ebc77a9 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/magenta_importer.json @@ -0,0 +1,115 @@ +{ + "multipart": [ + { + "apply": { + "model": "refinedstorage2:block/cable/core/magenta" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/magenta", + "x": 90 + }, + "when": { + "down": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/magenta", + "x": 270 + }, + "when": { + "up": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/magenta" + }, + "when": { + "north": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/magenta", + "x": 180 + }, + "when": { + "south": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/magenta", + "y": 270 + }, + "when": { + "west": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/magenta", + "y": 90 + }, + "when": { + "east": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/importer", + "x": 90 + }, + "when": { + "direction": "down" + } + }, + { + "apply": { + "model": "refinedstorage2:block/importer", + "x": 270 + }, + "when": { + "direction": "up" + } + }, + { + "apply": { + "model": "refinedstorage2:block/importer" + }, + "when": { + "direction": "north" + } + }, + { + "apply": { + "model": "refinedstorage2:block/importer", + "x": 180 + }, + "when": { + "direction": "south" + } + }, + { + "apply": { + "model": "refinedstorage2:block/importer", + "y": 270 + }, + "when": { + "direction": "west" + } + }, + { + "apply": { + "model": "refinedstorage2:block/importer", + "y": 90 + }, + "when": { + "direction": "east" + } + } + ] +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/orange_cable.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/orange_cable.json new file mode 100644 index 000000000..de14ff843 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/orange_cable.json @@ -0,0 +1,62 @@ +{ + "multipart": [ + { + "apply": { + "model": "refinedstorage2:block/cable/core/orange" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/orange", + "x": 90 + }, + "when": { + "down": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/orange", + "x": 270 + }, + "when": { + "up": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/orange" + }, + "when": { + "north": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/orange", + "x": 180 + }, + "when": { + "south": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/orange", + "y": 270 + }, + "when": { + "west": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/orange", + "y": 90 + }, + "when": { + "east": "true" + } + } + ] +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/orange_controller.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/orange_controller.json index 3b50be653..ca28e2ebf 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/orange_controller.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/orange_controller.json @@ -1,14 +1,14 @@ { "variants": { - "energy_type=off": { - "model": "refinedstorage2:block/controller/off" - }, "energy_type=nearly_off": { "model": "refinedstorage2:block/controller/nearly_off" }, "energy_type=nearly_on": { "model": "refinedstorage2:block/controller/nearly_on" }, + "energy_type=off": { + "model": "refinedstorage2:block/controller/off" + }, "energy_type=on": { "model": "refinedstorage2:block/controller/orange" } diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/orange_crafting_grid.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/orange_crafting_grid.json new file mode 100644 index 000000000..0f594ce47 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/orange_crafting_grid.json @@ -0,0 +1,110 @@ +{ + "variants": { + "active=false,direction=down_east": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": 90, + "y": -90 + }, + "active=false,direction=down_north": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": 90 + }, + "active=false,direction=down_south": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": 90, + "y": 180 + }, + "active=false,direction=down_west": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": 90, + "y": 90 + }, + "active=false,direction=east": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "y": 90 + }, + "active=false,direction=north": { + "model": "refinedstorage2:block/crafting_grid/inactive" + }, + "active=false,direction=south": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "y": 180 + }, + "active=false,direction=up_east": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": -90, + "y": -90 + }, + "active=false,direction=up_north": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": -90, + "y": 180 + }, + "active=false,direction=up_south": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": -90 + }, + "active=false,direction=up_west": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": -90, + "y": 90 + }, + "active=false,direction=west": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "y": 270 + }, + "active=true,direction=down_east": { + "model": "refinedstorage2:block/crafting_grid/orange", + "x": 90, + "y": -90 + }, + "active=true,direction=down_north": { + "model": "refinedstorage2:block/crafting_grid/orange", + "x": 90 + }, + "active=true,direction=down_south": { + "model": "refinedstorage2:block/crafting_grid/orange", + "x": 90, + "y": 180 + }, + "active=true,direction=down_west": { + "model": "refinedstorage2:block/crafting_grid/orange", + "x": 90, + "y": 90 + }, + "active=true,direction=east": { + "model": "refinedstorage2:block/crafting_grid/orange", + "y": 90 + }, + "active=true,direction=north": { + "model": "refinedstorage2:block/crafting_grid/orange" + }, + "active=true,direction=south": { + "model": "refinedstorage2:block/crafting_grid/orange", + "y": 180 + }, + "active=true,direction=up_east": { + "model": "refinedstorage2:block/crafting_grid/orange", + "x": -90, + "y": -90 + }, + "active=true,direction=up_north": { + "model": "refinedstorage2:block/crafting_grid/orange", + "x": -90, + "y": 180 + }, + "active=true,direction=up_south": { + "model": "refinedstorage2:block/crafting_grid/orange", + "x": -90 + }, + "active=true,direction=up_west": { + "model": "refinedstorage2:block/crafting_grid/orange", + "x": -90, + "y": 90 + }, + "active=true,direction=west": { + "model": "refinedstorage2:block/crafting_grid/orange", + "y": 270 + } + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/orange_creative_controller.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/orange_creative_controller.json index 3b50be653..ca28e2ebf 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/orange_creative_controller.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/orange_creative_controller.json @@ -1,14 +1,14 @@ { "variants": { - "energy_type=off": { - "model": "refinedstorage2:block/controller/off" - }, "energy_type=nearly_off": { "model": "refinedstorage2:block/controller/nearly_off" }, "energy_type=nearly_on": { "model": "refinedstorage2:block/controller/nearly_on" }, + "energy_type=off": { + "model": "refinedstorage2:block/controller/off" + }, "energy_type=on": { "model": "refinedstorage2:block/controller/orange" } diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/orange_exporter.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/orange_exporter.json new file mode 100644 index 000000000..026c4a17b --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/orange_exporter.json @@ -0,0 +1,115 @@ +{ + "multipart": [ + { + "apply": { + "model": "refinedstorage2:block/cable/core/orange" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/orange", + "x": 90 + }, + "when": { + "down": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/orange", + "x": 270 + }, + "when": { + "up": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/orange" + }, + "when": { + "north": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/orange", + "x": 180 + }, + "when": { + "south": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/orange", + "y": 270 + }, + "when": { + "west": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/orange", + "y": 90 + }, + "when": { + "east": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/exporter", + "x": 90 + }, + "when": { + "direction": "down" + } + }, + { + "apply": { + "model": "refinedstorage2:block/exporter", + "x": 270 + }, + "when": { + "direction": "up" + } + }, + { + "apply": { + "model": "refinedstorage2:block/exporter" + }, + "when": { + "direction": "north" + } + }, + { + "apply": { + "model": "refinedstorage2:block/exporter", + "x": 180 + }, + "when": { + "direction": "south" + } + }, + { + "apply": { + "model": "refinedstorage2:block/exporter", + "y": 270 + }, + "when": { + "direction": "west" + } + }, + { + "apply": { + "model": "refinedstorage2:block/exporter", + "y": 90 + }, + "when": { + "direction": "east" + } + } + ] +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/orange_external_storage.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/orange_external_storage.json new file mode 100644 index 000000000..3a31f4741 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/orange_external_storage.json @@ -0,0 +1,115 @@ +{ + "multipart": [ + { + "apply": { + "model": "refinedstorage2:block/cable/core/orange" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/orange", + "x": 90 + }, + "when": { + "down": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/orange", + "x": 270 + }, + "when": { + "up": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/orange" + }, + "when": { + "north": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/orange", + "x": 180 + }, + "when": { + "south": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/orange", + "y": 270 + }, + "when": { + "west": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/orange", + "y": 90 + }, + "when": { + "east": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/external_storage", + "x": 90 + }, + "when": { + "direction": "down" + } + }, + { + "apply": { + "model": "refinedstorage2:block/external_storage", + "x": 270 + }, + "when": { + "direction": "up" + } + }, + { + "apply": { + "model": "refinedstorage2:block/external_storage" + }, + "when": { + "direction": "north" + } + }, + { + "apply": { + "model": "refinedstorage2:block/external_storage", + "x": 180 + }, + "when": { + "direction": "south" + } + }, + { + "apply": { + "model": "refinedstorage2:block/external_storage", + "y": 270 + }, + "when": { + "direction": "west" + } + }, + { + "apply": { + "model": "refinedstorage2:block/external_storage", + "y": 90 + }, + "when": { + "direction": "east" + } + } + ] +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/orange_grid.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/orange_grid.json index 095503da4..6256cbfcd 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/orange_grid.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/orange_grid.json @@ -1,123 +1,109 @@ { "variants": { - "direction=up_north,active=true": { - "model": "refinedstorage2:block/grid/orange", - "x": -90, - "y": 180 + "active=false,direction=down_east": { + "model": "refinedstorage2:block/grid/inactive", + "x": 90, + "y": -90 }, - "direction=up_north,active=false": { + "active=false,direction=down_north": { "model": "refinedstorage2:block/grid/inactive", - "x": -90, + "x": 90 + }, + "active=false,direction=down_south": { + "model": "refinedstorage2:block/grid/inactive", + "x": 90, "y": 180 }, - "direction=up_east,active=true": { - "model": "refinedstorage2:block/grid/orange", - "x": -90, - "y": -90 + "active=false,direction=down_west": { + "model": "refinedstorage2:block/grid/inactive", + "x": 90, + "y": 90 }, - "direction=up_east,active=false": { + "active=false,direction=east": { "model": "refinedstorage2:block/grid/inactive", - "x": -90, - "y": -90 + "y": 90 }, - "direction=up_south,active=true": { - "model": "refinedstorage2:block/grid/orange", - "x": -90, - "y": 0 + "active=false,direction=north": { + "model": "refinedstorage2:block/grid/inactive" }, - "direction=up_south,active=false": { + "active=false,direction=south": { "model": "refinedstorage2:block/grid/inactive", - "x": -90, - "y": 0 + "y": 180 }, - "direction=up_west,active=true": { - "model": "refinedstorage2:block/grid/orange", + "active=false,direction=up_east": { + "model": "refinedstorage2:block/grid/inactive", "x": -90, - "y": 90 + "y": -90 }, - "direction=up_west,active=false": { + "active=false,direction=up_north": { "model": "refinedstorage2:block/grid/inactive", "x": -90, - "y": 90 - }, - "direction=down_north,active=true": { - "model": "refinedstorage2:block/grid/orange", - "x": 90, - "y": 0 + "y": 180 }, - "direction=down_north,active=false": { + "active=false,direction=up_south": { "model": "refinedstorage2:block/grid/inactive", - "x": 90, - "y": 0 + "x": -90 }, - "direction=down_east,active=true": { - "model": "refinedstorage2:block/grid/orange", - "x": 90, + "active=false,direction=up_west": { + "model": "refinedstorage2:block/grid/inactive", + "x": -90, "y": 90 }, - "direction=down_east,active=false": { + "active=false,direction=west": { "model": "refinedstorage2:block/grid/inactive", - "x": 90, - "y": 90 + "y": 270 }, - "direction=down_south,active=true": { + "active=true,direction=down_east": { "model": "refinedstorage2:block/grid/orange", "x": 90, - "y": 180 + "y": -90 }, - "direction=down_south,active=false": { - "model": "refinedstorage2:block/grid/inactive", - "x": 90, - "y": 180 + "active=true,direction=down_north": { + "model": "refinedstorage2:block/grid/orange", + "x": 90 }, - "direction=down_west,active=true": { + "active=true,direction=down_south": { "model": "refinedstorage2:block/grid/orange", "x": 90, - "y": -90 + "y": 180 }, - "direction=down_west,active=false": { - "model": "refinedstorage2:block/grid/inactive", + "active=true,direction=down_west": { + "model": "refinedstorage2:block/grid/orange", "x": 90, - "y": -90 + "y": 90 }, - "direction=north,active=true": { + "active=true,direction=east": { "model": "refinedstorage2:block/grid/orange", - "x": 0, - "y": 0 + "y": 90 }, - "direction=north,active=false": { - "model": "refinedstorage2:block/grid/inactive", - "x": 0, - "y": 0 + "active=true,direction=north": { + "model": "refinedstorage2:block/grid/orange" }, - "direction=east,active=true": { + "active=true,direction=south": { "model": "refinedstorage2:block/grid/orange", - "x": 0, - "y": 90 + "y": 180 }, - "direction=east,active=false": { - "model": "refinedstorage2:block/grid/inactive", - "x": 0, - "y": 90 + "active=true,direction=up_east": { + "model": "refinedstorage2:block/grid/orange", + "x": -90, + "y": -90 }, - "direction=south,active=true": { + "active=true,direction=up_north": { "model": "refinedstorage2:block/grid/orange", - "x": 0, + "x": -90, "y": 180 }, - "direction=south,active=false": { - "model": "refinedstorage2:block/grid/inactive", - "x": 0, - "y": 180 + "active=true,direction=up_south": { + "model": "refinedstorage2:block/grid/orange", + "x": -90 }, - "direction=west,active=true": { + "active=true,direction=up_west": { "model": "refinedstorage2:block/grid/orange", - "x": 0, - "y": 270 + "x": -90, + "y": 90 }, - "direction=west,active=false": { - "model": "refinedstorage2:block/grid/inactive", - "x": 0, + "active=true,direction=west": { + "model": "refinedstorage2:block/grid/orange", "y": 270 } } diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/orange_importer.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/orange_importer.json new file mode 100644 index 000000000..030e17752 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/orange_importer.json @@ -0,0 +1,115 @@ +{ + "multipart": [ + { + "apply": { + "model": "refinedstorage2:block/cable/core/orange" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/orange", + "x": 90 + }, + "when": { + "down": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/orange", + "x": 270 + }, + "when": { + "up": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/orange" + }, + "when": { + "north": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/orange", + "x": 180 + }, + "when": { + "south": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/orange", + "y": 270 + }, + "when": { + "west": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/orange", + "y": 90 + }, + "when": { + "east": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/importer", + "x": 90 + }, + "when": { + "direction": "down" + } + }, + { + "apply": { + "model": "refinedstorage2:block/importer", + "x": 270 + }, + "when": { + "direction": "up" + } + }, + { + "apply": { + "model": "refinedstorage2:block/importer" + }, + "when": { + "direction": "north" + } + }, + { + "apply": { + "model": "refinedstorage2:block/importer", + "x": 180 + }, + "when": { + "direction": "south" + } + }, + { + "apply": { + "model": "refinedstorage2:block/importer", + "y": 270 + }, + "when": { + "direction": "west" + } + }, + { + "apply": { + "model": "refinedstorage2:block/importer", + "y": 90 + }, + "when": { + "direction": "east" + } + } + ] +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/pink_cable.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/pink_cable.json new file mode 100644 index 000000000..637d7ad06 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/pink_cable.json @@ -0,0 +1,62 @@ +{ + "multipart": [ + { + "apply": { + "model": "refinedstorage2:block/cable/core/pink" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/pink", + "x": 90 + }, + "when": { + "down": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/pink", + "x": 270 + }, + "when": { + "up": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/pink" + }, + "when": { + "north": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/pink", + "x": 180 + }, + "when": { + "south": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/pink", + "y": 270 + }, + "when": { + "west": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/pink", + "y": 90 + }, + "when": { + "east": "true" + } + } + ] +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/pink_controller.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/pink_controller.json index 8e90f1344..fbf1c8e08 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/pink_controller.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/pink_controller.json @@ -1,14 +1,14 @@ { "variants": { - "energy_type=off": { - "model": "refinedstorage2:block/controller/off" - }, "energy_type=nearly_off": { "model": "refinedstorage2:block/controller/nearly_off" }, "energy_type=nearly_on": { "model": "refinedstorage2:block/controller/nearly_on" }, + "energy_type=off": { + "model": "refinedstorage2:block/controller/off" + }, "energy_type=on": { "model": "refinedstorage2:block/controller/pink" } diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/pink_crafting_grid.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/pink_crafting_grid.json new file mode 100644 index 000000000..d3a0ceab2 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/pink_crafting_grid.json @@ -0,0 +1,110 @@ +{ + "variants": { + "active=false,direction=down_east": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": 90, + "y": -90 + }, + "active=false,direction=down_north": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": 90 + }, + "active=false,direction=down_south": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": 90, + "y": 180 + }, + "active=false,direction=down_west": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": 90, + "y": 90 + }, + "active=false,direction=east": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "y": 90 + }, + "active=false,direction=north": { + "model": "refinedstorage2:block/crafting_grid/inactive" + }, + "active=false,direction=south": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "y": 180 + }, + "active=false,direction=up_east": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": -90, + "y": -90 + }, + "active=false,direction=up_north": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": -90, + "y": 180 + }, + "active=false,direction=up_south": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": -90 + }, + "active=false,direction=up_west": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": -90, + "y": 90 + }, + "active=false,direction=west": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "y": 270 + }, + "active=true,direction=down_east": { + "model": "refinedstorage2:block/crafting_grid/pink", + "x": 90, + "y": -90 + }, + "active=true,direction=down_north": { + "model": "refinedstorage2:block/crafting_grid/pink", + "x": 90 + }, + "active=true,direction=down_south": { + "model": "refinedstorage2:block/crafting_grid/pink", + "x": 90, + "y": 180 + }, + "active=true,direction=down_west": { + "model": "refinedstorage2:block/crafting_grid/pink", + "x": 90, + "y": 90 + }, + "active=true,direction=east": { + "model": "refinedstorage2:block/crafting_grid/pink", + "y": 90 + }, + "active=true,direction=north": { + "model": "refinedstorage2:block/crafting_grid/pink" + }, + "active=true,direction=south": { + "model": "refinedstorage2:block/crafting_grid/pink", + "y": 180 + }, + "active=true,direction=up_east": { + "model": "refinedstorage2:block/crafting_grid/pink", + "x": -90, + "y": -90 + }, + "active=true,direction=up_north": { + "model": "refinedstorage2:block/crafting_grid/pink", + "x": -90, + "y": 180 + }, + "active=true,direction=up_south": { + "model": "refinedstorage2:block/crafting_grid/pink", + "x": -90 + }, + "active=true,direction=up_west": { + "model": "refinedstorage2:block/crafting_grid/pink", + "x": -90, + "y": 90 + }, + "active=true,direction=west": { + "model": "refinedstorage2:block/crafting_grid/pink", + "y": 270 + } + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/pink_creative_controller.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/pink_creative_controller.json index 8e90f1344..fbf1c8e08 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/pink_creative_controller.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/pink_creative_controller.json @@ -1,14 +1,14 @@ { "variants": { - "energy_type=off": { - "model": "refinedstorage2:block/controller/off" - }, "energy_type=nearly_off": { "model": "refinedstorage2:block/controller/nearly_off" }, "energy_type=nearly_on": { "model": "refinedstorage2:block/controller/nearly_on" }, + "energy_type=off": { + "model": "refinedstorage2:block/controller/off" + }, "energy_type=on": { "model": "refinedstorage2:block/controller/pink" } diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/pink_exporter.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/pink_exporter.json new file mode 100644 index 000000000..4aa9e9fb7 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/pink_exporter.json @@ -0,0 +1,115 @@ +{ + "multipart": [ + { + "apply": { + "model": "refinedstorage2:block/cable/core/pink" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/pink", + "x": 90 + }, + "when": { + "down": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/pink", + "x": 270 + }, + "when": { + "up": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/pink" + }, + "when": { + "north": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/pink", + "x": 180 + }, + "when": { + "south": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/pink", + "y": 270 + }, + "when": { + "west": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/pink", + "y": 90 + }, + "when": { + "east": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/exporter", + "x": 90 + }, + "when": { + "direction": "down" + } + }, + { + "apply": { + "model": "refinedstorage2:block/exporter", + "x": 270 + }, + "when": { + "direction": "up" + } + }, + { + "apply": { + "model": "refinedstorage2:block/exporter" + }, + "when": { + "direction": "north" + } + }, + { + "apply": { + "model": "refinedstorage2:block/exporter", + "x": 180 + }, + "when": { + "direction": "south" + } + }, + { + "apply": { + "model": "refinedstorage2:block/exporter", + "y": 270 + }, + "when": { + "direction": "west" + } + }, + { + "apply": { + "model": "refinedstorage2:block/exporter", + "y": 90 + }, + "when": { + "direction": "east" + } + } + ] +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/pink_external_storage.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/pink_external_storage.json new file mode 100644 index 000000000..c6e2f92e8 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/pink_external_storage.json @@ -0,0 +1,115 @@ +{ + "multipart": [ + { + "apply": { + "model": "refinedstorage2:block/cable/core/pink" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/pink", + "x": 90 + }, + "when": { + "down": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/pink", + "x": 270 + }, + "when": { + "up": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/pink" + }, + "when": { + "north": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/pink", + "x": 180 + }, + "when": { + "south": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/pink", + "y": 270 + }, + "when": { + "west": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/pink", + "y": 90 + }, + "when": { + "east": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/external_storage", + "x": 90 + }, + "when": { + "direction": "down" + } + }, + { + "apply": { + "model": "refinedstorage2:block/external_storage", + "x": 270 + }, + "when": { + "direction": "up" + } + }, + { + "apply": { + "model": "refinedstorage2:block/external_storage" + }, + "when": { + "direction": "north" + } + }, + { + "apply": { + "model": "refinedstorage2:block/external_storage", + "x": 180 + }, + "when": { + "direction": "south" + } + }, + { + "apply": { + "model": "refinedstorage2:block/external_storage", + "y": 270 + }, + "when": { + "direction": "west" + } + }, + { + "apply": { + "model": "refinedstorage2:block/external_storage", + "y": 90 + }, + "when": { + "direction": "east" + } + } + ] +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/pink_grid.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/pink_grid.json index 6655bad2a..fc281214a 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/pink_grid.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/pink_grid.json @@ -1,123 +1,109 @@ { "variants": { - "direction=up_north,active=true": { - "model": "refinedstorage2:block/grid/pink", - "x": -90, - "y": 180 + "active=false,direction=down_east": { + "model": "refinedstorage2:block/grid/inactive", + "x": 90, + "y": -90 }, - "direction=up_north,active=false": { + "active=false,direction=down_north": { "model": "refinedstorage2:block/grid/inactive", - "x": -90, + "x": 90 + }, + "active=false,direction=down_south": { + "model": "refinedstorage2:block/grid/inactive", + "x": 90, "y": 180 }, - "direction=up_east,active=true": { - "model": "refinedstorage2:block/grid/pink", - "x": -90, - "y": -90 + "active=false,direction=down_west": { + "model": "refinedstorage2:block/grid/inactive", + "x": 90, + "y": 90 }, - "direction=up_east,active=false": { + "active=false,direction=east": { "model": "refinedstorage2:block/grid/inactive", - "x": -90, - "y": -90 + "y": 90 }, - "direction=up_south,active=true": { - "model": "refinedstorage2:block/grid/pink", - "x": -90, - "y": 0 + "active=false,direction=north": { + "model": "refinedstorage2:block/grid/inactive" }, - "direction=up_south,active=false": { + "active=false,direction=south": { "model": "refinedstorage2:block/grid/inactive", - "x": -90, - "y": 0 + "y": 180 }, - "direction=up_west,active=true": { - "model": "refinedstorage2:block/grid/pink", + "active=false,direction=up_east": { + "model": "refinedstorage2:block/grid/inactive", "x": -90, - "y": 90 + "y": -90 }, - "direction=up_west,active=false": { + "active=false,direction=up_north": { "model": "refinedstorage2:block/grid/inactive", "x": -90, - "y": 90 - }, - "direction=down_north,active=true": { - "model": "refinedstorage2:block/grid/pink", - "x": 90, - "y": 0 + "y": 180 }, - "direction=down_north,active=false": { + "active=false,direction=up_south": { "model": "refinedstorage2:block/grid/inactive", - "x": 90, - "y": 0 + "x": -90 }, - "direction=down_east,active=true": { - "model": "refinedstorage2:block/grid/pink", - "x": 90, + "active=false,direction=up_west": { + "model": "refinedstorage2:block/grid/inactive", + "x": -90, "y": 90 }, - "direction=down_east,active=false": { + "active=false,direction=west": { "model": "refinedstorage2:block/grid/inactive", - "x": 90, - "y": 90 + "y": 270 }, - "direction=down_south,active=true": { + "active=true,direction=down_east": { "model": "refinedstorage2:block/grid/pink", "x": 90, - "y": 180 + "y": -90 }, - "direction=down_south,active=false": { - "model": "refinedstorage2:block/grid/inactive", - "x": 90, - "y": 180 + "active=true,direction=down_north": { + "model": "refinedstorage2:block/grid/pink", + "x": 90 }, - "direction=down_west,active=true": { + "active=true,direction=down_south": { "model": "refinedstorage2:block/grid/pink", "x": 90, - "y": -90 + "y": 180 }, - "direction=down_west,active=false": { - "model": "refinedstorage2:block/grid/inactive", + "active=true,direction=down_west": { + "model": "refinedstorage2:block/grid/pink", "x": 90, - "y": -90 + "y": 90 }, - "direction=north,active=true": { + "active=true,direction=east": { "model": "refinedstorage2:block/grid/pink", - "x": 0, - "y": 0 + "y": 90 }, - "direction=north,active=false": { - "model": "refinedstorage2:block/grid/inactive", - "x": 0, - "y": 0 + "active=true,direction=north": { + "model": "refinedstorage2:block/grid/pink" }, - "direction=east,active=true": { + "active=true,direction=south": { "model": "refinedstorage2:block/grid/pink", - "x": 0, - "y": 90 + "y": 180 }, - "direction=east,active=false": { - "model": "refinedstorage2:block/grid/inactive", - "x": 0, - "y": 90 + "active=true,direction=up_east": { + "model": "refinedstorage2:block/grid/pink", + "x": -90, + "y": -90 }, - "direction=south,active=true": { + "active=true,direction=up_north": { "model": "refinedstorage2:block/grid/pink", - "x": 0, + "x": -90, "y": 180 }, - "direction=south,active=false": { - "model": "refinedstorage2:block/grid/inactive", - "x": 0, - "y": 180 + "active=true,direction=up_south": { + "model": "refinedstorage2:block/grid/pink", + "x": -90 }, - "direction=west,active=true": { + "active=true,direction=up_west": { "model": "refinedstorage2:block/grid/pink", - "x": 0, - "y": 270 + "x": -90, + "y": 90 }, - "direction=west,active=false": { - "model": "refinedstorage2:block/grid/inactive", - "x": 0, + "active=true,direction=west": { + "model": "refinedstorage2:block/grid/pink", "y": 270 } } diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/pink_importer.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/pink_importer.json new file mode 100644 index 000000000..ee16e2ff1 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/pink_importer.json @@ -0,0 +1,115 @@ +{ + "multipart": [ + { + "apply": { + "model": "refinedstorage2:block/cable/core/pink" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/pink", + "x": 90 + }, + "when": { + "down": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/pink", + "x": 270 + }, + "when": { + "up": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/pink" + }, + "when": { + "north": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/pink", + "x": 180 + }, + "when": { + "south": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/pink", + "y": 270 + }, + "when": { + "west": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/pink", + "y": 90 + }, + "when": { + "east": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/importer", + "x": 90 + }, + "when": { + "direction": "down" + } + }, + { + "apply": { + "model": "refinedstorage2:block/importer", + "x": 270 + }, + "when": { + "direction": "up" + } + }, + { + "apply": { + "model": "refinedstorage2:block/importer" + }, + "when": { + "direction": "north" + } + }, + { + "apply": { + "model": "refinedstorage2:block/importer", + "x": 180 + }, + "when": { + "direction": "south" + } + }, + { + "apply": { + "model": "refinedstorage2:block/importer", + "y": 270 + }, + "when": { + "direction": "west" + } + }, + { + "apply": { + "model": "refinedstorage2:block/importer", + "y": 90 + }, + "when": { + "direction": "east" + } + } + ] +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/purple_cable.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/purple_cable.json new file mode 100644 index 000000000..5614d04a3 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/purple_cable.json @@ -0,0 +1,62 @@ +{ + "multipart": [ + { + "apply": { + "model": "refinedstorage2:block/cable/core/purple" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/purple", + "x": 90 + }, + "when": { + "down": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/purple", + "x": 270 + }, + "when": { + "up": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/purple" + }, + "when": { + "north": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/purple", + "x": 180 + }, + "when": { + "south": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/purple", + "y": 270 + }, + "when": { + "west": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/purple", + "y": 90 + }, + "when": { + "east": "true" + } + } + ] +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/purple_controller.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/purple_controller.json index 5f39d18ee..b9c46d4b7 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/purple_controller.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/purple_controller.json @@ -1,14 +1,14 @@ { "variants": { - "energy_type=off": { - "model": "refinedstorage2:block/controller/off" - }, "energy_type=nearly_off": { "model": "refinedstorage2:block/controller/nearly_off" }, "energy_type=nearly_on": { "model": "refinedstorage2:block/controller/nearly_on" }, + "energy_type=off": { + "model": "refinedstorage2:block/controller/off" + }, "energy_type=on": { "model": "refinedstorage2:block/controller/purple" } diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/purple_crafting_grid.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/purple_crafting_grid.json new file mode 100644 index 000000000..0334d59a4 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/purple_crafting_grid.json @@ -0,0 +1,110 @@ +{ + "variants": { + "active=false,direction=down_east": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": 90, + "y": -90 + }, + "active=false,direction=down_north": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": 90 + }, + "active=false,direction=down_south": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": 90, + "y": 180 + }, + "active=false,direction=down_west": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": 90, + "y": 90 + }, + "active=false,direction=east": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "y": 90 + }, + "active=false,direction=north": { + "model": "refinedstorage2:block/crafting_grid/inactive" + }, + "active=false,direction=south": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "y": 180 + }, + "active=false,direction=up_east": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": -90, + "y": -90 + }, + "active=false,direction=up_north": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": -90, + "y": 180 + }, + "active=false,direction=up_south": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": -90 + }, + "active=false,direction=up_west": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": -90, + "y": 90 + }, + "active=false,direction=west": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "y": 270 + }, + "active=true,direction=down_east": { + "model": "refinedstorage2:block/crafting_grid/purple", + "x": 90, + "y": -90 + }, + "active=true,direction=down_north": { + "model": "refinedstorage2:block/crafting_grid/purple", + "x": 90 + }, + "active=true,direction=down_south": { + "model": "refinedstorage2:block/crafting_grid/purple", + "x": 90, + "y": 180 + }, + "active=true,direction=down_west": { + "model": "refinedstorage2:block/crafting_grid/purple", + "x": 90, + "y": 90 + }, + "active=true,direction=east": { + "model": "refinedstorage2:block/crafting_grid/purple", + "y": 90 + }, + "active=true,direction=north": { + "model": "refinedstorage2:block/crafting_grid/purple" + }, + "active=true,direction=south": { + "model": "refinedstorage2:block/crafting_grid/purple", + "y": 180 + }, + "active=true,direction=up_east": { + "model": "refinedstorage2:block/crafting_grid/purple", + "x": -90, + "y": -90 + }, + "active=true,direction=up_north": { + "model": "refinedstorage2:block/crafting_grid/purple", + "x": -90, + "y": 180 + }, + "active=true,direction=up_south": { + "model": "refinedstorage2:block/crafting_grid/purple", + "x": -90 + }, + "active=true,direction=up_west": { + "model": "refinedstorage2:block/crafting_grid/purple", + "x": -90, + "y": 90 + }, + "active=true,direction=west": { + "model": "refinedstorage2:block/crafting_grid/purple", + "y": 270 + } + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/purple_creative_controller.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/purple_creative_controller.json index 5f39d18ee..b9c46d4b7 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/purple_creative_controller.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/purple_creative_controller.json @@ -1,14 +1,14 @@ { "variants": { - "energy_type=off": { - "model": "refinedstorage2:block/controller/off" - }, "energy_type=nearly_off": { "model": "refinedstorage2:block/controller/nearly_off" }, "energy_type=nearly_on": { "model": "refinedstorage2:block/controller/nearly_on" }, + "energy_type=off": { + "model": "refinedstorage2:block/controller/off" + }, "energy_type=on": { "model": "refinedstorage2:block/controller/purple" } diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/purple_exporter.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/purple_exporter.json new file mode 100644 index 000000000..c15e1ba89 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/purple_exporter.json @@ -0,0 +1,115 @@ +{ + "multipart": [ + { + "apply": { + "model": "refinedstorage2:block/cable/core/purple" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/purple", + "x": 90 + }, + "when": { + "down": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/purple", + "x": 270 + }, + "when": { + "up": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/purple" + }, + "when": { + "north": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/purple", + "x": 180 + }, + "when": { + "south": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/purple", + "y": 270 + }, + "when": { + "west": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/purple", + "y": 90 + }, + "when": { + "east": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/exporter", + "x": 90 + }, + "when": { + "direction": "down" + } + }, + { + "apply": { + "model": "refinedstorage2:block/exporter", + "x": 270 + }, + "when": { + "direction": "up" + } + }, + { + "apply": { + "model": "refinedstorage2:block/exporter" + }, + "when": { + "direction": "north" + } + }, + { + "apply": { + "model": "refinedstorage2:block/exporter", + "x": 180 + }, + "when": { + "direction": "south" + } + }, + { + "apply": { + "model": "refinedstorage2:block/exporter", + "y": 270 + }, + "when": { + "direction": "west" + } + }, + { + "apply": { + "model": "refinedstorage2:block/exporter", + "y": 90 + }, + "when": { + "direction": "east" + } + } + ] +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/purple_external_storage.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/purple_external_storage.json new file mode 100644 index 000000000..9e8ec7e4e --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/purple_external_storage.json @@ -0,0 +1,115 @@ +{ + "multipart": [ + { + "apply": { + "model": "refinedstorage2:block/cable/core/purple" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/purple", + "x": 90 + }, + "when": { + "down": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/purple", + "x": 270 + }, + "when": { + "up": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/purple" + }, + "when": { + "north": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/purple", + "x": 180 + }, + "when": { + "south": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/purple", + "y": 270 + }, + "when": { + "west": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/purple", + "y": 90 + }, + "when": { + "east": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/external_storage", + "x": 90 + }, + "when": { + "direction": "down" + } + }, + { + "apply": { + "model": "refinedstorage2:block/external_storage", + "x": 270 + }, + "when": { + "direction": "up" + } + }, + { + "apply": { + "model": "refinedstorage2:block/external_storage" + }, + "when": { + "direction": "north" + } + }, + { + "apply": { + "model": "refinedstorage2:block/external_storage", + "x": 180 + }, + "when": { + "direction": "south" + } + }, + { + "apply": { + "model": "refinedstorage2:block/external_storage", + "y": 270 + }, + "when": { + "direction": "west" + } + }, + { + "apply": { + "model": "refinedstorage2:block/external_storage", + "y": 90 + }, + "when": { + "direction": "east" + } + } + ] +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/purple_grid.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/purple_grid.json index f22f63ba4..85f0aa98d 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/purple_grid.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/purple_grid.json @@ -1,123 +1,109 @@ { "variants": { - "direction=up_north,active=true": { - "model": "refinedstorage2:block/grid/purple", - "x": -90, - "y": 180 + "active=false,direction=down_east": { + "model": "refinedstorage2:block/grid/inactive", + "x": 90, + "y": -90 }, - "direction=up_north,active=false": { + "active=false,direction=down_north": { "model": "refinedstorage2:block/grid/inactive", - "x": -90, + "x": 90 + }, + "active=false,direction=down_south": { + "model": "refinedstorage2:block/grid/inactive", + "x": 90, "y": 180 }, - "direction=up_east,active=true": { - "model": "refinedstorage2:block/grid/purple", - "x": -90, - "y": -90 + "active=false,direction=down_west": { + "model": "refinedstorage2:block/grid/inactive", + "x": 90, + "y": 90 }, - "direction=up_east,active=false": { + "active=false,direction=east": { "model": "refinedstorage2:block/grid/inactive", - "x": -90, - "y": -90 + "y": 90 }, - "direction=up_south,active=true": { - "model": "refinedstorage2:block/grid/purple", - "x": -90, - "y": 0 + "active=false,direction=north": { + "model": "refinedstorage2:block/grid/inactive" }, - "direction=up_south,active=false": { + "active=false,direction=south": { "model": "refinedstorage2:block/grid/inactive", - "x": -90, - "y": 0 + "y": 180 }, - "direction=up_west,active=true": { - "model": "refinedstorage2:block/grid/purple", + "active=false,direction=up_east": { + "model": "refinedstorage2:block/grid/inactive", "x": -90, - "y": 90 + "y": -90 }, - "direction=up_west,active=false": { + "active=false,direction=up_north": { "model": "refinedstorage2:block/grid/inactive", "x": -90, - "y": 90 - }, - "direction=down_north,active=true": { - "model": "refinedstorage2:block/grid/purple", - "x": 90, - "y": 0 + "y": 180 }, - "direction=down_north,active=false": { + "active=false,direction=up_south": { "model": "refinedstorage2:block/grid/inactive", - "x": 90, - "y": 0 + "x": -90 }, - "direction=down_east,active=true": { - "model": "refinedstorage2:block/grid/purple", - "x": 90, + "active=false,direction=up_west": { + "model": "refinedstorage2:block/grid/inactive", + "x": -90, "y": 90 }, - "direction=down_east,active=false": { + "active=false,direction=west": { "model": "refinedstorage2:block/grid/inactive", - "x": 90, - "y": 90 + "y": 270 }, - "direction=down_south,active=true": { + "active=true,direction=down_east": { "model": "refinedstorage2:block/grid/purple", "x": 90, - "y": 180 + "y": -90 }, - "direction=down_south,active=false": { - "model": "refinedstorage2:block/grid/inactive", - "x": 90, - "y": 180 + "active=true,direction=down_north": { + "model": "refinedstorage2:block/grid/purple", + "x": 90 }, - "direction=down_west,active=true": { + "active=true,direction=down_south": { "model": "refinedstorage2:block/grid/purple", "x": 90, - "y": -90 + "y": 180 }, - "direction=down_west,active=false": { - "model": "refinedstorage2:block/grid/inactive", + "active=true,direction=down_west": { + "model": "refinedstorage2:block/grid/purple", "x": 90, - "y": -90 + "y": 90 }, - "direction=north,active=true": { + "active=true,direction=east": { "model": "refinedstorage2:block/grid/purple", - "x": 0, - "y": 0 + "y": 90 }, - "direction=north,active=false": { - "model": "refinedstorage2:block/grid/inactive", - "x": 0, - "y": 0 + "active=true,direction=north": { + "model": "refinedstorage2:block/grid/purple" }, - "direction=east,active=true": { + "active=true,direction=south": { "model": "refinedstorage2:block/grid/purple", - "x": 0, - "y": 90 + "y": 180 }, - "direction=east,active=false": { - "model": "refinedstorage2:block/grid/inactive", - "x": 0, - "y": 90 + "active=true,direction=up_east": { + "model": "refinedstorage2:block/grid/purple", + "x": -90, + "y": -90 }, - "direction=south,active=true": { + "active=true,direction=up_north": { "model": "refinedstorage2:block/grid/purple", - "x": 0, + "x": -90, "y": 180 }, - "direction=south,active=false": { - "model": "refinedstorage2:block/grid/inactive", - "x": 0, - "y": 180 + "active=true,direction=up_south": { + "model": "refinedstorage2:block/grid/purple", + "x": -90 }, - "direction=west,active=true": { + "active=true,direction=up_west": { "model": "refinedstorage2:block/grid/purple", - "x": 0, - "y": 270 + "x": -90, + "y": 90 }, - "direction=west,active=false": { - "model": "refinedstorage2:block/grid/inactive", - "x": 0, + "active=true,direction=west": { + "model": "refinedstorage2:block/grid/purple", "y": 270 } } diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/purple_importer.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/purple_importer.json new file mode 100644 index 000000000..283e3ece4 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/purple_importer.json @@ -0,0 +1,115 @@ +{ + "multipart": [ + { + "apply": { + "model": "refinedstorage2:block/cable/core/purple" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/purple", + "x": 90 + }, + "when": { + "down": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/purple", + "x": 270 + }, + "when": { + "up": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/purple" + }, + "when": { + "north": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/purple", + "x": 180 + }, + "when": { + "south": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/purple", + "y": 270 + }, + "when": { + "west": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/purple", + "y": 90 + }, + "when": { + "east": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/importer", + "x": 90 + }, + "when": { + "direction": "down" + } + }, + { + "apply": { + "model": "refinedstorage2:block/importer", + "x": 270 + }, + "when": { + "direction": "up" + } + }, + { + "apply": { + "model": "refinedstorage2:block/importer" + }, + "when": { + "direction": "north" + } + }, + { + "apply": { + "model": "refinedstorage2:block/importer", + "x": 180 + }, + "when": { + "direction": "south" + } + }, + { + "apply": { + "model": "refinedstorage2:block/importer", + "y": 270 + }, + "when": { + "direction": "west" + } + }, + { + "apply": { + "model": "refinedstorage2:block/importer", + "y": 90 + }, + "when": { + "direction": "east" + } + } + ] +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/red_cable.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/red_cable.json new file mode 100644 index 000000000..7e9a478a8 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/red_cable.json @@ -0,0 +1,62 @@ +{ + "multipart": [ + { + "apply": { + "model": "refinedstorage2:block/cable/core/red" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/red", + "x": 90 + }, + "when": { + "down": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/red", + "x": 270 + }, + "when": { + "up": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/red" + }, + "when": { + "north": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/red", + "x": 180 + }, + "when": { + "south": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/red", + "y": 270 + }, + "when": { + "west": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/red", + "y": 90 + }, + "when": { + "east": "true" + } + } + ] +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/red_controller.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/red_controller.json index ae2b241e5..69f95a78d 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/red_controller.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/red_controller.json @@ -1,14 +1,14 @@ { "variants": { - "energy_type=off": { - "model": "refinedstorage2:block/controller/off" - }, "energy_type=nearly_off": { "model": "refinedstorage2:block/controller/nearly_off" }, "energy_type=nearly_on": { "model": "refinedstorage2:block/controller/nearly_on" }, + "energy_type=off": { + "model": "refinedstorage2:block/controller/off" + }, "energy_type=on": { "model": "refinedstorage2:block/controller/red" } diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/red_crafting_grid.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/red_crafting_grid.json new file mode 100644 index 000000000..7ba05a602 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/red_crafting_grid.json @@ -0,0 +1,110 @@ +{ + "variants": { + "active=false,direction=down_east": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": 90, + "y": -90 + }, + "active=false,direction=down_north": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": 90 + }, + "active=false,direction=down_south": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": 90, + "y": 180 + }, + "active=false,direction=down_west": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": 90, + "y": 90 + }, + "active=false,direction=east": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "y": 90 + }, + "active=false,direction=north": { + "model": "refinedstorage2:block/crafting_grid/inactive" + }, + "active=false,direction=south": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "y": 180 + }, + "active=false,direction=up_east": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": -90, + "y": -90 + }, + "active=false,direction=up_north": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": -90, + "y": 180 + }, + "active=false,direction=up_south": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": -90 + }, + "active=false,direction=up_west": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": -90, + "y": 90 + }, + "active=false,direction=west": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "y": 270 + }, + "active=true,direction=down_east": { + "model": "refinedstorage2:block/crafting_grid/red", + "x": 90, + "y": -90 + }, + "active=true,direction=down_north": { + "model": "refinedstorage2:block/crafting_grid/red", + "x": 90 + }, + "active=true,direction=down_south": { + "model": "refinedstorage2:block/crafting_grid/red", + "x": 90, + "y": 180 + }, + "active=true,direction=down_west": { + "model": "refinedstorage2:block/crafting_grid/red", + "x": 90, + "y": 90 + }, + "active=true,direction=east": { + "model": "refinedstorage2:block/crafting_grid/red", + "y": 90 + }, + "active=true,direction=north": { + "model": "refinedstorage2:block/crafting_grid/red" + }, + "active=true,direction=south": { + "model": "refinedstorage2:block/crafting_grid/red", + "y": 180 + }, + "active=true,direction=up_east": { + "model": "refinedstorage2:block/crafting_grid/red", + "x": -90, + "y": -90 + }, + "active=true,direction=up_north": { + "model": "refinedstorage2:block/crafting_grid/red", + "x": -90, + "y": 180 + }, + "active=true,direction=up_south": { + "model": "refinedstorage2:block/crafting_grid/red", + "x": -90 + }, + "active=true,direction=up_west": { + "model": "refinedstorage2:block/crafting_grid/red", + "x": -90, + "y": 90 + }, + "active=true,direction=west": { + "model": "refinedstorage2:block/crafting_grid/red", + "y": 270 + } + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/red_creative_controller.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/red_creative_controller.json index ae2b241e5..69f95a78d 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/red_creative_controller.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/red_creative_controller.json @@ -1,14 +1,14 @@ { "variants": { - "energy_type=off": { - "model": "refinedstorage2:block/controller/off" - }, "energy_type=nearly_off": { "model": "refinedstorage2:block/controller/nearly_off" }, "energy_type=nearly_on": { "model": "refinedstorage2:block/controller/nearly_on" }, + "energy_type=off": { + "model": "refinedstorage2:block/controller/off" + }, "energy_type=on": { "model": "refinedstorage2:block/controller/red" } diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/blockstates/exporter.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/red_exporter.json similarity index 72% rename from refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/blockstates/exporter.json rename to refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/red_exporter.json index 8e8e56f3d..69854d7eb 100644 --- a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/blockstates/exporter.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/red_exporter.json @@ -2,113 +2,113 @@ "multipart": [ { "apply": { - "model": "refinedstorage2:block/cable_core" + "model": "refinedstorage2:block/cable/core/red" } }, { - "when": { - "north": true - }, "apply": { - "model": "refinedstorage2:block/cable_extension" + "model": "refinedstorage2:block/cable/extension/red", + "x": 90 + }, + "when": { + "down": "true" } }, { - "when": { - "east": true - }, "apply": { - "model": "refinedstorage2:block/cable_extension", - "y": 90 + "model": "refinedstorage2:block/cable/extension/red", + "x": 270 + }, + "when": { + "up": "true" } }, { - "when": { - "south": true + "apply": { + "model": "refinedstorage2:block/cable/extension/red" }, + "when": { + "north": "true" + } + }, + { "apply": { - "model": "refinedstorage2:block/cable_extension", + "model": "refinedstorage2:block/cable/extension/red", "x": 180 + }, + "when": { + "south": "true" } }, { - "when": { - "west": true - }, "apply": { - "model": "refinedstorage2:block/cable_extension", + "model": "refinedstorage2:block/cable/extension/red", "y": 270 + }, + "when": { + "west": "true" } }, { - "when": { - "up": true - }, "apply": { - "model": "refinedstorage2:block/cable_extension", - "x": 270 + "model": "refinedstorage2:block/cable/extension/red", + "y": 90 + }, + "when": { + "east": "true" } }, { - "when": { - "down": true - }, "apply": { - "model": "refinedstorage2:block/cable_extension", + "model": "refinedstorage2:block/exporter", "x": 90 + }, + "when": { + "direction": "down" } }, { - "when": { - "direction": "north" - }, "apply": { - "model": "refinedstorage2:block/exporter" + "model": "refinedstorage2:block/exporter", + "x": 270 + }, + "when": { + "direction": "up" } }, { - "when": { - "direction": "east" - }, "apply": { - "model": "refinedstorage2:block/exporter", - "y": 90 + "model": "refinedstorage2:block/exporter" + }, + "when": { + "direction": "north" } }, { - "when": { - "direction": "south" - }, "apply": { "model": "refinedstorage2:block/exporter", "x": 180 + }, + "when": { + "direction": "south" } }, { - "when": { - "direction": "west" - }, "apply": { "model": "refinedstorage2:block/exporter", "y": 270 - } - }, - { - "when": { - "direction": "up" }, - "apply": { - "model": "refinedstorage2:block/exporter", - "x": 270 + "when": { + "direction": "west" } }, { - "when": { - "direction": "down" - }, "apply": { "model": "refinedstorage2:block/exporter", - "x": 90 + "y": 90 + }, + "when": { + "direction": "east" } } ] diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/blockstates/external_storage.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/red_external_storage.json similarity index 72% rename from refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/blockstates/external_storage.json rename to refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/red_external_storage.json index 7d4f81c68..27dcca052 100644 --- a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/blockstates/external_storage.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/red_external_storage.json @@ -2,113 +2,113 @@ "multipart": [ { "apply": { - "model": "refinedstorage2:block/cable_core" + "model": "refinedstorage2:block/cable/core/red" } }, { - "when": { - "north": true - }, "apply": { - "model": "refinedstorage2:block/cable_extension" + "model": "refinedstorage2:block/cable/extension/red", + "x": 90 + }, + "when": { + "down": "true" } }, { - "when": { - "east": true - }, "apply": { - "model": "refinedstorage2:block/cable_extension", - "y": 90 + "model": "refinedstorage2:block/cable/extension/red", + "x": 270 + }, + "when": { + "up": "true" } }, { - "when": { - "south": true + "apply": { + "model": "refinedstorage2:block/cable/extension/red" }, + "when": { + "north": "true" + } + }, + { "apply": { - "model": "refinedstorage2:block/cable_extension", + "model": "refinedstorage2:block/cable/extension/red", "x": 180 + }, + "when": { + "south": "true" } }, { - "when": { - "west": true - }, "apply": { - "model": "refinedstorage2:block/cable_extension", + "model": "refinedstorage2:block/cable/extension/red", "y": 270 + }, + "when": { + "west": "true" } }, { - "when": { - "up": true - }, "apply": { - "model": "refinedstorage2:block/cable_extension", - "x": 270 + "model": "refinedstorage2:block/cable/extension/red", + "y": 90 + }, + "when": { + "east": "true" } }, { - "when": { - "down": true - }, "apply": { - "model": "refinedstorage2:block/cable_extension", + "model": "refinedstorage2:block/external_storage", "x": 90 + }, + "when": { + "direction": "down" } }, { - "when": { - "direction": "north" - }, "apply": { - "model": "refinedstorage2:block/external_storage" + "model": "refinedstorage2:block/external_storage", + "x": 270 + }, + "when": { + "direction": "up" } }, { - "when": { - "direction": "east" - }, "apply": { - "model": "refinedstorage2:block/external_storage", - "y": 90 + "model": "refinedstorage2:block/external_storage" + }, + "when": { + "direction": "north" } }, { - "when": { - "direction": "south" - }, "apply": { "model": "refinedstorage2:block/external_storage", "x": 180 + }, + "when": { + "direction": "south" } }, { - "when": { - "direction": "west" - }, "apply": { "model": "refinedstorage2:block/external_storage", "y": 270 - } - }, - { - "when": { - "direction": "up" }, - "apply": { - "model": "refinedstorage2:block/external_storage", - "x": 270 + "when": { + "direction": "west" } }, { - "when": { - "direction": "down" - }, "apply": { "model": "refinedstorage2:block/external_storage", - "x": 90 + "y": 90 + }, + "when": { + "direction": "east" } } ] diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/red_grid.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/red_grid.json index 4a7ec69db..ed4e880da 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/red_grid.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/red_grid.json @@ -1,123 +1,109 @@ { "variants": { - "direction=up_north,active=true": { - "model": "refinedstorage2:block/grid/red", - "x": -90, - "y": 180 + "active=false,direction=down_east": { + "model": "refinedstorage2:block/grid/inactive", + "x": 90, + "y": -90 }, - "direction=up_north,active=false": { + "active=false,direction=down_north": { "model": "refinedstorage2:block/grid/inactive", - "x": -90, + "x": 90 + }, + "active=false,direction=down_south": { + "model": "refinedstorage2:block/grid/inactive", + "x": 90, "y": 180 }, - "direction=up_east,active=true": { - "model": "refinedstorage2:block/grid/red", - "x": -90, - "y": -90 + "active=false,direction=down_west": { + "model": "refinedstorage2:block/grid/inactive", + "x": 90, + "y": 90 }, - "direction=up_east,active=false": { + "active=false,direction=east": { "model": "refinedstorage2:block/grid/inactive", - "x": -90, - "y": -90 + "y": 90 }, - "direction=up_south,active=true": { - "model": "refinedstorage2:block/grid/red", - "x": -90, - "y": 0 + "active=false,direction=north": { + "model": "refinedstorage2:block/grid/inactive" }, - "direction=up_south,active=false": { + "active=false,direction=south": { "model": "refinedstorage2:block/grid/inactive", - "x": -90, - "y": 0 + "y": 180 }, - "direction=up_west,active=true": { - "model": "refinedstorage2:block/grid/red", + "active=false,direction=up_east": { + "model": "refinedstorage2:block/grid/inactive", "x": -90, - "y": 90 + "y": -90 }, - "direction=up_west,active=false": { + "active=false,direction=up_north": { "model": "refinedstorage2:block/grid/inactive", "x": -90, - "y": 90 - }, - "direction=down_north,active=true": { - "model": "refinedstorage2:block/grid/red", - "x": 90, - "y": 0 + "y": 180 }, - "direction=down_north,active=false": { + "active=false,direction=up_south": { "model": "refinedstorage2:block/grid/inactive", - "x": 90, - "y": 0 + "x": -90 }, - "direction=down_east,active=true": { - "model": "refinedstorage2:block/grid/red", - "x": 90, + "active=false,direction=up_west": { + "model": "refinedstorage2:block/grid/inactive", + "x": -90, "y": 90 }, - "direction=down_east,active=false": { + "active=false,direction=west": { "model": "refinedstorage2:block/grid/inactive", - "x": 90, - "y": 90 + "y": 270 }, - "direction=down_south,active=true": { + "active=true,direction=down_east": { "model": "refinedstorage2:block/grid/red", "x": 90, - "y": 180 + "y": -90 }, - "direction=down_south,active=false": { - "model": "refinedstorage2:block/grid/inactive", - "x": 90, - "y": 180 + "active=true,direction=down_north": { + "model": "refinedstorage2:block/grid/red", + "x": 90 }, - "direction=down_west,active=true": { + "active=true,direction=down_south": { "model": "refinedstorage2:block/grid/red", "x": 90, - "y": -90 + "y": 180 }, - "direction=down_west,active=false": { - "model": "refinedstorage2:block/grid/inactive", + "active=true,direction=down_west": { + "model": "refinedstorage2:block/grid/red", "x": 90, - "y": -90 + "y": 90 }, - "direction=north,active=true": { + "active=true,direction=east": { "model": "refinedstorage2:block/grid/red", - "x": 0, - "y": 0 + "y": 90 }, - "direction=north,active=false": { - "model": "refinedstorage2:block/grid/inactive", - "x": 0, - "y": 0 + "active=true,direction=north": { + "model": "refinedstorage2:block/grid/red" }, - "direction=east,active=true": { + "active=true,direction=south": { "model": "refinedstorage2:block/grid/red", - "x": 0, - "y": 90 + "y": 180 }, - "direction=east,active=false": { - "model": "refinedstorage2:block/grid/inactive", - "x": 0, - "y": 90 + "active=true,direction=up_east": { + "model": "refinedstorage2:block/grid/red", + "x": -90, + "y": -90 }, - "direction=south,active=true": { + "active=true,direction=up_north": { "model": "refinedstorage2:block/grid/red", - "x": 0, + "x": -90, "y": 180 }, - "direction=south,active=false": { - "model": "refinedstorage2:block/grid/inactive", - "x": 0, - "y": 180 + "active=true,direction=up_south": { + "model": "refinedstorage2:block/grid/red", + "x": -90 }, - "direction=west,active=true": { + "active=true,direction=up_west": { "model": "refinedstorage2:block/grid/red", - "x": 0, - "y": 270 + "x": -90, + "y": 90 }, - "direction=west,active=false": { - "model": "refinedstorage2:block/grid/inactive", - "x": 0, + "active=true,direction=west": { + "model": "refinedstorage2:block/grid/red", "y": 270 } } diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/blockstates/importer.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/red_importer.json similarity index 72% rename from refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/blockstates/importer.json rename to refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/red_importer.json index 123c05a35..f9f17228e 100644 --- a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/blockstates/importer.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/red_importer.json @@ -2,113 +2,113 @@ "multipart": [ { "apply": { - "model": "refinedstorage2:block/cable_core" + "model": "refinedstorage2:block/cable/core/red" } }, { - "when": { - "north": true - }, "apply": { - "model": "refinedstorage2:block/cable_extension" + "model": "refinedstorage2:block/cable/extension/red", + "x": 90 + }, + "when": { + "down": "true" } }, { - "when": { - "east": true - }, "apply": { - "model": "refinedstorage2:block/cable_extension", - "y": 90 + "model": "refinedstorage2:block/cable/extension/red", + "x": 270 + }, + "when": { + "up": "true" } }, { - "when": { - "south": true + "apply": { + "model": "refinedstorage2:block/cable/extension/red" }, + "when": { + "north": "true" + } + }, + { "apply": { - "model": "refinedstorage2:block/cable_extension", + "model": "refinedstorage2:block/cable/extension/red", "x": 180 + }, + "when": { + "south": "true" } }, { - "when": { - "west": true - }, "apply": { - "model": "refinedstorage2:block/cable_extension", + "model": "refinedstorage2:block/cable/extension/red", "y": 270 + }, + "when": { + "west": "true" } }, { - "when": { - "up": true - }, "apply": { - "model": "refinedstorage2:block/cable_extension", - "x": 270 + "model": "refinedstorage2:block/cable/extension/red", + "y": 90 + }, + "when": { + "east": "true" } }, { - "when": { - "down": true - }, "apply": { - "model": "refinedstorage2:block/cable_extension", + "model": "refinedstorage2:block/importer", "x": 90 + }, + "when": { + "direction": "down" } }, { - "when": { - "direction": "north" - }, "apply": { - "model": "refinedstorage2:block/importer" + "model": "refinedstorage2:block/importer", + "x": 270 + }, + "when": { + "direction": "up" } }, { - "when": { - "direction": "east" - }, "apply": { - "model": "refinedstorage2:block/importer", - "y": 90 + "model": "refinedstorage2:block/importer" + }, + "when": { + "direction": "north" } }, { - "when": { - "direction": "south" - }, "apply": { "model": "refinedstorage2:block/importer", "x": 180 + }, + "when": { + "direction": "south" } }, { - "when": { - "direction": "west" - }, "apply": { "model": "refinedstorage2:block/importer", "y": 270 - } - }, - { - "when": { - "direction": "up" }, - "apply": { - "model": "refinedstorage2:block/importer", - "x": 270 + "when": { + "direction": "west" } }, { - "when": { - "direction": "down" - }, "apply": { "model": "refinedstorage2:block/importer", - "x": 90 + "y": 90 + }, + "when": { + "direction": "east" } } ] diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/white_cable.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/white_cable.json new file mode 100644 index 000000000..5baf3e4d2 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/white_cable.json @@ -0,0 +1,62 @@ +{ + "multipart": [ + { + "apply": { + "model": "refinedstorage2:block/cable/core/white" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/white", + "x": 90 + }, + "when": { + "down": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/white", + "x": 270 + }, + "when": { + "up": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/white" + }, + "when": { + "north": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/white", + "x": 180 + }, + "when": { + "south": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/white", + "y": 270 + }, + "when": { + "west": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/white", + "y": 90 + }, + "when": { + "east": "true" + } + } + ] +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/white_controller.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/white_controller.json index 3fa31f370..82a1189b5 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/white_controller.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/white_controller.json @@ -1,14 +1,14 @@ { "variants": { - "energy_type=off": { - "model": "refinedstorage2:block/controller/off" - }, "energy_type=nearly_off": { "model": "refinedstorage2:block/controller/nearly_off" }, "energy_type=nearly_on": { "model": "refinedstorage2:block/controller/nearly_on" }, + "energy_type=off": { + "model": "refinedstorage2:block/controller/off" + }, "energy_type=on": { "model": "refinedstorage2:block/controller/white" } diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/white_crafting_grid.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/white_crafting_grid.json new file mode 100644 index 000000000..52fb2479c --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/white_crafting_grid.json @@ -0,0 +1,110 @@ +{ + "variants": { + "active=false,direction=down_east": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": 90, + "y": -90 + }, + "active=false,direction=down_north": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": 90 + }, + "active=false,direction=down_south": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": 90, + "y": 180 + }, + "active=false,direction=down_west": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": 90, + "y": 90 + }, + "active=false,direction=east": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "y": 90 + }, + "active=false,direction=north": { + "model": "refinedstorage2:block/crafting_grid/inactive" + }, + "active=false,direction=south": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "y": 180 + }, + "active=false,direction=up_east": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": -90, + "y": -90 + }, + "active=false,direction=up_north": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": -90, + "y": 180 + }, + "active=false,direction=up_south": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": -90 + }, + "active=false,direction=up_west": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": -90, + "y": 90 + }, + "active=false,direction=west": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "y": 270 + }, + "active=true,direction=down_east": { + "model": "refinedstorage2:block/crafting_grid/white", + "x": 90, + "y": -90 + }, + "active=true,direction=down_north": { + "model": "refinedstorage2:block/crafting_grid/white", + "x": 90 + }, + "active=true,direction=down_south": { + "model": "refinedstorage2:block/crafting_grid/white", + "x": 90, + "y": 180 + }, + "active=true,direction=down_west": { + "model": "refinedstorage2:block/crafting_grid/white", + "x": 90, + "y": 90 + }, + "active=true,direction=east": { + "model": "refinedstorage2:block/crafting_grid/white", + "y": 90 + }, + "active=true,direction=north": { + "model": "refinedstorage2:block/crafting_grid/white" + }, + "active=true,direction=south": { + "model": "refinedstorage2:block/crafting_grid/white", + "y": 180 + }, + "active=true,direction=up_east": { + "model": "refinedstorage2:block/crafting_grid/white", + "x": -90, + "y": -90 + }, + "active=true,direction=up_north": { + "model": "refinedstorage2:block/crafting_grid/white", + "x": -90, + "y": 180 + }, + "active=true,direction=up_south": { + "model": "refinedstorage2:block/crafting_grid/white", + "x": -90 + }, + "active=true,direction=up_west": { + "model": "refinedstorage2:block/crafting_grid/white", + "x": -90, + "y": 90 + }, + "active=true,direction=west": { + "model": "refinedstorage2:block/crafting_grid/white", + "y": 270 + } + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/white_creative_controller.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/white_creative_controller.json index 3fa31f370..82a1189b5 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/white_creative_controller.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/white_creative_controller.json @@ -1,14 +1,14 @@ { "variants": { - "energy_type=off": { - "model": "refinedstorage2:block/controller/off" - }, "energy_type=nearly_off": { "model": "refinedstorage2:block/controller/nearly_off" }, "energy_type=nearly_on": { "model": "refinedstorage2:block/controller/nearly_on" }, + "energy_type=off": { + "model": "refinedstorage2:block/controller/off" + }, "energy_type=on": { "model": "refinedstorage2:block/controller/white" } diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/white_exporter.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/white_exporter.json new file mode 100644 index 000000000..4ffface01 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/white_exporter.json @@ -0,0 +1,115 @@ +{ + "multipart": [ + { + "apply": { + "model": "refinedstorage2:block/cable/core/white" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/white", + "x": 90 + }, + "when": { + "down": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/white", + "x": 270 + }, + "when": { + "up": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/white" + }, + "when": { + "north": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/white", + "x": 180 + }, + "when": { + "south": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/white", + "y": 270 + }, + "when": { + "west": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/white", + "y": 90 + }, + "when": { + "east": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/exporter", + "x": 90 + }, + "when": { + "direction": "down" + } + }, + { + "apply": { + "model": "refinedstorage2:block/exporter", + "x": 270 + }, + "when": { + "direction": "up" + } + }, + { + "apply": { + "model": "refinedstorage2:block/exporter" + }, + "when": { + "direction": "north" + } + }, + { + "apply": { + "model": "refinedstorage2:block/exporter", + "x": 180 + }, + "when": { + "direction": "south" + } + }, + { + "apply": { + "model": "refinedstorage2:block/exporter", + "y": 270 + }, + "when": { + "direction": "west" + } + }, + { + "apply": { + "model": "refinedstorage2:block/exporter", + "y": 90 + }, + "when": { + "direction": "east" + } + } + ] +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/white_external_storage.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/white_external_storage.json new file mode 100644 index 000000000..171ee9cd3 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/white_external_storage.json @@ -0,0 +1,115 @@ +{ + "multipart": [ + { + "apply": { + "model": "refinedstorage2:block/cable/core/white" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/white", + "x": 90 + }, + "when": { + "down": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/white", + "x": 270 + }, + "when": { + "up": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/white" + }, + "when": { + "north": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/white", + "x": 180 + }, + "when": { + "south": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/white", + "y": 270 + }, + "when": { + "west": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/white", + "y": 90 + }, + "when": { + "east": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/external_storage", + "x": 90 + }, + "when": { + "direction": "down" + } + }, + { + "apply": { + "model": "refinedstorage2:block/external_storage", + "x": 270 + }, + "when": { + "direction": "up" + } + }, + { + "apply": { + "model": "refinedstorage2:block/external_storage" + }, + "when": { + "direction": "north" + } + }, + { + "apply": { + "model": "refinedstorage2:block/external_storage", + "x": 180 + }, + "when": { + "direction": "south" + } + }, + { + "apply": { + "model": "refinedstorage2:block/external_storage", + "y": 270 + }, + "when": { + "direction": "west" + } + }, + { + "apply": { + "model": "refinedstorage2:block/external_storage", + "y": 90 + }, + "when": { + "direction": "east" + } + } + ] +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/white_grid.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/white_grid.json index 9ba9c41b2..e173c9b5d 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/white_grid.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/white_grid.json @@ -1,123 +1,109 @@ { "variants": { - "direction=up_north,active=true": { - "model": "refinedstorage2:block/grid/white", - "x": -90, - "y": 180 + "active=false,direction=down_east": { + "model": "refinedstorage2:block/grid/inactive", + "x": 90, + "y": -90 }, - "direction=up_north,active=false": { + "active=false,direction=down_north": { "model": "refinedstorage2:block/grid/inactive", - "x": -90, + "x": 90 + }, + "active=false,direction=down_south": { + "model": "refinedstorage2:block/grid/inactive", + "x": 90, "y": 180 }, - "direction=up_east,active=true": { - "model": "refinedstorage2:block/grid/white", - "x": -90, - "y": -90 + "active=false,direction=down_west": { + "model": "refinedstorage2:block/grid/inactive", + "x": 90, + "y": 90 }, - "direction=up_east,active=false": { + "active=false,direction=east": { "model": "refinedstorage2:block/grid/inactive", - "x": -90, - "y": -90 + "y": 90 }, - "direction=up_south,active=true": { - "model": "refinedstorage2:block/grid/white", - "x": -90, - "y": 0 + "active=false,direction=north": { + "model": "refinedstorage2:block/grid/inactive" }, - "direction=up_south,active=false": { + "active=false,direction=south": { "model": "refinedstorage2:block/grid/inactive", - "x": -90, - "y": 0 + "y": 180 }, - "direction=up_west,active=true": { - "model": "refinedstorage2:block/grid/white", + "active=false,direction=up_east": { + "model": "refinedstorage2:block/grid/inactive", "x": -90, - "y": 90 + "y": -90 }, - "direction=up_west,active=false": { + "active=false,direction=up_north": { "model": "refinedstorage2:block/grid/inactive", "x": -90, - "y": 90 - }, - "direction=down_north,active=true": { - "model": "refinedstorage2:block/grid/white", - "x": 90, - "y": 0 + "y": 180 }, - "direction=down_north,active=false": { + "active=false,direction=up_south": { "model": "refinedstorage2:block/grid/inactive", - "x": 90, - "y": 0 + "x": -90 }, - "direction=down_east,active=true": { - "model": "refinedstorage2:block/grid/white", - "x": 90, + "active=false,direction=up_west": { + "model": "refinedstorage2:block/grid/inactive", + "x": -90, "y": 90 }, - "direction=down_east,active=false": { + "active=false,direction=west": { "model": "refinedstorage2:block/grid/inactive", - "x": 90, - "y": 90 + "y": 270 }, - "direction=down_south,active=true": { + "active=true,direction=down_east": { "model": "refinedstorage2:block/grid/white", "x": 90, - "y": 180 + "y": -90 }, - "direction=down_south,active=false": { - "model": "refinedstorage2:block/grid/inactive", - "x": 90, - "y": 180 + "active=true,direction=down_north": { + "model": "refinedstorage2:block/grid/white", + "x": 90 }, - "direction=down_west,active=true": { + "active=true,direction=down_south": { "model": "refinedstorage2:block/grid/white", "x": 90, - "y": -90 + "y": 180 }, - "direction=down_west,active=false": { - "model": "refinedstorage2:block/grid/inactive", + "active=true,direction=down_west": { + "model": "refinedstorage2:block/grid/white", "x": 90, - "y": -90 + "y": 90 }, - "direction=north,active=true": { + "active=true,direction=east": { "model": "refinedstorage2:block/grid/white", - "x": 0, - "y": 0 + "y": 90 }, - "direction=north,active=false": { - "model": "refinedstorage2:block/grid/inactive", - "x": 0, - "y": 0 + "active=true,direction=north": { + "model": "refinedstorage2:block/grid/white" }, - "direction=east,active=true": { + "active=true,direction=south": { "model": "refinedstorage2:block/grid/white", - "x": 0, - "y": 90 + "y": 180 }, - "direction=east,active=false": { - "model": "refinedstorage2:block/grid/inactive", - "x": 0, - "y": 90 + "active=true,direction=up_east": { + "model": "refinedstorage2:block/grid/white", + "x": -90, + "y": -90 }, - "direction=south,active=true": { + "active=true,direction=up_north": { "model": "refinedstorage2:block/grid/white", - "x": 0, + "x": -90, "y": 180 }, - "direction=south,active=false": { - "model": "refinedstorage2:block/grid/inactive", - "x": 0, - "y": 180 + "active=true,direction=up_south": { + "model": "refinedstorage2:block/grid/white", + "x": -90 }, - "direction=west,active=true": { + "active=true,direction=up_west": { "model": "refinedstorage2:block/grid/white", - "x": 0, - "y": 270 + "x": -90, + "y": 90 }, - "direction=west,active=false": { - "model": "refinedstorage2:block/grid/inactive", - "x": 0, + "active=true,direction=west": { + "model": "refinedstorage2:block/grid/white", "y": 270 } } diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/white_importer.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/white_importer.json new file mode 100644 index 000000000..34a7814e1 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/white_importer.json @@ -0,0 +1,115 @@ +{ + "multipart": [ + { + "apply": { + "model": "refinedstorage2:block/cable/core/white" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/white", + "x": 90 + }, + "when": { + "down": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/white", + "x": 270 + }, + "when": { + "up": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/white" + }, + "when": { + "north": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/white", + "x": 180 + }, + "when": { + "south": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/white", + "y": 270 + }, + "when": { + "west": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/white", + "y": 90 + }, + "when": { + "east": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/importer", + "x": 90 + }, + "when": { + "direction": "down" + } + }, + { + "apply": { + "model": "refinedstorage2:block/importer", + "x": 270 + }, + "when": { + "direction": "up" + } + }, + { + "apply": { + "model": "refinedstorage2:block/importer" + }, + "when": { + "direction": "north" + } + }, + { + "apply": { + "model": "refinedstorage2:block/importer", + "x": 180 + }, + "when": { + "direction": "south" + } + }, + { + "apply": { + "model": "refinedstorage2:block/importer", + "y": 270 + }, + "when": { + "direction": "west" + } + }, + { + "apply": { + "model": "refinedstorage2:block/importer", + "y": 90 + }, + "when": { + "direction": "east" + } + } + ] +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/yellow_cable.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/yellow_cable.json new file mode 100644 index 000000000..394e44beb --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/yellow_cable.json @@ -0,0 +1,62 @@ +{ + "multipart": [ + { + "apply": { + "model": "refinedstorage2:block/cable/core/yellow" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/yellow", + "x": 90 + }, + "when": { + "down": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/yellow", + "x": 270 + }, + "when": { + "up": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/yellow" + }, + "when": { + "north": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/yellow", + "x": 180 + }, + "when": { + "south": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/yellow", + "y": 270 + }, + "when": { + "west": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/yellow", + "y": 90 + }, + "when": { + "east": "true" + } + } + ] +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/yellow_controller.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/yellow_controller.json index 3c1fda11c..c7d0b43e6 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/yellow_controller.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/yellow_controller.json @@ -1,14 +1,14 @@ { "variants": { - "energy_type=off": { - "model": "refinedstorage2:block/controller/off" - }, "energy_type=nearly_off": { "model": "refinedstorage2:block/controller/nearly_off" }, "energy_type=nearly_on": { "model": "refinedstorage2:block/controller/nearly_on" }, + "energy_type=off": { + "model": "refinedstorage2:block/controller/off" + }, "energy_type=on": { "model": "refinedstorage2:block/controller/yellow" } diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/yellow_crafting_grid.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/yellow_crafting_grid.json new file mode 100644 index 000000000..3f4394609 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/yellow_crafting_grid.json @@ -0,0 +1,110 @@ +{ + "variants": { + "active=false,direction=down_east": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": 90, + "y": -90 + }, + "active=false,direction=down_north": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": 90 + }, + "active=false,direction=down_south": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": 90, + "y": 180 + }, + "active=false,direction=down_west": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": 90, + "y": 90 + }, + "active=false,direction=east": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "y": 90 + }, + "active=false,direction=north": { + "model": "refinedstorage2:block/crafting_grid/inactive" + }, + "active=false,direction=south": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "y": 180 + }, + "active=false,direction=up_east": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": -90, + "y": -90 + }, + "active=false,direction=up_north": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": -90, + "y": 180 + }, + "active=false,direction=up_south": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": -90 + }, + "active=false,direction=up_west": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "x": -90, + "y": 90 + }, + "active=false,direction=west": { + "model": "refinedstorage2:block/crafting_grid/inactive", + "y": 270 + }, + "active=true,direction=down_east": { + "model": "refinedstorage2:block/crafting_grid/yellow", + "x": 90, + "y": -90 + }, + "active=true,direction=down_north": { + "model": "refinedstorage2:block/crafting_grid/yellow", + "x": 90 + }, + "active=true,direction=down_south": { + "model": "refinedstorage2:block/crafting_grid/yellow", + "x": 90, + "y": 180 + }, + "active=true,direction=down_west": { + "model": "refinedstorage2:block/crafting_grid/yellow", + "x": 90, + "y": 90 + }, + "active=true,direction=east": { + "model": "refinedstorage2:block/crafting_grid/yellow", + "y": 90 + }, + "active=true,direction=north": { + "model": "refinedstorage2:block/crafting_grid/yellow" + }, + "active=true,direction=south": { + "model": "refinedstorage2:block/crafting_grid/yellow", + "y": 180 + }, + "active=true,direction=up_east": { + "model": "refinedstorage2:block/crafting_grid/yellow", + "x": -90, + "y": -90 + }, + "active=true,direction=up_north": { + "model": "refinedstorage2:block/crafting_grid/yellow", + "x": -90, + "y": 180 + }, + "active=true,direction=up_south": { + "model": "refinedstorage2:block/crafting_grid/yellow", + "x": -90 + }, + "active=true,direction=up_west": { + "model": "refinedstorage2:block/crafting_grid/yellow", + "x": -90, + "y": 90 + }, + "active=true,direction=west": { + "model": "refinedstorage2:block/crafting_grid/yellow", + "y": 270 + } + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/yellow_creative_controller.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/yellow_creative_controller.json index 3c1fda11c..c7d0b43e6 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/yellow_creative_controller.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/yellow_creative_controller.json @@ -1,14 +1,14 @@ { "variants": { - "energy_type=off": { - "model": "refinedstorage2:block/controller/off" - }, "energy_type=nearly_off": { "model": "refinedstorage2:block/controller/nearly_off" }, "energy_type=nearly_on": { "model": "refinedstorage2:block/controller/nearly_on" }, + "energy_type=off": { + "model": "refinedstorage2:block/controller/off" + }, "energy_type=on": { "model": "refinedstorage2:block/controller/yellow" } diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/yellow_exporter.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/yellow_exporter.json new file mode 100644 index 000000000..2b45d8775 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/yellow_exporter.json @@ -0,0 +1,115 @@ +{ + "multipart": [ + { + "apply": { + "model": "refinedstorage2:block/cable/core/yellow" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/yellow", + "x": 90 + }, + "when": { + "down": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/yellow", + "x": 270 + }, + "when": { + "up": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/yellow" + }, + "when": { + "north": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/yellow", + "x": 180 + }, + "when": { + "south": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/yellow", + "y": 270 + }, + "when": { + "west": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/yellow", + "y": 90 + }, + "when": { + "east": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/exporter", + "x": 90 + }, + "when": { + "direction": "down" + } + }, + { + "apply": { + "model": "refinedstorage2:block/exporter", + "x": 270 + }, + "when": { + "direction": "up" + } + }, + { + "apply": { + "model": "refinedstorage2:block/exporter" + }, + "when": { + "direction": "north" + } + }, + { + "apply": { + "model": "refinedstorage2:block/exporter", + "x": 180 + }, + "when": { + "direction": "south" + } + }, + { + "apply": { + "model": "refinedstorage2:block/exporter", + "y": 270 + }, + "when": { + "direction": "west" + } + }, + { + "apply": { + "model": "refinedstorage2:block/exporter", + "y": 90 + }, + "when": { + "direction": "east" + } + } + ] +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/yellow_external_storage.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/yellow_external_storage.json new file mode 100644 index 000000000..793fc5e3d --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/yellow_external_storage.json @@ -0,0 +1,115 @@ +{ + "multipart": [ + { + "apply": { + "model": "refinedstorage2:block/cable/core/yellow" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/yellow", + "x": 90 + }, + "when": { + "down": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/yellow", + "x": 270 + }, + "when": { + "up": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/yellow" + }, + "when": { + "north": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/yellow", + "x": 180 + }, + "when": { + "south": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/yellow", + "y": 270 + }, + "when": { + "west": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/yellow", + "y": 90 + }, + "when": { + "east": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/external_storage", + "x": 90 + }, + "when": { + "direction": "down" + } + }, + { + "apply": { + "model": "refinedstorage2:block/external_storage", + "x": 270 + }, + "when": { + "direction": "up" + } + }, + { + "apply": { + "model": "refinedstorage2:block/external_storage" + }, + "when": { + "direction": "north" + } + }, + { + "apply": { + "model": "refinedstorage2:block/external_storage", + "x": 180 + }, + "when": { + "direction": "south" + } + }, + { + "apply": { + "model": "refinedstorage2:block/external_storage", + "y": 270 + }, + "when": { + "direction": "west" + } + }, + { + "apply": { + "model": "refinedstorage2:block/external_storage", + "y": 90 + }, + "when": { + "direction": "east" + } + } + ] +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/yellow_grid.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/yellow_grid.json index a65f354cb..38c21abb7 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/yellow_grid.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/yellow_grid.json @@ -1,123 +1,109 @@ { "variants": { - "direction=up_north,active=true": { - "model": "refinedstorage2:block/grid/yellow", - "x": -90, - "y": 180 + "active=false,direction=down_east": { + "model": "refinedstorage2:block/grid/inactive", + "x": 90, + "y": -90 }, - "direction=up_north,active=false": { + "active=false,direction=down_north": { "model": "refinedstorage2:block/grid/inactive", - "x": -90, + "x": 90 + }, + "active=false,direction=down_south": { + "model": "refinedstorage2:block/grid/inactive", + "x": 90, "y": 180 }, - "direction=up_east,active=true": { - "model": "refinedstorage2:block/grid/yellow", - "x": -90, - "y": -90 + "active=false,direction=down_west": { + "model": "refinedstorage2:block/grid/inactive", + "x": 90, + "y": 90 }, - "direction=up_east,active=false": { + "active=false,direction=east": { "model": "refinedstorage2:block/grid/inactive", - "x": -90, - "y": -90 + "y": 90 }, - "direction=up_south,active=true": { - "model": "refinedstorage2:block/grid/yellow", - "x": -90, - "y": 0 + "active=false,direction=north": { + "model": "refinedstorage2:block/grid/inactive" }, - "direction=up_south,active=false": { + "active=false,direction=south": { "model": "refinedstorage2:block/grid/inactive", - "x": -90, - "y": 0 + "y": 180 }, - "direction=up_west,active=true": { - "model": "refinedstorage2:block/grid/yellow", + "active=false,direction=up_east": { + "model": "refinedstorage2:block/grid/inactive", "x": -90, - "y": 90 + "y": -90 }, - "direction=up_west,active=false": { + "active=false,direction=up_north": { "model": "refinedstorage2:block/grid/inactive", "x": -90, - "y": 90 - }, - "direction=down_north,active=true": { - "model": "refinedstorage2:block/grid/yellow", - "x": 90, - "y": 0 + "y": 180 }, - "direction=down_north,active=false": { + "active=false,direction=up_south": { "model": "refinedstorage2:block/grid/inactive", - "x": 90, - "y": 0 + "x": -90 }, - "direction=down_east,active=true": { - "model": "refinedstorage2:block/grid/yellow", - "x": 90, + "active=false,direction=up_west": { + "model": "refinedstorage2:block/grid/inactive", + "x": -90, "y": 90 }, - "direction=down_east,active=false": { + "active=false,direction=west": { "model": "refinedstorage2:block/grid/inactive", - "x": 90, - "y": 90 + "y": 270 }, - "direction=down_south,active=true": { + "active=true,direction=down_east": { "model": "refinedstorage2:block/grid/yellow", "x": 90, - "y": 180 + "y": -90 }, - "direction=down_south,active=false": { - "model": "refinedstorage2:block/grid/inactive", - "x": 90, - "y": 180 + "active=true,direction=down_north": { + "model": "refinedstorage2:block/grid/yellow", + "x": 90 }, - "direction=down_west,active=true": { + "active=true,direction=down_south": { "model": "refinedstorage2:block/grid/yellow", "x": 90, - "y": -90 + "y": 180 }, - "direction=down_west,active=false": { - "model": "refinedstorage2:block/grid/inactive", + "active=true,direction=down_west": { + "model": "refinedstorage2:block/grid/yellow", "x": 90, - "y": -90 + "y": 90 }, - "direction=north,active=true": { + "active=true,direction=east": { "model": "refinedstorage2:block/grid/yellow", - "x": 0, - "y": 0 + "y": 90 }, - "direction=north,active=false": { - "model": "refinedstorage2:block/grid/inactive", - "x": 0, - "y": 0 + "active=true,direction=north": { + "model": "refinedstorage2:block/grid/yellow" }, - "direction=east,active=true": { + "active=true,direction=south": { "model": "refinedstorage2:block/grid/yellow", - "x": 0, - "y": 90 + "y": 180 }, - "direction=east,active=false": { - "model": "refinedstorage2:block/grid/inactive", - "x": 0, - "y": 90 + "active=true,direction=up_east": { + "model": "refinedstorage2:block/grid/yellow", + "x": -90, + "y": -90 }, - "direction=south,active=true": { + "active=true,direction=up_north": { "model": "refinedstorage2:block/grid/yellow", - "x": 0, + "x": -90, "y": 180 }, - "direction=south,active=false": { - "model": "refinedstorage2:block/grid/inactive", - "x": 0, - "y": 180 + "active=true,direction=up_south": { + "model": "refinedstorage2:block/grid/yellow", + "x": -90 }, - "direction=west,active=true": { + "active=true,direction=up_west": { "model": "refinedstorage2:block/grid/yellow", - "x": 0, - "y": 270 + "x": -90, + "y": 90 }, - "direction=west,active=false": { - "model": "refinedstorage2:block/grid/inactive", - "x": 0, + "active=true,direction=west": { + "model": "refinedstorage2:block/grid/yellow", "y": 270 } } diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/yellow_importer.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/yellow_importer.json new file mode 100644 index 000000000..1010f9397 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/yellow_importer.json @@ -0,0 +1,115 @@ +{ + "multipart": [ + { + "apply": { + "model": "refinedstorage2:block/cable/core/yellow" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/yellow", + "x": 90 + }, + "when": { + "down": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/yellow", + "x": 270 + }, + "when": { + "up": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/yellow" + }, + "when": { + "north": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/yellow", + "x": 180 + }, + "when": { + "south": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/yellow", + "y": 270 + }, + "when": { + "west": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/cable/extension/yellow", + "y": 90 + }, + "when": { + "east": "true" + } + }, + { + "apply": { + "model": "refinedstorage2:block/importer", + "x": 90 + }, + "when": { + "direction": "down" + } + }, + { + "apply": { + "model": "refinedstorage2:block/importer", + "x": 270 + }, + "when": { + "direction": "up" + } + }, + { + "apply": { + "model": "refinedstorage2:block/importer" + }, + "when": { + "direction": "north" + } + }, + { + "apply": { + "model": "refinedstorage2:block/importer", + "x": 180 + }, + "when": { + "direction": "south" + } + }, + { + "apply": { + "model": "refinedstorage2:block/importer", + "y": 270 + }, + "when": { + "direction": "west" + } + }, + { + "apply": { + "model": "refinedstorage2:block/importer", + "y": 90 + }, + "when": { + "direction": "east" + } + } + ] +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/cable/core/black.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/cable/core/black.json new file mode 100644 index 000000000..60f0301c2 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/cable/core/black.json @@ -0,0 +1,7 @@ +{ + "parent": "refinedstorage2:block/cable/core/base", + "textures": { + "cable": "refinedstorage2:block/cable/black", + "particle": "refinedstorage2:block/cable/black" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/cable/core/blue.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/cable/core/blue.json new file mode 100644 index 000000000..dbbc58708 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/cable/core/blue.json @@ -0,0 +1,7 @@ +{ + "parent": "refinedstorage2:block/cable/core/base", + "textures": { + "cable": "refinedstorage2:block/cable/blue", + "particle": "refinedstorage2:block/cable/blue" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/cable/core/brown.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/cable/core/brown.json new file mode 100644 index 000000000..3052777ba --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/cable/core/brown.json @@ -0,0 +1,7 @@ +{ + "parent": "refinedstorage2:block/cable/core/base", + "textures": { + "cable": "refinedstorage2:block/cable/brown", + "particle": "refinedstorage2:block/cable/brown" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/cable/core/cyan.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/cable/core/cyan.json new file mode 100644 index 000000000..d17ddf875 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/cable/core/cyan.json @@ -0,0 +1,7 @@ +{ + "parent": "refinedstorage2:block/cable/core/base", + "textures": { + "cable": "refinedstorage2:block/cable/cyan", + "particle": "refinedstorage2:block/cable/cyan" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/cable/core/gray.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/cable/core/gray.json new file mode 100644 index 000000000..a5b0db721 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/cable/core/gray.json @@ -0,0 +1,7 @@ +{ + "parent": "refinedstorage2:block/cable/core/base", + "textures": { + "cable": "refinedstorage2:block/cable/gray", + "particle": "refinedstorage2:block/cable/gray" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/cable/core/green.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/cable/core/green.json new file mode 100644 index 000000000..cee4fdb8f --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/cable/core/green.json @@ -0,0 +1,7 @@ +{ + "parent": "refinedstorage2:block/cable/core/base", + "textures": { + "cable": "refinedstorage2:block/cable/green", + "particle": "refinedstorage2:block/cable/green" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/cable/core/light_blue.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/cable/core/light_blue.json new file mode 100644 index 000000000..36d5a4772 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/cable/core/light_blue.json @@ -0,0 +1,7 @@ +{ + "parent": "refinedstorage2:block/cable/core/base", + "textures": { + "cable": "refinedstorage2:block/cable/light_blue", + "particle": "refinedstorage2:block/cable/light_blue" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/cable/core/light_gray.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/cable/core/light_gray.json new file mode 100644 index 000000000..46b570022 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/cable/core/light_gray.json @@ -0,0 +1,7 @@ +{ + "parent": "refinedstorage2:block/cable/core/base", + "textures": { + "cable": "refinedstorage2:block/cable/light_gray", + "particle": "refinedstorage2:block/cable/light_gray" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/cable/core/lime.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/cable/core/lime.json new file mode 100644 index 000000000..7b26e95e9 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/cable/core/lime.json @@ -0,0 +1,7 @@ +{ + "parent": "refinedstorage2:block/cable/core/base", + "textures": { + "cable": "refinedstorage2:block/cable/lime", + "particle": "refinedstorage2:block/cable/lime" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/cable/core/magenta.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/cable/core/magenta.json new file mode 100644 index 000000000..2038f1224 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/cable/core/magenta.json @@ -0,0 +1,7 @@ +{ + "parent": "refinedstorage2:block/cable/core/base", + "textures": { + "cable": "refinedstorage2:block/cable/magenta", + "particle": "refinedstorage2:block/cable/magenta" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/cable/core/orange.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/cable/core/orange.json new file mode 100644 index 000000000..ab3beb360 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/cable/core/orange.json @@ -0,0 +1,7 @@ +{ + "parent": "refinedstorage2:block/cable/core/base", + "textures": { + "cable": "refinedstorage2:block/cable/orange", + "particle": "refinedstorage2:block/cable/orange" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/cable/core/pink.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/cable/core/pink.json new file mode 100644 index 000000000..67fd3a180 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/cable/core/pink.json @@ -0,0 +1,7 @@ +{ + "parent": "refinedstorage2:block/cable/core/base", + "textures": { + "cable": "refinedstorage2:block/cable/pink", + "particle": "refinedstorage2:block/cable/pink" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/cable/core/purple.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/cable/core/purple.json new file mode 100644 index 000000000..4cf4962df --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/cable/core/purple.json @@ -0,0 +1,7 @@ +{ + "parent": "refinedstorage2:block/cable/core/base", + "textures": { + "cable": "refinedstorage2:block/cable/purple", + "particle": "refinedstorage2:block/cable/purple" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/cable/core/red.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/cable/core/red.json new file mode 100644 index 000000000..0db33e8d2 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/cable/core/red.json @@ -0,0 +1,7 @@ +{ + "parent": "refinedstorage2:block/cable/core/base", + "textures": { + "cable": "refinedstorage2:block/cable/red", + "particle": "refinedstorage2:block/cable/red" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/cable/core/white.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/cable/core/white.json new file mode 100644 index 000000000..eb6a4a0f5 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/cable/core/white.json @@ -0,0 +1,7 @@ +{ + "parent": "refinedstorage2:block/cable/core/base", + "textures": { + "cable": "refinedstorage2:block/cable/white", + "particle": "refinedstorage2:block/cable/white" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/cable/core/yellow.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/cable/core/yellow.json new file mode 100644 index 000000000..ed817aff0 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/cable/core/yellow.json @@ -0,0 +1,7 @@ +{ + "parent": "refinedstorage2:block/cable/core/base", + "textures": { + "cable": "refinedstorage2:block/cable/yellow", + "particle": "refinedstorage2:block/cable/yellow" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/cable/extension/black.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/cable/extension/black.json new file mode 100644 index 000000000..a20bece5b --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/cable/extension/black.json @@ -0,0 +1,7 @@ +{ + "parent": "refinedstorage2:block/cable/extension/base", + "textures": { + "cable": "refinedstorage2:block/cable/black", + "particle": "refinedstorage2:block/cable/black" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/cable/extension/blue.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/cable/extension/blue.json new file mode 100644 index 000000000..cfc83c951 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/cable/extension/blue.json @@ -0,0 +1,7 @@ +{ + "parent": "refinedstorage2:block/cable/extension/base", + "textures": { + "cable": "refinedstorage2:block/cable/blue", + "particle": "refinedstorage2:block/cable/blue" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/cable/extension/brown.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/cable/extension/brown.json new file mode 100644 index 000000000..0cf3e2ad3 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/cable/extension/brown.json @@ -0,0 +1,7 @@ +{ + "parent": "refinedstorage2:block/cable/extension/base", + "textures": { + "cable": "refinedstorage2:block/cable/brown", + "particle": "refinedstorage2:block/cable/brown" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/cable/extension/cyan.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/cable/extension/cyan.json new file mode 100644 index 000000000..f30b8c643 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/cable/extension/cyan.json @@ -0,0 +1,7 @@ +{ + "parent": "refinedstorage2:block/cable/extension/base", + "textures": { + "cable": "refinedstorage2:block/cable/cyan", + "particle": "refinedstorage2:block/cable/cyan" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/cable/extension/gray.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/cable/extension/gray.json new file mode 100644 index 000000000..a273b7e78 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/cable/extension/gray.json @@ -0,0 +1,7 @@ +{ + "parent": "refinedstorage2:block/cable/extension/base", + "textures": { + "cable": "refinedstorage2:block/cable/gray", + "particle": "refinedstorage2:block/cable/gray" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/cable/extension/green.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/cable/extension/green.json new file mode 100644 index 000000000..c64fcf1f4 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/cable/extension/green.json @@ -0,0 +1,7 @@ +{ + "parent": "refinedstorage2:block/cable/extension/base", + "textures": { + "cable": "refinedstorage2:block/cable/green", + "particle": "refinedstorage2:block/cable/green" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/cable/extension/light_blue.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/cable/extension/light_blue.json new file mode 100644 index 000000000..6b83e85dd --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/cable/extension/light_blue.json @@ -0,0 +1,7 @@ +{ + "parent": "refinedstorage2:block/cable/extension/base", + "textures": { + "cable": "refinedstorage2:block/cable/light_blue", + "particle": "refinedstorage2:block/cable/light_blue" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/cable/extension/light_gray.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/cable/extension/light_gray.json new file mode 100644 index 000000000..6a92b33b4 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/cable/extension/light_gray.json @@ -0,0 +1,7 @@ +{ + "parent": "refinedstorage2:block/cable/extension/base", + "textures": { + "cable": "refinedstorage2:block/cable/light_gray", + "particle": "refinedstorage2:block/cable/light_gray" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/cable/extension/lime.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/cable/extension/lime.json new file mode 100644 index 000000000..af37b9cf2 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/cable/extension/lime.json @@ -0,0 +1,7 @@ +{ + "parent": "refinedstorage2:block/cable/extension/base", + "textures": { + "cable": "refinedstorage2:block/cable/lime", + "particle": "refinedstorage2:block/cable/lime" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/cable/extension/magenta.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/cable/extension/magenta.json new file mode 100644 index 000000000..5289aca41 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/cable/extension/magenta.json @@ -0,0 +1,7 @@ +{ + "parent": "refinedstorage2:block/cable/extension/base", + "textures": { + "cable": "refinedstorage2:block/cable/magenta", + "particle": "refinedstorage2:block/cable/magenta" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/cable/extension/orange.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/cable/extension/orange.json new file mode 100644 index 000000000..c6d343cb7 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/cable/extension/orange.json @@ -0,0 +1,7 @@ +{ + "parent": "refinedstorage2:block/cable/extension/base", + "textures": { + "cable": "refinedstorage2:block/cable/orange", + "particle": "refinedstorage2:block/cable/orange" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/cable/extension/pink.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/cable/extension/pink.json new file mode 100644 index 000000000..aa7cf8442 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/cable/extension/pink.json @@ -0,0 +1,7 @@ +{ + "parent": "refinedstorage2:block/cable/extension/base", + "textures": { + "cable": "refinedstorage2:block/cable/pink", + "particle": "refinedstorage2:block/cable/pink" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/cable/extension/purple.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/cable/extension/purple.json new file mode 100644 index 000000000..ecdb096eb --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/cable/extension/purple.json @@ -0,0 +1,7 @@ +{ + "parent": "refinedstorage2:block/cable/extension/base", + "textures": { + "cable": "refinedstorage2:block/cable/purple", + "particle": "refinedstorage2:block/cable/purple" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/cable/extension/red.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/cable/extension/red.json new file mode 100644 index 000000000..defc53618 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/cable/extension/red.json @@ -0,0 +1,7 @@ +{ + "parent": "refinedstorage2:block/cable/extension/base", + "textures": { + "cable": "refinedstorage2:block/cable/red", + "particle": "refinedstorage2:block/cable/red" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/cable/extension/white.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/cable/extension/white.json new file mode 100644 index 000000000..c268b06ac --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/cable/extension/white.json @@ -0,0 +1,7 @@ +{ + "parent": "refinedstorage2:block/cable/extension/base", + "textures": { + "cable": "refinedstorage2:block/cable/white", + "particle": "refinedstorage2:block/cable/white" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/cable/extension/yellow.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/cable/extension/yellow.json new file mode 100644 index 000000000..f916c6b63 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/cable/extension/yellow.json @@ -0,0 +1,7 @@ +{ + "parent": "refinedstorage2:block/cable/extension/base", + "textures": { + "cable": "refinedstorage2:block/cable/yellow", + "particle": "refinedstorage2:block/cable/yellow" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/controller/black.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/controller/black.json index edebd3b77..8a0c694e4 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/controller/black.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/controller/black.json @@ -1,8 +1,8 @@ { "parent": "refinedstorage2:block/emissive_all_cutout", "textures": { - "particle": "refinedstorage2:block/controller/off", "all": "refinedstorage2:block/controller/on", - "cutout": "refinedstorage2:block/controller/cutouts/black" + "cutout": "refinedstorage2:block/controller/cutouts/black", + "particle": "refinedstorage2:block/controller/off" } } \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/controller/blue.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/controller/blue.json index 8582abbe6..9456ffbc5 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/controller/blue.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/controller/blue.json @@ -1,8 +1,8 @@ { "parent": "refinedstorage2:block/emissive_all_cutout", "textures": { - "particle": "refinedstorage2:block/controller/off", "all": "refinedstorage2:block/controller/on", - "cutout": "refinedstorage2:block/controller/cutouts/blue" + "cutout": "refinedstorage2:block/controller/cutouts/blue", + "particle": "refinedstorage2:block/controller/off" } } \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/controller/brown.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/controller/brown.json index e0d0720e1..1752fc45a 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/controller/brown.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/controller/brown.json @@ -1,8 +1,8 @@ { "parent": "refinedstorage2:block/emissive_all_cutout", "textures": { - "particle": "refinedstorage2:block/controller/off", "all": "refinedstorage2:block/controller/on", - "cutout": "refinedstorage2:block/controller/cutouts/brown" + "cutout": "refinedstorage2:block/controller/cutouts/brown", + "particle": "refinedstorage2:block/controller/off" } } \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/controller/cyan.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/controller/cyan.json index f6d80338e..b349e5535 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/controller/cyan.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/controller/cyan.json @@ -1,8 +1,8 @@ { "parent": "refinedstorage2:block/emissive_all_cutout", "textures": { - "particle": "refinedstorage2:block/controller/off", "all": "refinedstorage2:block/controller/on", - "cutout": "refinedstorage2:block/controller/cutouts/cyan" + "cutout": "refinedstorage2:block/controller/cutouts/cyan", + "particle": "refinedstorage2:block/controller/off" } } \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/controller/gray.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/controller/gray.json index abfef4463..3a07df71d 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/controller/gray.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/controller/gray.json @@ -1,8 +1,8 @@ { "parent": "refinedstorage2:block/emissive_all_cutout", "textures": { - "particle": "refinedstorage2:block/controller/off", "all": "refinedstorage2:block/controller/on", - "cutout": "refinedstorage2:block/controller/cutouts/gray" + "cutout": "refinedstorage2:block/controller/cutouts/gray", + "particle": "refinedstorage2:block/controller/off" } } \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/controller/green.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/controller/green.json index 9862aa219..4a965bb51 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/controller/green.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/controller/green.json @@ -1,8 +1,8 @@ { "parent": "refinedstorage2:block/emissive_all_cutout", "textures": { - "particle": "refinedstorage2:block/controller/off", "all": "refinedstorage2:block/controller/on", - "cutout": "refinedstorage2:block/controller/cutouts/green" + "cutout": "refinedstorage2:block/controller/cutouts/green", + "particle": "refinedstorage2:block/controller/off" } } \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/controller/light_blue.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/controller/light_blue.json index a55588767..d9023d67e 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/controller/light_blue.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/controller/light_blue.json @@ -1,8 +1,8 @@ { "parent": "refinedstorage2:block/emissive_all_cutout", "textures": { - "particle": "refinedstorage2:block/controller/off", "all": "refinedstorage2:block/controller/on", - "cutout": "refinedstorage2:block/controller/cutouts/light_blue" + "cutout": "refinedstorage2:block/controller/cutouts/light_blue", + "particle": "refinedstorage2:block/controller/off" } } \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/controller/light_gray.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/controller/light_gray.json index 1ee78444f..a7e72218a 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/controller/light_gray.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/controller/light_gray.json @@ -1,8 +1,8 @@ { "parent": "refinedstorage2:block/emissive_all_cutout", "textures": { - "particle": "refinedstorage2:block/controller/off", "all": "refinedstorage2:block/controller/on", - "cutout": "refinedstorage2:block/controller/cutouts/light_gray" + "cutout": "refinedstorage2:block/controller/cutouts/light_gray", + "particle": "refinedstorage2:block/controller/off" } } \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/controller/lime.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/controller/lime.json index 6daff8364..b20f02c33 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/controller/lime.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/controller/lime.json @@ -1,8 +1,8 @@ { "parent": "refinedstorage2:block/emissive_all_cutout", "textures": { - "particle": "refinedstorage2:block/controller/off", "all": "refinedstorage2:block/controller/on", - "cutout": "refinedstorage2:block/controller/cutouts/lime" + "cutout": "refinedstorage2:block/controller/cutouts/lime", + "particle": "refinedstorage2:block/controller/off" } } \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/controller/magenta.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/controller/magenta.json index ff72fabb8..e7a5ab77c 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/controller/magenta.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/controller/magenta.json @@ -1,8 +1,8 @@ { "parent": "refinedstorage2:block/emissive_all_cutout", "textures": { - "particle": "refinedstorage2:block/controller/off", "all": "refinedstorage2:block/controller/on", - "cutout": "refinedstorage2:block/controller/cutouts/magenta" + "cutout": "refinedstorage2:block/controller/cutouts/magenta", + "particle": "refinedstorage2:block/controller/off" } } \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/controller/orange.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/controller/orange.json index d5df0dd6c..bb88fc91c 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/controller/orange.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/controller/orange.json @@ -1,8 +1,8 @@ { "parent": "refinedstorage2:block/emissive_all_cutout", "textures": { - "particle": "refinedstorage2:block/controller/off", "all": "refinedstorage2:block/controller/on", - "cutout": "refinedstorage2:block/controller/cutouts/orange" + "cutout": "refinedstorage2:block/controller/cutouts/orange", + "particle": "refinedstorage2:block/controller/off" } } \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/controller/pink.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/controller/pink.json index 7f1a06c38..21ccc92ff 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/controller/pink.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/controller/pink.json @@ -1,8 +1,8 @@ { "parent": "refinedstorage2:block/emissive_all_cutout", "textures": { - "particle": "refinedstorage2:block/controller/off", "all": "refinedstorage2:block/controller/on", - "cutout": "refinedstorage2:block/controller/cutouts/pink" + "cutout": "refinedstorage2:block/controller/cutouts/pink", + "particle": "refinedstorage2:block/controller/off" } } \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/controller/purple.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/controller/purple.json index f8f42c154..ab50ee257 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/controller/purple.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/controller/purple.json @@ -1,8 +1,8 @@ { "parent": "refinedstorage2:block/emissive_all_cutout", "textures": { - "particle": "refinedstorage2:block/controller/off", "all": "refinedstorage2:block/controller/on", - "cutout": "refinedstorage2:block/controller/cutouts/purple" + "cutout": "refinedstorage2:block/controller/cutouts/purple", + "particle": "refinedstorage2:block/controller/off" } } \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/controller/red.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/controller/red.json index 18ffff375..5fee6dbfb 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/controller/red.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/controller/red.json @@ -1,8 +1,8 @@ { "parent": "refinedstorage2:block/emissive_all_cutout", "textures": { - "particle": "refinedstorage2:block/controller/off", "all": "refinedstorage2:block/controller/on", - "cutout": "refinedstorage2:block/controller/cutouts/red" + "cutout": "refinedstorage2:block/controller/cutouts/red", + "particle": "refinedstorage2:block/controller/off" } } \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/controller/white.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/controller/white.json index d9b36d561..2ed154f70 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/controller/white.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/controller/white.json @@ -1,8 +1,8 @@ { "parent": "refinedstorage2:block/emissive_all_cutout", "textures": { - "particle": "refinedstorage2:block/controller/off", "all": "refinedstorage2:block/controller/on", - "cutout": "refinedstorage2:block/controller/cutouts/white" + "cutout": "refinedstorage2:block/controller/cutouts/white", + "particle": "refinedstorage2:block/controller/off" } } \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/controller/yellow.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/controller/yellow.json index 4b3eb919b..580b93719 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/controller/yellow.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/controller/yellow.json @@ -1,8 +1,8 @@ { "parent": "refinedstorage2:block/emissive_all_cutout", "textures": { - "particle": "refinedstorage2:block/controller/off", "all": "refinedstorage2:block/controller/on", - "cutout": "refinedstorage2:block/controller/cutouts/yellow" + "cutout": "refinedstorage2:block/controller/cutouts/yellow", + "particle": "refinedstorage2:block/controller/off" } } \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/crafting_grid/black.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/crafting_grid/black.json new file mode 100644 index 000000000..9981f236c --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/crafting_grid/black.json @@ -0,0 +1,13 @@ +{ + "parent": "refinedstorage2:block/emissive_north_cutout", + "textures": { + "cutout": "refinedstorage2:block/crafting_grid/cutouts/black", + "down": "refinedstorage2:block/bottom", + "east": "refinedstorage2:block/crafting_grid/right", + "north": "refinedstorage2:block/crafting_grid/front", + "particle": "refinedstorage2:block/crafting_grid/right", + "south": "refinedstorage2:block/crafting_grid/back", + "up": "refinedstorage2:block/crafting_grid/top", + "west": "refinedstorage2:block/crafting_grid/left" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/crafting_grid/blue.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/crafting_grid/blue.json new file mode 100644 index 000000000..91789e98b --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/crafting_grid/blue.json @@ -0,0 +1,13 @@ +{ + "parent": "refinedstorage2:block/emissive_north_cutout", + "textures": { + "cutout": "refinedstorage2:block/crafting_grid/cutouts/blue", + "down": "refinedstorage2:block/bottom", + "east": "refinedstorage2:block/crafting_grid/right", + "north": "refinedstorage2:block/crafting_grid/front", + "particle": "refinedstorage2:block/crafting_grid/right", + "south": "refinedstorage2:block/crafting_grid/back", + "up": "refinedstorage2:block/crafting_grid/top", + "west": "refinedstorage2:block/crafting_grid/left" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/crafting_grid/brown.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/crafting_grid/brown.json new file mode 100644 index 000000000..e0aaa4be8 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/crafting_grid/brown.json @@ -0,0 +1,13 @@ +{ + "parent": "refinedstorage2:block/emissive_north_cutout", + "textures": { + "cutout": "refinedstorage2:block/crafting_grid/cutouts/brown", + "down": "refinedstorage2:block/bottom", + "east": "refinedstorage2:block/crafting_grid/right", + "north": "refinedstorage2:block/crafting_grid/front", + "particle": "refinedstorage2:block/crafting_grid/right", + "south": "refinedstorage2:block/crafting_grid/back", + "up": "refinedstorage2:block/crafting_grid/top", + "west": "refinedstorage2:block/crafting_grid/left" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/crafting_grid/cyan.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/crafting_grid/cyan.json new file mode 100644 index 000000000..a3e205712 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/crafting_grid/cyan.json @@ -0,0 +1,13 @@ +{ + "parent": "refinedstorage2:block/emissive_north_cutout", + "textures": { + "cutout": "refinedstorage2:block/crafting_grid/cutouts/cyan", + "down": "refinedstorage2:block/bottom", + "east": "refinedstorage2:block/crafting_grid/right", + "north": "refinedstorage2:block/crafting_grid/front", + "particle": "refinedstorage2:block/crafting_grid/right", + "south": "refinedstorage2:block/crafting_grid/back", + "up": "refinedstorage2:block/crafting_grid/top", + "west": "refinedstorage2:block/crafting_grid/left" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/crafting_grid/gray.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/crafting_grid/gray.json new file mode 100644 index 000000000..dfca8ee78 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/crafting_grid/gray.json @@ -0,0 +1,13 @@ +{ + "parent": "refinedstorage2:block/emissive_north_cutout", + "textures": { + "cutout": "refinedstorage2:block/crafting_grid/cutouts/gray", + "down": "refinedstorage2:block/bottom", + "east": "refinedstorage2:block/crafting_grid/right", + "north": "refinedstorage2:block/crafting_grid/front", + "particle": "refinedstorage2:block/crafting_grid/right", + "south": "refinedstorage2:block/crafting_grid/back", + "up": "refinedstorage2:block/crafting_grid/top", + "west": "refinedstorage2:block/crafting_grid/left" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/crafting_grid/green.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/crafting_grid/green.json new file mode 100644 index 000000000..3f808e63a --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/crafting_grid/green.json @@ -0,0 +1,13 @@ +{ + "parent": "refinedstorage2:block/emissive_north_cutout", + "textures": { + "cutout": "refinedstorage2:block/crafting_grid/cutouts/green", + "down": "refinedstorage2:block/bottom", + "east": "refinedstorage2:block/crafting_grid/right", + "north": "refinedstorage2:block/crafting_grid/front", + "particle": "refinedstorage2:block/crafting_grid/right", + "south": "refinedstorage2:block/crafting_grid/back", + "up": "refinedstorage2:block/crafting_grid/top", + "west": "refinedstorage2:block/crafting_grid/left" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/crafting_grid/inactive.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/crafting_grid/inactive.json new file mode 100644 index 000000000..295540085 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/crafting_grid/inactive.json @@ -0,0 +1,13 @@ +{ + "parent": "refinedstorage2:block/north_cutout", + "textures": { + "cutout": "refinedstorage2:block/crafting_grid/cutouts/inactive", + "down": "refinedstorage2:block/bottom", + "east": "refinedstorage2:block/crafting_grid/right", + "north": "refinedstorage2:block/crafting_grid/front", + "particle": "refinedstorage2:block/crafting_grid/right", + "south": "refinedstorage2:block/crafting_grid/back", + "up": "refinedstorage2:block/crafting_grid/top", + "west": "refinedstorage2:block/crafting_grid/left" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/crafting_grid/light_blue.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/crafting_grid/light_blue.json new file mode 100644 index 000000000..8cd20a835 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/crafting_grid/light_blue.json @@ -0,0 +1,13 @@ +{ + "parent": "refinedstorage2:block/emissive_north_cutout", + "textures": { + "cutout": "refinedstorage2:block/crafting_grid/cutouts/light_blue", + "down": "refinedstorage2:block/bottom", + "east": "refinedstorage2:block/crafting_grid/right", + "north": "refinedstorage2:block/crafting_grid/front", + "particle": "refinedstorage2:block/crafting_grid/right", + "south": "refinedstorage2:block/crafting_grid/back", + "up": "refinedstorage2:block/crafting_grid/top", + "west": "refinedstorage2:block/crafting_grid/left" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/crafting_grid/light_gray.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/crafting_grid/light_gray.json new file mode 100644 index 000000000..f73a1cffd --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/crafting_grid/light_gray.json @@ -0,0 +1,13 @@ +{ + "parent": "refinedstorage2:block/emissive_north_cutout", + "textures": { + "cutout": "refinedstorage2:block/crafting_grid/cutouts/light_gray", + "down": "refinedstorage2:block/bottom", + "east": "refinedstorage2:block/crafting_grid/right", + "north": "refinedstorage2:block/crafting_grid/front", + "particle": "refinedstorage2:block/crafting_grid/right", + "south": "refinedstorage2:block/crafting_grid/back", + "up": "refinedstorage2:block/crafting_grid/top", + "west": "refinedstorage2:block/crafting_grid/left" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/crafting_grid/lime.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/crafting_grid/lime.json new file mode 100644 index 000000000..75da882fb --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/crafting_grid/lime.json @@ -0,0 +1,13 @@ +{ + "parent": "refinedstorage2:block/emissive_north_cutout", + "textures": { + "cutout": "refinedstorage2:block/crafting_grid/cutouts/lime", + "down": "refinedstorage2:block/bottom", + "east": "refinedstorage2:block/crafting_grid/right", + "north": "refinedstorage2:block/crafting_grid/front", + "particle": "refinedstorage2:block/crafting_grid/right", + "south": "refinedstorage2:block/crafting_grid/back", + "up": "refinedstorage2:block/crafting_grid/top", + "west": "refinedstorage2:block/crafting_grid/left" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/crafting_grid/magenta.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/crafting_grid/magenta.json new file mode 100644 index 000000000..e6b068b5e --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/crafting_grid/magenta.json @@ -0,0 +1,13 @@ +{ + "parent": "refinedstorage2:block/emissive_north_cutout", + "textures": { + "cutout": "refinedstorage2:block/crafting_grid/cutouts/magenta", + "down": "refinedstorage2:block/bottom", + "east": "refinedstorage2:block/crafting_grid/right", + "north": "refinedstorage2:block/crafting_grid/front", + "particle": "refinedstorage2:block/crafting_grid/right", + "south": "refinedstorage2:block/crafting_grid/back", + "up": "refinedstorage2:block/crafting_grid/top", + "west": "refinedstorage2:block/crafting_grid/left" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/crafting_grid/orange.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/crafting_grid/orange.json new file mode 100644 index 000000000..ccb6416a4 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/crafting_grid/orange.json @@ -0,0 +1,13 @@ +{ + "parent": "refinedstorage2:block/emissive_north_cutout", + "textures": { + "cutout": "refinedstorage2:block/crafting_grid/cutouts/orange", + "down": "refinedstorage2:block/bottom", + "east": "refinedstorage2:block/crafting_grid/right", + "north": "refinedstorage2:block/crafting_grid/front", + "particle": "refinedstorage2:block/crafting_grid/right", + "south": "refinedstorage2:block/crafting_grid/back", + "up": "refinedstorage2:block/crafting_grid/top", + "west": "refinedstorage2:block/crafting_grid/left" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/crafting_grid/pink.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/crafting_grid/pink.json new file mode 100644 index 000000000..c45de98b6 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/crafting_grid/pink.json @@ -0,0 +1,13 @@ +{ + "parent": "refinedstorage2:block/emissive_north_cutout", + "textures": { + "cutout": "refinedstorage2:block/crafting_grid/cutouts/pink", + "down": "refinedstorage2:block/bottom", + "east": "refinedstorage2:block/crafting_grid/right", + "north": "refinedstorage2:block/crafting_grid/front", + "particle": "refinedstorage2:block/crafting_grid/right", + "south": "refinedstorage2:block/crafting_grid/back", + "up": "refinedstorage2:block/crafting_grid/top", + "west": "refinedstorage2:block/crafting_grid/left" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/crafting_grid/purple.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/crafting_grid/purple.json new file mode 100644 index 000000000..378fbabe8 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/crafting_grid/purple.json @@ -0,0 +1,13 @@ +{ + "parent": "refinedstorage2:block/emissive_north_cutout", + "textures": { + "cutout": "refinedstorage2:block/crafting_grid/cutouts/purple", + "down": "refinedstorage2:block/bottom", + "east": "refinedstorage2:block/crafting_grid/right", + "north": "refinedstorage2:block/crafting_grid/front", + "particle": "refinedstorage2:block/crafting_grid/right", + "south": "refinedstorage2:block/crafting_grid/back", + "up": "refinedstorage2:block/crafting_grid/top", + "west": "refinedstorage2:block/crafting_grid/left" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/crafting_grid/red.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/crafting_grid/red.json new file mode 100644 index 000000000..d2fd30adc --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/crafting_grid/red.json @@ -0,0 +1,13 @@ +{ + "parent": "refinedstorage2:block/emissive_north_cutout", + "textures": { + "cutout": "refinedstorage2:block/crafting_grid/cutouts/red", + "down": "refinedstorage2:block/bottom", + "east": "refinedstorage2:block/crafting_grid/right", + "north": "refinedstorage2:block/crafting_grid/front", + "particle": "refinedstorage2:block/crafting_grid/right", + "south": "refinedstorage2:block/crafting_grid/back", + "up": "refinedstorage2:block/crafting_grid/top", + "west": "refinedstorage2:block/crafting_grid/left" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/crafting_grid/white.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/crafting_grid/white.json new file mode 100644 index 000000000..8e95a17a4 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/crafting_grid/white.json @@ -0,0 +1,13 @@ +{ + "parent": "refinedstorage2:block/emissive_north_cutout", + "textures": { + "cutout": "refinedstorage2:block/crafting_grid/cutouts/white", + "down": "refinedstorage2:block/bottom", + "east": "refinedstorage2:block/crafting_grid/right", + "north": "refinedstorage2:block/crafting_grid/front", + "particle": "refinedstorage2:block/crafting_grid/right", + "south": "refinedstorage2:block/crafting_grid/back", + "up": "refinedstorage2:block/crafting_grid/top", + "west": "refinedstorage2:block/crafting_grid/left" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/crafting_grid/yellow.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/crafting_grid/yellow.json new file mode 100644 index 000000000..86dd62d41 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/crafting_grid/yellow.json @@ -0,0 +1,13 @@ +{ + "parent": "refinedstorage2:block/emissive_north_cutout", + "textures": { + "cutout": "refinedstorage2:block/crafting_grid/cutouts/yellow", + "down": "refinedstorage2:block/bottom", + "east": "refinedstorage2:block/crafting_grid/right", + "north": "refinedstorage2:block/crafting_grid/front", + "particle": "refinedstorage2:block/crafting_grid/right", + "south": "refinedstorage2:block/crafting_grid/back", + "up": "refinedstorage2:block/crafting_grid/top", + "west": "refinedstorage2:block/crafting_grid/left" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/grid/black.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/grid/black.json index ed4146980..115aee48c 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/grid/black.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/grid/black.json @@ -1,13 +1,13 @@ { "parent": "refinedstorage2:block/emissive_north_cutout", "textures": { - "particle": "refinedstorage2:block/grid/right", - "north": "refinedstorage2:block/grid/front", + "cutout": "refinedstorage2:block/grid/cutouts/black", + "down": "refinedstorage2:block/bottom", "east": "refinedstorage2:block/grid/right", + "north": "refinedstorage2:block/grid/front", + "particle": "refinedstorage2:block/grid/right", "south": "refinedstorage2:block/grid/back", - "west": "refinedstorage2:block/grid/left", "up": "refinedstorage2:block/grid/top", - "down": "refinedstorage2:block/bottom", - "cutout": "refinedstorage2:block/grid/cutouts/black" + "west": "refinedstorage2:block/grid/left" } } \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/grid/blue.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/grid/blue.json index ae135d076..f10c2f8c9 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/grid/blue.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/grid/blue.json @@ -1,13 +1,13 @@ { "parent": "refinedstorage2:block/emissive_north_cutout", "textures": { - "particle": "refinedstorage2:block/grid/right", - "north": "refinedstorage2:block/grid/front", + "cutout": "refinedstorage2:block/grid/cutouts/blue", + "down": "refinedstorage2:block/bottom", "east": "refinedstorage2:block/grid/right", + "north": "refinedstorage2:block/grid/front", + "particle": "refinedstorage2:block/grid/right", "south": "refinedstorage2:block/grid/back", - "west": "refinedstorage2:block/grid/left", "up": "refinedstorage2:block/grid/top", - "down": "refinedstorage2:block/bottom", - "cutout": "refinedstorage2:block/grid/cutouts/blue" + "west": "refinedstorage2:block/grid/left" } } \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/grid/brown.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/grid/brown.json index 0b5d0b707..b4178bd25 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/grid/brown.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/grid/brown.json @@ -1,13 +1,13 @@ { "parent": "refinedstorage2:block/emissive_north_cutout", "textures": { - "particle": "refinedstorage2:block/grid/right", - "north": "refinedstorage2:block/grid/front", + "cutout": "refinedstorage2:block/grid/cutouts/brown", + "down": "refinedstorage2:block/bottom", "east": "refinedstorage2:block/grid/right", + "north": "refinedstorage2:block/grid/front", + "particle": "refinedstorage2:block/grid/right", "south": "refinedstorage2:block/grid/back", - "west": "refinedstorage2:block/grid/left", "up": "refinedstorage2:block/grid/top", - "down": "refinedstorage2:block/bottom", - "cutout": "refinedstorage2:block/grid/cutouts/brown" + "west": "refinedstorage2:block/grid/left" } } \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/grid/cyan.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/grid/cyan.json index 0f53674d5..2b1c394c0 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/grid/cyan.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/grid/cyan.json @@ -1,13 +1,13 @@ { "parent": "refinedstorage2:block/emissive_north_cutout", "textures": { - "particle": "refinedstorage2:block/grid/right", - "north": "refinedstorage2:block/grid/front", + "cutout": "refinedstorage2:block/grid/cutouts/cyan", + "down": "refinedstorage2:block/bottom", "east": "refinedstorage2:block/grid/right", + "north": "refinedstorage2:block/grid/front", + "particle": "refinedstorage2:block/grid/right", "south": "refinedstorage2:block/grid/back", - "west": "refinedstorage2:block/grid/left", "up": "refinedstorage2:block/grid/top", - "down": "refinedstorage2:block/bottom", - "cutout": "refinedstorage2:block/grid/cutouts/cyan" + "west": "refinedstorage2:block/grid/left" } } \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/grid/gray.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/grid/gray.json index ce5b58d46..0e76672ed 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/grid/gray.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/grid/gray.json @@ -1,13 +1,13 @@ { "parent": "refinedstorage2:block/emissive_north_cutout", "textures": { - "particle": "refinedstorage2:block/grid/right", - "north": "refinedstorage2:block/grid/front", + "cutout": "refinedstorage2:block/grid/cutouts/gray", + "down": "refinedstorage2:block/bottom", "east": "refinedstorage2:block/grid/right", + "north": "refinedstorage2:block/grid/front", + "particle": "refinedstorage2:block/grid/right", "south": "refinedstorage2:block/grid/back", - "west": "refinedstorage2:block/grid/left", "up": "refinedstorage2:block/grid/top", - "down": "refinedstorage2:block/bottom", - "cutout": "refinedstorage2:block/grid/cutouts/gray" + "west": "refinedstorage2:block/grid/left" } } \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/grid/green.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/grid/green.json index ce3cc92d4..0fe3cd36a 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/grid/green.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/grid/green.json @@ -1,13 +1,13 @@ { "parent": "refinedstorage2:block/emissive_north_cutout", "textures": { - "particle": "refinedstorage2:block/grid/right", - "north": "refinedstorage2:block/grid/front", + "cutout": "refinedstorage2:block/grid/cutouts/green", + "down": "refinedstorage2:block/bottom", "east": "refinedstorage2:block/grid/right", + "north": "refinedstorage2:block/grid/front", + "particle": "refinedstorage2:block/grid/right", "south": "refinedstorage2:block/grid/back", - "west": "refinedstorage2:block/grid/left", "up": "refinedstorage2:block/grid/top", - "down": "refinedstorage2:block/bottom", - "cutout": "refinedstorage2:block/grid/cutouts/green" + "west": "refinedstorage2:block/grid/left" } } \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/grid/inactive.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/grid/inactive.json index db20d6281..ad5734a24 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/grid/inactive.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/grid/inactive.json @@ -1,13 +1,13 @@ { "parent": "refinedstorage2:block/north_cutout", "textures": { - "particle": "refinedstorage2:block/grid/right", - "north": "refinedstorage2:block/grid/front", + "cutout": "refinedstorage2:block/grid/cutouts/inactive", + "down": "refinedstorage2:block/bottom", "east": "refinedstorage2:block/grid/right", + "north": "refinedstorage2:block/grid/front", + "particle": "refinedstorage2:block/grid/right", "south": "refinedstorage2:block/grid/back", - "west": "refinedstorage2:block/grid/left", "up": "refinedstorage2:block/grid/top", - "down": "refinedstorage2:block/bottom", - "cutout": "refinedstorage2:block/grid/cutouts/inactive" + "west": "refinedstorage2:block/grid/left" } } \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/grid/light_blue.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/grid/light_blue.json index c22821774..5ca5ca047 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/grid/light_blue.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/grid/light_blue.json @@ -1,13 +1,13 @@ { "parent": "refinedstorage2:block/emissive_north_cutout", "textures": { - "particle": "refinedstorage2:block/grid/right", - "north": "refinedstorage2:block/grid/front", + "cutout": "refinedstorage2:block/grid/cutouts/light_blue", + "down": "refinedstorage2:block/bottom", "east": "refinedstorage2:block/grid/right", + "north": "refinedstorage2:block/grid/front", + "particle": "refinedstorage2:block/grid/right", "south": "refinedstorage2:block/grid/back", - "west": "refinedstorage2:block/grid/left", "up": "refinedstorage2:block/grid/top", - "down": "refinedstorage2:block/bottom", - "cutout": "refinedstorage2:block/grid/cutouts/light_blue" + "west": "refinedstorage2:block/grid/left" } } \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/grid/light_gray.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/grid/light_gray.json index d48fda62b..bb3572cbb 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/grid/light_gray.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/grid/light_gray.json @@ -1,13 +1,13 @@ { "parent": "refinedstorage2:block/emissive_north_cutout", "textures": { - "particle": "refinedstorage2:block/grid/right", - "north": "refinedstorage2:block/grid/front", + "cutout": "refinedstorage2:block/grid/cutouts/light_gray", + "down": "refinedstorage2:block/bottom", "east": "refinedstorage2:block/grid/right", + "north": "refinedstorage2:block/grid/front", + "particle": "refinedstorage2:block/grid/right", "south": "refinedstorage2:block/grid/back", - "west": "refinedstorage2:block/grid/left", "up": "refinedstorage2:block/grid/top", - "down": "refinedstorage2:block/bottom", - "cutout": "refinedstorage2:block/grid/cutouts/light_gray" + "west": "refinedstorage2:block/grid/left" } } \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/grid/lime.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/grid/lime.json index 415c0aa7e..b34b75d83 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/grid/lime.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/grid/lime.json @@ -1,13 +1,13 @@ { "parent": "refinedstorage2:block/emissive_north_cutout", "textures": { - "particle": "refinedstorage2:block/grid/right", - "north": "refinedstorage2:block/grid/front", + "cutout": "refinedstorage2:block/grid/cutouts/lime", + "down": "refinedstorage2:block/bottom", "east": "refinedstorage2:block/grid/right", + "north": "refinedstorage2:block/grid/front", + "particle": "refinedstorage2:block/grid/right", "south": "refinedstorage2:block/grid/back", - "west": "refinedstorage2:block/grid/left", "up": "refinedstorage2:block/grid/top", - "down": "refinedstorage2:block/bottom", - "cutout": "refinedstorage2:block/grid/cutouts/lime" + "west": "refinedstorage2:block/grid/left" } } \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/grid/magenta.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/grid/magenta.json index 81badfd88..821b6022e 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/grid/magenta.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/grid/magenta.json @@ -1,13 +1,13 @@ { "parent": "refinedstorage2:block/emissive_north_cutout", "textures": { - "particle": "refinedstorage2:block/grid/right", - "north": "refinedstorage2:block/grid/front", + "cutout": "refinedstorage2:block/grid/cutouts/magenta", + "down": "refinedstorage2:block/bottom", "east": "refinedstorage2:block/grid/right", + "north": "refinedstorage2:block/grid/front", + "particle": "refinedstorage2:block/grid/right", "south": "refinedstorage2:block/grid/back", - "west": "refinedstorage2:block/grid/left", "up": "refinedstorage2:block/grid/top", - "down": "refinedstorage2:block/bottom", - "cutout": "refinedstorage2:block/grid/cutouts/magenta" + "west": "refinedstorage2:block/grid/left" } } \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/grid/orange.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/grid/orange.json index acf933c04..d45d7c01c 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/grid/orange.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/grid/orange.json @@ -1,13 +1,13 @@ { "parent": "refinedstorage2:block/emissive_north_cutout", "textures": { - "particle": "refinedstorage2:block/grid/right", - "north": "refinedstorage2:block/grid/front", + "cutout": "refinedstorage2:block/grid/cutouts/orange", + "down": "refinedstorage2:block/bottom", "east": "refinedstorage2:block/grid/right", + "north": "refinedstorage2:block/grid/front", + "particle": "refinedstorage2:block/grid/right", "south": "refinedstorage2:block/grid/back", - "west": "refinedstorage2:block/grid/left", "up": "refinedstorage2:block/grid/top", - "down": "refinedstorage2:block/bottom", - "cutout": "refinedstorage2:block/grid/cutouts/orange" + "west": "refinedstorage2:block/grid/left" } } \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/grid/pink.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/grid/pink.json index 400e20726..33c421aec 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/grid/pink.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/grid/pink.json @@ -1,13 +1,13 @@ { "parent": "refinedstorage2:block/emissive_north_cutout", "textures": { - "particle": "refinedstorage2:block/grid/right", - "north": "refinedstorage2:block/grid/front", + "cutout": "refinedstorage2:block/grid/cutouts/pink", + "down": "refinedstorage2:block/bottom", "east": "refinedstorage2:block/grid/right", + "north": "refinedstorage2:block/grid/front", + "particle": "refinedstorage2:block/grid/right", "south": "refinedstorage2:block/grid/back", - "west": "refinedstorage2:block/grid/left", "up": "refinedstorage2:block/grid/top", - "down": "refinedstorage2:block/bottom", - "cutout": "refinedstorage2:block/grid/cutouts/pink" + "west": "refinedstorage2:block/grid/left" } } \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/grid/purple.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/grid/purple.json index 6a56ca196..9676a324a 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/grid/purple.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/grid/purple.json @@ -1,13 +1,13 @@ { "parent": "refinedstorage2:block/emissive_north_cutout", "textures": { - "particle": "refinedstorage2:block/grid/right", - "north": "refinedstorage2:block/grid/front", + "cutout": "refinedstorage2:block/grid/cutouts/purple", + "down": "refinedstorage2:block/bottom", "east": "refinedstorage2:block/grid/right", + "north": "refinedstorage2:block/grid/front", + "particle": "refinedstorage2:block/grid/right", "south": "refinedstorage2:block/grid/back", - "west": "refinedstorage2:block/grid/left", "up": "refinedstorage2:block/grid/top", - "down": "refinedstorage2:block/bottom", - "cutout": "refinedstorage2:block/grid/cutouts/purple" + "west": "refinedstorage2:block/grid/left" } } \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/grid/red.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/grid/red.json index c19611656..4d0fda5d2 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/grid/red.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/grid/red.json @@ -1,13 +1,13 @@ { "parent": "refinedstorage2:block/emissive_north_cutout", "textures": { - "particle": "refinedstorage2:block/grid/right", - "north": "refinedstorage2:block/grid/front", + "cutout": "refinedstorage2:block/grid/cutouts/red", + "down": "refinedstorage2:block/bottom", "east": "refinedstorage2:block/grid/right", + "north": "refinedstorage2:block/grid/front", + "particle": "refinedstorage2:block/grid/right", "south": "refinedstorage2:block/grid/back", - "west": "refinedstorage2:block/grid/left", "up": "refinedstorage2:block/grid/top", - "down": "refinedstorage2:block/bottom", - "cutout": "refinedstorage2:block/grid/cutouts/red" + "west": "refinedstorage2:block/grid/left" } } \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/grid/white.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/grid/white.json index 8ad487a70..7b8e7e60e 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/grid/white.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/grid/white.json @@ -1,13 +1,13 @@ { "parent": "refinedstorage2:block/emissive_north_cutout", "textures": { - "particle": "refinedstorage2:block/grid/right", - "north": "refinedstorage2:block/grid/front", + "cutout": "refinedstorage2:block/grid/cutouts/white", + "down": "refinedstorage2:block/bottom", "east": "refinedstorage2:block/grid/right", + "north": "refinedstorage2:block/grid/front", + "particle": "refinedstorage2:block/grid/right", "south": "refinedstorage2:block/grid/back", - "west": "refinedstorage2:block/grid/left", "up": "refinedstorage2:block/grid/top", - "down": "refinedstorage2:block/bottom", - "cutout": "refinedstorage2:block/grid/cutouts/white" + "west": "refinedstorage2:block/grid/left" } } \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/grid/yellow.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/grid/yellow.json index 8020a44b1..d54628989 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/grid/yellow.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/grid/yellow.json @@ -1,13 +1,13 @@ { "parent": "refinedstorage2:block/emissive_north_cutout", "textures": { - "particle": "refinedstorage2:block/grid/right", - "north": "refinedstorage2:block/grid/front", + "cutout": "refinedstorage2:block/grid/cutouts/yellow", + "down": "refinedstorage2:block/bottom", "east": "refinedstorage2:block/grid/right", + "north": "refinedstorage2:block/grid/front", + "particle": "refinedstorage2:block/grid/right", "south": "refinedstorage2:block/grid/back", - "west": "refinedstorage2:block/grid/left", "up": "refinedstorage2:block/grid/top", - "down": "refinedstorage2:block/bottom", - "cutout": "refinedstorage2:block/grid/cutouts/yellow" + "west": "refinedstorage2:block/grid/left" } } \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/black_cable.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/black_cable.json new file mode 100644 index 000000000..19239ec95 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/black_cable.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:item/cable/base", + "textures": { + "cable": "refinedstorage2:block/cable/black" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/black_controller.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/black_controller.json index 15a48da60..6bb155fab 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/black_controller.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/black_controller.json @@ -1,29 +1,29 @@ { - "parent": "item/generated", + "parent": "minecraft:item/generated", "overrides": [ { + "model": "refinedstorage2:block/controller/off", "predicate": { - "refinedstorage2:stored_in_controller": 0 - }, - "model": "refinedstorage2:block/controller/off" + "refinedstorage2:stored_in_controller": 0.0 + } }, { + "model": "refinedstorage2:block/controller/nearly_off", "predicate": { "refinedstorage2:stored_in_controller": 0.01 - }, - "model": "refinedstorage2:block/controller/nearly_off" + } }, { + "model": "refinedstorage2:block/controller/nearly_on", "predicate": { "refinedstorage2:stored_in_controller": 0.3 - }, - "model": "refinedstorage2:block/controller/nearly_on" + } }, { + "model": "refinedstorage2:block/controller/black", "predicate": { "refinedstorage2:stored_in_controller": 0.4 - }, - "model": "refinedstorage2:block/controller/black" + } } ] } \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/black_crafting_grid.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/black_crafting_grid.json new file mode 100644 index 000000000..93d33c3ee --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/black_crafting_grid.json @@ -0,0 +1,3 @@ +{ + "parent": "refinedstorage2:block/crafting_grid/black" +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/black_exporter.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/black_exporter.json new file mode 100644 index 000000000..a601e19cf --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/black_exporter.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:item/exporter/base", + "textures": { + "cable": "refinedstorage2:block/cable/black" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/black_external_storage.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/black_external_storage.json new file mode 100644 index 000000000..5a0a2a8ed --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/black_external_storage.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:item/external_storage/base", + "textures": { + "cable": "refinedstorage2:block/cable/black" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/black_importer.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/black_importer.json new file mode 100644 index 000000000..dbb00d771 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/black_importer.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:item/importer/base", + "textures": { + "cable": "refinedstorage2:block/cable/black" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/blue_cable.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/blue_cable.json new file mode 100644 index 000000000..b5ca71ce3 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/blue_cable.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:item/cable/base", + "textures": { + "cable": "refinedstorage2:block/cable/blue" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/blue_controller.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/blue_controller.json index 01f5378f2..5b97df019 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/blue_controller.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/blue_controller.json @@ -1,29 +1,29 @@ { - "parent": "item/generated", + "parent": "minecraft:item/generated", "overrides": [ { + "model": "refinedstorage2:block/controller/off", "predicate": { - "refinedstorage2:stored_in_controller": 0 - }, - "model": "refinedstorage2:block/controller/off" + "refinedstorage2:stored_in_controller": 0.0 + } }, { + "model": "refinedstorage2:block/controller/nearly_off", "predicate": { "refinedstorage2:stored_in_controller": 0.01 - }, - "model": "refinedstorage2:block/controller/nearly_off" + } }, { + "model": "refinedstorage2:block/controller/nearly_on", "predicate": { "refinedstorage2:stored_in_controller": 0.3 - }, - "model": "refinedstorage2:block/controller/nearly_on" + } }, { + "model": "refinedstorage2:block/controller/blue", "predicate": { "refinedstorage2:stored_in_controller": 0.4 - }, - "model": "refinedstorage2:block/controller/blue" + } } ] } \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/blue_crafting_grid.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/blue_crafting_grid.json new file mode 100644 index 000000000..307b8c9cf --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/blue_crafting_grid.json @@ -0,0 +1,3 @@ +{ + "parent": "refinedstorage2:block/crafting_grid/blue" +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/blue_exporter.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/blue_exporter.json new file mode 100644 index 000000000..345fc9a36 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/blue_exporter.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:item/exporter/base", + "textures": { + "cable": "refinedstorage2:block/cable/blue" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/blue_external_storage.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/blue_external_storage.json new file mode 100644 index 000000000..8d23ef034 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/blue_external_storage.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:item/external_storage/base", + "textures": { + "cable": "refinedstorage2:block/cable/blue" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/blue_importer.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/blue_importer.json new file mode 100644 index 000000000..6102c4af1 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/blue_importer.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:item/importer/base", + "textures": { + "cable": "refinedstorage2:block/cable/blue" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/brown_cable.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/brown_cable.json new file mode 100644 index 000000000..b8f239474 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/brown_cable.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:item/cable/base", + "textures": { + "cable": "refinedstorage2:block/cable/brown" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/brown_controller.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/brown_controller.json index f1f91b166..bbf354539 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/brown_controller.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/brown_controller.json @@ -1,29 +1,29 @@ { - "parent": "item/generated", + "parent": "minecraft:item/generated", "overrides": [ { + "model": "refinedstorage2:block/controller/off", "predicate": { - "refinedstorage2:stored_in_controller": 0 - }, - "model": "refinedstorage2:block/controller/off" + "refinedstorage2:stored_in_controller": 0.0 + } }, { + "model": "refinedstorage2:block/controller/nearly_off", "predicate": { "refinedstorage2:stored_in_controller": 0.01 - }, - "model": "refinedstorage2:block/controller/nearly_off" + } }, { + "model": "refinedstorage2:block/controller/nearly_on", "predicate": { "refinedstorage2:stored_in_controller": 0.3 - }, - "model": "refinedstorage2:block/controller/nearly_on" + } }, { + "model": "refinedstorage2:block/controller/brown", "predicate": { "refinedstorage2:stored_in_controller": 0.4 - }, - "model": "refinedstorage2:block/controller/brown" + } } ] } \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/brown_crafting_grid.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/brown_crafting_grid.json new file mode 100644 index 000000000..23597552d --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/brown_crafting_grid.json @@ -0,0 +1,3 @@ +{ + "parent": "refinedstorage2:block/crafting_grid/brown" +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/brown_exporter.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/brown_exporter.json new file mode 100644 index 000000000..2dbe7d32e --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/brown_exporter.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:item/exporter/base", + "textures": { + "cable": "refinedstorage2:block/cable/brown" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/brown_external_storage.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/brown_external_storage.json new file mode 100644 index 000000000..85af74499 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/brown_external_storage.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:item/external_storage/base", + "textures": { + "cable": "refinedstorage2:block/cable/brown" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/brown_importer.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/brown_importer.json new file mode 100644 index 000000000..ccd5aed2e --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/brown_importer.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:item/importer/base", + "textures": { + "cable": "refinedstorage2:block/cable/brown" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/cable.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/cable.json new file mode 100644 index 000000000..be90ec70a --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/cable.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:item/cable/base", + "textures": { + "cable": "refinedstorage2:block/cable/gray" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/controller.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/controller.json index 8574a9922..06f3d9dc9 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/controller.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/controller.json @@ -1,29 +1,29 @@ { - "parent": "item/generated", + "parent": "minecraft:item/generated", "overrides": [ { + "model": "refinedstorage2:block/controller/off", "predicate": { - "refinedstorage2:stored_in_controller": 0 - }, - "model": "refinedstorage2:block/controller/off" + "refinedstorage2:stored_in_controller": 0.0 + } }, { + "model": "refinedstorage2:block/controller/nearly_off", "predicate": { "refinedstorage2:stored_in_controller": 0.01 - }, - "model": "refinedstorage2:block/controller/nearly_off" + } }, { + "model": "refinedstorage2:block/controller/nearly_on", "predicate": { "refinedstorage2:stored_in_controller": 0.3 - }, - "model": "refinedstorage2:block/controller/nearly_on" + } }, { + "model": "refinedstorage2:block/controller/light_blue", "predicate": { "refinedstorage2:stored_in_controller": 0.4 - }, - "model": "refinedstorage2:block/controller/light_blue" + } } ] } \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/crafting_grid.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/crafting_grid.json new file mode 100644 index 000000000..98f0d390c --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/crafting_grid.json @@ -0,0 +1,3 @@ +{ + "parent": "refinedstorage2:block/crafting_grid/light_blue" +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/cyan_cable.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/cyan_cable.json new file mode 100644 index 000000000..743d51863 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/cyan_cable.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:item/cable/base", + "textures": { + "cable": "refinedstorage2:block/cable/cyan" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/cyan_controller.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/cyan_controller.json index 1fe531fdd..d03c94a1b 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/cyan_controller.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/cyan_controller.json @@ -1,29 +1,29 @@ { - "parent": "item/generated", + "parent": "minecraft:item/generated", "overrides": [ { + "model": "refinedstorage2:block/controller/off", "predicate": { - "refinedstorage2:stored_in_controller": 0 - }, - "model": "refinedstorage2:block/controller/off" + "refinedstorage2:stored_in_controller": 0.0 + } }, { + "model": "refinedstorage2:block/controller/nearly_off", "predicate": { "refinedstorage2:stored_in_controller": 0.01 - }, - "model": "refinedstorage2:block/controller/nearly_off" + } }, { + "model": "refinedstorage2:block/controller/nearly_on", "predicate": { "refinedstorage2:stored_in_controller": 0.3 - }, - "model": "refinedstorage2:block/controller/nearly_on" + } }, { + "model": "refinedstorage2:block/controller/cyan", "predicate": { "refinedstorage2:stored_in_controller": 0.4 - }, - "model": "refinedstorage2:block/controller/cyan" + } } ] } \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/cyan_crafting_grid.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/cyan_crafting_grid.json new file mode 100644 index 000000000..229819483 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/cyan_crafting_grid.json @@ -0,0 +1,3 @@ +{ + "parent": "refinedstorage2:block/crafting_grid/cyan" +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/cyan_exporter.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/cyan_exporter.json new file mode 100644 index 000000000..ef23bc196 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/cyan_exporter.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:item/exporter/base", + "textures": { + "cable": "refinedstorage2:block/cable/cyan" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/cyan_external_storage.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/cyan_external_storage.json new file mode 100644 index 000000000..f69652d24 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/cyan_external_storage.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:item/external_storage/base", + "textures": { + "cable": "refinedstorage2:block/cable/cyan" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/cyan_importer.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/cyan_importer.json new file mode 100644 index 000000000..2ac0e26b4 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/cyan_importer.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:item/importer/base", + "textures": { + "cable": "refinedstorage2:block/cable/cyan" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/exporter.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/exporter.json new file mode 100644 index 000000000..c63c75e2b --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/exporter.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:item/exporter/base", + "textures": { + "cable": "refinedstorage2:block/cable/gray" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/external_storage.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/external_storage.json new file mode 100644 index 000000000..94ca338d2 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/external_storage.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:item/external_storage/base", + "textures": { + "cable": "refinedstorage2:block/cable/gray" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/gray_controller.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/gray_controller.json index 552b77be6..173912d17 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/gray_controller.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/gray_controller.json @@ -1,29 +1,29 @@ { - "parent": "item/generated", + "parent": "minecraft:item/generated", "overrides": [ { + "model": "refinedstorage2:block/controller/off", "predicate": { - "refinedstorage2:stored_in_controller": 0 - }, - "model": "refinedstorage2:block/controller/off" + "refinedstorage2:stored_in_controller": 0.0 + } }, { + "model": "refinedstorage2:block/controller/nearly_off", "predicate": { "refinedstorage2:stored_in_controller": 0.01 - }, - "model": "refinedstorage2:block/controller/nearly_off" + } }, { + "model": "refinedstorage2:block/controller/nearly_on", "predicate": { "refinedstorage2:stored_in_controller": 0.3 - }, - "model": "refinedstorage2:block/controller/nearly_on" + } }, { + "model": "refinedstorage2:block/controller/gray", "predicate": { "refinedstorage2:stored_in_controller": 0.4 - }, - "model": "refinedstorage2:block/controller/gray" + } } ] } \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/gray_crafting_grid.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/gray_crafting_grid.json new file mode 100644 index 000000000..d45507c15 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/gray_crafting_grid.json @@ -0,0 +1,3 @@ +{ + "parent": "refinedstorage2:block/crafting_grid/gray" +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/green_cable.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/green_cable.json new file mode 100644 index 000000000..2fdb8aa20 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/green_cable.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:item/cable/base", + "textures": { + "cable": "refinedstorage2:block/cable/green" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/green_controller.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/green_controller.json index 2db3744ec..37c078207 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/green_controller.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/green_controller.json @@ -1,29 +1,29 @@ { - "parent": "item/generated", + "parent": "minecraft:item/generated", "overrides": [ { + "model": "refinedstorage2:block/controller/off", "predicate": { - "refinedstorage2:stored_in_controller": 0 - }, - "model": "refinedstorage2:block/controller/off" + "refinedstorage2:stored_in_controller": 0.0 + } }, { + "model": "refinedstorage2:block/controller/nearly_off", "predicate": { "refinedstorage2:stored_in_controller": 0.01 - }, - "model": "refinedstorage2:block/controller/nearly_off" + } }, { + "model": "refinedstorage2:block/controller/nearly_on", "predicate": { "refinedstorage2:stored_in_controller": 0.3 - }, - "model": "refinedstorage2:block/controller/nearly_on" + } }, { + "model": "refinedstorage2:block/controller/green", "predicate": { "refinedstorage2:stored_in_controller": 0.4 - }, - "model": "refinedstorage2:block/controller/green" + } } ] } \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/green_crafting_grid.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/green_crafting_grid.json new file mode 100644 index 000000000..af963eb68 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/green_crafting_grid.json @@ -0,0 +1,3 @@ +{ + "parent": "refinedstorage2:block/crafting_grid/green" +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/green_exporter.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/green_exporter.json new file mode 100644 index 000000000..7f48860cb --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/green_exporter.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:item/exporter/base", + "textures": { + "cable": "refinedstorage2:block/cable/green" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/green_external_storage.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/green_external_storage.json new file mode 100644 index 000000000..7b55e048e --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/green_external_storage.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:item/external_storage/base", + "textures": { + "cable": "refinedstorage2:block/cable/green" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/green_importer.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/green_importer.json new file mode 100644 index 000000000..df95ecd2c --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/green_importer.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:item/importer/base", + "textures": { + "cable": "refinedstorage2:block/cable/green" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/importer.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/importer.json new file mode 100644 index 000000000..7694ffd60 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/importer.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:item/importer/base", + "textures": { + "cable": "refinedstorage2:block/cable/gray" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/light_blue_cable.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/light_blue_cable.json new file mode 100644 index 000000000..8cbf69e93 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/light_blue_cable.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:item/cable/base", + "textures": { + "cable": "refinedstorage2:block/cable/light_blue" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/light_blue_exporter.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/light_blue_exporter.json new file mode 100644 index 000000000..91435e761 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/light_blue_exporter.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:item/exporter/base", + "textures": { + "cable": "refinedstorage2:block/cable/light_blue" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/light_blue_external_storage.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/light_blue_external_storage.json new file mode 100644 index 000000000..a22b60b64 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/light_blue_external_storage.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:item/external_storage/base", + "textures": { + "cable": "refinedstorage2:block/cable/light_blue" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/light_blue_importer.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/light_blue_importer.json new file mode 100644 index 000000000..14c8016c9 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/light_blue_importer.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:item/importer/base", + "textures": { + "cable": "refinedstorage2:block/cable/light_blue" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/light_gray_cable.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/light_gray_cable.json new file mode 100644 index 000000000..72033a94c --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/light_gray_cable.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:item/cable/base", + "textures": { + "cable": "refinedstorage2:block/cable/light_gray" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/light_gray_controller.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/light_gray_controller.json index 2223582fc..022bb7842 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/light_gray_controller.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/light_gray_controller.json @@ -1,29 +1,29 @@ { - "parent": "item/generated", + "parent": "minecraft:item/generated", "overrides": [ { + "model": "refinedstorage2:block/controller/off", "predicate": { - "refinedstorage2:stored_in_controller": 0 - }, - "model": "refinedstorage2:block/controller/off" + "refinedstorage2:stored_in_controller": 0.0 + } }, { + "model": "refinedstorage2:block/controller/nearly_off", "predicate": { "refinedstorage2:stored_in_controller": 0.01 - }, - "model": "refinedstorage2:block/controller/nearly_off" + } }, { + "model": "refinedstorage2:block/controller/nearly_on", "predicate": { "refinedstorage2:stored_in_controller": 0.3 - }, - "model": "refinedstorage2:block/controller/nearly_on" + } }, { + "model": "refinedstorage2:block/controller/light_gray", "predicate": { "refinedstorage2:stored_in_controller": 0.4 - }, - "model": "refinedstorage2:block/controller/light_gray" + } } ] } \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/light_gray_crafting_grid.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/light_gray_crafting_grid.json new file mode 100644 index 000000000..72800f05b --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/light_gray_crafting_grid.json @@ -0,0 +1,3 @@ +{ + "parent": "refinedstorage2:block/crafting_grid/light_gray" +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/light_gray_exporter.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/light_gray_exporter.json new file mode 100644 index 000000000..c648099f9 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/light_gray_exporter.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:item/exporter/base", + "textures": { + "cable": "refinedstorage2:block/cable/light_gray" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/light_gray_external_storage.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/light_gray_external_storage.json new file mode 100644 index 000000000..576e7877b --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/light_gray_external_storage.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:item/external_storage/base", + "textures": { + "cable": "refinedstorage2:block/cable/light_gray" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/light_gray_importer.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/light_gray_importer.json new file mode 100644 index 000000000..6629635e2 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/light_gray_importer.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:item/importer/base", + "textures": { + "cable": "refinedstorage2:block/cable/light_gray" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/lime_cable.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/lime_cable.json new file mode 100644 index 000000000..132d7fe48 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/lime_cable.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:item/cable/base", + "textures": { + "cable": "refinedstorage2:block/cable/lime" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/lime_controller.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/lime_controller.json index d8f8af2da..522c95577 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/lime_controller.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/lime_controller.json @@ -1,29 +1,29 @@ { - "parent": "item/generated", + "parent": "minecraft:item/generated", "overrides": [ { + "model": "refinedstorage2:block/controller/off", "predicate": { - "refinedstorage2:stored_in_controller": 0 - }, - "model": "refinedstorage2:block/controller/off" + "refinedstorage2:stored_in_controller": 0.0 + } }, { + "model": "refinedstorage2:block/controller/nearly_off", "predicate": { "refinedstorage2:stored_in_controller": 0.01 - }, - "model": "refinedstorage2:block/controller/nearly_off" + } }, { + "model": "refinedstorage2:block/controller/nearly_on", "predicate": { "refinedstorage2:stored_in_controller": 0.3 - }, - "model": "refinedstorage2:block/controller/nearly_on" + } }, { + "model": "refinedstorage2:block/controller/lime", "predicate": { "refinedstorage2:stored_in_controller": 0.4 - }, - "model": "refinedstorage2:block/controller/lime" + } } ] } \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/lime_crafting_grid.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/lime_crafting_grid.json new file mode 100644 index 000000000..3e53bc48b --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/lime_crafting_grid.json @@ -0,0 +1,3 @@ +{ + "parent": "refinedstorage2:block/crafting_grid/lime" +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/lime_exporter.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/lime_exporter.json new file mode 100644 index 000000000..d2682a442 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/lime_exporter.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:item/exporter/base", + "textures": { + "cable": "refinedstorage2:block/cable/lime" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/lime_external_storage.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/lime_external_storage.json new file mode 100644 index 000000000..6e59dd532 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/lime_external_storage.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:item/external_storage/base", + "textures": { + "cable": "refinedstorage2:block/cable/lime" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/lime_importer.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/lime_importer.json new file mode 100644 index 000000000..78a3139d1 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/lime_importer.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:item/importer/base", + "textures": { + "cable": "refinedstorage2:block/cable/lime" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/magenta_cable.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/magenta_cable.json new file mode 100644 index 000000000..1ecfed6d0 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/magenta_cable.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:item/cable/base", + "textures": { + "cable": "refinedstorage2:block/cable/magenta" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/magenta_controller.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/magenta_controller.json index 005c07121..b7aa8082d 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/magenta_controller.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/magenta_controller.json @@ -1,29 +1,29 @@ { - "parent": "item/generated", + "parent": "minecraft:item/generated", "overrides": [ { + "model": "refinedstorage2:block/controller/off", "predicate": { - "refinedstorage2:stored_in_controller": 0 - }, - "model": "refinedstorage2:block/controller/off" + "refinedstorage2:stored_in_controller": 0.0 + } }, { + "model": "refinedstorage2:block/controller/nearly_off", "predicate": { "refinedstorage2:stored_in_controller": 0.01 - }, - "model": "refinedstorage2:block/controller/nearly_off" + } }, { + "model": "refinedstorage2:block/controller/nearly_on", "predicate": { "refinedstorage2:stored_in_controller": 0.3 - }, - "model": "refinedstorage2:block/controller/nearly_on" + } }, { + "model": "refinedstorage2:block/controller/magenta", "predicate": { "refinedstorage2:stored_in_controller": 0.4 - }, - "model": "refinedstorage2:block/controller/magenta" + } } ] } \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/magenta_crafting_grid.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/magenta_crafting_grid.json new file mode 100644 index 000000000..605846aef --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/magenta_crafting_grid.json @@ -0,0 +1,3 @@ +{ + "parent": "refinedstorage2:block/crafting_grid/magenta" +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/magenta_exporter.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/magenta_exporter.json new file mode 100644 index 000000000..65fbea9cc --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/magenta_exporter.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:item/exporter/base", + "textures": { + "cable": "refinedstorage2:block/cable/magenta" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/magenta_external_storage.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/magenta_external_storage.json new file mode 100644 index 000000000..0f08bf902 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/magenta_external_storage.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:item/external_storage/base", + "textures": { + "cable": "refinedstorage2:block/cable/magenta" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/magenta_importer.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/magenta_importer.json new file mode 100644 index 000000000..c8c7e2891 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/magenta_importer.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:item/importer/base", + "textures": { + "cable": "refinedstorage2:block/cable/magenta" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/orange_cable.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/orange_cable.json new file mode 100644 index 000000000..9ecbfe089 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/orange_cable.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:item/cable/base", + "textures": { + "cable": "refinedstorage2:block/cable/orange" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/orange_controller.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/orange_controller.json index 21c584480..47ad1a0d4 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/orange_controller.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/orange_controller.json @@ -1,29 +1,29 @@ { - "parent": "item/generated", + "parent": "minecraft:item/generated", "overrides": [ { + "model": "refinedstorage2:block/controller/off", "predicate": { - "refinedstorage2:stored_in_controller": 0 - }, - "model": "refinedstorage2:block/controller/off" + "refinedstorage2:stored_in_controller": 0.0 + } }, { + "model": "refinedstorage2:block/controller/nearly_off", "predicate": { "refinedstorage2:stored_in_controller": 0.01 - }, - "model": "refinedstorage2:block/controller/nearly_off" + } }, { + "model": "refinedstorage2:block/controller/nearly_on", "predicate": { "refinedstorage2:stored_in_controller": 0.3 - }, - "model": "refinedstorage2:block/controller/nearly_on" + } }, { + "model": "refinedstorage2:block/controller/orange", "predicate": { "refinedstorage2:stored_in_controller": 0.4 - }, - "model": "refinedstorage2:block/controller/orange" + } } ] } \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/orange_crafting_grid.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/orange_crafting_grid.json new file mode 100644 index 000000000..54026146d --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/orange_crafting_grid.json @@ -0,0 +1,3 @@ +{ + "parent": "refinedstorage2:block/crafting_grid/orange" +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/orange_exporter.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/orange_exporter.json new file mode 100644 index 000000000..bd445474f --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/orange_exporter.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:item/exporter/base", + "textures": { + "cable": "refinedstorage2:block/cable/orange" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/orange_external_storage.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/orange_external_storage.json new file mode 100644 index 000000000..f8f910555 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/orange_external_storage.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:item/external_storage/base", + "textures": { + "cable": "refinedstorage2:block/cable/orange" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/orange_importer.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/orange_importer.json new file mode 100644 index 000000000..36c6c951a --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/orange_importer.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:item/importer/base", + "textures": { + "cable": "refinedstorage2:block/cable/orange" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/pink_cable.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/pink_cable.json new file mode 100644 index 000000000..f07426120 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/pink_cable.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:item/cable/base", + "textures": { + "cable": "refinedstorage2:block/cable/pink" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/pink_controller.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/pink_controller.json index 94e2d1b97..cf95407a3 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/pink_controller.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/pink_controller.json @@ -1,29 +1,29 @@ { - "parent": "item/generated", + "parent": "minecraft:item/generated", "overrides": [ { + "model": "refinedstorage2:block/controller/off", "predicate": { - "refinedstorage2:stored_in_controller": 0 - }, - "model": "refinedstorage2:block/controller/off" + "refinedstorage2:stored_in_controller": 0.0 + } }, { + "model": "refinedstorage2:block/controller/nearly_off", "predicate": { "refinedstorage2:stored_in_controller": 0.01 - }, - "model": "refinedstorage2:block/controller/nearly_off" + } }, { + "model": "refinedstorage2:block/controller/nearly_on", "predicate": { "refinedstorage2:stored_in_controller": 0.3 - }, - "model": "refinedstorage2:block/controller/nearly_on" + } }, { + "model": "refinedstorage2:block/controller/pink", "predicate": { "refinedstorage2:stored_in_controller": 0.4 - }, - "model": "refinedstorage2:block/controller/pink" + } } ] } \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/pink_crafting_grid.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/pink_crafting_grid.json new file mode 100644 index 000000000..e27172b15 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/pink_crafting_grid.json @@ -0,0 +1,3 @@ +{ + "parent": "refinedstorage2:block/crafting_grid/pink" +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/pink_exporter.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/pink_exporter.json new file mode 100644 index 000000000..1fb5bfddd --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/pink_exporter.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:item/exporter/base", + "textures": { + "cable": "refinedstorage2:block/cable/pink" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/pink_external_storage.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/pink_external_storage.json new file mode 100644 index 000000000..d271b8a36 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/pink_external_storage.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:item/external_storage/base", + "textures": { + "cable": "refinedstorage2:block/cable/pink" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/pink_importer.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/pink_importer.json new file mode 100644 index 000000000..837f75ab8 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/pink_importer.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:item/importer/base", + "textures": { + "cable": "refinedstorage2:block/cable/pink" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/purple_cable.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/purple_cable.json new file mode 100644 index 000000000..41fa101e0 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/purple_cable.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:item/cable/base", + "textures": { + "cable": "refinedstorage2:block/cable/purple" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/purple_controller.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/purple_controller.json index f86f39f2d..c0b2cb2fb 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/purple_controller.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/purple_controller.json @@ -1,29 +1,29 @@ { - "parent": "item/generated", + "parent": "minecraft:item/generated", "overrides": [ { + "model": "refinedstorage2:block/controller/off", "predicate": { - "refinedstorage2:stored_in_controller": 0 - }, - "model": "refinedstorage2:block/controller/off" + "refinedstorage2:stored_in_controller": 0.0 + } }, { + "model": "refinedstorage2:block/controller/nearly_off", "predicate": { "refinedstorage2:stored_in_controller": 0.01 - }, - "model": "refinedstorage2:block/controller/nearly_off" + } }, { + "model": "refinedstorage2:block/controller/nearly_on", "predicate": { "refinedstorage2:stored_in_controller": 0.3 - }, - "model": "refinedstorage2:block/controller/nearly_on" + } }, { + "model": "refinedstorage2:block/controller/purple", "predicate": { "refinedstorage2:stored_in_controller": 0.4 - }, - "model": "refinedstorage2:block/controller/purple" + } } ] } \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/purple_crafting_grid.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/purple_crafting_grid.json new file mode 100644 index 000000000..6a198d1b3 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/purple_crafting_grid.json @@ -0,0 +1,3 @@ +{ + "parent": "refinedstorage2:block/crafting_grid/purple" +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/purple_exporter.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/purple_exporter.json new file mode 100644 index 000000000..57247d548 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/purple_exporter.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:item/exporter/base", + "textures": { + "cable": "refinedstorage2:block/cable/purple" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/purple_external_storage.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/purple_external_storage.json new file mode 100644 index 000000000..b3313057c --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/purple_external_storage.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:item/external_storage/base", + "textures": { + "cable": "refinedstorage2:block/cable/purple" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/purple_importer.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/purple_importer.json new file mode 100644 index 000000000..19344caa7 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/purple_importer.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:item/importer/base", + "textures": { + "cable": "refinedstorage2:block/cable/purple" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/red_cable.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/red_cable.json new file mode 100644 index 000000000..ce7d1059d --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/red_cable.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:item/cable/base", + "textures": { + "cable": "refinedstorage2:block/cable/red" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/red_controller.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/red_controller.json index 2635df7b0..b643b3794 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/red_controller.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/red_controller.json @@ -1,29 +1,29 @@ { - "parent": "item/generated", + "parent": "minecraft:item/generated", "overrides": [ { + "model": "refinedstorage2:block/controller/off", "predicate": { - "refinedstorage2:stored_in_controller": 0 - }, - "model": "refinedstorage2:block/controller/off" + "refinedstorage2:stored_in_controller": 0.0 + } }, { + "model": "refinedstorage2:block/controller/nearly_off", "predicate": { "refinedstorage2:stored_in_controller": 0.01 - }, - "model": "refinedstorage2:block/controller/nearly_off" + } }, { + "model": "refinedstorage2:block/controller/nearly_on", "predicate": { "refinedstorage2:stored_in_controller": 0.3 - }, - "model": "refinedstorage2:block/controller/nearly_on" + } }, { + "model": "refinedstorage2:block/controller/red", "predicate": { "refinedstorage2:stored_in_controller": 0.4 - }, - "model": "refinedstorage2:block/controller/red" + } } ] } \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/red_crafting_grid.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/red_crafting_grid.json new file mode 100644 index 000000000..33f1f38ec --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/red_crafting_grid.json @@ -0,0 +1,3 @@ +{ + "parent": "refinedstorage2:block/crafting_grid/red" +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/red_exporter.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/red_exporter.json new file mode 100644 index 000000000..83c875ba2 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/red_exporter.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:item/exporter/base", + "textures": { + "cable": "refinedstorage2:block/cable/red" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/red_external_storage.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/red_external_storage.json new file mode 100644 index 000000000..22597cb21 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/red_external_storage.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:item/external_storage/base", + "textures": { + "cable": "refinedstorage2:block/cable/red" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/red_importer.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/red_importer.json new file mode 100644 index 000000000..12a7d0567 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/red_importer.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:item/importer/base", + "textures": { + "cable": "refinedstorage2:block/cable/red" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/white_cable.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/white_cable.json new file mode 100644 index 000000000..1266fe7e9 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/white_cable.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:item/cable/base", + "textures": { + "cable": "refinedstorage2:block/cable/white" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/white_controller.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/white_controller.json index 28973d45d..f64829ee2 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/white_controller.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/white_controller.json @@ -1,29 +1,29 @@ { - "parent": "item/generated", + "parent": "minecraft:item/generated", "overrides": [ { + "model": "refinedstorage2:block/controller/off", "predicate": { - "refinedstorage2:stored_in_controller": 0 - }, - "model": "refinedstorage2:block/controller/off" + "refinedstorage2:stored_in_controller": 0.0 + } }, { + "model": "refinedstorage2:block/controller/nearly_off", "predicate": { "refinedstorage2:stored_in_controller": 0.01 - }, - "model": "refinedstorage2:block/controller/nearly_off" + } }, { + "model": "refinedstorage2:block/controller/nearly_on", "predicate": { "refinedstorage2:stored_in_controller": 0.3 - }, - "model": "refinedstorage2:block/controller/nearly_on" + } }, { + "model": "refinedstorage2:block/controller/white", "predicate": { "refinedstorage2:stored_in_controller": 0.4 - }, - "model": "refinedstorage2:block/controller/white" + } } ] } \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/white_crafting_grid.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/white_crafting_grid.json new file mode 100644 index 000000000..b823bb8c1 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/white_crafting_grid.json @@ -0,0 +1,3 @@ +{ + "parent": "refinedstorage2:block/crafting_grid/white" +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/white_exporter.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/white_exporter.json new file mode 100644 index 000000000..19167989e --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/white_exporter.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:item/exporter/base", + "textures": { + "cable": "refinedstorage2:block/cable/white" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/white_external_storage.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/white_external_storage.json new file mode 100644 index 000000000..a992fc7f6 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/white_external_storage.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:item/external_storage/base", + "textures": { + "cable": "refinedstorage2:block/cable/white" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/white_importer.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/white_importer.json new file mode 100644 index 000000000..0870cbdfb --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/white_importer.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:item/importer/base", + "textures": { + "cable": "refinedstorage2:block/cable/white" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/yellow_cable.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/yellow_cable.json new file mode 100644 index 000000000..fdeed5234 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/yellow_cable.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:item/cable/base", + "textures": { + "cable": "refinedstorage2:block/cable/yellow" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/yellow_controller.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/yellow_controller.json index 0f1619ea2..1657e16f8 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/yellow_controller.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/yellow_controller.json @@ -1,29 +1,29 @@ { - "parent": "item/generated", + "parent": "minecraft:item/generated", "overrides": [ { + "model": "refinedstorage2:block/controller/off", "predicate": { - "refinedstorage2:stored_in_controller": 0 - }, - "model": "refinedstorage2:block/controller/off" + "refinedstorage2:stored_in_controller": 0.0 + } }, { + "model": "refinedstorage2:block/controller/nearly_off", "predicate": { "refinedstorage2:stored_in_controller": 0.01 - }, - "model": "refinedstorage2:block/controller/nearly_off" + } }, { + "model": "refinedstorage2:block/controller/nearly_on", "predicate": { "refinedstorage2:stored_in_controller": 0.3 - }, - "model": "refinedstorage2:block/controller/nearly_on" + } }, { + "model": "refinedstorage2:block/controller/yellow", "predicate": { "refinedstorage2:stored_in_controller": 0.4 - }, - "model": "refinedstorage2:block/controller/yellow" + } } ] } \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/yellow_crafting_grid.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/yellow_crafting_grid.json new file mode 100644 index 000000000..12b94fd62 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/yellow_crafting_grid.json @@ -0,0 +1,3 @@ +{ + "parent": "refinedstorage2:block/crafting_grid/yellow" +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/yellow_exporter.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/yellow_exporter.json new file mode 100644 index 000000000..e1d6fc36d --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/yellow_exporter.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:item/exporter/base", + "textures": { + "cable": "refinedstorage2:block/cable/yellow" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/yellow_external_storage.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/yellow_external_storage.json new file mode 100644 index 000000000..2e1843de3 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/yellow_external_storage.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:item/external_storage/base", + "textures": { + "cable": "refinedstorage2:block/cable/yellow" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/yellow_importer.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/yellow_importer.json new file mode 100644 index 000000000..fecf2540a --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/yellow_importer.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:item/importer/base", + "textures": { + "cable": "refinedstorage2:block/cable/yellow" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/black_cable.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/black_cable.json new file mode 100644 index 000000000..38389d2d7 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/black_cable.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_cables": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:cables" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/black_cable" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_cables", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/black_cable" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/black_controller.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/black_controller.json new file mode 100644 index 000000000..d7fbc83cc --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/black_controller.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_controllers": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:controllers" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/black_controller" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_controllers", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/black_controller" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/black_crafting_grid.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/black_crafting_grid.json new file mode 100644 index 000000000..c3c3165d8 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/black_crafting_grid.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_crafting_grids": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:crafting_grids" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/black_crafting_grid" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_crafting_grids", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/black_crafting_grid" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/black_exporter.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/black_exporter.json new file mode 100644 index 000000000..118e96bea --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/black_exporter.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_exporters": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:exporters" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/black_exporter" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_exporters", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/black_exporter" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/black_external_storage.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/black_external_storage.json new file mode 100644 index 000000000..b47dd69ef --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/black_external_storage.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_external_storages": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:external_storages" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/black_external_storage" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_external_storages", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/black_external_storage" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/black_grid.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/black_grid.json new file mode 100644 index 000000000..632960e31 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/black_grid.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_grids": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:grids" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/black_grid" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_grids", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/black_grid" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/black_importer.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/black_importer.json new file mode 100644 index 000000000..f1f0a1450 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/black_importer.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_importers": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:importers" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/black_importer" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_importers", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/black_importer" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/blue_cable.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/blue_cable.json new file mode 100644 index 000000000..575ebd279 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/blue_cable.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_cables": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:cables" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/blue_cable" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_cables", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/blue_cable" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/blue_controller.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/blue_controller.json new file mode 100644 index 000000000..f84330bc6 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/blue_controller.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_controllers": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:controllers" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/blue_controller" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_controllers", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/blue_controller" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/blue_crafting_grid.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/blue_crafting_grid.json new file mode 100644 index 000000000..89a6fad87 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/blue_crafting_grid.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_crafting_grids": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:crafting_grids" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/blue_crafting_grid" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_crafting_grids", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/blue_crafting_grid" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/blue_exporter.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/blue_exporter.json new file mode 100644 index 000000000..97ac3a4f7 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/blue_exporter.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_exporters": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:exporters" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/blue_exporter" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_exporters", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/blue_exporter" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/blue_external_storage.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/blue_external_storage.json new file mode 100644 index 000000000..25c4d8bf1 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/blue_external_storage.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_external_storages": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:external_storages" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/blue_external_storage" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_external_storages", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/blue_external_storage" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/blue_grid.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/blue_grid.json new file mode 100644 index 000000000..827c39e1a --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/blue_grid.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_grids": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:grids" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/blue_grid" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_grids", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/blue_grid" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/blue_importer.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/blue_importer.json new file mode 100644 index 000000000..61517e3f0 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/blue_importer.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_importers": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:importers" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/blue_importer" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_importers", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/blue_importer" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/brown_cable.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/brown_cable.json new file mode 100644 index 000000000..583e325a9 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/brown_cable.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_cables": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:cables" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/brown_cable" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_cables", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/brown_cable" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/brown_controller.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/brown_controller.json new file mode 100644 index 000000000..f9fe70921 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/brown_controller.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_controllers": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:controllers" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/brown_controller" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_controllers", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/brown_controller" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/brown_crafting_grid.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/brown_crafting_grid.json new file mode 100644 index 000000000..06233e4e5 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/brown_crafting_grid.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_crafting_grids": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:crafting_grids" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/brown_crafting_grid" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_crafting_grids", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/brown_crafting_grid" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/brown_exporter.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/brown_exporter.json new file mode 100644 index 000000000..8f64e2c34 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/brown_exporter.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_exporters": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:exporters" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/brown_exporter" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_exporters", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/brown_exporter" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/brown_external_storage.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/brown_external_storage.json new file mode 100644 index 000000000..c392330d4 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/brown_external_storage.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_external_storages": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:external_storages" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/brown_external_storage" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_external_storages", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/brown_external_storage" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/brown_grid.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/brown_grid.json new file mode 100644 index 000000000..30eaca558 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/brown_grid.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_grids": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:grids" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/brown_grid" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_grids", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/brown_grid" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/brown_importer.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/brown_importer.json new file mode 100644 index 000000000..3ce4f5946 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/brown_importer.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_importers": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:importers" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/brown_importer" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_importers", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/brown_importer" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/cyan_cable.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/cyan_cable.json new file mode 100644 index 000000000..bf50277c6 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/cyan_cable.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_cables": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:cables" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/cyan_cable" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_cables", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/cyan_cable" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/cyan_controller.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/cyan_controller.json new file mode 100644 index 000000000..fb646932d --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/cyan_controller.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_controllers": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:controllers" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/cyan_controller" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_controllers", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/cyan_controller" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/cyan_crafting_grid.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/cyan_crafting_grid.json new file mode 100644 index 000000000..79ece0e7d --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/cyan_crafting_grid.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_crafting_grids": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:crafting_grids" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/cyan_crafting_grid" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_crafting_grids", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/cyan_crafting_grid" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/cyan_exporter.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/cyan_exporter.json new file mode 100644 index 000000000..614e8f147 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/cyan_exporter.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_exporters": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:exporters" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/cyan_exporter" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_exporters", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/cyan_exporter" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/cyan_external_storage.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/cyan_external_storage.json new file mode 100644 index 000000000..334597d97 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/cyan_external_storage.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_external_storages": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:external_storages" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/cyan_external_storage" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_external_storages", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/cyan_external_storage" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/cyan_grid.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/cyan_grid.json new file mode 100644 index 000000000..621fa8944 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/cyan_grid.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_grids": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:grids" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/cyan_grid" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_grids", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/cyan_grid" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/cyan_importer.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/cyan_importer.json new file mode 100644 index 000000000..534122606 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/cyan_importer.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_importers": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:importers" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/cyan_importer" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_importers", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/cyan_importer" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/gray_cable.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/gray_cable.json new file mode 100644 index 000000000..a05b4cd73 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/gray_cable.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_cables": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:cables" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/gray_cable" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_cables", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/gray_cable" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/gray_controller.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/gray_controller.json new file mode 100644 index 000000000..d1b2c4fab --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/gray_controller.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_controllers": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:controllers" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/gray_controller" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_controllers", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/gray_controller" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/gray_crafting_grid.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/gray_crafting_grid.json new file mode 100644 index 000000000..84ade9296 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/gray_crafting_grid.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_crafting_grids": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:crafting_grids" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/gray_crafting_grid" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_crafting_grids", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/gray_crafting_grid" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/gray_exporter.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/gray_exporter.json new file mode 100644 index 000000000..566f1cd8f --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/gray_exporter.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_exporters": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:exporters" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/gray_exporter" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_exporters", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/gray_exporter" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/gray_external_storage.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/gray_external_storage.json new file mode 100644 index 000000000..ebbf55a94 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/gray_external_storage.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_external_storages": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:external_storages" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/gray_external_storage" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_external_storages", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/gray_external_storage" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/gray_grid.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/gray_grid.json new file mode 100644 index 000000000..7a29ba959 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/gray_grid.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_grids": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:grids" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/gray_grid" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_grids", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/gray_grid" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/gray_importer.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/gray_importer.json new file mode 100644 index 000000000..956fcfa42 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/gray_importer.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_importers": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:importers" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/gray_importer" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_importers", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/gray_importer" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/green_cable.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/green_cable.json new file mode 100644 index 000000000..8587c6c83 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/green_cable.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_cables": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:cables" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/green_cable" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_cables", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/green_cable" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/green_controller.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/green_controller.json new file mode 100644 index 000000000..3eaedb740 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/green_controller.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_controllers": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:controllers" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/green_controller" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_controllers", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/green_controller" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/green_crafting_grid.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/green_crafting_grid.json new file mode 100644 index 000000000..f510d3653 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/green_crafting_grid.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_crafting_grids": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:crafting_grids" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/green_crafting_grid" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_crafting_grids", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/green_crafting_grid" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/green_exporter.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/green_exporter.json new file mode 100644 index 000000000..8726ba916 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/green_exporter.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_exporters": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:exporters" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/green_exporter" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_exporters", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/green_exporter" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/green_external_storage.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/green_external_storage.json new file mode 100644 index 000000000..ee75d7c6e --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/green_external_storage.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_external_storages": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:external_storages" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/green_external_storage" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_external_storages", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/green_external_storage" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/green_grid.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/green_grid.json new file mode 100644 index 000000000..463580ac4 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/green_grid.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_grids": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:grids" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/green_grid" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_grids", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/green_grid" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/green_importer.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/green_importer.json new file mode 100644 index 000000000..febe3448a --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/green_importer.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_importers": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:importers" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/green_importer" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_importers", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/green_importer" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/light_blue_cable.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/light_blue_cable.json new file mode 100644 index 000000000..5e51f0910 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/light_blue_cable.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_cables": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:cables" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/light_blue_cable" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_cables", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/light_blue_cable" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/light_blue_controller.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/light_blue_controller.json new file mode 100644 index 000000000..1e6cdc347 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/light_blue_controller.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_controllers": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:controllers" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/light_blue_controller" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_controllers", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/light_blue_controller" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/light_blue_crafting_grid.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/light_blue_crafting_grid.json new file mode 100644 index 000000000..e9a1fb471 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/light_blue_crafting_grid.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_crafting_grids": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:crafting_grids" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/light_blue_crafting_grid" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_crafting_grids", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/light_blue_crafting_grid" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/light_blue_exporter.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/light_blue_exporter.json new file mode 100644 index 000000000..48c720811 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/light_blue_exporter.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_exporters": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:exporters" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/light_blue_exporter" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_exporters", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/light_blue_exporter" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/light_blue_external_storage.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/light_blue_external_storage.json new file mode 100644 index 000000000..293f6ab71 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/light_blue_external_storage.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_external_storages": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:external_storages" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/light_blue_external_storage" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_external_storages", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/light_blue_external_storage" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/light_blue_grid.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/light_blue_grid.json new file mode 100644 index 000000000..b9257b7ce --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/light_blue_grid.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_grids": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:grids" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/light_blue_grid" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_grids", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/light_blue_grid" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/light_blue_importer.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/light_blue_importer.json new file mode 100644 index 000000000..d76d2962f --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/light_blue_importer.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_importers": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:importers" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/light_blue_importer" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_importers", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/light_blue_importer" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/light_gray_cable.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/light_gray_cable.json new file mode 100644 index 000000000..a8454f38e --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/light_gray_cable.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_cables": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:cables" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/light_gray_cable" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_cables", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/light_gray_cable" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/light_gray_controller.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/light_gray_controller.json new file mode 100644 index 000000000..dbcd1855b --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/light_gray_controller.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_controllers": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:controllers" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/light_gray_controller" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_controllers", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/light_gray_controller" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/light_gray_crafting_grid.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/light_gray_crafting_grid.json new file mode 100644 index 000000000..9f3d2a6aa --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/light_gray_crafting_grid.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_crafting_grids": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:crafting_grids" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/light_gray_crafting_grid" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_crafting_grids", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/light_gray_crafting_grid" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/light_gray_exporter.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/light_gray_exporter.json new file mode 100644 index 000000000..c39ddabe6 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/light_gray_exporter.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_exporters": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:exporters" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/light_gray_exporter" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_exporters", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/light_gray_exporter" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/light_gray_external_storage.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/light_gray_external_storage.json new file mode 100644 index 000000000..69979b80c --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/light_gray_external_storage.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_external_storages": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:external_storages" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/light_gray_external_storage" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_external_storages", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/light_gray_external_storage" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/light_gray_grid.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/light_gray_grid.json new file mode 100644 index 000000000..4c76c0064 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/light_gray_grid.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_grids": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:grids" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/light_gray_grid" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_grids", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/light_gray_grid" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/light_gray_importer.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/light_gray_importer.json new file mode 100644 index 000000000..6776a0500 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/light_gray_importer.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_importers": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:importers" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/light_gray_importer" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_importers", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/light_gray_importer" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/lime_cable.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/lime_cable.json new file mode 100644 index 000000000..adfe34a64 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/lime_cable.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_cables": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:cables" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/lime_cable" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_cables", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/lime_cable" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/lime_controller.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/lime_controller.json new file mode 100644 index 000000000..1612ad63d --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/lime_controller.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_controllers": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:controllers" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/lime_controller" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_controllers", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/lime_controller" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/lime_crafting_grid.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/lime_crafting_grid.json new file mode 100644 index 000000000..8c6b99d84 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/lime_crafting_grid.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_crafting_grids": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:crafting_grids" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/lime_crafting_grid" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_crafting_grids", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/lime_crafting_grid" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/lime_exporter.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/lime_exporter.json new file mode 100644 index 000000000..e9898b9c4 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/lime_exporter.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_exporters": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:exporters" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/lime_exporter" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_exporters", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/lime_exporter" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/lime_external_storage.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/lime_external_storage.json new file mode 100644 index 000000000..33b940766 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/lime_external_storage.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_external_storages": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:external_storages" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/lime_external_storage" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_external_storages", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/lime_external_storage" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/lime_grid.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/lime_grid.json new file mode 100644 index 000000000..98d477065 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/lime_grid.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_grids": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:grids" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/lime_grid" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_grids", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/lime_grid" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/lime_importer.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/lime_importer.json new file mode 100644 index 000000000..0e2aaec43 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/lime_importer.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_importers": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:importers" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/lime_importer" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_importers", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/lime_importer" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/magenta_cable.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/magenta_cable.json new file mode 100644 index 000000000..ca48a4dba --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/magenta_cable.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_cables": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:cables" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/magenta_cable" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_cables", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/magenta_cable" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/magenta_controller.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/magenta_controller.json new file mode 100644 index 000000000..c1cabb97e --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/magenta_controller.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_controllers": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:controllers" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/magenta_controller" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_controllers", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/magenta_controller" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/magenta_crafting_grid.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/magenta_crafting_grid.json new file mode 100644 index 000000000..59c2dbae6 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/magenta_crafting_grid.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_crafting_grids": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:crafting_grids" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/magenta_crafting_grid" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_crafting_grids", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/magenta_crafting_grid" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/magenta_exporter.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/magenta_exporter.json new file mode 100644 index 000000000..0a5c806f6 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/magenta_exporter.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_exporters": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:exporters" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/magenta_exporter" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_exporters", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/magenta_exporter" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/magenta_external_storage.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/magenta_external_storage.json new file mode 100644 index 000000000..425dfb6da --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/magenta_external_storage.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_external_storages": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:external_storages" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/magenta_external_storage" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_external_storages", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/magenta_external_storage" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/magenta_grid.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/magenta_grid.json new file mode 100644 index 000000000..5d7db4ed5 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/magenta_grid.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_grids": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:grids" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/magenta_grid" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_grids", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/magenta_grid" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/magenta_importer.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/magenta_importer.json new file mode 100644 index 000000000..0c4cb068d --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/magenta_importer.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_importers": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:importers" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/magenta_importer" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_importers", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/magenta_importer" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/orange_cable.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/orange_cable.json new file mode 100644 index 000000000..e162ece6a --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/orange_cable.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_cables": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:cables" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/orange_cable" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_cables", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/orange_cable" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/orange_controller.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/orange_controller.json new file mode 100644 index 000000000..0ea060434 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/orange_controller.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_controllers": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:controllers" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/orange_controller" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_controllers", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/orange_controller" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/orange_crafting_grid.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/orange_crafting_grid.json new file mode 100644 index 000000000..b17643a4e --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/orange_crafting_grid.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_crafting_grids": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:crafting_grids" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/orange_crafting_grid" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_crafting_grids", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/orange_crafting_grid" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/orange_exporter.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/orange_exporter.json new file mode 100644 index 000000000..8cde0f0b6 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/orange_exporter.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_exporters": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:exporters" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/orange_exporter" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_exporters", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/orange_exporter" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/orange_external_storage.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/orange_external_storage.json new file mode 100644 index 000000000..ccd5de441 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/orange_external_storage.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_external_storages": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:external_storages" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/orange_external_storage" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_external_storages", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/orange_external_storage" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/orange_grid.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/orange_grid.json new file mode 100644 index 000000000..7238509d8 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/orange_grid.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_grids": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:grids" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/orange_grid" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_grids", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/orange_grid" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/orange_importer.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/orange_importer.json new file mode 100644 index 000000000..eb3357efe --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/orange_importer.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_importers": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:importers" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/orange_importer" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_importers", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/orange_importer" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/pink_cable.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/pink_cable.json new file mode 100644 index 000000000..7e870f2da --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/pink_cable.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_cables": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:cables" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/pink_cable" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_cables", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/pink_cable" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/pink_controller.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/pink_controller.json new file mode 100644 index 000000000..74b0144cc --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/pink_controller.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_controllers": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:controllers" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/pink_controller" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_controllers", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/pink_controller" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/pink_crafting_grid.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/pink_crafting_grid.json new file mode 100644 index 000000000..31ec9b97a --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/pink_crafting_grid.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_crafting_grids": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:crafting_grids" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/pink_crafting_grid" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_crafting_grids", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/pink_crafting_grid" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/pink_exporter.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/pink_exporter.json new file mode 100644 index 000000000..68bc1f419 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/pink_exporter.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_exporters": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:exporters" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/pink_exporter" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_exporters", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/pink_exporter" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/pink_external_storage.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/pink_external_storage.json new file mode 100644 index 000000000..fdf11de92 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/pink_external_storage.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_external_storages": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:external_storages" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/pink_external_storage" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_external_storages", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/pink_external_storage" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/pink_grid.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/pink_grid.json new file mode 100644 index 000000000..2c027f07d --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/pink_grid.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_grids": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:grids" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/pink_grid" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_grids", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/pink_grid" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/pink_importer.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/pink_importer.json new file mode 100644 index 000000000..dd467a6d4 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/pink_importer.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_importers": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:importers" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/pink_importer" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_importers", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/pink_importer" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/purple_cable.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/purple_cable.json new file mode 100644 index 000000000..b3f367986 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/purple_cable.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_cables": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:cables" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/purple_cable" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_cables", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/purple_cable" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/purple_controller.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/purple_controller.json new file mode 100644 index 000000000..9db222e9b --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/purple_controller.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_controllers": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:controllers" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/purple_controller" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_controllers", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/purple_controller" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/purple_crafting_grid.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/purple_crafting_grid.json new file mode 100644 index 000000000..20d9b01dd --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/purple_crafting_grid.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_crafting_grids": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:crafting_grids" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/purple_crafting_grid" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_crafting_grids", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/purple_crafting_grid" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/purple_exporter.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/purple_exporter.json new file mode 100644 index 000000000..cddea137b --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/purple_exporter.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_exporters": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:exporters" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/purple_exporter" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_exporters", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/purple_exporter" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/purple_external_storage.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/purple_external_storage.json new file mode 100644 index 000000000..da98bd0ce --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/purple_external_storage.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_external_storages": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:external_storages" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/purple_external_storage" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_external_storages", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/purple_external_storage" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/purple_grid.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/purple_grid.json new file mode 100644 index 000000000..e03e20b33 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/purple_grid.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_grids": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:grids" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/purple_grid" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_grids", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/purple_grid" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/purple_importer.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/purple_importer.json new file mode 100644 index 000000000..4233ab2b3 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/purple_importer.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_importers": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:importers" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/purple_importer" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_importers", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/purple_importer" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/red_cable.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/red_cable.json new file mode 100644 index 000000000..22ba15ac6 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/red_cable.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_cables": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:cables" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/red_cable" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_cables", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/red_cable" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/red_controller.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/red_controller.json new file mode 100644 index 000000000..afdcfea36 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/red_controller.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_controllers": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:controllers" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/red_controller" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_controllers", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/red_controller" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/red_crafting_grid.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/red_crafting_grid.json new file mode 100644 index 000000000..82a3c83a1 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/red_crafting_grid.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_crafting_grids": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:crafting_grids" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/red_crafting_grid" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_crafting_grids", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/red_crafting_grid" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/red_exporter.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/red_exporter.json new file mode 100644 index 000000000..176bb0574 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/red_exporter.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_exporters": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:exporters" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/red_exporter" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_exporters", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/red_exporter" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/red_external_storage.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/red_external_storage.json new file mode 100644 index 000000000..86aa09879 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/red_external_storage.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_external_storages": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:external_storages" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/red_external_storage" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_external_storages", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/red_external_storage" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/red_grid.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/red_grid.json new file mode 100644 index 000000000..d75f58649 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/red_grid.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_grids": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:grids" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/red_grid" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_grids", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/red_grid" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/red_importer.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/red_importer.json new file mode 100644 index 000000000..bd4ff8e59 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/red_importer.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_importers": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:importers" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/red_importer" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_importers", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/red_importer" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/white_cable.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/white_cable.json new file mode 100644 index 000000000..ef4c84118 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/white_cable.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_cables": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:cables" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/white_cable" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_cables", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/white_cable" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/white_controller.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/white_controller.json new file mode 100644 index 000000000..f7e55a1b8 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/white_controller.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_controllers": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:controllers" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/white_controller" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_controllers", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/white_controller" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/white_crafting_grid.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/white_crafting_grid.json new file mode 100644 index 000000000..776092f08 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/white_crafting_grid.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_crafting_grids": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:crafting_grids" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/white_crafting_grid" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_crafting_grids", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/white_crafting_grid" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/white_exporter.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/white_exporter.json new file mode 100644 index 000000000..98b492975 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/white_exporter.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_exporters": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:exporters" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/white_exporter" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_exporters", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/white_exporter" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/white_external_storage.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/white_external_storage.json new file mode 100644 index 000000000..6407f42bb --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/white_external_storage.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_external_storages": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:external_storages" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/white_external_storage" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_external_storages", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/white_external_storage" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/white_grid.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/white_grid.json new file mode 100644 index 000000000..286272e3c --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/white_grid.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_grids": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:grids" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/white_grid" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_grids", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/white_grid" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/white_importer.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/white_importer.json new file mode 100644 index 000000000..a0046d7a7 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/white_importer.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_importers": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:importers" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/white_importer" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_importers", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/white_importer" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/yellow_cable.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/yellow_cable.json new file mode 100644 index 000000000..f69971d98 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/yellow_cable.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_cables": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:cables" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/yellow_cable" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_cables", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/yellow_cable" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/yellow_controller.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/yellow_controller.json new file mode 100644 index 000000000..f5b09da02 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/yellow_controller.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_controllers": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:controllers" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/yellow_controller" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_controllers", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/yellow_controller" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/yellow_crafting_grid.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/yellow_crafting_grid.json new file mode 100644 index 000000000..cadd46606 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/yellow_crafting_grid.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_crafting_grids": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:crafting_grids" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/yellow_crafting_grid" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_crafting_grids", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/yellow_crafting_grid" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/yellow_exporter.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/yellow_exporter.json new file mode 100644 index 000000000..d4cbd79ce --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/yellow_exporter.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_exporters": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:exporters" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/yellow_exporter" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_exporters", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/yellow_exporter" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/yellow_external_storage.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/yellow_external_storage.json new file mode 100644 index 000000000..67cb4c0cb --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/yellow_external_storage.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_external_storages": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:external_storages" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/yellow_external_storage" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_external_storages", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/yellow_external_storage" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/yellow_grid.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/yellow_grid.json new file mode 100644 index 000000000..964364e44 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/yellow_grid.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_grids": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:grids" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/yellow_grid" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_grids", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/yellow_grid" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/yellow_importer.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/yellow_importer.json new file mode 100644 index 000000000..23ae282ec --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/yellow_importer.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_importers": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:importers" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/yellow_importer" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_importers", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/yellow_importer" + ] + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/black_cable.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/black_cable.json new file mode 100644 index 000000000..53f320778 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/black_cable.json @@ -0,0 +1,19 @@ +{ + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "refinedstorage2:black_cable" + } + ], + "rolls": 1.0 + } + ] +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/black_controller.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/black_controller.json index 8593754dc..b1046f281 100644 --- a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/black_controller.json +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/black_controller.json @@ -1,20 +1,19 @@ { - "type": "minecraft:block", "pools": [ { - "rolls": 1, + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", - "functions": [], "name": "refinedstorage2:black_controller" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } ] } \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/black_crafting_grid.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/black_crafting_grid.json new file mode 100644 index 000000000..5ca69fa2e --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/black_crafting_grid.json @@ -0,0 +1,19 @@ +{ + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "refinedstorage2:black_crafting_grid" + } + ], + "rolls": 1.0 + } + ] +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/black_creative_controller.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/black_creative_controller.json index af0ea7f6b..4c19cfc35 100644 --- a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/black_creative_controller.json +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/black_creative_controller.json @@ -1,20 +1,19 @@ { - "type": "minecraft:block", "pools": [ { - "rolls": 1, + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", - "functions": [], "name": "refinedstorage2:black_creative_controller" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } ] } \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/black_grid.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/black_grid.json index db503ef5a..e8ba0af8b 100644 --- a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/black_grid.json +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/black_grid.json @@ -1,20 +1,19 @@ { - "type": "minecraft:block", "pools": [ { - "rolls": 1, + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", - "functions": [], "name": "refinedstorage2:black_grid" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } ] } \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/blue_cable.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/blue_cable.json new file mode 100644 index 000000000..19ea71beb --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/blue_cable.json @@ -0,0 +1,19 @@ +{ + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "refinedstorage2:blue_cable" + } + ], + "rolls": 1.0 + } + ] +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/blue_controller.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/blue_controller.json index eb24f7bca..17289d835 100644 --- a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/blue_controller.json +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/blue_controller.json @@ -1,20 +1,19 @@ { - "type": "minecraft:block", "pools": [ { - "rolls": 1, + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", - "functions": [], "name": "refinedstorage2:blue_controller" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } ] } \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/blue_crafting_grid.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/blue_crafting_grid.json new file mode 100644 index 000000000..82b25ba7f --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/blue_crafting_grid.json @@ -0,0 +1,19 @@ +{ + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "refinedstorage2:blue_crafting_grid" + } + ], + "rolls": 1.0 + } + ] +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/blue_creative_controller.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/blue_creative_controller.json index 75c6d64d7..b421953a8 100644 --- a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/blue_creative_controller.json +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/blue_creative_controller.json @@ -1,20 +1,19 @@ { - "type": "minecraft:block", "pools": [ { - "rolls": 1, + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", - "functions": [], "name": "refinedstorage2:blue_creative_controller" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } ] } \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/blue_grid.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/blue_grid.json index fb52cabbf..daf56cb49 100644 --- a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/blue_grid.json +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/blue_grid.json @@ -1,20 +1,19 @@ { - "type": "minecraft:block", "pools": [ { - "rolls": 1, + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", - "functions": [], "name": "refinedstorage2:blue_grid" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } ] } \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/brown_cable.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/brown_cable.json new file mode 100644 index 000000000..e3e2f3d09 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/brown_cable.json @@ -0,0 +1,19 @@ +{ + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "refinedstorage2:brown_cable" + } + ], + "rolls": 1.0 + } + ] +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/brown_controller.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/brown_controller.json index 7196e9572..862629b9d 100644 --- a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/brown_controller.json +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/brown_controller.json @@ -1,20 +1,19 @@ { - "type": "minecraft:block", "pools": [ { - "rolls": 1, + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", - "functions": [], "name": "refinedstorage2:brown_controller" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } ] } \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/brown_crafting_grid.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/brown_crafting_grid.json new file mode 100644 index 000000000..16278f21b --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/brown_crafting_grid.json @@ -0,0 +1,19 @@ +{ + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "refinedstorage2:brown_crafting_grid" + } + ], + "rolls": 1.0 + } + ] +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/brown_creative_controller.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/brown_creative_controller.json index f76c07b86..712c977b4 100644 --- a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/brown_creative_controller.json +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/brown_creative_controller.json @@ -1,20 +1,19 @@ { - "type": "minecraft:block", "pools": [ { - "rolls": 1, + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", - "functions": [], "name": "refinedstorage2:brown_creative_controller" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } ] } \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/brown_grid.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/brown_grid.json index 535a7a9fc..249fc9e27 100644 --- a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/brown_grid.json +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/brown_grid.json @@ -1,20 +1,19 @@ { - "type": "minecraft:block", "pools": [ { - "rolls": 1, + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", - "functions": [], "name": "refinedstorage2:brown_grid" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } ] } \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/main/resources/data/refinedstorage2/loot_tables/blocks/cable.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/cable.json similarity index 81% rename from refinedstorage2-platform-common/src/main/resources/data/refinedstorage2/loot_tables/blocks/cable.json rename to refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/cable.json index 4e453a072..7b4c52619 100644 --- a/refinedstorage2-platform-common/src/main/resources/data/refinedstorage2/loot_tables/blocks/cable.json +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/cable.json @@ -1,19 +1,19 @@ { - "type": "minecraft:block", "pools": [ { - "rolls": 1, + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "refinedstorage2:cable" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } ] -} +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/controller.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/controller.json index 5b260a635..f9ad94826 100644 --- a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/controller.json +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/controller.json @@ -1,20 +1,19 @@ { - "type": "minecraft:block", "pools": [ { - "rolls": 1, + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", - "functions": [], "name": "refinedstorage2:controller" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } ] } \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/crafting_grid.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/crafting_grid.json new file mode 100644 index 000000000..d997e3347 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/crafting_grid.json @@ -0,0 +1,19 @@ +{ + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "refinedstorage2:crafting_grid" + } + ], + "rolls": 1.0 + } + ] +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/creative_controller.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/creative_controller.json index 681216fde..fc47bad02 100644 --- a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/creative_controller.json +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/creative_controller.json @@ -1,20 +1,19 @@ { - "type": "minecraft:block", "pools": [ { - "rolls": 1, + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", - "functions": [], "name": "refinedstorage2:creative_controller" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } ] } \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/cyan_cable.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/cyan_cable.json new file mode 100644 index 000000000..8944fc8c1 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/cyan_cable.json @@ -0,0 +1,19 @@ +{ + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "refinedstorage2:cyan_cable" + } + ], + "rolls": 1.0 + } + ] +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/cyan_controller.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/cyan_controller.json index 430c92e62..cf73a37df 100644 --- a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/cyan_controller.json +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/cyan_controller.json @@ -1,20 +1,19 @@ { - "type": "minecraft:block", "pools": [ { - "rolls": 1, + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", - "functions": [], "name": "refinedstorage2:cyan_controller" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } ] } \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/cyan_crafting_grid.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/cyan_crafting_grid.json new file mode 100644 index 000000000..096931957 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/cyan_crafting_grid.json @@ -0,0 +1,19 @@ +{ + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "refinedstorage2:cyan_crafting_grid" + } + ], + "rolls": 1.0 + } + ] +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/cyan_creative_controller.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/cyan_creative_controller.json index bf1283b1c..35f7cc359 100644 --- a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/cyan_creative_controller.json +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/cyan_creative_controller.json @@ -1,20 +1,19 @@ { - "type": "minecraft:block", "pools": [ { - "rolls": 1, + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", - "functions": [], "name": "refinedstorage2:cyan_creative_controller" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } ] } \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/cyan_grid.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/cyan_grid.json index c81b499ee..1b0478fd5 100644 --- a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/cyan_grid.json +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/cyan_grid.json @@ -1,20 +1,19 @@ { - "type": "minecraft:block", "pools": [ { - "rolls": 1, + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", - "functions": [], "name": "refinedstorage2:cyan_grid" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } ] } \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/gray_controller.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/gray_controller.json index 387673377..ea8a2f387 100644 --- a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/gray_controller.json +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/gray_controller.json @@ -1,20 +1,19 @@ { - "type": "minecraft:block", "pools": [ { - "rolls": 1, + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", - "functions": [], "name": "refinedstorage2:gray_controller" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } ] } \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/gray_crafting_grid.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/gray_crafting_grid.json new file mode 100644 index 000000000..522142e21 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/gray_crafting_grid.json @@ -0,0 +1,19 @@ +{ + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "refinedstorage2:gray_crafting_grid" + } + ], + "rolls": 1.0 + } + ] +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/gray_creative_controller.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/gray_creative_controller.json index e0e7df1db..26eef2b1c 100644 --- a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/gray_creative_controller.json +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/gray_creative_controller.json @@ -1,20 +1,19 @@ { - "type": "minecraft:block", "pools": [ { - "rolls": 1, + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", - "functions": [], "name": "refinedstorage2:gray_creative_controller" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } ] } \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/gray_grid.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/gray_grid.json index fadc1b56a..d9a2274bf 100644 --- a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/gray_grid.json +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/gray_grid.json @@ -1,20 +1,19 @@ { - "type": "minecraft:block", "pools": [ { - "rolls": 1, + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", - "functions": [], "name": "refinedstorage2:gray_grid" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } ] } \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/green_cable.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/green_cable.json new file mode 100644 index 000000000..ca9fc8733 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/green_cable.json @@ -0,0 +1,19 @@ +{ + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "refinedstorage2:green_cable" + } + ], + "rolls": 1.0 + } + ] +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/green_controller.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/green_controller.json index 1ed5bcc6d..7713cc946 100644 --- a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/green_controller.json +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/green_controller.json @@ -1,20 +1,19 @@ { - "type": "minecraft:block", "pools": [ { - "rolls": 1, + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", - "functions": [], "name": "refinedstorage2:green_controller" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } ] } \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/green_crafting_grid.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/green_crafting_grid.json new file mode 100644 index 000000000..0b73eaf94 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/green_crafting_grid.json @@ -0,0 +1,19 @@ +{ + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "refinedstorage2:green_crafting_grid" + } + ], + "rolls": 1.0 + } + ] +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/green_creative_controller.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/green_creative_controller.json index b31b4b6ec..b687ae548 100644 --- a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/green_creative_controller.json +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/green_creative_controller.json @@ -1,20 +1,19 @@ { - "type": "minecraft:block", "pools": [ { - "rolls": 1, + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", - "functions": [], "name": "refinedstorage2:green_creative_controller" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } ] } \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/green_grid.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/green_grid.json index a2e470f60..b37b662af 100644 --- a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/green_grid.json +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/green_grid.json @@ -1,20 +1,19 @@ { - "type": "minecraft:block", "pools": [ { - "rolls": 1, + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", - "functions": [], "name": "refinedstorage2:green_grid" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } ] } \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/grid.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/grid.json index 625e2dc19..3d7b7e9dc 100644 --- a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/grid.json +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/grid.json @@ -1,20 +1,19 @@ { - "type": "minecraft:block", "pools": [ { - "rolls": 1, + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", - "functions": [], "name": "refinedstorage2:grid" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } ] } \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/light_blue_cable.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/light_blue_cable.json new file mode 100644 index 000000000..743a24183 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/light_blue_cable.json @@ -0,0 +1,19 @@ +{ + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "refinedstorage2:light_blue_cable" + } + ], + "rolls": 1.0 + } + ] +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/light_gray_cable.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/light_gray_cable.json new file mode 100644 index 000000000..e49b475f4 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/light_gray_cable.json @@ -0,0 +1,19 @@ +{ + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "refinedstorage2:light_gray_cable" + } + ], + "rolls": 1.0 + } + ] +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/light_gray_controller.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/light_gray_controller.json index 8a600cc1d..94336e01c 100644 --- a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/light_gray_controller.json +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/light_gray_controller.json @@ -1,20 +1,19 @@ { - "type": "minecraft:block", "pools": [ { - "rolls": 1, + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", - "functions": [], "name": "refinedstorage2:light_gray_controller" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } ] } \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/light_gray_crafting_grid.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/light_gray_crafting_grid.json new file mode 100644 index 000000000..a2d3d1cb5 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/light_gray_crafting_grid.json @@ -0,0 +1,19 @@ +{ + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "refinedstorage2:light_gray_crafting_grid" + } + ], + "rolls": 1.0 + } + ] +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/light_gray_creative_controller.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/light_gray_creative_controller.json index f1d51aa49..63255472b 100644 --- a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/light_gray_creative_controller.json +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/light_gray_creative_controller.json @@ -1,20 +1,19 @@ { - "type": "minecraft:block", "pools": [ { - "rolls": 1, + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", - "functions": [], "name": "refinedstorage2:light_gray_creative_controller" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } ] } \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/light_gray_grid.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/light_gray_grid.json index bc69a9ecd..8910208f8 100644 --- a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/light_gray_grid.json +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/light_gray_grid.json @@ -1,20 +1,19 @@ { - "type": "minecraft:block", "pools": [ { - "rolls": 1, + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", - "functions": [], "name": "refinedstorage2:light_gray_grid" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } ] } \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/lime_cable.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/lime_cable.json new file mode 100644 index 000000000..9c193feb2 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/lime_cable.json @@ -0,0 +1,19 @@ +{ + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "refinedstorage2:lime_cable" + } + ], + "rolls": 1.0 + } + ] +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/lime_controller.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/lime_controller.json index 589a4bcb5..5a336eaae 100644 --- a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/lime_controller.json +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/lime_controller.json @@ -1,20 +1,19 @@ { - "type": "minecraft:block", "pools": [ { - "rolls": 1, + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", - "functions": [], "name": "refinedstorage2:lime_controller" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } ] } \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/lime_crafting_grid.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/lime_crafting_grid.json new file mode 100644 index 000000000..64231b996 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/lime_crafting_grid.json @@ -0,0 +1,19 @@ +{ + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "refinedstorage2:lime_crafting_grid" + } + ], + "rolls": 1.0 + } + ] +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/lime_creative_controller.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/lime_creative_controller.json index 712a3e39b..b66623ec3 100644 --- a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/lime_creative_controller.json +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/lime_creative_controller.json @@ -1,20 +1,19 @@ { - "type": "minecraft:block", "pools": [ { - "rolls": 1, + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", - "functions": [], "name": "refinedstorage2:lime_creative_controller" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } ] } \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/lime_grid.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/lime_grid.json index 040d2b678..713fa2d95 100644 --- a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/lime_grid.json +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/lime_grid.json @@ -1,20 +1,19 @@ { - "type": "minecraft:block", "pools": [ { - "rolls": 1, + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", - "functions": [], "name": "refinedstorage2:lime_grid" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } ] } \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/magenta_cable.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/magenta_cable.json new file mode 100644 index 000000000..b40434ab8 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/magenta_cable.json @@ -0,0 +1,19 @@ +{ + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "refinedstorage2:magenta_cable" + } + ], + "rolls": 1.0 + } + ] +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/magenta_controller.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/magenta_controller.json index c34c3ec9d..bf7e46de2 100644 --- a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/magenta_controller.json +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/magenta_controller.json @@ -1,20 +1,19 @@ { - "type": "minecraft:block", "pools": [ { - "rolls": 1, + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", - "functions": [], "name": "refinedstorage2:magenta_controller" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } ] } \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/magenta_crafting_grid.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/magenta_crafting_grid.json new file mode 100644 index 000000000..2f18f7df3 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/magenta_crafting_grid.json @@ -0,0 +1,19 @@ +{ + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "refinedstorage2:magenta_crafting_grid" + } + ], + "rolls": 1.0 + } + ] +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/magenta_creative_controller.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/magenta_creative_controller.json index 65717ab3f..cb6ef84c5 100644 --- a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/magenta_creative_controller.json +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/magenta_creative_controller.json @@ -1,20 +1,19 @@ { - "type": "minecraft:block", "pools": [ { - "rolls": 1, + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", - "functions": [], "name": "refinedstorage2:magenta_creative_controller" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } ] } \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/magenta_grid.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/magenta_grid.json index fba5180a1..b48b396aa 100644 --- a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/magenta_grid.json +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/magenta_grid.json @@ -1,20 +1,19 @@ { - "type": "minecraft:block", "pools": [ { - "rolls": 1, + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", - "functions": [], "name": "refinedstorage2:magenta_grid" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } ] } \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/orange_cable.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/orange_cable.json new file mode 100644 index 000000000..0425cef85 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/orange_cable.json @@ -0,0 +1,19 @@ +{ + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "refinedstorage2:orange_cable" + } + ], + "rolls": 1.0 + } + ] +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/orange_controller.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/orange_controller.json index fcebdf8d9..3f4b92160 100644 --- a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/orange_controller.json +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/orange_controller.json @@ -1,20 +1,19 @@ { - "type": "minecraft:block", "pools": [ { - "rolls": 1, + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", - "functions": [], "name": "refinedstorage2:orange_controller" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } ] } \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/orange_crafting_grid.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/orange_crafting_grid.json new file mode 100644 index 000000000..6539295eb --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/orange_crafting_grid.json @@ -0,0 +1,19 @@ +{ + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "refinedstorage2:orange_crafting_grid" + } + ], + "rolls": 1.0 + } + ] +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/orange_creative_controller.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/orange_creative_controller.json index 98123490d..9eb3e8f34 100644 --- a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/orange_creative_controller.json +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/orange_creative_controller.json @@ -1,20 +1,19 @@ { - "type": "minecraft:block", "pools": [ { - "rolls": 1, + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", - "functions": [], "name": "refinedstorage2:orange_creative_controller" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } ] } \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/orange_grid.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/orange_grid.json index e4251044f..e9b4d533b 100644 --- a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/orange_grid.json +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/orange_grid.json @@ -1,20 +1,19 @@ { - "type": "minecraft:block", "pools": [ { - "rolls": 1, + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", - "functions": [], "name": "refinedstorage2:orange_grid" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } ] } \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/pink_cable.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/pink_cable.json new file mode 100644 index 000000000..24e538098 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/pink_cable.json @@ -0,0 +1,19 @@ +{ + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "refinedstorage2:pink_cable" + } + ], + "rolls": 1.0 + } + ] +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/pink_controller.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/pink_controller.json index a9f874bdb..8fa8874b6 100644 --- a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/pink_controller.json +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/pink_controller.json @@ -1,20 +1,19 @@ { - "type": "minecraft:block", "pools": [ { - "rolls": 1, + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", - "functions": [], "name": "refinedstorage2:pink_controller" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } ] } \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/pink_crafting_grid.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/pink_crafting_grid.json new file mode 100644 index 000000000..ab403a0ce --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/pink_crafting_grid.json @@ -0,0 +1,19 @@ +{ + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "refinedstorage2:pink_crafting_grid" + } + ], + "rolls": 1.0 + } + ] +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/pink_creative_controller.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/pink_creative_controller.json index 9753a41f7..bae31fcd2 100644 --- a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/pink_creative_controller.json +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/pink_creative_controller.json @@ -1,20 +1,19 @@ { - "type": "minecraft:block", "pools": [ { - "rolls": 1, + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", - "functions": [], "name": "refinedstorage2:pink_creative_controller" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } ] } \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/pink_grid.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/pink_grid.json index 17d814fb7..d04e46940 100644 --- a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/pink_grid.json +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/pink_grid.json @@ -1,20 +1,19 @@ { - "type": "minecraft:block", "pools": [ { - "rolls": 1, + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", - "functions": [], "name": "refinedstorage2:pink_grid" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } ] } \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/purple_cable.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/purple_cable.json new file mode 100644 index 000000000..8fc350e7d --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/purple_cable.json @@ -0,0 +1,19 @@ +{ + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "refinedstorage2:purple_cable" + } + ], + "rolls": 1.0 + } + ] +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/purple_controller.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/purple_controller.json index 8ad01b960..53c05b7b7 100644 --- a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/purple_controller.json +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/purple_controller.json @@ -1,20 +1,19 @@ { - "type": "minecraft:block", "pools": [ { - "rolls": 1, + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", - "functions": [], "name": "refinedstorage2:purple_controller" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } ] } \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/purple_crafting_grid.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/purple_crafting_grid.json new file mode 100644 index 000000000..5d181df45 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/purple_crafting_grid.json @@ -0,0 +1,19 @@ +{ + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "refinedstorage2:purple_crafting_grid" + } + ], + "rolls": 1.0 + } + ] +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/purple_creative_controller.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/purple_creative_controller.json index 8c119912d..708fe3b07 100644 --- a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/purple_creative_controller.json +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/purple_creative_controller.json @@ -1,20 +1,19 @@ { - "type": "minecraft:block", "pools": [ { - "rolls": 1, + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", - "functions": [], "name": "refinedstorage2:purple_creative_controller" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } ] } \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/purple_grid.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/purple_grid.json index 4e735e7b4..d9e353002 100644 --- a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/purple_grid.json +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/purple_grid.json @@ -1,20 +1,19 @@ { - "type": "minecraft:block", "pools": [ { - "rolls": 1, + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", - "functions": [], "name": "refinedstorage2:purple_grid" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } ] } \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/red_cable.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/red_cable.json new file mode 100644 index 000000000..4725f36cc --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/red_cable.json @@ -0,0 +1,19 @@ +{ + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "refinedstorage2:red_cable" + } + ], + "rolls": 1.0 + } + ] +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/red_controller.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/red_controller.json index 0df80c70a..cf21cc186 100644 --- a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/red_controller.json +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/red_controller.json @@ -1,20 +1,19 @@ { - "type": "minecraft:block", "pools": [ { - "rolls": 1, + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", - "functions": [], "name": "refinedstorage2:red_controller" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } ] } \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/red_crafting_grid.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/red_crafting_grid.json new file mode 100644 index 000000000..c8f1170ca --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/red_crafting_grid.json @@ -0,0 +1,19 @@ +{ + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "refinedstorage2:red_crafting_grid" + } + ], + "rolls": 1.0 + } + ] +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/red_creative_controller.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/red_creative_controller.json index b2a442274..528b5940e 100644 --- a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/red_creative_controller.json +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/red_creative_controller.json @@ -1,20 +1,19 @@ { - "type": "minecraft:block", "pools": [ { - "rolls": 1, + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", - "functions": [], "name": "refinedstorage2:red_creative_controller" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } ] } \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/red_grid.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/red_grid.json index feeecbaea..12322d1fe 100644 --- a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/red_grid.json +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/red_grid.json @@ -1,20 +1,19 @@ { - "type": "minecraft:block", "pools": [ { - "rolls": 1, + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", - "functions": [], "name": "refinedstorage2:red_grid" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } ] } \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/white_cable.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/white_cable.json new file mode 100644 index 000000000..3675b1271 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/white_cable.json @@ -0,0 +1,19 @@ +{ + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "refinedstorage2:white_cable" + } + ], + "rolls": 1.0 + } + ] +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/white_controller.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/white_controller.json index 94eb65f7f..5c79d117a 100644 --- a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/white_controller.json +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/white_controller.json @@ -1,20 +1,19 @@ { - "type": "minecraft:block", "pools": [ { - "rolls": 1, + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", - "functions": [], "name": "refinedstorage2:white_controller" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } ] } \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/white_crafting_grid.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/white_crafting_grid.json new file mode 100644 index 000000000..74a2e5b31 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/white_crafting_grid.json @@ -0,0 +1,19 @@ +{ + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "refinedstorage2:white_crafting_grid" + } + ], + "rolls": 1.0 + } + ] +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/white_creative_controller.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/white_creative_controller.json index 2a67d676a..5c369a423 100644 --- a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/white_creative_controller.json +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/white_creative_controller.json @@ -1,20 +1,19 @@ { - "type": "minecraft:block", "pools": [ { - "rolls": 1, + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", - "functions": [], "name": "refinedstorage2:white_creative_controller" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } ] } \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/white_grid.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/white_grid.json index 07b3ab306..9a49d0ad1 100644 --- a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/white_grid.json +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/white_grid.json @@ -1,20 +1,19 @@ { - "type": "minecraft:block", "pools": [ { - "rolls": 1, + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", - "functions": [], "name": "refinedstorage2:white_grid" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } ] } \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/yellow_cable.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/yellow_cable.json new file mode 100644 index 000000000..0d3fd05da --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/yellow_cable.json @@ -0,0 +1,19 @@ +{ + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "refinedstorage2:yellow_cable" + } + ], + "rolls": 1.0 + } + ] +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/yellow_controller.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/yellow_controller.json index 576ad0d42..5f11cc074 100644 --- a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/yellow_controller.json +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/yellow_controller.json @@ -1,20 +1,19 @@ { - "type": "minecraft:block", "pools": [ { - "rolls": 1, + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", - "functions": [], "name": "refinedstorage2:yellow_controller" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } ] } \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/yellow_crafting_grid.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/yellow_crafting_grid.json new file mode 100644 index 000000000..f54d8302a --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/yellow_crafting_grid.json @@ -0,0 +1,19 @@ +{ + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "refinedstorage2:yellow_crafting_grid" + } + ], + "rolls": 1.0 + } + ] +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/yellow_creative_controller.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/yellow_creative_controller.json index 5c942ff88..315bf2371 100644 --- a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/yellow_creative_controller.json +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/yellow_creative_controller.json @@ -1,20 +1,19 @@ { - "type": "minecraft:block", "pools": [ { - "rolls": 1, + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", - "functions": [], "name": "refinedstorage2:yellow_creative_controller" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } ] } \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/yellow_grid.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/yellow_grid.json index fa5046aaf..adc488b79 100644 --- a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/yellow_grid.json +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/yellow_grid.json @@ -1,20 +1,19 @@ { - "type": "minecraft:block", "pools": [ { - "rolls": 1, + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", - "functions": [], "name": "refinedstorage2:yellow_grid" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } ] } \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/black_cable.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/black_cable.json new file mode 100644 index 000000000..e48698846 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/black_cable.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:cables" + }, + { + "item": "minecraft:black_dye" + } + ], + "result": { + "item": "refinedstorage2:black_cable" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/black_controller.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/black_controller.json index 200d1e8be..0fcc17545 100644 --- a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/black_controller.json +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/black_controller.json @@ -1,5 +1,6 @@ { "type": "minecraft:crafting_shapeless", + "category": "misc", "ingredients": [ { "tag": "refinedstorage2:controllers" diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/black_crafting_grid.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/black_crafting_grid.json new file mode 100644 index 000000000..8f0faa890 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/black_crafting_grid.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:crafting_grids" + }, + { + "item": "minecraft:black_dye" + } + ], + "result": { + "item": "refinedstorage2:black_crafting_grid" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/black_exporter.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/black_exporter.json new file mode 100644 index 000000000..4dabece75 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/black_exporter.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:exporters" + }, + { + "item": "minecraft:black_dye" + } + ], + "result": { + "item": "refinedstorage2:black_exporter" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/black_external_storage.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/black_external_storage.json new file mode 100644 index 000000000..693847b54 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/black_external_storage.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:external_storages" + }, + { + "item": "minecraft:black_dye" + } + ], + "result": { + "item": "refinedstorage2:black_external_storage" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/black_grid.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/black_grid.json index 0996f8708..0b2b67ff7 100644 --- a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/black_grid.json +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/black_grid.json @@ -1,5 +1,6 @@ { "type": "minecraft:crafting_shapeless", + "category": "misc", "ingredients": [ { "tag": "refinedstorage2:grids" diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/black_importer.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/black_importer.json new file mode 100644 index 000000000..178d2dede --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/black_importer.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:importers" + }, + { + "item": "minecraft:black_dye" + } + ], + "result": { + "item": "refinedstorage2:black_importer" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/blue_cable.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/blue_cable.json new file mode 100644 index 000000000..5bcd5edfd --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/blue_cable.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:cables" + }, + { + "item": "minecraft:blue_dye" + } + ], + "result": { + "item": "refinedstorage2:blue_cable" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/blue_controller.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/blue_controller.json index b31f66b09..f04481333 100644 --- a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/blue_controller.json +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/blue_controller.json @@ -1,5 +1,6 @@ { "type": "minecraft:crafting_shapeless", + "category": "misc", "ingredients": [ { "tag": "refinedstorage2:controllers" diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/blue_crafting_grid.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/blue_crafting_grid.json new file mode 100644 index 000000000..ae7919c39 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/blue_crafting_grid.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:crafting_grids" + }, + { + "item": "minecraft:blue_dye" + } + ], + "result": { + "item": "refinedstorage2:blue_crafting_grid" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/blue_exporter.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/blue_exporter.json new file mode 100644 index 000000000..f513359fc --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/blue_exporter.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:exporters" + }, + { + "item": "minecraft:blue_dye" + } + ], + "result": { + "item": "refinedstorage2:blue_exporter" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/blue_external_storage.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/blue_external_storage.json new file mode 100644 index 000000000..38b289401 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/blue_external_storage.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:external_storages" + }, + { + "item": "minecraft:blue_dye" + } + ], + "result": { + "item": "refinedstorage2:blue_external_storage" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/blue_grid.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/blue_grid.json index 1b48247f9..57b56e809 100644 --- a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/blue_grid.json +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/blue_grid.json @@ -1,5 +1,6 @@ { "type": "minecraft:crafting_shapeless", + "category": "misc", "ingredients": [ { "tag": "refinedstorage2:grids" diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/blue_importer.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/blue_importer.json new file mode 100644 index 000000000..91fe8860b --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/blue_importer.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:importers" + }, + { + "item": "minecraft:blue_dye" + } + ], + "result": { + "item": "refinedstorage2:blue_importer" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/brown_cable.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/brown_cable.json new file mode 100644 index 000000000..0d0cb079d --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/brown_cable.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:cables" + }, + { + "item": "minecraft:brown_dye" + } + ], + "result": { + "item": "refinedstorage2:brown_cable" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/brown_controller.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/brown_controller.json index 533e0fd81..7e7a52ea4 100644 --- a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/brown_controller.json +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/brown_controller.json @@ -1,5 +1,6 @@ { "type": "minecraft:crafting_shapeless", + "category": "misc", "ingredients": [ { "tag": "refinedstorage2:controllers" diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/brown_crafting_grid.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/brown_crafting_grid.json new file mode 100644 index 000000000..0d5932e6f --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/brown_crafting_grid.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:crafting_grids" + }, + { + "item": "minecraft:brown_dye" + } + ], + "result": { + "item": "refinedstorage2:brown_crafting_grid" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/brown_exporter.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/brown_exporter.json new file mode 100644 index 000000000..de1579903 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/brown_exporter.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:exporters" + }, + { + "item": "minecraft:brown_dye" + } + ], + "result": { + "item": "refinedstorage2:brown_exporter" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/brown_external_storage.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/brown_external_storage.json new file mode 100644 index 000000000..70ccb21dc --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/brown_external_storage.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:external_storages" + }, + { + "item": "minecraft:brown_dye" + } + ], + "result": { + "item": "refinedstorage2:brown_external_storage" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/brown_grid.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/brown_grid.json index e2bb6a49d..b4de570d8 100644 --- a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/brown_grid.json +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/brown_grid.json @@ -1,5 +1,6 @@ { "type": "minecraft:crafting_shapeless", + "category": "misc", "ingredients": [ { "tag": "refinedstorage2:grids" diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/brown_importer.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/brown_importer.json new file mode 100644 index 000000000..be54438e7 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/brown_importer.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:importers" + }, + { + "item": "minecraft:brown_dye" + } + ], + "result": { + "item": "refinedstorage2:brown_importer" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/cyan_cable.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/cyan_cable.json new file mode 100644 index 000000000..ecb8aabd6 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/cyan_cable.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:cables" + }, + { + "item": "minecraft:cyan_dye" + } + ], + "result": { + "item": "refinedstorage2:cyan_cable" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/cyan_controller.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/cyan_controller.json index d6e694ae6..d207650b9 100644 --- a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/cyan_controller.json +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/cyan_controller.json @@ -1,5 +1,6 @@ { "type": "minecraft:crafting_shapeless", + "category": "misc", "ingredients": [ { "tag": "refinedstorage2:controllers" diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/cyan_crafting_grid.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/cyan_crafting_grid.json new file mode 100644 index 000000000..7b47fd448 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/cyan_crafting_grid.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:crafting_grids" + }, + { + "item": "minecraft:cyan_dye" + } + ], + "result": { + "item": "refinedstorage2:cyan_crafting_grid" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/cyan_exporter.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/cyan_exporter.json new file mode 100644 index 000000000..cc6267745 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/cyan_exporter.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:exporters" + }, + { + "item": "minecraft:cyan_dye" + } + ], + "result": { + "item": "refinedstorage2:cyan_exporter" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/cyan_external_storage.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/cyan_external_storage.json new file mode 100644 index 000000000..6fc9c019d --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/cyan_external_storage.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:external_storages" + }, + { + "item": "minecraft:cyan_dye" + } + ], + "result": { + "item": "refinedstorage2:cyan_external_storage" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/cyan_grid.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/cyan_grid.json index 44237d47d..17f543c3b 100644 --- a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/cyan_grid.json +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/cyan_grid.json @@ -1,5 +1,6 @@ { "type": "minecraft:crafting_shapeless", + "category": "misc", "ingredients": [ { "tag": "refinedstorage2:grids" diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/cyan_importer.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/cyan_importer.json new file mode 100644 index 000000000..1c2a2c3f7 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/cyan_importer.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:importers" + }, + { + "item": "minecraft:cyan_dye" + } + ], + "result": { + "item": "refinedstorage2:cyan_importer" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/gray_cable.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/gray_cable.json new file mode 100644 index 000000000..af661b33f --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/gray_cable.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:cables" + }, + { + "item": "minecraft:gray_dye" + } + ], + "result": { + "item": "refinedstorage2:cable" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/gray_controller.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/gray_controller.json index 486d76f26..57ec1f243 100644 --- a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/gray_controller.json +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/gray_controller.json @@ -1,5 +1,6 @@ { "type": "minecraft:crafting_shapeless", + "category": "misc", "ingredients": [ { "tag": "refinedstorage2:controllers" diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/gray_crafting_grid.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/gray_crafting_grid.json new file mode 100644 index 000000000..d2ff4f253 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/gray_crafting_grid.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:crafting_grids" + }, + { + "item": "minecraft:gray_dye" + } + ], + "result": { + "item": "refinedstorage2:gray_crafting_grid" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/gray_exporter.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/gray_exporter.json new file mode 100644 index 000000000..7c3c58c2a --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/gray_exporter.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:exporters" + }, + { + "item": "minecraft:gray_dye" + } + ], + "result": { + "item": "refinedstorage2:exporter" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/gray_external_storage.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/gray_external_storage.json new file mode 100644 index 000000000..4b026875a --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/gray_external_storage.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:external_storages" + }, + { + "item": "minecraft:gray_dye" + } + ], + "result": { + "item": "refinedstorage2:external_storage" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/gray_grid.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/gray_grid.json index 7346ef988..0c35ce3d6 100644 --- a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/gray_grid.json +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/gray_grid.json @@ -1,5 +1,6 @@ { "type": "minecraft:crafting_shapeless", + "category": "misc", "ingredients": [ { "tag": "refinedstorage2:grids" diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/gray_importer.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/gray_importer.json new file mode 100644 index 000000000..312555d44 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/gray_importer.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:importers" + }, + { + "item": "minecraft:gray_dye" + } + ], + "result": { + "item": "refinedstorage2:importer" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/green_cable.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/green_cable.json new file mode 100644 index 000000000..bb2dd7ca8 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/green_cable.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:cables" + }, + { + "item": "minecraft:green_dye" + } + ], + "result": { + "item": "refinedstorage2:green_cable" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/green_controller.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/green_controller.json index b55d5a0a5..f70633d98 100644 --- a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/green_controller.json +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/green_controller.json @@ -1,5 +1,6 @@ { "type": "minecraft:crafting_shapeless", + "category": "misc", "ingredients": [ { "tag": "refinedstorage2:controllers" diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/green_crafting_grid.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/green_crafting_grid.json new file mode 100644 index 000000000..bc294023e --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/green_crafting_grid.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:crafting_grids" + }, + { + "item": "minecraft:green_dye" + } + ], + "result": { + "item": "refinedstorage2:green_crafting_grid" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/green_exporter.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/green_exporter.json new file mode 100644 index 000000000..f44fe822f --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/green_exporter.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:exporters" + }, + { + "item": "minecraft:green_dye" + } + ], + "result": { + "item": "refinedstorage2:green_exporter" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/green_external_storage.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/green_external_storage.json new file mode 100644 index 000000000..98432deaa --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/green_external_storage.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:external_storages" + }, + { + "item": "minecraft:green_dye" + } + ], + "result": { + "item": "refinedstorage2:green_external_storage" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/green_grid.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/green_grid.json index f0eb88e80..33dab8e26 100644 --- a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/green_grid.json +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/green_grid.json @@ -1,5 +1,6 @@ { "type": "minecraft:crafting_shapeless", + "category": "misc", "ingredients": [ { "tag": "refinedstorage2:grids" diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/green_importer.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/green_importer.json new file mode 100644 index 000000000..e8954da13 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/green_importer.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:importers" + }, + { + "item": "minecraft:green_dye" + } + ], + "result": { + "item": "refinedstorage2:green_importer" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/light_blue_cable.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/light_blue_cable.json new file mode 100644 index 000000000..b048178e6 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/light_blue_cable.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:cables" + }, + { + "item": "minecraft:light_blue_dye" + } + ], + "result": { + "item": "refinedstorage2:light_blue_cable" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/controller.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/light_blue_controller.json similarity index 91% rename from refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/controller.json rename to refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/light_blue_controller.json index 3cd250399..4d427d798 100644 --- a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/controller.json +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/light_blue_controller.json @@ -1,5 +1,6 @@ { "type": "minecraft:crafting_shapeless", + "category": "misc", "ingredients": [ { "tag": "refinedstorage2:controllers" diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/light_blue_crafting_grid.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/light_blue_crafting_grid.json new file mode 100644 index 000000000..160f490e1 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/light_blue_crafting_grid.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:crafting_grids" + }, + { + "item": "minecraft:light_blue_dye" + } + ], + "result": { + "item": "refinedstorage2:crafting_grid" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/light_blue_exporter.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/light_blue_exporter.json new file mode 100644 index 000000000..6eeb49cb3 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/light_blue_exporter.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:exporters" + }, + { + "item": "minecraft:light_blue_dye" + } + ], + "result": { + "item": "refinedstorage2:light_blue_exporter" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/light_blue_external_storage.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/light_blue_external_storage.json new file mode 100644 index 000000000..d96e0cf51 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/light_blue_external_storage.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:external_storages" + }, + { + "item": "minecraft:light_blue_dye" + } + ], + "result": { + "item": "refinedstorage2:light_blue_external_storage" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/grid.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/light_blue_grid.json similarity index 91% rename from refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/grid.json rename to refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/light_blue_grid.json index c513f4afc..b07a63f31 100644 --- a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/grid.json +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/light_blue_grid.json @@ -1,5 +1,6 @@ { "type": "minecraft:crafting_shapeless", + "category": "misc", "ingredients": [ { "tag": "refinedstorage2:grids" diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/light_blue_importer.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/light_blue_importer.json new file mode 100644 index 000000000..1f0939a9e --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/light_blue_importer.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:importers" + }, + { + "item": "minecraft:light_blue_dye" + } + ], + "result": { + "item": "refinedstorage2:light_blue_importer" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/light_gray_cable.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/light_gray_cable.json new file mode 100644 index 000000000..5f8541b89 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/light_gray_cable.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:cables" + }, + { + "item": "minecraft:light_gray_dye" + } + ], + "result": { + "item": "refinedstorage2:light_gray_cable" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/light_gray_controller.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/light_gray_controller.json index 6521757e6..5b526647c 100644 --- a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/light_gray_controller.json +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/light_gray_controller.json @@ -1,5 +1,6 @@ { "type": "minecraft:crafting_shapeless", + "category": "misc", "ingredients": [ { "tag": "refinedstorage2:controllers" diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/light_gray_crafting_grid.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/light_gray_crafting_grid.json new file mode 100644 index 000000000..808f17577 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/light_gray_crafting_grid.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:crafting_grids" + }, + { + "item": "minecraft:light_gray_dye" + } + ], + "result": { + "item": "refinedstorage2:light_gray_crafting_grid" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/light_gray_exporter.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/light_gray_exporter.json new file mode 100644 index 000000000..5abe2413c --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/light_gray_exporter.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:exporters" + }, + { + "item": "minecraft:light_gray_dye" + } + ], + "result": { + "item": "refinedstorage2:light_gray_exporter" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/light_gray_external_storage.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/light_gray_external_storage.json new file mode 100644 index 000000000..286e45aad --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/light_gray_external_storage.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:external_storages" + }, + { + "item": "minecraft:light_gray_dye" + } + ], + "result": { + "item": "refinedstorage2:light_gray_external_storage" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/light_gray_grid.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/light_gray_grid.json index 563ce58fc..eacbfd4e1 100644 --- a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/light_gray_grid.json +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/light_gray_grid.json @@ -1,5 +1,6 @@ { "type": "minecraft:crafting_shapeless", + "category": "misc", "ingredients": [ { "tag": "refinedstorage2:grids" diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/light_gray_importer.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/light_gray_importer.json new file mode 100644 index 000000000..8588b5e6b --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/light_gray_importer.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:importers" + }, + { + "item": "minecraft:light_gray_dye" + } + ], + "result": { + "item": "refinedstorage2:light_gray_importer" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/lime_cable.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/lime_cable.json new file mode 100644 index 000000000..63c4ac175 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/lime_cable.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:cables" + }, + { + "item": "minecraft:lime_dye" + } + ], + "result": { + "item": "refinedstorage2:lime_cable" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/lime_controller.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/lime_controller.json index 8b86d7466..b47f8ca07 100644 --- a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/lime_controller.json +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/lime_controller.json @@ -1,5 +1,6 @@ { "type": "minecraft:crafting_shapeless", + "category": "misc", "ingredients": [ { "tag": "refinedstorage2:controllers" diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/lime_crafting_grid.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/lime_crafting_grid.json new file mode 100644 index 000000000..9f37720a0 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/lime_crafting_grid.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:crafting_grids" + }, + { + "item": "minecraft:lime_dye" + } + ], + "result": { + "item": "refinedstorage2:lime_crafting_grid" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/lime_exporter.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/lime_exporter.json new file mode 100644 index 000000000..091aa3b64 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/lime_exporter.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:exporters" + }, + { + "item": "minecraft:lime_dye" + } + ], + "result": { + "item": "refinedstorage2:lime_exporter" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/lime_external_storage.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/lime_external_storage.json new file mode 100644 index 000000000..9c5dabe2d --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/lime_external_storage.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:external_storages" + }, + { + "item": "minecraft:lime_dye" + } + ], + "result": { + "item": "refinedstorage2:lime_external_storage" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/lime_grid.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/lime_grid.json index 2603552ad..0df5d9e80 100644 --- a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/lime_grid.json +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/lime_grid.json @@ -1,5 +1,6 @@ { "type": "minecraft:crafting_shapeless", + "category": "misc", "ingredients": [ { "tag": "refinedstorage2:grids" diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/lime_importer.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/lime_importer.json new file mode 100644 index 000000000..041a38299 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/lime_importer.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:importers" + }, + { + "item": "minecraft:lime_dye" + } + ], + "result": { + "item": "refinedstorage2:lime_importer" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/magenta_cable.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/magenta_cable.json new file mode 100644 index 000000000..4ba9ed0ee --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/magenta_cable.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:cables" + }, + { + "item": "minecraft:magenta_dye" + } + ], + "result": { + "item": "refinedstorage2:magenta_cable" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/magenta_controller.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/magenta_controller.json index 5f09e1f40..3ef95812c 100644 --- a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/magenta_controller.json +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/magenta_controller.json @@ -1,5 +1,6 @@ { "type": "minecraft:crafting_shapeless", + "category": "misc", "ingredients": [ { "tag": "refinedstorage2:controllers" diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/magenta_crafting_grid.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/magenta_crafting_grid.json new file mode 100644 index 000000000..5392adec5 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/magenta_crafting_grid.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:crafting_grids" + }, + { + "item": "minecraft:magenta_dye" + } + ], + "result": { + "item": "refinedstorage2:magenta_crafting_grid" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/magenta_exporter.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/magenta_exporter.json new file mode 100644 index 000000000..82675308a --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/magenta_exporter.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:exporters" + }, + { + "item": "minecraft:magenta_dye" + } + ], + "result": { + "item": "refinedstorage2:magenta_exporter" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/magenta_external_storage.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/magenta_external_storage.json new file mode 100644 index 000000000..bf9112a71 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/magenta_external_storage.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:external_storages" + }, + { + "item": "minecraft:magenta_dye" + } + ], + "result": { + "item": "refinedstorage2:magenta_external_storage" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/magenta_grid.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/magenta_grid.json index 55906da35..dc14e9fd9 100644 --- a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/magenta_grid.json +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/magenta_grid.json @@ -1,5 +1,6 @@ { "type": "minecraft:crafting_shapeless", + "category": "misc", "ingredients": [ { "tag": "refinedstorage2:grids" diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/magenta_importer.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/magenta_importer.json new file mode 100644 index 000000000..5ef7d1cbe --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/magenta_importer.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:importers" + }, + { + "item": "minecraft:magenta_dye" + } + ], + "result": { + "item": "refinedstorage2:magenta_importer" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/orange_cable.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/orange_cable.json new file mode 100644 index 000000000..58743ab2c --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/orange_cable.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:cables" + }, + { + "item": "minecraft:orange_dye" + } + ], + "result": { + "item": "refinedstorage2:orange_cable" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/orange_controller.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/orange_controller.json index 117ad5cfc..a49f4d0a0 100644 --- a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/orange_controller.json +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/orange_controller.json @@ -1,5 +1,6 @@ { "type": "minecraft:crafting_shapeless", + "category": "misc", "ingredients": [ { "tag": "refinedstorage2:controllers" diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/orange_crafting_grid.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/orange_crafting_grid.json new file mode 100644 index 000000000..1701ad6b1 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/orange_crafting_grid.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:crafting_grids" + }, + { + "item": "minecraft:orange_dye" + } + ], + "result": { + "item": "refinedstorage2:orange_crafting_grid" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/orange_exporter.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/orange_exporter.json new file mode 100644 index 000000000..58644dbbd --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/orange_exporter.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:exporters" + }, + { + "item": "minecraft:orange_dye" + } + ], + "result": { + "item": "refinedstorage2:orange_exporter" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/orange_external_storage.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/orange_external_storage.json new file mode 100644 index 000000000..bf39d933c --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/orange_external_storage.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:external_storages" + }, + { + "item": "minecraft:orange_dye" + } + ], + "result": { + "item": "refinedstorage2:orange_external_storage" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/orange_grid.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/orange_grid.json index 97fc791c4..ed4db5c58 100644 --- a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/orange_grid.json +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/orange_grid.json @@ -1,5 +1,6 @@ { "type": "minecraft:crafting_shapeless", + "category": "misc", "ingredients": [ { "tag": "refinedstorage2:grids" diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/orange_importer.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/orange_importer.json new file mode 100644 index 000000000..31a19d0d1 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/orange_importer.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:importers" + }, + { + "item": "minecraft:orange_dye" + } + ], + "result": { + "item": "refinedstorage2:orange_importer" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/pink_cable.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/pink_cable.json new file mode 100644 index 000000000..66b092220 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/pink_cable.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:cables" + }, + { + "item": "minecraft:pink_dye" + } + ], + "result": { + "item": "refinedstorage2:pink_cable" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/pink_controller.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/pink_controller.json index da4b9cbfe..621994d06 100644 --- a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/pink_controller.json +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/pink_controller.json @@ -1,5 +1,6 @@ { "type": "minecraft:crafting_shapeless", + "category": "misc", "ingredients": [ { "tag": "refinedstorage2:controllers" diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/pink_crafting_grid.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/pink_crafting_grid.json new file mode 100644 index 000000000..973fb1627 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/pink_crafting_grid.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:crafting_grids" + }, + { + "item": "minecraft:pink_dye" + } + ], + "result": { + "item": "refinedstorage2:pink_crafting_grid" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/pink_exporter.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/pink_exporter.json new file mode 100644 index 000000000..3f1bf0a89 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/pink_exporter.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:exporters" + }, + { + "item": "minecraft:pink_dye" + } + ], + "result": { + "item": "refinedstorage2:pink_exporter" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/pink_external_storage.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/pink_external_storage.json new file mode 100644 index 000000000..9374906ca --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/pink_external_storage.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:external_storages" + }, + { + "item": "minecraft:pink_dye" + } + ], + "result": { + "item": "refinedstorage2:pink_external_storage" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/pink_grid.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/pink_grid.json index 07100a314..f3023407b 100644 --- a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/pink_grid.json +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/pink_grid.json @@ -1,5 +1,6 @@ { "type": "minecraft:crafting_shapeless", + "category": "misc", "ingredients": [ { "tag": "refinedstorage2:grids" diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/pink_importer.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/pink_importer.json new file mode 100644 index 000000000..b71de635b --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/pink_importer.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:importers" + }, + { + "item": "minecraft:pink_dye" + } + ], + "result": { + "item": "refinedstorage2:pink_importer" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/purple_cable.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/purple_cable.json new file mode 100644 index 000000000..686b58e42 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/purple_cable.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:cables" + }, + { + "item": "minecraft:purple_dye" + } + ], + "result": { + "item": "refinedstorage2:purple_cable" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/purple_controller.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/purple_controller.json index 51c0ee566..ff5078bc6 100644 --- a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/purple_controller.json +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/purple_controller.json @@ -1,5 +1,6 @@ { "type": "minecraft:crafting_shapeless", + "category": "misc", "ingredients": [ { "tag": "refinedstorage2:controllers" diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/purple_crafting_grid.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/purple_crafting_grid.json new file mode 100644 index 000000000..582b8e657 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/purple_crafting_grid.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:crafting_grids" + }, + { + "item": "minecraft:purple_dye" + } + ], + "result": { + "item": "refinedstorage2:purple_crafting_grid" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/purple_exporter.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/purple_exporter.json new file mode 100644 index 000000000..e604423dd --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/purple_exporter.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:exporters" + }, + { + "item": "minecraft:purple_dye" + } + ], + "result": { + "item": "refinedstorage2:purple_exporter" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/purple_external_storage.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/purple_external_storage.json new file mode 100644 index 000000000..a66f6b08c --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/purple_external_storage.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:external_storages" + }, + { + "item": "minecraft:purple_dye" + } + ], + "result": { + "item": "refinedstorage2:purple_external_storage" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/purple_grid.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/purple_grid.json index d78a94886..2e5a4123f 100644 --- a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/purple_grid.json +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/purple_grid.json @@ -1,5 +1,6 @@ { "type": "minecraft:crafting_shapeless", + "category": "misc", "ingredients": [ { "tag": "refinedstorage2:grids" diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/purple_importer.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/purple_importer.json new file mode 100644 index 000000000..445ef41d8 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/purple_importer.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:importers" + }, + { + "item": "minecraft:purple_dye" + } + ], + "result": { + "item": "refinedstorage2:purple_importer" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/red_cable.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/red_cable.json new file mode 100644 index 000000000..f5c4dba6b --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/red_cable.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:cables" + }, + { + "item": "minecraft:red_dye" + } + ], + "result": { + "item": "refinedstorage2:red_cable" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/red_controller.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/red_controller.json index 27c940837..c45328352 100644 --- a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/red_controller.json +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/red_controller.json @@ -1,5 +1,6 @@ { "type": "minecraft:crafting_shapeless", + "category": "misc", "ingredients": [ { "tag": "refinedstorage2:controllers" diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/red_crafting_grid.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/red_crafting_grid.json new file mode 100644 index 000000000..86bcd269f --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/red_crafting_grid.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:crafting_grids" + }, + { + "item": "minecraft:red_dye" + } + ], + "result": { + "item": "refinedstorage2:red_crafting_grid" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/red_exporter.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/red_exporter.json new file mode 100644 index 000000000..ec0055d3f --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/red_exporter.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:exporters" + }, + { + "item": "minecraft:red_dye" + } + ], + "result": { + "item": "refinedstorage2:red_exporter" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/red_external_storage.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/red_external_storage.json new file mode 100644 index 000000000..fcfed520b --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/red_external_storage.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:external_storages" + }, + { + "item": "minecraft:red_dye" + } + ], + "result": { + "item": "refinedstorage2:red_external_storage" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/red_grid.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/red_grid.json index e3c3440a3..cca9f3a58 100644 --- a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/red_grid.json +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/red_grid.json @@ -1,5 +1,6 @@ { "type": "minecraft:crafting_shapeless", + "category": "misc", "ingredients": [ { "tag": "refinedstorage2:grids" diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/red_importer.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/red_importer.json new file mode 100644 index 000000000..62cb81780 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/red_importer.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:importers" + }, + { + "item": "minecraft:red_dye" + } + ], + "result": { + "item": "refinedstorage2:red_importer" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/white_cable.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/white_cable.json new file mode 100644 index 000000000..391ef5069 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/white_cable.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:cables" + }, + { + "item": "minecraft:white_dye" + } + ], + "result": { + "item": "refinedstorage2:white_cable" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/white_controller.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/white_controller.json index ffaec6733..31286ec3d 100644 --- a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/white_controller.json +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/white_controller.json @@ -1,5 +1,6 @@ { "type": "minecraft:crafting_shapeless", + "category": "misc", "ingredients": [ { "tag": "refinedstorage2:controllers" diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/white_crafting_grid.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/white_crafting_grid.json new file mode 100644 index 000000000..39ab72213 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/white_crafting_grid.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:crafting_grids" + }, + { + "item": "minecraft:white_dye" + } + ], + "result": { + "item": "refinedstorage2:white_crafting_grid" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/white_exporter.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/white_exporter.json new file mode 100644 index 000000000..1a88c2bee --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/white_exporter.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:exporters" + }, + { + "item": "minecraft:white_dye" + } + ], + "result": { + "item": "refinedstorage2:white_exporter" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/white_external_storage.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/white_external_storage.json new file mode 100644 index 000000000..96e00eb2e --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/white_external_storage.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:external_storages" + }, + { + "item": "minecraft:white_dye" + } + ], + "result": { + "item": "refinedstorage2:white_external_storage" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/white_grid.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/white_grid.json index f5066c3dc..1ccc44f9d 100644 --- a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/white_grid.json +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/white_grid.json @@ -1,5 +1,6 @@ { "type": "minecraft:crafting_shapeless", + "category": "misc", "ingredients": [ { "tag": "refinedstorage2:grids" diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/white_importer.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/white_importer.json new file mode 100644 index 000000000..15c6abdd6 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/white_importer.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:importers" + }, + { + "item": "minecraft:white_dye" + } + ], + "result": { + "item": "refinedstorage2:white_importer" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/yellow_cable.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/yellow_cable.json new file mode 100644 index 000000000..b06496b40 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/yellow_cable.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:cables" + }, + { + "item": "minecraft:yellow_dye" + } + ], + "result": { + "item": "refinedstorage2:yellow_cable" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/yellow_controller.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/yellow_controller.json index 0b77f0b59..a3e4dfd95 100644 --- a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/yellow_controller.json +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/yellow_controller.json @@ -1,5 +1,6 @@ { "type": "minecraft:crafting_shapeless", + "category": "misc", "ingredients": [ { "tag": "refinedstorage2:controllers" diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/yellow_crafting_grid.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/yellow_crafting_grid.json new file mode 100644 index 000000000..001f372ca --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/yellow_crafting_grid.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:crafting_grids" + }, + { + "item": "minecraft:yellow_dye" + } + ], + "result": { + "item": "refinedstorage2:yellow_crafting_grid" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/yellow_exporter.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/yellow_exporter.json new file mode 100644 index 000000000..63fce49cb --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/yellow_exporter.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:exporters" + }, + { + "item": "minecraft:yellow_dye" + } + ], + "result": { + "item": "refinedstorage2:yellow_exporter" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/yellow_external_storage.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/yellow_external_storage.json new file mode 100644 index 000000000..bdc510acc --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/yellow_external_storage.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:external_storages" + }, + { + "item": "minecraft:yellow_dye" + } + ], + "result": { + "item": "refinedstorage2:yellow_external_storage" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/yellow_grid.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/yellow_grid.json index ae5fd4ced..1fbd7fb19 100644 --- a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/yellow_grid.json +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/yellow_grid.json @@ -1,5 +1,6 @@ { "type": "minecraft:crafting_shapeless", + "category": "misc", "ingredients": [ { "tag": "refinedstorage2:grids" diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/yellow_importer.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/yellow_importer.json new file mode 100644 index 000000000..686a65d37 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/yellow_importer.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:importers" + }, + { + "item": "minecraft:yellow_dye" + } + ], + "result": { + "item": "refinedstorage2:yellow_importer" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/tags/items/cables.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/tags/items/cables.json new file mode 100644 index 000000000..05b00f55f --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/tags/items/cables.json @@ -0,0 +1,20 @@ +{ + "values": [ + "refinedstorage2:cable", + "refinedstorage2:light_gray_cable", + "refinedstorage2:cyan_cable", + "refinedstorage2:purple_cable", + "refinedstorage2:blue_cable", + "refinedstorage2:brown_cable", + "refinedstorage2:green_cable", + "refinedstorage2:red_cable", + "refinedstorage2:black_cable", + "refinedstorage2:white_cable", + "refinedstorage2:orange_cable", + "refinedstorage2:magenta_cable", + "refinedstorage2:light_blue_cable", + "refinedstorage2:yellow_cable", + "refinedstorage2:lime_cable", + "refinedstorage2:pink_cable" + ] +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/tags/items/controllers.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/tags/items/controllers.json index 126514cab..dd6498e10 100644 --- a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/tags/items/controllers.json +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/tags/items/controllers.json @@ -1,9 +1,5 @@ { - "replace": false, "values": [ - "refinedstorage2:white_controller", - "refinedstorage2:orange_controller", - "refinedstorage2:magenta_controller", "refinedstorage2:controller", "refinedstorage2:yellow_controller", "refinedstorage2:lime_controller", @@ -16,6 +12,9 @@ "refinedstorage2:brown_controller", "refinedstorage2:green_controller", "refinedstorage2:red_controller", - "refinedstorage2:black_controller" + "refinedstorage2:black_controller", + "refinedstorage2:white_controller", + "refinedstorage2:orange_controller", + "refinedstorage2:magenta_controller" ] } \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/tags/items/crafting_grids.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/tags/items/crafting_grids.json new file mode 100644 index 000000000..ac4ebf0ac --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/tags/items/crafting_grids.json @@ -0,0 +1,20 @@ +{ + "values": [ + "refinedstorage2:white_crafting_grid", + "refinedstorage2:orange_crafting_grid", + "refinedstorage2:magenta_crafting_grid", + "refinedstorage2:crafting_grid", + "refinedstorage2:yellow_crafting_grid", + "refinedstorage2:lime_crafting_grid", + "refinedstorage2:pink_crafting_grid", + "refinedstorage2:gray_crafting_grid", + "refinedstorage2:light_gray_crafting_grid", + "refinedstorage2:cyan_crafting_grid", + "refinedstorage2:purple_crafting_grid", + "refinedstorage2:blue_crafting_grid", + "refinedstorage2:brown_crafting_grid", + "refinedstorage2:green_crafting_grid", + "refinedstorage2:red_crafting_grid", + "refinedstorage2:black_crafting_grid" + ] +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/tags/items/creative_controllers.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/tags/items/creative_controllers.json new file mode 100644 index 000000000..07d729e2d --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/tags/items/creative_controllers.json @@ -0,0 +1,20 @@ +{ + "values": [ + "refinedstorage2:white_creative_controller", + "refinedstorage2:orange_creative_controller", + "refinedstorage2:magenta_creative_controller", + "refinedstorage2:creative_controller", + "refinedstorage2:yellow_creative_controller", + "refinedstorage2:lime_creative_controller", + "refinedstorage2:pink_creative_controller", + "refinedstorage2:gray_creative_controller", + "refinedstorage2:light_gray_creative_controller", + "refinedstorage2:cyan_creative_controller", + "refinedstorage2:purple_creative_controller", + "refinedstorage2:blue_creative_controller", + "refinedstorage2:brown_creative_controller", + "refinedstorage2:green_creative_controller", + "refinedstorage2:red_creative_controller", + "refinedstorage2:black_creative_controller" + ] +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/tags/items/exporters.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/tags/items/exporters.json new file mode 100644 index 000000000..a9019782d --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/tags/items/exporters.json @@ -0,0 +1,20 @@ +{ + "values": [ + "refinedstorage2:white_exporter", + "refinedstorage2:orange_exporter", + "refinedstorage2:magenta_exporter", + "refinedstorage2:light_blue_exporter", + "refinedstorage2:yellow_exporter", + "refinedstorage2:lime_exporter", + "refinedstorage2:pink_exporter", + "refinedstorage2:exporter", + "refinedstorage2:light_gray_exporter", + "refinedstorage2:cyan_exporter", + "refinedstorage2:purple_exporter", + "refinedstorage2:blue_exporter", + "refinedstorage2:brown_exporter", + "refinedstorage2:green_exporter", + "refinedstorage2:red_exporter", + "refinedstorage2:black_exporter" + ] +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/tags/items/external_storages.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/tags/items/external_storages.json new file mode 100644 index 000000000..c7bca6ed0 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/tags/items/external_storages.json @@ -0,0 +1,20 @@ +{ + "values": [ + "refinedstorage2:white_external_storage", + "refinedstorage2:orange_external_storage", + "refinedstorage2:magenta_external_storage", + "refinedstorage2:light_blue_external_storage", + "refinedstorage2:yellow_external_storage", + "refinedstorage2:lime_external_storage", + "refinedstorage2:pink_external_storage", + "refinedstorage2:external_storage", + "refinedstorage2:light_gray_external_storage", + "refinedstorage2:cyan_external_storage", + "refinedstorage2:purple_external_storage", + "refinedstorage2:blue_external_storage", + "refinedstorage2:brown_external_storage", + "refinedstorage2:green_external_storage", + "refinedstorage2:red_external_storage", + "refinedstorage2:black_external_storage" + ] +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/tags/items/fluid_storage_disks.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/tags/items/fluid_storage_disks.json index dc3698248..44accf37a 100644 --- a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/tags/items/fluid_storage_disks.json +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/tags/items/fluid_storage_disks.json @@ -1,5 +1,4 @@ { - "replace": false, "values": [ "refinedstorage2:64b_fluid_storage_disk", "refinedstorage2:256b_fluid_storage_disk", diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/tags/items/grids.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/tags/items/grids.json index cc6273028..f3c7879bb 100644 --- a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/tags/items/grids.json +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/tags/items/grids.json @@ -1,5 +1,4 @@ { - "replace": false, "values": [ "refinedstorage2:white_grid", "refinedstorage2:orange_grid", diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/tags/items/importers.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/tags/items/importers.json new file mode 100644 index 000000000..5cc05bb38 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/tags/items/importers.json @@ -0,0 +1,20 @@ +{ + "values": [ + "refinedstorage2:white_importer", + "refinedstorage2:orange_importer", + "refinedstorage2:magenta_importer", + "refinedstorage2:light_blue_importer", + "refinedstorage2:yellow_importer", + "refinedstorage2:lime_importer", + "refinedstorage2:pink_importer", + "refinedstorage2:importer", + "refinedstorage2:light_gray_importer", + "refinedstorage2:cyan_importer", + "refinedstorage2:purple_importer", + "refinedstorage2:blue_importer", + "refinedstorage2:brown_importer", + "refinedstorage2:green_importer", + "refinedstorage2:red_importer", + "refinedstorage2:black_importer" + ] +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/tags/items/storage_disks.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/tags/items/storage_disks.json index 948c59177..4e045d2f6 100644 --- a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/tags/items/storage_disks.json +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/tags/items/storage_disks.json @@ -1,5 +1,4 @@ { - "replace": false, "values": [ "refinedstorage2:1k_storage_disk", "refinedstorage2:4k_storage_disk", diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/AbstractModInitializer.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/AbstractModInitializer.java index fbf091dbb..b6d9d3857 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/AbstractModInitializer.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/AbstractModInitializer.java @@ -58,7 +58,9 @@ protected void registerNetworkComponents() { ); PlatformApi.INSTANCE.getNetworkComponentMapFactory().addFactory( StorageNetworkComponent.class, - network -> new StorageNetworkComponentImpl(PlatformApi.INSTANCE.getStorageChannelTypeRegistry()) + network -> new StorageNetworkComponentImpl( + PlatformApi.INSTANCE.getStorageChannelTypeRegistry().getAll() + ) ); } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/AbstractPlatform.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/AbstractPlatform.java index 9827c5195..282796396 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/AbstractPlatform.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/AbstractPlatform.java @@ -5,26 +5,26 @@ import com.refinedmods.refinedstorage2.platform.common.packet.ClientToServerCommunications; import com.refinedmods.refinedstorage2.platform.common.packet.ServerToClientCommunications; import com.refinedmods.refinedstorage2.platform.common.render.FluidRenderer; -import com.refinedmods.refinedstorage2.platform.common.util.BucketQuantityFormatter; +import com.refinedmods.refinedstorage2.platform.common.util.BucketAmountFormatting; public abstract class AbstractPlatform implements Platform { private final ServerToClientCommunications serverToClientCommunications; private final ClientToServerCommunications clientToServerCommunications; private final MenuOpener menuOpener; - private final BucketQuantityFormatter bucketQuantityFormatter; + private final BucketAmountFormatting bucketAmountFormatting; private final FluidRenderer fluidRenderer; private final GridInsertionStrategyFactory defaultGridInsertionStrategyFactory; protected AbstractPlatform(final ServerToClientCommunications serverToClientCommunications, final ClientToServerCommunications clientToServerCommunications, final MenuOpener menuOpener, - final BucketQuantityFormatter bucketQuantityFormatter, + final BucketAmountFormatting bucketAmountFormatting, final FluidRenderer fluidRenderer, final GridInsertionStrategyFactory defaultGridInsertionStrategyFactory) { this.serverToClientCommunications = serverToClientCommunications; this.clientToServerCommunications = clientToServerCommunications; this.menuOpener = menuOpener; - this.bucketQuantityFormatter = bucketQuantityFormatter; + this.bucketAmountFormatting = bucketAmountFormatting; this.fluidRenderer = fluidRenderer; this.defaultGridInsertionStrategyFactory = defaultGridInsertionStrategyFactory; } @@ -45,8 +45,8 @@ public MenuOpener getMenuOpener() { } @Override - public BucketQuantityFormatter getBucketQuantityFormatter() { - return bucketQuantityFormatter; + public BucketAmountFormatting getBucketAmountFormatter() { + return bucketAmountFormatting; } @Override diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/Config.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/Config.java index d7649f276..b72e3841d 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/Config.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/Config.java @@ -1,6 +1,7 @@ package com.refinedmods.refinedstorage2.platform.common; import com.refinedmods.refinedstorage2.api.grid.view.GridSortingDirection; +import com.refinedmods.refinedstorage2.platform.common.internal.grid.CraftingGridMatrixCloseBehavior; import com.refinedmods.refinedstorage2.platform.common.internal.grid.GridSize; import com.refinedmods.refinedstorage2.platform.common.internal.grid.GridSortingTypes; @@ -11,6 +12,8 @@ public interface Config { GridEntry getGrid(); + CraftingGridEntry getCraftingGrid(); + ControllerEntry getController(); DiskDriveEntry getDiskDrive(); @@ -77,6 +80,10 @@ interface GridEntry extends SimpleEnergyUsageEntry { void clearStorageChannelType(); } + interface CraftingGridEntry extends SimpleEnergyUsageEntry { + CraftingGridMatrixCloseBehavior getCraftingMatrixCloseBehavior(); + } + interface DiskDriveEntry extends SimpleEnergyUsageEntry { long getEnergyUsagePerDisk(); } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/Platform.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/Platform.java index 08f098455..e2298bac8 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/Platform.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/Platform.java @@ -12,18 +12,21 @@ import com.refinedmods.refinedstorage2.platform.common.packet.ClientToServerCommunications; import com.refinedmods.refinedstorage2.platform.common.packet.ServerToClientCommunications; import com.refinedmods.refinedstorage2.platform.common.render.FluidRenderer; -import com.refinedmods.refinedstorage2.platform.common.util.BucketQuantityFormatter; +import com.refinedmods.refinedstorage2.platform.common.util.BucketAmountFormatting; import java.util.Optional; import net.minecraft.client.KeyMapping; import net.minecraft.client.gui.components.EditBox; +import net.minecraft.core.NonNullList; import net.minecraft.tags.TagKey; import net.minecraft.world.Container; import net.minecraft.world.entity.player.Player; import net.minecraft.world.inventory.AbstractContainerMenu; +import net.minecraft.world.inventory.CraftingContainer; import net.minecraft.world.item.Item; import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.crafting.CraftingRecipe; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.phys.BlockHitResult; @@ -41,7 +44,7 @@ public interface Platform { TagKey getWrenchTag(); - BucketQuantityFormatter getBucketQuantityFormatter(); + BucketAmountFormatting getBucketAmountFormatter(); Config getConfig(); @@ -68,4 +71,10 @@ public interface Platform { long insertIntoContainer(Container container, ItemResource itemResource, long amount, Action action); ItemStack getCloneItemStack(BlockState state, Level level, BlockHitResult hitResult, Player player); + + NonNullList getRemainingCraftingItems(Player player, + CraftingRecipe craftingRecipe, + CraftingContainer container); + + void onItemCrafted(Player player, ItemStack craftedStack, CraftingContainer container); } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/PlatformApiImpl.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/PlatformApiImpl.java index 17a986122..8e4dc95b3 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/PlatformApiImpl.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/PlatformApiImpl.java @@ -1,8 +1,6 @@ package com.refinedmods.refinedstorage2.platform.common; import com.refinedmods.refinedstorage2.api.core.component.ComponentMapFactory; -import com.refinedmods.refinedstorage2.api.core.registry.OrderedRegistry; -import com.refinedmods.refinedstorage2.api.core.registry.OrderedRegistryImpl; import com.refinedmods.refinedstorage2.api.grid.service.GridServiceFactory; import com.refinedmods.refinedstorage2.api.network.Network; import com.refinedmods.refinedstorage2.api.network.NetworkBuilder; @@ -21,16 +19,19 @@ import com.refinedmods.refinedstorage2.platform.api.grid.GridScrollingStrategyFactory; import com.refinedmods.refinedstorage2.platform.api.grid.GridSynchronizer; import com.refinedmods.refinedstorage2.platform.api.grid.PlatformGridServiceFactory; +import com.refinedmods.refinedstorage2.platform.api.integration.recipemod.IngredientConverter; import com.refinedmods.refinedstorage2.platform.api.item.StorageContainerHelper; import com.refinedmods.refinedstorage2.platform.api.network.node.exporter.ExporterTransferStrategyFactory; import com.refinedmods.refinedstorage2.platform.api.network.node.externalstorage.PlatformExternalStorageProviderFactory; import com.refinedmods.refinedstorage2.platform.api.network.node.importer.ImporterTransferStrategyFactory; +import com.refinedmods.refinedstorage2.platform.api.registry.PlatformRegistry; import com.refinedmods.refinedstorage2.platform.api.resource.ItemResource; import com.refinedmods.refinedstorage2.platform.api.resource.filter.FilteredResourceFactory; import com.refinedmods.refinedstorage2.platform.api.storage.StorageRepository; import com.refinedmods.refinedstorage2.platform.api.storage.channel.PlatformStorageChannelType; import com.refinedmods.refinedstorage2.platform.api.storage.type.StorageType; import com.refinedmods.refinedstorage2.platform.api.upgrade.UpgradeRegistry; +import com.refinedmods.refinedstorage2.platform.common.integration.recipemod.CompositeIngredientConverter; import com.refinedmods.refinedstorage2.platform.common.internal.grid.CompositeGridExtractionStrategy; import com.refinedmods.refinedstorage2.platform.common.internal.grid.CompositeGridInsertionStrategy; import com.refinedmods.refinedstorage2.platform.common.internal.grid.CompositeGridScrollingStrategy; @@ -38,6 +39,7 @@ import com.refinedmods.refinedstorage2.platform.common.internal.grid.PlatformGridServiceFactoryImpl; import com.refinedmods.refinedstorage2.platform.common.internal.item.StorageContainerHelperImpl; import com.refinedmods.refinedstorage2.platform.common.internal.network.LevelConnectionProvider; +import com.refinedmods.refinedstorage2.platform.common.internal.registry.PlatformRegistryImpl; import com.refinedmods.refinedstorage2.platform.common.internal.resource.filter.CompositeFilteredResourceFactory; import com.refinedmods.refinedstorage2.platform.common.internal.resource.filter.item.ItemFilteredResourceFactory; import com.refinedmods.refinedstorage2.platform.common.internal.storage.ClientStorageRepository; @@ -60,7 +62,6 @@ import net.minecraft.nbt.CompoundTag; import net.minecraft.network.chat.MutableComponent; -import net.minecraft.resources.ResourceLocation; import net.minecraft.server.level.ServerLevel; import net.minecraft.world.entity.player.Player; import net.minecraft.world.inventory.AbstractContainerMenu; @@ -77,21 +78,22 @@ public class PlatformApiImpl implements PlatformApi { new ComponentMapFactory<>(); private final NetworkBuilder networkBuilder = new NetworkBuilderImpl(new NetworkFactory(networkComponentMapFactory)); - private final OrderedRegistry> storageTypeRegistry = - new OrderedRegistryImpl<>(createIdentifier(ITEM_REGISTRY_KEY), ItemStorageType.INSTANCE); - private final OrderedRegistry> storageChannelTypeRegistry = - new OrderedRegistryImpl<>(createIdentifier(ITEM_REGISTRY_KEY), StorageChannelTypes.ITEM); - private final OrderedRegistry gridSynchronizerRegistry = - new OrderedRegistryImpl<>(createIdentifier("off"), new NoOpGridSynchronizer()); - private final OrderedRegistry importerTransferStrategyRegistry = - new OrderedRegistryImpl<>(createIdentifier("noop"), + private final PlatformRegistry> storageTypeRegistry = + new PlatformRegistryImpl<>(createIdentifier(ITEM_REGISTRY_KEY), ItemStorageType.INSTANCE); + private final PlatformRegistry> storageChannelTypeRegistry = + new PlatformRegistryImpl<>(createIdentifier(ITEM_REGISTRY_KEY), StorageChannelTypes.ITEM); + private final PlatformRegistry gridSynchronizerRegistry = + new PlatformRegistryImpl<>(createIdentifier("off"), new NoOpGridSynchronizer()); + private final PlatformRegistry importerTransferStrategyRegistry = + new PlatformRegistryImpl<>(createIdentifier("noop"), (level, pos, direction, hasStackUpgrade) -> (filter, actor, network) -> false); - private final OrderedRegistry exporterTransferStrategyRegistry = - new OrderedRegistryImpl<>(createIdentifier("noop"), + private final PlatformRegistry exporterTransferStrategyRegistry = + new PlatformRegistryImpl<>(createIdentifier("noop"), (level, pos, direction, hasStackUpgrade, fuzzyMode) -> (resource, actor, network) -> false); private final UpgradeRegistry upgradeRegistry = new UpgradeRegistryImpl(); private final Map, Set> externalStorageProviderFactories = new HashMap<>(); + private final CompositeIngredientConverter compositeConverter = new CompositeIngredientConverter(); private final StorageContainerHelper storageContainerHelper = new StorageContainerHelperImpl(); private final List gridInsertionStrategyFactories = new ArrayList<>(); private final List gridExtractionStrategyFactories = new ArrayList<>(); @@ -101,7 +103,7 @@ public class PlatformApiImpl implements PlatformApi { ); @Override - public OrderedRegistry> getStorageTypeRegistry() { + public PlatformRegistry> getStorageTypeRegistry() { return storageTypeRegistry; } @@ -136,17 +138,17 @@ private StorageRepositoryImpl createStorageRepository() { } @Override - public OrderedRegistry> getStorageChannelTypeRegistry() { + public PlatformRegistry> getStorageChannelTypeRegistry() { return storageChannelTypeRegistry; } @Override - public OrderedRegistry getImporterTransferStrategyRegistry() { + public PlatformRegistry getImporterTransferStrategyRegistry() { return importerTransferStrategyRegistry; } @Override - public OrderedRegistry getExporterTransferStrategyRegistry() { + public PlatformRegistry getExporterTransferStrategyRegistry() { return exporterTransferStrategyRegistry; } @@ -181,7 +183,7 @@ public ComponentMapFactory getNetworkComponentMapFact } @Override - public OrderedRegistry getGridSynchronizerRegistry() { + public PlatformRegistry getGridSynchronizerRegistry() { return gridSynchronizerRegistry; } @@ -288,4 +290,14 @@ public void addFilteredResourceFactory(final FilteredResourceFactory factory) { public FilteredResourceFactory getFilteredResourceFactory() { return filteredResourceFactory; } + + @Override + public void registerIngredientConverter(final IngredientConverter converter) { + this.compositeConverter.addConverter(converter); + } + + @Override + public IngredientConverter getIngredientConverter() { + return compositeConverter; + } } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/PlatformProxy.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/PlatformProxy.java index 96c21ca0c..5b1c90e2d 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/PlatformProxy.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/PlatformProxy.java @@ -12,19 +12,22 @@ import com.refinedmods.refinedstorage2.platform.common.packet.ClientToServerCommunications; import com.refinedmods.refinedstorage2.platform.common.packet.ServerToClientCommunications; import com.refinedmods.refinedstorage2.platform.common.render.FluidRenderer; -import com.refinedmods.refinedstorage2.platform.common.util.BucketQuantityFormatter; +import com.refinedmods.refinedstorage2.platform.common.util.BucketAmountFormatting; import java.util.Optional; import javax.annotation.Nullable; import net.minecraft.client.KeyMapping; import net.minecraft.client.gui.components.EditBox; +import net.minecraft.core.NonNullList; import net.minecraft.tags.TagKey; import net.minecraft.world.Container; import net.minecraft.world.entity.player.Player; import net.minecraft.world.inventory.AbstractContainerMenu; +import net.minecraft.world.inventory.CraftingContainer; import net.minecraft.world.item.Item; import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.crafting.CraftingRecipe; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.phys.BlockHitResult; @@ -66,8 +69,8 @@ public TagKey getWrenchTag() { } @Override - public BucketQuantityFormatter getBucketQuantityFormatter() { - return ensureLoaded().getBucketQuantityFormatter(); + public BucketAmountFormatting getBucketAmountFormatter() { + return ensureLoaded().getBucketAmountFormatter(); } @Override @@ -141,6 +144,18 @@ public ItemStack getCloneItemStack(final BlockState state, return ensureLoaded().getCloneItemStack(state, level, hitResult, player); } + @Override + public NonNullList getRemainingCraftingItems(final Player player, + final CraftingRecipe craftingRecipe, + final CraftingContainer container) { + return ensureLoaded().getRemainingCraftingItems(player, craftingRecipe, container); + } + + @Override + public void onItemCrafted(final Player player, final ItemStack craftedStack, final CraftingContainer container) { + ensureLoaded().onItemCrafted(player, craftedStack, container); + } + private Platform ensureLoaded() { if (platform == null) { throw new IllegalStateException("Platform not loaded yet"); diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/AbstractDirectionalCableBlock.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/AbstractDirectionalCableBlock.java index c70cd0430..eba40e497 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/AbstractDirectionalCableBlock.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/AbstractDirectionalCableBlock.java @@ -3,6 +3,7 @@ import com.refinedmods.refinedstorage2.platform.common.block.direction.DirectionType; import com.refinedmods.refinedstorage2.platform.common.block.direction.DirectionTypeImpl; +import java.util.Map; import java.util.Objects; import javax.annotation.Nullable; @@ -26,9 +27,12 @@ public abstract class AbstractDirectionalCableBlock extends AbstractDirectionalBlock implements SimpleWaterloggedBlock { + private final Map shapeCache; - protected AbstractDirectionalCableBlock(final Properties properties) { + protected AbstractDirectionalCableBlock(final Properties properties, + final Map shapeCache) { super(properties); + this.shapeCache = shapeCache; } @Override @@ -98,16 +102,28 @@ public VoxelShape getShape(final BlockState state, final BlockGetter world, final BlockPos pos, final CollisionContext context) { - return Shapes.or(CableBlockSupport.getShape(state), getExtensionShape(state)); + final CableShapeCacheKey cableShapeCacheKey = CableShapeCacheKey.of(state); + final Direction direction = getDirection(state); + if (direction == null) { + return CableBlockSupport.getShape(cableShapeCacheKey); + } + final DirectionalCacheShapeCacheKey directionalCacheShapeCacheKey = new DirectionalCacheShapeCacheKey( + cableShapeCacheKey, + direction + ); + return shapeCache.computeIfAbsent(directionalCacheShapeCacheKey, this::calculateShape); + } + + private VoxelShape calculateShape(final DirectionalCacheShapeCacheKey cacheKey) { + return Shapes.or( + CableBlockSupport.getShape(cacheKey.cableShapeCacheKey), + getExtensionShape(cacheKey.direction) + ); } @Override @Nullable protected VoxelShape getScreenOpenableShape(final BlockState state) { - return getExtensionShape(state); - } - - private VoxelShape getExtensionShape(final BlockState state) { final Direction direction = getDirection(state); if (direction == null) { return Shapes.empty(); @@ -116,4 +132,7 @@ private VoxelShape getExtensionShape(final BlockState state) { } protected abstract VoxelShape getExtensionShape(Direction direction); + + protected record DirectionalCacheShapeCacheKey(CableShapeCacheKey cableShapeCacheKey, Direction direction) { + } } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/AbstractStorageBlock.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/AbstractStorageBlock.java index 84ae11589..35a5b3287 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/AbstractStorageBlock.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/AbstractStorageBlock.java @@ -64,7 +64,7 @@ public ItemStack apply(final ItemStack stack, final LootContext lootContext) { private void apply(final ItemStack stack, final AbstractStorageBlockBlockEntity storageBlockEntity) { final UUID storageId = storageBlockEntity.getStorageId(); if (storageId != null) { - LOGGER.info("Transferred storage {} at {} to stack", storageId, storageBlockEntity.getBlockPos()); + LOGGER.debug("Transferred storage {} at {} to stack", storageId, storageBlockEntity.getBlockPos()); PlatformApi.INSTANCE.getStorageContainerHelper().setId(stack, storageId); } else { LOGGER.warn("Storage block {} has no associated storage ID!", storageBlockEntity.getBlockPos()); diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/CableBlock.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/CableBlock.java index d3ffc0c7b..d47ed0f27 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/CableBlock.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/CableBlock.java @@ -3,12 +3,16 @@ import com.refinedmods.refinedstorage2.platform.common.block.entity.CableBlockEntity; import com.refinedmods.refinedstorage2.platform.common.block.ticker.AbstractBlockEntityTicker; import com.refinedmods.refinedstorage2.platform.common.block.ticker.NetworkNodeBlockEntityTicker; +import com.refinedmods.refinedstorage2.platform.common.content.BlockColorMap; import com.refinedmods.refinedstorage2.platform.common.content.BlockEntities; +import com.refinedmods.refinedstorage2.platform.common.content.Blocks; import javax.annotation.Nullable; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; +import net.minecraft.network.chat.MutableComponent; +import net.minecraft.world.item.DyeColor; import net.minecraft.world.item.context.BlockPlaceContext; import net.minecraft.world.level.BlockGetter; import net.minecraft.world.level.Level; @@ -28,12 +32,23 @@ import net.minecraft.world.phys.shapes.CollisionContext; import net.minecraft.world.phys.shapes.VoxelShape; -public class CableBlock extends AbstractBaseBlock implements SimpleWaterloggedBlock, EntityBlock { +public class CableBlock extends AbstractBaseBlock + implements ColorableBlock, SimpleWaterloggedBlock, EntityBlock { private static final AbstractBlockEntityTicker TICKER = new NetworkNodeBlockEntityTicker<>(BlockEntities.INSTANCE::getCable); - public CableBlock() { + private final DyeColor color; + private final MutableComponent name; + + public CableBlock(final DyeColor color, final MutableComponent name) { super(BlockConstants.CABLE_PROPERTIES); + this.color = color; + this.name = name; + } + + @Override + public DyeColor getColor() { + return color; } @Override @@ -91,7 +106,8 @@ public VoxelShape getShape(final BlockState state, final BlockGetter world, final BlockPos pos, final CollisionContext context) { - return CableBlockSupport.getShape(state); + final CableShapeCacheKey cacheKey = CableShapeCacheKey.of(state); + return CableBlockSupport.getShape(cacheKey); } @Override @@ -106,4 +122,14 @@ public BlockEntityTicker getTicker(final Level level, final BlockEntityType type) { return TICKER.get(level, type); } + + @Override + public BlockColorMap getBlockColorMap() { + return Blocks.INSTANCE.getCable(); + } + + @Override + public MutableComponent getName() { + return name; + } } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/CableBlockSupport.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/CableBlockSupport.java index 50c0b7a7c..ad5042a03 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/CableBlockSupport.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/CableBlockSupport.java @@ -2,6 +2,9 @@ import com.refinedmods.refinedstorage2.platform.api.network.node.PlatformNetworkNodeContainer; +import java.util.EnumMap; +import java.util.HashMap; +import java.util.Map; import javax.annotation.Nullable; import net.minecraft.core.BlockPos; @@ -17,13 +20,22 @@ import static net.minecraft.world.level.block.Block.box; -final class CableBlockSupport { - private static final BooleanProperty NORTH = BooleanProperty.create("north"); - private static final BooleanProperty EAST = BooleanProperty.create("east"); - private static final BooleanProperty SOUTH = BooleanProperty.create("south"); - private static final BooleanProperty WEST = BooleanProperty.create("west"); - private static final BooleanProperty UP = BooleanProperty.create("up"); - private static final BooleanProperty DOWN = BooleanProperty.create("down"); +public final class CableBlockSupport { + public static final BooleanProperty NORTH = BooleanProperty.create("north"); + public static final BooleanProperty EAST = BooleanProperty.create("east"); + public static final BooleanProperty SOUTH = BooleanProperty.create("south"); + public static final BooleanProperty WEST = BooleanProperty.create("west"); + public static final BooleanProperty UP = BooleanProperty.create("up"); + public static final BooleanProperty DOWN = BooleanProperty.create("down"); + // here EnumMap is needed to give a stable sorting with forEach needed for datagen + public static final Map PROPERTY_BY_DIRECTION = new EnumMap<>(Map.of( + Direction.NORTH, NORTH, + Direction.EAST, EAST, + Direction.SOUTH, SOUTH, + Direction.WEST, WEST, + Direction.UP, UP, + Direction.DOWN, DOWN + )); private static final VoxelShape SHAPE_CORE = box(6, 6, 6, 10, 10, 10); private static final VoxelShape SHAPE_NORTH = box(6, 6, 0, 10, 10, 6); @@ -32,6 +44,7 @@ final class CableBlockSupport { private static final VoxelShape SHAPE_WEST = box(0, 6, 6, 6, 10, 10); private static final VoxelShape SHAPE_UP = box(6, 10, 6, 10, 16, 10); private static final VoxelShape SHAPE_DOWN = box(6, 0, 6, 10, 6, 10); + private static final Map SHAPE_CACHE = new HashMap<>(); private CableBlockSupport() { } @@ -51,39 +64,45 @@ static void appendBlockStateProperties(final StateDefinition.Builder { BlockColorMap getBlockColorMap(); + + DyeColor getColor(); + + default boolean canAlwaysConnect() { + return getBlockColorMap().isDefaultColor(getColor()); + } } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/ControllerBlock.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/ControllerBlock.java index d5d180b67..5086cf136 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/ControllerBlock.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/ControllerBlock.java @@ -7,6 +7,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.network.chat.MutableComponent; +import net.minecraft.world.item.DyeColor; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.EntityBlock; @@ -26,14 +27,17 @@ public class ControllerBlock extends AbstractBaseBlock implements ColorableBlock private final ControllerType type; private final MutableComponent name; private final ControllerBlockEntityTicker ticker; + private final DyeColor color; public ControllerBlock(final ControllerType type, final MutableComponent name, - final ControllerBlockEntityTicker ticker) { + final ControllerBlockEntityTicker ticker, + final DyeColor color) { super(BlockConstants.PROPERTIES); this.type = type; this.name = name; this.ticker = ticker; + this.color = color; } @Override @@ -70,4 +74,14 @@ public BlockColorMap getBlockColorMap() { ? Blocks.INSTANCE.getCreativeController() : Blocks.INSTANCE.getController(); } + + @Override + public DyeColor getColor() { + return color; + } + + @Override + public boolean canAlwaysConnect() { + return true; + } } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/ExporterBlock.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/ExporterBlock.java index 11e804acb..3d0d48e0b 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/ExporterBlock.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/ExporterBlock.java @@ -3,12 +3,18 @@ import com.refinedmods.refinedstorage2.platform.common.block.entity.exporter.ExporterBlockEntity; import com.refinedmods.refinedstorage2.platform.common.block.ticker.AbstractBlockEntityTicker; import com.refinedmods.refinedstorage2.platform.common.block.ticker.NetworkNodeBlockEntityTicker; +import com.refinedmods.refinedstorage2.platform.common.content.BlockColorMap; import com.refinedmods.refinedstorage2.platform.common.content.BlockEntities; +import com.refinedmods.refinedstorage2.platform.common.content.Blocks; +import java.util.HashMap; +import java.util.Map; import javax.annotation.Nullable; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; +import net.minecraft.network.chat.MutableComponent; +import net.minecraft.world.item.DyeColor; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.EntityBlock; import net.minecraft.world.level.block.entity.BlockEntity; @@ -17,12 +23,22 @@ import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.phys.shapes.VoxelShape; -public class ExporterBlock extends AbstractDirectionalCableBlock implements EntityBlock { +public class ExporterBlock extends AbstractDirectionalCableBlock implements ColorableBlock, EntityBlock { + private static final Map SHAPE_CACHE = new HashMap<>(); private static final AbstractBlockEntityTicker TICKER = new NetworkNodeBlockEntityTicker<>(BlockEntities.INSTANCE::getExporter); + private final DyeColor color; + private final MutableComponent name; - public ExporterBlock() { - super(BlockConstants.CABLE_PROPERTIES); + public ExporterBlock(final DyeColor color, final MutableComponent name) { + super(BlockConstants.CABLE_PROPERTIES, SHAPE_CACHE); + this.color = color; + this.name = name; + } + + @Override + public DyeColor getColor() { + return color; } @Override @@ -38,6 +54,11 @@ public BlockEntityTicker getTicker(final Level level, return TICKER.get(level, type); } + @Override + public BlockColorMap getBlockColorMap() { + return Blocks.INSTANCE.getExporter(); + } + @Override protected VoxelShape getExtensionShape(final Direction direction) { return switch (direction) { @@ -49,4 +70,9 @@ protected VoxelShape getExtensionShape(final Direction direction) { case DOWN -> DirectionalCableBlockShapes.EXPORTER_DOWN; }; } + + @Override + public MutableComponent getName() { + return name; + } } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/ExternalStorageBlock.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/ExternalStorageBlock.java index 6abe61c05..6f9cc5a6e 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/ExternalStorageBlock.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/ExternalStorageBlock.java @@ -3,13 +3,19 @@ import com.refinedmods.refinedstorage2.platform.common.block.entity.externalstorage.ExternalStorageBlockEntity; import com.refinedmods.refinedstorage2.platform.common.block.ticker.AbstractBlockEntityTicker; import com.refinedmods.refinedstorage2.platform.common.block.ticker.NetworkNodeBlockEntityTicker; +import com.refinedmods.refinedstorage2.platform.common.content.BlockColorMap; import com.refinedmods.refinedstorage2.platform.common.content.BlockEntities; +import com.refinedmods.refinedstorage2.platform.common.content.Blocks; +import java.util.HashMap; +import java.util.Map; import javax.annotation.Nullable; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; +import net.minecraft.network.chat.MutableComponent; import net.minecraft.server.level.ServerLevel; +import net.minecraft.world.item.DyeColor; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.EntityBlock; @@ -21,14 +27,25 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class ExternalStorageBlock extends AbstractDirectionalCableBlock implements EntityBlock { +public class ExternalStorageBlock extends AbstractDirectionalCableBlock + implements ColorableBlock, EntityBlock { + private static final Map SHAPE_CACHE = new HashMap<>(); private static final AbstractBlockEntityTicker TICKER = new NetworkNodeBlockEntityTicker<>(BlockEntities.INSTANCE::getExternalStorage); private static final Logger LOGGER = LoggerFactory.getLogger(ExternalStorageBlock.class); + private final DyeColor color; + private final MutableComponent name; - public ExternalStorageBlock() { - super(BlockConstants.CABLE_PROPERTIES); + public ExternalStorageBlock(final DyeColor color, final MutableComponent name) { + super(BlockConstants.CABLE_PROPERTIES, SHAPE_CACHE); + this.color = color; + this.name = name; + } + + @Override + public DyeColor getColor() { + return color; } @Override @@ -55,11 +72,16 @@ public void neighborChanged(final BlockState state, super.neighborChanged(state, level, pos, block, fromPos, moving); if (level instanceof ServerLevel serverLevel && level.getBlockEntity(pos) instanceof ExternalStorageBlockEntity blockEntity) { - LOGGER.info("External storage neighbor has changed, reloading {}", pos); + LOGGER.debug("External storage neighbor has changed, reloading {}", pos); blockEntity.loadStorage(serverLevel); } } + @Override + public BlockColorMap getBlockColorMap() { + return Blocks.INSTANCE.getExternalStorage(); + } + @Override protected VoxelShape getExtensionShape(final Direction direction) { return switch (direction) { @@ -71,4 +93,9 @@ protected VoxelShape getExtensionShape(final Direction direction) { case DOWN -> DirectionalCableBlockShapes.EXTERNAL_STORAGE_DOWN; }; } + + @Override + public MutableComponent getName() { + return name; + } } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/ImporterBlock.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/ImporterBlock.java index b1dc35013..6d136dddc 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/ImporterBlock.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/ImporterBlock.java @@ -3,12 +3,18 @@ import com.refinedmods.refinedstorage2.platform.common.block.entity.ImporterBlockEntity; import com.refinedmods.refinedstorage2.platform.common.block.ticker.AbstractBlockEntityTicker; import com.refinedmods.refinedstorage2.platform.common.block.ticker.NetworkNodeBlockEntityTicker; +import com.refinedmods.refinedstorage2.platform.common.content.BlockColorMap; import com.refinedmods.refinedstorage2.platform.common.content.BlockEntities; +import com.refinedmods.refinedstorage2.platform.common.content.Blocks; +import java.util.HashMap; +import java.util.Map; import javax.annotation.Nullable; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; +import net.minecraft.network.chat.MutableComponent; +import net.minecraft.world.item.DyeColor; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.EntityBlock; import net.minecraft.world.level.block.entity.BlockEntity; @@ -17,12 +23,22 @@ import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.phys.shapes.VoxelShape; -public class ImporterBlock extends AbstractDirectionalCableBlock implements EntityBlock { +public class ImporterBlock extends AbstractDirectionalCableBlock implements ColorableBlock, EntityBlock { + private static final Map SHAPE_CACHE = new HashMap<>(); private static final AbstractBlockEntityTicker TICKER = new NetworkNodeBlockEntityTicker<>(BlockEntities.INSTANCE::getImporter); + private final DyeColor color; + private final MutableComponent name; - public ImporterBlock() { - super(BlockConstants.CABLE_PROPERTIES); + public ImporterBlock(final DyeColor color, final MutableComponent name) { + super(BlockConstants.CABLE_PROPERTIES, SHAPE_CACHE); + this.color = color; + this.name = name; + } + + @Override + public DyeColor getColor() { + return color; } @Override @@ -38,6 +54,11 @@ public BlockEntityTicker getTicker(final Level level, return TICKER.get(level, type); } + @Override + public BlockColorMap getBlockColorMap() { + return Blocks.INSTANCE.getImporter(); + } + @Override protected VoxelShape getExtensionShape(final Direction direction) { return switch (direction) { @@ -49,4 +70,9 @@ protected VoxelShape getExtensionShape(final Direction direction) { case DOWN -> DirectionalCableBlockShapes.IMPORTER_DOWN; }; } + + @Override + public MutableComponent getName() { + return name; + } } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/AbstractInternalNetworkNodeContainerBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/AbstractInternalNetworkNodeContainerBlockEntity.java index a6b706036..c2a4e79f3 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/AbstractInternalNetworkNodeContainerBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/AbstractInternalNetworkNodeContainerBlockEntity.java @@ -4,6 +4,7 @@ import com.refinedmods.refinedstorage2.api.network.node.AbstractNetworkNode; import com.refinedmods.refinedstorage2.platform.api.blockentity.AbstractNetworkNodeContainerBlockEntity; import com.refinedmods.refinedstorage2.platform.common.block.AbstractDirectionalBlock; +import com.refinedmods.refinedstorage2.platform.common.block.ColorableBlock; import com.refinedmods.refinedstorage2.platform.common.util.RedstoneMode; import javax.annotation.Nullable; @@ -62,7 +63,7 @@ public void updateActiveness(final BlockState state, @Nullable final BooleanProperty activenessProperty) { final boolean newActive = isActive(); if (newActive != lastActive && activenessChangeRateLimiter.tryAcquire()) { - LOGGER.info("Activeness change for node at {}: {} -> {}", getBlockPos(), lastActive, newActive); + LOGGER.debug("Activeness change for node at {}: {} -> {}", getBlockPos(), lastActive, newActive); this.lastActive = newActive; activenessChanged(state, newActive, activenessProperty); } @@ -77,7 +78,7 @@ protected void activenessChanged(final BlockState state, && state.getValue(activenessProperty) != newActive; if (needToUpdateBlockState) { - LOGGER.info("Sending block update for block at {} due to state change to {}", getBlockPos(), newActive); + LOGGER.debug("Sending block update for block at {} due to state change to {}", getBlockPos(), newActive); updateActivenessState(state, activenessProperty, newActive); } } @@ -113,12 +114,36 @@ public boolean canPerformOutgoingConnection(final Direction direction) { } @Override - public boolean canAcceptIncomingConnection(final Direction direction) { + public boolean canAcceptIncomingConnection(final Direction direction, final BlockState other) { + if (!colorsAllowConnecting(other)) { + return false; + } final Direction myDirection = getDirection(); - if (myDirection == null) { + if (myDirection != null) { + return myDirection != direction.getOpposite(); + } + return true; + } + + private boolean colorsAllowConnecting(final BlockState other) { + if (!(other.getBlock() instanceof ColorableBlock otherColorableBlock)) { + return true; + } + final ColorableBlock colorableBlock = getColor(); + if (colorableBlock == null) { return true; } - return myDirection != direction.getOpposite(); + return otherColorableBlock.getColor() == colorableBlock.getColor() + || colorableBlock.canAlwaysConnect() + || otherColorableBlock.canAlwaysConnect(); + } + + @Nullable + private ColorableBlock getColor() { + if (!(getBlockState().getBlock() instanceof ColorableBlock colorableBlock)) { + return null; + } + return colorableBlock; } @Nullable diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/ControllerBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/ControllerBlockEntity.java index 6ab1e73c9..fd93ccb1d 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/ControllerBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/ControllerBlockEntity.java @@ -69,8 +69,8 @@ public void updateEnergyTypeInLevel(final BlockState state) { final ControllerEnergyType inLevelEnergyType = state.getValue(ControllerBlock.ENERGY_TYPE); if (currentEnergyType != inLevelEnergyType && energyStateChangeRateLimiter.tryAcquire()) { - LOGGER.info( - "Energy type state change for Controller at {}: {} -> {}", + LOGGER.debug( + "Energy type state change for controller at {}: {} -> {}", getBlockPos(), inLevelEnergyType, currentEnergyType diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/ImporterBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/ImporterBlockEntity.java index eeffb890c..c6cb825a8 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/ImporterBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/ImporterBlockEntity.java @@ -56,7 +56,7 @@ public ImporterBlockEntity(final BlockPos pos, final BlockState state) { @Override protected void initialize(final ServerLevel level, final Direction direction) { final CompositeImporterTransferStrategy strategy = createStrategy(level, direction); - LOGGER.info("Initialized importer at {} with strategy {}", worldPosition, strategy); + LOGGER.debug("Initialized importer at {} with strategy {}", worldPosition, strategy); getNode().setTransferStrategy(strategy); } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/UpgradeContainer.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/UpgradeContainer.java index 55aca7f16..8893c9d4d 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/UpgradeContainer.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/UpgradeContainer.java @@ -4,6 +4,8 @@ import com.refinedmods.refinedstorage2.platform.api.upgrade.UpgradeDestination; import com.refinedmods.refinedstorage2.platform.api.upgrade.UpgradeRegistry; +import java.util.Set; + import net.minecraft.world.SimpleContainer; import net.minecraft.world.item.ItemStack; @@ -33,7 +35,7 @@ public int getMaxStackSize() { @Override public boolean canPlaceItem(final int slot, final ItemStack stack) { - final ApplicableUpgrade upgrade = registry.getApplicableUpgrades(destination) + final ApplicableUpgrade upgrade = getApplicableUpgrades() .stream() .filter(applicableUpgrade -> applicableUpgrade.itemSupplier().get() == stack.getItem()) .findFirst() @@ -47,4 +49,8 @@ public boolean canPlaceItem(final int slot, final ItemStack stack) { } return super.canPlaceItem(slot, stack); } + + public Set getApplicableUpgrades() { + return registry.getApplicableUpgrades(destination); + } } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/diskdrive/AbstractDiskDriveBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/diskdrive/AbstractDiskDriveBlockEntity.java index 3142ad450..7c2804a9a 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/diskdrive/AbstractDiskDriveBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/diskdrive/AbstractDiskDriveBlockEntity.java @@ -50,9 +50,9 @@ public abstract class AbstractDiskDriveBlockEntity extends AbstractInternalNetworkNodeContainerBlockEntity implements BlockEntityWithDrops, MultiStorageListener, ExtendedMenuProvider { - private static final Logger LOGGER = LoggerFactory.getLogger(AbstractDiskDriveBlockEntity.class); + public static final int AMOUNT_OF_DISKS = 8; - private static final int AMOUNT_OF_DISKS = 9; + private static final Logger LOGGER = LoggerFactory.getLogger(AbstractDiskDriveBlockEntity.class); private static final String TAG_DISK_INVENTORY = "inv"; private static final String TAG_STATES = "states"; @@ -71,7 +71,7 @@ protected AbstractDiskDriveBlockEntity(final BlockPos pos, final BlockState stat super(BlockEntities.INSTANCE.getDiskDrive(), pos, state, new MultiStorageNetworkNode( Platform.INSTANCE.getConfig().getDiskDrive().getEnergyUsage(), Platform.INSTANCE.getConfig().getDiskDrive().getEnergyUsagePerDisk(), - PlatformApi.INSTANCE.getStorageChannelTypeRegistry(), + PlatformApi.INSTANCE.getStorageChannelTypeRegistry().getAll(), AMOUNT_OF_DISKS )); this.diskInventory = new DiskDriveInventory(this, getNode().getSize()); @@ -98,7 +98,7 @@ public void updateDiskStateIfNecessaryInLevel() { return; } if (diskStateChangeRateLimiter.tryAcquire()) { - LOGGER.info("Disk state change for block at {}", getBlockPos()); + LOGGER.debug("Disk state change for block at {}", getBlockPos()); this.syncRequested = false; sync(); } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/exporter/ExporterBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/exporter/ExporterBlockEntity.java index ac264f703..b27c5c688 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/exporter/ExporterBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/exporter/ExporterBlockEntity.java @@ -1,7 +1,7 @@ package com.refinedmods.refinedstorage2.platform.common.block.entity.exporter; -import com.refinedmods.refinedstorage2.api.core.util.Randomizer; import com.refinedmods.refinedstorage2.api.network.impl.node.exporter.ExporterNetworkNode; +import com.refinedmods.refinedstorage2.api.network.impl.node.exporter.scheduling.RandomExporterSchedulingMode; import com.refinedmods.refinedstorage2.api.network.impl.node.exporter.strategy.CompositeExporterTransferStrategy; import com.refinedmods.refinedstorage2.api.network.node.exporter.scheduling.ExporterSchedulingMode; import com.refinedmods.refinedstorage2.api.network.node.exporter.strategy.ExporterTransferStrategy; @@ -65,7 +65,7 @@ public ExporterBlockEntity(final BlockPos pos, final BlockState state) { @Override protected void initialize(final ServerLevel level, final Direction direction) { final ExporterTransferStrategy strategy = createStrategy(level, direction); - LOGGER.info("Initialized exporter at {} with strategy {}", worldPosition, strategy); + LOGGER.debug("Initialized exporter at {} with strategy {}", worldPosition, strategy); getNode().setTransferStrategy(strategy); } @@ -123,7 +123,7 @@ public void setSchedulingMode(final ExporterSchedulingModeSettings modeSettings) private void setSchedulingMode(@Nullable final CompoundTag tag, final ExporterSchedulingModeSettings modeSettings) { this.schedulingModeSettings = modeSettings; - this.schedulingMode = modeSettings.create(tag, new Randomizer() { + this.schedulingMode = modeSettings.create(tag, new RandomExporterSchedulingMode.Randomizer() { @Override public void shuffle(final List list) { Collections.shuffle(list, new Random()); diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/exporter/ExporterSchedulingModeSettings.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/exporter/ExporterSchedulingModeSettings.java index dc8f26ee8..ad00a49a6 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/exporter/ExporterSchedulingModeSettings.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/exporter/ExporterSchedulingModeSettings.java @@ -1,6 +1,5 @@ package com.refinedmods.refinedstorage2.platform.common.block.entity.exporter; -import com.refinedmods.refinedstorage2.api.core.util.Randomizer; import com.refinedmods.refinedstorage2.api.network.impl.node.exporter.scheduling.FirstAvailableExporterSchedulingMode; import com.refinedmods.refinedstorage2.api.network.impl.node.exporter.scheduling.RandomExporterSchedulingMode; import com.refinedmods.refinedstorage2.api.network.impl.node.exporter.scheduling.RoundRobinExporterSchedulingMode; @@ -47,7 +46,7 @@ public int getId() { } public ExporterSchedulingMode create(@Nullable final CompoundTag tag, - final Randomizer randomizer, + final RandomExporterSchedulingMode.Randomizer randomizer, final Runnable dirtyCallback) { return switch (this) { case FIRST_AVAILABLE -> FirstAvailableExporterSchedulingMode.INSTANCE; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/externalstorage/ExternalStorageBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/externalstorage/ExternalStorageBlockEntity.java index 67bdb79f3..0f19c2da8 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/externalstorage/ExternalStorageBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/externalstorage/ExternalStorageBlockEntity.java @@ -58,7 +58,7 @@ public ExternalStorageBlockEntity(final BlockPos pos, final BlockState state) { ); getNode().setNormalizer(filter.createNormalizer()); getNode().initialize( - PlatformApi.INSTANCE.getStorageChannelTypeRegistry(), + PlatformApi.INSTANCE.getStorageChannelTypeRegistry().getAll(), System::currentTimeMillis, trackedStorageRepositoryProvider ); @@ -76,7 +76,7 @@ public ExternalStorageBlockEntity(final BlockPos pos, final BlockState state) { public void setBlockState(final BlockState newBlockState) { super.setBlockState(newBlockState); if (level instanceof ServerLevel serverLevel) { - LOGGER.info("Reloading external storage @ {} as block state has changed", worldPosition); + LOGGER.debug("Reloading external storage @ {} as block state has changed", worldPosition); loadStorage(serverLevel); } } @@ -87,7 +87,7 @@ protected void activenessChanged(final BlockState state, @Nullable final BooleanProperty activenessProperty) { super.activenessChanged(state, newActive, activenessProperty); if (!initialized && level instanceof ServerLevel serverLevel) { - LOGGER.info("Triggering initial load of external storage {}", worldPosition); + LOGGER.debug("Triggering initial load of external storage {}", worldPosition); loadStorage(serverLevel); initialized = true; } @@ -95,7 +95,7 @@ protected void activenessChanged(final BlockState state, public void loadStorage(final ServerLevel serverLevel) { final Direction direction = getDirection(); - LOGGER.info("Loading storage for external storage with direction {} @ {}", direction, worldPosition); + LOGGER.debug("Loading storage for external storage with direction {} @ {}", direction, worldPosition); if (direction == null) { return; } @@ -119,7 +119,7 @@ public void doWork() { if (workRate.canDoWork()) { final boolean hasChanges = getNode().detectChanges(); if (hasChanges) { - LOGGER.info("External storage @ {} has changed!", worldPosition); + LOGGER.debug("External storage @ {} has changed!", worldPosition); workRate.faster(); } else { workRate.slower(); diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/externalstorage/ExternalStorageTrackedStorageRepositoryProvider.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/externalstorage/ExternalStorageTrackedStorageRepositoryProvider.java index 463e07f55..6b718854b 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/externalstorage/ExternalStorageTrackedStorageRepositoryProvider.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/externalstorage/ExternalStorageTrackedStorageRepositoryProvider.java @@ -1,9 +1,9 @@ package com.refinedmods.refinedstorage2.platform.common.block.entity.externalstorage; -import com.refinedmods.refinedstorage2.api.core.registry.OrderedRegistry; import com.refinedmods.refinedstorage2.api.network.impl.node.externalstorage.TrackedStorageRepositoryProvider; import com.refinedmods.refinedstorage2.api.storage.channel.StorageChannelType; import com.refinedmods.refinedstorage2.api.storage.tracked.TrackedStorageRepository; +import com.refinedmods.refinedstorage2.platform.api.registry.PlatformRegistry; import com.refinedmods.refinedstorage2.platform.api.storage.channel.PlatformStorageChannelType; import java.util.HashMap; @@ -18,12 +18,12 @@ class ExternalStorageTrackedStorageRepositoryProvider implements TrackedStorageR private static final String TAG_TYPE = "type"; private static final String TAG_ITEMS = "items"; - private final OrderedRegistry> storageChannelTypeRegistry; + private final PlatformRegistry> storageChannelTypeRegistry; private final Map, ExternalStorageTrackedStorageRepository> repositoryMap = new HashMap<>(); ExternalStorageTrackedStorageRepositoryProvider( - final OrderedRegistry> storageChannelTypeRegistry, + final PlatformRegistry> storageChannelTypeRegistry, final Runnable listener ) { this.storageChannelTypeRegistry = storageChannelTypeRegistry; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/GridBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/grid/AbstractGridBlockEntity.java similarity index 71% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/GridBlockEntity.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/grid/AbstractGridBlockEntity.java index 2f28d217e..216d0fafb 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/GridBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/grid/AbstractGridBlockEntity.java @@ -1,46 +1,42 @@ -package com.refinedmods.refinedstorage2.platform.common.block.entity; +package com.refinedmods.refinedstorage2.platform.common.block.entity.grid; -import com.refinedmods.refinedstorage2.api.core.registry.OrderedRegistry; import com.refinedmods.refinedstorage2.api.grid.GridWatcher; import com.refinedmods.refinedstorage2.api.network.component.StorageNetworkComponent; import com.refinedmods.refinedstorage2.api.network.impl.node.grid.GridNetworkNode; import com.refinedmods.refinedstorage2.api.storage.Actor; import com.refinedmods.refinedstorage2.api.storage.ExtractableStorage; import com.refinedmods.refinedstorage2.platform.api.PlatformApi; +import com.refinedmods.refinedstorage2.platform.api.registry.PlatformRegistry; import com.refinedmods.refinedstorage2.platform.api.resource.ItemResource; import com.refinedmods.refinedstorage2.platform.api.storage.PlayerActor; import com.refinedmods.refinedstorage2.platform.api.storage.channel.PlatformStorageChannelType; -import com.refinedmods.refinedstorage2.platform.common.Platform; -import com.refinedmods.refinedstorage2.platform.common.containermenu.GridContainerMenu; -import com.refinedmods.refinedstorage2.platform.common.content.BlockEntities; +import com.refinedmods.refinedstorage2.platform.common.block.entity.AbstractInternalNetworkNodeContainerBlockEntity; import com.refinedmods.refinedstorage2.platform.common.internal.storage.channel.StorageChannelTypes; import com.refinedmods.refinedstorage2.platform.common.menu.ExtendedMenuProvider; import com.refinedmods.refinedstorage2.platform.common.util.PacketUtil; import java.util.List; import java.util.Objects; -import javax.annotation.Nullable; import net.minecraft.core.BlockPos; import net.minecraft.network.FriendlyByteBuf; -import net.minecraft.network.chat.Component; 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 net.minecraft.world.level.block.entity.BlockEntityType; import net.minecraft.world.level.block.state.BlockState; -import static com.refinedmods.refinedstorage2.platform.common.util.IdentifierUtil.createTranslation; - -public class GridBlockEntity extends AbstractInternalNetworkNodeContainerBlockEntity +public abstract class AbstractGridBlockEntity + extends AbstractInternalNetworkNodeContainerBlockEntity implements ExtendedMenuProvider { - private final OrderedRegistry> storageChannelTypeRegistry; + private final PlatformRegistry> storageChannelTypeRegistry; - public GridBlockEntity(final BlockPos pos, final BlockState state) { - super(BlockEntities.INSTANCE.getGrid(), pos, state, new GridNetworkNode( - Platform.INSTANCE.getConfig().getGrid().getEnergyUsage(), - PlatformApi.INSTANCE.getStorageChannelTypeRegistry() + protected AbstractGridBlockEntity(final BlockEntityType type, + final BlockPos pos, + final BlockState state, + final long energyUsage) { + super(type, pos, state, new GridNetworkNode( + energyUsage, + PlatformApi.INSTANCE.getStorageChannelTypeRegistry().getAll() )); this.storageChannelTypeRegistry = PlatformApi.INSTANCE.getStorageChannelTypeRegistry(); } @@ -51,11 +47,6 @@ public ExtractableStorage getContainerExtractionSource() { .getStorageChannel(StorageChannelTypes.ITEM); } - @Override - public Component getDisplayName() { - return createTranslation("block", "grid"); - } - @Override public void writeScreenOpeningData(final ServerPlayer player, final FriendlyByteBuf buf) { buf.writeBoolean(getNode().isActive()); @@ -91,10 +82,4 @@ public void addWatcher(final GridWatcher watcher, final Class a public void removeWatcher(final GridWatcher watcher) { getNode().removeWatcher(watcher); } - - @Nullable - @Override - public AbstractContainerMenu createMenu(final int syncId, final Inventory inventory, final Player player) { - return new GridContainerMenu(syncId, inventory, this); - } } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/grid/CraftingGridBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/grid/CraftingGridBlockEntity.java new file mode 100644 index 000000000..074bdfc26 --- /dev/null +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/grid/CraftingGridBlockEntity.java @@ -0,0 +1,175 @@ +package com.refinedmods.refinedstorage2.platform.common.block.entity.grid; + +import com.refinedmods.refinedstorage2.api.core.Action; +import com.refinedmods.refinedstorage2.api.network.Network; +import com.refinedmods.refinedstorage2.api.network.component.StorageNetworkComponent; +import com.refinedmods.refinedstorage2.api.network.impl.node.grid.GridNetworkNode; +import com.refinedmods.refinedstorage2.api.storage.channel.StorageChannel; +import com.refinedmods.refinedstorage2.platform.api.resource.ItemResource; +import com.refinedmods.refinedstorage2.platform.api.storage.PlayerActor; +import com.refinedmods.refinedstorage2.platform.common.Platform; +import com.refinedmods.refinedstorage2.platform.common.containermenu.grid.CraftingGridContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.content.BlockEntities; +import com.refinedmods.refinedstorage2.platform.common.internal.storage.channel.StorageChannelTypes; +import com.refinedmods.refinedstorage2.platform.common.util.ContainerUtil; + +import java.util.Optional; +import javax.annotation.Nullable; + +import net.minecraft.core.BlockPos; +import net.minecraft.core.NonNullList; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.network.chat.Component; +import net.minecraft.world.entity.player.Inventory; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.inventory.AbstractContainerMenu; +import net.minecraft.world.inventory.ResultContainer; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.crafting.CraftingRecipe; +import net.minecraft.world.item.crafting.RecipeType; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.state.BlockState; + +import static com.refinedmods.refinedstorage2.platform.common.util.IdentifierUtil.createTranslation; + +public class CraftingGridBlockEntity extends AbstractGridBlockEntity { + private static final String TAG_CRAFTING_MATRIX = "matrix"; + + @Nullable + private CraftingRecipe currentRecipe; + + private final CraftingMatrix craftingMatrix = new CraftingMatrix(this::setOutput); + private final ResultContainer craftingResult = new ResultContainer(); + + public CraftingGridBlockEntity(final BlockPos pos, final BlockState state) { + super( + BlockEntities.INSTANCE.getCraftingGrid(), + pos, + state, + Platform.INSTANCE.getConfig().getCraftingGrid().getEnergyUsage() + ); + } + + private void setOutput() { + if (level == null) { + return; + } + setOutputSilently(level); + setChanged(); + } + + private void setOutputSilently(final Level level) { + if (level.isClientSide()) { + return; + } + if (currentRecipe == null || !currentRecipe.matches(craftingMatrix, level)) { + currentRecipe = loadRecipe(level); + } + if (currentRecipe == null) { + setResult(ItemStack.EMPTY); + } else { + setResult(currentRecipe.assemble(craftingMatrix)); + } + } + + private void setResult(final ItemStack result) { + craftingResult.setItem(0, result); + } + + @Nullable + private CraftingRecipe loadRecipe(final Level level) { + return level + .getRecipeManager() + .getRecipeFor(RecipeType.CRAFTING, craftingMatrix, level) + .orElse(null); + } + + public CraftingMatrix getCraftingMatrix() { + return craftingMatrix; + } + + public ResultContainer getCraftingResult() { + return craftingResult; + } + + public NonNullList getRemainingItems(final Player player) { + if (level == null || currentRecipe == null) { + return NonNullList.create(); + } + return Platform.INSTANCE.getRemainingCraftingItems(player, currentRecipe, craftingMatrix); + } + + @Override + public Component getDisplayName() { + return createTranslation("block", "crafting_grid"); + } + + @Nullable + @Override + public AbstractContainerMenu createMenu(final int syncId, final Inventory inventory, final Player player) { + return new CraftingGridContainerMenu(syncId, inventory, this); + } + + @Override + public void saveAdditional(final CompoundTag tag) { + super.saveAdditional(tag); + tag.put(TAG_CRAFTING_MATRIX, ContainerUtil.write(craftingMatrix)); + } + + @Override + public void load(final CompoundTag tag) { + super.load(tag); + if (tag.contains(TAG_CRAFTING_MATRIX)) { + ContainerUtil.read(tag.getCompound(TAG_CRAFTING_MATRIX), craftingMatrix); + } + } + + @Override + public void setLevel(final Level level) { + super.setLevel(level); + setOutputSilently(level); + } + + public Optional getNetwork() { + final GridNetworkNode node = getNode(); + if (!node.isActive()) { + return Optional.empty(); + } + return Optional.ofNullable(node.getNetwork()); + } + + public Optional> getStorageChannel() { + return getNetwork().map(network -> network + .getComponent(StorageNetworkComponent.class) + .getStorageChannel(StorageChannelTypes.ITEM)); + } + + public ItemStack insert(final ItemStack stack, final Player player) { + return getStorageChannel().map(storageChannel -> doInsert(stack, player, storageChannel)).orElse(stack); + } + + private ItemStack doInsert(final ItemStack stack, + final Player player, + final StorageChannel storageChannel) { + final long inserted = storageChannel.insert( + ItemResource.ofItemStack(stack), + stack.getCount(), + Action.EXECUTE, + new PlayerActor(player) + ); + final long remainder = stack.getCount() - inserted; + if (remainder == 0) { + return ItemStack.EMPTY; + } + return stack.copyWithCount((int) remainder); + } + + public long extract(final ItemResource resource, final long amount, final Player player) { + return getStorageChannel().map(storageChannel -> storageChannel.extract( + resource, + amount, + Action.EXECUTE, + new PlayerActor(player) + )).orElse(0L); + } +} diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/grid/CraftingMatrix.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/grid/CraftingMatrix.java new file mode 100644 index 000000000..a84c9726c --- /dev/null +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/grid/CraftingMatrix.java @@ -0,0 +1,21 @@ +package com.refinedmods.refinedstorage2.platform.common.block.entity.grid; + +import javax.annotation.Nullable; + +import net.minecraft.world.inventory.CraftingContainer; + +public class CraftingMatrix extends CraftingContainer { + @Nullable + private final Runnable listener; + + public CraftingMatrix(@Nullable final Runnable listener) { + super(new CraftingMatrixContainerMenu(listener), 3, 3); + this.listener = listener; + } + + public void changed() { + if (listener != null) { + listener.run(); + } + } +} diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/grid/CraftingMatrixContainerMenu.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/grid/CraftingMatrixContainerMenu.java new file mode 100644 index 000000000..52534f587 --- /dev/null +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/grid/CraftingMatrixContainerMenu.java @@ -0,0 +1,36 @@ +package com.refinedmods.refinedstorage2.platform.common.block.entity.grid; + +import javax.annotation.Nullable; + +import net.minecraft.world.Container; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.inventory.AbstractContainerMenu; +import net.minecraft.world.inventory.MenuType; +import net.minecraft.world.item.ItemStack; + +public class CraftingMatrixContainerMenu extends AbstractContainerMenu { + @Nullable + private final Runnable listener; + + public CraftingMatrixContainerMenu(@Nullable final Runnable listener) { + super(MenuType.CRAFTING, 0); + this.listener = listener; + } + + @Override + public ItemStack quickMoveStack(final Player player, final int index) { + return ItemStack.EMPTY; + } + + @Override + public boolean stillValid(final Player player) { + return false; + } + + @Override + public void slotsChanged(final Container container) { + if (listener != null) { + listener.run(); + } + } +} diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/grid/GridBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/grid/GridBlockEntity.java new file mode 100644 index 000000000..f0d2bca8c --- /dev/null +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/grid/GridBlockEntity.java @@ -0,0 +1,33 @@ +package com.refinedmods.refinedstorage2.platform.common.block.entity.grid; + +import com.refinedmods.refinedstorage2.platform.common.Platform; +import com.refinedmods.refinedstorage2.platform.common.containermenu.grid.GridContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.content.BlockEntities; + +import javax.annotation.Nullable; + +import net.minecraft.core.BlockPos; +import net.minecraft.network.chat.Component; +import net.minecraft.world.entity.player.Inventory; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.inventory.AbstractContainerMenu; +import net.minecraft.world.level.block.state.BlockState; + +import static com.refinedmods.refinedstorage2.platform.common.util.IdentifierUtil.createTranslation; + +public class GridBlockEntity extends AbstractGridBlockEntity { + public GridBlockEntity(final BlockPos pos, final BlockState state) { + super(BlockEntities.INSTANCE.getGrid(), pos, state, Platform.INSTANCE.getConfig().getGrid().getEnergyUsage()); + } + + @Override + public Component getDisplayName() { + return createTranslation("block", "grid"); + } + + @Nullable + @Override + public AbstractContainerMenu createMenu(final int syncId, final Inventory inventory, final Player player) { + return new GridContainerMenu(syncId, inventory, this); + } +} diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/grid/package-info.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/grid/package-info.java new file mode 100644 index 000000000..ac8ae526c --- /dev/null +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/grid/package-info.java @@ -0,0 +1,7 @@ +@ParametersAreNonnullByDefault +@FieldsAndMethodsAreNonnullByDefault +package com.refinedmods.refinedstorage2.platform.common.block.entity.grid; + +import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/storage/AbstractStorageBlockBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/storage/AbstractStorageBlockBlockEntity.java index e250bc013..6c934f6ac 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/storage/AbstractStorageBlockBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/storage/AbstractStorageBlockBlockEntity.java @@ -92,7 +92,7 @@ public void setLevel(final Level level) { } public void modifyStorageIdAfterAlreadyInitialized(final UUID actualStorageId) { - LOGGER.info( + LOGGER.debug( "Storage {} got placed through nbt, replacing with actual storage {}", storageId, actualStorageId @@ -106,7 +106,7 @@ public void load(final CompoundTag tag) { if (tag.contains(TAG_STORAGE_ID)) { final UUID actualStorageId = tag.getUUID(TAG_STORAGE_ID); if (isPlacedThroughNbtPlacement(actualStorageId)) { - LOGGER.info( + LOGGER.debug( "Storage {} got placed through nbt, replacing with actual storage {}", storageId, actualStorageId diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/grid/AbstractGridBlock.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/grid/AbstractGridBlock.java new file mode 100644 index 000000000..6f1a89782 --- /dev/null +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/grid/AbstractGridBlock.java @@ -0,0 +1,62 @@ + +package com.refinedmods.refinedstorage2.platform.common.block.grid; + +import com.refinedmods.refinedstorage2.platform.common.block.AbstractDirectionalBlock; +import com.refinedmods.refinedstorage2.platform.common.block.BlockConstants; +import com.refinedmods.refinedstorage2.platform.common.block.ColorableBlock; +import com.refinedmods.refinedstorage2.platform.common.block.direction.BiDirectionType; +import com.refinedmods.refinedstorage2.platform.common.block.direction.DirectionType; +import com.refinedmods.refinedstorage2.platform.common.util.BiDirection; + +import net.minecraft.network.chat.MutableComponent; +import net.minecraft.world.item.DyeColor; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.EntityBlock; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.properties.BooleanProperty; + +public abstract class AbstractGridBlock> extends AbstractDirectionalBlock + implements EntityBlock, ColorableBlock { + public static final BooleanProperty ACTIVE = BooleanProperty.create("active"); + + private final MutableComponent name; + private final DyeColor color; + + protected AbstractGridBlock(final MutableComponent name, final DyeColor color) { + super(BlockConstants.PROPERTIES); + this.name = name; + this.color = color; + } + + @Override + protected DirectionType getDirectionType() { + return BiDirectionType.INSTANCE; + } + + @Override + protected BlockState getDefaultState() { + return super.getDefaultState().setValue(ACTIVE, false); + } + + @Override + protected void createBlockStateDefinition(final StateDefinition.Builder builder) { + super.createBlockStateDefinition(builder); + builder.add(ACTIVE); + } + + @Override + public MutableComponent getName() { + return this.name; + } + + @Override + public DyeColor getColor() { + return color; + } + + @Override + public boolean canAlwaysConnect() { + return true; + } +} diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/grid/CraftingGridBlock.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/grid/CraftingGridBlock.java new file mode 100644 index 000000000..37063def1 --- /dev/null +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/grid/CraftingGridBlock.java @@ -0,0 +1,49 @@ +package com.refinedmods.refinedstorage2.platform.common.block.grid; + +import com.refinedmods.refinedstorage2.platform.common.block.entity.grid.CraftingGridBlockEntity; +import com.refinedmods.refinedstorage2.platform.common.block.ticker.AbstractBlockEntityTicker; +import com.refinedmods.refinedstorage2.platform.common.block.ticker.NetworkNodeBlockEntityTicker; +import com.refinedmods.refinedstorage2.platform.common.content.BlockColorMap; +import com.refinedmods.refinedstorage2.platform.common.content.BlockEntities; +import com.refinedmods.refinedstorage2.platform.common.content.Blocks; + +import javax.annotation.Nullable; + +import net.minecraft.core.BlockPos; +import net.minecraft.network.chat.MutableComponent; +import net.minecraft.world.item.DyeColor; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.entity.BlockEntityTicker; +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraft.world.level.block.state.BlockState; + +public class CraftingGridBlock extends AbstractGridBlock { + private static final AbstractBlockEntityTicker TICKER = new NetworkNodeBlockEntityTicker<>( + BlockEntities.INSTANCE::getCraftingGrid, + ACTIVE + ); + + public CraftingGridBlock(final MutableComponent name, final DyeColor color) { + super(name, color); + } + + @Override + public BlockColorMap getBlockColorMap() { + return Blocks.INSTANCE.getCraftingGrid(); + } + + @Nullable + @Override + public BlockEntity newBlockEntity(final BlockPos pos, final BlockState state) { + return new CraftingGridBlockEntity(pos, state); + } + + @Nullable + @Override + public BlockEntityTicker getTicker(final Level level, + final BlockState blockState, + final BlockEntityType type) { + return TICKER.get(level, type); + } +} diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/GridBlock.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/grid/GridBlock.java similarity index 53% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/GridBlock.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/grid/GridBlock.java index d963bcd37..f5fc6b49f 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/GridBlock.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/grid/GridBlock.java @@ -1,62 +1,31 @@ -package com.refinedmods.refinedstorage2.platform.common.block; +package com.refinedmods.refinedstorage2.platform.common.block.grid; -import com.refinedmods.refinedstorage2.platform.common.block.direction.BiDirectionType; -import com.refinedmods.refinedstorage2.platform.common.block.direction.DirectionType; -import com.refinedmods.refinedstorage2.platform.common.block.entity.GridBlockEntity; +import com.refinedmods.refinedstorage2.platform.common.block.entity.grid.GridBlockEntity; import com.refinedmods.refinedstorage2.platform.common.block.ticker.AbstractBlockEntityTicker; import com.refinedmods.refinedstorage2.platform.common.block.ticker.NetworkNodeBlockEntityTicker; import com.refinedmods.refinedstorage2.platform.common.content.BlockColorMap; import com.refinedmods.refinedstorage2.platform.common.content.BlockEntities; import com.refinedmods.refinedstorage2.platform.common.content.Blocks; -import com.refinedmods.refinedstorage2.platform.common.util.BiDirection; import javax.annotation.Nullable; import net.minecraft.core.BlockPos; import net.minecraft.network.chat.MutableComponent; +import net.minecraft.world.item.DyeColor; import net.minecraft.world.level.Level; -import net.minecraft.world.level.block.Block; -import net.minecraft.world.level.block.EntityBlock; import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.entity.BlockEntityTicker; import net.minecraft.world.level.block.entity.BlockEntityType; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; -import net.minecraft.world.level.block.state.properties.BooleanProperty; -public class GridBlock extends AbstractDirectionalBlock implements EntityBlock, ColorableBlock { - private static final BooleanProperty ACTIVE = BooleanProperty.create("active"); +public class GridBlock extends AbstractGridBlock { private static final AbstractBlockEntityTicker TICKER = new NetworkNodeBlockEntityTicker<>( BlockEntities.INSTANCE::getGrid, ACTIVE ); - private final MutableComponent name; - - public GridBlock(final MutableComponent name) { - super(BlockConstants.PROPERTIES); - this.name = name; - } - - @Override - protected DirectionType getDirectionType() { - return BiDirectionType.INSTANCE; - } - - @Override - protected BlockState getDefaultState() { - return super.getDefaultState().setValue(ACTIVE, false); - } - - @Override - protected void createBlockStateDefinition(final StateDefinition.Builder builder) { - super.createBlockStateDefinition(builder); - builder.add(ACTIVE); - } - - @Override - public MutableComponent getName() { - return this.name; + public GridBlock(final MutableComponent name, final DyeColor color) { + super(name, color); } @Override diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/grid/package-info.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/grid/package-info.java new file mode 100644 index 000000000..0518428e0 --- /dev/null +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/grid/package-info.java @@ -0,0 +1,7 @@ +@ParametersAreNonnullByDefault +@FieldsAndMethodsAreNonnullByDefault +package com.refinedmods.refinedstorage2.platform.common.block.grid; + +import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/AbstractSimpleFilterContainerMenu.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/AbstractSimpleFilterContainerMenu.java index dffcef458..ab1badcc5 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/AbstractSimpleFilterContainerMenu.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/AbstractSimpleFilterContainerMenu.java @@ -3,6 +3,7 @@ import com.refinedmods.refinedstorage2.platform.api.PlatformApi; import com.refinedmods.refinedstorage2.platform.common.block.entity.UpgradeContainer; import com.refinedmods.refinedstorage2.platform.common.containermenu.slot.ResourceFilterSlot; +import com.refinedmods.refinedstorage2.platform.common.containermenu.slot.UpgradeSlot; import com.refinedmods.refinedstorage2.platform.common.internal.resource.filter.ResourceFilterContainer; import com.refinedmods.refinedstorage2.platform.common.internal.upgrade.UpgradeDestinations; @@ -54,7 +55,7 @@ private void addSlots(final Player player, addSlot(createFilterSlot(resourceFilterContainer, i)); } for (int i = 0; i < upgradeContainer.getContainerSize(); ++i) { - addSlot(new Slot(upgradeContainer, i, 187, 6 + (i * 18))); + addSlot(new UpgradeSlot(upgradeContainer, i, 187, 6 + (i * 18))); } addPlayerInventory(player.getInventory(), 8, 55); diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/GridContainerMenu.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/grid/AbstractGridContainerMenu.java similarity index 92% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/GridContainerMenu.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/grid/AbstractGridContainerMenu.java index 8104918f6..2ca8cd156 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/GridContainerMenu.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/grid/AbstractGridContainerMenu.java @@ -1,6 +1,5 @@ -package com.refinedmods.refinedstorage2.platform.common.containermenu; +package com.refinedmods.refinedstorage2.platform.common.containermenu.grid; -import com.refinedmods.refinedstorage2.api.core.registry.OrderedRegistry; import com.refinedmods.refinedstorage2.api.grid.GridWatcher; import com.refinedmods.refinedstorage2.api.grid.query.GridQueryParserException; import com.refinedmods.refinedstorage2.api.grid.query.GridQueryParserImpl; @@ -21,15 +20,16 @@ import com.refinedmods.refinedstorage2.platform.api.grid.GridScrollMode; import com.refinedmods.refinedstorage2.platform.api.grid.GridScrollingStrategy; import com.refinedmods.refinedstorage2.platform.api.grid.GridSynchronizer; +import com.refinedmods.refinedstorage2.platform.api.registry.PlatformRegistry; import com.refinedmods.refinedstorage2.platform.api.storage.PlayerActor; import com.refinedmods.refinedstorage2.platform.api.storage.channel.PlatformStorageChannelType; import com.refinedmods.refinedstorage2.platform.common.Config; import com.refinedmods.refinedstorage2.platform.common.Platform; -import com.refinedmods.refinedstorage2.platform.common.block.entity.GridBlockEntity; +import com.refinedmods.refinedstorage2.platform.common.block.entity.grid.AbstractGridBlockEntity; +import com.refinedmods.refinedstorage2.platform.common.containermenu.AbstractBaseContainerMenu; import com.refinedmods.refinedstorage2.platform.common.containermenu.property.ClientProperty; import com.refinedmods.refinedstorage2.platform.common.containermenu.property.PropertyTypes; import com.refinedmods.refinedstorage2.platform.common.containermenu.property.ServerProperty; -import com.refinedmods.refinedstorage2.platform.common.content.Menus; import com.refinedmods.refinedstorage2.platform.common.internal.grid.ClientGridExtractionStrategy; import com.refinedmods.refinedstorage2.platform.common.internal.grid.ClientGridInsertionStrategy; import com.refinedmods.refinedstorage2.platform.common.internal.grid.ClientGridScrollingStrategy; @@ -52,14 +52,15 @@ 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.MenuType; import net.minecraft.world.inventory.Slot; import net.minecraft.world.item.ItemStack; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class GridContainerMenu extends AbstractBaseContainerMenu +public abstract class AbstractGridContainerMenu extends AbstractBaseContainerMenu implements GridWatcher, GridInsertionStrategy, GridExtractionStrategy, GridScrollingStrategy { - private static final Logger LOGGER = LoggerFactory.getLogger(GridContainerMenu.class); + private static final Logger LOGGER = LoggerFactory.getLogger(AbstractGridContainerMenu.class); private static final GridQueryParserImpl QUERY_PARSER = new GridQueryParserImpl( LexerTokenMappings.DEFAULT_MAPPINGS, ParserOperatorMappings.DEFAULT_MAPPINGS, @@ -72,10 +73,10 @@ public class GridContainerMenu extends AbstractBaseContainerMenu private static String lastSearchQuery = ""; - protected final Inventory playerInventory; - protected final GridView view; + private final Inventory playerInventory; + private final GridView view; @Nullable - protected GridBlockEntity grid; + private AbstractGridBlockEntity grid; private final GridInsertionStrategy insertionStrategy; private final GridExtractionStrategy extractionStrategy; @@ -93,8 +94,13 @@ public class GridContainerMenu extends AbstractBaseContainerMenu @Nullable private GridSearchBox searchBox; - public GridContainerMenu(final int syncId, final Inventory playerInventory, final FriendlyByteBuf buf) { - super(Menus.INSTANCE.getGrid(), syncId); + protected AbstractGridContainerMenu( + final MenuType menuType, + final int syncId, + final Inventory playerInventory, + final FriendlyByteBuf buf + ) { + super(menuType, syncId); this.playerInventory = playerInventory; @@ -117,8 +123,6 @@ public GridContainerMenu(final int syncId, final Inventory playerInventory, fina this.view.setSortingType(Platform.INSTANCE.getConfig().getGrid().getSortingType()); this.view.setFilterAndSort(filterStorageChannel()); - addSlots(0); - this.synchronizer = loadSynchronizer(); this.storageChannelTypeFilter = loadStorageChannelType(); this.insertionStrategy = new ClientGridInsertionStrategy(); @@ -127,10 +131,13 @@ public GridContainerMenu(final int syncId, final Inventory playerInventory, fina this.autoSelected = loadAutoSelected(); } - public GridContainerMenu(final int syncId, - final Inventory playerInventory, - final GridBlockEntity grid) { - super(Menus.INSTANCE.getGrid(), syncId); + protected AbstractGridContainerMenu( + final MenuType menuType, + final int syncId, + final Inventory playerInventory, + final AbstractGridBlockEntity grid + ) { + super(menuType, syncId); this.view = createViewBuilder().build(); @@ -144,8 +151,6 @@ public GridContainerMenu(final int syncId, this.grid = grid; this.grid.addWatcher(this, PlayerActor.class); - addSlots(0); - this.synchronizer = PlatformApi.INSTANCE.getGridSynchronizerRegistry().getDefault(); this.insertionStrategy = PlatformApi.INSTANCE.createGridInsertionStrategy( this, @@ -254,12 +259,12 @@ private void configureSearchBox(final GridSearchBox theSearchBox) { theSearchBox.setAutoSelected(isAutoSelected()); if (Platform.INSTANCE.getConfig().getGrid().isRememberSearchQuery()) { theSearchBox.setValue(lastSearchQuery); - theSearchBox.addListener(GridContainerMenu::updateLastSearchQuery); + theSearchBox.addListener(AbstractGridContainerMenu::updateLastSearchQuery); } } private static void updateLastSearchQuery(final String text) { - GridContainerMenu.lastSearchQuery = text; + lastSearchQuery = text; } @Override @@ -356,8 +361,7 @@ public PlatformStorageChannelType getStorageChannelType() { } public void toggleSynchronizer() { - final OrderedRegistry registry = - PlatformApi.INSTANCE.getGridSynchronizerRegistry(); + final PlatformRegistry registry = PlatformApi.INSTANCE.getGridSynchronizerRegistry(); final Config.GridEntry config = Platform.INSTANCE.getConfig().getGrid(); final GridSynchronizer newSynchronizer = registry.next(getSynchronizer()); if (newSynchronizer == registry.getDefault()) { @@ -369,7 +373,7 @@ public void toggleSynchronizer() { } public void toggleStorageChannelType() { - final OrderedRegistry> registry = + final PlatformRegistry> registry = PlatformApi.INSTANCE.getStorageChannelTypeRegistry(); final Config.GridEntry config = Platform.INSTANCE.getConfig().getGrid(); final PlatformStorageChannelType newStorageChannelType = storageChannelTypeFilter == null @@ -415,10 +419,10 @@ public ItemStack quickMoveStack(final Player playerEntity, final int slotIndex) if (!playerEntity.level.isClientSide()) { final Slot slot = getSlot(slotIndex); if (slot.hasItem()) { - insertionStrategy.onTransfer(slot.getContainerSlot()); + insertionStrategy.onTransfer(slot.index); } } - return ItemStack.EMPTY; + return super.quickMoveStack(playerEntity, slotIndex); } private static void readStorageChannelFromBuffer(final PlatformStorageChannelType type, diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/grid/ClientCraftingGridSource.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/grid/ClientCraftingGridSource.java new file mode 100644 index 000000000..c2f7e17ad --- /dev/null +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/grid/ClientCraftingGridSource.java @@ -0,0 +1,63 @@ +package com.refinedmods.refinedstorage2.platform.common.containermenu.grid; + +import com.refinedmods.refinedstorage2.platform.api.resource.ItemResource; +import com.refinedmods.refinedstorage2.platform.common.Platform; +import com.refinedmods.refinedstorage2.platform.common.block.entity.grid.CraftingMatrix; + +import java.util.List; + +import net.minecraft.core.NonNullList; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.inventory.ResultContainer; +import net.minecraft.world.item.ItemStack; + +public class ClientCraftingGridSource implements CraftingGridSource { + private final CraftingMatrix craftingMatrix; + private final ResultContainer craftingResult; + + public ClientCraftingGridSource() { + this.craftingMatrix = new CraftingMatrix(null); + this.craftingResult = new ResultContainer(); + } + + @Override + public CraftingMatrix getCraftingMatrix() { + return craftingMatrix; + } + + @Override + public ResultContainer getCraftingResult() { + return craftingResult; + } + + @Override + public NonNullList getRemainingItems(final Player player) { + throw new UnsupportedOperationException(); + } + + @Override + public CraftingGridRefillContext openRefillContext() { + throw new UnsupportedOperationException(); + } + + @Override + public CraftingGridRefillContext openSnapshotRefillContext(final Player player) { + throw new UnsupportedOperationException(); + } + + @Override + public boolean clearMatrix(final Player player, final boolean toPlayerInventory) { + Platform.INSTANCE.getClientToServerCommunications().sendCraftingGridClear(toPlayerInventory); + return true; + } + + @Override + public void transferRecipe(final Player player, final List> recipe) { + Platform.INSTANCE.getClientToServerCommunications().sendCraftingGridRecipeTransfer(recipe); + } + + @Override + public void acceptQuickCraft(final Player player, final ItemStack craftedStack) { + throw new UnsupportedOperationException(); + } +} diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/grid/CraftingGridContainerMenu.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/grid/CraftingGridContainerMenu.java new file mode 100644 index 000000000..217b91f5f --- /dev/null +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/grid/CraftingGridContainerMenu.java @@ -0,0 +1,158 @@ +package com.refinedmods.refinedstorage2.platform.common.containermenu.grid; + +import com.refinedmods.refinedstorage2.api.grid.view.GridResource; +import com.refinedmods.refinedstorage2.api.resource.list.ResourceList; +import com.refinedmods.refinedstorage2.platform.api.resource.ItemResource; +import com.refinedmods.refinedstorage2.platform.common.block.entity.grid.CraftingGridBlockEntity; +import com.refinedmods.refinedstorage2.platform.common.content.Menus; +import com.refinedmods.refinedstorage2.platform.common.internal.grid.view.ItemGridResource; + +import java.util.ArrayList; +import java.util.HashSet; +import java.util.List; +import java.util.Set; +import java.util.function.Consumer; +import java.util.function.Predicate; +import javax.annotation.Nullable; + +import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.world.Container; +import net.minecraft.world.entity.player.Inventory; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.inventory.Slot; +import net.minecraft.world.item.ItemStack; + +public class CraftingGridContainerMenu extends AbstractGridContainerMenu { + private static final int Y_OFFSET_BETWEEN_PLAYER_INVENTORY_AND_FIRST_CRAFTING_MATRIX_SLOT = 69; + + private final Player player; + private final CraftingGridSource source; + private final List craftingMatrixSlots = new ArrayList<>(); + + @Nullable + private Consumer activenessListener; + @Nullable + private Predicate filterBeforeFilteringBasedOnCraftingMatrixItems; + + public CraftingGridContainerMenu(final int syncId, final Inventory playerInventory, final FriendlyByteBuf buf) { + super(Menus.INSTANCE.getCraftingGrid(), syncId, playerInventory, buf); + this.source = new ClientCraftingGridSource(); + this.player = playerInventory.player; + addSlots(0); + } + + public CraftingGridContainerMenu(final int syncId, + final Inventory playerInventory, + final CraftingGridBlockEntity grid) { + super(Menus.INSTANCE.getCraftingGrid(), syncId, playerInventory, grid); + this.source = new CraftingGridSourceImpl(grid); + this.player = playerInventory.player; + addSlots(0); + } + + public void setActivenessListener(@Nullable final Consumer activenessListener) { + this.activenessListener = activenessListener; + } + + @Override + public void onActiveChanged(final boolean newActive) { + super.onActiveChanged(newActive); + if (activenessListener != null) { + activenessListener.accept(newActive); + } + } + + @Override + public boolean canTakeItemForPickAll(final ItemStack stack, final Slot slot) { + return !(slot instanceof CraftingGridResultSlot); + } + + @Override + public ItemStack quickMoveStack(final Player actor, final int slotIndex) { + final Slot slot = getSlot(slotIndex); + if (!actor.getLevel().isClientSide() && slot instanceof CraftingGridResultSlot resultSlot) { + final ItemStack craftedStack = resultSlot.onQuickCraft(actor); + source.acceptQuickCraft(actor, craftedStack); + return ItemStack.EMPTY; + } + return super.quickMoveStack(actor, slotIndex); + } + + @Override + public void addSlots(final int playerInventoryY) { + super.addSlots(playerInventoryY); + craftingMatrixSlots.clear(); + for (int y = 0; y < 3; ++y) { + for (int x = 0; x < 3; ++x) { + final int slotX = 26 + ((x % 3) * 18); + final int slotY = playerInventoryY + - Y_OFFSET_BETWEEN_PLAYER_INVENTORY_AND_FIRST_CRAFTING_MATRIX_SLOT + + ((y % 3) * 18); + craftingMatrixSlots.add(addSlot(new Slot(source.getCraftingMatrix(), x + y * 3, slotX, slotY))); + } + } + addSlot(new CraftingGridResultSlot( + player, + source, + 130 + 4, + playerInventoryY - Y_OFFSET_BETWEEN_PLAYER_INVENTORY_AND_FIRST_CRAFTING_MATRIX_SLOT + 18 + )); + } + + public List getCraftingMatrixSlots() { + return craftingMatrixSlots; + } + + public void clear(final boolean toPlayerInventory) { + source.clearMatrix(player, toPlayerInventory); + } + + public ResourceList getAvailableListForRecipeTransfer() { + final ResourceList available = getView().copyBackingList(); + addContainerToList(source.getCraftingMatrix(), available); + addContainerToList(player.getInventory(), available); + return available; + } + + private void addContainerToList(final Container container, final ResourceList available) { + for (int i = 0; i < container.getContainerSize(); ++i) { + final ItemStack stack = container.getItem(i); + if (stack.isEmpty()) { + continue; + } + available.add(ItemResource.ofItemStack(stack), stack.getCount()); + } + } + + public void transferRecipe(final List> recipe) { + source.transferRecipe(player, recipe); + } + + public void filterBasedOnCraftingMatrixItems() { + final Set craftingMatrixItems = getCraftingMatrixItems(); + filterBeforeFilteringBasedOnCraftingMatrixItems = getView().setFilterAndSort( + gridResource -> gridResource instanceof ItemGridResource itemGridResource + && craftingMatrixItems.contains(itemGridResource.getResource()) + ); + } + + private Set getCraftingMatrixItems() { + final Set craftingMatrixItems = new HashSet<>(); + for (int i = 0; i < source.getCraftingMatrix().getContainerSize(); ++i) { + final ItemStack craftingMatrixStack = source.getCraftingMatrix().getItem(i); + if (craftingMatrixStack.isEmpty()) { + continue; + } + craftingMatrixItems.add(ItemResource.ofItemStack(craftingMatrixStack)); + } + return craftingMatrixItems; + } + + public void stopFilteringBasedOnCraftingMatrixItems() { + if (filterBeforeFilteringBasedOnCraftingMatrixItems == null) { + return; + } + getView().setFilterAndSort(filterBeforeFilteringBasedOnCraftingMatrixItems); + filterBeforeFilteringBasedOnCraftingMatrixItems = null; + } +} diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/grid/CraftingGridRefillContext.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/grid/CraftingGridRefillContext.java new file mode 100644 index 000000000..117832b78 --- /dev/null +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/grid/CraftingGridRefillContext.java @@ -0,0 +1,12 @@ +package com.refinedmods.refinedstorage2.platform.common.containermenu.grid; + +import com.refinedmods.refinedstorage2.platform.api.resource.ItemResource; + +import net.minecraft.world.entity.player.Player; + +public interface CraftingGridRefillContext extends AutoCloseable { + boolean extract(ItemResource resource, Player player); + + @Override + void close(); +} diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/grid/CraftingGridRefillContextImpl.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/grid/CraftingGridRefillContextImpl.java new file mode 100644 index 000000000..984af4fc8 --- /dev/null +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/grid/CraftingGridRefillContextImpl.java @@ -0,0 +1,24 @@ +package com.refinedmods.refinedstorage2.platform.common.containermenu.grid; + +import com.refinedmods.refinedstorage2.platform.api.resource.ItemResource; +import com.refinedmods.refinedstorage2.platform.common.block.entity.grid.CraftingGridBlockEntity; + +import net.minecraft.world.entity.player.Player; + +public class CraftingGridRefillContextImpl implements CraftingGridRefillContext { + private final CraftingGridBlockEntity blockEntity; + + public CraftingGridRefillContextImpl(final CraftingGridBlockEntity blockEntity) { + this.blockEntity = blockEntity; + } + + @Override + public boolean extract(final ItemResource resource, final Player player) { + return blockEntity.extract(resource, 1, player) == 1; + } + + @Override + public void close() { + // no op + } +} diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/grid/CraftingGridResultSlot.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/grid/CraftingGridResultSlot.java new file mode 100644 index 000000000..fef2b12e2 --- /dev/null +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/grid/CraftingGridResultSlot.java @@ -0,0 +1,102 @@ +package com.refinedmods.refinedstorage2.platform.common.containermenu.grid; + +import com.refinedmods.refinedstorage2.platform.api.resource.ItemResource; +import com.refinedmods.refinedstorage2.platform.common.Platform; +import com.refinedmods.refinedstorage2.platform.common.block.entity.grid.CraftingMatrix; + +import net.minecraft.core.NonNullList; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.inventory.RecipeHolder; +import net.minecraft.world.inventory.ResultSlot; +import net.minecraft.world.item.ItemStack; + +public class CraftingGridResultSlot extends ResultSlot { + private final CraftingGridSource source; + + public CraftingGridResultSlot(final Player player, + final CraftingGridSource source, + final int x, + final int y) { + super(player, source.getCraftingMatrix(), source.getCraftingResult(), 0, x, y); + this.source = source; + } + + public ItemStack onQuickCraft(final Player player) { + if (!hasItem() || player.level.isClientSide()) { + return ItemStack.EMPTY; + } + final ItemStack singleResultStack = getItem().copy(); + final int maxCrafted = singleResultStack.getMaxStackSize(); + int crafted = 0; + try (CraftingGridRefillContext refillContext = source.openSnapshotRefillContext(player)) { + while (ItemStack.isSameItemSameTags(singleResultStack, getItem()) && crafted < maxCrafted) { + doTake(player, refillContext); + crafted += singleResultStack.getCount(); + } + } + return singleResultStack.copyWithCount(crafted); + } + + @Override + public void onTake(final Player player, final ItemStack stack) { + if (player.level.isClientSide()) { + return; + } + try (CraftingGridRefillContext refillContext = source.openRefillContext()) { + doTake(player, refillContext); + } + } + + private void doTake(final Player player, final CraftingGridRefillContext refillContext) { + fireCraftingEvents(player, getItem().copy()); + final NonNullList remainingItems = source.getRemainingItems(player); + for (int i = 0; i < remainingItems.size(); ++i) { + final ItemStack matrixStack = source.getCraftingMatrix().getItem(i); + final ItemStack remainingItem = remainingItems.get(i); + if (!remainingItem.isEmpty()) { + useIngredientWithRemainingItem(player, i, remainingItem); + } else if (!matrixStack.isEmpty()) { + useIngredient(player, refillContext, i, matrixStack); + } + } + source.getCraftingMatrix().changed(); + } + + private void useIngredientWithRemainingItem(final Player player, + final int index, + final ItemStack remainingItem) { + final ItemStack matrixStack = decrementMatrixSlot(index); + if (matrixStack.isEmpty()) { + source.getCraftingMatrix().setItem(index, remainingItem); + } else if (ItemStack.isSameItemSameTags(matrixStack, remainingItem)) { + remainingItem.grow(matrixStack.getCount()); + source.getCraftingMatrix().setItem(index, remainingItem); + } else if (!player.getInventory().add(remainingItem)) { + player.drop(remainingItem, false); + } + } + + private void useIngredient(final Player player, + final CraftingGridRefillContext refillContext, + final int index, + final ItemStack matrixStack) { + if (matrixStack.getCount() > 1 || !refillContext.extract(ItemResource.ofItemStack(matrixStack), player)) { + decrementMatrixSlot(index); + } + } + + private ItemStack decrementMatrixSlot(final int index) { + final CraftingMatrix matrix = source.getCraftingMatrix(); + matrix.removeItem(index, 1); + return matrix.getItem(index); + } + + private void fireCraftingEvents(final Player player, final ItemStack crafted) { + // reimplementation of checkTakeAchievements + crafted.onCraftedBy(player.level, player, crafted.getCount()); + Platform.INSTANCE.onItemCrafted(player, crafted, source.getCraftingMatrix()); + if (container instanceof RecipeHolder recipeHolder) { + recipeHolder.awardUsedRecipes(player); + } + } +} diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/grid/CraftingGridSource.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/grid/CraftingGridSource.java new file mode 100644 index 000000000..5ba2331b1 --- /dev/null +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/grid/CraftingGridSource.java @@ -0,0 +1,29 @@ +package com.refinedmods.refinedstorage2.platform.common.containermenu.grid; + +import com.refinedmods.refinedstorage2.platform.api.resource.ItemResource; +import com.refinedmods.refinedstorage2.platform.common.block.entity.grid.CraftingMatrix; + +import java.util.List; + +import net.minecraft.core.NonNullList; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.inventory.ResultContainer; +import net.minecraft.world.item.ItemStack; + +public interface CraftingGridSource { + CraftingMatrix getCraftingMatrix(); + + ResultContainer getCraftingResult(); + + NonNullList getRemainingItems(Player player); + + CraftingGridRefillContext openRefillContext(); + + CraftingGridRefillContext openSnapshotRefillContext(Player player); + + boolean clearMatrix(Player player, boolean toPlayerInventory); + + void transferRecipe(Player player, List> recipe); + + void acceptQuickCraft(Player player, ItemStack craftedStack); +} diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/grid/CraftingGridSourceImpl.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/grid/CraftingGridSourceImpl.java new file mode 100644 index 000000000..20375687a --- /dev/null +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/grid/CraftingGridSourceImpl.java @@ -0,0 +1,162 @@ +package com.refinedmods.refinedstorage2.platform.common.containermenu.grid; + +import com.refinedmods.refinedstorage2.api.network.component.StorageNetworkComponent; +import com.refinedmods.refinedstorage2.api.resource.ResourceAmount; +import com.refinedmods.refinedstorage2.api.resource.list.ResourceList; +import com.refinedmods.refinedstorage2.api.resource.list.ResourceListImpl; +import com.refinedmods.refinedstorage2.platform.api.resource.ItemResource; +import com.refinedmods.refinedstorage2.platform.common.block.entity.grid.CraftingGridBlockEntity; +import com.refinedmods.refinedstorage2.platform.common.block.entity.grid.CraftingMatrix; +import com.refinedmods.refinedstorage2.platform.common.internal.storage.channel.StorageChannelTypes; + +import java.util.Comparator; +import java.util.List; + +import net.minecraft.core.NonNullList; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.inventory.ResultContainer; +import net.minecraft.world.item.ItemStack; + +public class CraftingGridSourceImpl implements CraftingGridSource { + private final CraftingGridBlockEntity blockEntity; + + public CraftingGridSourceImpl(final CraftingGridBlockEntity blockEntity) { + this.blockEntity = blockEntity; + } + + @Override + public CraftingMatrix getCraftingMatrix() { + return blockEntity.getCraftingMatrix(); + } + + @Override + public ResultContainer getCraftingResult() { + return blockEntity.getCraftingResult(); + } + + @Override + public NonNullList getRemainingItems(final Player player) { + return blockEntity.getRemainingItems(player); + } + + @Override + public CraftingGridRefillContext openRefillContext() { + return new CraftingGridRefillContextImpl(blockEntity); + } + + @Override + public CraftingGridRefillContext openSnapshotRefillContext(final Player player) { + return new SnapshotCraftingGridRefillContext(player, blockEntity, blockEntity.getCraftingMatrix()); + } + + @Override + public void acceptQuickCraft(final Player player, final ItemStack craftedStack) { + if (player.getInventory().add(craftedStack)) { + return; + } + final ItemStack remainder = blockEntity.insert(craftedStack, player); + if (!remainder.isEmpty()) { + player.drop(remainder, false); + } + } + + @Override + public boolean clearMatrix(final Player player, final boolean toPlayerInventory) { + boolean success = true; + for (int i = 0; i < getCraftingMatrix().getContainerSize(); ++i) { + final ItemStack matrixStack = getCraftingMatrix().getItem(i); + if (matrixStack.isEmpty()) { + continue; + } + if (toPlayerInventory) { + if (player.getInventory().add(matrixStack)) { + getCraftingMatrix().setItem(i, ItemStack.EMPTY); + } else { + success = false; + } + } else { + final ItemStack remainder = blockEntity.insert(matrixStack, player); + if (!remainder.isEmpty()) { + success = false; + } + getCraftingMatrix().setItem(i, remainder); + } + } + return success; + } + + @Override + public void transferRecipe(final Player player, final List> recipe) { + final boolean clearToPlayerInventory = blockEntity.getNetwork().isEmpty(); + if (!clearMatrix(player, clearToPlayerInventory)) { + return; + } + final ResourceList available = createCombinedPlayerInventoryAndNetworkList(player); + final Comparator sorter = sortByHighestAvailableFirst(available); + for (int i = 0; i < getCraftingMatrix().getContainerSize(); ++i) { + if (i > recipe.size() || recipe.get(i) == null) { + continue; + } + final List possibilities = recipe.get(i); + possibilities.sort(sorter); + doTransferRecipe(i, possibilities, player); + } + } + + private void doTransferRecipe(final int index, final List sortedPossibilities, final Player player) { + for (final ItemResource possibility : sortedPossibilities) { + boolean extracted = blockEntity.extract(possibility, 1, player) == 1; + if (!extracted) { + extracted = extractFromPlayerInventory(player, possibility); + } + if (extracted) { + getCraftingMatrix().setItem(index, possibility.toItemStack()); + return; + } + } + } + + private boolean extractFromPlayerInventory(final Player player, final ItemResource possibility) { + final ItemStack possibilityStack = possibility.toItemStack(); + for (int i = 0; i < player.getInventory().getContainerSize(); ++i) { + final ItemStack playerStack = player.getInventory().getItem(i); + if (ItemStack.isSameItemSameTags(playerStack, possibilityStack)) { + player.getInventory().removeItem(i, 1); + return true; + } + } + return false; + } + + private ResourceList createCombinedPlayerInventoryAndNetworkList(final Player player) { + final ResourceList list = new ResourceListImpl<>(); + addNetworkItemsIntoList(list); + addPlayerInventoryItemsIntoList(player, list); + return list; + } + + private void addNetworkItemsIntoList(final ResourceList list) { + blockEntity.getNetwork().ifPresent(network -> network.getComponent(StorageNetworkComponent.class) + .getStorageChannel(StorageChannelTypes.ITEM) + .getAll() + .forEach(list::add)); + } + + private void addPlayerInventoryItemsIntoList(final Player player, final ResourceList list) { + for (int i = 0; i < player.getInventory().getContainerSize(); ++i) { + final ItemStack playerInventoryStack = player.getInventory().getItem(i); + if (playerInventoryStack.isEmpty()) { + continue; + } + list.add(ItemResource.ofItemStack(playerInventoryStack), playerInventoryStack.getCount()); + } + } + + private Comparator sortByHighestAvailableFirst(final ResourceList available) { + return Comparator.comparingLong(resource -> getAvailableAmount(available, resource)).reversed(); + } + + private long getAvailableAmount(final ResourceList available, final ItemResource resource) { + return available.get(resource).map(ResourceAmount::getAmount).orElse(0L); + } +} diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/grid/GridContainerMenu.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/grid/GridContainerMenu.java new file mode 100644 index 000000000..1648a3cad --- /dev/null +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/grid/GridContainerMenu.java @@ -0,0 +1,19 @@ +package com.refinedmods.refinedstorage2.platform.common.containermenu.grid; + +import com.refinedmods.refinedstorage2.platform.common.block.entity.grid.GridBlockEntity; +import com.refinedmods.refinedstorage2.platform.common.content.Menus; + +import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.world.entity.player.Inventory; + +public class GridContainerMenu extends AbstractGridContainerMenu { + public GridContainerMenu(final int syncId, final Inventory playerInventory, final FriendlyByteBuf buf) { + super(Menus.INSTANCE.getGrid(), syncId, playerInventory, buf); + addSlots(0); + } + + public GridContainerMenu(final int syncId, final Inventory playerInventory, final GridBlockEntity grid) { + super(Menus.INSTANCE.getGrid(), syncId, playerInventory, grid); + addSlots(0); + } +} diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/grid/SnapshotCraftingGridRefillContext.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/grid/SnapshotCraftingGridRefillContext.java new file mode 100644 index 000000000..2d0e597a2 --- /dev/null +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/grid/SnapshotCraftingGridRefillContext.java @@ -0,0 +1,78 @@ +package com.refinedmods.refinedstorage2.platform.common.containermenu.grid; + +import com.refinedmods.refinedstorage2.api.core.Action; +import com.refinedmods.refinedstorage2.api.resource.list.ResourceList; +import com.refinedmods.refinedstorage2.api.resource.list.ResourceListImpl; +import com.refinedmods.refinedstorage2.api.storage.channel.StorageChannel; +import com.refinedmods.refinedstorage2.platform.api.resource.ItemResource; +import com.refinedmods.refinedstorage2.platform.api.storage.PlayerActor; +import com.refinedmods.refinedstorage2.platform.common.block.entity.grid.CraftingGridBlockEntity; +import com.refinedmods.refinedstorage2.platform.common.block.entity.grid.CraftingMatrix; + +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.ItemStack; + +public class SnapshotCraftingGridRefillContext implements CraftingGridRefillContext { + private final PlayerActor playerActor; + private final CraftingGridBlockEntity blockEntity; + private final ResourceList available = new ResourceListImpl<>(); + private final ResourceList used = new ResourceListImpl<>(); + + public SnapshotCraftingGridRefillContext( + final Player player, + final CraftingGridBlockEntity blockEntity, + final CraftingMatrix craftingMatrix + ) { + this.playerActor = new PlayerActor(player); + this.blockEntity = blockEntity; + addAvailableItems(craftingMatrix); + } + + private void addAvailableItems(final CraftingMatrix craftingMatrix) { + blockEntity.getStorageChannel().ifPresent(storageChannel -> { + for (int i = 0; i < craftingMatrix.getContainerSize(); ++i) { + addAvailableItem(craftingMatrix, storageChannel, i); + } + }); + } + + private void addAvailableItem(final CraftingMatrix craftingMatrix, + final StorageChannel storageChannel, + final int craftingMatrixSlotIndex) { + final ItemStack craftingMatrixStack = craftingMatrix.getItem(craftingMatrixSlotIndex); + if (craftingMatrixStack.isEmpty()) { + return; + } + addAvailableItem(storageChannel, craftingMatrixStack); + } + + private void addAvailableItem(final StorageChannel storageChannel, + final ItemStack craftingMatrixStack) { + final ItemResource craftingMatrixResource = ItemResource.ofItemStack(craftingMatrixStack); + // a single resource can occur multiple times in a recipe, only add it once + if (available.get(craftingMatrixResource).isEmpty()) { + storageChannel.get(craftingMatrixResource).ifPresent(available::add); + } + } + + @Override + public boolean extract(final ItemResource resource, final Player player) { + return blockEntity.getNetwork().map(network -> { + final boolean isAvailable = available.get(resource).isPresent(); + if (isAvailable) { + available.remove(resource, 1); + used.add(resource, 1); + } + return isAvailable; + }).orElse(false); + } + + @Override + public void close() { + blockEntity.getStorageChannel().ifPresent(this::extractUsedItems); + } + + private void extractUsedItems(final StorageChannel storageChannel) { + used.getAll().forEach(u -> storageChannel.extract(u.getResource(), u.getAmount(), Action.EXECUTE, playerActor)); + } +} diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/grid/package-info.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/grid/package-info.java new file mode 100644 index 000000000..91ebe8cad --- /dev/null +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/grid/package-info.java @@ -0,0 +1,7 @@ +@ParametersAreNonnullByDefault +@FieldsAndMethodsAreNonnullByDefault +package com.refinedmods.refinedstorage2.platform.common.containermenu.grid; + +import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/slot/ResourceFilterSlot.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/slot/ResourceFilterSlot.java index 5dd9c3e09..8ed65aa63 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/slot/ResourceFilterSlot.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/slot/ResourceFilterSlot.java @@ -100,7 +100,7 @@ public boolean contains(final ItemStack stack) { public void broadcastChanges(final Player player) { final FilteredResource currentResource = resourceFilterContainer.get(containerIndex); if (!Objects.equals(currentResource, cachedResource)) { - LOGGER.info("Resource filter slot {} has changed", containerIndex); + LOGGER.debug("Resource filter slot {} has changed", containerIndex); this.cachedResource = currentResource; broadcastChange((ServerPlayer) player, currentResource); } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/slot/UpgradeSlot.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/slot/UpgradeSlot.java new file mode 100644 index 000000000..1a766468e --- /dev/null +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/slot/UpgradeSlot.java @@ -0,0 +1,21 @@ +package com.refinedmods.refinedstorage2.platform.common.containermenu.slot; + +import com.refinedmods.refinedstorage2.platform.api.upgrade.ApplicableUpgrade; +import com.refinedmods.refinedstorage2.platform.common.block.entity.UpgradeContainer; + +import java.util.Set; + +import net.minecraft.world.inventory.Slot; + +public class UpgradeSlot extends Slot { + private final UpgradeContainer upgradeContainer; + + public UpgradeSlot(final UpgradeContainer upgradeContainer, final int index, final int x, final int y) { + super(upgradeContainer, index, x, y); + this.upgradeContainer = upgradeContainer; + } + + public Set getApplicableUpgrades() { + return upgradeContainer.getApplicableUpgrades(); + } +} diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/storage/StorageAccessor.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/storage/StorageAccessor.java index 9b3b90882..e3a43e111 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/storage/StorageAccessor.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/storage/StorageAccessor.java @@ -7,7 +7,5 @@ public interface StorageAccessor { double getProgress(); - boolean showCapacityAndProgress(); - - boolean showStackingInfo(); + boolean hasCapacity(); } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/storage/block/FluidStorageBlockContainerMenu.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/storage/block/FluidStorageBlockContainerMenu.java index a06cc9ae8..04a0cd8d7 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/storage/block/FluidStorageBlockContainerMenu.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/storage/block/FluidStorageBlockContainerMenu.java @@ -24,12 +24,7 @@ public FluidStorageBlockContainerMenu(final int syncId, } @Override - public boolean showCapacityAndProgress() { + public boolean hasCapacity() { return getCapacity() > 0; } - - @Override - public boolean showStackingInfo() { - return false; - } } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/storage/block/ItemStorageBlockContainerMenu.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/storage/block/ItemStorageBlockContainerMenu.java index 8fa8cb419..d5880c2f5 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/storage/block/ItemStorageBlockContainerMenu.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/storage/block/ItemStorageBlockContainerMenu.java @@ -22,12 +22,7 @@ public ItemStorageBlockContainerMenu(final int syncId, } @Override - public boolean showCapacityAndProgress() { + public boolean hasCapacity() { return getCapacity() > 0; } - - @Override - public boolean showStackingInfo() { - return true; - } } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/storage/diskdrive/DiskDriveContainerMenu.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/storage/diskdrive/DiskDriveContainerMenu.java index 39a90cead..ee4ed3a55 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/storage/diskdrive/DiskDriveContainerMenu.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/storage/diskdrive/DiskDriveContainerMenu.java @@ -3,6 +3,7 @@ import com.refinedmods.refinedstorage2.api.storage.StorageInfo; import com.refinedmods.refinedstorage2.platform.api.PlatformApi; import com.refinedmods.refinedstorage2.platform.api.item.StorageContainerItem; +import com.refinedmods.refinedstorage2.platform.common.block.entity.diskdrive.AbstractDiskDriveBlockEntity; import com.refinedmods.refinedstorage2.platform.common.containermenu.slot.ResourceFilterSlot; import com.refinedmods.refinedstorage2.platform.common.containermenu.slot.ValidatedSlot; import com.refinedmods.refinedstorage2.platform.common.containermenu.storage.AbstractStorageContainerMenu; @@ -39,7 +40,11 @@ public DiskDriveContainerMenu(final int syncId, final Inventory playerInventory, this.storageInfoAccessor = new StorageDiskInfoAccessorImpl(PlatformApi.INSTANCE.getStorageRepository( playerInventory.player.getLevel() )); - addSlots(playerInventory.player, new SimpleContainer(9), new ResourceFilterContainer(9)); + addSlots( + playerInventory.player, + new SimpleContainer(AbstractDiskDriveBlockEntity.AMOUNT_OF_DISKS), + new ResourceFilterContainer(9) + ); initializeResourceFilterSlots(buf); } @@ -80,7 +85,8 @@ private Slot createDiskSlot(final SimpleContainer diskInventory, final int i) { return new ValidatedSlot(diskInventory, i, x, y, stack -> stack.getItem() instanceof StorageContainerItem); } - private boolean hasCapacity() { + @Override + public boolean hasCapacity() { return getStorageDiskInfo().allMatch(info -> info.capacity() > 0); } @@ -92,16 +98,6 @@ public double getProgress() { return (double) getStored() / (double) getCapacity(); } - @Override - public boolean showCapacityAndProgress() { - return hasCapacity(); - } - - @Override - public boolean showStackingInfo() { - return getDiskStacks().allMatch(storageInfoAccessor::hasStacking); - } - @Override public long getCapacity() { return getStorageDiskInfo().mapToLong(StorageInfo::capacity).sum(); diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/storage/diskdrive/EmptyStorageDiskInfoAccessor.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/storage/diskdrive/EmptyStorageDiskInfoAccessor.java index 6b3ae5319..d4ac47b4c 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/storage/diskdrive/EmptyStorageDiskInfoAccessor.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/storage/diskdrive/EmptyStorageDiskInfoAccessor.java @@ -11,9 +11,4 @@ public class EmptyStorageDiskInfoAccessor implements StorageDiskInfoAccessor { public Optional getInfo(final ItemStack stack) { return Optional.empty(); } - - @Override - public boolean hasStacking(final ItemStack stack) { - return false; - } } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/storage/diskdrive/StorageDiskInfoAccessor.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/storage/diskdrive/StorageDiskInfoAccessor.java index f5c9a6401..4c1827edc 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/storage/diskdrive/StorageDiskInfoAccessor.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/storage/diskdrive/StorageDiskInfoAccessor.java @@ -8,6 +8,4 @@ public interface StorageDiskInfoAccessor { Optional getInfo(ItemStack stack); - - boolean hasStacking(ItemStack stack); } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/storage/diskdrive/StorageDiskInfoAccessorImpl.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/storage/diskdrive/StorageDiskInfoAccessorImpl.java index dc89664e4..bda3cb129 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/storage/diskdrive/StorageDiskInfoAccessorImpl.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/storage/diskdrive/StorageDiskInfoAccessorImpl.java @@ -22,12 +22,4 @@ public Optional getInfo(final ItemStack stack) { } return Optional.empty(); } - - @Override - public boolean hasStacking(final ItemStack stack) { - if (stack.getItem() instanceof StorageContainerItem storageContainerItem) { - return storageContainerItem.hasStacking(); - } - return false; - } } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/transfer/TransferDestination.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/transfer/TransferDestination.java index 6d169e36d..ddcc38611 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/transfer/TransferDestination.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/transfer/TransferDestination.java @@ -4,6 +4,7 @@ import net.minecraft.world.item.ItemStack; +@FunctionalInterface public interface TransferDestination { @Nullable ItemStack transfer(ItemStack stack); diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/BlockColorMap.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/BlockColorMap.java index 85efd4cf2..d70801ef8 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/BlockColorMap.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/BlockColorMap.java @@ -16,6 +16,15 @@ import net.minecraft.world.level.block.state.properties.Property; public class BlockColorMap extends ColorMap { + public BlockColorMap() { + this(DyeColor.LIGHT_BLUE); + } + + public BlockColorMap(final DyeColor defaultColor) { + super(defaultColor); + } + + public Optional updateColor(final BlockState state, final ItemStack heldItem, final Level level, diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/BlockEntities.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/BlockEntities.java index 775a24179..d674506cc 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/BlockEntities.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/BlockEntities.java @@ -2,12 +2,13 @@ import com.refinedmods.refinedstorage2.platform.common.block.entity.CableBlockEntity; import com.refinedmods.refinedstorage2.platform.common.block.entity.ControllerBlockEntity; -import com.refinedmods.refinedstorage2.platform.common.block.entity.GridBlockEntity; import com.refinedmods.refinedstorage2.platform.common.block.entity.ImporterBlockEntity; import com.refinedmods.refinedstorage2.platform.common.block.entity.InterfaceBlockEntity; import com.refinedmods.refinedstorage2.platform.common.block.entity.diskdrive.AbstractDiskDriveBlockEntity; import com.refinedmods.refinedstorage2.platform.common.block.entity.exporter.ExporterBlockEntity; import com.refinedmods.refinedstorage2.platform.common.block.entity.externalstorage.ExternalStorageBlockEntity; +import com.refinedmods.refinedstorage2.platform.common.block.entity.grid.CraftingGridBlockEntity; +import com.refinedmods.refinedstorage2.platform.common.block.entity.grid.GridBlockEntity; import com.refinedmods.refinedstorage2.platform.common.block.entity.storage.FluidStorageBlockBlockEntity; import com.refinedmods.refinedstorage2.platform.common.block.entity.storage.ItemStorageBlockBlockEntity; import com.refinedmods.refinedstorage2.platform.common.internal.storage.type.FluidStorageType; @@ -31,6 +32,8 @@ public final class BlockEntities { @Nullable private Supplier> grid; @Nullable + private Supplier> craftingGrid; + @Nullable private Supplier> controller; @Nullable private Supplier> creativeController; @@ -74,6 +77,14 @@ public void setGrid(final Supplier> supplier) { this.grid = supplier; } + public BlockEntityType getCraftingGrid() { + return Objects.requireNonNull(craftingGrid).get(); + } + + public void setCraftingGrid(final Supplier> supplier) { + this.craftingGrid = supplier; + } + public BlockEntityType getController() { return Objects.requireNonNull(controller).get(); } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/Blocks.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/Blocks.java index ff5816129..3b0e3eba2 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/Blocks.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/Blocks.java @@ -6,11 +6,12 @@ import com.refinedmods.refinedstorage2.platform.common.block.ExporterBlock; import com.refinedmods.refinedstorage2.platform.common.block.ExternalStorageBlock; import com.refinedmods.refinedstorage2.platform.common.block.FluidStorageBlock; -import com.refinedmods.refinedstorage2.platform.common.block.GridBlock; import com.refinedmods.refinedstorage2.platform.common.block.ImporterBlock; import com.refinedmods.refinedstorage2.platform.common.block.InterfaceBlock; import com.refinedmods.refinedstorage2.platform.common.block.ItemStorageBlock; import com.refinedmods.refinedstorage2.platform.common.block.SimpleBlock; +import com.refinedmods.refinedstorage2.platform.common.block.grid.CraftingGridBlock; +import com.refinedmods.refinedstorage2.platform.common.block.grid.GridBlock; import com.refinedmods.refinedstorage2.platform.common.internal.storage.type.FluidStorageType; import com.refinedmods.refinedstorage2.platform.common.internal.storage.type.ItemStorageType; @@ -20,14 +21,19 @@ import java.util.function.Supplier; import javax.annotation.Nullable; +import net.minecraft.world.item.DyeColor; + public final class Blocks { public static final Blocks INSTANCE = new Blocks(); + private final BlockColorMap cable = new BlockColorMap<>(DyeColor.GRAY); private final BlockColorMap grid = new BlockColorMap<>(); + private final BlockColorMap craftingGrid = new BlockColorMap<>(); private final BlockColorMap controller = new BlockColorMap<>(); private final BlockColorMap creativeController = new BlockColorMap<>(); - @Nullable - private Supplier cable; + private final BlockColorMap exporter = new BlockColorMap<>(DyeColor.GRAY); + private final BlockColorMap importer = new BlockColorMap<>(DyeColor.GRAY); + private final BlockColorMap externalStorage = new BlockColorMap<>(DyeColor.GRAY); @Nullable private Supplier quartzEnrichedIronBlock; @Nullable @@ -39,19 +45,13 @@ public final class Blocks { private final Map> fluidStorageBlocks = new EnumMap<>(FluidStorageType.Variant.class); @Nullable - private Supplier importer; - @Nullable - private Supplier exporter; - @Nullable private Supplier iface; - @Nullable - private Supplier externalStorage; private Blocks() { } - public CableBlock getCable() { - return Objects.requireNonNull(cable).get(); + public BlockColorMap getCable() { + return cable; } public SimpleBlock getQuartzEnrichedIronBlock() { @@ -70,6 +70,10 @@ public BlockColorMap getGrid() { return grid; } + public BlockColorMap getCraftingGrid() { + return craftingGrid; + } + public BlockColorMap getController() { return controller; } @@ -78,10 +82,6 @@ public BlockColorMap getCreativeController() { return creativeController; } - public void setCable(final Supplier cableSupplier) { - this.cable = cableSupplier; - } - public void setQuartzEnrichedIronBlock(final Supplier quartzEnrichedIronBlockSupplier) { this.quartzEnrichedIronBlock = quartzEnrichedIronBlockSupplier; } @@ -111,20 +111,12 @@ public FluidStorageBlock getFluidStorageBlock(final FluidStorageType.Variant var return fluidStorageBlocks.get(variant).get(); } - public void setImporter(final Supplier importerSupplier) { - this.importer = importerSupplier; - } - - public ImporterBlock getImporter() { - return Objects.requireNonNull(importer).get(); + public BlockColorMap getImporter() { + return importer; } - public void setExporter(final Supplier exporterSupplier) { - this.exporter = exporterSupplier; - } - - public ExporterBlock getExporter() { - return Objects.requireNonNull(exporter).get(); + public BlockColorMap getExporter() { + return exporter; } public void setInterface(final Supplier interfaceSupplier) { @@ -135,11 +127,7 @@ public InterfaceBlock getInterface() { return Objects.requireNonNull(iface).get(); } - public void setExternalStorage(final Supplier externalStorageSupplier) { - this.externalStorage = externalStorageSupplier; - } - - public ExternalStorageBlock getExternalStorage() { - return Objects.requireNonNull(externalStorage).get(); + public BlockColorMap getExternalStorage() { + return externalStorage; } } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/ColorMap.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/ColorMap.java index e819a5fe5..228dd7bf2 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/ColorMap.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/ColorMap.java @@ -1,12 +1,12 @@ package com.refinedmods.refinedstorage2.platform.common.content; import java.util.Collection; +import java.util.Comparator; import java.util.EnumMap; import java.util.Map; import java.util.function.BiConsumer; import java.util.function.Function; import java.util.function.Supplier; -import java.util.stream.Collectors; import net.minecraft.network.chat.Component; import net.minecraft.network.chat.MutableComponent; @@ -14,9 +14,16 @@ import net.minecraft.world.item.DyeColor; public class ColorMap { - private static final DyeColor NORMAL_COLOR = DyeColor.LIGHT_BLUE; - private final Map> map = new EnumMap<>(DyeColor.class); + private final DyeColor defaultColor; + + public ColorMap(final DyeColor defaultColor) { + this.defaultColor = defaultColor; + } + + public boolean isDefaultColor(final DyeColor color) { + return defaultColor == color; + } public void putAll(final Function> factory) { for (final DyeColor color : DyeColor.values()) { @@ -25,20 +32,14 @@ public void putAll(final Function> factory) { } public ResourceLocation getId(final DyeColor color, final ResourceLocation id) { - return generateId(color, id.getNamespace(), id.getPath()); - } - - public static ResourceLocation generateId(final DyeColor color, - final String namespace, - final String path) { - if (color == NORMAL_COLOR) { - return new ResourceLocation(namespace, path); + if (color == defaultColor) { + return id; } - return new ResourceLocation(namespace, color.getName() + "_" + path); + return new ResourceLocation(id.getNamespace(), color.getName() + "_" + id.getPath()); } public MutableComponent getName(final DyeColor color, final MutableComponent name) { - if (color != NORMAL_COLOR) { + if (color != this.defaultColor) { return Component.translatable("color.minecraft." + color.getName()).append(" ").append(name); } else { return name; @@ -46,18 +47,31 @@ public MutableComponent getName(final DyeColor color, final MutableComponent nam } public void forEach(final BiConsumer> consumer) { - map.forEach(consumer); + map.entrySet().stream() + .sorted(new ColoredSorter<>(defaultColor)) + .forEach(entry -> consumer.accept(entry.getKey(), entry.getValue())); } public T get(final DyeColor color) { return map.get(color).get(); } - public T getNormal() { - return get(NORMAL_COLOR); + public T getDefault() { + return get(defaultColor); } public Collection values() { - return map.values().stream().map(Supplier::get).collect(Collectors.toSet()); + return map.values().stream().map(Supplier::get).toList(); + } + + private record ColoredSorter(DyeColor defaultColor) implements Comparator> { + @Override + public int compare(final Map.Entry entry1, final Map.Entry entry2) { + return getId(entry1) - getId(entry2); + } + + private int getId(final Map.Entry entry) { + return (entry.getKey().getId() - defaultColor.getId() + 16) % 16; + } } } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/ContentIds.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/ContentIds.java index 304aa9960..78101e5be 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/ContentIds.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/ContentIds.java @@ -19,6 +19,7 @@ public final class ContentIds { public static final ResourceLocation WRENCH = createIdentifier("wrench"); public static final ResourceLocation STORAGE_HOUSING = createIdentifier("storage_housing"); public static final ResourceLocation GRID = createIdentifier("grid"); + public static final ResourceLocation CRAFTING_GRID = createIdentifier("crafting_grid"); public static final ResourceLocation CONTROLLER = createIdentifier("controller"); public static final ResourceLocation CREATIVE_CONTROLLER = createIdentifier("creative_controller"); public static final ResourceLocation CONSTRUCTION_CORE = createIdentifier("construction_core"); diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/CreativeModeTabItems.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/CreativeModeTabItems.java index 5e049457e..f37a0cb40 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/CreativeModeTabItems.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/CreativeModeTabItems.java @@ -22,7 +22,8 @@ public static void append(final Consumer consumer) { private static void appendBlocks(final Consumer consumer) { Items.INSTANCE.getAllControllers().stream().map(Supplier::get).forEach(consumer); appendBlockColors(consumer, Blocks.INSTANCE.getGrid()); - consumer.accept(Blocks.INSTANCE.getCable()); + appendBlockColors(consumer, Blocks.INSTANCE.getCraftingGrid()); + Items.INSTANCE.getCables().stream().map(Supplier::get).forEach(consumer); consumer.accept(Blocks.INSTANCE.getDiskDrive()); Arrays.stream(ItemStorageType.Variant.values()).forEach(variant -> consumer.accept( Blocks.INSTANCE.getItemStorageBlock(variant) @@ -30,9 +31,9 @@ private static void appendBlocks(final Consumer consumer) { Arrays.stream(FluidStorageType.Variant.values()).forEach(variant -> consumer.accept( Blocks.INSTANCE.getFluidStorageBlock(variant) )); - consumer.accept(Blocks.INSTANCE.getImporter()); - consumer.accept(Blocks.INSTANCE.getExporter()); - consumer.accept(Blocks.INSTANCE.getExternalStorage()); + Items.INSTANCE.getImporters().stream().map(Supplier::get).forEach(consumer); + Items.INSTANCE.getExporters().stream().map(Supplier::get).forEach(consumer); + Items.INSTANCE.getExternalStorages().stream().map(Supplier::get).forEach(consumer); consumer.accept(Blocks.INSTANCE.getInterface()); consumer.accept(Blocks.INSTANCE.getMachineCasing()); consumer.accept(Blocks.INSTANCE.getQuartzEnrichedIronBlock()); diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/DefaultEnergyUsage.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/DefaultEnergyUsage.java index 3b6f99754..004eec5da 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/DefaultEnergyUsage.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/DefaultEnergyUsage.java @@ -7,8 +7,9 @@ public final class DefaultEnergyUsage { public static final long INTERFACE = 4; public static final long EXTERNAL_STORAGE = 6; public static final long GRID = 10; + public static final long CRAFTING_GRID = 14; public static final long DISK_DRIVE = 10; - public static final long DISK_DRIVE_PER_DISK = 5; + public static final long DISK_DRIVE_PER_DISK = 4; public static final long CONTROLLER_CAPACITY = 1000; public static final long ONE_K_STORAGE_BLOCK = 2; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/Items.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/Items.java index 059a8cdb8..8e5d6f871 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/Items.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/Items.java @@ -4,6 +4,7 @@ import com.refinedmods.refinedstorage2.platform.common.internal.storage.type.ItemStorageType; import com.refinedmods.refinedstorage2.platform.common.item.ProcessorItem; import com.refinedmods.refinedstorage2.platform.common.item.block.ControllerBlockItem; +import com.refinedmods.refinedstorage2.platform.common.item.block.NamedBlockItem; import java.util.ArrayList; import java.util.Collections; @@ -29,6 +30,10 @@ public final class Items { = new EnumMap<>(FluidStorageType.Variant.class); private final List> regularControllers = new ArrayList<>(); private final List> allControllers = new ArrayList<>(); + private final List> allCables = new ArrayList<>(); + private final List> allExporters = new ArrayList<>(); + private final List> allImporters = new ArrayList<>(); + private final List> allExternalStorages = new ArrayList<>(); @Nullable private Supplier quartzEnrichedIron; @Nullable @@ -159,6 +164,38 @@ public List> getRegularControllers() { return Collections.unmodifiableList(regularControllers); } + public void addCable(final Supplier supplier) { + allCables.add(supplier); + } + + public List> getCables() { + return Collections.unmodifiableList(allCables); + } + + public void addExporter(final Supplier supplier) { + allExporters.add(supplier); + } + + public List> getExporters() { + return Collections.unmodifiableList(allExporters); + } + + public void addImporter(final Supplier supplier) { + allImporters.add(supplier); + } + + public List> getImporters() { + return Collections.unmodifiableList(allImporters); + } + + public void addExternalStorage(final Supplier supplier) { + allExternalStorages.add(supplier); + } + + public List> getExternalStorages() { + return Collections.unmodifiableList(allExternalStorages); + } + public Item getStorageHousing() { return Objects.requireNonNull(storageHousing).get(); } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/KeyMappings.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/KeyMappings.java index cabde60ad..2bf6f5da6 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/KeyMappings.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/KeyMappings.java @@ -10,6 +10,10 @@ public final class KeyMappings { @Nullable private KeyMapping focusSearchBar; + @Nullable + private KeyMapping clearCraftingGridMatrixToNetwork; + @Nullable + private KeyMapping clearCraftingGridMatrixToInventory; private KeyMappings() { } @@ -21,4 +25,22 @@ public KeyMapping getFocusSearchBar() { public void setFocusSearchBar(final KeyMapping focusSearchBar) { this.focusSearchBar = focusSearchBar; } + + @Nullable // TODO - implement on Fabric + public KeyMapping getClearCraftingGridMatrixToNetwork() { + return clearCraftingGridMatrixToNetwork; + } + + public void setClearCraftingGridMatrixToNetwork(final KeyMapping clearCraftingGridMatrixToNetwork) { + this.clearCraftingGridMatrixToNetwork = clearCraftingGridMatrixToNetwork; + } + + @Nullable // TODO - implement on Fabric + public KeyMapping getClearCraftingGridMatrixToInventory() { + return clearCraftingGridMatrixToInventory; + } + + public void setClearCraftingGridMatrixToInventory(final KeyMapping clearCraftingGridMatrixToInventory) { + this.clearCraftingGridMatrixToInventory = clearCraftingGridMatrixToInventory; + } } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/Menus.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/Menus.java index dbc7115c8..98381111f 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/Menus.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/Menus.java @@ -2,9 +2,10 @@ import com.refinedmods.refinedstorage2.platform.common.containermenu.ControllerContainerMenu; import com.refinedmods.refinedstorage2.platform.common.containermenu.ExporterContainerMenu; -import com.refinedmods.refinedstorage2.platform.common.containermenu.GridContainerMenu; import com.refinedmods.refinedstorage2.platform.common.containermenu.ImporterContainerMenu; import com.refinedmods.refinedstorage2.platform.common.containermenu.InterfaceContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.containermenu.grid.CraftingGridContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.containermenu.grid.GridContainerMenu; import com.refinedmods.refinedstorage2.platform.common.containermenu.storage.ExternalStorageContainerMenu; import com.refinedmods.refinedstorage2.platform.common.containermenu.storage.block.FluidStorageBlockContainerMenu; import com.refinedmods.refinedstorage2.platform.common.containermenu.storage.block.ItemStorageBlockContainerMenu; @@ -24,6 +25,8 @@ public final class Menus { @Nullable private Supplier> grid; @Nullable + private Supplier> craftingGrid; + @Nullable private Supplier> controller; @Nullable private Supplier> itemStorage; @@ -49,6 +52,14 @@ public MenuType getGrid() { return Objects.requireNonNull(grid).get(); } + public MenuType getCraftingGrid() { + return Objects.requireNonNull(craftingGrid).get(); + } + + public void setCraftingGrid(final Supplier> supplier) { + this.craftingGrid = supplier; + } + public MenuType getController() { return Objects.requireNonNull(controller).get(); } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/Tags.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/Tags.java new file mode 100644 index 000000000..29713cae9 --- /dev/null +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/Tags.java @@ -0,0 +1,27 @@ +package com.refinedmods.refinedstorage2.platform.common.content; + +import net.minecraft.core.registries.Registries; +import net.minecraft.tags.TagKey; +import net.minecraft.world.item.Item; + +import static com.refinedmods.refinedstorage2.platform.common.util.IdentifierUtil.createIdentifier; + +public final class Tags { + public static final TagKey CABLES = createTag("cables"); + public static final TagKey CONTROLLERS = createTag("controllers"); + public static final TagKey CREATIVE_CONTROLLERS = createTag("creative_controllers"); + public static final TagKey FLUID_STORAGE_DISKS = createTag("fluid_storage_disks"); + public static final TagKey GRIDS = createTag("grids"); + public static final TagKey CRAFTING_GRIDS = createTag("crafting_grids"); + public static final TagKey STORAGE_DISKS = createTag("storage_disks"); + public static final TagKey IMPORTERS = createTag("importers"); + public static final TagKey EXPORTERS = createTag("exporters"); + public static final TagKey EXTERNAL_STORAGES = createTag("external_storages"); + + private Tags() { + } + + private static TagKey createTag(final String id) { + return TagKey.create(Registries.ITEM, createIdentifier(id)); + } +} diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/integration/package-info.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/integration/package-info.java new file mode 100644 index 000000000..d101874c8 --- /dev/null +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/integration/package-info.java @@ -0,0 +1,7 @@ +@ParametersAreNonnullByDefault +@FieldsAndMethodsAreNonnullByDefault +package com.refinedmods.refinedstorage2.platform.common.integration; + +import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/integration/recipemod/CompositeIngredientConverter.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/integration/recipemod/CompositeIngredientConverter.java new file mode 100644 index 000000000..cf627da4a --- /dev/null +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/integration/recipemod/CompositeIngredientConverter.java @@ -0,0 +1,29 @@ +package com.refinedmods.refinedstorage2.platform.common.integration.recipemod; + +import com.refinedmods.refinedstorage2.platform.api.integration.recipemod.IngredientConverter; + +import java.util.Collection; +import java.util.HashSet; +import java.util.Optional; + +public class CompositeIngredientConverter implements IngredientConverter { + private final Collection converters = new HashSet<>(); + + @Override + public Optional convertToResource(final Object ingredient) { + return converters.stream() + .flatMap(converter -> converter.convertToResource(ingredient).stream()) + .findFirst(); + } + + @Override + public Optional convertToIngredient(final Object resource) { + return converters.stream() + .flatMap(converter -> converter.convertToIngredient(resource).stream()) + .findFirst(); + } + + public void addConverter(final IngredientConverter converter) { + this.converters.add(converter); + } +} diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/integration/recipemod/jei/ClickableIngredient.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/integration/recipemod/jei/ClickableIngredient.java new file mode 100644 index 000000000..4615c14ed --- /dev/null +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/integration/recipemod/jei/ClickableIngredient.java @@ -0,0 +1,25 @@ +package com.refinedmods.refinedstorage2.platform.common.integration.recipemod.jei; + +import mezz.jei.api.ingredients.ITypedIngredient; +import mezz.jei.api.runtime.IClickableIngredient; +import net.minecraft.client.renderer.Rect2i; + +public class ClickableIngredient implements IClickableIngredient { + private final ITypedIngredient ingredient; + private final Rect2i area; + + public ClickableIngredient(final ITypedIngredient ingredient, final int x, final int y) { + this.ingredient = ingredient; + area = new Rect2i(x, y, 16, 16); + } + + @Override + public ITypedIngredient getTypedIngredient() { + return ingredient; + } + + @Override + public Rect2i getArea() { + return area; + } +} diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/integration/recipemod/jei/CraftingGridRecipeTransferHandler.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/integration/recipemod/jei/CraftingGridRecipeTransferHandler.java new file mode 100644 index 000000000..fbc6f3937 --- /dev/null +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/integration/recipemod/jei/CraftingGridRecipeTransferHandler.java @@ -0,0 +1,103 @@ +package com.refinedmods.refinedstorage2.platform.common.integration.recipemod.jei; + +import com.refinedmods.refinedstorage2.api.resource.list.ResourceList; +import com.refinedmods.refinedstorage2.platform.api.resource.ItemResource; +import com.refinedmods.refinedstorage2.platform.common.containermenu.grid.CraftingGridContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.content.Menus; + +import java.util.List; +import java.util.Optional; +import java.util.stream.Collectors; +import javax.annotation.Nullable; + +import mezz.jei.api.constants.RecipeTypes; +import mezz.jei.api.gui.ingredient.IRecipeSlotView; +import mezz.jei.api.gui.ingredient.IRecipeSlotsView; +import mezz.jei.api.recipe.RecipeIngredientRole; +import mezz.jei.api.recipe.RecipeType; +import mezz.jei.api.recipe.transfer.IRecipeTransferError; +import mezz.jei.api.recipe.transfer.IRecipeTransferHandler; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.inventory.MenuType; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.crafting.CraftingRecipe; + +public class CraftingGridRecipeTransferHandler + implements IRecipeTransferHandler { + @Override + public Class getContainerClass() { + return CraftingGridContainerMenu.class; + } + + @Override + public Optional> getMenuType() { + return Optional.of(Menus.INSTANCE.getCraftingGrid()); + } + + @Override + public RecipeType getRecipeType() { + return RecipeTypes.CRAFTING; + } + + @Override + @Nullable + public IRecipeTransferError transferRecipe(final CraftingGridContainerMenu containerMenu, + final CraftingRecipe recipe, + final IRecipeSlotsView recipeSlots, + final Player player, + final boolean maxTransfer, + final boolean doTransfer) { + if (doTransfer) { + doTransfer(recipeSlots, containerMenu); + return null; + } + final ResourceList available = containerMenu.getAvailableListForRecipeTransfer(); + final List missingSlots = findMissingSlots(recipeSlots, available); + return missingSlots.isEmpty() ? null : new MissingItemRecipeTransferError(missingSlots); + } + + private void doTransfer(final IRecipeSlotsView recipeSlots, final CraftingGridContainerMenu containerMenu) { + final List> inputs = getInputs(recipeSlots); + containerMenu.transferRecipe(inputs); + } + + private List findMissingSlots(final IRecipeSlotsView recipeSlots, + final ResourceList available) { + return recipeSlots.getSlotViews(RecipeIngredientRole.INPUT).stream().filter(slotView -> { + if (slotView.isEmpty()) { + return false; + } + return !isAvailable(available, slotView); + }).toList(); + } + + private boolean isAvailable(final ResourceList available, final IRecipeSlotView slotView) { + final List possibilities = slotView.getItemStacks().toList(); + for (final ItemStack possibility : possibilities) { + final ItemResource possibilityResource = ItemResource.ofItemStack(possibility); + if (available.remove(possibilityResource, 1).isPresent()) { + return true; + } + } + return false; + } + + private List> getInputs(final IRecipeSlotsView recipeSlots) { + return recipeSlots.getSlotViews(RecipeIngredientRole.INPUT).stream().map(slotView -> { + final List stacks = slotView.getItemStacks().collect(Collectors.toList()); + prioritizeDisplayedStack(slotView, stacks); + return stacks.stream().map(ItemResource::ofItemStack).toList(); + }).toList(); + } + + private void prioritizeDisplayedStack(final IRecipeSlotView slotView, final List stacks) { + slotView.getDisplayedItemStack().ifPresent(displayed -> { + final int index = stacks.indexOf(displayed); + if (index > 0) { + return; + } + stacks.remove(index); + stacks.add(0, displayed); + }); + } +} diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/integration/recipemod/jei/FilteredResourceGuiContainerHandler.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/integration/recipemod/jei/FilteredResourceGuiContainerHandler.java new file mode 100644 index 000000000..6ba3e6bca --- /dev/null +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/integration/recipemod/jei/FilteredResourceGuiContainerHandler.java @@ -0,0 +1,49 @@ +package com.refinedmods.refinedstorage2.platform.common.integration.recipemod.jei; + +import com.refinedmods.refinedstorage2.platform.api.integration.recipemod.IngredientConverter; +import com.refinedmods.refinedstorage2.platform.api.resource.filter.FilteredResource; +import com.refinedmods.refinedstorage2.platform.common.screen.AbstractBaseScreen; + +import java.util.Optional; +import javax.annotation.Nullable; + +import mezz.jei.api.gui.handlers.IGuiContainerHandler; +import mezz.jei.api.ingredients.IIngredientHelper; +import mezz.jei.api.ingredients.ITypedIngredient; +import mezz.jei.api.runtime.IClickableIngredient; +import mezz.jei.api.runtime.IIngredientManager; + +public class FilteredResourceGuiContainerHandler implements IGuiContainerHandler> { + private final IngredientConverter converter; + private final IIngredientManager ingredientManager; + + public FilteredResourceGuiContainerHandler(final IngredientConverter converter, + final IIngredientManager ingredientManager) { + this.converter = converter; + this.ingredientManager = ingredientManager; + } + + @Override + public Optional> getClickableIngredientUnderMouse( + final AbstractBaseScreen baseScreen, + final double mouseX, + final double mouseY + ) { + return convertToIngredient(baseScreen.getFilteredResource()) + .flatMap(this::convertToClickableIngredient); + } + + public Optional convertToIngredient(@Nullable final FilteredResource filteredResource) { + if (filteredResource == null) { + return Optional.empty(); + } + return converter.convertToIngredient(filteredResource); + } + + private Optional> convertToClickableIngredient(final Object ingredient) { + final IIngredientHelper helper = ingredientManager.getIngredientHelper(ingredient); + final Optional> maybeTypedIngredient = + ingredientManager.createTypedIngredient(helper.getIngredientType(), ingredient); + return maybeTypedIngredient.map(typedIngredient -> new ClickableIngredient<>(typedIngredient, 16, 16)); + } +} diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/integration/recipemod/jei/FilteredResourceIngredientConverter.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/integration/recipemod/jei/FilteredResourceIngredientConverter.java new file mode 100644 index 000000000..4f1831777 --- /dev/null +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/integration/recipemod/jei/FilteredResourceIngredientConverter.java @@ -0,0 +1,41 @@ +package com.refinedmods.refinedstorage2.platform.common.integration.recipemod.jei; + +import com.refinedmods.refinedstorage2.platform.api.integration.recipemod.IngredientConverter; +import com.refinedmods.refinedstorage2.platform.api.resource.FluidResource; +import com.refinedmods.refinedstorage2.platform.api.resource.ItemResource; +import com.refinedmods.refinedstorage2.platform.api.resource.filter.FilteredResource; + +import java.util.Optional; + +import mezz.jei.api.helpers.IPlatformFluidHelper; + +public class FilteredResourceIngredientConverter implements IngredientConverter { + private final IPlatformFluidHelper fluidHelper; + + public FilteredResourceIngredientConverter(final IPlatformFluidHelper fluidHelper) { + this.fluidHelper = fluidHelper; + } + + @Override + public Optional convertToResource(final Object ingredient) { + return Optional.empty(); + } + + @Override + public Optional convertToIngredient(final Object resource) { + if (!(resource instanceof FilteredResource filteredResource)) { + return Optional.empty(); + } + if (filteredResource.getValue() instanceof ItemResource itemResource) { + return Optional.of(itemResource.toItemStack()); + } + if (filteredResource.getValue() instanceof FluidResource fluidResource) { + return Optional.of(fluidHelper.create( + fluidResource.fluid(), + fluidHelper.bucketVolume(), + fluidResource.tag() + )); + } + return Optional.empty(); + } +} diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/integration/recipemod/jei/GridGuiContainerHandler.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/integration/recipemod/jei/GridGuiContainerHandler.java new file mode 100644 index 000000000..a41a73c74 --- /dev/null +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/integration/recipemod/jei/GridGuiContainerHandler.java @@ -0,0 +1,48 @@ +package com.refinedmods.refinedstorage2.platform.common.integration.recipemod.jei; + +import com.refinedmods.refinedstorage2.api.grid.view.GridResource; +import com.refinedmods.refinedstorage2.platform.api.integration.recipemod.IngredientConverter; +import com.refinedmods.refinedstorage2.platform.common.screen.grid.AbstractGridScreen; + +import java.util.Optional; + +import mezz.jei.api.gui.handlers.IGuiContainerHandler; +import mezz.jei.api.ingredients.IIngredientHelper; +import mezz.jei.api.ingredients.ITypedIngredient; +import mezz.jei.api.runtime.IClickableIngredient; +import mezz.jei.api.runtime.IIngredientManager; + +public class GridGuiContainerHandler implements IGuiContainerHandler> { + private final IngredientConverter converter; + private final IIngredientManager ingredientManager; + + public GridGuiContainerHandler(final IngredientConverter converter, final IIngredientManager ingredientManager) { + this.converter = converter; + this.ingredientManager = ingredientManager; + } + + @Override + public Optional> getClickableIngredientUnderMouse( + final AbstractGridScreen screen, + final double mouseX, + final double mouseY + ) { + final GridResource resource = screen.getHoveredResource(); + if (resource == null) { + return Optional.empty(); + } + return converter + .convertToIngredient(resource) + .flatMap(ingredient -> convertToClickableIngredient(mouseX, mouseY, ingredient)); + } + + private Optional> convertToClickableIngredient(final double x, + final double y, + final Object ingredient) { + final IIngredientHelper helper = ingredientManager.getIngredientHelper(ingredient); + final Optional> maybeTypedIngredient = + ingredientManager.createTypedIngredient(helper.getIngredientType(), ingredient); + return maybeTypedIngredient + .map(typedIngredient -> new ClickableIngredient<>(typedIngredient, (int) x, (int) y)); + } +} diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/integration/recipemod/jei/GridResourceIngredientConverter.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/integration/recipemod/jei/GridResourceIngredientConverter.java new file mode 100644 index 000000000..6f1c6e8f9 --- /dev/null +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/integration/recipemod/jei/GridResourceIngredientConverter.java @@ -0,0 +1,37 @@ +package com.refinedmods.refinedstorage2.platform.common.integration.recipemod.jei; + +import com.refinedmods.refinedstorage2.platform.api.integration.recipemod.IngredientConverter; +import com.refinedmods.refinedstorage2.platform.common.internal.grid.view.FluidGridResource; +import com.refinedmods.refinedstorage2.platform.common.internal.grid.view.ItemGridResource; + +import java.util.Optional; + +import mezz.jei.api.helpers.IPlatformFluidHelper; + +public class GridResourceIngredientConverter implements IngredientConverter { + private final IPlatformFluidHelper fluidHelper; + + public GridResourceIngredientConverter(final IPlatformFluidHelper fluidHelper) { + this.fluidHelper = fluidHelper; + } + + @Override + public Optional convertToResource(final Object ingredient) { + return Optional.empty(); + } + + @Override + public Optional convertToIngredient(final Object resource) { + if (resource instanceof ItemGridResource itemGridResource) { + return Optional.of(itemGridResource.copyItemStack()); + } + if (resource instanceof FluidGridResource fluidGridResource) { + return Optional.of(fluidHelper.create( + fluidGridResource.getResource().fluid(), + fluidHelper.bucketVolume(), + fluidGridResource.getResource().tag() + )); + } + return Optional.empty(); + } +} diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/jei/JeiGridSynchronizer.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/integration/recipemod/jei/JeiGridSynchronizer.java similarity index 93% rename from refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/jei/JeiGridSynchronizer.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/integration/recipemod/jei/JeiGridSynchronizer.java index 8019974d5..b5b9336b9 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/jei/JeiGridSynchronizer.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/integration/recipemod/jei/JeiGridSynchronizer.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.fabric.integration.jei; +package com.refinedmods.refinedstorage2.platform.common.integration.recipemod.jei; import com.refinedmods.refinedstorage2.platform.common.internal.grid.AbstractGridSynchronizer; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/jei/JeiProxy.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/integration/recipemod/jei/JeiProxy.java similarity index 63% rename from refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/jei/JeiProxy.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/integration/recipemod/jei/JeiProxy.java index 8051ad857..a57c59bd5 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/jei/JeiProxy.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/integration/recipemod/jei/JeiProxy.java @@ -1,10 +1,10 @@ -package com.refinedmods.refinedstorage2.platform.forge.integration.jei; +package com.refinedmods.refinedstorage2.platform.common.integration.recipemod.jei; import mezz.jei.api.runtime.IJeiRuntime; public class JeiProxy { public String getSearchFieldText() { - final IJeiRuntime runtime = JeiPlugin.getRuntime(); + final IJeiRuntime runtime = RefinedStorageJeiModPlugin.getRuntime(); if (runtime == null) { return ""; } @@ -12,7 +12,7 @@ public String getSearchFieldText() { } public void setSearchFieldText(final String text) { - final IJeiRuntime runtime = JeiPlugin.getRuntime(); + final IJeiRuntime runtime = RefinedStorageJeiModPlugin.getRuntime(); if (runtime != null) { runtime.getIngredientFilter().setFilterText(text); } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/integration/recipemod/jei/MissingItemRecipeTransferError.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/integration/recipemod/jei/MissingItemRecipeTransferError.java new file mode 100644 index 000000000..4e4bdf7ea --- /dev/null +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/integration/recipemod/jei/MissingItemRecipeTransferError.java @@ -0,0 +1,56 @@ +package com.refinedmods.refinedstorage2.platform.common.integration.recipemod.jei; + +import java.awt.Color; +import java.util.List; + +import com.mojang.blaze3d.vertex.PoseStack; +import mezz.jei.api.gui.ingredient.IRecipeSlotView; +import mezz.jei.api.gui.ingredient.IRecipeSlotsView; +import mezz.jei.api.recipe.transfer.IRecipeTransferError; +import net.minecraft.ChatFormatting; +import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.screens.Screen; +import net.minecraft.network.chat.Component; +import net.minecraft.util.FormattedCharSequence; + +public class MissingItemRecipeTransferError implements IRecipeTransferError { + private static final Color COLOR = new Color(1.0f, 0.0f, 0.0f, 0.4f); + private static final List MISSING_MESSAGE = List.of( + Component.translatable("jei.tooltip.transfer").getVisualOrderText(), + Component.translatable("jei.tooltip.error.recipe.transfer.missing").withStyle(ChatFormatting.RED) + .getVisualOrderText() + ); + + private final List slotsWithMissingItems; + + public MissingItemRecipeTransferError(final List slotsWithMissingItems) { + this.slotsWithMissingItems = slotsWithMissingItems; + } + + @Override + public Type getType() { + return Type.COSMETIC; + } + + @Override + public int getButtonHighlightColor() { + return COLOR.getRGB(); + } + + @Override + public void showError(final PoseStack poseStack, + final int mouseX, + final int mouseY, + final IRecipeSlotsView recipeSlotsView, + final int recipeX, + final int recipeY) { + poseStack.pushPose(); + poseStack.translate(recipeX, recipeY, 0); + slotsWithMissingItems.forEach(slot -> slot.drawHighlight(poseStack, COLOR.getRGB())); + poseStack.popPose(); + final Screen screen = Minecraft.getInstance().screen; + if (screen != null) { + screen.renderTooltip(poseStack, MISSING_MESSAGE, mouseX, mouseY); + } + } +} diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/integration/recipemod/jei/RefinedStorageJeiModPlugin.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/integration/recipemod/jei/RefinedStorageJeiModPlugin.java new file mode 100644 index 000000000..5689b9bd0 --- /dev/null +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/integration/recipemod/jei/RefinedStorageJeiModPlugin.java @@ -0,0 +1,88 @@ +package com.refinedmods.refinedstorage2.platform.common.integration.recipemod.jei; + +import com.refinedmods.refinedstorage2.platform.api.PlatformApi; +import com.refinedmods.refinedstorage2.platform.api.integration.recipemod.IngredientConverter; +import com.refinedmods.refinedstorage2.platform.common.screen.AbstractBaseScreen; +import com.refinedmods.refinedstorage2.platform.common.screen.grid.AbstractGridScreen; + +import javax.annotation.Nullable; + +import mezz.jei.api.IModPlugin; +import mezz.jei.api.JeiPlugin; +import mezz.jei.api.constants.RecipeTypes; +import mezz.jei.api.helpers.IPlatformFluidHelper; +import mezz.jei.api.registration.IGuiHandlerRegistration; +import mezz.jei.api.registration.IRecipeTransferRegistration; +import mezz.jei.api.runtime.IJeiRuntime; +import net.minecraft.resources.ResourceLocation; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import static com.refinedmods.refinedstorage2.platform.common.util.IdentifierUtil.createIdentifier; + +@JeiPlugin +public class RefinedStorageJeiModPlugin implements IModPlugin { + private static final ResourceLocation ID = createIdentifier("plugin"); + private static final Logger LOGGER = LoggerFactory.getLogger(RefinedStorageJeiModPlugin.class); + @Nullable + private static IJeiRuntime runtime; + + @Override + public ResourceLocation getPluginUid() { + return ID; + } + + @Override + public void registerRecipeTransferHandlers(final IRecipeTransferRegistration registration) { + registration.addRecipeTransferHandler(new CraftingGridRecipeTransferHandler(), RecipeTypes.CRAFTING); + } + + @Override + public void onRuntimeAvailable(final IJeiRuntime newRuntime) { + if (runtime == null) { + initializePlatform(newRuntime.getJeiHelpers().getPlatformFluidHelper()); + } + RefinedStorageJeiModPlugin.runtime = newRuntime; + } + + @Override + public void registerGuiHandlers(final IGuiHandlerRegistration registration) { + final IngredientConverter converter = PlatformApi.INSTANCE.getIngredientConverter(); + registration.addGenericGuiContainerHandler( + AbstractBaseScreen.class, + new FilteredResourceGuiContainerHandler(converter, registration.getJeiHelpers().getIngredientManager()) + ); + registration.addGenericGuiContainerHandler( + AbstractGridScreen.class, + new GridGuiContainerHandler(converter, registration.getJeiHelpers().getIngredientManager()) + ); + } + + @Nullable + public static IJeiRuntime getRuntime() { + return runtime; + } + + private void initializePlatform(final IPlatformFluidHelper fluidHelper) { + LOGGER.info("Enabling JEI integration"); + registerIngredientConverters(fluidHelper); + registerGridSynchronizers(); + } + + private void registerGridSynchronizers() { + final JeiProxy jeiProxy = new JeiProxy(); + PlatformApi.INSTANCE.getGridSynchronizerRegistry().register( + createIdentifier("jei"), + new JeiGridSynchronizer(jeiProxy, false) + ); + PlatformApi.INSTANCE.getGridSynchronizerRegistry().register( + createIdentifier("jei_two_way"), + new JeiGridSynchronizer(jeiProxy, true) + ); + } + + private void registerIngredientConverters(final IPlatformFluidHelper fluidHelper) { + PlatformApi.INSTANCE.registerIngredientConverter(new GridResourceIngredientConverter(fluidHelper)); + PlatformApi.INSTANCE.registerIngredientConverter(new FilteredResourceIngredientConverter(fluidHelper)); + } +} diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/integration/recipemod/jei/package-info.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/integration/recipemod/jei/package-info.java new file mode 100644 index 000000000..ea15fc24a --- /dev/null +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/integration/recipemod/jei/package-info.java @@ -0,0 +1,7 @@ +@ParametersAreNonnullByDefault +@FieldsAndMethodsAreNonnullByDefault +package com.refinedmods.refinedstorage2.platform.common.integration.recipemod.jei; + +import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/integration/recipemod/package-info.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/integration/recipemod/package-info.java new file mode 100644 index 000000000..59e9f845a --- /dev/null +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/integration/recipemod/package-info.java @@ -0,0 +1,7 @@ +@ParametersAreNonnullByDefault +@FieldsAndMethodsAreNonnullByDefault +package com.refinedmods.refinedstorage2.platform.common.integration.recipemod; + +import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/grid/CraftingGridMatrixCloseBehavior.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/grid/CraftingGridMatrixCloseBehavior.java new file mode 100644 index 000000000..4ea51c0d9 --- /dev/null +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/grid/CraftingGridMatrixCloseBehavior.java @@ -0,0 +1,7 @@ +package com.refinedmods.refinedstorage2.platform.common.internal.grid; + +public enum CraftingGridMatrixCloseBehavior { + NONE, + CLEAR_TO_NETWORK, + CLEAR_TO_INVENTORY +} diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/grid/PlatformGridServiceFactoryImpl.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/grid/PlatformGridServiceFactoryImpl.java index ed8791053..193e11ce1 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/grid/PlatformGridServiceFactoryImpl.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/grid/PlatformGridServiceFactoryImpl.java @@ -28,7 +28,7 @@ public GridService create(final StorageChannelType storageChannelType, } @Override - @SuppressWarnings("deprecation") // forge deprecates stack insensitive getMaxStackSize + @SuppressWarnings({"deprecation", "RedundantSuppression"}) // forge deprecates stack insensitive getMaxStackSize public GridService createForItem(final Actor actor) { return create( StorageChannelTypes.ITEM, diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/grid/view/AbstractFluidGridResourceFactory.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/grid/view/AbstractFluidGridResourceFactory.java index e9cf65825..537d7fadb 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/grid/view/AbstractFluidGridResourceFactory.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/grid/view/AbstractFluidGridResourceFactory.java @@ -35,7 +35,7 @@ public Optional apply(final ResourceAmount resourceAmount) { )); } - @SuppressWarnings("deprecation") // forge deprecates Registry access + @SuppressWarnings({"deprecation", "RedundantSuppression"}) // forge deprecates Registry access private Set getTags(final Fluid fluid) { return BuiltInRegistries.FLUID.getResourceKey(fluid) .flatMap(BuiltInRegistries.FLUID::getHolder) @@ -45,7 +45,7 @@ private Set getTags(final Fluid fluid) { .collect(Collectors.toSet()); } - @SuppressWarnings("deprecation") // forge deprecates Registry access + @SuppressWarnings({"deprecation", "RedundantSuppression"}) // forge deprecates Registry access private String getModId(final FluidResource fluid) { return BuiltInRegistries.FLUID.getKey(fluid.fluid()).getNamespace(); } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/grid/view/AbstractGridResource.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/grid/view/AbstractGridResource.java index bb28d12e7..d790ab9f9 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/grid/view/AbstractGridResource.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/grid/view/AbstractGridResource.java @@ -25,9 +25,13 @@ protected AbstractGridResource(final ResourceAmount resourceAmount, this.attributes = attributes; } + public T getResource() { + return resourceAmount.getResource(); + } + @Override public Optional getTrackedResource(final GridView view) { - return view.getTrackedResource(resourceAmount.getResource()); + return view.getTrackedResource(getResource()); } @Override diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/grid/view/AbstractItemGridResourceFactory.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/grid/view/AbstractItemGridResourceFactory.java index 5c08e1314..1acf07e20 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/grid/view/AbstractItemGridResourceFactory.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/grid/view/AbstractItemGridResourceFactory.java @@ -43,13 +43,13 @@ public Optional apply(final ResourceAmount resourceAmount) { private String getTooltip(final ItemStack itemStack) { return itemStack - .getTooltipLines(null, TooltipFlag.Default.ADVANCED) + .getTooltipLines(null, TooltipFlag.ADVANCED) .stream() .map(Component::getString) .collect(Collectors.joining("\n")); } - @SuppressWarnings("deprecation") // forge deprecates Registry access + @SuppressWarnings({"deprecation", "RedundantSuppression"}) // forge deprecates Registry access private Set getTags(final Item item) { return BuiltInRegistries.ITEM.getResourceKey(item) .flatMap(BuiltInRegistries.ITEM::getHolder) diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/grid/view/CompositeGridResourceFactory.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/grid/view/CompositeGridResourceFactory.java index 17a6fbccc..7c2c7e23e 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/grid/view/CompositeGridResourceFactory.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/grid/view/CompositeGridResourceFactory.java @@ -1,20 +1,18 @@ package com.refinedmods.refinedstorage2.platform.common.internal.grid.view; -import com.refinedmods.refinedstorage2.api.core.registry.OrderedRegistry; import com.refinedmods.refinedstorage2.api.grid.view.GridResource; import com.refinedmods.refinedstorage2.api.grid.view.GridResourceFactory; import com.refinedmods.refinedstorage2.api.resource.ResourceAmount; +import com.refinedmods.refinedstorage2.platform.api.registry.PlatformRegistry; import com.refinedmods.refinedstorage2.platform.api.storage.channel.PlatformStorageChannelType; import java.util.Optional; -import net.minecraft.resources.ResourceLocation; - public class CompositeGridResourceFactory implements GridResourceFactory { - private final OrderedRegistry> storageChannelTypeRegistry; + private final PlatformRegistry> storageChannelTypeRegistry; public CompositeGridResourceFactory( - final OrderedRegistry> storageChannelTypeRegistry + final PlatformRegistry> storageChannelTypeRegistry ) { this.storageChannelTypeRegistry = storageChannelTypeRegistry; } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/grid/view/FluidGridResource.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/grid/view/FluidGridResource.java index ddf408260..f78f8ff7e 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/grid/view/FluidGridResource.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/grid/view/FluidGridResource.java @@ -22,7 +22,7 @@ public class FluidGridResource extends AbstractGridResource { private final FluidResource fluidResource; private final int id; - @SuppressWarnings("deprecation") // forge deprecates Registry access + @SuppressWarnings({"deprecation", "RedundantSuppression"}) // forge deprecates Registry access public FluidGridResource(final ResourceAmount resourceAmount, final String name, final String modId, @@ -74,12 +74,12 @@ public void render(final PoseStack poseStack, final int x, final int y) { @Override public String getDisplayedAmount() { - return Platform.INSTANCE.getBucketQuantityFormatter().formatWithUnits(getAmount()); + return Platform.INSTANCE.getBucketAmountFormatter().formatWithUnits(getAmount()); } @Override public String getAmountInTooltip() { - return Platform.INSTANCE.getBucketQuantityFormatter().format(getAmount()); + return Platform.INSTANCE.getBucketAmountFormatter().format(getAmount()); } @Override diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/grid/view/ItemGridResource.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/grid/view/ItemGridResource.java index 6d43760d9..070a58b96 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/grid/view/ItemGridResource.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/grid/view/ItemGridResource.java @@ -1,6 +1,5 @@ package com.refinedmods.refinedstorage2.platform.common.internal.grid.view; -import com.refinedmods.refinedstorage2.api.core.QuantityFormatter; import com.refinedmods.refinedstorage2.api.grid.service.GridExtractMode; import com.refinedmods.refinedstorage2.api.resource.ResourceAmount; import com.refinedmods.refinedstorage2.platform.api.grid.GridExtractionStrategy; @@ -8,6 +7,7 @@ import com.refinedmods.refinedstorage2.platform.api.grid.GridScrollMode; import com.refinedmods.refinedstorage2.platform.api.grid.GridScrollingStrategy; import com.refinedmods.refinedstorage2.platform.api.resource.ItemResource; +import com.refinedmods.refinedstorage2.platform.api.util.AmountFormatting; import com.refinedmods.refinedstorage2.platform.common.internal.storage.channel.StorageChannelTypes; import java.util.List; @@ -44,6 +44,10 @@ public ItemGridResource(final ResourceAmount resourceAmount, this.itemStack = itemStack; } + public ItemStack copyItemStack() { + return itemStack.copyWithCount(1); + } + @Override public int getRegistryId() { return id; @@ -81,12 +85,12 @@ public void render(final PoseStack poseStack, final int x, final int y) { @Override public String getDisplayedAmount() { - return QuantityFormatter.formatWithUnits(getAmount()); + return AmountFormatting.formatWithUnits(getAmount()); } @Override public String getAmountInTooltip() { - return QuantityFormatter.format(getAmount()); + return AmountFormatting.format(getAmount()); } @Override diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/item/StorageContainerHelperImpl.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/item/StorageContainerHelperImpl.java index 78278d1b1..6f88b224d 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/item/StorageContainerHelperImpl.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/item/StorageContainerHelperImpl.java @@ -94,19 +94,24 @@ public void appendToTooltip(final ItemStack stack, final StorageRepository storageRepository, final List tooltip, final TooltipFlag context, - final LongFunction quantityFormatter, - final LongFunction stackInfoQuantityFormatter, - final boolean showCapacityAndProgress, - final boolean showStackingInfo) { - getInfo(storageRepository, stack).ifPresent(info -> StorageTooltipHelper.appendToTooltip( - tooltip, - info.stored(), - info.capacity(), - quantityFormatter, - stackInfoQuantityFormatter, - showCapacityAndProgress, - showStackingInfo - )); + final LongFunction amountFormatter, + final boolean hasCapacity) { + getInfo(storageRepository, stack).ifPresent(info -> { + if (hasCapacity) { + StorageTooltipHelper.addAmountStoredWithCapacity( + tooltip, + info.stored(), + info.capacity(), + amountFormatter + ); + } else { + StorageTooltipHelper.addAmountStoredWithoutCapacity( + tooltip, + info.stored(), + amountFormatter + ); + } + }); if (context.isAdvanced()) { getId(stack).ifPresent(id -> { final MutableComponent idComponent = Component.literal(id.toString()).withStyle(ChatFormatting.GRAY); diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/network/LevelConnectionProvider.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/network/LevelConnectionProvider.java index 3e7e8bb11..028b9f7df 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/network/LevelConnectionProvider.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/network/LevelConnectionProvider.java @@ -100,7 +100,7 @@ private Set findConnectionsAt(final AbstractNetworkNodeCon } final BlockPos offsetPos = container.getBlockPos().relative(direction); if (getBlockEntity(offsetPos) instanceof AbstractNetworkNodeContainerBlockEntity neighborContainer - && neighborContainer.canAcceptIncomingConnection(direction)) { + && neighborContainer.canAcceptIncomingConnection(direction, container.getBlockState())) { containers.add(neighborContainer); } } diff --git a/refinedstorage2-core-api/src/main/java/com/refinedmods/refinedstorage2/api/core/registry/OrderedRegistryImpl.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/registry/PlatformRegistryImpl.java similarity index 74% rename from refinedstorage2-core-api/src/main/java/com/refinedmods/refinedstorage2/api/core/registry/OrderedRegistryImpl.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/registry/PlatformRegistryImpl.java index 40ffb5dde..9eca49ad0 100644 --- a/refinedstorage2-core-api/src/main/java/com/refinedmods/refinedstorage2/api/core/registry/OrderedRegistryImpl.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/registry/PlatformRegistryImpl.java @@ -1,6 +1,7 @@ -package com.refinedmods.refinedstorage2.api.core.registry; +package com.refinedmods.refinedstorage2.platform.common.internal.registry; import com.refinedmods.refinedstorage2.api.core.CoreValidations; +import com.refinedmods.refinedstorage2.platform.api.registry.PlatformRegistry; import java.util.ArrayList; import java.util.HashMap; @@ -9,25 +10,24 @@ import java.util.Optional; import javax.annotation.Nullable; -import org.apiguardian.api.API; +import net.minecraft.resources.ResourceLocation; -@API(status = API.Status.STABLE, since = "2.0.0-milestone.2.0") -public class OrderedRegistryImpl implements OrderedRegistry { +public class PlatformRegistryImpl implements PlatformRegistry { private static final String VALUE_NOT_PRESENT_ERROR = "Value must be present"; private static final String ID_NOT_PRESENT_ERROR = "ID must be present"; - private final Map idToValueMap = new HashMap<>(); - private final Map valueToIdMap = new HashMap<>(); + private final Map idToValueMap = new HashMap<>(); + private final Map valueToIdMap = new HashMap<>(); private final List order = new ArrayList<>(); private final T defaultValue; - public OrderedRegistryImpl(final I defaultValueId, final T defaultValue) { + public PlatformRegistryImpl(final ResourceLocation defaultValueId, final T defaultValue) { this.register(defaultValueId, defaultValue); this.defaultValue = defaultValue; } @Override - public void register(final I id, final T value) { + public void register(final ResourceLocation id, final T value) { CoreValidations.validateNotNull(id, ID_NOT_PRESENT_ERROR); CoreValidations.validateNotNull(value, VALUE_NOT_PRESENT_ERROR); if (idToValueMap.containsKey(id) || order.contains(value)) { @@ -44,13 +44,13 @@ public boolean isEmpty() { } @Override - public Optional getId(final T value) { + public Optional getId(final T value) { CoreValidations.validateNotNull(value, VALUE_NOT_PRESENT_ERROR); return Optional.ofNullable(valueToIdMap.get(value)); } @Override - public Optional get(final I id) { + public Optional get(final ResourceLocation id) { CoreValidations.validateNotNull(id, ID_NOT_PRESENT_ERROR); return Optional.ofNullable(idToValueMap.get(id)); } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/registry/package-info.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/registry/package-info.java new file mode 100644 index 000000000..f2a37e56b --- /dev/null +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/registry/package-info.java @@ -0,0 +1,7 @@ +@ParametersAreNonnullByDefault +@FieldsAndMethodsAreNonnullByDefault +package com.refinedmods.refinedstorage2.platform.common.internal.registry; + +import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/resource/filter/fluid/FluidFilteredResource.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/resource/filter/fluid/FluidFilteredResource.java index 7e5cb9f80..6e7ecba22 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/resource/filter/fluid/FluidFilteredResource.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/resource/filter/fluid/FluidFilteredResource.java @@ -39,7 +39,7 @@ public long getMaxAmount() { @Override public String getDisplayedAmount() { - return Platform.INSTANCE.getBucketQuantityFormatter().formatWithUnits(amount); + return Platform.INSTANCE.getBucketAmountFormatter().formatWithUnits(amount); } @Override diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/resource/filter/item/ItemFilteredResource.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/resource/filter/item/ItemFilteredResource.java index e2ce51d5f..f20567c7a 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/resource/filter/item/ItemFilteredResource.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/resource/filter/item/ItemFilteredResource.java @@ -1,9 +1,9 @@ package com.refinedmods.refinedstorage2.platform.common.internal.resource.filter.item; -import com.refinedmods.refinedstorage2.api.core.QuantityFormatter; import com.refinedmods.refinedstorage2.platform.api.resource.ItemResource; import com.refinedmods.refinedstorage2.platform.api.resource.filter.FilteredResource; import com.refinedmods.refinedstorage2.platform.api.storage.channel.PlatformStorageChannelType; +import com.refinedmods.refinedstorage2.platform.api.util.AmountFormatting; import com.refinedmods.refinedstorage2.platform.common.internal.storage.channel.StorageChannelTypes; import java.util.List; @@ -44,7 +44,7 @@ public String getDisplayedAmount() { if (amount == 1) { return ""; } - return QuantityFormatter.formatWithUnits(amount); + return AmountFormatting.formatWithUnits(amount); } @Override diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/storage/StorageRepositoryImpl.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/storage/StorageRepositoryImpl.java index b1dbd1970..fb890bb37 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/storage/StorageRepositoryImpl.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/storage/StorageRepositoryImpl.java @@ -1,9 +1,9 @@ package com.refinedmods.refinedstorage2.platform.common.internal.storage; import com.refinedmods.refinedstorage2.api.core.CoreValidations; -import com.refinedmods.refinedstorage2.api.core.registry.OrderedRegistry; import com.refinedmods.refinedstorage2.api.storage.Storage; import com.refinedmods.refinedstorage2.api.storage.StorageInfo; +import com.refinedmods.refinedstorage2.platform.api.registry.PlatformRegistry; import com.refinedmods.refinedstorage2.platform.api.storage.SerializableStorage; import com.refinedmods.refinedstorage2.platform.api.storage.StorageRepository; import com.refinedmods.refinedstorage2.platform.api.storage.type.StorageType; @@ -32,9 +32,9 @@ public class StorageRepositoryImpl extends SavedData implements StorageRepositor private static final String TAG_STORAGE_DATA = "data"; private final Map> entries = new HashMap<>(); - private final OrderedRegistry> storageTypeRegistry; + private final PlatformRegistry> storageTypeRegistry; - public StorageRepositoryImpl(final OrderedRegistry> storageTypeRegistry) { + public StorageRepositoryImpl(final PlatformRegistry> storageTypeRegistry) { this.storageTypeRegistry = storageTypeRegistry; } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/storage/StorageTooltipHelper.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/storage/StorageTooltipHelper.java index 4fec34b17..6caacf508 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/storage/StorageTooltipHelper.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/storage/StorageTooltipHelper.java @@ -12,85 +12,31 @@ public final class StorageTooltipHelper { private StorageTooltipHelper() { } - public static void appendToTooltip(final List tooltip, - final long stored, - final long capacity, - final LongFunction quantityFormatter, - final LongFunction stackInfoQuantityFormatter, - final boolean showCapacityAndProgress, - final boolean showStackingInfo) { - if (!showCapacityAndProgress) { - addAmountStoredWithoutCapacity(tooltip, stored, quantityFormatter); - } else { - addAmountStoredWithCapacity(tooltip, stored, capacity, quantityFormatter); - } - if (showStackingInfo) { - if (!showCapacityAndProgress) { - addAmountOfStacksWithoutCapacity(tooltip, stackInfoQuantityFormatter, stored); - } else { - addAmountOfStacksWithCapacity(tooltip, stackInfoQuantityFormatter, stored, capacity); - } - } - if (showCapacityAndProgress) { - addProgress(tooltip, stored, capacity); - } - } - - private static void addAmountStoredWithoutCapacity(final List tooltip, - final long stored, - final LongFunction quantityFormatter) { + public static void addAmountStoredWithoutCapacity(final List tooltip, + final long stored, + final LongFunction quantityFormatter) { tooltip.add(PlatformApi.INSTANCE.createTranslation( "misc", "stored", - Component.literal(quantityFormatter.apply(stored)).withStyle(ChatFormatting.GREEN) + Component.literal(quantityFormatter.apply(stored)).withStyle(ChatFormatting.WHITE) ).withStyle(ChatFormatting.GRAY)); } - private static void addAmountStoredWithCapacity(final List tooltip, - final long stored, - final long capacity, - final LongFunction quantityFormatter) { + public static void addAmountStoredWithCapacity(final List tooltip, + final long stored, + final long capacity, + final LongFunction quantityFormatter) { + if (capacity <= 0) { + addAmountStoredWithoutCapacity(tooltip, stored, quantityFormatter); + return; + } + final int progress = (int) ((double) stored / capacity * 100D); tooltip.add(PlatformApi.INSTANCE.createTranslation( "misc", "stored_with_capacity", - Component.literal(quantityFormatter.apply(stored)).withStyle(ChatFormatting.GREEN), - Component.literal(quantityFormatter.apply(capacity)).withStyle(ChatFormatting.BLUE) - ).withStyle(ChatFormatting.GRAY)); - } - - private static void addAmountOfStacksWithoutCapacity(final List tooltip, - final LongFunction quantityFormatter, - final long stored) { - final long stacks = stored / 64L; - tooltip.add(PlatformApi.INSTANCE.createTranslation( - "misc", - "stacks", - Component.literal(quantityFormatter.apply(stacks)).withStyle(ChatFormatting.GREEN) - ).withStyle(ChatFormatting.GRAY)); - } - - private static void addAmountOfStacksWithCapacity(final List tooltip, - final LongFunction quantityFormatter, - final long stored, - final long capacity) { - final long stacks = stored / 64L; - final long maxStacks = capacity / 64L; - tooltip.add(PlatformApi.INSTANCE.createTranslation( - "misc", - "stacks_with_capacity", - Component.literal(quantityFormatter.apply(stacks)).withStyle(ChatFormatting.GREEN), - Component.literal(quantityFormatter.apply(maxStacks)).withStyle(ChatFormatting.BLUE) - ).withStyle(ChatFormatting.GRAY)); - } - - private static void addProgress(final List tooltip, - final double stored, - final double capacity) { - final double progress = stored / capacity; - tooltip.add(PlatformApi.INSTANCE.createTranslation( - "misc", - "full", - Component.literal("" + (int) (progress * 100D)).withStyle(ChatFormatting.AQUA) + Component.literal(quantityFormatter.apply(stored)).withStyle(ChatFormatting.WHITE), + Component.literal(quantityFormatter.apply(capacity)).withStyle(ChatFormatting.WHITE), + Component.literal("" + progress) ).withStyle(ChatFormatting.GRAY)); } } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/FluidStorageDiskItem.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/FluidStorageDiskItem.java index 69c0a767b..320d8edb6 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/FluidStorageDiskItem.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/FluidStorageDiskItem.java @@ -17,14 +17,10 @@ import com.refinedmods.refinedstorage2.platform.common.internal.storage.channel.StorageChannelTypes; import com.refinedmods.refinedstorage2.platform.common.internal.storage.type.FluidStorageType; -import java.util.List; import javax.annotation.Nullable; -import net.minecraft.network.chat.Component; import net.minecraft.world.item.Item; import net.minecraft.world.item.ItemStack; -import net.minecraft.world.item.TooltipFlag; -import net.minecraft.world.level.Level; public class FluidStorageDiskItem extends AbstractStorageContainerItem { private final FluidStorageType.Variant variant; @@ -39,31 +35,13 @@ public FluidStorageDiskItem(final FluidStorageType.Variant variant) { } @Override - public void appendHoverText(final ItemStack stack, - @Nullable final Level level, - final List tooltip, - final TooltipFlag context) { - super.appendHoverText(stack, level, tooltip, context); - if (level == null) { - return; - } - final StorageRepository storageRepository = PlatformApi.INSTANCE.getStorageRepository(level); - final boolean showCapacityAndProgress = variant != FluidStorageType.Variant.CREATIVE; - helper.appendToTooltip( - stack, - storageRepository, - tooltip, - context, - Platform.INSTANCE.getBucketQuantityFormatter()::formatWithUnits, - Platform.INSTANCE.getBucketQuantityFormatter()::format, - showCapacityAndProgress, - false - ); + protected boolean hasCapacity() { + return variant.hasCapacity(); } @Override - public boolean hasStacking() { - return false; + protected String formatAmount(final long amount) { + return Platform.INSTANCE.getBucketAmountFormatter().format(amount); } @Override diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/ItemStorageDiskItem.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/ItemStorageDiskItem.java index c27ff11c6..658df67bd 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/ItemStorageDiskItem.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/ItemStorageDiskItem.java @@ -1,6 +1,5 @@ package com.refinedmods.refinedstorage2.platform.common.item; -import com.refinedmods.refinedstorage2.api.core.QuantityFormatter; import com.refinedmods.refinedstorage2.api.storage.InMemoryStorageImpl; import com.refinedmods.refinedstorage2.api.storage.Storage; import com.refinedmods.refinedstorage2.api.storage.limited.LimitedStorageImpl; @@ -11,20 +10,17 @@ import com.refinedmods.refinedstorage2.platform.api.item.AbstractStorageContainerItem; import com.refinedmods.refinedstorage2.platform.api.resource.ItemResource; import com.refinedmods.refinedstorage2.platform.api.storage.StorageRepository; +import com.refinedmods.refinedstorage2.platform.api.util.AmountFormatting; import com.refinedmods.refinedstorage2.platform.common.content.Items; import com.refinedmods.refinedstorage2.platform.common.internal.storage.LimitedPlatformStorage; import com.refinedmods.refinedstorage2.platform.common.internal.storage.PlatformStorage; import com.refinedmods.refinedstorage2.platform.common.internal.storage.channel.StorageChannelTypes; import com.refinedmods.refinedstorage2.platform.common.internal.storage.type.ItemStorageType; -import java.util.List; import javax.annotation.Nullable; -import net.minecraft.network.chat.Component; import net.minecraft.world.item.Item; import net.minecraft.world.item.ItemStack; -import net.minecraft.world.item.TooltipFlag; -import net.minecraft.world.level.Level; public class ItemStorageDiskItem extends AbstractStorageContainerItem { private final ItemStorageType.Variant variant; @@ -39,31 +35,13 @@ public ItemStorageDiskItem(final ItemStorageType.Variant variant) { } @Override - public void appendHoverText(final ItemStack stack, - @Nullable final Level level, - final List tooltip, - final TooltipFlag context) { - super.appendHoverText(stack, level, tooltip, context); - if (level == null) { - return; - } - final StorageRepository storageRepository = PlatformApi.INSTANCE.getStorageRepository(level); - final boolean showCapacityAndProgress = variant != ItemStorageType.Variant.CREATIVE; - helper.appendToTooltip( - stack, - storageRepository, - tooltip, - context, - QuantityFormatter::formatWithUnits, - QuantityFormatter::format, - showCapacityAndProgress, - true - ); + protected boolean hasCapacity() { + return variant.hasCapacity(); } @Override - public boolean hasStacking() { - return true; + protected String formatAmount(final long amount) { + return AmountFormatting.format(amount); } @Override diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/block/CableBlockItem.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/block/CableBlockItem.java new file mode 100644 index 000000000..7c0cd2343 --- /dev/null +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/block/CableBlockItem.java @@ -0,0 +1,10 @@ +package com.refinedmods.refinedstorage2.platform.common.item.block; + +import net.minecraft.network.chat.Component; +import net.minecraft.world.level.block.Block; + +public class CableBlockItem extends NamedBlockItem { + public CableBlockItem(final Block block, final Component name) { + super(block, new Properties(), name); + } +} diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/block/ControllerBlockItem.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/block/ControllerBlockItem.java index d262d408a..1d3968fda 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/block/ControllerBlockItem.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/block/ControllerBlockItem.java @@ -1,6 +1,6 @@ package com.refinedmods.refinedstorage2.platform.common.item.block; -import com.refinedmods.refinedstorage2.api.core.QuantityFormatter; +import com.refinedmods.refinedstorage2.platform.api.util.AmountFormatting; import com.refinedmods.refinedstorage2.platform.common.block.entity.ControllerBlockEntity; import java.util.List; @@ -64,8 +64,8 @@ public void appendHoverText(final ItemStack stack, tooltip.add(createTranslation( "misc", "stored_with_capacity", - QuantityFormatter.format(stored), - QuantityFormatter.format(capacity) + AmountFormatting.format(stored), + AmountFormatting.format(capacity) ).withStyle(ChatFormatting.GRAY)); } } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/block/CreativeControllerBlockItem.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/block/CreativeControllerBlockItem.java index 8d3743868..d1675e781 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/block/CreativeControllerBlockItem.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/block/CreativeControllerBlockItem.java @@ -4,7 +4,7 @@ import net.minecraft.world.item.Item; import net.minecraft.world.level.block.Block; -public class CreativeControllerBlockItem extends AbstractNamedBlockItem { +public class CreativeControllerBlockItem extends NamedBlockItem { public CreativeControllerBlockItem(final Block block, final Component name) { super(block, new Item.Properties().stacksTo(1), name); } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/block/FluidStorageBlockBlockItem.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/block/FluidStorageBlockBlockItem.java index eb899bade..ed5683cec 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/block/FluidStorageBlockBlockItem.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/block/FluidStorageBlockBlockItem.java @@ -2,23 +2,18 @@ import com.refinedmods.refinedstorage2.platform.api.PlatformApi; import com.refinedmods.refinedstorage2.platform.api.item.block.AbstractStorageContainerBlockItem; -import com.refinedmods.refinedstorage2.platform.api.storage.StorageRepository; import com.refinedmods.refinedstorage2.platform.common.Platform; import com.refinedmods.refinedstorage2.platform.common.block.entity.storage.AbstractStorageBlockBlockEntity; import com.refinedmods.refinedstorage2.platform.common.content.Blocks; import com.refinedmods.refinedstorage2.platform.common.content.Items; import com.refinedmods.refinedstorage2.platform.common.internal.storage.type.FluidStorageType; -import java.util.List; import java.util.UUID; import javax.annotation.Nullable; import net.minecraft.core.BlockPos; -import net.minecraft.network.chat.Component; 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 net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.entity.BlockEntity; import org.slf4j.Logger; @@ -39,26 +34,13 @@ public FluidStorageBlockBlockItem(final Block block, final FluidStorageType.Vari } @Override - public void appendHoverText(final ItemStack stack, - @Nullable final Level level, - final List tooltip, - final TooltipFlag context) { - super.appendHoverText(stack, level, tooltip, context); - if (level == null) { - return; - } - final StorageRepository storageRepository = PlatformApi.INSTANCE.getStorageRepository(level); - final boolean showCapacityAndProgress = variant != FluidStorageType.Variant.CREATIVE; - helper.appendToTooltip( - stack, - storageRepository, - tooltip, - context, - Platform.INSTANCE.getBucketQuantityFormatter()::formatWithUnits, - Platform.INSTANCE.getBucketQuantityFormatter()::format, - showCapacityAndProgress, - false - ); + protected boolean hasCapacity() { + return variant.hasCapacity(); + } + + @Override + protected String formatAmount(final long amount) { + return Platform.INSTANCE.getBucketAmountFormatter().format(amount); } @Override @@ -80,7 +62,7 @@ protected void updateBlockEntityWithStorageId(final BlockPos pos, @Nullable final BlockEntity blockEntity, final UUID id) { if (blockEntity instanceof AbstractStorageBlockBlockEntity storageBlockEntity) { - LOGGER.info("Transferred storage {} to block at {}", id, pos); + LOGGER.debug("Transferred storage {} to block at {}", id, pos); storageBlockEntity.modifyStorageIdAfterAlreadyInitialized(id); } else { LOGGER.warn("Storage {} could not be set, block entity does not exist yet at {}", id, pos); diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/block/GridBlockItem.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/block/GridBlockItem.java deleted file mode 100644 index 652532be9..000000000 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/block/GridBlockItem.java +++ /dev/null @@ -1,11 +0,0 @@ -package com.refinedmods.refinedstorage2.platform.common.item.block; - -import net.minecraft.network.chat.Component; -import net.minecraft.world.item.Item; -import net.minecraft.world.level.block.Block; - -public class GridBlockItem extends AbstractNamedBlockItem { - public GridBlockItem(final Block block, final Component name) { - super(block, new Item.Properties(), name); - } -} diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/block/ItemStorageBlockBlockItem.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/block/ItemStorageBlockBlockItem.java index 185ac5764..3622ded74 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/block/ItemStorageBlockBlockItem.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/block/ItemStorageBlockBlockItem.java @@ -1,24 +1,19 @@ package com.refinedmods.refinedstorage2.platform.common.item.block; -import com.refinedmods.refinedstorage2.api.core.QuantityFormatter; import com.refinedmods.refinedstorage2.platform.api.PlatformApi; import com.refinedmods.refinedstorage2.platform.api.item.block.AbstractStorageContainerBlockItem; -import com.refinedmods.refinedstorage2.platform.api.storage.StorageRepository; +import com.refinedmods.refinedstorage2.platform.api.util.AmountFormatting; import com.refinedmods.refinedstorage2.platform.common.block.entity.storage.AbstractStorageBlockBlockEntity; import com.refinedmods.refinedstorage2.platform.common.content.Blocks; import com.refinedmods.refinedstorage2.platform.common.content.Items; import com.refinedmods.refinedstorage2.platform.common.internal.storage.type.ItemStorageType; -import java.util.List; import java.util.UUID; import javax.annotation.Nullable; import net.minecraft.core.BlockPos; -import net.minecraft.network.chat.Component; 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 net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.entity.BlockEntity; import org.slf4j.Logger; @@ -39,26 +34,13 @@ public ItemStorageBlockBlockItem(final Block block, final ItemStorageType.Varian } @Override - public void appendHoverText(final ItemStack stack, - @Nullable final Level level, - final List tooltip, - final TooltipFlag context) { - super.appendHoverText(stack, level, tooltip, context); - if (level == null) { - return; - } - final StorageRepository storageRepository = PlatformApi.INSTANCE.getStorageRepository(level); - final boolean showCapacityAndProgress = variant != ItemStorageType.Variant.CREATIVE; - helper.appendToTooltip( - stack, - storageRepository, - tooltip, - context, - QuantityFormatter::formatWithUnits, - QuantityFormatter::format, - showCapacityAndProgress, - true - ); + protected boolean hasCapacity() { + return variant.hasCapacity(); + } + + @Override + protected String formatAmount(final long amount) { + return AmountFormatting.format(amount); } @Override @@ -80,7 +62,7 @@ protected void updateBlockEntityWithStorageId(final BlockPos pos, @Nullable final BlockEntity blockEntity, final UUID id) { if (blockEntity instanceof AbstractStorageBlockBlockEntity storageBlockEntity) { - LOGGER.info("Transferred storage {} to block at {}", id, pos); + LOGGER.debug("Transferred storage {} to block at {}", id, pos); storageBlockEntity.modifyStorageIdAfterAlreadyInitialized(id); } else { LOGGER.warn("Storage {} could not be set, block entity does not exist yet at {}", id, pos); diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/block/AbstractNamedBlockItem.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/block/NamedBlockItem.java similarity index 75% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/block/AbstractNamedBlockItem.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/block/NamedBlockItem.java index 6c9f43e44..7ceb4760e 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/block/AbstractNamedBlockItem.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/block/NamedBlockItem.java @@ -5,10 +5,10 @@ import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.block.Block; -public abstract class AbstractNamedBlockItem extends BlockItem { +public class NamedBlockItem extends BlockItem { private final Component name; - protected AbstractNamedBlockItem(final Block block, final Properties properties, final Component name) { + public NamedBlockItem(final Block block, final Properties properties, final Component name) { super(block, properties); this.name = name; } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/packet/ClientToServerCommunications.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/packet/ClientToServerCommunications.java index d185e2353..7afdd5a2e 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/packet/ClientToServerCommunications.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/packet/ClientToServerCommunications.java @@ -3,9 +3,11 @@ import com.refinedmods.refinedstorage2.api.grid.service.GridExtractMode; import com.refinedmods.refinedstorage2.api.grid.service.GridInsertMode; import com.refinedmods.refinedstorage2.platform.api.grid.GridScrollMode; +import com.refinedmods.refinedstorage2.platform.api.resource.ItemResource; import com.refinedmods.refinedstorage2.platform.api.storage.channel.PlatformStorageChannelType; import com.refinedmods.refinedstorage2.platform.common.containermenu.property.PropertyType; +import java.util.List; import java.util.UUID; public interface ClientToServerCommunications { @@ -21,6 +23,10 @@ void sendGridScroll(PlatformStorageChannelType storageChannelType, void sendGridInsert(GridInsertMode mode, boolean tryAlternatives); + void sendCraftingGridClear(boolean toPlayerInventory); + + void sendCraftingGridRecipeTransfer(List> recipe); + void sendPropertyChange(PropertyType type, T value); void sendStorageInfoRequest(UUID storageId); diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/AbstractBaseScreen.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/AbstractBaseScreen.java index 6c3b0aafd..e8f4c5ddf 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/AbstractBaseScreen.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/AbstractBaseScreen.java @@ -1,13 +1,18 @@ package com.refinedmods.refinedstorage2.platform.common.screen; +import com.refinedmods.refinedstorage2.platform.api.PlatformApi; import com.refinedmods.refinedstorage2.platform.api.resource.filter.FilteredResource; +import com.refinedmods.refinedstorage2.platform.api.upgrade.ApplicableUpgrade; import com.refinedmods.refinedstorage2.platform.common.containermenu.AbstractResourceFilterContainerMenu; import com.refinedmods.refinedstorage2.platform.common.containermenu.slot.ResourceFilterSlot; +import com.refinedmods.refinedstorage2.platform.common.containermenu.slot.UpgradeSlot; import com.refinedmods.refinedstorage2.platform.common.screen.amount.ResourceAmountScreen; import com.refinedmods.refinedstorage2.platform.common.screen.widget.AbstractSideButtonWidget; +import java.util.ArrayList; import java.util.List; import java.util.Objects; +import javax.annotation.Nullable; import com.mojang.blaze3d.systems.RenderSystem; import com.mojang.blaze3d.vertex.PoseStack; @@ -15,10 +20,13 @@ import net.minecraft.client.gui.screens.inventory.AbstractContainerScreen; import net.minecraft.client.renderer.GameRenderer; import net.minecraft.network.chat.Component; +import net.minecraft.network.chat.MutableComponent; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.entity.player.Inventory; import net.minecraft.world.inventory.AbstractContainerMenu; import net.minecraft.world.inventory.Slot; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.ItemStack; public abstract class AbstractBaseScreen extends AbstractContainerScreen { private final Inventory playerInventory; @@ -155,17 +163,36 @@ protected final void setScissor(final int x, final int y, final int w, final int @Override protected void renderTooltip(final PoseStack poseStack, final int x, final int y) { - super.renderTooltip(poseStack, x, y); - if (minecraft != null - && menu.getCarried().isEmpty() - && hoveredSlot instanceof ResourceFilterSlot resourceFilterSlot) { + if (menu.getCarried().isEmpty() && hoveredSlot instanceof ResourceFilterSlot resourceFilterSlot) { final List lines = resourceFilterSlot.getTooltip(); if (!lines.isEmpty()) { - this.renderComponentTooltip(poseStack, lines, x, y); + renderComponentTooltip(poseStack, lines, x, y); } + } else if (menu.getCarried().isEmpty() + && hoveredSlot instanceof UpgradeSlot upgradeSlot + && !hoveredSlot.hasItem()) { + final List lines = getUpgradeSlotTooltip(upgradeSlot); + renderComponentTooltip(poseStack, lines, x, y); + } else { + super.renderTooltip(poseStack, x, y); } } + private List getUpgradeSlotTooltip(final UpgradeSlot upgradeSlot) { + final List lines = new ArrayList<>(); + lines.add(PlatformApi.INSTANCE.createTranslation( + "gui", + "applicable_upgrades" + ).withStyle(ChatFormatting.WHITE)); + for (final ApplicableUpgrade applicableUpgrade : upgradeSlot.getApplicableUpgrades()) { + final Item upgradeItem = applicableUpgrade.itemSupplier().get(); + final MutableComponent name = upgradeItem.getName(new ItemStack(upgradeItem)).copy(); + final MutableComponent amount = Component.literal("(" + applicableUpgrade.maxAmount() + ")"); + lines.add(name.append(" ").append(amount).withStyle(ChatFormatting.GRAY)); + } + return lines; + } + @Override public boolean mouseClicked(final double mouseX, final double mouseY, final int clickedButton) { if (hoveredSlot instanceof ResourceFilterSlot @@ -191,4 +218,11 @@ protected boolean tryOpenResourceFilterAmountScreen(final Slot slot) { } return canChangeAmount; } + + @Nullable + public FilteredResource getFilteredResource() { + return hoveredSlot instanceof ResourceFilterSlot resourceFilterSlot + ? resourceFilterSlot.getFilteredResource() + : null; + } } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/AbstractStorageScreen.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/AbstractStorageScreen.java index b14193bd8..438dc6d77 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/AbstractStorageScreen.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/AbstractStorageScreen.java @@ -1,6 +1,6 @@ package com.refinedmods.refinedstorage2.platform.common.screen; -import com.refinedmods.refinedstorage2.api.core.QuantityFormatter; +import com.refinedmods.refinedstorage2.platform.api.util.AmountFormatting; import com.refinedmods.refinedstorage2.platform.common.containermenu.AbstractBaseContainerMenu; import com.refinedmods.refinedstorage2.platform.common.containermenu.property.PropertyTypes; import com.refinedmods.refinedstorage2.platform.common.containermenu.storage.StorageAccessor; @@ -77,20 +77,21 @@ protected void init() { private List createTooltip() { final List tooltip = new ArrayList<>(); - StorageTooltipHelper.appendToTooltip( - tooltip, - menu.getStored(), - menu.getCapacity(), - this::formatQuantity, - QuantityFormatter::format, - menu.showCapacityAndProgress(), - menu.showStackingInfo() - ); + if (menu.hasCapacity()) { + StorageTooltipHelper.addAmountStoredWithCapacity( + tooltip, + menu.getStored(), + menu.getCapacity(), + this::formatQuantity + ); + } else { + StorageTooltipHelper.addAmountStoredWithoutCapacity(tooltip, menu.getStored(), this::formatQuantity); + } return tooltip; } protected String formatQuantity(final long qty) { - return QuantityFormatter.format(qty); + return AmountFormatting.format(qty); } @Override diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/ControllerScreen.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/ControllerScreen.java index d6ab6fa3f..9b378d584 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/ControllerScreen.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/ControllerScreen.java @@ -1,6 +1,6 @@ package com.refinedmods.refinedstorage2.platform.common.screen; -import com.refinedmods.refinedstorage2.api.core.QuantityFormatter; +import com.refinedmods.refinedstorage2.platform.api.util.AmountFormatting; import com.refinedmods.refinedstorage2.platform.common.containermenu.ControllerContainerMenu; import com.refinedmods.refinedstorage2.platform.common.containermenu.property.PropertyTypes; import com.refinedmods.refinedstorage2.platform.common.screen.widget.ProgressWidget; @@ -63,8 +63,8 @@ private List createTooltip() { return Collections.singletonList(createTranslation( "misc", "stored_with_capacity", - QuantityFormatter.format(getMenu().getStored()), - QuantityFormatter.format(getMenu().getCapacity()) + AmountFormatting.format(getMenu().getStored()), + AmountFormatting.format(getMenu().getCapacity()) )); } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/FluidStorageBlockScreen.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/FluidStorageBlockScreen.java index 013199eca..0051eb51b 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/FluidStorageBlockScreen.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/FluidStorageBlockScreen.java @@ -15,6 +15,6 @@ public FluidStorageBlockScreen(final AbstractStorageBlockContainerMenu menu, @Override protected String formatQuantity(final long qty) { - return Platform.INSTANCE.getBucketQuantityFormatter().format(qty); + return Platform.INSTANCE.getBucketAmountFormatter().format(qty); } } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/grid/AbstractGridScreen.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/grid/AbstractGridScreen.java new file mode 100644 index 000000000..81088fdc8 --- /dev/null +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/grid/AbstractGridScreen.java @@ -0,0 +1,599 @@ +package com.refinedmods.refinedstorage2.platform.common.screen.grid; + +import com.refinedmods.refinedstorage2.api.grid.service.GridExtractMode; +import com.refinedmods.refinedstorage2.api.grid.service.GridInsertMode; +import com.refinedmods.refinedstorage2.api.grid.view.GridResource; +import com.refinedmods.refinedstorage2.api.grid.view.GridView; +import com.refinedmods.refinedstorage2.api.storage.tracked.TrackedResource; +import com.refinedmods.refinedstorage2.platform.api.PlatformApi; +import com.refinedmods.refinedstorage2.platform.api.grid.GridScrollMode; +import com.refinedmods.refinedstorage2.platform.api.grid.GridSynchronizer; +import com.refinedmods.refinedstorage2.platform.api.grid.PlatformGridResource; +import com.refinedmods.refinedstorage2.platform.api.registry.PlatformRegistry; +import com.refinedmods.refinedstorage2.platform.api.resource.ItemResource; +import com.refinedmods.refinedstorage2.platform.common.Platform; +import com.refinedmods.refinedstorage2.platform.common.containermenu.grid.AbstractGridContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.containermenu.property.PropertyTypes; +import com.refinedmods.refinedstorage2.platform.common.internal.storage.channel.StorageChannelTypes; +import com.refinedmods.refinedstorage2.platform.common.screen.AbstractBaseScreen; +import com.refinedmods.refinedstorage2.platform.common.screen.SmallTextTooltipRenderer; +import com.refinedmods.refinedstorage2.platform.common.screen.widget.History; +import com.refinedmods.refinedstorage2.platform.common.screen.widget.RedstoneModeSideButtonWidget; +import com.refinedmods.refinedstorage2.platform.common.screen.widget.ScrollbarWidget; +import com.refinedmods.refinedstorage2.query.lexer.SyntaxHighlighter; +import com.refinedmods.refinedstorage2.query.lexer.SyntaxHighlighterColors; + +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import javax.annotation.Nullable; + +import com.mojang.blaze3d.systems.RenderSystem; +import com.mojang.blaze3d.vertex.PoseStack; +import net.minecraft.ChatFormatting; +import net.minecraft.network.chat.Component; +import net.minecraft.network.chat.MutableComponent; +import net.minecraft.util.FormattedCharSequence; +import net.minecraft.world.entity.player.Inventory; +import net.minecraft.world.inventory.Slot; +import net.minecraft.world.item.ItemStack; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import static com.refinedmods.refinedstorage2.platform.common.util.IdentifierUtil.createTranslation; + +public abstract class AbstractGridScreen extends AbstractBaseScreen { + private static final Logger LOGGER = LoggerFactory.getLogger(AbstractGridScreen.class); + + private static final int MODIFIED_JUST_NOW_MAX_SECONDS = 10; + + private static final int TOP_HEIGHT = 19; + private static final int INVENTORY_INCLUDING_TITLE_HEIGHT = 99; + private static final int COLUMNS = 9; + private static final int MIN_ROWS = 3; + + private static final int DISABLED_SLOT_COLOR = 0xFF5B5B5B; + private static final int SELECTION_SLOT_COLOR = -2130706433; + + private static final List SEARCH_FIELD_HISTORY = new ArrayList<>(); + + protected final int bottomHeight; + @Nullable + protected GridSearchBoxWidget searchField; + + @Nullable + private ScrollbarWidget scrollbar; + private int totalRows; + private int visibleRows; + private int gridSlotNumber; + + protected AbstractGridScreen(final T menu, + final Inventory playerInventory, + final Component text, + final int bottomHeight) { + super(menu, playerInventory, text); + this.bottomHeight = bottomHeight; + this.menu.setSizeChangedListener(this::init); + } + + @Override + protected void init() { + LOGGER.info("Initializing grid screen"); + + this.visibleRows = calculateVisibleRows(); + this.imageHeight = TOP_HEIGHT + (visibleRows * 18) + bottomHeight; + this.inventoryLabelY = imageHeight - INVENTORY_INCLUDING_TITLE_HEIGHT + 4; + + super.init(); + + if (searchField == null) { + searchField = new GridSearchBoxWidget( + font, + leftPos + 80 + 1, + topPos + 6 + 1, + 88 - 6, + new SyntaxHighlighter(SyntaxHighlighterColors.DEFAULT_COLORS), + new History(SEARCH_FIELD_HISTORY) + ); + } else { + searchField.setX(leftPos + 80 + 1); + searchField.setY(topPos + 6 + 1); + } + getMenu().setSearchBox(searchField); + + getMenu().addSlots(imageHeight - INVENTORY_INCLUDING_TITLE_HEIGHT + 17); + + this.scrollbar = new ScrollbarWidget(leftPos + 174, topPos + 20, 12, (visibleRows * 18) - 2); + this.scrollbar.setScrollAnimation(Platform.INSTANCE.getConfig().getGrid().isSmoothScrolling()); + this.getMenu().getView().setListener(this::resourcesChanged); + resourcesChanged(); + + addWidget(scrollbar); + addWidget(searchField); + + addSideButton(new RedstoneModeSideButtonWidget( + getMenu().getProperty(PropertyTypes.REDSTONE_MODE), + this::renderComponentTooltip + )); + addSideButton(new SortingDirectionSideButtonWidget(getMenu(), this::renderComponentTooltip)); + addSideButton(new SortingTypeSideButtonWidget(getMenu(), this::renderComponentTooltip)); + addSideButton(new SizeSideButtonWidget(getMenu(), this::renderComponentTooltip)); + addSideButton(new AutoSelectedSideButtonWidget(getMenu(), this::renderComponentTooltip)); + addSideButton(new StorageChannelTypeSideButtonWidget( + getMenu(), + this::renderComponentTooltip, + PlatformApi.INSTANCE.getStorageChannelTypeRegistry().getAll() + )); + + final PlatformRegistry registry = PlatformApi.INSTANCE.getGridSynchronizerRegistry(); + if (!registry.isEmpty()) { + addSideButton(new SynchronizationSideButtonWidget( + getMenu(), + this::renderComponentTooltip, + registry.getAll() + )); + searchField.addListener(this::trySynchronizeFromGrid); + } + } + + private void trySynchronizeFromGrid(final String text) { + getMenu().getSynchronizer().synchronizeFromGrid(text); + } + + @Override + protected void containerTick() { + super.containerTick(); + trySynchronizeToGrid(); + } + + private void trySynchronizeToGrid() { + if (searchField == null) { + return; + } + final String text = getMenu().getSynchronizer().getTextToSynchronizeToGrid(); + if (text == null || searchField.getValue().equals(text)) { + return; + } + searchField.setValue(text); + } + + private void resourcesChanged() { + if (scrollbar == null) { + return; + } + totalRows = (int) Math.ceil((float) getMenu().getView().getViewList().size() / (float) COLUMNS); + scrollbar.setEnabled(totalRows > visibleRows); + final int rowsExcludingVisibleOnes = totalRows - visibleRows; + final int maxOffset = scrollbar.isScrollAnimation() + ? (rowsExcludingVisibleOnes * 18) + : rowsExcludingVisibleOnes; + scrollbar.setMaxOffset(maxOffset); + } + + private int calculateVisibleRows() { + final int screenSpaceAvailable = height - TOP_HEIGHT - bottomHeight; + final int maxRows = getMaxRows(); + return Math.max(MIN_ROWS, Math.min((screenSpaceAvailable / 18) - MIN_ROWS, maxRows)); + } + + private int getMaxRows() { + return switch (getMenu().getSize()) { + case STRETCH -> Platform.INSTANCE.getConfig().getGrid().getMaxRowsStretch(); + case SMALL -> 3; + case MEDIUM -> 5; + case LARGE -> 8; + case EXTRA_LARGE -> 12; + }; + } + + private boolean isOverStorageArea(final int mouseX, final int mouseY) { + final int relativeMouseX = mouseX - leftPos; + final int relativeMouseY = mouseY - topPos; + return relativeMouseX >= 7 + && relativeMouseY >= TOP_HEIGHT + && relativeMouseX <= 168 + && relativeMouseY <= TOP_HEIGHT + (visibleRows * 18); + } + + @Override + protected void renderBg(final PoseStack poseStack, final float delta, final int mouseX, final int mouseY) { + prepareBackgroundShader(getTexture()); + + final int x = (width - imageWidth) / 2; + final int y = (height - imageHeight) / 2; + + blit(poseStack, x, y, 0, 0, imageWidth - 34, TOP_HEIGHT); + + for (int row = 0; row < visibleRows; ++row) { + int textureY = 37; + if (row == 0) { + textureY = 19; + } else if (row == visibleRows - 1) { + textureY = 55; + } + blit(poseStack, x, y + TOP_HEIGHT + (18 * row), 0, textureY, imageWidth - 34, 18); + } + + blit(poseStack, x, y + TOP_HEIGHT + (18 * visibleRows), 0, 73, imageWidth - 34, bottomHeight); + + gridSlotNumber = -1; + + setScissor(x + 7, y + TOP_HEIGHT, 18 * COLUMNS, visibleRows * 18); + for (int row = 0; row < Math.max(totalRows, visibleRows); ++row) { + renderRow(poseStack, mouseX, mouseY, x, y, row); + } + disableScissor(); + + if (gridSlotNumber != -1 && isOverStorageArea(mouseX, mouseY)) { + renderTooltipWithMaybeSmallLines(poseStack, mouseX, mouseY); + } + } + + private void renderRow(final PoseStack poseStack, + final int mouseX, + final int mouseY, + final int x, + final int y, + final int row) { + final int rowX = x + 7; + final int rowY = y + TOP_HEIGHT + (row * 18) - getScrollbarOffset(); + + final boolean isOutOfFrame = (rowY < y + TOP_HEIGHT - 18) || (rowY > y + TOP_HEIGHT + (visibleRows * 18)); + if (isOutOfFrame) { + return; + } + + prepareBackgroundShader(getTexture()); + + blit(poseStack, rowX, rowY, 0, 238, 162, 18); + + for (int column = 0; column < COLUMNS; ++column) { + renderColumnInRow(poseStack, mouseX, mouseY, rowX, rowY, (row * COLUMNS) + column, column); + } + } + + private int getScrollbarOffset() { + if (scrollbar == null) { + return 0; + } + final int scrollbarOffset = (int) scrollbar.getOffset(); + if (!scrollbar.isScrollAnimation()) { + return scrollbarOffset * 18; + } + return scrollbarOffset; + } + + private void renderColumnInRow(final PoseStack poseStack, + final int mouseX, + final int mouseY, + final int rowX, + final int rowY, + final int idx, + final int column) { + final GridView view = getMenu().getView(); + + final int slotX = rowX + 1 + (column * 18); + final int slotY = rowY + 1; + + GridResource resource = null; + if (idx < view.getViewList().size()) { + resource = view.getViewList().get(idx); + renderResourceWithAmount(poseStack, slotX, slotY, resource); + } + + final boolean inBounds = mouseX >= slotX + && mouseY >= slotY + && mouseX <= slotX + 16 + && mouseY <= slotY + 16; + + if (!getMenu().isActive()) { + renderDisabledSlot(poseStack, slotX, slotY); + } else if (inBounds && isOverStorageArea(mouseX, mouseY)) { + renderSelection(poseStack, slotX, slotY); + if (resource != null) { + gridSlotNumber = idx; + } + } + } + + private void renderResourceWithAmount(final PoseStack poseStack, + final int slotX, + final int slotY, + final GridResource resource) { + if (resource instanceof PlatformGridResource platformResource) { + platformResource.render(poseStack, slotX, slotY); + } + renderAmount(poseStack, slotX, slotY, resource); + } + + private void renderAmount(final PoseStack poseStack, + final int slotX, + final int slotY, + final GridResource resource) { + if (!(resource instanceof PlatformGridResource platformResource)) { + return; + } + final String text = resource.isZeroed() ? "0" : platformResource.getDisplayedAmount(); + final int color = resource.isZeroed() + ? Objects.requireNonNullElse(ChatFormatting.RED.getColor(), 15) + : Objects.requireNonNullElse(ChatFormatting.WHITE.getColor(), 15); + final boolean large = (minecraft != null && minecraft.isEnforceUnicode()) + || Platform.INSTANCE.getConfig().getGrid().isLargeFont(); + renderAmount(poseStack, slotX, slotY, text, color, large); + } + + private void renderDisabledSlot(final PoseStack poseStack, final int slotX, final int slotY) { + RenderSystem.disableDepthTest(); + RenderSystem.colorMask(true, true, true, false); + fillGradient(poseStack, slotX, slotY, slotX + 16, slotY + 16, DISABLED_SLOT_COLOR, DISABLED_SLOT_COLOR); + RenderSystem.colorMask(true, true, true, true); + RenderSystem.enableDepthTest(); + } + + private void renderSelection(final PoseStack poseStack, final int slotX, final int slotY) { + RenderSystem.disableDepthTest(); + RenderSystem.colorMask(true, true, true, false); + fillGradient(poseStack, slotX, slotY, slotX + 16, slotY + 16, SELECTION_SLOT_COLOR, SELECTION_SLOT_COLOR); + RenderSystem.colorMask(true, true, true, true); + RenderSystem.enableDepthTest(); + } + + private void renderTooltipWithMaybeSmallLines(final PoseStack poseStack, final int mouseX, final int mouseY) { + final GridView view = getMenu().getView(); + final GridResource resource = view.getViewList().get(gridSlotNumber); + if (!(resource instanceof PlatformGridResource platformResource)) { + return; + } + + final List lines = platformResource.getTooltip() + .stream() + .map(Component::getVisualOrderText) + .toList(); + + if (!Platform.INSTANCE.getConfig().getGrid().isDetailedTooltip()) { + renderTooltip(poseStack, lines, mouseX, mouseY); + } else { + final List smallLines = new ArrayList<>(); + + final String amountInTooltip = platformResource.isZeroed() ? "0" : platformResource.getAmountInTooltip(); + smallLines.add(createTranslation("misc", "total", amountInTooltip) + .withStyle(ChatFormatting.GRAY).getVisualOrderText()); + + resource.getTrackedResource(view).ifPresent(entry -> smallLines.add( + getLastModifiedText(entry).withStyle(ChatFormatting.GRAY).getVisualOrderText() + )); + + SmallTextTooltipRenderer.INSTANCE.render( + minecraft, + font, + poseStack, + lines, + smallLines, + mouseX, + mouseY, + width, + height + ); + } + } + + private MutableComponent getLastModifiedText(final TrackedResource trackedResource) { + final LastModified lastModified = LastModified.calculate(trackedResource.getTime(), System.currentTimeMillis()); + if (isModifiedJustNow(lastModified)) { + return createTranslation("misc", "last_modified.just_now", trackedResource.getSourceName()); + } + + String translationKey = lastModified.type().toString().toLowerCase(); + final boolean plural = lastModified.amount() != 1; + if (plural) { + translationKey += "s"; + } + + return createTranslation( + "misc", + "last_modified." + translationKey, + lastModified.amount(), + trackedResource.getSourceName() + ); + } + + private boolean isModifiedJustNow(final LastModified lastModified) { + return lastModified.type() == LastModified.Type.SECOND + && lastModified.amount() <= MODIFIED_JUST_NOW_MAX_SECONDS; + } + + @Nullable + public GridResource getHoveredResource() { + if (this.gridSlotNumber == -1) { + return null; + } + return menu.getView().getViewList().get(this.gridSlotNumber); + } + + @Override + public void render(final PoseStack poseStack, final int mouseX, final int mouseY, final float partialTicks) { + super.render(poseStack, mouseX, mouseY, partialTicks); + if (scrollbar != null) { + scrollbar.render(poseStack, mouseX, mouseY, partialTicks); + } + if (searchField != null) { + searchField.render(poseStack, 0, 0, 0); + } + } + + @Override + public boolean mouseClicked(final double mouseX, final double mouseY, final int clickedButton) { + if (scrollbar != null && scrollbar.mouseClicked(mouseX, mouseY, clickedButton)) { + return true; + } + + final ItemStack carriedStack = getMenu().getCarried(); + + if (!getMenu().getView().getViewList().isEmpty() && gridSlotNumber >= 0 && carriedStack.isEmpty()) { + mouseClickedInGrid(clickedButton, getMenu().getView().getViewList().get(gridSlotNumber)); + return true; + } + + if (isOverStorageArea((int) mouseX, (int) mouseY) + && !carriedStack.isEmpty() && (clickedButton == 0 || clickedButton == 1)) { + mouseClickedInGrid(clickedButton); + return true; + } + + return super.mouseClicked(mouseX, mouseY, clickedButton); + } + + private void mouseClickedInGrid(final int clickedButton) { + final GridInsertMode mode = clickedButton == 1 + ? GridInsertMode.SINGLE_RESOURCE + : GridInsertMode.ENTIRE_RESOURCE; + final boolean tryAlternatives = clickedButton == 1; // TODO - Add help icon in gui for this + getMenu().onInsert(mode, tryAlternatives); + } + + protected void mouseClickedInGrid(final int clickedButton, final GridResource resource) { + if (resource instanceof PlatformGridResource platformGridResource) { + platformGridResource.onExtract( + getExtractMode(clickedButton), + shouldExtractToCursor(), + getMenu() + ); + } + } + + private static GridExtractMode getExtractMode(final int clickedButton) { + if (clickedButton == 1) { + return GridExtractMode.HALF_RESOURCE; + } + return GridExtractMode.ENTIRE_RESOURCE; + } + + private static boolean shouldExtractToCursor() { + return !hasShiftDown(); + } + + @Override + public void mouseMoved(final double mx, final double my) { + if (scrollbar != null) { + scrollbar.mouseMoved(mx, my); + } + super.mouseMoved(mx, my); + } + + @Override + public boolean mouseReleased(final double mx, final double my, final int button) { + return (scrollbar != null && scrollbar.mouseReleased(mx, my, button)) || super.mouseReleased(mx, my, button); + } + + @Override + public boolean mouseScrolled(final double x, final double y, final double delta) { + final boolean up = delta > 0; + + if (isOverStorageArea((int) x, (int) y) && gridSlotNumber >= 0) { + mouseScrolledInGrid(up); + } else if (hoveredSlot != null && hoveredSlot.hasItem()) { + mouseScrolledInInventory(up, hoveredSlot); + } + + return (scrollbar != null && scrollbar.mouseScrolled(x, y, delta)) || super.mouseScrolled(x, y, delta); + } + + private void mouseScrolledInInventory(final boolean up, final Slot slot) { + getMenu().getView().setPreventSorting(true); + final int slotIndex = slot.getContainerSlot(); + mouseScrolledInInventory(up, slot.getItem(), slotIndex); + } + + private void mouseScrolledInInventory(final boolean up, final ItemStack stack, final int slotIndex) { + final GridScrollMode scrollMode = getScrollModeWhenScrollingOnInventoryArea(up); + if (scrollMode == null) { + return; + } + getMenu().onScroll( + StorageChannelTypes.ITEM, + ItemResource.ofItemStack(stack), + scrollMode, + slotIndex + ); + } + + private void mouseScrolledInGrid(final boolean up) { + getMenu().getView().setPreventSorting(true); + final GridScrollMode scrollMode = getScrollModeWhenScrollingOnGridArea(up); + if (scrollMode == null) { + return; + } + final GridResource resource = getMenu().getView().getViewList().get(gridSlotNumber); + if (!(resource instanceof PlatformGridResource platformGridResource)) { + return; + } + platformGridResource.onScroll(scrollMode, getMenu()); + } + + @Nullable + private static GridScrollMode getScrollModeWhenScrollingOnInventoryArea(final boolean up) { + if (hasShiftDown()) { + return up ? GridScrollMode.INVENTORY_TO_GRID : GridScrollMode.GRID_TO_INVENTORY; + } + return null; + } + + @Nullable + private static GridScrollMode getScrollModeWhenScrollingOnGridArea(final boolean up) { + final boolean shift = hasShiftDown(); + final boolean ctrl = hasControlDown(); + if (shift && ctrl) { + return null; + } + return getScrollModeWhenScrollingOnGridArea(up, shift, ctrl); + } + + @Nullable + private static GridScrollMode getScrollModeWhenScrollingOnGridArea(final boolean up, + final boolean shift, + final boolean ctrl) { + if (up) { + if (shift) { + return GridScrollMode.INVENTORY_TO_GRID; + } + } else { + if (shift) { + return GridScrollMode.GRID_TO_INVENTORY; + } else if (ctrl) { + return GridScrollMode.GRID_TO_CURSOR; + } + } + return null; + } + + @Override + public boolean charTyped(final char unknown1, final int unknown2) { + return (searchField != null && searchField.charTyped(unknown1, unknown2)) + || super.charTyped(unknown1, unknown2); + } + + @Override + public boolean keyPressed(final int key, final int scanCode, final int modifiers) { + // First do the prevent sorting. + // Order matters. In Auto-selected mode, the search field will swallow the SHIFT key. + if (hasShiftDown() && Platform.INSTANCE.getConfig().getGrid().isPreventSortingWhileShiftIsDown()) { + getMenu().getView().setPreventSorting(true); + } + + if (searchField != null + && (searchField.keyPressed(key, scanCode, modifiers) || searchField.canConsumeInput())) { + return true; + } + + return super.keyPressed(key, scanCode, modifiers); + } + + @Override + public boolean keyReleased(final int key, final int scanCode, final int modifiers) { + if (getMenu().getView().setPreventSorting(false)) { + getMenu().getView().sort(); + } + + return super.keyReleased(key, scanCode, modifiers); + } +} diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/grid/AutoSelectedSideButtonWidget.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/grid/AutoSelectedSideButtonWidget.java index c87c352ac..0c962148d 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/grid/AutoSelectedSideButtonWidget.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/grid/AutoSelectedSideButtonWidget.java @@ -1,6 +1,6 @@ package com.refinedmods.refinedstorage2.platform.common.screen.grid; -import com.refinedmods.refinedstorage2.platform.common.containermenu.GridContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.containermenu.grid.AbstractGridContainerMenu; import com.refinedmods.refinedstorage2.platform.common.screen.TooltipRenderer; import com.refinedmods.refinedstorage2.platform.common.screen.widget.AbstractSideButtonWidget; @@ -14,12 +14,12 @@ import static com.refinedmods.refinedstorage2.platform.common.util.IdentifierUtil.createTranslation; public class AutoSelectedSideButtonWidget extends AbstractSideButtonWidget { - private final GridContainerMenu menu; + private final AbstractGridContainerMenu menu; private final TooltipRenderer tooltipRenderer; private final List yes; private final List no; - public AutoSelectedSideButtonWidget(final GridContainerMenu menu, + public AutoSelectedSideButtonWidget(final AbstractGridContainerMenu menu, final TooltipRenderer tooltipRenderer) { super(createPressAction(menu)); this.menu = menu; @@ -28,7 +28,7 @@ public AutoSelectedSideButtonWidget(final GridContainerMenu menu, this.no = calculateTooltip(false); } - private static OnPress createPressAction(final GridContainerMenu menu) { + private static OnPress createPressAction(final AbstractGridContainerMenu menu) { return btn -> menu.setAutoSelected(!menu.isAutoSelected()); } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/grid/CraftingGridScreen.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/grid/CraftingGridScreen.java new file mode 100644 index 000000000..955005642 --- /dev/null +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/grid/CraftingGridScreen.java @@ -0,0 +1,169 @@ +package com.refinedmods.refinedstorage2.platform.common.screen.grid; + +import com.refinedmods.refinedstorage2.platform.common.Platform; +import com.refinedmods.refinedstorage2.platform.common.containermenu.grid.CraftingGridContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.containermenu.grid.CraftingGridResultSlot; +import com.refinedmods.refinedstorage2.platform.common.content.KeyMappings; + +import javax.annotation.Nullable; + +import com.mojang.blaze3d.vertex.PoseStack; +import net.minecraft.ChatFormatting; +import net.minecraft.client.KeyMapping; +import net.minecraft.client.gui.components.ImageButton; +import net.minecraft.client.gui.components.Tooltip; +import net.minecraft.network.chat.Component; +import net.minecraft.network.chat.MutableComponent; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.entity.player.Inventory; +import net.minecraft.world.inventory.Slot; + +import static com.refinedmods.refinedstorage2.platform.common.util.IdentifierUtil.createIdentifier; + +public class CraftingGridScreen extends AbstractGridScreen { + private static final ResourceLocation TEXTURE = createIdentifier("textures/gui/crafting_grid.png"); + private static final int CLEAR_BUTTON_SIZE = 7; + + @Nullable + private ImageButton clearToNetworkButton; + + private boolean filteringBasedOnCraftingMatrixItems; + + public CraftingGridScreen(final CraftingGridContainerMenu menu, final Inventory inventory, final Component title) { + super(menu, inventory, title, 156); + this.inventoryLabelY = 134; + this.imageWidth = 227; + this.imageHeight = 229; + } + + @Override + protected void init() { + super.init(); + + final int clearToNetworkButtonX = leftPos + 82; + final int clearToInventoryButtonX = clearToNetworkButtonX + CLEAR_BUTTON_SIZE + 3; + final int clearButtonY = topPos + imageHeight - bottomHeight + 4; + + clearToNetworkButton = createClearButton(clearToNetworkButtonX, clearButtonY, 242, false); + setClearToNetworkButtonActive(getMenu().isActive()); + getMenu().setActivenessListener(this::setClearToNetworkButtonActive); + addRenderableWidget(clearToNetworkButton); + addRenderableWidget(createClearButton(clearToInventoryButtonX, clearButtonY, 249, true)); + } + + @Override + protected void renderBg(final PoseStack poseStack, final float delta, final int mouseX, final int mouseY) { + super.renderBg(poseStack, delta, mouseX, mouseY); + if (filteringBasedOnCraftingMatrixItems) { + renderCraftingMatrixFilteringHighlights(poseStack); + } + } + + private void renderCraftingMatrixFilteringHighlights(final PoseStack poseStack) { + for (final Slot slot : getMenu().getCraftingMatrixSlots()) { + if (!slot.hasItem()) { + continue; + } + renderCraftingMatrixFilteringHighlight(poseStack, slot); + } + } + + private void renderCraftingMatrixFilteringHighlight(final PoseStack poseStack, final Slot slot) { + blit(poseStack, leftPos + slot.x - 1, topPos + slot.y - 1, 224, 238, 18, 18); + } + + @Override + protected void containerTick() { + super.containerTick(); + final boolean mayFilterOnCraftingMatrixItems = hoveredSlot instanceof CraftingGridResultSlot + && hasShiftDown() + && hasControlDown(); + if (mayFilterOnCraftingMatrixItems && !filteringBasedOnCraftingMatrixItems) { + filteringBasedOnCraftingMatrixItems = true; + getMenu().filterBasedOnCraftingMatrixItems(); + if (searchField != null) { + searchField.setEditable(false); + } + } else if (!mayFilterOnCraftingMatrixItems && filteringBasedOnCraftingMatrixItems) { + getMenu().stopFilteringBasedOnCraftingMatrixItems(); + filteringBasedOnCraftingMatrixItems = false; + if (searchField != null) { + searchField.setEditable(true); + } + } + } + + private void setClearToNetworkButtonActive(final boolean active) { + if (clearToNetworkButton == null) { + return; + } + clearToNetworkButton.active = active; + } + + private ImageButton createClearButton(final int x, + final int y, + final int textureX, + final boolean toPlayerInventory) { + final MutableComponent text = Component.translatable( + "gui.refinedstorage2.crafting_grid.move." + (toPlayerInventory ? "inventory" : "network") + ); + final KeyMapping keyMapping = getClearButtonKeyMapping(toPlayerInventory); + if (keyMapping != null) { + text.append("\n").append(keyMapping.getTranslatedKeyMessage().copy().withStyle(ChatFormatting.GRAY)); + } + final ImageButton button = new ImageButton( + x, + y, + CLEAR_BUTTON_SIZE, + CLEAR_BUTTON_SIZE, + textureX, + 235, + CLEAR_BUTTON_SIZE, + TEXTURE, + 256, + 256, + b -> getMenu().clear(toPlayerInventory), + text + ); + button.setTooltip(Tooltip.create(text)); + return button; + } + + @Nullable + private KeyMapping getClearButtonKeyMapping(final boolean toPlayerInventory) { + return toPlayerInventory + ? wrapUnbound(KeyMappings.INSTANCE.getClearCraftingGridMatrixToInventory()) + : wrapUnbound(KeyMappings.INSTANCE.getClearCraftingGridMatrixToNetwork()); + } + + @Nullable + private KeyMapping wrapUnbound(@Nullable final KeyMapping keyMapping) { + return keyMapping == null || keyMapping.isUnbound() ? null : keyMapping; + } + + @Override + public boolean keyPressed(final int key, final int scanCode, final int modifiers) { + if (KeyMappings.INSTANCE.getClearCraftingGridMatrixToInventory() != null + && Platform.INSTANCE.isKeyDown(KeyMappings.INSTANCE.getClearCraftingGridMatrixToInventory())) { + getMenu().clear(true); + } else if (KeyMappings.INSTANCE.getClearCraftingGridMatrixToNetwork() != null + && Platform.INSTANCE.isKeyDown(KeyMappings.INSTANCE.getClearCraftingGridMatrixToNetwork())) { + getMenu().clear(false); + } + return super.keyPressed(key, scanCode, modifiers); + } + + @Override + public void onClose() { + switch (Platform.INSTANCE.getConfig().getCraftingGrid().getCraftingMatrixCloseBehavior()) { + case CLEAR_TO_NETWORK -> getMenu().clear(false); + case CLEAR_TO_INVENTORY -> getMenu().clear(true); + } + super.onClose(); + } + + @Override + protected ResourceLocation getTexture() { + return TEXTURE; + } +} diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/grid/GridScreen.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/grid/GridScreen.java index 130f1bba4..23d439a8b 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/grid/GridScreen.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/grid/GridScreen.java @@ -1,600 +1,25 @@ package com.refinedmods.refinedstorage2.platform.common.screen.grid; -import com.refinedmods.refinedstorage2.api.core.History; -import com.refinedmods.refinedstorage2.api.core.registry.OrderedRegistry; -import com.refinedmods.refinedstorage2.api.core.util.LastModified; -import com.refinedmods.refinedstorage2.api.grid.service.GridExtractMode; -import com.refinedmods.refinedstorage2.api.grid.service.GridInsertMode; -import com.refinedmods.refinedstorage2.api.grid.view.GridResource; -import com.refinedmods.refinedstorage2.api.grid.view.GridView; -import com.refinedmods.refinedstorage2.api.storage.tracked.TrackedResource; -import com.refinedmods.refinedstorage2.platform.api.PlatformApi; -import com.refinedmods.refinedstorage2.platform.api.grid.GridScrollMode; -import com.refinedmods.refinedstorage2.platform.api.grid.GridSynchronizer; -import com.refinedmods.refinedstorage2.platform.api.grid.PlatformGridResource; -import com.refinedmods.refinedstorage2.platform.api.resource.ItemResource; -import com.refinedmods.refinedstorage2.platform.common.Platform; -import com.refinedmods.refinedstorage2.platform.common.containermenu.GridContainerMenu; -import com.refinedmods.refinedstorage2.platform.common.containermenu.property.PropertyTypes; -import com.refinedmods.refinedstorage2.platform.common.internal.storage.channel.StorageChannelTypes; -import com.refinedmods.refinedstorage2.platform.common.screen.AbstractBaseScreen; -import com.refinedmods.refinedstorage2.platform.common.screen.SmallTextTooltipRenderer; -import com.refinedmods.refinedstorage2.platform.common.screen.widget.RedstoneModeSideButtonWidget; -import com.refinedmods.refinedstorage2.platform.common.screen.widget.ScrollbarWidget; -import com.refinedmods.refinedstorage2.query.lexer.SyntaxHighlighter; -import com.refinedmods.refinedstorage2.query.lexer.SyntaxHighlighterColors; +import com.refinedmods.refinedstorage2.platform.common.containermenu.grid.GridContainerMenu; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; -import javax.annotation.Nullable; - -import com.mojang.blaze3d.systems.RenderSystem; -import com.mojang.blaze3d.vertex.PoseStack; -import net.minecraft.ChatFormatting; import net.minecraft.network.chat.Component; -import net.minecraft.network.chat.MutableComponent; import net.minecraft.resources.ResourceLocation; -import net.minecraft.util.FormattedCharSequence; import net.minecraft.world.entity.player.Inventory; -import net.minecraft.world.inventory.Slot; -import net.minecraft.world.item.ItemStack; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import static com.refinedmods.refinedstorage2.platform.common.util.IdentifierUtil.createIdentifier; -import static com.refinedmods.refinedstorage2.platform.common.util.IdentifierUtil.createTranslation; - -public class GridScreen extends AbstractBaseScreen { - private static final Logger LOGGER = LoggerFactory.getLogger(GridScreen.class); +public class GridScreen extends AbstractGridScreen { private static final ResourceLocation TEXTURE = createIdentifier("textures/gui/grid.png"); - private static final int MODIFIED_JUST_NOW_MAX_SECONDS = 10; - - private static final int TOP_HEIGHT = 19; - private static final int BOTTOM_HEIGHT = 99; - private static final int COLUMNS = 9; - - private static final int DISABLED_SLOT_COLOR = 0xFF5B5B5B; - private static final int SELECTION_SLOT_COLOR = -2130706433; - - private static final List SEARCH_FIELD_HISTORY = new ArrayList<>(); - - @Nullable - private ScrollbarWidget scrollbar; - @Nullable - private GridSearchBoxWidget searchField; - private int totalRows; - private int visibleRows; - private int gridSlotNumber; - public GridScreen(final GridContainerMenu menu, final Inventory inventory, final Component title) { - super(menu, inventory, title); - - menu.setSizeChangedListener(this::init); - + super(menu, inventory, title, 99); this.inventoryLabelY = 75; this.imageWidth = 227; this.imageHeight = 176; } - @Override - protected void init() { - LOGGER.info("Initializing grid screen"); - - this.visibleRows = calculateVisibleRows(); - this.imageHeight = TOP_HEIGHT + (visibleRows * 18) + BOTTOM_HEIGHT; - this.inventoryLabelY = imageHeight - BOTTOM_HEIGHT + 4; - - super.init(); - - if (searchField == null) { - searchField = new GridSearchBoxWidget( - font, - leftPos + 80 + 1, - topPos + 6 + 1, - 88 - 6, - new SyntaxHighlighter(SyntaxHighlighterColors.DEFAULT_COLORS), - new History(SEARCH_FIELD_HISTORY) - ); - } else { - searchField.setX(leftPos + 80 + 1); - searchField.setY(topPos + 6 + 1); - } - getMenu().setSearchBox(searchField); - - getMenu().addSlots(imageHeight - BOTTOM_HEIGHT + 17); - - this.scrollbar = new ScrollbarWidget(leftPos + 174, topPos + 20, 12, (visibleRows * 18) - 2); - this.scrollbar.setScrollAnimation(Platform.INSTANCE.getConfig().getGrid().isSmoothScrolling()); - this.getMenu().getView().setListener(this::resourcesChanged); - resourcesChanged(); - - addWidget(scrollbar); - addWidget(searchField); - - addSideButton(new RedstoneModeSideButtonWidget( - getMenu().getProperty(PropertyTypes.REDSTONE_MODE), - this::renderComponentTooltip - )); - addSideButton(new SortingDirectionSideButtonWidget(getMenu(), this::renderComponentTooltip)); - addSideButton(new SortingTypeSideButtonWidget(getMenu(), this::renderComponentTooltip)); - addSideButton(new SizeSideButtonWidget(getMenu(), this::renderComponentTooltip)); - addSideButton(new AutoSelectedSideButtonWidget(getMenu(), this::renderComponentTooltip)); - addSideButton(new StorageChannelTypeSideButtonWidget( - getMenu(), - this::renderComponentTooltip, - PlatformApi.INSTANCE.getStorageChannelTypeRegistry().getAll() - )); - - final OrderedRegistry synchronizerRegistry = - PlatformApi.INSTANCE.getGridSynchronizerRegistry(); - if (!synchronizerRegistry.isEmpty()) { - addSideButton(new SynchronizationSideButtonWidget( - getMenu(), - this::renderComponentTooltip, - synchronizerRegistry.getAll() - )); - searchField.addListener(this::trySynchronizeFromGrid); - } - } - - private void trySynchronizeFromGrid(final String text) { - getMenu().getSynchronizer().synchronizeFromGrid(text); - } - - @Override - protected void containerTick() { - super.containerTick(); - trySynchronizeToGrid(); - } - - private void trySynchronizeToGrid() { - if (searchField == null) { - return; - } - final String text = getMenu().getSynchronizer().getTextToSynchronizeToGrid(); - if (text == null || searchField.getValue().equals(text)) { - return; - } - searchField.setValue(text); - } - - private void resourcesChanged() { - if (scrollbar == null) { - return; - } - totalRows = (int) Math.ceil((float) getMenu().getView().getAll().size() / (float) COLUMNS); - scrollbar.setEnabled(totalRows > visibleRows); - final int rowsExcludingVisibleOnes = totalRows - visibleRows; - final int maxOffset = scrollbar.isScrollAnimation() - ? (rowsExcludingVisibleOnes * 18) - : rowsExcludingVisibleOnes; - scrollbar.setMaxOffset(maxOffset); - } - - private int calculateVisibleRows() { - final int screenSpaceAvailable = height - TOP_HEIGHT - BOTTOM_HEIGHT; - final int maxRows = getMaxRows(); - return Math.max(3, Math.min((screenSpaceAvailable / 18) - 3, maxRows)); - } - - private int getMaxRows() { - return switch (getMenu().getSize()) { - case STRETCH -> Platform.INSTANCE.getConfig().getGrid().getMaxRowsStretch(); - case SMALL -> 3; - case MEDIUM -> 5; - case LARGE -> 8; - case EXTRA_LARGE -> 12; - }; - } - - private boolean isOverStorageArea(final int mouseX, final int mouseY) { - final int relativeMouseX = mouseX - leftPos; - final int relativeMouseY = mouseY - topPos; - return relativeMouseX >= 7 - && relativeMouseY >= TOP_HEIGHT - && relativeMouseX <= 168 - && relativeMouseY <= TOP_HEIGHT + (visibleRows * 18); - } - @Override protected ResourceLocation getTexture() { - throw new IllegalStateException("Cannot be called"); - } - - @Override - protected void renderBg(final PoseStack poseStack, final float delta, final int mouseX, final int mouseY) { - prepareBackgroundShader(TEXTURE); - - final int x = (width - imageWidth) / 2; - final int y = (height - imageHeight) / 2; - - blit(poseStack, x, y, 0, 0, imageWidth - 34, TOP_HEIGHT); - - for (int row = 0; row < visibleRows; ++row) { - int textureY = 37; - if (row == 0) { - textureY = 19; - } else if (row == visibleRows - 1) { - textureY = 55; - } - blit(poseStack, x, y + TOP_HEIGHT + (18 * row), 0, textureY, imageWidth - 34, 18); - } - - blit(poseStack, x, y + TOP_HEIGHT + (18 * visibleRows), 0, 73, imageWidth - 34, BOTTOM_HEIGHT); - - gridSlotNumber = -1; - - setScissor(x + 7, y + TOP_HEIGHT, 18 * COLUMNS, visibleRows * 18); - for (int row = 0; row < Math.max(totalRows, visibleRows); ++row) { - renderRow(poseStack, mouseX, mouseY, x, y, row); - } - disableScissor(); - - if (gridSlotNumber != -1 && isOverStorageArea(mouseX, mouseY)) { - renderTooltipWithMaybeSmallLines(poseStack, mouseX, mouseY); - } - } - - private void renderRow(final PoseStack poseStack, - final int mouseX, - final int mouseY, - final int x, - final int y, - final int row) { - final int rowX = x + 7; - final int rowY = y + TOP_HEIGHT + (row * 18) - getScrollbarOffset(); - - final boolean isOutOfFrame = (rowY < y + TOP_HEIGHT - 18) || (rowY > y + TOP_HEIGHT + (visibleRows * 18)); - if (isOutOfFrame) { - return; - } - - prepareBackgroundShader(TEXTURE); - - blit(poseStack, rowX, rowY, 0, 238, 162, 18); - - for (int column = 0; column < COLUMNS; ++column) { - renderColumnInRow(poseStack, mouseX, mouseY, rowX, rowY, (row * COLUMNS) + column, column); - } - } - - private int getScrollbarOffset() { - if (scrollbar == null) { - return 0; - } - final int scrollbarOffset = (int) scrollbar.getOffset(); - if (!scrollbar.isScrollAnimation()) { - return scrollbarOffset * 18; - } - return scrollbarOffset; - } - - private void renderColumnInRow(final PoseStack poseStack, - final int mouseX, - final int mouseY, - final int rowX, - final int rowY, - final int idx, - final int column) { - final GridView view = getMenu().getView(); - - final int slotX = rowX + 1 + (column * 18); - final int slotY = rowY + 1; - - GridResource resource = null; - if (idx < view.getAll().size()) { - resource = view.getAll().get(idx); - renderResourceWithAmount(poseStack, slotX, slotY, resource); - } - - final boolean inBounds = mouseX >= slotX - && mouseY >= slotY - && mouseX <= slotX + 16 - && mouseY <= slotY + 16; - - if (!getMenu().isActive()) { - renderDisabledSlot(poseStack, slotX, slotY); - } else if (inBounds && isOverStorageArea(mouseX, mouseY)) { - renderSelection(poseStack, slotX, slotY); - if (resource != null) { - gridSlotNumber = idx; - } - } - } - - private void renderResourceWithAmount(final PoseStack poseStack, - final int slotX, - final int slotY, - final GridResource resource) { - if (resource instanceof PlatformGridResource platformResource) { - platformResource.render(poseStack, slotX, slotY); - } - renderAmount(poseStack, slotX, slotY, resource); - } - - private void renderAmount(final PoseStack poseStack, - final int slotX, - final int slotY, - final GridResource resource) { - if (!(resource instanceof PlatformGridResource platformResource)) { - return; - } - final String text = resource.isZeroed() ? "0" : platformResource.getDisplayedAmount(); - final int color = resource.isZeroed() - ? Objects.requireNonNullElse(ChatFormatting.RED.getColor(), 15) - : Objects.requireNonNullElse(ChatFormatting.WHITE.getColor(), 15); - final boolean large = (minecraft != null && minecraft.isEnforceUnicode()) - || Platform.INSTANCE.getConfig().getGrid().isLargeFont(); - renderAmount(poseStack, slotX, slotY, text, color, large); - } - - private void renderDisabledSlot(final PoseStack poseStack, final int slotX, final int slotY) { - RenderSystem.disableDepthTest(); - RenderSystem.colorMask(true, true, true, false); - fillGradient(poseStack, slotX, slotY, slotX + 16, slotY + 16, DISABLED_SLOT_COLOR, DISABLED_SLOT_COLOR); - RenderSystem.colorMask(true, true, true, true); - RenderSystem.enableDepthTest(); - } - - private void renderSelection(final PoseStack poseStack, final int slotX, final int slotY) { - RenderSystem.disableDepthTest(); - RenderSystem.colorMask(true, true, true, false); - fillGradient(poseStack, slotX, slotY, slotX + 16, slotY + 16, SELECTION_SLOT_COLOR, SELECTION_SLOT_COLOR); - RenderSystem.colorMask(true, true, true, true); - RenderSystem.enableDepthTest(); - } - - private void renderTooltipWithMaybeSmallLines(final PoseStack poseStack, final int mouseX, final int mouseY) { - final GridView view = getMenu().getView(); - final GridResource resource = view.getAll().get(gridSlotNumber); - if (!(resource instanceof PlatformGridResource platformResource)) { - return; - } - - final List lines = platformResource.getTooltip() - .stream() - .map(Component::getVisualOrderText) - .toList(); - - if (!Platform.INSTANCE.getConfig().getGrid().isDetailedTooltip()) { - renderTooltip(poseStack, lines, mouseX, mouseY); - } else { - final List smallLines = new ArrayList<>(); - - final String amountInTooltip = platformResource.isZeroed() ? "0" : platformResource.getAmountInTooltip(); - smallLines.add(createTranslation("misc", "total", amountInTooltip) - .withStyle(ChatFormatting.GRAY).getVisualOrderText()); - - resource.getTrackedResource(view).ifPresent(entry -> smallLines.add( - getLastModifiedText(entry).withStyle(ChatFormatting.GRAY).getVisualOrderText() - )); - - SmallTextTooltipRenderer.INSTANCE.render( - minecraft, - font, - poseStack, - lines, - smallLines, - mouseX, - mouseY, - width, - height - ); - } - } - - private MutableComponent getLastModifiedText(final TrackedResource trackedResource) { - final LastModified lastModified = LastModified.calculate(trackedResource.getTime(), System.currentTimeMillis()); - if (isModifiedJustNow(lastModified)) { - return createTranslation("misc", "last_modified.just_now", trackedResource.getSourceName()); - } - - String translationKey = lastModified.type().toString().toLowerCase(); - final boolean plural = lastModified.amount() != 1; - if (plural) { - translationKey += "s"; - } - - return createTranslation( - "misc", - "last_modified." + translationKey, - lastModified.amount(), - trackedResource.getSourceName() - ); - } - - private boolean isModifiedJustNow(final LastModified lastModified) { - return lastModified.type() == LastModified.Type.SECOND - && lastModified.amount() <= MODIFIED_JUST_NOW_MAX_SECONDS; - } - - @Override - public void render(final PoseStack poseStack, final int mouseX, final int mouseY, final float partialTicks) { - super.render(poseStack, mouseX, mouseY, partialTicks); - if (scrollbar != null) { - scrollbar.render(poseStack, mouseX, mouseY, partialTicks); - } - if (searchField != null) { - searchField.render(poseStack, 0, 0, 0); - } - } - - @Override - public boolean mouseClicked(final double mouseX, final double mouseY, final int clickedButton) { - if (scrollbar != null && scrollbar.mouseClicked(mouseX, mouseY, clickedButton)) { - return true; - } - - final ItemStack carriedStack = getMenu().getCarried(); - - if (!getMenu().getView().getAll().isEmpty() && gridSlotNumber >= 0 && carriedStack.isEmpty()) { - mouseClickedInGrid(clickedButton, getMenu().getView().getAll().get(gridSlotNumber)); - return true; - } - - if (isOverStorageArea((int) mouseX, (int) mouseY) - && !carriedStack.isEmpty() && (clickedButton == 0 || clickedButton == 1)) { - mouseClickedInGrid(clickedButton); - return true; - } - - return super.mouseClicked(mouseX, mouseY, clickedButton); - } - - private void mouseClickedInGrid(final int clickedButton) { - final GridInsertMode mode = clickedButton == 1 - ? GridInsertMode.SINGLE_RESOURCE - : GridInsertMode.ENTIRE_RESOURCE; - final boolean tryAlternatives = clickedButton == 1; // TODO - Add help icon in gui for this - getMenu().onInsert(mode, tryAlternatives); - } - - protected void mouseClickedInGrid(final int clickedButton, final GridResource resource) { - if (resource instanceof PlatformGridResource platformGridResource) { - platformGridResource.onExtract( - getExtractMode(clickedButton), - shouldExtractToCursor(), - getMenu() - ); - } - } - - private static GridExtractMode getExtractMode(final int clickedButton) { - if (clickedButton == 1) { - return GridExtractMode.HALF_RESOURCE; - } - return GridExtractMode.ENTIRE_RESOURCE; - } - - private static boolean shouldExtractToCursor() { - return !hasShiftDown(); - } - - @Override - public void mouseMoved(final double mx, final double my) { - if (scrollbar != null) { - scrollbar.mouseMoved(mx, my); - } - super.mouseMoved(mx, my); - } - - @Override - public boolean mouseReleased(final double mx, final double my, final int button) { - return (scrollbar != null && scrollbar.mouseReleased(mx, my, button)) || super.mouseReleased(mx, my, button); - } - - @Override - public boolean mouseScrolled(final double x, final double y, final double delta) { - final boolean up = delta > 0; - - if (isOverStorageArea((int) x, (int) y) && gridSlotNumber >= 0) { - mouseScrolledInGrid(up); - } else if (hoveredSlot != null && hoveredSlot.hasItem()) { - mouseScrolledInInventory(up, hoveredSlot); - } - - return (scrollbar != null && scrollbar.mouseScrolled(x, y, delta)) || super.mouseScrolled(x, y, delta); - } - - private void mouseScrolledInInventory(final boolean up, final Slot slot) { - getMenu().getView().setPreventSorting(true); - final int slotIndex = slot.getContainerSlot(); - mouseScrolledInInventory(up, slot.getItem(), slotIndex); - } - - private void mouseScrolledInInventory(final boolean up, final ItemStack stack, final int slotIndex) { - final GridScrollMode scrollMode = getScrollModeWhenScrollingOnInventoryArea(up); - if (scrollMode == null) { - return; - } - getMenu().onScroll( - StorageChannelTypes.ITEM, - ItemResource.ofItemStack(stack), - scrollMode, - slotIndex - ); - } - - private void mouseScrolledInGrid(final boolean up) { - getMenu().getView().setPreventSorting(true); - final GridScrollMode scrollMode = getScrollModeWhenScrollingOnGridArea(up); - if (scrollMode == null) { - return; - } - final GridResource resource = getMenu().getView().getAll().get(gridSlotNumber); - if (!(resource instanceof PlatformGridResource platformGridResource)) { - return; - } - platformGridResource.onScroll(scrollMode, getMenu()); - } - - @Nullable - private static GridScrollMode getScrollModeWhenScrollingOnInventoryArea(final boolean up) { - if (hasShiftDown()) { - return up ? GridScrollMode.INVENTORY_TO_GRID : GridScrollMode.GRID_TO_INVENTORY; - } - return null; - } - - @Nullable - private static GridScrollMode getScrollModeWhenScrollingOnGridArea(final boolean up) { - final boolean shift = hasShiftDown(); - final boolean ctrl = hasControlDown(); - if (shift && ctrl) { - return null; - } - return getScrollModeWhenScrollingOnGridArea(up, shift, ctrl); - } - - @Nullable - private static GridScrollMode getScrollModeWhenScrollingOnGridArea(final boolean up, - final boolean shift, - final boolean ctrl) { - if (up) { - if (shift) { - return GridScrollMode.INVENTORY_TO_GRID; - } - } else { - if (shift) { - return GridScrollMode.GRID_TO_INVENTORY; - } else if (ctrl) { - return GridScrollMode.GRID_TO_CURSOR; - } - } - return null; - } - - @Override - public boolean charTyped(final char unknown1, final int unknown2) { - return (searchField != null && searchField.charTyped(unknown1, unknown2)) - || super.charTyped(unknown1, unknown2); - } - - @Override - public boolean keyPressed(final int key, final int scanCode, final int modifiers) { - // First do the prevent sorting. - // Order matters. In Auto-selected mode, the search field will swallow the SHIFT key. - if (hasShiftDown() && Platform.INSTANCE.getConfig().getGrid().isPreventSortingWhileShiftIsDown()) { - getMenu().getView().setPreventSorting(true); - } - - if (searchField != null - && (searchField.keyPressed(key, scanCode, modifiers) || searchField.canConsumeInput())) { - return true; - } - - return super.keyPressed(key, scanCode, modifiers); - } - - @Override - public boolean keyReleased(final int key, final int scanCode, final int modifiers) { - if (getMenu().getView().setPreventSorting(false)) { - getMenu().getView().sort(); - } - - return super.keyReleased(key, scanCode, modifiers); + return TEXTURE; } } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/grid/GridSearchBoxWidget.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/grid/GridSearchBoxWidget.java index fcc84ee52..ef18e46e7 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/grid/GridSearchBoxWidget.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/grid/GridSearchBoxWidget.java @@ -1,6 +1,6 @@ package com.refinedmods.refinedstorage2.platform.common.screen.grid; -import com.refinedmods.refinedstorage2.api.core.History; +import com.refinedmods.refinedstorage2.platform.common.screen.widget.History; import com.refinedmods.refinedstorage2.platform.common.screen.widget.SearchFieldWidget; import com.refinedmods.refinedstorage2.query.lexer.Lexer; import com.refinedmods.refinedstorage2.query.lexer.LexerException; diff --git a/refinedstorage2-core-api/src/main/java/com/refinedmods/refinedstorage2/api/core/util/LastModified.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/grid/LastModified.java similarity index 85% rename from refinedstorage2-core-api/src/main/java/com/refinedmods/refinedstorage2/api/core/util/LastModified.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/grid/LastModified.java index d56e8de40..4f6e481e0 100644 --- a/refinedstorage2-core-api/src/main/java/com/refinedmods/refinedstorage2/api/core/util/LastModified.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/grid/LastModified.java @@ -1,9 +1,6 @@ -package com.refinedmods.refinedstorage2.api.core.util; +package com.refinedmods.refinedstorage2.platform.common.screen.grid; -import org.apiguardian.api.API; - -@API(status = API.Status.STABLE, since = "2.0.0-milestone.1.0") -public record LastModified(Type type, long amount) { +record LastModified(Type type, long amount) { private static final long SECOND = 1000; private static final long MINUTE = SECOND * 60; private static final long HOUR = MINUTE * 60; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/grid/SizeSideButtonWidget.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/grid/SizeSideButtonWidget.java index 43c3a0ada..1a05c0653 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/grid/SizeSideButtonWidget.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/grid/SizeSideButtonWidget.java @@ -1,6 +1,6 @@ package com.refinedmods.refinedstorage2.platform.common.screen.grid; -import com.refinedmods.refinedstorage2.platform.common.containermenu.GridContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.containermenu.grid.AbstractGridContainerMenu; import com.refinedmods.refinedstorage2.platform.common.internal.grid.GridSize; import com.refinedmods.refinedstorage2.platform.common.screen.TooltipRenderer; import com.refinedmods.refinedstorage2.platform.common.screen.widget.AbstractSideButtonWidget; @@ -19,18 +19,18 @@ import static com.refinedmods.refinedstorage2.platform.common.util.IdentifierUtil.createTranslation; public class SizeSideButtonWidget extends AbstractSideButtonWidget { - private final GridContainerMenu menu; + private final AbstractGridContainerMenu menu; private final TooltipRenderer tooltipRenderer; private final Map> tooltips = new EnumMap<>(GridSize.class); - public SizeSideButtonWidget(final GridContainerMenu menu, final TooltipRenderer tooltipRenderer) { + public SizeSideButtonWidget(final AbstractGridContainerMenu menu, final TooltipRenderer tooltipRenderer) { super(createPressAction(menu)); this.menu = menu; this.tooltipRenderer = tooltipRenderer; Arrays.stream(GridSize.values()).forEach(type -> tooltips.put(type, calculateTooltip(type))); } - private static OnPress createPressAction(final GridContainerMenu menu) { + private static OnPress createPressAction(final AbstractGridContainerMenu menu) { return btn -> menu.setSize(menu.getSize().toggle()); } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/grid/SortingDirectionSideButtonWidget.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/grid/SortingDirectionSideButtonWidget.java index d0915c844..af025b413 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/grid/SortingDirectionSideButtonWidget.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/grid/SortingDirectionSideButtonWidget.java @@ -1,7 +1,7 @@ package com.refinedmods.refinedstorage2.platform.common.screen.grid; import com.refinedmods.refinedstorage2.api.grid.view.GridSortingDirection; -import com.refinedmods.refinedstorage2.platform.common.containermenu.GridContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.containermenu.grid.AbstractGridContainerMenu; import com.refinedmods.refinedstorage2.platform.common.screen.TooltipRenderer; import com.refinedmods.refinedstorage2.platform.common.screen.widget.AbstractSideButtonWidget; @@ -19,11 +19,11 @@ import static com.refinedmods.refinedstorage2.platform.common.util.IdentifierUtil.createTranslation; public class SortingDirectionSideButtonWidget extends AbstractSideButtonWidget { - private final GridContainerMenu menu; + private final AbstractGridContainerMenu menu; private final TooltipRenderer tooltipRenderer; private final Map> tooltips = new EnumMap<>(GridSortingDirection.class); - public SortingDirectionSideButtonWidget(final GridContainerMenu menu, + public SortingDirectionSideButtonWidget(final AbstractGridContainerMenu menu, final TooltipRenderer tooltipRenderer) { super(createPressAction(menu)); this.menu = menu; @@ -31,7 +31,7 @@ public SortingDirectionSideButtonWidget(final GridContainerMenu menu, Arrays.stream(GridSortingDirection.values()).forEach(type -> tooltips.put(type, calculateTooltip(type))); } - private static OnPress createPressAction(final GridContainerMenu menu) { + private static OnPress createPressAction(final AbstractGridContainerMenu menu) { return btn -> menu.setSortingDirection(toggle(menu.getSortingDirection())); } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/grid/SortingTypeSideButtonWidget.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/grid/SortingTypeSideButtonWidget.java index 2435bffd7..a4983dc77 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/grid/SortingTypeSideButtonWidget.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/grid/SortingTypeSideButtonWidget.java @@ -1,6 +1,6 @@ package com.refinedmods.refinedstorage2.platform.common.screen.grid; -import com.refinedmods.refinedstorage2.platform.common.containermenu.GridContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.containermenu.grid.AbstractGridContainerMenu; import com.refinedmods.refinedstorage2.platform.common.internal.grid.GridSortingTypes; import com.refinedmods.refinedstorage2.platform.common.screen.TooltipRenderer; import com.refinedmods.refinedstorage2.platform.common.screen.widget.AbstractSideButtonWidget; @@ -19,18 +19,18 @@ import static com.refinedmods.refinedstorage2.platform.common.util.IdentifierUtil.createTranslation; public class SortingTypeSideButtonWidget extends AbstractSideButtonWidget { - private final GridContainerMenu menu; + private final AbstractGridContainerMenu menu; private final TooltipRenderer tooltipRenderer; private final Map> tooltips = new EnumMap<>(GridSortingTypes.class); - public SortingTypeSideButtonWidget(final GridContainerMenu menu, final TooltipRenderer tooltipRenderer) { + public SortingTypeSideButtonWidget(final AbstractGridContainerMenu menu, final TooltipRenderer tooltipRenderer) { super(createPressAction(menu)); this.menu = menu; this.tooltipRenderer = tooltipRenderer; Arrays.stream(GridSortingTypes.values()).forEach(type -> tooltips.put(type, calculateTooltip(type))); } - private static OnPress createPressAction(final GridContainerMenu menu) { + private static OnPress createPressAction(final AbstractGridContainerMenu menu) { return btn -> menu.setSortingType(toggle(menu.getSortingType())); } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/grid/StorageChannelTypeSideButtonWidget.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/grid/StorageChannelTypeSideButtonWidget.java index b5241e2cd..20624ed64 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/grid/StorageChannelTypeSideButtonWidget.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/grid/StorageChannelTypeSideButtonWidget.java @@ -1,7 +1,7 @@ package com.refinedmods.refinedstorage2.platform.common.screen.grid; import com.refinedmods.refinedstorage2.platform.api.storage.channel.PlatformStorageChannelType; -import com.refinedmods.refinedstorage2.platform.common.containermenu.GridContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.containermenu.grid.AbstractGridContainerMenu; import com.refinedmods.refinedstorage2.platform.common.screen.TextureIds; import com.refinedmods.refinedstorage2.platform.common.screen.TooltipRenderer; import com.refinedmods.refinedstorage2.platform.common.screen.widget.AbstractSideButtonWidget; @@ -22,11 +22,11 @@ public class StorageChannelTypeSideButtonWidget extends AbstractSideButtonWidget { private static final List ALL_TOOLTIP = calculateTooltip(null); - private final GridContainerMenu menu; + private final AbstractGridContainerMenu menu; private final TooltipRenderer tooltipRenderer; private final Map, List> tooltips = new HashMap<>(); - public StorageChannelTypeSideButtonWidget(final GridContainerMenu menu, + public StorageChannelTypeSideButtonWidget(final AbstractGridContainerMenu menu, final TooltipRenderer tooltipRenderer, final List> storageChannelTypes) { super(createPressAction(menu)); @@ -37,7 +37,7 @@ public StorageChannelTypeSideButtonWidget(final GridContainerMenu menu, ); } - private static OnPress createPressAction(final GridContainerMenu menu) { + private static OnPress createPressAction(final AbstractGridContainerMenu menu) { return btn -> menu.toggleStorageChannelType(); } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/grid/SynchronizationSideButtonWidget.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/grid/SynchronizationSideButtonWidget.java index 353e0a7c9..c38f7faaf 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/grid/SynchronizationSideButtonWidget.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/grid/SynchronizationSideButtonWidget.java @@ -1,7 +1,7 @@ package com.refinedmods.refinedstorage2.platform.common.screen.grid; import com.refinedmods.refinedstorage2.platform.api.grid.GridSynchronizer; -import com.refinedmods.refinedstorage2.platform.common.containermenu.GridContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.containermenu.grid.AbstractGridContainerMenu; import com.refinedmods.refinedstorage2.platform.common.screen.TooltipRenderer; import com.refinedmods.refinedstorage2.platform.common.screen.widget.AbstractSideButtonWidget; @@ -18,11 +18,11 @@ import static com.refinedmods.refinedstorage2.platform.common.util.IdentifierUtil.createTranslation; public class SynchronizationSideButtonWidget extends AbstractSideButtonWidget { - private final GridContainerMenu menu; + private final AbstractGridContainerMenu menu; private final TooltipRenderer tooltipRenderer; private final Map> tooltips = new HashMap<>(); - public SynchronizationSideButtonWidget(final GridContainerMenu menu, + public SynchronizationSideButtonWidget(final AbstractGridContainerMenu menu, final TooltipRenderer tooltipRenderer, final List synchronizers) { super(createPressAction(menu)); @@ -31,7 +31,7 @@ public SynchronizationSideButtonWidget(final GridContainerMenu menu, synchronizers.forEach(synchronizer -> tooltips.put(synchronizer, calculateTooltip(synchronizer))); } - private static OnPress createPressAction(final GridContainerMenu menu) { + private static OnPress createPressAction(final AbstractGridContainerMenu menu) { return btn -> menu.toggleSynchronizer(); } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/widget/AbstractSideButtonWidget.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/widget/AbstractSideButtonWidget.java index af0bcab28..68c9773e1 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/widget/AbstractSideButtonWidget.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/widget/AbstractSideButtonWidget.java @@ -53,7 +53,7 @@ public void renderButton(final PoseStack poseStack, final int mouseX, final int setBlitOffset(originalZOffset); if (isHovered) { - onTooltip(poseStack, mouseX, mouseY); + onTooltip(poseStack, mouseX, mouseY); // TODO - remove use setTooltip. } RenderSystem.disableDepthTest(); diff --git a/refinedstorage2-core-api/src/main/java/com/refinedmods/refinedstorage2/api/core/History.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/widget/History.java similarity index 88% rename from refinedstorage2-core-api/src/main/java/com/refinedmods/refinedstorage2/api/core/History.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/widget/History.java index af198e75a..24d951abb 100644 --- a/refinedstorage2-core-api/src/main/java/com/refinedmods/refinedstorage2/api/core/History.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/widget/History.java @@ -1,10 +1,7 @@ -package com.refinedmods.refinedstorage2.api.core; +package com.refinedmods.refinedstorage2.platform.common.screen.widget; import java.util.List; -import org.apiguardian.api.API; - -@API(status = API.Status.STABLE, since = "2.0.0-milestone.1.0") public class History { private final List items; private int index = -1; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/widget/SearchFieldWidget.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/widget/SearchFieldWidget.java index 0015f16a0..41e749e31 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/widget/SearchFieldWidget.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/widget/SearchFieldWidget.java @@ -1,6 +1,5 @@ package com.refinedmods.refinedstorage2.platform.common.screen.widget; -import com.refinedmods.refinedstorage2.api.core.History; import com.refinedmods.refinedstorage2.platform.common.Platform; import com.refinedmods.refinedstorage2.platform.common.content.KeyMappings; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/util/BucketQuantityFormatter.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/util/BucketAmountFormatting.java similarity index 80% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/util/BucketQuantityFormatter.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/util/BucketAmountFormatting.java index bc1e5b2a8..5cc38ecc8 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/util/BucketQuantityFormatter.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/util/BucketAmountFormatting.java @@ -1,12 +1,12 @@ package com.refinedmods.refinedstorage2.platform.common.util; -import com.refinedmods.refinedstorage2.api.core.QuantityFormatter; +import com.refinedmods.refinedstorage2.platform.api.util.AmountFormatting; import java.text.DecimalFormat; import java.text.DecimalFormatSymbols; import java.util.Locale; -public final class BucketQuantityFormatter { +public final class BucketAmountFormatting { private static final DecimalFormat LESS_THAN_1_BUCKET_FORMATTER = new DecimalFormat("0.#", DecimalFormatSymbols.getInstance(Locale.US)); private static final DecimalFormat FORMATTER = @@ -14,14 +14,14 @@ public final class BucketQuantityFormatter { private final long bucketAmount; - public BucketQuantityFormatter(final long bucketAmount) { + public BucketAmountFormatting(final long bucketAmount) { this.bucketAmount = bucketAmount; } public String formatWithUnits(final long droplets) { final double buckets = convertToBuckets(droplets); if (buckets >= 1) { - return QuantityFormatter.formatWithUnits((long) Math.floor(buckets)); + return AmountFormatting.formatWithUnits((long) Math.floor(buckets)); } else { return LESS_THAN_1_BUCKET_FORMATTER.format(buckets); } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/util/PacketUtil.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/util/PacketUtil.java index e76ead7ff..c7c04eed0 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/util/PacketUtil.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/util/PacketUtil.java @@ -26,13 +26,13 @@ public static ItemResource readItemResource(final FriendlyByteBuf buf) { return new ItemResource(Item.byId(id), nbt); } - @SuppressWarnings("deprecation") // forge deprecates Registry access + @SuppressWarnings({"deprecation", "RedundantSuppression"}) // forge deprecates Registry access public static void writeFluidResource(final FriendlyByteBuf buf, final FluidResource itemResource) { buf.writeVarInt(BuiltInRegistries.FLUID.getId(itemResource.fluid())); buf.writeNbt(itemResource.tag()); } - @SuppressWarnings("deprecation") // forge deprecates Registry access + @SuppressWarnings({"deprecation", "RedundantSuppression"}) // forge deprecates Registry access public static FluidResource readFluidResource(final FriendlyByteBuf buf) { final int id = buf.readVarInt(); final CompoundTag nbt = buf.readNbt(); diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/blockstates/cable.json b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/blockstates/cable.json deleted file mode 100644 index 7091faeed..000000000 --- a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/blockstates/cable.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "multipart": [ - { - "apply": { - "model": "refinedstorage2:block/cable_core" - } - }, - { - "when": { - "north": true - }, - "apply": { - "model": "refinedstorage2:block/cable_extension" - } - }, - { - "when": { - "east": true - }, - "apply": { - "model": "refinedstorage2:block/cable_extension", - "y": 90 - } - }, - { - "when": { - "south": true - }, - "apply": { - "model": "refinedstorage2:block/cable_extension", - "x": 180 - } - }, - { - "when": { - "west": true - }, - "apply": { - "model": "refinedstorage2:block/cable_extension", - "y": 270 - } - }, - { - "when": { - "up": true - }, - "apply": { - "model": "refinedstorage2:block/cable_extension", - "x": 270 - } - }, - { - "when": { - "down": true - }, - "apply": { - "model": "refinedstorage2:block/cable_extension", - "x": 90 - } - } - ] -} diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/lang/en_us.json b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/lang/en_us.json index 1406cbe6c..99b73e3dc 100644 --- a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/lang/en_us.json +++ b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/lang/en_us.json @@ -5,6 +5,7 @@ "block.refinedstorage2.disk_drive": "Disk Drive", "block.refinedstorage2.machine_casing": "Machine Casing", "block.refinedstorage2.grid": "Grid", + "block.refinedstorage2.crafting_grid": "Crafting Grid", "block.refinedstorage2.controller": "Controller", "block.refinedstorage2.creative_controller": "Creative Controller", "block.refinedstorage2.1k_storage_block": "1K Storage Block", @@ -45,6 +46,8 @@ "gui.refinedstorage2.grid.synchronizer.rei.two_way": "REI two-way", "gui.refinedstorage2.grid.storage_channel_type": "Storage channel", "gui.refinedstorage2.grid.storage_channel_type.all": "All", + "gui.refinedstorage2.crafting_grid.move.network": "Move items to network", + "gui.refinedstorage2.crafting_grid.move.inventory": "Move items to inventory", "gui.refinedstorage2.exporter.scheduling_mode": "Scheduling mode", "gui.refinedstorage2.exporter.scheduling_mode.first_available": "First available", "gui.refinedstorage2.exporter.scheduling_mode.round_robin": "Round robin", @@ -67,6 +70,7 @@ "gui.refinedstorage2.access_mode.insert_extract": "Insert and extract", "gui.refinedstorage2.access_mode.insert": "Insert only", "gui.refinedstorage2.access_mode.extract": "Extract only", + "gui.refinedstorage2.applicable_upgrades": "Applicable upgrades:", "item.refinedstorage2.quartz_enriched_iron": "Quartz Enriched Iron", "item.refinedstorage2.processor_binding": "Processor Binding", "item.refinedstorage2.silicon": "Silicon", @@ -103,10 +107,7 @@ "item.refinedstorage2.stack_upgrade": "Stack Upgrade", "item.refinedstorage2.upgrade.supported_by": "Supported by:", "misc.refinedstorage2.stored": "Stored: %s", - "misc.refinedstorage2.stored_with_capacity": "Stored: %s / %s", - "misc.refinedstorage2.stacks": "Stacks: %s", - "misc.refinedstorage2.stacks_with_capacity": "Stacks: %s / %s", - "misc.refinedstorage2.full": "%d%% full", + "misc.refinedstorage2.stored_with_capacity": "Stored: %s / %s (%d%%)", "misc.refinedstorage2.total": "%d total", "misc.refinedstorage2.last_modified.just_now": "Last modified just now by %s", "misc.refinedstorage2.last_modified.second": "Last modified %d second ago by %s", @@ -123,7 +124,9 @@ "misc.refinedstorage2.last_modified.years": "Last modified %d years ago by %s", "misc.refinedstorage2.storage_channel_type.item": "Item", "misc.refinedstorage2.storage_channel_type.fluid": "Fluid", - "key.refinedstorage2.focus_search_bar": "Focus Search Bar", + "key.refinedstorage2.focus_search_bar": "Focus search bar", + "key.refinedstorage2.clear_crafting_grid_matrix_to_network": "Clear Crafting Grid matrix to network", + "key.refinedstorage2.clear_crafting_grid_matrix_to_inventory": "Clear Crafting Grid matrix to inventory", "refinedstorage2.subtitle.wrench": "Wrench used", "category.refinedstorage2.key_bindings": "Refined Storage 2", "text.autoconfig.refinedstorage2.title": "Refined Storage 2", @@ -141,6 +144,9 @@ "text.autoconfig.refinedstorage2.option.grid.sortingDirection": "Sorting direction", "text.autoconfig.refinedstorage2.option.grid.sortingType": "Sorting type", "text.autoconfig.refinedstorage2.option.grid.size": "Size", + "text.autoconfig.refinedstorage2.option.craftingGrid": "Crafting Grid", + "text.autoconfig.refinedstorage2.option.craftingGrid.energyUsage": "Energy usage", + "text.autoconfig.refinedstorage2.option.craftingGrid.craftingMatrixCloseBehavior": "Crafting matrix close behavior", "text.autoconfig.refinedstorage2.option.controller": "Controller", "text.autoconfig.refinedstorage2.option.controller.energyCapacity": "Energy capacity", "text.autoconfig.refinedstorage2.option.cable": "Cable", @@ -180,6 +186,8 @@ "advancements.refinedstorage2.storing_items.description": "Craft a Storage Disk and put it in your Disk Drive", "advancements.refinedstorage2.viewing_your_storage": "Viewing your storage", "advancements.refinedstorage2.viewing_your_storage.description": "Craft a Grid to interact with your storage", + "advancements.refinedstorage2.upgrading_your_grid": "Upgrading your Grid", + "advancements.refinedstorage2.upgrading_your_grid.description": "Upgrade your Grid to a Crafting Grid to get crafting abilities", "advancements.refinedstorage2.storing_fluids": "Storing fluids", "advancements.refinedstorage2.storing_fluids.description": "Craft a Fluid Storage Disk and put it in your Disk Drive", "advancements.refinedstorage2.importing": "Importing", diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/models/block/cable_core.json b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/models/block/cable/core/base.json similarity index 91% rename from refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/models/block/cable_core.json rename to refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/models/block/cable/core/base.json index 11070b692..150a881a5 100644 --- a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/models/block/cable_core.json +++ b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/models/block/cable/core/base.json @@ -1,9 +1,5 @@ { "render_type": "cutout", - "textures": { - "cable": "refinedstorage2:block/cable", - "particle": "refinedstorage2:block/cable" - }, "elements": [ { "name": "Core", @@ -75,4 +71,4 @@ } } ] -} +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/models/block/cable_extension.json b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/models/block/cable/extension/base.json similarity index 91% rename from refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/models/block/cable_extension.json rename to refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/models/block/cable/extension/base.json index 31ae5466f..ad4cf228f 100644 --- a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/models/block/cable_extension.json +++ b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/models/block/cable/extension/base.json @@ -1,9 +1,5 @@ { "render_type": "cutout", - "textures": { - "cable": "refinedstorage2:block/cable", - "particle": "refinedstorage2:block/cable" - }, "elements": [ { "name": "North", @@ -75,4 +71,4 @@ } } ] -} +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/models/block/exporter.json b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/models/block/exporter.json index b3b0e402c..34117dbd6 100644 --- a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/models/block/exporter.json +++ b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/models/block/exporter.json @@ -1,7 +1,7 @@ { "render_type": "cutout", "textures": { - "border": "refinedstorage2:block/cable_part_border" + "border": "refinedstorage2:block/cable/part_border" }, "elements": [ { diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/models/block/external_storage.json b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/models/block/external_storage.json index 787ca9f59..261d5abd5 100644 --- a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/models/block/external_storage.json +++ b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/models/block/external_storage.json @@ -1,7 +1,7 @@ { "render_type": "cutout", "textures": { - "border": "refinedstorage2:block/cable_part_border" + "border": "refinedstorage2:block/cable/part_border" }, "elements": [ { diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/models/block/importer.json b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/models/block/importer.json index 399b50be8..b014235e0 100644 --- a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/models/block/importer.json +++ b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/models/block/importer.json @@ -1,7 +1,7 @@ { "render_type": "cutout", "textures": { - "border": "refinedstorage2:block/cable_part_border" + "border": "refinedstorage2:block/cable/part_border" }, "elements": [ { diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/models/item/cable.json b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/models/item/cable/base.json similarity index 98% rename from refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/models/item/cable.json rename to refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/models/item/cable/base.json index ece5853d2..1e8956b4a 100644 --- a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/models/item/cable.json +++ b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/models/item/cable/base.json @@ -1,8 +1,5 @@ { "parent": "block/block", - "textures": { - "cable": "refinedstorage2:block/cable" - }, "elements": [ { "name": "Core", @@ -230,4 +227,4 @@ } } ] -} +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/models/item/exporter.json b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/models/item/exporter/base.json similarity index 98% rename from refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/models/item/exporter.json rename to refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/models/item/exporter/base.json index b862670ef..bfab419be 100644 --- a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/models/item/exporter.json +++ b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/models/item/exporter/base.json @@ -1,8 +1,7 @@ { "parent": "block/block", "textures": { - "cable": "refinedstorage2:block/cable", - "border": "refinedstorage2:block/cable_part_border" + "border": "refinedstorage2:block/cable/part_border" }, "elements": [ { diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/models/item/external_storage.json b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/models/item/external_storage/base.json similarity index 98% rename from refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/models/item/external_storage.json rename to refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/models/item/external_storage/base.json index d957c2434..45c2ef11f 100644 --- a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/models/item/external_storage.json +++ b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/models/item/external_storage/base.json @@ -1,8 +1,7 @@ { "parent": "block/block", "textures": { - "cable": "refinedstorage2:block/cable", - "border": "refinedstorage2:block/cable_part_border" + "border": "refinedstorage2:block/cable/part_border" }, "elements": [ { diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/models/item/importer.json b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/models/item/importer/base.json similarity index 98% rename from refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/models/item/importer.json rename to refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/models/item/importer/base.json index 5ea6f0090..e475ba420 100644 --- a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/models/item/importer.json +++ b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/models/item/importer/base.json @@ -1,8 +1,7 @@ { "parent": "block/block", "textures": { - "cable": "refinedstorage2:block/cable", - "border": "refinedstorage2:block/cable_part_border" + "border": "refinedstorage2:block/cable/part_border" }, "elements": [ { diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/cable.png b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/cable.png deleted file mode 100644 index 19d20839e..000000000 Binary files a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/cable.png and /dev/null differ diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/cable/black.png b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/cable/black.png new file mode 100644 index 000000000..737a72f2a Binary files /dev/null and b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/cable/black.png differ diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/cable/blue.png b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/cable/blue.png new file mode 100644 index 000000000..6ca0afcdc Binary files /dev/null and b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/cable/blue.png differ diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/cable/brown.png b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/cable/brown.png new file mode 100644 index 000000000..c357748b6 Binary files /dev/null and b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/cable/brown.png differ diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/cable/cyan.png b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/cable/cyan.png new file mode 100644 index 000000000..52a564b10 Binary files /dev/null and b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/cable/cyan.png differ diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/cable/gray.png b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/cable/gray.png new file mode 100644 index 000000000..118320ba7 Binary files /dev/null and b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/cable/gray.png differ diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/cable/green.png b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/cable/green.png new file mode 100644 index 000000000..de4eabf38 Binary files /dev/null and b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/cable/green.png differ diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/cable/light_blue.png b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/cable/light_blue.png new file mode 100644 index 000000000..5ba0406c2 Binary files /dev/null and b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/cable/light_blue.png differ diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/cable/light_gray.png b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/cable/light_gray.png new file mode 100644 index 000000000..be689d0bb Binary files /dev/null and b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/cable/light_gray.png differ diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/cable/lime.png b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/cable/lime.png new file mode 100644 index 000000000..361e18711 Binary files /dev/null and b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/cable/lime.png differ diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/cable/magenta.png b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/cable/magenta.png new file mode 100644 index 000000000..745382ee5 Binary files /dev/null and b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/cable/magenta.png differ diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/cable/orange.png b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/cable/orange.png new file mode 100644 index 000000000..67202f5dc Binary files /dev/null and b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/cable/orange.png differ diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/cable_part_border.png b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/cable/part_border.png similarity index 100% rename from refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/cable_part_border.png rename to refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/cable/part_border.png diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/cable/pink.png b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/cable/pink.png new file mode 100644 index 000000000..19ed0e69b Binary files /dev/null and b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/cable/pink.png differ diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/cable/purple.png b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/cable/purple.png new file mode 100644 index 000000000..5460b1803 Binary files /dev/null and b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/cable/purple.png differ diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/cable/red.png b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/cable/red.png new file mode 100644 index 000000000..a817451da Binary files /dev/null and b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/cable/red.png differ diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/cable/white.png b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/cable/white.png new file mode 100644 index 000000000..2a41a6884 Binary files /dev/null and b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/cable/white.png differ diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/cable/yellow.png b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/cable/yellow.png new file mode 100644 index 000000000..6413b91ee Binary files /dev/null and b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/cable/yellow.png differ diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/crafting_grid/back.png b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/crafting_grid/back.png new file mode 100644 index 000000000..ffb76f755 Binary files /dev/null and b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/crafting_grid/back.png differ diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/crafting_grid/cutouts/black.png b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/crafting_grid/cutouts/black.png new file mode 100644 index 000000000..c0ee70746 Binary files /dev/null and b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/crafting_grid/cutouts/black.png differ diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/crafting_grid/cutouts/blue.png b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/crafting_grid/cutouts/blue.png new file mode 100644 index 000000000..5d3daca76 Binary files /dev/null and b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/crafting_grid/cutouts/blue.png differ diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/crafting_grid/cutouts/brown.png b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/crafting_grid/cutouts/brown.png new file mode 100644 index 000000000..943a46f9e Binary files /dev/null and b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/crafting_grid/cutouts/brown.png differ diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/crafting_grid/cutouts/cyan.png b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/crafting_grid/cutouts/cyan.png new file mode 100644 index 000000000..1772f299c Binary files /dev/null and b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/crafting_grid/cutouts/cyan.png differ diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/crafting_grid/cutouts/gray.png b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/crafting_grid/cutouts/gray.png new file mode 100644 index 000000000..fc6eee738 Binary files /dev/null and b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/crafting_grid/cutouts/gray.png differ diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/crafting_grid/cutouts/green.png b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/crafting_grid/cutouts/green.png new file mode 100644 index 000000000..b001e2cb2 Binary files /dev/null and b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/crafting_grid/cutouts/green.png differ diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/crafting_grid/cutouts/inactive.png b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/crafting_grid/cutouts/inactive.png new file mode 100644 index 000000000..00d5198c3 Binary files /dev/null and b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/crafting_grid/cutouts/inactive.png differ diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/crafting_grid/cutouts/light_blue.png b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/crafting_grid/cutouts/light_blue.png new file mode 100644 index 000000000..1531ca42e Binary files /dev/null and b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/crafting_grid/cutouts/light_blue.png differ diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/crafting_grid/cutouts/light_gray.png b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/crafting_grid/cutouts/light_gray.png new file mode 100644 index 000000000..cca249f19 Binary files /dev/null and b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/crafting_grid/cutouts/light_gray.png differ diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/crafting_grid/cutouts/lime.png b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/crafting_grid/cutouts/lime.png new file mode 100644 index 000000000..f46436bd0 Binary files /dev/null and b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/crafting_grid/cutouts/lime.png differ diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/crafting_grid/cutouts/magenta.png b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/crafting_grid/cutouts/magenta.png new file mode 100644 index 000000000..f7618bb99 Binary files /dev/null and b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/crafting_grid/cutouts/magenta.png differ diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/crafting_grid/cutouts/orange.png b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/crafting_grid/cutouts/orange.png new file mode 100644 index 000000000..aded006b9 Binary files /dev/null and b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/crafting_grid/cutouts/orange.png differ diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/crafting_grid/cutouts/pink.png b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/crafting_grid/cutouts/pink.png new file mode 100644 index 000000000..d670fa877 Binary files /dev/null and b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/crafting_grid/cutouts/pink.png differ diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/crafting_grid/cutouts/purple.png b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/crafting_grid/cutouts/purple.png new file mode 100644 index 000000000..51dc9c0b7 Binary files /dev/null and b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/crafting_grid/cutouts/purple.png differ diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/crafting_grid/cutouts/red.png b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/crafting_grid/cutouts/red.png new file mode 100644 index 000000000..b4783816d Binary files /dev/null and b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/crafting_grid/cutouts/red.png differ diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/crafting_grid/cutouts/white.png b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/crafting_grid/cutouts/white.png new file mode 100644 index 000000000..b7d8bd1c0 Binary files /dev/null and b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/crafting_grid/cutouts/white.png differ diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/crafting_grid/cutouts/yellow.png b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/crafting_grid/cutouts/yellow.png new file mode 100644 index 000000000..6253ee54c Binary files /dev/null and b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/crafting_grid/cutouts/yellow.png differ diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/crafting_grid/front.png b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/crafting_grid/front.png new file mode 100644 index 000000000..d6f059405 Binary files /dev/null and b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/crafting_grid/front.png differ diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/crafting_grid/left.png b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/crafting_grid/left.png new file mode 100644 index 000000000..a4a5b2664 Binary files /dev/null and b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/crafting_grid/left.png differ diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/crafting_grid/right.png b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/crafting_grid/right.png new file mode 100644 index 000000000..eb4e500c5 Binary files /dev/null and b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/crafting_grid/right.png differ diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/crafting_grid/top.png b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/crafting_grid/top.png new file mode 100644 index 000000000..0d782d2d0 Binary files /dev/null and b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/crafting_grid/top.png differ diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/gui/crafting_grid.png b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/gui/crafting_grid.png new file mode 100644 index 000000000..9a4c5e018 Binary files /dev/null and b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/gui/crafting_grid.png differ diff --git a/refinedstorage2-platform-common/src/main/resources/data/refinedstorage2/advancements/connecting.json b/refinedstorage2-platform-common/src/main/resources/data/refinedstorage2/advancements/connecting.json index e5760e938..f235632ea 100644 --- a/refinedstorage2-platform-common/src/main/resources/data/refinedstorage2/advancements/connecting.json +++ b/refinedstorage2-platform-common/src/main/resources/data/refinedstorage2/advancements/connecting.json @@ -17,9 +17,7 @@ "conditions": { "items": [ { - "items": [ - "refinedstorage2:cable" - ] + "tag": "refinedstorage2:cables" } ] } diff --git a/refinedstorage2-platform-common/src/main/resources/data/refinedstorage2/advancements/exporting.json b/refinedstorage2-platform-common/src/main/resources/data/refinedstorage2/advancements/exporting.json index c4b99bda8..3662ca317 100644 --- a/refinedstorage2-platform-common/src/main/resources/data/refinedstorage2/advancements/exporting.json +++ b/refinedstorage2-platform-common/src/main/resources/data/refinedstorage2/advancements/exporting.json @@ -17,9 +17,7 @@ "conditions": { "items": [ { - "items": [ - "refinedstorage2:exporter" - ] + "tag": "refinedstorage2:exporters" } ] } diff --git a/refinedstorage2-platform-common/src/main/resources/data/refinedstorage2/advancements/importing.json b/refinedstorage2-platform-common/src/main/resources/data/refinedstorage2/advancements/importing.json index fc1b48895..b8be6d1fd 100644 --- a/refinedstorage2-platform-common/src/main/resources/data/refinedstorage2/advancements/importing.json +++ b/refinedstorage2-platform-common/src/main/resources/data/refinedstorage2/advancements/importing.json @@ -17,9 +17,7 @@ "conditions": { "items": [ { - "items": [ - "refinedstorage2:importer" - ] + "tag": "refinedstorage2:importers" } ] } diff --git a/refinedstorage2-platform-common/src/main/resources/data/refinedstorage2/advancements/storing_externally.json b/refinedstorage2-platform-common/src/main/resources/data/refinedstorage2/advancements/storing_externally.json index 8ef989c86..4753d30f7 100644 --- a/refinedstorage2-platform-common/src/main/resources/data/refinedstorage2/advancements/storing_externally.json +++ b/refinedstorage2-platform-common/src/main/resources/data/refinedstorage2/advancements/storing_externally.json @@ -17,9 +17,7 @@ "conditions": { "items": [ { - "items": [ - "refinedstorage2:external_storage" - ] + "tag": "refinedstorage2:external_storages" } ] } diff --git a/refinedstorage2-platform-common/src/main/resources/data/refinedstorage2/advancements/upgrading_your_grid.json b/refinedstorage2-platform-common/src/main/resources/data/refinedstorage2/advancements/upgrading_your_grid.json new file mode 100644 index 000000000..81ee9ab70 --- /dev/null +++ b/refinedstorage2-platform-common/src/main/resources/data/refinedstorage2/advancements/upgrading_your_grid.json @@ -0,0 +1,26 @@ +{ + "display": { + "icon": { + "item": "refinedstorage2:crafting_grid" + }, + "title": { + "translate": "advancements.refinedstorage2.upgrading_your_grid" + }, + "description": { + "translate": "advancements.refinedstorage2.upgrading_your_grid.description" + } + }, + "parent": "refinedstorage2:viewing_your_storage", + "criteria": { + "crafting_grid_in_inventory": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "refinedstorage2:crafting_grids" + } + ] + } + } + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/main/resources/data/refinedstorage2/recipes/crafting_grid.json b/refinedstorage2-platform-common/src/main/resources/data/refinedstorage2/recipes/crafting_grid.json new file mode 100644 index 000000000..242f67e15 --- /dev/null +++ b/refinedstorage2-platform-common/src/main/resources/data/refinedstorage2/recipes/crafting_grid.json @@ -0,0 +1,17 @@ +{ + "type": "minecraft:crafting_shapeless", + "ingredients": [ + { + "item": "refinedstorage2:grid" + }, + { + "item": "refinedstorage2:advanced_processor" + }, + { + "item": "minecraft:crafting_table" + } + ], + "result": { + "item": "refinedstorage2:crafting_grid" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/PlatformTestFixtures.java b/refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/PlatformTestFixtures.java index 3b0768a78..81e3922ac 100644 --- a/refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/PlatformTestFixtures.java +++ b/refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/PlatformTestFixtures.java @@ -1,16 +1,17 @@ package com.refinedmods.refinedstorage2.platform.common; -import com.refinedmods.refinedstorage2.api.core.registry.OrderedRegistry; -import com.refinedmods.refinedstorage2.api.core.registry.OrderedRegistryImpl; +import com.refinedmods.refinedstorage2.platform.api.registry.PlatformRegistry; import com.refinedmods.refinedstorage2.platform.api.storage.type.StorageType; +import com.refinedmods.refinedstorage2.platform.common.internal.registry.PlatformRegistryImpl; import com.refinedmods.refinedstorage2.platform.common.internal.storage.type.ItemStorageType; import net.minecraft.resources.ResourceLocation; public final class PlatformTestFixtures { - public static final OrderedRegistry> STORAGE_TYPE_REGISTRY = - new OrderedRegistryImpl<>(new ResourceLocation("item"), ItemStorageType.INSTANCE); - + public static final PlatformRegistry> STORAGE_TYPE_REGISTRY = new PlatformRegistryImpl<>( + new ResourceLocation("item"), + ItemStorageType.INSTANCE + ); private PlatformTestFixtures() { } diff --git a/refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/internal/grid/GridSortingTypesTest.java b/refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/internal/grid/GridSortingTypesTest.java index 65da70680..0fa853b04 100644 --- a/refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/internal/grid/GridSortingTypesTest.java +++ b/refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/internal/grid/GridSortingTypesTest.java @@ -73,28 +73,28 @@ void testSortingAscending(final GridSortingTypes sortingType) { // Assert switch (sortingType) { - case QUANTITY -> assertThat(view.getAll()) + case QUANTITY -> assertThat(view.getViewList()) .extracting(GridResource::getName) .containsExactly( "Stone", "Gold Ingot", "Dirt" ); - case NAME -> assertThat(view.getAll()) + case NAME -> assertThat(view.getViewList()) .extracting(GridResource::getName) .containsExactly( "Dirt", "Gold Ingot", "Stone" ); - case ID -> assertThat(view.getAll()) + case ID -> assertThat(view.getViewList()) .extracting(GridResource::getName) .containsExactly( "Stone", "Dirt", "Gold Ingot" ); - case LAST_MODIFIED -> assertThat(view.getAll()) + case LAST_MODIFIED -> assertThat(view.getViewList()) .extracting(GridResource::getName) .containsExactly( "Gold Ingot", @@ -124,28 +124,28 @@ void testSortingDescending(final GridSortingTypes sortingType) { // Assert switch (sortingType) { - case QUANTITY -> assertThat(view.getAll()) + case QUANTITY -> assertThat(view.getViewList()) .extracting(GridResource::getName) .containsExactly( "Dirt", "Gold Ingot", "Stone" ); - case NAME -> assertThat(view.getAll()) + case NAME -> assertThat(view.getViewList()) .extracting(GridResource::getName) .containsExactly( "Stone", "Gold Ingot", "Dirt" ); - case ID -> assertThat(view.getAll()) + case ID -> assertThat(view.getViewList()) .extracting(GridResource::getName) .containsExactly( "Gold Ingot", "Dirt", "Stone" ); - case LAST_MODIFIED -> assertThat(view.getAll()) + case LAST_MODIFIED -> assertThat(view.getViewList()) .extracting(GridResource::getName) .containsExactly( "Dirt", diff --git a/refinedstorage2-core-api/src/test/java/com/refinedmods/refinedstorage2/api/core/registry/OrderedRegistryImplTest.java b/refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/internal/registry/PlatformRegistryImplTest.java similarity index 67% rename from refinedstorage2-core-api/src/test/java/com/refinedmods/refinedstorage2/api/core/registry/OrderedRegistryImplTest.java rename to refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/internal/registry/PlatformRegistryImplTest.java index bdeff066f..4f615b0e4 100644 --- a/refinedstorage2-core-api/src/test/java/com/refinedmods/refinedstorage2/api/core/registry/OrderedRegistryImplTest.java +++ b/refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/internal/registry/PlatformRegistryImplTest.java @@ -1,19 +1,26 @@ -package com.refinedmods.refinedstorage2.api.core.registry; +package com.refinedmods.refinedstorage2.platform.common.internal.registry; + +import com.refinedmods.refinedstorage2.platform.api.registry.PlatformRegistry; import java.util.List; +import net.minecraft.resources.ResourceLocation; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import static org.assertj.core.api.Assertions.assertThat; import static org.junit.jupiter.api.Assertions.assertThrows; -class OrderedRegistryImplTest { - OrderedRegistry sut; +class PlatformRegistryImplTest { + private static final ResourceLocation A = new ResourceLocation("minecraft:a"); + private static final ResourceLocation B = new ResourceLocation("minecraft:b"); + private static final ResourceLocation C = new ResourceLocation("minecraft:c"); + + PlatformRegistry sut; @BeforeEach void setUp() { - sut = new OrderedRegistryImpl<>("A", 10); + sut = new PlatformRegistryImpl<>(A, 10); } @Test @@ -21,9 +28,9 @@ void testDefaults() { // Assert assertThat(sut.getDefault()).isEqualTo(10); assertThat(sut.getAll()).containsExactly(10); - assertThat(sut.get("A")).get().isEqualTo(10); - assertThat(sut.get("B")).isEmpty(); - assertThat(sut.getId(10)).get().isEqualTo("A"); + assertThat(sut.get(A)).get().isEqualTo(10); + assertThat(sut.get(B)).isEmpty(); + assertThat(sut.getId(10)).get().isEqualTo(A); assertThat(sut.getId(20)).isEmpty(); assertThat(sut.next(10)).isEqualTo(10); assertThat(sut.nextOrNullIfLast(10)).isNull(); @@ -44,16 +51,15 @@ void shouldNotBeAbleToModifyUnderlyingRegistryList() { @Test void shouldRegisterAndRetrieve() { // Act - sut.register("B", 20); + sut.register(B, 20); // Assert assertThat(sut.getDefault()).isEqualTo(10); assertThat(sut.getAll()).containsExactly(10, 20); - assertThat(sut.get("A")).get().isEqualTo(10); - assertThat(sut.get("B")).get().isEqualTo(20); - assertThat(sut.getOrElseDefault("C")).isEqualTo(10); - assertThat(sut.getId(10)).get().isEqualTo("A"); - assertThat(sut.getId(20)).get().isEqualTo("B"); + assertThat(sut.get(A)).get().isEqualTo(10); + assertThat(sut.get(B)).get().isEqualTo(20); + assertThat(sut.getId(10)).get().isEqualTo(A); + assertThat(sut.getId(20)).get().isEqualTo(B); assertThat(sut.next(10)).isEqualTo(20); assertThat(sut.nextOrNullIfLast(10)).isEqualTo(20); assertThat(sut.next(20)).isEqualTo(10); @@ -64,20 +70,20 @@ void shouldRegisterAndRetrieve() { @Test void shouldNotRegisterDuplicateId() { // Arrange - sut.register("B", 20); + sut.register(B, 20); // Act & assert - assertThrows(IllegalArgumentException.class, () -> sut.register("B", 20)); + assertThrows(IllegalArgumentException.class, () -> sut.register(B, 20)); assertThat(sut.getAll()).containsExactly(10, 20); } @Test void shouldNotRegisterDuplicateValue() { // Arrange - sut.register("B", 20); + sut.register(B, 20); // Act & assert - assertThrows(IllegalArgumentException.class, () -> sut.register("C", 20)); + assertThrows(IllegalArgumentException.class, () -> sut.register(C, 20)); assertThat(sut.getAll()).containsExactly(10, 20); } @@ -86,7 +92,7 @@ void shouldNotRegisterDuplicateValue() { void testInvalidRegistration() { // Act & assert assertThrows(NullPointerException.class, () -> sut.register(null, 20)); - assertThrows(NullPointerException.class, () -> sut.register("B", null)); + assertThrows(NullPointerException.class, () -> sut.register(B, null)); assertThrows(NullPointerException.class, () -> sut.register(null, null)); } @@ -94,9 +100,9 @@ void testInvalidRegistration() { @SuppressWarnings("ConstantConditions") void testInvalidDefaults() { // Act & assert - assertThrows(NullPointerException.class, () -> new OrderedRegistryImpl<>(null, 20)); - assertThrows(NullPointerException.class, () -> new OrderedRegistryImpl<>("B", null)); - assertThrows(NullPointerException.class, () -> new OrderedRegistryImpl<>(null, null)); + assertThrows(NullPointerException.class, () -> new PlatformRegistryImpl<>(null, 20)); + assertThrows(NullPointerException.class, () -> new PlatformRegistryImpl<>(B, null)); + assertThrows(NullPointerException.class, () -> new PlatformRegistryImpl<>(null, null)); } @Test diff --git a/refinedstorage2-core-api/src/test/java/com/refinedmods/refinedstorage2/api/core/util/LastModifiedTest.java b/refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/screen/grid/LastModifiedTest.java similarity index 98% rename from refinedstorage2-core-api/src/test/java/com/refinedmods/refinedstorage2/api/core/util/LastModifiedTest.java rename to refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/screen/grid/LastModifiedTest.java index b716ccf98..07bb62c42 100644 --- a/refinedstorage2-core-api/src/test/java/com/refinedmods/refinedstorage2/api/core/util/LastModifiedTest.java +++ b/refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/screen/grid/LastModifiedTest.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.api.core.util; +package com.refinedmods.refinedstorage2.platform.common.screen.grid; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.ValueSource; diff --git a/refinedstorage2-core-api/src/test/java/com/refinedmods/refinedstorage2/api/core/HistoryTest.java b/refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/screen/widget/HistoryTest.java similarity index 97% rename from refinedstorage2-core-api/src/test/java/com/refinedmods/refinedstorage2/api/core/HistoryTest.java rename to refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/screen/widget/HistoryTest.java index ab8cb8902..ce50f5e5e 100644 --- a/refinedstorage2-core-api/src/test/java/com/refinedmods/refinedstorage2/api/core/HistoryTest.java +++ b/refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/screen/widget/HistoryTest.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.api.core; +package com.refinedmods.refinedstorage2.platform.common.screen.widget; import java.util.ArrayList; import java.util.List; diff --git a/refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/util/BucketQuantityFormatterTest.java b/refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/util/BucketAmountFormattingTest.java similarity index 92% rename from refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/util/BucketQuantityFormatterTest.java rename to refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/util/BucketAmountFormattingTest.java index 419763dea..ce3321df0 100644 --- a/refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/util/BucketQuantityFormatterTest.java +++ b/refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/util/BucketAmountFormattingTest.java @@ -4,10 +4,10 @@ import static org.assertj.core.api.Assertions.assertThat; -class BucketQuantityFormatterTest { +class BucketAmountFormattingTest { private static final long BUCKET_AMOUNT = 1000; - private final BucketQuantityFormatter sut = new BucketQuantityFormatter(BUCKET_AMOUNT); + private final BucketAmountFormatting sut = new BucketAmountFormatting(BUCKET_AMOUNT); @Test void shouldFormatWithUnitsForCompleteBuckets() { diff --git a/refinedstorage2-platform-fabric/build.gradle b/refinedstorage2-platform-fabric/build.gradle index abb94d045..ecc4c6cc0 100644 --- a/refinedstorage2-platform-fabric/build.gradle +++ b/refinedstorage2-platform-fabric/build.gradle @@ -35,12 +35,12 @@ dependencies { minecraft fabric.minecraft mappings loom.layered() { officialMojangMappings() - // TODO: the parchment function is unable to take a version catalog (https://github.com/FabricMC/fabric-loom/issues/782) - def minecraftVersion = fabric.versions.minecraft.get() - def parchmentVersion = fabric.versions.parchment.get() - parchment("org.parchmentmc.data:parchment-${minecraftVersion}:${parchmentVersion}@zip") + parchment variantOf(fabric.parchment) { + artifactType("zip") + } } - modImplementation fabric.bundles.fabric + modImplementation fabric.fabric.loader + modImplementation fabric.fabric.api project.ext.apis.collect { implementation project(it) @@ -50,8 +50,6 @@ dependencies { implementation project(it) } - implementation libs.apiguardian // mandatory as it's imported through platform-api - modImplementation(fabric.cloth.config) { exclude(group: 'net.fabricmc.fabric-api') } @@ -62,20 +60,26 @@ dependencies { } include fabric.teamreborn.energy + modImplementation fabric.noIndium + include fabric.noIndium + + modImplementation fabric.modmenu + modCompileOnly(fabric.rei.api) { exclude(group: 'me.shedaniel.cloth') + exclude(group: 'dev.architectury') } - // We test with REI on Fabric. + modCompileOnly(fabric.rei.plugin) { + exclude(group: 'me.shedaniel.cloth') + exclude(group: 'dev.architectury') + } + modCompileOnly(fabric.architectury) modRuntimeOnly fabric.bundles.rei.runtime - modCompileOnly fabric.bundles.jei - - modImplementation fabric.modmenu + modCompileOnly fabric.jei.common.api + // modRuntimeOnly fabric.jei.fabric.impl modRuntimeOnly fabric.wthit - - modImplementation fabric.noIndium - include fabric.noIndium } loom { diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/ClientModInitializerImpl.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/ClientModInitializerImpl.java index 693031577..108da6982 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/ClientModInitializerImpl.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/ClientModInitializerImpl.java @@ -1,9 +1,9 @@ package com.refinedmods.refinedstorage2.platform.fabric; import com.refinedmods.refinedstorage2.platform.api.PlatformApi; +import com.refinedmods.refinedstorage2.platform.common.content.BlockColorMap; import com.refinedmods.refinedstorage2.platform.common.content.BlockEntities; import com.refinedmods.refinedstorage2.platform.common.content.Blocks; -import com.refinedmods.refinedstorage2.platform.common.content.ColorMap; import com.refinedmods.refinedstorage2.platform.common.content.Items; import com.refinedmods.refinedstorage2.platform.common.content.KeyMappings; import com.refinedmods.refinedstorage2.platform.common.content.Menus; @@ -16,12 +16,11 @@ import com.refinedmods.refinedstorage2.platform.common.screen.ImporterScreen; import com.refinedmods.refinedstorage2.platform.common.screen.InterfaceScreen; import com.refinedmods.refinedstorage2.platform.common.screen.ItemStorageBlockScreen; +import com.refinedmods.refinedstorage2.platform.common.screen.grid.CraftingGridScreen; import com.refinedmods.refinedstorage2.platform.common.screen.grid.GridScreen; -import com.refinedmods.refinedstorage2.platform.common.util.IdentifierUtil; -import com.refinedmods.refinedstorage2.platform.fabric.integration.jei.JeiGridSynchronizer; -import com.refinedmods.refinedstorage2.platform.fabric.integration.jei.JeiProxy; -import com.refinedmods.refinedstorage2.platform.fabric.integration.rei.ReiGridSynchronizer; -import com.refinedmods.refinedstorage2.platform.fabric.integration.rei.ReiProxy; +import com.refinedmods.refinedstorage2.platform.fabric.integration.recipemod.rei.RefinedStorageREIClientPlugin; +import com.refinedmods.refinedstorage2.platform.fabric.integration.recipemod.rei.ReiGridSynchronizer; +import com.refinedmods.refinedstorage2.platform.fabric.integration.recipemod.rei.ReiProxy; import com.refinedmods.refinedstorage2.platform.fabric.mixin.ItemPropertiesAccessor; import com.refinedmods.refinedstorage2.platform.fabric.packet.PacketIds; import com.refinedmods.refinedstorage2.platform.fabric.packet.s2c.ControllerEnergyInfoPacket; @@ -46,6 +45,7 @@ import net.minecraft.client.renderer.blockentity.BlockEntityRenderers; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.item.DyeColor; +import net.minecraft.world.level.block.Block; import org.lwjgl.glfw.GLFW; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -55,6 +55,7 @@ public class ClientModInitializerImpl implements ClientModInitializer { private static final Logger LOGGER = LoggerFactory.getLogger(ClientModInitializerImpl.class); + private static final String KEY_BINDINGS_TRANSLATION_KEY = createTranslationKey("category", "key_bindings"); @Override public void onInitializeClient() { @@ -70,22 +71,29 @@ public void onInitializeClient() { } private void setRenderLayers() { - BlockRenderLayerMap.INSTANCE.putBlock(Blocks.INSTANCE.getCable(), RenderType.cutout()); - BlockRenderLayerMap.INSTANCE.putBlock(Blocks.INSTANCE.getImporter(), RenderType.cutout()); - BlockRenderLayerMap.INSTANCE.putBlock(Blocks.INSTANCE.getExporter(), RenderType.cutout()); - BlockRenderLayerMap.INSTANCE.putBlock(Blocks.INSTANCE.getExternalStorage(), RenderType.cutout()); - Blocks.INSTANCE.getGrid().values().forEach(block -> - BlockRenderLayerMap.INSTANCE.putBlock(block, RenderType.cutout())); - Blocks.INSTANCE.getController().values().forEach(block -> - BlockRenderLayerMap.INSTANCE.putBlock(block, RenderType.cutout())); - Blocks.INSTANCE.getCreativeController().values().forEach(block -> - BlockRenderLayerMap.INSTANCE.putBlock(block, RenderType.cutout())); + setCutout(Blocks.INSTANCE.getImporter()); + setCutout(Blocks.INSTANCE.getExporter()); + setCutout(Blocks.INSTANCE.getExternalStorage()); + setCutout(Blocks.INSTANCE.getCable()); + setCutout(Blocks.INSTANCE.getGrid()); + setCutout(Blocks.INSTANCE.getCraftingGrid()); + setCutout(Blocks.INSTANCE.getController()); + setCutout(Blocks.INSTANCE.getCreativeController()); + } + + private void setCutout(final BlockColorMap blockMap) { + blockMap.values().forEach(this::setCutout); + } + + private void setCutout(final Block block) { + BlockRenderLayerMap.INSTANCE.putBlock(block, RenderType.cutout()); } private void registerEmissiveModels() { for (final DyeColor color : DyeColor.values()) { registerEmissiveControllerModels(color); registerEmissiveGridModels(color); + registerEmissiveCraftingGridModels(color); } } @@ -98,26 +106,41 @@ private void registerEmissiveControllerModels(final DyeColor color) { ); // Item EmissiveModelRegistry.INSTANCE.register( - ColorMap.generateId(color, IdentifierUtil.MOD_ID, "controller"), + Blocks.INSTANCE.getController().getId(color, createIdentifier("controller")), spriteLocation ); EmissiveModelRegistry.INSTANCE.register( - ColorMap.generateId(color, IdentifierUtil.MOD_ID, "creative_controller"), + Blocks.INSTANCE.getCreativeController().getId(color, createIdentifier("creative_controller")), spriteLocation ); } private void registerEmissiveGridModels(final DyeColor color) { + // Block EmissiveModelRegistry.INSTANCE.register( createIdentifier("block/grid/" + color.getName()), createIdentifier("block/grid/cutouts/" + color.getName()) ); + // Item EmissiveModelRegistry.INSTANCE.register( - ColorMap.generateId(color, IdentifierUtil.MOD_ID, "grid"), + Blocks.INSTANCE.getGrid().getId(color, createIdentifier("grid")), createIdentifier("block/grid/cutouts/" + color.getName()) ); } + private void registerEmissiveCraftingGridModels(final DyeColor color) { + // Block + EmissiveModelRegistry.INSTANCE.register( + createIdentifier("block/crafting_grid/" + color.getName()), + createIdentifier("block/crafting_grid/cutouts/" + color.getName()) + ); + // Item + EmissiveModelRegistry.INSTANCE.register( + Blocks.INSTANCE.getCraftingGrid().getId(color, createIdentifier("crafting_grid")), + createIdentifier("block/crafting_grid/cutouts/" + color.getName()) + ); + } + private void registerPackets() { ClientPlayNetworking.registerGlobalReceiver(PacketIds.STORAGE_INFO_RESPONSE, new StorageInfoResponsePacket()); ClientPlayNetworking.registerGlobalReceiver(PacketIds.GRID_UPDATE, new GridUpdatePacket()); @@ -149,6 +172,7 @@ private void registerCustomModels() { private void registerScreens() { MenuScreens.register(Menus.INSTANCE.getDiskDrive(), DiskDriveScreen::new); MenuScreens.register(Menus.INSTANCE.getGrid(), GridScreen::new); + MenuScreens.register(Menus.INSTANCE.getCraftingGrid(), CraftingGridScreen::new); MenuScreens.register(Menus.INSTANCE.getController(), ControllerScreen::new); MenuScreens.register(Menus.INSTANCE.getItemStorage(), ItemStorageBlockScreen::new); MenuScreens.register(Menus.INSTANCE.getFluidStorage(), FluidStorageBlockScreen::new); @@ -163,7 +187,7 @@ private void registerKeyBindings() { createTranslationKey("key", "focus_search_bar"), InputConstants.Type.KEYSYM, GLFW.GLFW_KEY_TAB, - createTranslationKey("category", "key_bindings") + KEY_BINDINGS_TRANSLATION_KEY ))); } @@ -177,29 +201,16 @@ private void registerModelPredicates() { private void registerGridSynchronizers() { final FabricLoader loader = FabricLoader.getInstance(); - if (loader.isModLoaded("jei")) { - registerJeiGridSynchronizers(); - } if (loader.isModLoaded("roughlyenoughitems")) { registerReiGridSynchronizers(); } } - private void registerJeiGridSynchronizers() { - LOGGER.info("Activating JEI grid synchronizers"); - final JeiProxy jeiProxy = new JeiProxy(); - PlatformApi.INSTANCE.getGridSynchronizerRegistry().register( - createIdentifier("jei"), - new JeiGridSynchronizer(jeiProxy, false) - ); - PlatformApi.INSTANCE.getGridSynchronizerRegistry().register( - createIdentifier("jei_two_way"), - new JeiGridSynchronizer(jeiProxy, true) - ); - } - private void registerReiGridSynchronizers() { - LOGGER.info("Activating REI grid synchronizers"); + LOGGER.info("Enabling REI grid synchronizers"); + // This is so the ingredient converters are only registered once + // see https://github.com/refinedmods/refinedstorage2/pull/302#discussion_r1070015672 + RefinedStorageREIClientPlugin.registerIngredientConverters(); final ReiProxy reiProxy = new ReiProxy(); PlatformApi.INSTANCE.getGridSynchronizerRegistry().register( createIdentifier("rei"), diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/ConfigImpl.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/ConfigImpl.java index 2968790f8..24aa485c8 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/ConfigImpl.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/ConfigImpl.java @@ -2,6 +2,7 @@ import com.refinedmods.refinedstorage2.api.grid.view.GridSortingDirection; import com.refinedmods.refinedstorage2.platform.common.content.DefaultEnergyUsage; +import com.refinedmods.refinedstorage2.platform.common.internal.grid.CraftingGridMatrixCloseBehavior; import com.refinedmods.refinedstorage2.platform.common.internal.grid.GridSize; import com.refinedmods.refinedstorage2.platform.common.internal.grid.GridSortingTypes; import com.refinedmods.refinedstorage2.platform.common.util.IdentifierUtil; @@ -19,6 +20,9 @@ public class ConfigImpl implements ConfigData, com.refinedmods.refinedstorage2.p @ConfigEntry.Gui.CollapsibleObject private GridEntryImpl grid = new GridEntryImpl(); + @ConfigEntry.Gui.CollapsibleObject + private CraftingGridEntryImpl craftingGrid = new CraftingGridEntryImpl(); + @ConfigEntry.Gui.CollapsibleObject private ControllerEntryImpl controller = new ControllerEntryImpl(); @@ -60,6 +64,11 @@ public GridEntry getGrid() { return grid; } + @Override + public CraftingGridEntry getCraftingGrid() { + return craftingGrid; + } + @Override public ControllerEntry getController() { return controller; @@ -262,6 +271,22 @@ private static void save() { } } + private static class CraftingGridEntryImpl implements CraftingGridEntry { + private long energyUsage = DefaultEnergyUsage.CRAFTING_GRID; + + private CraftingGridMatrixCloseBehavior craftingMatrixCloseBehavior = CraftingGridMatrixCloseBehavior.NONE; + + @Override + public long getEnergyUsage() { + return energyUsage; + } + + @Override + public CraftingGridMatrixCloseBehavior getCraftingMatrixCloseBehavior() { + return craftingMatrixCloseBehavior; + } + } + private static class DiskDriveEntryImpl implements DiskDriveEntry { private long energyUsage = DefaultEnergyUsage.DISK_DRIVE; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/ModInitializerImpl.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/ModInitializerImpl.java index 546b8a23a..9e62602c7 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/ModInitializerImpl.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/ModInitializerImpl.java @@ -13,27 +13,30 @@ import com.refinedmods.refinedstorage2.platform.common.block.ExporterBlock; import com.refinedmods.refinedstorage2.platform.common.block.ExternalStorageBlock; import com.refinedmods.refinedstorage2.platform.common.block.FluidStorageBlock; -import com.refinedmods.refinedstorage2.platform.common.block.GridBlock; import com.refinedmods.refinedstorage2.platform.common.block.ImporterBlock; import com.refinedmods.refinedstorage2.platform.common.block.InterfaceBlock; import com.refinedmods.refinedstorage2.platform.common.block.ItemStorageBlock; import com.refinedmods.refinedstorage2.platform.common.block.SimpleBlock; import com.refinedmods.refinedstorage2.platform.common.block.entity.CableBlockEntity; import com.refinedmods.refinedstorage2.platform.common.block.entity.ControllerBlockEntity; -import com.refinedmods.refinedstorage2.platform.common.block.entity.GridBlockEntity; import com.refinedmods.refinedstorage2.platform.common.block.entity.ImporterBlockEntity; import com.refinedmods.refinedstorage2.platform.common.block.entity.InterfaceBlockEntity; import com.refinedmods.refinedstorage2.platform.common.block.entity.diskdrive.AbstractDiskDriveBlockEntity; import com.refinedmods.refinedstorage2.platform.common.block.entity.exporter.ExporterBlockEntity; import com.refinedmods.refinedstorage2.platform.common.block.entity.externalstorage.ExternalStorageBlockEntity; +import com.refinedmods.refinedstorage2.platform.common.block.entity.grid.CraftingGridBlockEntity; +import com.refinedmods.refinedstorage2.platform.common.block.entity.grid.GridBlockEntity; import com.refinedmods.refinedstorage2.platform.common.block.entity.storage.FluidStorageBlockBlockEntity; import com.refinedmods.refinedstorage2.platform.common.block.entity.storage.ItemStorageBlockBlockEntity; +import com.refinedmods.refinedstorage2.platform.common.block.grid.CraftingGridBlock; +import com.refinedmods.refinedstorage2.platform.common.block.grid.GridBlock; import com.refinedmods.refinedstorage2.platform.common.block.ticker.ControllerBlockEntityTicker; import com.refinedmods.refinedstorage2.platform.common.containermenu.ControllerContainerMenu; import com.refinedmods.refinedstorage2.platform.common.containermenu.ExporterContainerMenu; -import com.refinedmods.refinedstorage2.platform.common.containermenu.GridContainerMenu; import com.refinedmods.refinedstorage2.platform.common.containermenu.ImporterContainerMenu; import com.refinedmods.refinedstorage2.platform.common.containermenu.InterfaceContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.containermenu.grid.CraftingGridContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.containermenu.grid.GridContainerMenu; import com.refinedmods.refinedstorage2.platform.common.containermenu.storage.ExternalStorageContainerMenu; import com.refinedmods.refinedstorage2.platform.common.containermenu.storage.block.FluidStorageBlockContainerMenu; import com.refinedmods.refinedstorage2.platform.common.containermenu.storage.block.ItemStorageBlockContainerMenu; @@ -59,8 +62,8 @@ import com.refinedmods.refinedstorage2.platform.common.item.block.ControllerBlockItem; import com.refinedmods.refinedstorage2.platform.common.item.block.CreativeControllerBlockItem; import com.refinedmods.refinedstorage2.platform.common.item.block.FluidStorageBlockBlockItem; -import com.refinedmods.refinedstorage2.platform.common.item.block.GridBlockItem; import com.refinedmods.refinedstorage2.platform.common.item.block.ItemStorageBlockBlockItem; +import com.refinedmods.refinedstorage2.platform.common.item.block.NamedBlockItem; import com.refinedmods.refinedstorage2.platform.common.item.block.SimpleBlockItem; import com.refinedmods.refinedstorage2.platform.common.util.TickHandler; import com.refinedmods.refinedstorage2.platform.fabric.block.entity.FabricDiskDriveBlockEntity; @@ -73,6 +76,8 @@ import com.refinedmods.refinedstorage2.platform.fabric.internal.network.node.externalstorage.StoragePlatformExternalStorageProviderFactory; import com.refinedmods.refinedstorage2.platform.fabric.internal.network.node.importer.StorageImporterTransferStrategyFactory; import com.refinedmods.refinedstorage2.platform.fabric.packet.PacketIds; +import com.refinedmods.refinedstorage2.platform.fabric.packet.c2s.CraftingGridClearPacket; +import com.refinedmods.refinedstorage2.platform.fabric.packet.c2s.CraftingGridRecipeTransferPacket; import com.refinedmods.refinedstorage2.platform.fabric.packet.c2s.GridExtractPacket; import com.refinedmods.refinedstorage2.platform.fabric.packet.c2s.GridInsertPacket; import com.refinedmods.refinedstorage2.platform.fabric.packet.c2s.GridScrollPacket; @@ -119,6 +124,7 @@ import static com.refinedmods.refinedstorage2.platform.common.content.ContentIds.CABLE; import static com.refinedmods.refinedstorage2.platform.common.content.ContentIds.CONSTRUCTION_CORE; import static com.refinedmods.refinedstorage2.platform.common.content.ContentIds.CONTROLLER; +import static com.refinedmods.refinedstorage2.platform.common.content.ContentIds.CRAFTING_GRID; import static com.refinedmods.refinedstorage2.platform.common.content.ContentIds.CREATIVE_CONTROLLER; import static com.refinedmods.refinedstorage2.platform.common.content.ContentIds.DESTRUCTION_CORE; import static com.refinedmods.refinedstorage2.platform.common.content.ContentIds.DISK_DRIVE; @@ -295,10 +301,16 @@ private Supplier register(final Registry registry, } private void registerBlocks() { - Blocks.INSTANCE.setCable(register( + Blocks.INSTANCE.getCable().putAll(color -> register( BuiltInRegistries.BLOCK, - CABLE, - new CableBlock() + Blocks.INSTANCE.getCable().getId(color, CABLE), + new CableBlock(color, Blocks.INSTANCE.getCable().getName( + color, + createTranslation( + BLOCK_TRANSLATION_CATEGORY, + "cable" + ) + )) )); Blocks.INSTANCE.setQuartzEnrichedIronBlock(register( BuiltInRegistries.BLOCK, @@ -319,10 +331,24 @@ private void registerBlocks() { Blocks.INSTANCE.getGrid().putAll(color -> register( BuiltInRegistries.BLOCK, Blocks.INSTANCE.getGrid().getId(color, GRID), - new GridBlock(Blocks.INSTANCE.getGrid().getName(color, createTranslation( - BLOCK_TRANSLATION_CATEGORY, - "grid" - ))) + new GridBlock( + Blocks.INSTANCE.getGrid().getName(color, createTranslation( + BLOCK_TRANSLATION_CATEGORY, + "grid" + )), + color + ) + )); + Blocks.INSTANCE.getCraftingGrid().putAll(color -> register( + BuiltInRegistries.BLOCK, + Blocks.INSTANCE.getCraftingGrid().getId(color, CRAFTING_GRID), + new CraftingGridBlock( + Blocks.INSTANCE.getCraftingGrid().getName(color, createTranslation( + BLOCK_TRANSLATION_CATEGORY, + "crafting_grid" + )), + color + ) )); Blocks.INSTANCE.getController().putAll(color -> register( BuiltInRegistries.BLOCK, @@ -333,7 +359,8 @@ private void registerBlocks() { color, createTranslation(BLOCK_TRANSLATION_CATEGORY, "controller") ), - new ControllerBlockEntityTicker(BlockEntities.INSTANCE::getController) + new ControllerBlockEntityTicker(BlockEntities.INSTANCE::getController), + color ) )); Blocks.INSTANCE.getCreativeController().putAll(color -> register( @@ -345,7 +372,8 @@ private void registerBlocks() { color, createTranslation(BLOCK_TRANSLATION_CATEGORY, "creative_controller") ), - new ControllerBlockEntityTicker(BlockEntities.INSTANCE::getCreativeController) + new ControllerBlockEntityTicker(BlockEntities.INSTANCE::getCreativeController), + color ) )); @@ -365,42 +393,50 @@ private void registerBlocks() { )); } - Blocks.INSTANCE.setImporter(register( + Blocks.INSTANCE.getImporter().putAll(color -> register( BuiltInRegistries.BLOCK, - IMPORTER, - new ImporterBlock() + Blocks.INSTANCE.getImporter().getId(color, IMPORTER), + new ImporterBlock(color, Blocks.INSTANCE.getImporter().getName( + color, + createTranslation(BLOCK_TRANSLATION_CATEGORY, "importer") + )) )); - Blocks.INSTANCE.setExporter(register( + Blocks.INSTANCE.getExporter().putAll(color -> register( BuiltInRegistries.BLOCK, - EXPORTER, - new ExporterBlock() + Blocks.INSTANCE.getExporter().getId(color, EXPORTER), + new ExporterBlock(color, Blocks.INSTANCE.getExporter().getName( + color, + createTranslation(BLOCK_TRANSLATION_CATEGORY, "exporter") + )) )); Blocks.INSTANCE.setInterface(register( BuiltInRegistries.BLOCK, INTERFACE, new InterfaceBlock() )); - Blocks.INSTANCE.setExternalStorage(register( + Blocks.INSTANCE.getExternalStorage().putAll(color -> register( BuiltInRegistries.BLOCK, - EXTERNAL_STORAGE, - new ExternalStorageBlock() + Blocks.INSTANCE.getExternalStorage().getId(color, EXTERNAL_STORAGE), + new ExternalStorageBlock(color, Blocks.INSTANCE.getExternalStorage().getName( + color, + createTranslation(BLOCK_TRANSLATION_CATEGORY, "external_storage") + )) )); } private void registerItems() { registerSimpleItems(); registerGridItems(); + registerCableItems(); + registerExporterItems(); + registerImporterItems(); + registerExternalStorages(); registerControllerItems(); registerStorageItems(); registerUpgrades(); } private void registerSimpleItems() { - register( - BuiltInRegistries.ITEM, - CABLE, - new SimpleBlockItem(Blocks.INSTANCE.getCable()) - ); Items.INSTANCE.setQuartzEnrichedIron(register( BuiltInRegistries.ITEM, QUARTZ_ENRICHED_IRON, @@ -442,13 +478,8 @@ private void registerSimpleItems() { new SimpleBlockItem(Blocks.INSTANCE.getMachineCasing()) ); - register(BuiltInRegistries.ITEM, IMPORTER, - new SimpleBlockItem(Blocks.INSTANCE.getImporter())); - register(BuiltInRegistries.ITEM, EXPORTER, - new SimpleBlockItem(Blocks.INSTANCE.getExporter())); register(BuiltInRegistries.ITEM, INTERFACE, new SimpleBlockItem(Blocks.INSTANCE.getInterface())); - register(BuiltInRegistries.ITEM, EXTERNAL_STORAGE, new SimpleBlockItem(Blocks.INSTANCE.getExternalStorage())); Items.INSTANCE.setConstructionCore(register(BuiltInRegistries.ITEM, CONSTRUCTION_CORE, new SimpleItem())); Items.INSTANCE.setDestructionCore(register(BuiltInRegistries.ITEM, DESTRUCTION_CORE, new SimpleItem())); @@ -465,15 +496,67 @@ private void registerSimpleItems() { } } + private void registerCableItems() { + Blocks.INSTANCE.getCable().forEach((color, block) -> Items.INSTANCE.addCable(register( + BuiltInRegistries.ITEM, + Blocks.INSTANCE.getCable().getId(color, CABLE), + new NamedBlockItem(block.get(), new Item.Properties(), Blocks.INSTANCE.getCable().getName( + color, + createTranslation(BLOCK_TRANSLATION_CATEGORY, "cable") + )) + ))); + } + + private void registerExporterItems() { + Blocks.INSTANCE.getExporter().forEach((color, block) -> Items.INSTANCE.addExporter(register( + BuiltInRegistries.ITEM, + Blocks.INSTANCE.getExporter().getId(color, EXPORTER), + new NamedBlockItem(block.get(), new Item.Properties(), Blocks.INSTANCE.getExporter().getName( + color, + createTranslation(BLOCK_TRANSLATION_CATEGORY, "exporter") + )) + ))); + } + + private void registerImporterItems() { + Blocks.INSTANCE.getImporter().forEach((color, block) -> Items.INSTANCE.addImporter(register( + BuiltInRegistries.ITEM, + Blocks.INSTANCE.getImporter().getId(color, IMPORTER), + new NamedBlockItem(block.get(), new Item.Properties(), Blocks.INSTANCE.getImporter().getName( + color, + createTranslation(BLOCK_TRANSLATION_CATEGORY, "importer") + )) + ))); + } + + private void registerExternalStorages() { + Blocks.INSTANCE.getExternalStorage().forEach((color, block) -> Items.INSTANCE.addExternalStorage(register( + BuiltInRegistries.ITEM, + Blocks.INSTANCE.getExternalStorage().getId(color, EXTERNAL_STORAGE), + new NamedBlockItem(block.get(), new Item.Properties(), Blocks.INSTANCE.getExternalStorage().getName( + color, + createTranslation(BLOCK_TRANSLATION_CATEGORY, "external_storage") + )) + ))); + } + private void registerGridItems() { Blocks.INSTANCE.getGrid().forEach((color, block) -> register( BuiltInRegistries.ITEM, Blocks.INSTANCE.getGrid().getId(color, GRID), - new GridBlockItem(block.get(), Blocks.INSTANCE.getGrid().getName( + new NamedBlockItem(block.get(), new Item.Properties(), Blocks.INSTANCE.getGrid().getName( color, createTranslation(BLOCK_TRANSLATION_CATEGORY, "grid") )) )); + Blocks.INSTANCE.getCraftingGrid().forEach((color, block) -> register( + BuiltInRegistries.ITEM, + Blocks.INSTANCE.getCraftingGrid().getId(color, CRAFTING_GRID), + new NamedBlockItem(block.get(), new Item.Properties(), Blocks.INSTANCE.getCraftingGrid().getName( + color, + createTranslation(BLOCK_TRANSLATION_CATEGORY, "crafting_grid") + )) + )); } private void registerControllerItems() { @@ -574,9 +657,9 @@ private void registerBlockEntities() { CABLE, FabricBlockEntityTypeBuilder.create( CableBlockEntity::new, - Blocks.INSTANCE.getCable() - ).build()) - ); + Blocks.INSTANCE.getCable().toArray() + ).build() + )); BlockEntities.INSTANCE.setDiskDrive(register( BuiltInRegistries.BLOCK_ENTITY_TYPE, DISK_DRIVE, @@ -593,6 +676,14 @@ private void registerBlockEntities() { Blocks.INSTANCE.getGrid().toArray() ).build() )); + BlockEntities.INSTANCE.setCraftingGrid(register( + BuiltInRegistries.BLOCK_ENTITY_TYPE, + CRAFTING_GRID, + FabricBlockEntityTypeBuilder.create( + CraftingGridBlockEntity::new, + Blocks.INSTANCE.getCraftingGrid().toArray() + ).build() + )); BlockEntities.INSTANCE.setController(register( BuiltInRegistries.BLOCK_ENTITY_TYPE, CONTROLLER, @@ -637,7 +728,7 @@ private void registerBlockEntities() { IMPORTER, FabricBlockEntityTypeBuilder.create( ImporterBlockEntity::new, - Blocks.INSTANCE.getImporter() + Blocks.INSTANCE.getImporter().toArray() ).build() )); BlockEntities.INSTANCE.setExporter(register( @@ -645,7 +736,7 @@ private void registerBlockEntities() { EXPORTER, FabricBlockEntityTypeBuilder.create( ExporterBlockEntity::new, - Blocks.INSTANCE.getExporter() + Blocks.INSTANCE.getExporter().toArray() ).build() )); BlockEntities.INSTANCE.setInterface(register( @@ -661,7 +752,7 @@ private void registerBlockEntities() { EXTERNAL_STORAGE, FabricBlockEntityTypeBuilder.create( ExternalStorageBlockEntity::new, - Blocks.INSTANCE.getExternalStorage() + Blocks.INSTANCE.getExternalStorage().toArray() ).build() )); } @@ -677,6 +768,11 @@ private void registerMenus() { GRID, new ExtendedScreenHandlerType<>(GridContainerMenu::new) )); + Menus.INSTANCE.setCraftingGrid(register( + BuiltInRegistries.MENU, + CRAFTING_GRID, + new ExtendedScreenHandlerType<>(CraftingGridContainerMenu::new) + )); Menus.INSTANCE.setController(register( BuiltInRegistries.MENU, CONTROLLER, @@ -725,7 +821,7 @@ private void registerLootFunctions() { private void registerCreativeModeTab() { FabricItemGroup.builder(createIdentifier("general")) .title(createTranslation("itemGroup", "general")) - .icon(() -> new ItemStack(Blocks.INSTANCE.getController().getNormal())) + .icon(() -> new ItemStack(Blocks.INSTANCE.getController().getDefault())) .displayItems((enabledFeatures, entries, operatorEnabled) -> CreativeModeTabItems.append(entries::accept)) .build(); } @@ -735,6 +831,11 @@ private void registerPackets() { ServerPlayNetworking.registerGlobalReceiver(PacketIds.GRID_INSERT, new GridInsertPacket()); ServerPlayNetworking.registerGlobalReceiver(PacketIds.GRID_EXTRACT, new GridExtractPacket()); ServerPlayNetworking.registerGlobalReceiver(PacketIds.GRID_SCROLL, new GridScrollPacket()); + ServerPlayNetworking.registerGlobalReceiver(PacketIds.CRAFTING_GRID_CLEAR, new CraftingGridClearPacket()); + ServerPlayNetworking.registerGlobalReceiver( + PacketIds.CRAFTING_GRID_RECIPE_TRANSFER, + new CraftingGridRecipeTransferPacket() + ); ServerPlayNetworking.registerGlobalReceiver(PacketIds.PROPERTY_CHANGE, new PropertyChangePacket()); ServerPlayNetworking.registerGlobalReceiver( PacketIds.RESOURCE_FILTER_SLOT_AMOUNT_CHANGE, diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/PlatformImpl.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/PlatformImpl.java index 729f5c242..fb622f553 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/PlatformImpl.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/PlatformImpl.java @@ -10,7 +10,7 @@ import com.refinedmods.refinedstorage2.platform.common.Config; import com.refinedmods.refinedstorage2.platform.common.block.ControllerType; import com.refinedmods.refinedstorage2.platform.common.containermenu.transfer.TransferManager; -import com.refinedmods.refinedstorage2.platform.common.util.BucketQuantityFormatter; +import com.refinedmods.refinedstorage2.platform.common.util.BucketAmountFormatting; import com.refinedmods.refinedstorage2.platform.fabric.containermenu.ContainerTransferDestination; import com.refinedmods.refinedstorage2.platform.fabric.integration.energy.ControllerTeamRebornEnergy; import com.refinedmods.refinedstorage2.platform.fabric.internal.grid.ItemGridInsertionStrategy; @@ -39,14 +39,17 @@ import net.minecraft.client.KeyMapping; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.components.EditBox; +import net.minecraft.core.NonNullList; import net.minecraft.core.registries.BuiltInRegistries; import net.minecraft.resources.ResourceLocation; import net.minecraft.tags.TagKey; import net.minecraft.world.Container; import net.minecraft.world.entity.player.Player; import net.minecraft.world.inventory.AbstractContainerMenu; +import net.minecraft.world.inventory.CraftingContainer; import net.minecraft.world.item.Item; import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.crafting.CraftingRecipe; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.phys.BlockHitResult; @@ -64,7 +67,7 @@ public PlatformImpl() { new ServerToClientCommunicationsImpl(), new ClientToServerCommunicationsImpl(), new MenuOpenerImpl(), - new BucketQuantityFormatter(FluidConstants.BUCKET), + new BucketAmountFormatting(FluidConstants.BUCKET), new FluidVariantFluidRenderer(), ItemGridInsertionStrategy::new ); @@ -92,7 +95,7 @@ public boolean canEditBoxLoseFocus(final EditBox editBox) { @Override public boolean isKeyDown(final KeyMapping keyMapping) { - return InputConstants.isKeyDown( + return !keyMapping.isUnbound() && InputConstants.isKeyDown( Minecraft.getInstance().getWindow().getWindow(), ((KeyMappingAccessor) keyMapping).getKey().getValue() ); @@ -160,6 +163,18 @@ public ItemStack getCloneItemStack(final BlockState state, return state.getBlock().getCloneItemStack(level, hitResult.getBlockPos(), state); } + @Override + public NonNullList getRemainingCraftingItems(final Player player, + final CraftingRecipe craftingRecipe, + final CraftingContainer craftingContainer) { + return craftingRecipe.getRemainingItems(craftingContainer); + } + + @Override + public void onItemCrafted(final Player player, final ItemStack craftedStack, final CraftingContainer container) { + // no op + } + private Optional convertNonEmptyToFluid(final ItemStack stack) { final Storage storage = FluidStorage.ITEM.find( stack, diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/jei/JeiPlugin.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/jei/JeiPlugin.java deleted file mode 100644 index cfdce5e41..000000000 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/jei/JeiPlugin.java +++ /dev/null @@ -1,31 +0,0 @@ -package com.refinedmods.refinedstorage2.platform.fabric.integration.jei; - -import javax.annotation.Nullable; - -import mezz.jei.api.IModPlugin; -import mezz.jei.api.runtime.IJeiRuntime; -import net.minecraft.resources.ResourceLocation; - -import static com.refinedmods.refinedstorage2.platform.common.util.IdentifierUtil.createIdentifier; - -public class JeiPlugin implements IModPlugin { - private static final ResourceLocation ID = createIdentifier("plugin"); - - @Nullable - private static IJeiRuntime runtime; - - @Override - public ResourceLocation getPluginUid() { - return ID; - } - - @Override - public void onRuntimeAvailable(final IJeiRuntime newRuntime) { - JeiPlugin.runtime = newRuntime; - } - - @Nullable - public static IJeiRuntime getRuntime() { - return runtime; - } -} diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/jei/JeiProxy.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/jei/JeiProxy.java deleted file mode 100644 index f2c8541a3..000000000 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/jei/JeiProxy.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.refinedmods.refinedstorage2.platform.fabric.integration.jei; - -import mezz.jei.api.runtime.IJeiRuntime; - -public class JeiProxy { - public String getSearchFieldText() { - final IJeiRuntime runtime = JeiPlugin.getRuntime(); - if (runtime == null) { - return ""; - } - return runtime.getIngredientFilter().getFilterText(); - } - - public void setSearchFieldText(final String text) { - final IJeiRuntime runtime = JeiPlugin.getRuntime(); - if (runtime != null) { - runtime.getIngredientFilter().setFilterText(text); - } - } -} diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/rei/package-info.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/recipemod/package-info.java similarity index 94% rename from refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/rei/package-info.java rename to refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/recipemod/package-info.java index 3d049005e..1eda8b6f8 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/rei/package-info.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/recipemod/package-info.java @@ -1,6 +1,6 @@ @ParametersAreNonnullByDefault @FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.fabric.integration.rei; +package com.refinedmods.refinedstorage2.platform.fabric.integration.recipemod; import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/recipemod/rei/CraftingGridTransferHandler.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/recipemod/rei/CraftingGridTransferHandler.java new file mode 100644 index 000000000..43f6d38f9 --- /dev/null +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/recipemod/rei/CraftingGridTransferHandler.java @@ -0,0 +1,126 @@ +package com.refinedmods.refinedstorage2.platform.fabric.integration.recipemod.rei; + +import com.refinedmods.refinedstorage2.api.resource.list.ResourceList; +import com.refinedmods.refinedstorage2.platform.api.resource.ItemResource; +import com.refinedmods.refinedstorage2.platform.common.containermenu.grid.CraftingGridContainerMenu; + +import java.awt.Color; +import java.util.List; + +import com.mojang.blaze3d.vertex.PoseStack; +import me.shedaniel.math.Rectangle; +import me.shedaniel.rei.api.client.gui.widgets.Slot; +import me.shedaniel.rei.api.client.gui.widgets.Widget; +import me.shedaniel.rei.api.client.registry.transfer.TransferHandler; +import me.shedaniel.rei.api.client.registry.transfer.TransferHandlerRenderer; +import me.shedaniel.rei.api.common.category.CategoryIdentifier; +import me.shedaniel.rei.api.common.entry.EntryIngredient; +import me.shedaniel.rei.api.common.entry.EntryStack; +import me.shedaniel.rei.api.common.entry.type.VanillaEntryTypes; +import me.shedaniel.rei.api.common.util.CollectionUtils; +import me.shedaniel.rei.plugin.common.displays.crafting.DefaultCraftingDisplay; +import net.minecraft.client.gui.GuiComponent; +import net.minecraft.world.item.ItemStack; + +public class CraftingGridTransferHandler implements TransferHandler { + private static final Color MISSING_COLOR = new Color(1.0f, 0.0f, 0.0f, 0.4f); + private static final CategoryIdentifier CRAFTING = CategoryIdentifier.of("minecraft", "plugins/crafting"); + + @Override + public Result handle(final Context context) { + if (!(context.getMenu() instanceof CraftingGridContainerMenu containerMenu) + || !context.getDisplay().getCategoryIdentifier().equals(CRAFTING) + || !(context.getDisplay() instanceof DefaultCraftingDisplay defaultCraftingDisplay)) { + return Result.createNotApplicable(); + } + final List ingredients = defaultCraftingDisplay.getOrganisedInputEntries(3, 3); + if (context.isActuallyCrafting()) { + doTransfer(ingredients, containerMenu); + return Result.createSuccessful().blocksFurtherHandling(); + } + final ResourceList available = containerMenu.getAvailableListForRecipeTransfer(); + final MissingIngredients missingIngredients = findMissingIngredients(ingredients, available); + if (missingIngredients.isEmpty()) { + return Result.createSuccessful().blocksFurtherHandling(); + } + return Result.createSuccessful() + .color(MISSING_COLOR.getRGB()) + .tooltipMissing(missingIngredients.getIngredients()) + .renderer(createMissingItemsRenderer(missingIngredients)) + .blocksFurtherHandling(); + } + + private void doTransfer(final List ingredients, final CraftingGridContainerMenu containerMenu) { + final List> inputs = getInputs(ingredients); + containerMenu.transferRecipe(inputs); + } + + private MissingIngredients findMissingIngredients(final List ingredients, + final ResourceList available) { + final MissingIngredients missingIngredients = new MissingIngredients(); + for (int i = 0; i < ingredients.size(); ++i) { + final EntryIngredient ingredient = ingredients.get(i); + if (ingredient.isEmpty()) { + continue; + } + if (!isAvailable(available, ingredient)) { + missingIngredients.addIngredient(ingredient, i); + } + } + return missingIngredients; + } + + private boolean isAvailable(final ResourceList available, final EntryIngredient ingredient) { + final List possibilities = convertIngredientToItemStacks(ingredient); + for (final ItemStack possibility : possibilities) { + final ItemResource possibilityResource = ItemResource.ofItemStack(possibility); + if (available.remove(possibilityResource, 1).isPresent()) { + return true; + } + } + return false; + } + + private List> getInputs(final List ingredients) { + return ingredients.stream() + .map(this::convertIngredientToItemStacks) + .map(list -> list.stream().map(ItemResource::ofItemStack).toList()) + .toList(); + } + + private List convertIngredientToItemStacks(final EntryIngredient ingredient) { + return CollectionUtils., ItemStack>filterAndMap( + ingredient, + stack -> stack.getType() == VanillaEntryTypes.ITEM, + EntryStack::castValue + ); + } + + private TransferHandlerRenderer createMissingItemsRenderer(final MissingIngredients missingIngredients) { + return (matrices, mouseX, mouseY, delta, widgets, bounds, display) -> { + int index = 0; + for (final Widget widget : widgets) { + if (widget instanceof Slot slot + && slot.getNoticeMark() == Slot.INPUT + && missingIngredients.isMissing(index++)) { + renderMissingItemOverlay(matrices, slot); + } + } + }; + } + + private void renderMissingItemOverlay(final PoseStack poseStack, final Slot slot) { + poseStack.pushPose(); + poseStack.translate(0, 0, 400); + final Rectangle innerBounds = slot.getInnerBounds(); + GuiComponent.fill( + poseStack, + innerBounds.x, + innerBounds.y, + innerBounds.getMaxX(), + innerBounds.getMaxY(), + MISSING_COLOR.getRGB() + ); + poseStack.popPose(); + } +} diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/recipemod/rei/FilteredResourceFocusedStackProvider.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/recipemod/rei/FilteredResourceFocusedStackProvider.java new file mode 100644 index 000000000..86c50462c --- /dev/null +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/recipemod/rei/FilteredResourceFocusedStackProvider.java @@ -0,0 +1,36 @@ +package com.refinedmods.refinedstorage2.platform.fabric.integration.recipemod.rei; + +import com.refinedmods.refinedstorage2.platform.api.integration.recipemod.IngredientConverter; +import com.refinedmods.refinedstorage2.platform.api.resource.filter.FilteredResource; +import com.refinedmods.refinedstorage2.platform.common.screen.AbstractBaseScreen; + +import dev.architectury.event.CompoundEventResult; +import me.shedaniel.math.Point; +import me.shedaniel.rei.api.client.registry.screen.FocusedStackProvider; +import me.shedaniel.rei.api.common.entry.EntryStack; +import net.minecraft.client.gui.screens.Screen; + +public class FilteredResourceFocusedStackProvider implements FocusedStackProvider { + private final IngredientConverter converter; + + public FilteredResourceFocusedStackProvider(final IngredientConverter converter) { + this.converter = converter; + } + + @Override + public CompoundEventResult> provide(final Screen screen, final Point mouse) { + if (!(screen instanceof AbstractBaseScreen baseScreen)) { + return CompoundEventResult.pass(); + } + final FilteredResource filteredResource = baseScreen.getFilteredResource(); + if (filteredResource == null) { + return CompoundEventResult.pass(); + } + final Object converted = converter.convertToIngredient(filteredResource).orElse(null); + if (converted instanceof EntryStack stack) { + return CompoundEventResult.interruptTrue(stack); + } + return CompoundEventResult.pass(); + } +} + diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/recipemod/rei/FilteredResourceIngredientConverter.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/recipemod/rei/FilteredResourceIngredientConverter.java new file mode 100644 index 000000000..5867fdef3 --- /dev/null +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/recipemod/rei/FilteredResourceIngredientConverter.java @@ -0,0 +1,37 @@ +package com.refinedmods.refinedstorage2.platform.fabric.integration.recipemod.rei; + +import com.refinedmods.refinedstorage2.platform.api.integration.recipemod.IngredientConverter; +import com.refinedmods.refinedstorage2.platform.api.resource.FluidResource; +import com.refinedmods.refinedstorage2.platform.api.resource.ItemResource; +import com.refinedmods.refinedstorage2.platform.api.resource.filter.FilteredResource; + +import java.util.Optional; + +import dev.architectury.fluid.FluidStack; +import me.shedaniel.rei.api.common.util.EntryStacks; + +public class FilteredResourceIngredientConverter implements IngredientConverter { + @Override + public Optional convertToResource(final Object ingredient) { + return Optional.empty(); + } + + @Override + public Optional convertToIngredient(final Object resource) { + if (!(resource instanceof FilteredResource filteredResource)) { + return Optional.empty(); + } + if (filteredResource.getValue() instanceof ItemResource itemResource) { + return Optional.of(EntryStacks.of(itemResource.toItemStack())); + } + if (filteredResource.getValue() instanceof FluidResource fluidResource) { + final FluidStack fluidStack = FluidStack.create( + fluidResource.fluid(), + FluidStack.bucketAmount(), + fluidResource.tag() + ); + return Optional.of(EntryStacks.of(fluidStack)); + } + return Optional.empty(); + } +} diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/recipemod/rei/GridFocusedStackProvider.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/recipemod/rei/GridFocusedStackProvider.java new file mode 100644 index 000000000..0454469bb --- /dev/null +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/recipemod/rei/GridFocusedStackProvider.java @@ -0,0 +1,35 @@ +package com.refinedmods.refinedstorage2.platform.fabric.integration.recipemod.rei; + +import com.refinedmods.refinedstorage2.api.grid.view.GridResource; +import com.refinedmods.refinedstorage2.platform.api.integration.recipemod.IngredientConverter; +import com.refinedmods.refinedstorage2.platform.common.screen.grid.AbstractGridScreen; + +import dev.architectury.event.CompoundEventResult; +import me.shedaniel.math.Point; +import me.shedaniel.rei.api.client.registry.screen.FocusedStackProvider; +import me.shedaniel.rei.api.common.entry.EntryStack; +import net.minecraft.client.gui.screens.Screen; + +public class GridFocusedStackProvider implements FocusedStackProvider { + private final IngredientConverter converter; + + public GridFocusedStackProvider(final IngredientConverter converter) { + this.converter = converter; + } + + @Override + public CompoundEventResult> provide(final Screen screen, final Point mouse) { + if (!(screen instanceof AbstractGridScreen gridScreen)) { + return CompoundEventResult.pass(); + } + final GridResource resource = gridScreen.getHoveredResource(); + if (resource == null) { + return CompoundEventResult.pass(); + } + final Object converted = converter.convertToIngredient(resource).orElse(null); + if (converted instanceof EntryStack stack) { + return CompoundEventResult.interruptTrue(stack); + } + return CompoundEventResult.pass(); + } +} diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/recipemod/rei/GridResourceIngredientConverter.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/recipemod/rei/GridResourceIngredientConverter.java new file mode 100644 index 000000000..463de4b66 --- /dev/null +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/recipemod/rei/GridResourceIngredientConverter.java @@ -0,0 +1,33 @@ +package com.refinedmods.refinedstorage2.platform.fabric.integration.recipemod.rei; + +import com.refinedmods.refinedstorage2.platform.api.integration.recipemod.IngredientConverter; +import com.refinedmods.refinedstorage2.platform.common.internal.grid.view.FluidGridResource; +import com.refinedmods.refinedstorage2.platform.common.internal.grid.view.ItemGridResource; + +import java.util.Optional; + +import dev.architectury.fluid.FluidStack; +import me.shedaniel.rei.api.common.util.EntryStacks; + +public class GridResourceIngredientConverter implements IngredientConverter { + @Override + public Optional convertToResource(final Object ingredient) { + return Optional.empty(); + } + + @Override + public Optional convertToIngredient(final Object resource) { + if (resource instanceof ItemGridResource itemGridResource) { + return Optional.of(EntryStacks.of(itemGridResource.copyItemStack())); + } + if (resource instanceof FluidGridResource fluidGridResource) { + final FluidStack fluidStack = FluidStack.create( + fluidGridResource.getResource().fluid(), + FluidStack.bucketAmount(), + fluidGridResource.getResource().tag() + ); + return Optional.of(EntryStacks.of(fluidStack)); + } + return Optional.empty(); + } +} diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/recipemod/rei/MissingIngredients.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/recipemod/rei/MissingIngredients.java new file mode 100644 index 000000000..4aea2a1f1 --- /dev/null +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/recipemod/rei/MissingIngredients.java @@ -0,0 +1,30 @@ +package com.refinedmods.refinedstorage2.platform.fabric.integration.recipemod.rei; + +import java.util.ArrayList; +import java.util.List; + +import it.unimi.dsi.fastutil.ints.IntOpenHashSet; +import it.unimi.dsi.fastutil.ints.IntSet; +import me.shedaniel.rei.api.common.entry.EntryIngredient; + +public class MissingIngredients { + private final List ingredients = new ArrayList<>(); + private final IntSet indices = new IntOpenHashSet(); + + public boolean isEmpty() { + return indices.isEmpty(); + } + + public void addIngredient(final EntryIngredient ingredient, final int slotIndex) { + ingredients.add(ingredient); + indices.add(slotIndex); + } + + public List getIngredients() { + return ingredients; + } + + public boolean isMissing(final int slotIndex) { + return indices.contains(slotIndex); + } +} diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/recipemod/rei/RefinedStorageREIClientPlugin.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/recipemod/rei/RefinedStorageREIClientPlugin.java new file mode 100644 index 000000000..5749e1b72 --- /dev/null +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/recipemod/rei/RefinedStorageREIClientPlugin.java @@ -0,0 +1,69 @@ +package com.refinedmods.refinedstorage2.platform.fabric.integration.recipemod.rei; + +import com.refinedmods.refinedstorage2.platform.api.PlatformApi; +import com.refinedmods.refinedstorage2.platform.api.integration.recipemod.IngredientConverter; +import com.refinedmods.refinedstorage2.platform.common.block.ColorableBlock; +import com.refinedmods.refinedstorage2.platform.common.content.BlockColorMap; +import com.refinedmods.refinedstorage2.platform.common.content.Blocks; +import com.refinedmods.refinedstorage2.platform.common.content.ContentIds; +import com.refinedmods.refinedstorage2.platform.common.content.Tags; + +import me.shedaniel.rei.api.client.plugins.REIClientPlugin; +import me.shedaniel.rei.api.client.registry.entry.CollapsibleEntryRegistry; +import me.shedaniel.rei.api.client.registry.screen.ScreenRegistry; +import me.shedaniel.rei.api.client.registry.transfer.TransferHandlerRegistry; +import me.shedaniel.rei.api.common.util.EntryIngredients; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.tags.TagKey; +import net.minecraft.world.item.Item; +import net.minecraft.world.level.block.Block; + +@Environment(EnvType.CLIENT) +public class RefinedStorageREIClientPlugin implements REIClientPlugin { + @Override + public void registerScreens(final ScreenRegistry registry) { + final IngredientConverter converter = PlatformApi.INSTANCE.getIngredientConverter(); + registry.registerFocusedStack(new GridFocusedStackProvider(converter)); + registry.registerFocusedStack(new FilteredResourceFocusedStackProvider(converter)); + } + + @Override + public void registerTransferHandlers(final TransferHandlerRegistry registry) { + registry.register(new CraftingGridTransferHandler()); + } + + public static void registerIngredientConverters() { + PlatformApi.INSTANCE.registerIngredientConverter(new GridResourceIngredientConverter()); + PlatformApi.INSTANCE.registerIngredientConverter(new FilteredResourceIngredientConverter()); + } + + @SuppressWarnings("UnstableApiUsage") + @Override + public void registerCollapsibleEntries(final CollapsibleEntryRegistry registry) { + groupItems(registry, Blocks.INSTANCE.getCable(), ContentIds.CABLE, Tags.CABLES); + groupItems(registry, Blocks.INSTANCE.getGrid(), ContentIds.GRID, Tags.GRIDS); + groupItems(registry, Blocks.INSTANCE.getCraftingGrid(), ContentIds.CRAFTING_GRID, Tags.CRAFTING_GRIDS); + groupItems(registry, Blocks.INSTANCE.getImporter(), ContentIds.IMPORTER, Tags.IMPORTERS); + groupItems(registry, Blocks.INSTANCE.getExporter(), ContentIds.EXPORTER, Tags.EXPORTERS); + groupItems(registry, Blocks.INSTANCE.getExternalStorage(), ContentIds.EXTERNAL_STORAGE, Tags.EXTERNAL_STORAGES); + groupItems(registry, Blocks.INSTANCE.getController(), ContentIds.CONTROLLER, Tags.CONTROLLERS); + groupItems(registry, Blocks.INSTANCE.getCreativeController(), + ContentIds.CREATIVE_CONTROLLER, Tags.CREATIVE_CONTROLLERS); + } + + @SuppressWarnings("UnstableApiUsage") + private static void groupItems( + final CollapsibleEntryRegistry registry, + final BlockColorMap> blocks, + final ResourceLocation itemIdentifier, + final TagKey tag + ) { + registry.group( + itemIdentifier, + blocks.getDefault().getName(), + EntryIngredients.ofItemTag(tag) + ); + } +} diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/rei/ReiGridSynchronizer.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/recipemod/rei/ReiGridSynchronizer.java similarity index 98% rename from refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/rei/ReiGridSynchronizer.java rename to refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/recipemod/rei/ReiGridSynchronizer.java index 7d4d1b019..990f0016d 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/rei/ReiGridSynchronizer.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/recipemod/rei/ReiGridSynchronizer.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.fabric.integration.rei; +package com.refinedmods.refinedstorage2.platform.fabric.integration.recipemod.rei; import com.refinedmods.refinedstorage2.platform.common.internal.grid.AbstractGridSynchronizer; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/rei/ReiProxy.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/recipemod/rei/ReiProxy.java similarity index 97% rename from refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/rei/ReiProxy.java rename to refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/recipemod/rei/ReiProxy.java index 9a6abb788..20ce8216a 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/rei/ReiProxy.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/recipemod/rei/ReiProxy.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.fabric.integration.rei; +package com.refinedmods.refinedstorage2.platform.fabric.integration.recipemod.rei; import javax.annotation.Nullable; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/jei/package-info.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/recipemod/rei/package-info.java similarity index 93% rename from refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/jei/package-info.java rename to refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/recipemod/rei/package-info.java index 6b54d1e79..5e5ddaadd 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/jei/package-info.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/recipemod/rei/package-info.java @@ -1,6 +1,6 @@ @ParametersAreNonnullByDefault @FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.fabric.integration.jei; +package com.refinedmods.refinedstorage2.platform.fabric.integration.recipemod.rei; import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/internal/grid/ItemGridInsertionStrategy.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/internal/grid/ItemGridInsertionStrategy.java index 5df63dc6c..c7a0b3d85 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/internal/grid/ItemGridInsertionStrategy.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/internal/grid/ItemGridInsertionStrategy.java @@ -8,6 +8,7 @@ import com.refinedmods.refinedstorage2.platform.api.resource.ItemResource; import com.refinedmods.refinedstorage2.platform.api.storage.PlayerActor; +import net.fabricmc.fabric.api.transfer.v1.item.InventoryStorage; import net.fabricmc.fabric.api.transfer.v1.item.ItemVariant; import net.fabricmc.fabric.api.transfer.v1.item.PlayerInventoryStorage; import net.fabricmc.fabric.api.transfer.v1.storage.StorageUtil; @@ -15,6 +16,7 @@ import net.fabricmc.fabric.api.transfer.v1.transaction.Transaction; import net.minecraft.world.entity.player.Player; import net.minecraft.world.inventory.AbstractContainerMenu; +import net.minecraft.world.inventory.Slot; import net.minecraft.world.item.ItemStack; import static com.refinedmods.refinedstorage2.platform.fabric.util.VariantUtil.ofItemVariant; @@ -23,7 +25,6 @@ public class ItemGridInsertionStrategy implements GridInsertionStrategy { private final AbstractContainerMenu containerMenu; private final GridService gridService; - private final PlayerInventoryStorage playerInventoryStorage; private final SingleSlotStorage playerCursorStorage; public ItemGridInsertionStrategy(final AbstractContainerMenu containerMenu, @@ -31,7 +32,6 @@ public ItemGridInsertionStrategy(final AbstractContainerMenu containerMenu, final PlatformGridServiceFactory gridServiceFactory) { this.containerMenu = containerMenu; this.gridService = gridServiceFactory.createForItem(new PlayerActor(player)); - this.playerInventoryStorage = PlayerInventoryStorage.of(player.getInventory()); this.playerCursorStorage = PlayerInventoryStorage.getCursorStorage(containerMenu); } @@ -57,7 +57,9 @@ public boolean onInsert(final GridInsertMode insertMode, final boolean tryAltern @Override public boolean onTransfer(final int slotIndex) { - final SingleSlotStorage storage = playerInventoryStorage.getSlot(slotIndex); + final Slot slot = containerMenu.getSlot(slotIndex); + final InventoryStorage inventoryStorage = InventoryStorage.of(slot.container, null); + final SingleSlotStorage storage = inventoryStorage.getSlot(slot.getContainerSlot()); final ItemVariant itemVariantInSlot = StorageUtil.findExtractableResource(storage, null); if (itemVariantInSlot == null) { return false; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/PacketIds.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/PacketIds.java index b918b017d..b7517e0cd 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/PacketIds.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/PacketIds.java @@ -14,6 +14,9 @@ public final class PacketIds { public static final ResourceLocation GRID_INSERT = createIdentifier("grid_insert"); public static final ResourceLocation GRID_EXTRACT = createIdentifier("grid_extract"); public static final ResourceLocation GRID_SCROLL = createIdentifier("grid_scroll"); + public static final ResourceLocation CRAFTING_GRID_CLEAR = createIdentifier("crafting_grid_clear"); + public static final ResourceLocation CRAFTING_GRID_RECIPE_TRANSFER = + createIdentifier("crafting_grid_recipe_transfer"); public static final ResourceLocation RESOURCE_FILTER_SLOT_UPDATE = createIdentifier("resource_filter_slot_update"); public static final ResourceLocation RESOURCE_FILTER_SLOT_CHANGE = createIdentifier("resource_filter_slot_change"); public static final ResourceLocation RESOURCE_FILTER_SLOT_AMOUNT_CHANGE = diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/c2s/ClientToServerCommunicationsImpl.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/c2s/ClientToServerCommunicationsImpl.java index 85ed79460..e9f32751b 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/c2s/ClientToServerCommunicationsImpl.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/c2s/ClientToServerCommunicationsImpl.java @@ -4,11 +4,14 @@ import com.refinedmods.refinedstorage2.api.grid.service.GridInsertMode; import com.refinedmods.refinedstorage2.platform.api.PlatformApi; import com.refinedmods.refinedstorage2.platform.api.grid.GridScrollMode; +import com.refinedmods.refinedstorage2.platform.api.resource.ItemResource; import com.refinedmods.refinedstorage2.platform.api.storage.channel.PlatformStorageChannelType; import com.refinedmods.refinedstorage2.platform.common.containermenu.property.PropertyType; import com.refinedmods.refinedstorage2.platform.common.packet.ClientToServerCommunications; +import com.refinedmods.refinedstorage2.platform.common.util.PacketUtil; import com.refinedmods.refinedstorage2.platform.fabric.packet.PacketIds; +import java.util.List; import java.util.UUID; import java.util.function.Consumer; @@ -58,6 +61,24 @@ public void sendGridInsert(final GridInsertMode mode, final boolean tryAlternati }); } + @Override + public void sendCraftingGridClear(final boolean toPlayerInventory) { + sendToServer(PacketIds.CRAFTING_GRID_CLEAR, buf -> buf.writeBoolean(toPlayerInventory)); + } + + @Override + public void sendCraftingGridRecipeTransfer(final List> recipe) { + sendToServer(PacketIds.CRAFTING_GRID_RECIPE_TRANSFER, buf -> { + buf.writeInt(recipe.size()); + for (final List slotPossibilities : recipe) { + buf.writeInt(slotPossibilities.size()); + for (final ItemResource slotPossibility : slotPossibilities) { + PacketUtil.writeItemResource(buf, slotPossibility); + } + } + }); + } + @Override public void sendPropertyChange(final PropertyType type, final T value) { sendToServer(PacketIds.PROPERTY_CHANGE, buf -> { diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/c2s/CraftingGridClearPacket.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/c2s/CraftingGridClearPacket.java new file mode 100644 index 000000000..7e94d5ae5 --- /dev/null +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/c2s/CraftingGridClearPacket.java @@ -0,0 +1,28 @@ +package com.refinedmods.refinedstorage2.platform.fabric.packet.c2s; + +import com.refinedmods.refinedstorage2.platform.common.containermenu.grid.CraftingGridContainerMenu; + +import net.fabricmc.fabric.api.networking.v1.PacketSender; +import net.fabricmc.fabric.api.networking.v1.ServerPlayNetworking; +import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.server.MinecraftServer; +import net.minecraft.server.level.ServerPlayer; +import net.minecraft.server.network.ServerGamePacketListenerImpl; +import net.minecraft.world.inventory.AbstractContainerMenu; + +public class CraftingGridClearPacket implements ServerPlayNetworking.PlayChannelHandler { + @Override + public void receive(final MinecraftServer server, + final ServerPlayer player, + final ServerGamePacketListenerImpl handler, + final FriendlyByteBuf buf, + final PacketSender responseSender) { + final boolean toPlayerInventory = buf.readBoolean(); + server.execute(() -> { + final AbstractContainerMenu menu = player.containerMenu; + if (menu instanceof CraftingGridContainerMenu craftingGridMenu) { + craftingGridMenu.clear(toPlayerInventory); + } + }); + } +} diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/c2s/CraftingGridRecipeTransferPacket.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/c2s/CraftingGridRecipeTransferPacket.java new file mode 100644 index 000000000..e3bf37bbb --- /dev/null +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/c2s/CraftingGridRecipeTransferPacket.java @@ -0,0 +1,45 @@ +package com.refinedmods.refinedstorage2.platform.fabric.packet.c2s; + +import com.refinedmods.refinedstorage2.platform.api.resource.ItemResource; +import com.refinedmods.refinedstorage2.platform.common.containermenu.grid.CraftingGridContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.util.PacketUtil; + +import java.util.ArrayList; +import java.util.List; + +import net.fabricmc.fabric.api.networking.v1.PacketSender; +import net.fabricmc.fabric.api.networking.v1.ServerPlayNetworking; +import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.server.MinecraftServer; +import net.minecraft.server.level.ServerPlayer; +import net.minecraft.server.network.ServerGamePacketListenerImpl; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.inventory.AbstractContainerMenu; + +public class CraftingGridRecipeTransferPacket implements ServerPlayNetworking.PlayChannelHandler { + @Override + public void receive(final MinecraftServer server, + final ServerPlayer player, + final ServerGamePacketListenerImpl handler, + final FriendlyByteBuf buf, + final PacketSender responseSender) { + final int slots = buf.readInt(); + final List> recipe = new ArrayList<>(slots); + for (int i = 0; i < slots; ++i) { + final int slotPossibilitiesCount = buf.readInt(); + final List slotPossibilities = new ArrayList<>(slotPossibilitiesCount); + for (int j = 0; j < slotPossibilitiesCount; ++j) { + slotPossibilities.add(PacketUtil.readItemResource(buf)); + } + recipe.add(slotPossibilities); + } + handle(recipe, player, server); + } + + private void handle(final List> recipe, final Player player, final MinecraftServer server) { + final AbstractContainerMenu menu = player.containerMenu; + if (menu instanceof CraftingGridContainerMenu craftingGridContainerMenu) { + server.execute(() -> craftingGridContainerMenu.transferRecipe(recipe)); + } + } +} diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/s2c/GridUpdatePacket.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/s2c/GridUpdatePacket.java index accde219a..24fc5cb03 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/s2c/GridUpdatePacket.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/s2c/GridUpdatePacket.java @@ -3,7 +3,7 @@ import com.refinedmods.refinedstorage2.api.storage.tracked.TrackedResource; import com.refinedmods.refinedstorage2.platform.api.PlatformApi; import com.refinedmods.refinedstorage2.platform.api.storage.channel.PlatformStorageChannelType; -import com.refinedmods.refinedstorage2.platform.common.containermenu.GridContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.containermenu.grid.AbstractGridContainerMenu; import com.refinedmods.refinedstorage2.platform.common.util.PacketUtil; import net.fabricmc.fabric.api.client.networking.v1.ClientPlayNetworking; @@ -29,7 +29,7 @@ private void handle(final PlatformStorageChannelType type, final T resource = type.fromBuffer(buf); final long amount = buf.readLong(); final TrackedResource trackedResource = PacketUtil.readTrackedResource(buf); - if (client.player.containerMenu instanceof GridContainerMenu containerMenu) { + if (client.player.containerMenu instanceof AbstractGridContainerMenu containerMenu) { containerMenu.onResourceUpdate(resource, amount, trackedResource); } } diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/render/FluidVariantFluidRenderer.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/render/FluidVariantFluidRenderer.java index 4f25a2f79..4ccdb3795 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/render/FluidVariantFluidRenderer.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/render/FluidVariantFluidRenderer.java @@ -42,8 +42,8 @@ public List getTooltip(final FluidResource fluidResource) { return FluidVariantRendering.getTooltip( getFluidVariantFromCache(fluidResource), Minecraft.getInstance().options.advancedItemTooltips - ? TooltipFlag.Default.ADVANCED - : TooltipFlag.Default.NORMAL + ? TooltipFlag.ADVANCED + : TooltipFlag.NORMAL ); } } diff --git a/refinedstorage2-platform-fabric/src/main/resources/fabric.mod.json b/refinedstorage2-platform-fabric/src/main/resources/fabric.mod.json index 0be3b194d..21fd49342 100644 --- a/refinedstorage2-platform-fabric/src/main/resources/fabric.mod.json +++ b/refinedstorage2-platform-fabric/src/main/resources/fabric.mod.json @@ -26,7 +26,10 @@ "com.refinedmods.refinedstorage2.platform.fabric.integration.ModMenuIntegration" ], "jei_mod_plugin": [ - "com.refinedmods.refinedstorage2.platform.fabric.integration.jei.JeiPlugin" + "com.refinedmods.refinedstorage2.platform.common.integration.recipemod.jei.RefinedStorageJeiModPlugin" + ], + "rei_client": [ + "com.refinedmods.refinedstorage2.platform.fabric.integration.recipemod.rei.RefinedStorageREIClientPlugin" ] }, "custom": { diff --git a/refinedstorage2-platform-forge/build.gradle b/refinedstorage2-platform-forge/build.gradle index 09432fc80..b901af21e 100644 --- a/refinedstorage2-platform-forge/build.gradle +++ b/refinedstorage2-platform-forge/build.gradle @@ -61,11 +61,15 @@ minecraft { } } } + + data { + args '--mod', 'refinedstorage2', '--all', '--output', file('../refinedstorage2-platform-common/src/generated/resources/'), "--existing", file("../refinedstorage2-platform-common/src/main/resources") + ideaModule "${rootProject.name}.${project.name}.main" + taskName 'Data' + } } } -sourceSets.main.resources.srcDir 'src/generated/resources' - dependencies { minecraft forge.minecraft @@ -76,14 +80,17 @@ dependencies { implementation project(it) } - implementation libs.apiguardian // mandatory as it's imported through platform-api - compileOnly fg.deobf(forge.jei.common.api.get()) + testCompileOnly fg.deobf(forge.jei.common.api.get()) compileOnly fg.deobf(forge.jei.forge.api.get()) - // We test with JEI on Forge. runtimeOnly fg.deobf(forge.jei.forge.impl.get()) compileOnly fg.deobf(forge.rei.forge.get()) + compileOnly fg.deobf(forge.rei.architectury.get()) + compileOnly fg.deobf(forge.rei.cloth.math.get()) +// runtimeOnly fg.deobf(forge.rei.forge.get()) +// runtimeOnly fg.deobf(forge.rei.architectury.get()) +// runtimeOnly fg.deobf(forge.rei.cloth.config.get()) } processResources { diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/ClientModInitializer.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/ClientModInitializer.java index e5f907aa6..edc2853f4 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/ClientModInitializer.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/ClientModInitializer.java @@ -14,11 +14,11 @@ import com.refinedmods.refinedstorage2.platform.common.screen.ImporterScreen; import com.refinedmods.refinedstorage2.platform.common.screen.InterfaceScreen; import com.refinedmods.refinedstorage2.platform.common.screen.ItemStorageBlockScreen; +import com.refinedmods.refinedstorage2.platform.common.screen.grid.CraftingGridScreen; import com.refinedmods.refinedstorage2.platform.common.screen.grid.GridScreen; -import com.refinedmods.refinedstorage2.platform.forge.integration.jei.JeiGridSynchronizer; -import com.refinedmods.refinedstorage2.platform.forge.integration.jei.JeiProxy; -import com.refinedmods.refinedstorage2.platform.forge.integration.rei.ReiGridSynchronizer; -import com.refinedmods.refinedstorage2.platform.forge.integration.rei.ReiProxy; +import com.refinedmods.refinedstorage2.platform.forge.integration.recipemod.rei.RefinedStorageREIClientPlugin; +import com.refinedmods.refinedstorage2.platform.forge.integration.recipemod.rei.ReiGridSynchronizer; +import com.refinedmods.refinedstorage2.platform.forge.integration.recipemod.rei.ReiProxy; import com.refinedmods.refinedstorage2.platform.forge.render.entity.DiskDriveBlockEntityRendererImpl; import com.refinedmods.refinedstorage2.platform.forge.render.model.DiskDriveGeometryLoader; @@ -29,6 +29,8 @@ import net.minecraft.client.renderer.item.ItemProperties; import net.minecraftforge.client.event.ModelEvent; import net.minecraftforge.client.event.RegisterKeyMappingsEvent; +import net.minecraftforge.client.settings.KeyConflictContext; +import net.minecraftforge.client.settings.KeyModifier; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.ModList; import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent; @@ -42,6 +44,7 @@ public final class ClientModInitializer { private static final Logger LOGGER = LoggerFactory.getLogger(ClientModInitializer.class); + private static final String KEY_BINDINGS_TRANSLATION_KEY = createTranslationKey("category", "key_bindings"); private ClientModInitializer() { } @@ -66,6 +69,7 @@ private static void registerScreens() { MenuScreens.register(Menus.INSTANCE.getController(), ControllerScreen::new); MenuScreens.register(Menus.INSTANCE.getDiskDrive(), DiskDriveScreen::new); MenuScreens.register(Menus.INSTANCE.getGrid(), GridScreen::new); + MenuScreens.register(Menus.INSTANCE.getCraftingGrid(), CraftingGridScreen::new); MenuScreens.register(Menus.INSTANCE.getItemStorage(), ItemStorageBlockScreen::new); MenuScreens.register(Menus.INSTANCE.getFluidStorage(), FluidStorageBlockScreen::new); MenuScreens.register(Menus.INSTANCE.getImporter(), ImporterScreen::new); @@ -85,10 +89,29 @@ public static void onRegisterKeyMappings(final RegisterKeyMappingsEvent e) { createTranslationKey("key", "focus_search_bar"), InputConstants.Type.KEYSYM, GLFW.GLFW_KEY_TAB, - createTranslationKey("category", "key_bindings") + KEY_BINDINGS_TRANSLATION_KEY ); e.register(focusSearchBarKeyBinding); KeyMappings.INSTANCE.setFocusSearchBar(focusSearchBarKeyBinding); + + final KeyMapping clearCraftingGridMatrixToNetwork = new KeyMapping( + createTranslationKey("key", "clear_crafting_grid_matrix_to_network"), + KeyConflictContext.GUI, + KeyModifier.CONTROL, + InputConstants.Type.KEYSYM, + GLFW.GLFW_KEY_X, + KEY_BINDINGS_TRANSLATION_KEY + ); + e.register(clearCraftingGridMatrixToNetwork); + KeyMappings.INSTANCE.setClearCraftingGridMatrixToNetwork(clearCraftingGridMatrixToNetwork); + + final KeyMapping clearCraftingGridMatrixToInventory = new KeyMapping( + createTranslationKey("key", "clear_crafting_grid_matrix_to_inventory"), + InputConstants.UNKNOWN.getValue(), + KEY_BINDINGS_TRANSLATION_KEY + ); + e.register(clearCraftingGridMatrixToInventory); + KeyMappings.INSTANCE.setClearCraftingGridMatrixToInventory(clearCraftingGridMatrixToInventory); } private static void registerBlockEntityRenderer() { @@ -102,26 +125,14 @@ private static void registerGridSynchronizers() { // This means that both JEI + REI support would be activated. We only want REI in that case. if (list.isLoaded("roughlyenoughitems")) { registerReiGridSynchronizers(); - } else if (list.isLoaded("jei")) { - registerJeiGridSynchronizers(); } } - private static void registerJeiGridSynchronizers() { - LOGGER.info("Activating JEI grid synchronizers"); - final JeiProxy jeiProxy = new JeiProxy(); - PlatformApi.INSTANCE.getGridSynchronizerRegistry().register( - createIdentifier("jei"), - new JeiGridSynchronizer(jeiProxy, false) - ); - PlatformApi.INSTANCE.getGridSynchronizerRegistry().register( - createIdentifier("jei_two_way"), - new JeiGridSynchronizer(jeiProxy, true) - ); - } - private static void registerReiGridSynchronizers() { - LOGGER.info("Activating REI grid synchronizers"); + LOGGER.info("Enabling REI grid synchronizers"); + // This is so the ingredient converters are only registered once + // see https://github.com/refinedmods/refinedstorage2/pull/302#discussion_r1070015672 + RefinedStorageREIClientPlugin.registerIngredientConverters(); final ReiProxy reiProxy = new ReiProxy(); PlatformApi.INSTANCE.getGridSynchronizerRegistry().register( createIdentifier("rei"), diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/ConfigImpl.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/ConfigImpl.java index 935f30781..8863d1299 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/ConfigImpl.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/ConfigImpl.java @@ -3,6 +3,7 @@ import com.refinedmods.refinedstorage2.api.grid.view.GridSortingDirection; import com.refinedmods.refinedstorage2.platform.common.Config; import com.refinedmods.refinedstorage2.platform.common.content.DefaultEnergyUsage; +import com.refinedmods.refinedstorage2.platform.common.internal.grid.CraftingGridMatrixCloseBehavior; import com.refinedmods.refinedstorage2.platform.common.internal.grid.GridSize; import com.refinedmods.refinedstorage2.platform.common.internal.grid.GridSortingTypes; @@ -21,6 +22,7 @@ public class ConfigImpl implements Config { private final ControllerEntry controller; private final DiskDriveEntry diskDrive; private final GridEntry grid; + private final CraftingGridEntry craftingGrid; private final StorageBlockEntry storageBlock; private final FluidStorageBlockEntry fluidStorageBlock; private final SimpleEnergyUsageEntry importer; @@ -34,6 +36,7 @@ public ConfigImpl() { controller = new ControllerEntryImpl(); diskDrive = new DiskDriveEntryImpl(); grid = new GridEntryImpl(); + craftingGrid = new CraftingGridEntryImpl(); storageBlock = new StorageBlockEntryImpl(); fluidStorageBlock = new FluidStorageBlockEntryImpl(); importer = new SimpleEnergyUsageEntryImpl("importer", "Importer", DefaultEnergyUsage.IMPORTER); @@ -57,6 +60,11 @@ public GridEntry getGrid() { return grid; } + @Override + public CraftingGridEntry getCraftingGrid() { + return craftingGrid; + } + @Override public ControllerEntry getController() { return controller; @@ -335,6 +343,32 @@ public void clearStorageChannelType() { } } + private class CraftingGridEntryImpl implements CraftingGridEntry { + private final ForgeConfigSpec.LongValue energyUsage; + private final ForgeConfigSpec.EnumValue craftingMatrixCloseBehavior; + + CraftingGridEntryImpl() { + builder.push("craftingGrid"); + energyUsage = builder + .comment("The energy used by the Crafting Grid") + .defineInRange(ENERGY_USAGE, DefaultEnergyUsage.CRAFTING_GRID, 0, Long.MAX_VALUE); + craftingMatrixCloseBehavior = builder + .comment("What should happen to the crafting matrix slots when closing the Crafting Grid") + .defineEnum("craftingMatrixCloseBehavior", CraftingGridMatrixCloseBehavior.NONE); + builder.pop(); + } + + @Override + public long getEnergyUsage() { + return energyUsage.get(); + } + + @Override + public CraftingGridMatrixCloseBehavior getCraftingMatrixCloseBehavior() { + return craftingMatrixCloseBehavior.get(); + } + } + private class StorageBlockEntryImpl implements StorageBlockEntry { private final ForgeConfigSpec.LongValue oneKEnergyUsage; private final ForgeConfigSpec.LongValue fourKEnergyUsage; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/ModInitializer.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/ModInitializer.java index fd42e94e0..0c5b8b3ea 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/ModInitializer.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/ModInitializer.java @@ -11,27 +11,30 @@ import com.refinedmods.refinedstorage2.platform.common.block.ExporterBlock; import com.refinedmods.refinedstorage2.platform.common.block.ExternalStorageBlock; import com.refinedmods.refinedstorage2.platform.common.block.FluidStorageBlock; -import com.refinedmods.refinedstorage2.platform.common.block.GridBlock; import com.refinedmods.refinedstorage2.platform.common.block.ImporterBlock; import com.refinedmods.refinedstorage2.platform.common.block.InterfaceBlock; import com.refinedmods.refinedstorage2.platform.common.block.ItemStorageBlock; import com.refinedmods.refinedstorage2.platform.common.block.SimpleBlock; import com.refinedmods.refinedstorage2.platform.common.block.entity.CableBlockEntity; import com.refinedmods.refinedstorage2.platform.common.block.entity.ControllerBlockEntity; -import com.refinedmods.refinedstorage2.platform.common.block.entity.GridBlockEntity; import com.refinedmods.refinedstorage2.platform.common.block.entity.ImporterBlockEntity; import com.refinedmods.refinedstorage2.platform.common.block.entity.InterfaceBlockEntity; import com.refinedmods.refinedstorage2.platform.common.block.entity.diskdrive.AbstractDiskDriveBlockEntity; import com.refinedmods.refinedstorage2.platform.common.block.entity.exporter.ExporterBlockEntity; import com.refinedmods.refinedstorage2.platform.common.block.entity.externalstorage.ExternalStorageBlockEntity; +import com.refinedmods.refinedstorage2.platform.common.block.entity.grid.CraftingGridBlockEntity; +import com.refinedmods.refinedstorage2.platform.common.block.entity.grid.GridBlockEntity; import com.refinedmods.refinedstorage2.platform.common.block.entity.storage.FluidStorageBlockBlockEntity; import com.refinedmods.refinedstorage2.platform.common.block.entity.storage.ItemStorageBlockBlockEntity; +import com.refinedmods.refinedstorage2.platform.common.block.grid.CraftingGridBlock; +import com.refinedmods.refinedstorage2.platform.common.block.grid.GridBlock; import com.refinedmods.refinedstorage2.platform.common.block.ticker.ControllerBlockEntityTicker; import com.refinedmods.refinedstorage2.platform.common.containermenu.ControllerContainerMenu; import com.refinedmods.refinedstorage2.platform.common.containermenu.ExporterContainerMenu; -import com.refinedmods.refinedstorage2.platform.common.containermenu.GridContainerMenu; import com.refinedmods.refinedstorage2.platform.common.containermenu.ImporterContainerMenu; import com.refinedmods.refinedstorage2.platform.common.containermenu.InterfaceContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.containermenu.grid.CraftingGridContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.containermenu.grid.GridContainerMenu; import com.refinedmods.refinedstorage2.platform.common.containermenu.storage.ExternalStorageContainerMenu; import com.refinedmods.refinedstorage2.platform.common.containermenu.storage.block.FluidStorageBlockContainerMenu; import com.refinedmods.refinedstorage2.platform.common.containermenu.storage.block.ItemStorageBlockContainerMenu; @@ -55,8 +58,8 @@ import com.refinedmods.refinedstorage2.platform.common.item.block.ControllerBlockItem; import com.refinedmods.refinedstorage2.platform.common.item.block.CreativeControllerBlockItem; import com.refinedmods.refinedstorage2.platform.common.item.block.FluidStorageBlockBlockItem; -import com.refinedmods.refinedstorage2.platform.common.item.block.GridBlockItem; import com.refinedmods.refinedstorage2.platform.common.item.block.ItemStorageBlockBlockItem; +import com.refinedmods.refinedstorage2.platform.common.item.block.NamedBlockItem; import com.refinedmods.refinedstorage2.platform.common.item.block.SimpleBlockItem; import com.refinedmods.refinedstorage2.platform.common.util.IdentifierUtil; import com.refinedmods.refinedstorage2.platform.common.util.TickHandler; @@ -117,6 +120,7 @@ import static com.refinedmods.refinedstorage2.platform.common.content.ContentIds.CABLE; import static com.refinedmods.refinedstorage2.platform.common.content.ContentIds.CONSTRUCTION_CORE; import static com.refinedmods.refinedstorage2.platform.common.content.ContentIds.CONTROLLER; +import static com.refinedmods.refinedstorage2.platform.common.content.ContentIds.CRAFTING_GRID; import static com.refinedmods.refinedstorage2.platform.common.content.ContentIds.CREATIVE_CONTROLLER; import static com.refinedmods.refinedstorage2.platform.common.content.ContentIds.DESTRUCTION_CORE; import static com.refinedmods.refinedstorage2.platform.common.content.ContentIds.DISK_DRIVE; @@ -251,7 +255,13 @@ private void registerContent() { } private void registerBlocks() { - Blocks.INSTANCE.setCable(blockRegistry.register(CABLE.getPath(), CableBlock::new)); + Blocks.INSTANCE.getCable().putAll(color -> blockRegistry.register( + Blocks.INSTANCE.getCable().getId(color, CABLE).getPath(), + () -> new CableBlock(color, Blocks.INSTANCE.getCable().getName( + color, + createTranslation(BLOCK_TRANSLATION_CATEGORY, "cable")) + )) + ); Blocks.INSTANCE.setQuartzEnrichedIronBlock(blockRegistry.register( QUARTZ_ENRICHED_IRON_BLOCK.getPath(), SimpleBlock::new @@ -266,10 +276,23 @@ private void registerBlocks() { )); Blocks.INSTANCE.getGrid().putAll(color -> blockRegistry.register( Blocks.INSTANCE.getGrid().getId(color, GRID).getPath(), - () -> new GridBlock(Blocks.INSTANCE.getGrid().getName( - color, - createTranslation(BLOCK_TRANSLATION_CATEGORY, "grid") - )) + () -> new GridBlock( + Blocks.INSTANCE.getGrid().getName( + color, + createTranslation(BLOCK_TRANSLATION_CATEGORY, "grid") + ), + color + ) + )); + Blocks.INSTANCE.getCraftingGrid().putAll(color -> blockRegistry.register( + Blocks.INSTANCE.getCraftingGrid().getId(color, CRAFTING_GRID).getPath(), + () -> new CraftingGridBlock( + Blocks.INSTANCE.getCraftingGrid().getName( + color, + createTranslation(BLOCK_TRANSLATION_CATEGORY, "crafting_grid") + ), + color + ) )); Blocks.INSTANCE.getController().putAll(color -> blockRegistry.register( Blocks.INSTANCE.getController().getId(color, CONTROLLER).getPath(), @@ -279,7 +302,8 @@ private void registerBlocks() { color, createTranslation(BLOCK_TRANSLATION_CATEGORY, "controller") ), - new ControllerBlockEntityTicker(BlockEntities.INSTANCE::getController) + new ControllerBlockEntityTicker(BlockEntities.INSTANCE::getController), + color ) )); Blocks.INSTANCE.getCreativeController().putAll(color -> blockRegistry.register( @@ -290,7 +314,8 @@ private void registerBlocks() { color, createTranslation(BLOCK_TRANSLATION_CATEGORY, "creative_controller") ), - new ControllerBlockEntityTicker(BlockEntities.INSTANCE::getCreativeController) + new ControllerBlockEntityTicker(BlockEntities.INSTANCE::getCreativeController), + color ) )); @@ -308,12 +333,27 @@ private void registerBlocks() { )); } - Blocks.INSTANCE.setImporter(blockRegistry.register(IMPORTER.getPath(), ImporterBlock::new)); - Blocks.INSTANCE.setExporter(blockRegistry.register(EXPORTER.getPath(), ExporterBlock::new)); + Blocks.INSTANCE.getImporter().putAll(color -> blockRegistry.register( + Blocks.INSTANCE.getImporter().getId(color, IMPORTER).getPath(), + () -> new ImporterBlock(color, Blocks.INSTANCE.getImporter().getName( + color, + createTranslation(BLOCK_TRANSLATION_CATEGORY, "importer") + )) + )); + Blocks.INSTANCE.getExporter().putAll(color -> blockRegistry.register( + Blocks.INSTANCE.getExporter().getId(color, EXPORTER).getPath(), + () -> new ExporterBlock(color, Blocks.INSTANCE.getExporter().getName( + color, + createTranslation(BLOCK_TRANSLATION_CATEGORY, "exporter") + )) + )); Blocks.INSTANCE.setInterface(blockRegistry.register(INTERFACE.getPath(), InterfaceBlock::new)); - Blocks.INSTANCE.setExternalStorage(blockRegistry.register( - EXTERNAL_STORAGE.getPath(), - ExternalStorageBlock::new + Blocks.INSTANCE.getExternalStorage().putAll(color -> blockRegistry.register( + Blocks.INSTANCE.getExternalStorage().getId(color, EXTERNAL_STORAGE).getPath(), + () -> new ExternalStorageBlock(color, Blocks.INSTANCE.getExternalStorage().getName( + color, + createTranslation(BLOCK_TRANSLATION_CATEGORY, "external_storage") + )) )); blockRegistry.register(FMLJavaModLoadingContext.get().getModEventBus()); @@ -322,6 +362,7 @@ private void registerBlocks() { private void registerItems() { registerSimpleItems(); registerGridItems(); + registerCableItems(); registerControllerItems(); registerStorageItems(); registerUpgrades(); @@ -330,10 +371,6 @@ private void registerItems() { } private void registerSimpleItems() { - itemRegistry.register( - CABLE.getPath(), - () -> new SimpleBlockItem(Blocks.INSTANCE.getCable()) - ); Items.INSTANCE.setQuartzEnrichedIron(itemRegistry.register( QUARTZ_ENRICHED_IRON.getPath(), SimpleItem::new @@ -375,38 +412,73 @@ private void registerSimpleItems() { ); } - itemRegistry.register( - IMPORTER.getPath(), - () -> new SimpleBlockItem(Blocks.INSTANCE.getImporter()) - ); - itemRegistry.register( - EXPORTER.getPath(), - () -> new SimpleBlockItem(Blocks.INSTANCE.getExporter()) - ); + Blocks.INSTANCE.getImporter().forEach((color, block) -> Items.INSTANCE.addImporter(itemRegistry.register( + Blocks.INSTANCE.getImporter().getId(color, IMPORTER).getPath(), + () -> new NamedBlockItem(block.get(), new Item.Properties(), Blocks.INSTANCE.getImporter().getName( + color, + createTranslation(BLOCK_TRANSLATION_CATEGORY, "importer") + )) + ))); + Blocks.INSTANCE.getExporter().forEach((color, block) -> Items.INSTANCE.addExporter(itemRegistry.register( + Blocks.INSTANCE.getExporter().getId(color, EXPORTER).getPath(), + () -> new NamedBlockItem(block.get(), new Item.Properties(), Blocks.INSTANCE.getExporter().getName( + color, + createTranslation(BLOCK_TRANSLATION_CATEGORY, "exporter") + )) + ))); itemRegistry.register( INTERFACE.getPath(), () -> new SimpleBlockItem(Blocks.INSTANCE.getInterface()) ); - itemRegistry.register( - EXTERNAL_STORAGE.getPath(), - () -> new SimpleBlockItem(Blocks.INSTANCE.getExternalStorage()) - ); + Blocks.INSTANCE.getExternalStorage().forEach((color, block) -> Items.INSTANCE.addExternalStorage( + itemRegistry.register( + Blocks.INSTANCE.getExternalStorage().getId(color, EXTERNAL_STORAGE).getPath(), + () -> new NamedBlockItem(block.get(), new Item.Properties(), + Blocks.INSTANCE.getExternalStorage().getName( + color, + createTranslation(BLOCK_TRANSLATION_CATEGORY, "external_storage") + ) + ) + ) + )); Items.INSTANCE.setConstructionCore(itemRegistry.register(CONSTRUCTION_CORE.getPath(), SimpleItem::new)); Items.INSTANCE.setDestructionCore(itemRegistry.register(DESTRUCTION_CORE.getPath(), SimpleItem::new)); } + private void registerCableItems() { + Blocks.INSTANCE.getCable().forEach((color, block) -> Items.INSTANCE.addCable(itemRegistry.register( + Blocks.INSTANCE.getCable().getId(color, CABLE).getPath(), + () -> new NamedBlockItem(block.get(), new Item.Properties(), Blocks.INSTANCE.getCable().getName( + color, + createTranslation(BLOCK_TRANSLATION_CATEGORY, "cable") + )) + ))); + } + private void registerGridItems() { Blocks.INSTANCE.getGrid().forEach((color, block) -> itemRegistry.register( Blocks.INSTANCE.getGrid().getId(color, GRID).getPath(), - () -> new GridBlockItem( + () -> new NamedBlockItem( block.get(), + new Item.Properties(), Blocks.INSTANCE.getGrid().getName(color, createTranslation( BLOCK_TRANSLATION_CATEGORY, "grid" )) ) )); + Blocks.INSTANCE.getCraftingGrid().forEach((color, block) -> itemRegistry.register( + Blocks.INSTANCE.getCraftingGrid().getId(color, CRAFTING_GRID).getPath(), + () -> new NamedBlockItem( + block.get(), + new Item.Properties(), + Blocks.INSTANCE.getCraftingGrid().getName(color, createTranslation( + BLOCK_TRANSLATION_CATEGORY, + "crafting_grid" + )) + ) + )); } private void registerControllerItems() { @@ -510,7 +582,10 @@ private void registerUpgrades() { private void registerBlockEntities() { BlockEntities.INSTANCE.setCable(blockEntityTypeRegistry.register( CABLE.getPath(), - () -> BlockEntityType.Builder.of(CableBlockEntity::new, Blocks.INSTANCE.getCable()).build(null) + () -> BlockEntityType.Builder.of( + CableBlockEntity::new, + Blocks.INSTANCE.getCable().toArray() + ).build(null) )); BlockEntities.INSTANCE.setController(blockEntityTypeRegistry.register( CONTROLLER.getPath(), @@ -540,6 +615,13 @@ private void registerBlockEntities() { Blocks.INSTANCE.getGrid().toArray() ).build(null) )); + BlockEntities.INSTANCE.setCraftingGrid(blockEntityTypeRegistry.register( + CRAFTING_GRID.getPath(), + () -> BlockEntityType.Builder.of( + CraftingGridBlockEntity::new, + Blocks.INSTANCE.getCraftingGrid().toArray() + ).build(null) + )); for (final ItemStorageType.Variant variant : ItemStorageType.Variant.values()) { BlockEntities.INSTANCE.setItemStorageBlock(variant, blockEntityTypeRegistry.register( @@ -563,11 +645,17 @@ private void registerBlockEntities() { BlockEntities.INSTANCE.setImporter(blockEntityTypeRegistry.register( IMPORTER.getPath(), - () -> BlockEntityType.Builder.of(ImporterBlockEntity::new, Blocks.INSTANCE.getImporter()).build(null) + () -> BlockEntityType.Builder.of( + ImporterBlockEntity::new, + Blocks.INSTANCE.getImporter().toArray()) + .build(null) )); BlockEntities.INSTANCE.setExporter(blockEntityTypeRegistry.register( EXPORTER.getPath(), - () -> BlockEntityType.Builder.of(ExporterBlockEntity::new, Blocks.INSTANCE.getExporter()).build(null) + () -> BlockEntityType.Builder.of( + ExporterBlockEntity::new, + Blocks.INSTANCE.getExporter().toArray()) + .build(null) )); BlockEntities.INSTANCE.setInterface(blockEntityTypeRegistry.register( INTERFACE.getPath(), @@ -577,7 +665,7 @@ private void registerBlockEntities() { EXTERNAL_STORAGE.getPath(), () -> BlockEntityType.Builder.of( ExternalStorageBlockEntity::new, - Blocks.INSTANCE.getExternalStorage() + Blocks.INSTANCE.getExternalStorage().toArray() ).build(null) )); @@ -597,6 +685,10 @@ private void registerMenus() { GRID.getPath(), () -> IForgeMenuType.create(GridContainerMenu::new) )); + Menus.INSTANCE.setCraftingGrid(menuTypeRegistry.register( + CRAFTING_GRID.getPath(), + () -> IForgeMenuType.create(CraftingGridContainerMenu::new) + )); Menus.INSTANCE.setItemStorage(menuTypeRegistry.register( ITEM_STORAGE_BLOCK.getPath(), () -> IForgeMenuType.create(ItemStorageBlockContainerMenu::new) @@ -657,7 +749,7 @@ public void onRegisterCreativeModeTab(final CreativeModeTabEvent.Register e) { createIdentifier("general"), builder -> builder .title(createTranslation("itemGroup", "general")) - .icon(() -> new ItemStack(Blocks.INSTANCE.getController().getNormal())) + .icon(() -> new ItemStack(Blocks.INSTANCE.getController().getDefault())) .displayItems((enabledFeatures, entries, operatorEnabled) -> CreativeModeTabItems.append(entries::accept)) .build() diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/PlatformImpl.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/PlatformImpl.java index b2ea991d8..3518da4e5 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/PlatformImpl.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/PlatformImpl.java @@ -10,7 +10,7 @@ import com.refinedmods.refinedstorage2.platform.common.Config; import com.refinedmods.refinedstorage2.platform.common.block.ControllerType; import com.refinedmods.refinedstorage2.platform.common.containermenu.transfer.TransferManager; -import com.refinedmods.refinedstorage2.platform.common.util.BucketQuantityFormatter; +import com.refinedmods.refinedstorage2.platform.common.util.BucketAmountFormatting; import com.refinedmods.refinedstorage2.platform.forge.containermenu.ContainerTransferDestination; import com.refinedmods.refinedstorage2.platform.forge.integration.energy.ControllerForgeEnergy; import com.refinedmods.refinedstorage2.platform.forge.internal.grid.ItemGridInsertionStrategy; @@ -28,17 +28,22 @@ import net.minecraft.client.KeyMapping; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.components.EditBox; +import net.minecraft.core.NonNullList; import net.minecraft.resources.ResourceLocation; import net.minecraft.tags.TagKey; import net.minecraft.world.Container; import net.minecraft.world.entity.player.Player; import net.minecraft.world.inventory.AbstractContainerMenu; +import net.minecraft.world.inventory.CraftingContainer; import net.minecraft.world.item.Item; import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.crafting.CraftingRecipe; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.phys.BlockHitResult; +import net.minecraftforge.common.ForgeHooks; import net.minecraftforge.common.capabilities.ForgeCapabilities; +import net.minecraftforge.event.ForgeEventFactory; import net.minecraftforge.fluids.FluidType; import net.minecraftforge.fml.ModLoadingContext; import net.minecraftforge.fml.config.ModConfig; @@ -59,7 +64,7 @@ public PlatformImpl(final NetworkManager networkManager) { new ServerToClientCommunicationsImpl(networkManager), new ClientToServerCommunicationsImpl(networkManager), new MenuOpenerImpl(), - new BucketQuantityFormatter(FluidType.BUCKET_VOLUME), + new BucketAmountFormatting(FluidType.BUCKET_VOLUME), new FluidStackFluidRenderer(), ItemGridInsertionStrategy::new ); @@ -88,7 +93,7 @@ public boolean canEditBoxLoseFocus(final EditBox editBox) { @Override public boolean isKeyDown(final KeyMapping keyMapping) { - return InputConstants.isKeyDown( + return !keyMapping.isUnbound() && InputConstants.isKeyDown( Minecraft.getInstance().getWindow().getWindow(), keyMapping.getKey().getValue() ); @@ -150,4 +155,19 @@ public ItemStack getCloneItemStack(final BlockState state, final Player player) { return state.getCloneItemStack(hitResult, level, hitResult.getBlockPos(), player); } + + @Override + public NonNullList getRemainingCraftingItems(final Player player, + final CraftingRecipe craftingRecipe, + final CraftingContainer container) { + ForgeHooks.setCraftingPlayer(player); + final NonNullList remainingItems = craftingRecipe.getRemainingItems(container); + ForgeHooks.setCraftingPlayer(null); + return remainingItems; + } + + @Override + public void onItemCrafted(final Player player, final ItemStack craftedStack, final CraftingContainer container) { + ForgeEventFactory.firePlayerCraftingEvent(player, craftedStack, container); + } } diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/BlockModelProvider.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/BlockModelProvider.java new file mode 100644 index 000000000..a18490144 --- /dev/null +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/BlockModelProvider.java @@ -0,0 +1,87 @@ +package com.refinedmods.refinedstorage2.platform.forge.datagen; + +import com.refinedmods.refinedstorage2.platform.common.block.grid.AbstractGridBlock; +import com.refinedmods.refinedstorage2.platform.common.content.BlockColorMap; +import com.refinedmods.refinedstorage2.platform.common.content.Blocks; + +import net.minecraft.data.PackOutput; +import net.minecraft.resources.ResourceLocation; +import net.minecraftforge.common.data.ExistingFileHelper; + +import static com.refinedmods.refinedstorage2.platform.common.util.IdentifierUtil.MOD_ID; +import static com.refinedmods.refinedstorage2.platform.common.util.IdentifierUtil.createIdentifier; + +public class BlockModelProvider extends net.minecraftforge.client.model.generators.BlockModelProvider { + public BlockModelProvider(final PackOutput output, final ExistingFileHelper existingFileHelper) { + super(output, MOD_ID, existingFileHelper); + } + + @Override + protected void registerModels() { + registerCables(); + registerController(); + registerGrid(Blocks.INSTANCE.getGrid(), "grid"); + registerGrid(Blocks.INSTANCE.getCraftingGrid(), "crafting_grid"); + } + + private void registerCables() { + final ResourceLocation coreBase = createIdentifier("block/cable/core/base"); + final ResourceLocation extensionBase = createIdentifier("block/cable/extension/base"); + Blocks.INSTANCE.getCable().forEach((color, cable) -> { + final ResourceLocation texture = createIdentifier("block/cable/" + color.getName()); + withExistingParent("block/cable/core/" + color.getName(), coreBase) + .texture("cable", texture) + .texture("particle", texture); + withExistingParent("block/cable/extension/" + color.getName(), extensionBase) + .texture("cable", texture) + .texture("particle", texture); + }); + } + + private void registerController() { + final ResourceLocation base = createIdentifier("block/emissive_all_cutout"); + final ResourceLocation off = createIdentifier("block/controller/off"); + final ResourceLocation on = createIdentifier("block/controller/on"); + Blocks.INSTANCE.getController().forEach((color, controller) -> { + final ResourceLocation cutout = createIdentifier("block/controller/cutouts/" + color.getName()); + withExistingParent("block/controller/" + color.getName(), base) + .texture("particle", off) + .texture("all", on) + .texture("cutout", cutout); + }); + } + + private void registerGrid(final BlockColorMap> blockMap, final String name) { + blockMap.forEach((color, block) -> { + final ResourceLocation cutout = createIdentifier("block/" + name + "/cutouts/" + color.getName()); + registerEmissiveGrid(name, color.getName(), cutout); + }); + final ResourceLocation inactiveCutout = createIdentifier("block/" + name + "/cutouts/inactive"); + registerGrid(name, "inactive", inactiveCutout, createIdentifier("block/north_cutout")); + } + + private void registerGrid(final String name, + final String variantName, + final ResourceLocation cutout, + final ResourceLocation baseModel) { + final ResourceLocation right = createIdentifier("block/" + name + "/right"); + final ResourceLocation left = createIdentifier("block/" + name + "/left"); + final ResourceLocation back = createIdentifier("block/" + name + "/back"); + final ResourceLocation front = createIdentifier("block/" + name + "/front"); + final ResourceLocation top = createIdentifier("block/" + name + "/top"); + final ResourceLocation bottom = createIdentifier("block/bottom"); + withExistingParent("block/" + name + "/" + variantName, baseModel) + .texture("particle", right) + .texture("north", front) + .texture("east", right) + .texture("south", back) + .texture("west", left) + .texture("up", top) + .texture("down", bottom) + .texture("cutout", cutout); + } + + private void registerEmissiveGrid(final String name, final String variantName, final ResourceLocation cutout) { + registerGrid(name, variantName, cutout, createIdentifier("block/emissive_north_cutout")); + } +} diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/BlockStateProvider.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/BlockStateProvider.java new file mode 100644 index 000000000..cf381b6b2 --- /dev/null +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/BlockStateProvider.java @@ -0,0 +1,190 @@ +package com.refinedmods.refinedstorage2.platform.forge.datagen; + +import com.refinedmods.refinedstorage2.platform.common.block.ControllerBlock; +import com.refinedmods.refinedstorage2.platform.common.block.ControllerEnergyType; +import com.refinedmods.refinedstorage2.platform.common.block.direction.BiDirectionType; +import com.refinedmods.refinedstorage2.platform.common.block.direction.DirectionTypeImpl; +import com.refinedmods.refinedstorage2.platform.common.block.grid.AbstractGridBlock; +import com.refinedmods.refinedstorage2.platform.common.content.Blocks; +import com.refinedmods.refinedstorage2.platform.common.util.BiDirection; + +import java.util.function.Supplier; + +import net.minecraft.core.Direction; +import net.minecraft.data.PackOutput; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.item.DyeColor; +import net.minecraft.world.level.block.Block; +import net.minecraftforge.client.model.generators.ConfiguredModel; +import net.minecraftforge.client.model.generators.ModelFile; +import net.minecraftforge.client.model.generators.MultiPartBlockStateBuilder; +import net.minecraftforge.common.data.ExistingFileHelper; + +import static com.refinedmods.refinedstorage2.platform.common.block.CableBlockSupport.PROPERTY_BY_DIRECTION; +import static com.refinedmods.refinedstorage2.platform.common.util.IdentifierUtil.MOD_ID; +import static com.refinedmods.refinedstorage2.platform.common.util.IdentifierUtil.createIdentifier; + +public class BlockStateProvider extends net.minecraftforge.client.model.generators.BlockStateProvider { + private final ExistingFileHelper existingFileHelper; + + public BlockStateProvider(final PackOutput output, final ExistingFileHelper existingFileHelper) { + super(output, MOD_ID, existingFileHelper); + this.existingFileHelper = existingFileHelper; + } + + @Override + protected void registerStatesAndModels() { + registerCables(); + registerExporters(); + registerImporters(); + registerExternalStorages(); + registerControllers(); + registerGrids(); + } + + private void registerCables() { + Blocks.INSTANCE.getCable().forEach((color, cable) -> addCableWithExtensions(cable.get(), color)); + } + + private void registerExporters() { + Blocks.INSTANCE.getExporter().forEach((color, exporter) -> { + final MultiPartBlockStateBuilder builder = addCableWithExtensions(exporter.get(), color); + final ModelFile exporterModel = modelFile(createIdentifier("block/exporter")); + PROPERTY_BY_DIRECTION.forEach((direction, property) -> { + final var part = builder.part(); + addDirectionalRotation(direction, part); + part.modelFile(exporterModel).addModel().condition(DirectionTypeImpl.INSTANCE.getProperty(), direction); + }); + }); + } + + private void registerImporters() { + Blocks.INSTANCE.getImporter().forEach((color, exporter) -> { + final MultiPartBlockStateBuilder builder = addCableWithExtensions(exporter.get(), color); + final ModelFile importerModel = modelFile(createIdentifier("block/importer")); + PROPERTY_BY_DIRECTION.forEach((direction, property) -> { + final var part = builder.part(); + addDirectionalRotation(direction, part); + part.modelFile(importerModel).addModel().condition(DirectionTypeImpl.INSTANCE.getProperty(), direction); + }); + }); + } + + private void registerExternalStorages() { + Blocks.INSTANCE.getExternalStorage().forEach((color, externalStorage) -> { + final MultiPartBlockStateBuilder builder = addCableWithExtensions(externalStorage.get(), color); + final ModelFile externalStorageModel = modelFile(createIdentifier("block/external_storage")); + PROPERTY_BY_DIRECTION.forEach((direction, property) -> { + final var part = builder.part(); + addDirectionalRotation(direction, part); + part.modelFile(externalStorageModel) + .addModel() + .condition(DirectionTypeImpl.INSTANCE.getProperty(), direction); + }); + }); + } + + private MultiPartBlockStateBuilder addCableWithExtensions(final Block block, final DyeColor color) { + final var builder = getMultipartBuilder(block) + .part() + .modelFile(modelFile(createIdentifier("block/cable/core/" + color.getName()))).addModel() + .end(); + final ModelFile extension = modelFile(createIdentifier("block/cable/extension/" + color.getName())); + addForEachDirection(builder, extension); + return builder; + } + + private static void addForEachDirection(final MultiPartBlockStateBuilder builder, final ModelFile extension) { + PROPERTY_BY_DIRECTION.forEach((direction, property) -> { + final var part = builder.part(); + addDirectionalRotation(direction, part); + part.modelFile(extension).addModel().condition(property, true); + }); + } + + private static void addDirectionalRotation( + final Direction direction, + final ConfiguredModel.Builder part + ) { + switch (direction) { + case UP -> part.rotationX(270); + case SOUTH -> part.rotationX(180); + case DOWN -> part.rotationX(90); + case WEST -> part.rotationY(270); + case EAST -> part.rotationY(90); + } + } + + private void registerGrids() { + Blocks.INSTANCE.getGrid().forEach((color, block) -> configureGridVariants(color, block, "grid")); + Blocks.INSTANCE.getCraftingGrid().forEach((color, block) -> configureGridVariants( + color, + block, + "crafting_grid" + )); + } + + private void configureGridVariants(final DyeColor color, + final Supplier> block, + final String name) { + final ModelFile inactive = modelFile(createIdentifier("block/" + name + "/inactive")); + final ModelFile active = modelFile(createIdentifier("block/" + name + "/" + color.getName())); + final var builder = getVariantBuilder(block.get()); + builder.forAllStates(blockState -> { + final ConfiguredModel.Builder model = ConfiguredModel.builder(); + if (blockState.getValue(AbstractGridBlock.ACTIVE)) { + model.modelFile(active); + } else { + model.modelFile(inactive); + } + addRotation(model, blockState.getValue(BiDirectionType.INSTANCE.getProperty())); + return model.build(); + }); + } + + private void registerControllers() { + Blocks.INSTANCE.getController().forEach(this::configureControllerVariants); + Blocks.INSTANCE.getCreativeController().forEach(this::configureControllerVariants); + } + + private void configureControllerVariants(final DyeColor color, final Supplier controller) { + final ModelFile off = modelFile(createIdentifier("block/controller/off")); + final ModelFile nearlyOff = modelFile(createIdentifier("block/controller/nearly_off")); + final ModelFile nearlyOn = modelFile(createIdentifier("block/controller/nearly_on")); + final var builder = getVariantBuilder(controller.get()); + builder.addModels( + builder.partialState().with(ControllerBlock.ENERGY_TYPE, ControllerEnergyType.OFF), + ConfiguredModel.builder().modelFile(off).buildLast() + ); + builder.addModels( + builder.partialState().with(ControllerBlock.ENERGY_TYPE, ControllerEnergyType.NEARLY_OFF), + ConfiguredModel.builder().modelFile(nearlyOff).buildLast() + ); + builder.addModels( + builder.partialState().with(ControllerBlock.ENERGY_TYPE, ControllerEnergyType.NEARLY_ON), + ConfiguredModel.builder().modelFile(nearlyOn).buildLast() + ); + builder.addModels( + builder.partialState().with(ControllerBlock.ENERGY_TYPE, ControllerEnergyType.ON), + ConfiguredModel.builder() + .modelFile(modelFile(createIdentifier("block/controller/" + color.getName()))) + .buildLast() + ); + } + + private void addRotation(final ConfiguredModel.Builder model, final BiDirection block) { + final int x = (int) block.getVec().x(); + final int y = (int) block.getVec().y(); + final int z = (int) block.getVec().z(); + switch (block) { + case UP_EAST, UP_NORTH, UP_SOUTH, UP_WEST, DOWN_EAST, DOWN_WEST, DOWN_SOUTH, DOWN_NORTH -> + model.rotationX(x * -1).rotationY(z); + case EAST, WEST -> model.rotationY(y + 180); + case NORTH, SOUTH -> model.rotationY(y); + } + } + + private ModelFile modelFile(final ResourceLocation location) { + return new ModelFile.ExistingModelFile(location, existingFileHelper); + } +} diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/DataGenerators.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/DataGenerators.java new file mode 100644 index 000000000..4db76945e --- /dev/null +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/DataGenerators.java @@ -0,0 +1,85 @@ +package com.refinedmods.refinedstorage2.platform.forge.datagen; + +import com.refinedmods.refinedstorage2.platform.forge.datagen.loot.LootTableProvider; +import com.refinedmods.refinedstorage2.platform.forge.datagen.recipe.RecoloringRecipeProvider; +import com.refinedmods.refinedstorage2.platform.forge.datagen.tag.BlockTagsProvider; +import com.refinedmods.refinedstorage2.platform.forge.datagen.tag.ItemTagGenerator; + +import java.util.concurrent.CompletableFuture; + +import net.minecraft.core.HolderLookup; +import net.minecraft.data.DataGenerator; +import net.minecraft.data.DataGenerator.PackGenerator; +import net.minecraftforge.common.data.ExistingFileHelper; +import net.minecraftforge.data.event.GatherDataEvent; +import net.minecraftforge.eventbus.api.SubscribeEvent; +import net.minecraftforge.fml.common.Mod.EventBusSubscriber; + +import static com.refinedmods.refinedstorage2.platform.common.util.IdentifierUtil.MOD_ID; + +@EventBusSubscriber(modid = MOD_ID, bus = EventBusSubscriber.Bus.MOD) +public class DataGenerators { + private DataGenerators() { + } + + @SubscribeEvent + public static void onGatherData(final GatherDataEvent dataEvent) { + registerBlockModelProviders(dataEvent.getGenerator(), dataEvent.getExistingFileHelper()); + registerItemModelProviders(dataEvent.getGenerator(), dataEvent.getExistingFileHelper()); + registerBlockStateProviders(dataEvent.getGenerator(), dataEvent.getExistingFileHelper()); + registerLootTableProviders(dataEvent.getGenerator()); + registerRecipeProviders(dataEvent.getGenerator()); + registerTagProviders( + dataEvent.getGenerator(), + dataEvent.getLookupProvider(), + dataEvent.getExistingFileHelper() + ); + } + + // this function has to happen after the models, since the jsons refer to files generated there + private static void registerBlockStateProviders(final DataGenerator generator, + final ExistingFileHelper existingFileHelper) { + final PackGenerator mainPack = generator.getVanillaPack(true); + + mainPack.addProvider(output -> new BlockStateProvider(output, existingFileHelper)); + } + + private static void registerBlockModelProviders(final DataGenerator generator, + final ExistingFileHelper existingFileHelper) { + final PackGenerator mainPack = generator.getVanillaPack(true); + + mainPack.addProvider(output -> new BlockModelProvider(output, existingFileHelper)); + } + + private static void registerItemModelProviders(final DataGenerator generator, + final ExistingFileHelper existingFileHelper) { + final PackGenerator mainPack = generator.getVanillaPack(true); + + mainPack.addProvider(output -> new ItemModelProvider(output, existingFileHelper)); + } + + private static void registerLootTableProviders(final DataGenerator generator) { + final PackGenerator mainPack = generator.getVanillaPack(true); + + mainPack.addProvider(LootTableProvider::new); + } + + private static void registerRecipeProviders(final DataGenerator generator) { + final PackGenerator mainPack = generator.getVanillaPack(true); + + mainPack.addProvider(RecoloringRecipeProvider::new); + } + + private static void registerTagProviders( + final DataGenerator generator, + final CompletableFuture lookupProvider, + final ExistingFileHelper existingFileHelper + ) { + final PackGenerator mainPack = generator.getVanillaPack(true); + + final BlockTagsProvider blockTagsProvider = mainPack.addProvider(output -> + new BlockTagsProvider(output, lookupProvider, existingFileHelper)); + mainPack.addProvider(output -> + new ItemTagGenerator(output, lookupProvider, blockTagsProvider, existingFileHelper)); + } +} diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/ItemModelProvider.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/ItemModelProvider.java new file mode 100644 index 000000000..07d7d661f --- /dev/null +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/ItemModelProvider.java @@ -0,0 +1,138 @@ +package com.refinedmods.refinedstorage2.platform.forge.datagen; + +import com.refinedmods.refinedstorage2.platform.common.block.CableBlock; +import com.refinedmods.refinedstorage2.platform.common.block.ControllerBlock; +import com.refinedmods.refinedstorage2.platform.common.block.ExporterBlock; +import com.refinedmods.refinedstorage2.platform.common.block.ExternalStorageBlock; +import com.refinedmods.refinedstorage2.platform.common.block.ImporterBlock; +import com.refinedmods.refinedstorage2.platform.common.block.grid.CraftingGridBlock; +import com.refinedmods.refinedstorage2.platform.common.block.grid.GridBlock; +import com.refinedmods.refinedstorage2.platform.common.content.BlockColorMap; +import com.refinedmods.refinedstorage2.platform.common.content.Blocks; +import com.refinedmods.refinedstorage2.platform.common.content.ColorMap; + +import net.minecraft.data.PackOutput; +import net.minecraft.resources.ResourceLocation; +import net.minecraftforge.client.model.generators.ModelFile; +import net.minecraftforge.common.data.ExistingFileHelper; + +import static com.refinedmods.refinedstorage2.platform.common.util.IdentifierUtil.MOD_ID; +import static com.refinedmods.refinedstorage2.platform.common.util.IdentifierUtil.createIdentifier; + +public class ItemModelProvider extends net.minecraftforge.client.model.generators.ItemModelProvider { + public ItemModelProvider(final PackOutput output, final ExistingFileHelper existingFileHelper) { + super(output, MOD_ID, existingFileHelper); + } + + @Override + protected void registerModels() { + registerCables(); + registerExporter(); + registerImporter(); + registerExternalStorage(); + registerController(); + registerCreativeController(); + registerGrid(); + registerCraftingGrid(); + } + + private void registerCables() { + final ResourceLocation base = createIdentifier("item/cable/base"); + final ColorMap cables = Blocks.INSTANCE.getCable(); + cables.forEach((color, cable) -> singleTexture( + cables.getId(color, createIdentifier("cable")).getPath(), + base, + "cable", + createIdentifier("block/cable/" + color.getName())) + ); + } + + private void registerExporter() { + final ResourceLocation base = createIdentifier("item/exporter/base"); + final ColorMap exporters = Blocks.INSTANCE.getExporter(); + exporters.forEach((color, exporter) -> singleTexture( + exporters.getId(color, createIdentifier("exporter")).getPath(), + base, + "cable", + createIdentifier("block/cable/" + color.getName()) + )); + } + + private void registerImporter() { + final ResourceLocation base = createIdentifier("item/importer/base"); + final ColorMap importer = Blocks.INSTANCE.getImporter(); + importer.forEach((color, exporter) -> singleTexture( + importer.getId(color, createIdentifier("importer")).getPath(), + base, + "cable", + createIdentifier("block/cable/" + color.getName()) + )); + } + + private void registerExternalStorage() { + final ResourceLocation base = createIdentifier("item/external_storage/base"); + final ColorMap externalStorage = Blocks.INSTANCE.getExternalStorage(); + externalStorage.forEach((color, exporter) -> singleTexture( + externalStorage.getId(color, createIdentifier("external_storage")).getPath(), + base, + "cable", + createIdentifier("block/cable/" + color.getName()) + )); + } + + private void registerController() { + final ResourceLocation base = new ResourceLocation("item/generated"); + final ResourceLocation off = createIdentifier("block/controller/off"); + final ResourceLocation nearlyOff = createIdentifier("block/controller/nearly_off"); + final ResourceLocation nearlyOn = createIdentifier("block/controller/nearly_on"); + final ResourceLocation stored = createIdentifier("stored_in_controller"); + final ColorMap controllers = Blocks.INSTANCE.getController(); + controllers.forEach((color, controller) -> + withExistingParent(controllers.getId(color, createIdentifier("controller")).getPath(), base) + .override() + .predicate(stored, 0) + .model(modelFile(off)) + .end() + .override() + .predicate(stored, 0.01f) + .model(modelFile(nearlyOff)) + .end() + .override() + .predicate(stored, 0.3f) + .model(modelFile(nearlyOn)) + .end() + .override() + .predicate(stored, 0.4f) + .model(modelFile(createIdentifier("block/controller/" + color.getName()))) + .end() + ); + } + + private void registerCreativeController() { + final BlockColorMap creativeControllers = Blocks.INSTANCE.getCreativeController(); + creativeControllers.forEach((color, controller) -> withExistingParent( + creativeControllers.getId(color, createIdentifier("creative_controller")).getPath(), + createIdentifier("block/controller/" + color.getName()) + )); + } + + private void registerGrid() { + final BlockColorMap grids = Blocks.INSTANCE.getGrid(); + grids.forEach((color, grid) -> withExistingParent( + grids.getId(color, createIdentifier("grid")).getPath(), + createIdentifier("block/grid/" + color.getName()) + )); + } + + private void registerCraftingGrid() { + final BlockColorMap grids = Blocks.INSTANCE.getCraftingGrid(); + grids.forEach((color, grid) -> withExistingParent( + grids.getId(color, createIdentifier("crafting_grid")).getPath(), + createIdentifier("block/crafting_grid/" + color.getName()) + )); + } + + private ModelFile modelFile(final ResourceLocation location) { + return new ModelFile.ExistingModelFile(location, existingFileHelper); + } +} diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/loot/BlockDropProvider.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/loot/BlockDropProvider.java new file mode 100644 index 000000000..f724034fb --- /dev/null +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/loot/BlockDropProvider.java @@ -0,0 +1,41 @@ +package com.refinedmods.refinedstorage2.platform.forge.datagen.loot; + +import com.refinedmods.refinedstorage2.platform.common.content.Blocks; + +import java.util.Set; +import java.util.stream.Stream; + +import net.minecraft.data.loot.BlockLootSubProvider; +import net.minecraft.world.flag.FeatureFlags; +import net.minecraft.world.level.block.Block; + +public class BlockDropProvider extends BlockLootSubProvider { + public BlockDropProvider() { + super(Set.of(), FeatureFlags.REGISTRY.allFlags()); + } + + @Override + protected void generate() { + Blocks.INSTANCE.getCable().forEach((color, block) -> dropSelf(block.get())); + Blocks.INSTANCE.getGrid().forEach((color, block) -> dropSelf(block.get())); + Blocks.INSTANCE.getCraftingGrid().forEach((color, block) -> dropSelf(block.get())); + Blocks.INSTANCE.getController().forEach((color, block) -> dropSelf(block.get())); + Blocks.INSTANCE.getCreativeController().forEach((color, block) -> dropSelf(block.get())); + } + + @Override + protected Iterable getKnownBlocks() { + final Stream cables = Blocks.INSTANCE.getCable().values().stream().map(b -> b); + final Stream grids = Blocks.INSTANCE.getGrid().values().stream().map(b -> b); + final Stream craftingGrids = Blocks.INSTANCE.getCraftingGrid().values().stream().map(b -> b); + final Stream controllers = Blocks.INSTANCE.getController().values().stream().map(b -> b); + final Stream creativeControllers = Blocks.INSTANCE.getCreativeController().values().stream().map(b -> b); + return Stream.concat( + Stream.concat( + cables, + Stream.concat(grids, craftingGrids) + ), + Stream.concat(controllers, creativeControllers) + ).toList(); + } +} diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/loot/LootTableProvider.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/loot/LootTableProvider.java new file mode 100644 index 000000000..ac0f47cd3 --- /dev/null +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/loot/LootTableProvider.java @@ -0,0 +1,19 @@ +package com.refinedmods.refinedstorage2.platform.forge.datagen.loot; + +import java.util.List; +import java.util.Set; + +import net.minecraft.data.PackOutput; +import net.minecraft.world.level.storage.loot.parameters.LootContextParamSet; + +import static net.minecraft.world.level.storage.loot.parameters.LootContextParams.EXPLOSION_RADIUS; + +public class LootTableProvider extends net.minecraft.data.loot.LootTableProvider { + public LootTableProvider(final PackOutput output) { + super(output, Set.of(), List.of( + new SubProviderEntry(BlockDropProvider::new, + LootContextParamSet.builder().required(EXPLOSION_RADIUS).build()) + )); + } + +} diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/loot/package-info.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/loot/package-info.java new file mode 100644 index 000000000..bb0f9e640 --- /dev/null +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/loot/package-info.java @@ -0,0 +1,7 @@ +@ParametersAreNonnullByDefault +@FieldsAndMethodsAreNonnullByDefault +package com.refinedmods.refinedstorage2.platform.forge.datagen.loot; + +import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/package-info.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/package-info.java new file mode 100644 index 000000000..7e0433405 --- /dev/null +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/package-info.java @@ -0,0 +1,7 @@ +@ParametersAreNonnullByDefault +@FieldsAndMethodsAreNonnullByDefault +package com.refinedmods.refinedstorage2.platform.forge.datagen; + +import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/recipe/RecoloringRecipeProvider.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/recipe/RecoloringRecipeProvider.java new file mode 100644 index 000000000..15c3246d4 --- /dev/null +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/recipe/RecoloringRecipeProvider.java @@ -0,0 +1,77 @@ +package com.refinedmods.refinedstorage2.platform.forge.datagen.recipe; + +import com.refinedmods.refinedstorage2.platform.common.content.Blocks; +import com.refinedmods.refinedstorage2.platform.common.content.Tags; + +import java.util.function.Consumer; + +import net.minecraft.data.PackOutput; +import net.minecraft.data.recipes.FinishedRecipe; +import net.minecraft.data.recipes.RecipeCategory; +import net.minecraft.data.recipes.RecipeProvider; +import net.minecraft.data.recipes.ShapelessRecipeBuilder; +import net.minecraft.tags.TagKey; +import net.minecraft.world.item.DyeColor; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.Items; + +import static com.refinedmods.refinedstorage2.platform.common.util.IdentifierUtil.createIdentifier; + +public class RecoloringRecipeProvider extends RecipeProvider { + public RecoloringRecipeProvider(final PackOutput output) { + super(output); + } + + @Override + protected void buildRecipes(final Consumer provider) { + Blocks.INSTANCE.getCable().forEach((color, block) -> + recolorItems(Tags.CABLES, block.get().asItem(), color) + .save(provider, createIdentifier("coloring/" + color.getName() + "_cable"))); + Blocks.INSTANCE.getImporter().forEach((color, block) -> + recolorItems(Tags.IMPORTERS, block.get().asItem(), color) + .save(provider, createIdentifier("coloring/" + color.getName() + "_importer"))); + Blocks.INSTANCE.getExporter().forEach((color, block) -> + recolorItems(Tags.EXPORTERS, block.get().asItem(), color) + .save(provider, createIdentifier("coloring/" + color.getName() + "_exporter"))); + Blocks.INSTANCE.getExternalStorage().forEach((color, block) -> + recolorItems(Tags.EXTERNAL_STORAGES, block.get().asItem(), color) + .save(provider, createIdentifier("coloring/" + color.getName() + "_external_storage"))); + Blocks.INSTANCE.getController().forEach((color, block) -> + recolorItems(Tags.CONTROLLERS, block.get().asItem(), color) + .save(provider, createIdentifier("coloring/" + color.getName() + "_controller"))); + Blocks.INSTANCE.getGrid().forEach((color, block) -> + recolorItems(Tags.GRIDS, block.get().asItem(), color) + .save(provider, createIdentifier("coloring/" + color.getName() + "_grid"))); + Blocks.INSTANCE.getCraftingGrid().forEach((color, block) -> + recolorItems(Tags.CRAFTING_GRIDS, block.get().asItem(), color) + .save(provider, createIdentifier("coloring/" + color.getName() + "_crafting_grid"))); + } + + private ShapelessRecipeBuilder recolorItems(final TagKey dyeable, final Item result, final DyeColor color) { + return ShapelessRecipeBuilder.shapeless(RecipeCategory.MISC, result) + .requires(dyeable) + .requires(getDyeItem(color)) + .unlockedBy("has_" + dyeable.location().getPath(), has(dyeable)); + } + + private static Item getDyeItem(final DyeColor color) { + return switch (color) { + case RED -> Items.RED_DYE; + case WHITE -> Items.WHITE_DYE; + case ORANGE -> Items.ORANGE_DYE; + case MAGENTA -> Items.MAGENTA_DYE; + case LIGHT_BLUE -> Items.LIGHT_BLUE_DYE; + case YELLOW -> Items.YELLOW_DYE; + case LIME -> Items.LIME_DYE; + case PINK -> Items.PINK_DYE; + case GRAY -> Items.GRAY_DYE; + case LIGHT_GRAY -> Items.LIGHT_GRAY_DYE; + case CYAN -> Items.CYAN_DYE; + case PURPLE -> Items.PURPLE_DYE; + case BLUE -> Items.BLUE_DYE; + case BROWN -> Items.BROWN_DYE; + case GREEN -> Items.GREEN_DYE; + case BLACK -> Items.BLACK_DYE; + }; + } +} diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/recipe/package-info.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/recipe/package-info.java new file mode 100644 index 000000000..0847f8977 --- /dev/null +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/recipe/package-info.java @@ -0,0 +1,7 @@ +@ParametersAreNonnullByDefault +@FieldsAndMethodsAreNonnullByDefault +package com.refinedmods.refinedstorage2.platform.forge.datagen.recipe; + +import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/tag/BlockTagsProvider.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/tag/BlockTagsProvider.java new file mode 100644 index 000000000..87db693d9 --- /dev/null +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/tag/BlockTagsProvider.java @@ -0,0 +1,25 @@ +package com.refinedmods.refinedstorage2.platform.forge.datagen.tag; + +import java.util.concurrent.CompletableFuture; +import javax.annotation.Nullable; + +import net.minecraft.core.HolderLookup; +import net.minecraft.core.registries.Registries; +import net.minecraft.data.PackOutput; +import net.minecraft.world.level.block.Block; +import net.minecraftforge.common.data.ExistingFileHelper; + +import static com.refinedmods.refinedstorage2.platform.common.util.IdentifierUtil.MOD_ID; + +public class BlockTagsProvider extends net.minecraft.data.tags.TagsProvider { + public BlockTagsProvider(final PackOutput packOutput, + final CompletableFuture providerCompletableFuture, + final @Nullable ExistingFileHelper existingFileHelper) { + super(packOutput, Registries.BLOCK, providerCompletableFuture, MOD_ID, existingFileHelper); + } + + @Override + protected void addTags(final HolderLookup.Provider provider) { + // this class is needed, since the ItemTagGenerator needs a TagsProvider to create it + } +} diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/tag/ItemTagGenerator.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/tag/ItemTagGenerator.java new file mode 100644 index 000000000..674ff5d71 --- /dev/null +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/tag/ItemTagGenerator.java @@ -0,0 +1,90 @@ +package com.refinedmods.refinedstorage2.platform.forge.datagen.tag; + +import com.refinedmods.refinedstorage2.platform.common.content.Blocks; +import com.refinedmods.refinedstorage2.platform.common.content.Items; +import com.refinedmods.refinedstorage2.platform.common.internal.storage.type.FluidStorageType; +import com.refinedmods.refinedstorage2.platform.common.internal.storage.type.ItemStorageType; + +import java.util.Arrays; +import java.util.Collection; +import java.util.concurrent.CompletableFuture; +import java.util.function.Supplier; + +import net.minecraft.core.HolderLookup; +import net.minecraft.data.PackOutput; +import net.minecraft.data.tags.ItemTagsProvider; +import net.minecraft.data.tags.TagsProvider; +import net.minecraft.tags.TagKey; +import net.minecraft.world.item.Item; +import net.minecraft.world.level.block.Block; +import net.minecraftforge.common.data.ExistingFileHelper; + +import static com.refinedmods.refinedstorage2.platform.common.content.Tags.CABLES; +import static com.refinedmods.refinedstorage2.platform.common.content.Tags.CONTROLLERS; +import static com.refinedmods.refinedstorage2.platform.common.content.Tags.CRAFTING_GRIDS; +import static com.refinedmods.refinedstorage2.platform.common.content.Tags.CREATIVE_CONTROLLERS; +import static com.refinedmods.refinedstorage2.platform.common.content.Tags.EXPORTERS; +import static com.refinedmods.refinedstorage2.platform.common.content.Tags.EXTERNAL_STORAGES; +import static com.refinedmods.refinedstorage2.platform.common.content.Tags.FLUID_STORAGE_DISKS; +import static com.refinedmods.refinedstorage2.platform.common.content.Tags.GRIDS; +import static com.refinedmods.refinedstorage2.platform.common.content.Tags.IMPORTERS; +import static com.refinedmods.refinedstorage2.platform.common.content.Tags.STORAGE_DISKS; +import static com.refinedmods.refinedstorage2.platform.common.util.IdentifierUtil.MOD_ID; + +public class ItemTagGenerator extends ItemTagsProvider { + + public ItemTagGenerator(final PackOutput packOutput, + final CompletableFuture registries, + final TagsProvider blockTagsProvider, + final ExistingFileHelper existingFileHelper) { + super(packOutput, registries, blockTagsProvider, MOD_ID, existingFileHelper); + } + + @Override + protected void addTags(final HolderLookup.Provider provider) { + addAllToTag(CABLES, Items.INSTANCE.getCables()); + addAllToTag(CONTROLLERS, Items.INSTANCE.getRegularControllers()); + addAllToTag(CREATIVE_CONTROLLERS, Blocks.INSTANCE.getCreativeController().values().stream() + .map(Block::asItem) + .map(c -> (Supplier) () -> c) + .toList()); + addAllToTag(FLUID_STORAGE_DISKS, + Arrays.stream(FluidStorageType.Variant.values()) + .filter(variant -> variant != FluidStorageType.Variant.CREATIVE) + .map(Items.INSTANCE::getFluidStorageDisk) + .map(t -> (Supplier) () -> t) + .toList()); + addAllToTag(GRIDS, + Blocks.INSTANCE.getGrid().values().stream() + .map(block -> (Supplier) block::asItem) + .toList()); + addAllToTag(CRAFTING_GRIDS, + Blocks.INSTANCE.getCraftingGrid().values().stream() + .map(block -> (Supplier) block::asItem) + .toList()); + addAllToTag(STORAGE_DISKS, + Arrays.stream(ItemStorageType.Variant.values()) + .filter(variant -> variant != ItemStorageType.Variant.CREATIVE) + .map(Items.INSTANCE::getItemStorageDisk) + .map(t -> (Supplier) () -> t) + .toList()); + addAllToTag(IMPORTERS, + Blocks.INSTANCE.getImporter().values().stream() + .map(block -> (Supplier) block::asItem) + .toList()); + addAllToTag(EXPORTERS, + Blocks.INSTANCE.getExporter().values().stream() + .map(block -> (Supplier) block::asItem) + .toList()); + addAllToTag(EXTERNAL_STORAGES, + Blocks.INSTANCE.getExternalStorage().values().stream() + .map(block -> (Supplier) block::asItem) + .toList()); + } + + private void addAllToTag(final TagKey t, final Collection> items) { + tag(t) + .add(items.stream().map(Supplier::get).toArray(Item[]::new)) + .replace(false); + } +} diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/tag/package-info.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/tag/package-info.java new file mode 100644 index 000000000..0b3cd5c64 --- /dev/null +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/tag/package-info.java @@ -0,0 +1,7 @@ +@ParametersAreNonnullByDefault +@FieldsAndMethodsAreNonnullByDefault +package com.refinedmods.refinedstorage2.platform.forge.datagen.tag; + +import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/jei/JeiGridSynchronizer.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/jei/JeiGridSynchronizer.java deleted file mode 100644 index 047776870..000000000 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/jei/JeiGridSynchronizer.java +++ /dev/null @@ -1,43 +0,0 @@ -package com.refinedmods.refinedstorage2.platform.forge.integration.jei; - -import com.refinedmods.refinedstorage2.platform.common.internal.grid.AbstractGridSynchronizer; - -import javax.annotation.Nullable; - -import net.minecraft.network.chat.MutableComponent; - -import static com.refinedmods.refinedstorage2.platform.common.util.IdentifierUtil.createTranslation; - -public class JeiGridSynchronizer extends AbstractGridSynchronizer { - private static final MutableComponent TITLE = createTranslation("gui", "grid.synchronizer.jei"); - private static final MutableComponent TITLE_TWO_WAY = createTranslation("gui", "grid.synchronizer.jei.two_way"); - - private final JeiProxy jeiProxy; - private final boolean twoWay; - - public JeiGridSynchronizer(final JeiProxy jeiProxy, final boolean twoWay) { - this.jeiProxy = jeiProxy; - this.twoWay = twoWay; - } - - @Override - public MutableComponent getTitle() { - return twoWay ? TITLE_TWO_WAY : TITLE; - } - - @Override - public void synchronizeFromGrid(final String text) { - jeiProxy.setSearchFieldText(text); - } - - @Override - @Nullable - public String getTextToSynchronizeToGrid() { - return twoWay ? jeiProxy.getSearchFieldText() : null; - } - - @Override - public int getXTexture() { - return twoWay ? 32 : 48; - } -} diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/jei/JeiPlugin.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/jei/JeiPlugin.java deleted file mode 100644 index f51937293..000000000 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/jei/JeiPlugin.java +++ /dev/null @@ -1,32 +0,0 @@ -package com.refinedmods.refinedstorage2.platform.forge.integration.jei; - -import javax.annotation.Nullable; - -import mezz.jei.api.IModPlugin; -import mezz.jei.api.runtime.IJeiRuntime; -import net.minecraft.resources.ResourceLocation; - -import static com.refinedmods.refinedstorage2.platform.common.util.IdentifierUtil.createIdentifier; - -@mezz.jei.api.JeiPlugin -public class JeiPlugin implements IModPlugin { - private static final ResourceLocation ID = createIdentifier("plugin"); - - @Nullable - private static IJeiRuntime runtime; - - @Override - public ResourceLocation getPluginUid() { - return ID; - } - - @Override - public void onRuntimeAvailable(final IJeiRuntime newRuntime) { - JeiPlugin.runtime = newRuntime; - } - - @Nullable - public static IJeiRuntime getRuntime() { - return runtime; - } -} diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/jei/package-info.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/recipemod/package-info.java similarity index 95% rename from refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/jei/package-info.java rename to refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/recipemod/package-info.java index a655efc5f..59a81cce8 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/jei/package-info.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/recipemod/package-info.java @@ -1,6 +1,6 @@ @ParametersAreNonnullByDefault @FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.forge.integration.jei; +package com.refinedmods.refinedstorage2.platform.forge.integration.recipemod; import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/recipemod/rei/CraftingGridTransferHandler.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/recipemod/rei/CraftingGridTransferHandler.java new file mode 100644 index 000000000..559be9dd8 --- /dev/null +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/recipemod/rei/CraftingGridTransferHandler.java @@ -0,0 +1,126 @@ +package com.refinedmods.refinedstorage2.platform.forge.integration.recipemod.rei; + +import com.refinedmods.refinedstorage2.api.resource.list.ResourceList; +import com.refinedmods.refinedstorage2.platform.api.resource.ItemResource; +import com.refinedmods.refinedstorage2.platform.common.containermenu.grid.CraftingGridContainerMenu; + +import java.awt.Color; +import java.util.List; + +import com.mojang.blaze3d.vertex.PoseStack; +import me.shedaniel.math.Rectangle; +import me.shedaniel.rei.api.client.gui.widgets.Slot; +import me.shedaniel.rei.api.client.gui.widgets.Widget; +import me.shedaniel.rei.api.client.registry.transfer.TransferHandler; +import me.shedaniel.rei.api.client.registry.transfer.TransferHandlerRenderer; +import me.shedaniel.rei.api.common.category.CategoryIdentifier; +import me.shedaniel.rei.api.common.entry.EntryIngredient; +import me.shedaniel.rei.api.common.entry.EntryStack; +import me.shedaniel.rei.api.common.entry.type.VanillaEntryTypes; +import me.shedaniel.rei.api.common.util.CollectionUtils; +import me.shedaniel.rei.plugin.common.displays.crafting.DefaultCraftingDisplay; +import net.minecraft.client.gui.GuiComponent; +import net.minecraft.world.item.ItemStack; + +public class CraftingGridTransferHandler implements TransferHandler { + private static final Color MISSING_COLOR = new Color(1.0f, 0.0f, 0.0f, 0.4f); + private static final CategoryIdentifier CRAFTING = CategoryIdentifier.of("minecraft", "plugins/crafting"); + + @Override + public Result handle(final Context context) { + if (!(context.getMenu() instanceof CraftingGridContainerMenu containerMenu) + || !context.getDisplay().getCategoryIdentifier().equals(CRAFTING) + || !(context.getDisplay() instanceof DefaultCraftingDisplay defaultCraftingDisplay)) { + return Result.createNotApplicable(); + } + final List ingredients = defaultCraftingDisplay.getOrganisedInputEntries(3, 3); + if (context.isActuallyCrafting()) { + doTransfer(ingredients, containerMenu); + return Result.createSuccessful().blocksFurtherHandling(); + } + final ResourceList available = containerMenu.getAvailableListForRecipeTransfer(); + final MissingIngredients missingIngredients = findMissingIngredients(ingredients, available); + if (missingIngredients.isEmpty()) { + return Result.createSuccessful().blocksFurtherHandling(); + } + return Result.createSuccessful() + .color(MISSING_COLOR.getRGB()) + .tooltipMissing(missingIngredients.getIngredients()) + .renderer(createMissingItemsRenderer(missingIngredients)) + .blocksFurtherHandling(); + } + + private void doTransfer(final List ingredients, final CraftingGridContainerMenu containerMenu) { + final List> inputs = getInputs(ingredients); + containerMenu.transferRecipe(inputs); + } + + private MissingIngredients findMissingIngredients(final List ingredients, + final ResourceList available) { + final MissingIngredients missingIngredients = new MissingIngredients(); + for (int i = 0; i < ingredients.size(); ++i) { + final EntryIngredient ingredient = ingredients.get(i); + if (ingredient.isEmpty()) { + continue; + } + if (!isAvailable(available, ingredient)) { + missingIngredients.addIngredient(ingredient, i); + } + } + return missingIngredients; + } + + private boolean isAvailable(final ResourceList available, final EntryIngredient ingredient) { + final List possibilities = convertIngredientToItemStacks(ingredient); + for (final ItemStack possibility : possibilities) { + final ItemResource possibilityResource = ItemResource.ofItemStack(possibility); + if (available.remove(possibilityResource, 1).isPresent()) { + return true; + } + } + return false; + } + + private List> getInputs(final List ingredients) { + return ingredients.stream() + .map(this::convertIngredientToItemStacks) + .map(list -> list.stream().map(ItemResource::ofItemStack).toList()) + .toList(); + } + + private List convertIngredientToItemStacks(final EntryIngredient ingredient) { + return CollectionUtils., ItemStack>filterAndMap( + ingredient, + stack -> stack.getType() == VanillaEntryTypes.ITEM, + EntryStack::castValue + ); + } + + private TransferHandlerRenderer createMissingItemsRenderer(final MissingIngredients missingIngredients) { + return (matrices, mouseX, mouseY, delta, widgets, bounds, display) -> { + int index = 0; + for (final Widget widget : widgets) { + if (widget instanceof Slot slot + && slot.getNoticeMark() == Slot.INPUT + && missingIngredients.isMissing(index++)) { + renderMissingItemOverlay(matrices, slot); + } + } + }; + } + + private void renderMissingItemOverlay(final PoseStack poseStack, final Slot slot) { + poseStack.pushPose(); + poseStack.translate(0, 0, 400); + final Rectangle innerBounds = slot.getInnerBounds(); + GuiComponent.fill( + poseStack, + innerBounds.x, + innerBounds.y, + innerBounds.getMaxX(), + innerBounds.getMaxY(), + MISSING_COLOR.getRGB() + ); + poseStack.popPose(); + } +} diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/recipemod/rei/FilteredResourceFocusedStackProvider.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/recipemod/rei/FilteredResourceFocusedStackProvider.java new file mode 100644 index 000000000..fea3a83f4 --- /dev/null +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/recipemod/rei/FilteredResourceFocusedStackProvider.java @@ -0,0 +1,36 @@ +package com.refinedmods.refinedstorage2.platform.forge.integration.recipemod.rei; + +import com.refinedmods.refinedstorage2.platform.api.integration.recipemod.IngredientConverter; +import com.refinedmods.refinedstorage2.platform.api.resource.filter.FilteredResource; +import com.refinedmods.refinedstorage2.platform.common.screen.AbstractBaseScreen; + +import dev.architectury.event.CompoundEventResult; +import me.shedaniel.math.Point; +import me.shedaniel.rei.api.client.registry.screen.FocusedStackProvider; +import me.shedaniel.rei.api.common.entry.EntryStack; +import net.minecraft.client.gui.screens.Screen; + +public class FilteredResourceFocusedStackProvider implements FocusedStackProvider { + private final IngredientConverter converter; + + public FilteredResourceFocusedStackProvider(final IngredientConverter converter) { + this.converter = converter; + } + + @Override + public CompoundEventResult> provide(final Screen screen, final Point mouse) { + if (!(screen instanceof AbstractBaseScreen baseScreen)) { + return CompoundEventResult.pass(); + } + final FilteredResource filteredResource = baseScreen.getFilteredResource(); + if (filteredResource == null) { + return CompoundEventResult.pass(); + } + final Object converted = converter.convertToIngredient(filteredResource).orElse(null); + if (converted instanceof EntryStack stack) { + return CompoundEventResult.interruptTrue(stack); + } + return CompoundEventResult.pass(); + } +} + diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/recipemod/rei/FilteredResourceIngredientConverter.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/recipemod/rei/FilteredResourceIngredientConverter.java new file mode 100644 index 000000000..22191d1d8 --- /dev/null +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/recipemod/rei/FilteredResourceIngredientConverter.java @@ -0,0 +1,37 @@ +package com.refinedmods.refinedstorage2.platform.forge.integration.recipemod.rei; + +import com.refinedmods.refinedstorage2.platform.api.integration.recipemod.IngredientConverter; +import com.refinedmods.refinedstorage2.platform.api.resource.FluidResource; +import com.refinedmods.refinedstorage2.platform.api.resource.ItemResource; +import com.refinedmods.refinedstorage2.platform.api.resource.filter.FilteredResource; + +import java.util.Optional; + +import dev.architectury.fluid.FluidStack; +import me.shedaniel.rei.api.common.util.EntryStacks; + +public class FilteredResourceIngredientConverter implements IngredientConverter { + @Override + public Optional convertToResource(final Object ingredient) { + return Optional.empty(); + } + + @Override + public Optional convertToIngredient(final Object resource) { + if (!(resource instanceof FilteredResource filteredResource)) { + return Optional.empty(); + } + if (filteredResource.getValue() instanceof ItemResource itemResource) { + return Optional.of(EntryStacks.of(itemResource.toItemStack())); + } + if (filteredResource.getValue() instanceof FluidResource fluidResource) { + final FluidStack fluidStack = FluidStack.create( + fluidResource.fluid(), + FluidStack.bucketAmount(), + fluidResource.tag() + ); + return Optional.of(EntryStacks.of(fluidStack)); + } + return Optional.empty(); + } +} diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/recipemod/rei/GridFocusedStackProvider.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/recipemod/rei/GridFocusedStackProvider.java new file mode 100644 index 000000000..88cd07b26 --- /dev/null +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/recipemod/rei/GridFocusedStackProvider.java @@ -0,0 +1,35 @@ +package com.refinedmods.refinedstorage2.platform.forge.integration.recipemod.rei; + +import com.refinedmods.refinedstorage2.api.grid.view.GridResource; +import com.refinedmods.refinedstorage2.platform.api.integration.recipemod.IngredientConverter; +import com.refinedmods.refinedstorage2.platform.common.screen.grid.AbstractGridScreen; + +import dev.architectury.event.CompoundEventResult; +import me.shedaniel.math.Point; +import me.shedaniel.rei.api.client.registry.screen.FocusedStackProvider; +import me.shedaniel.rei.api.common.entry.EntryStack; +import net.minecraft.client.gui.screens.Screen; + +public class GridFocusedStackProvider implements FocusedStackProvider { + private final IngredientConverter converter; + + public GridFocusedStackProvider(final IngredientConverter converter) { + this.converter = converter; + } + + @Override + public CompoundEventResult> provide(final Screen screen, final Point mouse) { + if (!(screen instanceof AbstractGridScreen gridScreen)) { + return CompoundEventResult.pass(); + } + final GridResource resource = gridScreen.getHoveredResource(); + if (resource == null) { + return CompoundEventResult.pass(); + } + final Object converted = converter.convertToIngredient(resource).orElse(null); + if (converted instanceof EntryStack stack) { + return CompoundEventResult.interruptTrue(stack); + } + return CompoundEventResult.pass(); + } +} diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/recipemod/rei/GridResourceIngredientConverter.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/recipemod/rei/GridResourceIngredientConverter.java new file mode 100644 index 000000000..00818d1c2 --- /dev/null +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/recipemod/rei/GridResourceIngredientConverter.java @@ -0,0 +1,33 @@ +package com.refinedmods.refinedstorage2.platform.forge.integration.recipemod.rei; + +import com.refinedmods.refinedstorage2.platform.api.integration.recipemod.IngredientConverter; +import com.refinedmods.refinedstorage2.platform.common.internal.grid.view.FluidGridResource; +import com.refinedmods.refinedstorage2.platform.common.internal.grid.view.ItemGridResource; + +import java.util.Optional; + +import dev.architectury.fluid.FluidStack; +import me.shedaniel.rei.api.common.util.EntryStacks; + +public class GridResourceIngredientConverter implements IngredientConverter { + @Override + public Optional convertToResource(final Object ingredient) { + return Optional.empty(); + } + + @Override + public Optional convertToIngredient(final Object resource) { + if (resource instanceof ItemGridResource itemGridResource) { + return Optional.of(EntryStacks.of(itemGridResource.copyItemStack())); + } + if (resource instanceof FluidGridResource fluidGridResource) { + final FluidStack fluidStack = FluidStack.create( + fluidGridResource.getResource().fluid(), + FluidStack.bucketAmount(), + fluidGridResource.getResource().tag() + ); + return Optional.of(EntryStacks.of(fluidStack)); + } + return Optional.empty(); + } +} diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/recipemod/rei/MissingIngredients.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/recipemod/rei/MissingIngredients.java new file mode 100644 index 000000000..6f31fae28 --- /dev/null +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/recipemod/rei/MissingIngredients.java @@ -0,0 +1,30 @@ +package com.refinedmods.refinedstorage2.platform.forge.integration.recipemod.rei; + +import java.util.ArrayList; +import java.util.List; + +import it.unimi.dsi.fastutil.ints.IntOpenHashSet; +import it.unimi.dsi.fastutil.ints.IntSet; +import me.shedaniel.rei.api.common.entry.EntryIngredient; + +public class MissingIngredients { + private final List ingredients = new ArrayList<>(); + private final IntSet indices = new IntOpenHashSet(); + + public boolean isEmpty() { + return indices.isEmpty(); + } + + public void addIngredient(final EntryIngredient ingredient, final int slotIndex) { + ingredients.add(ingredient); + indices.add(slotIndex); + } + + public List getIngredients() { + return ingredients; + } + + public boolean isMissing(final int slotIndex) { + return indices.contains(slotIndex); + } +} diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/recipemod/rei/RefinedStorageREIClientPlugin.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/recipemod/rei/RefinedStorageREIClientPlugin.java new file mode 100644 index 000000000..e19469177 --- /dev/null +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/recipemod/rei/RefinedStorageREIClientPlugin.java @@ -0,0 +1,68 @@ +package com.refinedmods.refinedstorage2.platform.forge.integration.recipemod.rei; + +import com.refinedmods.refinedstorage2.platform.api.PlatformApi; +import com.refinedmods.refinedstorage2.platform.api.integration.recipemod.IngredientConverter; +import com.refinedmods.refinedstorage2.platform.common.block.ColorableBlock; +import com.refinedmods.refinedstorage2.platform.common.content.BlockColorMap; +import com.refinedmods.refinedstorage2.platform.common.content.Blocks; +import com.refinedmods.refinedstorage2.platform.common.content.ContentIds; +import com.refinedmods.refinedstorage2.platform.common.content.Tags; + +import me.shedaniel.rei.api.client.plugins.REIClientPlugin; +import me.shedaniel.rei.api.client.registry.entry.CollapsibleEntryRegistry; +import me.shedaniel.rei.api.client.registry.screen.ScreenRegistry; +import me.shedaniel.rei.api.client.registry.transfer.TransferHandlerRegistry; +import me.shedaniel.rei.api.common.util.EntryIngredients; +import me.shedaniel.rei.forge.REIPluginClient; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.tags.TagKey; +import net.minecraft.world.item.Item; +import net.minecraft.world.level.block.Block; + +@REIPluginClient +public class RefinedStorageREIClientPlugin implements REIClientPlugin { + @Override + public void registerScreens(final ScreenRegistry registry) { + final IngredientConverter converter = PlatformApi.INSTANCE.getIngredientConverter(); + registry.registerFocusedStack(new GridFocusedStackProvider(converter)); + registry.registerFocusedStack(new FilteredResourceFocusedStackProvider(converter)); + } + + public static void registerIngredientConverters() { + PlatformApi.INSTANCE.registerIngredientConverter(new GridResourceIngredientConverter()); + PlatformApi.INSTANCE.registerIngredientConverter(new FilteredResourceIngredientConverter()); + } + + @Override + public void registerTransferHandlers(final TransferHandlerRegistry registry) { + registry.register(new CraftingGridTransferHandler()); + } + + @SuppressWarnings("UnstableApiUsage") + @Override + public void registerCollapsibleEntries(final CollapsibleEntryRegistry registry) { + groupItems(registry, Blocks.INSTANCE.getCable(), ContentIds.CABLE, Tags.CABLES); + groupItems(registry, Blocks.INSTANCE.getGrid(), ContentIds.GRID, Tags.GRIDS); + groupItems(registry, Blocks.INSTANCE.getCraftingGrid(), ContentIds.CRAFTING_GRID, Tags.CRAFTING_GRIDS); + groupItems(registry, Blocks.INSTANCE.getImporter(), ContentIds.IMPORTER, Tags.IMPORTERS); + groupItems(registry, Blocks.INSTANCE.getExporter(), ContentIds.EXPORTER, Tags.EXPORTERS); + groupItems(registry, Blocks.INSTANCE.getExternalStorage(), ContentIds.EXTERNAL_STORAGE, Tags.EXTERNAL_STORAGES); + groupItems(registry, Blocks.INSTANCE.getController(), ContentIds.CONTROLLER, Tags.CONTROLLERS); + groupItems(registry, Blocks.INSTANCE.getCreativeController(), + ContentIds.CREATIVE_CONTROLLER, Tags.CREATIVE_CONTROLLERS); + } + + @SuppressWarnings("UnstableApiUsage") + private static void groupItems( + final CollapsibleEntryRegistry registry, + final BlockColorMap> blocks, + final ResourceLocation itemIdentifier, + final TagKey tag + ) { + registry.group( + itemIdentifier, + blocks.getDefault().getName(), + EntryIngredients.ofItemTag(tag) + ); + } +} diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/rei/ReiGridSynchronizer.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/recipemod/rei/ReiGridSynchronizer.java similarity index 98% rename from refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/rei/ReiGridSynchronizer.java rename to refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/recipemod/rei/ReiGridSynchronizer.java index 695ec6a36..b39f01a7d 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/rei/ReiGridSynchronizer.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/recipemod/rei/ReiGridSynchronizer.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.forge.integration.rei; +package com.refinedmods.refinedstorage2.platform.forge.integration.recipemod.rei; import com.refinedmods.refinedstorage2.platform.common.internal.grid.AbstractGridSynchronizer; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/rei/ReiProxy.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/recipemod/rei/ReiProxy.java similarity index 97% rename from refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/rei/ReiProxy.java rename to refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/recipemod/rei/ReiProxy.java index a71335878..c4595058d 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/rei/ReiProxy.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/recipemod/rei/ReiProxy.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.forge.integration.rei; +package com.refinedmods.refinedstorage2.platform.forge.integration.recipemod.rei; import javax.annotation.Nullable; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/rei/package-info.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/recipemod/rei/package-info.java similarity index 93% rename from refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/rei/package-info.java rename to refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/recipemod/rei/package-info.java index cdc45ecf5..79cff5cdb 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/rei/package-info.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/recipemod/rei/package-info.java @@ -1,6 +1,6 @@ @ParametersAreNonnullByDefault @FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.forge.integration.rei; +package com.refinedmods.refinedstorage2.platform.forge.integration.recipemod.rei; import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/grid/ItemGridInsertionStrategy.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/grid/ItemGridInsertionStrategy.java index 68efad3bb..1b8bf443b 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/grid/ItemGridInsertionStrategy.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/grid/ItemGridInsertionStrategy.java @@ -9,9 +9,9 @@ import com.refinedmods.refinedstorage2.platform.forge.internal.storage.InteractionCoordinates; import com.refinedmods.refinedstorage2.platform.forge.internal.storage.ItemHandlerExtractableStorage; -import net.minecraft.world.entity.player.Inventory; import net.minecraft.world.entity.player.Player; import net.minecraft.world.inventory.AbstractContainerMenu; +import net.minecraft.world.inventory.Slot; import net.minecraft.world.item.ItemStack; import net.minecraftforge.items.wrapper.InvWrapper; import net.minecraftforge.items.wrapper.RangedWrapper; @@ -21,7 +21,6 @@ public class ItemGridInsertionStrategy implements GridInsertionStrategy { private final AbstractContainerMenu containerMenu; private final GridService gridService; - private final Inventory playerInventory; private final CursorStorage playerCursorStorage; public ItemGridInsertionStrategy(final AbstractContainerMenu containerMenu, @@ -29,7 +28,6 @@ public ItemGridInsertionStrategy(final AbstractContainerMenu containerMenu, final PlatformGridServiceFactory gridServiceFactory) { this.containerMenu = containerMenu; this.gridService = gridServiceFactory.createForItem(new PlayerActor(player)); - this.playerInventory = player.getInventory(); this.playerCursorStorage = new CursorStorage(containerMenu); } @@ -50,10 +48,11 @@ public boolean onInsert(final GridInsertMode insertMode, final boolean tryAltern @Override public boolean onTransfer(final int slotIndex) { + final Slot slot = containerMenu.getSlot(slotIndex); final RangedWrapper storage = new RangedWrapper( - new InvWrapper(playerInventory), - slotIndex, - slotIndex + 1 + new InvWrapper(slot.container), + slot.getContainerSlot(), + slot.getContainerSlot() + 1 ); final ItemStack itemStackInSlot = storage.getStackInSlot(0); if (itemStackInSlot.isEmpty()) { diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/NetworkManager.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/NetworkManager.java index 1f0c1d57a..6353d6f8d 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/NetworkManager.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/NetworkManager.java @@ -1,5 +1,7 @@ package com.refinedmods.refinedstorage2.platform.forge.packet; +import com.refinedmods.refinedstorage2.platform.forge.packet.c2s.CraftingGridClearPacket; +import com.refinedmods.refinedstorage2.platform.forge.packet.c2s.CraftingGridRecipeTransferPacket; import com.refinedmods.refinedstorage2.platform.forge.packet.c2s.GridExtractPacket; import com.refinedmods.refinedstorage2.platform.forge.packet.c2s.GridInsertPacket; import com.refinedmods.refinedstorage2.platform.forge.packet.c2s.GridScrollPacket; @@ -118,6 +120,20 @@ public NetworkManager() { ResourceFilterSlotChangePacket::decode, ResourceFilterSlotChangePacket::handle ); + handler.registerMessage( + id++, + CraftingGridClearPacket.class, + CraftingGridClearPacket::encode, + CraftingGridClearPacket::decode, + CraftingGridClearPacket::handle + ); + handler.registerMessage( + id++, + CraftingGridRecipeTransferPacket.class, + CraftingGridRecipeTransferPacket::encode, + CraftingGridRecipeTransferPacket::decode, + CraftingGridRecipeTransferPacket::handle + ); } public void send(final ServerPlayer player, final Object message) { diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/c2s/ClientToServerCommunicationsImpl.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/c2s/ClientToServerCommunicationsImpl.java index 2da03f273..a3796d91e 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/c2s/ClientToServerCommunicationsImpl.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/c2s/ClientToServerCommunicationsImpl.java @@ -4,11 +4,13 @@ import com.refinedmods.refinedstorage2.api.grid.service.GridInsertMode; import com.refinedmods.refinedstorage2.platform.api.PlatformApi; import com.refinedmods.refinedstorage2.platform.api.grid.GridScrollMode; +import com.refinedmods.refinedstorage2.platform.api.resource.ItemResource; import com.refinedmods.refinedstorage2.platform.api.storage.channel.PlatformStorageChannelType; import com.refinedmods.refinedstorage2.platform.common.containermenu.property.PropertyType; import com.refinedmods.refinedstorage2.platform.common.packet.ClientToServerCommunications; import com.refinedmods.refinedstorage2.platform.forge.packet.NetworkManager; +import java.util.List; import java.util.UUID; public class ClientToServerCommunicationsImpl implements ClientToServerCommunications { @@ -55,6 +57,16 @@ public void sendGridInsert(final GridInsertMode mode, final boolean tryAlternati networkManager.send(new GridInsertPacket(mode == GridInsertMode.SINGLE_RESOURCE, tryAlternatives)); } + @Override + public void sendCraftingGridClear(final boolean toPlayerInventory) { + networkManager.send(new CraftingGridClearPacket(toPlayerInventory)); + } + + @Override + public void sendCraftingGridRecipeTransfer(final List> recipe) { + networkManager.send(new CraftingGridRecipeTransferPacket(recipe)); + } + @Override public void sendPropertyChange(final PropertyType type, final T value) { networkManager.send(new PropertyChangePacket(type.id(), type.serializer().apply(value))); diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/c2s/CraftingGridClearPacket.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/c2s/CraftingGridClearPacket.java new file mode 100644 index 000000000..559dbff80 --- /dev/null +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/c2s/CraftingGridClearPacket.java @@ -0,0 +1,33 @@ +package com.refinedmods.refinedstorage2.platform.forge.packet.c2s; + +import com.refinedmods.refinedstorage2.platform.common.containermenu.grid.CraftingGridContainerMenu; + +import java.util.function.Supplier; + +import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.server.level.ServerPlayer; +import net.minecraftforge.network.NetworkEvent; + +public class CraftingGridClearPacket { + private final boolean toPlayerInventory; + + public CraftingGridClearPacket(final boolean toPlayerInventory) { + this.toPlayerInventory = toPlayerInventory; + } + + public static CraftingGridClearPacket decode(final FriendlyByteBuf buf) { + return new CraftingGridClearPacket(buf.readBoolean()); + } + + public static void encode(final CraftingGridClearPacket packet, final FriendlyByteBuf buf) { + buf.writeBoolean(packet.toPlayerInventory); + } + + public static void handle(final CraftingGridClearPacket packet, final Supplier ctx) { + final ServerPlayer player = ctx.get().getSender(); + if (player != null && player.containerMenu instanceof CraftingGridContainerMenu craftingGridMenu) { + ctx.get().enqueueWork(() -> craftingGridMenu.clear(packet.toPlayerInventory)); + } + ctx.get().setPacketHandled(true); + } +} diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/c2s/CraftingGridRecipeTransferPacket.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/c2s/CraftingGridRecipeTransferPacket.java new file mode 100644 index 000000000..88ff45f22 --- /dev/null +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/c2s/CraftingGridRecipeTransferPacket.java @@ -0,0 +1,60 @@ +package com.refinedmods.refinedstorage2.platform.forge.packet.c2s; + +import com.refinedmods.refinedstorage2.platform.api.resource.ItemResource; +import com.refinedmods.refinedstorage2.platform.common.containermenu.grid.CraftingGridContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.util.PacketUtil; + +import java.util.ArrayList; +import java.util.List; +import java.util.function.Supplier; + +import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.server.level.ServerPlayer; +import net.minecraft.world.entity.player.Player; +import net.minecraftforge.network.NetworkEvent; + +public class CraftingGridRecipeTransferPacket { + private final List> recipe; + + public CraftingGridRecipeTransferPacket(final List> recipe) { + this.recipe = recipe; + } + + public static CraftingGridRecipeTransferPacket decode(final FriendlyByteBuf buf) { + final int slots = buf.readInt(); + final List> recipe = new ArrayList<>(slots); + for (int i = 0; i < slots; ++i) { + final int slotPossibilityCount = buf.readInt(); + final List slotPossibilities = new ArrayList<>(slotPossibilityCount); + for (int j = 0; j < slotPossibilityCount; ++j) { + slotPossibilities.add(PacketUtil.readItemResource(buf)); + } + recipe.add(slotPossibilities); + } + return new CraftingGridRecipeTransferPacket(recipe); + } + + public static void encode(final CraftingGridRecipeTransferPacket packet, final FriendlyByteBuf buf) { + buf.writeInt(packet.recipe.size()); + for (final List slotPossibilities : packet.recipe) { + buf.writeInt(slotPossibilities.size()); + for (final ItemResource slotPossibility : slotPossibilities) { + PacketUtil.writeItemResource(buf, slotPossibility); + } + } + } + + public static void handle(final CraftingGridRecipeTransferPacket packet, final Supplier ctx) { + final ServerPlayer player = ctx.get().getSender(); + if (player != null) { + ctx.get().enqueueWork(() -> handle(packet, player)); + } + ctx.get().setPacketHandled(true); + } + + private static void handle(final CraftingGridRecipeTransferPacket packet, final Player player) { + if (player.containerMenu instanceof CraftingGridContainerMenu craftingGridContainerMenu) { + craftingGridContainerMenu.transferRecipe(packet.recipe); + } + } +} diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/s2c/GridUpdatePacket.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/s2c/GridUpdatePacket.java index 4ea252bc7..16ab46903 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/s2c/GridUpdatePacket.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/s2c/GridUpdatePacket.java @@ -3,7 +3,7 @@ import com.refinedmods.refinedstorage2.api.storage.tracked.TrackedResource; import com.refinedmods.refinedstorage2.platform.api.PlatformApi; import com.refinedmods.refinedstorage2.platform.api.storage.channel.PlatformStorageChannelType; -import com.refinedmods.refinedstorage2.platform.common.containermenu.GridContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.containermenu.grid.AbstractGridContainerMenu; import com.refinedmods.refinedstorage2.platform.common.util.PacketUtil; import java.util.function.Supplier; @@ -68,7 +68,7 @@ public static void handle(final GridUpdatePacket packet, final Supplier void handle(final Player player, final GridUpdatePacket packet) { - if (player.containerMenu instanceof GridContainerMenu containerMenu) { + if (player.containerMenu instanceof AbstractGridContainerMenu containerMenu) { containerMenu.onResourceUpdate(packet.resource, packet.amount, packet.trackedResource); } } diff --git a/refinedstorage2-resource-api/build.gradle b/refinedstorage2-resource-api/build.gradle index 0dfbf59b8..c4e89b8f9 100644 --- a/refinedstorage2-resource-api/build.gradle +++ b/refinedstorage2-resource-api/build.gradle @@ -1,7 +1,11 @@ +plugins { + id 'java-library' +} + archivesBaseName = 'refinedstorage2-resource-api' dependencies { - implementation libs.apiguardian + api libs.apiguardian testImplementation testLibs.junit.api testRuntimeOnly testLibs.junit.engine testImplementation testLibs.assertJ diff --git a/refinedstorage2-storage-api/build.gradle b/refinedstorage2-storage-api/build.gradle index afb880e6c..b4cc143f5 100644 --- a/refinedstorage2-storage-api/build.gradle +++ b/refinedstorage2-storage-api/build.gradle @@ -1,7 +1,11 @@ +plugins { + id 'java-library' +} + archivesBaseName = 'refinedstorage2-storage-api' dependencies { - implementation libs.apiguardian + api libs.apiguardian implementation libs.slf4j.api testImplementation testLibs.junit.api testImplementation testLibs.junit.params diff --git a/settings.gradle b/settings.gradle index 3c4abca44..0479ecb24 100644 --- a/settings.gradle +++ b/settings.gradle @@ -23,23 +23,25 @@ dependencyResolutionManagement { def jeiVersion = "12.0.2.2" // https://www.curseforge.com/minecraft/mc-mods/roughly-enough-items/files def reiVersion = "10.0.581" + def architecturyVersion = "7.1.70" // dependency of rei + def clothMathVersion = "0.6.1" // dependency of rei + def clothConfigVersion = "9.0.94" // dependency of rei fabric { def minecraft = version("minecraft", minecraftVersion) library("minecraft", "com.mojang", "minecraft").versionRef(minecraft) - plugin("fabric-loom", "fabric-loom").version("1.0-SNAPSHOT") + plugin("fabric-loom", "fabric-loom").version("1.1-SNAPSHOT") - def fabricLoader = version("fabric-loader", "0.14.12") + def fabricLoader = version("fabric-loader", "0.14.14") library("fabric-loader", "net.fabricmc", "fabric-loader").versionRef(fabricLoader) - def fabricApi = version("fabric-api", "0.72.0+1.19.3") + def fabricApi = version("fabric-api", "0.73.2+1.19.3") library("fabric-api", "net.fabricmc.fabric-api", "fabric-api").versionRef(fabricApi) - bundle("fabric", ["fabric-loader", "fabric-api"]) def parchment = version("parchment", "2022.12.18") library("parchment", "org.parchmentmc.data", "parchment-${minecraftVersion}").versionRef(parchment) // https://www.curseforge.com/minecraft/mc-mods/cloth-config/files - def clothConfig = version("clothConfig", "9.0.94") + def clothConfig = version("clothConfig", clothConfigVersion) library("cloth-config", "me.shedaniel.cloth", "cloth-config-fabric").versionRef(clothConfig) // https://github.com/TechReborn/Energy @@ -47,10 +49,11 @@ dependencyResolutionManagement { library("teamreborn-energy", "teamreborn", "energy").versionRef(energy) def rei = version("rei", reiVersion) - def architectury = version("architectury", "7.0.63") // dependency of rei + def architectury = version("architectury", architecturyVersion) // dependency of rei library("rei-api", "me.shedaniel", "RoughlyEnoughItems-api").versionRef(rei) library("architectury", "dev.architectury", "architectury-fabric").versionRef(architectury) library("rei-fabric", "me.shedaniel", "RoughlyEnoughItems-fabric").versionRef(rei) + library("rei-plugin", "me.shedaniel", "RoughlyEnoughItems-default-plugin").version(reiVersion) bundle("rei-runtime", ["architectury", "rei-fabric"]) def jei = version("jei", jeiVersion) @@ -83,6 +86,9 @@ dependencyResolutionManagement { def rei = version("rei", reiVersion) library("rei-forge", "me.shedaniel", "RoughlyEnoughItems-forge").versionRef(rei) + library("rei-architectury", "dev.architectury", "architectury-forge").version(architecturyVersion) + library("rei-cloth-math", "me.shedaniel.cloth", "basic-math").version(clothMathVersion) + library("rei-cloth-config", "me.shedaniel.cloth", "cloth-config-forge").version(clothConfigVersion) plugin('forgeGradle', 'net.minecraftforge.gradle').version('5.1.+') } @@ -104,6 +110,10 @@ dependencyResolutionManagement { def jsr305 = version("jsr305", "3.0.2") library("jsr305", "com.google.code.findbugs", "jsr305").versionRef(jsr305) version("minecraft", minecraftVersion) + + def jei = version("jei", jeiVersion) + library("jei-common-api", "mezz.jei", "jei-${minecraftVersion}-common-api").versionRef(jei) + library("rei-api", "me.shedaniel", "RoughlyEnoughItems-api").version(reiVersion) } testLibs { def junit5 = version("junit5", "5.9.2")