Pocketmine-mp: Falling blocks get destroyed on grass

Created on 7 May 2017  路  3Comments  路  Source: pmmp/PocketMine-MP

Issue description




Falling sand and gravel gets destroyed if it lands on grass. Expected behaviour is the grass gets destroyed.

Steps to reproduce the issue

  1. ... Place some grass
  2. ... Place some sand 3 blocks above the grass so it falls

OS and versions

Expected behaviour

  • Mushroom - Destroy sand
  • Sapling - Destroy sand
  • Flower pot - Destroy sand
  • Lily pad - Destory sand
  • Cactus - Destroy sand
  • Torch - Destroy sand
  • Tall grass - Destroy sand
  • Brewing stand - Destroy sand
  • Sign - Destroy sand
  • Cake - Destroy sand
  • Enchantment table - Destroy sand
  • Dragon head - Destroy sand
  • Carpet - Destroy sand
  • Stairs - Destroy sand

  • Slime block - Nothing happens (i expected it to bounce lol)

  • Cobweb - Sand sinks through it slowly
  • Grass - Destoy grass without dropping grass item
Tested on MCPE 1.1.0.9
Gameplay Fixed

Most helpful comment

The logic of the falling-block code is poor, this doesn't surprise me in the slightest.

All 3 comments

The logic of the falling-block code is poor, this doesn't surprise me in the slightest.

That check probably ought to be for blocks that can be replaced as opposed to whether it's solid or not.

https://github.com/pmmp/PocketMine-MP/blob/master/src/pocketmine/entity/FallingSand.php#L124
I confirm isSolid is the fault, though tallgrass is not solid. On that line isSolid should be canBeReplaced

Was this page helpful?
0 / 5 - 0 ratings

Related issues

MrReskill picture MrReskill  路  3Comments

arfianadam picture arfianadam  路  3Comments

sergeysova picture sergeysova  路  3Comments

MisteFr picture MisteFr  路  3Comments

beetree picture beetree  路  3Comments