From f93cfa531b5d54399af94be26bc3971ca3220c82 Mon Sep 17 00:00:00 2001 From: raoulvdberge Date: Fri, 26 Jul 2024 21:54:41 +0200 Subject: [PATCH 01/12] feat: pattern grid and pattern Only crafting patterns. --- CHANGELOG.md | 5 + build.gradle.kts | 9 - .../common/api/RefinedStorageApi.java | 3 + .../common/api/RefinedStorageApiProxy.java | 6 + .../api/autocrafting/CraftingPattern.java | 19 ++ .../common/api/autocrafting/Pattern.java | 12 + .../api/autocrafting/PatternProviderItem.java | 17 ++ .../api/autocrafting/ProcessingPattern.java | 16 ++ .../common/api/autocrafting/package-info.java | 7 + .../blockstates/black_pattern_grid.json | 110 ++++++++ .../blockstates/blue_pattern_grid.json | 110 ++++++++ .../blockstates/brown_pattern_grid.json | 110 ++++++++ .../blockstates/cyan_pattern_grid.json | 110 ++++++++ .../blockstates/gray_pattern_grid.json | 110 ++++++++ .../blockstates/green_pattern_grid.json | 110 ++++++++ .../blockstates/light_gray_pattern_grid.json | 110 ++++++++ .../blockstates/lime_pattern_grid.json | 110 ++++++++ .../blockstates/magenta_pattern_grid.json | 110 ++++++++ .../blockstates/orange_pattern_grid.json | 110 ++++++++ .../blockstates/pattern_grid.json | 110 ++++++++ .../blockstates/pink_pattern_grid.json | 110 ++++++++ .../blockstates/purple_pattern_grid.json | 110 ++++++++ .../blockstates/red_pattern_grid.json | 110 ++++++++ .../blockstates/white_pattern_grid.json | 110 ++++++++ .../blockstates/yellow_pattern_grid.json | 110 ++++++++ .../models/block/pattern_grid/black.json | 13 + .../models/block/pattern_grid/blue.json | 13 + .../models/block/pattern_grid/brown.json | 13 + .../models/block/pattern_grid/cyan.json | 13 + .../models/block/pattern_grid/gray.json | 13 + .../models/block/pattern_grid/green.json | 13 + .../models/block/pattern_grid/inactive.json | 13 + .../models/block/pattern_grid/light_blue.json | 13 + .../models/block/pattern_grid/light_gray.json | 13 + .../models/block/pattern_grid/lime.json | 13 + .../models/block/pattern_grid/magenta.json | 13 + .../models/block/pattern_grid/orange.json | 13 + .../models/block/pattern_grid/pink.json | 13 + .../models/block/pattern_grid/purple.json | 13 + .../models/block/pattern_grid/red.json | 13 + .../models/block/pattern_grid/white.json | 13 + .../models/block/pattern_grid/yellow.json | 13 + .../models/item/black_pattern_grid.json | 3 + .../models/item/blue_pattern_grid.json | 3 + .../models/item/brown_pattern_grid.json | 3 + .../models/item/cyan_pattern_grid.json | 3 + .../models/item/gray_pattern_grid.json | 3 + .../models/item/green_pattern_grid.json | 3 + .../models/item/light_gray_pattern_grid.json | 3 + .../models/item/lime_pattern_grid.json | 3 + .../models/item/magenta_pattern_grid.json | 3 + .../models/item/orange_pattern_grid.json | 3 + .../models/item/pattern_grid.json | 3 + .../models/item/pink_pattern_grid.json | 3 + .../models/item/purple_pattern_grid.json | 3 + .../models/item/red_pattern_grid.json | 3 + .../models/item/white_pattern_grid.json | 3 + .../models/item/yellow_pattern_grid.json | 3 + .../misc/coloring/black_pattern_grid.json | 32 +++ .../misc/coloring/blue_pattern_grid.json | 32 +++ .../misc/coloring/brown_pattern_grid.json | 32 +++ .../misc/coloring/cyan_pattern_grid.json | 32 +++ .../misc/coloring/gray_pattern_grid.json | 32 +++ .../misc/coloring/green_pattern_grid.json | 32 +++ .../coloring/light_blue_pattern_grid.json | 32 +++ .../coloring/light_gray_pattern_grid.json | 32 +++ .../misc/coloring/lime_pattern_grid.json | 32 +++ .../misc/coloring/magenta_pattern_grid.json | 32 +++ .../misc/coloring/orange_pattern_grid.json | 32 +++ .../misc/coloring/pink_pattern_grid.json | 32 +++ .../misc/coloring/purple_pattern_grid.json | 32 +++ .../misc/coloring/red_pattern_grid.json | 32 +++ .../misc/coloring/white_pattern_grid.json | 32 +++ .../misc/coloring/yellow_pattern_grid.json | 32 +++ .../loot_table/blocks/black_pattern_grid.json | 21 ++ .../loot_table/blocks/blue_pattern_grid.json | 21 ++ .../loot_table/blocks/brown_pattern_grid.json | 21 ++ .../loot_table/blocks/cyan_pattern_grid.json | 21 ++ .../loot_table/blocks/gray_pattern_grid.json | 21 ++ .../loot_table/blocks/green_pattern_grid.json | 21 ++ .../blocks/light_gray_pattern_grid.json | 21 ++ .../loot_table/blocks/lime_pattern_grid.json | 21 ++ .../blocks/magenta_pattern_grid.json | 21 ++ .../blocks/orange_pattern_grid.json | 21 ++ .../loot_table/blocks/pattern_grid.json | 21 ++ .../loot_table/blocks/pink_pattern_grid.json | 21 ++ .../blocks/purple_pattern_grid.json | 21 ++ .../loot_table/blocks/red_pattern_grid.json | 21 ++ .../loot_table/blocks/white_pattern_grid.json | 21 ++ .../blocks/yellow_pattern_grid.json | 21 ++ .../recipe/coloring/black_pattern_grid.json | 16 ++ .../recipe/coloring/blue_pattern_grid.json | 16 ++ .../recipe/coloring/brown_pattern_grid.json | 16 ++ .../recipe/coloring/cyan_pattern_grid.json | 16 ++ .../recipe/coloring/gray_pattern_grid.json | 16 ++ .../recipe/coloring/green_pattern_grid.json | 16 ++ .../coloring/light_blue_pattern_grid.json | 16 ++ .../coloring/light_gray_pattern_grid.json | 16 ++ .../recipe/coloring/lime_pattern_grid.json | 16 ++ .../recipe/coloring/magenta_pattern_grid.json | 16 ++ .../recipe/coloring/orange_pattern_grid.json | 16 ++ .../recipe/coloring/pink_pattern_grid.json | 16 ++ .../recipe/coloring/purple_pattern_grid.json | 16 ++ .../recipe/coloring/red_pattern_grid.json | 16 ++ .../recipe/coloring/white_pattern_grid.json | 16 ++ .../recipe/coloring/yellow_pattern_grid.json | 16 ++ .../tags/item/pattern_grids.json | 20 ++ .../common/AbstractClientModInitializer.java | 2 + .../common/AbstractModInitializer.java | 29 ++ .../refinedstorage/common/Config.java | 2 + .../refinedstorage/common/Platform.java | 2 + .../refinedstorage/common/PlatformProxy.java | 5 + .../common/RefinedStorageApiImpl.java | 22 ++ ...CraftingPatternClientTooltipComponent.java | 132 +++++++++ .../autocrafting/CraftingPatternState.java | 52 ++++ ...atternBlockEntityWithoutLevelRenderer.java | 48 ++++ .../common/autocrafting/PatternGridBlock.java | 62 +++++ .../autocrafting/PatternGridBlockEntity.java | 251 ++++++++++++++++++ .../PatternGridContainerMenu.java | 221 +++++++++++++++ .../common/autocrafting/PatternGridData.java | 15 ++ .../PatternGridPropertyTypes.java | 16 ++ .../autocrafting/PatternGridScreen.java | 174 ++++++++++++ .../common/autocrafting/PatternItem.java | 220 +++++++++++++++ .../common/autocrafting/PatternItemColor.java | 18 ++ .../autocrafting/PatternItemOverrides.java | 57 ++++ .../autocrafting/PatternOutputContainer.java | 21 ++ .../common/autocrafting/PatternRendering.java | 38 +++ .../common/autocrafting/PatternState.java | 25 ++ .../common/autocrafting/PatternType.java | 43 +++ .../autocrafting/PatternTypeButton.java | 44 +++ .../autocrafting/PatternTypeSettings.java | 29 ++ .../common/autocrafting/package-info.java | 7 + .../common/content/BlockEntities.java | 11 + .../refinedstorage/common/content/Blocks.java | 11 + .../common/content/ContentIds.java | 2 + .../common/content/ContentNames.java | 1 + .../common/content/CreativeModeTabItems.java | 2 + .../common/content/DataComponents.java | 26 ++ .../common/content/DefaultEnergyUsage.java | 1 + .../refinedstorage/common/content/Items.java | 11 + .../refinedstorage/common/content/Menus.java | 11 + .../refinedstorage/common/content/Tags.java | 1 + .../common/grid/AbstractGridBlockEntity.java | 15 +- .../grid/AbstractGridContainerMenu.java | 6 +- .../common/grid/ClientCraftingGridSource.java | 3 +- .../common/grid/CraftingGridBlockEntity.java | 84 ++---- .../grid/CraftingGridContainerMenu.java | 5 +- .../common/grid/CraftingGridResultSlot.java | 4 +- .../common/grid/CraftingGridSource.java | 1 + .../common/grid/CraftingGridSourceImpl.java | 1 + .../common/grid/CraftingState.java | 106 ++++++++ .../common/grid/GridBlockEntity.java | 15 +- .../SnapshotCraftingGridRefillContext.java | 1 + .../grid/screen/AbstractGridScreen.java | 7 +- .../grid/screen/CraftingGridScreen.java | 9 +- .../security/AbstractSecurityCardScreen.java | 3 +- .../support/AbstractBaseContainerMenu.java | 18 ++ .../{grid => support}/CraftingMatrix.java | 8 +- .../CraftingMatrixContainerMenu.java | 2 +- .../support/containermenu/FilterSlot.java | 25 ++ .../containermenu/TransferManager.java | 17 +- .../common/support/packet/c2s/C2SPackets.java | 8 + .../packet/c2s/PatternGridClearPacket.java | 28 ++ .../c2s/PatternGridCreatePatternPacket.java | 29 ++ .../support/widget/CustomCheckboxWidget.java | 28 +- .../assets/refinedstorage/lang/en_us.json | 18 ++ .../refinedstorage/models/item/pattern.json | 3 + .../models/item/pattern/crafting.json | 6 + .../models/item/pattern/empty.json | 6 + .../textures/block/pattern_grid/back.png | Bin 0 -> 1415 bytes .../block/pattern_grid/cutouts/black.png | Bin 0 -> 3047 bytes .../block/pattern_grid/cutouts/blue.png | Bin 0 -> 3070 bytes .../block/pattern_grid/cutouts/brown.png | Bin 0 -> 3079 bytes .../block/pattern_grid/cutouts/cyan.png | Bin 0 -> 3096 bytes .../block/pattern_grid/cutouts/gray.png | Bin 0 -> 3057 bytes .../block/pattern_grid/cutouts/green.png | Bin 0 -> 3091 bytes .../block/pattern_grid/cutouts/inactive.png | Bin 0 -> 330 bytes .../block/pattern_grid/cutouts/light_blue.png | Bin 0 -> 551 bytes .../block/pattern_grid/cutouts/light_gray.png | Bin 0 -> 3024 bytes .../block/pattern_grid/cutouts/lime.png | Bin 0 -> 3079 bytes .../block/pattern_grid/cutouts/magenta.png | Bin 0 -> 3068 bytes .../block/pattern_grid/cutouts/orange.png | Bin 0 -> 3042 bytes .../block/pattern_grid/cutouts/pink.png | Bin 0 -> 2976 bytes .../block/pattern_grid/cutouts/purple.png | Bin 0 -> 3094 bytes .../block/pattern_grid/cutouts/red.png | Bin 0 -> 3054 bytes .../block/pattern_grid/cutouts/white.png | Bin 0 -> 2978 bytes .../block/pattern_grid/cutouts/yellow.png | Bin 0 -> 3043 bytes .../textures/block/pattern_grid/front.png | Bin 0 -> 554 bytes .../textures/block/pattern_grid/left.png | Bin 0 -> 1445 bytes .../textures/block/pattern_grid/right.png | Bin 0 -> 1444 bytes .../textures/block/pattern_grid/top.png | Bin 0 -> 1411 bytes .../textures/gui/crafting_grid.png | Bin 2163 -> 2277 bytes .../refinedstorage/textures/gui/grid.png | Bin 910 -> 850 bytes .../textures/gui/pattern_grid.png | Bin 0 -> 930 bytes .../textures/gui/sprites/grid_row.png | Bin 0 -> 168 bytes .../textures/gui/sprites/large_slot.png | Bin 0 -> 154 bytes .../textures/gui/sprites/light_arrow.png | Bin 0 -> 200 bytes .../gui/sprites/pattern_grid/crafting.png | Bin 0 -> 354 bytes .../textures/gui/sprites/slot.png | Bin 0 -> 153 bytes .../textures/gui/sprites/widget/clear.png | Bin 0 -> 158 bytes .../gui/sprites/widget/clear_disabled.png | Bin 0 -> 158 bytes .../gui/sprites/widget/clear_focused.png | Bin 0 -> 158 bytes .../gui/sprites/widget/create_pattern.png | Bin 0 -> 363 bytes .../widget/create_pattern_disabled.png | Bin 0 -> 332 bytes .../sprites/widget/create_pattern_focused.png | Bin 0 -> 369 bytes .../sprites/widget/generic_small_button.png | Bin 0 -> 356 bytes .../widget/generic_small_button_disabled.png | Bin 0 -> 325 bytes .../widget/generic_small_button_focused.png | Bin 0 -> 423 bytes .../textures/item/pattern/crafting.png | Bin 0 -> 489 bytes .../textures/item/pattern/empty.png | Bin 0 -> 15031 bytes .../data/refinedstorage/recipe/pattern.json | 22 ++ .../refinedstorage/recipe/pattern_grid.json | 17 ++ .../refinedstorage/common/TestPlatform.java | 5 + .../fabric/ClientModInitializerImpl.java | 43 +++ .../refinedstorage/fabric/ConfigImpl.java | 8 + .../fabric/ModInitializerImpl.java | 19 ++ .../refinedstorage/fabric/PlatformImpl.java | 11 + .../autocrafting/PatternBakedModel.java | 24 ++ .../autocrafting/PatternUnbakedModel.java | 45 ++++ .../fabric/autocrafting/package-info.java | 7 + ...tBlockEntityWithoutLevelRendererMixin.java | 34 +++ .../resources/refinedstorage.accesswidener | 3 +- .../main/resources/refinedstorage.mixins.json | 3 +- .../neoforge/ClientModInitializer.java | 40 +++ .../refinedstorage/neoforge/ConfigImpl.java | 7 + .../neoforge/ModInitializer.java | 15 ++ .../refinedstorage/neoforge/PlatformImpl.java | 5 + .../autocrafting/PatternBakedModel.java | 22 ++ .../autocrafting/PatternGeometryLoader.java | 15 ++ .../autocrafting/PatternUnbakedGeometry.java | 42 +++ .../neoforge/autocrafting/package-info.java | 7 + .../datagen/BlockModelProviderImpl.java | 1 + .../datagen/BlockStateProviderImpl.java | 5 + .../datagen/ItemModelProviderImpl.java | 9 + .../datagen/loot/BlockDropProvider.java | 2 + .../recipe/RecoloringRecipeProvider.java | 3 + .../datagen/tag/ItemTagsProviderImpl.java | 5 + .../refinedstorage/common/GameTestUtil.java | 1 + 238 files changed, 5622 insertions(+), 113 deletions(-) create mode 100644 refinedstorage-common-api/src/main/java/com/refinedmods/refinedstorage/common/api/autocrafting/CraftingPattern.java create mode 100644 refinedstorage-common-api/src/main/java/com/refinedmods/refinedstorage/common/api/autocrafting/Pattern.java create mode 100644 refinedstorage-common-api/src/main/java/com/refinedmods/refinedstorage/common/api/autocrafting/PatternProviderItem.java create mode 100644 refinedstorage-common-api/src/main/java/com/refinedmods/refinedstorage/common/api/autocrafting/ProcessingPattern.java create mode 100644 refinedstorage-common-api/src/main/java/com/refinedmods/refinedstorage/common/api/autocrafting/package-info.java create mode 100644 refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/black_pattern_grid.json create mode 100644 refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/blue_pattern_grid.json create mode 100644 refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/brown_pattern_grid.json create mode 100644 refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/cyan_pattern_grid.json create mode 100644 refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/gray_pattern_grid.json create mode 100644 refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/green_pattern_grid.json create mode 100644 refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/light_gray_pattern_grid.json create mode 100644 refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/lime_pattern_grid.json create mode 100644 refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/magenta_pattern_grid.json create mode 100644 refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/orange_pattern_grid.json create mode 100644 refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/pattern_grid.json create mode 100644 refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/pink_pattern_grid.json create mode 100644 refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/purple_pattern_grid.json create mode 100644 refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/red_pattern_grid.json create mode 100644 refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/white_pattern_grid.json create mode 100644 refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/yellow_pattern_grid.json create mode 100644 refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/pattern_grid/black.json create mode 100644 refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/pattern_grid/blue.json create mode 100644 refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/pattern_grid/brown.json create mode 100644 refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/pattern_grid/cyan.json create mode 100644 refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/pattern_grid/gray.json create mode 100644 refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/pattern_grid/green.json create mode 100644 refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/pattern_grid/inactive.json create mode 100644 refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/pattern_grid/light_blue.json create mode 100644 refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/pattern_grid/light_gray.json create mode 100644 refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/pattern_grid/lime.json create mode 100644 refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/pattern_grid/magenta.json create mode 100644 refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/pattern_grid/orange.json create mode 100644 refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/pattern_grid/pink.json create mode 100644 refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/pattern_grid/purple.json create mode 100644 refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/pattern_grid/red.json create mode 100644 refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/pattern_grid/white.json create mode 100644 refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/pattern_grid/yellow.json create mode 100644 refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/black_pattern_grid.json create mode 100644 refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/blue_pattern_grid.json create mode 100644 refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/brown_pattern_grid.json create mode 100644 refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/cyan_pattern_grid.json create mode 100644 refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/gray_pattern_grid.json create mode 100644 refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/green_pattern_grid.json create mode 100644 refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/light_gray_pattern_grid.json create mode 100644 refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/lime_pattern_grid.json create mode 100644 refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/magenta_pattern_grid.json create mode 100644 refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/orange_pattern_grid.json create mode 100644 refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/pattern_grid.json create mode 100644 refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/pink_pattern_grid.json create mode 100644 refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/purple_pattern_grid.json create mode 100644 refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/red_pattern_grid.json create mode 100644 refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/white_pattern_grid.json create mode 100644 refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/yellow_pattern_grid.json create mode 100644 refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/black_pattern_grid.json create mode 100644 refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/blue_pattern_grid.json create mode 100644 refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/brown_pattern_grid.json create mode 100644 refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/cyan_pattern_grid.json create mode 100644 refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/gray_pattern_grid.json create mode 100644 refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/green_pattern_grid.json create mode 100644 refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/light_blue_pattern_grid.json create mode 100644 refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/light_gray_pattern_grid.json create mode 100644 refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/lime_pattern_grid.json create mode 100644 refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/magenta_pattern_grid.json create mode 100644 refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/orange_pattern_grid.json create mode 100644 refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/pink_pattern_grid.json create mode 100644 refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/purple_pattern_grid.json create mode 100644 refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/red_pattern_grid.json create mode 100644 refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/white_pattern_grid.json create mode 100644 refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/yellow_pattern_grid.json create mode 100644 refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/black_pattern_grid.json create mode 100644 refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/blue_pattern_grid.json create mode 100644 refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/brown_pattern_grid.json create mode 100644 refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/cyan_pattern_grid.json create mode 100644 refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/gray_pattern_grid.json create mode 100644 refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/green_pattern_grid.json create mode 100644 refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/light_gray_pattern_grid.json create mode 100644 refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/lime_pattern_grid.json create mode 100644 refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/magenta_pattern_grid.json create mode 100644 refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/orange_pattern_grid.json create mode 100644 refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/pattern_grid.json create mode 100644 refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/pink_pattern_grid.json create mode 100644 refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/purple_pattern_grid.json create mode 100644 refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/red_pattern_grid.json create mode 100644 refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/white_pattern_grid.json create mode 100644 refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/yellow_pattern_grid.json create mode 100644 refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/black_pattern_grid.json create mode 100644 refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/blue_pattern_grid.json create mode 100644 refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/brown_pattern_grid.json create mode 100644 refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/cyan_pattern_grid.json create mode 100644 refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/gray_pattern_grid.json create mode 100644 refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/green_pattern_grid.json create mode 100644 refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/light_blue_pattern_grid.json create mode 100644 refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/light_gray_pattern_grid.json create mode 100644 refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/lime_pattern_grid.json create mode 100644 refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/magenta_pattern_grid.json create mode 100644 refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/orange_pattern_grid.json create mode 100644 refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/pink_pattern_grid.json create mode 100644 refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/purple_pattern_grid.json create mode 100644 refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/red_pattern_grid.json create mode 100644 refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/white_pattern_grid.json create mode 100644 refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/yellow_pattern_grid.json create mode 100644 refinedstorage-common/src/generated/resources/data/refinedstorage/tags/item/pattern_grids.json create mode 100644 refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/CraftingPatternClientTooltipComponent.java create mode 100644 refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/CraftingPatternState.java create mode 100644 refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/PatternBlockEntityWithoutLevelRenderer.java create mode 100644 refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/PatternGridBlock.java create mode 100644 refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/PatternGridBlockEntity.java create mode 100644 refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/PatternGridContainerMenu.java create mode 100644 refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/PatternGridData.java create mode 100644 refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/PatternGridPropertyTypes.java create mode 100644 refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/PatternGridScreen.java create mode 100644 refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/PatternItem.java create mode 100644 refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/PatternItemColor.java create mode 100644 refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/PatternItemOverrides.java create mode 100644 refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/PatternOutputContainer.java create mode 100644 refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/PatternRendering.java create mode 100644 refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/PatternState.java create mode 100644 refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/PatternType.java create mode 100644 refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/PatternTypeButton.java create mode 100644 refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/PatternTypeSettings.java create mode 100644 refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/package-info.java create mode 100644 refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/CraftingState.java rename refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/{grid => support}/CraftingMatrix.java (57%) rename refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/{grid => support}/CraftingMatrixContainerMenu.java (94%) create mode 100644 refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/containermenu/FilterSlot.java create mode 100644 refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/packet/c2s/PatternGridClearPacket.java create mode 100644 refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/packet/c2s/PatternGridCreatePatternPacket.java create mode 100644 refinedstorage-common/src/main/resources/assets/refinedstorage/models/item/pattern.json create mode 100644 refinedstorage-common/src/main/resources/assets/refinedstorage/models/item/pattern/crafting.json create mode 100644 refinedstorage-common/src/main/resources/assets/refinedstorage/models/item/pattern/empty.json create mode 100644 refinedstorage-common/src/main/resources/assets/refinedstorage/textures/block/pattern_grid/back.png create mode 100644 refinedstorage-common/src/main/resources/assets/refinedstorage/textures/block/pattern_grid/cutouts/black.png create mode 100644 refinedstorage-common/src/main/resources/assets/refinedstorage/textures/block/pattern_grid/cutouts/blue.png create mode 100644 refinedstorage-common/src/main/resources/assets/refinedstorage/textures/block/pattern_grid/cutouts/brown.png create mode 100644 refinedstorage-common/src/main/resources/assets/refinedstorage/textures/block/pattern_grid/cutouts/cyan.png create mode 100644 refinedstorage-common/src/main/resources/assets/refinedstorage/textures/block/pattern_grid/cutouts/gray.png create mode 100644 refinedstorage-common/src/main/resources/assets/refinedstorage/textures/block/pattern_grid/cutouts/green.png create mode 100644 refinedstorage-common/src/main/resources/assets/refinedstorage/textures/block/pattern_grid/cutouts/inactive.png create mode 100644 refinedstorage-common/src/main/resources/assets/refinedstorage/textures/block/pattern_grid/cutouts/light_blue.png create mode 100644 refinedstorage-common/src/main/resources/assets/refinedstorage/textures/block/pattern_grid/cutouts/light_gray.png create mode 100644 refinedstorage-common/src/main/resources/assets/refinedstorage/textures/block/pattern_grid/cutouts/lime.png create mode 100644 refinedstorage-common/src/main/resources/assets/refinedstorage/textures/block/pattern_grid/cutouts/magenta.png create mode 100644 refinedstorage-common/src/main/resources/assets/refinedstorage/textures/block/pattern_grid/cutouts/orange.png create mode 100644 refinedstorage-common/src/main/resources/assets/refinedstorage/textures/block/pattern_grid/cutouts/pink.png create mode 100644 refinedstorage-common/src/main/resources/assets/refinedstorage/textures/block/pattern_grid/cutouts/purple.png create mode 100644 refinedstorage-common/src/main/resources/assets/refinedstorage/textures/block/pattern_grid/cutouts/red.png create mode 100644 refinedstorage-common/src/main/resources/assets/refinedstorage/textures/block/pattern_grid/cutouts/white.png create mode 100644 refinedstorage-common/src/main/resources/assets/refinedstorage/textures/block/pattern_grid/cutouts/yellow.png create mode 100644 refinedstorage-common/src/main/resources/assets/refinedstorage/textures/block/pattern_grid/front.png create mode 100644 refinedstorage-common/src/main/resources/assets/refinedstorage/textures/block/pattern_grid/left.png create mode 100644 refinedstorage-common/src/main/resources/assets/refinedstorage/textures/block/pattern_grid/right.png create mode 100644 refinedstorage-common/src/main/resources/assets/refinedstorage/textures/block/pattern_grid/top.png create mode 100644 refinedstorage-common/src/main/resources/assets/refinedstorage/textures/gui/pattern_grid.png create mode 100644 refinedstorage-common/src/main/resources/assets/refinedstorage/textures/gui/sprites/grid_row.png create mode 100644 refinedstorage-common/src/main/resources/assets/refinedstorage/textures/gui/sprites/large_slot.png create mode 100644 refinedstorage-common/src/main/resources/assets/refinedstorage/textures/gui/sprites/light_arrow.png create mode 100644 refinedstorage-common/src/main/resources/assets/refinedstorage/textures/gui/sprites/pattern_grid/crafting.png create mode 100644 refinedstorage-common/src/main/resources/assets/refinedstorage/textures/gui/sprites/slot.png create mode 100644 refinedstorage-common/src/main/resources/assets/refinedstorage/textures/gui/sprites/widget/clear.png create mode 100644 refinedstorage-common/src/main/resources/assets/refinedstorage/textures/gui/sprites/widget/clear_disabled.png create mode 100644 refinedstorage-common/src/main/resources/assets/refinedstorage/textures/gui/sprites/widget/clear_focused.png create mode 100644 refinedstorage-common/src/main/resources/assets/refinedstorage/textures/gui/sprites/widget/create_pattern.png create mode 100644 refinedstorage-common/src/main/resources/assets/refinedstorage/textures/gui/sprites/widget/create_pattern_disabled.png create mode 100644 refinedstorage-common/src/main/resources/assets/refinedstorage/textures/gui/sprites/widget/create_pattern_focused.png create mode 100644 refinedstorage-common/src/main/resources/assets/refinedstorage/textures/gui/sprites/widget/generic_small_button.png create mode 100644 refinedstorage-common/src/main/resources/assets/refinedstorage/textures/gui/sprites/widget/generic_small_button_disabled.png create mode 100644 refinedstorage-common/src/main/resources/assets/refinedstorage/textures/gui/sprites/widget/generic_small_button_focused.png create mode 100644 refinedstorage-common/src/main/resources/assets/refinedstorage/textures/item/pattern/crafting.png create mode 100644 refinedstorage-common/src/main/resources/assets/refinedstorage/textures/item/pattern/empty.png create mode 100644 refinedstorage-common/src/main/resources/data/refinedstorage/recipe/pattern.json create mode 100644 refinedstorage-common/src/main/resources/data/refinedstorage/recipe/pattern_grid.json create mode 100644 refinedstorage-fabric/src/main/java/com/refinedmods/refinedstorage/fabric/autocrafting/PatternBakedModel.java create mode 100644 refinedstorage-fabric/src/main/java/com/refinedmods/refinedstorage/fabric/autocrafting/PatternUnbakedModel.java create mode 100644 refinedstorage-fabric/src/main/java/com/refinedmods/refinedstorage/fabric/autocrafting/package-info.java create mode 100644 refinedstorage-fabric/src/main/java/com/refinedmods/refinedstorage/fabric/mixin/AbstractBlockEntityWithoutLevelRendererMixin.java create mode 100644 refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/autocrafting/PatternBakedModel.java create mode 100644 refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/autocrafting/PatternGeometryLoader.java create mode 100644 refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/autocrafting/PatternUnbakedGeometry.java create mode 100644 refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/autocrafting/package-info.java diff --git a/CHANGELOG.md b/CHANGELOG.md index 367afbe1d..82bfadeec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,11 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +### Added + +- Pattern Grid +- Pattern + ## [2.0.0-milestone.4.5] - 2024-07-26 ### Added diff --git a/build.gradle.kts b/build.gradle.kts index d99f52400..e7891180d 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -21,12 +21,3 @@ project.extensions.getByType().apply { ) } } - -allprojects { - apply(plugin = "maven-publish") - publishing { - repositories { - mavenLocal() - } - } -} \ No newline at end of file diff --git a/refinedstorage-common-api/src/main/java/com/refinedmods/refinedstorage/common/api/RefinedStorageApi.java b/refinedstorage-common-api/src/main/java/com/refinedmods/refinedstorage/common/api/RefinedStorageApi.java index 4afc37e7b..7d2ac7548 100644 --- a/refinedstorage-common-api/src/main/java/com/refinedmods/refinedstorage/common/api/RefinedStorageApi.java +++ b/refinedstorage-common-api/src/main/java/com/refinedmods/refinedstorage/common/api/RefinedStorageApi.java @@ -7,6 +7,7 @@ import com.refinedmods.refinedstorage.api.network.node.NetworkNode; import com.refinedmods.refinedstorage.api.network.security.SecurityPolicy; import com.refinedmods.refinedstorage.api.resource.ResourceKey; +import com.refinedmods.refinedstorage.common.api.autocrafting.Pattern; import com.refinedmods.refinedstorage.common.api.constructordestructor.ConstructorStrategyFactory; import com.refinedmods.refinedstorage.common.api.constructordestructor.DestructorStrategyFactory; import com.refinedmods.refinedstorage.common.api.exporter.ExporterTransferStrategyFactory; @@ -200,4 +201,6 @@ EnergyStorage asBlockItemEnergyStorage( void sendNoPermissionMessage(ServerPlayer player, Component message); boolean canPlaceNetworkNode(ServerPlayer player, Level level, BlockPos pos, BlockState state); + + Optional getPattern(ItemStack stack, Level level); } diff --git a/refinedstorage-common-api/src/main/java/com/refinedmods/refinedstorage/common/api/RefinedStorageApiProxy.java b/refinedstorage-common-api/src/main/java/com/refinedmods/refinedstorage/common/api/RefinedStorageApiProxy.java index 9f9553678..d30707043 100644 --- a/refinedstorage-common-api/src/main/java/com/refinedmods/refinedstorage/common/api/RefinedStorageApiProxy.java +++ b/refinedstorage-common-api/src/main/java/com/refinedmods/refinedstorage/common/api/RefinedStorageApiProxy.java @@ -7,6 +7,7 @@ import com.refinedmods.refinedstorage.api.network.node.NetworkNode; import com.refinedmods.refinedstorage.api.network.security.SecurityPolicy; import com.refinedmods.refinedstorage.api.resource.ResourceKey; +import com.refinedmods.refinedstorage.common.api.autocrafting.Pattern; import com.refinedmods.refinedstorage.common.api.constructordestructor.ConstructorStrategyFactory; import com.refinedmods.refinedstorage.common.api.constructordestructor.DestructorStrategyFactory; import com.refinedmods.refinedstorage.common.api.exporter.ExporterTransferStrategyFactory; @@ -395,6 +396,11 @@ public boolean canPlaceNetworkNode(final ServerPlayer player, return ensureLoaded().canPlaceNetworkNode(player, level, pos, state); } + @Override + public Optional getPattern(final ItemStack stack, final Level level) { + return ensureLoaded().getPattern(stack, level); + } + private RefinedStorageApi ensureLoaded() { if (delegate == null) { throw new IllegalStateException("API not loaded yet"); diff --git a/refinedstorage-common-api/src/main/java/com/refinedmods/refinedstorage/common/api/autocrafting/CraftingPattern.java b/refinedstorage-common-api/src/main/java/com/refinedmods/refinedstorage/common/api/autocrafting/CraftingPattern.java new file mode 100644 index 000000000..714a018fa --- /dev/null +++ b/refinedstorage-common-api/src/main/java/com/refinedmods/refinedstorage/common/api/autocrafting/CraftingPattern.java @@ -0,0 +1,19 @@ +package com.refinedmods.refinedstorage.common.api.autocrafting; + +import com.refinedmods.refinedstorage.api.resource.ResourceAmount; +import com.refinedmods.refinedstorage.common.api.support.resource.PlatformResourceKey; + +import java.util.Collection; +import java.util.List; + +import org.apiguardian.api.API; + +@API(status = API.Status.STABLE, since = "2.0.0-milestone.4.6") +public record CraftingPattern(List> inputs, + ResourceAmount output, + List byproducts) implements Pattern { + @Override + public Collection getOutputs() { + return List.of(output); + } +} diff --git a/refinedstorage-common-api/src/main/java/com/refinedmods/refinedstorage/common/api/autocrafting/Pattern.java b/refinedstorage-common-api/src/main/java/com/refinedmods/refinedstorage/common/api/autocrafting/Pattern.java new file mode 100644 index 000000000..c055585f4 --- /dev/null +++ b/refinedstorage-common-api/src/main/java/com/refinedmods/refinedstorage/common/api/autocrafting/Pattern.java @@ -0,0 +1,12 @@ +package com.refinedmods.refinedstorage.common.api.autocrafting; + +import com.refinedmods.refinedstorage.api.resource.ResourceAmount; + +import java.util.Collection; + +import org.apiguardian.api.API; + +@API(status = API.Status.STABLE, since = "2.0.0-milestone.4.6") +public interface Pattern { + Collection getOutputs(); +} diff --git a/refinedstorage-common-api/src/main/java/com/refinedmods/refinedstorage/common/api/autocrafting/PatternProviderItem.java b/refinedstorage-common-api/src/main/java/com/refinedmods/refinedstorage/common/api/autocrafting/PatternProviderItem.java new file mode 100644 index 000000000..3a5796e15 --- /dev/null +++ b/refinedstorage-common-api/src/main/java/com/refinedmods/refinedstorage/common/api/autocrafting/PatternProviderItem.java @@ -0,0 +1,17 @@ +package com.refinedmods.refinedstorage.common.api.autocrafting; + +import java.util.Optional; +import java.util.UUID; +import javax.annotation.Nullable; + +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.Level; +import org.apiguardian.api.API; + +@API(status = API.Status.STABLE, since = "2.0.0-milestone.4.6") +public interface PatternProviderItem { + @Nullable + UUID getId(ItemStack stack); + + Optional getPattern(ItemStack stack, Level level); +} diff --git a/refinedstorage-common-api/src/main/java/com/refinedmods/refinedstorage/common/api/autocrafting/ProcessingPattern.java b/refinedstorage-common-api/src/main/java/com/refinedmods/refinedstorage/common/api/autocrafting/ProcessingPattern.java new file mode 100644 index 000000000..ff9d33173 --- /dev/null +++ b/refinedstorage-common-api/src/main/java/com/refinedmods/refinedstorage/common/api/autocrafting/ProcessingPattern.java @@ -0,0 +1,16 @@ +package com.refinedmods.refinedstorage.common.api.autocrafting; + +import com.refinedmods.refinedstorage.api.resource.ResourceAmount; + +import java.util.Collection; +import java.util.List; + +import org.apiguardian.api.API; + +@API(status = API.Status.STABLE, since = "2.0.0-milestone.4.6") +public record ProcessingPattern(List> inputs, List outputs) implements Pattern { + @Override + public Collection getOutputs() { + return outputs; + } +} diff --git a/refinedstorage-common-api/src/main/java/com/refinedmods/refinedstorage/common/api/autocrafting/package-info.java b/refinedstorage-common-api/src/main/java/com/refinedmods/refinedstorage/common/api/autocrafting/package-info.java new file mode 100644 index 000000000..8075977d5 --- /dev/null +++ b/refinedstorage-common-api/src/main/java/com/refinedmods/refinedstorage/common/api/autocrafting/package-info.java @@ -0,0 +1,7 @@ +@ParametersAreNonnullByDefault +@FieldsAndMethodsAreNonnullByDefault +package com.refinedmods.refinedstorage.common.api.autocrafting; + +import com.refinedmods.refinedstorage.api.core.FieldsAndMethodsAreNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/black_pattern_grid.json b/refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/black_pattern_grid.json new file mode 100644 index 000000000..7fa65e1c8 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/black_pattern_grid.json @@ -0,0 +1,110 @@ +{ + "variants": { + "active=false,direction=down_east": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": 90, + "y": -90 + }, + "active=false,direction=down_north": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": 90 + }, + "active=false,direction=down_south": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": 90, + "y": 180 + }, + "active=false,direction=down_west": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": 90, + "y": 90 + }, + "active=false,direction=east": { + "model": "refinedstorage:block/pattern_grid/inactive", + "y": 90 + }, + "active=false,direction=north": { + "model": "refinedstorage:block/pattern_grid/inactive" + }, + "active=false,direction=south": { + "model": "refinedstorage:block/pattern_grid/inactive", + "y": 180 + }, + "active=false,direction=up_east": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": -90, + "y": -90 + }, + "active=false,direction=up_north": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": -90, + "y": 180 + }, + "active=false,direction=up_south": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": -90 + }, + "active=false,direction=up_west": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": -90, + "y": 90 + }, + "active=false,direction=west": { + "model": "refinedstorage:block/pattern_grid/inactive", + "y": 270 + }, + "active=true,direction=down_east": { + "model": "refinedstorage:block/pattern_grid/black", + "x": 90, + "y": -90 + }, + "active=true,direction=down_north": { + "model": "refinedstorage:block/pattern_grid/black", + "x": 90 + }, + "active=true,direction=down_south": { + "model": "refinedstorage:block/pattern_grid/black", + "x": 90, + "y": 180 + }, + "active=true,direction=down_west": { + "model": "refinedstorage:block/pattern_grid/black", + "x": 90, + "y": 90 + }, + "active=true,direction=east": { + "model": "refinedstorage:block/pattern_grid/black", + "y": 90 + }, + "active=true,direction=north": { + "model": "refinedstorage:block/pattern_grid/black" + }, + "active=true,direction=south": { + "model": "refinedstorage:block/pattern_grid/black", + "y": 180 + }, + "active=true,direction=up_east": { + "model": "refinedstorage:block/pattern_grid/black", + "x": -90, + "y": -90 + }, + "active=true,direction=up_north": { + "model": "refinedstorage:block/pattern_grid/black", + "x": -90, + "y": 180 + }, + "active=true,direction=up_south": { + "model": "refinedstorage:block/pattern_grid/black", + "x": -90 + }, + "active=true,direction=up_west": { + "model": "refinedstorage:block/pattern_grid/black", + "x": -90, + "y": 90 + }, + "active=true,direction=west": { + "model": "refinedstorage:block/pattern_grid/black", + "y": 270 + } + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/blue_pattern_grid.json b/refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/blue_pattern_grid.json new file mode 100644 index 000000000..705c04b2d --- /dev/null +++ b/refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/blue_pattern_grid.json @@ -0,0 +1,110 @@ +{ + "variants": { + "active=false,direction=down_east": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": 90, + "y": -90 + }, + "active=false,direction=down_north": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": 90 + }, + "active=false,direction=down_south": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": 90, + "y": 180 + }, + "active=false,direction=down_west": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": 90, + "y": 90 + }, + "active=false,direction=east": { + "model": "refinedstorage:block/pattern_grid/inactive", + "y": 90 + }, + "active=false,direction=north": { + "model": "refinedstorage:block/pattern_grid/inactive" + }, + "active=false,direction=south": { + "model": "refinedstorage:block/pattern_grid/inactive", + "y": 180 + }, + "active=false,direction=up_east": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": -90, + "y": -90 + }, + "active=false,direction=up_north": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": -90, + "y": 180 + }, + "active=false,direction=up_south": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": -90 + }, + "active=false,direction=up_west": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": -90, + "y": 90 + }, + "active=false,direction=west": { + "model": "refinedstorage:block/pattern_grid/inactive", + "y": 270 + }, + "active=true,direction=down_east": { + "model": "refinedstorage:block/pattern_grid/blue", + "x": 90, + "y": -90 + }, + "active=true,direction=down_north": { + "model": "refinedstorage:block/pattern_grid/blue", + "x": 90 + }, + "active=true,direction=down_south": { + "model": "refinedstorage:block/pattern_grid/blue", + "x": 90, + "y": 180 + }, + "active=true,direction=down_west": { + "model": "refinedstorage:block/pattern_grid/blue", + "x": 90, + "y": 90 + }, + "active=true,direction=east": { + "model": "refinedstorage:block/pattern_grid/blue", + "y": 90 + }, + "active=true,direction=north": { + "model": "refinedstorage:block/pattern_grid/blue" + }, + "active=true,direction=south": { + "model": "refinedstorage:block/pattern_grid/blue", + "y": 180 + }, + "active=true,direction=up_east": { + "model": "refinedstorage:block/pattern_grid/blue", + "x": -90, + "y": -90 + }, + "active=true,direction=up_north": { + "model": "refinedstorage:block/pattern_grid/blue", + "x": -90, + "y": 180 + }, + "active=true,direction=up_south": { + "model": "refinedstorage:block/pattern_grid/blue", + "x": -90 + }, + "active=true,direction=up_west": { + "model": "refinedstorage:block/pattern_grid/blue", + "x": -90, + "y": 90 + }, + "active=true,direction=west": { + "model": "refinedstorage:block/pattern_grid/blue", + "y": 270 + } + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/brown_pattern_grid.json b/refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/brown_pattern_grid.json new file mode 100644 index 000000000..20af9ab41 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/brown_pattern_grid.json @@ -0,0 +1,110 @@ +{ + "variants": { + "active=false,direction=down_east": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": 90, + "y": -90 + }, + "active=false,direction=down_north": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": 90 + }, + "active=false,direction=down_south": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": 90, + "y": 180 + }, + "active=false,direction=down_west": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": 90, + "y": 90 + }, + "active=false,direction=east": { + "model": "refinedstorage:block/pattern_grid/inactive", + "y": 90 + }, + "active=false,direction=north": { + "model": "refinedstorage:block/pattern_grid/inactive" + }, + "active=false,direction=south": { + "model": "refinedstorage:block/pattern_grid/inactive", + "y": 180 + }, + "active=false,direction=up_east": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": -90, + "y": -90 + }, + "active=false,direction=up_north": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": -90, + "y": 180 + }, + "active=false,direction=up_south": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": -90 + }, + "active=false,direction=up_west": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": -90, + "y": 90 + }, + "active=false,direction=west": { + "model": "refinedstorage:block/pattern_grid/inactive", + "y": 270 + }, + "active=true,direction=down_east": { + "model": "refinedstorage:block/pattern_grid/brown", + "x": 90, + "y": -90 + }, + "active=true,direction=down_north": { + "model": "refinedstorage:block/pattern_grid/brown", + "x": 90 + }, + "active=true,direction=down_south": { + "model": "refinedstorage:block/pattern_grid/brown", + "x": 90, + "y": 180 + }, + "active=true,direction=down_west": { + "model": "refinedstorage:block/pattern_grid/brown", + "x": 90, + "y": 90 + }, + "active=true,direction=east": { + "model": "refinedstorage:block/pattern_grid/brown", + "y": 90 + }, + "active=true,direction=north": { + "model": "refinedstorage:block/pattern_grid/brown" + }, + "active=true,direction=south": { + "model": "refinedstorage:block/pattern_grid/brown", + "y": 180 + }, + "active=true,direction=up_east": { + "model": "refinedstorage:block/pattern_grid/brown", + "x": -90, + "y": -90 + }, + "active=true,direction=up_north": { + "model": "refinedstorage:block/pattern_grid/brown", + "x": -90, + "y": 180 + }, + "active=true,direction=up_south": { + "model": "refinedstorage:block/pattern_grid/brown", + "x": -90 + }, + "active=true,direction=up_west": { + "model": "refinedstorage:block/pattern_grid/brown", + "x": -90, + "y": 90 + }, + "active=true,direction=west": { + "model": "refinedstorage:block/pattern_grid/brown", + "y": 270 + } + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/cyan_pattern_grid.json b/refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/cyan_pattern_grid.json new file mode 100644 index 000000000..f4f6e3c04 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/cyan_pattern_grid.json @@ -0,0 +1,110 @@ +{ + "variants": { + "active=false,direction=down_east": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": 90, + "y": -90 + }, + "active=false,direction=down_north": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": 90 + }, + "active=false,direction=down_south": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": 90, + "y": 180 + }, + "active=false,direction=down_west": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": 90, + "y": 90 + }, + "active=false,direction=east": { + "model": "refinedstorage:block/pattern_grid/inactive", + "y": 90 + }, + "active=false,direction=north": { + "model": "refinedstorage:block/pattern_grid/inactive" + }, + "active=false,direction=south": { + "model": "refinedstorage:block/pattern_grid/inactive", + "y": 180 + }, + "active=false,direction=up_east": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": -90, + "y": -90 + }, + "active=false,direction=up_north": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": -90, + "y": 180 + }, + "active=false,direction=up_south": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": -90 + }, + "active=false,direction=up_west": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": -90, + "y": 90 + }, + "active=false,direction=west": { + "model": "refinedstorage:block/pattern_grid/inactive", + "y": 270 + }, + "active=true,direction=down_east": { + "model": "refinedstorage:block/pattern_grid/cyan", + "x": 90, + "y": -90 + }, + "active=true,direction=down_north": { + "model": "refinedstorage:block/pattern_grid/cyan", + "x": 90 + }, + "active=true,direction=down_south": { + "model": "refinedstorage:block/pattern_grid/cyan", + "x": 90, + "y": 180 + }, + "active=true,direction=down_west": { + "model": "refinedstorage:block/pattern_grid/cyan", + "x": 90, + "y": 90 + }, + "active=true,direction=east": { + "model": "refinedstorage:block/pattern_grid/cyan", + "y": 90 + }, + "active=true,direction=north": { + "model": "refinedstorage:block/pattern_grid/cyan" + }, + "active=true,direction=south": { + "model": "refinedstorage:block/pattern_grid/cyan", + "y": 180 + }, + "active=true,direction=up_east": { + "model": "refinedstorage:block/pattern_grid/cyan", + "x": -90, + "y": -90 + }, + "active=true,direction=up_north": { + "model": "refinedstorage:block/pattern_grid/cyan", + "x": -90, + "y": 180 + }, + "active=true,direction=up_south": { + "model": "refinedstorage:block/pattern_grid/cyan", + "x": -90 + }, + "active=true,direction=up_west": { + "model": "refinedstorage:block/pattern_grid/cyan", + "x": -90, + "y": 90 + }, + "active=true,direction=west": { + "model": "refinedstorage:block/pattern_grid/cyan", + "y": 270 + } + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/gray_pattern_grid.json b/refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/gray_pattern_grid.json new file mode 100644 index 000000000..b873667c3 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/gray_pattern_grid.json @@ -0,0 +1,110 @@ +{ + "variants": { + "active=false,direction=down_east": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": 90, + "y": -90 + }, + "active=false,direction=down_north": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": 90 + }, + "active=false,direction=down_south": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": 90, + "y": 180 + }, + "active=false,direction=down_west": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": 90, + "y": 90 + }, + "active=false,direction=east": { + "model": "refinedstorage:block/pattern_grid/inactive", + "y": 90 + }, + "active=false,direction=north": { + "model": "refinedstorage:block/pattern_grid/inactive" + }, + "active=false,direction=south": { + "model": "refinedstorage:block/pattern_grid/inactive", + "y": 180 + }, + "active=false,direction=up_east": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": -90, + "y": -90 + }, + "active=false,direction=up_north": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": -90, + "y": 180 + }, + "active=false,direction=up_south": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": -90 + }, + "active=false,direction=up_west": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": -90, + "y": 90 + }, + "active=false,direction=west": { + "model": "refinedstorage:block/pattern_grid/inactive", + "y": 270 + }, + "active=true,direction=down_east": { + "model": "refinedstorage:block/pattern_grid/gray", + "x": 90, + "y": -90 + }, + "active=true,direction=down_north": { + "model": "refinedstorage:block/pattern_grid/gray", + "x": 90 + }, + "active=true,direction=down_south": { + "model": "refinedstorage:block/pattern_grid/gray", + "x": 90, + "y": 180 + }, + "active=true,direction=down_west": { + "model": "refinedstorage:block/pattern_grid/gray", + "x": 90, + "y": 90 + }, + "active=true,direction=east": { + "model": "refinedstorage:block/pattern_grid/gray", + "y": 90 + }, + "active=true,direction=north": { + "model": "refinedstorage:block/pattern_grid/gray" + }, + "active=true,direction=south": { + "model": "refinedstorage:block/pattern_grid/gray", + "y": 180 + }, + "active=true,direction=up_east": { + "model": "refinedstorage:block/pattern_grid/gray", + "x": -90, + "y": -90 + }, + "active=true,direction=up_north": { + "model": "refinedstorage:block/pattern_grid/gray", + "x": -90, + "y": 180 + }, + "active=true,direction=up_south": { + "model": "refinedstorage:block/pattern_grid/gray", + "x": -90 + }, + "active=true,direction=up_west": { + "model": "refinedstorage:block/pattern_grid/gray", + "x": -90, + "y": 90 + }, + "active=true,direction=west": { + "model": "refinedstorage:block/pattern_grid/gray", + "y": 270 + } + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/green_pattern_grid.json b/refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/green_pattern_grid.json new file mode 100644 index 000000000..61d42439a --- /dev/null +++ b/refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/green_pattern_grid.json @@ -0,0 +1,110 @@ +{ + "variants": { + "active=false,direction=down_east": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": 90, + "y": -90 + }, + "active=false,direction=down_north": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": 90 + }, + "active=false,direction=down_south": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": 90, + "y": 180 + }, + "active=false,direction=down_west": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": 90, + "y": 90 + }, + "active=false,direction=east": { + "model": "refinedstorage:block/pattern_grid/inactive", + "y": 90 + }, + "active=false,direction=north": { + "model": "refinedstorage:block/pattern_grid/inactive" + }, + "active=false,direction=south": { + "model": "refinedstorage:block/pattern_grid/inactive", + "y": 180 + }, + "active=false,direction=up_east": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": -90, + "y": -90 + }, + "active=false,direction=up_north": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": -90, + "y": 180 + }, + "active=false,direction=up_south": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": -90 + }, + "active=false,direction=up_west": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": -90, + "y": 90 + }, + "active=false,direction=west": { + "model": "refinedstorage:block/pattern_grid/inactive", + "y": 270 + }, + "active=true,direction=down_east": { + "model": "refinedstorage:block/pattern_grid/green", + "x": 90, + "y": -90 + }, + "active=true,direction=down_north": { + "model": "refinedstorage:block/pattern_grid/green", + "x": 90 + }, + "active=true,direction=down_south": { + "model": "refinedstorage:block/pattern_grid/green", + "x": 90, + "y": 180 + }, + "active=true,direction=down_west": { + "model": "refinedstorage:block/pattern_grid/green", + "x": 90, + "y": 90 + }, + "active=true,direction=east": { + "model": "refinedstorage:block/pattern_grid/green", + "y": 90 + }, + "active=true,direction=north": { + "model": "refinedstorage:block/pattern_grid/green" + }, + "active=true,direction=south": { + "model": "refinedstorage:block/pattern_grid/green", + "y": 180 + }, + "active=true,direction=up_east": { + "model": "refinedstorage:block/pattern_grid/green", + "x": -90, + "y": -90 + }, + "active=true,direction=up_north": { + "model": "refinedstorage:block/pattern_grid/green", + "x": -90, + "y": 180 + }, + "active=true,direction=up_south": { + "model": "refinedstorage:block/pattern_grid/green", + "x": -90 + }, + "active=true,direction=up_west": { + "model": "refinedstorage:block/pattern_grid/green", + "x": -90, + "y": 90 + }, + "active=true,direction=west": { + "model": "refinedstorage:block/pattern_grid/green", + "y": 270 + } + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/light_gray_pattern_grid.json b/refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/light_gray_pattern_grid.json new file mode 100644 index 000000000..bea3f24d1 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/light_gray_pattern_grid.json @@ -0,0 +1,110 @@ +{ + "variants": { + "active=false,direction=down_east": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": 90, + "y": -90 + }, + "active=false,direction=down_north": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": 90 + }, + "active=false,direction=down_south": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": 90, + "y": 180 + }, + "active=false,direction=down_west": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": 90, + "y": 90 + }, + "active=false,direction=east": { + "model": "refinedstorage:block/pattern_grid/inactive", + "y": 90 + }, + "active=false,direction=north": { + "model": "refinedstorage:block/pattern_grid/inactive" + }, + "active=false,direction=south": { + "model": "refinedstorage:block/pattern_grid/inactive", + "y": 180 + }, + "active=false,direction=up_east": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": -90, + "y": -90 + }, + "active=false,direction=up_north": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": -90, + "y": 180 + }, + "active=false,direction=up_south": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": -90 + }, + "active=false,direction=up_west": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": -90, + "y": 90 + }, + "active=false,direction=west": { + "model": "refinedstorage:block/pattern_grid/inactive", + "y": 270 + }, + "active=true,direction=down_east": { + "model": "refinedstorage:block/pattern_grid/light_gray", + "x": 90, + "y": -90 + }, + "active=true,direction=down_north": { + "model": "refinedstorage:block/pattern_grid/light_gray", + "x": 90 + }, + "active=true,direction=down_south": { + "model": "refinedstorage:block/pattern_grid/light_gray", + "x": 90, + "y": 180 + }, + "active=true,direction=down_west": { + "model": "refinedstorage:block/pattern_grid/light_gray", + "x": 90, + "y": 90 + }, + "active=true,direction=east": { + "model": "refinedstorage:block/pattern_grid/light_gray", + "y": 90 + }, + "active=true,direction=north": { + "model": "refinedstorage:block/pattern_grid/light_gray" + }, + "active=true,direction=south": { + "model": "refinedstorage:block/pattern_grid/light_gray", + "y": 180 + }, + "active=true,direction=up_east": { + "model": "refinedstorage:block/pattern_grid/light_gray", + "x": -90, + "y": -90 + }, + "active=true,direction=up_north": { + "model": "refinedstorage:block/pattern_grid/light_gray", + "x": -90, + "y": 180 + }, + "active=true,direction=up_south": { + "model": "refinedstorage:block/pattern_grid/light_gray", + "x": -90 + }, + "active=true,direction=up_west": { + "model": "refinedstorage:block/pattern_grid/light_gray", + "x": -90, + "y": 90 + }, + "active=true,direction=west": { + "model": "refinedstorage:block/pattern_grid/light_gray", + "y": 270 + } + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/lime_pattern_grid.json b/refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/lime_pattern_grid.json new file mode 100644 index 000000000..95d0756e1 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/lime_pattern_grid.json @@ -0,0 +1,110 @@ +{ + "variants": { + "active=false,direction=down_east": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": 90, + "y": -90 + }, + "active=false,direction=down_north": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": 90 + }, + "active=false,direction=down_south": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": 90, + "y": 180 + }, + "active=false,direction=down_west": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": 90, + "y": 90 + }, + "active=false,direction=east": { + "model": "refinedstorage:block/pattern_grid/inactive", + "y": 90 + }, + "active=false,direction=north": { + "model": "refinedstorage:block/pattern_grid/inactive" + }, + "active=false,direction=south": { + "model": "refinedstorage:block/pattern_grid/inactive", + "y": 180 + }, + "active=false,direction=up_east": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": -90, + "y": -90 + }, + "active=false,direction=up_north": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": -90, + "y": 180 + }, + "active=false,direction=up_south": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": -90 + }, + "active=false,direction=up_west": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": -90, + "y": 90 + }, + "active=false,direction=west": { + "model": "refinedstorage:block/pattern_grid/inactive", + "y": 270 + }, + "active=true,direction=down_east": { + "model": "refinedstorage:block/pattern_grid/lime", + "x": 90, + "y": -90 + }, + "active=true,direction=down_north": { + "model": "refinedstorage:block/pattern_grid/lime", + "x": 90 + }, + "active=true,direction=down_south": { + "model": "refinedstorage:block/pattern_grid/lime", + "x": 90, + "y": 180 + }, + "active=true,direction=down_west": { + "model": "refinedstorage:block/pattern_grid/lime", + "x": 90, + "y": 90 + }, + "active=true,direction=east": { + "model": "refinedstorage:block/pattern_grid/lime", + "y": 90 + }, + "active=true,direction=north": { + "model": "refinedstorage:block/pattern_grid/lime" + }, + "active=true,direction=south": { + "model": "refinedstorage:block/pattern_grid/lime", + "y": 180 + }, + "active=true,direction=up_east": { + "model": "refinedstorage:block/pattern_grid/lime", + "x": -90, + "y": -90 + }, + "active=true,direction=up_north": { + "model": "refinedstorage:block/pattern_grid/lime", + "x": -90, + "y": 180 + }, + "active=true,direction=up_south": { + "model": "refinedstorage:block/pattern_grid/lime", + "x": -90 + }, + "active=true,direction=up_west": { + "model": "refinedstorage:block/pattern_grid/lime", + "x": -90, + "y": 90 + }, + "active=true,direction=west": { + "model": "refinedstorage:block/pattern_grid/lime", + "y": 270 + } + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/magenta_pattern_grid.json b/refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/magenta_pattern_grid.json new file mode 100644 index 000000000..ce9bac108 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/magenta_pattern_grid.json @@ -0,0 +1,110 @@ +{ + "variants": { + "active=false,direction=down_east": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": 90, + "y": -90 + }, + "active=false,direction=down_north": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": 90 + }, + "active=false,direction=down_south": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": 90, + "y": 180 + }, + "active=false,direction=down_west": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": 90, + "y": 90 + }, + "active=false,direction=east": { + "model": "refinedstorage:block/pattern_grid/inactive", + "y": 90 + }, + "active=false,direction=north": { + "model": "refinedstorage:block/pattern_grid/inactive" + }, + "active=false,direction=south": { + "model": "refinedstorage:block/pattern_grid/inactive", + "y": 180 + }, + "active=false,direction=up_east": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": -90, + "y": -90 + }, + "active=false,direction=up_north": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": -90, + "y": 180 + }, + "active=false,direction=up_south": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": -90 + }, + "active=false,direction=up_west": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": -90, + "y": 90 + }, + "active=false,direction=west": { + "model": "refinedstorage:block/pattern_grid/inactive", + "y": 270 + }, + "active=true,direction=down_east": { + "model": "refinedstorage:block/pattern_grid/magenta", + "x": 90, + "y": -90 + }, + "active=true,direction=down_north": { + "model": "refinedstorage:block/pattern_grid/magenta", + "x": 90 + }, + "active=true,direction=down_south": { + "model": "refinedstorage:block/pattern_grid/magenta", + "x": 90, + "y": 180 + }, + "active=true,direction=down_west": { + "model": "refinedstorage:block/pattern_grid/magenta", + "x": 90, + "y": 90 + }, + "active=true,direction=east": { + "model": "refinedstorage:block/pattern_grid/magenta", + "y": 90 + }, + "active=true,direction=north": { + "model": "refinedstorage:block/pattern_grid/magenta" + }, + "active=true,direction=south": { + "model": "refinedstorage:block/pattern_grid/magenta", + "y": 180 + }, + "active=true,direction=up_east": { + "model": "refinedstorage:block/pattern_grid/magenta", + "x": -90, + "y": -90 + }, + "active=true,direction=up_north": { + "model": "refinedstorage:block/pattern_grid/magenta", + "x": -90, + "y": 180 + }, + "active=true,direction=up_south": { + "model": "refinedstorage:block/pattern_grid/magenta", + "x": -90 + }, + "active=true,direction=up_west": { + "model": "refinedstorage:block/pattern_grid/magenta", + "x": -90, + "y": 90 + }, + "active=true,direction=west": { + "model": "refinedstorage:block/pattern_grid/magenta", + "y": 270 + } + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/orange_pattern_grid.json b/refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/orange_pattern_grid.json new file mode 100644 index 000000000..7464404c8 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/orange_pattern_grid.json @@ -0,0 +1,110 @@ +{ + "variants": { + "active=false,direction=down_east": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": 90, + "y": -90 + }, + "active=false,direction=down_north": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": 90 + }, + "active=false,direction=down_south": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": 90, + "y": 180 + }, + "active=false,direction=down_west": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": 90, + "y": 90 + }, + "active=false,direction=east": { + "model": "refinedstorage:block/pattern_grid/inactive", + "y": 90 + }, + "active=false,direction=north": { + "model": "refinedstorage:block/pattern_grid/inactive" + }, + "active=false,direction=south": { + "model": "refinedstorage:block/pattern_grid/inactive", + "y": 180 + }, + "active=false,direction=up_east": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": -90, + "y": -90 + }, + "active=false,direction=up_north": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": -90, + "y": 180 + }, + "active=false,direction=up_south": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": -90 + }, + "active=false,direction=up_west": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": -90, + "y": 90 + }, + "active=false,direction=west": { + "model": "refinedstorage:block/pattern_grid/inactive", + "y": 270 + }, + "active=true,direction=down_east": { + "model": "refinedstorage:block/pattern_grid/orange", + "x": 90, + "y": -90 + }, + "active=true,direction=down_north": { + "model": "refinedstorage:block/pattern_grid/orange", + "x": 90 + }, + "active=true,direction=down_south": { + "model": "refinedstorage:block/pattern_grid/orange", + "x": 90, + "y": 180 + }, + "active=true,direction=down_west": { + "model": "refinedstorage:block/pattern_grid/orange", + "x": 90, + "y": 90 + }, + "active=true,direction=east": { + "model": "refinedstorage:block/pattern_grid/orange", + "y": 90 + }, + "active=true,direction=north": { + "model": "refinedstorage:block/pattern_grid/orange" + }, + "active=true,direction=south": { + "model": "refinedstorage:block/pattern_grid/orange", + "y": 180 + }, + "active=true,direction=up_east": { + "model": "refinedstorage:block/pattern_grid/orange", + "x": -90, + "y": -90 + }, + "active=true,direction=up_north": { + "model": "refinedstorage:block/pattern_grid/orange", + "x": -90, + "y": 180 + }, + "active=true,direction=up_south": { + "model": "refinedstorage:block/pattern_grid/orange", + "x": -90 + }, + "active=true,direction=up_west": { + "model": "refinedstorage:block/pattern_grid/orange", + "x": -90, + "y": 90 + }, + "active=true,direction=west": { + "model": "refinedstorage:block/pattern_grid/orange", + "y": 270 + } + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/pattern_grid.json b/refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/pattern_grid.json new file mode 100644 index 000000000..5a4b1421a --- /dev/null +++ b/refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/pattern_grid.json @@ -0,0 +1,110 @@ +{ + "variants": { + "active=false,direction=down_east": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": 90, + "y": -90 + }, + "active=false,direction=down_north": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": 90 + }, + "active=false,direction=down_south": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": 90, + "y": 180 + }, + "active=false,direction=down_west": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": 90, + "y": 90 + }, + "active=false,direction=east": { + "model": "refinedstorage:block/pattern_grid/inactive", + "y": 90 + }, + "active=false,direction=north": { + "model": "refinedstorage:block/pattern_grid/inactive" + }, + "active=false,direction=south": { + "model": "refinedstorage:block/pattern_grid/inactive", + "y": 180 + }, + "active=false,direction=up_east": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": -90, + "y": -90 + }, + "active=false,direction=up_north": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": -90, + "y": 180 + }, + "active=false,direction=up_south": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": -90 + }, + "active=false,direction=up_west": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": -90, + "y": 90 + }, + "active=false,direction=west": { + "model": "refinedstorage:block/pattern_grid/inactive", + "y": 270 + }, + "active=true,direction=down_east": { + "model": "refinedstorage:block/pattern_grid/light_blue", + "x": 90, + "y": -90 + }, + "active=true,direction=down_north": { + "model": "refinedstorage:block/pattern_grid/light_blue", + "x": 90 + }, + "active=true,direction=down_south": { + "model": "refinedstorage:block/pattern_grid/light_blue", + "x": 90, + "y": 180 + }, + "active=true,direction=down_west": { + "model": "refinedstorage:block/pattern_grid/light_blue", + "x": 90, + "y": 90 + }, + "active=true,direction=east": { + "model": "refinedstorage:block/pattern_grid/light_blue", + "y": 90 + }, + "active=true,direction=north": { + "model": "refinedstorage:block/pattern_grid/light_blue" + }, + "active=true,direction=south": { + "model": "refinedstorage:block/pattern_grid/light_blue", + "y": 180 + }, + "active=true,direction=up_east": { + "model": "refinedstorage:block/pattern_grid/light_blue", + "x": -90, + "y": -90 + }, + "active=true,direction=up_north": { + "model": "refinedstorage:block/pattern_grid/light_blue", + "x": -90, + "y": 180 + }, + "active=true,direction=up_south": { + "model": "refinedstorage:block/pattern_grid/light_blue", + "x": -90 + }, + "active=true,direction=up_west": { + "model": "refinedstorage:block/pattern_grid/light_blue", + "x": -90, + "y": 90 + }, + "active=true,direction=west": { + "model": "refinedstorage:block/pattern_grid/light_blue", + "y": 270 + } + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/pink_pattern_grid.json b/refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/pink_pattern_grid.json new file mode 100644 index 000000000..2ad8c0856 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/pink_pattern_grid.json @@ -0,0 +1,110 @@ +{ + "variants": { + "active=false,direction=down_east": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": 90, + "y": -90 + }, + "active=false,direction=down_north": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": 90 + }, + "active=false,direction=down_south": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": 90, + "y": 180 + }, + "active=false,direction=down_west": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": 90, + "y": 90 + }, + "active=false,direction=east": { + "model": "refinedstorage:block/pattern_grid/inactive", + "y": 90 + }, + "active=false,direction=north": { + "model": "refinedstorage:block/pattern_grid/inactive" + }, + "active=false,direction=south": { + "model": "refinedstorage:block/pattern_grid/inactive", + "y": 180 + }, + "active=false,direction=up_east": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": -90, + "y": -90 + }, + "active=false,direction=up_north": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": -90, + "y": 180 + }, + "active=false,direction=up_south": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": -90 + }, + "active=false,direction=up_west": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": -90, + "y": 90 + }, + "active=false,direction=west": { + "model": "refinedstorage:block/pattern_grid/inactive", + "y": 270 + }, + "active=true,direction=down_east": { + "model": "refinedstorage:block/pattern_grid/pink", + "x": 90, + "y": -90 + }, + "active=true,direction=down_north": { + "model": "refinedstorage:block/pattern_grid/pink", + "x": 90 + }, + "active=true,direction=down_south": { + "model": "refinedstorage:block/pattern_grid/pink", + "x": 90, + "y": 180 + }, + "active=true,direction=down_west": { + "model": "refinedstorage:block/pattern_grid/pink", + "x": 90, + "y": 90 + }, + "active=true,direction=east": { + "model": "refinedstorage:block/pattern_grid/pink", + "y": 90 + }, + "active=true,direction=north": { + "model": "refinedstorage:block/pattern_grid/pink" + }, + "active=true,direction=south": { + "model": "refinedstorage:block/pattern_grid/pink", + "y": 180 + }, + "active=true,direction=up_east": { + "model": "refinedstorage:block/pattern_grid/pink", + "x": -90, + "y": -90 + }, + "active=true,direction=up_north": { + "model": "refinedstorage:block/pattern_grid/pink", + "x": -90, + "y": 180 + }, + "active=true,direction=up_south": { + "model": "refinedstorage:block/pattern_grid/pink", + "x": -90 + }, + "active=true,direction=up_west": { + "model": "refinedstorage:block/pattern_grid/pink", + "x": -90, + "y": 90 + }, + "active=true,direction=west": { + "model": "refinedstorage:block/pattern_grid/pink", + "y": 270 + } + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/purple_pattern_grid.json b/refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/purple_pattern_grid.json new file mode 100644 index 000000000..f5e8e4e2d --- /dev/null +++ b/refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/purple_pattern_grid.json @@ -0,0 +1,110 @@ +{ + "variants": { + "active=false,direction=down_east": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": 90, + "y": -90 + }, + "active=false,direction=down_north": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": 90 + }, + "active=false,direction=down_south": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": 90, + "y": 180 + }, + "active=false,direction=down_west": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": 90, + "y": 90 + }, + "active=false,direction=east": { + "model": "refinedstorage:block/pattern_grid/inactive", + "y": 90 + }, + "active=false,direction=north": { + "model": "refinedstorage:block/pattern_grid/inactive" + }, + "active=false,direction=south": { + "model": "refinedstorage:block/pattern_grid/inactive", + "y": 180 + }, + "active=false,direction=up_east": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": -90, + "y": -90 + }, + "active=false,direction=up_north": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": -90, + "y": 180 + }, + "active=false,direction=up_south": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": -90 + }, + "active=false,direction=up_west": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": -90, + "y": 90 + }, + "active=false,direction=west": { + "model": "refinedstorage:block/pattern_grid/inactive", + "y": 270 + }, + "active=true,direction=down_east": { + "model": "refinedstorage:block/pattern_grid/purple", + "x": 90, + "y": -90 + }, + "active=true,direction=down_north": { + "model": "refinedstorage:block/pattern_grid/purple", + "x": 90 + }, + "active=true,direction=down_south": { + "model": "refinedstorage:block/pattern_grid/purple", + "x": 90, + "y": 180 + }, + "active=true,direction=down_west": { + "model": "refinedstorage:block/pattern_grid/purple", + "x": 90, + "y": 90 + }, + "active=true,direction=east": { + "model": "refinedstorage:block/pattern_grid/purple", + "y": 90 + }, + "active=true,direction=north": { + "model": "refinedstorage:block/pattern_grid/purple" + }, + "active=true,direction=south": { + "model": "refinedstorage:block/pattern_grid/purple", + "y": 180 + }, + "active=true,direction=up_east": { + "model": "refinedstorage:block/pattern_grid/purple", + "x": -90, + "y": -90 + }, + "active=true,direction=up_north": { + "model": "refinedstorage:block/pattern_grid/purple", + "x": -90, + "y": 180 + }, + "active=true,direction=up_south": { + "model": "refinedstorage:block/pattern_grid/purple", + "x": -90 + }, + "active=true,direction=up_west": { + "model": "refinedstorage:block/pattern_grid/purple", + "x": -90, + "y": 90 + }, + "active=true,direction=west": { + "model": "refinedstorage:block/pattern_grid/purple", + "y": 270 + } + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/red_pattern_grid.json b/refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/red_pattern_grid.json new file mode 100644 index 000000000..d2d3d92ec --- /dev/null +++ b/refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/red_pattern_grid.json @@ -0,0 +1,110 @@ +{ + "variants": { + "active=false,direction=down_east": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": 90, + "y": -90 + }, + "active=false,direction=down_north": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": 90 + }, + "active=false,direction=down_south": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": 90, + "y": 180 + }, + "active=false,direction=down_west": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": 90, + "y": 90 + }, + "active=false,direction=east": { + "model": "refinedstorage:block/pattern_grid/inactive", + "y": 90 + }, + "active=false,direction=north": { + "model": "refinedstorage:block/pattern_grid/inactive" + }, + "active=false,direction=south": { + "model": "refinedstorage:block/pattern_grid/inactive", + "y": 180 + }, + "active=false,direction=up_east": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": -90, + "y": -90 + }, + "active=false,direction=up_north": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": -90, + "y": 180 + }, + "active=false,direction=up_south": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": -90 + }, + "active=false,direction=up_west": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": -90, + "y": 90 + }, + "active=false,direction=west": { + "model": "refinedstorage:block/pattern_grid/inactive", + "y": 270 + }, + "active=true,direction=down_east": { + "model": "refinedstorage:block/pattern_grid/red", + "x": 90, + "y": -90 + }, + "active=true,direction=down_north": { + "model": "refinedstorage:block/pattern_grid/red", + "x": 90 + }, + "active=true,direction=down_south": { + "model": "refinedstorage:block/pattern_grid/red", + "x": 90, + "y": 180 + }, + "active=true,direction=down_west": { + "model": "refinedstorage:block/pattern_grid/red", + "x": 90, + "y": 90 + }, + "active=true,direction=east": { + "model": "refinedstorage:block/pattern_grid/red", + "y": 90 + }, + "active=true,direction=north": { + "model": "refinedstorage:block/pattern_grid/red" + }, + "active=true,direction=south": { + "model": "refinedstorage:block/pattern_grid/red", + "y": 180 + }, + "active=true,direction=up_east": { + "model": "refinedstorage:block/pattern_grid/red", + "x": -90, + "y": -90 + }, + "active=true,direction=up_north": { + "model": "refinedstorage:block/pattern_grid/red", + "x": -90, + "y": 180 + }, + "active=true,direction=up_south": { + "model": "refinedstorage:block/pattern_grid/red", + "x": -90 + }, + "active=true,direction=up_west": { + "model": "refinedstorage:block/pattern_grid/red", + "x": -90, + "y": 90 + }, + "active=true,direction=west": { + "model": "refinedstorage:block/pattern_grid/red", + "y": 270 + } + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/white_pattern_grid.json b/refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/white_pattern_grid.json new file mode 100644 index 000000000..c85a98486 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/white_pattern_grid.json @@ -0,0 +1,110 @@ +{ + "variants": { + "active=false,direction=down_east": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": 90, + "y": -90 + }, + "active=false,direction=down_north": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": 90 + }, + "active=false,direction=down_south": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": 90, + "y": 180 + }, + "active=false,direction=down_west": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": 90, + "y": 90 + }, + "active=false,direction=east": { + "model": "refinedstorage:block/pattern_grid/inactive", + "y": 90 + }, + "active=false,direction=north": { + "model": "refinedstorage:block/pattern_grid/inactive" + }, + "active=false,direction=south": { + "model": "refinedstorage:block/pattern_grid/inactive", + "y": 180 + }, + "active=false,direction=up_east": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": -90, + "y": -90 + }, + "active=false,direction=up_north": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": -90, + "y": 180 + }, + "active=false,direction=up_south": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": -90 + }, + "active=false,direction=up_west": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": -90, + "y": 90 + }, + "active=false,direction=west": { + "model": "refinedstorage:block/pattern_grid/inactive", + "y": 270 + }, + "active=true,direction=down_east": { + "model": "refinedstorage:block/pattern_grid/white", + "x": 90, + "y": -90 + }, + "active=true,direction=down_north": { + "model": "refinedstorage:block/pattern_grid/white", + "x": 90 + }, + "active=true,direction=down_south": { + "model": "refinedstorage:block/pattern_grid/white", + "x": 90, + "y": 180 + }, + "active=true,direction=down_west": { + "model": "refinedstorage:block/pattern_grid/white", + "x": 90, + "y": 90 + }, + "active=true,direction=east": { + "model": "refinedstorage:block/pattern_grid/white", + "y": 90 + }, + "active=true,direction=north": { + "model": "refinedstorage:block/pattern_grid/white" + }, + "active=true,direction=south": { + "model": "refinedstorage:block/pattern_grid/white", + "y": 180 + }, + "active=true,direction=up_east": { + "model": "refinedstorage:block/pattern_grid/white", + "x": -90, + "y": -90 + }, + "active=true,direction=up_north": { + "model": "refinedstorage:block/pattern_grid/white", + "x": -90, + "y": 180 + }, + "active=true,direction=up_south": { + "model": "refinedstorage:block/pattern_grid/white", + "x": -90 + }, + "active=true,direction=up_west": { + "model": "refinedstorage:block/pattern_grid/white", + "x": -90, + "y": 90 + }, + "active=true,direction=west": { + "model": "refinedstorage:block/pattern_grid/white", + "y": 270 + } + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/yellow_pattern_grid.json b/refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/yellow_pattern_grid.json new file mode 100644 index 000000000..dc5de3e73 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/yellow_pattern_grid.json @@ -0,0 +1,110 @@ +{ + "variants": { + "active=false,direction=down_east": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": 90, + "y": -90 + }, + "active=false,direction=down_north": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": 90 + }, + "active=false,direction=down_south": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": 90, + "y": 180 + }, + "active=false,direction=down_west": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": 90, + "y": 90 + }, + "active=false,direction=east": { + "model": "refinedstorage:block/pattern_grid/inactive", + "y": 90 + }, + "active=false,direction=north": { + "model": "refinedstorage:block/pattern_grid/inactive" + }, + "active=false,direction=south": { + "model": "refinedstorage:block/pattern_grid/inactive", + "y": 180 + }, + "active=false,direction=up_east": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": -90, + "y": -90 + }, + "active=false,direction=up_north": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": -90, + "y": 180 + }, + "active=false,direction=up_south": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": -90 + }, + "active=false,direction=up_west": { + "model": "refinedstorage:block/pattern_grid/inactive", + "x": -90, + "y": 90 + }, + "active=false,direction=west": { + "model": "refinedstorage:block/pattern_grid/inactive", + "y": 270 + }, + "active=true,direction=down_east": { + "model": "refinedstorage:block/pattern_grid/yellow", + "x": 90, + "y": -90 + }, + "active=true,direction=down_north": { + "model": "refinedstorage:block/pattern_grid/yellow", + "x": 90 + }, + "active=true,direction=down_south": { + "model": "refinedstorage:block/pattern_grid/yellow", + "x": 90, + "y": 180 + }, + "active=true,direction=down_west": { + "model": "refinedstorage:block/pattern_grid/yellow", + "x": 90, + "y": 90 + }, + "active=true,direction=east": { + "model": "refinedstorage:block/pattern_grid/yellow", + "y": 90 + }, + "active=true,direction=north": { + "model": "refinedstorage:block/pattern_grid/yellow" + }, + "active=true,direction=south": { + "model": "refinedstorage:block/pattern_grid/yellow", + "y": 180 + }, + "active=true,direction=up_east": { + "model": "refinedstorage:block/pattern_grid/yellow", + "x": -90, + "y": -90 + }, + "active=true,direction=up_north": { + "model": "refinedstorage:block/pattern_grid/yellow", + "x": -90, + "y": 180 + }, + "active=true,direction=up_south": { + "model": "refinedstorage:block/pattern_grid/yellow", + "x": -90 + }, + "active=true,direction=up_west": { + "model": "refinedstorage:block/pattern_grid/yellow", + "x": -90, + "y": 90 + }, + "active=true,direction=west": { + "model": "refinedstorage:block/pattern_grid/yellow", + "y": 270 + } + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/pattern_grid/black.json b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/pattern_grid/black.json new file mode 100644 index 000000000..f873d09ba --- /dev/null +++ b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/pattern_grid/black.json @@ -0,0 +1,13 @@ +{ + "parent": "refinedstorage:block/emissive_north_cutout", + "textures": { + "cutout": "refinedstorage:block/pattern_grid/cutouts/black", + "down": "refinedstorage:block/bottom", + "east": "refinedstorage:block/pattern_grid/right", + "north": "refinedstorage:block/pattern_grid/front", + "particle": "refinedstorage:block/pattern_grid/right", + "south": "refinedstorage:block/pattern_grid/back", + "up": "refinedstorage:block/pattern_grid/top", + "west": "refinedstorage:block/pattern_grid/left" + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/pattern_grid/blue.json b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/pattern_grid/blue.json new file mode 100644 index 000000000..fcd91218f --- /dev/null +++ b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/pattern_grid/blue.json @@ -0,0 +1,13 @@ +{ + "parent": "refinedstorage:block/emissive_north_cutout", + "textures": { + "cutout": "refinedstorage:block/pattern_grid/cutouts/blue", + "down": "refinedstorage:block/bottom", + "east": "refinedstorage:block/pattern_grid/right", + "north": "refinedstorage:block/pattern_grid/front", + "particle": "refinedstorage:block/pattern_grid/right", + "south": "refinedstorage:block/pattern_grid/back", + "up": "refinedstorage:block/pattern_grid/top", + "west": "refinedstorage:block/pattern_grid/left" + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/pattern_grid/brown.json b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/pattern_grid/brown.json new file mode 100644 index 000000000..77d4ce11a --- /dev/null +++ b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/pattern_grid/brown.json @@ -0,0 +1,13 @@ +{ + "parent": "refinedstorage:block/emissive_north_cutout", + "textures": { + "cutout": "refinedstorage:block/pattern_grid/cutouts/brown", + "down": "refinedstorage:block/bottom", + "east": "refinedstorage:block/pattern_grid/right", + "north": "refinedstorage:block/pattern_grid/front", + "particle": "refinedstorage:block/pattern_grid/right", + "south": "refinedstorage:block/pattern_grid/back", + "up": "refinedstorage:block/pattern_grid/top", + "west": "refinedstorage:block/pattern_grid/left" + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/pattern_grid/cyan.json b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/pattern_grid/cyan.json new file mode 100644 index 000000000..c6a75e40e --- /dev/null +++ b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/pattern_grid/cyan.json @@ -0,0 +1,13 @@ +{ + "parent": "refinedstorage:block/emissive_north_cutout", + "textures": { + "cutout": "refinedstorage:block/pattern_grid/cutouts/cyan", + "down": "refinedstorage:block/bottom", + "east": "refinedstorage:block/pattern_grid/right", + "north": "refinedstorage:block/pattern_grid/front", + "particle": "refinedstorage:block/pattern_grid/right", + "south": "refinedstorage:block/pattern_grid/back", + "up": "refinedstorage:block/pattern_grid/top", + "west": "refinedstorage:block/pattern_grid/left" + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/pattern_grid/gray.json b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/pattern_grid/gray.json new file mode 100644 index 000000000..63c22bf1f --- /dev/null +++ b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/pattern_grid/gray.json @@ -0,0 +1,13 @@ +{ + "parent": "refinedstorage:block/emissive_north_cutout", + "textures": { + "cutout": "refinedstorage:block/pattern_grid/cutouts/gray", + "down": "refinedstorage:block/bottom", + "east": "refinedstorage:block/pattern_grid/right", + "north": "refinedstorage:block/pattern_grid/front", + "particle": "refinedstorage:block/pattern_grid/right", + "south": "refinedstorage:block/pattern_grid/back", + "up": "refinedstorage:block/pattern_grid/top", + "west": "refinedstorage:block/pattern_grid/left" + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/pattern_grid/green.json b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/pattern_grid/green.json new file mode 100644 index 000000000..30d1d5c98 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/pattern_grid/green.json @@ -0,0 +1,13 @@ +{ + "parent": "refinedstorage:block/emissive_north_cutout", + "textures": { + "cutout": "refinedstorage:block/pattern_grid/cutouts/green", + "down": "refinedstorage:block/bottom", + "east": "refinedstorage:block/pattern_grid/right", + "north": "refinedstorage:block/pattern_grid/front", + "particle": "refinedstorage:block/pattern_grid/right", + "south": "refinedstorage:block/pattern_grid/back", + "up": "refinedstorage:block/pattern_grid/top", + "west": "refinedstorage:block/pattern_grid/left" + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/pattern_grid/inactive.json b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/pattern_grid/inactive.json new file mode 100644 index 000000000..5e8af6e71 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/pattern_grid/inactive.json @@ -0,0 +1,13 @@ +{ + "parent": "refinedstorage:block/north_cutout", + "textures": { + "cutout": "refinedstorage:block/pattern_grid/cutouts/inactive", + "down": "refinedstorage:block/bottom", + "east": "refinedstorage:block/pattern_grid/right", + "north": "refinedstorage:block/pattern_grid/front", + "particle": "refinedstorage:block/pattern_grid/right", + "south": "refinedstorage:block/pattern_grid/back", + "up": "refinedstorage:block/pattern_grid/top", + "west": "refinedstorage:block/pattern_grid/left" + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/pattern_grid/light_blue.json b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/pattern_grid/light_blue.json new file mode 100644 index 000000000..d7a41c3fe --- /dev/null +++ b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/pattern_grid/light_blue.json @@ -0,0 +1,13 @@ +{ + "parent": "refinedstorage:block/emissive_north_cutout", + "textures": { + "cutout": "refinedstorage:block/pattern_grid/cutouts/light_blue", + "down": "refinedstorage:block/bottom", + "east": "refinedstorage:block/pattern_grid/right", + "north": "refinedstorage:block/pattern_grid/front", + "particle": "refinedstorage:block/pattern_grid/right", + "south": "refinedstorage:block/pattern_grid/back", + "up": "refinedstorage:block/pattern_grid/top", + "west": "refinedstorage:block/pattern_grid/left" + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/pattern_grid/light_gray.json b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/pattern_grid/light_gray.json new file mode 100644 index 000000000..bb54937da --- /dev/null +++ b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/pattern_grid/light_gray.json @@ -0,0 +1,13 @@ +{ + "parent": "refinedstorage:block/emissive_north_cutout", + "textures": { + "cutout": "refinedstorage:block/pattern_grid/cutouts/light_gray", + "down": "refinedstorage:block/bottom", + "east": "refinedstorage:block/pattern_grid/right", + "north": "refinedstorage:block/pattern_grid/front", + "particle": "refinedstorage:block/pattern_grid/right", + "south": "refinedstorage:block/pattern_grid/back", + "up": "refinedstorage:block/pattern_grid/top", + "west": "refinedstorage:block/pattern_grid/left" + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/pattern_grid/lime.json b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/pattern_grid/lime.json new file mode 100644 index 000000000..5ea22a48d --- /dev/null +++ b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/pattern_grid/lime.json @@ -0,0 +1,13 @@ +{ + "parent": "refinedstorage:block/emissive_north_cutout", + "textures": { + "cutout": "refinedstorage:block/pattern_grid/cutouts/lime", + "down": "refinedstorage:block/bottom", + "east": "refinedstorage:block/pattern_grid/right", + "north": "refinedstorage:block/pattern_grid/front", + "particle": "refinedstorage:block/pattern_grid/right", + "south": "refinedstorage:block/pattern_grid/back", + "up": "refinedstorage:block/pattern_grid/top", + "west": "refinedstorage:block/pattern_grid/left" + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/pattern_grid/magenta.json b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/pattern_grid/magenta.json new file mode 100644 index 000000000..2b855bbce --- /dev/null +++ b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/pattern_grid/magenta.json @@ -0,0 +1,13 @@ +{ + "parent": "refinedstorage:block/emissive_north_cutout", + "textures": { + "cutout": "refinedstorage:block/pattern_grid/cutouts/magenta", + "down": "refinedstorage:block/bottom", + "east": "refinedstorage:block/pattern_grid/right", + "north": "refinedstorage:block/pattern_grid/front", + "particle": "refinedstorage:block/pattern_grid/right", + "south": "refinedstorage:block/pattern_grid/back", + "up": "refinedstorage:block/pattern_grid/top", + "west": "refinedstorage:block/pattern_grid/left" + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/pattern_grid/orange.json b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/pattern_grid/orange.json new file mode 100644 index 000000000..ebfaff81e --- /dev/null +++ b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/pattern_grid/orange.json @@ -0,0 +1,13 @@ +{ + "parent": "refinedstorage:block/emissive_north_cutout", + "textures": { + "cutout": "refinedstorage:block/pattern_grid/cutouts/orange", + "down": "refinedstorage:block/bottom", + "east": "refinedstorage:block/pattern_grid/right", + "north": "refinedstorage:block/pattern_grid/front", + "particle": "refinedstorage:block/pattern_grid/right", + "south": "refinedstorage:block/pattern_grid/back", + "up": "refinedstorage:block/pattern_grid/top", + "west": "refinedstorage:block/pattern_grid/left" + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/pattern_grid/pink.json b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/pattern_grid/pink.json new file mode 100644 index 000000000..943cfd86d --- /dev/null +++ b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/pattern_grid/pink.json @@ -0,0 +1,13 @@ +{ + "parent": "refinedstorage:block/emissive_north_cutout", + "textures": { + "cutout": "refinedstorage:block/pattern_grid/cutouts/pink", + "down": "refinedstorage:block/bottom", + "east": "refinedstorage:block/pattern_grid/right", + "north": "refinedstorage:block/pattern_grid/front", + "particle": "refinedstorage:block/pattern_grid/right", + "south": "refinedstorage:block/pattern_grid/back", + "up": "refinedstorage:block/pattern_grid/top", + "west": "refinedstorage:block/pattern_grid/left" + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/pattern_grid/purple.json b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/pattern_grid/purple.json new file mode 100644 index 000000000..e68139e47 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/pattern_grid/purple.json @@ -0,0 +1,13 @@ +{ + "parent": "refinedstorage:block/emissive_north_cutout", + "textures": { + "cutout": "refinedstorage:block/pattern_grid/cutouts/purple", + "down": "refinedstorage:block/bottom", + "east": "refinedstorage:block/pattern_grid/right", + "north": "refinedstorage:block/pattern_grid/front", + "particle": "refinedstorage:block/pattern_grid/right", + "south": "refinedstorage:block/pattern_grid/back", + "up": "refinedstorage:block/pattern_grid/top", + "west": "refinedstorage:block/pattern_grid/left" + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/pattern_grid/red.json b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/pattern_grid/red.json new file mode 100644 index 000000000..59a29d955 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/pattern_grid/red.json @@ -0,0 +1,13 @@ +{ + "parent": "refinedstorage:block/emissive_north_cutout", + "textures": { + "cutout": "refinedstorage:block/pattern_grid/cutouts/red", + "down": "refinedstorage:block/bottom", + "east": "refinedstorage:block/pattern_grid/right", + "north": "refinedstorage:block/pattern_grid/front", + "particle": "refinedstorage:block/pattern_grid/right", + "south": "refinedstorage:block/pattern_grid/back", + "up": "refinedstorage:block/pattern_grid/top", + "west": "refinedstorage:block/pattern_grid/left" + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/pattern_grid/white.json b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/pattern_grid/white.json new file mode 100644 index 000000000..3360dd7c6 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/pattern_grid/white.json @@ -0,0 +1,13 @@ +{ + "parent": "refinedstorage:block/emissive_north_cutout", + "textures": { + "cutout": "refinedstorage:block/pattern_grid/cutouts/white", + "down": "refinedstorage:block/bottom", + "east": "refinedstorage:block/pattern_grid/right", + "north": "refinedstorage:block/pattern_grid/front", + "particle": "refinedstorage:block/pattern_grid/right", + "south": "refinedstorage:block/pattern_grid/back", + "up": "refinedstorage:block/pattern_grid/top", + "west": "refinedstorage:block/pattern_grid/left" + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/pattern_grid/yellow.json b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/pattern_grid/yellow.json new file mode 100644 index 000000000..802dc8683 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/pattern_grid/yellow.json @@ -0,0 +1,13 @@ +{ + "parent": "refinedstorage:block/emissive_north_cutout", + "textures": { + "cutout": "refinedstorage:block/pattern_grid/cutouts/yellow", + "down": "refinedstorage:block/bottom", + "east": "refinedstorage:block/pattern_grid/right", + "north": "refinedstorage:block/pattern_grid/front", + "particle": "refinedstorage:block/pattern_grid/right", + "south": "refinedstorage:block/pattern_grid/back", + "up": "refinedstorage:block/pattern_grid/top", + "west": "refinedstorage:block/pattern_grid/left" + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/black_pattern_grid.json b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/black_pattern_grid.json new file mode 100644 index 000000000..810318a65 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/black_pattern_grid.json @@ -0,0 +1,3 @@ +{ + "parent": "refinedstorage:block/pattern_grid/black" +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/blue_pattern_grid.json b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/blue_pattern_grid.json new file mode 100644 index 000000000..8dda3bed0 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/blue_pattern_grid.json @@ -0,0 +1,3 @@ +{ + "parent": "refinedstorage:block/pattern_grid/blue" +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/brown_pattern_grid.json b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/brown_pattern_grid.json new file mode 100644 index 000000000..a5400dad4 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/brown_pattern_grid.json @@ -0,0 +1,3 @@ +{ + "parent": "refinedstorage:block/pattern_grid/brown" +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/cyan_pattern_grid.json b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/cyan_pattern_grid.json new file mode 100644 index 000000000..89252445a --- /dev/null +++ b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/cyan_pattern_grid.json @@ -0,0 +1,3 @@ +{ + "parent": "refinedstorage:block/pattern_grid/cyan" +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/gray_pattern_grid.json b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/gray_pattern_grid.json new file mode 100644 index 000000000..5e093515c --- /dev/null +++ b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/gray_pattern_grid.json @@ -0,0 +1,3 @@ +{ + "parent": "refinedstorage:block/pattern_grid/gray" +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/green_pattern_grid.json b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/green_pattern_grid.json new file mode 100644 index 000000000..b3bd93505 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/green_pattern_grid.json @@ -0,0 +1,3 @@ +{ + "parent": "refinedstorage:block/pattern_grid/green" +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/light_gray_pattern_grid.json b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/light_gray_pattern_grid.json new file mode 100644 index 000000000..4c47549ff --- /dev/null +++ b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/light_gray_pattern_grid.json @@ -0,0 +1,3 @@ +{ + "parent": "refinedstorage:block/pattern_grid/light_gray" +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/lime_pattern_grid.json b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/lime_pattern_grid.json new file mode 100644 index 000000000..b35597270 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/lime_pattern_grid.json @@ -0,0 +1,3 @@ +{ + "parent": "refinedstorage:block/pattern_grid/lime" +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/magenta_pattern_grid.json b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/magenta_pattern_grid.json new file mode 100644 index 000000000..23d885ae5 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/magenta_pattern_grid.json @@ -0,0 +1,3 @@ +{ + "parent": "refinedstorage:block/pattern_grid/magenta" +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/orange_pattern_grid.json b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/orange_pattern_grid.json new file mode 100644 index 000000000..845618ebd --- /dev/null +++ b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/orange_pattern_grid.json @@ -0,0 +1,3 @@ +{ + "parent": "refinedstorage:block/pattern_grid/orange" +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/pattern_grid.json b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/pattern_grid.json new file mode 100644 index 000000000..b1aec2515 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/pattern_grid.json @@ -0,0 +1,3 @@ +{ + "parent": "refinedstorage:block/pattern_grid/light_blue" +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/pink_pattern_grid.json b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/pink_pattern_grid.json new file mode 100644 index 000000000..9358334f5 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/pink_pattern_grid.json @@ -0,0 +1,3 @@ +{ + "parent": "refinedstorage:block/pattern_grid/pink" +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/purple_pattern_grid.json b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/purple_pattern_grid.json new file mode 100644 index 000000000..2e63cdef3 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/purple_pattern_grid.json @@ -0,0 +1,3 @@ +{ + "parent": "refinedstorage:block/pattern_grid/purple" +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/red_pattern_grid.json b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/red_pattern_grid.json new file mode 100644 index 000000000..e117d9ece --- /dev/null +++ b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/red_pattern_grid.json @@ -0,0 +1,3 @@ +{ + "parent": "refinedstorage:block/pattern_grid/red" +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/white_pattern_grid.json b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/white_pattern_grid.json new file mode 100644 index 000000000..7073bd864 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/white_pattern_grid.json @@ -0,0 +1,3 @@ +{ + "parent": "refinedstorage:block/pattern_grid/white" +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/yellow_pattern_grid.json b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/yellow_pattern_grid.json new file mode 100644 index 000000000..14d16648a --- /dev/null +++ b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/yellow_pattern_grid.json @@ -0,0 +1,3 @@ +{ + "parent": "refinedstorage:block/pattern_grid/yellow" +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/black_pattern_grid.json b/refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/black_pattern_grid.json new file mode 100644 index 000000000..0c82b45aa --- /dev/null +++ b/refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/black_pattern_grid.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_pattern_grids": { + "conditions": { + "items": [ + { + "items": "#refinedstorage:pattern_grids" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage:coloring/black_pattern_grid" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_pattern_grids" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage:coloring/black_pattern_grid" + ] + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/blue_pattern_grid.json b/refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/blue_pattern_grid.json new file mode 100644 index 000000000..3fc1dab5f --- /dev/null +++ b/refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/blue_pattern_grid.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_pattern_grids": { + "conditions": { + "items": [ + { + "items": "#refinedstorage:pattern_grids" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage:coloring/blue_pattern_grid" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_pattern_grids" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage:coloring/blue_pattern_grid" + ] + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/brown_pattern_grid.json b/refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/brown_pattern_grid.json new file mode 100644 index 000000000..21c6be6e1 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/brown_pattern_grid.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_pattern_grids": { + "conditions": { + "items": [ + { + "items": "#refinedstorage:pattern_grids" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage:coloring/brown_pattern_grid" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_pattern_grids" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage:coloring/brown_pattern_grid" + ] + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/cyan_pattern_grid.json b/refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/cyan_pattern_grid.json new file mode 100644 index 000000000..6e672ca6d --- /dev/null +++ b/refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/cyan_pattern_grid.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_pattern_grids": { + "conditions": { + "items": [ + { + "items": "#refinedstorage:pattern_grids" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage:coloring/cyan_pattern_grid" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_pattern_grids" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage:coloring/cyan_pattern_grid" + ] + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/gray_pattern_grid.json b/refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/gray_pattern_grid.json new file mode 100644 index 000000000..26706f8de --- /dev/null +++ b/refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/gray_pattern_grid.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_pattern_grids": { + "conditions": { + "items": [ + { + "items": "#refinedstorage:pattern_grids" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage:coloring/gray_pattern_grid" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_pattern_grids" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage:coloring/gray_pattern_grid" + ] + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/green_pattern_grid.json b/refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/green_pattern_grid.json new file mode 100644 index 000000000..7ba2a5c12 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/green_pattern_grid.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_pattern_grids": { + "conditions": { + "items": [ + { + "items": "#refinedstorage:pattern_grids" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage:coloring/green_pattern_grid" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_pattern_grids" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage:coloring/green_pattern_grid" + ] + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/light_blue_pattern_grid.json b/refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/light_blue_pattern_grid.json new file mode 100644 index 000000000..640a631d7 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/light_blue_pattern_grid.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_pattern_grids": { + "conditions": { + "items": [ + { + "items": "#refinedstorage:pattern_grids" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage:coloring/light_blue_pattern_grid" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_pattern_grids" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage:coloring/light_blue_pattern_grid" + ] + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/light_gray_pattern_grid.json b/refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/light_gray_pattern_grid.json new file mode 100644 index 000000000..ba001806e --- /dev/null +++ b/refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/light_gray_pattern_grid.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_pattern_grids": { + "conditions": { + "items": [ + { + "items": "#refinedstorage:pattern_grids" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage:coloring/light_gray_pattern_grid" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_pattern_grids" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage:coloring/light_gray_pattern_grid" + ] + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/lime_pattern_grid.json b/refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/lime_pattern_grid.json new file mode 100644 index 000000000..f12eeb903 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/lime_pattern_grid.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_pattern_grids": { + "conditions": { + "items": [ + { + "items": "#refinedstorage:pattern_grids" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage:coloring/lime_pattern_grid" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_pattern_grids" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage:coloring/lime_pattern_grid" + ] + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/magenta_pattern_grid.json b/refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/magenta_pattern_grid.json new file mode 100644 index 000000000..82f2879f7 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/magenta_pattern_grid.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_pattern_grids": { + "conditions": { + "items": [ + { + "items": "#refinedstorage:pattern_grids" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage:coloring/magenta_pattern_grid" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_pattern_grids" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage:coloring/magenta_pattern_grid" + ] + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/orange_pattern_grid.json b/refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/orange_pattern_grid.json new file mode 100644 index 000000000..27f904e4b --- /dev/null +++ b/refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/orange_pattern_grid.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_pattern_grids": { + "conditions": { + "items": [ + { + "items": "#refinedstorage:pattern_grids" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage:coloring/orange_pattern_grid" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_pattern_grids" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage:coloring/orange_pattern_grid" + ] + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/pink_pattern_grid.json b/refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/pink_pattern_grid.json new file mode 100644 index 000000000..358811ea4 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/pink_pattern_grid.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_pattern_grids": { + "conditions": { + "items": [ + { + "items": "#refinedstorage:pattern_grids" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage:coloring/pink_pattern_grid" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_pattern_grids" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage:coloring/pink_pattern_grid" + ] + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/purple_pattern_grid.json b/refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/purple_pattern_grid.json new file mode 100644 index 000000000..8bfef78a4 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/purple_pattern_grid.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_pattern_grids": { + "conditions": { + "items": [ + { + "items": "#refinedstorage:pattern_grids" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage:coloring/purple_pattern_grid" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_pattern_grids" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage:coloring/purple_pattern_grid" + ] + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/red_pattern_grid.json b/refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/red_pattern_grid.json new file mode 100644 index 000000000..ba14eca80 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/red_pattern_grid.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_pattern_grids": { + "conditions": { + "items": [ + { + "items": "#refinedstorage:pattern_grids" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage:coloring/red_pattern_grid" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_pattern_grids" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage:coloring/red_pattern_grid" + ] + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/white_pattern_grid.json b/refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/white_pattern_grid.json new file mode 100644 index 000000000..107127bbe --- /dev/null +++ b/refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/white_pattern_grid.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_pattern_grids": { + "conditions": { + "items": [ + { + "items": "#refinedstorage:pattern_grids" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage:coloring/white_pattern_grid" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_pattern_grids" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage:coloring/white_pattern_grid" + ] + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/yellow_pattern_grid.json b/refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/yellow_pattern_grid.json new file mode 100644 index 000000000..6dc392741 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/yellow_pattern_grid.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_pattern_grids": { + "conditions": { + "items": [ + { + "items": "#refinedstorage:pattern_grids" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage:coloring/yellow_pattern_grid" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_pattern_grids" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage:coloring/yellow_pattern_grid" + ] + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/black_pattern_grid.json b/refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/black_pattern_grid.json new file mode 100644 index 000000000..1bbbc9cf6 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/black_pattern_grid.json @@ -0,0 +1,21 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "refinedstorage:black_pattern_grid" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "refinedstorage:blocks/black_pattern_grid" +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/blue_pattern_grid.json b/refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/blue_pattern_grid.json new file mode 100644 index 000000000..1158b0064 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/blue_pattern_grid.json @@ -0,0 +1,21 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "refinedstorage:blue_pattern_grid" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "refinedstorage:blocks/blue_pattern_grid" +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/brown_pattern_grid.json b/refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/brown_pattern_grid.json new file mode 100644 index 000000000..684d5e8c9 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/brown_pattern_grid.json @@ -0,0 +1,21 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "refinedstorage:brown_pattern_grid" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "refinedstorage:blocks/brown_pattern_grid" +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/cyan_pattern_grid.json b/refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/cyan_pattern_grid.json new file mode 100644 index 000000000..1e3e94404 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/cyan_pattern_grid.json @@ -0,0 +1,21 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "refinedstorage:cyan_pattern_grid" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "refinedstorage:blocks/cyan_pattern_grid" +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/gray_pattern_grid.json b/refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/gray_pattern_grid.json new file mode 100644 index 000000000..8d9660d5a --- /dev/null +++ b/refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/gray_pattern_grid.json @@ -0,0 +1,21 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "refinedstorage:gray_pattern_grid" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "refinedstorage:blocks/gray_pattern_grid" +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/green_pattern_grid.json b/refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/green_pattern_grid.json new file mode 100644 index 000000000..25e15cb87 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/green_pattern_grid.json @@ -0,0 +1,21 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "refinedstorage:green_pattern_grid" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "refinedstorage:blocks/green_pattern_grid" +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/light_gray_pattern_grid.json b/refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/light_gray_pattern_grid.json new file mode 100644 index 000000000..9346120a7 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/light_gray_pattern_grid.json @@ -0,0 +1,21 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "refinedstorage:light_gray_pattern_grid" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "refinedstorage:blocks/light_gray_pattern_grid" +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/lime_pattern_grid.json b/refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/lime_pattern_grid.json new file mode 100644 index 000000000..4c5fd5b37 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/lime_pattern_grid.json @@ -0,0 +1,21 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "refinedstorage:lime_pattern_grid" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "refinedstorage:blocks/lime_pattern_grid" +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/magenta_pattern_grid.json b/refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/magenta_pattern_grid.json new file mode 100644 index 000000000..d6da01e5b --- /dev/null +++ b/refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/magenta_pattern_grid.json @@ -0,0 +1,21 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "refinedstorage:magenta_pattern_grid" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "refinedstorage:blocks/magenta_pattern_grid" +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/orange_pattern_grid.json b/refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/orange_pattern_grid.json new file mode 100644 index 000000000..964916d38 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/orange_pattern_grid.json @@ -0,0 +1,21 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "refinedstorage:orange_pattern_grid" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "refinedstorage:blocks/orange_pattern_grid" +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/pattern_grid.json b/refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/pattern_grid.json new file mode 100644 index 000000000..f395323e7 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/pattern_grid.json @@ -0,0 +1,21 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "refinedstorage:pattern_grid" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "refinedstorage:blocks/pattern_grid" +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/pink_pattern_grid.json b/refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/pink_pattern_grid.json new file mode 100644 index 000000000..6bb450999 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/pink_pattern_grid.json @@ -0,0 +1,21 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "refinedstorage:pink_pattern_grid" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "refinedstorage:blocks/pink_pattern_grid" +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/purple_pattern_grid.json b/refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/purple_pattern_grid.json new file mode 100644 index 000000000..42404be9c --- /dev/null +++ b/refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/purple_pattern_grid.json @@ -0,0 +1,21 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "refinedstorage:purple_pattern_grid" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "refinedstorage:blocks/purple_pattern_grid" +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/red_pattern_grid.json b/refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/red_pattern_grid.json new file mode 100644 index 000000000..25237dce7 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/red_pattern_grid.json @@ -0,0 +1,21 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "refinedstorage:red_pattern_grid" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "refinedstorage:blocks/red_pattern_grid" +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/white_pattern_grid.json b/refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/white_pattern_grid.json new file mode 100644 index 000000000..c059207d4 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/white_pattern_grid.json @@ -0,0 +1,21 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "refinedstorage:white_pattern_grid" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "refinedstorage:blocks/white_pattern_grid" +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/yellow_pattern_grid.json b/refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/yellow_pattern_grid.json new file mode 100644 index 000000000..d2f5ce5e4 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/yellow_pattern_grid.json @@ -0,0 +1,21 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "refinedstorage:yellow_pattern_grid" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "refinedstorage:blocks/yellow_pattern_grid" +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/black_pattern_grid.json b/refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/black_pattern_grid.json new file mode 100644 index 000000000..c3944c15d --- /dev/null +++ b/refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/black_pattern_grid.json @@ -0,0 +1,16 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage:pattern_grids" + }, + { + "tag": "c:dyes/black" + } + ], + "result": { + "count": 1, + "id": "refinedstorage:black_pattern_grid" + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/blue_pattern_grid.json b/refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/blue_pattern_grid.json new file mode 100644 index 000000000..f1e6a8f61 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/blue_pattern_grid.json @@ -0,0 +1,16 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage:pattern_grids" + }, + { + "tag": "c:dyes/blue" + } + ], + "result": { + "count": 1, + "id": "refinedstorage:blue_pattern_grid" + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/brown_pattern_grid.json b/refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/brown_pattern_grid.json new file mode 100644 index 000000000..5491f4306 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/brown_pattern_grid.json @@ -0,0 +1,16 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage:pattern_grids" + }, + { + "tag": "c:dyes/brown" + } + ], + "result": { + "count": 1, + "id": "refinedstorage:brown_pattern_grid" + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/cyan_pattern_grid.json b/refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/cyan_pattern_grid.json new file mode 100644 index 000000000..86eee2818 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/cyan_pattern_grid.json @@ -0,0 +1,16 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage:pattern_grids" + }, + { + "tag": "c:dyes/cyan" + } + ], + "result": { + "count": 1, + "id": "refinedstorage:cyan_pattern_grid" + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/gray_pattern_grid.json b/refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/gray_pattern_grid.json new file mode 100644 index 000000000..1fc0ca27a --- /dev/null +++ b/refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/gray_pattern_grid.json @@ -0,0 +1,16 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage:pattern_grids" + }, + { + "tag": "c:dyes/gray" + } + ], + "result": { + "count": 1, + "id": "refinedstorage:gray_pattern_grid" + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/green_pattern_grid.json b/refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/green_pattern_grid.json new file mode 100644 index 000000000..c1f31af5e --- /dev/null +++ b/refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/green_pattern_grid.json @@ -0,0 +1,16 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage:pattern_grids" + }, + { + "tag": "c:dyes/green" + } + ], + "result": { + "count": 1, + "id": "refinedstorage:green_pattern_grid" + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/light_blue_pattern_grid.json b/refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/light_blue_pattern_grid.json new file mode 100644 index 000000000..6d94a92cd --- /dev/null +++ b/refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/light_blue_pattern_grid.json @@ -0,0 +1,16 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage:pattern_grids" + }, + { + "tag": "c:dyes/light_blue" + } + ], + "result": { + "count": 1, + "id": "refinedstorage:pattern_grid" + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/light_gray_pattern_grid.json b/refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/light_gray_pattern_grid.json new file mode 100644 index 000000000..27e3a4a88 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/light_gray_pattern_grid.json @@ -0,0 +1,16 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage:pattern_grids" + }, + { + "tag": "c:dyes/light_gray" + } + ], + "result": { + "count": 1, + "id": "refinedstorage:light_gray_pattern_grid" + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/lime_pattern_grid.json b/refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/lime_pattern_grid.json new file mode 100644 index 000000000..4e6b647a8 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/lime_pattern_grid.json @@ -0,0 +1,16 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage:pattern_grids" + }, + { + "tag": "c:dyes/lime" + } + ], + "result": { + "count": 1, + "id": "refinedstorage:lime_pattern_grid" + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/magenta_pattern_grid.json b/refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/magenta_pattern_grid.json new file mode 100644 index 000000000..b9f7acce8 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/magenta_pattern_grid.json @@ -0,0 +1,16 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage:pattern_grids" + }, + { + "tag": "c:dyes/magenta" + } + ], + "result": { + "count": 1, + "id": "refinedstorage:magenta_pattern_grid" + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/orange_pattern_grid.json b/refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/orange_pattern_grid.json new file mode 100644 index 000000000..a87159606 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/orange_pattern_grid.json @@ -0,0 +1,16 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage:pattern_grids" + }, + { + "tag": "c:dyes/orange" + } + ], + "result": { + "count": 1, + "id": "refinedstorage:orange_pattern_grid" + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/pink_pattern_grid.json b/refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/pink_pattern_grid.json new file mode 100644 index 000000000..694be123d --- /dev/null +++ b/refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/pink_pattern_grid.json @@ -0,0 +1,16 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage:pattern_grids" + }, + { + "tag": "c:dyes/pink" + } + ], + "result": { + "count": 1, + "id": "refinedstorage:pink_pattern_grid" + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/purple_pattern_grid.json b/refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/purple_pattern_grid.json new file mode 100644 index 000000000..e87a3e35b --- /dev/null +++ b/refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/purple_pattern_grid.json @@ -0,0 +1,16 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage:pattern_grids" + }, + { + "tag": "c:dyes/purple" + } + ], + "result": { + "count": 1, + "id": "refinedstorage:purple_pattern_grid" + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/red_pattern_grid.json b/refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/red_pattern_grid.json new file mode 100644 index 000000000..342dbb45c --- /dev/null +++ b/refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/red_pattern_grid.json @@ -0,0 +1,16 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage:pattern_grids" + }, + { + "tag": "c:dyes/red" + } + ], + "result": { + "count": 1, + "id": "refinedstorage:red_pattern_grid" + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/white_pattern_grid.json b/refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/white_pattern_grid.json new file mode 100644 index 000000000..545d3147c --- /dev/null +++ b/refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/white_pattern_grid.json @@ -0,0 +1,16 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage:pattern_grids" + }, + { + "tag": "c:dyes/white" + } + ], + "result": { + "count": 1, + "id": "refinedstorage:white_pattern_grid" + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/yellow_pattern_grid.json b/refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/yellow_pattern_grid.json new file mode 100644 index 000000000..1b910bad9 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/yellow_pattern_grid.json @@ -0,0 +1,16 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage:pattern_grids" + }, + { + "tag": "c:dyes/yellow" + } + ], + "result": { + "count": 1, + "id": "refinedstorage:yellow_pattern_grid" + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/data/refinedstorage/tags/item/pattern_grids.json b/refinedstorage-common/src/generated/resources/data/refinedstorage/tags/item/pattern_grids.json new file mode 100644 index 000000000..09212798c --- /dev/null +++ b/refinedstorage-common/src/generated/resources/data/refinedstorage/tags/item/pattern_grids.json @@ -0,0 +1,20 @@ +{ + "values": [ + "refinedstorage:white_pattern_grid", + "refinedstorage:orange_pattern_grid", + "refinedstorage:magenta_pattern_grid", + "refinedstorage:pattern_grid", + "refinedstorage:yellow_pattern_grid", + "refinedstorage:lime_pattern_grid", + "refinedstorage:pink_pattern_grid", + "refinedstorage:gray_pattern_grid", + "refinedstorage:light_gray_pattern_grid", + "refinedstorage:cyan_pattern_grid", + "refinedstorage:purple_pattern_grid", + "refinedstorage:blue_pattern_grid", + "refinedstorage:brown_pattern_grid", + "refinedstorage:green_pattern_grid", + "refinedstorage:red_pattern_grid", + "refinedstorage:black_pattern_grid" + ] +} \ No newline at end of file diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/AbstractClientModInitializer.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/AbstractClientModInitializer.java index b7a8be0fe..b9d9c997b 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/AbstractClientModInitializer.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/AbstractClientModInitializer.java @@ -1,6 +1,7 @@ package com.refinedmods.refinedstorage.common; import com.refinedmods.refinedstorage.common.api.RefinedStorageApi; +import com.refinedmods.refinedstorage.common.autocrafting.PatternGridScreen; import com.refinedmods.refinedstorage.common.constructordestructor.ConstructorScreen; import com.refinedmods.refinedstorage.common.constructordestructor.DestructorScreen; import com.refinedmods.refinedstorage.common.content.Items; @@ -55,6 +56,7 @@ protected static void registerScreens(final ScreenRegistration registration) { registration.register(Menus.INSTANCE.getDiskDrive(), DiskDriveScreen::new); registration.register(Menus.INSTANCE.getGrid(), GridScreen::new); registration.register(Menus.INSTANCE.getCraftingGrid(), CraftingGridScreen::new); + registration.register(Menus.INSTANCE.getPatternGrid(), PatternGridScreen::new); registration.register(Menus.INSTANCE.getWirelessGrid(), GridScreen::new); registration.register(Menus.INSTANCE.getController(), ControllerScreen::new); registration.register(Menus.INSTANCE.getItemStorage(), ItemStorageBlockScreen::new); diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/AbstractModInitializer.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/AbstractModInitializer.java index 5780792be..3a2ea3fe5 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/AbstractModInitializer.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/AbstractModInitializer.java @@ -12,6 +12,12 @@ import com.refinedmods.refinedstorage.common.api.RefinedStorageApiProxy; import com.refinedmods.refinedstorage.common.api.security.PlatformSecurityNetworkComponent; import com.refinedmods.refinedstorage.common.api.upgrade.AbstractUpgradeItem; +import com.refinedmods.refinedstorage.common.autocrafting.CraftingPatternState; +import com.refinedmods.refinedstorage.common.autocrafting.PatternGridBlockEntity; +import com.refinedmods.refinedstorage.common.autocrafting.PatternGridContainerMenu; +import com.refinedmods.refinedstorage.common.autocrafting.PatternGridData; +import com.refinedmods.refinedstorage.common.autocrafting.PatternItem; +import com.refinedmods.refinedstorage.common.autocrafting.PatternState; import com.refinedmods.refinedstorage.common.configurationcard.ConfigurationCardItem; import com.refinedmods.refinedstorage.common.configurationcard.ConfigurationCardState; import com.refinedmods.refinedstorage.common.constructordestructor.BlockBreakDestructorStrategyFactory; @@ -312,6 +318,7 @@ protected final void registerBlocks( Blocks.INSTANCE.getCable().registerBlocks(callback); Blocks.INSTANCE.getGrid().registerBlocks(callback); Blocks.INSTANCE.getCraftingGrid().registerBlocks(callback); + Blocks.INSTANCE.getPatternGrid().registerBlocks(callback); Blocks.INSTANCE.getDetector().registerBlocks(callback); Blocks.INSTANCE.getImporter().registerBlocks(callback); Blocks.INSTANCE.getExporter().registerBlocks(callback); @@ -341,6 +348,7 @@ protected final void registerItems(final RegistryCallback callback) { registerSimpleItems(callback); Blocks.INSTANCE.getGrid().registerItems(callback); Blocks.INSTANCE.getCraftingGrid().registerItems(callback); + Blocks.INSTANCE.getPatternGrid().registerItems(callback); Blocks.INSTANCE.getCable().registerItems(callback, Items.INSTANCE::addCable); Blocks.INSTANCE.getController().registerItems(callback, Items.INSTANCE::addController); Blocks.INSTANCE.getCreativeController().registerItems(callback, Items.INSTANCE::addCreativeController); @@ -389,6 +397,7 @@ private void registerSimpleItems(final RegistryCallback callback) { ConfigurationCardItem::new )); Items.INSTANCE.setNetworkCard(callback.register(ContentIds.NETWORK_CARD, NetworkCardItem::new)); + Items.INSTANCE.setPattern(callback.register(ContentIds.PATTERN, PatternItem::new)); } private void registerProcessor(final RegistryCallback callback, final ProcessorItem.Type type) { @@ -562,6 +571,10 @@ protected final void registerBlockEntities( ContentIds.CRAFTING_GRID, () -> typeFactory.create(CraftingGridBlockEntity::new, Blocks.INSTANCE.getCraftingGrid().toArray()) )); + BlockEntities.INSTANCE.setPatternGrid(callback.register( + ContentIds.PATTERN_GRID, + () -> typeFactory.create(PatternGridBlockEntity::new, Blocks.INSTANCE.getPatternGrid().toArray()) + )); for (final ItemStorageVariant variant : ItemStorageVariant.values()) { BlockEntities.INSTANCE.setItemStorageBlock(variant, callback.register( ContentIds.forItemStorageBlock(variant), @@ -679,6 +692,10 @@ protected final void registerMenus(final RegistryCallback> callback, ContentIds.CRAFTING_GRID, () -> extendedMenuTypeFactory.create(CraftingGridContainerMenu::new, GridData.STREAM_CODEC) )); + Menus.INSTANCE.setPatternGrid(callback.register( + ContentIds.PATTERN_GRID, + () -> extendedMenuTypeFactory.create(PatternGridContainerMenu::new, PatternGridData.STREAM_CODEC) + )); Menus.INSTANCE.setWirelessGrid(callback.register( ContentIds.WIRELESS_GRID, () -> extendedMenuTypeFactory.create(WirelessGridContainerMenu::new, WirelessGridData.STREAM_CODEC) @@ -837,6 +854,18 @@ protected final void registerDataComponents(final RegistryCallback DataComponentType.builder() + .persistent(PatternState.CODEC) + .networkSynchronized(PatternState.STREAM_CODEC) + .build())); + DataComponents.INSTANCE.setCraftingPatternState( + callback.register(createIdentifier("crafting_pattern_state"), + () -> DataComponentType.builder() + .persistent(CraftingPatternState.CODEC) + .networkSynchronized(CraftingPatternState.STREAM_CODEC) + .build())); } protected final void registerInventorySlotReference() { diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/Config.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/Config.java index e828d1c07..6feeb0d92 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/Config.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/Config.java @@ -20,6 +20,8 @@ public interface Config { GridEntry getGrid(); + SimpleEnergyUsageEntry getPatternGrid(); + CraftingGridEntry getCraftingGrid(); ControllerEntry getController(); diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/Platform.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/Platform.java index b1b96a0ff..00b0accf0 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/Platform.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/Platform.java @@ -131,4 +131,6 @@ void saveSavedData(SavedData savedData, @Nullable NetworkNodeContainerProvider getContainerProviderSafely(Level level, BlockPos pos, @Nullable Direction direction); + + int getItemColor(ItemStack stack, int tintIndex); } diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/PlatformProxy.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/PlatformProxy.java index 6c28ad8e5..00ff22c91 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/PlatformProxy.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/PlatformProxy.java @@ -254,6 +254,11 @@ public NetworkNodeContainerProvider getContainerProviderSafely(final Level level return ensureLoaded().getContainerProviderSafely(level, pos, direction); } + @Override + public int getItemColor(final ItemStack stack, final int tintIndex) { + return ensureLoaded().getItemColor(stack, tintIndex); + } + private Platform ensureLoaded() { if (platform == null) { throw new IllegalStateException("Platform not loaded yet"); diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/RefinedStorageApiImpl.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/RefinedStorageApiImpl.java index 8a38b03fb..6e0c4ebc5 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/RefinedStorageApiImpl.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/RefinedStorageApiImpl.java @@ -11,6 +11,8 @@ import com.refinedmods.refinedstorage.api.network.security.SecurityPolicy; import com.refinedmods.refinedstorage.api.resource.ResourceKey; import com.refinedmods.refinedstorage.common.api.RefinedStorageApi; +import com.refinedmods.refinedstorage.common.api.autocrafting.Pattern; +import com.refinedmods.refinedstorage.common.api.autocrafting.PatternProviderItem; import com.refinedmods.refinedstorage.common.api.constructordestructor.ConstructorStrategyFactory; import com.refinedmods.refinedstorage.common.api.constructordestructor.DestructorStrategyFactory; import com.refinedmods.refinedstorage.common.api.exporter.ExporterTransferStrategyFactory; @@ -93,6 +95,7 @@ import java.util.PriorityQueue; import java.util.Queue; import java.util.Set; +import java.util.UUID; import java.util.stream.Collectors; import javax.annotation.Nullable; @@ -166,6 +169,7 @@ public class RefinedStorageApiImpl implements RefinedStorageApi { private final CompositeSlotReferenceProvider slotReferenceProvider = new CompositeSlotReferenceProvider(); private final PlatformRegistry permissionRegistry = new PlatformRegistryImpl<>(); private final List resourceExtractStrategies = new ArrayList<>(); + private final Map patternCache = new HashMap<>(); public RefinedStorageApiImpl() { gridSynchronizerRegistry.register(createIdentifier("off"), NoopGridSynchronizer.INSTANCE); @@ -573,4 +577,22 @@ public boolean canPlaceNetworkNode(final ServerPlayer player, } return true; } + + @Override + public Optional getPattern(final ItemStack stack, final Level level) { + if (patternCache.size() > 2000) { + patternCache.clear(); + } + if (!(stack.getItem() instanceof PatternProviderItem providerItem)) { + return Optional.empty(); + } + final UUID id = providerItem.getId(stack); + if (id == null) { + return Optional.empty(); + } + return Optional.ofNullable(patternCache.computeIfAbsent( + id, + i -> providerItem.getPattern(stack, level).orElse(null) + )); + } } diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/CraftingPatternClientTooltipComponent.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/CraftingPatternClientTooltipComponent.java new file mode 100644 index 000000000..04ea6397e --- /dev/null +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/CraftingPatternClientTooltipComponent.java @@ -0,0 +1,132 @@ +package com.refinedmods.refinedstorage.common.autocrafting; + +import com.refinedmods.refinedstorage.api.resource.ResourceAmount; +import com.refinedmods.refinedstorage.common.api.RefinedStorageApi; +import com.refinedmods.refinedstorage.common.api.autocrafting.CraftingPattern; +import com.refinedmods.refinedstorage.common.api.support.resource.PlatformResourceKey; +import com.refinedmods.refinedstorage.common.support.resource.ItemResource; + +import java.util.List; +import java.util.Objects; + +import net.minecraft.ChatFormatting; +import net.minecraft.client.gui.Font; +import net.minecraft.client.gui.GuiGraphics; +import net.minecraft.client.gui.screens.inventory.tooltip.ClientTooltipComponent; +import net.minecraft.network.chat.Component; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.item.ItemStack; + +import static com.refinedmods.refinedstorage.common.util.IdentifierUtil.createIdentifier; + +public class CraftingPatternClientTooltipComponent implements ClientTooltipComponent { + private static final long CYCLE_MS = 1000; + private static long cycleStart = 0; + private static int currentCycle = 0; + + private static final int ARROW_SPACING = 8; + + private static final ResourceLocation SLOT = createIdentifier("slot"); + private static final ResourceLocation LARGE_SLOT = createIdentifier("large_slot"); + private static final ResourceLocation ARROW = createIdentifier("light_arrow"); + private static final int ARROW_WIDTH = 22; + private static final int ARROW_HEIGHT = 15; + private static final int LARGE_SLOT_WIDTH = 26; + private static final int LARGE_SLOT_HEIGHT = 26; + + private final int width; + private final int height; + private final CraftingPattern craftingPattern; + + public CraftingPatternClientTooltipComponent(final int width, + final int height, + final CraftingPattern craftingPattern) { + this.width = width; + this.height = height; + this.craftingPattern = craftingPattern; + } + + @Override + public int getHeight() { + return 9 + 2 + height * 18 + 3; + } + + @Override + public int getWidth(final Font font) { + return (width * 18) + ARROW_SPACING + ARROW_WIDTH + ARROW_SPACING + LARGE_SLOT_WIDTH; + } + + @Override + public void renderImage(final Font font, final int x, final int y, final GuiGraphics graphics) { + final long now = System.currentTimeMillis(); + if (cycleStart == 0) { + cycleStart = now; + } + if (now - cycleStart >= CYCLE_MS) { + currentCycle++; + cycleStart = now; + } + if (craftingPattern.output().getResource() instanceof ItemResource itemResource) { + graphics.drawString( + font, + Component.literal(String.format("%dx ", craftingPattern.output().getAmount())) + .append(itemResource.toItemStack().getHoverName()) + .withStyle(ChatFormatting.GRAY), + x, + y, + Objects.requireNonNullElse(ChatFormatting.GRAY.getColor(), 15) + ); + } + renderInputSlots(x, y + 9 + 2, graphics); + renderArrow(x, y + 9 + 2, graphics); + renderResultSlot(font, x, y + 9 + 2, graphics); + } + + private void renderInputSlots(final int x, final int y, final GuiGraphics graphics) { + for (int sx = 0; sx < width; ++sx) { + for (int sy = 0; sy < height; ++sy) { + renderInputSlot(x, y, graphics, sx, sy); + } + } + } + + private void renderInputSlot(final int x, final int y, final GuiGraphics graphics, final int sx, final int sy) { + graphics.blitSprite(SLOT, x + sx * 18, y + sy * 18, 18, 18); + final int index = sy * width + sx; + final List inputs = craftingPattern.inputs().get(index); + if (!inputs.isEmpty()) { + final int idx = currentCycle % inputs.size(); + final PlatformResourceKey resource = inputs.get(idx); + RefinedStorageApi.INSTANCE.getResourceRendering(resource).render( + resource, + graphics, + x + sx * 18 + 1, + y + sy * 18 + 1 + ); + } + } + + private void renderArrow(final int x, final int y, final GuiGraphics graphics) { + graphics.blitSprite( + ARROW, + x + width * 18 + ARROW_SPACING, + y + ((height * 18) / 2) - (ARROW_HEIGHT / 2), + ARROW_WIDTH, + ARROW_HEIGHT + ); + } + + private void renderResultSlot(final Font font, final int x, final int y, final GuiGraphics graphics) { + final int slotX = x + width * 18 + ARROW_SPACING + ARROW_WIDTH + ARROW_SPACING; + final int slotY = y + ((height * 18) / 2) - (LARGE_SLOT_HEIGHT / 2); + graphics.blitSprite(LARGE_SLOT, slotX, slotY, LARGE_SLOT_WIDTH, LARGE_SLOT_HEIGHT); + final ResourceAmount output = craftingPattern.output(); + if (output.getResource() instanceof ItemResource itemResource) { + final ItemStack resultItemStack = itemResource.toItemStack(output.getAmount()); + final int stackX = slotX + 5; + final int stackY = slotY + 5; + graphics.renderItem(resultItemStack, stackX, stackY); + graphics.renderItemDecorations(font, resultItemStack, stackX, stackY); + } + } +} diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/CraftingPatternState.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/CraftingPatternState.java new file mode 100644 index 000000000..ad87c630b --- /dev/null +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/CraftingPatternState.java @@ -0,0 +1,52 @@ +package com.refinedmods.refinedstorage.common.autocrafting; + +import java.util.ArrayList; + +import com.mojang.serialization.Codec; +import com.mojang.serialization.codecs.RecordCodecBuilder; +import net.minecraft.network.RegistryFriendlyByteBuf; +import net.minecraft.network.codec.ByteBufCodecs; +import net.minecraft.network.codec.StreamCodec; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.crafting.CraftingInput; + +public record CraftingPatternState(boolean fuzzyMode, CraftingInput.Positioned input) { + private static final Codec INPUT_CODEC = RecordCodecBuilder.create(instance -> instance.group( + Codec.INT.fieldOf("width").forGetter(CraftingInput::width), + Codec.INT.fieldOf("height").forGetter(CraftingInput::height), + Codec.list(ItemStack.OPTIONAL_CODEC).fieldOf("items").forGetter(CraftingInput::items) + ).apply(instance, CraftingInput::of)); + + private static final Codec POSITIONED_INPUT_CODEC = + RecordCodecBuilder.create(instance -> instance.group( + INPUT_CODEC.fieldOf("input").forGetter(CraftingInput.Positioned::input), + Codec.INT.fieldOf("left").forGetter(CraftingInput.Positioned::left), + Codec.INT.fieldOf("top").forGetter(CraftingInput.Positioned::top) + ).apply(instance, CraftingInput.Positioned::new)); + + public static final Codec CODEC = RecordCodecBuilder.create(instance -> instance.group( + Codec.BOOL.fieldOf("fuzzyMode").forGetter(CraftingPatternState::fuzzyMode), + POSITIONED_INPUT_CODEC.fieldOf("input").forGetter(CraftingPatternState::input) + ).apply(instance, CraftingPatternState::new)); + + private static final StreamCodec INPUT_STREAM_CODEC = StreamCodec.composite( + ByteBufCodecs.INT, CraftingInput::width, + ByteBufCodecs.INT, CraftingInput::height, + ByteBufCodecs.collection(ArrayList::new, ItemStack.OPTIONAL_STREAM_CODEC), CraftingInput::items, + CraftingInput::of + ); + + private static final StreamCodec POSITIONED_INPUT_STREAM_CODEC = + StreamCodec.composite( + INPUT_STREAM_CODEC, CraftingInput.Positioned::input, + ByteBufCodecs.INT, CraftingInput.Positioned::left, + ByteBufCodecs.INT, CraftingInput.Positioned::top, + CraftingInput.Positioned::new + ); + + public static final StreamCodec STREAM_CODEC = StreamCodec.composite( + ByteBufCodecs.BOOL, CraftingPatternState::fuzzyMode, + POSITIONED_INPUT_STREAM_CODEC, CraftingPatternState::input, + CraftingPatternState::new + ); +} diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/PatternBlockEntityWithoutLevelRenderer.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/PatternBlockEntityWithoutLevelRenderer.java new file mode 100644 index 000000000..96cc22c72 --- /dev/null +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/PatternBlockEntityWithoutLevelRenderer.java @@ -0,0 +1,48 @@ +package com.refinedmods.refinedstorage.common.autocrafting; + +import javax.annotation.Nullable; + +import com.mojang.blaze3d.vertex.PoseStack; +import net.minecraft.client.Minecraft; +import net.minecraft.client.model.geom.EntityModelSet; +import net.minecraft.client.renderer.BlockEntityWithoutLevelRenderer; +import net.minecraft.client.renderer.MultiBufferSource; +import net.minecraft.client.renderer.blockentity.BlockEntityRenderDispatcher; +import net.minecraft.world.item.ItemDisplayContext; +import net.minecraft.world.item.ItemStack; + +public class PatternBlockEntityWithoutLevelRenderer extends BlockEntityWithoutLevelRenderer { + @Nullable + private static PatternBlockEntityWithoutLevelRenderer instance; + + private PatternBlockEntityWithoutLevelRenderer( + final BlockEntityRenderDispatcher blockEntityRenderDispatcher, + final EntityModelSet entityModelSet + ) { + super(blockEntityRenderDispatcher, entityModelSet); + } + + @Override + public void renderByItem(final ItemStack stack, + final ItemDisplayContext displayContext, + final PoseStack poseStack, + final MultiBufferSource buffer, + final int packedLight, + final int packedOverlay) { + if (PatternRendering.canDisplayOutput(stack)) { + PatternRendering.getOutput(stack).ifPresent( + output -> super.renderByItem(output, displayContext, poseStack, buffer, packedLight, packedOverlay) + ); + } + } + + public static PatternBlockEntityWithoutLevelRenderer getInstance() { + if (instance == null) { + instance = new PatternBlockEntityWithoutLevelRenderer( + Minecraft.getInstance().getBlockEntityRenderDispatcher(), + Minecraft.getInstance().getEntityModels() + ); + } + return instance; + } +} diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/PatternGridBlock.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/PatternGridBlock.java new file mode 100644 index 000000000..1315e9909 --- /dev/null +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/PatternGridBlock.java @@ -0,0 +1,62 @@ +package com.refinedmods.refinedstorage.common.autocrafting; + +import com.refinedmods.refinedstorage.common.content.BlockColorMap; +import com.refinedmods.refinedstorage.common.content.BlockEntities; +import com.refinedmods.refinedstorage.common.content.Blocks; +import com.refinedmods.refinedstorage.common.grid.AbstractGridBlock; +import com.refinedmods.refinedstorage.common.support.AbstractBlockEntityTicker; +import com.refinedmods.refinedstorage.common.support.BaseBlockItem; +import com.refinedmods.refinedstorage.common.support.BlockItemProvider; +import com.refinedmods.refinedstorage.common.support.NetworkNodeBlockItem; +import com.refinedmods.refinedstorage.common.support.network.NetworkNodeBlockEntityTicker; + +import javax.annotation.Nullable; + +import net.minecraft.core.BlockPos; +import net.minecraft.network.chat.Component; +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; + +import static com.refinedmods.refinedstorage.common.util.IdentifierUtil.createTranslation; + +public class PatternGridBlock extends AbstractGridBlock + implements BlockItemProvider { + private static final Component HELP = createTranslation("item", "pattern_grid.help"); + private static final AbstractBlockEntityTicker TICKER = new NetworkNodeBlockEntityTicker<>( + BlockEntities.INSTANCE::getPatternGrid, + ACTIVE + ); + + public PatternGridBlock(final DyeColor color, final MutableComponent name) { + super(name, color); + } + + @Override + public BlockColorMap getBlockColorMap() { + return Blocks.INSTANCE.getPatternGrid(); + } + + @Nullable + @Override + public BlockEntity newBlockEntity(final BlockPos pos, final BlockState state) { + return new PatternGridBlockEntity(pos, state); + } + + @Nullable + @Override + public BlockEntityTicker getTicker(final Level level, + final BlockState blockState, + final BlockEntityType type) { + return TICKER.get(level, type); + } + + @Override + public BaseBlockItem createBlockItem() { + return new NetworkNodeBlockItem(this, HELP); + } +} diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/PatternGridBlockEntity.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/PatternGridBlockEntity.java new file mode 100644 index 000000000..ccbe0ad0d --- /dev/null +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/PatternGridBlockEntity.java @@ -0,0 +1,251 @@ +package com.refinedmods.refinedstorage.common.autocrafting; + +import com.refinedmods.refinedstorage.common.Platform; +import com.refinedmods.refinedstorage.common.content.BlockEntities; +import com.refinedmods.refinedstorage.common.content.ContentNames; +import com.refinedmods.refinedstorage.common.content.DataComponents; +import com.refinedmods.refinedstorage.common.content.Items; +import com.refinedmods.refinedstorage.common.grid.AbstractGridBlockEntity; +import com.refinedmods.refinedstorage.common.grid.AbstractGridContainerMenu; +import com.refinedmods.refinedstorage.common.grid.CraftingState; +import com.refinedmods.refinedstorage.common.grid.GridData; +import com.refinedmods.refinedstorage.common.support.BlockEntityWithDrops; +import com.refinedmods.refinedstorage.common.support.CraftingMatrix; +import com.refinedmods.refinedstorage.common.support.FilteredContainer; +import com.refinedmods.refinedstorage.common.support.containermenu.NetworkNodeExtendedMenuProvider; +import com.refinedmods.refinedstorage.common.util.ContainerUtil; + +import java.util.UUID; +import javax.annotation.Nullable; + +import net.minecraft.core.BlockPos; +import net.minecraft.core.HolderLookup; +import net.minecraft.core.NonNullList; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.network.RegistryFriendlyByteBuf; +import net.minecraft.network.chat.Component; +import net.minecraft.network.codec.StreamEncoder; +import net.minecraft.world.entity.player.Inventory; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.inventory.ResultContainer; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.crafting.CraftingInput; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.state.BlockState; + +// TODO: servertest +// TODO: update changelog +// TODO: change "nbt" tooltips (en_us.json) +public class PatternGridBlockEntity extends AbstractGridBlockEntity implements BlockEntityWithDrops, + NetworkNodeExtendedMenuProvider { + private static final String TAG_PATTERN_INPUT = "pattern_input"; + private static final String TAG_PATTERN_OUTPUT = "pattern_output"; + private static final String TAG_FUZZY_MODE = "fuzzy_mode"; + private static final String TAG_PATTERN_TYPE = "processing"; + + private final CraftingState craftingState = new CraftingState(this::setChanged, this::getLevel); + private final FilteredContainer patternInput = new FilteredContainer(1, PatternGridBlockEntity::isValidPattern); + private final FilteredContainer patternOutput = new PatternOutputContainer(); + private boolean fuzzyMode; + private PatternType patternType = PatternType.CRAFTING; + + public PatternGridBlockEntity(final BlockPos pos, final BlockState state) { + super( + BlockEntities.INSTANCE.getPatternGrid(), + pos, + state, + Platform.INSTANCE.getConfig().getPatternGrid().getEnergyUsage() + ); + patternInput.addListener(container -> setChanged()); + patternOutput.addListener(container -> setChanged()); + } + + CraftingMatrix getCraftingMatrix() { + return craftingState.getCraftingMatrix(); + } + + ResultContainer getCraftingResult() { + return craftingState.getCraftingResult(); + } + + FilteredContainer getPatternInput() { + return patternInput; + } + + FilteredContainer getPatternOutput() { + return patternOutput; + } + + @Override + public void saveAdditional(final CompoundTag tag, final HolderLookup.Provider provider) { + super.saveAdditional(tag, provider); + tag.put(TAG_PATTERN_INPUT, ContainerUtil.write(patternInput, provider)); + tag.put(TAG_PATTERN_OUTPUT, ContainerUtil.write(patternOutput, provider)); + tag.putBoolean(TAG_FUZZY_MODE, fuzzyMode); + tag.putInt(TAG_PATTERN_TYPE, PatternTypeSettings.getPatternType(patternType)); + craftingState.writeToTag(tag, provider); + } + + @Override + public void loadAdditional(final CompoundTag tag, final HolderLookup.Provider provider) { + super.loadAdditional(tag, provider); + if (tag.contains(TAG_PATTERN_INPUT)) { + ContainerUtil.read(tag.getCompound(TAG_PATTERN_INPUT), patternInput, provider); + } + if (tag.contains(TAG_PATTERN_OUTPUT)) { + ContainerUtil.read(tag.getCompound(TAG_PATTERN_OUTPUT), patternOutput, provider); + } + fuzzyMode = tag.getBoolean(TAG_FUZZY_MODE); + patternType = PatternTypeSettings.getPatternType(tag.getInt(TAG_PATTERN_TYPE)); + craftingState.readFromTag(tag, provider); + } + + @Override + public void setLevel(final Level level) { + super.setLevel(level); + craftingState.updateResult(level); + } + + boolean isFuzzyMode() { + return fuzzyMode; + } + + PatternType getPatternType() { + return patternType; + } + + void setFuzzyMode(final boolean fuzzyMode) { + this.fuzzyMode = fuzzyMode; + setChanged(); + } + + void setPatternType(final PatternType patternType) { + this.patternType = patternType; + setChanged(); + } + + @Override + public Component getDisplayName() { + return ContentNames.PATTERN_GRID; + } + + @Override + @Nullable + public AbstractGridContainerMenu createMenu(final int syncId, final Inventory inventory, final Player player) { + return new PatternGridContainerMenu(syncId, inventory, this); + } + + @Override + public PatternGridData getMenuData() { + return new PatternGridData(GridData.of(this), patternType); + } + + @Override + public StreamEncoder getMenuCodec() { + return PatternGridData.STREAM_CODEC; + } + + @Override + public NonNullList getDrops() { + final NonNullList drops = NonNullList.create(); + drops.add(patternInput.getItem(0)); + drops.add(patternOutput.getItem(0)); + for (int i = 0; i < craftingState.getCraftingMatrix().getContainerSize(); ++i) { + drops.add(craftingState.getCraftingMatrix().getItem(i)); + } + return drops; + } + + void clear() { + if (level == null) { + return; + } + craftingState.getCraftingMatrix().clearContent(); + craftingState.updateResult(level); + } + + void createPattern() { + if (level == null || !isPatternAvailable()) { + return; + } + final ItemStack result = switch (patternType) { + case CRAFTING -> createCraftingPattern(); + default -> null; + }; + if (result != null) { + final boolean shouldExtractInputPattern = patternOutput.getItem(0).isEmpty(); + if (shouldExtractInputPattern) { + patternInput.removeItem(0, 1); + } + patternOutput.setItem(0, result); + } + } + + void copyPattern(final ItemStack stack) { + final PatternState state = stack.get(DataComponents.INSTANCE.getPatternState()); + if (state == null) { + return; + } + this.patternType = state.type(); + switch (state.type()) { + case CRAFTING -> { + final CraftingPatternState patternCraftingState = stack.get( + DataComponents.INSTANCE.getCraftingPatternState() + ); + if (patternCraftingState == null) { + return; + } + copyCraftingPattern(patternCraftingState); + } + } + setChanged(); + } + + private void copyCraftingPattern(final CraftingPatternState state) { + this.fuzzyMode = state.fuzzyMode(); + craftingState.getCraftingMatrix().clearContent(); + final CraftingInput.Positioned positionedInput = state.input(); + final int left = positionedInput.left(); + final int top = positionedInput.top(); + final CraftingInput input = positionedInput.input(); + for (int x = 0; x < input.width(); ++x) { + for (int y = 0; y < input.height(); ++y) { + final int matrixIndex = x + left + (y + top) * craftingState.getCraftingMatrix().getWidth(); + final int recipeIndex = x + y * input.width(); + final ItemStack stack = input.getItem(recipeIndex); + craftingState.getCraftingMatrix().setItem(matrixIndex, stack); + } + } + if (level != null) { + craftingState.updateResult(level); + } + } + + @Nullable + private ItemStack createCraftingPattern() { + if (!craftingState.hasCraftingResult()) { + return null; + } + final boolean shouldExtractInputPattern = patternOutput.getItem(0).isEmpty(); + if (shouldExtractInputPattern) { + patternInput.removeItem(0, 1); + } + final ItemStack result = new ItemStack(Items.INSTANCE.getPattern()); + final PatternState patternState = new PatternState(UUID.randomUUID(), PatternType.CRAFTING); + result.set(DataComponents.INSTANCE.getPatternState(), patternState); + final CraftingPatternState patternCraftingState = new CraftingPatternState( + fuzzyMode, + getCraftingMatrix().asPositionedCraftInput() + ); + result.set(DataComponents.INSTANCE.getCraftingPatternState(), patternCraftingState); + return result; + } + + private boolean isPatternAvailable() { + return !patternInput.getItem(0).isEmpty() || !patternOutput.getItem(0).isEmpty(); + } + + static boolean isValidPattern(final ItemStack stack) { + return stack.getItem() instanceof PatternItem; + } +} diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/PatternGridContainerMenu.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/PatternGridContainerMenu.java new file mode 100644 index 000000000..11b4193e5 --- /dev/null +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/PatternGridContainerMenu.java @@ -0,0 +1,221 @@ +package com.refinedmods.refinedstorage.common.autocrafting; + +import com.refinedmods.refinedstorage.common.content.Menus; +import com.refinedmods.refinedstorage.common.grid.AbstractGridContainerMenu; +import com.refinedmods.refinedstorage.common.support.CraftingMatrix; +import com.refinedmods.refinedstorage.common.support.FilteredContainer; +import com.refinedmods.refinedstorage.common.support.RedstoneMode; +import com.refinedmods.refinedstorage.common.support.containermenu.ClientProperty; +import com.refinedmods.refinedstorage.common.support.containermenu.DisabledSlot; +import com.refinedmods.refinedstorage.common.support.containermenu.FilterSlot; +import com.refinedmods.refinedstorage.common.support.containermenu.PropertyTypes; +import com.refinedmods.refinedstorage.common.support.containermenu.ServerProperty; +import com.refinedmods.refinedstorage.common.support.containermenu.ValidatedSlot; +import com.refinedmods.refinedstorage.common.support.packet.c2s.C2SPackets; + +import javax.annotation.Nullable; + +import net.minecraft.world.Container; +import net.minecraft.world.entity.player.Inventory; +import net.minecraft.world.inventory.ResultContainer; +import net.minecraft.world.item.ItemStack; + +public class PatternGridContainerMenu extends AbstractGridContainerMenu { + private static final int Y_OFFSET_BETWEEN_PLAYER_INVENTORY_AND_PATTERN_INPUT_SLOT = 81; + private static final int SPACING_BETWEEN_PATTERN_INPUT_AND_PATTERN_OUTPUT_SLOTS = 36; + private static final int Y_OFFSET_BETWEEN_PLAYER_INVENTORY_AND_FIRST_CRAFTING_MATRIX_SLOT = 86; + + private final Container patternInput; + private final Container patternOutput; + private final Container craftingMatrix; + private final Container craftingResult; + + @Nullable + private PatternGridListener listener; + @Nullable + private PatternGridBlockEntity patternGrid; + + public PatternGridContainerMenu(final int syncId, + final Inventory playerInventory, + final PatternGridData patternGridData) { + super(Menus.INSTANCE.getPatternGrid(), syncId, playerInventory, patternGridData.gridData()); + this.patternInput = new FilteredContainer(1, PatternGridBlockEntity::isValidPattern); + this.patternOutput = new PatternOutputContainer(); + this.craftingMatrix = new CraftingMatrix(null, 3, 3); + this.craftingResult = new ResultContainer(); + onScreenReady(0); + registerProperty(new ClientProperty<>(PropertyTypes.REDSTONE_MODE, RedstoneMode.IGNORE)); + registerProperty(new ClientProperty<>(PatternGridPropertyTypes.PATTERN_TYPE, patternGridData.patternType()) { + @Override + protected void onChangedOnClient(final PatternType newValue) { + super.onChangedOnClient(newValue); + if (listener != null) { + listener.patternTypeChanged(newValue); + } + } + }); + registerProperty(new ClientProperty<>(PropertyTypes.FUZZY_MODE, false) { + @Override + protected void onChangedOnClient(final Boolean newValue) { + super.onChangedOnClient(newValue); + if (listener != null) { + listener.fuzzyModeChanged(newValue); + } + } + }); + } + + PatternGridContainerMenu(final int syncId, + final Inventory playerInventory, + final PatternGridBlockEntity grid) { + super(Menus.INSTANCE.getPatternGrid(), syncId, playerInventory, grid); + this.patternInput = grid.getPatternInput(); + this.patternOutput = grid.getPatternOutput(); + this.craftingMatrix = grid.getCraftingMatrix(); + this.craftingResult = grid.getCraftingResult(); + this.patternGrid = grid; + onScreenReady(0); + registerProperty(new ServerProperty<>( + PropertyTypes.REDSTONE_MODE, + grid::getRedstoneMode, + grid::setRedstoneMode + )); + registerProperty(new ServerProperty<>( + PatternGridPropertyTypes.PATTERN_TYPE, + grid::getPatternType, + grid::setPatternType + )); + registerProperty(new ServerProperty<>( + PropertyTypes.FUZZY_MODE, + grid::isFuzzyMode, + grid::setFuzzyMode + )); + } + + void setListener(final PatternGridListener listener) { + this.listener = listener; + } + + PatternType getPatternType() { + return getProperty(PatternGridPropertyTypes.PATTERN_TYPE).getValue(); + } + + void setPatternType(final PatternType patternType) { + getProperty(PatternGridPropertyTypes.PATTERN_TYPE).setValue(patternType); + } + + boolean isFuzzyMode() { + return Boolean.TRUE.equals(getProperty(PropertyTypes.FUZZY_MODE).getValue()); + } + + void setFuzzyMode(final boolean fuzzyMode) { + getProperty(PropertyTypes.FUZZY_MODE).setValue(fuzzyMode); + } + + boolean canCreatePattern() { + if (patternInput.getItem(0).isEmpty() && patternOutput.getItem(0).isEmpty()) { + return false; + } + return switch (getPatternType()) { + case CRAFTING -> !craftingResult.getItem(0).isEmpty(); + default -> false; + }; + } + + @Override + public void onScreenReady(final int playerInventoryY) { + super.onScreenReady(playerInventoryY); + transferManager.clear(); + addPatternSlots(playerInventoryY); + addCraftingMatrixSlots(playerInventoryY); + } + + private void addPatternSlots(final int playerInventoryY) { + addSlot(new ValidatedSlot( + patternInput, + 0, + 152, + playerInventoryY - Y_OFFSET_BETWEEN_PLAYER_INVENTORY_AND_PATTERN_INPUT_SLOT, + PatternGridBlockEntity::isValidPattern + )); + addSlot(new ValidatedSlot( + patternOutput, + 0, + 152, + playerInventoryY + - Y_OFFSET_BETWEEN_PLAYER_INVENTORY_AND_PATTERN_INPUT_SLOT + + SPACING_BETWEEN_PATTERN_INPUT_AND_PATTERN_OUTPUT_SLOTS, + PatternGridBlockEntity::isValidPattern + ) { + @Override + public boolean mayPlace(final ItemStack stack) { + return patternOutput.canPlaceItem(0, stack); + } + + @Override + public void set(final ItemStack stack) { + super.set(stack); + if (patternGrid != null && !stack.isEmpty()) { + patternGrid.copyPattern(stack); + } + } + }); + transferManager.addBiTransfer(playerInventory, patternInput); + transferManager.addTransfer(patternOutput, playerInventory); + } + + private void addCraftingMatrixSlots(final int playerInventoryY) { + for (int y = 0; y < 3; ++y) { + for (int x = 0; x < 3; ++x) { + final int slotX = 12 + ((x % 3) * 18); + final int slotY = playerInventoryY + - Y_OFFSET_BETWEEN_PLAYER_INVENTORY_AND_FIRST_CRAFTING_MATRIX_SLOT + + ((y % 3) * 18); + addSlot(new FilterSlot(craftingMatrix, x + y * 3, slotX, slotY) { + @Override + public boolean isActive() { + return getPatternType() == PatternType.CRAFTING; + } + }); + } + } + // TODO: other fuzzy mode tooltips are wrong? + addSlot(new DisabledSlot( + craftingResult, + 0, + 116 + 4, + playerInventoryY - Y_OFFSET_BETWEEN_PLAYER_INVENTORY_AND_FIRST_CRAFTING_MATRIX_SLOT + 18 + ) { + @Override + public boolean isActive() { + return getPatternType() == PatternType.CRAFTING; + } + }); + } + + public void clear() { + if (patternGrid != null) { + patternGrid.clear(); + } + } + + void sendClear() { + C2SPackets.sendPatternGridClear(); + } + + public void createPattern() { + if (patternGrid != null) { + patternGrid.createPattern(); + } + } + + void sendCreatePattern() { + C2SPackets.sendPatternGridCreatePattern(); + } + + interface PatternGridListener { + void patternTypeChanged(PatternType value); + + void fuzzyModeChanged(boolean value); + } +} diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/PatternGridData.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/PatternGridData.java new file mode 100644 index 000000000..a04c8c6e7 --- /dev/null +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/PatternGridData.java @@ -0,0 +1,15 @@ +package com.refinedmods.refinedstorage.common.autocrafting; + +import com.refinedmods.refinedstorage.common.grid.GridData; +import com.refinedmods.refinedstorage.common.util.PacketUtil; + +import net.minecraft.network.RegistryFriendlyByteBuf; +import net.minecraft.network.codec.StreamCodec; + +public record PatternGridData(GridData gridData, PatternType patternType) { + public static final StreamCodec STREAM_CODEC = StreamCodec.composite( + GridData.STREAM_CODEC, PatternGridData::gridData, + PacketUtil.enumStreamCodec(PatternType.values()), PatternGridData::patternType, + PatternGridData::new + ); +} diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/PatternGridPropertyTypes.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/PatternGridPropertyTypes.java new file mode 100644 index 000000000..513cb0552 --- /dev/null +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/PatternGridPropertyTypes.java @@ -0,0 +1,16 @@ +package com.refinedmods.refinedstorage.common.autocrafting; + +import com.refinedmods.refinedstorage.common.support.containermenu.PropertyType; + +import static com.refinedmods.refinedstorage.common.util.IdentifierUtil.createIdentifier; + +final class PatternGridPropertyTypes { + static final PropertyType PATTERN_TYPE = new PropertyType<>( + createIdentifier("pattern_type"), + PatternTypeSettings::getPatternType, + PatternTypeSettings::getPatternType + ); + + private PatternGridPropertyTypes() { + } +} diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/PatternGridScreen.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/PatternGridScreen.java new file mode 100644 index 000000000..522c1b84c --- /dev/null +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/PatternGridScreen.java @@ -0,0 +1,174 @@ +package com.refinedmods.refinedstorage.common.autocrafting; + +import com.refinedmods.refinedstorage.common.grid.screen.AbstractGridScreen; +import com.refinedmods.refinedstorage.common.support.widget.CustomCheckboxWidget; +import com.refinedmods.refinedstorage.common.support.widget.HoveredImageButton; + +import java.util.HashMap; +import java.util.Map; +import javax.annotation.Nullable; + +import net.minecraft.client.gui.GuiGraphics; +import net.minecraft.client.gui.components.Button; +import net.minecraft.client.gui.components.ImageButton; +import net.minecraft.client.gui.components.Tooltip; +import net.minecraft.client.gui.components.WidgetSprites; +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 static com.refinedmods.refinedstorage.common.util.IdentifierUtil.createIdentifier; +import static com.refinedmods.refinedstorage.common.util.IdentifierUtil.createTranslation; + +public class PatternGridScreen extends AbstractGridScreen { + private static final ResourceLocation TEXTURE = createIdentifier("textures/gui/pattern_grid.png"); + private static final MutableComponent CREATE_PATTERN = createTranslation("gui", "pattern_grid.create_pattern"); + private static final MutableComponent CLEAR = createTranslation("gui", "pattern_grid.clear"); + private static final MutableComponent FUZZY_MODE = createTranslation("gui", "pattern_grid.fuzzy_mode"); + private static final MutableComponent FUZZY_MODE_ON_HELP = + createTranslation("gui", "pattern_grid.fuzzy_mode.on.help"); + private static final MutableComponent FUZZY_MODE_OFF_HELP = + createTranslation("gui", "pattern_grid.fuzzy_mode.off.help"); + private static final int CREATE_PATTERN_BUTTON_SIZE = 16; + + private static final WidgetSprites CREATE_PATTERN_BUTTON_SPRITES = new WidgetSprites( + createIdentifier("widget/create_pattern"), + createIdentifier("widget/create_pattern_disabled"), + createIdentifier("widget/create_pattern_focused"), + createIdentifier("widget/create_pattern_disabled") + ); + private static final WidgetSprites CLEAR_BUTTON_SPRITES = new WidgetSprites( + createIdentifier("widget/clear"), + createIdentifier("widget/clear_disabled"), + createIdentifier("widget/clear_focused"), + createIdentifier("widget/clear_disabled") + ); + private static final ResourceLocation CRAFTING = createIdentifier("pattern_grid/crafting"); + + @Nullable + private Button createPatternButton; + + private final Map patternTypeButtons = new HashMap<>(); + + public PatternGridScreen(final PatternGridContainerMenu menu, final Inventory inventory, final Component title) { + super(menu, inventory, title, 177); + this.inventoryLabelY = 153; + this.imageWidth = 193; + this.imageHeight = 250; + } + + @Override + protected void init() { + super.init(); + createPatternButton = createCreatePatternButton(leftPos + 152, topPos + imageHeight - bottomHeight + 32); + addRenderableWidget(createPatternButton); + final ImageButton clearButton = createClearButton(leftPos + 68, topPos + imageHeight - bottomHeight + 8); + addRenderableWidget(clearButton); + addPatternTypeButtons(getMenu().getPatternType()); + final CustomCheckboxWidget fuzzyMode = createFuzzyModeCheckbox(); + addRenderableWidget(fuzzyMode); + menu.setListener(new PatternGridContainerMenu.PatternGridListener() { + @Override + public void patternTypeChanged(final PatternType value) { + patternTypeButtons.values().forEach(button -> button.setSelected(false)); + patternTypeButtons.get(value).setSelected(true); + fuzzyMode.visible = value == PatternType.CRAFTING; + clearButton.visible = value == PatternType.CRAFTING; + } + + @Override + public void fuzzyModeChanged(final boolean value) { + fuzzyMode.setSelected(value); + fuzzyMode.setTooltip(getFuzzyModeTooltip(value)); + } + }); + } + + private void addPatternTypeButtons(final PatternType currentPatternType) { + final PatternType[] patternTypes = PatternType.values(); + for (int i = 0; i < patternTypes.length; ++i) { + final PatternType patternType = patternTypes[i]; + final PatternTypeButton button = new PatternTypeButton( + leftPos + 172, + topPos + imageHeight - bottomHeight + 4 + (i * (16 + 3)), + btn -> getMenu().setPatternType(patternType), + patternType, + patternType == currentPatternType + ); + patternTypeButtons.put(patternType, button); + addRenderableWidget(button); + } + } + + @Override + protected void containerTick() { + super.containerTick(); + if (createPatternButton != null) { + createPatternButton.active = getMenu().canCreatePattern(); + } + } + + private CustomCheckboxWidget createFuzzyModeCheckbox() { + final CustomCheckboxWidget fuzzyMode = new CustomCheckboxWidget( + leftPos + 11, + topPos + imageHeight - bottomHeight + 65, + FUZZY_MODE, + font, + getMenu().isFuzzyMode(), + CustomCheckboxWidget.Size.SMALL + ); + fuzzyMode.setOnPressed((checkbox, selected) -> getMenu().setFuzzyMode(selected)); + fuzzyMode.setTooltip(getFuzzyModeTooltip(getMenu().isFuzzyMode())); + fuzzyMode.visible = getMenu().getPatternType() == PatternType.CRAFTING; + return fuzzyMode; + } + + private static Tooltip getFuzzyModeTooltip(final boolean fuzzyMode) { + return fuzzyMode ? Tooltip.create(FUZZY_MODE_ON_HELP) : Tooltip.create(FUZZY_MODE_OFF_HELP); + } + + private ImageButton createCreatePatternButton(final int x, final int y) { + final HoveredImageButton button = new HoveredImageButton( + x, + y, + CREATE_PATTERN_BUTTON_SIZE, + CREATE_PATTERN_BUTTON_SIZE, + CREATE_PATTERN_BUTTON_SPRITES, + b -> getMenu().sendCreatePattern(), + CREATE_PATTERN + ); + button.setTooltip(Tooltip.create(CREATE_PATTERN)); + button.active = getMenu().canCreatePattern(); + return button; + } + + private ImageButton createClearButton(final int x, final int y) { + final HoveredImageButton button = new HoveredImageButton( + x, + y, + CLEAR_BUTTON_SIZE, + CLEAR_BUTTON_SIZE, + CLEAR_BUTTON_SPRITES, + b -> getMenu().sendClear(), + CLEAR + ); + button.setTooltip(Tooltip.create(CLEAR)); + button.visible = getMenu().getPatternType() == PatternType.CRAFTING; + return button; + } + + @Override + protected void renderBg(final GuiGraphics graphics, final float delta, final int mouseX, final int mouseY) { + super.renderBg(graphics, delta, mouseX, mouseY); + switch (getMenu().getPatternType()) { + case CRAFTING -> + graphics.blitSprite(CRAFTING, leftPos + 7 + 4, topPos + imageHeight - bottomHeight + 4 + 4, 130, 54); + } + } + + @Override + protected ResourceLocation getTexture() { + return TEXTURE; + } +} diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/PatternItem.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/PatternItem.java new file mode 100644 index 000000000..4fbe8fc75 --- /dev/null +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/PatternItem.java @@ -0,0 +1,220 @@ +package com.refinedmods.refinedstorage.common.autocrafting; + +import com.refinedmods.refinedstorage.api.resource.ResourceAmount; +import com.refinedmods.refinedstorage.common.api.RefinedStorageApi; +import com.refinedmods.refinedstorage.common.api.autocrafting.CraftingPattern; +import com.refinedmods.refinedstorage.common.api.autocrafting.Pattern; +import com.refinedmods.refinedstorage.common.api.autocrafting.PatternProviderItem; +import com.refinedmods.refinedstorage.common.api.support.HelpTooltipComponent; +import com.refinedmods.refinedstorage.common.api.support.resource.PlatformResourceKey; +import com.refinedmods.refinedstorage.common.content.DataComponents; +import com.refinedmods.refinedstorage.common.content.Items; +import com.refinedmods.refinedstorage.common.support.CraftingMatrix; +import com.refinedmods.refinedstorage.common.support.resource.ItemResource; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Optional; +import java.util.UUID; +import javax.annotation.Nullable; + +import net.minecraft.ChatFormatting; +import net.minecraft.client.Minecraft; +import net.minecraft.network.chat.Component; +import net.minecraft.network.chat.MutableComponent; +import net.minecraft.world.InteractionHand; +import net.minecraft.world.InteractionResult; +import net.minecraft.world.InteractionResultHolder; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.inventory.tooltip.TooltipComponent; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.TooltipFlag; +import net.minecraft.world.item.crafting.CraftingInput; +import net.minecraft.world.item.crafting.CraftingRecipe; +import net.minecraft.world.item.crafting.RecipeHolder; +import net.minecraft.world.item.crafting.RecipeType; +import net.minecraft.world.level.Level; + +import static com.refinedmods.refinedstorage.common.util.IdentifierUtil.createTranslation; +import static com.refinedmods.refinedstorage.common.util.IdentifierUtil.createTranslationKey; + +public class PatternItem extends Item implements PatternProviderItem { + private static final Component HELP = createTranslation("item", "pattern.help"); + private static final MutableComponent FUZZY_MODE = createTranslation("item", "pattern.fuzzy_mode") + .withStyle(ChatFormatting.YELLOW); + + public PatternItem() { + super(new Item.Properties()); + } + + @Override + public String getDescriptionId(final ItemStack stack) { + final PatternState state = stack.get(DataComponents.INSTANCE.getPatternState()); + if (state != null) { + return createTranslationKey("misc", "pattern." + state.type().getSerializedName()); + } + return super.getDescriptionId(stack); + } + + @Override + public void appendHoverText(final ItemStack stack, + final TooltipContext context, + final List lines, + final TooltipFlag tooltipFlag) { + super.appendHoverText(stack, context, lines, tooltipFlag); + final PatternState state = stack.get(DataComponents.INSTANCE.getPatternState()); + if (state == null) { + return; + } + final CraftingPatternState craftingState = stack.get(DataComponents.INSTANCE.getCraftingPatternState()); + if (craftingState != null && craftingState.fuzzyMode()) { + lines.add(FUZZY_MODE); + } + } + + boolean hasMapping(final ItemStack stack) { + return stack.has(DataComponents.INSTANCE.getPatternState()); + } + + @Override + public Optional getTooltipImage(final ItemStack stack) { + final PatternState state = stack.get(DataComponents.INSTANCE.getPatternState()); + if (state == null) { + return Optional.of(new HelpTooltipComponent(HELP)); + } + return switch (state.type()) { + case CRAFTING -> { + final CraftingPatternState craftingState = stack.get(DataComponents.INSTANCE.getCraftingPatternState()); + final Level level = Minecraft.getInstance().level; + if (craftingState == null || level == null) { + yield Optional.empty(); + } + yield RefinedStorageApi.INSTANCE.getPattern(stack, level) + .filter(CraftingPattern.class::isInstance) + .map(CraftingPattern.class::cast) + .map(craftingPattern -> new CraftingPatternTooltipComponent( + HELP, + craftingPattern, + craftingState.input().input().width(), + craftingState.input().input().height() + )); + } + default -> Optional.empty(); + }; + } + + @Nullable + @Override + public UUID getId(final ItemStack stack) { + final PatternState state = stack.get(DataComponents.INSTANCE.getPatternState()); + if (state == null) { + return null; + } + return state.id(); + } + + @Override + public Optional getPattern(final ItemStack stack, final Level level) { + final PatternState state = stack.get(DataComponents.INSTANCE.getPatternState()); + if (state == null) { + return Optional.empty(); + } + return switch (state.type()) { + case CRAFTING -> getCraftingPattern(stack, level); + default -> Optional.empty(); + }; + } + + private Optional getCraftingPattern(final ItemStack stack, final Level level) { + final CraftingPatternState craftingState = stack.get(DataComponents.INSTANCE.getCraftingPatternState()); + if (craftingState == null) { + return Optional.empty(); + } + return getCraftingPattern(level, craftingState); + } + + private Optional getCraftingPattern(final Level level, final CraftingPatternState state) { + final CraftingMatrix craftingMatrix = getFilledCraftingMatrix(state); + final CraftingInput.Positioned positionedCraftingInput = craftingMatrix.asPositionedCraftInput(); + final CraftingInput craftingInput = positionedCraftingInput.input(); + return level.getRecipeManager() + .getRecipeFor(RecipeType.CRAFTING, craftingInput, level) + .map(RecipeHolder::value) + .map(recipe -> toCraftingPattern(level, recipe, craftingInput, state)); + } + + private CraftingMatrix getFilledCraftingMatrix(final CraftingPatternState state) { + final CraftingInput.Positioned positionedInput = state.input(); + final CraftingInput input = positionedInput.input(); + final CraftingMatrix craftingMatrix = new CraftingMatrix(null, input.width(), input.height()); + for (int i = 0; i < input.size(); ++i) { + craftingMatrix.setItem(i, input.getItem(i)); + } + return craftingMatrix; + } + + private CraftingPattern toCraftingPattern(final Level level, + final CraftingRecipe recipe, + final CraftingInput craftingInput, + final CraftingPatternState state) { + final List> inputs = getInputs(recipe, state); + final ResourceAmount output = getOutput(level, recipe, craftingInput); + final List byproducts = getByproducts(recipe, craftingInput); + return new CraftingPattern(inputs, output, byproducts); + } + + private List> getInputs(final CraftingRecipe recipe, final CraftingPatternState state) { + final List> inputs = new ArrayList<>(); + for (int i = 0; i < state.input().input().size(); ++i) { + final ItemStack input = state.input().input().getItem(i); + if (input.isEmpty()) { + inputs.add(Collections.emptyList()); + } else if (state.fuzzyMode() && i < recipe.getIngredients().size()) { + final ItemStack[] ingredients = recipe.getIngredients().get(i).getItems(); + inputs.add(Arrays.stream(ingredients) + .map(item -> (PlatformResourceKey) ItemResource.ofItemStack(item)) + .toList()); + } else { + inputs.add(List.of(ItemResource.ofItemStack(input))); + } + } + return inputs; + } + + private ResourceAmount getOutput(final Level level, + final CraftingRecipe recipe, + final CraftingInput craftingInput) { + final ItemStack outputStack = recipe.assemble(craftingInput, level.registryAccess()); + return new ResourceAmount(ItemResource.ofItemStack(outputStack), outputStack.getCount()); + } + + private List getByproducts(final CraftingRecipe recipe, final CraftingInput craftingInput) { + return recipe.getRemainingItems(craftingInput) + .stream() + .filter(byproduct -> !byproduct.isEmpty()) + .map(byproduct -> new ResourceAmount(ItemResource.ofItemStack(byproduct), byproduct.getCount())) + .toList(); + } + + @Override + public InteractionResultHolder use(final Level level, final Player player, final InteractionHand hand) { + final ItemStack stack = player.getItemInHand(hand); + if (!level.isClientSide() && player.isCrouching()) { + return new InteractionResultHolder<>( + InteractionResult.CONSUME, + new ItemStack(Items.INSTANCE.getPattern(), stack.getCount()) + ); + } + return new InteractionResultHolder<>(InteractionResult.PASS, stack); + } + + public record CraftingPatternTooltipComponent(Component helpText, + CraftingPattern craftingPattern, + int width, + int height) + implements TooltipComponent { + } +} diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/PatternItemColor.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/PatternItemColor.java new file mode 100644 index 000000000..31a82255c --- /dev/null +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/PatternItemColor.java @@ -0,0 +1,18 @@ +package com.refinedmods.refinedstorage.common.autocrafting; + +import com.refinedmods.refinedstorage.common.Platform; + +import net.minecraft.client.color.item.ItemColor; +import net.minecraft.world.item.ItemStack; + +public class PatternItemColor implements ItemColor { + @Override + public int getColor(final ItemStack stack, final int tintIndex) { + if (PatternRendering.canDisplayOutput(stack)) { + return PatternRendering.getOutput(stack).map( + output -> Platform.INSTANCE.getItemColor(output, tintIndex) + ).orElse(-1); + } + return -1; + } +} diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/PatternItemOverrides.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/PatternItemOverrides.java new file mode 100644 index 000000000..faf433d82 --- /dev/null +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/PatternItemOverrides.java @@ -0,0 +1,57 @@ +package com.refinedmods.refinedstorage.common.autocrafting; + +import com.refinedmods.refinedstorage.common.content.DataComponents; + +import java.util.List; +import java.util.Optional; +import javax.annotation.Nullable; + +import net.minecraft.client.Minecraft; +import net.minecraft.client.multiplayer.ClientLevel; +import net.minecraft.client.renderer.block.model.ItemOverrides; +import net.minecraft.client.resources.model.BakedModel; +import net.minecraft.client.resources.model.ModelBaker; +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.item.ItemStack; + +public class PatternItemOverrides extends ItemOverrides { + private final BakedModel emptyModel; + private final BakedModel craftingModel; + + @SuppressWarnings({"DataFlowIssue"}) // null is allowed as long as we don't pass overrides + public PatternItemOverrides(final ModelBaker modelBaker, + final BakedModel emptyModel, + final BakedModel craftingModel) { + super(modelBaker, null, List.of()); + this.emptyModel = emptyModel; + this.craftingModel = craftingModel; + } + + @Override + public BakedModel resolve(final BakedModel model, + final ItemStack stack, + @Nullable final ClientLevel level, + @Nullable final LivingEntity entity, + final int seed) { + final PatternState state = stack.get(DataComponents.INSTANCE.getPatternState()); + if (state == null) { + return emptyModel; + } + if (state.type() == PatternType.CRAFTING) { + return getCraftingOutputModel(stack, level, entity, seed).orElse(craftingModel); + } + return emptyModel; + } + + private Optional getCraftingOutputModel(final ItemStack stack, + @Nullable final ClientLevel level, + @Nullable final LivingEntity entity, + final int seed) { + if (PatternRendering.canDisplayOutput(stack)) { + return PatternRendering.getOutput(stack).map( + output -> Minecraft.getInstance().getItemRenderer().getModel(output, level, entity, seed) + ); + } + return Optional.empty(); + } +} diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/PatternOutputContainer.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/PatternOutputContainer.java new file mode 100644 index 000000000..8a83d878a --- /dev/null +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/PatternOutputContainer.java @@ -0,0 +1,21 @@ +package com.refinedmods.refinedstorage.common.autocrafting; + +import com.refinedmods.refinedstorage.common.support.FilteredContainer; + +import net.minecraft.world.item.ItemStack; + +class PatternOutputContainer extends FilteredContainer { + PatternOutputContainer() { + super(1, PatternGridBlockEntity::isValidPattern); + } + + @Override + public int getMaxStackSize() { + return 1; + } + + @Override + public boolean canPlaceItem(final int slot, final ItemStack stack) { + return stack.getItem() instanceof PatternItem patternItem && patternItem.hasMapping(stack); + } +} diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/PatternRendering.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/PatternRendering.java new file mode 100644 index 000000000..15f287ab8 --- /dev/null +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/PatternRendering.java @@ -0,0 +1,38 @@ +package com.refinedmods.refinedstorage.common.autocrafting; + +import com.refinedmods.refinedstorage.api.resource.ResourceAmount; +import com.refinedmods.refinedstorage.common.api.RefinedStorageApi; +import com.refinedmods.refinedstorage.common.api.autocrafting.CraftingPattern; +import com.refinedmods.refinedstorage.common.api.autocrafting.PatternProviderItem; +import com.refinedmods.refinedstorage.common.support.resource.ItemResource; + +import java.util.Optional; + +import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.screens.Screen; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.Level; + +public final class PatternRendering { + private PatternRendering() { + } + + public static boolean canDisplayOutput(final ItemStack stack) { + return stack.getItem() instanceof PatternProviderItem && Screen.hasShiftDown(); + } + + public static Optional getOutput(final ItemStack stack) { + final Level level = Minecraft.getInstance().level; + if (level == null) { + return Optional.empty(); + } + return RefinedStorageApi.INSTANCE.getPattern(stack, level) + .filter(CraftingPattern.class::isInstance) + .map(CraftingPattern.class::cast) + .map(CraftingPattern::output) + .map(ResourceAmount::getResource) + .filter(ItemResource.class::isInstance) + .map(ItemResource.class::cast) + .map(ItemResource::toItemStack); + } +} diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/PatternState.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/PatternState.java new file mode 100644 index 000000000..1e8a7b3f4 --- /dev/null +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/PatternState.java @@ -0,0 +1,25 @@ +package com.refinedmods.refinedstorage.common.autocrafting; + +import com.refinedmods.refinedstorage.common.util.PacketUtil; + +import java.util.UUID; + +import com.mojang.serialization.Codec; +import com.mojang.serialization.codecs.RecordCodecBuilder; +import net.minecraft.core.UUIDUtil; +import net.minecraft.network.RegistryFriendlyByteBuf; +import net.minecraft.network.codec.StreamCodec; + +public record PatternState(UUID id, PatternType type) { + public static final Codec CODEC = RecordCodecBuilder.create(instance -> instance.group( + UUIDUtil.CODEC.fieldOf("id").forGetter(PatternState::id), + PatternType.CODEC.fieldOf("type").forGetter(PatternState::type) + ).apply(instance, PatternState::new)); + + public static final StreamCodec STREAM_CODEC = + StreamCodec.composite( + UUIDUtil.STREAM_CODEC, PatternState::id, + PacketUtil.enumStreamCodec(PatternType.values()), PatternState::type, + PatternState::new + ); +} diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/PatternType.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/PatternType.java new file mode 100644 index 000000000..6514821b2 --- /dev/null +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/PatternType.java @@ -0,0 +1,43 @@ +package com.refinedmods.refinedstorage.common.autocrafting; + +import com.mojang.serialization.Codec; +import net.minecraft.network.chat.Component; +import net.minecraft.util.StringRepresentable; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.Items; + +import static com.refinedmods.refinedstorage.common.util.IdentifierUtil.createTranslation; + +// TODO: remove widgets.png +// TODO: remove other unused textures, and rename icons.png to side_buttons.png +public enum PatternType implements StringRepresentable { + CRAFTING(Items.CRAFTING_TABLE.getDefaultInstance(), "crafting"), + PROCESSING(Items.FURNACE.getDefaultInstance(), "processing"), + STONECUTTER(Items.STONECUTTER.getDefaultInstance(), "stonecutter"), + SMITHING_TABLE(Items.SMITHING_TABLE.getDefaultInstance(), "smithing_table"); + + public static final Codec CODEC = StringRepresentable.fromValues(PatternType::values); + + private final ItemStack stack; + private final String name; + private final Component translatedName; + + PatternType(final ItemStack stack, final String name) { + this.stack = stack; + this.name = name; + this.translatedName = createTranslation("misc", "pattern." + name); + } + + ItemStack getStack() { + return stack; + } + + Component getTranslatedName() { + return translatedName; + } + + @Override + public String getSerializedName() { + return name; + } +} diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/PatternTypeButton.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/PatternTypeButton.java new file mode 100644 index 000000000..949c06284 --- /dev/null +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/PatternTypeButton.java @@ -0,0 +1,44 @@ +package com.refinedmods.refinedstorage.common.autocrafting; + +import com.refinedmods.refinedstorage.common.support.widget.HoveredImageButton; + +import net.minecraft.client.gui.GuiGraphics; +import net.minecraft.client.gui.components.Tooltip; +import net.minecraft.client.gui.components.WidgetSprites; +import net.minecraft.resources.ResourceLocation; + +import static com.refinedmods.refinedstorage.common.util.IdentifierUtil.createIdentifier; + +class PatternTypeButton extends HoveredImageButton { + private static final WidgetSprites SPRITES = new WidgetSprites( + createIdentifier("widget/generic_small_button"), + createIdentifier("widget/generic_small_button_disabled"), + createIdentifier("widget/generic_small_button_focused"), + createIdentifier("widget/generic_small_button_disabled") + ); + + private final PatternType patternType; + private boolean selected; + + PatternTypeButton(final int x, + final int y, + final OnPress onPress, + final PatternType patternType, + final boolean selected) { + super(x, y, 16, 16, SPRITES, onPress, patternType.getTranslatedName()); + this.patternType = patternType; + this.selected = selected; + this.setTooltip(Tooltip.create(patternType.getTranslatedName())); + } + + void setSelected(final boolean selected) { + this.selected = selected; + } + + @Override + public void renderWidget(final GuiGraphics graphics, final int x, final int y, final float partialTicks) { + final ResourceLocation location = sprites.get(isActive(), isHovered() || selected); + graphics.blitSprite(location, getX(), getY(), width, height); + graphics.renderItem(patternType.getStack(), getX(), getY()); + } +} diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/PatternTypeSettings.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/PatternTypeSettings.java new file mode 100644 index 000000000..3339b0ca4 --- /dev/null +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/PatternTypeSettings.java @@ -0,0 +1,29 @@ +package com.refinedmods.refinedstorage.common.autocrafting; + +class PatternTypeSettings { + private static final int CRAFTING = 0; + private static final int PROCESSING = 1; + private static final int STONECUTTER = 2; + private static final int SMITHING_TABLE = 3; + + private PatternTypeSettings() { + } + + public static PatternType getPatternType(final int patternType) { + return switch (patternType) { + case PROCESSING -> PatternType.PROCESSING; + case STONECUTTER -> PatternType.STONECUTTER; + case SMITHING_TABLE -> PatternType.SMITHING_TABLE; + default -> PatternType.CRAFTING; + }; + } + + public static int getPatternType(final PatternType patternType) { + return switch (patternType) { + case CRAFTING -> CRAFTING; + case PROCESSING -> PROCESSING; + case STONECUTTER -> STONECUTTER; + case SMITHING_TABLE -> SMITHING_TABLE; + }; + } +} diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/package-info.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/package-info.java new file mode 100644 index 000000000..194c7d0ac --- /dev/null +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/package-info.java @@ -0,0 +1,7 @@ +@ParametersAreNonnullByDefault +@FieldsAndMethodsAreNonnullByDefault +package com.refinedmods.refinedstorage.common.autocrafting; + +import com.refinedmods.refinedstorage.api.core.FieldsAndMethodsAreNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/BlockEntities.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/BlockEntities.java index 35b5a0801..52cbb5070 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/BlockEntities.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/BlockEntities.java @@ -1,6 +1,7 @@ package com.refinedmods.refinedstorage.common.content; import com.refinedmods.refinedstorage.api.network.impl.node.SimpleNetworkNode; +import com.refinedmods.refinedstorage.common.autocrafting.PatternGridBlockEntity; import com.refinedmods.refinedstorage.common.constructordestructor.ConstructorBlockEntity; import com.refinedmods.refinedstorage.common.constructordestructor.DestructorBlockEntity; import com.refinedmods.refinedstorage.common.controller.ControllerBlockEntity; @@ -47,6 +48,8 @@ public final class BlockEntities { @Nullable private Supplier> craftingGrid; @Nullable + private Supplier> patternGrid; + @Nullable private Supplier> controller; @Nullable private Supplier> creativeController; @@ -124,6 +127,14 @@ public void setCraftingGrid(final Supplier getPatternGrid() { + return requireNonNull(patternGrid).get(); + } + + public void setPatternGrid(final Supplier> supplier) { + this.patternGrid = supplier; + } + public BlockEntityType getController() { return requireNonNull(controller).get(); } diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/Blocks.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/Blocks.java index 1ad8a5c1e..2f9eaf37f 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/Blocks.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/Blocks.java @@ -1,5 +1,6 @@ package com.refinedmods.refinedstorage.common.content; +import com.refinedmods.refinedstorage.common.autocrafting.PatternGridBlock; import com.refinedmods.refinedstorage.common.constructordestructor.ConstructorBlock; import com.refinedmods.refinedstorage.common.constructordestructor.DestructorBlock; import com.refinedmods.refinedstorage.common.controller.AbstractControllerBlock; @@ -68,6 +69,12 @@ public final class Blocks { ContentNames.CRAFTING_GRID, COLOR ); + private final BlockColorMap patternGrid = new BlockColorMap<>( + PatternGridBlock::new, + ContentIds.PATTERN_GRID, + ContentNames.PATTERN_GRID, + COLOR + ); private final BlockColorMap detector = new BlockColorMap<>( DetectorBlock::new, ContentIds.DETECTOR, @@ -211,6 +218,10 @@ public BlockColorMap getCraftingGrid() { return craftingGrid; } + public BlockColorMap getPatternGrid() { + return patternGrid; + } + public BlockColorMap, ControllerBlockItem> getController() { return controller; } diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/ContentIds.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/ContentIds.java index e49c5a4aa..644e76bb6 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/ContentIds.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/ContentIds.java @@ -24,6 +24,7 @@ public final class ContentIds { 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 PATTERN_GRID = createIdentifier("pattern_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"); @@ -63,6 +64,7 @@ public final class ContentIds { public static final ResourceLocation SECURITY_MANAGER = createIdentifier("security_manager"); public static final ResourceLocation RELAY = createIdentifier("relay"); public static final ResourceLocation DISK_INTERFACE = createIdentifier("disk_interface"); + public static final ResourceLocation PATTERN = createIdentifier("pattern"); private ContentIds() { } diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/ContentNames.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/ContentNames.java index 15dbaf974..8eecbe198 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/ContentNames.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/ContentNames.java @@ -14,6 +14,7 @@ public final class ContentNames { public static final MutableComponent CABLE = name("cable"); public static final MutableComponent GRID = name("grid"); public static final MutableComponent CRAFTING_GRID = name("crafting_grid"); + public static final MutableComponent PATTERN_GRID = name("pattern_grid"); public static final MutableComponent DETECTOR = name("detector"); public static final MutableComponent IMPORTER = name("importer"); public static final MutableComponent EXPORTER = name("exporter"); diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/CreativeModeTabItems.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/CreativeModeTabItems.java index 25c381fca..8c2156f1b 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/CreativeModeTabItems.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/CreativeModeTabItems.java @@ -37,6 +37,7 @@ private static void appendBlocks(final Consumer consumer) { itemConsumer.accept(Blocks.INSTANCE.getDiskDrive()); appendBlockColors(consumer, Blocks.INSTANCE.getGrid()); appendBlockColors(consumer, Blocks.INSTANCE.getCraftingGrid()); + appendBlockColors(consumer, Blocks.INSTANCE.getPatternGrid()); itemConsumer.accept(Items.INSTANCE.getPortableGrid()); consumer.accept(Items.INSTANCE.getPortableGrid().createAtEnergyCapacity()); itemConsumer.accept(Items.INSTANCE.getCreativePortableGrid()); @@ -110,5 +111,6 @@ private static void appendItems(final Consumer consumer) { itemConsumer.accept(Items.INSTANCE.getNetworkCard()); itemConsumer.accept(Items.INSTANCE.getSecurityCard()); itemConsumer.accept(Items.INSTANCE.getFallbackSecurityCard()); + itemConsumer.accept(Items.INSTANCE.getPattern()); } } diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/DataComponents.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/DataComponents.java index 5f8746eb6..47dfd40fd 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/DataComponents.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/DataComponents.java @@ -1,5 +1,7 @@ package com.refinedmods.refinedstorage.common.content; +import com.refinedmods.refinedstorage.common.autocrafting.CraftingPatternState; +import com.refinedmods.refinedstorage.common.autocrafting.PatternState; import com.refinedmods.refinedstorage.common.configurationcard.ConfigurationCardState; import com.refinedmods.refinedstorage.common.security.SecurityCardBoundPlayer; import com.refinedmods.refinedstorage.common.security.SecurityCardPermissions; @@ -31,6 +33,10 @@ public final class DataComponents { private Supplier> securityCardPermissions; @Nullable private Supplier> configurationCardState; + @Nullable + private Supplier> patternState; + @Nullable + private Supplier> craftingPatternState; private DataComponents() { } @@ -96,4 +102,24 @@ public void setConfigurationCardState( ) { this.configurationCardState = supplier; } + + public DataComponentType getPatternState() { + return requireNonNull(patternState).get(); + } + + public void setPatternState( + @Nullable final Supplier> supplier + ) { + this.patternState = supplier; + } + + public DataComponentType getCraftingPatternState() { + return requireNonNull(craftingPatternState).get(); + } + + public void setCraftingPatternState( + @Nullable final Supplier> supplier + ) { + this.craftingPatternState = supplier; + } } diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/DefaultEnergyUsage.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/DefaultEnergyUsage.java index 01a3e8648..00b51eed3 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/DefaultEnergyUsage.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/DefaultEnergyUsage.java @@ -8,6 +8,7 @@ public final class DefaultEnergyUsage { public static final long EXTERNAL_STORAGE = 6; public static final long DETECTOR = 2; public static final long GRID = 10; + public static final long PATTERN_GRID = 14; public static final long CRAFTING_GRID = 14; public static final long DISK_DRIVE = 10; public static final long DISK_DRIVE_PER_DISK = 4; diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/Items.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/Items.java index 48d1f51f9..ed2b1723e 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/Items.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/Items.java @@ -1,6 +1,7 @@ package com.refinedmods.refinedstorage.common.content; import com.refinedmods.refinedstorage.common.api.upgrade.AbstractUpgradeItem; +import com.refinedmods.refinedstorage.common.autocrafting.PatternItem; import com.refinedmods.refinedstorage.common.controller.ControllerBlockItem; import com.refinedmods.refinedstorage.common.controller.CreativeControllerBlockItem; import com.refinedmods.refinedstorage.common.grid.WirelessGridItem; @@ -103,6 +104,8 @@ public final class Items { private Supplier securityCard; @Nullable private Supplier fallbackSecurityCard; + @Nullable + private Supplier pattern; private Items() { } @@ -474,4 +477,12 @@ public FallbackSecurityCardItem getFallbackSecurityCard() { public void setFallbackSecurityCard(final Supplier fallbackSecurityCard) { this.fallbackSecurityCard = fallbackSecurityCard; } + + public PatternItem getPattern() { + return requireNonNull(pattern).get(); + } + + public void setPattern(final Supplier supplier) { + this.pattern = supplier; + } } diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/Menus.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/Menus.java index e314602ff..b4c7642a2 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/Menus.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/Menus.java @@ -1,5 +1,6 @@ package com.refinedmods.refinedstorage.common.content; +import com.refinedmods.refinedstorage.common.autocrafting.PatternGridContainerMenu; import com.refinedmods.refinedstorage.common.constructordestructor.ConstructorContainerMenu; import com.refinedmods.refinedstorage.common.constructordestructor.DestructorContainerMenu; import com.refinedmods.refinedstorage.common.controller.ControllerContainerMenu; @@ -43,6 +44,8 @@ public final class Menus { @Nullable private Supplier> craftingGrid; @Nullable + private Supplier> patternGrid; + @Nullable private Supplier> wirelessGrid; @Nullable private Supplier> controller; @@ -106,6 +109,14 @@ public void setCraftingGrid(final Supplier> this.craftingGrid = supplier; } + public MenuType getPatternGrid() { + return requireNonNull(patternGrid).get(); + } + + public void setPatternGrid(final Supplier> supplier) { + this.patternGrid = supplier; + } + public MenuType getWirelessGrid() { return requireNonNull(wirelessGrid).get(); } diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/Tags.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/Tags.java index ce7b848c9..06509a2ba 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/Tags.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/Tags.java @@ -13,6 +13,7 @@ public final class Tags { 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 PATTERN_GRIDS = createTag("pattern_grids"); public static final TagKey STORAGE_DISKS = createTag("storage_disks"); public static final TagKey IMPORTERS = createTag("importers"); public static final TagKey EXPORTERS = createTag("exporters"); diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/AbstractGridBlockEntity.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/AbstractGridBlockEntity.java index dc07da7c7..35872682a 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/AbstractGridBlockEntity.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/AbstractGridBlockEntity.java @@ -17,15 +17,12 @@ import com.refinedmods.refinedstorage.common.api.support.network.InWorldNetworkNodeContainer; import com.refinedmods.refinedstorage.common.api.support.resource.ResourceType; import com.refinedmods.refinedstorage.common.support.AbstractDirectionalBlock; -import com.refinedmods.refinedstorage.common.support.containermenu.NetworkNodeExtendedMenuProvider; import com.refinedmods.refinedstorage.common.support.network.AbstractRedstoneModeNetworkNodeContainerBlockEntity; import com.refinedmods.refinedstorage.common.support.network.ColoredConnectionStrategy; import java.util.List; import net.minecraft.core.BlockPos; -import net.minecraft.network.RegistryFriendlyByteBuf; -import net.minecraft.network.codec.StreamEncoder; import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.level.block.entity.BlockEntityType; import net.minecraft.world.level.block.state.BlockState; @@ -34,7 +31,7 @@ public abstract class AbstractGridBlockEntity extends AbstractRedstoneModeNetworkNodeContainerBlockEntity - implements Grid, NetworkNodeExtendedMenuProvider { + implements Grid { protected AbstractGridBlockEntity(final BlockEntityType type, final BlockPos pos, final BlockState state, @@ -50,16 +47,6 @@ protected InWorldNetworkNodeContainer createMainContainer(final GridNetworkNode .build(); } - @Override - public GridData getMenuData() { - return GridData.of(this); - } - - @Override - public StreamEncoder getMenuCodec() { - return GridData.STREAM_CODEC; - } - @Override public List getResources(final Class actorType) { return requireNonNull(mainNetworkNode.getNetwork()) diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/AbstractGridContainerMenu.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/AbstractGridContainerMenu.java index 9ef83b6c6..065c4f96e 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/AbstractGridContainerMenu.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/AbstractGridContainerMenu.java @@ -404,13 +404,15 @@ public boolean onTransfer(final int slotIndex) { @SuppressWarnings("resource") @Override public ItemStack quickMoveStack(final Player playerEntity, final int slotIndex) { - if (!playerEntity.level().isClientSide() && grid != null && grid.isGridActive()) { + if (transferManager.transfer(slotIndex)) { + return ItemStack.EMPTY; + } else if (!playerEntity.level().isClientSide() && grid != null && grid.isGridActive()) { final Slot slot = getSlot(slotIndex); if (slot.hasItem() && insertionStrategy != null && canTransferSlot(slot)) { insertionStrategy.onTransfer(slot.index); } } - return super.quickMoveStack(playerEntity, slotIndex); + return ItemStack.EMPTY; } protected boolean canTransferSlot(final Slot slot) { diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/ClientCraftingGridSource.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/ClientCraftingGridSource.java index 7a773bf5d..b86ac2e3a 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/ClientCraftingGridSource.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/ClientCraftingGridSource.java @@ -1,5 +1,6 @@ package com.refinedmods.refinedstorage.common.grid; +import com.refinedmods.refinedstorage.common.support.CraftingMatrix; import com.refinedmods.refinedstorage.common.support.packet.c2s.C2SPackets; import com.refinedmods.refinedstorage.common.support.resource.ItemResource; @@ -16,7 +17,7 @@ class ClientCraftingGridSource implements CraftingGridSource { private final ResultContainer craftingResult; ClientCraftingGridSource() { - this.craftingMatrix = new CraftingMatrix(null); + this.craftingMatrix = new CraftingMatrix(null, 3, 3); this.craftingResult = new ResultContainer(); } diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/CraftingGridBlockEntity.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/CraftingGridBlockEntity.java index af272ec47..08c5595c1 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/CraftingGridBlockEntity.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/CraftingGridBlockEntity.java @@ -9,8 +9,9 @@ import com.refinedmods.refinedstorage.common.content.BlockEntities; import com.refinedmods.refinedstorage.common.content.ContentNames; import com.refinedmods.refinedstorage.common.support.BlockEntityWithDrops; +import com.refinedmods.refinedstorage.common.support.CraftingMatrix; +import com.refinedmods.refinedstorage.common.support.containermenu.NetworkNodeExtendedMenuProvider; import com.refinedmods.refinedstorage.common.support.resource.ItemResource; -import com.refinedmods.refinedstorage.common.util.ContainerUtil; import java.util.Optional; import javax.annotation.Nullable; @@ -19,26 +20,20 @@ import net.minecraft.core.HolderLookup; import net.minecraft.core.NonNullList; import net.minecraft.nbt.CompoundTag; +import net.minecraft.network.RegistryFriendlyByteBuf; import net.minecraft.network.chat.Component; +import net.minecraft.network.codec.StreamEncoder; import net.minecraft.world.entity.player.Inventory; import net.minecraft.world.entity.player.Player; import net.minecraft.world.inventory.ResultContainer; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.crafting.CraftingInput; -import net.minecraft.world.item.crafting.CraftingRecipe; -import net.minecraft.world.item.crafting.RecipeHolder; -import net.minecraft.world.item.crafting.RecipeType; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; -public class CraftingGridBlockEntity extends AbstractGridBlockEntity implements BlockEntityWithDrops { - 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 class CraftingGridBlockEntity extends AbstractGridBlockEntity implements BlockEntityWithDrops, + NetworkNodeExtendedMenuProvider { + private final CraftingState craftingState = new CraftingState(this::setChanged, this::getLevel); public CraftingGridBlockEntity(final BlockPos pos, final BlockState state) { super( @@ -49,55 +44,26 @@ public CraftingGridBlockEntity(final BlockPos pos, final BlockState state) { ); } - private void setOutput() { - if (level == null) { - return; - } - setOutputSilently(level); - setChanged(); - } - - private void setOutputSilently(final Level level) { - if (level.isClientSide()) { - return; - } - final CraftingInput input = craftingMatrix.asCraftInput(); - if (currentRecipe == null || !currentRecipe.matches(input, level)) { - currentRecipe = loadRecipe(level); - } - if (currentRecipe == null) { - setResult(ItemStack.EMPTY); - } else { - setResult(currentRecipe.assemble(input, level.registryAccess())); - } - } - - private void setResult(final ItemStack result) { - craftingResult.setItem(0, result); + CraftingMatrix getCraftingMatrix() { + return craftingState.getCraftingMatrix(); } - @Nullable - private CraftingRecipe loadRecipe(final Level level) { - return level - .getRecipeManager() - .getRecipeFor(RecipeType.CRAFTING, craftingMatrix.asCraftInput(), level) - .map(RecipeHolder::value) - .orElse(null); + ResultContainer getCraftingResult() { + return craftingState.getCraftingResult(); } - CraftingMatrix getCraftingMatrix() { - return craftingMatrix; + NonNullList getRemainingItems(final Player player, final CraftingInput input) { + return craftingState.getRemainingItems(level, player, input); } - ResultContainer getCraftingResult() { - return craftingResult; + @Override + public GridData getMenuData() { + return GridData.of(this); } - NonNullList getRemainingItems(final Player player, final CraftingInput input) { - if (level == null || currentRecipe == null) { - return NonNullList.create(); - } - return Platform.INSTANCE.getRemainingCraftingItems(player, currentRecipe, input); + @Override + public StreamEncoder getMenuCodec() { + return GridData.STREAM_CODEC; } @Override @@ -114,28 +80,26 @@ public AbstractGridContainerMenu createMenu(final int syncId, final Inventory in @Override public void saveAdditional(final CompoundTag tag, final HolderLookup.Provider provider) { super.saveAdditional(tag, provider); - tag.put(TAG_CRAFTING_MATRIX, ContainerUtil.write(craftingMatrix, provider)); + craftingState.writeToTag(tag, provider); } @Override public void loadAdditional(final CompoundTag tag, final HolderLookup.Provider provider) { super.loadAdditional(tag, provider); - if (tag.contains(TAG_CRAFTING_MATRIX)) { - ContainerUtil.read(tag.getCompound(TAG_CRAFTING_MATRIX), craftingMatrix, provider); - } + craftingState.readFromTag(tag, provider); } @Override public void setLevel(final Level level) { super.setLevel(level); - setOutputSilently(level); + craftingState.updateResult(level); } @Override public NonNullList getDrops() { final NonNullList drops = NonNullList.create(); - for (int i = 0; i < craftingMatrix.getContainerSize(); ++i) { - drops.add(craftingMatrix.getItem(i)); + for (int i = 0; i < craftingState.getCraftingMatrix().getContainerSize(); ++i) { + drops.add(craftingState.getCraftingMatrix().getItem(i)); } return drops; } diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/CraftingGridContainerMenu.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/CraftingGridContainerMenu.java index fd072e186..fd65608e6 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/CraftingGridContainerMenu.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/CraftingGridContainerMenu.java @@ -75,7 +75,10 @@ public void onActiveChanged(final boolean newActive) { @Override public boolean canTakeItemForPickAll(final ItemStack stack, final Slot slot) { - return !(slot instanceof CraftingGridResultSlot); + if (slot instanceof CraftingGridResultSlot) { + return false; + } + return super.canTakeItemForPickAll(stack, slot); } @Override diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/CraftingGridResultSlot.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/CraftingGridResultSlot.java index 4887311c1..445c47a28 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/CraftingGridResultSlot.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/CraftingGridResultSlot.java @@ -1,6 +1,7 @@ package com.refinedmods.refinedstorage.common.grid; import com.refinedmods.refinedstorage.common.Platform; +import com.refinedmods.refinedstorage.common.support.CraftingMatrix; import com.refinedmods.refinedstorage.common.support.resource.ItemResource; import java.util.List; @@ -58,7 +59,8 @@ private void doTake(final Player player, final CraftingGridRefillContext refillC for (int x = 0; x < input.width(); ++x) { final int index = x + left + (y + top) * source.getCraftingMatrix().getWidth(); final ItemStack matrixStack = source.getCraftingMatrix().getItem(index); - final ItemStack remainingItem = remainingItems.get(x + y * input.width()); + final int recipeIndex = x + y * input.width(); + final ItemStack remainingItem = remainingItems.get(recipeIndex); if (!remainingItem.isEmpty()) { useIngredientWithRemainingItem(player, index, remainingItem); } else if (!matrixStack.isEmpty()) { diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/CraftingGridSource.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/CraftingGridSource.java index 9ed0828fe..220ce6463 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/CraftingGridSource.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/CraftingGridSource.java @@ -1,5 +1,6 @@ package com.refinedmods.refinedstorage.common.grid; +import com.refinedmods.refinedstorage.common.support.CraftingMatrix; import com.refinedmods.refinedstorage.common.support.resource.ItemResource; import java.util.List; diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/CraftingGridSourceImpl.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/CraftingGridSourceImpl.java index 97632e507..60411e3ca 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/CraftingGridSourceImpl.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/CraftingGridSourceImpl.java @@ -4,6 +4,7 @@ import com.refinedmods.refinedstorage.api.resource.ResourceAmount; import com.refinedmods.refinedstorage.api.resource.list.ResourceList; import com.refinedmods.refinedstorage.api.resource.list.ResourceListImpl; +import com.refinedmods.refinedstorage.common.support.CraftingMatrix; import com.refinedmods.refinedstorage.common.support.resource.ItemResource; import java.util.Comparator; diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/CraftingState.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/CraftingState.java new file mode 100644 index 000000000..a58248ebe --- /dev/null +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/CraftingState.java @@ -0,0 +1,106 @@ +package com.refinedmods.refinedstorage.common.grid; + +import com.refinedmods.refinedstorage.api.core.NullableType; +import com.refinedmods.refinedstorage.common.Platform; +import com.refinedmods.refinedstorage.common.support.CraftingMatrix; +import com.refinedmods.refinedstorage.common.util.ContainerUtil; + +import java.util.function.Supplier; +import javax.annotation.Nullable; + +import net.minecraft.core.HolderLookup; +import net.minecraft.core.NonNullList; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.inventory.ResultContainer; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.crafting.CraftingInput; +import net.minecraft.world.item.crafting.CraftingRecipe; +import net.minecraft.world.item.crafting.RecipeHolder; +import net.minecraft.world.item.crafting.RecipeType; +import net.minecraft.world.level.Level; + +public class CraftingState { + private static final String TAG_CRAFTING_MATRIX = "matrix"; + + private final Runnable listener; + private final Supplier<@NullableType Level> levelSupplier; + private final CraftingMatrix craftingMatrix = new CraftingMatrix(this::craftingMatrixChanged, 3, 3); + private final ResultContainer craftingResult = new ResultContainer(); + + @Nullable + private CraftingRecipe currentRecipe; + + public CraftingState(final Runnable listener, final Supplier<@NullableType Level> levelSupplier) { + this.listener = listener; + this.levelSupplier = levelSupplier; + } + + private void craftingMatrixChanged() { + final Level level = levelSupplier.get(); + if (level == null) { + return; + } + updateResult(level); + listener.run(); + } + + public void updateResult(final Level level) { + if (level.isClientSide()) { + return; + } + final CraftingInput input = craftingMatrix.asCraftInput(); + if (currentRecipe == null || !currentRecipe.matches(input, level)) { + currentRecipe = loadRecipe(level); + } + if (currentRecipe == null) { + setResult(ItemStack.EMPTY); + } else { + setResult(currentRecipe.assemble(input, level.registryAccess())); + } + } + + public CraftingMatrix getCraftingMatrix() { + return craftingMatrix; + } + + public ResultContainer getCraftingResult() { + return craftingResult; + } + + public boolean hasCraftingResult() { + return !craftingResult.getItem(0).isEmpty(); + } + + private void setResult(final ItemStack result) { + craftingResult.setItem(0, result); + } + + @Nullable + private CraftingRecipe loadRecipe(final Level level) { + return level + .getRecipeManager() + .getRecipeFor(RecipeType.CRAFTING, craftingMatrix.asCraftInput(), level) + .map(RecipeHolder::value) + .orElse(null); + } + + NonNullList getRemainingItems(@Nullable final Level level, + final Player player, + final CraftingInput input) { + if (level == null || currentRecipe == null) { + return NonNullList.create(); + } + return Platform.INSTANCE.getRemainingCraftingItems(player, currentRecipe, input); + } + + public void writeToTag(final CompoundTag tag, final HolderLookup.Provider provider) { + tag.put(TAG_CRAFTING_MATRIX, ContainerUtil.write(craftingMatrix, provider)); + } + + public void readFromTag(final CompoundTag tag, final HolderLookup.Provider provider) { + if (tag.contains(TAG_CRAFTING_MATRIX)) { + ContainerUtil.read(tag.getCompound(TAG_CRAFTING_MATRIX), craftingMatrix, provider); + } + } +} diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/GridBlockEntity.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/GridBlockEntity.java index da2f4aed1..4f20e964f 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/GridBlockEntity.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/GridBlockEntity.java @@ -3,20 +3,33 @@ import com.refinedmods.refinedstorage.common.Platform; import com.refinedmods.refinedstorage.common.content.BlockEntities; import com.refinedmods.refinedstorage.common.content.ContentNames; +import com.refinedmods.refinedstorage.common.support.containermenu.NetworkNodeExtendedMenuProvider; import javax.annotation.Nullable; import net.minecraft.core.BlockPos; +import net.minecraft.network.RegistryFriendlyByteBuf; import net.minecraft.network.chat.Component; +import net.minecraft.network.codec.StreamEncoder; import net.minecraft.world.entity.player.Inventory; import net.minecraft.world.entity.player.Player; import net.minecraft.world.level.block.state.BlockState; -public class GridBlockEntity extends AbstractGridBlockEntity { +public class GridBlockEntity extends AbstractGridBlockEntity implements NetworkNodeExtendedMenuProvider { public GridBlockEntity(final BlockPos pos, final BlockState state) { super(BlockEntities.INSTANCE.getGrid(), pos, state, Platform.INSTANCE.getConfig().getGrid().getEnergyUsage()); } + @Override + public GridData getMenuData() { + return GridData.of(this); + } + + @Override + public StreamEncoder getMenuCodec() { + return GridData.STREAM_CODEC; + } + @Override public Component getDisplayName() { return ContentNames.GRID; diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/SnapshotCraftingGridRefillContext.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/SnapshotCraftingGridRefillContext.java index 833bfa89c..5dbf3da73 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/SnapshotCraftingGridRefillContext.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/SnapshotCraftingGridRefillContext.java @@ -5,6 +5,7 @@ import com.refinedmods.refinedstorage.api.resource.list.ResourceListImpl; import com.refinedmods.refinedstorage.api.storage.root.RootStorage; import com.refinedmods.refinedstorage.common.api.storage.PlayerActor; +import com.refinedmods.refinedstorage.common.support.CraftingMatrix; import com.refinedmods.refinedstorage.common.support.resource.ItemResource; import net.minecraft.world.entity.player.Player; diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/screen/AbstractGridScreen.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/screen/AbstractGridScreen.java index 165eda4b4..90a62268e 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/screen/AbstractGridScreen.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/screen/AbstractGridScreen.java @@ -34,6 +34,7 @@ import net.minecraft.client.renderer.RenderType; 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 net.minecraft.world.item.ItemStack; @@ -41,12 +42,16 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import static com.refinedmods.refinedstorage.common.util.IdentifierUtil.createIdentifier; import static com.refinedmods.refinedstorage.common.util.IdentifierUtil.createTranslation; import static java.util.Objects.requireNonNullElse; public abstract class AbstractGridScreen extends AbstractStretchingScreen { + protected static final int CLEAR_BUTTON_SIZE = 7; + private static final Logger LOGGER = LoggerFactory.getLogger(AbstractGridScreen.class); + private static final ResourceLocation ROW_TEXTURE = createIdentifier("grid_row"); private static final int MODIFIED_JUST_NOW_MAX_SECONDS = 10; private static final int COLUMNS = 9; private static final int DISABLED_SLOT_COLOR = 0xFF5B5B5B; @@ -193,7 +198,7 @@ private void renderRow(final GuiGraphics graphics, final int rowX, final int rowY, final int row) { - graphics.blit(getTexture(), rowX, rowY, 0, 238, 162, ROW_SIZE); + graphics.blitSprite(ROW_TEXTURE, rowX, rowY, 162, ROW_SIZE); for (int column = 0; column < COLUMNS; ++column) { renderCell(graphics, mouseX, mouseY, rowX, rowY, (row * COLUMNS) + column, column); } diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/screen/CraftingGridScreen.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/screen/CraftingGridScreen.java index fdfb4a045..ba50b5b5a 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/screen/CraftingGridScreen.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/screen/CraftingGridScreen.java @@ -26,7 +26,6 @@ public class CraftingGridScreen extends AbstractGridScreen { private static final ResourceLocation TEXTURE = createIdentifier("textures/gui/crafting_grid.png"); - private static final int CLEAR_BUTTON_SIZE = 7; private static final WidgetSprites CLEAR_BUTTON_TO_PLAYER_INVENTORY_SPRITES = new WidgetSprites( createIdentifier("widget/move_down"), @@ -57,8 +56,8 @@ public CraftingGridScreen(final CraftingGridContainerMenu menu, final Inventory protected void init() { super.init(); - final int clearToNetworkButtonX = leftPos + 82; - final int clearToInventoryButtonX = clearToNetworkButtonX + CLEAR_BUTTON_SIZE + 3; + final int clearToNetworkButtonX = getClearButtonX(0); + final int clearToInventoryButtonX = getClearButtonX(1); final int clearButtonY = topPos + imageHeight - bottomHeight + 4; clearToNetworkButton = createClearButton(clearToNetworkButtonX, clearButtonY, false); @@ -68,6 +67,10 @@ protected void init() { addRenderableWidget(createClearButton(clearToInventoryButtonX, clearButtonY, true)); } + private int getClearButtonX(final int i) { + return leftPos + 82 + ((CLEAR_BUTTON_SIZE + 3) * i); + } + @Override protected void renderBg(final GuiGraphics graphics, final float delta, final int mouseX, final int mouseY) { super.renderBg(graphics, delta, mouseX, mouseY); diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/security/AbstractSecurityCardScreen.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/security/AbstractSecurityCardScreen.java index 381c51cff..7d4352bab 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/security/AbstractSecurityCardScreen.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/security/AbstractSecurityCardScreen.java @@ -75,7 +75,8 @@ private CustomCheckboxWidget createPermissionCheckbox( y, getPermissionName(menuPermission), font, - menuPermission.allowed() + menuPermission.allowed(), + CustomCheckboxWidget.Size.REGULAR ); checkbox.visible = visible; checkbox.setTooltip(getPermissionTooltip(menuPermission)); diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/AbstractBaseContainerMenu.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/AbstractBaseContainerMenu.java index 857aafcc9..91eb1dea3 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/AbstractBaseContainerMenu.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/AbstractBaseContainerMenu.java @@ -4,6 +4,7 @@ import com.refinedmods.refinedstorage.common.api.support.slotreference.SlotReference; import com.refinedmods.refinedstorage.common.support.containermenu.ClientProperty; import com.refinedmods.refinedstorage.common.support.containermenu.DisabledSlot; +import com.refinedmods.refinedstorage.common.support.containermenu.FilterSlot; import com.refinedmods.refinedstorage.common.support.containermenu.Property; import com.refinedmods.refinedstorage.common.support.containermenu.PropertyType; import com.refinedmods.refinedstorage.common.support.containermenu.ServerProperty; @@ -98,12 +99,29 @@ public void clicked(final int id, final int dragType, final ClickType clickType, if (isSwappingDisabledSlotWithNumberKeys(dragType, clickType)) { return; } + if (slot instanceof FilterSlot) { + final ItemStack carried = player.containerMenu.getCarried(); + if (carried.isEmpty()) { + slot.set(ItemStack.EMPTY); + } else if (slot.mayPlace(carried)) { + slot.set(carried.copy()); + } + return; + } if (slot instanceof DisabledSlot) { return; } super.clicked(id, dragType, clickType, player); } + @Override + public boolean canTakeItemForPickAll(final ItemStack stack, final Slot slot) { + if (slot instanceof FilterSlot || slot instanceof DisabledSlot) { + return false; + } + return super.canTakeItemForPickAll(stack, slot); + } + private boolean isSwappingDisabledSlotWithNumberKeys(final int dragType, final ClickType clickType) { return disabledSlot != null && clickType == ClickType.SWAP diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/CraftingMatrix.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/CraftingMatrix.java similarity index 57% rename from refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/CraftingMatrix.java rename to refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/CraftingMatrix.java index 805e53372..18db8e3ad 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/CraftingMatrix.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/CraftingMatrix.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage.common.grid; +package com.refinedmods.refinedstorage.common.support; import javax.annotation.Nullable; @@ -8,12 +8,12 @@ public class CraftingMatrix extends TransientCraftingContainer { @Nullable private final Runnable listener; - public CraftingMatrix(@Nullable final Runnable listener) { - super(new CraftingMatrixContainerMenu(listener), 3, 3); + public CraftingMatrix(@Nullable final Runnable listener, final int width, final int height) { + super(new CraftingMatrixContainerMenu(listener), width, height); this.listener = listener; } - void changed() { + public void changed() { if (listener != null) { listener.run(); } diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/CraftingMatrixContainerMenu.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/CraftingMatrixContainerMenu.java similarity index 94% rename from refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/CraftingMatrixContainerMenu.java rename to refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/CraftingMatrixContainerMenu.java index 288b9c3e8..406c37706 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/CraftingMatrixContainerMenu.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/CraftingMatrixContainerMenu.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage.common.grid; +package com.refinedmods.refinedstorage.common.support; import javax.annotation.Nullable; diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/containermenu/FilterSlot.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/containermenu/FilterSlot.java new file mode 100644 index 000000000..ff34f8f4f --- /dev/null +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/containermenu/FilterSlot.java @@ -0,0 +1,25 @@ +package com.refinedmods.refinedstorage.common.support.containermenu; + +import net.minecraft.world.Container; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.inventory.Slot; +import net.minecraft.world.item.ItemStack; + +public class FilterSlot extends Slot { + public FilterSlot(final Container container, final int index, final int x, final int y) { + super(container, index, x, y); + } + + @Override + public void set(final ItemStack stack) { + if (!stack.isEmpty()) { + stack.setCount(1); + } + super.set(stack); + } + + @Override + public boolean mayPickup(final Player player) { + return false; + } +} diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/containermenu/TransferManager.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/containermenu/TransferManager.java index 1aece6cbf..098001eab 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/containermenu/TransferManager.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/containermenu/TransferManager.java @@ -46,23 +46,28 @@ public void addBiTransfer(final Container from, final Container to) { addTransfer(to, from); } - public void transfer(final int index) { + public boolean transfer(final int index) { final Slot slot = containerMenu.getSlot(index); if (slot.getItem().isEmpty()) { - return; + return false; } final TransferDestination key = destinationFactory.apply(slot.container); final List destinations = destinationMap.get(key); + boolean success = false; if (destinations != null) { - transfer(slot, destinations); + if (transfer(slot, destinations)) { + success = true; + } } + return success; } - private void transfer(final Slot slot, final List destinations) { + private boolean transfer(final Slot slot, final List destinations) { final ItemStack initial = slot.getItem().copy(); final ItemStack remainder = doTransfer(initial, destinations); slot.set(remainder); slot.setChanged(); + return initial.getCount() != remainder.getCount(); } private ItemStack doTransfer(final ItemStack initial, final List destinations) { @@ -79,4 +84,8 @@ private ItemStack doTransfer(final ItemStack initial, final List> recipe) { Platform.INSTANCE.sendPacketToServer(new CraftingGridRecipeTransferPacket(recipe)); } diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/packet/c2s/PatternGridClearPacket.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/packet/c2s/PatternGridClearPacket.java new file mode 100644 index 000000000..f4195ef1d --- /dev/null +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/packet/c2s/PatternGridClearPacket.java @@ -0,0 +1,28 @@ +package com.refinedmods.refinedstorage.common.support.packet.c2s; + +import com.refinedmods.refinedstorage.common.autocrafting.PatternGridContainerMenu; +import com.refinedmods.refinedstorage.common.support.packet.PacketContext; + +import net.minecraft.network.RegistryFriendlyByteBuf; +import net.minecraft.network.codec.StreamCodec; +import net.minecraft.network.protocol.common.custom.CustomPacketPayload; + +import static com.refinedmods.refinedstorage.common.util.IdentifierUtil.createIdentifier; + +public record PatternGridClearPacket() implements CustomPacketPayload { + public static final Type PACKET_TYPE = new Type<>(createIdentifier("pattern_grid_clear")); + public static final PatternGridClearPacket INSTANCE = new PatternGridClearPacket(); + public static final StreamCodec STREAM_CODEC = + StreamCodec.unit(INSTANCE); + + public static void handle(final PacketContext ctx) { + if (ctx.getPlayer().containerMenu instanceof PatternGridContainerMenu patternGridContainerMenu) { + patternGridContainerMenu.clear(); + } + } + + @Override + public Type type() { + return PACKET_TYPE; + } +} diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/packet/c2s/PatternGridCreatePatternPacket.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/packet/c2s/PatternGridCreatePatternPacket.java new file mode 100644 index 000000000..3225174f6 --- /dev/null +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/packet/c2s/PatternGridCreatePatternPacket.java @@ -0,0 +1,29 @@ +package com.refinedmods.refinedstorage.common.support.packet.c2s; + +import com.refinedmods.refinedstorage.common.autocrafting.PatternGridContainerMenu; +import com.refinedmods.refinedstorage.common.support.packet.PacketContext; + +import net.minecraft.network.RegistryFriendlyByteBuf; +import net.minecraft.network.codec.StreamCodec; +import net.minecraft.network.protocol.common.custom.CustomPacketPayload; + +import static com.refinedmods.refinedstorage.common.util.IdentifierUtil.createIdentifier; + +public record PatternGridCreatePatternPacket() implements CustomPacketPayload { + public static final Type PACKET_TYPE = + new Type<>(createIdentifier("pattern_grid_create_pattern")); + public static final PatternGridCreatePatternPacket INSTANCE = new PatternGridCreatePatternPacket(); + public static final StreamCodec STREAM_CODEC = + StreamCodec.unit(INSTANCE); + + public static void handle(final PacketContext ctx) { + if (ctx.getPlayer().containerMenu instanceof PatternGridContainerMenu patternGridContainerMenu) { + patternGridContainerMenu.createPattern(); + } + } + + @Override + public Type type() { + return PACKET_TYPE; + } +} diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/widget/CustomCheckboxWidget.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/widget/CustomCheckboxWidget.java index aca5918a6..af5a8f6c5 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/widget/CustomCheckboxWidget.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/widget/CustomCheckboxWidget.java @@ -25,8 +25,7 @@ public class CustomCheckboxWidget extends AbstractButton { ); private static final ResourceLocation CHECKBOX_SPRITE = ResourceLocation.withDefaultNamespace("widget/checkbox"); - private static final int BOX_SIZE = 9 + 8; - + private final Size size; @Nullable private OnPressed onPressed; private boolean selected; @@ -35,9 +34,11 @@ public CustomCheckboxWidget(final int x, final int y, final Component text, final Font font, - final boolean selected) { - super(x, y, BOX_SIZE + 4 + font.width(text), BOX_SIZE, text); + final boolean selected, + final Size size) { + super(x, y, size.size + 4 + font.width(text), size.size, text); this.selected = selected; + this.size = size; } public void setOnPressed(@Nullable final OnPressed onPressed) { @@ -79,15 +80,26 @@ public void renderWidget(final GuiGraphics graphics, final int mouseX, final int } else { sprite = isFocused() ? CHECKBOX_HIGHLIGHTED_SPRITE : CHECKBOX_SPRITE; } - final int x = getX() + BOX_SIZE + 4; - final int y = (getY() + (height >> 1)) - (9 >> 1); - graphics.blitSprite(sprite, getX(), getY(), BOX_SIZE, BOX_SIZE); + graphics.blitSprite(sprite, getX(), getY(), size.size, size.size); graphics.setColor(1.0F, 1.0F, 1.0F, 1.0F); - graphics.drawString(font, getMessage(), x, y, 4210752, false); + final int textX = getX() + size.size + 4; + final int textY = (getY() + (height >> 1)) - (9 >> 1); + graphics.drawString(font, getMessage(), textX, textY, 4210752, false); } @FunctionalInterface public interface OnPressed { void onPressed(CustomCheckboxWidget checkbox, boolean selected); } + + public enum Size { + REGULAR(9 + 8), + SMALL(9); + + private final int size; + + Size(final int size) { + this.size = size; + } + } } diff --git a/refinedstorage-common/src/main/resources/assets/refinedstorage/lang/en_us.json b/refinedstorage-common/src/main/resources/assets/refinedstorage/lang/en_us.json index adf9fc563..9ed2a7d7e 100644 --- a/refinedstorage-common/src/main/resources/assets/refinedstorage/lang/en_us.json +++ b/refinedstorage-common/src/main/resources/assets/refinedstorage/lang/en_us.json @@ -6,6 +6,7 @@ "block.refinedstorage.disk_drive": "Disk Drive", "block.refinedstorage.machine_casing": "Machine Casing", "block.refinedstorage.grid": "Grid", + "block.refinedstorage.pattern_grid": "Pattern Grid", "block.refinedstorage.crafting_grid": "Crafting Grid", "block.refinedstorage.controller": "Controller", "block.refinedstorage.creative_controller": "Creative Controller", @@ -61,6 +62,11 @@ "gui.refinedstorage.grid.resource_type.help": "Filter specific resource types.", "gui.refinedstorage.crafting_grid.move.network": "Move items to network", "gui.refinedstorage.crafting_grid.move.inventory": "Move items to inventory", + "gui.refinedstorage.pattern_grid.create_pattern": "Create pattern", + "gui.refinedstorage.pattern_grid.clear": "Clear", + "gui.refinedstorage.pattern_grid.fuzzy_mode": "Fuzzy mode", + "gui.refinedstorage.pattern_grid.fuzzy_mode.on.help": "Match the pattern inputs without comparing NBT tags.", + "gui.refinedstorage.pattern_grid.fuzzy_mode.off.help": "Match the pattern inputs exactly.", "gui.refinedstorage.screen_size": "Screen size", "gui.refinedstorage.screen_size.stretch": "Stretch", "gui.refinedstorage.screen_size.small": "Small", @@ -170,6 +176,7 @@ "item.refinedstorage.disk_interface.help": "Transfers resources between the storage network and provided storage disks.", "item.refinedstorage.grid.help": "Allows for interacting with the storage network.", "item.refinedstorage.crafting_grid.help": "Allows for interacting with the storage network, with crafting abilities.", + "item.refinedstorage.pattern_grid.help": "Allows for the creation of Patterns for use in autocrafting.", "item.refinedstorage.importer.help": "Imports resources from an external source to the storage network.", "item.refinedstorage.exporter.help": "Exports resources from the storage network to an external destination.", "item.refinedstorage.interface.help": "Acts as the combination of an Importer and Exporter.", @@ -271,6 +278,9 @@ "item.refinedstorage.fallback_security_card.help": "Acts as a fallback if no matching Security Card for a player is found. Right click to configure. Use while crouching to clear configuration.", "item.refinedstorage.portable_grid.help": "Allows to interact with a storage disk while not being connected to a storage network. Can be used as a block in world, or from your inventory.", "item.refinedstorage.storage_monitor.help": "A block that displays the current amount of a certain resource in your storage network. SHIFT + right click to configure. Left click to extract a stack, SHIFT + left click to extract a single resource, right click to insert a resource, right click multiple times to insert resources in bulk.", + "item.refinedstorage.pattern": "Pattern", + "item.refinedstorage.pattern.fuzzy_mode": "Fuzzy mode", + "item.refinedstorage.pattern.help": "Used in autocrafting to store the recipe to be crafted. Use while crouching to clear.", "misc.refinedstorage.stored": "Stored: %s", "misc.refinedstorage.stored_with_capacity": "Stored: %s / %s (%d%%)", "misc.refinedstorage.total": "%d total", @@ -298,6 +308,10 @@ "misc.refinedstorage.no_permission.build.break": "You are not allowed to break the %s.", "misc.refinedstorage.no_permission.build.rotate": "You are not allowed to rotate the %s.", "misc.refinedstorage.no_permission.build.dismantle": "You are not allowed to dismantle the %s.", + "misc.refinedstorage.pattern.crafting": "Crafting Pattern", + "misc.refinedstorage.pattern.processing": "Processing Pattern", + "misc.refinedstorage.pattern.stonecutter": "Stonecutter Pattern", + "misc.refinedstorage.pattern.smithing_table": "Smithing Table Pattern", "key.refinedstorage.focus_search_bar": "Focus search bar", "key.refinedstorage.clear_crafting_grid_matrix_to_network": "Clear Crafting Grid matrix to network", "key.refinedstorage.clear_crafting_grid_matrix_to_inventory": "Clear Crafting Grid matrix to inventory", @@ -373,6 +387,10 @@ "text.autoconfig.refinedstorage.option.craftingGrid.energyUsage.tooltip": "The energy used by the Crafting Grid.", "text.autoconfig.refinedstorage.option.craftingGrid.craftingMatrixCloseBehavior": "Crafting matrix close behavior", "text.autoconfig.refinedstorage.option.craftingGrid.craftingMatrixCloseBehavior.tooltip": "What should happen to the crafting matrix slots when closing the Crafting Grid.", + "text.autoconfig.refinedstorage.option.patternGrid": "Pattern Grid", + "text.autoconfig.refinedstorage.option.patternGrid.tooltip": "Configuration for the Pattern Grid.", + "text.autoconfig.refinedstorage.option.patternGrid.energyUsage": "Energy usage", + "text.autoconfig.refinedstorage.option.patternGrid.energyUsage.tooltip": "The energy used by the Pattern Grid.", "text.autoconfig.refinedstorage.option.controller": "Controller", "text.autoconfig.refinedstorage.option.controller.tooltip": "Configuration for the Controller.", "text.autoconfig.refinedstorage.option.controller.energyCapacity": "Energy capacity", diff --git a/refinedstorage-common/src/main/resources/assets/refinedstorage/models/item/pattern.json b/refinedstorage-common/src/main/resources/assets/refinedstorage/models/item/pattern.json new file mode 100644 index 000000000..9e88470d6 --- /dev/null +++ b/refinedstorage-common/src/main/resources/assets/refinedstorage/models/item/pattern.json @@ -0,0 +1,3 @@ +{ + "loader": "refinedstorage:pattern" +} \ No newline at end of file diff --git a/refinedstorage-common/src/main/resources/assets/refinedstorage/models/item/pattern/crafting.json b/refinedstorage-common/src/main/resources/assets/refinedstorage/models/item/pattern/crafting.json new file mode 100644 index 000000000..4626053ed --- /dev/null +++ b/refinedstorage-common/src/main/resources/assets/refinedstorage/models/item/pattern/crafting.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "refinedstorage:item/pattern/crafting" + } +} diff --git a/refinedstorage-common/src/main/resources/assets/refinedstorage/models/item/pattern/empty.json b/refinedstorage-common/src/main/resources/assets/refinedstorage/models/item/pattern/empty.json new file mode 100644 index 000000000..181a096c9 --- /dev/null +++ b/refinedstorage-common/src/main/resources/assets/refinedstorage/models/item/pattern/empty.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "refinedstorage:item/pattern/empty" + } +} diff --git a/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/block/pattern_grid/back.png b/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/block/pattern_grid/back.png new file mode 100644 index 0000000000000000000000000000000000000000..ffb76f755fa9a787972cd4c17b1c3dca2b1ab4b1 GIT binary patch literal 1415 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61SBU+%rFB|k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*9U+nDa72B1$5BeXNr6bM+EIYV;~{3xK*A7;Nk-3KEmEQ%e+* zQqwc@Y?a>c-mj#PnPRIHZt82`Ti~3Uk?B!Ylp0*+7m{3+ootz+WN)WnQ(*-(AUCxn zQK2F?C$HG5!d3}vt`(3C64qBz04piUwpD^SD#ABF!8yMuRl!uxOgGuk&``nLQqR!T z!q~`EN5ROz&{W^RQs2-(*TB%q(7?*bKmiJrfVLH-q*(>IxIyg#@@$ndN=gc>^!3Zj z%k|2Q_413-^$jg8E%gnI^o@*kfhu&1EAvVcD|GXUm0>2hq!uR^WfqiV=I1GZOiWD5 zFD#PU%0_}#n6BP2AO_EVu8M)o`HUDF34YC)x{-2sR(CaRb3oXS&*t9 zlv|9-O^tOeQ%y{DEmM*#b&U;;4N_AQ%`FU*4PfSA({E{RVd~;)WME-p4oIBp4nO9trn3tRivpW-LH$<phIbtAf7XZzyuX?y}6TK
    js(5`t?UIDBps zydCLndOza&&3)TX$$#Ntw($~PaQ$RTQ)AU-lRSy4?42*SJ0GsFxmdA9qgk$bnWoZb zMK@VnzIL^xYOW?3hx(5@Uplo(g}2{>{pby*Tuw=v7q4Ll)rDvtlj$EKMOWD+zsT?&%D#q zZSuvzUsL5n%iaGq8`gzspZGIlE89VbhDqlqTc7{@waRx&(7)?D;?{3+O?r`dBOqvk j%+JG(r;1Me=Q3c({@o?*e|U}qsA%+b^>bP0l+XkKE;Id| literal 0 HcmV?d00001 diff --git a/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/block/pattern_grid/cutouts/black.png b/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/block/pattern_grid/cutouts/black.png new file mode 100644 index 0000000000000000000000000000000000000000..5aa1136ac0b015fc6025141e730120345ac23664 GIT binary patch literal 3047 zcmcImYitx%6kb3GR3ME?K+rgussUwo-m^Oc3$EQ_i*6}pE3N+F&Ye5mp}RBFnd$Bp zV?-qK5MvBtEFg(7F+>d{8WWTsRU#xpqLP>Z5q^mpUu}pI2@&hP`)VsKZBQne*FE1o zkMEvy?%mPS{MekDg*Bm2XiigOq7}bu$vtxhe%|-{5WuflZexcZ3f+Duxu=Bo?q3iJ z)pT2__Mkoaga(~#7#NO@!iB7h(V@`tl?4~TE)-BY>a^?_J$SUArYs{yua}ct(yd2n zt8tTu)@^D|!A)IIHRzQqsO1F>E6Ab%P=##9_O(KcF6!0rHyLJWst5_XVsxAsq}r1$ zRK4RNN(pleh|$>7 zQV3bMs@C?)G-1Nn0&rPA%#o0aKm%5BZjYBK8aE(|GAN7ez{gm=ip4A?lU4YbYO~oY z+7B9X*rRf6W1{_3uZ!4Lg0sv=caf+8Kw0s(2I? zfn|KEw009^YRvC^@@tnp-HAxr+b_~nxoe*k3&2+ph zzzb((K__BeyR&F5nbewWKL9pFO^FzdT@727p(zq4LnI<53Ji%6RVm6uBLZZgE{moN zAwm#V<|iE3Lz0TjFV&afK&+#>8k))Lg1~b!6BR`n7moxPAYtXQtUz59jfg0tincYL zg-aY{MrtKq8Cau`MV3Xm zJlri+3D`Qc`qSOE^g#bx*B7-gu zTVpKnjqg{g87aa^dKjc#c;PW2&OU$VlQC zU6dn?5>=tji2_1=q!Rk|u8SHkX@Xd(p__5NOe;(SyA$C}h^22n7+D9h%0*Nrssf%- zWJzFj6POG%1w}CwBO(c71~XVLF1Va83a8(v>5w|J3QazH4x0ruY=qV%6A zF}aGYO>yJZ#_9!=%|W~qYq+&f(CiIfg^C`L8K5dU!^@;RagH-UGzC#s6d9U;lqb>V z{MTkra;Qkdh;vhA2p`7CXY~|_f2!w5WaGN^@G0>@KJjcQH07SAL_8IJ`S|X~H%^V; z)v#s{{dv#vd+(1qE3Yite(uFf(>|H^LSJ9oo}hotjGbq9n6=ZE9Q^E=Z;tNQ8m8xe zJTPx?@82(NzKUK&Umbc^+L!#aJAXc&aPzIJ-?;nR-=03Qdc!-jx7GiAdEuMQuPms$ zV9$52UR$yIi>-&hJcjB{9XNlXw-CJ}bnqd1OW)~VE_W>b;n&>YnOP@4Fr literal 0 HcmV?d00001 diff --git a/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/block/pattern_grid/cutouts/blue.png b/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/block/pattern_grid/cutouts/blue.png new file mode 100644 index 0000000000000000000000000000000000000000..397da42e42137d1cb642ccb66d4d0bb90abc7a8a GIT binary patch literal 3070 zcmcImZEO@p7(PS=3MEa^;78PDn;-=Dc4xotc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og-21u}}a2sydSH&Fe63LHLg+qgiGLv_}amq1X!ANTKZn3Ej5h zxROZ33@x2qREG(&`%^w4ao55}%Fl$P0cabeG%(srJ_P(<^f#&ErdAFA_eG+-145<@ zP=Buwng39R$!c$H(i^WlUM*mzs6n(7%c!(ZQtSaEX`<>ENJSD=k`cW0R0N4sIGyDL zQ4};?@f7V@vu?N8dm2j9FzVctYeI)H?=yc2L_hg+Bs5Xp+US(He^$*t44W3N3spn{ z+t0n+yX@JvxhJ;_UwiU{oee&vRNQlB>x#qkAGl}ZwM|21CnCG43$?B7gN4%C>Alm#9N)X)s|N>O z*na+@?iaWA4lE3u8a(~$;=qif7v>cOYM@=v_*VJrHIM&v;FWDh=o5<<43-SnU7hjU zQ?<_=+C1}Y|G@UH9nPI4J5J7CK5+g(LF;ovk&mNWe(Zj}65DlZ==}{F4lQascD;Xw zueg7IbHzaM?;DE)kIl!a?eA2VD3^XN9vB=*4iC@!{{GagV>=Gr;cI>Z9q}=&ZuPp* JdzG8I{{ka63IzZF literal 0 HcmV?d00001 diff --git a/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/block/pattern_grid/cutouts/gray.png b/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/block/pattern_grid/cutouts/gray.png new file mode 100644 index 0000000000000000000000000000000000000000..eb4885bb5ffcd5e3953d5e4fa4df5717f04aad98 GIT binary patch literal 3057 zcmcgudu-KI7%xT<5X_Vq2b$P*NO-KbJ?(9K+i=0LJGL9WFvp#2im=o6bSt~JEp4~m zEhvP{KO_T<7>zsvQAq$rq69IbkpKxMh8VIe{6R1p{vZnp!&;}N-b8nPnY4q^1hHsI#(`QJ@<|o7m{yb;JpLU;ntGI4B_!B{ zQ-xa1+HM!E>|UPKy4y5arB1iXoQPSe7FtIRwOTSY#_mj^$W}6&S$LKvdYU0wgkjQP`TR8%lj_S>6`@ zi&Cw=?j>ZVu>#}^9p)Iexpdp4l%{3k0v@J5w2vxh? zk5bsvTnK5WsMhlGG-1M+40IR}Vu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main/resources/assets/refinedstorage/textures/block/pattern_grid/cutouts/inactive.png b/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/block/pattern_grid/cutouts/inactive.png new file mode 100644 index 0000000000000000000000000000000000000000..1a6fc9e69ab6fabbebe4cc452f5ae0020cc2d8c5 GIT binary patch literal 330 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85sBugD~Uq{1qucLCF%=h?3y^w370~qEv>0#LT=By}Z;C1rt33 zJtM=93Yk-ZigtOrIEGmGFP-Gb*P_7Vy0?XkOG|s=@B8Z?E3drB={7TRkBHX)?IO~G zKf9AQwE@xTV^P}2BowWlAF0;AZ1U7}=f3w#b8r8B(aZQK_x2`@r7E9oz>bZtWacu(WBHzqc!b`C)h+Rv-Q}vNG988WnWpn$H+m%>4c!bE19_R28Z|SWDhK6 zlrR0&^-hpkzwlZNkHnO&eTh5zWj`DXVOZC!$kf~a|De9eWK%GDKk*r};_OV#?_K9S QfxckyboFyt=akR{05*MjqyPW_ literal 0 HcmV?d00001 diff --git a/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/block/pattern_grid/cutouts/light_blue.png b/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/block/pattern_grid/cutouts/light_blue.png new file mode 100644 index 0000000000000000000000000000000000000000..cb3757fa5d2a2acce93094b4c5873c56ef87f0c7 GIT binary patch literal 551 zcmV+?0@(eDP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D02y>eSaefwW^{L9 za%BK;VQFr3E^cLXAT%y8E-^MlX|MGF00EatL_t(IPo<8#OIuL@hy4dCNG#x>ORqd9RfQ%H)(70jp zMpBs4{!%pYOQ$fJyK<1yE41j9rd**Upv>;hUN^nl-R^FC z*Xj=fF{vN?Fp@|Rzak+9QDZbJ7=lQGe;_d=ra>fvXfQ^>ghUAZs5AG~R$AJKY_hYn zGtayq&%EzD^I~Vm>iW7z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@MdXFDe{`y>gK}*Lnio2nToG!`&;3-an*b`CEsE{6tQ$S)g0ZP2g zv3x<=TF1aC4w7S~`c^?KF^)nKuS1REp^T^y6j(}OHNO#|!V4@fYna1Py$x24HWm2!6(-sIV22;7$)4Px%rW?(S-;KCcTO=sI=$XBFvT26`0=7<^|#~F zg$fEOIex~kWPXOKO@@nOt}kC}+EI7Dmo$iMQmR1D zxuE;ei6EIDHYV8M=~0;z+nYd`th+>Q4(3{MuNOF|z6&!vWmeFW8SjGh-A!j@fn`_; zQE`QrC=uZR)p${+q>!R(49_9N$_3Z&G@VyjLFM>D4&96Cd0O=ZFuM>wglO{Ko#7y4 z1)NXV8AYHpQQ&Z+hbV>9H4!O@lK>9gJNIG2g76>;b@k|v83P$Z3FML#`(s8E29bG#@? zq8Tf7D0pW;0dnK*A9d`o=#CzK8ZO6r;;^|8?I zv#$-WZdg|tIsMVd>#KzY1HYFH%!mxP&Y)7a9$7&Q&fgjNT>#A)sFKUS$@a<#M0}V%1&PR{KVw}WqrlbxwBjO*@^A_ z3xz$^3zBO#efshPBg;P9zU`SBEx4)XrENEF)s)t@B!{KW>Z|D6>dIaApKYHU?7sQ_ zgU1{7`Tg(xte!}|`vgDd(7b~~Rr`jy!(X&7q<=hn<-n2k-3N|!UHm50cdlkp`RTP{ zdDysp~|giwSmFm*wB?%OP_kNylU?E2ZpLHFTelm=bN7UjxS{fcbCV@ zUK#wVV(Yd2i$|(f-6+3y{*ApKRIXY)a_I;8`Y&~R>y;OV(tEa*R0(JL%U~q4_RO30 phfiJFICGzT-_6^{m?OvM$D?mI?^-ge#J{RHH?~CHdGgtTzW_~e_CEjs literal 0 HcmV?d00001 diff --git a/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/block/pattern_grid/cutouts/magenta.png b/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/block/pattern_grid/cutouts/magenta.png new file mode 100644 index 0000000000000000000000000000000000000000..f7c5e1090c7003f2b9ab83b795233f1d7d8f0e61 GIT binary pat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U-Gw@&{m(|>DXPx|JR(^qaT zdv<$$$$}N})Lv$1-SL`%nM+QPXZG||m)6A(4V*saJpW5waAyCPw@N=cd+n*R(rZ0W z&hD-yCeHnW)!+Jh(f8YqURpY<^YXg2Q&;Xupnex)0C&w1L}NnmoBTE?heP z=mS3<`uSw{?!K-=bKf}EIsf9Sqc?UfoYMHnyO(E7n(@l@=k!+(IO)Ik^mo;+`7`$S e?M?e0{;6b<)!RXwPk-Z|&ugpdqi?Q$X4^lgg7y~x literal 0 HcmV?d00001 diff --git a/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/block/pattern_grid/cutouts/orange.png b/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/block/pattern_grid/cutouts/orange.png new file mode 100644 index 0000000000000000000000000000000000000000..5f15468d0754a298b71ab98fa1e9f4a14fcb0169 GIT binary patch literal 3042 zcmcImTWl0n7~TSDuvkS*J| z)9$u{62K5dLW~a@^Z~^H`aoJPCWLSa7bV05F~r~%6OFzgipY~D^_;zRD=lqMCYjqg z-}(RleCPZBbGEg$K3!WguO<`<)wVRp+wprQxu;j-=VLdAA%5NGHh1}<(2R%4T@~8( z?wnAlW}TJn3_26fs=AX2L&MQfIG1rTIuu&GBN{Dv+t-MPqNCVXE!%g6q$H& z0E)u^#b_cVhKn)+m*jbs1F8rXarlEPKoeM+1`J>&SYbGj1e^+@Du|2%JBDTUPY5-1 z)pWcJ#0zI-U^il2yF2eKkx*M~KY+H5TH-MphZ?plL*h&|BLZ+#8hMC@B1C{7Yna0kzl~1X@e+=K zITvV(thS2H<4_^VuNV!Ajh#fQ>E1%4%yal+0eKetyC&!#>3+esFvUDg5xuB+{~fq= z;Q%C26vSeCo0UW9&bWnH^9zAUl|5afdq^cC8LBp0KGs}+vDS2;b;Yl=Mdg!Hg?eEM zI#DOWlopz;F&21oR2If(QwWoF2h|o}zGDVi=%I#g%eur5w7O(2KO{DQI^iya}=N-A_j2WFUzE zYgm(HMuU+k19?+mcwUxx329g~=2(*%vmo5#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outs/red.png b/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/block/pattern_grid/cutouts/red.png new file mode 100644 index 0000000000000000000000000000000000000000..6479cd8bcaf4118eaa7c341da0f45b0e79dc48c6 GIT binary patch literal 3054 zcmcImdu$X%7(YM>4|!M&Rw8lP5=80V?(FMsH$4!0K#y{zwr6RHG0yJJwVU4UZg;o6 zD`H~_QH#L{l|S&27!p(xV-O<`4MI>+42i}^NVFPIi7`R(5rffaow-+AX=#J9$-d_M z&G-1t_kA;c^>u4z%~&ua5D3hQ)kGWcdoH=BO~udKejSAPHQlLc@dAOF^T<6Z@bt6g zfxwIoGtulf$JeR4oeo07)=)5;b}%{+s9KSApx%yrN<*!t6`?P_d5oq^BSLSG;#}OR zMr~%zCKokss!Qmb+I7XCS1hNhvMN@PMn0sn>6GQE*$AD}tKx4m%+gd2;|DkrKSL=`R?TXT)1+7Mk`u!a93 zber!xD$8avnP5f;+HNZg6h&bygt#%RgZ8u@tsbcQb7k#665ag+)8%)cvGu|B}@WKQX zg+7YVB#{^{%m`e9=T#1<5?IFJ4=xXl^q$JOF}T z)VAI=af!p!aIM5E18Yp8uq^0?#t23TF=0ali~=Yv^iRFVL#DL8}$vO^BthJ{VpSA&>>0 zkw6F+xrT#*C@Ce$rDNiUV3>1>QAjvqf zlaORI(PsbGW>0b`N5imlQ*j6%#>i*s6o`LH=SXDXx^?j>ao4v!8v}t!6|v~bM0oqV z{YUF2-!pghhn0(${4qJYsQf_R&kHM4>CFr0t36%kc2#bkx}dtU@_DMNxBT3Xo9EB{ z`@qJ>`uYdH?m2ZjqV%`#4Da33|HhzpSN9;lO+R0D^ZCvTfwE=OW0k+$8XJf&X{tF} zcE((*Y&(46x23x~KD#)j{^F%0x7_ekMe9MfP6=zadW zPd|BTeP%(+BfD=L=;(8z&e^j^n&usE*|)W}{7JiNVD_Vj->H4=)Z3}13)F$mx2C~o z9@={RgXcPSz8vfM{6ypHcTPEda87DRg|PTl|GSRmhfYj7wr_B7=IwKSpS*_O+q=E{ SrLE*d9$QrxedX>4w)_L6hVdW( literal 0 HcmV?d00001 diff --git a/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/block/pattern_grid/cutouts/white.png b/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/block/pattern_grid/cutouts/white.png new file mode 100644 index 0000000000000000000000000000000000000000..358dc332aefec64600e3085dc00ca14662867542 GIT binary patch literal 2978 zcmcImTWl0n7#<*~RA{O^2qeT|Fu^Kk=RP|#VS&;G+r%xkY(pDk^vs+y+mYRwVP@Lh z)))zi36d&_5~GBK#IQaPA@PL=C1QZY2e95C=z|FclRg+F#uzk8>N$JsR$AJiOft9g zf9Jn^=l}n6UhD07YDLSM7KUL~ba$ou$h(c+58OwdkN!3V$!l5AH5f6>gDdI1h&gg} z6~nabb+ZHUK;~)F_6rG!d+`h4Pw{#SgH|P{&1Y) zh^N&M3PD4y7u9GYgz+U9@M1!sAyt6LZs3C9Fkdl_Y#!%v0ef*ouwnyCSjuD?@LAOs z3Jr7=ZyzBZ)nc0!9c4!Y%=h8Q9}aE2eS}zCUw15u`|vb13z$yejmg1~AN$deKL-g7 z@eC?r*O|j0mCS(Rk~;^KN*d6>>cx?hs z!x*PHnn*yWb1YqL zlc*=ILRw!bPOJ?M&{WM2R|k`lKrUXS&zgL29{IGm-*XAY635bfF)Q|Wk=8{V&{S1c zYva9c3FimWE@3UII-)g824_lWC!-Z=cDWJBxzSp$*@gGkzVa?xDM}OC)evl&ofvVo zVRx1VUKo{CwZ$P!$ht$;R$-Cv#6=k5jvQfl-m2i|az271cXnM&Dxx527&wMZatJE| zuw*p}G~KW*L6$HUll9PVcU?9`#gycF4c(3FHCpW<=;bikgm~`mgV8kwLfcS*Ws_ha zR7kbik`9EVBpJFRAV-0-1v6_yxW~cRzBhuyro;+h2+2l@!zjf$p`#;*7H{%x84R0@&d%Q?IJs?!u0RQg}QT zncP9wrn2#xv-N_7<{;ULP14%uY4%7oY|Tol02-PFM3t5&R1E-SN0L=dQ*Eb`(NvrN zUzzVDk_dhOQUcPGEQ zG=91;I{yBNcUBv@OXKd5AInSR^DiAb@a6DxFE2WCbNTsCquhpl2ioilm-IK5>|3>- z`RkMCFFdmE#Md`d%!Cn6=##xy)^zrt{bg(avUMzX{4n$F>7O6_TU*?_wsfPteEHVy z)^K9u#ckgxAN+LiK-;#h{i{Fwb+R>meE;SR<#c;_@v(Iq?k^v1X)hmb{d^n`CYV2` fUim@0w&e1MZ$EqPkF{lbitgUtlRmZWh5i2kAobD( literal 0 HcmV?d00001 diff --git a/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/block/pattern_grid/cutouts/yellow.png b/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/block/pattern_grid/cutouts/yellow.png new file mode 100644 index 0000000000000000000000000000000000000000..277ddfdc81511ba7a2b4609603531b1ff56e5812 GIT binary patch literal 3043 zcmcgudu$X%7(av<-a!aSgAbN%6^!id&hG8*?WQM`9?&XRYN=8pn9l9awQKKomfdad z+L&l)C4!(KD3L0WXpE0UqNLG3loS&nYN}|W5sat^XiK7~V4`4xGxusMEp70z$-ZWO z^L^j^=J$OwTWV`o&X_uHY9J7pQC$_SBkx)Co_sxd&Od({lGhZcYMmDdOq)aR34!kC zN&JboK@b^L3j!q+QiR2fD2M_t$UG1^py)zK2P%`lSmMn!6M9{AMcx#&N43 zVM(O9DWsgDS=-CgL|ffolm&Dh6YGaiM6 zV)rmAd@C`EL)tS8iZa$HP})<3I(nsxppV^pjFScJ)D~i6L=Y62MQbhF#A)w#I`RAf z6oo#DuvAE#5auMIUKDi!=rXuNARj^w8Y9v)p$~_GHBJEaKp>LSfiMh=O)JqpCe$?a z1a?!9ES!~sO^A2wrmVMEOs}>*AKC`0jz(A#YS6MwT{KM?H;~MkvKZzRHH0{*gu|SM zWLY#c(NILOFg}WnRw^nwK9^r6Hi(VlYUl|8gari(oETOWE~JKJVog*z1QMo9$OviS zP{G=2*CHtnlS8f2s7zupfx?Ppm~l=rRm6qO5a2Wrrw`fGq!5tQIN@;6ZzWD*H-=5Z zxx_MbwRK{igbHbXMOct;Y@kw2w&ogDQ6Lu&=riBHZjAoH?t5*EP)w+ydeO7~*O1ah z0#IaGlJo7gRt6;-q84Gz%LSqg?O8XxhgLG0p?a0&5zV#dYt0(8G5?jcm~2w&(8x`} zpz1^>n{T#8Sm5zdnKPSiMue=Zs5S@laKcYR7gaP7hR4hbezf2{*mm{Mff@n=P!N~U zB!!bvNZ{g;!A+iba?6pq@0c0jb zRp#QNDUqxQNnF@SNStgaMASeQG?}RI%5@mAApFOZF|gf++#$kppbN=Hid-+kCS06i zpyMPhBb!}(n{DRzr(!}fK4u2X�uC$hC%OV5pa32+Y6eZ%oCFuNwaEi^S6dLaq$( zf3Fa^|7ecM6?AQ~8?Qc6Ef}u`$xf`3(mqD9H-Tm-aiVCbDRB%_CjC`o%)bi(NLh$?66-N0c=Fq~%V*|fFGVi|kI-fcA_P$kX zU+b-Ywru9Br}qx@3a=#9odZvQwWs62=0Mq`%(kjo%a$%ZclzVD+Z^r3#S5!vcU$wN z7k58U%CyYrzh(O$ANIZV=m!_-W`A~8&U|rVPyZ9^d%7on|M(3rAGma4%GQ#Bo|ViF zw16xf;S)Y zztpxIKeF`VuDyr8J^9P3z~>L1nX{`bzU`(o-niv>`48XyX{nuM$NLv_t>(I9pr1cH z`BK&XCoArW_8sh7wDpAxpKK^Ux_QaNr|{X!_+(?Jdh6zwrq8{5_Xc_luU=jg-M6f9 F(_i@I^UeSO literal 0 HcmV?d00001 diff --git a/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/block/pattern_grid/front.png b/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/block/pattern_grid/front.png new file mode 100644 index 0000000000000000000000000000000000000000..d6f059405807c9dfa05e56031611beba088ad926 GIT binary patch literal 554 zcmV+_0@eMAP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D02y>eSaefwW^{L9 za%BK;VQFr3E^cLXAT%y8E;2FkAZe8V00EjwL_t(IPnA>Gs=`nZJl|zEHWYioE}~*D zsQ6$7@j>7H;JKL*eFzb*!njFx&t!IXW5VGuEXzV55P;9;QzRmh2tuI{JRXnW^?LRE z9a$R;1|fp$^@{ubj@#{~_9*dL4ehABKO2!{KKI z&1UnZfOF-DepNsMPS9`^o6Sa}au$9=DwWdMKOS&Va=DzHb3fn&x3t}EzxIG0ESF1U zvspXme!vN~K+mLrJH1}7Q7Vmi`i>58Wkv?3h04WnJsV%yWLJ+Y`0rs zHk*lfJRWQB`9YD0_xu(!OiU&d#p!gaUGH|gDx_iTx!>=j*Xv<894f~pH0*;+ sG=zSTkZtjrZ>3CL6RdsL5SC@(55YB7Ik9^q4gdfE07*qoM6N<$f_Sj#zyJUM literal 0 HcmV?d00001 diff --git a/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/block/pattern_grid/left.png b/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/block/pattern_grid/left.png new file mode 100644 index 0000000000000000000000000000000000000000..a4a5b2664638ec8d9cb7db5394d541f394fe092c GIT binary patch literal 1445 zcmaJ>du$VR96uh;%7#H)2y6k)8!97f@7?u|6}-d?*uVJi9v?Q2q>8GRvF1~pg3G)B+DiaVNl}qT3Ymv$t8Ec*Z1@JetzG_ zty@qsZ~VBdaR2~}w->QaZJZE)b)&WKd-Xn}HcU|q%hXc2LJf0@05H7l5kR}2TOv3G zj$i)P8KD3G#z>;8Of7S~OnYU&fs5N1BL0Ae27rROkpSmiCa9oCSRzVh==Zkc5Ge9y z$W1yBN5Crh#G zWoGE1s4~X_&?+keNE(cKFN&gIK4m~j6ONI2AcmkMj8HI&=n<4g5gJ3lMApHXZc*apa4@n1Tx znCc$oV_Pj`c3=ih6zHt!p%+1Z(uGkR*^`T%0soKETLulfib_Rg!B{h{Vh zck7-Ud-VMLE+4Ub!>tcX{*lUzRo^%G2)1*3W<&C6Umk?TCe zSEt9m5Hq0mMFXL>s;tSm=dH2X=k7i**Ou(P-6)6+i(gtfX9pMBkPfez`*hm2nv>5R z{PEpFX2aPlN1DDlu(73j>zk)~>bq|CUF+x%^@ZA`+~HVz z51I{}nz+VY>+`KUd>P$Va&r8d{E3H{;_V+U+&W=L&D4SJMXN>uTc&t7?aZ_N7XNYD M3rpDjmc`Zo0Dzqk;s5{u literal 0 HcmV?d00001 diff --git a/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/block/pattern_grid/right.png b/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/block/pattern_grid/right.png new file mode 100644 index 0000000000000000000000000000000000000000..eb4e500c5ce553624ae3af919558f6e6a535d46b GIT binary patch literal 1444 zcmaJ>Z%h++7(OXs%pul|FC)&}PGfMhy}Mqo?cG{y+iRgh0SgY$gmLZt3OCxjdcD#@ z7In^zxJ(^r+{BF!+uV$cIt(sTg34Ijgb_FV#~^GfQ$HY*jV**Z;;um1J}@u2`~7>L z=Y4+fpW9trn7d?g_F@Qvmbmj6uQI9=Z+eRIeYdH`pbXE-&T_d#49GE70+5XpeE@cc z*lOSfELXqv5->xMO5jV&<#JB}?H5B@HesWUhr$XPg3Q)A^f<2dLrm8YEECP+013sP$7EVqFKDvjWL8wUrxwGMhc1VDgMX6L2gUKo=t`TK1QX__8hhrw|a84O7aAGX7CXuGu zTQfl7>j3AH#1K3aXPRF?17WvQHoe1U(&NsAew%@`nT!;}7+r*oaFNIymRlfpb6ETT zVo^m5nkbV06isqVsl>!|z6F%Ud=mjd=^ROEkyQu3&W4~x-@6%GX?)P!+#R;PlGa8J2jJaVuXY|OH$nT@IKLt{HvKalC5@o?X(rx8_s z$MA*$X7ZsW!=c{mZ5_#~xO?Wo9ck)!b2~gf`Otj%R(|lpip<6XZ;yQSG_s+jrz~p8 z-gB;7y<_z3$ZrFG=~LU=(ictseZ^F`f7d48<%tW=?_Az9m~~PCwFftf#mC zkDoJC)W@1VXVb<=*BD!kM-Z1n3Cy=9A|kb|I191FRRadAf-wxw3YAZ zR&7Y%E@WpO8WwWXGV|_FKWSaD)H}WHm*@xE&lN!}w_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f(zJo=7a&bt|hqknEbs7uH8$ zomtGu-aW3!*QrvD9T=$b-*C`AhlqFM3=+4M;oX1pi`&mm!RG;bBF~=YY&Lqs?W=EiOht;O#Yc)mxfY#tU9EPiqJ%t zwp31EJV!2Sw6X%KZgQbAhrkV?6Kh>i&m9- zl>DXW<4}J6@#zeUch9Q*=LHMZL-@);b=tNZqD!fU3m^=WFlyv2a*2zpwwLiVUDY`vNaZYIHZESdPOQ7N>ey zmHDQm!m`YzFoIer#ghg8xG(s9EEenQ`UYmRR%ZeQv==2}alRwr7H-W5-Px=lx%uR$wju#CDOjOkfLW7;OZu~rm_bT^Zm+4{y7gOY^7xQaN< l`eXQf=H%RSDY`{}9`d-Mbs$FnwCL>?h6EnQR3C`F@OPN{shI!( diff --git a/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/gui/grid.png b/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/gui/grid.png index fdb2cc35cf8aaf75a5e1436069682a8dd5c10c85..427fe94861863ec066233b7ce5ff3e3af2144018 100644 GIT binary patch literal 850 zcmeAS@N?(olHy`uVBq!ia0y~yU<5K58911MRQ8&P5D>38$lZxy-8q?;Kn_c~qpu?a z!^VE@KZ&eBzC?geh%1o(|NsB7W5+^6L%X}X&CShk-@XkL?AfqU2uN|11o;I66@UQ4 zz2?1G+w|DOLT{aMDy;u@;;`e^TEjLX* zA3mz_wJ{>S*2(IG_{zN@hKHJTUhnd`^Q-9et{Am8CyE3PS=)n5>sz7UtCM*Vd&_T{jh2iG=4{3}$a_hadHRL}475{n6 zz{C8b@S9w{^qKeD-)S>5*3H|KJN>8d$BVTfuUekC2qdB4NwJ?aggIfeJrhh&!5tKC z5HR7qWiEu}aPA)mOt4vom!W}o!Mp#zdtbfQYiIJ2YIw$Qy^P_ucImzA+zRb=*H=HE z&!><-v3gpvOukjao9YOV)(Ok~1%TA1_lb-g4)@M%DnEVa_j&EB3_H`S$}De#q7MWV ze#?nLSPTpYuGcFTZJV0ZaA)@$(R*)G-qmI=l~TCBCA~HNS+X`%70h@rx76Hnaab2) z(fdu|727B8{JwT-RzuC@d7^bQ``5xu1vvo5zH;|TPn0Ix3}v7|%KgK?m?!MMzW31Y zyJz<1uMJ^-vi$7kL-HBN!(hs9e%}CNGQ7$wc3&&Pd`6IgVK1ZG9zopr0F$3gGXMYp literal 910 zcmeAS@N?(olHy`uVBq!ia0y~yU<5K58911MRQ8&P5D>38$lZxy-8q?;Kn_c~qpu?a z!^VE@KZ&eBzC?geh%1o(|NsB7W5+^6L%X}X&CShk-@XkL?AfqU2uN|11o;I66@UQ4 zz2?1?z`0BYXtAGPT-jfU_4uuAWm^CVlH@5EyWRQD({}R(j#`(MD z4%quO7&Uxf{r%5vh5hl-eq4-ov3p9r|GCs`n*-8v=fp)8pb3l+;z6U|wXx$P&R=^#A_)RqvyxG4ae|ILr9%EyK0&S2b(I z8O;AK-2B~Mh9Q6A?MG&P<}wV`(^VUQb{)9N?g2C{;r%8Sh6eM^Z)|5&|Np7Nd!TsP z+S^zC;7<6a=M8hDz=PlW1$N%@lxTRaSA8(u`pn+xewP?(E^lj!f0nEccMsHjpdXny zCR9%fE)`;Xu=8}>hnsxG@0U(CVYt6#?Stt*Z*)Ta%W>ddDkoSmhMAEmcr-?EyHYfH7cV~WcQEo)d#mH8-I_pO1vBp x{O)OdsCtf+SHqo0WYW7gtoFNMa>?dD+cP=8ms-ApD}i}|!PC{xWt~$(699V6V~PL( diff --git a/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/gui/pattern_grid.png b/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/gui/pattern_grid.png new file mode 100644 index 0000000000000000000000000000000000000000..93b6d60140357513447d9dd1f43382b3c458cc18 GIT binary patch literal 930 zcmeAS@N?(olHy`uVBq!ia0y~yU<5K58911MRQ8&P5D>38$lZxy-8q?;Kn_c~qpu?a z!^VE@KZ&eBzC?geh%1o(|NsB7W5+^6L%X}X&CShk-@XkL?AfqU2uN|11o;I66@UQ4 zz2?1=FY5(|=DF$B>G+w|4^bZy89mT@1MKnHqu-vOhqf0p-eXANuU&$OO@UsQwP zX3nu=%og8YP2#S}cWCflK5stAC6Y_bfF#3-G+(9(pUv{c8cx5BjcPAyeBaCdVLI~# zo(IQYtbNb+`FnKgQpE%35AL38^j~S+R8gRolnJ*$Iw9bR)nPUWE9ILhRLp^GB`=i8 zz~HdXI0wRUNQ(yrB?y3x*unVackTW#+j*Nb4=e$OwL$sUACp=5{JzAOJ#7q? zTO}9RSGqBQrNFkNF2Bg|Y5t_c1r!Kh%C;c z5H7F4@Ve6IyI8}fUjjfWBad7LHr5Z43$Fv+2=nzRzjk(sm#42>yBN1x7U(exivvFk z80HJ#FV$(_`5XQIoW1OUqVQuY@~s-?>;}a@!-Tu)96-vld@}>X4#p?SC#$F1y!-oj z>OF>^if^uEZUF^42soU(s{>&%Ff<(RKhd-8lBB}-*l$+%Zl8R7&s%#h<0qfnuYRPg ziw1fU44&LM3v?L-yeL;+e$^|z;ZFI@*A@Bd{nh$wzp$M!&RzX@^3FU^`UQar#pc`) z7BD34&z%#dJ(uwr)N%V5ir$y5fBg5Z&AYu@E=en_H;a~yzwjyyrXK8mDCgJRv$_7fY-kZMS;P#dGL(TTo`u`TW%XfDZU-UWA1{*mu hhDw_pcJ>`{^^CO*uXmf3T$%$i&(qbgTe~ HDWM4fYdkH7 literal 0 HcmV?d00001 diff --git a/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/gui/sprites/large_slot.png b/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/gui/sprites/large_slot.png new file mode 100644 index 0000000000000000000000000000000000000000..6c21320cde395209d9857908956c86b4be570287 GIT binary patch literal 154 zcmeAS@N?(olHy`uVBq!ia0vp^QXtI23?!pd0{;Rj#^NA%Cx&(BWL^R}Ea{HEjtmSN z`?>!lvI6;>0X`wF=H}+z-QEBH|6d&O{W3_fz$3Dlfr0NZ2s0kfUy%Y7l=5_O4AD5B s?7-H;)6>MEU~+2l4D}@}>|S0B2UJA`&z0jgr~boFyt=akR{0AA@TLjV8( literal 0 HcmV?d00001 diff --git a/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/gui/sprites/light_arrow.png b/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/gui/sprites/light_arrow.png new file mode 100644 index 0000000000000000000000000000000000000000..da1309976882f4250f839e6adba86ba5451b8c52 GIT binary patch literal 200 zcmeAS@N?(olHy`uVBq!ia0vp^VnEE#!3-p?Z$2Ldq!^2X+?^QKos)S9vjzBsxc>kDAIJlF_i@Q1^;Jwy4}DF$m1;Vh%9Dc;5!V$jK}j= zqyPnNJzX3_G=h829pqwA;9$P+=l}e5+eDY}-EzEX-Jv{h&aBA21`CarJoJ^-e|*j` oCnNn{1`c>;VwT+PkRySuyp|NjpZ@H_k`1*EPd$S)Wq;-Izi3y{xQ;1OBOz`%DH zgc*T{_#sfCw{=dy zw0%eT&om$Sd7|-vVY>f=k~F^u1t(`6cx;;Nw4Tv1-&dY#`JBJKKa`z**IOAW-%*FV iL2$y&=*zK&`xp=JF-^?a`0F0fYYd*QelF{r5}E)jV~3Xj literal 0 HcmV?d00001 diff --git a/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/gui/sprites/slot.png b/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/gui/sprites/slot.png new file mode 100644 index 0000000000000000000000000000000000000000..cc17511b22da9b05becaee7200e4a83a256d09e0 GIT binary patch literal 153 zcmeAS@N?(olHy`uVBq!ia0vp^LLkh-3?!F4n4AKn7>k44ofy`glX(f`u%tWsIx;Y9 z?C1WI$O`0h2Ka=ynwy(9UeaUQXH<9idRh{4m<&t;ucLK6TkLMZnD literal 0 HcmV?d00001 diff --git a/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/gui/sprites/widget/clear.png b/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/gui/sprites/widget/clear.png new file mode 100644 index 0000000000000000000000000000000000000000..a297d3218b2266ab25bb7602ca110301df6289ef GIT binary patch literal 158 zcmeAS@N?(olHy`uVBq!ia0vp^>>$j-3?$8JydD54#^NA%Cx&(BWL^R}Ea{HEjtmSN z`?>!lvI6;>0X`wF|NsB*?(Q}>H~)W)`yxoNz$3Dlfr0NZ2s0kfUy%Y7l=F0P43W5; w%)rFR=H}?g%I4-gu;C$`la>k&TQ~e-wY^2dZT7boFyt=akR{0HSj#&j0`b literal 0 HcmV?d00001 diff --git a/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/gui/sprites/widget/clear_disabled.png b/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/gui/sprites/widget/clear_disabled.png new file mode 100644 index 0000000000000000000000000000000000000000..56741f57e7912405051af91f5b47c73c409b9b4e GIT binary patch literal 158 zcmeAS@N?(olHy`uVBq!ia0vp^>>$j-3?$8JydD54#^NA%Cx&(BWL^R}Ea{HEjtmSN z`?>!lvI6;>0X`wFO-)U1Zf-I%GLtSW02#$u;1OBOz`%DHgc*iofy$RWf+G`njxgN@xNAldL9_ literal 0 HcmV?d00001 diff --git a/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/gui/sprites/widget/clear_focused.png b/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/gui/sprites/widget/clear_focused.png new file mode 100644 index 0000000000000000000000000000000000000000..6c773af481ac18ff137e81bfe0978854ffc1aa09 GIT binary patch literal 158 zcmeAS@N?(olHy`uVBq!ia0vp^>>$j-3?$8JydD54#^NA%Cx&(BWL^R}Ea{HEjtmSN z`?>!lvI6;>0X`wF|Ns9#a^%RYS+lB=o=1WN3p^r=85sBugD~Uq{1qucK{-zs#}J9j w$qY=4Y;KN@tZZ&>ZVHMF>5WHPrc4oG5ZTB$^+)knexOPQPgg&ebxsLQ01Ch>4gdfE literal 0 HcmV?d00001 diff --git a/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/gui/sprites/widget/create_pattern.png b/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/gui/sprites/widget/create_pattern.png new file mode 100644 index 0000000000000000000000000000000000000000..5f8f20ae9ff984d3b4b982c9b9393c099bb73b28 GIT binary patch literal 363 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJV{wqX6T`Z5GB1G~mUKs7M+SzC z{oH>NS%Lh70G|+7NlD37t5z*vzC1raf7!BSd3kw-g@xJK*+D@;IXOAS#l`>s|1T&g zC@n1w4GqoB&CSfr3<(KYy?S*?Nl9d6WO;dcSXfwETAIJVe?&yYiWMsY0s?}AgMEB_ zqN1YW;^JO>tDO(Di?hHZvY3H^?=T269?xHq0u-F$>Ealo5uDn0lkboL56f*mvnLsI z3naK0|NYnBsO;c$ru*s1byFYCzc_Q5o!g8X0zAjAJwGQba=>t@jq-&@N)tr9I4zx4 zb?#NwoXzm*;SKGdPedIKygHO0r6lm=k6@0Im*C5$iT4`x^&aKCuVt^*-gmoq)2tm% zEZ_PYPCS~rA}W8?+HGa|ae`Nm7hhef8+!F9|KSfzF2d|Dr*1Vq0CXRNr>mdKI;Vst E0I21U9smFU literal 0 HcmV?d00001 diff --git a/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/gui/sprites/widget/create_pattern_disabled.png b/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/gui/sprites/widget/create_pattern_disabled.png new file mode 100644 index 0000000000000000000000000000000000000000..02a6f7f2db128274b4b42c4309772609843935d1 GIT binary patch literal 332 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJV{wqX6T`Z5GB1G~mUKs7M+SzC z{oH>NS%Lh(0G|+7NlD4Z#>Tq3Iu8#IPft&Oe}7k3S0^VY9UYzS?rwd3{rdWPZ*OmR zcXwS~U1MY8+S*zJ0|Or)A5BfofPer$KR-i5LoF>W6B82)3kxG7qoZ#{vw?X@k4*2C?RC^yVzsP5O#b%SYrAV30yZE2oGNzu|0id!{3!x# Vp&v?Hq=4>W@O1TaS?83{1ON|nalHTl literal 0 HcmV?d00001 diff --git a/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/gui/sprites/widget/create_pattern_focused.png b/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/gui/sprites/widget/create_pattern_focused.png new file mode 100644 index 0000000000000000000000000000000000000000..75dc86a18bae8db49a3dbd4a46dcd77e7d4bbd60 GIT binary patch literal 369 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJV{wqX6T`Z5GB1G~mUKs7M+SzC z{oH>NS%Lht0G|+7NlD4Q$Nuj>@qgEm|8*VvcOLp*)3&d%`(Q=Wo`|HGO+5$y|Nq}M z;c#^7oT`>RrS-d_Qf41K^}nU>P<-ZshOPr0la5rk?u|*CTU5IU)Uc##>RVXNQ9v9mQ7P2<3B>*FDakvev+D8f#7!>${W($G5+D ze81}~%i}c#Y}{YuS?^ueic^Vo$y)U_YHgA5PW!Z(uco;0)Lk<1&+_I7l#F-(2Xr5U Mr>mdKI;Vst0BlR0dH?_b literal 0 HcmV?d00001 diff --git a/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/gui/sprites/widget/generic_small_button.png b/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/gui/sprites/widget/generic_small_button.png new file mode 100644 index 0000000000000000000000000000000000000000..e0f684b0fbcdef093e0360fe4a3067ef12208fb7 GIT binary patch literal 356 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJV{wqX6T`Z5GB1G~mUKs7M+SzC z{oH>NS%Li60G|+7NlD37t5z*vzC1raf7!BSd3kw-g@xJK*+D@;IXOAS#l-~$1*N5> zp`oFfsDJhAJj4UrN4+{%ROH1?j_m7B(Sg~S7KtMonaIlY$PgGP? zTwL5kjtoe7_94*`DF3^=;tN&ul ztN;IJI!#uUdVjjL-CE+GY1^`uw>j9Yo4Pmh+q*OgS#+Q1aq(_&iSl5XwD9V|i<9lT zXU{peS84hR2Ci)kg_ngp7hLDvz^v=KmAS80{D+vr`P)3d)^*(1Slw(L@;Kiqt=G$J vHUH+Y=<01NR@{8O_tvFpSz-^|4}W0Pwqaj3&(_fw=r#sVS3j3^P6NS%G}N0G|+7NlD4Z#>Tq3Iu8#IPft&Oe}7k3S0^VY9UUEgef|3SdT(!UcXxMP zU0q{iDaISV`@iy0XB z4uLSEsD@VqP_V(%#W6%9IJLiPx#1ZP1_K>z@;j|==^1poj5icm~cMHv|xy~h8)$p5;;|9*(Sxx)W^hQ5J|!FYna zSYnxijKPPI#(jsphLFQsWt@71ymf!NhLFXDkHlJJo59Nedxg4*lgNaQ!e42ifQrC~ zlEj0J!h40iTxOksiobGwxrC0xe1^M8M&uyeB6b1xMfuYTjUCsky{ts_kf2JtJunogFf|}4>)vzs*3y@9C*8%?3)9lI2!O2 z+y!oGeg3U*I5B~$v%&@BK^#1o$to<;UPWRX<1Jd{F7kMurHo}OV(^nBc>!Y53j&y# RA|(I-002ovPDHLkV1ke$xEcTe literal 0 HcmV?d00001 diff --git a/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/item/pattern/crafting.png b/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/item/pattern/crafting.png new file mode 100644 index 0000000000000000000000000000000000000000..a23d840a5a5202f168c8397f68787bc135a92414 GIT binary patch literal 489 zcmVblfO#>aTvxQTLg!OXp5R^XvoDe$e|hzJbe#r5o{>h z0%_7OcOdAIQTP|!BsjS!H#9lu6gQaXk0XKxB@kx^!NK0PL(6^%J@fN?cz7RP;6Ft~ zOhmkN*l`^0_xsC1ZqE*xh`7_~aJ$|98|3c%h@T(s`8s~UM8uY5v1M5cA)b%5_f}qU zd=f|Rsf}%a02@1gB+_{ZAut#WP$(2osZ`wD%4}HIb#&e~@zQ<7>e@QCb^}PH^T=c} z==FMNG#U^>V77@1@cDf3dcDvz4W=`~e&iIF>J5^~B!Fa1gfgK1|bBR%_geVDk6~x06^Du1cO10 z$K%D@1m0+6YLjRXdy4@}pi$#t`qs#q6EEZ!~mX{0vR`0;s%8GDAhp_+v01jnXNoGw= f04e|g00;m8000000Mb*F00000NkvXXu0mjf@utkg literal 0 HcmV?d00001 diff --git a/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/item/pattern/empty.png b/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/item/pattern/empty.png new file mode 100644 index 0000000000000000000000000000000000000000..5b838ac0ecd3ad21f1d4e1304de5226eb833baa0 GIT binary patch literal 15031 zcmeI3e{2(F7{?EEh$9e*iUbK<%1rpN_U_uXYtOc@t($A4h}#GoM&Z_byIpAS&bu4! zmOyYI5g~+(NYEIT5JC_EBa=)7+?SE^L^g;^Stld`{&lqpZCJp;z`96MU4&C2I}Db3G*|06#Sk#a8H1@$JN>F51ogp@)R)JQjwnGE;9rGH(9ZSO=(K6d#>`m}cAO;M9PQ;?J&L@19q%IGCo6U@c zPIfVt`YaV@Lb@?DpRQ6gKs#+NYnbCWy4+*qoNkBRSxVbk&dIPIhGVTP$8#)iXX*51 z@fX8iUQLYfb%C06I%xSUt%jlU3=@yXZE=T9(OMYJQ@rmoPev>85&#Y~jB(({U`nMAUlW(O%U2|;Bz8_N_562qAowM~mA zhbD#@5Ct(H8#;{R3dX6eilOMO$}lN2?qL(dnuJ1`+y%!Qixo_*8`aAof;7^Ck$OYB z3Ya>eD{WdBR4;>5nO11_h7`#bCr`=r3_Es^kcJ5}J*lwdQb<+E3+KvLX+SU(twB+u z{?sa)KZua7s!FaZdip|17L~X@!^@x{*?MQyKtM2nAFfB2m33QLX9MTvxpLlNx3c9t z%jSrrdLkMjMU*1#`5G=$gLU$3d9FrIPgDc$A5k!b`%=m6o1-I!`G}&$1j8@IgciW4 za*LPAHsGUir=0ohTQD#_M-{oKLh zMrRg16yk%jZU}Jj!9a2>5*!PNM9M|rhKG?o0<3OV8T@jTHCr7HPIP!gHw%C}xf1fj zvm;AO4`xqGo6~#{>74K((l2QeJg$XkPM<-N50avQ%#c*Il3CYw1iV>|dhmLFYqqY* zgH;tY9hk?4&oX#!WKLq(HFJ5B#}6-r%_G?#Hg`1;y-Z$fc35bb^nVMO($5JWK1aM2 z$hcD>C6(+oyojzujJTkIiWazE?&rWtspf~F^0CuWPgu~g%|w)hF3Z?*NuiY;X`xXXlOQafh-w*dpaA^oD*gKeWcE| zdibOR{4S@{;q)?SGa4~pN`Po%K!RtRZmvqsm5xCj1p}Lg3(Rq(15*Xec_vA2sZ=X` z;(-raOy+58$ZpH*g@^egJEMoGifEA}2oStUaN+qNUV;k&f;R~+JRihMa3MhOCc%a0 zgLnxp1PI4T@Fu~9=Yx0&E(8ePB)IT=5HG=n0KuCC z7oHE|CAbhEc$475^Fh1>7Xk!t5?pvbh?n3(fZ$Dn3(p7f5?lxnyh(83`5<0`3ju;R z2`)Sz#7l4?K=3BPh3A8K2`&T(-o)Z6&c440Wcboz9KM~{vGv*p_+}#=uB{7ERL64^ zwQ?0j-Mt6zHz=x&rKq2mP!zv~qMlK@7N4r2s1dcnKt)61()LZhUB~A<^=8ipr6*Q9 zw#@7qbL=?%Sy9pR^)sa1BPVpqb2=@}D`tMIPQAKx>l+*ItXMZj?>`#vf7jDD;{AJp zO)0`e*Z%3EO~nyeSToV^%svC{Er4dzIuGu*?sFv zznrvj-pZ0ut43V@b@Qp_V{-3@2V0tI-rM2aUbHdLw7Is~-`%rl&(2-N!RzhkB0Yk4 zO5dhWC}E;@ZF#rt#Nqw>xHbDqgI%lX(Rco|eY*GN mYT>P)+GoGAx%hmX|Q@;U~lD;&i?>vN`RIC literal 0 HcmV?d00001 diff --git a/refinedstorage-common/src/main/resources/data/refinedstorage/recipe/pattern.json b/refinedstorage-common/src/main/resources/data/refinedstorage/recipe/pattern.json new file mode 100644 index 000000000..0ef8ac15b --- /dev/null +++ b/refinedstorage-common/src/main/resources/data/refinedstorage/recipe/pattern.json @@ -0,0 +1,22 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "GRG", + "RGR", + "EEE" + ], + "key": { + "G": { + "tag": "c:glass_blocks" + }, + "R": { + "tag": "c:dusts/redstone" + }, + "E": { + "item": "refinedstorage:quartz_enriched_iron" + } + }, + "result": { + "id": "refinedstorage:pattern" + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/main/resources/data/refinedstorage/recipe/pattern_grid.json b/refinedstorage-common/src/main/resources/data/refinedstorage/recipe/pattern_grid.json new file mode 100644 index 000000000..dfd7439b2 --- /dev/null +++ b/refinedstorage-common/src/main/resources/data/refinedstorage/recipe/pattern_grid.json @@ -0,0 +1,17 @@ +{ + "type": "minecraft:crafting_shapeless", + "ingredients": [ + { + "item": "refinedstorage:grid" + }, + { + "item": "refinedstorage:advanced_processor" + }, + { + "item": "refinedstorage:pattern" + } + ], + "result": { + "id": "refinedstorage:pattern_grid" + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/test/java/com/refinedmods/refinedstorage/common/TestPlatform.java b/refinedstorage-common/src/test/java/com/refinedmods/refinedstorage/common/TestPlatform.java index 1a7fc620a..ac3bdd729 100644 --- a/refinedstorage-common/src/test/java/com/refinedmods/refinedstorage/common/TestPlatform.java +++ b/refinedstorage-common/src/test/java/com/refinedmods/refinedstorage/common/TestPlatform.java @@ -227,4 +227,9 @@ public NetworkNodeContainerProvider getContainerProviderSafely(final Level level @Nullable final Direction direction) { throw new UnsupportedOperationException(); } + + @Override + public int getItemColor(final ItemStack stack, final int tintIndex) { + throw new UnsupportedOperationException(); + } } diff --git a/refinedstorage-fabric/src/main/java/com/refinedmods/refinedstorage/fabric/ClientModInitializerImpl.java b/refinedstorage-fabric/src/main/java/com/refinedmods/refinedstorage/fabric/ClientModInitializerImpl.java index cb00fd976..e8a6a0a07 100644 --- a/refinedstorage-fabric/src/main/java/com/refinedmods/refinedstorage/fabric/ClientModInitializerImpl.java +++ b/refinedstorage-fabric/src/main/java/com/refinedmods/refinedstorage/fabric/ClientModInitializerImpl.java @@ -4,6 +4,9 @@ import com.refinedmods.refinedstorage.common.AbstractClientModInitializer; import com.refinedmods.refinedstorage.common.api.support.HelpTooltipComponent; import com.refinedmods.refinedstorage.common.api.upgrade.AbstractUpgradeItem; +import com.refinedmods.refinedstorage.common.autocrafting.CraftingPatternClientTooltipComponent; +import com.refinedmods.refinedstorage.common.autocrafting.PatternItem; +import com.refinedmods.refinedstorage.common.autocrafting.PatternItemColor; import com.refinedmods.refinedstorage.common.configurationcard.ConfigurationCardItemPropertyFunction; import com.refinedmods.refinedstorage.common.content.BlockColorMap; import com.refinedmods.refinedstorage.common.content.BlockEntities; @@ -32,6 +35,7 @@ import com.refinedmods.refinedstorage.common.upgrade.RegulatorUpgradeItem; import com.refinedmods.refinedstorage.common.upgrade.UpgradeDestinationClientTooltipComponent; import com.refinedmods.refinedstorage.common.util.IdentifierUtil; +import com.refinedmods.refinedstorage.fabric.autocrafting.PatternUnbakedModel; import com.refinedmods.refinedstorage.fabric.mixin.ItemPropertiesAccessor; import com.refinedmods.refinedstorage.fabric.storage.diskdrive.DiskDriveBlockEntityRendererImpl; import com.refinedmods.refinedstorage.fabric.storage.diskdrive.DiskDriveUnbakedModel; @@ -51,6 +55,7 @@ import net.fabricmc.fabric.api.client.keybinding.v1.KeyBindingHelper; import net.fabricmc.fabric.api.client.model.loading.v1.ModelLoadingPlugin; import net.fabricmc.fabric.api.client.networking.v1.ClientPlayNetworking; +import net.fabricmc.fabric.api.client.rendering.v1.ColorProviderRegistry; import net.fabricmc.fabric.api.client.rendering.v1.TooltipComponentCallback; import net.minecraft.client.KeyMapping; import net.minecraft.client.gui.screens.MenuScreens; @@ -96,6 +101,7 @@ public > void registerResourceRendering(); registerAlternativeGridHints(); registerItemProperties(); + registerItemColors(); } private void setRenderLayers() { @@ -105,6 +111,7 @@ private void setRenderLayers() { setCutout(Blocks.INSTANCE.getCable()); setCutout(Blocks.INSTANCE.getGrid()); setCutout(Blocks.INSTANCE.getCraftingGrid()); + setCutout(Blocks.INSTANCE.getPatternGrid()); setCutout(Blocks.INSTANCE.getController()); setCutout(Blocks.INSTANCE.getCreativeController()); setCutout(Blocks.INSTANCE.getDetector()); @@ -133,6 +140,7 @@ private void registerEmissiveModels() { registerColoredEmissiveModels(Blocks.INSTANCE.getCreativeController(), "controller"); registerColoredEmissiveModels(Blocks.INSTANCE.getGrid(), "grid"); registerColoredEmissiveModels(Blocks.INSTANCE.getCraftingGrid(), "crafting_grid"); + registerColoredEmissiveModels(Blocks.INSTANCE.getPatternGrid(), "pattern_grid"); registerColoredEmissiveModels(Blocks.INSTANCE.getDetector(), "detector"); registerConstructorDestructorEmissiveModels(Blocks.INSTANCE.getConstructor(), "constructor"); registerConstructorDestructorEmissiveModels(Blocks.INSTANCE.getDestructor(), "destructor"); @@ -299,6 +307,7 @@ private void registerCustomModels() { registerCustomDiskDriveModels(pluginContext, quadRotators); registerCustomDiskInterfaceModels(pluginContext, quadRotators); registerCustomPortableGridModels(pluginContext, quadRotators); + registerCustomPatternModel(pluginContext); }); } @@ -362,14 +371,30 @@ private void registerCustomDiskDriveModels(final ModelLoadingPlugin.Context plug }); } + private void registerCustomPatternModel(final ModelLoadingPlugin.Context pluginContext) { + final ResourceLocation patternIdentifier = createIdentifier(ITEM_PREFIX + "/pattern"); + pluginContext.resolveModel().register(context -> { + if (context.id().equals(patternIdentifier)) { + return new PatternUnbakedModel(); + } + return null; + }); + } + private void registerCustomTooltips() { TooltipComponentCallback.EVENT.register(data -> { if (data instanceof AbstractUpgradeItem.UpgradeDestinationTooltipComponent component) { return new UpgradeDestinationClientTooltipComponent(component.destinations()); } + return null; + }); + TooltipComponentCallback.EVENT.register(data -> { if (data instanceof HelpTooltipComponent component) { return HelpClientTooltipComponent.create(component.text()); } + return null; + }); + TooltipComponentCallback.EVENT.register(data -> { if (data instanceof RegulatorUpgradeItem.RegulatorTooltipComponent component) { final ClientTooltipComponent help = HelpClientTooltipComponent.create(component.helpText()); return component.configuredResource() == null @@ -378,6 +403,20 @@ private void registerCustomTooltips() { } return null; }); + TooltipComponentCallback.EVENT.register(data -> { + if (data instanceof PatternItem.CraftingPatternTooltipComponent component) { + final ClientTooltipComponent help = HelpClientTooltipComponent.create(component.helpText()); + return new CompositeClientTooltipComponent(List.of( + new CraftingPatternClientTooltipComponent( + component.width(), + component.height(), + component.craftingPattern() + ), + help + )); + } + return null; + }); } private CompositeClientTooltipComponent createRegulatorUpgradeClientTooltipComponent( @@ -447,4 +486,8 @@ private void registerItemProperties() { new SecurityCardItemPropertyFunction() ); } + + private void registerItemColors() { + ColorProviderRegistry.ITEM.register(new PatternItemColor(), Items.INSTANCE.getPattern()); + } } diff --git a/refinedstorage-fabric/src/main/java/com/refinedmods/refinedstorage/fabric/ConfigImpl.java b/refinedstorage-fabric/src/main/java/com/refinedmods/refinedstorage/fabric/ConfigImpl.java index 440f1fcbf..d9edce291 100644 --- a/refinedstorage-fabric/src/main/java/com/refinedmods/refinedstorage/fabric/ConfigImpl.java +++ b/refinedstorage-fabric/src/main/java/com/refinedmods/refinedstorage/fabric/ConfigImpl.java @@ -28,6 +28,9 @@ public class ConfigImpl implements ConfigData, com.refinedmods.refinedstorage.co @ConfigEntry.Gui.CollapsibleObject private GridEntryImpl grid = new GridEntryImpl(); + @ConfigEntry.Gui.CollapsibleObject + private SimpleEnergyUsageEntryImpl patternGrid = new SimpleEnergyUsageEntryImpl(DefaultEnergyUsage.PATTERN_GRID); + @ConfigEntry.Gui.CollapsibleObject private CraftingGridEntryImpl craftingGrid = new CraftingGridEntryImpl(); @@ -145,6 +148,11 @@ public GridEntry getGrid() { return grid; } + @Override + public SimpleEnergyUsageEntry getPatternGrid() { + return patternGrid; + } + @Override public CraftingGridEntry getCraftingGrid() { return craftingGrid; diff --git a/refinedstorage-fabric/src/main/java/com/refinedmods/refinedstorage/fabric/ModInitializerImpl.java b/refinedstorage-fabric/src/main/java/com/refinedmods/refinedstorage/fabric/ModInitializerImpl.java index 8387e7aef..c26312d02 100644 --- a/refinedstorage-fabric/src/main/java/com/refinedmods/refinedstorage/fabric/ModInitializerImpl.java +++ b/refinedstorage-fabric/src/main/java/com/refinedmods/refinedstorage/fabric/ModInitializerImpl.java @@ -32,6 +32,8 @@ import com.refinedmods.refinedstorage.common.support.packet.c2s.GridExtractPacket; import com.refinedmods.refinedstorage.common.support.packet.c2s.GridInsertPacket; import com.refinedmods.refinedstorage.common.support.packet.c2s.GridScrollPacket; +import com.refinedmods.refinedstorage.common.support.packet.c2s.PatternGridClearPacket; +import com.refinedmods.refinedstorage.common.support.packet.c2s.PatternGridCreatePatternPacket; import com.refinedmods.refinedstorage.common.support.packet.c2s.PropertyChangePacket; import com.refinedmods.refinedstorage.common.support.packet.c2s.ResourceFilterSlotChangePacket; import com.refinedmods.refinedstorage.common.support.packet.c2s.ResourceSlotAmountChangePacket; @@ -420,6 +422,14 @@ private void registerClientToServerPackets() { CraftingGridClearPacket.PACKET_TYPE, CraftingGridClearPacket.STREAM_CODEC ); + PayloadTypeRegistry.playC2S().register( + PatternGridClearPacket.PACKET_TYPE, + PatternGridClearPacket.STREAM_CODEC + ); + PayloadTypeRegistry.playC2S().register( + PatternGridCreatePatternPacket.PACKET_TYPE, + PatternGridCreatePatternPacket.STREAM_CODEC + ); PayloadTypeRegistry.playC2S().register( CraftingGridRecipeTransferPacket.PACKET_TYPE, CraftingGridRecipeTransferPacket.STREAM_CODEC @@ -487,6 +497,14 @@ private void registerPacketHandlers() { CraftingGridClearPacket.PACKET_TYPE, wrapHandler(CraftingGridClearPacket::handle) ); + ServerPlayNetworking.registerGlobalReceiver( + PatternGridClearPacket.PACKET_TYPE, + wrapHandler((packet, ctx) -> PatternGridClearPacket.handle(ctx)) + ); + ServerPlayNetworking.registerGlobalReceiver( + PatternGridCreatePatternPacket.PACKET_TYPE, + wrapHandler((packet, ctx) -> PatternGridCreatePatternPacket.handle(ctx)) + ); ServerPlayNetworking.registerGlobalReceiver( CraftingGridRecipeTransferPacket.PACKET_TYPE, wrapHandler(CraftingGridRecipeTransferPacket::handle) @@ -540,6 +558,7 @@ private void registerCapabilities() { registerNetworkNodeContainerProvider(BlockEntities.INSTANCE.getConstructor()); registerNetworkNodeContainerProvider(BlockEntities.INSTANCE.getController()); registerNetworkNodeContainerProvider(BlockEntities.INSTANCE.getCraftingGrid()); + registerNetworkNodeContainerProvider(BlockEntities.INSTANCE.getPatternGrid()); registerNetworkNodeContainerProvider(BlockEntities.INSTANCE.getCreativeController()); registerNetworkNodeContainerProvider(BlockEntities.INSTANCE.getDestructor()); registerNetworkNodeContainerProvider(BlockEntities.INSTANCE.getDetector()); diff --git a/refinedstorage-fabric/src/main/java/com/refinedmods/refinedstorage/fabric/PlatformImpl.java b/refinedstorage-fabric/src/main/java/com/refinedmods/refinedstorage/fabric/PlatformImpl.java index 169862220..8f5e05b2e 100644 --- a/refinedstorage-fabric/src/main/java/com/refinedmods/refinedstorage/fabric/PlatformImpl.java +++ b/refinedstorage-fabric/src/main/java/com/refinedmods/refinedstorage/fabric/PlatformImpl.java @@ -40,6 +40,7 @@ import com.mojang.blaze3d.platform.InputConstants; import net.fabricmc.fabric.api.client.networking.v1.ClientPlayNetworking; +import net.fabricmc.fabric.api.client.rendering.v1.ColorProviderRegistry; import net.fabricmc.fabric.api.entity.FakePlayer; import net.fabricmc.fabric.api.event.player.PlayerBlockBreakEvents; import net.fabricmc.fabric.api.networking.v1.ServerPlayNetworking; @@ -55,6 +56,7 @@ import net.fabricmc.fabric.impl.transfer.context.ConstantContainerItemContext; import net.minecraft.client.KeyMapping; import net.minecraft.client.Minecraft; +import net.minecraft.client.color.item.ItemColor; import net.minecraft.client.gui.GuiGraphics; import net.minecraft.client.gui.components.EditBox; import net.minecraft.client.gui.screens.inventory.tooltip.ClientTooltipComponent; @@ -474,6 +476,15 @@ public NetworkNodeContainerProvider getContainerProviderSafely(final Level level ); } + @Override + public int getItemColor(final ItemStack stack, final int tintIndex) { + final ItemColor itemColor = ColorProviderRegistry.ITEM.get(stack.getItem()); + if (itemColor == null) { + return -1; + } + return itemColor.getColor(stack, tintIndex); + } + private void doSave(final CompoundTag compoundTag, final Path tempFile, final Path targetPath) throws IOException { // Write to temp file first. NbtIo.writeCompressed(compoundTag, tempFile); diff --git a/refinedstorage-fabric/src/main/java/com/refinedmods/refinedstorage/fabric/autocrafting/PatternBakedModel.java b/refinedstorage-fabric/src/main/java/com/refinedmods/refinedstorage/fabric/autocrafting/PatternBakedModel.java new file mode 100644 index 000000000..fc7f3ed44 --- /dev/null +++ b/refinedstorage-fabric/src/main/java/com/refinedmods/refinedstorage/fabric/autocrafting/PatternBakedModel.java @@ -0,0 +1,24 @@ +package com.refinedmods.refinedstorage.fabric.autocrafting; + +import com.refinedmods.refinedstorage.common.autocrafting.PatternItemOverrides; + +import net.fabricmc.fabric.api.renderer.v1.model.ForwardingBakedModel; +import net.minecraft.client.renderer.block.model.ItemOverrides; +import net.minecraft.client.resources.model.BakedModel; +import net.minecraft.client.resources.model.ModelBaker; + +class PatternBakedModel extends ForwardingBakedModel { + private final ItemOverrides itemOverrides; + + PatternBakedModel(final ModelBaker modelBaker, + final BakedModel emptyModel, + final BakedModel craftingModel) { + this.wrapped = emptyModel; + this.itemOverrides = new PatternItemOverrides(modelBaker, emptyModel, craftingModel); + } + + @Override + public ItemOverrides getOverrides() { + return itemOverrides; + } +} diff --git a/refinedstorage-fabric/src/main/java/com/refinedmods/refinedstorage/fabric/autocrafting/PatternUnbakedModel.java b/refinedstorage-fabric/src/main/java/com/refinedmods/refinedstorage/fabric/autocrafting/PatternUnbakedModel.java new file mode 100644 index 000000000..08b2f3c8b --- /dev/null +++ b/refinedstorage-fabric/src/main/java/com/refinedmods/refinedstorage/fabric/autocrafting/PatternUnbakedModel.java @@ -0,0 +1,45 @@ +package com.refinedmods.refinedstorage.fabric.autocrafting; + +import java.util.Collection; +import java.util.Set; +import java.util.function.Function; +import javax.annotation.Nullable; + +import net.minecraft.client.renderer.texture.TextureAtlasSprite; +import net.minecraft.client.resources.model.BakedModel; +import net.minecraft.client.resources.model.Material; +import net.minecraft.client.resources.model.ModelBaker; +import net.minecraft.client.resources.model.ModelState; +import net.minecraft.client.resources.model.UnbakedModel; +import net.minecraft.resources.ResourceLocation; + +import static com.refinedmods.refinedstorage.common.util.IdentifierUtil.createIdentifier; +import static java.util.Objects.requireNonNull; + +public class PatternUnbakedModel implements UnbakedModel { + private static final ResourceLocation EMPTY_MODEL = createIdentifier("item/pattern/empty"); + private static final ResourceLocation CRAFTING_MODEL = createIdentifier("item/pattern/crafting"); + + @Override + public Collection getDependencies() { + return Set.of(EMPTY_MODEL, CRAFTING_MODEL); + } + + @Override + public void resolveParents(final Function resolver) { + resolver.apply(EMPTY_MODEL).resolveParents(resolver); + resolver.apply(CRAFTING_MODEL).resolveParents(resolver); + } + + @Nullable + @Override + public BakedModel bake(final ModelBaker baker, + final Function spriteGetter, + final ModelState state) { + return new PatternBakedModel( + baker, + requireNonNull(baker.bake(EMPTY_MODEL, state)), + requireNonNull(baker.bake(CRAFTING_MODEL, state)) + ); + } +} diff --git a/refinedstorage-fabric/src/main/java/com/refinedmods/refinedstorage/fabric/autocrafting/package-info.java b/refinedstorage-fabric/src/main/java/com/refinedmods/refinedstorage/fabric/autocrafting/package-info.java new file mode 100644 index 000000000..e72b75536 --- /dev/null +++ b/refinedstorage-fabric/src/main/java/com/refinedmods/refinedstorage/fabric/autocrafting/package-info.java @@ -0,0 +1,7 @@ +@ParametersAreNonnullByDefault +@FieldsAndMethodsAreNonnullByDefault +package com.refinedmods.refinedstorage.fabric.autocrafting; + +import com.refinedmods.refinedstorage.api.core.FieldsAndMethodsAreNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage-fabric/src/main/java/com/refinedmods/refinedstorage/fabric/mixin/AbstractBlockEntityWithoutLevelRendererMixin.java b/refinedstorage-fabric/src/main/java/com/refinedmods/refinedstorage/fabric/mixin/AbstractBlockEntityWithoutLevelRendererMixin.java new file mode 100644 index 000000000..49b593b88 --- /dev/null +++ b/refinedstorage-fabric/src/main/java/com/refinedmods/refinedstorage/fabric/mixin/AbstractBlockEntityWithoutLevelRendererMixin.java @@ -0,0 +1,34 @@ +package com.refinedmods.refinedstorage.fabric.mixin; + +import com.refinedmods.refinedstorage.common.autocrafting.PatternBlockEntityWithoutLevelRenderer; + +import com.mojang.blaze3d.vertex.PoseStack; +import net.minecraft.client.renderer.BlockEntityWithoutLevelRenderer; +import net.minecraft.client.renderer.MultiBufferSource; +import net.minecraft.world.item.ItemDisplayContext; +import net.minecraft.world.item.ItemStack; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Inject; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; + +@Mixin(BlockEntityWithoutLevelRenderer.class) +public abstract class AbstractBlockEntityWithoutLevelRendererMixin { + @Inject(method = "renderByItem", at = @At("HEAD"), cancellable = true) + public void onRenderByItem(final ItemStack stack, + final ItemDisplayContext displayContext, + final PoseStack poseStack, + final MultiBufferSource buffer, + final int packedLight, + final int packedOverlay, + final CallbackInfo callbackInfo) { + PatternBlockEntityWithoutLevelRenderer.getInstance().renderByItem( + stack, + displayContext, + poseStack, + buffer, + packedLight, + packedOverlay + ); + } +} diff --git a/refinedstorage-fabric/src/main/resources/refinedstorage.accesswidener b/refinedstorage-fabric/src/main/resources/refinedstorage.accesswidener index fbb2da410..f65de0bc5 100644 --- a/refinedstorage-fabric/src/main/resources/refinedstorage.accesswidener +++ b/refinedstorage-fabric/src/main/resources/refinedstorage.accesswidener @@ -5,4 +5,5 @@ accessible method net/minecraft/client/renderer/RenderType create (Ljava/lang/St accessible class net/minecraft/client/resources/model/ModelBakery$BakedCacheKey accessible class net/minecraft/client/resources/model/ModelBakery$ModelBakerImpl accessible method net/minecraft/client/resources/model/ModelBakery$BakedCacheKey (Lnet/minecraft/resources/ResourceLocation;Lcom/mojang/math/Transformation;Z)V -accessible method net/minecraft/client/gui/GuiGraphics renderTooltipInternal (Lnet/minecraft/client/gui/Font;Ljava/util/List;IILnet/minecraft/client/gui/screens/inventory/tooltip/ClientTooltipPositioner;)V \ No newline at end of file +accessible method net/minecraft/client/gui/GuiGraphics renderTooltipInternal (Lnet/minecraft/client/gui/Font;Ljava/util/List;IILnet/minecraft/client/gui/screens/inventory/tooltip/ClientTooltipPositioner;)V +accessible method net/minecraft/client/renderer/block/model/ItemOverrides ()V diff --git a/refinedstorage-fabric/src/main/resources/refinedstorage.mixins.json b/refinedstorage-fabric/src/main/resources/refinedstorage.mixins.json index f92e1683e..0fe893dcb 100644 --- a/refinedstorage-fabric/src/main/resources/refinedstorage.mixins.json +++ b/refinedstorage-fabric/src/main/resources/refinedstorage.mixins.json @@ -8,7 +8,8 @@ "EditBoxAccessor", "ItemPropertiesAccessor", "KeyMappingAccessor", - "ModelBakeryAccessor" + "ModelBakeryAccessor", + "AbstractBlockEntityWithoutLevelRendererMixin" ], "injectors": { "defaultRequire": 1 diff --git a/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/ClientModInitializer.java b/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/ClientModInitializer.java index bba37a5c7..d91397489 100644 --- a/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/ClientModInitializer.java +++ b/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/ClientModInitializer.java @@ -4,6 +4,10 @@ import com.refinedmods.refinedstorage.common.AbstractClientModInitializer; import com.refinedmods.refinedstorage.common.api.support.HelpTooltipComponent; import com.refinedmods.refinedstorage.common.api.upgrade.AbstractUpgradeItem; +import com.refinedmods.refinedstorage.common.autocrafting.CraftingPatternClientTooltipComponent; +import com.refinedmods.refinedstorage.common.autocrafting.PatternBlockEntityWithoutLevelRenderer; +import com.refinedmods.refinedstorage.common.autocrafting.PatternItem; +import com.refinedmods.refinedstorage.common.autocrafting.PatternItemColor; import com.refinedmods.refinedstorage.common.configurationcard.ConfigurationCardItemPropertyFunction; import com.refinedmods.refinedstorage.common.content.BlockEntities; import com.refinedmods.refinedstorage.common.content.Blocks; @@ -20,6 +24,7 @@ import com.refinedmods.refinedstorage.common.support.tooltip.ResourceClientTooltipComponent; import com.refinedmods.refinedstorage.common.upgrade.RegulatorUpgradeItem; import com.refinedmods.refinedstorage.common.upgrade.UpgradeDestinationClientTooltipComponent; +import com.refinedmods.refinedstorage.neoforge.autocrafting.PatternGeometryLoader; import com.refinedmods.refinedstorage.neoforge.storage.diskdrive.DiskDriveBlockEntityRendererImpl; import com.refinedmods.refinedstorage.neoforge.storage.diskdrive.DiskDriveGeometryLoader; import com.refinedmods.refinedstorage.neoforge.storage.diskinterface.DiskInterfaceBlockEntityRendererImpl; @@ -34,6 +39,7 @@ import net.minecraft.client.gui.screens.Screen; import net.minecraft.client.gui.screens.inventory.MenuAccess; import net.minecraft.client.gui.screens.inventory.tooltip.ClientTooltipComponent; +import net.minecraft.client.renderer.BlockEntityWithoutLevelRenderer; import net.minecraft.client.renderer.blockentity.BlockEntityRenderers; import net.minecraft.client.renderer.item.ItemProperties; import net.minecraft.world.inventory.AbstractContainerMenu; @@ -43,14 +49,18 @@ import net.neoforged.neoforge.client.event.InputEvent; import net.neoforged.neoforge.client.event.ModelEvent; import net.neoforged.neoforge.client.event.RegisterClientTooltipComponentFactoriesEvent; +import net.neoforged.neoforge.client.event.RegisterColorHandlersEvent; import net.neoforged.neoforge.client.event.RegisterKeyMappingsEvent; import net.neoforged.neoforge.client.event.RegisterMenuScreensEvent; +import net.neoforged.neoforge.client.extensions.common.IClientItemExtensions; +import net.neoforged.neoforge.client.extensions.common.RegisterClientExtensionsEvent; import net.neoforged.neoforge.client.settings.KeyConflictContext; import net.neoforged.neoforge.client.settings.KeyModifier; import net.neoforged.neoforge.common.NeoForge; import org.lwjgl.glfw.GLFW; import static com.refinedmods.refinedstorage.common.content.ContentIds.DISK_DRIVE; +import static com.refinedmods.refinedstorage.common.content.ContentIds.PATTERN; import static com.refinedmods.refinedstorage.common.content.ContentIds.PORTABLE_GRID; import static com.refinedmods.refinedstorage.common.util.IdentifierUtil.createIdentifier; @@ -85,6 +95,7 @@ private static void registerModelPredicates() { @SubscribeEvent public static void onRegisterModelGeometry(final ModelEvent.RegisterGeometryLoaders e) { registerDiskModels(); + e.register(PATTERN, new PatternGeometryLoader()); e.register(DISK_DRIVE, new DiskDriveGeometryLoader()); e.register(PORTABLE_GRID, new PortableGridGeometryLoader()); Blocks.INSTANCE.getDiskInterface().forEach( @@ -177,6 +188,21 @@ private static void registerBlockEntityRenderer() { ); } + @SubscribeEvent + public static void onRegisterItemColors(final RegisterColorHandlersEvent.Item e) { + e.register(new PatternItemColor(), Items.INSTANCE.getPattern()); + } + + @SubscribeEvent + public static void onRegisterClientExtensions(final RegisterClientExtensionsEvent e) { + e.registerItem(new IClientItemExtensions() { + @Override + public BlockEntityWithoutLevelRenderer getCustomRenderer() { + return PatternBlockEntityWithoutLevelRenderer.getInstance(); + } + }, Items.INSTANCE.getPattern()); + } + @SubscribeEvent public static void onRegisterTooltipFactories(final RegisterClientTooltipComponentFactoriesEvent e) { e.register( @@ -196,6 +222,20 @@ public static void onRegisterTooltipFactories(final RegisterClientTooltipCompone : createRegulatorUpgradeClientTooltipComponent(component.configuredResource(), help); } ); + e.register( + PatternItem.CraftingPatternTooltipComponent.class, + component -> { + final ClientTooltipComponent help = HelpClientTooltipComponent.create(component.helpText()); + return new CompositeClientTooltipComponent(List.of( + new CraftingPatternClientTooltipComponent( + component.width(), + component.height(), + component.craftingPattern() + ), + help + )); + } + ); } private static CompositeClientTooltipComponent createRegulatorUpgradeClientTooltipComponent( diff --git a/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/ConfigImpl.java b/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/ConfigImpl.java index 9a4322505..1fe2b5685 100644 --- a/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/ConfigImpl.java +++ b/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/ConfigImpl.java @@ -30,6 +30,7 @@ public class ConfigImpl implements Config { private final DiskInterfaceEntry diskInterface; private final GridEntry grid; private final CraftingGridEntry craftingGrid; + private final SimpleEnergyUsageEntry patternGrid; private final StorageBlockEntry storageBlock; private final FluidStorageBlockEntry fluidStorageBlock; private final SimpleEnergyUsageEntry importer; @@ -67,6 +68,7 @@ public ConfigImpl() { diskInterface = new DiskInterfaceEntryImpl(); grid = new GridEntryImpl(); craftingGrid = new CraftingGridEntryImpl(); + patternGrid = new SimpleEnergyUsageEntryImpl("patternGrid", DefaultEnergyUsage.PATTERN_GRID); storageBlock = new StorageBlockEntryImpl(); fluidStorageBlock = new FluidStorageBlockEntryImpl(); importer = new SimpleEnergyUsageEntryImpl("importer", DefaultEnergyUsage.IMPORTER); @@ -125,6 +127,11 @@ public GridEntry getGrid() { return grid; } + @Override + public SimpleEnergyUsageEntry getPatternGrid() { + return patternGrid; + } + @Override public CraftingGridEntry getCraftingGrid() { return craftingGrid; diff --git a/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/ModInitializer.java b/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/ModInitializer.java index a338ab84a..bde69c78a 100644 --- a/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/ModInitializer.java +++ b/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/ModInitializer.java @@ -32,6 +32,8 @@ import com.refinedmods.refinedstorage.common.support.packet.c2s.GridExtractPacket; import com.refinedmods.refinedstorage.common.support.packet.c2s.GridInsertPacket; import com.refinedmods.refinedstorage.common.support.packet.c2s.GridScrollPacket; +import com.refinedmods.refinedstorage.common.support.packet.c2s.PatternGridClearPacket; +import com.refinedmods.refinedstorage.common.support.packet.c2s.PatternGridCreatePatternPacket; import com.refinedmods.refinedstorage.common.support.packet.c2s.PropertyChangePacket; import com.refinedmods.refinedstorage.common.support.packet.c2s.ResourceFilterSlotChangePacket; import com.refinedmods.refinedstorage.common.support.packet.c2s.ResourceSlotAmountChangePacket; @@ -173,6 +175,8 @@ public ModInitializer(final IEventBus eventBus, final ModContainer modContainer) eventBus.addListener(ClientModInitializer::onRegisterModelGeometry); eventBus.addListener(ClientModInitializer::onRegisterMenuScreens); eventBus.addListener(ClientModInitializer::onRegisterKeyMappings); + eventBus.addListener(ClientModInitializer::onRegisterItemColors); + eventBus.addListener(ClientModInitializer::onRegisterClientExtensions); eventBus.addListener(ClientModInitializer::onRegisterTooltipFactories); modContainer.registerExtensionPoint(IConfigScreenFactory.class, ConfigurationScreen::new); } @@ -379,6 +383,7 @@ private void registerCapabilities(final RegisterCapabilitiesEvent event) { registerNetworkNodeContainerProvider(event, BlockEntities.INSTANCE.getConstructor()); registerNetworkNodeContainerProvider(event, BlockEntities.INSTANCE.getController()); registerNetworkNodeContainerProvider(event, BlockEntities.INSTANCE.getCraftingGrid()); + registerNetworkNodeContainerProvider(event, BlockEntities.INSTANCE.getPatternGrid()); registerNetworkNodeContainerProvider(event, BlockEntities.INSTANCE.getCreativeController()); registerNetworkNodeContainerProvider(event, BlockEntities.INSTANCE.getDestructor()); registerNetworkNodeContainerProvider(event, BlockEntities.INSTANCE.getDetector()); @@ -602,6 +607,16 @@ private static void registerClientToServerPackets(final PayloadRegistrar registr CraftingGridClearPacket.STREAM_CODEC, wrapHandler(CraftingGridClearPacket::handle) ); + registrar.playToServer( + PatternGridClearPacket.PACKET_TYPE, + PatternGridClearPacket.STREAM_CODEC, + wrapHandler((packet, ctx) -> PatternGridClearPacket.handle(ctx)) + ); + registrar.playToServer( + PatternGridCreatePatternPacket.PACKET_TYPE, + PatternGridCreatePatternPacket.STREAM_CODEC, + wrapHandler((packet, ctx) -> PatternGridCreatePatternPacket.handle(ctx)) + ); registrar.playToServer( CraftingGridRecipeTransferPacket.PACKET_TYPE, CraftingGridRecipeTransferPacket.STREAM_CODEC, diff --git a/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/PlatformImpl.java b/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/PlatformImpl.java index acf8618a4..c660a3a0c 100644 --- a/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/PlatformImpl.java +++ b/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/PlatformImpl.java @@ -398,4 +398,9 @@ public NetworkNodeContainerProvider getContainerProviderSafely(final Level level direction ); } + + @Override + public int getItemColor(final ItemStack stack, final int tintIndex) { + return Minecraft.getInstance().getItemColors().getColor(stack, tintIndex); + } } diff --git a/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/autocrafting/PatternBakedModel.java b/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/autocrafting/PatternBakedModel.java new file mode 100644 index 000000000..144b5f4bd --- /dev/null +++ b/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/autocrafting/PatternBakedModel.java @@ -0,0 +1,22 @@ +package com.refinedmods.refinedstorage.neoforge.autocrafting; + +import com.refinedmods.refinedstorage.common.autocrafting.PatternItemOverrides; + +import net.minecraft.client.renderer.block.model.ItemOverrides; +import net.minecraft.client.resources.model.BakedModel; +import net.minecraft.client.resources.model.ModelBaker; +import net.neoforged.neoforge.client.model.BakedModelWrapper; + +class PatternBakedModel extends BakedModelWrapper { + private final ItemOverrides itemOverrides; + + PatternBakedModel(final ModelBaker modelBaker, final BakedModel emptyModel, final BakedModel craftingModel) { + super(emptyModel); + this.itemOverrides = new PatternItemOverrides(modelBaker, emptyModel, craftingModel); + } + + @Override + public ItemOverrides getOverrides() { + return itemOverrides; + } +} diff --git a/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/autocrafting/PatternGeometryLoader.java b/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/autocrafting/PatternGeometryLoader.java new file mode 100644 index 000000000..58aef78e1 --- /dev/null +++ b/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/autocrafting/PatternGeometryLoader.java @@ -0,0 +1,15 @@ +package com.refinedmods.refinedstorage.neoforge.autocrafting; + +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import net.neoforged.neoforge.client.model.geometry.IGeometryLoader; + +public class PatternGeometryLoader implements IGeometryLoader { + @Override + public PatternUnbakedGeometry read(final JsonObject jsonObject, + final JsonDeserializationContext jsonDeserializationContext) + throws JsonParseException { + return new PatternUnbakedGeometry(); + } +} diff --git a/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/autocrafting/PatternUnbakedGeometry.java b/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/autocrafting/PatternUnbakedGeometry.java new file mode 100644 index 000000000..dcd6221af --- /dev/null +++ b/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/autocrafting/PatternUnbakedGeometry.java @@ -0,0 +1,42 @@ +package com.refinedmods.refinedstorage.neoforge.autocrafting; + +import java.util.function.Function; + +import net.minecraft.client.renderer.block.model.ItemOverrides; +import net.minecraft.client.renderer.texture.TextureAtlasSprite; +import net.minecraft.client.resources.model.BakedModel; +import net.minecraft.client.resources.model.Material; +import net.minecraft.client.resources.model.ModelBaker; +import net.minecraft.client.resources.model.ModelState; +import net.minecraft.client.resources.model.UnbakedModel; +import net.minecraft.resources.ResourceLocation; +import net.neoforged.neoforge.client.model.geometry.IGeometryBakingContext; +import net.neoforged.neoforge.client.model.geometry.IUnbakedGeometry; + +import static com.refinedmods.refinedstorage.common.util.IdentifierUtil.createIdentifier; +import static java.util.Objects.requireNonNull; + +public class PatternUnbakedGeometry implements IUnbakedGeometry { + private static final ResourceLocation EMPTY_MODEL = createIdentifier("item/pattern/empty"); + private static final ResourceLocation CRAFTING_MODEL = createIdentifier("item/pattern/crafting"); + + @Override + public BakedModel bake(final IGeometryBakingContext ctx, + final ModelBaker modelBaker, + final Function function, + final ModelState modelState, + final ItemOverrides itemOverrides) { + return new PatternBakedModel( + modelBaker, + requireNonNull(modelBaker.bake(EMPTY_MODEL, modelState, function)), + requireNonNull(modelBaker.bake(CRAFTING_MODEL, modelState, function)) + ); + } + + @Override + public void resolveParents(final Function modelGetter, + final IGeometryBakingContext context) { + modelGetter.apply(EMPTY_MODEL).resolveParents(modelGetter); + modelGetter.apply(CRAFTING_MODEL).resolveParents(modelGetter); + } +} diff --git a/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/autocrafting/package-info.java b/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/autocrafting/package-info.java new file mode 100644 index 000000000..078def6f5 --- /dev/null +++ b/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/autocrafting/package-info.java @@ -0,0 +1,7 @@ +@ParametersAreNonnullByDefault +@FieldsAndMethodsAreNonnullByDefault +package com.refinedmods.refinedstorage.neoforge.autocrafting; + +import com.refinedmods.refinedstorage.api.core.FieldsAndMethodsAreNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/datagen/BlockModelProviderImpl.java b/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/datagen/BlockModelProviderImpl.java index b605ffb32..aee8cee99 100644 --- a/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/datagen/BlockModelProviderImpl.java +++ b/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/datagen/BlockModelProviderImpl.java @@ -50,6 +50,7 @@ protected void registerModels() { registerControllers(); registerRightLeftBackFrontTopModel(Blocks.INSTANCE.getGrid(), "grid", ""); registerRightLeftBackFrontTopModel(Blocks.INSTANCE.getCraftingGrid(), "crafting_grid", ""); + registerRightLeftBackFrontTopModel(Blocks.INSTANCE.getPatternGrid(), "pattern_grid", ""); registerDetectors(); registerWirelessTransmitters(); registerNetworkReceivers(); diff --git a/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/datagen/BlockStateProviderImpl.java b/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/datagen/BlockStateProviderImpl.java index 43071d965..b8f689113 100644 --- a/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/datagen/BlockStateProviderImpl.java +++ b/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/datagen/BlockStateProviderImpl.java @@ -162,6 +162,11 @@ private void registerGrids() { block, "crafting_grid" )); + Blocks.INSTANCE.getPatternGrid().forEach((color, id, block) -> configureActiveColoredDirectionalBlock( + color, + block, + "pattern_grid" + )); } private void registerControllers() { diff --git a/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/datagen/ItemModelProviderImpl.java b/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/datagen/ItemModelProviderImpl.java index 19f52a8ad..3eb2074d0 100644 --- a/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/datagen/ItemModelProviderImpl.java +++ b/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/datagen/ItemModelProviderImpl.java @@ -41,6 +41,7 @@ protected void registerModels() { registerCreativeControllers(); registerGrids(); registerCraftingGrids(); + registerPatternGrids(); registerDetectors(); registerConstructors(); registerDestructors(); @@ -128,6 +129,14 @@ private void registerCraftingGrids() { )); } + private void registerPatternGrids() { + final var blocks = Blocks.INSTANCE.getPatternGrid(); + blocks.forEach((color, id, block) -> withExistingParent( + id.getPath(), + createIdentifier("block/pattern_grid/" + color.getName()) + )); + } + private void registerDetectors() { final var blocks = Blocks.INSTANCE.getDetector(); blocks.forEach((color, id, block) -> withExistingParent( diff --git a/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/datagen/loot/BlockDropProvider.java b/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/datagen/loot/BlockDropProvider.java index 0a547cf1a..801c31c73 100644 --- a/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/datagen/loot/BlockDropProvider.java +++ b/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/datagen/loot/BlockDropProvider.java @@ -22,6 +22,7 @@ protected void generate() { Blocks.INSTANCE.getCable().forEach((color, id, block) -> dropSelf(block.get())); Blocks.INSTANCE.getGrid().forEach((color, id, block) -> dropSelf(block.get())); Blocks.INSTANCE.getCraftingGrid().forEach((color, id, block) -> dropSelf(block.get())); + Blocks.INSTANCE.getPatternGrid().forEach((color, id, block) -> dropSelf(block.get())); Blocks.INSTANCE.getController().forEach((color, id, block) -> add( block.get(), createSingleItemTable(block.get()).apply(EnergyLootItemFunction::new) @@ -44,6 +45,7 @@ protected Iterable getKnownBlocks() { blocks.addAll(Blocks.INSTANCE.getCable().values()); blocks.addAll(Blocks.INSTANCE.getGrid().values()); blocks.addAll(Blocks.INSTANCE.getCraftingGrid().values()); + blocks.addAll(Blocks.INSTANCE.getPatternGrid().values()); blocks.addAll(Blocks.INSTANCE.getController().values()); blocks.addAll(Blocks.INSTANCE.getCreativeController().values()); blocks.addAll(Blocks.INSTANCE.getDetector().values()); diff --git a/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/datagen/recipe/RecoloringRecipeProvider.java b/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/datagen/recipe/RecoloringRecipeProvider.java index 15672a360..83755c5f3 100644 --- a/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/datagen/recipe/RecoloringRecipeProvider.java +++ b/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/datagen/recipe/RecoloringRecipeProvider.java @@ -47,6 +47,9 @@ protected void buildRecipes(final RecipeOutput output) { Blocks.INSTANCE.getCraftingGrid().forEach((color, id, block) -> recipe(Tags.CRAFTING_GRIDS, block.get().asItem(), color) .save(output, recipeId(color, "crafting_grid"))); + Blocks.INSTANCE.getPatternGrid().forEach((color, id, block) -> + recipe(Tags.PATTERN_GRIDS, block.get().asItem(), color) + .save(output, recipeId(color, "pattern_grid"))); Blocks.INSTANCE.getDetector().forEach((color, id, block) -> recipe(Tags.DETECTORS, block.get().asItem(), color) .save(output, recipeId(color, "detector"))); diff --git a/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/datagen/tag/ItemTagsProviderImpl.java b/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/datagen/tag/ItemTagsProviderImpl.java index d9e4687db..fa228fc71 100644 --- a/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/datagen/tag/ItemTagsProviderImpl.java +++ b/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/datagen/tag/ItemTagsProviderImpl.java @@ -35,6 +35,7 @@ import static com.refinedmods.refinedstorage.common.content.Tags.IMPORTERS; import static com.refinedmods.refinedstorage.common.content.Tags.NETWORK_RECEIVERS; import static com.refinedmods.refinedstorage.common.content.Tags.NETWORK_TRANSMITTERS; +import static com.refinedmods.refinedstorage.common.content.Tags.PATTERN_GRIDS; import static com.refinedmods.refinedstorage.common.content.Tags.RELAYS; import static com.refinedmods.refinedstorage.common.content.Tags.SECURITY_MANAGERS; import static com.refinedmods.refinedstorage.common.content.Tags.STORAGE_DISKS; @@ -71,6 +72,10 @@ protected void addTags(final HolderLookup.Provider provider) { Blocks.INSTANCE.getCraftingGrid().values().stream() .map(block -> (Supplier) block::asItem) .toList()); + addAllToTag(PATTERN_GRIDS, + Blocks.INSTANCE.getPatternGrid().values().stream() + .map(block -> (Supplier) block::asItem) + .toList()); addAllToTag(STORAGE_DISKS, Arrays.stream(ItemStorageVariant.values()) .filter(variant -> variant != ItemStorageVariant.CREATIVE) diff --git a/refinedstorage-neoforge/src/test/java/com/refinedmods/refinedstorage/common/GameTestUtil.java b/refinedstorage-neoforge/src/test/java/com/refinedmods/refinedstorage/common/GameTestUtil.java index fee7f5328..b78757abb 100644 --- a/refinedstorage-neoforge/src/test/java/com/refinedmods/refinedstorage/common/GameTestUtil.java +++ b/refinedstorage-neoforge/src/test/java/com/refinedmods/refinedstorage/common/GameTestUtil.java @@ -168,6 +168,7 @@ private static Runnable resourceContainerContainsExactly(final GameTestHelper he final ResourceContainer container, final ResourceAmount... expected) { return () -> { + // todo: investigate issue with EnderIO integration // TODO: This does not take duplicate ResourceAmount into account for (final ResourceAmount expectedStack : expected) { final boolean contains = IntStream.range(0, container.size()) From 1d518e456ed0a42c35209ac935eb4539417f345e Mon Sep 17 00:00:00 2001 From: raoulvdberge Date: Mon, 29 Jul 2024 20:53:26 +0200 Subject: [PATCH 02/12] fix: remove progress bar from widgets.png Also avoid clicking sound when clicking on a progress bar. --- .../common/support/widget/ProgressWidget.java | 14 +++++++++++--- .../gui/sprites/widget/progress_bar.png | Bin 0 -> 167 bytes .../refinedstorage/textures/gui/widgets.png | Bin 1598 -> 1335 bytes 3 files changed, 11 insertions(+), 3 deletions(-) create mode 100644 refinedstorage-common/src/main/resources/assets/refinedstorage/textures/gui/sprites/widget/progress_bar.png diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/widget/ProgressWidget.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/widget/ProgressWidget.java index 8cf60a071..59937b74f 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/widget/ProgressWidget.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/widget/ProgressWidget.java @@ -8,13 +8,14 @@ import net.minecraft.client.gui.GuiGraphics; import net.minecraft.client.gui.components.AbstractWidget; import net.minecraft.client.gui.narration.NarrationElementOutput; +import net.minecraft.client.sounds.SoundManager; import net.minecraft.network.chat.Component; import net.minecraft.resources.ResourceLocation; import static com.refinedmods.refinedstorage.common.util.IdentifierUtil.createIdentifier; public class ProgressWidget extends AbstractWidget { - private static final ResourceLocation TEXTURE = createIdentifier("textures/gui/widgets.png"); + private static final ResourceLocation TEXTURE = createIdentifier("widget/progress_bar"); private final DoubleSupplier progressSupplier; private final Supplier> tooltipSupplier; @@ -30,11 +31,18 @@ public ProgressWidget(final int x, this.tooltipSupplier = tooltipSupplier; } + @Override + public void playDownSound(final SoundManager handler) { + // intentionally empty + } + @Override public void renderWidget(final GuiGraphics graphics, final int mouseX, final int mouseY, final float partialTicks) { final int correctedHeight = (int) (progressSupplier.getAsDouble() * height); - graphics.blit(TEXTURE, getX(), getY() + height - correctedHeight, 179, height - correctedHeight, width, - correctedHeight); + final int correctedY = getY() + height - correctedHeight; + final int u = 0; + final int v = height - correctedHeight; + graphics.blitSprite(TEXTURE, 16, 70, u, v, getX(), correctedY, width, correctedHeight); if (isHovered) { graphics.renderComponentTooltip(Minecraft.getInstance().font, tooltipSupplier.get(), mouseX, mouseY); } diff --git a/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/gui/sprites/widget/progress_bar.png b/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/gui/sprites/widget/progress_bar.png new file mode 100644 index 0000000000000000000000000000000000000000..18cf56099e0bf11af7958fa8cf56471731db9af3 GIT binary patch literal 167 zcmeAS@N?(olHy`uVBq!ia0vp^0zmA>!VDzMxj1(KDaPU;cPEB*=VV?2IV|apzK#qG z8~eHcB(eheLIFM@t`gfW^32`Fzw$79?^2GsNxc0_S26Va0%bW1JR*x382Ao@Fyrz3 z6)8YLIZqeI5RLQ62?8w)Y^urP1`J&-O$S$;Si#}z5);EvKfCkpnfB;MK$Q%hu6{1- HoD!M<>2EGw literal 0 HcmV?d00001 diff --git a/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/gui/widgets.png b/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/gui/widgets.png index fbdd1ff046a6deab31da55773738f250a813b99d..d4b20ba685b0c23b2328f29b859f9721a0abbb24 100644 GIT binary patch literal 1335 zcmeAS@N?(olHy`uVBq!ia0y~yU<5K5893O0R7}x|G!U;i$lZxy-8q?;Kn_c~qpu?a z!^VE@KZ&eBK4*bPWHAE+-vJP2%(~Xe2~=~&)5S5QBJS-SN4@N7nFAlIP8%909xz*T zQ0vI-_)cAk=mt@N&Q3wL9-kuzr1so?erHa#aOPLR_eZ{e_LN%g&TjJW{=cZd<=;Mi zdi2O>=IQe9pUZ2u%iGuSxWE4#pSSN_g}u0?AUhWBA%gf2}rHk#}vu6$`!{i{&182{kEqIpu`t|F2mIr_S)ciPi zd)xNy|2YoS6zXruiJeUthId zoI&j=P%w+7!Beo|>9g#z?CjUUV(SC2{9~lWtjHc zmSOw$?T2q(wXw51H*fy@^m^XwjS7qn282-Oto&bylAD(&jY&Rn-$PpJeG4Qm@D>3+VG4zP7J$ruFe6ZUtF50?t|NeZY2fx8e-n@Ow zdp)eYw$|3#+FBUoFt_)d2M!)QSdeD=SzKWLym^151x~Rr93qHd&biIIWAkR?-Me>7 zpIei+Pdb2Mh6tmCF86_gABs!|mT(++p?z%`C|C@lHktjG+gH~i&Zy|apg|3qztBgW6FRgQzWL_OI)V7#(IX;6~e-j5Y6Z{n_fnAfUz|@Jy3o@}@VM z4g0U3Ph}z;@&u!1h$`5yb^7$_4+T~j;txAK!8(+suH}5==bJv)P-s?Q3$ULT>sD8K9&DYGdsUqb#?XO#ZT>?{bg-f7NgD(|L@c5Hdm-WHR%gYZNhu^+&_&%3NQc8TJZnh-;IMeE~yu!YUkB8PXzHGnFctx0D*Tbm|Us)RRA{Zzl zV|YD+V|XKUc1sli)6VO5s7(#%-8OdOBlu1K}VMPMtmCayX5exwbnO3ATUJ&74 zuz_Jg6KlYECXjCv868-;7tCXI2-ayh#MHng=3vVW3Y1n>22q`cDlrD%o#&Wd^s+Mi zSq`zlywFUSfg=rUP(+E@^{<7S7!+nOI2bTCBrq`?WMOFHWMC0y;80@_@PSC^vo6z& z2H#+;C R8Cd2sc)I$ztaD0e0sz|CCItWh From 5bc65120b6a8976b83309950aaedf71a6bf72cb9 Mon Sep 17 00:00:00 2001 From: raoulvdberge Date: Mon, 29 Jul 2024 21:04:30 +0200 Subject: [PATCH 03/12] fix: remove scrollbar from widgets.png And now remove widgets.png all together. --- .../widget/AbstractSideButtonWidget.java | 4 +-- .../support/widget/ScrollbarWidget.java | 27 +++++++++++------- .../textures/gui/sprites/widget/scrollbar.png | Bin 0 -> 161 bytes .../gui/sprites/widget/scrollbar_clicked.png | Bin 0 -> 161 bytes .../gui/sprites/widget/scrollbar_disabled.png | Bin 0 -> 157 bytes .../refinedstorage/textures/gui/widgets.png | Bin 1335 -> 0 bytes .../assets/refinedstorage/textures/icons.png | Bin 5773 -> 5611 bytes 7 files changed, 18 insertions(+), 13 deletions(-) create mode 100644 refinedstorage-common/src/main/resources/assets/refinedstorage/textures/gui/sprites/widget/scrollbar.png create mode 100644 refinedstorage-common/src/main/resources/assets/refinedstorage/textures/gui/sprites/widget/scrollbar_clicked.png create mode 100644 refinedstorage-common/src/main/resources/assets/refinedstorage/textures/gui/sprites/widget/scrollbar_disabled.png delete mode 100644 refinedstorage-common/src/main/resources/assets/refinedstorage/textures/gui/widgets.png diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/widget/AbstractSideButtonWidget.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/widget/AbstractSideButtonWidget.java index b91358499..f36448fad 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/widget/AbstractSideButtonWidget.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/widget/AbstractSideButtonWidget.java @@ -51,7 +51,7 @@ public void setWarning(@Nullable final Component text) { @Override public void renderWidget(final GuiGraphics graphics, final int mouseX, final int mouseY, final float partialTicks) { - graphics.blit(getTextureIdentifier(), getX(), getY(), 238, isHovered ? 35 : 16, WIDTH, HEIGHT); + graphics.blit(TextureIds.ICONS, getX(), getY(), 238, isHovered ? 35 : 16, WIDTH, HEIGHT); graphics.blit( getTextureIdentifier(), getX() + 1, @@ -65,7 +65,7 @@ public void renderWidget(final GuiGraphics graphics, final int mouseX, final int RenderSystem.enableBlend(); RenderSystem.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); RenderSystem.setShaderColor(1.0f, 1.0f, 1.0f, 0.5f); - graphics.blit(getTextureIdentifier(), getX(), getY(), 238, 54, WIDTH, HEIGHT); + graphics.blit(TextureIds.ICONS, getX(), getY(), 238, 54, WIDTH, HEIGHT); RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F); RenderSystem.disableBlend(); final Screen screen = Minecraft.getInstance().screen; diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/widget/ScrollbarWidget.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/widget/ScrollbarWidget.java index 7f0e34a89..6073e437d 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/widget/ScrollbarWidget.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/widget/ScrollbarWidget.java @@ -14,7 +14,11 @@ import static com.refinedmods.refinedstorage.common.util.IdentifierUtil.createIdentifier; public class ScrollbarWidget extends AbstractWidget { - private static final ResourceLocation TEXTURE = createIdentifier("textures/gui/widgets.png"); + private static final ResourceLocation TEXTURE = createIdentifier("widget/scrollbar"); + private static final ResourceLocation CLICKED_TEXTURE = createIdentifier("widget/scrollbar_clicked"); + private static final ResourceLocation DISABLED_TEXTURE = createIdentifier("widget/scrollbar_disabled"); + + private static final int SCROLLER_WIDTH = 12; private static final int SCROLLER_HEIGHT = 15; private static final int ANIMATION_SCROLL_DURATION_IN_TICKS = 10; @@ -51,23 +55,24 @@ public void setEnabled(final boolean enabled) { this.enabled = enabled; } + private ResourceLocation getTexture() { + if (!enabled) { + return DISABLED_TEXTURE; + } + return clicked ? CLICKED_TEXTURE : TEXTURE; + } + @Override public void renderWidget(final GuiGraphics graphics, final int mouseX, final int mouseY, final float partialTicks) { if (isAnimatingScroll()) { updateScrollingAnimation(partialTicks); } - - final int enabledU = clicked ? 220 : 232; - final int u = enabled ? enabledU : 244; - - graphics.blit( - TEXTURE, + graphics.blitSprite( + getTexture(), getX(), getY() + (int) ((float) offset / (float) maxOffset * (height - SCROLLER_HEIGHT)), - u, - 0, - 12, - 15 + SCROLLER_WIDTH, + SCROLLER_HEIGHT ); } diff --git a/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/gui/sprites/widget/scrollbar.png b/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/gui/sprites/widget/scrollbar.png new file mode 100644 index 0000000000000000000000000000000000000000..38e03a8b439eb4909e61bad6730ba65f9a0a1555 GIT binary patch literal 161 zcmeAS@N?(olHy`uVBq!ia0vp^JV4CP!VDyp&Kp+&DaPU;cPEB*=VV?2IV|apzK#qG z8~eHcB(eheJOMr-uK)l4@9yqCcI;SaXy~0STuDH2&H|6fVg?4j!ywFfJby(BP*Bd( y#W6(Uaxw$68=IP{LO@!A5DQc4t4}SxAi!9;jKekGCG9LwC4;A{pUXO@geCx?A1yQh literal 0 HcmV?d00001 diff --git a/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/gui/sprites/widget/scrollbar_clicked.png b/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/gui/sprites/widget/scrollbar_clicked.png new file mode 100644 index 0000000000000000000000000000000000000000..878229c516caa65e29925a712419c4c4087b0e0f GIT binary patch literal 161 zcmeAS@N?(olHy`uVBq!ia0vp^JV4CP!VDyp&Kp+&DaPU;cPEB*=VV?2IV|apzK#qG z8~eHcB(eheJOMr-uK)l4@9ys2x^-)4Xy~+G4-$aloCO|{#S9F5he4R}c>anMprD+m yi(`nyy<5J*Z0VPaBz^{J&nMpc!;W*6JR)nDFT1uA6lboFyt=akR{0D8bG;{X5v literal 0 HcmV?d00001 diff --git a/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/gui/widgets.png b/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/gui/widgets.png deleted file mode 100644 index d4b20ba685b0c23b2328f29b859f9721a0abbb24..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1335 zcmeAS@N?(olHy`uVBq!ia0y~yU<5K5893O0R7}x|G!U;i$lZxy-8q?;Kn_c~qpu?a z!^VE@KZ&eBK4*bPWHAE+-vJP2%(~Xe2~=~&)5S5QBJS-SN4@N7nFAlIP8%909xz*T zQ0vI-_)cAk=m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+t2)1 zTdd^bWY^=Mz#HG=ZzaTItekdY=KW6cRi;d1B{)c%6LrR7V^`Pl3=4$8O9S&Z(*Zim z`sa)0pP*FRnX~Zo;UX3O@B8+%+RqInI6{7Yeh_HQa)2zm!iVEt^WWckX4(jZE{~rw z=VO_C;3}tcziXLSX~)*)&T3@-x4vlY!7+7SNQH$?O{ySO8+o4V&&JAZ&;{f9;hK}I z%1-zNRnM^0+a!u9cO;8rf4`zJ2r{?ng`aTXeD;Nr zXxW6(`40qUH9MDbWN{lb&VZG4!!pH-p&WIHl=DPy#`R|~?AhhV`;VPXO|NVRVQFID2$g@JfB z>y9&9SKu0H3CFSu3F!_W9Zsi`&v89~NFmQM@!GW({Z;!QgiVSX;bH`ALeQlbB+JO0HRD^kNW!!uLWF5tW| q7(VB;W5W11w`kp{{K(gT_QN`iVd~dmN3Vwf)?;O9XYtkyoA7@Caiu>1 From 32ff668ccc9e62b3c33eb4a9eb84265c7f0dcb96 Mon Sep 17 00:00:00 2001 From: raoulvdberge Date: Mon, 29 Jul 2024 21:10:04 +0200 Subject: [PATCH 04/12] fix: remove side buttons from icons.png --- .../widget/AbstractSideButtonWidget.java | 10 ++++++++-- .../gui/sprites/widget/side_button.png | Bin 0 -> 165 bytes .../widget/side_button_hover_overlay.png | Bin 0 -> 146 bytes .../sprites/widget/side_button_hovered.png | Bin 0 -> 165 bytes .../assets/refinedstorage/textures/icons.png | Bin 5611 -> 4047 bytes 5 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 refinedstorage-common/src/main/resources/assets/refinedstorage/textures/gui/sprites/widget/side_button.png create mode 100644 refinedstorage-common/src/main/resources/assets/refinedstorage/textures/gui/sprites/widget/side_button_hover_overlay.png create mode 100644 refinedstorage-common/src/main/resources/assets/refinedstorage/textures/gui/sprites/widget/side_button_hovered.png diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/widget/AbstractSideButtonWidget.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/widget/AbstractSideButtonWidget.java index f36448fad..04b3f4379 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/widget/AbstractSideButtonWidget.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/widget/AbstractSideButtonWidget.java @@ -21,7 +21,13 @@ import net.minecraft.resources.ResourceLocation; import org.lwjgl.opengl.GL11; +import static com.refinedmods.refinedstorage.common.util.IdentifierUtil.createIdentifier; + public abstract class AbstractSideButtonWidget extends Button { + private static final ResourceLocation TEXTURE = createIdentifier("widget/side_button"); + private static final ResourceLocation HOVERED_TEXTURE = createIdentifier("widget/side_button_hovered"); + private static final ResourceLocation HOVER_OVERLAY_TEXTURE = createIdentifier("widget/side_button_hover_overlay"); + private static final int WIDTH = 18; private static final int HEIGHT = 18; private static final int WARNING_SIZE = 10; @@ -51,7 +57,7 @@ public void setWarning(@Nullable final Component text) { @Override public void renderWidget(final GuiGraphics graphics, final int mouseX, final int mouseY, final float partialTicks) { - graphics.blit(TextureIds.ICONS, getX(), getY(), 238, isHovered ? 35 : 16, WIDTH, HEIGHT); + graphics.blitSprite(isHovered ? HOVERED_TEXTURE : TEXTURE, getX(), getY(), WIDTH, HEIGHT); graphics.blit( getTextureIdentifier(), getX() + 1, @@ -65,7 +71,7 @@ public void renderWidget(final GuiGraphics graphics, final int mouseX, final int RenderSystem.enableBlend(); RenderSystem.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); RenderSystem.setShaderColor(1.0f, 1.0f, 1.0f, 0.5f); - graphics.blit(TextureIds.ICONS, getX(), getY(), 238, 54, WIDTH, HEIGHT); + graphics.blitSprite(HOVER_OVERLAY_TEXTURE, getX(), getY(), WIDTH, HEIGHT); RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F); RenderSystem.disableBlend(); final Screen screen = Minecraft.getInstance().screen; diff --git a/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/gui/sprites/widget/side_button.png b/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/gui/sprites/widget/side_button.png new file mode 100644 index 0000000000000000000000000000000000000000..4db677977fd7f08c26b9381a9136c78800e3a4c4 GIT binary patch literal 165 zcmeAS@N?(olHy`uVBq!ia0vp^LLkh-3?!F4n4AKn7>k44ofy`glX(f`u%tWsIx;Y9 z?C1WI$O`212l#}znwgn(cXy|!rza&Pd3t&tX_x&4l;SM#h%9Dc;5!V$jK}j=fDDuO zba4!kxSZ_3;O58?kdR=~#?bC~AgQR4fqjOtqy)o+O_Had_!tEMl`?p``njxgN@xNA Dw?QkO literal 0 HcmV?d00001 diff --git a/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/gui/sprites/widget/side_button_hover_overlay.png b/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/gui/sprites/widget/side_button_hover_overlay.png new file mode 100644 index 0000000000000000000000000000000000000000..23ce7d7108659b1e126bc8832e74bdea007e04de GIT binary patch literal 146 zcmeAS@N?(olHy`uVBq!ia0vp^LLkh+1|-AI^@Rf|#^NA%Cx&(BWL^R}Ea{HEjtmSN z`?>!lvI6;>1s;*b3=DjSL74G){)!Z!pt`4vV~B-+@}K|z>zSEF8HA@SljxChLB<>g b1`G^NCd>k44ofy`glX(f`u%tWsIx;Y9 z?C1WI$O`212l#}z*3{HIe*AdHjvYx!Ns}i}UO(}=2~di&z$3Dlfr0NZ2s0kfUjZ^q z-qXb~MB;L?1B06*M?gY?NgG4EFVdQ&MBb@ E0QQV8G5`Po literal 0 HcmV?d00001 diff --git a/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/icons.png b/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/icons.png index 513c79e3653d5a686e957431266061559db289e2..5e42fdb3bff1c68e78f364ee12d53f5cdbefc03d 100644 GIT binary patch literal 4047 zcmbVPc{r3^*gwxK7<-f`%g9o_4WmMX!C0#Csz_3{jHQxM={1GOJVTKbUKNvds<$YH zL6(F@k|-)=tTC0cg^|i`z8U@TeSd$?bv@U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L(g!741U_$uB(jkz-@2O}Vy`+m%U-6^+m^ z+g+%(wp8yaeRlW%?LCsl%Q5p;!6a%} z4k$z)L1LyDQZnW8e{EttG!>oqeo1q^?Y&o0-uXn>Pm_9r5*F={{K)&oXR95~iz z6?qUZ(B?ReR?(o#GbGxEs37@#<68zVj|bww)|TJYBNy&GY5Rjm&MTkiKfEGjcm=5B zOdY``VYzSlo+g8CsWx!-fN1f{6yDlipOv!9L{@M()dy6U5KEM4nd?j|;Yjx z6RdI?oj-m<9_L~u^m*t6&&#q`iW^-az*J@ciQ$e(8yYtE%27Km2GX?m78)vhlaJaf zo-s?h;&}?J99|GL{qh8*VA8zs#5q9CXdD_ Date: Mon, 29 Jul 2024 21:13:50 +0200 Subject: [PATCH 05/12] fix: remove light arrow from icons.png There is already a sprite for it. --- ...CraftingPatternClientTooltipComponent.java | 18 +++++++++--------- .../common/support/TextureIds.java | 3 +++ .../tooltip/MouseClientTooltipComponent.java | 6 +++++- .../assets/refinedstorage/textures/icons.png | Bin 4047 -> 4004 bytes 4 files changed, 17 insertions(+), 10 deletions(-) diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/CraftingPatternClientTooltipComponent.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/CraftingPatternClientTooltipComponent.java index 04ea6397e..be13f9548 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/CraftingPatternClientTooltipComponent.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/CraftingPatternClientTooltipComponent.java @@ -17,6 +17,9 @@ import net.minecraft.resources.ResourceLocation; import net.minecraft.world.item.ItemStack; +import static com.refinedmods.refinedstorage.common.support.TextureIds.LIGHT_ARROW; +import static com.refinedmods.refinedstorage.common.support.TextureIds.LIGHT_ARROW_HEIGHT; +import static com.refinedmods.refinedstorage.common.support.TextureIds.LIGHT_ARROW_WIDTH; import static com.refinedmods.refinedstorage.common.util.IdentifierUtil.createIdentifier; public class CraftingPatternClientTooltipComponent implements ClientTooltipComponent { @@ -28,9 +31,6 @@ public class CraftingPatternClientTooltipComponent implements ClientTooltipCompo private static final ResourceLocation SLOT = createIdentifier("slot"); private static final ResourceLocation LARGE_SLOT = createIdentifier("large_slot"); - private static final ResourceLocation ARROW = createIdentifier("light_arrow"); - private static final int ARROW_WIDTH = 22; - private static final int ARROW_HEIGHT = 15; private static final int LARGE_SLOT_WIDTH = 26; private static final int LARGE_SLOT_HEIGHT = 26; @@ -53,7 +53,7 @@ public int getHeight() { @Override public int getWidth(final Font font) { - return (width * 18) + ARROW_SPACING + ARROW_WIDTH + ARROW_SPACING + LARGE_SLOT_WIDTH; + return (width * 18) + ARROW_SPACING + LIGHT_ARROW_WIDTH + ARROW_SPACING + LARGE_SLOT_WIDTH; } @Override @@ -108,16 +108,16 @@ private void renderInputSlot(final int x, final int y, final GuiGraphics graphic private void renderArrow(final int x, final int y, final GuiGraphics graphics) { graphics.blitSprite( - ARROW, + LIGHT_ARROW, x + width * 18 + ARROW_SPACING, - y + ((height * 18) / 2) - (ARROW_HEIGHT / 2), - ARROW_WIDTH, - ARROW_HEIGHT + y + ((height * 18) / 2) - (LIGHT_ARROW_HEIGHT / 2), + LIGHT_ARROW_WIDTH, + LIGHT_ARROW_HEIGHT ); } private void renderResultSlot(final Font font, final int x, final int y, final GuiGraphics graphics) { - final int slotX = x + width * 18 + ARROW_SPACING + ARROW_WIDTH + ARROW_SPACING; + final int slotX = x + width * 18 + ARROW_SPACING + LIGHT_ARROW_WIDTH + ARROW_SPACING; final int slotY = y + ((height * 18) / 2) - (LARGE_SLOT_HEIGHT / 2); graphics.blitSprite(LARGE_SLOT, slotX, slotY, LARGE_SLOT_WIDTH, LARGE_SLOT_HEIGHT); final ResourceAmount output = craftingPattern.output(); diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/TextureIds.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/TextureIds.java index e4fb3e004..3b6a7e821 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/TextureIds.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/TextureIds.java @@ -6,6 +6,9 @@ public final class TextureIds { public static final ResourceLocation ICONS = createIdentifier("textures/icons.png"); + public static final ResourceLocation LIGHT_ARROW = createIdentifier("light_arrow"); + public static final int LIGHT_ARROW_WIDTH = 22; + public static final int LIGHT_ARROW_HEIGHT = 15; private TextureIds() { } diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/tooltip/MouseClientTooltipComponent.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/tooltip/MouseClientTooltipComponent.java index 2af039f4f..f09136e14 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/tooltip/MouseClientTooltipComponent.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/tooltip/MouseClientTooltipComponent.java @@ -15,6 +15,10 @@ import net.minecraft.client.gui.screens.inventory.tooltip.ClientTooltipComponent; import net.minecraft.world.item.ItemStack; +import static com.refinedmods.refinedstorage.common.support.TextureIds.LIGHT_ARROW; +import static com.refinedmods.refinedstorage.common.support.TextureIds.LIGHT_ARROW_HEIGHT; +import static com.refinedmods.refinedstorage.common.support.TextureIds.LIGHT_ARROW_WIDTH; + public class MouseClientTooltipComponent implements ClientTooltipComponent { private static final int PADDING = 4; @@ -79,7 +83,7 @@ public static ClientTooltipComponent itemConversion(final Type type, @Override public void render(final GuiGraphics graphics, final int x, final int y) { graphics.renderItem(from, x, y); - graphics.blit(TextureIds.ICONS, x + 16 + 2, y, 234, 133, 22, 15); + graphics.blitSprite(LIGHT_ARROW, x + 16 + 2, y, LIGHT_ARROW_WIDTH, LIGHT_ARROW_HEIGHT); graphics.renderItem(to, x + 16 + 2 + 22 + 2, y); } diff --git a/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/icons.png b/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/icons.png index 5e42fdb3bff1c68e78f364ee12d53f5cdbefc03d..1b409bbce73426a6c821b2d00b18eafe557a56c7 100644 GIT binary patch delta 3662 zcmXw5c_3748-LHN#=c}rBn?uw3KhkOlI9j|ma$~tLqaa;9Fv=tTjN$A?qr#=-kS+o zvmQ|@+lVY(%UGfsTXZeuns3JazVpv{-}l*nzvn#f>D-#Lwb%iI57=5;o{e#z$sl?U zR>>!-I;XnI=4z*AQp2YDQzjyQ@cB;e%0~K@pp~e5WY*udIaz()PhmnqGv6`)&SH?J zl2+>ycID)YCk}T!pM@uxF=lrye&Ej!db>bc+l#HLw99_EhPw$t)=`PQydHN^)$wuL zR3n5tnLe;8%U^@f7?mHzp^I0(;&+|r@aC=>oZz+^ba~VlwPdR;cY}#t(!rThra0-f z){CD`L7YBC3lDkB%4icA+4`t)&55B6<)ExK||HoLA{5 zi{R^ol~n_d$JIYtV7x7wtZhQxX?l{uKXjt`LwjoE6zu%~Ft1_u55;R*tR~I#Mp)44 ze_VQh&fPpupW0%eXc=cB0BUZyn z{REiqcP(H~i1tl{Vb*@X`0mv0n%0Yl84OWwSfo_))YkcBm<5S4B_8QCUr$@9Qkp2L zfvZ>V&6b@h@7cQ((4d|Oe8x%s_kEjLEIDGE^{YhN!7HB!Vx^LM(?Eb)(kxFxYx~*! zb?p`#TybD1RETTx(Yd?>33cY^iBN(`)M z9WI@_xa-wi9j54!c|wYOhO zLo^ZH+(kzQt4eUg~%Eu@%y=lK%pL|mi#bvhbiXA*Alkh z1)W1P;~19m?mD#m zwH23KSC&L`;kYK4mOboAP`^R9`4^m(=^Mys=Z#Vk9TlG=P2fCl=rXq|T3ktwE*5T;Ql0&5xtlu$Fq308v z`r6OI2GIHB9<7l!p<**9ln{M)rV4yV7QfYR8J;msy`DVhcgiVV~3U4*LeA9FE2=-o7v;nD1pm*sG)pZYR zU#Er8`gw<@zVf^R$oh0T;1FCkNlUHrp^y+*%?ykcKvg)O?%4GJz5nQk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z5e&%xT$OyF;8zA}x>%c4W=C)rPz!NaUW{6QD|KR_dvYz|4We)#9z+#}Q;6iZ)u~IR@|fa{6NQP|ea1 z5;!djquJzB1YglX*zy4h6sS>aEgXG%i0K#3EENV5K=YM=Ze{Nt;>(v(S~Ny(y)OM4 zjz|IDO%78#A>M}gGpGp@D{A+4>WmU%PpBf5~ZnC|dBVVBrHKA4)}ZZ1&(ycaujlzWUf5Ya%Yt@Z1e-5_tNvBq>WSy=#xPDsD z7k6#K(en(5<+jC3New(rcagHk_s{t7g{QZOBp{@ht7U3Uz`3U#ch(peUlg zS%JKY#UX1@bUbu**$T~rH^1j7ajYtg7G8)g`VmY~?}2zn39Pl4b!cNO_CdHJ~KDW-oh0J*BydF_@}3fI2P5 zzGp5wfno>0plhBKLCVl?l07aSPV$2^u_T+oshG|x#CkFuG*&bVHa;cKh=>tS1)4-@ zGh2=|sriq9%^a+g!`(-Y;88MIs$+sR)_X0a#2Wb|^M?mF0qFulFK+smCgv-+7P zc+n#y%hPg#f#8M*u{bZ_Z^XuN`BqvOl1WShh9XsC`~~L>{j!`j(XoUF{=;oP0~>^< zfRU^eBN`|%paGgPIS70dd~;Kexb-Ocy7jN_a$Qj=*y+7{2(7+yY~q_23buC5fb}o3 zAb5{xOv?-x8IaNbOBHuzFtNz+vwSgVO($<;mbo_$Ep05=tkO!G6CJ;X(^uKNHJEr zCC%&WV>>XvGR48*HO%`PLz`!$ynN6;dV*0d4qn?v-moAemX5*;^JOVoo_}>f221+B u3ke^RloI;SDVRkCk+%vj#tt#=Z^7b2o<}dGVDuA!U|H=yVo_*D4gVk3tJU2A From 2763dc43ea3ff4905aec9ae5eec969ccec81d302 Mon Sep 17 00:00:00 2001 From: raoulvdberge Date: Mon, 29 Jul 2024 21:18:08 +0200 Subject: [PATCH 06/12] fix: remove warning icon from icons.png --- .../networking/NetworkTransmitterScreen.java | 5 +++-- .../common/support/TextureIds.java | 2 ++ .../widget/AbstractSideButtonWidget.java | 9 ++++----- .../textures/gui/sprites/warning.png | Bin 0 -> 154 bytes .../assets/refinedstorage/textures/icons.png | Bin 4004 -> 3971 bytes 5 files changed, 9 insertions(+), 7 deletions(-) create mode 100644 refinedstorage-common/src/main/resources/assets/refinedstorage/textures/gui/sprites/warning.png diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/networking/NetworkTransmitterScreen.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/networking/NetworkTransmitterScreen.java index a7e208be0..cbdcf1a19 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/networking/NetworkTransmitterScreen.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/networking/NetworkTransmitterScreen.java @@ -1,7 +1,6 @@ package com.refinedmods.refinedstorage.common.networking; import com.refinedmods.refinedstorage.common.support.AbstractBaseScreen; -import com.refinedmods.refinedstorage.common.support.TextureIds; import com.refinedmods.refinedstorage.common.support.containermenu.PropertyTypes; import com.refinedmods.refinedstorage.common.support.widget.RedstoneModeSideButtonWidget; @@ -10,6 +9,8 @@ import net.minecraft.resources.ResourceLocation; import net.minecraft.world.entity.player.Inventory; +import static com.refinedmods.refinedstorage.common.support.TextureIds.WARNING; +import static com.refinedmods.refinedstorage.common.support.TextureIds.WARNING_SIZE; import static com.refinedmods.refinedstorage.common.util.IdentifierUtil.createIdentifier; public class NetworkTransmitterScreen extends AbstractBaseScreen { @@ -36,7 +37,7 @@ protected void renderLabels(final GuiGraphics graphics, final int mouseX, final final NetworkTransmitterData status = getMenu().getStatus(); final int displayTextX = 51; if (status.error()) { - graphics.blit(TextureIds.ICONS, displayTextX, 23, 246, 148, 10, 10); + graphics.blitSprite(WARNING, displayTextX, 23, WARNING_SIZE, WARNING_SIZE); } graphics.drawString(font, status.message(), displayTextX + (status.error() ? (10 + 4) : 0), 25, 4210752, false); } diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/TextureIds.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/TextureIds.java index 3b6a7e821..ebe724259 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/TextureIds.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/TextureIds.java @@ -9,6 +9,8 @@ public final class TextureIds { public static final ResourceLocation LIGHT_ARROW = createIdentifier("light_arrow"); public static final int LIGHT_ARROW_WIDTH = 22; public static final int LIGHT_ARROW_HEIGHT = 15; + public static final ResourceLocation WARNING = createIdentifier("warning"); + public static final int WARNING_SIZE = 10; private TextureIds() { } diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/widget/AbstractSideButtonWidget.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/widget/AbstractSideButtonWidget.java index 04b3f4379..c34f122a3 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/widget/AbstractSideButtonWidget.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/widget/AbstractSideButtonWidget.java @@ -21,6 +21,8 @@ import net.minecraft.resources.ResourceLocation; import org.lwjgl.opengl.GL11; +import static com.refinedmods.refinedstorage.common.support.TextureIds.WARNING; +import static com.refinedmods.refinedstorage.common.support.TextureIds.WARNING_SIZE; import static com.refinedmods.refinedstorage.common.util.IdentifierUtil.createIdentifier; public abstract class AbstractSideButtonWidget extends Button { @@ -30,7 +32,6 @@ public abstract class AbstractSideButtonWidget extends Button { private static final int WIDTH = 18; private static final int HEIGHT = 18; - private static final int WARNING_SIZE = 10; @Nullable private ClientTooltipComponent warning; @@ -87,12 +88,10 @@ public void renderWidget(final GuiGraphics graphics, final int mouseX, final int private void renderWarning(final GuiGraphics graphics) { graphics.pose().pushPose(); graphics.pose().translate(0, 0, 200); - graphics.blit( - TextureIds.ICONS, + graphics.blitSprite( + WARNING, getX() + WIDTH - WARNING_SIZE + 2, getY() + HEIGHT - WARNING_SIZE + 2, - 246, - 148, WARNING_SIZE, WARNING_SIZE ); diff --git a/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/gui/sprites/warning.png b/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/gui/sprites/warning.png new file mode 100644 index 0000000000000000000000000000000000000000..411746fe966a3cb7e1f0c04d47b2c75a6d8c04fd GIT binary patch literal 154 zcmeAS@N?(olHy`uVBq!ia0vp^AT}2ZGmxy8xzq=w7>k44ofy`glX(f`u%tWsIx;Y9 z?C1WI$O`0h2Ka=ymT+-hQda)|Kh(`|Pc%rdz$3Dlfr0NZ2s0kfUy%Y7l=5_O43W5; r+`!=G=;+9(u(G9D#3h-Tk(rsnb2d|1$&XL1KvfK$u6{1-oD!M8-LHtFf*31-mzqv%9@C>j~FGlOqNozr0iskNZHOYu24cG%AQKyDA7>X zxuwXGAz3P0F6vq{%AVhu+x_GB-}8B&=lQ?#RcF?eva#hJ_cW=22&m4LCk_CVWb4L zdN+0msA_(3*>j2$#g1ucX_Px**|%q)_1~o1AAesCq7Wq)nl70g zX#V=Gu_Vd9b|rllj!G7#Roa4*+MsdeP2rd|sy6LUxYKX}Ces)nIL+gunGabV%~Z+b zGQ!HV8g~G*C6^QCn@x(KiN&-pBA)tSGEI4FP^p%@p44$sM1j2rG1-jQQ%PK&ee8os z$+qH)A)g%OBBjR*ny0mq>A!Jz2Go$o=(dkG>|uNs%u4o(^V#jMoP?xOJ2J{sCa=`C z1@B8;;v10<6-t|wpYMc=ATRAL`)m^hwY~*wwVV#$JkL=aJX7NPpyUL2in%||XPEbs zb6T5~Y$c&Oi z{B%yRlJ4TZ#6IJxQ;^R_Qd|wV{nO$--+YNLjGbc;NN%(1jBmGkUcxzHira1ykrM-mc=rz@E~gY&SzSVL{JZ!O5|Ga-H?bC5_q#d zZin>u?e!G%>4+_)znvT!6^NO3uocd##no+UKt8ASfXQOr-R8{@26YvdtPHilz-)jvnM&UjS=X;R_Cu# z=Y8pMb4C+4b}QDkvhbrDItQzuyo&Zcz4X-WFNEpl=BjKa&sB1Zwe+ZNB9&tL!egD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FXymID8sU?pF=LFXXHxECGQSmwnnzHI>R;#ZVv|XIJD{6<;M)gM9P4h`io#Ww|h63O|v`zzVU=Q7kNq)hMDMB zyC37O7~AgJjbfT1Cxxh3BC#T5Oj_rBo;Sy92 z9{3ElAx{Vdq@38A5%p-VM+I;tXkGY6bs@YL9x5+SDqk1KmPRIx2!b5Nm~}{{C;DXh zGf+A08chvhdP-0x6#JiAa9pWL77M^K0I#KHvN}&%^uQU#Q!9)$hy{K=H^K41zT=+i z?vDzr?t(J>=t#*XsF*FDK!b09U|^rtjm5S#B1CNH{OP7Q0FmBvW$zX2l`^rXEj5 Date: Mon, 29 Jul 2024 21:22:07 +0200 Subject: [PATCH 07/12] fix: remove help icon from icons.png --- .../tooltip/HelpClientTooltipComponent.java | 7 ++++--- .../textures/gui/sprites/help.png | Bin 0 -> 205 bytes .../assets/refinedstorage/textures/icons.png | Bin 3971 -> 3850 bytes 3 files changed, 4 insertions(+), 3 deletions(-) create mode 100644 refinedstorage-common/src/main/resources/assets/refinedstorage/textures/gui/sprites/help.png diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/tooltip/HelpClientTooltipComponent.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/tooltip/HelpClientTooltipComponent.java index 23cf658a8..e6f13f107 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/tooltip/HelpClientTooltipComponent.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/tooltip/HelpClientTooltipComponent.java @@ -1,7 +1,5 @@ package com.refinedmods.refinedstorage.common.support.tooltip; -import com.refinedmods.refinedstorage.common.support.TextureIds; - import java.util.List; import net.minecraft.client.Minecraft; @@ -12,13 +10,16 @@ import net.minecraft.locale.Language; import net.minecraft.network.chat.Component; import net.minecraft.network.chat.Style; +import net.minecraft.resources.ResourceLocation; import net.minecraft.util.FormattedCharSequence; import org.joml.Matrix4f; +import static com.refinedmods.refinedstorage.common.util.IdentifierUtil.createIdentifier; import static com.refinedmods.refinedstorage.common.util.IdentifierUtil.createTranslationAsHeading; import static net.minecraft.client.gui.screens.Screen.hasShiftDown; public class HelpClientTooltipComponent implements ClientTooltipComponent { + private static final ResourceLocation TEXTURE = createIdentifier("help"); private static final ClientTooltipComponent PRESS_SHIFT_FOR_HELP = new SmallTextClientTooltipComponent( createTranslationAsHeading("misc", "press_shift_for_help") ); @@ -76,7 +77,7 @@ public void renderText(final Font font, @Override public void renderImage(final Font font, final int x, final int y, final GuiGraphics graphics) { - graphics.blit(TextureIds.ICONS, x, y + 2, 236, 158, 20, 20); + graphics.blitSprite(TEXTURE, x, y + 2, 20, 20); } public static ClientTooltipComponent create(final Component text) { diff --git a/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/gui/sprites/help.png b/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/gui/sprites/help.png new file mode 100644 index 0000000000000000000000000000000000000000..08cf6a985f445bbaf0cd513f3481e853d6d829ce GIT binary patch literal 205 zcmeAS@N?(olHy`uVBq!ia0vp^A|TAc3?z4jzqJQajKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$1AIbU|Ns0cH18&mw_sMJ5RhUn3Gxg6|DWOdDPEvj2F?PH$YKTtzQZ8Q zcszea3Q*9_)5S4FBlzmYgS-q1JWdyH{cYdoqU54B;qqy7+sIhMC0}{w$_THR6nM%) t#U{)Ak=1$o&WvZw^XF~#{3&}?`mqF~kj1J`OMxaac)I$ztaD0e0sv+JK;r-a literal 0 HcmV?d00001 diff --git a/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/icons.png b/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/icons.png index f168d372f9e11fe4a33e69719785ccfe1728fa1b..4a4d8ed3311b7ef5bf11802fca48e1d878ef10b2 100644 GIT binary patch literal 3850 zcmb7Hc{r5o-@l((Fc`{~ozM^sV=wDi5+T|hA=k@_^GB^c63jpj^RpoLsxm>OW07C#+?K9BP(tHX4d`Nqrs?;z5 z?*S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VFo0H zVFqX3w%SXA>Q$cm!gYFIWLX>}wd*#LASsVWH~`$_L_mv9!0K-Nc%j5g?Q;WMbuwgU ubPSr>wqh>Yh%g(ewh5Sv;o;%yM%Pm>j^Ca0kwJej!J+*YCQtS{(*FnPp~tuY From 6ef5eebf9def1d86b7aeee83c0a97325eca5c030 Mon Sep 17 00:00:00 2001 From: raoulvdberge Date: Mon, 29 Jul 2024 21:28:39 +0200 Subject: [PATCH 08/12] fix: remove mouse buttons from icons.png --- .../tooltip/MouseClientTooltipComponent.java | 17 ++++++++--------- .../gui/sprites/left_mouse_button.png | Bin 0 -> 222 bytes .../gui/sprites/right_mouse_button.png | Bin 0 -> 222 bytes .../assets/refinedstorage/textures/icons.png | Bin 3850 -> 3561 bytes 4 files changed, 8 insertions(+), 9 deletions(-) create mode 100644 refinedstorage-common/src/main/resources/assets/refinedstorage/textures/gui/sprites/left_mouse_button.png create mode 100644 refinedstorage-common/src/main/resources/assets/refinedstorage/textures/gui/sprites/right_mouse_button.png diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/tooltip/MouseClientTooltipComponent.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/tooltip/MouseClientTooltipComponent.java index f09136e14..a835b7643 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/tooltip/MouseClientTooltipComponent.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/tooltip/MouseClientTooltipComponent.java @@ -3,7 +3,6 @@ import com.refinedmods.refinedstorage.api.resource.ResourceKey; import com.refinedmods.refinedstorage.common.Platform; import com.refinedmods.refinedstorage.common.api.RefinedStorageApi; -import com.refinedmods.refinedstorage.common.support.TextureIds; import com.refinedmods.refinedstorage.common.support.resource.FluidResource; import javax.annotation.Nullable; @@ -13,11 +12,13 @@ import net.minecraft.client.gui.Font; import net.minecraft.client.gui.GuiGraphics; import net.minecraft.client.gui.screens.inventory.tooltip.ClientTooltipComponent; +import net.minecraft.resources.ResourceLocation; import net.minecraft.world.item.ItemStack; import static com.refinedmods.refinedstorage.common.support.TextureIds.LIGHT_ARROW; import static com.refinedmods.refinedstorage.common.support.TextureIds.LIGHT_ARROW_HEIGHT; import static com.refinedmods.refinedstorage.common.support.TextureIds.LIGHT_ARROW_WIDTH; +import static com.refinedmods.refinedstorage.common.util.IdentifierUtil.createIdentifier; public class MouseClientTooltipComponent implements ClientTooltipComponent { private static final int PADDING = 4; @@ -119,7 +120,7 @@ public int getWidth(final Font font) { @Override public void renderImage(final Font font, final int x, final int y, final GuiGraphics graphics) { - graphics.blit(TextureIds.ICONS, x + type.leftPad, y, type.x, type.y, type.width, type.height); + graphics.blitSprite(type.texture, x + type.leftPad, y, type.width, type.height); iconRenderer.render(graphics, x + 9 + PADDING, y); if (amount != null) { final PoseStack poseStack = graphics.pose(); @@ -139,19 +140,17 @@ default int getWidth() { } public enum Type { - LEFT(247, 0, 180, 9, 13), - RIGHT(238, 2, 180, 9, 13); + LEFT(createIdentifier("left_mouse_button"), 0, 9, 13), + RIGHT(createIdentifier("right_mouse_button"), 2, 9, 13); - private final int x; + private final ResourceLocation texture; private final int leftPad; - private final int y; private final int width; private final int height; - Type(final int x, final int leftPad, final int y, final int width, final int height) { - this.x = x; + Type(final ResourceLocation texture, final int leftPad, final int width, final int height) { + this.texture = texture; this.leftPad = leftPad; - this.y = y; this.width = width; this.height = height; } diff --git a/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/gui/sprites/left_mouse_button.png b/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/gui/sprites/left_mouse_button.png new file mode 100644 index 0000000000000000000000000000000000000000..f04af00db56e49f2871f41bf39c5aacf36e65f46 GIT binary patch literal 222 zcmeAS@N?(olHy`uVBq!ia0vp^oFFy_Gm!MTx5WfVF%}28J29*~C-V}>VM%xNb!1@J z*w6hZkrl`n4e$wZ)d`3b)ihvu`@XWWvg^;^<;#}?Wv03PVFXg_B|(0{|G|Jk%A45@ zD8yOd5n0T@z;_sg8IR|$NC67kd%8G=NQ9SmJMu9&avYMm`0xKo?t9_MmmG98<}Y7S z{@}sI-YKinZ%myl*P?dfdadG?!hJNaAcm_(XpJroBT#o+1c=d#Wz Gp$P!5SxG7Y literal 0 HcmV?d00001 diff --git a/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/gui/sprites/right_mouse_button.png b/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/gui/sprites/right_mouse_button.png new file mode 100644 index 0000000000000000000000000000000000000000..a3a0645704297bb40f6ff3e74010d31078f0268c GIT binary patch literal 222 zcmeAS@N?(olHy`uVBq!ia0vp^oFFy_Gm!MTx5WfVF%}28J29*~C-V}>VM%xNb!1@J z*w6hZkrl`n4e$wZ)d`3b)ikKAtYmome);m{U4Q-pW#pJo8v`l!k|4j}|6sr%<<0B{ z6yhxKh%9Dc;5!V$jK}j=qyPo&JzX3_B*II(J%tz)d6*`;{QI9`ZFOC-y=0??@<+K; z&P~Crr|#a|t+C^=gXAHZ{;K;EB?|Uw7S^}?>oD^wVyL%ceAC|^qYgBR!PC{xWt~$( F69B!8MtJ}L literal 0 HcmV?d00001 diff --git a/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/icons.png b/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/icons.png index 4a4d8ed3311b7ef5bf11802fca48e1d878ef10b2..505efb56a3e5696ba99ba4c19bf4d96382f50db7 100644 GIT binary patch literal 3561 zcmbVP2~ZPRx9+A%3`L`@utD1r$JioXhqIK%-$zy;ZaLD?ZRj06xzaBu)o zmQh9=H=^SVsAPeNf;j95C}dHTB}gDF0RrTO#8+=#)vJ1c{aw|4?>YA@-}&yjx2m%b zd+bB28mj^TfZp%!>IDFxYzhJ>NH&DsCwi|)=e+jq1|GJo9+3&k!7hhf0N_!s+F~F= zCQ}X{^mda1{nFGgadB}=0O088Xm4X9?FFQ{01*Ty0l?PEN-8asN~P-ofC~UFJM1xb z8>#>R_Sn3`N}mq^9RPscY?pt|)d{n@69C-zIQa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(iqJnF%V&_2(M&g@=bvSKcldRs!YuwX7a@BmXb;} zM?#7mj4B%c#q$)IMAA^E;rUsS_O;w9jyb})ubTB<%i667+17*&pOiuNllTBUv7XpL z;HkVvLkj}V(OCt+n^03$<4tc2sAyc95@W*(OAYGRT3&skbH@kpXzcs@F z%`)xJB%`G$e;}$)-tYmgeK7OT6Z+8S9;AuTIJ|@86!p+?Eumy-;V@b%ARoKsW_vYR_=7=i?LYjcf zsHZ!T?nbiR;l81sG2Bx#o-`1oz;YH|p7^#C`WME6vaQc=g@4(3BRyQw2pUk-R6&`gQ_4szk2sn?8Hy~ z1hi`297rdFUpDl4HOd{RGhCBz0-t__tRFcLp^vhEBF%yqxi>|QClSeGrW4LHxB-d4 z+Jq?rG?WGmNYm1;cb5qa*290FO_t?O>!FKo+6qF3?4j5vKdH5y?-`cD*jqx267NF` z>>bt};RKO3y#`}|!#({Tz6j8G*Q`iG9F+wmUn6PYhz|cU%WgNkTIn%k?WPCPWp|lK z#n2p|vpgs|8LV)-kL2}%Q?3sylgP3jNcM;vxYSV%doxaN2hXnUUpI|7$v)b8QKF3B zjd+iK>(!X$5{;Qr%E!D_{J`!NshGoXBv>in1kNhJb&VTX)G$(*nY1(y5_TR2;_MJi zSDI)$(qv|fP@q*IQ=r{Y-O>nnljb1Zb4t&B+GByATzPSqPIj4`u}THTw4oo8_;Kj> zXz9)2v6dDbH^ip90l70`7-9E$sdb`P$@?FBZB8Js-uXaP=UCS?a#x>eXPLn6-WqW=u zdkOZu4*&+X53s=Bt4o0%yU(%~aHj+}1B9G30RHp{d-H~On2bINAj5#LmNhhs1K)at zAmlRex4VznE@Cgxr_uv`T5qmL6)?rCr*C%~DiTNh! Q{~zG8d%x3t2YSMP0BU}$tN;K2 From 55f3d39bfc6e8a5b835203b656b1fccff1794ae0 Mon Sep 17 00:00:00 2001 From: raoulvdberge Date: Mon, 29 Jul 2024 21:29:57 +0200 Subject: [PATCH 09/12] chore: remove guide book texture It was used for Patchouli guide initially. However, Patchouli was too difficult to maintain. Book is no longer needed for now. --- .../common/autocrafting/PatternType.java | 1 - .../assets/refinedstorage/textures/gui/book.png | Bin 19343 -> 0 bytes 2 files changed, 1 deletion(-) delete mode 100644 refinedstorage-common/src/main/resources/assets/refinedstorage/textures/gui/book.png diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/PatternType.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/PatternType.java index 6514821b2..b622a935a 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/PatternType.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/PatternType.java @@ -8,7 +8,6 @@ import static com.refinedmods.refinedstorage.common.util.IdentifierUtil.createTranslation; -// TODO: remove widgets.png // TODO: remove other unused textures, and rename icons.png to side_buttons.png public enum PatternType implements StringRepresentable { CRAFTING(Items.CRAFTING_TABLE.getDefaultInstance(), "crafting"), diff --git a/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/gui/book.png b/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/gui/book.png deleted file mode 100644 index 0177cc462c3f69f085e3bbbad616bafa8bc3e76a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 19343 zcmbTd1zeO}w%z}Sh{$5%CKN5{d);cuKz~s?C~!)VHw8fYvIZ#z{`KVq`v^It^N(?>gDeE z*W}h#d`L&66Vln!0}CtgZ&+757f%-tJD2|k^}oCS%LG`~YHI#_j{hw!PEP-x!oyS9 z8@r5uG30*>?Vr(oBv?ve;Iw<^Izyf`r7|Dpw~VB z26dHGbVpivy147QxH$eJe(ir40aH}Oid#Sg#%^HmZ0+LX!EsH=zs4YyEIg4iEZBZ= z9szzHK~Y@+2}wbINf8k)egR2-{=Y#rU99bGp8W$VD8R!njQ!OW5Rw$)m%RQe_8*{F zU9`6FwD`XQTU$xmxVSr6U^!{;WMPZsb9J_5f&E)Pl8P>lF7DWgvD69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X2eyQ-lY6-J{65{g*YkuWvmN&oGw1LBC(xwe zaD9g$haxv?`v1D1`P>KQ{tVy5pkn>?&AIeBT03nY+WT~6{;@ajy#F`y`TP6q9~L|O z`oH0C{r~Tc^162nZhuo}`OvxWc(jyW+#Zd0`~TO;x(XgL@Jau6zUDV@Fz)B)8@Fx= zJwHGHy3?BFVT?;fwr!iYk-u#RFsptwRQF!6)O23mvzb3HY~WA~O$1JJ0Xsz-fonN{ zp;9@=$pJW%H5s^6`|Y|G;Odxz%V)o1kmM0%07|A*daN}HVc<|~nebGx_v`{D;OPM= zQWyTeSMR?WFTn!bpuWTm*vI+~obMNKIuTNt^FwWk=L!Y^CytqHpm~{~>pZ~uc>$-a zW<7@gz^UZOj4K)Eu|p4 zukbfB>}>}#eMEutXMA9Vmm7d>7GMaGh+6z@`=hZXo|eNTOK7d@$4FuL1Xg z>KVXg0E#KAfXref$AR@s__dJxKs|(+=>+U}7XX)pfoyMW_|pQM5(TooIbMT(q_u|m zf%+O|pixWeBv@Y9f|)>5IWE9V1%{)H7RbLRJ{`CUTpHCfK^53i00k=7W}s)l%vbG^ z4EGKL7jJ+piDZEI;DpJ8tcJQnU_Dp(V;TM(1~YwxffG~^SIpD`l@Y*oY#{GCMX*D> zDa&A=2o9~UhZP*&Lzuy>uy8qH0-Vu&4i00dY3%FRfYH^Wqj(0mxKF?+bO!4Kbucr? z{tVLxxisK{GLD&A_UsRy&%M9(r{*u6|CZlp->U;IVgpJ5!$248FQHHO8J!XvE51Kp R^qv6-JYD@<);T3K0RZ57`)U9H From 770afb2065cbb1e5468312bb49a4fcc207712c27 Mon Sep 17 00:00:00 2001 From: raoulvdberge Date: Mon, 29 Jul 2024 21:32:13 +0200 Subject: [PATCH 10/12] chore: rename icons.png to side_button_icons.png --- .../common/autocrafting/PatternType.java | 1 - .../common/grid/AbstractGridSynchronizer.java | 2 +- .../grid/screen/ResourceTypeSideButtonWidget.java | 2 +- .../refinedstorage/common/support/TextureIds.java | 2 +- .../common/support/resource/FluidResourceType.java | 2 +- .../common/support/resource/ItemResourceType.java | 2 +- .../support/widget/AbstractSideButtonWidget.java | 2 +- .../textures/{icons.png => side_button_icons.png} | Bin 8 files changed, 6 insertions(+), 7 deletions(-) rename refinedstorage-common/src/main/resources/assets/refinedstorage/textures/{icons.png => side_button_icons.png} (100%) diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/PatternType.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/PatternType.java index b622a935a..da21cffd7 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/PatternType.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/PatternType.java @@ -8,7 +8,6 @@ import static com.refinedmods.refinedstorage.common.util.IdentifierUtil.createTranslation; -// TODO: remove other unused textures, and rename icons.png to side_buttons.png public enum PatternType implements StringRepresentable { CRAFTING(Items.CRAFTING_TABLE.getDefaultInstance(), "crafting"), PROCESSING(Items.FURNACE.getDefaultInstance(), "processing"), diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/AbstractGridSynchronizer.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/AbstractGridSynchronizer.java index 21490821d..92cfb70f8 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/AbstractGridSynchronizer.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/AbstractGridSynchronizer.java @@ -8,7 +8,7 @@ public abstract class AbstractGridSynchronizer implements GridSynchronizer { @Override public ResourceLocation getTextureIdentifier() { - return TextureIds.ICONS; + return TextureIds.SIDE_BUTTON_ICONS; } @Override diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/screen/ResourceTypeSideButtonWidget.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/screen/ResourceTypeSideButtonWidget.java index bb6295282..66740f31d 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/screen/ResourceTypeSideButtonWidget.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/screen/ResourceTypeSideButtonWidget.java @@ -31,7 +31,7 @@ private static OnPress createPressAction(final AbstractGridContainerMenu menu) { protected ResourceLocation getTextureIdentifier() { final ResourceType resourceType = menu.getResourceType(); if (resourceType == null) { - return TextureIds.ICONS; + return TextureIds.SIDE_BUTTON_ICONS; } return resourceType.getTextureIdentifier(); } diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/TextureIds.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/TextureIds.java index ebe724259..7604a0fb7 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/TextureIds.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/TextureIds.java @@ -5,7 +5,7 @@ import static com.refinedmods.refinedstorage.common.util.IdentifierUtil.createIdentifier; public final class TextureIds { - public static final ResourceLocation ICONS = createIdentifier("textures/icons.png"); + public static final ResourceLocation SIDE_BUTTON_ICONS = createIdentifier("textures/side_button_icons.png"); public static final ResourceLocation LIGHT_ARROW = createIdentifier("light_arrow"); public static final int LIGHT_ARROW_WIDTH = 22; public static final int LIGHT_ARROW_HEIGHT = 15; diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/resource/FluidResourceType.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/resource/FluidResourceType.java index 98cddc50f..30e19026d 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/resource/FluidResourceType.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/resource/FluidResourceType.java @@ -25,7 +25,7 @@ class FluidResourceType extends AbstractResourceType { super( "FLUID", createTranslation("misc", "resource_type.fluid"), - TextureIds.ICONS, + TextureIds.SIDE_BUTTON_ICONS, 16, 128 ); diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/resource/ItemResourceType.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/resource/ItemResourceType.java index 0588b9a0b..db994cb0b 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/resource/ItemResourceType.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/resource/ItemResourceType.java @@ -25,7 +25,7 @@ class ItemResourceType extends AbstractResourceType { super( "ITEM", createTranslation("misc", "resource_type.item"), - TextureIds.ICONS, + TextureIds.SIDE_BUTTON_ICONS, 0, 128 ); diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/widget/AbstractSideButtonWidget.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/widget/AbstractSideButtonWidget.java index c34f122a3..4eae21cc4 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/widget/AbstractSideButtonWidget.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/widget/AbstractSideButtonWidget.java @@ -45,7 +45,7 @@ protected AbstractSideButtonWidget(final OnPress pressAction) { protected abstract int getYTexture(); protected ResourceLocation getTextureIdentifier() { - return TextureIds.ICONS; + return TextureIds.SIDE_BUTTON_ICONS; } public void setWarning(@Nullable final Component text) { diff --git a/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/icons.png b/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/side_button_icons.png similarity index 100% rename from refinedstorage-common/src/main/resources/assets/refinedstorage/textures/icons.png rename to refinedstorage-common/src/main/resources/assets/refinedstorage/textures/side_button_icons.png From d4dfcb2441206abcc3cf68cfeae03fca21fa408a Mon Sep 17 00:00:00 2001 From: raoulvdberge Date: Mon, 29 Jul 2024 21:46:08 +0200 Subject: [PATCH 11/12] fix: incorrect and outdated explanations for fuzzy mode Mentioning NBT made it outdated. Incorrect because it was inverted. --- CHANGELOG.md | 11 +++++++++++ .../autocrafting/PatternGridBlockEntity.java | 3 --- .../autocrafting/PatternGridContainerMenu.java | 1 - .../common/autocrafting/PatternItem.java | 4 +++- .../common/autocrafting/PatternRendering.java | 4 ++-- .../common/util/PlatformUtil.java | 16 ++++++++++++++++ .../assets/refinedstorage/lang/en_us.json | 18 +++++++++--------- .../AbstractDiskContainerBakedModel.java | 4 ++-- .../portablegrid/PortableGridBakedModel.java | 6 +++--- 9 files changed, 46 insertions(+), 21 deletions(-) create mode 100644 refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/util/PlatformUtil.java diff --git a/CHANGELOG.md b/CHANGELOG.md index 82bfadeec..01f7e9fa4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,17 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - Pattern Grid - Pattern +### Changed + +- The Pattern now shows the crafting recipe in the tooltip. +- When a Pattern is created for a crafting recipe, the Pattern will have a different texture and name to differentiate between empty patterns. +- The Pattern Grid now has support for more pattern types. + +### Fixed + +- Clicking on a scrollbar no longer makes a clicking sound. +- Incorrect and outdated (mentioning NBT tags) help explanations for fuzzy mode. + ## [2.0.0-milestone.4.5] - 2024-07-26 ### Added diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/PatternGridBlockEntity.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/PatternGridBlockEntity.java index ccbe0ad0d..a9b26747a 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/PatternGridBlockEntity.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/PatternGridBlockEntity.java @@ -33,9 +33,6 @@ import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; -// TODO: servertest -// TODO: update changelog -// TODO: change "nbt" tooltips (en_us.json) public class PatternGridBlockEntity extends AbstractGridBlockEntity implements BlockEntityWithDrops, NetworkNodeExtendedMenuProvider { private static final String TAG_PATTERN_INPUT = "pattern_input"; diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/PatternGridContainerMenu.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/PatternGridContainerMenu.java index 11b4193e5..bbde55ebc 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/PatternGridContainerMenu.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/PatternGridContainerMenu.java @@ -179,7 +179,6 @@ public boolean isActive() { }); } } - // TODO: other fuzzy mode tooltips are wrong? addSlot(new DisabledSlot( craftingResult, 0, diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/PatternItem.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/PatternItem.java index 4fbe8fc75..3542c55b2 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/PatternItem.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/PatternItem.java @@ -1,6 +1,7 @@ package com.refinedmods.refinedstorage.common.autocrafting; import com.refinedmods.refinedstorage.api.resource.ResourceAmount; +import com.refinedmods.refinedstorage.common.PlatformProxy; import com.refinedmods.refinedstorage.common.api.RefinedStorageApi; import com.refinedmods.refinedstorage.common.api.autocrafting.CraftingPattern; import com.refinedmods.refinedstorage.common.api.autocrafting.Pattern; @@ -11,6 +12,7 @@ import com.refinedmods.refinedstorage.common.content.Items; import com.refinedmods.refinedstorage.common.support.CraftingMatrix; import com.refinedmods.refinedstorage.common.support.resource.ItemResource; +import com.refinedmods.refinedstorage.common.util.PlatformUtil; import java.util.ArrayList; import java.util.Arrays; @@ -88,7 +90,7 @@ public Optional getTooltipImage(final ItemStack stack) { return switch (state.type()) { case CRAFTING -> { final CraftingPatternState craftingState = stack.get(DataComponents.INSTANCE.getCraftingPatternState()); - final Level level = Minecraft.getInstance().level; + final Level level = PlatformUtil.getClientLevel(); if (craftingState == null || level == null) { yield Optional.empty(); } diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/PatternRendering.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/PatternRendering.java index 15f287ab8..16db1edf6 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/PatternRendering.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/PatternRendering.java @@ -5,10 +5,10 @@ import com.refinedmods.refinedstorage.common.api.autocrafting.CraftingPattern; import com.refinedmods.refinedstorage.common.api.autocrafting.PatternProviderItem; import com.refinedmods.refinedstorage.common.support.resource.ItemResource; +import com.refinedmods.refinedstorage.common.util.PlatformUtil; import java.util.Optional; -import net.minecraft.client.Minecraft; import net.minecraft.client.gui.screens.Screen; import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.Level; @@ -22,7 +22,7 @@ public static boolean canDisplayOutput(final ItemStack stack) { } public static Optional getOutput(final ItemStack stack) { - final Level level = Minecraft.getInstance().level; + final Level level = PlatformUtil.getClientLevel(); if (level == null) { return Optional.empty(); } diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/util/PlatformUtil.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/util/PlatformUtil.java new file mode 100644 index 000000000..24072c78e --- /dev/null +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/util/PlatformUtil.java @@ -0,0 +1,16 @@ +package com.refinedmods.refinedstorage.common.util; + +import javax.annotation.Nullable; + +import net.minecraft.client.Minecraft; +import net.minecraft.world.level.Level; + +public final class PlatformUtil { + private PlatformUtil() { + } + + @Nullable + public static Level getClientLevel() { // avoids classloading issues + return Minecraft.getInstance().level; + } +} diff --git a/refinedstorage-common/src/main/resources/assets/refinedstorage/lang/en_us.json b/refinedstorage-common/src/main/resources/assets/refinedstorage/lang/en_us.json index 9ed2a7d7e..e4522ab58 100644 --- a/refinedstorage-common/src/main/resources/assets/refinedstorage/lang/en_us.json +++ b/refinedstorage-common/src/main/resources/assets/refinedstorage/lang/en_us.json @@ -65,7 +65,7 @@ "gui.refinedstorage.pattern_grid.create_pattern": "Create pattern", "gui.refinedstorage.pattern_grid.clear": "Clear", "gui.refinedstorage.pattern_grid.fuzzy_mode": "Fuzzy mode", - "gui.refinedstorage.pattern_grid.fuzzy_mode.on.help": "Match the pattern inputs without comparing NBT tags.", + "gui.refinedstorage.pattern_grid.fuzzy_mode.on.help": "Match the pattern inputs, ignoring components.", "gui.refinedstorage.pattern_grid.fuzzy_mode.off.help": "Match the pattern inputs exactly.", "gui.refinedstorage.screen_size": "Screen size", "gui.refinedstorage.screen_size.stretch": "Stretch", @@ -115,15 +115,15 @@ "gui.refinedstorage.filter_mode.block": "Blocklist", "gui.refinedstorage.fuzzy_mode": "Fuzzy mode", "gui.refinedstorage.fuzzy_mode.on": "On", - "gui.refinedstorage.fuzzy_mode.on.storage_help": "Match the filters for the allowlist or blocklist exactly.", - "gui.refinedstorage.fuzzy_mode.on.generic_help": "Match the filter exactly.", - "gui.refinedstorage.fuzzy_mode.on.extracting_storage_network_help": "Match the filters when extracting from the storage network exactly.", - "gui.refinedstorage.fuzzy_mode.on.extracting_source_help": "Match the filters when extracting from the source exactly.", + "gui.refinedstorage.fuzzy_mode.on.storage_help": "Match the filters for the allowlist or blocklist, ignoring components.", + "gui.refinedstorage.fuzzy_mode.on.generic_help": "Match the filter, ignoring components.", + "gui.refinedstorage.fuzzy_mode.on.extracting_storage_network_help": "Match the filters when extracting from the storage network, ignoring components.", + "gui.refinedstorage.fuzzy_mode.on.extracting_source_help": "Match the filters when extracting from the source, ignoring components.", "gui.refinedstorage.fuzzy_mode.off": "Off", - "gui.refinedstorage.fuzzy_mode.off.storage_help": "Match the filters for the allowlist or blocklist without comparing NBT tags.", - "gui.refinedstorage.fuzzy_mode.off.generic_help": "Match the filter without comparing NBT tags.", - "gui.refinedstorage.fuzzy_mode.off.extracting_storage_network_help": "Match the filters when extracting from the storage network without comparing NBT tags.", - "gui.refinedstorage.fuzzy_mode.off.extracting_source_help": "Match the filters when extracting from the source without comparing NBT tags.", + "gui.refinedstorage.fuzzy_mode.off.storage_help": "Match the filters for the allowlist or blocklist exactly.", + "gui.refinedstorage.fuzzy_mode.off.generic_help": "Match the filter exactly.", + "gui.refinedstorage.fuzzy_mode.off.extracting_storage_network_help": "Match the filters when extracting from the storage network exactly.", + "gui.refinedstorage.fuzzy_mode.off.extracting_source_help": "Match the filters when extracting from the source exactly.", "gui.refinedstorage.access_mode": "Access mode", "gui.refinedstorage.access_mode.insert_extract": "Insert and extract", "gui.refinedstorage.access_mode.insert_extract.help": "The storage network will be able to insert or extract from this storage.", diff --git a/refinedstorage-fabric/src/main/java/com/refinedmods/refinedstorage/fabric/storage/AbstractDiskContainerBakedModel.java b/refinedstorage-fabric/src/main/java/com/refinedmods/refinedstorage/fabric/storage/AbstractDiskContainerBakedModel.java index eab952169..03d3c9728 100644 --- a/refinedstorage-fabric/src/main/java/com/refinedmods/refinedstorage/fabric/storage/AbstractDiskContainerBakedModel.java +++ b/refinedstorage-fabric/src/main/java/com/refinedmods/refinedstorage/fabric/storage/AbstractDiskContainerBakedModel.java @@ -3,6 +3,7 @@ import com.refinedmods.refinedstorage.api.storage.StorageState; import com.refinedmods.refinedstorage.common.storage.AbstractDiskContainerBlockEntity; import com.refinedmods.refinedstorage.common.storage.Disk; +import com.refinedmods.refinedstorage.common.util.PlatformUtil; import com.refinedmods.refinedstorage.fabric.support.render.QuadTranslator; import java.util.Map; @@ -11,7 +12,6 @@ import net.fabricmc.fabric.api.renderer.v1.model.ForwardingBakedModel; import net.fabricmc.fabric.api.renderer.v1.render.RenderContext; -import net.minecraft.client.Minecraft; import net.minecraft.client.resources.model.BakedModel; import net.minecraft.core.BlockPos; import net.minecraft.core.component.DataComponents; @@ -58,7 +58,7 @@ public void emitBlockQuads(final BlockAndTintGetter blockView, public void emitItemQuads(final ItemStack stack, final Supplier randomSupplier, final RenderContext context) { - final Level level = Minecraft.getInstance().level; + final Level level = PlatformUtil.getClientLevel(); final CustomData customData = stack.get(DataComponents.BLOCK_ENTITY_DATA); if (customData == null || level == null) { return; diff --git a/refinedstorage-fabric/src/main/java/com/refinedmods/refinedstorage/fabric/storage/portablegrid/PortableGridBakedModel.java b/refinedstorage-fabric/src/main/java/com/refinedmods/refinedstorage/fabric/storage/portablegrid/PortableGridBakedModel.java index 12f8a67a7..2c490a217 100644 --- a/refinedstorage-fabric/src/main/java/com/refinedmods/refinedstorage/fabric/storage/portablegrid/PortableGridBakedModel.java +++ b/refinedstorage-fabric/src/main/java/com/refinedmods/refinedstorage/fabric/storage/portablegrid/PortableGridBakedModel.java @@ -6,6 +6,7 @@ import com.refinedmods.refinedstorage.common.storage.portablegrid.PortableGridBlockItem; import com.refinedmods.refinedstorage.common.storage.portablegrid.PortableGridBlockItemRenderInfo; import com.refinedmods.refinedstorage.common.support.direction.BiDirection; +import com.refinedmods.refinedstorage.common.util.PlatformUtil; import com.refinedmods.refinedstorage.fabric.support.render.QuadRotators; import com.refinedmods.refinedstorage.fabric.support.render.QuadTranslator; @@ -14,14 +15,13 @@ import net.fabricmc.fabric.api.renderer.v1.model.ForwardingBakedModel; import net.fabricmc.fabric.api.renderer.v1.render.RenderContext; -import net.minecraft.client.Minecraft; -import net.minecraft.client.multiplayer.ClientLevel; import net.minecraft.client.resources.model.BakedModel; import net.minecraft.core.BlockPos; import net.minecraft.util.RandomSource; import net.minecraft.world.item.Item; import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.BlockAndTintGetter; +import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; public class PortableGridBakedModel extends ForwardingBakedModel { @@ -56,7 +56,7 @@ public boolean isVanillaAdapter() { public void emitItemQuads(final ItemStack stack, final Supplier randomSupplier, final RenderContext context) { - final ClientLevel level = Minecraft.getInstance().level; + final Level level = PlatformUtil.getClientLevel(); if (level == null) { return; } From 81e91ac0af76f00e8384049bf362d97293abf5c7 Mon Sep 17 00:00:00 2001 From: raoulvdberge Date: Mon, 29 Jul 2024 21:58:45 +0200 Subject: [PATCH 12/12] chore: fix sonar issues --- .../common/autocrafting/PatternGridScreen.java | 4 ++-- .../common/autocrafting/PatternItem.java | 2 -- .../support/containermenu/TransferManager.java | 8 +------- .../support/widget/CustomCheckboxWidget.java | 14 +++++++------- 4 files changed, 10 insertions(+), 18 deletions(-) diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/PatternGridScreen.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/PatternGridScreen.java index 522c1b84c..e3ee37662 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/PatternGridScreen.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/PatternGridScreen.java @@ -4,7 +4,7 @@ import com.refinedmods.refinedstorage.common.support.widget.CustomCheckboxWidget; import com.refinedmods.refinedstorage.common.support.widget.HoveredImageButton; -import java.util.HashMap; +import java.util.EnumMap; import java.util.Map; import javax.annotation.Nullable; @@ -49,7 +49,7 @@ public class PatternGridScreen extends AbstractGridScreen patternTypeButtons = new HashMap<>(); + private final Map patternTypeButtons = new EnumMap<>(PatternType.class); public PatternGridScreen(final PatternGridContainerMenu menu, final Inventory inventory, final Component title) { super(menu, inventory, title, 177); diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/PatternItem.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/PatternItem.java index 3542c55b2..1f5faab19 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/PatternItem.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/PatternItem.java @@ -1,7 +1,6 @@ package com.refinedmods.refinedstorage.common.autocrafting; import com.refinedmods.refinedstorage.api.resource.ResourceAmount; -import com.refinedmods.refinedstorage.common.PlatformProxy; import com.refinedmods.refinedstorage.common.api.RefinedStorageApi; import com.refinedmods.refinedstorage.common.api.autocrafting.CraftingPattern; import com.refinedmods.refinedstorage.common.api.autocrafting.Pattern; @@ -23,7 +22,6 @@ import javax.annotation.Nullable; import net.minecraft.ChatFormatting; -import net.minecraft.client.Minecraft; import net.minecraft.network.chat.Component; import net.minecraft.network.chat.MutableComponent; import net.minecraft.world.InteractionHand; diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/containermenu/TransferManager.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/containermenu/TransferManager.java index 098001eab..28705c39d 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/containermenu/TransferManager.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/containermenu/TransferManager.java @@ -53,13 +53,7 @@ public boolean transfer(final int index) { } final TransferDestination key = destinationFactory.apply(slot.container); final List destinations = destinationMap.get(key); - boolean success = false; - if (destinations != null) { - if (transfer(slot, destinations)) { - success = true; - } - } - return success; + return destinations != null && transfer(slot, destinations); } private boolean transfer(final Slot slot, final List destinations) { diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/widget/CustomCheckboxWidget.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/widget/CustomCheckboxWidget.java index af5a8f6c5..d7666c620 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/widget/CustomCheckboxWidget.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/widget/CustomCheckboxWidget.java @@ -12,7 +12,7 @@ import net.minecraft.network.chat.Component; import net.minecraft.resources.ResourceLocation; -// A custom checkbox so that we can change the font color. +// A custom checkbox so that we can change the font color and size. public class CustomCheckboxWidget extends AbstractButton { private static final ResourceLocation CHECKBOX_SELECTED_HIGHLIGHTED_SPRITE = ResourceLocation.withDefaultNamespace( "widget/checkbox_selected_highlighted" @@ -36,7 +36,7 @@ public CustomCheckboxWidget(final int x, final Font font, final boolean selected, final Size size) { - super(x, y, size.size + 4 + font.width(text), size.size, text); + super(x, y, size.widthHeight + 4 + font.width(text), size.widthHeight, text); this.selected = selected; this.size = size; } @@ -80,9 +80,9 @@ public void renderWidget(final GuiGraphics graphics, final int mouseX, final int } else { sprite = isFocused() ? CHECKBOX_HIGHLIGHTED_SPRITE : CHECKBOX_SPRITE; } - graphics.blitSprite(sprite, getX(), getY(), size.size, size.size); + graphics.blitSprite(sprite, getX(), getY(), size.widthHeight, size.widthHeight); graphics.setColor(1.0F, 1.0F, 1.0F, 1.0F); - final int textX = getX() + size.size + 4; + final int textX = getX() + size.widthHeight + 4; final int textY = (getY() + (height >> 1)) - (9 >> 1); graphics.drawString(font, getMessage(), textX, textY, 4210752, false); } @@ -96,10 +96,10 @@ public enum Size { REGULAR(9 + 8), SMALL(9); - private final int size; + private final int widthHeight; - Size(final int size) { - this.size = size; + Size(final int widthHeight) { + this.widthHeight = widthHeight; } } }