menu
#7863809 mt_rand(): Argument #2 ($max) must be greater than or equal to argument #1 ($min)

Submitted by PocketMine-MP 4.10.0

General information

Version: 4.10.0
Git commit: 0d5287bf
Plugin involvement: Direct
Report date: 2022-11-24 19:35:57 +0000 UTC
Server uptime: 0 days 0 hours 0 minutes 15 seconds

System Information

PHP version: 8.0.24
JIT status: Not available
Operating system: linux
System banner: Linux 856f550b-fc4f-4ab6-a451-92eac6268130 5.10.0-19-amd64 #1 SMP Debian 5.10.149-2 (2022-10-21) x86_64

Error information

Warning: the RoyalCustomSeed plugin was directly involved in this crash. Please contact the plugin author.
Message: mt_rand(): Argument #2 ($max) must be greater than or equal to argument #1 ($min)
File: plugins/Plugin - RoyalCustomSeed.phar/src/royal/customdrop/plants/CustomTallGrass
Line: #13
Error level: ValueError
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
use pocketmine\block\TallGrass;
use pocketmine\item\Item;
use pocketmine\item\ItemFactory;
use royal\customdrop\Main;

class CustomTallGrass extends TallGrass{
public function getDrops(Item $item): array
{
foreach (Main::getInstance()->plantsDropsAll["tallgrass"] as $drops) {
$random = mt_rand($drops["min-luck"], $drops["max-luck"]);
if ($random === 1){
return [
ItemFactory::getInstance()->get($drops["id"], $drops["meta"], $drops['number-drop'])
];
}
}
return [];
}
}
#0 plugins/Plugin - RoyalCustomSeed.phar/src/royal/customdrop/plants/CustomTallGrass(13): mt_rand(string[2] 12, string[2] 10)
#1 pmsrc/src/world/World(1786): royal\customdrop\plants\CustomTallGrass->getDrops(object pocketmine\item\ItemBlock#176971)
#2 (): pocketmine\world\World->pocketmine\world\{closure}(object royal\customdrop\plants\CustomTallGrass#176904)
#3 pmsrc/src/world/World(1786): array_map(object Closure#176999, array[1])
#4 pmsrc/src/player/Player(1681): pocketmine\world\World->useBreakOn(object pocketmine\math\Vector3#176998, object pocketmine\item\ItemBlock#176971, object pocketmine\player\Player#126608, true)
#5 pmsrc/src/network/mcpe/handler/InGamePacketHandler(469): pocketmine\player\Player->breakBlock(object pocketmine\math\Vector3#176882)
#6 pmsrc/src/network/mcpe/handler/InGamePacketHandler(257): pocketmine\network\mcpe\handler\InGamePacketHandler->handleUseItemTransaction(object pocketmine\network\mcpe\protocol\types\inventory\UseItemTransactionData#176949)
#7 pmsrc/vendor/pocketmine/bedrock-protocol/src/PlayerAuthInputPacket(251): pocketmine\network\mcpe\handler\InGamePacketHandler->handlePlayerAuthInput(object pocketmine\network\mcpe\protocol\PlayerAuthInputPacket#176959)
#8 pmsrc/src/network/mcpe/NetworkSession(410): pocketmine\network\mcpe\protocol\PlayerAuthInputPacket->handle(object pocketmine\network\mcpe\handler\InGamePacketHandler#158827)
#9 pmsrc/src/network/mcpe/NetworkSession(373): pocketmine\network\mcpe\NetworkSession->handleDataPacket(object pocketmine\network\mcpe\protocol\PlayerAuthInputPacket#176959, string[100] ..0.QA.U.B.ylCr=.B...A...?.....U.B.........z...=.......=.....B8....NlCr=.Bwn.A..)
#10 pmsrc/src/network/mcpe/raklib/RakLibInterface(182): pocketmine\network\mcpe\NetworkSession->handleEncoded(string[87] K..h.".Q"[email protected]{...f...t......a..D_y.%G.d...r)
#11 pmsrc/vendor/pocketmine/raklib-ipc/src/RakLibToUserThreadMessageReceiver(42): pocketmine\network\mcpe\raklib\RakLibInterface->onPacketReceive(int 0, string[96] .4.. .......[.o................~....2.....&#.......'... ..Ah.D..O*[email protected])
#12 pmsrc/src/network/mcpe/raklib/RakLibInterface(112): raklib\server\ipc\RakLibToUserThreadMessageReceiver->handle(object pocketmine\network\mcpe\raklib\RakLibInterface#114317)
#13 pmsrc/vendor/pocketmine/snooze/src/SleeperHandler(123): pocketmine\network\mcpe\raklib\RakLibInterface->pocketmine\network\mcpe\raklib\{closure}()
#14 pmsrc/vendor/pocketmine/snooze/src/SleeperHandler(82): pocketmine\snooze\SleeperHandler->processNotifications()
#15 pmsrc/src/Server(1707): pocketmine\snooze\SleeperHandler->sleepUntil(float 1669318557.3097)
#16 pmsrc/src/Server(1065): pocketmine\Server->tickProcessor()
#17 pmsrc/src/PocketMine(305): pocketmine\Server->__construct(object BaseClassLoader#2, object pocketmine\utils\MainLogger#3, string[16] /home/container/, string[24] /home/container/plugins/)
#18 pmsrc/src/PocketMine(328): pocketmine\server()
#19 pmsrc(11): require(string[60] phar:///home/container/PocketMine-MP.phar/src/PocketMine.php)

Loaded Plugins

  • Show

Server Settings

  • Show

Installed PHP Extensions

  • Show