mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 03:59:43 +00:00
Send inventory on invalid crafting/invalid movement of item
This commit is contained in:
parent
e6a7c8fae9
commit
7e5c66484e
2 changed files with 5 additions and 1 deletions
|
|
@ -2082,6 +2082,7 @@ class Player{
|
|||
if($item->getID() !== AIR and $slot->getID() == $item->getID()){
|
||||
if($slot->count < $item->count){
|
||||
if($this->removeItem($item->getID(), $item->getMetadata(), $item->count - $slot->count, false) === false){
|
||||
$this->sendInventory();
|
||||
break;
|
||||
}
|
||||
}elseif($slot->count > $item->count){
|
||||
|
|
@ -2089,6 +2090,7 @@ class Player{
|
|||
}
|
||||
}else{
|
||||
if($this->removeItem($item->getID(), $item->getMetadata(), $item->count, false) === false){
|
||||
$this->sendInventory();
|
||||
break;
|
||||
}
|
||||
$this->addItem($slot->getID(), $slot->getMetadata(), $slot->count, false);
|
||||
|
|
@ -2130,6 +2132,7 @@ class Player{
|
|||
if($item->getID() !== AIR and $slot->getID() == $item->getID()){
|
||||
if($slot->count < $item->count){
|
||||
if($this->removeItem($item->getID(), $item->getMetadata(), $item->count - $slot->count, false) === false){
|
||||
$this->sendInventory();
|
||||
break;
|
||||
}
|
||||
}elseif($slot->count > $item->count){
|
||||
|
|
@ -2137,6 +2140,7 @@ class Player{
|
|||
}
|
||||
}else{
|
||||
if($this->removeItem($item->getID(), $item->getMetadata(), $item->count, false) === false){
|
||||
$this->sendInventory();
|
||||
break;
|
||||
}
|
||||
$this->addItem($slot->getID(), $slot->getMetadata(), $slot->count, false);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue