mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 03:59:43 +00:00
fixed placement on farmland of sapling and tallgrass
This commit is contained in:
parent
f66b6adfa1
commit
e594fc2f8c
2 changed files with 6 additions and 4 deletions
|
|
@ -44,7 +44,8 @@ class SaplingBlock extends FlowableBlock{
|
|||
return false;
|
||||
}
|
||||
public static function neighborChanged(Level $level, $x, $y, $z, $nX, $nY, $nZ, $oldID){
|
||||
if(StaticBlock::getIsTransparent($level->level->getBlockID($x, $y - 1, $z))){ //Replace with common break method
|
||||
$downID = $level->level->getBlockID($x, $y - 1, $z);
|
||||
if(StaticBlock::getIsTransparent($downID) && $downID !== FARMLAND){ //Replace with common break method
|
||||
[$id, $meta] = $level->level->getBlock($x, $y, $z);
|
||||
ServerAPI::request()->api->entity->drop(new Position($x+0.5, $y, $z+0.5, $level), BlockAPI::getItem($id, $meta));
|
||||
$level->fastSetBlockUpdate($x, $y, $z, 0, 0);
|
||||
|
|
@ -67,4 +68,4 @@ class SaplingBlock extends FlowableBlock{
|
|||
array($this->id, $this->meta & 0x03, 1),
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue