mfnalex / ChestSort

Best sorting plugin for Minecraft / Spigot 1.14+
https://www.chestsort.de
GNU General Public License v3.0
91 stars 34 forks source link

A hook with Simple Stack? #99

Closed Kenaestic closed 3 years ago

Kenaestic commented 3 years ago

Used ChestSort version 8.17.7

Used Spigot version Paper version git-Paper-318 (MC: 1.16.4) (Implementing API version 1.16.4-R0.1-SNAPSHOT)

Describe the bug I use a plugin called Simple Stack to have custom stack values for normal unstackable items. (for example instead of 1 bucket you can stack up to 8). This works only by manually dragging the items onto eachother (not by sorting). Once these items are stacked the plugin treats it as 1 item and sorting works fine. However if I withdraw items from a chest for example, I can hold shift and it will stack the items in my inventory. So my question is if it would be possible for ChestSort to work with custom item stacks somehow? Video for clarity: https://streamable.com/pzdbt6

To Reproduce Have ChestSort and Simple Stack installed with the right configuration. Here is mine for example:

# List Mode: The mode that the item types list will operate in
#   * Blacklist = Items added to the list will not be stackable
#   * Whitelist = Items added to the list will be stackable, but unstackable items will stay unstackable if they're not in the list
List Mode: Blacklist

# Item Types: Item types that will or will not be stacked to 64 based on the list mode above
Item Types: []

# Language: The default language for in game text. If the specified language is not supported English will be used.
# Supported Languages:
#   * en_us - English
#   * zh_cn - 简体中文 (Simplified Chinese)
#   * ko_kr - 한국어 (Korean)
#   * es_ar - Español (Argentinian Spanish)
#   * es_cl - Español (Chilean Spanish)
#   * es_mx - Español (Mexican Spanish)
#   * es_uy - Español (Uruguayan Spanish)
#   * es_ve - Español (Venezuelan Spanish)
# Note: Language is also based off of per-player, the language specified in this config only applies
# to the console or unknown languages.
Language: en_us

# Default Max Amount: Set the default max amount for ALL items in Minecraft
# This setting could be dangerous, do proper testing before changing this value.
Default Max Amount: 64

# Hopper Movement Checks: Hoppers will attempt to stack unstackable items together.
# Setting this to false will stop hopper checks which could increase performance but will
# Stop stacking of unstackables when moving through hoppers.
Hopper Movement Checks: true

# Ground Stacking Checks: Simple Stack will check whether unstackable items on the ground
# will stack together or not.
# Setting this to false will stop unstackables stacking when on the ground and could
# increase performance at the cost of unstackables not stacking when on the ground.
Ground Stacking Checks: true

# Item Amounts: Set the amount of items that an item of that type can hold.
# Note: Items in item amounts must also be in the items list if in whitelist mode
Item Amounts:
  OAK_BOAT: 4
  FURNACE_MINECART: 8
  ACACIA_BOAT: 4
  MUSHROOM_STEW: 64
  HOPPER_MINECART: 8
  GLASS_BOTTLE: 8
  JUNGLE_BOAT: 4
  POTION: 8
  CHEST_MINECART: 8
  ANVIL: 16
  DARK_OAK_SIGN: 64
  SPRUCE_SIGN: 64
  SPRUCE_BOAT: 4
  MUSIC_DISC_MALL: 4
  SHULKER_BOX: 1
  BIRCH_BOAT: 4
  SADDLE: 8
  BUCKET: 8
  ACACIA_SIGN: 64
  MUSIC_DISC_11: 4
  BOWL: 64
  ARROW: 64
  SNOWBALL: 64
  LEAD: 8
  DARK_OAK_BOAT: 4
  HONEY_BOTTLE: 8
  ENDER_PEARL: 16
  MUSIC_DISC_CAT: 4
  NAME_TAG: 16
  MUSIC_DISC_WARD: 4
  FURNACE: 16
  MUSIC_DISC_FAR: 4
  MUSIC_DISC_WAIT: 4
  MUSIC_DISC_13: 4
  OAK_SIGN: 64
  MUSIC_DISC_STAL: 4
  MUSIC_DISC_PIGSTEP: 4
  WATER_BUCKET: 8
  MUSIC_DISC_CHIRP: 4
  MUSIC_DISC_BLOCKS: 4
  JUNGLE_SIGN: 64
  MILK_BUCKET: 8
  MUSIC_DISC_STRAD: 4
  MUSIC_DISC_MELLOHI: 4
  CRAFTING_TABLE: 16
  BIRCH_SIGN: 64
  TNT_MINECART: 8
  DAMAGED_ANVIL: 16
  LAVA_BUCKET: 8
  CHIPPED_ANVIL: 16
  Example Item: 64

Expected behavior When sorting inventories, have items stack until their limit the same way it does when shift clicking items from a chest to your inventory.

Additional context There is also another bug which I think is unrelated to ChestSort but might be worth mentioning. When depositing unstackable items to other inventories (like shulkerboxes or minepacks), dragging the item to the other inventory causes only the first item to deposit while I'm still holding the rest of the stack. To fix this I have to manually open my inventory again, re-stack the items and shift click to deposit them in other inventories. As this first occured in Minepacks I suspected it might be ChestSort's hook, but the problem still persists even with ChestSort disabled. I will also be making a bug report on Simple Stack for this.

Other possible influences are: Minepacks and Shulker Backpacks

Kenaestic commented 3 years ago

Upon a bit of further testing I found that it's most likely Minepacks and Shulker Backpacks that both have the same problem since disabling Shulker Backpacks allowed me to to make manual stacks in Shulkerbox inventories.

I noticed that both Minepacks and Shulker Backpacks have the same GUI when opened from the inventory: https://i.imgur.com/mQVpDVt.png https://i.imgur.com/SL1cZGw.png

While placing the shulkerbox and opening it looks different. This inventory works normally: https://i.imgur.com/GuQUZNy.png

Kenaestic commented 3 years ago

Closing bug report because I found out it's Item Stacks causing the bugs: https://github.com/Mikedeejay2/SimpleStackPlugin/issues/59