Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Lightning Transforms Blocks Into Other Blocks #1422

Open
wants to merge 7 commits into
base: ver/1.20.1
Choose a base branch
from

Conversation

granny
Copy link
Member

@granny granny commented Aug 28, 2023

When lightning hits sand, water, or stone, nearby sand changes to glass. Struck water becomes stone, and struck stone becomes obsidian. The algorithm is the same one used by the sponge block for absorbing water, so setting max-depth to 6 and max-iteration to 65 transforms as much sand as a sponge absorbs water by default.

gameplay-mechanics:
  lightning-transforms-blocks:
    enabled: false
    nearby-sand-into-glass:
      enabled: true
      max-depth: 3
      max-iteration: 6
    sand-into-glass: true
    water-into-stone: true
    stone-into-obsidian: true

📷 Showcasing default values

2023-08-27.17-57-07.mp4

📷 setting max-depth to 6 and max-iteration to 65

2023-08-27_00-46-13.1.mp4

TODO

  • maybe move config options somewhere else?
  • either create a custom event that extends spongeabsorbevent, use some pre-existing block event, or don't add any event and let plugins guess if these options are enabled
  • modify the LightningStrikeEvent to include a List<BlockState> list?
  • create PR to PurpurDocs

@granny granny added the needs-docs A pull request to PurpurDocs is required before merge label Aug 28, 2023
@granny granny removed the needs-docs A pull request to PurpurDocs is required before merge label Sep 11, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant