All da commentz
This commit is contained in:
parent
2b749000b6
commit
5983ff4130
44 changed files with 1851 additions and 426 deletions
|
@ -81,6 +81,8 @@ public class RitualEffectHealing extends RitualEffect
|
|||
SoulNetworkHandler.causeNauseaToPlayer(owner);
|
||||
} else
|
||||
{
|
||||
entityCount = 0;
|
||||
|
||||
boolean hasReductus = this.canDrainReagent(ritualStone, ReagentRegistry.reductusReagent, reductusDrain, false);
|
||||
|
||||
for(EntityLivingBase livingEntity : list)
|
||||
|
@ -94,7 +96,7 @@ public class RitualEffectHealing extends RitualEffect
|
|||
if (livingEntity.getHealth() + 0.1f < livingEntity.getMaxHealth())
|
||||
{
|
||||
PotionEffect effect = livingEntity.getActivePotionEffect(Potion.regeneration);
|
||||
if(effect != null && effect.getAmplifier() <= potency && effect.getDuration() <= timeDelay)
|
||||
if(effect == null || (effect != null && effect.getAmplifier() <= potency && effect.getDuration() <= timeDelay))
|
||||
{
|
||||
if(!hasVirtus || (this.canDrainReagent(ritualStone, ReagentRegistry.virtusReagent, virtusDrain, false)))
|
||||
{
|
||||
|
|
|
@ -15,14 +15,20 @@ import net.minecraft.server.MinecraftServer;
|
|||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.ModBlocks;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry;
|
||||
import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone;
|
||||
import WayofTime.alchemicalWizardry.api.rituals.RitualComponent;
|
||||
import WayofTime.alchemicalWizardry.api.rituals.RitualEffect;
|
||||
import WayofTime.alchemicalWizardry.api.soulNetwork.LifeEssenceNetwork;
|
||||
import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
|
||||
public class RitualEffectItemSuction extends RitualEffect
|
||||
{
|
||||
public static final int reductusDrain = 1;
|
||||
|
||||
public static final int timeDelayMin = 10;
|
||||
|
||||
@Override
|
||||
public void performEffect(IMasterRitualStone ritualStone)
|
||||
{
|
||||
|
@ -60,17 +66,12 @@ public class RitualEffectItemSuction extends RitualEffect
|
|||
|
||||
if (currentEssence < this.getCostPerRefresh()*100)
|
||||
{
|
||||
EntityPlayer entityOwner = SpellHelper.getPlayerForUsername(owner);
|
||||
|
||||
if (entityOwner == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
entityOwner.addPotionEffect(new PotionEffect(Potion.confusion.id, 80));
|
||||
SoulNetworkHandler.causeNauseaToPlayer(owner);
|
||||
} else
|
||||
{
|
||||
List<EntityItem> itemDropList = SpellHelper.getItemsInRange(world, x+0.5f, y+0.5f, z+0.5f, 10, 10);
|
||||
|
||||
boolean hasReductus = this.canDrainReagent(ritualStone, ReagentRegistry.reductusReagent, reductusDrain, false);
|
||||
|
||||
int count = 0;
|
||||
|
||||
|
@ -80,53 +81,70 @@ public class RitualEffectItemSuction extends RitualEffect
|
|||
|
||||
for (EntityItem itemEntity : itemDropList)
|
||||
{
|
||||
hasReductus = hasReductus && this.canDrainReagent(ritualStone, ReagentRegistry.reductusReagent, reductusDrain, false);
|
||||
if(hasReductus && itemEntity.age < this.timeDelayMin)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
ItemStack item = itemEntity.getEntityItem();
|
||||
ItemStack copyStack = itemEntity.getEntityItem().copy();
|
||||
|
||||
int pastAmount = copyStack.stackSize;
|
||||
|
||||
// for (int n = 0; n < invSize; n++)
|
||||
// {
|
||||
// if (tileEntity.isItemValidForSlot(n, copyStack) && copyStack.stackSize != 0)
|
||||
// {
|
||||
// ItemStack itemStack = tileEntity.getStackInSlot(n);
|
||||
//
|
||||
// if (itemStack == null)
|
||||
// {
|
||||
// tileEntity.setInventorySlotContents(n, item);
|
||||
// copyStack.stackSize = 0;
|
||||
// } else
|
||||
// {
|
||||
// if (itemStack.getItem().equals(copyStack.getItem()) && itemStack.getItemDamage() == copyStack.getItemDamage())
|
||||
// {
|
||||
// int itemSize = itemStack.stackSize;
|
||||
// int copySize = copyStack.stackSize;
|
||||
// int maxSize = itemStack.getMaxStackSize();
|
||||
//
|
||||
// if (copySize + itemSize < maxSize)
|
||||
// {
|
||||
// copyStack.stackSize = 0;
|
||||
// itemStack.stackSize = itemSize + copySize;
|
||||
// tileEntity.setInventorySlotContents(n, itemStack);
|
||||
// } else
|
||||
// {
|
||||
// copyStack.stackSize = itemSize + copySize - maxSize;
|
||||
// itemStack.stackSize = maxSize;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
count++;
|
||||
|
||||
for (int n = 0; n < invSize; n++)
|
||||
{
|
||||
if (tileEntity.isItemValidForSlot(n, copyStack) && copyStack.stackSize != 0)
|
||||
{
|
||||
ItemStack itemStack = tileEntity.getStackInSlot(n);
|
||||
|
||||
if (itemStack == null)
|
||||
{
|
||||
tileEntity.setInventorySlotContents(n, item);
|
||||
copyStack.stackSize = 0;
|
||||
} else
|
||||
{
|
||||
if (itemStack.getItem().equals(copyStack.getItem()) && itemStack.getItemDamage() == copyStack.getItemDamage())
|
||||
{
|
||||
int itemSize = itemStack.stackSize;
|
||||
int copySize = copyStack.stackSize;
|
||||
int maxSize = itemStack.getMaxStackSize();
|
||||
|
||||
if (copySize + itemSize < maxSize)
|
||||
{
|
||||
copyStack.stackSize = 0;
|
||||
itemStack.stackSize = itemSize + copySize;
|
||||
tileEntity.setInventorySlotContents(n, itemStack);
|
||||
} else
|
||||
{
|
||||
copyStack.stackSize = itemSize + copySize - maxSize;
|
||||
itemStack.stackSize = maxSize;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(copyStack.stackSize<=0)
|
||||
{
|
||||
itemEntity.setDead();
|
||||
}
|
||||
|
||||
if (copyStack.stackSize > 0)
|
||||
ItemStack newStack = SpellHelper.insertStackIntoInventory(copyStack, tileEntity);
|
||||
|
||||
if(newStack != null && newStack.stackSize < pastAmount)
|
||||
{
|
||||
itemEntity.getEntityItem().stackSize = copyStack.stackSize;
|
||||
}
|
||||
count++;
|
||||
if(newStack.stackSize<=0)
|
||||
{
|
||||
itemEntity.setDead();
|
||||
}
|
||||
|
||||
if (newStack.stackSize > 0)
|
||||
{
|
||||
itemEntity.getEntityItem().stackSize = newStack.stackSize;
|
||||
}
|
||||
if(hasReductus)
|
||||
{
|
||||
this.canDrainReagent(ritualStone, ReagentRegistry.reductusReagent, reductusDrain, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -41,8 +41,8 @@ public class RitualEffectJumping extends RitualEffect
|
|||
int y = ritualStone.getYCoord();
|
||||
int z = ritualStone.getZCoord();
|
||||
|
||||
int range = 0;
|
||||
List<EntityLivingBase> livingList = SpellHelper.getLivingEntitiesInRange(world, x+0.5, y+0.5, z+0.5, range, range);
|
||||
double range = 0.5;
|
||||
List<EntityLivingBase> livingList = SpellHelper.getLivingEntitiesInRange(world, x+0.5, y+1.5, z+0.5, range, range);
|
||||
|
||||
if (currentEssence < this.getCostPerRefresh() * livingList.size())
|
||||
{
|
||||
|
|
|
@ -73,6 +73,10 @@ public class RitualEffectLava extends RitualEffect
|
|||
}else
|
||||
{
|
||||
boolean hasSanctus = this.canDrainReagent(ritualStone, ReagentRegistry.sanctusReagent, sanctusDrain, false);
|
||||
if(!hasSanctus)
|
||||
{
|
||||
return;
|
||||
}
|
||||
TileEntity tile = world.getTileEntity(x, y + 1, z);
|
||||
if(tile instanceof IFluidHandler)
|
||||
{
|
||||
|
|
|
@ -81,8 +81,6 @@ public class RitualEffectLeap extends RitualEffect
|
|||
|
||||
double motionY = hasTerrae ? 0.6 : 1.2;
|
||||
double speed = hasAether ? 6.0 : 3.0;
|
||||
|
||||
|
||||
|
||||
if (!(hasTenebrae || hasSanctus) && livingEntity instanceof EntityPlayer)
|
||||
{
|
||||
|
@ -141,6 +139,15 @@ public class RitualEffectLeap extends RitualEffect
|
|||
break;
|
||||
}
|
||||
|
||||
if(hasTenebrae)
|
||||
{
|
||||
this.canDrainReagent(ritualStone, ReagentRegistry.tenebraeReagent, tenebraeDrain, true);
|
||||
}
|
||||
if(hasSanctus)
|
||||
{
|
||||
this.canDrainReagent(ritualStone, ReagentRegistry.sanctusReagent, sanctusDrain, true);
|
||||
}
|
||||
|
||||
livingEntity.fallDistance = 0;
|
||||
flag++;
|
||||
}
|
||||
|
@ -161,14 +168,7 @@ public class RitualEffectLeap extends RitualEffect
|
|||
this.canDrainReagent(ritualStone, ReagentRegistry.reductusReagent, reductusDrain, true);
|
||||
}
|
||||
}
|
||||
if(hasTenebrae)
|
||||
{
|
||||
this.canDrainReagent(ritualStone, ReagentRegistry.tenebraeReagent, tenebraeDrain, true);
|
||||
}
|
||||
if(hasSanctus)
|
||||
{
|
||||
this.canDrainReagent(ritualStone, ReagentRegistry.sanctusReagent, sanctusDrain, true);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (flag > 0)
|
||||
|
|
|
@ -99,30 +99,44 @@ public class RitualEffectSpawnWard extends RitualEffect
|
|||
@Override
|
||||
public int getCostPerRefresh()
|
||||
{
|
||||
|
||||
return 20;
|
||||
return 15;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RitualComponent> getRitualComponentList()
|
||||
{
|
||||
ArrayList<RitualComponent> animalGrowthRitual = new ArrayList();
|
||||
animalGrowthRitual.add(new RitualComponent(0, 0, 2, RitualComponent.DUSK));
|
||||
animalGrowthRitual.add(new RitualComponent(2, 0, 0, RitualComponent.DUSK));
|
||||
animalGrowthRitual.add(new RitualComponent(0, 0, -2, RitualComponent.DUSK));
|
||||
animalGrowthRitual.add(new RitualComponent(-2, 0, 0, RitualComponent.DUSK));
|
||||
animalGrowthRitual.add(new RitualComponent(0, 0, 1, RitualComponent.DUSK));
|
||||
animalGrowthRitual.add(new RitualComponent(1, 0, 0, RitualComponent.WATER));
|
||||
animalGrowthRitual.add(new RitualComponent(0, 0, -1, RitualComponent.WATER));
|
||||
animalGrowthRitual.add(new RitualComponent(-1, 0, 0, RitualComponent.WATER));
|
||||
animalGrowthRitual.add(new RitualComponent(1, 0, 2, RitualComponent.EARTH));
|
||||
animalGrowthRitual.add(new RitualComponent(-1, 0, 2, RitualComponent.EARTH));
|
||||
animalGrowthRitual.add(new RitualComponent(1, 0, -2, RitualComponent.EARTH));
|
||||
animalGrowthRitual.add(new RitualComponent(-1, 0, -2, RitualComponent.EARTH));
|
||||
animalGrowthRitual.add(new RitualComponent(2, 0, 1, RitualComponent.AIR));
|
||||
animalGrowthRitual.add(new RitualComponent(2, 0, -1, RitualComponent.AIR));
|
||||
animalGrowthRitual.add(new RitualComponent(-2, 0, 1, RitualComponent.AIR));
|
||||
animalGrowthRitual.add(new RitualComponent(-2, 0, -1, RitualComponent.AIR));
|
||||
return animalGrowthRitual;
|
||||
ArrayList<RitualComponent> wardRitualRitual = new ArrayList();
|
||||
|
||||
for(int i=2; i<=4; i++)
|
||||
{
|
||||
if(i <= 3)
|
||||
{
|
||||
wardRitualRitual.add(new RitualComponent(0, 0, i, RitualComponent.AIR));
|
||||
wardRitualRitual.add(new RitualComponent(0, 0, -i, RitualComponent.AIR));
|
||||
wardRitualRitual.add(new RitualComponent(i, 0, 0, RitualComponent.AIR));
|
||||
wardRitualRitual.add(new RitualComponent(-i, 0, 0, RitualComponent.AIR));
|
||||
}
|
||||
|
||||
wardRitualRitual.add(new RitualComponent(i, 0, i, RitualComponent.FIRE));
|
||||
wardRitualRitual.add(new RitualComponent(i, 0, -i, RitualComponent.FIRE));
|
||||
wardRitualRitual.add(new RitualComponent(-i, 0, -i, RitualComponent.FIRE));
|
||||
wardRitualRitual.add(new RitualComponent(-i, 0, i, RitualComponent.FIRE));
|
||||
}
|
||||
|
||||
wardRitualRitual.add(new RitualComponent(0, 0, 5, RitualComponent.DUSK));
|
||||
wardRitualRitual.add(new RitualComponent(0, 0, -5, RitualComponent.DUSK));
|
||||
wardRitualRitual.add(new RitualComponent(5, 0, 0, RitualComponent.DUSK));
|
||||
wardRitualRitual.add(new RitualComponent(-5, 0, 0, RitualComponent.DUSK));
|
||||
|
||||
wardRitualRitual.add(new RitualComponent(6, 0, 5, RitualComponent.WATER));
|
||||
wardRitualRitual.add(new RitualComponent(5, 0, 6, RitualComponent.WATER));
|
||||
wardRitualRitual.add(new RitualComponent(6, 0, -5, RitualComponent.WATER));
|
||||
wardRitualRitual.add(new RitualComponent(-5, 0, 6, RitualComponent.WATER));
|
||||
wardRitualRitual.add(new RitualComponent(-6, 0, 5, RitualComponent.WATER));
|
||||
wardRitualRitual.add(new RitualComponent(5, 0, -6, RitualComponent.WATER));
|
||||
wardRitualRitual.add(new RitualComponent(-6, 0, -5, RitualComponent.WATER));
|
||||
wardRitualRitual.add(new RitualComponent(-5, 0, -6, RitualComponent.WATER));
|
||||
|
||||
return wardRitualRitual;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,6 +11,7 @@ import net.minecraft.potion.PotionEffect;
|
|||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry;
|
||||
import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone;
|
||||
import WayofTime.alchemicalWizardry.api.rituals.RitualComponent;
|
||||
import WayofTime.alchemicalWizardry.api.rituals.RitualEffect;
|
||||
|
@ -20,6 +21,9 @@ import WayofTime.alchemicalWizardry.common.tileEntity.TESpectralContainer;
|
|||
|
||||
public class RitualEffectSupression extends RitualEffect
|
||||
{
|
||||
public static final int aquasalusDrain = 15;
|
||||
public static final int aetherDrain = 15;
|
||||
|
||||
@Override
|
||||
public void performEffect(IMasterRitualStone ritualStone)
|
||||
{
|
||||
|
@ -40,8 +44,12 @@ public class RitualEffectSupression extends RitualEffect
|
|||
int z = ritualStone.getZCoord();
|
||||
|
||||
Block blockish = world.getBlock(x, y-1, z);
|
||||
|
||||
boolean hasAquasalus = this.canDrainReagent(ritualStone, ReagentRegistry.aquasalusReagent, aquasalusDrain, false);
|
||||
boolean hasAether = this.canDrainReagent(ritualStone, ReagentRegistry.aetherReagent, aetherDrain, false);
|
||||
|
||||
int costMod = this.getCostModifier(blockish);
|
||||
int radius = this.getRadiusForModifierBlock(blockish);
|
||||
int radius = this.getRadiusForReagents(hasAether, hasAquasalus);
|
||||
int masterRadius = radius;
|
||||
|
||||
int yIndex = (int)(world.getWorldTime() % (2*radius + 1))-radius;
|
||||
|
@ -100,6 +108,17 @@ public class RitualEffectSupression extends RitualEffect
|
|||
data.currentEssence = currentEssence - this.getCostPerRefresh()*costMod;
|
||||
data.markDirty();
|
||||
|
||||
if(world.getWorldTime() % 100 == 0)
|
||||
{
|
||||
if(hasAquasalus)
|
||||
{
|
||||
this.canDrainReagent(ritualStone, ReagentRegistry.aquasalusReagent, aquasalusDrain, true);
|
||||
}
|
||||
if(hasAether)
|
||||
{
|
||||
this.canDrainReagent(ritualStone, ReagentRegistry.aetherReagent, aetherDrain, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -128,53 +147,51 @@ public class RitualEffectSupression extends RitualEffect
|
|||
return supressionRitual;
|
||||
}
|
||||
|
||||
public int getRadiusForModifierBlock(Block block)
|
||||
{
|
||||
if(block == null)
|
||||
{
|
||||
return 10;
|
||||
}
|
||||
|
||||
if(block == Blocks.diamond_block)
|
||||
{
|
||||
return 30;
|
||||
}
|
||||
|
||||
if(block == Blocks.gold_block)
|
||||
{
|
||||
return 20;
|
||||
}
|
||||
|
||||
if(block == Blocks.iron_block)
|
||||
{
|
||||
return 15;
|
||||
}
|
||||
|
||||
return 10;
|
||||
}
|
||||
|
||||
public int getCostModifier(Block block)
|
||||
{
|
||||
if(block == null)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
if(block == Blocks.diamond_block)
|
||||
{
|
||||
return 20;
|
||||
}
|
||||
|
||||
if(block == Blocks.gold_block)
|
||||
{
|
||||
return 10;
|
||||
}
|
||||
|
||||
if(block == Blocks.iron_block)
|
||||
{
|
||||
return 5;
|
||||
}
|
||||
// if(block == null)
|
||||
// {
|
||||
// return 1;
|
||||
// }
|
||||
//
|
||||
// if(block == Blocks.diamond_block)
|
||||
// {
|
||||
// return 20;
|
||||
// }
|
||||
//
|
||||
// if(block == Blocks.gold_block)
|
||||
// {
|
||||
// return 10;
|
||||
// }
|
||||
//
|
||||
// if(block == Blocks.iron_block)
|
||||
// {
|
||||
// return 5;
|
||||
// }
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
public int getRadiusForReagents(boolean hasAether, boolean hasAquasalus)
|
||||
{
|
||||
if(hasAether)
|
||||
{
|
||||
if(hasAquasalus)
|
||||
{
|
||||
return 30;
|
||||
}else
|
||||
{
|
||||
return 20;
|
||||
}
|
||||
}else
|
||||
{
|
||||
if(hasAquasalus)
|
||||
{
|
||||
return 15;
|
||||
}else
|
||||
{
|
||||
return 10;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,26 +6,29 @@ import java.util.List;
|
|||
|
||||
import net.minecraft.entity.effect.EntityLightningBolt;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.ModBlocks;
|
||||
import WayofTime.alchemicalWizardry.ModItems;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable;
|
||||
import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone;
|
||||
import WayofTime.alchemicalWizardry.api.rituals.RitualComponent;
|
||||
import WayofTime.alchemicalWizardry.api.rituals.RitualEffect;
|
||||
import WayofTime.alchemicalWizardry.api.soulNetwork.LifeEssenceNetwork;
|
||||
import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler;
|
||||
import WayofTime.alchemicalWizardry.common.items.BoundArmour;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
|
||||
import WayofTime.alchemicalWizardry.common.items.sigil.SigilOfHolding;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
|
||||
public class RitualEffectUnbinding extends RitualEffect
|
||||
{
|
||||
public static final int sanctusDrain = 1000;
|
||||
|
||||
@Override
|
||||
public void performEffect(IMasterRitualStone ritualStone)
|
||||
{
|
||||
|
@ -47,14 +50,7 @@ public class RitualEffectUnbinding extends RitualEffect
|
|||
|
||||
if (currentEssence < this.getCostPerRefresh())
|
||||
{
|
||||
EntityPlayer entityOwner = SpellHelper.getPlayerForUsername(owner);
|
||||
|
||||
if (entityOwner == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
entityOwner.addPotionEffect(new PotionEffect(Potion.confusion.id, 80));
|
||||
SoulNetworkHandler.causeNauseaToPlayer(owner);
|
||||
} else
|
||||
{
|
||||
int d0 = 0;
|
||||
|
@ -62,6 +58,8 @@ public class RitualEffectUnbinding extends RitualEffect
|
|||
List list = world.getEntitiesWithinAABB(EntityItem.class, axisalignedbb);
|
||||
Iterator iterator = list.iterator();
|
||||
EntityItem item;
|
||||
|
||||
boolean drain = false;
|
||||
|
||||
while (iterator.hasNext())
|
||||
{
|
||||
|
@ -75,6 +73,24 @@ public class RitualEffectUnbinding extends RitualEffect
|
|||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
boolean hasSanctus = this.canDrainReagent(ritualStone, ReagentRegistry.sanctusReagent, sanctusDrain, false);
|
||||
if(hasSanctus)
|
||||
{
|
||||
if(itemStack.getItem() instanceof IBindable && !EnergyItems.getOwnerName(itemStack).equals(""))
|
||||
{
|
||||
world.addWeatherEffect(new EntityLightningBolt(world, x, y + 1, z - 5));
|
||||
world.addWeatherEffect(new EntityLightningBolt(world, x, y + 1, z + 5));
|
||||
world.addWeatherEffect(new EntityLightningBolt(world, x - 5, y + 1, z));
|
||||
world.addWeatherEffect(new EntityLightningBolt(world, x + 5, y + 1, z));
|
||||
|
||||
EnergyItems.checkAndSetItemOwner(itemStack, "");
|
||||
this.canDrainReagent(ritualStone, ReagentRegistry.sanctusReagent, sanctusDrain, true);
|
||||
drain = true;
|
||||
ritualStone.setActive(false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (itemStack.getItem() == ModItems.boundHelmet)
|
||||
{
|
||||
|
@ -118,6 +134,7 @@ public class RitualEffectUnbinding extends RitualEffect
|
|||
EntityItem newItem = new EntityItem(world, x + 0.5, y + 1, z + 0.5, new ItemStack(ModBlocks.bloodSocket, ritualStone.getVar1()));
|
||||
world.spawnEntityInWorld(newItem);
|
||||
ritualStone.setActive(false);
|
||||
drain = true;
|
||||
break;
|
||||
} else if (ritualStone.getVar1() == -1)
|
||||
{
|
||||
|
@ -144,17 +161,24 @@ public class RitualEffectUnbinding extends RitualEffect
|
|||
EntityItem newItem = new EntityItem(world, x + 0.5, y + 1, z + 0.5, new ItemStack(ModItems.sigilOfHolding, 1, 0));
|
||||
world.spawnEntityInWorld(newItem);
|
||||
ritualStone.setActive(false);
|
||||
drain = true;
|
||||
break;
|
||||
}
|
||||
|
||||
if (world.rand.nextInt(10) == 0)
|
||||
{
|
||||
SpellHelper.sendIndexedParticleToAllAround(world, x, y, z, 20, world.provider.dimensionId, 1, x, y, z);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
data.currentEssence = currentEssence - this.getCostPerRefresh();
|
||||
data.markDirty();
|
||||
if(drain)
|
||||
{
|
||||
data.currentEssence = currentEssence - this.getCostPerRefresh();
|
||||
data.markDirty();
|
||||
}
|
||||
}
|
||||
|
||||
if (world.rand.nextInt(10) == 0)
|
||||
{
|
||||
SpellHelper.sendIndexedParticleToAllAround(world, x, y, z, 20, world.provider.dimensionId, 1, x, y, z);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -99,30 +99,61 @@ public class RitualEffectVeilOfEvil extends RitualEffect
|
|||
@Override
|
||||
public int getCostPerRefresh()
|
||||
{
|
||||
|
||||
return 20;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RitualComponent> getRitualComponentList()
|
||||
{
|
||||
ArrayList<RitualComponent> animalGrowthRitual = new ArrayList();
|
||||
animalGrowthRitual.add(new RitualComponent(0, 0, 2, RitualComponent.DUSK));
|
||||
animalGrowthRitual.add(new RitualComponent(2, 0, 0, RitualComponent.DUSK));
|
||||
animalGrowthRitual.add(new RitualComponent(0, 0, -2, RitualComponent.DUSK));
|
||||
animalGrowthRitual.add(new RitualComponent(-2, 0, 0, RitualComponent.DUSK));
|
||||
animalGrowthRitual.add(new RitualComponent(0, 0, 1, RitualComponent.DUSK));
|
||||
animalGrowthRitual.add(new RitualComponent(1, 0, 0, RitualComponent.WATER));
|
||||
animalGrowthRitual.add(new RitualComponent(0, 0, -1, RitualComponent.WATER));
|
||||
animalGrowthRitual.add(new RitualComponent(-1, 0, 0, RitualComponent.WATER));
|
||||
animalGrowthRitual.add(new RitualComponent(1, 0, 2, RitualComponent.EARTH));
|
||||
animalGrowthRitual.add(new RitualComponent(-1, 0, 2, RitualComponent.EARTH));
|
||||
animalGrowthRitual.add(new RitualComponent(1, 0, -2, RitualComponent.EARTH));
|
||||
animalGrowthRitual.add(new RitualComponent(-1, 0, -2, RitualComponent.EARTH));
|
||||
animalGrowthRitual.add(new RitualComponent(2, 0, 1, RitualComponent.AIR));
|
||||
animalGrowthRitual.add(new RitualComponent(2, 0, -1, RitualComponent.AIR));
|
||||
animalGrowthRitual.add(new RitualComponent(-2, 0, 1, RitualComponent.AIR));
|
||||
animalGrowthRitual.add(new RitualComponent(-2, 0, -1, RitualComponent.AIR));
|
||||
return animalGrowthRitual;
|
||||
ArrayList<RitualComponent> veilRitual = new ArrayList();
|
||||
|
||||
veilRitual.add(new RitualComponent(1, 0, 2, RitualComponent.DUSK));
|
||||
veilRitual.add(new RitualComponent(2, 0, 1, RitualComponent.DUSK));
|
||||
veilRitual.add(new RitualComponent(1, 0, -2, RitualComponent.DUSK));
|
||||
veilRitual.add(new RitualComponent(-2, 0, 1, RitualComponent.DUSK));
|
||||
veilRitual.add(new RitualComponent(-1, 0, 2, RitualComponent.DUSK));
|
||||
veilRitual.add(new RitualComponent(2, 0, -1, RitualComponent.DUSK));
|
||||
veilRitual.add(new RitualComponent(-1, 0, -2, RitualComponent.DUSK));
|
||||
veilRitual.add(new RitualComponent(-2, 0, -1, RitualComponent.DUSK));
|
||||
|
||||
veilRitual.add(new RitualComponent(3, 0, 3, RitualComponent.FIRE));
|
||||
veilRitual.add(new RitualComponent(-3, 0, 3, RitualComponent.FIRE));
|
||||
veilRitual.add(new RitualComponent(3, 0, -3, RitualComponent.FIRE));
|
||||
veilRitual.add(new RitualComponent(-3, 0, -3, RitualComponent.FIRE));
|
||||
|
||||
for(int i=0; i<=1; i++)
|
||||
{
|
||||
veilRitual.add(new RitualComponent((4+i), i, 0, RitualComponent.DUSK));
|
||||
veilRitual.add(new RitualComponent((4+i), i, -1, RitualComponent.BLANK));
|
||||
veilRitual.add(new RitualComponent((4+i), i, 1, RitualComponent.BLANK));
|
||||
|
||||
veilRitual.add(new RitualComponent(-(4+i), i, 0, RitualComponent.DUSK));
|
||||
veilRitual.add(new RitualComponent(-(4+i), i, -1, RitualComponent.BLANK));
|
||||
veilRitual.add(new RitualComponent(-(4+i), i, 1, RitualComponent.BLANK));
|
||||
|
||||
veilRitual.add(new RitualComponent(0, i, (4+i), RitualComponent.DUSK));
|
||||
veilRitual.add(new RitualComponent(1, i, (4+i), RitualComponent.BLANK));
|
||||
veilRitual.add(new RitualComponent(-1, i, (4+i), RitualComponent.BLANK));
|
||||
|
||||
veilRitual.add(new RitualComponent(0, i, -(4+i), RitualComponent.DUSK));
|
||||
veilRitual.add(new RitualComponent(1, i, -(4+i), RitualComponent.BLANK));
|
||||
veilRitual.add(new RitualComponent(-1, i, -(4+i), RitualComponent.BLANK));
|
||||
|
||||
veilRitual.add(new RitualComponent(4, i, 5, RitualComponent.EARTH));
|
||||
veilRitual.add(new RitualComponent(5, i, 4, RitualComponent.EARTH));
|
||||
veilRitual.add(new RitualComponent(4, i, -5, RitualComponent.EARTH));
|
||||
veilRitual.add(new RitualComponent(-5, i, 4, RitualComponent.EARTH));
|
||||
veilRitual.add(new RitualComponent(-4, i, 5, RitualComponent.EARTH));
|
||||
veilRitual.add(new RitualComponent(5, i, -4, RitualComponent.EARTH));
|
||||
veilRitual.add(new RitualComponent(-4, i, -5, RitualComponent.EARTH));
|
||||
veilRitual.add(new RitualComponent(-5, i, -4, RitualComponent.EARTH));
|
||||
}
|
||||
|
||||
veilRitual.add(new RitualComponent(5, 1, 5, RitualComponent.BLANK));
|
||||
veilRitual.add(new RitualComponent(-5, 1, 5, RitualComponent.BLANK));
|
||||
veilRitual.add(new RitualComponent(5, 1, -5, RitualComponent.BLANK));
|
||||
veilRitual.add(new RitualComponent(-5, 1, -5, RitualComponent.BLANK));
|
||||
|
||||
return veilRitual;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -97,7 +97,7 @@ public class RitualEffectWater extends RitualEffect
|
|||
|
||||
if(hasReductus && this.canDrainReagent(ritualStone, ReagentRegistry.reductusReagent, reductusDrain, false))
|
||||
{
|
||||
if(entity instanceof EntityPlayer)
|
||||
if(livingEntity instanceof EntityPlayer)
|
||||
{
|
||||
if(drainReductus)
|
||||
{
|
||||
|
@ -138,6 +138,10 @@ public class RitualEffectWater extends RitualEffect
|
|||
}else
|
||||
{
|
||||
boolean hasSanctus = this.canDrainReagent(ritualStone, ReagentRegistry.sanctusReagent, sanctusDrain, false);
|
||||
if(!hasSanctus)
|
||||
{
|
||||
return;
|
||||
}
|
||||
TileEntity tile = world.getTileEntity(x, y + 1, z);
|
||||
if(tile instanceof IFluidHandler)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue