minecraft-src/net/minecraft/world/level/block/Portal.java
2025-07-04 02:00:41 +03:00

25 lines
645 B
Java

package net.minecraft.world.level.block;
import net.minecraft.core.BlockPos;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.level.portal.TeleportTransition;
import org.jetbrains.annotations.Nullable;
public interface Portal {
default int getPortalTransitionTime(ServerLevel level, Entity entity) {
return 0;
}
@Nullable
TeleportTransition getPortalDestination(ServerLevel serverLevel, Entity entity, BlockPos blockPos);
default Portal.Transition getLocalTransition() {
return Portal.Transition.NONE;
}
public static enum Transition {
CONFUSION,
NONE;
}
}