Block: deprecate isSolid()

As discussed many years ago in #2551, no one actually knows what this property actually means. It definitely isn't the conventionally expected definition of 'solid' found in the real world, as signs are solid but flower pots are not.
This commit is contained in:
Dylan K. Taylor 2024-01-09 13:35:10 +00:00
parent 9b03b082ab
commit 288bd4018b
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D

View File

@ -576,6 +576,15 @@ class Block{
return false;
}
/**
* @deprecated TL;DR: Don't use this function. Its results are confusing and inconsistent.
*
* No one is sure what the meaning of this property actually is. It's borrowed from Minecraft Java Edition, and is
* used by various blocks for support checks.
*
* Things like signs and banners are considered "solid" despite having no collision box, and things like skulls and
* flower pots are considered non-solid despite obviously being "solid" in the conventional, real-world sense.
*/
public function isSolid() : bool{
return true;
}