Allow ITeleporter to override the vanilla teleport sound (#7682)

This commit is contained in:
Take Weiland authored and GitHub committed 2021-03-15 14:02:20 -07:00
1 parent 2a0d9e8dac
commit 7379e8b9a4
2 files changed
+19 -1

No files matched your search

@@ -91,4 +91,17 @@ public interface ITeleporter
{
return this.getClass() == Teleporter.class;
}
/**
* Called when vanilla wants to play the portal sound after teleporting. Return true to play the vanilla sound.
* @param player the player
* @param sourceWorld the source world
* @param destWorld the target world
* @return true to play the vanilla sound
*/
default boolean playTeleportSound(ServerPlayerEntity player, ServerWorld sourceWorld, ServerWorld destWorld)
{
return true;
}
}