mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 12:09:43 +00:00
New Player::directBigRawPacket() method
This commit is contained in:
parent
db97c0c5f7
commit
295363a381
5 changed files with 82 additions and 29 deletions
|
|
@ -25,9 +25,14 @@ the Free Software Foundation, either version 3 of the License, or
|
|||
|
||||
*/
|
||||
|
||||
class StillWaterBlock extends LiquidBlock{
|
||||
|
||||
/***REM_START***/
|
||||
require_once("Water.php");
|
||||
/***REM_END***/
|
||||
|
||||
class StillWaterBlock extends WaterBlock{
|
||||
public function __construct($meta = 0){
|
||||
parent::__construct(STILL_WATER, $meta, "Still Water");
|
||||
LiquidBlock::__construct(STILL_WATER, $meta, "Still Water");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -30,4 +30,26 @@ class WaterBlock extends LiquidBlock{
|
|||
parent::__construct(WATER, $meta, "Water");
|
||||
}
|
||||
|
||||
public function onUpdate($type){
|
||||
return false;
|
||||
$level = $this->meta & 0x03;
|
||||
if($type !== BLOCK_UPDATE_NORMAL or $level === 0){
|
||||
return false;
|
||||
}
|
||||
|
||||
$falling = $this->meta >> 3;
|
||||
$down = $this->getSide(0);
|
||||
if($down->isFlowable){
|
||||
$this->level->setBlock($down, new WaterBlock(9), true); //1001
|
||||
return;
|
||||
}elseif($down instanceof WaterBlock and $down->getMetadata() === 9){
|
||||
$level = 1;
|
||||
}
|
||||
|
||||
$up = $this->getSide(1);
|
||||
if($up instanceof WaterBlock){
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue