mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 19:49:44 +00:00
Fixed #348
This commit is contained in:
parent
883b18078f
commit
97dd718e4f
3 changed files with 3 additions and 2 deletions
|
|
@ -33,7 +33,7 @@ class DirtBlock extends SolidBlock{
|
|||
|
||||
public function onActivate(Item $item, Player $player){
|
||||
if($item->isHoe()){
|
||||
if(($this->gamemode & 0x01) === 0){
|
||||
if(($player->gamemode & 0x01) === 0){
|
||||
$item->useOn($this);
|
||||
}
|
||||
$this->level->setBlock($this, BlockAPI::get(FARMLAND, 0));
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ class GrassBlock extends SolidBlock{
|
|||
TallGrassObject::growGrass($this->level, $this, new Random());
|
||||
return true;
|
||||
}elseif($item->isHoe()){
|
||||
if(($this->gamemode & 0x01) === 0){
|
||||
if(($player->gamemode & 0x01) === 0){
|
||||
$item->useOn($this);
|
||||
}
|
||||
$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
|
||||
$count = count($raw);
|
||||
$messageID = $this->chunked[$CID][0][0]++;
|
||||
$this->chunked[$CID][0][0] &= 0xFFFF;
|
||||
if(!isset($this->needCheck[$CID])){
|
||||
$this->needCheck[$CID] = array();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue