mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 20:19:44 +00:00
onUpdate is now static, disabled rail, water and lava updates to rework.
This commit is contained in:
parent
3c37dc446e
commit
ee989ef556
38 changed files with 329 additions and 367 deletions
|
|
@ -8,10 +8,9 @@ class GlowingRedstoneOreBlock extends SolidBlock implements LightingBlock{
|
|||
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 function onUpdate($type){
|
||||
if($type === BLOCK_UPDATE_SCHEDULED){
|
||||
$this->level->setBlock($this, BlockAPI::get(REDSTONE_ORE, $this->meta), false, false, true);
|
||||
return BLOCK_UPDATE_WEAK;
|
||||
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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue