Pocketmine-mp: Unclear definition of a "solid" block

Created on 5 Dec 2018  路  5Comments  路  Source: pmmp/PocketMine-MP

It is unclear (and undocumented) what the isSolid() member function of Block is supposed to mean. It is a magic property which is inconsistently applied where it would be expected.

Popular misconceptions:

  • A full opaque block (i.e. non-transparent): Wrong, many non-full blocks are "solid" too, like stairs.
  • A block which can be collided with: Wrong, ladders are considered "non-solid" and yet are collidable.
Core

Most helpful comment

After investigation it seems that MC's isSolid() more closely aligns with PM's canBeFlowedInto(). It seems isSolid() in MC == can't be flowed into in PM.

All 5 comments

After investigation it seems that MC's isSolid() more closely aligns with PM's canBeFlowedInto(). It seems isSolid() in MC == can't be flowed into in PM.

Quick note for issue readers: This seems to apply to several properties, as isFlameable etc.

In vanilla this is done by Materials

There is no ambiguity of isFlammable(). The definition as per MC is 100% clear.

@thebigsmileXD I don't know why you're confused. The definition is here, it's even a single line. https://github.com/pmmp/PocketMine-MP/blob/e92aac847c68915cfe16de48155b6a18f01ab035/src/pocketmine/block/Block.php#L604

I am actually "馃", blame GitHub's limited reactions. Apparently to Minecraft's decompiled code the property if it can catch fire is a property of the 'Material' of a block. I.e. Material::WOOD can catch fire

Was this page helpful?
0 / 5 - 0 ratings

Related issues

MisteFr picture MisteFr  路  19Comments

zKoz210 picture zKoz210  路  23Comments

mal0ne-23 picture mal0ne-23  路  32Comments

SOF3 picture SOF3  路  20Comments

matcracker picture matcracker  路  17Comments