Skript
Skript copied to clipboard
ExprDirection - deep cleaning
Description
This pr is a continuation of #6626 along side fixing my mistake in it. This pr now target dev/feature as that should be the next release and allowed me to remove some patterns I found in poor taste.
Test is possibly a bit too excessive however with direction being a huge part in skript ensuring nothing breaks is important as such not only is there testing in action but also use of parse
section ensuring patterns are passing and not randomly breaking down. Sadly the parse section is a huge hinder at the same time as it doesn't explicitly state the line number that errored only the error. So if a test breaks and the error is something like "cannnot use variables here" loading on the test server is kind of needed.
Unlike the previous pr this one makes use of the Patterns
class instead to handle pattern splitting, patterns using BlockFace.SELF
are both technically correct and incorrect sadly since the class refuses to accept null
as a value and will throw a stack trace I am forced into that decision.
ENTITY TESTING I was unable to think of a safe way to do entity test that ensure there's never a possibility in the entity turning causing a slight offset of locations. As such only block test were included if you have any ideas on how to test entities without unforeseen failures please give me feedback.
Target Minecraft Versions: any Requirements: none Related Issues: none
Re: tests, you can do all the testing in one tick, no time for the entity to turn.
Converting to draft, due to health issues arising and being unsure how much freetime I'll have during the next week or longer.
Closing this pr due to lack of interest in prs and not fully enjoying the direction I went here, if anything I'd like to look more into an enum for direction in the pattern vs. hardcoded spots, readability even split was still very poor for things like north east
, and north west
. Enums had a much better system enabling the pattern but also being clearly documented imo.