mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 12:09: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
|
|
@ -6,12 +6,8 @@ class RedstoneOreBlock extends SolidBlock{
|
|||
$this->hardness = 15;
|
||||
}
|
||||
|
||||
public static function onUpdate(Level $level, $x, $y, $z, $type){
|
||||
if($type === BLOCK_UPDATE_NORMAL || $type === BLOCK_UPDATE_TOUCH){ //TODO remove BLOCK_UPDATE_TOUCH
|
||||
$level->fastSetBlockUpdate($x, $y, $z, GLOWING_REDSTONE_ORE, 0);
|
||||
$level->scheduleBlockUpdate(new Position($x, $y, $z, $level), Utils::getRandomUpdateTicks(), BLOCK_UPDATE_RANDOM);
|
||||
}
|
||||
return false;
|
||||
public static function interact(Level $level, $x, $y, $z, Player $player){
|
||||
$level->fastSetBlockUpdate($x, $y, $z, GLOWING_REDSTONE_ORE, 0);
|
||||
}
|
||||
|
||||
public function getDrops(Item $item, Player $player){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue