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