mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 20:19:44 +00:00
Changes.
This commit is contained in:
parent
d5a6be70ac
commit
1e29cbbbeb
20 changed files with 98 additions and 96 deletions
|
|
@ -201,6 +201,7 @@ class Entity extends Position{
|
|||
case MOB_PIGMAN:
|
||||
return array(
|
||||
array(COOKED_PORKCHOP, 0, mt_rand(0,2)),
|
||||
array(GOLD_INGOT, 0, mt_rand(0,2)),
|
||||
);
|
||||
case MOB_CREEPER:
|
||||
return array(
|
||||
|
|
@ -367,10 +368,7 @@ class Entity extends Position{
|
|||
break;
|
||||
case FIRE: //Fire block damage
|
||||
if($this->inBlock(new Vector3($x, $y, $z))){
|
||||
$this->harm(1, "fire");
|
||||
$this->fire = 300;
|
||||
$this->updateMetadata();
|
||||
$hasUpdate = true;
|
||||
//patched
|
||||
}
|
||||
break;
|
||||
case CACTUS: //Cactus damage
|
||||
|
|
|
|||
|
|
@ -106,9 +106,11 @@ class Explosion{
|
|||
$server->api->entity->spawnToAll($e);
|
||||
}elseif(mt_rand(0, 10000) < ((1/$this->size) * 10000)){
|
||||
if(isset(self::$specialDrops[$block->getID()])){
|
||||
$server->api->entity->drop(new Position($block->x + 0.5, $block->y, $block->z + 0.5, $this->level), BlockAPI::getItem(self::$specialDrops[$block->getID()], 0));
|
||||
//$server->api->entity->drop(new Position($block->x + 0.5, $block->y, $block->z + 0.5, $this->level), BlockAPI::getItem(self::$specialDrops[$block->getID()], 0));
|
||||
return;
|
||||
}else{
|
||||
$server->api->entity->drop(new Position($block->x + 0.5, $block->y, $block->z + 0.5, $this->level), BlockAPI::getItem($block->getID(), $this->level->level->getBlockDamage($block->x, $block->y, $block->z)));
|
||||
//$server->api->entity->drop(new Position($block->x + 0.5, $block->y, $block->z + 0.5, $this->level), BlockAPI::getItem($block->getID(), $this->level->level->getBlockDamage($block->x, $block->y, $block->z)));
|
||||
return;
|
||||
}
|
||||
}
|
||||
$this->level->level->setBlockID($block->x, $block->y, $block->z, 0);
|
||||
|
|
|
|||
|
|
@ -389,7 +389,7 @@ class Level{
|
|||
return false;
|
||||
}
|
||||
Cache::remove("world:{$this->name}:$X:$Z");
|
||||
return $this->level->unloadChunk($X, $Z);
|
||||
return $this->level->unloadChunk($X, $Z, $this->server->saveEnabled);
|
||||
}
|
||||
|
||||
public function getOrderedChunk($X, $Z, $Yndex){
|
||||
|
|
@ -402,9 +402,8 @@ class Level{
|
|||
return $cache;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$raw = array();
|
||||
for($Y = 0; $Y < 8; ++$Y){
|
||||
if(($Yndex & (1 << $Y)) > 0){
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ class MineshaftPopulator extends Populator{
|
|||
|
||||
public function populate(Level $level, $chunkX, $chunkZ, Random $random){
|
||||
if($random->nextRange(0, MineshaftPopulator::$ODD) === 0){
|
||||
//$mineshaft = new Mineshaft($random);
|
||||
$mineshaft = new Mineshaft($random);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue