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


Java SoulNetworkHandler.syphonAndDamageFromNetwork方法代码示例

本文整理汇总了Java中WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler.syphonAndDamageFromNetwork方法的典型用法代码示例。如果您正苦于以下问题:Java SoulNetworkHandler.syphonAndDamageFromNetwork方法的具体用法?Java SoulNetworkHandler.syphonAndDamageFromNetwork怎么用?Java SoulNetworkHandler.syphonAndDamageFromNetwork使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler的用法示例。


在下文中一共展示了SoulNetworkHandler.syphonAndDamageFromNetwork方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: castSpell

import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; //导入方法依赖的package包/类
@Override
public void castSpell(World world, EntityPlayer entityPlayer, ItemStack itemStack)
{
    this.applyAllSpellEffects();
    
    int cost = this.getTotalCost();
    
    if(!SoulNetworkHandler.syphonAndDamageFromNetwork(itemStack, entityPlayer, cost))
    {
    	return;
    }

    for (ISelfSpellEffect eff : selfSpellEffectList)
    {
        eff.onSelfUse(world, entityPlayer);
    }
}
 
开发者ID:Katalliaan,项目名称:Rubedo,代码行数:18,代码来源:SpellParadigmSelf.java

示例2: castSpell

import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; //导入方法依赖的package包/类
@Override
public void castSpell(World world, EntityPlayer entityPlayer, ItemStack crystal)
{
    if (entityPlayer.worldObj.isRemote)
    {
        return;
    }

    int cost = this.getTotalCost();
    
    if(!SoulNetworkHandler.syphonAndDamageFromNetwork(crystal, entityPlayer, cost))
    {
    	return;
    }

    ItemStack toolStack = this.prepareTool(crystal, world);

    entityPlayer.setCurrentItemOrArmor(0, toolStack);

    this.onSummonTool(toolStack, world, entityPlayer);
}
 
开发者ID:Katalliaan,项目名称:Rubedo,代码行数:22,代码来源:SpellParadigmTool.java

示例3: onUpdate

import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; //导入方法依赖的package包/类
@Override
public void onUpdate(ItemStack toolStack, World world, Entity par3Entity, int par4, boolean par5)
{
    if (world.isRemote)
    {
        return;
    }

    SpellParadigmTool parad = this.loadParadigmFromStack(toolStack);
    int cost = parad.onUpdate(toolStack, world, par3Entity, par4, par5);

    if (par3Entity instanceof EntityPlayer && cost > 0)
        SoulNetworkHandler.syphonAndDamageFromNetwork(toolStack, (EntityPlayer) par3Entity, cost);

    int duration = Math.max(this.getDuration(toolStack, world), 0);

    if (duration <= 0 && par3Entity instanceof EntityPlayer)
    {
        int banishCost = parad.onBanishTool(toolStack, world, par3Entity, par4, par5);
        SoulNetworkHandler.syphonAndDamageFromNetwork(toolStack, (EntityPlayer) par3Entity, banishCost);
        ((EntityPlayer) par3Entity).inventory.mainInventory[par4] = this.getContainedCrystal(toolStack);
    }
}
 
开发者ID:Katalliaan,项目名称:Rubedo,代码行数:24,代码来源:ItemSpellMultiTool.java

示例4: castSpell

import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; //导入方法依赖的package包/类
@Override
public void castSpell(World world, EntityPlayer entityPlayer,
		ItemStack itemStack) {
	SpellProperties properties = this.getSpellProperties(itemStack);

	SoulNetworkHandler.syphonAndDamageFromNetwork(itemStack, entityPlayer,
			properties.getCost());
	EntitySpellProjectile entitySpellProjectile = new EntitySpellProjectile(
			world, entityPlayer, properties);

	if (!world.isRemote) {
		world.spawnEntityInWorld(entitySpellProjectile);
	}
}
 
开发者ID:Katalliaan,项目名称:Rubedo,代码行数:15,代码来源:SpellProjectile.java

示例5: castSpell

import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; //导入方法依赖的package包/类
@Override
public void castSpell(World world, EntityPlayer entityPlayer,
		ItemStack itemStack) {
	SpellProperties properties = this.getSpellProperties(itemStack);

	SoulNetworkHandler.syphonAndDamageFromNetwork(itemStack, entityPlayer,
			properties.getCost());
	SpellEffects.hitEntity(world, entityPlayer, properties);
}
 
