From 0d6ae6067c9cb5c383257c798d72fcf491509354 Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Date: Wed, 27 Nov 2013 12:10:26 +0100 Subject: [PATCH 1/7] Fixed #956 BEETROOT_BLOCK typo --- src/material/block/plant/Beetroot.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } From 2f7e5688e2a4efbc661808b146ae536a38abb10f Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Date: Wed, 27 Nov 2013 15:28:10 +0100 Subject: [PATCH 2/7] Fixed #418 Placing blocks on top of Snow replaces it now --- src/API/BlockAPI.php | 6 ++++++ src/material/block/plant/DeadBush.php | 2 +- src/material/block/plant/TallGrass.php | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) 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/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", From b21ee37c0786cdbdd508a5c2d169394d8a873323 Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Date: Wed, 27 Nov 2013 17:22:41 +0100 Subject: [PATCH 3/7] MCPE v0.8.0 alpha build 4 --- src/config.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; From bc48e70d6c18e2a06cfecc130eb5243c8c322139 Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Date: Wed, 27 Nov 2013 17:24:33 +0100 Subject: [PATCH 4/7] Remove fire effects on Creative mode --- src/world/Entity.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/world/Entity.php b/src/world/Entity.php index bd6d91ad3..61c63553c 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); From f3f61e7a4a709c806a04a5ada5f3ae51f8d4c8a7 Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Date: Wed, 27 Nov 2013 17:41:39 +0100 Subject: [PATCH 5/7] Cobblestone Walls height handling --- src/world/Entity.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/world/Entity.php b/src/world/Entity.php index 61c63553c..695eb1c31 100644 --- a/src/world/Entity.php +++ b/src/world/Entity.php @@ -427,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; } } From a4e38689dbf2b608ae3830f59c9dd1bbcd596d18 Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Date: Wed, 27 Nov 2013 23:19:48 +0100 Subject: [PATCH 6/7] Added REDSTONE constant --- src/constants/ItemIDs.php | 1 + 1 file changed, 1 insertion(+) 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); From 0bac7418dbfa0fdc875995e29b0886fe871b5b84 Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Date: Fri, 29 Nov 2013 00:18:38 +0100 Subject: [PATCH 7/7] Updated StackableArray --- src/utils/pthreads.php | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) 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(){} }