mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39:43 +00:00
entity ai classes, pigs should look around
This commit is contained in:
parent
6f603fcbe9
commit
8d454e5ec9
12 changed files with 206 additions and 38 deletions
|
|
@ -48,6 +48,11 @@ class Utils{
|
|||
return sha1(strtolower($variable));
|
||||
}
|
||||
}
|
||||
|
||||
public static function in_range($num, $min, $max){
|
||||
return $num >= $min && $num <= $max;
|
||||
}
|
||||
|
||||
public function xrange($start, $limit, $step = 1) {
|
||||
if ($start <= $limit) {
|
||||
if ($step <= 0) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue