CustomiesDevs/Customies

Items with a predefined stack value can be stacked above the value

ShadowMikado opened this issue · 2 comments

Hello I found a bug, when we create a item and init this item with a max stack size, like this,

//
$this->initComponent("my_item", 1, $creativeInfo);

In the game, when we drop this item with the same item, they stack

An example:
The video

You need to also tell pocketmine about the max stack size using the getMaxStackSize(), the value you provide in the component is just to tell the client what it is.

public function getMaxStackSize() : int{
	return 1;
}

It work thanks TwistedAsylumMC