Merge remote-tracking branch 'origin/master'

This commit is contained in:
Michael Yoo 2013-11-30 13:10:27 +10:30
commit 25cd58bd99
8 changed files with 29 additions and 7 deletions

View File

@ -419,6 +419,12 @@ class BlockAPI{
return $this->cancelAction($block, $player, false);
}
if($target->isReplaceable === true){
$block = $target;
$hand->position($block);
$face = -1;
}
if($hand->isSolid === true and $player->entity->inBlock($block)){
return $this->cancelAction($block, $player, false); //Entity in block
}

View File

@ -60,7 +60,7 @@ ini_set("memory_limit", "128M"); //Default
define("LOG", true);
define("START_TIME", microtime(true));
define("MAJOR_VERSION", "Alpha_1.3.11dev");
define("CURRENT_MINECRAFT_VERSION", "v0.8.0 alpha build 3");
define("CURRENT_MINECRAFT_VERSION", "v0.8.0 alpha build 4");
define("CURRENT_API_VERSION", 11);
define("CURRENT_PHP_VERSION", "5.5");
$gitsha1 = false;

View File

@ -100,6 +100,7 @@ define("BUCKET", 325);
define("IRON_DOOR", 330);
define("REDSTONE", 331);
define("REDSTONE_DUST", 331);
define("SNOWBALL", 332);

View File

@ -21,7 +21,7 @@
class BeetrootBlock extends FlowableBlock{
public function __construct($meta = 0){
parent::__construct(BETROOT_BLOCK, $meta, "Beetroot Block");
parent::__construct(BEETROOT_BLOCK, $meta, "Beetroot Block");
$this->isActivable = true;
$this->hardness = 0;
}

View File

@ -22,7 +22,7 @@
class DeadBushBlock extends FlowableBlock{
public function __construct(){
parent::__construct(DEAD_BUSH, 0, "Dead Bush");
$this->isReplaceable = true;
//$this->isReplaceable = true;
$this->hardness = 0;
}

View File

@ -22,7 +22,7 @@
class TallGrassBlock extends FlowableBlock{
public function __construct($meta = 1){
parent::__construct(TALL_GRASS, $meta, "Tall Grass");
$this->isReplaceable = true;
//$this->isReplaceable = true;
$names = array(
0 => "Dead Shrub",
1 => "Tall Grass",

View File

@ -22,8 +22,20 @@
define("ASYNC_CURL_GET", 1);
define("ASYNC_CURL_POST", 2);
class StackableArray{
public $counter = 0;
class StackableArray extends Stackable{
public function __construct(){
foreach(func_get_args() as $n => $value){
if(is_array($value)){
$this->{$n} = new StackableArray();
call_user_func_array(array($this->{$n}, "__construct"), $value);
}else{
$this->{$n} = $value;
}
}
}
public function __destruct(){}
public function run(){}
}

View File

@ -315,6 +315,9 @@ class Entity extends Position{
}else{
$hasUpdate = true;
}
if(($this->player instanceof Player) and ($this->player->gamemode & 0x01) === CREATIVE){ //Remove fire effects in next tick
$this->fire = 1;
}
}
$startX = (int) (round($this->x - 0.5) - 1);
@ -424,7 +427,7 @@ class Entity extends Position{
$support = true;
$isFlying = false;
break;
}elseif(($b instanceof LiquidBlock) or $b->getID() === COBWEB or $b->getID() === LADDER or $b->getID() === FENCE){
}elseif(($b instanceof LiquidBlock) or $b->getID() === COBWEB or $b->getID() === LADDER or $b->getID() === FENCE or $b->getID() === STONE_WALL){
$isFlying = false;
}
}