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
|
|
@ -11,10 +11,10 @@ class DeadBushBlock extends FlowableBlock{
|
|||
return null;
|
||||
}
|
||||
|
||||
public function onUpdate($type){
|
||||
public static function onUpdate(Level $level, $x, $y, $z, $type){
|
||||
if($type === BLOCK_UPDATE_NORMAL){
|
||||
if($this->getSide(0)->isTransparent === true){ //Replace with common break method
|
||||
$this->level->setBlock($this, new AirBlock(), false, false, true);
|
||||
if(StaticBlock::getIsTransparent($level->level->getBlockID($x, $y - 1, $z))){ //Replace with common break method
|
||||
$level->fastSetBlockUpdate($x, $y, $z, 0, 0);
|
||||
return BLOCK_UPDATE_NORMAL;
|
||||
}
|
||||
}
|
||||
|
|
@ -30,13 +30,13 @@ class DeadBushBlock extends FlowableBlock{
|
|||
return false;
|
||||
}
|
||||
|
||||
public function getDrops(Item $item, Player $player){
|
||||
if($item->isShears()){
|
||||
return [
|
||||
[DEAD_BUSH, 0, 1],
|
||||
];
|
||||
}
|
||||
|
||||
return [];
|
||||
public function getDrops(Item $item, Player $player){
|
||||
if($item->isShears()){
|
||||
return [
|
||||
[DEAD_BUSH, 0, 1],
|
||||
];
|
||||
}
|
||||
|
||||
return [];
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue