mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 01:46:04 +00:00
Do not cache ItemStacks for every item
this is very memory inefficient, and only provides a performance advantage in cold code anyway.
This commit is contained in:
@ -23,19 +23,14 @@ declare(strict_types=1);
|
||||
|
||||
namespace pocketmine\network\mcpe;
|
||||
|
||||
use pocketmine\network\mcpe\protocol\types\inventory\ItemStack;
|
||||
|
||||
final class ItemStackInfo{
|
||||
|
||||
public function __construct(
|
||||
private ?int $requestId,
|
||||
private int $stackId,
|
||||
private ItemStack $itemStack
|
||||
private int $stackId
|
||||
){}
|
||||
|
||||
public function getRequestId() : ?int{ return $this->requestId; }
|
||||
|
||||
public function getStackId() : int{ return $this->stackId; }
|
||||
|
||||
public function getItemStack() : ItemStack{ return $this->itemStack; }
|
||||
}
|
||||
|
Reference in New Issue
Block a user