mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-23 04:59:46 +00:00
Fixed #361
This commit is contained in:
parent
ee7c767c16
commit
abcb5828ed
1 changed files with 5 additions and 5 deletions
|
|
@ -1628,19 +1628,19 @@ class Player{
|
||||||
}
|
}
|
||||||
if($item->getID() !== AIR and $slot->getID() == $item->getID()){
|
if($item->getID() !== AIR and $slot->getID() == $item->getID()){
|
||||||
if($slot->count < $item->count){
|
if($slot->count < $item->count){
|
||||||
if($this->removeItem($item->getID(), $item->getMetadata(), $item->count - $slot->count) === false){
|
if($this->removeItem($item->getID(), $item->getMetadata(), $item->count - $slot->count, false) === false){
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}elseif($slot->count > $item->count){
|
}elseif($slot->count > $item->count){
|
||||||
$this->addItem($item->getID(), $item->getMetadata(), $slot->count - $item->count);
|
$this->addItem($item->getID(), $item->getMetadata(), $slot->count - $item->count, false);
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
if($this->removeItem($item->getID(), $item->getMetadata(), $item->count) === false){
|
if($this->removeItem($item->getID(), $item->getMetadata(), $item->count, false) === false){
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
$this->addItem($slot->getID(), $slot->getMetadata(), $slot->count);
|
$this->addItem($slot->getID(), $slot->getMetadata(), $slot->count, false);
|
||||||
}
|
}
|
||||||
$tile->setSlot($data["slot"], $item, false);
|
$tile->setSlot($data["slot"], $item);
|
||||||
break;
|
break;
|
||||||
case MC_SEND_INVENTORY: //TODO, Mojang, enable this ´^_^`
|
case MC_SEND_INVENTORY: //TODO, Mojang, enable this ´^_^`
|
||||||
if($this->spawned === false){
|
if($this->spawned === false){
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue