Update passengers and vehicles
Description
Update passengers and vehicles. The version control was missed when we removed everything under 1.13. Multiple passenger support is 1.9 and 1.12 in Spigot for some event.
- Updates time states to be proper and updated number references to EventValues.TIME_PAST etc.
- Optimizations.
- Code update and proper formatting.
- Adds CondHasPassengers for checking passengers.
- Adds entity support to isEmpty because Spigot has Entity#isEmpty to check if the entity is empty like a minecart.
- Makes
vehicleandpassenger[s]default expressions so you can use them in vehicle events. - Removes all older than 1.12 things in favor of multiple passengers.
- Added support for last spawned entity in the make ride effect because if it's an entity data, that entity data will be spawned.
- Renamed ExprPassenger to ExprPassengers.
- If any of the passengers or vehicles contained null values, Skript could have errored. No clue how this never got reported.
- You cannot set the vehicle of multiple entities, they should be using the passengers of expression. That's like stuffing 10 villagers in a minecart, it makes no sense.
- Added many tests to test against the newly added/updated syntaxes. Note we can't check if the entity is riding the forced
make rideentity as that takes another tick. Something we need the JUnit test pull request for to be able to delay.
Target Minecraft Versions: any Requirements: none Related Issues: non closing isEmpty https://github.com/SkriptLang/Skript/issues/4185
Tests failing
closing due to inactivity
Conflicts were rough. Can we please get this merged soon to avoid more conflicts?
The current class present on master was importing the org.bukkit.event.entity.EntityMountEvent which was throwing an exception for not existing on older versions.
Closing due to tests failing for 5 months
Reopen this pull request, and please get the team to do some reviews
Reopen this pull request, and please get the team to do some reviews
There's not much point in reviewing something that doesn't pass tests. I can reopen it if you intend to fix the tests, but since it's on a skriptlang branch I suggest you instead open a version from a branch on your own fork.