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


Java ForgeDirection.WEST属性代码示例

本文整理汇总了Java中net.minecraftforge.common.ForgeDirection.WEST属性的典型用法代码示例。如果您正苦于以下问题:Java ForgeDirection.WEST属性的具体用法?Java ForgeDirection.WEST怎么用?Java ForgeDirection.WEST使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在net.minecraftforge.common.ForgeDirection的用法示例。


在下文中一共展示了ForgeDirection.WEST属性的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;
}
 
开发者ID:TheAwesomeGem,项目名称:MineFantasy,代码行数:17,代码来源:BlockRoast.java

示例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;
}
 
开发者ID:TheAwesomeGem,项目名称:MineFantasy,代码行数:19,代码来源:TileEntityBellows.java

示例3: getSlotFor

public int getSlotFor(float x, float y) 
{
	ForgeDirection FD = BlockClickHelper.FD[direction];
	
	float offset = 1F/16F;
	
	float x1 = 0.0F + offset;
	float x2 = 1.0F - offset;
	float y1 = 0.0F;
	float y2 = 1.0F;
	if(FD == ForgeDirection.EAST || FD == ForgeDirection.WEST)
	{
		x1 = 0.0F;
		x2 = 1.0F;
		y1 = 0.0F + offset;
		y2 = 1.0F - offset;
	}
	int[] coord = BlockClickHelper.getCoordsFor(x, y, x1, x2, y1, y2, 4, 4, direction);

	if(coord == null)
	{
		return -1;
	}
	return coord[0];
	
}
 
开发者ID:TheAwesomeGem,项目名称:MineFantasy,代码行数:26,代码来源:TileEntityWeaponRack.java

示例4: 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;
}
 
开发者ID:TheAwesomeGem,项目名称:MineFantasy,代码行数:23,代码来源:TileEntityFurnaceMF.java

示例5: 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;
}
 
开发者ID:TheAwesomeGem,项目名称:MineFantasy,代码行数:23,代码来源:TileEntityFurnaceMF.java

示例6: 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;
}
 
开发者ID:TheAwesomeGem,项目名称:MineFantasy,代码行数:23,代码来源:TileEntityFurnaceMF.java

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

示例8: readFromNBT

@Override
public void readFromNBT(NBTTagCompound nbttagcompound) {
	super.readFromNBT(nbttagcompound);

	if (nbttagcompound.hasKey("Access")) {
		access = EnumAccess.values()[nbttagcompound.getInteger("Access")];
	} else {
		access = EnumAccess.SHARED;
	}
	if (nbttagcompound.hasKey("Owner")) {
		owner = nbttagcompound.getString("Owner");
	}

	if (nbttagcompound.hasKey("Orientation")) {
		orientation = ForgeDirection.values()[nbttagcompound.getInteger("Orientation")];
	} else {
		orientation = ForgeDirection.WEST;
	}

}
 
开发者ID:ForestryMC,项目名称:ForestryLegacy,代码行数:20,代码来源:TileForestry.java

示例9: 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;
}
 
开发者ID:TheAwesomeGem,项目名称:MineFantasy,代码行数:15,代码来源:TileEntityRoast.java

示例10: 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;
}
 
开发者ID:TheAwesomeGem,项目名称:MineFantasy,代码行数:15,代码来源:TileEntityRoast.java

示例11: 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;
}
 
开发者ID:TheAwesomeGem,项目名称:MineFantasy,代码行数:15,代码来源:TileEntityBFurnace.java

示例12: 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;
}
 
开发者ID:TheAwesomeGem,项目名称:MineFantasy,代码行数:15,代码来源:TileEntityBFurnace.java

示例13: 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;
}
 
开发者ID:TheAwesomeGem,项目名称:MineFantasy,代码行数:15,代码来源:TileEntityBFurnace.java

示例14: 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;
}
 
开发者ID:TheAwesomeGem,项目名称:MineFantasy,代码行数:15,代码来源:TileEntityBFurnace.java

示例15: getSlotFor

public int getSlotFor(float x, float y) 
{
	ForgeDirection FD = BlockClickHelper.FD[direction];
	
	if(FD == ForgeDirection.EAST || FD == ForgeDirection.WEST)
	{
		return getSlotForEW(x, y);
	}
	return getSlotForNS(x, y);
}
 
开发者ID:TheAwesomeGem,项目名称:MineFantasy,代码行数:10,代码来源:TileEntityAnvil.java


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