开发者ID:Katalliaan,项目名称:Rubedo,代码行数:10,代码来源:SpellSelf.java

示例6: castSpell

import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; //导入方法依赖的package包/类
@Override
public void castSpell(World world, EntityPlayer entityPlayer, ItemStack itemStack)
{
	int cost = this.getTotalCost();
    
    if(!SoulNetworkHandler.syphonAndDamageFromNetwork(itemStack, entityPlayer, cost))
    {
    	return;
    }
    
    EntitySpellProjectile proj = new EntitySpellProjectile(world, entityPlayer);
    this.prepareProjectile(proj);
    world.spawnEntityInWorld(proj);
}
 
开发者ID:Katalliaan,项目名称:Rubedo,代码行数:15,代码来源:SpellParadigmProjectile.java

示例7: onItemRightClick

import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; //导入方法依赖的package包/类
@Override
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer)
{
    if (par3EntityPlayer.isSneaking())
    {
        par3EntityPlayer.setCurrentItemOrArmor(0, this.getContainedCrystal(par1ItemStack));
        return par1ItemStack;
    }

    SpellParadigmTool parad = this.loadParadigmFromStack(par1ItemStack);

    MovingObjectPosition mop = this.getMovingObjectPositionFromPlayer(par2World, par3EntityPlayer, false);

    int cost = 0;

    if (mop != null && mop.typeOfHit.equals(MovingObjectPosition.MovingObjectType.BLOCK))
    {
        cost = parad.onRightClickBlock(par1ItemStack, par3EntityPlayer, par2World, mop);
    } else
    {
        cost = parad.onRightClickAir(par1ItemStack, par2World, par3EntityPlayer);
    }

    if (cost > 0)
    {
    	SoulNetworkHandler.syphonAndDamageFromNetwork(par1ItemStack, par3EntityPlayer, cost);
    }

    return par1ItemStack;
}
 
开发者ID:Katalliaan,项目名称:Rubedo,代码行数:31,代码来源:ItemSpellMultiTool.java

示例8: onItemRightClick

import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; //导入方法依赖的package包/类
@Override
public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer player) {
    SoulNetworkHandler.checkAndSetItemOwner(itemstack, player);
    if (itemstack.getItemDamage() >= 100) {
        player.swingItem();
        if (!world.isRemote) {
            if (player.capabilities.isCreativeMode)
                itemstack.setItemDamage(0);
            else {
                SoulNetworkHandler.syphonAndDamageFromNetwork(itemstack, player, 10000);
                if(player.getHealth() > 0){
                    itemstack.setItemDamage(0);
                }
                else
                    return itemstack;
            }
            Aspect aspect;
            short amount;
            for(Iterator count = Aspect.getPrimalAspects().iterator(); count.hasNext(); PacketHandler.INSTANCE.sendTo(new PacketAspectPool(aspect.getTag(), Short.valueOf(amount), Short.valueOf(Thaumcraft.proxy.playerKnowledge.getAspectPoolFor(player.getCommandSenderName(), aspect))), (EntityPlayerMP)player))
            {
                aspect = (Aspect)count.next();
                amount = (short)(world.rand.nextInt(4) + 4);
                Thaumcraft.proxy.playerKnowledge.addAspectPool(player.getCommandSenderName(), aspect, amount);
                ResearchManager.scheduleSave(player);
            }
        }
    }
    return itemstack;
}
 
开发者ID:SpitefulFox,项目名称:ForbiddenMagic,代码行数:30,代码来源:ItemBoundwell.java

示例9: damageArmour

import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; //导入方法依赖的package包/类
@Override
public void damageArmour(ItemStack stack, int damage) {

    EntityPlayer player = SoulNetworkHandler.getPlayerForUsername(SoulNetworkHandler.getOwnerName(stack));

    if (player == null) {
        return;
    }

    System.out.println("Draining: " + damage * cost);

    if (!player.capabilities.isCreativeMode) {
        SoulNetworkHandler.syphonAndDamageFromNetwork(stack, player, (int) (damage * cost));
    }
}
 
开发者ID:chbachman,项目名称:ModularArmour,代码行数:16,代码来源:LPUpgradeLogic.java


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