本文整理汇总了Java中thaumcraft.api.EnumTag类的典型用法代码示例。如果您正苦于以下问题:Java EnumTag类的具体用法?Java EnumTag怎么用?Java EnumTag使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
EnumTag类属于thaumcraft.api包,在下文中一共展示了EnumTag类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getResearchTags
import thaumcraft.api.EnumTag; //导入依赖的package包/类
/**
* @param key
* @return a list of the enumtags used in this research. returns the numeric values and not the actual enum
*/
public static byte[] getResearchTags(String key) {
ResearchItem rr = research.get(key);
if (rr==null) return null;
byte[] output = new byte[rr.tags.size()];
EnumTag[] et = rr.tags.getAspects();
for (int a=0;a<rr.tags.size();a++) {
output[a] = (byte) et[a].id;
}
return output;
}
示例2: getResearchPrimaryTag
import thaumcraft.api.EnumTag; //导入依赖的package包/类
/**
* @param key
* @return the aspect enumtag ordinal with the highest value. Used to determine scroll color and similar things
*/
public static int getResearchPrimaryTag(String key) {
int t=0;
int amt=0;
ResearchItem rr = research.get(key);
if (rr==null) return 0;
for (EnumTag tag:rr.tags.getAspects()) {
if (rr.tags.getAmount(tag)>amt) {
t=tag.id;
amt=rr.tags.getAmount(tag);
};
}
return t;
}
示例3: matches
import thaumcraft.api.EnumTag; //导入依赖的package包/类
public boolean matches(ObjectTags itags) {
if (itags==null) return false;
for (EnumTag tag:tags.getAspects()) {
if (itags.getAmount(tag)<tags.getAmount(tag)) return false;
}
return true;
}
示例4: removeMatching
import thaumcraft.api.EnumTag; //导入依赖的package包/类
public ObjectTags removeMatching(ObjectTags itags) {
ObjectTags temptags = new ObjectTags();
temptags.tags.putAll(itags.tags);
for (EnumTag tag:tags.getAspects()) {
if (!temptags.reduceAmount(tag, tags.getAmount(tag))) return null;
}
itags = temptags;
return itags;
}
示例5: applyObjectTags
import thaumcraft.api.EnumTag; //导入依赖的package包/类
public static void applyObjectTags() {
ObjectTags tags = new ObjectTags().add(EnumTag.LIFE, 1).add(EnumTag.EARTH, 2).add(EnumTag.CRYSTAL, 1);
ThaumcraftApi.registerObjectTag(PinkGum1.blockID, -1, tags);
tags = new ObjectTags().add(EnumTag.LIFE, 1).add(EnumTag.ROCK, 2).add(EnumTag.CRYSTAL, 1);
ThaumcraftApi.registerObjectTag(BlueGum1.blockID, -1, tags);
}
示例6: getResearchAmount
import thaumcraft.api.EnumTag; //导入依赖的package包/类
public static int getResearchAmount(String key, EnumTag tag) {
ResearchItem rr = research.get(key);
if (rr==null) return 0;
return rr.tags.getAmount(tag);
}
示例7: initItems
import thaumcraft.api.EnumTag; //导入依赖的package包/类
public static void initItems() {
genericItems = new ItemGeneric(ConfigurationNecromancy.GenericItemID).setUnlocalizedName("ItemNecromancy");
ThaumcraftApi.registerObjectTag(genericItems.itemID, 0, (new ObjectTags()).add(EnumTag.DEATH, 2));
ThaumcraftApi.registerObjectTag(genericItems.itemID, 1, (new ObjectTags()).add(EnumTag.FLIGHT, 2).add(EnumTag.LIFE, 4).add(EnumTag.LIGHT, 2).add(EnumTag.CRYSTAL, 2));
ThaumcraftApi.registerObjectTag(genericItems.itemID, 2, (new ObjectTags()).add(EnumTag.HEAL, 2).add(EnumTag.LIFE, 4).add(EnumTag.CRYSTAL, 2));
ThaumcraftApi.registerObjectTag(genericItems.itemID, 3, (new ObjectTags()).add(EnumTag.FLESH, 8).add(EnumTag.KNOWLEDGE, 4));
for (int x = 0; x < ItemGeneric.names.length; x++) {
LanguageRegistry.addName(new ItemStack(genericItems, 1, x), ItemGeneric.names[x]);
}
necronomicon = new ItemNecronomicon(ConfigurationNecromancy.NecronomiconID).setUnlocalizedName("Necronomicon");
LanguageRegistry.addName(necronomicon, "Necronomicon");
ThaumcraftApi.registerObjectTag(necronomicon.itemID, -1, (new ObjectTags()).add(EnumTag.KNOWLEDGE, 666).add(EnumTag.DEATH, 666).add(EnumTag.DARK, 666).add(EnumTag.EVIL, 666).add(EnumTag.CONTROL, 666));
scythe = new ItemScythe(ConfigurationNecromancy.ScytheID, ItemScythe.toolScythe).setUnlocalizedName("ItemScythe");
LanguageRegistry.addName(scythe, "Blood Scythe");
ThaumcraftApi.registerObjectTag(scythe.itemID, -1, (new ObjectTags()).add(EnumTag.WEAPON, 8).add(EnumTag.LIFE, 2));
scytheBone = new ItemScythe(ConfigurationNecromancy.ScytheBoneID, ItemScythe.toolScytheBone).setUnlocalizedName("ItemScytheBone");
LanguageRegistry.addName(scytheBone, "Bone Scythe");
ThaumcraftApi.registerObjectTag(scytheBone.itemID, -1, (new ObjectTags()).add(EnumTag.WEAPON, 8).add(EnumTag.DEATH, 2));
bucketBlood = new ItemBucketBlood(ConfigurationNecromancy.BucketBloodID, ConfigurationNecromancy.BloodID).setUnlocalizedName("BucketBlood");
LanguageRegistry.addName(bucketBlood, "Blood Bucket");
ThaumcraftApi.registerObjectTag(scytheBone.itemID, -1, (new ObjectTags()).add(EnumTag.METAL, 13).add(EnumTag.HEAL, 16).add(EnumTag.LIFE, 32));
organs = new ItemOrgans(ConfigurationNecromancy.OrgansID).setUnlocalizedName("Organs");
ThaumcraftApi.registerObjectTag(organs.itemID, 0, (new ObjectTags()).add(EnumTag.FLESH, 8).add(EnumTag.KNOWLEDGE, 4));
ThaumcraftApi.registerObjectTag(organs.itemID, 1, (new ObjectTags()).add(EnumTag.FLESH, 8));
ThaumcraftApi.registerObjectTag(organs.itemID, 2, (new ObjectTags()).add(EnumTag.FLESH, 2));
ThaumcraftApi.registerObjectTag(organs.itemID, 3, (new ObjectTags()).add(EnumTag.FLESH, 8));
ThaumcraftApi.registerObjectTag(organs.itemID, 4, (new ObjectTags()).add(EnumTag.EVIL, 2));
for (int x = 0; x < ItemOrgans.names.length; x++) {
LanguageRegistry.addName(new ItemStack(organs, 1, x), ItemOrgans.names[x]);
}
NecroEntityBase.organID = organs.itemID;
bodyparts = new ItemBodyPart(ConfigurationNecromancy.BodyPartID).setUnlocalizedName("BodyParts");
ThaumcraftApi.registerObjectTag(organs.itemID, -1, (new ObjectTags()).add(EnumTag.EVIL, 2).add(EnumTag.BEAST, 2).add(EnumTag.DEATH, 8));
isaacsHead = new ItemIsaacsHead(ConfigurationNecromancy.IsaacsHeadID, isaac, Necromancy.Proxy.addArmour("Isaac"), 0);
LanguageRegistry.addName(isaacsHead, "Isaac's Severed Head");
spawner = new ItemSpawner(ConfigurationNecromancy.SpawnerID).setUnlocalizedName("NecroSpawner");
LanguageRegistry.addName(new ItemStack(spawner, 1, 0), "Isaac's Soul Heart");
initRecipes();
}