mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-23 11:54:04 +00:00
Fixed #348
This commit is contained in:
parent
883b18078f
commit
97dd718e4f
@ -33,7 +33,7 @@ class DirtBlock extends SolidBlock{
|
|||||||
|
|
||||||
public function onActivate(Item $item, Player $player){
|
public function onActivate(Item $item, Player $player){
|
||||||
if($item->isHoe()){
|
if($item->isHoe()){
|
||||||
if(($this->gamemode & 0x01) === 0){
|
if(($player->gamemode & 0x01) === 0){
|
||||||
$item->useOn($this);
|
$item->useOn($this);
|
||||||
}
|
}
|
||||||
$this->level->setBlock($this, BlockAPI::get(FARMLAND, 0));
|
$this->level->setBlock($this, BlockAPI::get(FARMLAND, 0));
|
||||||
|
@ -44,7 +44,7 @@ class GrassBlock extends SolidBlock{
|
|||||||
TallGrassObject::growGrass($this->level, $this, new Random());
|
TallGrassObject::growGrass($this->level, $this, new Random());
|
||||||
return true;
|
return true;
|
||||||
}elseif($item->isHoe()){
|
}elseif($item->isHoe()){
|
||||||
if(($this->gamemode & 0x01) === 0){
|
if(($player->gamemode & 0x01) === 0){
|
||||||
$item->useOn($this);
|
$item->useOn($this);
|
||||||
}
|
}
|
||||||
$this->level->setBlock($this, new FarmlandBlock());
|
$this->level->setBlock($this, new FarmlandBlock());
|
||||||
|
@ -171,6 +171,7 @@ class MinecraftInterface{
|
|||||||
$raw = str_split(gzdeflate($raw, DEFLATEPACKET_LEVEL), $MTU - 9); // - 1 - 2 - 2 - 2 - 2
|
$raw = str_split(gzdeflate($raw, DEFLATEPACKET_LEVEL), $MTU - 9); // - 1 - 2 - 2 - 2 - 2
|
||||||
$count = count($raw);
|
$count = count($raw);
|
||||||
$messageID = $this->chunked[$CID][0][0]++;
|
$messageID = $this->chunked[$CID][0][0]++;
|
||||||
|
$this->chunked[$CID][0][0] &= 0xFFFF;
|
||||||
if(!isset($this->needCheck[$CID])){
|
if(!isset($this->needCheck[$CID])){
|
||||||
$this->needCheck[$CID] = array();
|
$this->needCheck[$CID] = array();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user