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


Java Direction.bedDirection方法代码示例

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


在下文中一共展示了Direction.bedDirection方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getIcon

import net.minecraft.util.Direction; //导入方法依赖的package包/类
/**
 * Gets the block's texture. Args: side, meta
 */
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int meta)
{
	if (side == 0)
	{
		return Blocks.planks.getBlockTextureFromSide(side);
	}
	else
	{
		int k = getDirection(meta);
		int l = Direction.bedDirection[k][side];
		int i1 = isBlockHeadOfBed(meta) ? 1 : 0;
		return (i1 != 1 || l != 2) && (i1 != 0 || l != 3) ? (l != 5 && l != 4 ? this.topTexture[i1] : this.sideTexture[i1]) : this.endTexture[i1];
	}
}
 
开发者ID:Tamfoolery,项目名称:HitchhikersGuideToMinecraft,代码行数:19,代码来源:BlockTowel.java

示例2: getIcon

import net.minecraft.util.Direction; //导入方法依赖的package包/类
@SideOnly(Side.CLIENT)

	/**
	 * From the specified side and block metadata retrieves the blocks texture. Args: side, metadata
	 */
	public Icon getIcon(int par1, int par2) {
		if (par1 == 0) {
			return Block.planks.getBlockTextureFromSide(par1);
		}
		else {
			int k = getDirection(par2);
			int l = Direction.bedDirection[k][par1];
			int i1 = isBlockHeadOfBed(par2) ? 1 : 0;
			return (i1 != 1 || l != 2) && (i1 != 0 || l != 3) ? (l != 5 && l != 4 ? this.bedTopIcons[i1] : this.bedSideIcons[i1]) : this.bedEndIcons[i1];
		}
	}
 
开发者ID:Cojomax99,项目名称:GuestBeds,代码行数:17,代码来源:BlockGuestBed.java

示例3: getIcon

import net.minecraft.util.Direction; //导入方法依赖的package包/类
@SideOnly(Side.CLIENT)

    /**
     * From the specified side and block metadata retrieves the blocks texture. Args: side, metadata
     */
    public Icon getIcon(int par1, int par2)
    {
        if (par1 == 0)
        {
            return Block.planks.getBlockTextureFromSide(par1);
        }
        else
        {
            int k = getDirection(par2);
            int l = Direction.bedDirection[k][par1];
            int i1 = isBlockHeadOfBed(par2) ? 1 : 0;
            return (i1 != 1 || l != 2) && (i1 != 0 || l != 3) ? (l != 5 && l != 4 ? this.bedTopIcons[i1] : this.bedSideIcons[i1]) : this.field_94472_b[i1];
        }
    }
 
开发者ID:Stormister,项目名称:Rediscovered-Mod-1.6.4,代码行数:20,代码来源:BlockDreamBed.java

示例4: getIcon

import net.minecraft.util.Direction; //导入方法依赖的package包/类
/**
 * Gets the block's texture. Args: side, meta
 */
public IIcon getIcon(int p_149691_1_, int p_149691_2_)
{
    if (p_149691_1_ == 0)
    {
        return Blocks.planks.getBlockTextureFromSide(p_149691_1_);
    }
    else
    {
        int var3 = func_149895_l(p_149691_2_);
        int var4 = Direction.bedDirection[var3][p_149691_1_];
        int var5 = func_149975_b(p_149691_2_) ? 1 : 0;
        return (var5 != 1 || var4 != 2) && (var5 != 0 || var4 != 3) ? (var4 != 5 && var4 != 4 ? this.field_149983_N[var5] : this.field_149982_M[var5]) : this.field_149980_b[var5];
    }
}
 
开发者ID:MinecraftModdedClients,项目名称:Resilience-Client-Source,代码行数:18,代码来源:BlockBed.java

示例5: getIcon

import net.minecraft.util.Direction; //导入方法依赖的package包/类
/**
 * Gets the block's texture. Args: side, meta
 */
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int meta)
{
    if (side == 0) {
        return Blocks.planks.getBlockTextureFromSide(side);
    } else {
        int direction = getDirection(meta);
        int bedDirection = Direction.bedDirection[direction][side];
        int isHead = isBlockHeadOfBed(meta) ? 1 : 0;
        return (isHead != 1 || bedDirection != 2) && (isHead != 0 || bedDirection != 3) ? (bedDirection != 5 && bedDirection != 4 ? this.bedIconTop[isHead] : this.bedIconSide[isHead]) : this.bedIconEnd[isHead];
    }
}
 
开发者ID:CosmicDan-Minecraft,项目名称:Imperium,代码行数:16,代码来源:BlockStickShelter.java

示例6: getIcon

import net.minecraft.util.Direction; //导入方法依赖的package包/类
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int meta)
{
    if (side == 0)
    {
        return Blocks.planks.getBlockTextureFromSide(side);
    } else
    {
        int k = getDirection(meta);
        int l = Direction.bedDirection[k][side];
        int isHead = isBlockHeadOfBed(meta) ? 1 : 0;
        return (isHead != 1 || l != 2) && (isHead != 0 || l != 3) ? (l != 5 && l != 4 ? this.topIcons[isHead] : this.sideIcons[isHead]) : this.endIcons[isHead];
    }
}
 
开发者ID:Darkona,项目名称:AdventureBackpack2,代码行数:15,代码来源:BlockSleepingBag.java

示例7: getIcon

import net.minecraft.util.Direction; //导入方法依赖的package包/类
@SideOnly(Side.CLIENT)
public IIcon getIcon(int p_149691_1_, int p_149691_2_)
{
    if (p_149691_1_ == 0)
    {
        return Blocks.planks.getBlockTextureFromSide(p_149691_1_);
    }
    else
    {
        int k = getDirection(p_149691_2_);
        int l = Direction.bedDirection[k][p_149691_1_];
        int i1 = isBlockHeadOfBed(p_149691_2_) ? 1 : 0;
        return (i1 != 1 || l != 2) && (i1 != 0 || l != 3) ? (l != 5 && l != 4 ? this.field_149983_N[i1] : this.field_149982_M[i1]) : this.field_149980_b[i1];
    }
}
 
开发者ID:xtrafrancyz,项目名称:Cauldron,代码行数:16,代码来源:BlockBed.java

示例8: getIcon

import net.minecraft.util.Direction; //导入方法依赖的package包/类
@SideOnly(Side.CLIENT)
public Icon getIcon(int side, int metadata) {
	if (side == 0) {
		return Block.planks.getBlockTextureFromSide(side);
	} else {
		int k = getDirection(metadata);
		int l = Direction.bedDirection[k][side];
		int i1 = isBlockHeadOfBed(metadata) ? 1 : 0;
		return (i1 != 1 || l != 2) && (i1 != 0 || l != 3) ? (l != 5 && l != 4 ? this.bedTopIcons[i1] : this.bedSideIcons[i1]) : this.bedFrontEndIcons[i1];
	}
}
 
开发者ID:ChistaMisuto,项目名称:Eldritch-Infusion,代码行数:12,代码来源:BlockDreamBed.java

示例9: getIcon

import net.minecraft.util.Direction; //导入方法依赖的package包/类
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int metadata) {
	if (side == 0) {
		return Blocks.planks.getBlockTextureFromSide(side);
	} else {
		int k = getDirection(metadata);
		int l = Direction.bedDirection[k][side];
		int i1 = isBlockHeadOfBed(metadata) ? 1 : 0;
		return (i1 != 1 || l != 2) && (i1 != 0 || l != 3) ? (l != 5 && l != 4 ? this.bedTopIcons[i1] : this.bedSideIcons[i1]) : this.bedFrontEndIcons[i1];
	}
}
 
开发者ID:ChistaMisuto,项目名称:Eldritch-Infusion,代码行数:12,代码来源:BlockDreamBed.java


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