mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 12:09:43 +00:00
Added EndPortalFrame, fixed block names and added new stone blobs in flat
This commit is contained in:
parent
612e09e0cc
commit
7255fbc3ad
40 changed files with 107 additions and 30 deletions
|
|
@ -5,16 +5,19 @@ class FarmlandBlock extends TransparentBlock{
|
|||
parent::__construct(FARMLAND, $meta, "Farmland");
|
||||
$this->hardness = 3;
|
||||
}
|
||||
|
||||
public function getDrops(Item $item, Player $player){
|
||||
return array(
|
||||
array(DIRT, 0, 1),
|
||||
);
|
||||
return [
|
||||
[DIRT, 0, 1]
|
||||
];
|
||||
}
|
||||
|
||||
public function hasCrops(){
|
||||
//TODO vanilla 0.8.1 detection method
|
||||
$b = $this->getSide(1);
|
||||
return $b->isTransparent && $b->id != 0;
|
||||
}
|
||||
|
||||
public function onUpdate($type){
|
||||
if($type === BLOCK_UPDATE_NORMAL){
|
||||
if(!$this->getSide(1)->isTransparent){
|
||||
|
|
@ -41,10 +44,9 @@ class FarmlandBlock extends TransparentBlock{
|
|||
|
||||
public function getBlockID($x, $y, $z){
|
||||
return $this->level->level->getBlockID($x, $y, $z); //PMFLevel method
|
||||
}
|
||||
}
|
||||
|
||||
public function checkWater(){
|
||||
|
||||
for($x = $this->x - 4; $x <= $this->x + 4; $x++){
|
||||
for($y = $this->y; $y <= $this->y + 1; $y++){
|
||||
for($z = $this->z - 4; $z <= $this->z + 4; $z++){
|
||||
|
|
@ -56,6 +58,5 @@ class FarmlandBlock extends TransparentBlock{
|
|||
}
|
||||
}
|
||||
return false;
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue