當前位置: 首頁>>代碼示例>>Java>>正文


Java NBTUtil.func_152459_a方法代碼示例

本文整理匯總了Java中net.minecraft.nbt.NBTUtil.func_152459_a方法的典型用法代碼示例。如果您正苦於以下問題:Java NBTUtil.func_152459_a方法的具體用法?Java NBTUtil.func_152459_a怎麽用?Java NBTUtil.func_152459_a使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在net.minecraft.nbt.NBTUtil的用法示例。


在下文中一共展示了NBTUtil.func_152459_a方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: readFromNBT

import net.minecraft.nbt.NBTUtil; //導入方法依賴的package包/類
public void readFromNBT(NBTTagCompound p_145839_1_)
{
    super.readFromNBT(p_145839_1_);
    this.field_145908_a = p_145839_1_.getByte("SkullType");
    this.field_145910_i = p_145839_1_.getByte("Rot");

    if (this.field_145908_a == 3)
    {
        if (p_145839_1_.hasKey("Owner", 10))
        {
            this.field_152110_j = NBTUtil.func_152459_a(p_145839_1_.getCompoundTag("Owner"));
        }
        else if (p_145839_1_.hasKey("ExtraType", 8) && !StringUtils.isNullOrEmpty(p_145839_1_.getString("ExtraType")))
        {
            this.field_152110_j = new GameProfile((UUID)null, p_145839_1_.getString("ExtraType"));
            this.func_152109_d();
        }
    }
}
 
開發者ID:xtrafrancyz,項目名稱:Cauldron,代碼行數:20,代碼來源:TileEntitySkull.java

示例2: CraftMetaSkull

import net.minecraft.nbt.NBTUtil; //導入方法依賴的package包/類
CraftMetaSkull(net.minecraft.nbt.NBTTagCompound tag) {
    super(tag);

    if (tag.hasKey(SKULL_OWNER.NBT, 10)) {
        profile = NBTUtil.func_152459_a(tag.getCompoundTag(SKULL_OWNER.NBT));
    } else if (tag.hasKey(SKULL_OWNER.NBT, 8)) {
        profile = new GameProfile(null, tag.getString(SKULL_OWNER.NBT));
    }
}
 
開發者ID:CyberdyneCC,項目名稱:ThermosRebased,代碼行數:10,代碼來源:CraftMetaSkull.java

示例3: getGameProfile

import net.minecraft.nbt.NBTUtil; //導入方法依賴的package包/類
private GameProfile getGameProfile(ItemStack stack) {
	GameProfile profile = null;

	if (stack.hasTagCompound()) {
		NBTTagCompound nbt = stack.getTagCompound();
		if (nbt.hasKey("SkullOwner", Constants.NBT.TAG_COMPOUND))
			profile = NBTUtil.func_152459_a(nbt.getCompoundTag("SkullOwner"));
		else if (nbt.hasKey("SkullOwner", Constants.NBT.TAG_STRING))
			profile = new GameProfile(null, nbt.getString("SkullOwner"));
	}

	return profile;
}
 
開發者ID:ganymedes01,項目名稱:Et-Futurum,代碼行數:14,代碼來源:ItemSkullRenderer.java

示例4: getItemStackDisplayName

import net.minecraft.nbt.NBTUtil; //導入方法依賴的package包/類
@Override
public String getItemStackDisplayName(ItemStack stack)
{
    GameProfile username = NBTUtil.func_152459_a(NBTHelper.getCompoundTag(stack, "profile"));
    return StatCollector.translateToLocal("item.peripheralsplusplus:permissionsCard.name") + (NBTHelper.getTag(stack, "profile") == null ? "" : " - " + username.getName());
}
 
開發者ID:austinv11,項目名稱:PeripheralsPlusPlus,代碼行數:7,代碼來源:ItemPermissionsCard.java

示例5: readFromNBT

import net.minecraft.nbt.NBTUtil; //導入方法依賴的package包/類
public void readFromNBT(NBTTagCompound nbtTag)
{
    super.readFromNBT(nbtTag);
    this.owner = NBTUtil.func_152459_a(nbtTag);
}
 
開發者ID:FFMT,項目名稱:Privatizer,代碼行數:6,代碼來源:TileEntityPrivate.java

示例6: renderSpecials

import net.minecraft.nbt.NBTUtil; //導入方法依賴的package包/類
/**
 * Method for adding special render rules
 */
protected void renderSpecials(EntityStatuePlayer player, float par2) {
	float f1 = 1.0F;
	GL11.glColor3f(f1, f1, f1);
	super.renderEquippedItems(player, par2);
	super.renderArrowsStuckInEntity(player, par2);
	ItemStack stack = player.inventory.armorItemInSlot(3);

	if (stack != null) {
		GL11.glPushMatrix();
		modelBipedMain.bipedHead.postRender(0.0625F);
		float f2;

		if (stack != null && stack.getItem() instanceof ItemBlock) {
			IItemRenderer customRenderer = MinecraftForgeClient.getItemRenderer(stack, EQUIPPED);
			boolean is3D = (customRenderer != null && customRenderer.shouldUseRenderHelper(EQUIPPED, stack, BLOCK_3D));

			if (is3D || RenderBlocks.renderItemIn3d(Block.getBlockFromItem(stack.getItem()).getRenderType())) {
				f2 = 0.625F;
				GL11.glTranslatef(0.0F, -0.25F, 0.0F);
				GL11.glRotatef(90.0F, 0.0F, 1.0F, 0.0F);
				GL11.glScalef(f2, -f2, -f2);
			}

			renderManager.itemRenderer.renderItem(player, stack, 0);
		} else if (stack.getItem().equals(Items.skull)) {
			f2 = 1.0625F;
			GL11.glScalef(f2, -f2, -f2);
			GameProfile s = null;
			
			if (stack.hasTagCompound() && stack.getTagCompound().hasKey("Owner")) {
				s = NBTUtil.func_152459_a(stack.getTagCompound().getCompoundTag("Owner"));
			}
			
			TileEntitySkullRenderer.field_147536_b.func_152674_a(-0.5F, 0.0F, -0.5F, 1, 180.0F, stack.getItemDamage(), s);
		}

		GL11.glPopMatrix();
	}
	
	renderItemInRightArm(player);
	renderItemInLeftArm(player);
}
 
開發者ID:asiekierka,項目名稱:Statues,代碼行數:46,代碼來源:RenderPlayerStatue.java


注:本文中的net.minecraft.nbt.NBTUtil.func_152459_a方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。