File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed
Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -263,12 +263,20 @@ LL_TYPE_INSTANCE_HOOK(
263263 ItemStack const & newItem
264264) {
265265 IF_LISTENED (EVENT_TYPES::onContainerChange) {
266- Player& player = mUnk84d147 .as <Player&>();
267- if (player.hasOpenContainer ()) {
266+ if (this ->getContainerSize () == 64 ) { // Skipping bundle, bundle's container size is 64
267+ Container* container = this ->_getContainer ();
268+ if (container) {
269+ if (container->getContainerType () == ContainerType::Container) {
270+ return origin (slotNumber, oldItem, newItem);
271+ }
272+ }
273+ }
274+ Player* player = mUnk84d147 .as <Player*>();
275+ if (player && player->hasOpenContainer ()) {
268276 if (!CallEvent (
269277 EVENT_TYPES::onContainerChange,
270- PlayerClass::newPlayer (& player),
271- BlockClass::newBlock (mUnk74419a .as <BlockPos>(), player. getDimensionId ()),
278+ PlayerClass::newPlayer (player),
279+ BlockClass::newBlock (mUnk74419a .as <BlockPos>(), player-> getDimensionId ()),
272280 Number::newNumber (slotNumber + this ->_getContainerOffset ()),
273281 ItemClass::newItem (&const_cast <ItemStack&>(oldItem)),
274282 ItemClass::newItem (&const_cast <ItemStack&>(newItem))
You can’t perform that action at this time.
0 commit comments