本文整理汇总了Java中appeng.api.util.DimensionalCoord类的典型用法代码示例。如果您正苦于以下问题:Java DimensionalCoord类的具体用法?Java DimensionalCoord怎么用?Java DimensionalCoord使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DimensionalCoord类属于appeng.api.util包,在下文中一共展示了DimensionalCoord类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: VisProviderProxy
import appeng.api.util.DimensionalCoord; //导入依赖的package包/类
public VisProviderProxy( final PartVisInterface parent )
{
// Set the interface
this.visInterface = parent;
// Get the location of the interface
DimensionalCoord aeCoords = this.visInterface.getLocation();
// Get the direction the interface is facing
ForgeDirection face = this.visInterface.getSide();
// Set the subtile's position to just infront of the interface.
this.xCoord = aeCoords.x + face.offsetX;
this.yCoord = aeCoords.y + face.offsetY;
this.zCoord = aeCoords.z + face.offsetZ;
this.worldObj = aeCoords.getWorld();
this.location = new WorldCoordinates( this.xCoord, this.yCoord, this.zCoord, this.worldObj.provider.dimensionId );
}
示例2: isAPInRange
import appeng.api.util.DimensionalCoord; //导入依赖的package包/类
/**
* Checks if the AP at the specified location and has the specified range,
* is close enough to communicate with.
*
* @param APLocation
* @param APRange
* @param world
* @param x
* @param y
* @param z
* @return
*/
private static boolean isAPInRange( final DimensionalCoord APLocation, final double APRange, final World world, final int x, final int y,
final int z )
{
// Is the AP in the same world?
if( !APLocation.isInWorld( world ) )
{
return false;
}
// Calculate the square distance
double squareDistance = getSquaredDistanceFromAP( APLocation, x, y, z );
// Return if close enough to use AP
return squareDistance <= ( APRange * APRange );
}
示例3: getBaseTileEntity
import appeng.api.util.DimensionalCoord; //导入依赖的package包/类
private static TileEntity getBaseTileEntity(DimensionalCoord coord){
if(coord == null) {
NCLog.fatal("Coord is null");
return null;
}
World world = coord.getWorld();
if(world == null) {
NCLog.fatal("World is null?");
return null;
}
// NCLog.fatal("RETURNED Safely");
return world.getTileEntity(coord.x, coord.y, coord.z);
}
示例4: DigiVisSourceData
import appeng.api.util.DimensionalCoord; //导入依赖的package包/类
/**
* Creates the data from a digivis source.
*
* @param digiVisSource
*/
public DigiVisSourceData( final IDigiVisSource digiVisSource )
{
// Init the data fields.
this.clearData();
// Ensure there is a source.
if( digiVisSource == null )
{
// No source
return;
}
// Get the source location
DimensionalCoord sourceLocation = digiVisSource.getLocation();
// Ensure the location is valid.
if( sourceLocation == null )
{
// Invalid location
return;
}
// Get the world id
this.worldID = sourceLocation.getWorld().provider.dimensionId;
// Get the x,y,z
this.x = sourceLocation.x;
this.y = sourceLocation.y;
this.z = sourceLocation.z;
// Get the side
this.side = digiVisSource.getSide();
// Get the UID
this.UID = digiVisSource.getUID();
// Set that we have data
this.hasData = true;
}
示例5: getSquaredDistanceFromAP
import appeng.api.util.DimensionalCoord; //导入依赖的package包/类
/**
* Returns the squared distance the specified coords are from the Access Point.
*
* @param locationAP
* @param x
* @param y
* @param z
* @return
*/
protected static double getSquaredDistanceFromAP( final DimensionalCoord locationAP, final int x, final int y, final int z )
{
if( locationAP == null )
{
return Double.MAX_VALUE;
}
// Calculate the distance from the AP
int dX = locationAP.x - x, dY = locationAP.y - y, dZ = locationAP.z - z;
// Calculate the square distance
return( ( dX * dX ) + ( dY * dY ) + ( dZ * dZ ) );
}
示例6: getLocation
import appeng.api.util.DimensionalCoord; //导入依赖的package包/类
@Override
@Optional.Method(modid = ModIds.AE2)
public DimensionalCoord getLocation(){
return new DimensionalCoord(world, getPos());
}
示例7: getLocation
import appeng.api.util.DimensionalCoord; //导入依赖的package包/类
@Override
public DimensionalCoord getLocation() {
return new DimensionalCoord(getWorld(), getX(), getY(), getZ());
}
示例8: getLocation
import appeng.api.util.DimensionalCoord; //导入依赖的package包/类
@Override
public DimensionalCoord getLocation() {
return new DimensionalCoord( this );
}
示例9: getLocation
import appeng.api.util.DimensionalCoord; //导入依赖的package包/类
@Override
public DimensionalCoord getLocation() {
return new DimensionalCoord(this);
}
示例10: getLocation
import appeng.api.util.DimensionalCoord; //导入依赖的package包/类
/**
* Gets the location of the part.
*/
@Override
public DimensionalCoord getLocation()
{
return this.part.getLocation();
}
示例11: getLocation
import appeng.api.util.DimensionalCoord; //导入依赖的package包/类
@Override
public DimensionalCoord getLocation()
{
return new DimensionalCoord( this );
}
示例12: getLocation
import appeng.api.util.DimensionalCoord; //导入依赖的package包/类
@Override
@Optional.Method(modid = ModIds.AE2)
public DimensionalCoord getLocation(){
return new DimensionalCoord(world, getX(), getY(), getZ());
}
示例13: getLocation
import appeng.api.util.DimensionalCoord; //导入依赖的package包/类
@Override
public DimensionalCoord getLocation()
{
return new DimensionalCoord(this);
}
示例14: getMin
import appeng.api.util.DimensionalCoord; //导入依赖的package包/类
/**
* @return the minimum anchor point for the spatial region.
*/
DimensionalCoord getMin();
示例15: getMax
import appeng.api.util.DimensionalCoord; //导入依赖的package包/类
/**
* @return the maximum anchor point for the spatial region.
*/
DimensionalCoord getMax();