本文整理汇总了Java中appeng.api.util.DimensionalCoord.getWorld方法的典型用法代码示例。如果您正苦于以下问题:Java DimensionalCoord.getWorld方法的具体用法?Java DimensionalCoord.getWorld怎么用?Java DimensionalCoord.getWorld使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类appeng.api.util.DimensionalCoord
的用法示例。
在下文中一共展示了DimensionalCoord.getWorld方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: 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);
}
示例3: 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;
}