mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39:43 +00:00
sand will be destroyed if it falls on torch/non solid block
This commit is contained in:
parent
38ee2f8b09
commit
d005e69c1f
1 changed files with 13 additions and 4 deletions
|
|
@ -614,10 +614,19 @@ class Entity extends Position
|
|||
}
|
||||
if($this->speedY != 0){
|
||||
$ny = $this->y + $this->speedY;
|
||||
if($this->class === ENTITY_FALLING && $support){
|
||||
$this->level->fastSetBlockUpdate($this->x, $this->y, $this->z, $this->data["Tile"], 0);
|
||||
$this->close();
|
||||
return;
|
||||
if($this->class === ENTITY_FALLING){
|
||||
if($support){
|
||||
$this->level->fastSetBlockUpdate($this->x, $this->y, $this->z, $this->data["Tile"], 0);
|
||||
$this->close();
|
||||
return;
|
||||
}
|
||||
$id = $this->level->level->getBlockID($this->x, $this->y, $this->z);
|
||||
if($id > 0 && !StaticBlock::getIsSolid($id) && !StaticBlock::getIsLiquid($id)){
|
||||
$this->server->api->entity->drop($this, BlockAPI::getItem($this->data["Tile"], 0, 1));
|
||||
$this->close();
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
$this->y = $ny;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue