Skip to content

Separate block implementations and material additions #6699

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
dktapps opened this issue May 17, 2025 · 0 comments
Open

Separate block implementations and material additions #6699

dktapps opened this issue May 17, 2025 · 0 comments
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

Comments

@dktapps
Copy link
Member

dktapps commented May 17, 2025

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 and WoodType 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:

  • Planks
  • FenceGate
  • FloorSign
  • WallSign

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

@dktapps dktapps added Category: API Related to the plugin API Category: Core Related to internal functionality BC break Breaks API compatibility Type: Cleanup Removes or deprecates API methods or behaviour labels May 17, 2025
@dktapps dktapps moved this to Todo in Breaking changes May 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
Status: Todo
Development

No branches or pull requests

1 participant