Class RiftControl
java.lang.Object
net.ixdarklord.coolcatcanvas.api.vfx.RiftControl
Rifts from the server (the client side is
WorldRifts). The server names a rift the clients registered;
each client runs its three acts, sounds included, on its own.
RiftControl.open(level, RiftControl.DEFAULT, pos, 100); // closes by itself after five seconds open
UUID rift = RiftControl.open(level, MyMod.id("ember_rift"), pos); // stays...
RiftControl.close(level, rift); // ...until closed
A rift is not an entity and is not saved: a player who comes into range, or logs in, after it opened does not see
it. For one that must last, open it again for them, or give it to something that already syncs.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final net.minecraft.resources.ResourceLocationThe rift every client has: a violet tear with vanilla's portal sounds.static final double -
Method Summary
Modifier and TypeMethodDescriptionstatic voidCloses a rift for everyone in the level who has it.static UUIDopen(net.minecraft.server.level.ServerLevel level, net.minecraft.resources.ResourceLocation spec, net.minecraft.world.phys.Vec3 position) Opens a rift that stays untilclose(net.minecraft.server.level.ServerLevel, java.util.UUID).static UUIDopen(net.minecraft.server.level.ServerLevel level, net.minecraft.resources.ResourceLocation spec, net.minecraft.world.phys.Vec3 position, int openTicks) Opens a rift for everyone withinDEFAULT_RANGEof it.
-
Field Details
-
DEFAULT
public static final net.minecraft.resources.ResourceLocation DEFAULTThe rift every client has: a violet tear with vanilla's portal sounds. -
DEFAULT_RANGE
public static final double DEFAULT_RANGE- See Also:
-
-
Method Details
-
open
public static UUID open(net.minecraft.server.level.ServerLevel level, net.minecraft.resources.ResourceLocation spec, net.minecraft.world.phys.Vec3 position) Opens a rift that stays untilclose(net.minecraft.server.level.ServerLevel, java.util.UUID). Returns the id to close it with. -
open
public static UUID open(net.minecraft.server.level.ServerLevel level, net.minecraft.resources.ResourceLocation spec, net.minecraft.world.phys.Vec3 position, int openTicks) Opens a rift for everyone withinDEFAULT_RANGEof it.- Parameters:
openTicks- how long it stays fully open before closing by itself; negative for untilclose(net.minecraft.server.level.ServerLevel, java.util.UUID)
-
close
Closes a rift for everyone in the level who has it.
-