当前位置: 首页>>代码示例>>Java>>正文


Java DimensionalCoord类代码示例

本文整理汇总了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 );

}
 
开发者ID:Nividica,项目名称:ThaumicEnergistics,代码行数:20,代码来源:VisProviderProxy.java

示例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 );
}
 
开发者ID:Nividica,项目名称:ThaumicEnergistics,代码行数:28,代码来源:WirelessAELink.java

示例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);
}
 
开发者ID:xbony2,项目名称:Nuclear-Control,代码行数:14,代码来源:TileEntityNetworkLink.java

示例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;
}
 
开发者ID:Nividica,项目名称:ThaumicEnergistics,代码行数:45,代码来源:DigiVisSourceData.java

示例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 ) );
}
 
开发者ID:Nividica,项目名称:ThaumicEnergistics,代码行数:23,代码来源:WirelessAELink.java

示例6: getLocation

import appeng.api.util.DimensionalCoord; //导入依赖的package包/类
@Override
@Optional.Method(modid = ModIds.AE2)
public DimensionalCoord getLocation(){
    return new DimensionalCoord(world, getPos());
}
 
开发者ID:TeamPneumatic,项目名称:pnc-repressurized,代码行数:6,代码来源:SemiBlockRequester.java

示例7: getLocation

import appeng.api.util.DimensionalCoord; //导入依赖的package包/类
@Override
public DimensionalCoord getLocation() {

    return new DimensionalCoord(getWorld(), getX(), getY(), getZ());
}
 
开发者ID:amadornes,项目名称:Framez,代码行数:6,代码来源:MotorModifierAE2.java

示例8: getLocation

import appeng.api.util.DimensionalCoord; //导入依赖的package包/类
@Override
public DimensionalCoord getLocation() {
    return new DimensionalCoord( this );
}
 
开发者ID:xbony2,项目名称:Nuclear-Control,代码行数:5,代码来源:TileEntityNetworkLink.java

示例9: getLocation

import appeng.api.util.DimensionalCoord; //导入依赖的package包/类
@Override
public DimensionalCoord getLocation() {
	return new DimensionalCoord(this);
}
 
开发者ID:austinv11,项目名称:PeripheralsPlusPlus,代码行数:5,代码来源:TileEntityMEBridge.java

示例10: getLocation

import appeng.api.util.DimensionalCoord; //导入依赖的package包/类
/**
 * Gets the location of the part.
 */
@Override
public DimensionalCoord getLocation()
{
	return this.part.getLocation();
}
 
开发者ID:Nividica,项目名称:ThaumicEnergistics,代码行数:9,代码来源:AEPartGridBlock.java

示例11: getLocation

import appeng.api.util.DimensionalCoord; //导入依赖的package包/类
@Override
public DimensionalCoord getLocation()
{
	return new DimensionalCoord( this );
}
 
开发者ID:Nividica,项目名称:ThaumicEnergistics,代码行数:6,代码来源:TileArcaneAssembler.java

示例12: getLocation

import appeng.api.util.DimensionalCoord; //导入依赖的package包/类
@Override
@Optional.Method(modid = ModIds.AE2)
public DimensionalCoord getLocation(){
    return new DimensionalCoord(world, getX(), getY(), getZ());
}
 
开发者ID:MineMaarten,项目名称:PneumaticCraft,代码行数:6,代码来源:SemiBlockRequester.java

示例13: getLocation

import appeng.api.util.DimensionalCoord; //导入依赖的package包/类
@Override
public DimensionalCoord getLocation()
{
    return new DimensionalCoord(this);
}
 
开发者ID:Dynious,项目名称:RefinedRelocation,代码行数:6,代码来源:TileMESortingInterface.java

示例14: getMin

import appeng.api.util.DimensionalCoord; //导入依赖的package包/类
/**
 * @return the minimum anchor point for the spatial region.
 */
DimensionalCoord getMin();
 
开发者ID:amadornes,项目名称:Framez,代码行数:5,代码来源:ISpatialCache.java

示例15: getMax

import appeng.api.util.DimensionalCoord; //导入依赖的package包/类
/**
 * @return the maximum anchor point for the spatial region.
 */
DimensionalCoord getMax();
 
开发者ID:amadornes,项目名称:Framez,代码行数:5,代码来源:ISpatialCache.java


注:本文中的appeng.api.util.DimensionalCoord类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。