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

Add PropertyType.SHOULD #6404

Open
1 task done
ghost opened this issue Feb 5, 2024 · 7 comments
Open
1 task done

Add PropertyType.SHOULD #6404

ghost opened this issue Feb 5, 2024 · 7 comments
Labels
enhancement Feature request, an issue about something that could be improved, or a PR improving something. up for debate When the decision is yet to be debated on the issue in question

Comments

@ghost
Copy link

ghost commented Feb 5, 2024

Suggestion

There should be a SHOULD Type in PropertyType for property conditions, for example for the condition shouldBurnInDay().

Why?

Instead of making a normal Condition and doing all the extra stuff, a PropertyType.SHOULD would be useful for making small conditions; the patterns could be something like
%type% should %property%
%type% should(n't| not) %property%

Other

No response

Agreement

  • I have read the guidelines above and affirm I am following them with this suggestion.
@ghost ghost mentioned this issue Feb 5, 2024
@AyhamAl-Ali
Copy link
Member

IMO will does the job well, even the description of that class says will burn in the sunlight.

@AyhamAl-Ali AyhamAl-Ali added enhancement Feature request, an issue about something that could be improved, or a PR improving something. up for debate When the decision is yet to be debated on the issue in question labels Feb 5, 2024
@Fusezion
Copy link
Contributor

Fusezion commented Feb 5, 2024

Personally I'm open for should to be added while I do like will both make sense and might be possible to combine them as they target future states.

if %livingentity% will burn in sunlight
if projectile will consume item

if %livingentity% should burn in sunlight
if projectile should consume item

@TheLimeGlass
Copy link
Collaborator

It's similar issue to boolean expressions #5219

@EquipableMC
Copy link
Contributor

Personally I'm open for should to be added while I do like will both make sense and might be possible to combine them as they target future states.

if %livingentity% will burn in sunlight
if projectile will consume item

if %livingentity% should burn in sunlight
if projectile should consume item

if project should consume item how does that work?

@sovdeeth
Copy link
Member

I'm also of the opinion that will is a better way to say the same thing. Should is kind of wishy washy and doesn't make any exact claims. Will does the same jobs make is clear on exactly what will happen, so it's more explicit.

@Fusezion
Copy link
Contributor

I am still for should to be added, it's used in java method naming and makes sense, however as I said prior there's still the option to just merge should into will. if zombie will burn and if zombie should burn both work and the method naming is shouldBurnInDay

@AyhamAl-Ali
Copy link
Member

should sounds like an effect statement rather than condition

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature request, an issue about something that could be improved, or a PR improving something. up for debate When the decision is yet to be debated on the issue in question
Projects
None yet
Development

No branches or pull requests

5 participants