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


Java EnumFacing.getName方法代码示例

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


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

示例1: writeToNBT

import net.minecraft.util.EnumFacing; //导入方法依赖的package包/类
@Override
public NBTTagCompound writeToNBT(NBTTagCompound tag){
    super.writeToNBT(tag);
    tag.setInteger("up", up.ordinal());
    tag.setInteger("down", down.ordinal());
    tag.setInteger("north", north.ordinal());
    tag.setInteger("south", south.ordinal());
    tag.setInteger("west", west.ordinal());
    tag.setInteger("east", east.ordinal());
    for (int i = 0; i < 6; i++)
    {
        EnumFacing facing = EnumFacing.getFront(i);
        String key = "target" + facing.getName();
        BlockPos target = targets[i];
        if(target == null)
            continue;
        NBTTagCompound targetCompound = new NBTTagCompound();
        targetCompound.setInteger("x",target.getX());
        targetCompound.setInteger("y",target.getY());
        targetCompound.setInteger("z",target.getZ());
        tag.setTag(key,targetCompound);
    }
    capability.writeToNBT(tag);
    return tag;
}
 
开发者ID:DaedalusGame,项目名称:Soot,代码行数:26,代码来源:TileEntityEmberBurst.java

示例2: readFromNBT

import net.minecraft.util.EnumFacing; //导入方法依赖的package包/类
@Override
public void readFromNBT(NBTTagCompound tag){
    super.readFromNBT(tag);
    up = connectionFromInt(tag.getInteger("up"));
    down = connectionFromInt(tag.getInteger("down"));
    north = connectionFromInt(tag.getInteger("north"));
    south = connectionFromInt(tag.getInteger("south"));
    west = connectionFromInt(tag.getInteger("west"));
    east = connectionFromInt(tag.getInteger("east"));
    for (int i = 0; i < 6; i++)
    {
        EnumFacing facing = EnumFacing.getFront(i);
        String key = "target" + facing.getName();
        if(!tag.hasKey(key))
            continue;
        NBTTagCompound targetCompound = tag.getCompoundTag(key);
        BlockPos target = new BlockPos(targetCompound.getInteger("x"), targetCompound.getInteger("y"), targetCompound.getInteger("z"));
        targets[i] = target;
    }
    capability.readFromNBT(tag);
}
 
开发者ID:DaedalusGame,项目名称:Soot,代码行数:22,代码来源:TileEntityEmberBurst.java

示例3: makeBakedQuad

import net.minecraft.util.EnumFacing; //导入方法依赖的package包/类
private static BakedQuad makeBakedQuad(EnumFacing p_makeBakedQuad_0_, TextureAtlasSprite p_makeBakedQuad_1_, int p_makeBakedQuad_2_)
{
    Vector3f vector3f = new Vector3f(0.0F, 0.0F, 0.0F);
    Vector3f vector3f1 = new Vector3f(16.0F, 16.0F, 16.0F);
    BlockFaceUV blockfaceuv = new BlockFaceUV(new float[] {0.0F, 0.0F, 16.0F, 16.0F}, 0);
    BlockPartFace blockpartface = new BlockPartFace(p_makeBakedQuad_0_, p_makeBakedQuad_2_, "#" + p_makeBakedQuad_0_.getName(), blockfaceuv);
    ModelRotation modelrotation = ModelRotation.X0_Y0;
    BlockPartRotation blockpartrotation = null;
    boolean flag = false;
    boolean flag1 = true;
    FaceBakery facebakery = new FaceBakery();
    BakedQuad bakedquad = facebakery.makeBakedQuad(vector3f, vector3f1, blockpartface, p_makeBakedQuad_1_, p_makeBakedQuad_0_, modelrotation, blockpartrotation, flag, flag1);
    return bakedquad;
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:15,代码来源:BlockModelUtils.java

示例4: makeBakedQuad

import net.minecraft.util.EnumFacing; //导入方法依赖的package包/类
public static BakedQuad makeBakedQuad(EnumFacing p_makeBakedQuad_0_, TextureAtlasSprite p_makeBakedQuad_1_, int p_makeBakedQuad_2_)
{
    Vector3f vector3f = new Vector3f(0.0F, 0.0F, 0.0F);
    Vector3f vector3f1 = new Vector3f(16.0F, 16.0F, 16.0F);
    BlockFaceUV blockfaceuv = new BlockFaceUV(new float[] {0.0F, 0.0F, 16.0F, 16.0F}, 0);
    BlockPartFace blockpartface = new BlockPartFace(p_makeBakedQuad_0_, p_makeBakedQuad_2_, "#" + p_makeBakedQuad_0_.getName(), blockfaceuv);
    ModelRotation modelrotation = ModelRotation.X0_Y0;
    BlockPartRotation blockpartrotation = null;
    boolean flag = false;
    boolean flag1 = true;
    FaceBakery facebakery = new FaceBakery();
    BakedQuad bakedquad = facebakery.makeBakedQuad(vector3f, vector3f1, blockpartface, p_makeBakedQuad_1_, p_makeBakedQuad_0_, modelrotation, blockpartrotation, flag, flag1);
    return bakedquad;
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:15,代码来源:BlockModelUtils.java

示例5: getName

import net.minecraft.util.EnumFacing; //导入方法依赖的package包/类
public static String getName(EnumFacing facing) {
    return facing.getName();
}
 
开发者ID:NSExceptional,项目名称:Zombe-Modpack,代码行数:4,代码来源:ZWrapper.java


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