本文整理汇总了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);
}
}