mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 03:59:43 +00:00
better break time checks, added block materials
This commit is contained in:
parent
71da620aa3
commit
625e9ca71f
143 changed files with 496 additions and 54 deletions
|
|
@ -17,8 +17,9 @@ class StaticBlock
|
|||
public static $hasPhysics = [];
|
||||
public static $isLiquid = [];
|
||||
public static $isFullBlock = [];
|
||||
|
||||
public static $material = [];
|
||||
public static $hardness = [];
|
||||
public static $destroyTime = [];
|
||||
public static $slipperiness = [];
|
||||
public static $boundingBoxes = [];
|
||||
public static $minXs = [], $minYs = [], $minZs = [], $maxXs = [], $maxYs = [], $maxZs = [];
|
||||
|
|
@ -40,6 +41,8 @@ class StaticBlock
|
|||
self::$slipperiness[$b->getID()] = $b->slipperiness;
|
||||
self::$boundingBoxes[$b->getID()] = $b->boundingBox;
|
||||
self::$hardness[$b->getID()] = $b->getHardness();
|
||||
self::$destroyTime[$b->getID()] = $b->breakTime;
|
||||
self::$material[$b->getID()] = $b->material;
|
||||
self::$prealloc[$b->getID()] = $b;
|
||||
$b::$blockID = $b->getID();
|
||||
FireBlock::setFlammabilityAndCatchingChance($b->getID(), 0, 0);
|
||||
|
|
@ -102,6 +105,10 @@ class StaticBlock
|
|||
FireBlock::setFlammabilityAndCatchingChance(SPONGE, 30, 60);
|
||||
}
|
||||
|
||||
public static function getMaterial($blockID){
|
||||
return self::$material[$blockID] ?? Material::$air;
|
||||
}
|
||||
|
||||
public static function setBlockBounds($blockID, $minX, $minY, $minZ, $maxX, $maxY, $maxZ){
|
||||
self::$maxXs[$blockID] = $maxX;
|
||||
self::$maxYs[$blockID] = $maxY;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue