Class AllPortalTracks

java.lang.Object
com.simibubi.create.content.trains.track.AllPortalTracks

public class AllPortalTracks extends Object
Manages portal track integrations for various dimensions and mods within the Create mod.

Portals must be entered from the side and must lead to a different dimension than the one entered from. This class handles the registration and functionality of portal tracks for standard and modded portals.

  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    fromPortal(net.minecraft.server.level.ServerLevel level, net.createmod.catnip.math.BlockFace inboundTrack, net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> firstDimension, net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> secondDimension, net.minecraft.world.level.block.Portal portal)
     
    static void
    Registers default portal track integrations for built-in dimensions and mods.
    static void
    tryRegisterIntegration(net.minecraft.resources.ResourceLocation id, PortalTrackProvider provider)
    Registers a portal track integration for a given block identified by its ResourceLocation, if it exists.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • AllPortalTracks

      public AllPortalTracks()
  • Method Details

    • tryRegisterIntegration

      public static void tryRegisterIntegration(net.minecraft.resources.ResourceLocation id, PortalTrackProvider provider)
      Registers a portal track integration for a given block identified by its ResourceLocation, if it exists. If it does not, a warning will be logged.
      Parameters:
      id - The resource location of the portal block.
      provider - The portal track provider for the block.
    • registerDefaults

      public static void registerDefaults()
      Registers default portal track integrations for built-in dimensions and mods. This includes the Nether, the Aether (if loaded) and the end (if betterend is loaded).
    • fromPortal

      public static PortalTrackProvider.Exit fromPortal(net.minecraft.server.level.ServerLevel level, net.createmod.catnip.math.BlockFace inboundTrack, net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> firstDimension, net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> secondDimension, net.minecraft.world.level.block.Portal portal)