本文整理匯總了Java中net.minecraft.creativetab.CreativeTabs.equals方法的典型用法代碼示例。如果您正苦於以下問題:Java CreativeTabs.equals方法的具體用法?Java CreativeTabs.equals怎麽用?Java CreativeTabs.equals使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類net.minecraft.creativetab.CreativeTabs
的用法示例。
在下文中一共展示了CreativeTabs.equals方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: getSubItems
import net.minecraft.creativetab.CreativeTabs; //導入方法依賴的package包/類
@Override
public void getSubItems(CreativeTabs tab, NonNullList<ItemStack> list) {
if (tab.equals(this.getCreativeTab())) {
{ //Construct a sample scarf
NBTTagCompound tag = new NBTTagCompound();
NBTTagList leftScarf = new NBTTagList();
NBTTagList rightScarf = new NBTTagList();
for(int i=0; i<14; i++) {
NBTTagCompound node = new NBTTagCompound();
int col = 0x60d9bb;
if (i%2==1) col = 0x1b5c64;
node.setInteger("Color", col);
leftScarf.appendTag(node);
rightScarf.appendTag(node.copy());
}
tag.setTag("LeftScarf", leftScarf);
tag.setTag("RightScarf", rightScarf);
ItemStack stack = new ItemStack(this, 1);
stack.setTagCompound(tag);
list.add(stack);
}
}
}
示例2: getSubItems
import net.minecraft.creativetab.CreativeTabs; //導入方法依賴的package包/類
@Override
public void getSubItems(CreativeTabs tab, NonNullList<ItemStack> list) {
if (tab.equals(this.getCreativeTab())) {
for(int i=0; i<enumValues.length; i++) {
list.add(new ItemStack(this, 1, i));
}
}
}
示例3: getSubItems
import net.minecraft.creativetab.CreativeTabs; //導入方法依賴的package包/類
@Override
public void getSubItems(CreativeTabs tab, NonNullList<ItemStack> list) {
if (tab.equals(this.getCreativeTab())) {
list.add(new ItemStack(this, 1, 0));
list.add(new ItemStack(this, 1, 1));
}
}
示例4: getSubItems
import net.minecraft.creativetab.CreativeTabs; //導入方法依賴的package包/類
@Override
public void getSubItems(CreativeTabs tab, NonNullList<ItemStack> list) {
if (tab.equals(this.getCreativeTab())) {
for(int i=0; i<16; i++) {
int col = EnumDyeColor.byDyeDamage(i).getColorValue();
NBTTagCompound tag = new NBTTagCompound();
tag.setInteger("Color", col);
ItemStack square = new ItemStack(this, 1);
square.setTagCompound(tag);
list.add(square);
}
}
}
示例5: getSubItems
import net.minecraft.creativetab.CreativeTabs; //導入方法依賴的package包/類
@Override
public void getSubItems(CreativeTabs tab, NonNullList<ItemStack> list) {
if (tab.equals(this.getCreativeTab())) {
list.add(new ItemStack(this));
}
}
示例6: getSubBlocks
import net.minecraft.creativetab.CreativeTabs; //導入方法依賴的package包/類
@Override
public void getSubBlocks(CreativeTabs itemIn, NonNullList<ItemStack> list) {
if (itemIn.equals(this.getCreativeTabToDisplayOn())) {
getVariants(Item.getItemFromBlock(this), list);
}
}