Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

ExprExplodedBlocks - new #2511

Merged
merged 3 commits into from
Nov 4, 2019
Merged

ExprExplodedBlocks - new #2511

merged 3 commits into from
Nov 4, 2019

Conversation

ShaneBeee
Copy link
Contributor

Description

Add an expression to retrieve the exploded blocks from an explosion event


Target Minecraft Versions: any
Requirements: none
Related Issues: #2509

- Split up examples onto separate lines
@FranKusmiruk
Copy link
Member

Huh, I've done this myself yesterday, I just didn't push it

@Wealthyturtle Wealthyturtle added the feature Pull request adding a new feature. label Oct 9, 2019
- Remove "destroyed" from pattern to cut down confusion with break events
@Blueyescat
Copy link
Contributor

Blueyescat commented Oct 21, 2019

There should be a way to prevent explosion of specific blocks

SkQuery does it like

loop exploded blocks:
    if .. :
        remove loop-block from exploded blocks

should also support item types like remove all stones from exploded blocks

Copy link
Member

@FranKusmiruk FranKusmiruk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The expression itself is fine right now but it can be improved, you may consider the following:

  1. Implementing ItemType changers to the expression as Blueyescat suggested.
  2. Implementing the iterator method since the main usage of the expression is looping.
  3. Support the EntityExplodeEvent, even if we don't support this event right now, being future-proof isn't bad.

@bensku
Copy link
Member

bensku commented Nov 4, 2019

We can improve the expression later. This is much better than nothing.

@bensku bensku merged commit 94851ef into SkriptLang:master Nov 4, 2019
@ShaneBeee ShaneBeee deleted the feature/exploded-blocks branch August 6, 2020 08:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Pull request adding a new feature.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants