本文整理汇总了Java中thaumcraft.api.aspects.Aspect.getTag方法的典型用法代码示例。如果您正苦于以下问题:Java Aspect.getTag方法的具体用法?Java Aspect.getTag怎么用?Java Aspect.getTag使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类thaumcraft.api.aspects.Aspect
的用法示例。
在下文中一共展示了Aspect.getTag方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: CrucibleRecipe
import thaumcraft.api.aspects.Aspect; //导入方法依赖的package包/类
public CrucibleRecipe(String researchKey, ItemStack result, Object cat, AspectList tags) {
recipeOutput = result;
this.aspects = tags;
this.key = researchKey;
this.catalyst = cat;
if (cat instanceof String) {
this.catalyst = OreDictionary.getOres((String) cat);
}
String hc = researchKey + result.toString();
for (Aspect tag : tags.getAspects()) {
hc += tag.getTag() + tags.getAmount(tag);
}
if (cat instanceof ItemStack) {
hc += ((ItemStack) cat).toString();
}
else if ( (cat instanceof ArrayList) && ( ((ArrayList<ItemStack>) catalyst).size() > 0)) {
for (ItemStack is : (ArrayList<ItemStack>) catalyst) {
hc += is.toString();
}
}
hash = hc.hashCode();
}
示例2: CrucibleRecipe
import thaumcraft.api.aspects.Aspect; //导入方法依赖的package包/类
public CrucibleRecipe(String researchKey, ItemStack result, Object cat, AspectList tags) {
recipeOutput = result;
this.aspects = tags;
this.key = researchKey;
this.catalyst = cat;
if (cat instanceof String) {
this.catalyst = OreDictionary.getOres((String) cat);
}
String hc = researchKey + result.toString();
for (Aspect tag:tags.getAspects()) {
hc += tag.getTag()+tags.getAmount(tag);
}
if (cat instanceof ItemStack) {
hc += ((ItemStack)cat).toString();
} else
if (cat instanceof ArrayList && ((ArrayList<ItemStack>)catalyst).size()>0) {
for (ItemStack is :(ArrayList<ItemStack>)catalyst) {
hc += is.toString();
}
}
hash = hc.hashCode();
}
示例3: equipTick
import thaumcraft.api.aspects.Aspect; //导入方法依赖的package包/类
public void equipTick(World world, EntityPlayer player, Aspect aspect) {
if(world.isRemote) return;
FamiliarData data = new FamiliarData(player.getCommandSenderName(), aspect.getTag());
IInventory baublesInv = BaublesApi.getBaubles(player);
if(baublesInv.getStackInSlot(0) == null) {
handleUnequip(world, player, aspect);
return;
}
if(familiarControllers.get(player) == null || !playersWithFamiliar.contains(data)) {
handleEquip(world, player, aspect);
}
familiarControllers.get(player).tick();
}
示例4: CrucibleRecipe
import thaumcraft.api.aspects.Aspect; //导入方法依赖的package包/类
public CrucibleRecipe(String researchKey, ItemStack result, Object cat, AspectList tags)
{
recipeOutput = result;
this.aspects = tags;
this.key = researchKey;
this.catalyst = cat;
if(cat instanceof String)
{
this.catalyst = OreDictionary.getOres((String) cat);
}
String hc = researchKey + result.toString();
for(Aspect tag : tags.getAspects())
{
hc += tag.getTag() + tags.getAmount(tag);
}
if(cat instanceof ItemStack)
{
hc += ((ItemStack) cat).toString();
}
else if(cat instanceof ArrayList && ((ArrayList<ItemStack>) catalyst).size() > 0)
{
for(ItemStack is : (ArrayList<ItemStack>) catalyst)
{
hc += is.toString();
}
}
hash = hc.hashCode();
}
示例5: handleEquip
import thaumcraft.api.aspects.Aspect; //导入方法依赖的package包/类
public void handleEquip(World world, EntityPlayer player, Aspect aspect) {
if(world.isRemote) return;
String playerName = player.getCommandSenderName();
FamiliarData data = new FamiliarData(playerName, aspect.getTag());
if(!addClientQueue.contains(data)) addClientQueue.add(data);
if(!playersWithFamiliar.contains(data)) playersWithFamiliar.add(data);
markDirty();
if(!familiarControllers.containsKey(player)) {
FamiliarController controller = new FamiliarController(player);
familiarControllers.put(player, controller);
}
}
示例6: handleUnequip
import thaumcraft.api.aspects.Aspect; //导入方法依赖的package包/类
public void handleUnequip(World world, EntityPlayer player, Aspect aspect) {
if(world.isRemote) return;
String playerName = player.getCommandSenderName();
FamiliarData data = new FamiliarData(playerName, aspect.getTag());
if(!removeClientQueue.contains(data)) removeClientQueue.add(data);
if(playersWithFamiliar.contains(data)) playersWithFamiliar.remove(data);
markDirty();
familiarControllers.remove(player);
}
示例7: tryUnlockAuraEffect
import thaumcraft.api.aspects.Aspect; //导入方法依赖的package包/类
public static void tryUnlockAuraEffect(EntityPlayer player, Aspect aspect) {
if(!AuraEffectHandler.registeredEffects.containsKey(aspect)) return;
if(isBlacklisted(aspect)) return;
if(!ResearchManager.isResearchComplete(player.getCommandSenderName(), Gadomancy.MODID.toUpperCase() + ".AURA_EFFECTS")) return;
if(!Thaumcraft.proxy.getPlayerKnowledge().hasDiscoveredAspect(player.getCommandSenderName(), aspect)) return;
String res = String.format(TC_AURA_RESEARCH_STR, aspect.getTag());
if(ResearchManager.isResearchComplete(player.getCommandSenderName(), res)) return;
Thaumcraft.proxy.getResearchManager().completeResearch(player, res);
PacketTCNotificationText text = new PacketTCNotificationText("gadomancy.aura.research.unlock", aspect.getTag());
PacketHandler.INSTANCE.sendTo(text, (EntityPlayerMP) player);
}