diff --git a/src/API/BlockAPI.php b/src/API/BlockAPI.php index 95ab612d3..73368a469 100644 --- a/src/API/BlockAPI.php +++ b/src/API/BlockAPI.php @@ -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 } diff --git a/src/config.php b/src/config.php index 1dafcfa87..e4a2f94b3 100644 --- a/src/config.php +++ b/src/config.php @@ -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; diff --git a/src/constants/ItemIDs.php b/src/constants/ItemIDs.php index f0e81dbaf..8d3aff91e 100644 --- a/src/constants/ItemIDs.php +++ b/src/constants/ItemIDs.php @@ -100,6 +100,7 @@ define("BUCKET", 325); define("IRON_DOOR", 330); +define("REDSTONE", 331); define("REDSTONE_DUST", 331); define("SNOWBALL", 332); diff --git a/src/material/block/plant/Beetroot.php b/src/material/block/plant/Beetroot.php index d133d8278..b1c517b06 100644 --- a/src/material/block/plant/Beetroot.php +++ b/src/material/block/plant/Beetroot.php @@ -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; } diff --git a/src/material/block/plant/DeadBush.php b/src/material/block/plant/DeadBush.php index 643ad211a..d4736980d 100644 --- a/src/material/block/plant/DeadBush.php +++ b/src/material/block/plant/DeadBush.php @@ -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; } diff --git a/src/material/block/plant/TallGrass.php b/src/material/block/plant/TallGrass.php index afe385289..ec0068e50 100644 --- a/src/material/block/plant/TallGrass.php +++ b/src/material/block/plant/TallGrass.php @@ -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", diff --git a/src/utils/pthreads.php b/src/utils/pthreads.php index be91ec58a..134fd3f3a 100644 --- a/src/utils/pthreads.php +++ b/src/utils/pthreads.php @@ -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(){} } diff --git a/src/world/Entity.php b/src/world/Entity.php index bd6d91ad3..695eb1c31 100644 --- a/src/world/Entity.php +++ b/src/world/Entity.php @@ -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; } }