Jump to content

CanStackItem resulted in a conflict w/ Loottable

Pending 1.10.4

0g.Ghost.7373
0g.Ghost.7373

Posted

 

Any easy fix for this?

 

Calling hook CanStackItem resulted in a conflict between the following plugins: Loottable - True (Boolean), BagOfHolding (False (Boolean))

BlackLightning

Posted

There's probably nothing that can be done in BagOfHolding. When it returns False (to prevent stacking two items), it's for good reason. Either the item being moved has contents, so allowing that item to stack would delete the contents (very bad), or the two item stacks have different bag profiles, meaning one may have a different capacity than the other (despite being the same skin for instance), so allowing them to stack would change the capacity of one stack.

What I would advise to the LootTable maintainer is to enhance the logic in CanStackItem to be more careful. Specifically, if the item being moved has contents, return false (disallow stacking), and if the two items stacks are containers with different capacity, return false (disallow stacking). Theses tips are both called out in the BagOfHolding documentation if you search for "Hook conflict with CanStackItem".

  • Like 1

About Us

Codefling is the largest marketplace for plugins, maps, tools, and more, making it easy for customers to discover new content and for creators to monetize their work.

Downloads
2.7m
Total downloads
Customers
11.5k
Customers served
Files Sold
164.7k
Total sales
Payments
3.6m
Processed total
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.