Skript icon indicating copy to clipboard operation
Skript copied to clipboard

Update visual effects

Open TPGamesNL opened this issue 4 years ago • 1 comments

Description

This change makes visual effects an expression instead of a literal, and it allows for multiple expressions in an effect's pattern. It also makes visual effects serializable again, which I broke in #3939. It also adds the last two 1.17 particles, and adds a size parameter to the dust particle.

TODO: https://discord.com/channels/135877399391764480/672553438936301568/1013094898284646461 EffVisualEffect init entity check

TODO: fix CondIsBlock priority first, mb UnparsedLiteral stuff too


Target Minecraft Versions: any Requirements: none Related Issues: #3939, #4070, #4196, #4381

TPGamesNL avatar Jun 27 '21 09:06 TPGamesNL

The reason the test fails, is because the condition air is a block is parsed as the CondCompare between air, the item type, and block, the class info. Without this change, Skript would also try to parse it as CondCompare, but between air (item type) and shield block, the visual effect, because the pattern is (block [with a shield]|shield block), matching block. But this fails because Skript can't compare an item type with a visual effect, so the whole CondCompare is thrown out and parsing continues, which eventually gets to CondIsBlock, the right condition. It can only parse this as a visual effect because visual effects are literals, but because this change makes visual effects expressions, this'll no longer happen, and it parses block as a class info, and Skript can compare an item type with a class info, so this is successful, and it is not parsed as CondIsBlock.

TPGamesNL avatar Jun 27 '21 19:06 TPGamesNL