當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。