Skip to content

Commit

Permalink
Merge pull request #497 from P3pp3rF1y/1.21.x-dev
Browse files Browse the repository at this point in the history
Release merge
  • Loading branch information
P3pp3rF1y authored Oct 1, 2024
2 parents 236a67c + 1a379f2 commit 63d4443
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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.44
mod_group_id=sophisticatedstorage
mod_authors=P3pp3rF1y, Ridanisaurus
mod_description=Fancy and functional storage containers.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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() {}
Expand Down

0 comments on commit 63d4443

Please sign in to comment.