in many instances, remnants of improperly removed blocks from PM3 have been causing problems, such as flower pot tiles where there are no flower pots.
this change might break some plugins which are using tiles for custom purposes, but this is a misuse that was never supported properly in the first place.
Added StaticSupportTrait for blocks which require unconditional support
dynamic support requirements, such as those presented by item frames and torches, are not included.
in addition, double blocks, such as tallgrass, small dripleaf and doors, do not cooperate well with this, so they are also not included.
some blocks which could be migrated (such as chorus plant) were skipped due to unresolved problems.
Previously, we were using codegen to support describing a fixed set of enums.
Instead, we implement an enum() function, allowing any native PHP enum to be described.
All enums used in runtime data have been migrated to native PHP 8.1 enums in minor-next to facilitate this.
This implementation:
- is faster (in extreme cases by 40x, such as with PotionType)
- requires way less code
- does not require a build step
- is way more flexible
This fixes#5877, increasing the range of stuff that plugins are now able to do.
EnumTrait enums are not supported, as it's easier and cleaner to just support native enums. Most core EnumTrait enums have been migrated to native enums by now to facilitate this.
This was static to permit ItemFactory to register spawn eggs for all known entity types in early PM4. However, nowadays we provide a callback to the spawn egg instead, and spawn eggs must be manually implemented, so this is no longer needed.
In addition, having this static forces everyone to make a new entity class for every unique type of entity, which isn't ideal.