Spatial Transformation


Spatial Transformation

A portal is a window linking to a transformed space. The spacial transformation can be translation, rotation, scale and mirroring.

This mod's teleportation is eye-based. If an entity goes through a portal, it will calculate the entity's eye position transformed by the portal and then place the entity by the transformed eye position.

Rotation Transformation

rotation.png

Commands related to rotation

Teleportation

After crossing a portal with rotation transformation, the player's camera may be tilted. Then the camera rotation will smoothly turn into a valid state.

This mod has special compatibility with Gravity Changer mod. With Gravity Changer mod, if you enable teleportChangesGravity to a portal, then your gravity direction will be automatically changed when crossing the portal. (teleportChangesGravity is disabled by default.)

About Gravity Changer Mod

The original Gravity Changer mod by Gaider10 (Andrew)open in new window. Gaider10 (Andrew) stopped maintaining it.

In 1.18.2 you can use my fork of Gravity Changeropen in new window .

In 1.19.2, iPortal is compatible with Gravity APIopen in new window .

In 1.19.4 and 1.20.1, use my fork of Gravity APIopen in new window . (Note: in 1.20.1 ImmPtl is no longer compatible with Gravity API. A Fabric mod cannot depend on a Quilt mod.)

Scale Transformation

image.png

Commands related to scaling

Teleportation

Start from MC 1.21.1, this mod will use a modifier iportal:scaling to the entity attribute minecraft:generic.scale to do entity scaling. You can remove the scaling caused by portal using command /attribute @s minecraft:generic.scale modifier remove iportal:scaling. Going through portal won't change the base scale.

Whether to scale the entity going through portal is controlled by portal data teleportationChangesScale. (it is enabled by default)

Before MC 1.21.1, this mod has special compatibility with Pehkui modopen in new window. With Pehkui mod, if a player or an entity goes through a portal with scale transformation, it will be scaled.

Mirror Transformation

Mirrors.

Teleportation

Mirrors do not allow teleportation. Because when the player goes into a mirror, the player itself should get mirrored. Currently there is no mod that provides the functionality of mirroring the player (imagine that the right hand appear on the left and turning right actually turns left).

However, you can create a fake-enterable mirror, by using command /portal turn_into_fake_enterable_mirror on a normal portal. Details about that command.