From 219c5f37a1d92b6c7b7b1052f4c17c055eb95246 Mon Sep 17 00:00:00 2001 From: P3pp3rF1y Date: Thu, 9 Jan 2025 17:00:07 +0100 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9B=20Fixed=20Shulker=20Boxes?= =?UTF-8?q?=20to=20properly=20show=20no=20tint=20even=20after=20they=20are?= =?UTF-8?q?=20placed=20down=20when=20this=20was=20removed=20using=20cauldr?= =?UTF-8?q?on?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gradle.properties | 2 +- .../p3pp3rf1y/sophisticatedstorage/block/ShulkerBoxBlock.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gradle.properties b/gradle.properties index 785d4a9b..db5169ff 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,7 +3,7 @@ org.gradle.daemon=false mod_id=sophisticatedstorage mod_group_id=sophisticatedstorage -mod_version=1.1.0 +mod_version=1.1.1 sonar_project_key=sophisticatedstorage:SophisticatedStorage github_package_url=https://maven.pkg.github.com/P3pp3rF1y/SophisticatedStorage diff --git a/src/main/java/net/p3pp3rf1y/sophisticatedstorage/block/ShulkerBoxBlock.java b/src/main/java/net/p3pp3rf1y/sophisticatedstorage/block/ShulkerBoxBlock.java index 372e2c16..a8719a6a 100644 --- a/src/main/java/net/p3pp3rf1y/sophisticatedstorage/block/ShulkerBoxBlock.java +++ b/src/main/java/net/p3pp3rf1y/sophisticatedstorage/block/ShulkerBoxBlock.java @@ -137,8 +137,8 @@ public void setPlacedBy(Level level, BlockPos pos, BlockState state, @Nullable L } if (stack.getItem() instanceof ShulkerBoxItem shulkerBoxItem) { StorageWrapper storageWrapper = be.getStorageWrapper(); - shulkerBoxItem.getMainColor(stack).ifPresent(storageWrapper::setMainColor); - shulkerBoxItem.getAccentColor(stack).ifPresent(storageWrapper::setAccentColor); + storageWrapper.setMainColor(shulkerBoxItem.getMainColor(stack).orElse(-1)); + storageWrapper.setAccentColor(shulkerBoxItem.getAccentColor(stack).orElse(-1)); InventoryHandler inventoryHandler = storageWrapper.getInventoryHandler(); UpgradeHandler upgradeHandler = storageWrapper.getUpgradeHandler(); storageWrapper.changeSize(shulkerBoxItem.getNumberOfInventorySlots(stack) - inventoryHandler.getSlots(),