fabric icon indicating copy to clipboard operation
fabric copied to clipboard

[Suggestion] Add an entity/player teleport event

Open TelepathicGrunt opened this issue 2 years ago • 1 comments

Much like the teleporting event on Forge that fires for changeDimension (entity) or teleportTo (serverplayer), this allows mods to be able to block teleporting to a disallowed dimension.

Example use case: https://www.curseforge.com/minecraft/mc-mods/restricted-portals

My mod has a custom teleporting system and I am able to call the Forge event to be compatible with the above mod much better. On Fabric, the lack of an equivalent event means I need to do direct mod compat by calling Restricted Portal's code in my mod.

Ideally for 1.19.2+

TelepathicGrunt avatar Sep 01 '23 12:09 TelepathicGrunt

I'd like to see this feature as well.

AndiLeni avatar May 09 '24 08:05 AndiLeni

Already implemented https://github.com/FabricMC/fabric/blob/efd7c830ae75ef1af97b3e94c33a02312663d0cb/fabric-entity-events-v1/src/main/java/net/fabricmc/fabric/api/entity/event/v1/ServerEntityWorldChangeEvents.java#L31

maityyy avatar Nov 09 '25 11:11 maityyy