mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-03 00:25:04 +00:00
Revert "Item: restrict bounds of count to 0-255"
This reverts commit 10317527e4
.
this breaks user code which exceeds stack limits in legitimate
circumstances. For example, it should be OK to add 6000x diamond to a
player's inventory without being forced to manually split the count up
for addItem().
This commit is contained in:
@ -89,18 +89,4 @@ class ItemTest extends TestCase{
|
||||
self::assertEquals($id, $item->getId());
|
||||
self::assertEquals($meta, $item->getDamage());
|
||||
}
|
||||
|
||||
public function testSetCountTooBig() : void{
|
||||
$this->expectException(\InvalidArgumentException::class);
|
||||
|
||||
$item = ItemFactory::get(ItemIds::STONE);
|
||||
$item->setCount(256);
|
||||
}
|
||||
|
||||
public function testSetCountTooSmall() : void{
|
||||
$this->expectException(\InvalidArgumentException::class);
|
||||
|
||||
$item = ItemFactory::get(ItemIds::STONE);
|
||||
$item->setCount(-1);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user