mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-17 11:18:52 +00:00
Fixed recipe mixture
This commit is contained in:
parent
67b0b97005
commit
0bd8d0b0d0
@ -74,6 +74,7 @@ class Player{
|
|||||||
private $packetStats;
|
private $packetStats;
|
||||||
public $craftingItems = array();
|
public $craftingItems = array();
|
||||||
public $toCraft = array();
|
public $toCraft = array();
|
||||||
|
public $lastCraft = 0;
|
||||||
|
|
||||||
public function __get($name){
|
public function __get($name){
|
||||||
if(isset($this->{$name})){
|
if(isset($this->{$name})){
|
||||||
@ -663,7 +664,7 @@ class Player{
|
|||||||
if($s->count <= 0 or $s->getID() === AIR){
|
if($s->count <= 0 or $s->getID() === AIR){
|
||||||
$this->setSlot($slot, BlockAPI::getItem($item->getID(), $item->getMetadata(), $item->count));
|
$this->setSlot($slot, BlockAPI::getItem($item->getID(), $item->getMetadata(), $item->count));
|
||||||
}else{
|
}else{
|
||||||
$s->count += $item->count;
|
$this->setSlot($slot, BlockAPI::getItem($item->getID(), $item->getMetadata(), $s->count + $item->count));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1462,6 +1463,15 @@ class Player{
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($this->lastCraft <= (microtime(true) - 1)){
|
||||||
|
if(isset($this->toCraft[-1])){
|
||||||
|
$this->toCraft = array(-1 => $this->toCraft[-1]);
|
||||||
|
}else{
|
||||||
|
$this->toCraft = array();
|
||||||
|
}
|
||||||
|
$this->craftingItems = array();
|
||||||
|
}
|
||||||
|
|
||||||
if($data["windowid"] === 0){
|
if($data["windowid"] === 0){
|
||||||
$craft = false;
|
$craft = false;
|
||||||
$slot = $this->getSlot($data["slot"]);
|
$slot = $this->getSlot($data["slot"]);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user