Corrected block metadata

This commit is contained in:
Shoghi Cervantes Pueyo 2013-02-02 15:53:22 +01:00
parent bbd113692e
commit 34db027ffd
10 changed files with 25 additions and 24 deletions

View file

@ -31,8 +31,8 @@ class SaplingBlock extends TransparentBlock{
const BIRCH = 2;
const BURN_TIME = 5;
public function __construct($type = Sapling::OAK){
parent::__construct(SAPLING, $type, "Sapling");
public function __construct($meta = Sapling::OAK){
parent::__construct(SAPLING, $meta, "Sapling");
$this->isActivable = true;
$this->isFlowable = true;
$names = array(
@ -40,7 +40,7 @@ class SaplingBlock extends TransparentBlock{
1 => "Spruce Sapling",
2 => "Birch Sapling",
);
$this->name = $names[$this->type & 0x03];
$this->name = $names[$this->meta & 0x03];
}
public function onActivate(LevelAPI $level, Item $item, Player $player){

View file

@ -26,8 +26,8 @@ the Free Software Foundation, either version 3 of the License, or
*/
class TallGrassBlock extends FlowableBlock{
public function __construct($type = 1){
parent::__construct(TALL_GRASS, $type, "Tall Grass");
public function __construct($meta = 1){
parent::__construct(TALL_GRASS, $meta, "Tall Grass");
$this->isFlowable = true;
$this->isReplaceable = true;
$names = array(
@ -35,7 +35,7 @@ class TallGrassBlock extends FlowableBlock{
1 => "Tall Grass",
2 => "Fern",
);
$this->name = $names[$this->type & 0x03];
$this->name = $names[$this->meta & 0x03];
}
}