Skip to content

Clean up redundant patterns across block implementations#39

Merged
CoderJoeW merged 4 commits intomainfrom
cleanup/code-review-followup
Mar 20, 2026
Merged

Clean up redundant patterns across block implementations#39
CoderJoeW merged 4 commits intomainfrom
cleanup/code-review-followup

Conversation

@CoderJoeW
Copy link
Copy Markdown
Owner

Summary

  • Remove redundant FluidType.propertyName — use .name.lowercase() instead, since values were just lowercase enum names
  • Use ADJACENT_FACES in PowerMerger — last remaining inline face list
  • Pull getVisualStateBlockId() up to MaterialFactory — both factory subclasses had identical active/inactive logic, now driven by abstract activeBlockId
  • Add Location.coordinates extension property — replaces 22 instances of "${blockX},${blockY},${blockZ}" interpolation across 14 files

The propertyName field was redundant — enum values WATER, LAVA, NONE
map directly to their lowercase strings.
Replace inline listOf(BlockFace.NORTH, ...) with the inherited
ADJACENT_FACES constant.
Both factory subclasses had identical active/inactive logic. Add
abstract activeBlockId property and implement it once in the base.
Extracts the repeated "${blockX},${blockY},${blockZ}" pattern into
a Location.coordinates extension property in AtlasConfig.kt.
@CoderJoeW CoderJoeW merged commit 1b441f2 into main Mar 20, 2026
3 checks passed
@CoderJoeW CoderJoeW deleted the cleanup/code-review-followup branch March 20, 2026 05:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant