mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-15 18:29:46 +00:00
Added a few things
This commit is contained in:
parent
8d14c98da9
commit
89138ae4ce
@ -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 "asp_tags=0" >> "$DIR/bin/php5/bin/php.ini"
|
||||||
echo "phar.readonly=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 "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
|
if [ "$IS_CROSSCOMPILE" != "crosscompile" ]; then
|
||||||
echo "zend_extension=opcache.so" >> "$DIR/bin/php5/bin/php.ini"
|
echo "zend_extension=opcache.so" >> "$DIR/bin/php5/bin/php.ini"
|
||||||
echo "opcache.enable=1" >> "$DIR/bin/php5/bin/php.ini"
|
echo "opcache.enable=1" >> "$DIR/bin/php5/bin/php.ini"
|
||||||
|
@ -42,7 +42,7 @@ class Grass extends Solid{
|
|||||||
public function onActivate(Item $item, Player $player = null){
|
public function onActivate(Item $item, Player $player = null){
|
||||||
if($item->getID() === Item::DYE and $item->getMetadata() === 0x0F){
|
if($item->getID() === Item::DYE and $item->getMetadata() === 0x0F){
|
||||||
$item->count--;
|
$item->count--;
|
||||||
TallGrass::growGrass($this->level, $this, new Random(), 8, 2);
|
TallGrass::growGrass($this->level, $this, new Random(mt_rand()), 8, 2);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}elseif($item->isHoe()){
|
}elseif($item->isHoe()){
|
||||||
|
@ -60,7 +60,7 @@ class Sapling extends Flowable{
|
|||||||
|
|
||||||
public function onActivate(Item $item, Player $player = null){
|
public function onActivate(Item $item, Player $player = null){
|
||||||
if($item->getID() === Item::DYE and $item->getMetadata() === 0x0F){ //Bonemeal
|
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){
|
if(($player->gamemode & 0x01) === 0){
|
||||||
$item->count--;
|
$item->count--;
|
||||||
}
|
}
|
||||||
@ -83,7 +83,7 @@ class Sapling extends Flowable{
|
|||||||
}elseif($type === Level::BLOCK_UPDATE_RANDOM){ //Growth
|
}elseif($type === Level::BLOCK_UPDATE_RANDOM){ //Growth
|
||||||
if(mt_rand(1, 7) === 1){
|
if(mt_rand(1, 7) === 1){
|
||||||
if(($this->meta & 0x08) === 0x08){
|
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{
|
}else{
|
||||||
$this->meta |= 0x08;
|
$this->meta |= 0x08;
|
||||||
$this->level->setBlock($this, $this, true, false, true);
|
$this->level->setBlock($this, $this, true, false, true);
|
||||||
|
@ -21,6 +21,9 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Different noise generators for level generation
|
* 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;
|
namespace pocketmine\level\generator\noise;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user