本文整理汇总了Java中net.minecraftforge.common.ForgeDirection.SOUTH属性的典型用法代码示例。如果您正苦于以下问题:Java ForgeDirection.SOUTH属性的具体用法?Java ForgeDirection.SOUTH怎么用?Java ForgeDirection.SOUTH使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类net.minecraftforge.common.ForgeDirection
的用法示例。
在下文中一共展示了ForgeDirection.SOUTH属性的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: canPlaceFood
private boolean canPlaceFood(TileEntityRoast tile, EntityPlayer player, int i)
{
ForgeDirection tileFace = BlockClickHelper.FD[tile.direction];
ForgeDirection face = ForgeDirection.getOrientation(i);
if(player.isSneaking())return false;
if(tileFace == ForgeDirection.NORTH || tileFace == ForgeDirection.SOUTH)
{
return face == ForgeDirection.NORTH || face == ForgeDirection.SOUTH;
}
if(tileFace == ForgeDirection.EAST || tileFace == ForgeDirection.WEST)
{
return face == ForgeDirection.EAST || face == ForgeDirection.WEST;
}
return false;
}
示例2: getFacing
public ForgeDirection getFacing()
{
TileEntityBellows bellows = (TileEntityBellows)worldObj.getBlockTileEntity(xCoord, yCoord, zCoord);
if(bellows == null)
return null;
int dir = bellows.direction;
switch(dir)//clockwise
{
case 0: //SOUTH
return ForgeDirection.SOUTH;
case 1: //WEST
return ForgeDirection.WEST;
case 2: //NORTH
return ForgeDirection.NORTH;
case 3: //EAST
return ForgeDirection.EAST;
}
return ForgeDirection.SOUTH;
}
示例3: getFront
/**
* Gets the direction the face is at(Opposite to the placer)
*/
public ForgeDirection getFront()
{
if(direction == 0)//SOUTH PLACE
{
return ForgeDirection.NORTH;
}
if(direction == 1)//WEST PLACE
{
return ForgeDirection.EAST;
}
if(direction == 2)//NORTH PLACE
{
return ForgeDirection.SOUTH;
}
if(direction == 3)//EAST PLACE
{
return ForgeDirection.WEST;
}
return ForgeDirection.UNKNOWN;
}
示例4: getBack
/**
* Gets the direction the back is facing (Same dir as placer)
*/
public ForgeDirection getBack()
{
if(direction == 0)//SOUTH PLACE
{
return ForgeDirection.SOUTH;
}
if(direction == 1)//WEST PLACE
{
return ForgeDirection.WEST;
}
if(direction == 2)//NORTH PLACE
{
return ForgeDirection.NORTH;
}
if(direction == 3)//EAST PLACE
{
return ForgeDirection.EAST;
}
return ForgeDirection.UNKNOWN;
}
示例5: getLeft
/**
* Gets the direction the left is facing
*/
public ForgeDirection getLeft()
{
if(direction == 0)//SOUTH PLACE
{
return ForgeDirection.WEST;
}
if(direction == 1)//WEST PLACE
{
return ForgeDirection.NORTH;
}
if(direction == 2)//NORTH PLACE
{
return ForgeDirection.EAST;
}
if(direction == 3)//EAST PLACE
{
return ForgeDirection.SOUTH;
}
return ForgeDirection.UNKNOWN;
}
示例6: getRight
/**
* Gets the direction the right is facing
*/
public ForgeDirection getRight()
{
if(direction == 0)//SOUTH PLACE
{
return ForgeDirection.EAST;
}
if(direction == 1)//WEST PLACE
{
return ForgeDirection.SOUTH;
}
if(direction == 2)//NORTH PLACE
{
return ForgeDirection.WEST;
}
if(direction == 3)//EAST PLACE
{
return ForgeDirection.NORTH;
}
return ForgeDirection.UNKNOWN;
}
示例7: getLeftSide
private ForgeDirection getLeftSide()
{
switch(direction)
{
case 0:
return ForgeDirection.EAST;
case 1:
return ForgeDirection.SOUTH;
case 2:
return ForgeDirection.WEST;
case 3:
return ForgeDirection.NORTH;
}
return ForgeDirection.UNKNOWN;
}
示例8: getRightSide
private ForgeDirection getRightSide()
{
switch(direction)
{
case 0:
return ForgeDirection.WEST;
case 1:
return ForgeDirection.NORTH;
case 2:
return ForgeDirection.EAST;
case 3:
return ForgeDirection.SOUTH;
}
return ForgeDirection.UNKNOWN;
}
示例9: getFacing
public ForgeDirection getFacing()
{
switch(direction)
{
case 2:
return ForgeDirection.NORTH;
case 3:
return ForgeDirection.SOUTH;
case 5:
return ForgeDirection.EAST;
case 4:
return ForgeDirection.WEST;
}
return ForgeDirection.NORTH;
}
示例10: getBack
public ForgeDirection getBack()
{
switch(direction)
{
case 2:
return ForgeDirection.SOUTH;
case 3:
return ForgeDirection.NORTH;
case 5:
return ForgeDirection.WEST;
case 4:
return ForgeDirection.EAST;
}
return ForgeDirection.NORTH;
}
示例11: getLeft
public ForgeDirection getLeft()
{
switch(direction)
{
case 2:
return ForgeDirection.WEST;
case 3:
return ForgeDirection.EAST;
case 5:
return ForgeDirection.NORTH;
case 4:
return ForgeDirection.SOUTH;
}
return ForgeDirection.NORTH;
}
示例12: getRight
public ForgeDirection getRight()
{
switch(direction)
{
case 2:
return ForgeDirection.EAST;
case 3:
return ForgeDirection.WEST;
case 5:
return ForgeDirection.SOUTH;
case 4:
return ForgeDirection.NORTH;
}
return ForgeDirection.NORTH;
}
示例13: getFacing
private ForgeDirection getFacing() {
switch(direction)//clockwise
{
case 0: //SOUTH
return ForgeDirection.SOUTH;
case 1: //WEST
return ForgeDirection.WEST;
case 2: //NORTH
return ForgeDirection.NORTH;
case 3: //EAST
return ForgeDirection.EAST;
}
return ForgeDirection.SOUTH;
}
示例14: DirectionTo
/**
* Will Return NULL if it's at some diagonal!
*/
public ForgeDirection DirectionTo(WorldCoord loc)
{
int ox = x - loc.x;
int oy = y - loc.y;
int oz = z - loc.z;
int xlen = Math.abs( ox );
int ylen = Math.abs( oy );
int zlen = Math.abs( oz );
if ( loc.isEqual( this.copy().add( ForgeDirection.EAST, xlen ) ) )
return ForgeDirection.EAST;
if ( loc.isEqual( this.copy().add( ForgeDirection.WEST, xlen ) ) )
return ForgeDirection.WEST;
if ( loc.isEqual( this.copy().add( ForgeDirection.NORTH, zlen ) ) )
return ForgeDirection.NORTH;
if ( loc.isEqual( this.copy().add( ForgeDirection.SOUTH, zlen ) ) )
return ForgeDirection.SOUTH;
if ( loc.isEqual( this.copy().add( ForgeDirection.UP, ylen ) ) )
return ForgeDirection.UP;
if ( loc.isEqual( this.copy().add( ForgeDirection.DOWN, ylen ) ) )
return ForgeDirection.DOWN;
return null;
}
示例15: maintainSoil
private boolean maintainSoil(int x, int y, int z, ForgeDirection direction, int extent) {
for(int i = 0; i < extent; i++) {
Vect position = translateWithOffset(x, y, z, direction, i);
if(!isAirBlock(position)
&& !Utils.isReplaceableBlock(world, position.x, position.y, position.z)) {
ItemStack block = getAsItemStack(position);
if(isWaste(block) && housing.hasResources(resource)) {
produce.addAll(Block.blocksList[block.itemID].getBlockDropped(world, x, y, z, block.itemID, 0));
setBlock(position, 0, 0);
return trySetSoil(position);
}
continue;
}
if(isManual)
continue;
if(i % 2 != 0) {
ForgeDirection cclock = ForgeDirection.EAST;
if(direction == ForgeDirection.EAST)
cclock = ForgeDirection.SOUTH;
else if(direction == ForgeDirection.SOUTH)
cclock = ForgeDirection.EAST;
else if(direction == ForgeDirection.WEST)
cclock = ForgeDirection.SOUTH;
Vect previous = translateWithOffset(position.x, position.y, position.z, cclock, 1);
ItemStack soil = getAsItemStack(previous);
if(!ground[0].isItemEqual(soil))
trySetSoil(position);
continue;
}
return trySetSoil(position);
}
return false;
}