mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39:43 +00:00
Merge branch 'master' into master
This commit is contained in:
commit
fee80da366
8 changed files with 78 additions and 9 deletions
|
|
@ -1523,6 +1523,7 @@ class Player{
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
public function sendPing() {
|
||||
$pk = new PingPacket;
|
||||
$pk->time = intdiv(hrtime(true), 1_000_000);
|
||||
|
|
@ -3236,6 +3237,7 @@ class Player{
|
|||
}
|
||||
|
||||
|
||||
|
||||
if ($this->blocked === true or ($this->entity->position instanceof Vector3 and $blockVector->distance($this->entity->position) > 10)) {
|
||||
|
||||
} elseif ($this->getSlot($this->slot)->getID() !== $packet->item or ($this->getSlot($this->slot)->isTool() === false and $this->getSlot($this->slot)->getMetadata() !== $packet->meta)) {
|
||||
|
|
@ -6089,7 +6091,7 @@ class Player{
|
|||
$s = $this->getSlot($slot);
|
||||
if($s->count <= 0 or $s->getID() === AIR){
|
||||
$this->setSlot($slot, BlockAPI::getItem($item->getID(), $item->getMetadata(), $item->count), false);
|
||||
}else if($s->getID() == $item->getID() && $s->getMetadata() == $item->getMetadata() && ($s->count + $item->count) <= $s->maxStackSize){
|
||||
}else if($s->getID() == $item->getID() && $s->getMetadata() == $item->getMetadata() && ($s->count + $item->count) <= $s->getMaxStackSize()){
|
||||
$this->setSlot($slot, BlockAPI::getItem($item->getID(), $item->getMetadata(), $s->count + $item->count), false);
|
||||
}else{
|
||||
$f1 = 0.3;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue