farm -> dirt on player fall, how works better

This commit is contained in:
GameHerobrine 2023-07-10 00:41:20 +03:00
parent 1baafb8b26
commit 8e5d2bb1c7
8 changed files with 34 additions and 22 deletions

View file

@ -586,11 +586,14 @@ class Utils{
}
public static function chance($i){//GameHerobrine's code
return self::randomFloat() <= $i / 100;
return lcg_value() <= $i / 100;
}
public static function randomFloat(){//GameHerobrine's code
return rand() / getrandmax();
/**
* @deprecated use lcg_value instead
*/
public static function randomFloat(){
return lcg_value();
}
public static function round($number){