Better highlight examples or prepare a small tutorial for block categories #2435
Labels
Category: Build/CI
Requests, Issues and Changes targeting gradle, groovy, Jenkins, etc.
Category: Doc
Requests, Issues and Changes targeting javadoc and module documentation
Status: Needs Investigation
Requires to be debugged or checked for feasibility, etc.
As visible in recent PR #2434 we do have support for attaching plain String categories to blocks that then in turn can be used in logic like the amount of damage a specific tool can do to blocks in a particular. The PR affects one current example where we have three different "tiers" of blocks with differing hardness then matching tools that would be able to damage the higher tier blocks (while trivializing lower tiers).
However, the system isn't widely in use and I'm not sure we really have any conventions on how to apply it or any good practices to encourage use. Probably some more examples (for instance in the Sample module) would be good, or ideally a small tutorial that covers basic usage and possible extensions like adding later content in separate modules that fit well with an earlier system.
It reminds me of the "tagging" system in Spawning / Portals. Rather than hard coding expected creature names or required components simply use String mapping between categories. Block categories more or less offer the same to make different kinds of wood blocks all act the same when faced with a wood-chopping axe. I just don't think we have it well documented anywhere.
If we can put this kind of system to good use it also brings up whether we should keep some kind of index of said categories. Any attempt to maintain such an index manually would be doomed to inaccuracy, but it is something that could be automated if needed.
The text was updated successfully, but these errors were encountered: