Skript icon indicating copy to clipboard operation
Skript copied to clipboard

A Complete Portal Module

Open NotSoDelayed opened this issue 4 months ago • 0 comments

Problem

Skript is lacking a few portal related features, while some still consists of legacy code.

Solution

This PR adds some missing portal related features (refer to section below), enhances existing ones, and finally they all reunite into its a single module as part of modernizing Skript registrations.

Changes

  • Adds a new classinfo: PortalType -- an enum of portal types, to differentiate the portal type in all portal events (except 'portal exit') via event-portaltype
  • Adds support of 'End Gateway' into existing portal event
  • Adds event values into existing 'Portal Create' event: event-location, event-portaltype
  • Adds 'Portal Exit' event and its event values: (values inherited from EntityTeleportEvent), past event-vector, event-vector (mutable)
  • Renamed ExprPortal to ExprPortalBlocks due to former name was ambiguous
  • Optimizes existing portal related features to current Skript standards

Testing Completed

JUnit tests were implemented at EvtPortalTest.java and PortalTest.sk, covering every portal related events and expressions supported.

Supporting Information

At this date of PR creation, this PR was designed ahead of time with proposed Skript 2.14 standards, which includes dropping Spigot support and Minecraft versions below 1.21, which is why tests below 1.21 will fail.


Completes: none Related: none

NotSoDelayed avatar Sep 28 '25 10:09 NotSoDelayed