The Twilight Forest

The Twilight Forest

143M Downloads

Circumventing expected teleportation logic

Darkhax opened this issue ยท 4 comments

commented

Hello,

Sorry for not using your template. This issue doesn't really fit into the format you guys had set out. I have a mod called Dimension Stages. This mod allows access to dimensions to be completely restricted, until a custom condition set by the modpack has been met. My mod makes use of the EntityTravelToDimensionEvent to accomplish this. This event is normally fired by EntityPlayerMP#changeDimension(int dimension) however your teleporter block circumvents this method and does not call the event. Could you please use the correct method, or incorporate this event into your custom teleportation logic?

commented

You can't really use changeDimension for any custom dimensions, it has hardcoded cases for vanilla dimensions and doesn't let you supply your own teleporter.

It'd be nicer if the event was fired from a better place, but I don't know if that's feasible.

commented

Naw, sadly changeDimensions is SUPER vanilla specific, but I've added the event in the couple of places it was missed. Willie did add it under other circumstances, but not the main cases.

commented

Thanks for looking into the issue for me :)

commented

Still, we can add the event in easily enough for our teleport. I'll take a look at it tonight, time permitting.