当前位置: 首页>>代码示例>>Java>>正文


Java Aspect.getTag方法代码示例

本文整理汇总了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();
}
 
开发者ID:PrincessRTFM,项目名称:TweakCraft,代码行数:23,代码来源:CrucibleRecipe.java

示例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();
}
 
开发者ID:Brandomine,项目名称:Augury,代码行数:24,代码来源:CrucibleRecipe.java

示例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();
}
 
开发者ID:makeoo,项目名称:Gadomancy,代码行数:18,代码来源:DataFamiliar.java

示例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();
}
 
开发者ID:J3FF97,项目名称:Steel-Industries,代码行数:30,代码来源:CrucibleRecipe.java

示例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);
    }
}
 
开发者ID:makeoo,项目名称:Gadomancy,代码行数:16,代码来源:DataFamiliar.java

示例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);
}
 
开发者ID:makeoo,项目名称:Gadomancy,代码行数:13,代码来源:DataFamiliar.java

示例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);
}
 
开发者ID:makeoo,项目名称:Gadomancy,代码行数:15,代码来源:AuraResearchManager.java


注:本文中的thaumcraft.api.aspects.Aspect.getTag方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。