From 31d6c0f810267981b2718be6a17568e349c8b1a5 Mon Sep 17 00:00:00 2001 From: P3pp3rF1y Date: Mon, 30 Sep 2024 09:45:17 +0200 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20=F0=9F=90=9B=20Fixed=20match=20stora?= =?UTF-8?q?ge=20contents=20icon=20in=20Hopper=20Upgrade=20tab=20(was=20bac?= =?UTF-8?q?kpack=20before)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gradle.properties | 2 +- .../client/gui/StorageButtonDefinitions.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gradle.properties b/gradle.properties index 6e9071c30..ed372d35f 100644 --- a/gradle.properties +++ b/gradle.properties @@ -13,7 +13,7 @@ loader_version_range=[4,) mod_id=sophisticatedstorage mod_name=Sophisticated Storage mod_license=GNU General Public License v3.0 -mod_version=0.10.42 +mod_version=0.10.43 mod_group_id=sophisticatedstorage mod_authors=P3pp3rF1y, Ridanisaurus mod_description=Fancy and functional storage containers. diff --git a/src/main/java/net/p3pp3rf1y/sophisticatedstorage/client/gui/StorageButtonDefinitions.java b/src/main/java/net/p3pp3rf1y/sophisticatedstorage/client/gui/StorageButtonDefinitions.java index 3943c20f4..0352a12fc 100644 --- a/src/main/java/net/p3pp3rf1y/sophisticatedstorage/client/gui/StorageButtonDefinitions.java +++ b/src/main/java/net/p3pp3rf1y/sophisticatedstorage/client/gui/StorageButtonDefinitions.java @@ -17,7 +17,7 @@ public class StorageButtonDefinitions { Map.of( ContentsFilterType.ALLOW, getButtonStateData(new UV(0, 0), StorageTranslationHelper.INSTANCE.translUpgradeButton("allow"), Dimension.SQUARE_16, new Position(1, 1)), ContentsFilterType.BLOCK, getButtonStateData(new UV(16, 0), StorageTranslationHelper.INSTANCE.translUpgradeButton("block"), Dimension.SQUARE_16, new Position(1, 1)), - ContentsFilterType.STORAGE, getButtonStateData(new UV(80, 16), StorageTranslationHelper.INSTANCE.translUpgradeButton("match_storage_contents"), Dimension.SQUARE_16, new Position(1, 1)) + ContentsFilterType.STORAGE, getButtonStateData(new UV(64, 16), StorageTranslationHelper.INSTANCE.translUpgradeButton("match_storage_contents"), Dimension.SQUARE_16, new Position(1, 1)) )); private StorageButtonDefinitions() {} From 1a379f2eabad4a2c50ef23ea03ae8c20144a74e9 Mon Sep 17 00:00:00 2001 From: P3pp3rF1y Date: Tue, 1 Oct 2024 21:06:11 +0200 Subject: [PATCH 2/2] =?UTF-8?q?fix:=20=F0=9F=90=9B=20Fixed=20tinted=20ches?= =?UTF-8?q?ts=20to=20not=20get=20named=20Acacia=20on=20the=20first=20place?= =?UTF-8?q?ment?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gradle.properties | 2 +- .../net/p3pp3rf1y/sophisticatedstorage/block/ChestBlock.java | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/gradle.properties b/gradle.properties index ed372d35f..2bee25111 100644 --- a/gradle.properties +++ b/gradle.properties @@ -13,7 +13,7 @@ loader_version_range=[4,) mod_id=sophisticatedstorage mod_name=Sophisticated Storage mod_license=GNU General Public License v3.0 -mod_version=0.10.43 +mod_version=0.10.44 mod_group_id=sophisticatedstorage mod_authors=P3pp3rF1y, Ridanisaurus mod_description=Fancy and functional storage containers. diff --git a/src/main/java/net/p3pp3rf1y/sophisticatedstorage/block/ChestBlock.java b/src/main/java/net/p3pp3rf1y/sophisticatedstorage/block/ChestBlock.java index 7f9950b24..8f835a223 100644 --- a/src/main/java/net/p3pp3rf1y/sophisticatedstorage/block/ChestBlock.java +++ b/src/main/java/net/p3pp3rf1y/sophisticatedstorage/block/ChestBlock.java @@ -192,11 +192,12 @@ public BlockState getStateForPlacement(BlockPlaceContext context) { } Direction direction = context.getHorizontalDirection().getOpposite(); + StackStorageWrapper wrapper = StackStorageWrapper.fromStack(context.getLevel().registryAccess(), chestBeingPlaced); return getStateForPlacement(context, direction, fluidstate, StorageBlockItem.getMainColorFromStack(chestBeingPlaced).orElse(-1), StorageBlockItem.getAccentColorFromStack(chestBeingPlaced).orElse(-1), WoodStorageBlockItem.getWoodType(chestBeingPlaced).orElse(WoodType.ACACIA), - InventoryHelper.isEmpty(StackStorageWrapper.fromStack(context.getLevel().registryAccess(), chestBeingPlaced).getUpgradeHandler())); + wrapper.getContentsUuid().isPresent() && InventoryHelper.isEmpty(wrapper.getUpgradeHandler())); } private BlockState getStateForPlacement(BlockPlaceContext context, Direction direction, FluidState fluidstate, int mainColor, int accentColor, WoodType woodType, boolean itemHasNoUpgrades) {