Separate block implementations and material additions #6699
Labels
BC break
Breaks API compatibility
Category: API
Related to the plugin API
Category: Core
Related to internal functionality
Type: Cleanup
Removes or deprecates API methods or behaviour
Uh oh!
There was an error while loading. Please reload this page.
Problem description
Implementing bamboo-like blocks has been a problem because bamboo doesn't have logs, so we can't just directly add it to
WoodType
.One solution we explored for this was to split up
LogType
andWoodType
so that bamboo could be classified as a wood type. This is still a viable option, but kinda sucks because it requires a BC break, and therefore would be delayed until the release of a new major version.An alternative would be to add bamboo as a fully separate type of block. This would work well for almost all of the wood-like blocks, except for these:
The reason for this is that these implementation classes assume that these blocks will always be made from wood. Others like fence gate, pressure plate, door etc. do not assume this and don't have this problem.
Proposed solution
We need to split up the material properties and the implementations of blocks.
Specifically, we need a non-material-specific variant of FenceGate, FloorSign and WallSign, with the corresponding WoodenFenceGate, WoodenFloorSign and WoodenWallSign to be introduced (though this might turn into a mess wrt. signs). Planks are not important since they are very simple opaque blocks anyway.
This could be done in a 5.x minor release, if we were prepared to accept some inconsistencies with class naming. I don't love this, but I never liked the idea of breaking BC to implement such minor features either.
In the longer run we might need to explore where else this merging of material and implementation assumption has taken place, so it can be avoided in the future. Possibly separating material into its own system might be called for.
Alternative solutions or workarounds
No response
The text was updated successfully, but these errors were encountered: