mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39:43 +00:00
crafting checking reworked
This commit is contained in:
parent
cba572ece6
commit
8b77b88e84
4 changed files with 129 additions and 202 deletions
|
|
@ -341,6 +341,16 @@ class BlockAPI{
|
|||
return $output;
|
||||
}
|
||||
|
||||
public static function blockIDFromString($str){
|
||||
if(defined(strtoupper($str))){
|
||||
$ida = explode(":", constant(strtoupper($str)));
|
||||
if(count($ida) === 2){}
|
||||
return (int) $ida[0];
|
||||
}else if(is_numeric($str)){
|
||||
return (int) $str;
|
||||
}
|
||||
}
|
||||
|
||||
public static function fromString($str, $multiple = false){
|
||||
if($multiple === true){
|
||||
$blocks = [];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue