mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39:43 +00:00
block light
This commit is contained in:
parent
fd5b103df7
commit
d1a724c143
66 changed files with 266 additions and 1 deletions
|
|
@ -22,10 +22,13 @@ class StaticBlock
|
|||
public static $destroyTime = [];
|
||||
public static $slipperiness = [];
|
||||
public static $boundingBoxes = [];
|
||||
public static $lightBlock = [];
|
||||
public static $lightEmission = [];
|
||||
public static $minXs = [], $minYs = [], $minZs = [], $maxXs = [], $maxYs = [], $maxZs = [];
|
||||
|
||||
public static function init(){
|
||||
self::$NULL_BOUNDS = new AxisAlignedBB(0, 0, 0, 0, 0, 0);
|
||||
for($i = 0; $i < 256; ++$i) self::$lightBlock[$i] = self::$lightEmission[$i] = 0;
|
||||
foreach(Block::$class as $nonstaticname){
|
||||
/**@var Block $b*/
|
||||
$b = new $nonstaticname();
|
||||
|
|
@ -43,6 +46,8 @@ class StaticBlock
|
|||
self::$hardness[$b->getID()] = $b->getHardness();
|
||||
self::$destroyTime[$b->getID()] = $b->breakTime;
|
||||
self::$material[$b->getID()] = $b->material;
|
||||
self::$lightBlock[$b->getID()] = $b->lightBlock;
|
||||
self::$lightEmission[$b->getID()] = $b->lightEmission;
|
||||
self::$prealloc[$b->getID()] = $b;
|
||||
$b::$blockID = $b->getID();
|
||||
FireBlock::setFlammabilityAndCatchingChance($b->getID(), 0, 0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue