Class AllPortalTracks
java.lang.Object
com.simibubi.create.content.trains.track.AllPortalTracks
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 -
Method Summary
Modifier and TypeMethodDescriptionstatic PortalTrackProvider.ExitfromPortal(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 voidRegisters default portal track integrations for built-in dimensions and mods.static voidtryRegisterIntegration(net.minecraft.resources.ResourceLocation id, PortalTrackProvider provider) Registers a portal track integration for a given block identified by itsResourceLocation, if it exists.
-
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 itsResourceLocation, 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)
-