Skript icon indicating copy to clipboard operation
Skript copied to clipboard

Update passengers and vehicles

Open TheLimeGlass opened this issue 3 years ago • 1 comments

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 vehicle and passenger[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 ride entity 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

TheLimeGlass avatar Jan 02 '23 20:01 TheLimeGlass

Tests failing

sovdeeth avatar Mar 19 '24 19:03 sovdeeth

closing due to inactivity

sovdeeth avatar Sep 15 '24 20:09 sovdeeth

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.

TheLimeGlass avatar Sep 16 '24 05:09 TheLimeGlass

Closing due to tests failing for 5 months

sovdeeth avatar Jun 03 '25 04:06 sovdeeth

Reopen this pull request, and please get the team to do some reviews

TheLimeGlass avatar Jun 03 '25 17:06 TheLimeGlass

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.

sovdeeth avatar Jun 03 '25 18:06 sovdeeth