mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 20:19:44 +00:00
arrow collision tweaks
This commit is contained in:
parent
f8ec00dad9
commit
8b07056323
17 changed files with 137 additions and 51 deletions
|
|
@ -6,7 +6,11 @@ class CyanFlowerBlock extends FlowableBlock{
|
|||
$this->isActivable = true;
|
||||
$this->hardness = 0;
|
||||
}
|
||||
|
||||
|
||||
public static function getAABB(Level $level, $x, $y, $z){
|
||||
return null;
|
||||
}
|
||||
|
||||
public function place(Item $item, Player $player, Block $block, Block $target, $face, $fx, $fy, $fz){
|
||||
$down = $this->getSide(0);
|
||||
if($down->getID() === 2 or $down->getID() === 3 or $down->getID() === 60){
|
||||
|
|
|
|||
|
|
@ -6,7 +6,9 @@ class DandelionBlock extends FlowableBlock{
|
|||
$this->isActivable = true;
|
||||
$this->hardness = 0;
|
||||
}
|
||||
|
||||
public static function getAABB(Level $level, $x, $y, $z){
|
||||
return null;
|
||||
}
|
||||
public function place(Item $item, Player $player, Block $block, Block $target, $face, $fx, $fy, $fz){
|
||||
$down = $this->getSide(0);
|
||||
if($down->getID() === 2 or $down->getID() === 3 or $down->getID() === 60){
|
||||
|
|
|
|||
|
|
@ -6,7 +6,11 @@ class DeadBushBlock extends FlowableBlock{
|
|||
//$this->isReplaceable = true;
|
||||
$this->hardness = 0;
|
||||
}
|
||||
|
||||
|
||||
public static function getAABB(Level $level, $x, $y, $z){
|
||||
return null;
|
||||
}
|
||||
|
||||
public function onUpdate($type){
|
||||
if($type === BLOCK_UPDATE_NORMAL){
|
||||
if($this->getSide(0)->isTransparent === true){ //Replace with common break method
|
||||
|
|
|
|||
|
|
@ -19,7 +19,9 @@ class SaplingBlock extends FlowableBlock{
|
|||
$this->name = $names[$this->meta & 0x03];
|
||||
$this->hardness = 0;
|
||||
}
|
||||
|
||||
public static function getAABB(Level $level, $x, $y, $z){
|
||||
return null;
|
||||
}
|
||||
public function place(Item $item, Player $player, Block $block, Block $target, $face, $fx, $fy, $fz){
|
||||
$down = $this->getSide(0);
|
||||
if($down->getID() === GRASS or $down->getID() === DIRT or $down->getID() === FARMLAND){
|
||||
|
|
|
|||
|
|
@ -12,7 +12,9 @@ class SugarcaneBlock extends FlowableBlock{
|
|||
[SUGARCANE, 0, 1],
|
||||
];
|
||||
}
|
||||
|
||||
public static function getAABB(Level $level, $x, $y, $z){
|
||||
return null;
|
||||
}
|
||||
public function onActivate(Item $item, Player $player){
|
||||
if($item->getID() === DYE and $item->getMetadata() === 0x0F){ //Bonemeal
|
||||
if($this->level->level->getBlockID($this->x, $this->y - 1, $this->z) != SUGARCANE_BLOCK){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue