Shulker box stack size is now configurable (#1254)

This commit is contained in:
Thomas Baum authored and GitHub committed 2022-01-12 23:10:14 +01:00
1 parent 3f6ddc43e5
commit 068a42292f
5 files changed
+47 -14

No files matched your search

@@ -23,7 +23,7 @@ public class AbstractCauldronBlock_stackableSBoxesMixin
private ActionResult wrapInteractor(CauldronBehavior cauldronBehavior, BlockState blockState, World world, BlockPos blockPos, PlayerEntity playerEntity, Hand hand, ItemStack itemStack)
{
int count = -1;
if (CarpetSettings.stackableShulkerBoxes && itemStack.getItem() instanceof BlockItem && ((BlockItem)itemStack.getItem()).getBlock() instanceof ShulkerBoxBlock)
if (CarpetSettings.shulkerBoxStackSize > 1 && itemStack.getItem() instanceof BlockItem && ((BlockItem)itemStack.getItem()).getBlock() instanceof ShulkerBoxBlock)
count = itemStack.getCount();
ActionResult result = cauldronBehavior.interact(blockState, world, blockPos, playerEntity, hand, itemStack);
if (count > 0 && result.isAccepted())