mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 03:59:43 +00:00
separated neighbor updates and scheduled updates
This commit is contained in:
parent
ee989ef556
commit
2ebc482e3d
36 changed files with 197 additions and 262 deletions
|
|
@ -5,15 +5,11 @@ class GlowingRedstoneOreBlock extends SolidBlock implements LightingBlock{
|
|||
parent::__construct(GLOWING_REDSTONE_ORE, 0, "Glowing Redstone Ore");
|
||||
$this->hardness = 15;
|
||||
}
|
||||
|
||||
public static function onRandomTick(Level $level, $x, $y, $z){
|
||||
$level->setBlock(new Position($x, $y, $z, $level), BlockAPI::get(REDSTONE_ORE, $level->level->getBlockDamage($x, $y, $z)), false, false, true);
|
||||
}
|
||||
public static function onUpdate(Level $level, $x, $y, $z, $type){
|
||||
if($type === BLOCK_UPDATE_SCHEDULED){ //TODO replace with BLOCK_UPDATE_NORMAL
|
||||
$level->fastSetBlockUpdate($x, $y, $z, REDSTONE_ORE, 0);
|
||||
}
|
||||
return false;
|
||||
$level->fastSetBlockUpdate($x, $y, $z, REDSTONE_ORE, 0);
|
||||
}
|
||||
|
||||
public function getMaxLightValue(){
|
||||
return 9;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue