pmmp / PocketMine-MP

A server software for Minecraft: Bedrock Edition in PHP
https://pmmp.io
GNU Lesser General Public License v3.0
3.28k stars 1.56k forks source link

Unclear definition of a "solid" block #2551

Open dktapps opened 5 years ago

dktapps commented 5 years ago

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:

dktapps commented 5 years ago

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.

inxomnyaa commented 5 years ago

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

In vanilla this is done by Materials

dktapps commented 5 years ago

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

dktapps commented 5 years ago

@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

inxomnyaa commented 5 years ago

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