mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 19:49:44 +00:00
farm -> dirt on player fall, how works better
This commit is contained in:
parent
1baafb8b26
commit
8e5d2bb1c7
8 changed files with 34 additions and 22 deletions
|
|
@ -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){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue