From 89138ae4ce66ea31f610bb985f578e41be648996 Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Date: Tue, 8 Apr 2014 13:00:36 +0200 Subject: [PATCH] Added a few things --- src/build/compile.sh | 2 +- src/pocketmine/block/Grass.php | 2 +- src/pocketmine/block/Sapling.php | 4 ++-- src/pocketmine/level/generator/noise/Generator.php | 3 +++ 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/build/compile.sh b/src/build/compile.sh index 89ea3e4e5..bda049384 100755 --- a/src/build/compile.sh +++ b/src/build/compile.sh @@ -722,7 +722,7 @@ echo "short_open_tag=0" >> "$DIR/bin/php5/bin/php.ini" echo "asp_tags=0" >> "$DIR/bin/php5/bin/php.ini" echo "phar.readonly=0" >> "$DIR/bin/php5/bin/php.ini" echo "phar.require_hash=1" >> "$DIR/bin/php5/bin/php.ini" -echo "zend_extension=uopz.so" >> "$DIR/bin/php5/bin/php.ini" +#echo "zend_extension=uopz.so" >> "$DIR/bin/php5/bin/php.ini" if [ "$IS_CROSSCOMPILE" != "crosscompile" ]; then echo "zend_extension=opcache.so" >> "$DIR/bin/php5/bin/php.ini" echo "opcache.enable=1" >> "$DIR/bin/php5/bin/php.ini" diff --git a/src/pocketmine/block/Grass.php b/src/pocketmine/block/Grass.php index 9f1d7296b..faae5320b 100644 --- a/src/pocketmine/block/Grass.php +++ b/src/pocketmine/block/Grass.php @@ -42,7 +42,7 @@ class Grass extends Solid{ public function onActivate(Item $item, Player $player = null){ if($item->getID() === Item::DYE and $item->getMetadata() === 0x0F){ $item->count--; - TallGrass::growGrass($this->level, $this, new Random(), 8, 2); + TallGrass::growGrass($this->level, $this, new Random(mt_rand()), 8, 2); return true; }elseif($item->isHoe()){ diff --git a/src/pocketmine/block/Sapling.php b/src/pocketmine/block/Sapling.php index 082ef8014..32e38fa8c 100644 --- a/src/pocketmine/block/Sapling.php +++ b/src/pocketmine/block/Sapling.php @@ -60,7 +60,7 @@ class Sapling extends Flowable{ public function onActivate(Item $item, Player $player = null){ if($item->getID() === Item::DYE and $item->getMetadata() === 0x0F){ //Bonemeal - Tree::growTree($this->level, $this, new Random(), $this->meta & 0x03); + Tree::growTree($this->level, $this, new Random(mt_rand()), $this->meta & 0x03); if(($player->gamemode & 0x01) === 0){ $item->count--; } @@ -83,7 +83,7 @@ class Sapling extends Flowable{ }elseif($type === Level::BLOCK_UPDATE_RANDOM){ //Growth if(mt_rand(1, 7) === 1){ if(($this->meta & 0x08) === 0x08){ - Tree::growTree($this->level, $this, new Random(), $this->meta & 0x03); + Tree::growTree($this->level, $this, new Random(mt_rand()), $this->meta & 0x03); }else{ $this->meta |= 0x08; $this->level->setBlock($this, $this, true, false, true); diff --git a/src/pocketmine/level/generator/noise/Generator.php b/src/pocketmine/level/generator/noise/Generator.php index 95de68ad2..60bf08523 100644 --- a/src/pocketmine/level/generator/noise/Generator.php +++ b/src/pocketmine/level/generator/noise/Generator.php @@ -21,6 +21,9 @@ /** * Different noise generators for level generation + * + * WARNING: This class is available on the PocketMine-MP Zephir project. + * If this class is modified, remember to modify the PHP C extension. */ namespace pocketmine\level\generator\noise;