Skip to content

Class naming convention #814

@kashike

Description

@kashike

We're planning to do the following changes to make things consistent, and 1.14 is a good time to do it with the large changes.

  • Drop the I prefix for interfaces
  • Drop the Enum prefix for enumerations
  • Suffixes for everything: FooBlock, FooItem, etc
    • not everything with a Block prefix is actually a block (applies elsewhere too):
      • BlockMatcher is actually a predicate
      • BlockPattern is actually a pattern that can be matched in the world
      • BlockState is actually a state of a block
    • doesn't apply to vanilla, but applies to mods who don't use packages and follow vanilla's class naming: FooBlock, FooItem are both grouped together, rather than BlockFoo [... many others ...] ItemFoo
      • while vanilla separates blocks and items into their own packages, a mod is not required to do the same
    • note that we already use suffixes for major refactors and new classes: see Biome and Feature classes for an example

Deadline for feedback is Monday (29/04/2019).

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions