Skip to content

Feat/block spread challenge - #144

Open
JulianBetaa wants to merge 3 commits into
cyperia:mainfrom
JulianBetaa:feat/block-spread-challenge
Open

JulianBetaa wants to merge 3 commits into
cyperia:mainfrom
JulianBetaa:feat/block-spread-challenge

Conversation

@JulianBetaa

Copy link
Copy Markdown

This pull request includes:

  • new release (main branch)
  • new feature (development branch)
  • bug fix (development branch)

Changes made to the repository:

Adds the challenge Mined Blocks Spread (blockspread, category world, icon sculk catalyst): every block a player mines turns its 6 neighbouring blocks into the same type.

  • The spread happens as the block is mined, before it is removed. Removing it then updates every neighbour, so a spread block that can't survive there drops as an item (flowers on stone, torches without support), and sand or gravel above the hole falls into it.
  • Air, fluids and blocks that can't be broken in survival (bedrock, portals, command blocks, ...) are never replaced. Containers are skipped so their items aren't lost.
  • Two-part blocks: mining a bed, door or tall plant spreads nothing. If a neighbour is one half of such a block, it is replaced and its other half is removed so nothing floats. If that other half also touches the mined block, it gets the new type as well. Stairs and trapdoors count as normal blocks.
  • Catalog entry, catalog/export/catalog.json, and texts in en, de and global.

Documentation of test results:

New feature, no before/after. BlockSpreadChallengeTest (9 tests) covers which blocks get replaced, placing without physics, containers, and the bed/door handling. ./gradlew build passes, including ChallengeCatalogTest and LocalesTest.

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