mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 19:49:44 +00:00
Fixed "player.interact" event only being fired with weird conditions
This commit is contained in:
parent
d552042094
commit
34ca8baa29
3 changed files with 15 additions and 13 deletions
|
|
@ -155,11 +155,13 @@ class Utils{
|
|||
return Utils::writeShort($item->getID()).chr($item->count).Utils::writeShort($item->getMetadata());
|
||||
}
|
||||
|
||||
public static function readSlot($str){
|
||||
public static function readSlot($ob){
|
||||
$id = Utils::readShort($ob->get(2));
|
||||
$cnt = ord($ob->get(1));
|
||||
return BlockAPI::getItem(
|
||||
Utils::readShort(substr($str, 0, 2), false),
|
||||
Utils::readShort(substr($str, 3, 2), false),
|
||||
ord($str{2})
|
||||
$id,
|
||||
Utils::readShort($ob->get(2)),
|
||||
$cnt
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue