本文整理汇总了Java中net.minecraft.server.PortalTravelAgent类的典型用法代码示例。如果您正苦于以下问题:Java PortalTravelAgent类的具体用法?Java PortalTravelAgent怎么用?Java PortalTravelAgent使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PortalTravelAgent类属于net.minecraft.server包,在下文中一共展示了PortalTravelAgent类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: findPortal
import net.minecraft.server.PortalTravelAgent; //导入依赖的package包/类
public Location findPortal(Location location) {
PortalTravelAgent pta = ((CraftWorld) location.getWorld()).getHandle().getTravelAgent();
ChunkCoordinates found = pta.findPortal(location.getX(), location.getY(), location.getZ(), this.getSearchRadius());
return found != null ? new Location(location.getWorld(), found.x, found.y, found.z, location.getYaw(), location.getPitch()) : null;
}
示例2: createPortal
import net.minecraft.server.PortalTravelAgent; //导入依赖的package包/类
public boolean createPortal(Location location) {
PortalTravelAgent pta = ((CraftWorld) location.getWorld()).getHandle().getTravelAgent();
return pta.createPortal(location.getX(), location.getY(), location.getZ(), this.getCreationRadius());
}
示例3: findPortal
import net.minecraft.server.PortalTravelAgent; //导入依赖的package包/类
@Override
public Location findPortal(Location location) {
PortalTravelAgent pta = ((CraftWorld) location.getWorld()).getHandle().getTravelAgent();
BlockPosition found = pta.findPortal(location.getX(), location.getY(), location.getZ(), this.getSearchRadius());
return found != null ? new Location(location.getWorld(), found.getX(), found.getY(), found.getZ(), location.getYaw(), location.getPitch()) : null;
}
示例4: createPortal
import net.minecraft.server.PortalTravelAgent; //导入依赖的package包/类
@Override
public boolean createPortal(Location location) {
PortalTravelAgent pta = ((CraftWorld) location.getWorld()).getHandle().getTravelAgent();
return pta.createPortal(location.getX(), location.getY(), location.getZ(), this.getCreationRadius());
}
示例5: findPortal
import net.minecraft.server.PortalTravelAgent; //导入依赖的package包/类
public Location findPortal(Location location) {
PortalTravelAgent pta = ((CraftWorld) location.getWorld()).getHandle().t(); // Should be getTravelAgent
ChunkCoordinates found = pta.findPortal(location.getX(), location.getY(), location.getZ(), this.getSearchRadius());
return found != null ? new Location(location.getWorld(), found.x, found.y, found.z, location.getYaw(), location.getPitch()) : null;
}
示例6: createPortal
import net.minecraft.server.PortalTravelAgent; //导入依赖的package包/类
public boolean createPortal(Location location) {
PortalTravelAgent pta = ((CraftWorld) location.getWorld()).getHandle().t();
return pta.createPortal(location.getX(), location.getY(), location.getZ(), this.getCreationRadius());
}
示例7: findPortal
import net.minecraft.server.PortalTravelAgent; //导入依赖的package包/类
public Location findPortal(Location location) {
PortalTravelAgent pta = ((CraftWorld) location.getWorld()).getHandle().s();
ChunkCoordinates found = pta.findPortal(location.getX(), location.getY(), location.getZ(), this.getSearchRadius());
return found != null ? new Location(location.getWorld(), found.x, found.y, found.z, location.getYaw(), location.getPitch()) : null;
}
示例8: createPortal
import net.minecraft.server.PortalTravelAgent; //导入依赖的package包/类
public boolean createPortal(Location location) {
PortalTravelAgent pta = ((CraftWorld) location.getWorld()).getHandle().s();
return pta.createPortal(location.getX(), location.getY(), location.getZ(), this.getCreationRadius());
}