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

Adds a condition for is divisible by #7104

Open
wants to merge 23 commits into
base: dev/feature
Choose a base branch
from

Conversation

EquipableMC
Copy link
Contributor

Description

This PR simply adds a condition to check if a number is divisible by another number, without having to use the mod function.


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

Copy link
Member

@Efnilite Efnilite left a comment

Choose a reason for hiding this comment

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

and tests!

@EquipableMC
Copy link
Contributor Author

and tests!

😭 okay

@Romitou Romitou added the feature Pull request adding a new feature. label Sep 21, 2024
Copy link
Contributor

@Asleeepp Asleeepp left a comment

Choose a reason for hiding this comment

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

fix previous suggestion

Copy link
Contributor

@TenFont TenFont left a comment

Choose a reason for hiding this comment

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

I believe a negated version of the pattern should exist.
Something like if {_number} is not divisible by 8: should be possible.

@EquipableMC
Copy link
Contributor Author

I believe a negated version of the pattern should exist. Something like if {_number} is not divisible by 8: should be possible.

added!

Copy link
Member

@Pikachu920 Pikachu920 left a comment

Choose a reason for hiding this comment

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

yay english

Copy link
Member

@sovdeeth sovdeeth left a comment

Choose a reason for hiding this comment

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

tests failing

@EquipableMC
Copy link
Contributor Author

I do not understand why tests are failing, if someone can help point it out that would be nice

@TenFont
Copy link
Contributor

TenFont commented Sep 24, 2024

I do not understand why tests are failing, if someone can help point it out that would be nice

You should read the build logs

Failed:
  is divisible (on 2 environments)
    5 cannot be divided by 10! [CondIsDivisibleBy.sk, line 3] (on paper-1.20.6)
    5 cannot be divided by 10! [CondIsDivisibleBy.sk, line 3] (on paper-1.21.0)

@EquipableMC
Copy link
Contributor Author

I do not understand why tests are failing, if someone can help point it out that would be nice

You should read the build logs


Failed:

  is divisible (on 2 environments)

    5 cannot be divided by 10! [CondIsDivisibleBy.sk, line 3] (on paper-1.20.6)

    5 cannot be divided by 10! [CondIsDivisibleBy.sk, line 3] (on paper-1.21.0)

I have, it just doesn't tell me WHY it's failing.

Copy link
Contributor

@Phill310 Phill310 left a comment

Choose a reason for hiding this comment

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

Looks alright overall

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.

8 participants