SkriptLang / skript-aliases

Aliases for Skript
19 stars 33 forks source link

Suggestions #4

Open Blueyescat opened 6 years ago

Blueyescat commented 6 years ago

1

If an item type can be an item or a block in the same time, then there should be a required "block" suffix to get the block of that item type. And using the item type without a suffix or using with "item" suffix should get the item. For example:

redstone [dust] block¦s <- should return the block redstone [dust] [item¦s] <- should return the item

2

Item types with "any" prefix should exist, but not as an optional prefix because it just causes confusing/bugs. Normally written item names shouldn't return random items, it should return the natural block/item. For example:

lit redstone torch¦es = minecraft:redstone_torch
unlit redstone torch¦es = minecraft:unlit_redstone_torch
[any] redstone torch¦es = lit redstone torch, unlit redstone torch

The user would think when using redstone torch it will return unlit redstone torch like in inventories or when you place a redstone torch but it will return lit or unlit torch randomly.

But an item type with "any" prefix can return random items, there is no a problem. So it should be:

lit redstone torch¦es = minecraft:redstone_torch
[unlit] redstone torch¦es = minecraft:unlit_redstone_torch
any redstone torch¦es = lit redstone torch, unlit redstone torch

So when the user uses "redstone torch" it will return unlit redstone torch.

Another example can be any apple for the 3 types of apples but golden apple should return the normal golden apple. If the user wants enchanted golden apple, then will use enchanted golden apple.

So i say, make the aliases user friendly.

Syst3ms commented 6 years ago

I mostly agree, except that making torches unlit by default is just bad, since they are on by default.

Blueyescat commented 6 years ago

Oh i wrote it wrong, it should return lit redstone torch. But what if they want to use it as a block?

Blueyescat commented 6 years ago

I'm confused about that suggestion lol. I think Skript needs something to seperate blocks and items.

Syst3ms commented 6 years ago

Here the problem is kind of a consistency problem, which Spigot also has. When we say "cauldron", is it the item or the block? If it's the item, then we should have "cauldron block" alongside, and "cauldron item" otherwise

Snow-Pyon commented 6 years ago

Spigot adds the block suffix to every constant in the Material enum that is identifying a Block, so, I'd say we should do the same.

TheBentoBox commented 5 years ago

I agree with what was said here and I may make some changes to my aliases to reflect this. I'm personally a fan of any NOT being optional, I've done it in most of my aliases so far but that's to reflect old aliases since it was optional in a lot of them, at least at one point. But I think it's more clear to be able to say "If you want to refer to a whole category, use any". I also agree block should be part of the alias for any material whose Material enum entry uses block, even if we make it optional in the alias.