Skin Layers 3D (Fabric/Forge)

Skin Layers 3D (Fabric/Forge)

31M Downloads

Refactor BodyLayerFeatureRenderer.renderLayers(AbstractClientPlayer,CustomizableModelPart[],PoseStack,VertexConsumer,int,int)

tr7zw opened this issue ยท 0 comments

commented

I've selected BodyLayerFeatureRenderer.renderLayers(AbstractClientPlayer,CustomizableModelPart[],PoseStack,VertexConsumer,int,int) for refactoring, which is a unit of 49 lines of code and 20 branch points. Addressing this will make our codebase more maintainable and improve Better Code Hub's Write Simple Units of Code guideline rating! ๐Ÿ‘

Here's the gist of this guideline:

  • Definition ๐Ÿ“–
    Limit the number of branch points (if, for, while, etc.) per unit to 4.
  • Whyโ“
    Keeping the number of branch points low makes units easier to modify and test.
  • How ๐Ÿ”ง
    Split complex units with a high number of branch points into smaller and simpler ones.

You can find more info about this guideline in Building Maintainable Software. ๐Ÿ“–


โ„น๏ธ To know how many other refactoring candidates need addressing to get a guideline compliant, select some by clicking on the ๐Ÿ”ฒ next to them. The risk profile below the candidates signals (โœ…) when it's enough! ๐Ÿ


Good luck and happy coding! :shipit: โœจ ๐Ÿ’ฏ