1.0.1d push
This commit is contained in:
parent
e13818e2da
commit
1c0deadfc6
129 changed files with 4403 additions and 2247 deletions
|
@ -1,43 +0,0 @@
|
|||
package WayofTime.alchemicalWizardry.common.rituals;
|
||||
|
||||
public class RitualComponent
|
||||
{
|
||||
private int x;
|
||||
private int y;
|
||||
private int z;
|
||||
private int stoneType;
|
||||
public static final int BLANK = 0;
|
||||
public static final int WATER = 1;
|
||||
public static final int FIRE = 2;
|
||||
public static final int EARTH = 3;
|
||||
public static final int AIR = 4;
|
||||
public static final int DUSK = 5;
|
||||
|
||||
public RitualComponent(int x, int y, int z, int stoneType)
|
||||
{
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
this.z = z;
|
||||
this.stoneType = stoneType;
|
||||
}
|
||||
|
||||
public int getX()
|
||||
{
|
||||
return this.x;
|
||||
}
|
||||
|
||||
public int getY()
|
||||
{
|
||||
return this.y;
|
||||
}
|
||||
|
||||
public int getZ()
|
||||
{
|
||||
return this.z;
|
||||
}
|
||||
|
||||
public int getStoneType()
|
||||
{
|
||||
return this.stoneType;
|
||||
}
|
||||
}
|
|
@ -1,15 +0,0 @@
|
|||
package WayofTime.alchemicalWizardry.common.rituals;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone;
|
||||
|
||||
public abstract class RitualEffect
|
||||
{
|
||||
public abstract void performEffect(TEMasterStone ritualStone);
|
||||
|
||||
public abstract int getCostPerRefresh();
|
||||
|
||||
public int getInitialCooldown()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
|
@ -1,5 +1,6 @@
|
|||
package WayofTime.alchemicalWizardry.common.rituals;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
|
@ -10,13 +11,15 @@ import net.minecraft.potion.PotionEffect;
|
|||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.common.LifeEssenceNetwork;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone;
|
||||
import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone;
|
||||
import WayofTime.alchemicalWizardry.api.rituals.RitualComponent;
|
||||
import WayofTime.alchemicalWizardry.api.rituals.RitualEffect;
|
||||
import WayofTime.alchemicalWizardry.api.soulNetwork.LifeEssenceNetwork;
|
||||
|
||||
public class RitualEffectAnimalGrowth extends RitualEffect
|
||||
{
|
||||
@Override
|
||||
public void performEffect(TEMasterStone ritualStone)
|
||||
public void performEffect(IMasterRitualStone ritualStone)
|
||||
{
|
||||
String owner = ritualStone.getOwner();
|
||||
World worldSave = MinecraftServer.getServer().worldServers[0];
|
||||
|
@ -29,10 +32,10 @@ public class RitualEffectAnimalGrowth extends RitualEffect
|
|||
}
|
||||
|
||||
int currentEssence = data.currentEssence;
|
||||
World world = ritualStone.getWorldObj();
|
||||
int x = ritualStone.xCoord;
|
||||
int y = ritualStone.yCoord;
|
||||
int z = ritualStone.zCoord;
|
||||
World world = ritualStone.getWorld();
|
||||
int x = ritualStone.getXCoord();
|
||||
int y = ritualStone.getYCoord();
|
||||
int z = ritualStone.getZCoord();
|
||||
|
||||
if (world.getWorldTime() % 20 != 0)
|
||||
{
|
||||
|
@ -87,7 +90,30 @@ public class RitualEffectAnimalGrowth extends RitualEffect
|
|||
@Override
|
||||
public int getCostPerRefresh()
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
return 2;
|
||||
}
|
||||
|
||||
@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.WATER));
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,19 +1,22 @@
|
|||
package WayofTime.alchemicalWizardry.common.rituals;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.common.LifeEssenceNetwork;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone;
|
||||
import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone;
|
||||
import WayofTime.alchemicalWizardry.api.rituals.RitualComponent;
|
||||
import WayofTime.alchemicalWizardry.api.rituals.RitualEffect;
|
||||
import WayofTime.alchemicalWizardry.api.soulNetwork.LifeEssenceNetwork;
|
||||
|
||||
public class RitualEffectApiaryOverclock extends RitualEffect
|
||||
{
|
||||
@Override
|
||||
public void performEffect(TEMasterStone ritualStone)
|
||||
public void performEffect(IMasterRitualStone ritualStone)
|
||||
{
|
||||
String owner = ritualStone.getOwner();
|
||||
World worldSave = MinecraftServer.getServer().worldServers[0];
|
||||
|
@ -26,10 +29,10 @@ public class RitualEffectApiaryOverclock extends RitualEffect
|
|||
}
|
||||
|
||||
int currentEssence = data.currentEssence;
|
||||
World world = ritualStone.getWorldObj();
|
||||
int x = ritualStone.xCoord;
|
||||
int y = ritualStone.yCoord;
|
||||
int z = ritualStone.zCoord;
|
||||
World world = ritualStone.getWorld();
|
||||
int x = ritualStone.getXCoord();
|
||||
int y = ritualStone.getYCoord();
|
||||
int z = ritualStone.getZCoord();
|
||||
|
||||
|
||||
if (currentEssence < this.getCostPerRefresh())
|
||||
|
@ -78,4 +81,19 @@ public class RitualEffectApiaryOverclock extends RitualEffect
|
|||
// TODO Auto-generated method stub
|
||||
return 10;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RitualComponent> getRitualComponentList()
|
||||
{
|
||||
ArrayList<RitualComponent> apiaryRitual = new ArrayList();
|
||||
apiaryRitual.add(new RitualComponent(1,0,0, RitualComponent.DUSK));
|
||||
apiaryRitual.add(new RitualComponent(1,0,1, RitualComponent.DUSK));
|
||||
apiaryRitual.add(new RitualComponent(1,0,-1, RitualComponent.DUSK));
|
||||
apiaryRitual.add(new RitualComponent(-1,0,-1, RitualComponent.DUSK));
|
||||
apiaryRitual.add(new RitualComponent(-1,0,1, RitualComponent.DUSK));
|
||||
apiaryRitual.add(new RitualComponent(-1,0,0, RitualComponent.DUSK));
|
||||
apiaryRitual.add(new RitualComponent(0,0,-1, RitualComponent.DUSK));
|
||||
apiaryRitual.add(new RitualComponent(0,0,1, RitualComponent.DUSK));
|
||||
return apiaryRitual;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,430 @@
|
|||
package WayofTime.alchemicalWizardry.common.rituals;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry;
|
||||
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.common.tileEntity.TEAltar;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEWritingTable;
|
||||
|
||||
public class RitualEffectAutoAlchemy extends RitualEffect
|
||||
{
|
||||
@Override
|
||||
public void performEffect(IMasterRitualStone ritualStone)
|
||||
{
|
||||
String owner = ritualStone.getOwner();
|
||||
World worldSave = MinecraftServer.getServer().worldServers[0];
|
||||
LifeEssenceNetwork data = (LifeEssenceNetwork) worldSave.loadItemData(LifeEssenceNetwork.class, owner);
|
||||
|
||||
if (data == null)
|
||||
{
|
||||
data = new LifeEssenceNetwork(owner);
|
||||
worldSave.setItemData(owner, data);
|
||||
}
|
||||
|
||||
int currentEssence = data.currentEssence;
|
||||
World world = ritualStone.getWorld();
|
||||
int x = ritualStone.getXCoord();
|
||||
int y = ritualStone.getYCoord();
|
||||
int z = ritualStone.getZCoord();
|
||||
|
||||
if (currentEssence < this.getCostPerRefresh()*6)
|
||||
{
|
||||
EntityPlayer entityOwner = MinecraftServer.getServer().getConfigurationManager().getPlayerForUsername(owner);
|
||||
|
||||
if (entityOwner == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
entityOwner.addPotionEffect(new PotionEffect(Potion.confusion.id, 80));
|
||||
} else
|
||||
{
|
||||
int flag = 0;
|
||||
|
||||
TileEntity topEntity = world.getTileEntity(x, y+1, z);
|
||||
if(!(topEntity instanceof TEAltar))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
TEAltar tileAltar = (TEAltar)topEntity;
|
||||
ItemStack targetStack = tileAltar.getStackInSlot(0);
|
||||
if(targetStack == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
ItemStack[] recipe = AlchemyRecipeRegistry.getRecipeForItemStack(targetStack);
|
||||
if(recipe!=null)
|
||||
{
|
||||
TEWritingTable alchemyEntity;
|
||||
IInventory outputInv = null;
|
||||
IInventory inputInv1 = null;
|
||||
IInventory inputInv2 = null;
|
||||
|
||||
TileEntity northEntity = world.getTileEntity(x,y,z-1);
|
||||
TileEntity southEntity = world.getTileEntity(x,y,z+1);
|
||||
TileEntity eastEntity = world.getTileEntity(x+1,y,z);
|
||||
TileEntity westEntity = world.getTileEntity(x-1,y,z);
|
||||
|
||||
if(northEntity instanceof TEWritingTable)
|
||||
{
|
||||
alchemyEntity = (TEWritingTable)northEntity;
|
||||
if(southEntity instanceof IInventory && !(southEntity instanceof TEWritingTable))
|
||||
{
|
||||
outputInv = (IInventory)southEntity;
|
||||
}
|
||||
if(eastEntity instanceof IInventory && !(eastEntity instanceof TEWritingTable))
|
||||
{
|
||||
inputInv1 = (IInventory)eastEntity;
|
||||
}
|
||||
if(westEntity instanceof IInventory && !(westEntity instanceof TEWritingTable))
|
||||
{
|
||||
inputInv2 = (IInventory)westEntity;
|
||||
}
|
||||
}else if(southEntity instanceof TEWritingTable)
|
||||
{
|
||||
alchemyEntity = (TEWritingTable)southEntity;
|
||||
if(northEntity instanceof IInventory && !(northEntity instanceof TEWritingTable))
|
||||
{
|
||||
outputInv = (IInventory)northEntity;
|
||||
}
|
||||
if(eastEntity instanceof IInventory && !(eastEntity instanceof TEWritingTable))
|
||||
{
|
||||
inputInv1 = (IInventory)eastEntity;
|
||||
}
|
||||
if(westEntity instanceof IInventory && !(westEntity instanceof TEWritingTable))
|
||||
{
|
||||
inputInv2 = (IInventory)westEntity;
|
||||
}
|
||||
}else if(eastEntity instanceof TEWritingTable)
|
||||
{
|
||||
alchemyEntity = (TEWritingTable)eastEntity;
|
||||
if(westEntity instanceof IInventory && !(westEntity instanceof TEWritingTable))
|
||||
{
|
||||
outputInv = (IInventory)westEntity;
|
||||
}
|
||||
if(northEntity instanceof IInventory && !(northEntity instanceof TEWritingTable))
|
||||
{
|
||||
inputInv1 = (IInventory)northEntity;
|
||||
}
|
||||
if(southEntity instanceof IInventory && !(southEntity instanceof TEWritingTable))
|
||||
{
|
||||
inputInv2 = (IInventory)southEntity;
|
||||
}
|
||||
}else if(westEntity instanceof TEWritingTable)
|
||||
{
|
||||
alchemyEntity = (TEWritingTable)westEntity;
|
||||
if(eastEntity instanceof IInventory && !(eastEntity instanceof TEWritingTable))
|
||||
{
|
||||
outputInv = (IInventory)eastEntity;
|
||||
}
|
||||
if(northEntity instanceof IInventory && !(northEntity instanceof TEWritingTable))
|
||||
{
|
||||
inputInv1 = (IInventory)northEntity;
|
||||
}
|
||||
if(southEntity instanceof IInventory && !(southEntity instanceof TEWritingTable))
|
||||
{
|
||||
inputInv2 = (IInventory)southEntity;
|
||||
}
|
||||
}else
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if(outputInv!=null)
|
||||
{
|
||||
ItemStack outputStack = alchemyEntity.getStackInSlot(6);
|
||||
if(outputStack!=null)
|
||||
{
|
||||
for(int i=0; i<outputInv.getSizeInventory(); i++)
|
||||
{
|
||||
ItemStack curStack = outputInv.getStackInSlot(i);
|
||||
if(curStack==null)
|
||||
{
|
||||
ItemStack copyStack = outputStack.copy();
|
||||
copyStack.stackSize = 1;
|
||||
|
||||
outputStack.stackSize--;
|
||||
if(outputStack.stackSize<=0)
|
||||
{
|
||||
alchemyEntity.setInventorySlotContents(6, null);
|
||||
}else
|
||||
{
|
||||
alchemyEntity.setInventorySlotContents(6, outputStack);
|
||||
}
|
||||
|
||||
outputInv.setInventorySlotContents(i, copyStack);
|
||||
flag++;
|
||||
break;
|
||||
}
|
||||
else if(curStack.isItemEqual(outputStack)&&curStack.stackSize<curStack.getMaxStackSize())
|
||||
{
|
||||
outputStack.stackSize--;
|
||||
if(outputStack.stackSize<=0)
|
||||
{
|
||||
alchemyEntity.setInventorySlotContents(6, null);
|
||||
}else
|
||||
{
|
||||
alchemyEntity.setInventorySlotContents(6, outputStack);
|
||||
}
|
||||
|
||||
curStack.stackSize++;
|
||||
outputInv.setInventorySlotContents(i, curStack);
|
||||
flag++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for(int i=0; i<5;i++)
|
||||
{
|
||||
ItemStack recItem;
|
||||
if(recipe.length<=i)
|
||||
{
|
||||
recItem = null;
|
||||
}
|
||||
else
|
||||
{
|
||||
recItem = recipe[i];
|
||||
}
|
||||
|
||||
ItemStack alchStack = alchemyEntity.getStackInSlot(i+1);
|
||||
if((recItem==null&&alchStack!=null) || (alchStack!=null&&!(areItemStacksEqualWithWildcard(recItem,alchStack))))
|
||||
{
|
||||
for(int j=0;j<outputInv.getSizeInventory();j++)
|
||||
{
|
||||
ItemStack curStack = outputInv.getStackInSlot(j);
|
||||
if(curStack==null)
|
||||
{
|
||||
ItemStack copyStack = alchStack.copy();
|
||||
copyStack.stackSize = 1;
|
||||
|
||||
alchStack.stackSize--;
|
||||
if(alchStack.stackSize<=0)
|
||||
{
|
||||
alchemyEntity.setInventorySlotContents(i+1, null);
|
||||
}else
|
||||
{
|
||||
alchemyEntity.setInventorySlotContents(i+1, alchStack);
|
||||
}
|
||||
|
||||
outputInv.setInventorySlotContents(j, copyStack);
|
||||
flag++;
|
||||
break;
|
||||
}
|
||||
else if(curStack.isItemEqual(alchStack)&&curStack.stackSize<curStack.getMaxStackSize())
|
||||
{
|
||||
alchStack.stackSize--;
|
||||
if(alchStack.stackSize<=0)
|
||||
{
|
||||
alchemyEntity.setInventorySlotContents(i+1, null);
|
||||
}else
|
||||
{
|
||||
alchemyEntity.setInventorySlotContents(i+1, alchStack);
|
||||
}
|
||||
|
||||
curStack.stackSize++;
|
||||
outputInv.setInventorySlotContents(j, curStack);
|
||||
flag++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if(world.getWorldTime()%10 == 0)
|
||||
{
|
||||
if(flag==0&&inputInv1!=null)
|
||||
{
|
||||
for(int i=0;i<recipe.length;i++)
|
||||
{
|
||||
ItemStack recItem = recipe[i];
|
||||
if(recItem==null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
ItemStack alchStack = alchemyEntity.getStackInSlot(i+1);
|
||||
|
||||
if(alchStack!=null&&((!areItemStacksEqualWithWildcard(recItem,alchStack))||alchStack.stackSize>=alchStack.getMaxStackSize()))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
for(int j=0;j<inputInv1.getSizeInventory();j++)
|
||||
{
|
||||
ItemStack curItem = inputInv1.getStackInSlot(j);
|
||||
if(curItem==null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
if(areItemStacksEqualWithWildcard(recItem,curItem))
|
||||
{
|
||||
if(alchStack==null)
|
||||
{
|
||||
ItemStack copyStack = recItem.copy();
|
||||
copyStack.stackSize = 1;
|
||||
alchemyEntity.setInventorySlotContents(i+1, copyStack);
|
||||
|
||||
curItem.stackSize--;
|
||||
if(curItem.stackSize<=0)
|
||||
{
|
||||
inputInv1.setInventorySlotContents(j, null);
|
||||
}else
|
||||
{
|
||||
inputInv1.setInventorySlotContents(j, curItem);
|
||||
}
|
||||
|
||||
flag++;
|
||||
break;
|
||||
|
||||
}else
|
||||
{
|
||||
alchStack.stackSize++;
|
||||
alchemyEntity.setInventorySlotContents(i+1, alchStack);
|
||||
|
||||
curItem.stackSize--;
|
||||
if(curItem.stackSize<=0)
|
||||
{
|
||||
inputInv1.setInventorySlotContents(j, null);
|
||||
}else
|
||||
{
|
||||
inputInv1.setInventorySlotContents(j, curItem);
|
||||
}
|
||||
|
||||
flag++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if(flag==0&&inputInv2!=null)
|
||||
{
|
||||
for(int i=0;i<recipe.length;i++)
|
||||
{
|
||||
ItemStack recItem = recipe[i];
|
||||
if(recItem==null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
ItemStack alchStack = alchemyEntity.getStackInSlot(i+1);
|
||||
if(alchStack!=null&&((!areItemStacksEqualWithWildcard(recItem,alchStack))||alchStack.stackSize>=alchStack.getMaxStackSize()))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
for(int j=0;j<inputInv2.getSizeInventory();j++)
|
||||
{
|
||||
ItemStack curItem = inputInv2.getStackInSlot(j);
|
||||
if(curItem==null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
if(areItemStacksEqualWithWildcard(recItem,curItem))
|
||||
{
|
||||
if(alchStack==null)
|
||||
{
|
||||
ItemStack copyStack = recItem.copy();
|
||||
copyStack.stackSize = 1;
|
||||
alchemyEntity.setInventorySlotContents(i+1, copyStack);
|
||||
|
||||
curItem.stackSize--;
|
||||
if(curItem.stackSize<=0)
|
||||
{
|
||||
inputInv2.setInventorySlotContents(j, null);
|
||||
}else
|
||||
{
|
||||
inputInv2.setInventorySlotContents(j, curItem);
|
||||
}
|
||||
|
||||
flag++;
|
||||
break;
|
||||
|
||||
}else
|
||||
{
|
||||
alchStack.stackSize++;
|
||||
alchemyEntity.setInventorySlotContents(i+1, alchStack);
|
||||
|
||||
curItem.stackSize--;
|
||||
if(curItem.stackSize<=0)
|
||||
{
|
||||
inputInv2.setInventorySlotContents(j, null);
|
||||
}else
|
||||
{
|
||||
inputInv2.setInventorySlotContents(j, curItem);
|
||||
}
|
||||
|
||||
flag++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (flag>0)
|
||||
{
|
||||
world.markBlockForUpdate(x, y, z+1);
|
||||
world.markBlockForUpdate(x, y, z-1);
|
||||
world.markBlockForUpdate(x+1, y, z);
|
||||
world.markBlockForUpdate(x-1, y, z);
|
||||
data.currentEssence = currentEssence - this.getCostPerRefresh()*flag;
|
||||
data.markDirty();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCostPerRefresh()
|
||||
{
|
||||
return 10;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RitualComponent> getRitualComponentList()
|
||||
{
|
||||
ArrayList<RitualComponent> autoAlchemyRitual = new ArrayList();
|
||||
autoAlchemyRitual.add(new RitualComponent(1,0,1, RitualComponent.DUSK));
|
||||
autoAlchemyRitual.add(new RitualComponent(1,0,-1, RitualComponent.DUSK));
|
||||
autoAlchemyRitual.add(new RitualComponent(-1,0,-1, RitualComponent.DUSK));
|
||||
autoAlchemyRitual.add(new RitualComponent(-1,0,1, RitualComponent.DUSK));
|
||||
autoAlchemyRitual.add(new RitualComponent(2,0,2, RitualComponent.WATER));
|
||||
autoAlchemyRitual.add(new RitualComponent(2,0,-2, RitualComponent.WATER));
|
||||
autoAlchemyRitual.add(new RitualComponent(-2,0,-2, RitualComponent.WATER));
|
||||
autoAlchemyRitual.add(new RitualComponent(-2,0,2, RitualComponent.WATER));
|
||||
autoAlchemyRitual.add(new RitualComponent(-3,0,-2, RitualComponent.FIRE));
|
||||
autoAlchemyRitual.add(new RitualComponent(-2,0,-3, RitualComponent.FIRE));
|
||||
autoAlchemyRitual.add(new RitualComponent(-3,0,2, RitualComponent.FIRE));
|
||||
autoAlchemyRitual.add(new RitualComponent(-2,0,3, RitualComponent.FIRE));
|
||||
autoAlchemyRitual.add(new RitualComponent(3,0,-2, RitualComponent.FIRE));
|
||||
autoAlchemyRitual.add(new RitualComponent(2,0,-3, RitualComponent.FIRE));
|
||||
autoAlchemyRitual.add(new RitualComponent(3,0,2, RitualComponent.FIRE));
|
||||
autoAlchemyRitual.add(new RitualComponent(2,0,3, RitualComponent.FIRE));
|
||||
return autoAlchemyRitual;
|
||||
}
|
||||
|
||||
public boolean areItemStacksEqualWithWildcard(ItemStack recipeStack, ItemStack comparedStack)
|
||||
{
|
||||
return recipeStack.isItemEqual(comparedStack) || (recipeStack.getItemDamage() == OreDictionary.WILDCARD_VALUE && recipeStack.getItem() == comparedStack.getItem());
|
||||
}
|
||||
}
|
|
@ -1,5 +1,8 @@
|
|||
package WayofTime.alchemicalWizardry.common.rituals;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.effect.EntityLightningBolt;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
@ -16,14 +19,16 @@ import net.minecraft.world.World;
|
|||
import net.minecraft.world.biome.BiomeGenBase;
|
||||
import net.minecraft.world.chunk.Chunk;
|
||||
import WayofTime.alchemicalWizardry.ModBlocks;
|
||||
import WayofTime.alchemicalWizardry.common.LifeEssenceNetwork;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone;
|
||||
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.common.tileEntity.TEPlinth;
|
||||
|
||||
public class RitualEffectBiomeChanger extends RitualEffect
|
||||
{
|
||||
@Override
|
||||
public void performEffect(TEMasterStone ritualStone)
|
||||
public void performEffect(IMasterRitualStone ritualStone)
|
||||
{
|
||||
String owner = ritualStone.getOwner();
|
||||
World worldSave = MinecraftServer.getServer().worldServers[0];
|
||||
|
@ -36,24 +41,25 @@ public class RitualEffectBiomeChanger extends RitualEffect
|
|||
}
|
||||
|
||||
int cooldown = ritualStone.getCooldown();
|
||||
|
||||
World world = ritualStone.getWorld();
|
||||
int x = ritualStone.getXCoord();
|
||||
int y = ritualStone.getYCoord();
|
||||
int z = ritualStone.getZCoord();
|
||||
if (cooldown > 0)
|
||||
{
|
||||
ritualStone.setCooldown(cooldown - 1);
|
||||
|
||||
if (ritualStone.getWorldObj().rand.nextInt(15) == 0)
|
||||
if (world.rand.nextInt(15) == 0)
|
||||
{
|
||||
ritualStone.getWorldObj().addWeatherEffect(new EntityLightningBolt(ritualStone.getWorldObj(), ritualStone.xCoord - 1 + ritualStone.getWorldObj().rand.nextInt(3), ritualStone.yCoord + 1, ritualStone.zCoord - 1 + ritualStone.getWorldObj().rand.nextInt(3)));
|
||||
world.addWeatherEffect(new EntityLightningBolt(world, x - 1 + world.rand.nextInt(3), y + 1, z - 1 + world.rand.nextInt(3)));
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
int currentEssence = data.currentEssence;
|
||||
World world = ritualStone.getWorldObj();
|
||||
int x = ritualStone.xCoord;
|
||||
int y = ritualStone.yCoord;
|
||||
int z = ritualStone.zCoord;
|
||||
|
||||
|
||||
int range = 10;
|
||||
|
||||
if (currentEssence < this.getCostPerRefresh())
|
||||
|
@ -315,4 +321,127 @@ public class RitualEffectBiomeChanger extends RitualEffect
|
|||
{
|
||||
return 200;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RitualComponent> getRitualComponentList()
|
||||
{
|
||||
ArrayList<RitualComponent> biomeChangerRitual = new ArrayList();
|
||||
biomeChangerRitual.add(new RitualComponent(1, 0, -2, RitualComponent.AIR));
|
||||
biomeChangerRitual.add(new RitualComponent(1, 0, -3, RitualComponent.AIR));
|
||||
biomeChangerRitual.add(new RitualComponent(2, 0, -1, RitualComponent.AIR));
|
||||
biomeChangerRitual.add(new RitualComponent(3, 0, -1, RitualComponent.AIR));
|
||||
biomeChangerRitual.add(new RitualComponent(1, 0, 2, RitualComponent.AIR));
|
||||
biomeChangerRitual.add(new RitualComponent(1, 0, 3, RitualComponent.AIR));
|
||||
biomeChangerRitual.add(new RitualComponent(2, 0, 1, RitualComponent.AIR));
|
||||
biomeChangerRitual.add(new RitualComponent(3, 0, 1, RitualComponent.AIR));
|
||||
biomeChangerRitual.add(new RitualComponent(-1, 0, -2, RitualComponent.AIR));
|
||||
biomeChangerRitual.add(new RitualComponent(-1, 0, -3, RitualComponent.AIR));
|
||||
biomeChangerRitual.add(new RitualComponent(-2, 0, -1, RitualComponent.AIR));
|
||||
biomeChangerRitual.add(new RitualComponent(-3, 0, -1, RitualComponent.AIR));
|
||||
biomeChangerRitual.add(new RitualComponent(-1, 0, 2, RitualComponent.AIR));
|
||||
biomeChangerRitual.add(new RitualComponent(-1, 0, 3, RitualComponent.AIR));
|
||||
biomeChangerRitual.add(new RitualComponent(-2, 0, 1, RitualComponent.AIR));
|
||||
biomeChangerRitual.add(new RitualComponent(-3, 0, 1, RitualComponent.AIR));
|
||||
biomeChangerRitual.add(new RitualComponent(3, 0, -3, RitualComponent.EARTH));
|
||||
biomeChangerRitual.add(new RitualComponent(3, 0, -4, RitualComponent.EARTH));
|
||||
biomeChangerRitual.add(new RitualComponent(4, 0, -3, RitualComponent.EARTH));
|
||||
biomeChangerRitual.add(new RitualComponent(4, 0, -5, RitualComponent.FIRE));
|
||||
biomeChangerRitual.add(new RitualComponent(5, 0, -4, RitualComponent.FIRE));
|
||||
biomeChangerRitual.add(new RitualComponent(3, 0, 3, RitualComponent.EARTH));
|
||||
biomeChangerRitual.add(new RitualComponent(3, 0, 4, RitualComponent.EARTH));
|
||||
biomeChangerRitual.add(new RitualComponent(4, 0, 3, RitualComponent.EARTH));
|
||||
biomeChangerRitual.add(new RitualComponent(4, 0, 5, RitualComponent.FIRE));
|
||||
biomeChangerRitual.add(new RitualComponent(5, 0, 4, RitualComponent.FIRE));
|
||||
biomeChangerRitual.add(new RitualComponent(-3, 0, 3, RitualComponent.EARTH));
|
||||
biomeChangerRitual.add(new RitualComponent(-3, 0, 4, RitualComponent.EARTH));
|
||||
biomeChangerRitual.add(new RitualComponent(-4, 0, 3, RitualComponent.EARTH));
|
||||
biomeChangerRitual.add(new RitualComponent(-4, 0, 5, RitualComponent.FIRE));
|
||||
biomeChangerRitual.add(new RitualComponent(-5, 0, 4, RitualComponent.FIRE));
|
||||
biomeChangerRitual.add(new RitualComponent(-3, 0, -3, RitualComponent.EARTH));
|
||||
biomeChangerRitual.add(new RitualComponent(-3, 0, -4, RitualComponent.EARTH));
|
||||
biomeChangerRitual.add(new RitualComponent(-4, 0, -3, RitualComponent.EARTH));
|
||||
biomeChangerRitual.add(new RitualComponent(-4, 0, -5, RitualComponent.FIRE));
|
||||
biomeChangerRitual.add(new RitualComponent(-5, 0, -4, RitualComponent.FIRE));
|
||||
biomeChangerRitual.add(new RitualComponent(0, 0, -5, RitualComponent.WATER));
|
||||
biomeChangerRitual.add(new RitualComponent(-1, 0, -6, RitualComponent.WATER));
|
||||
biomeChangerRitual.add(new RitualComponent(1, 0, -6, RitualComponent.WATER));
|
||||
biomeChangerRitual.add(new RitualComponent(-1, 0, -8, RitualComponent.BLANK));
|
||||
biomeChangerRitual.add(new RitualComponent(0, 0, -8, RitualComponent.BLANK));
|
||||
biomeChangerRitual.add(new RitualComponent(1, 0, -8, RitualComponent.BLANK));
|
||||
biomeChangerRitual.add(new RitualComponent(-1, 0, -10, RitualComponent.DUSK));
|
||||
biomeChangerRitual.add(new RitualComponent(0, 0, -10, RitualComponent.DUSK));
|
||||
biomeChangerRitual.add(new RitualComponent(1, 0, -10, RitualComponent.DUSK));
|
||||
biomeChangerRitual.add(new RitualComponent(0, 0, 5, RitualComponent.WATER));
|
||||
biomeChangerRitual.add(new RitualComponent(-1, 0, 6, RitualComponent.WATER));
|
||||
biomeChangerRitual.add(new RitualComponent(1, 0, 6, RitualComponent.WATER));
|
||||
biomeChangerRitual.add(new RitualComponent(-1, 0, 8, RitualComponent.BLANK));
|
||||
biomeChangerRitual.add(new RitualComponent(0, 0, 8, RitualComponent.BLANK));
|
||||
biomeChangerRitual.add(new RitualComponent(1, 0, 8, RitualComponent.BLANK));
|
||||
biomeChangerRitual.add(new RitualComponent(-1, 0, 10, RitualComponent.DUSK));
|
||||
biomeChangerRitual.add(new RitualComponent(0, 0, 10, RitualComponent.DUSK));
|
||||
biomeChangerRitual.add(new RitualComponent(1, 0, 10, RitualComponent.DUSK));
|
||||
biomeChangerRitual.add(new RitualComponent(-5, 0, 0, RitualComponent.WATER));
|
||||
biomeChangerRitual.add(new RitualComponent(-6, 0, -1, RitualComponent.WATER));
|
||||
biomeChangerRitual.add(new RitualComponent(-6, 0, 1, RitualComponent.WATER));
|
||||
biomeChangerRitual.add(new RitualComponent(-8, 0, -1, RitualComponent.BLANK));
|
||||
biomeChangerRitual.add(new RitualComponent(-8, 0, 0, RitualComponent.BLANK));
|
||||
biomeChangerRitual.add(new RitualComponent(-8, 0, 1, RitualComponent.BLANK));
|
||||
biomeChangerRitual.add(new RitualComponent(-10, 0, -1, RitualComponent.DUSK));
|
||||
biomeChangerRitual.add(new RitualComponent(-10, 0, 0, RitualComponent.DUSK));
|
||||
biomeChangerRitual.add(new RitualComponent(-10, 0, 1, RitualComponent.DUSK));
|
||||
biomeChangerRitual.add(new RitualComponent(5, 0, 0, RitualComponent.WATER));
|
||||
biomeChangerRitual.add(new RitualComponent(6, 0, -1, RitualComponent.WATER));
|
||||
biomeChangerRitual.add(new RitualComponent(6, 0, 1, RitualComponent.WATER));
|
||||
biomeChangerRitual.add(new RitualComponent(8, 0, -1, RitualComponent.BLANK));
|
||||
biomeChangerRitual.add(new RitualComponent(8, 0, 0, RitualComponent.BLANK));
|
||||
biomeChangerRitual.add(new RitualComponent(8, 0, 1, RitualComponent.BLANK));
|
||||
biomeChangerRitual.add(new RitualComponent(10, 0, -1, RitualComponent.DUSK));
|
||||
biomeChangerRitual.add(new RitualComponent(10, 0, 0, RitualComponent.DUSK));
|
||||
biomeChangerRitual.add(new RitualComponent(10, 0, 1, RitualComponent.DUSK));
|
||||
biomeChangerRitual.add(new RitualComponent(6, 0, -6, RitualComponent.AIR));
|
||||
biomeChangerRitual.add(new RitualComponent(6, 0, -7, RitualComponent.AIR));
|
||||
biomeChangerRitual.add(new RitualComponent(7, 0, -6, RitualComponent.AIR));
|
||||
biomeChangerRitual.add(new RitualComponent(7, 0, -5, RitualComponent.EARTH));
|
||||
biomeChangerRitual.add(new RitualComponent(5, 0, -7, RitualComponent.EARTH));
|
||||
biomeChangerRitual.add(new RitualComponent(8, 0, -5, RitualComponent.DUSK));
|
||||
biomeChangerRitual.add(new RitualComponent(8, 0, -4, RitualComponent.EARTH));
|
||||
biomeChangerRitual.add(new RitualComponent(9, 0, -4, RitualComponent.EARTH));
|
||||
biomeChangerRitual.add(new RitualComponent(5, 0, -8, RitualComponent.DUSK));
|
||||
biomeChangerRitual.add(new RitualComponent(4, 0, -8, RitualComponent.EARTH));
|
||||
biomeChangerRitual.add(new RitualComponent(4, 0, -9, RitualComponent.EARTH));
|
||||
biomeChangerRitual.add(new RitualComponent(-6, 0, 6, RitualComponent.AIR));
|
||||
biomeChangerRitual.add(new RitualComponent(-6, 0, 7, RitualComponent.AIR));
|
||||
biomeChangerRitual.add(new RitualComponent(-7, 0, 6, RitualComponent.AIR));
|
||||
biomeChangerRitual.add(new RitualComponent(-7, 0, 5, RitualComponent.EARTH));
|
||||
biomeChangerRitual.add(new RitualComponent(-5, 0, 7, RitualComponent.EARTH));
|
||||
biomeChangerRitual.add(new RitualComponent(-8, 0, 5, RitualComponent.DUSK));
|
||||
biomeChangerRitual.add(new RitualComponent(-8, 0, 4, RitualComponent.EARTH));
|
||||
biomeChangerRitual.add(new RitualComponent(-9, 0, 4, RitualComponent.EARTH));
|
||||
biomeChangerRitual.add(new RitualComponent(-5, 0, 8, RitualComponent.DUSK));
|
||||
biomeChangerRitual.add(new RitualComponent(-4, 0, 8, RitualComponent.EARTH));
|
||||
biomeChangerRitual.add(new RitualComponent(-4, 0, 9, RitualComponent.EARTH));
|
||||
biomeChangerRitual.add(new RitualComponent(6, 0, 6, RitualComponent.FIRE));
|
||||
biomeChangerRitual.add(new RitualComponent(6, 0, 7, RitualComponent.FIRE));
|
||||
biomeChangerRitual.add(new RitualComponent(7, 0, 6, RitualComponent.FIRE));
|
||||
biomeChangerRitual.add(new RitualComponent(7, 0, 5, RitualComponent.WATER));
|
||||
biomeChangerRitual.add(new RitualComponent(5, 0, 7, RitualComponent.WATER));
|
||||
biomeChangerRitual.add(new RitualComponent(8, 0, 5, RitualComponent.DUSK));
|
||||
biomeChangerRitual.add(new RitualComponent(8, 0, 4, RitualComponent.WATER));
|
||||
biomeChangerRitual.add(new RitualComponent(9, 0, 4, RitualComponent.WATER));
|
||||
biomeChangerRitual.add(new RitualComponent(5, 0, 8, RitualComponent.DUSK));
|
||||
biomeChangerRitual.add(new RitualComponent(4, 0, 8, RitualComponent.WATER));
|
||||
biomeChangerRitual.add(new RitualComponent(4, 0, 9, RitualComponent.WATER));
|
||||
biomeChangerRitual.add(new RitualComponent(-6, 0, -6, RitualComponent.FIRE));
|
||||
biomeChangerRitual.add(new RitualComponent(-6, 0, -7, RitualComponent.FIRE));
|
||||
biomeChangerRitual.add(new RitualComponent(-7, 0, -6, RitualComponent.FIRE));
|
||||
biomeChangerRitual.add(new RitualComponent(-7, 0, -5, RitualComponent.WATER));
|
||||
biomeChangerRitual.add(new RitualComponent(-5, 0, -7, RitualComponent.WATER));
|
||||
biomeChangerRitual.add(new RitualComponent(-8, 0, -5, RitualComponent.DUSK));
|
||||
biomeChangerRitual.add(new RitualComponent(-8, 0, -4, RitualComponent.WATER));
|
||||
biomeChangerRitual.add(new RitualComponent(-9, 0, -4, RitualComponent.WATER));
|
||||
biomeChangerRitual.add(new RitualComponent(-5, 0, -8, RitualComponent.DUSK));
|
||||
biomeChangerRitual.add(new RitualComponent(-4, 0, -8, RitualComponent.WATER));
|
||||
biomeChangerRitual.add(new RitualComponent(-4, 0, -9, RitualComponent.WATER));
|
||||
return biomeChangerRitual;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package WayofTime.alchemicalWizardry.common.rituals;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
|
@ -10,15 +11,16 @@ import net.minecraft.potion.PotionEffect;
|
|||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.common.LifeEssenceNetwork;
|
||||
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.common.spell.complex.effect.SpellHelper;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone;
|
||||
|
||||
public class RitualEffectContainment extends RitualEffect
|
||||
{
|
||||
@Override
|
||||
public void performEffect(TEMasterStone ritualStone)
|
||||
public void performEffect(IMasterRitualStone ritualStone)
|
||||
{
|
||||
String owner = ritualStone.getOwner();
|
||||
World worldSave = MinecraftServer.getServer().worldServers[0];
|
||||
|
@ -31,10 +33,10 @@ public class RitualEffectContainment extends RitualEffect
|
|||
}
|
||||
|
||||
int currentEssence = data.currentEssence;
|
||||
World world = ritualStone.getWorldObj();
|
||||
int x = ritualStone.xCoord;
|
||||
int y = ritualStone.yCoord;
|
||||
int z = ritualStone.zCoord;
|
||||
World world = ritualStone.getWorld();
|
||||
int x = ritualStone.getXCoord();
|
||||
int y = ritualStone.getYCoord();
|
||||
int z = ritualStone.getZCoord();
|
||||
|
||||
if (currentEssence < this.getCostPerRefresh())
|
||||
{
|
||||
|
@ -99,4 +101,27 @@ public class RitualEffectContainment extends RitualEffect
|
|||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RitualComponent> getRitualComponentList()
|
||||
{
|
||||
ArrayList<RitualComponent> containmentRitual = new ArrayList();
|
||||
containmentRitual.add(new RitualComponent(1, 0, 0, 3));
|
||||
containmentRitual.add(new RitualComponent(-1, 0, 0, 3));
|
||||
containmentRitual.add(new RitualComponent(0, 0, 1, 3));
|
||||
containmentRitual.add(new RitualComponent(0, 0, -1, 3));
|
||||
containmentRitual.add(new RitualComponent(2, 0, 2, 3));
|
||||
containmentRitual.add(new RitualComponent(2, 0, -2, 3));
|
||||
containmentRitual.add(new RitualComponent(-2, 0, 2, 3));
|
||||
containmentRitual.add(new RitualComponent(-2, 0, -2, 3));
|
||||
containmentRitual.add(new RitualComponent(1, 5, 0, 3));
|
||||
containmentRitual.add(new RitualComponent(-1, 5, 0, 3));
|
||||
containmentRitual.add(new RitualComponent(0, 5, 1, 3));
|
||||
containmentRitual.add(new RitualComponent(0, 5, -1, 3));
|
||||
containmentRitual.add(new RitualComponent(2, 5, 2, 3));
|
||||
containmentRitual.add(new RitualComponent(2, 5, -2, 3));
|
||||
containmentRitual.add(new RitualComponent(-2, 5, 2, 3));
|
||||
containmentRitual.add(new RitualComponent(-2, 5, -2, 3));
|
||||
return containmentRitual;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
package WayofTime.alchemicalWizardry.common.rituals;
|
||||
|
||||
import WayofTime.alchemicalWizardry.ModBlocks;
|
||||
import WayofTime.alchemicalWizardry.common.LifeEssenceNetwork;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.potion.Potion;
|
||||
|
@ -13,13 +14,16 @@ import net.minecraft.potion.PotionEffect;
|
|||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import WayofTime.alchemicalWizardry.ModBlocks;
|
||||
import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone;
|
||||
import WayofTime.alchemicalWizardry.api.rituals.RitualComponent;
|
||||
import WayofTime.alchemicalWizardry.api.rituals.RitualEffect;
|
||||
import WayofTime.alchemicalWizardry.api.soulNetwork.LifeEssenceNetwork;
|
||||
|
||||
public class RitualEffectCrushing extends RitualEffect
|
||||
{
|
||||
@Override
|
||||
public void performEffect(TEMasterStone ritualStone)
|
||||
public void performEffect(IMasterRitualStone ritualStone)
|
||||
{
|
||||
String owner = ritualStone.getOwner();
|
||||
World worldSave = MinecraftServer.getServer().worldServers[0];
|
||||
|
@ -32,16 +36,17 @@ public class RitualEffectCrushing extends RitualEffect
|
|||
}
|
||||
|
||||
int currentEssence = data.currentEssence;
|
||||
World world = ritualStone.getWorldObj();
|
||||
World world = ritualStone.getWorld();
|
||||
|
||||
if (world.getWorldTime() % 40 != 0)
|
||||
if (world.getWorldTime() % 40 != 20)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
int x = ritualStone.xCoord;
|
||||
int y = ritualStone.yCoord;
|
||||
int z = ritualStone.zCoord;
|
||||
|
||||
int x = ritualStone.getXCoord();
|
||||
int y = ritualStone.getYCoord();
|
||||
int z = ritualStone.getZCoord();
|
||||
TileEntity tile = world.getTileEntity(x, y + 1, z);
|
||||
IInventory tileEntity;
|
||||
|
||||
|
@ -58,6 +63,9 @@ public class RitualEffectCrushing extends RitualEffect
|
|||
return;
|
||||
}
|
||||
|
||||
boolean isSilkTouch = this.isSilkTouch(world, x, y, z);
|
||||
int fortuneLevel = this.getFortuneLevel(world, x, y, z);
|
||||
|
||||
if (currentEssence < this.getCostPerRefresh())
|
||||
{
|
||||
EntityPlayer entityOwner = MinecraftServer.getServer().getConfigurationManager().getPlayerForUsername(owner);
|
||||
|
@ -87,55 +95,106 @@ public class RitualEffectCrushing extends RitualEffect
|
|||
continue;
|
||||
}
|
||||
|
||||
ArrayList<ItemStack> itemDropList = block.getDrops(world, x + i, y + j, z + k, meta, 0);
|
||||
|
||||
if (itemDropList != null)
|
||||
if(isSilkTouch && block.canSilkHarvest(world, null, x + i, y + j, z + k, meta))
|
||||
{
|
||||
int invSize = tileEntity.getSizeInventory();
|
||||
int invSize = tileEntity.getSizeInventory();
|
||||
|
||||
ItemStack item = new ItemStack(block,1,meta);
|
||||
ItemStack copyStack = item.copyItemStack(item);
|
||||
|
||||
for (ItemStack item : itemDropList)
|
||||
for (int n = 0; n < invSize; n++)
|
||||
{
|
||||
ItemStack copyStack = item.copyItemStack(item);
|
||||
|
||||
for (int n = 0; n < invSize; n++)
|
||||
if (tileEntity.isItemValidForSlot(n, copyStack) && copyStack.stackSize != 0)
|
||||
{
|
||||
if (tileEntity.isItemValidForSlot(n, copyStack) && copyStack.stackSize != 0)
|
||||
ItemStack itemStack = tileEntity.getStackInSlot(n);
|
||||
|
||||
if (itemStack == null)
|
||||
{
|
||||
ItemStack itemStack = tileEntity.getStackInSlot(n);
|
||||
tileEntity.setInventorySlotContents(n, item);
|
||||
copyStack.stackSize = 0;
|
||||
} else
|
||||
{
|
||||
if (itemStack.getItem().equals(copyStack.getItem()))
|
||||
{
|
||||
int itemSize = itemStack.stackSize;
|
||||
int copySize = copyStack.stackSize;
|
||||
int maxSize = itemStack.getMaxStackSize();
|
||||
|
||||
if (itemStack == null)
|
||||
{
|
||||
tileEntity.setInventorySlotContents(n, copyStack);
|
||||
copyStack.stackSize = 0;
|
||||
} else
|
||||
{
|
||||
if (itemStack.getItem().equals(copyStack.getItem()))
|
||||
if (copySize + itemSize < maxSize)
|
||||
{
|
||||
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;
|
||||
}
|
||||
copyStack.stackSize = 0;
|
||||
itemStack.stackSize = itemSize + copySize;
|
||||
tileEntity.setInventorySlotContents(n, itemStack);
|
||||
} else
|
||||
{
|
||||
copyStack.stackSize = itemSize + copySize - maxSize;
|
||||
itemStack.stackSize = maxSize;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (copyStack.stackSize > 0)
|
||||
{
|
||||
world.spawnEntityInWorld(new EntityItem(world, x + 0.4, y + 2, z + 0.5, copyStack));
|
||||
//flag=true;
|
||||
}
|
||||
}
|
||||
|
||||
if (copyStack.stackSize > 0)
|
||||
{
|
||||
world.spawnEntityInWorld(new EntityItem(world, x + 0.4, y + 2, z + 0.5, copyStack));
|
||||
//flag=true;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
ArrayList<ItemStack> itemDropList = block.getDrops(world, x + i, y + j, z + k, meta, fortuneLevel);
|
||||
|
||||
if (itemDropList != null)
|
||||
{
|
||||
int invSize = tileEntity.getSizeInventory();
|
||||
|
||||
for (ItemStack item : itemDropList)
|
||||
{
|
||||
ItemStack copyStack = item.copyItemStack(item);
|
||||
|
||||
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()))
|
||||
{
|
||||
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)
|
||||
{
|
||||
world.spawnEntityInWorld(new EntityItem(world, x + 0.4, y + 2, z + 0.5, copyStack));
|
||||
//flag=true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//if(flag)
|
||||
|
@ -150,10 +209,92 @@ public class RitualEffectCrushing extends RitualEffect
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isSilkTouch(World world, int x, int y, int z)
|
||||
{
|
||||
int index = 0;
|
||||
for(int i=-2; i<=2; i++)
|
||||
{
|
||||
for(int j=-2; j<=2; j++)
|
||||
{
|
||||
int index1 = Math.abs(i);
|
||||
int index2 = Math.abs(j);
|
||||
|
||||
if((index1 == 2 && (index2 == 2 || index2 == 1)) || (index1 == 1 && index2 == 2))
|
||||
{
|
||||
Block block = world.getBlock(x + i, y + 1, z + j);
|
||||
if(block == Blocks.gold_block)
|
||||
{
|
||||
index++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return index>=12;
|
||||
}
|
||||
|
||||
public int getFortuneLevel(World world, int x, int y, int z)
|
||||
{
|
||||
int index = 0;
|
||||
for(int i=-2; i<=2; i++)
|
||||
{
|
||||
for(int j=-2; j<=2; j++)
|
||||
{
|
||||
int index1 = Math.abs(i);
|
||||
int index2 = Math.abs(j);
|
||||
|
||||
if((index1 == 2 && (index2 == 2 || index2 == 1)) || (index1 == 1 && index2 == 2))
|
||||
{
|
||||
Block block = world.getBlock(x + i, y + 1, z + j);
|
||||
if(block == Blocks.emerald_block)
|
||||
{
|
||||
index++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(index>=12)
|
||||
{
|
||||
return 3;
|
||||
}else if(index>=8)
|
||||
{
|
||||
return 2;
|
||||
}else if(index>=4)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCostPerRefresh()
|
||||
{
|
||||
return 7;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RitualComponent> getRitualComponentList()
|
||||
{
|
||||
ArrayList<RitualComponent> crushingRitual = new ArrayList();
|
||||
crushingRitual.add(new RitualComponent(0, 0, 1, RitualComponent.EARTH));
|
||||
crushingRitual.add(new RitualComponent(1, 0, 0, RitualComponent.EARTH));
|
||||
crushingRitual.add(new RitualComponent(0, 0, -1, RitualComponent.EARTH));
|
||||
crushingRitual.add(new RitualComponent(-1, 0, 0, RitualComponent.EARTH));
|
||||
crushingRitual.add(new RitualComponent(2, 0, 0, RitualComponent.FIRE));
|
||||
crushingRitual.add(new RitualComponent(0, 0, 2, RitualComponent.FIRE));
|
||||
crushingRitual.add(new RitualComponent(-2, 0, 0, RitualComponent.FIRE));
|
||||
crushingRitual.add(new RitualComponent(0, 0, -2, RitualComponent.FIRE));
|
||||
crushingRitual.add(new RitualComponent(2, 0, 2, RitualComponent.DUSK));
|
||||
crushingRitual.add(new RitualComponent(2, 0, -2, RitualComponent.DUSK));
|
||||
crushingRitual.add(new RitualComponent(-2, 0, 2, RitualComponent.DUSK));
|
||||
crushingRitual.add(new RitualComponent(-2, 0, -2, RitualComponent.DUSK));
|
||||
crushingRitual.add(new RitualComponent(2, 1, 0, RitualComponent.AIR));
|
||||
crushingRitual.add(new RitualComponent(-2, 1, 0, RitualComponent.AIR));
|
||||
crushingRitual.add(new RitualComponent(0, 1, 2, RitualComponent.AIR));
|
||||
crushingRitual.add(new RitualComponent(0, 1, -2, RitualComponent.AIR));
|
||||
return crushingRitual;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,286 @@
|
|||
package WayofTime.alchemicalWizardry.common.rituals;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.event.entity.living.EnderTeleportEvent;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
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.common.spell.complex.effect.SpellHelper;
|
||||
import WayofTime.alchemicalWizardry.common.spell.simple.SpellTeleport;
|
||||
|
||||
public class RitualEffectExpulsion extends RitualEffect
|
||||
{
|
||||
@Override
|
||||
public void performEffect(IMasterRitualStone ritualStone)
|
||||
{
|
||||
String owner = ritualStone.getOwner();
|
||||
World worldSave = MinecraftServer.getServer().worldServers[0];
|
||||
LifeEssenceNetwork data = (LifeEssenceNetwork) worldSave.loadItemData(LifeEssenceNetwork.class, owner);
|
||||
|
||||
if (data == null)
|
||||
{
|
||||
data = new LifeEssenceNetwork(owner);
|
||||
worldSave.setItemData(owner, data);
|
||||
}
|
||||
|
||||
int currentEssence = data.currentEssence;
|
||||
World world = ritualStone.getWorld();
|
||||
int x = ritualStone.getXCoord();
|
||||
int y = ritualStone.getYCoord();
|
||||
int z = ritualStone.getZCoord();
|
||||
|
||||
if (currentEssence < this.getCostPerRefresh())
|
||||
{
|
||||
EntityPlayer entityOwner = MinecraftServer.getServer().getConfigurationManager().getPlayerForUsername(owner);
|
||||
|
||||
if (entityOwner == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
entityOwner.addPotionEffect(new PotionEffect(Potion.confusion.id, 80));
|
||||
} else
|
||||
{
|
||||
int d0 = 25;
|
||||
AxisAlignedBB axisalignedbb = AxisAlignedBB.getAABBPool().getAABB((double) x, (double) y, (double) z, (double) (x + 1), (double) (y + 1), (double) (z + 1)).expand(d0, d0, d0);
|
||||
axisalignedbb.maxY = Math.min((double) world.getHeight(), (double) (y + 1 + d0));
|
||||
List list = world.getEntitiesWithinAABB(EntityPlayer.class, axisalignedbb);
|
||||
Iterator iterator = list.iterator();
|
||||
EntityPlayer entityplayer;
|
||||
boolean flag = false;
|
||||
|
||||
while (iterator.hasNext())
|
||||
{
|
||||
entityplayer = (EntityPlayer) iterator.next();
|
||||
|
||||
if (!(SpellHelper.getUsername(entityplayer).equals(owner)))
|
||||
{
|
||||
if(entityplayer.isPotionActive(AlchemicalWizardry.customPotionPlanarBinding)||entityplayer.capabilities.isCreativeMode)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
flag = teleportRandomly(entityplayer,100);
|
||||
}
|
||||
}
|
||||
|
||||
if (flag)
|
||||
{
|
||||
data.currentEssence = currentEssence - this.getCostPerRefresh();
|
||||
data.markDirty();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCostPerRefresh()
|
||||
{
|
||||
return 1000;
|
||||
}
|
||||
|
||||
public boolean teleportRandomly(EntityLivingBase entityLiving, double distance)
|
||||
{
|
||||
double x = entityLiving.posX;
|
||||
double y = entityLiving.posY;
|
||||
double z = entityLiving.posZ;
|
||||
Random rand = new Random();
|
||||
double d0 = x + (rand.nextDouble() - 0.5D) * distance;
|
||||
double d1 = y + (double) (rand.nextInt((int) distance) - (distance) / 2);
|
||||
double d2 = z + (rand.nextDouble() - 0.5D) * distance;
|
||||
int i = 0;
|
||||
|
||||
while (!teleportTo(entityLiving, d0, d1, d2, x, y, z) && i < 100)
|
||||
{
|
||||
d0 = x + (rand.nextDouble() - 0.5D) * distance;
|
||||
d1 = y + (double) (rand.nextInt((int) distance) - (distance) / 2);
|
||||
d2 = z + (rand.nextDouble() - 0.5D) * distance;
|
||||
i++;
|
||||
}
|
||||
|
||||
if (i >= 100)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
//return SpellTeleport.teleportTo(entityLiving, d0, d1, d2,x,y,z);
|
||||
}
|
||||
|
||||
public boolean teleportTo(EntityLivingBase entityLiving, double par1, double par3, double par5, double lastX, double lastY, double lastZ)
|
||||
{
|
||||
EnderTeleportEvent event = new EnderTeleportEvent(entityLiving, par1, par3, par5, 0);
|
||||
|
||||
if (MinecraftForge.EVENT_BUS.post(event))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
double d3 = lastX;
|
||||
double d4 = lastY;
|
||||
double d5 = lastZ;
|
||||
SpellTeleport.moveEntityViaTeleport(entityLiving, event.targetX, event.targetY, event.targetZ);
|
||||
boolean flag = false;
|
||||
int i = MathHelper.floor_double(entityLiving.posX);
|
||||
int j = MathHelper.floor_double(entityLiving.posY);
|
||||
int k = MathHelper.floor_double(entityLiving.posZ);
|
||||
int l;
|
||||
|
||||
if (entityLiving.worldObj.blockExists(i, j, k))
|
||||
{
|
||||
boolean flag1 = false;
|
||||
|
||||
while (!flag1 && j > 0)
|
||||
{
|
||||
Block block = entityLiving.worldObj.getBlock(i, j - 1, k);
|
||||
|
||||
if (block != null && block.getMaterial().blocksMovement())
|
||||
{
|
||||
flag1 = true;
|
||||
} else
|
||||
{
|
||||
--entityLiving.posY;
|
||||
--j;
|
||||
}
|
||||
}
|
||||
|
||||
if (flag1)
|
||||
{
|
||||
SpellTeleport.moveEntityViaTeleport(entityLiving, entityLiving.posX, entityLiving.posY, entityLiving.posZ);
|
||||
|
||||
if (entityLiving.worldObj.getCollidingBoundingBoxes(entityLiving, entityLiving.boundingBox).isEmpty() && !entityLiving.worldObj.isAnyLiquid(entityLiving.boundingBox))
|
||||
{
|
||||
flag = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!flag)
|
||||
{
|
||||
SpellTeleport.moveEntityViaTeleport(entityLiving, d3, d4, d5);
|
||||
return false;
|
||||
} else
|
||||
{
|
||||
short short1 = 128;
|
||||
|
||||
for (l = 0; l < short1; ++l)
|
||||
{
|
||||
double d6 = (double) l / ((double) short1 - 1.0D);
|
||||
float f = (entityLiving.worldObj.rand.nextFloat() - 0.5F) * 0.2F;
|
||||
float f1 = (entityLiving.worldObj.rand.nextFloat() - 0.5F) * 0.2F;
|
||||
float f2 = (entityLiving.worldObj.rand.nextFloat() - 0.5F) * 0.2F;
|
||||
double d7 = d3 + (entityLiving.posX - d3) * d6 + (entityLiving.worldObj.rand.nextDouble() - 0.5D) * (double) entityLiving.width * 2.0D;
|
||||
double d8 = d4 + (entityLiving.posY - d4) * d6 + entityLiving.worldObj.rand.nextDouble() * (double) entityLiving.height;
|
||||
double d9 = d5 + (entityLiving.posZ - d5) * d6 + (entityLiving.worldObj.rand.nextDouble() - 0.5D) * (double) entityLiving.width * 2.0D;
|
||||
entityLiving.worldObj.spawnParticle("portal", d7, d8, d9, (double) f, (double) f1, (double) f2);
|
||||
}
|
||||
|
||||
// this.worldObj.playSoundEffect(d3, d4, d5, "mob.endermen.portal", 1.0F, 1.0F);
|
||||
// this.playSound("mob.endermen.portal", 1.0F, 1.0F);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
public void moveEntityViaTeleport(EntityLivingBase entityLiving, double x, double y, double z)
|
||||
{
|
||||
if (entityLiving instanceof EntityPlayer)
|
||||
{
|
||||
if (entityLiving != null && entityLiving instanceof EntityPlayerMP)
|
||||
{
|
||||
EntityPlayerMP entityplayermp = (EntityPlayerMP) entityLiving;
|
||||
|
||||
if (entityplayermp.worldObj == entityLiving.worldObj)
|
||||
{
|
||||
EnderTeleportEvent event = new EnderTeleportEvent(entityplayermp, x, y, z, 5.0F);
|
||||
|
||||
if (!MinecraftForge.EVENT_BUS.post(event))
|
||||
{
|
||||
if (entityLiving.isRiding())
|
||||
{
|
||||
entityLiving.mountEntity((Entity) null);
|
||||
}
|
||||
|
||||
entityLiving.setPositionAndUpdate(event.targetX, event.targetY, event.targetZ);
|
||||
// this.getThrower().fallDistance = 0.0F;
|
||||
// this.getThrower().attackEntityFrom(DamageSource.fall, event.attackDamage);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (entityLiving != null)
|
||||
{
|
||||
entityLiving.setPosition(x, y, z);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RitualComponent> getRitualComponentList()
|
||||
{
|
||||
ArrayList<RitualComponent> expulsionRitual = new ArrayList();
|
||||
expulsionRitual.add(new RitualComponent(2,0,2, RitualComponent.EARTH));
|
||||
expulsionRitual.add(new RitualComponent(2,0,1, RitualComponent.EARTH));
|
||||
expulsionRitual.add(new RitualComponent(1,0,2, RitualComponent.EARTH));
|
||||
expulsionRitual.add(new RitualComponent(2,0,-2, RitualComponent.EARTH));
|
||||
expulsionRitual.add(new RitualComponent(2,0,-1, RitualComponent.EARTH));
|
||||
expulsionRitual.add(new RitualComponent(-1,0,2, RitualComponent.EARTH));
|
||||
expulsionRitual.add(new RitualComponent(-2,0,2, RitualComponent.EARTH));
|
||||
expulsionRitual.add(new RitualComponent(-2,0,1, RitualComponent.EARTH));
|
||||
expulsionRitual.add(new RitualComponent(1,0,-2, RitualComponent.EARTH));
|
||||
expulsionRitual.add(new RitualComponent(-2,0,-2, RitualComponent.EARTH));
|
||||
expulsionRitual.add(new RitualComponent(-2,0,-1, RitualComponent.EARTH));
|
||||
expulsionRitual.add(new RitualComponent(-1,0,-2, RitualComponent.EARTH));
|
||||
expulsionRitual.add(new RitualComponent(4,0,2, RitualComponent.AIR));
|
||||
expulsionRitual.add(new RitualComponent(5,0,2, RitualComponent.AIR));
|
||||
expulsionRitual.add(new RitualComponent(4,0,-2, RitualComponent.AIR));
|
||||
expulsionRitual.add(new RitualComponent(5,0,-2, RitualComponent.AIR));
|
||||
expulsionRitual.add(new RitualComponent(-4,0,2, RitualComponent.AIR));
|
||||
expulsionRitual.add(new RitualComponent(-5,0,2, RitualComponent.AIR));
|
||||
expulsionRitual.add(new RitualComponent(-4,0,-2, RitualComponent.AIR));
|
||||
expulsionRitual.add(new RitualComponent(-5,0,-2, RitualComponent.AIR));
|
||||
expulsionRitual.add(new RitualComponent(2,0,4, RitualComponent.AIR));
|
||||
expulsionRitual.add(new RitualComponent(2,0,5, RitualComponent.AIR));
|
||||
expulsionRitual.add(new RitualComponent(-2,0,4, RitualComponent.AIR));
|
||||
expulsionRitual.add(new RitualComponent(-2,0,5, RitualComponent.AIR));
|
||||
expulsionRitual.add(new RitualComponent(2,0,-4, RitualComponent.AIR));
|
||||
expulsionRitual.add(new RitualComponent(2,0,-5, RitualComponent.AIR));
|
||||
expulsionRitual.add(new RitualComponent(-2,0,-4, RitualComponent.AIR));
|
||||
expulsionRitual.add(new RitualComponent(-2,0,-5, RitualComponent.AIR));
|
||||
expulsionRitual.add(new RitualComponent(0,0,6, RitualComponent.EARTH));
|
||||
expulsionRitual.add(new RitualComponent(0,0,-6, RitualComponent.EARTH));
|
||||
expulsionRitual.add(new RitualComponent(6,0,0, RitualComponent.EARTH));
|
||||
expulsionRitual.add(new RitualComponent(-6,0,0, RitualComponent.EARTH));
|
||||
expulsionRitual.add(new RitualComponent(-5,0,0, RitualComponent.DUSK));
|
||||
expulsionRitual.add(new RitualComponent(-6,0,1, RitualComponent.DUSK));
|
||||
expulsionRitual.add(new RitualComponent(-6,0,-1, RitualComponent.DUSK));
|
||||
expulsionRitual.add(new RitualComponent(5,0,0, RitualComponent.DUSK));
|
||||
expulsionRitual.add(new RitualComponent(6,0,1, RitualComponent.DUSK));
|
||||
expulsionRitual.add(new RitualComponent(6,0,-1, RitualComponent.DUSK));
|
||||
expulsionRitual.add(new RitualComponent(0,0,5, RitualComponent.DUSK));
|
||||
expulsionRitual.add(new RitualComponent(1,0,6, RitualComponent.DUSK));
|
||||
expulsionRitual.add(new RitualComponent(-1,0,6, RitualComponent.DUSK));
|
||||
expulsionRitual.add(new RitualComponent(0,0,-5, RitualComponent.DUSK));
|
||||
expulsionRitual.add(new RitualComponent(1,0,-6, RitualComponent.DUSK));
|
||||
expulsionRitual.add(new RitualComponent(-1,0,-6, RitualComponent.DUSK));
|
||||
expulsionRitual.add(new RitualComponent(4,0,4, RitualComponent.FIRE));
|
||||
expulsionRitual.add(new RitualComponent(4,0,-4, RitualComponent.FIRE));
|
||||
expulsionRitual.add(new RitualComponent(-4,0,4, RitualComponent.FIRE));
|
||||
expulsionRitual.add(new RitualComponent(-4,0,-4, RitualComponent.FIRE));
|
||||
return expulsionRitual;
|
||||
}
|
||||
}
|
|
@ -1,7 +1,8 @@
|
|||
package WayofTime.alchemicalWizardry.common.rituals;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.LifeEssenceNetwork;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.effect.EntityLightningBolt;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
@ -10,13 +11,15 @@ import net.minecraft.potion.PotionEffect;
|
|||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.util.List;
|
||||
import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone;
|
||||
import WayofTime.alchemicalWizardry.api.rituals.RitualComponent;
|
||||
import WayofTime.alchemicalWizardry.api.rituals.RitualEffect;
|
||||
import WayofTime.alchemicalWizardry.api.soulNetwork.LifeEssenceNetwork;
|
||||
|
||||
public class RitualEffectFeatheredEarth extends RitualEffect //Nullifies all fall damage in the area of effect
|
||||
{
|
||||
@Override
|
||||
public void performEffect(TEMasterStone ritualStone)
|
||||
public void performEffect(IMasterRitualStone ritualStone)
|
||||
{
|
||||
String owner = ritualStone.getOwner();
|
||||
World worldSave = MinecraftServer.getServer().worldServers[0];
|
||||
|
@ -29,10 +32,10 @@ public class RitualEffectFeatheredEarth extends RitualEffect //Nullifies all fal
|
|||
}
|
||||
|
||||
int currentEssence = data.currentEssence;
|
||||
World world = ritualStone.getWorldObj();
|
||||
int x = ritualStone.xCoord;
|
||||
int y = ritualStone.yCoord;
|
||||
int z = ritualStone.zCoord;
|
||||
World world = ritualStone.getWorld();
|
||||
int x = ritualStone.getXCoord();
|
||||
int y = ritualStone.getYCoord();
|
||||
int z = ritualStone.getZCoord();
|
||||
|
||||
if (ritualStone.getCooldown() > 0)
|
||||
{
|
||||
|
@ -87,4 +90,51 @@ public class RitualEffectFeatheredEarth extends RitualEffect //Nullifies all fal
|
|||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RitualComponent> getRitualComponentList()
|
||||
{
|
||||
ArrayList<RitualComponent> featheredEarthRitual = new ArrayList();
|
||||
featheredEarthRitual.add(new RitualComponent(1, 0, 0, RitualComponent.DUSK));
|
||||
featheredEarthRitual.add(new RitualComponent(-1, 0, 0, RitualComponent.DUSK));
|
||||
featheredEarthRitual.add(new RitualComponent(0, 0, 1, RitualComponent.DUSK));
|
||||
featheredEarthRitual.add(new RitualComponent(0, 0, -1, RitualComponent.DUSK));
|
||||
featheredEarthRitual.add(new RitualComponent(2, 0, 2, RitualComponent.AIR));
|
||||
featheredEarthRitual.add(new RitualComponent(-2, 0, 2, RitualComponent.AIR));
|
||||
featheredEarthRitual.add(new RitualComponent(-2, 0, -2, RitualComponent.AIR));
|
||||
featheredEarthRitual.add(new RitualComponent(2, 0, -2, RitualComponent.AIR));
|
||||
featheredEarthRitual.add(new RitualComponent(1, 0, 3, RitualComponent.EARTH));
|
||||
featheredEarthRitual.add(new RitualComponent(0, 0, 3, RitualComponent.EARTH));
|
||||
featheredEarthRitual.add(new RitualComponent(-1, 0, 3, RitualComponent.EARTH));
|
||||
featheredEarthRitual.add(new RitualComponent(1, 0, -3, RitualComponent.EARTH));
|
||||
featheredEarthRitual.add(new RitualComponent(0, 0, -3, RitualComponent.EARTH));
|
||||
featheredEarthRitual.add(new RitualComponent(-1, 0, -3, RitualComponent.EARTH));
|
||||
featheredEarthRitual.add(new RitualComponent(3, 0, 1, RitualComponent.EARTH));
|
||||
featheredEarthRitual.add(new RitualComponent(3, 0, 0, RitualComponent.EARTH));
|
||||
featheredEarthRitual.add(new RitualComponent(3, 0, -1, RitualComponent.EARTH));
|
||||
featheredEarthRitual.add(new RitualComponent(-3, 0, 1, RitualComponent.EARTH));
|
||||
featheredEarthRitual.add(new RitualComponent(-3, 0, 0, RitualComponent.EARTH));
|
||||
featheredEarthRitual.add(new RitualComponent(-3, 0, -1, RitualComponent.EARTH));
|
||||
featheredEarthRitual.add(new RitualComponent(4, 4, 4, RitualComponent.FIRE));
|
||||
featheredEarthRitual.add(new RitualComponent(-4, 4, 4, RitualComponent.FIRE));
|
||||
featheredEarthRitual.add(new RitualComponent(-4, 4, -4, RitualComponent.FIRE));
|
||||
featheredEarthRitual.add(new RitualComponent(4, 4, -4, RitualComponent.FIRE));
|
||||
featheredEarthRitual.add(new RitualComponent(4, 5, 5, RitualComponent.AIR));
|
||||
featheredEarthRitual.add(new RitualComponent(4, 5, 3, RitualComponent.AIR));
|
||||
featheredEarthRitual.add(new RitualComponent(5, 5, 4, RitualComponent.AIR));
|
||||
featheredEarthRitual.add(new RitualComponent(3, 5, 4, RitualComponent.AIR));
|
||||
featheredEarthRitual.add(new RitualComponent(-4, 5, 5, RitualComponent.AIR));
|
||||
featheredEarthRitual.add(new RitualComponent(-4, 5, 3, RitualComponent.AIR));
|
||||
featheredEarthRitual.add(new RitualComponent(-5, 5, 4, RitualComponent.AIR));
|
||||
featheredEarthRitual.add(new RitualComponent(-3, 5, 4, RitualComponent.AIR));
|
||||
featheredEarthRitual.add(new RitualComponent(4, 5, -5, RitualComponent.AIR));
|
||||
featheredEarthRitual.add(new RitualComponent(4, 5, -3, RitualComponent.AIR));
|
||||
featheredEarthRitual.add(new RitualComponent(5, 5, -4, RitualComponent.AIR));
|
||||
featheredEarthRitual.add(new RitualComponent(3, 5, -4, RitualComponent.AIR));
|
||||
featheredEarthRitual.add(new RitualComponent(-4, 5, -5, RitualComponent.AIR));
|
||||
featheredEarthRitual.add(new RitualComponent(-4, 5, -3, RitualComponent.AIR));
|
||||
featheredEarthRitual.add(new RitualComponent(-5, 5, -4, RitualComponent.AIR));
|
||||
featheredEarthRitual.add(new RitualComponent(-3, 5, -4, RitualComponent.AIR));
|
||||
return featheredEarthRitual;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
package WayofTime.alchemicalWizardry.common.rituals;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.LifeEssenceNetwork;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.potion.Potion;
|
||||
|
@ -10,9 +11,11 @@ import net.minecraft.potion.PotionEffect;
|
|||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
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.common.tileEntity.TEAltar;
|
||||
|
||||
public class RitualEffectFeatheredKnife extends RitualEffect
|
||||
{
|
||||
|
@ -20,7 +23,7 @@ public class RitualEffectFeatheredKnife extends RitualEffect
|
|||
public final int amount = 100;
|
||||
|
||||
@Override
|
||||
public void performEffect(TEMasterStone ritualStone)
|
||||
public void performEffect(IMasterRitualStone ritualStone)
|
||||
{
|
||||
String owner = ritualStone.getOwner();
|
||||
World worldSave = MinecraftServer.getServer().worldServers[0];
|
||||
|
@ -33,10 +36,10 @@ public class RitualEffectFeatheredKnife extends RitualEffect
|
|||
}
|
||||
|
||||
int currentEssence = data.currentEssence;
|
||||
World world = ritualStone.getWorldObj();
|
||||
int x = ritualStone.xCoord;
|
||||
int y = ritualStone.yCoord;
|
||||
int z = ritualStone.zCoord;
|
||||
World world = ritualStone.getWorld();
|
||||
int x = ritualStone.getXCoord();
|
||||
int y = ritualStone.getYCoord();
|
||||
int z = ritualStone.getZCoord();
|
||||
|
||||
if (world.getWorldTime() % this.timeDelay != 0)
|
||||
{
|
||||
|
@ -138,4 +141,51 @@ public class RitualEffectFeatheredKnife extends RitualEffect
|
|||
// TODO Auto-generated method stub
|
||||
return 20;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RitualComponent> getRitualComponentList()
|
||||
{
|
||||
ArrayList<RitualComponent> featheredKnifeRitual = new ArrayList();
|
||||
featheredKnifeRitual.add(new RitualComponent(1, 0, 0, RitualComponent.DUSK));
|
||||
featheredKnifeRitual.add(new RitualComponent(-1, 0, 0, RitualComponent.DUSK));
|
||||
featheredKnifeRitual.add(new RitualComponent(0, 0, 1, RitualComponent.DUSK));
|
||||
featheredKnifeRitual.add(new RitualComponent(0, 0, -1, RitualComponent.DUSK));
|
||||
featheredKnifeRitual.add(new RitualComponent(2, -1, 0, RitualComponent.WATER));
|
||||
featheredKnifeRitual.add(new RitualComponent(-2, -1, 0, RitualComponent.WATER));
|
||||
featheredKnifeRitual.add(new RitualComponent(0, -1, 2, RitualComponent.WATER));
|
||||
featheredKnifeRitual.add(new RitualComponent(0, -1, -2, RitualComponent.WATER));
|
||||
featheredKnifeRitual.add(new RitualComponent(1, -1, 1, RitualComponent.AIR));
|
||||
featheredKnifeRitual.add(new RitualComponent(1, -1, -1, RitualComponent.AIR));
|
||||
featheredKnifeRitual.add(new RitualComponent(-1, -1, 1, RitualComponent.AIR));
|
||||
featheredKnifeRitual.add(new RitualComponent(-1, -1, -1, RitualComponent.AIR));
|
||||
featheredKnifeRitual.add(new RitualComponent(4, -1, 2, RitualComponent.FIRE));
|
||||
featheredKnifeRitual.add(new RitualComponent(2, -1, 4, RitualComponent.FIRE));
|
||||
featheredKnifeRitual.add(new RitualComponent(-4, -1, 2, RitualComponent.FIRE));
|
||||
featheredKnifeRitual.add(new RitualComponent(2, -1, -4, RitualComponent.FIRE));
|
||||
featheredKnifeRitual.add(new RitualComponent(4, -1, -2, RitualComponent.FIRE));
|
||||
featheredKnifeRitual.add(new RitualComponent(-2, -1, 4, RitualComponent.FIRE));
|
||||
featheredKnifeRitual.add(new RitualComponent(-4, -1, -2, RitualComponent.FIRE));
|
||||
featheredKnifeRitual.add(new RitualComponent(-2, -1, -4, RitualComponent.FIRE));
|
||||
featheredKnifeRitual.add(new RitualComponent(4, 0, 2, RitualComponent.EARTH));
|
||||
featheredKnifeRitual.add(new RitualComponent(2, 0, 4, RitualComponent.EARTH));
|
||||
featheredKnifeRitual.add(new RitualComponent(-4, 0, 2, RitualComponent.EARTH));
|
||||
featheredKnifeRitual.add(new RitualComponent(2, 0, -4, RitualComponent.EARTH));
|
||||
featheredKnifeRitual.add(new RitualComponent(4, 0, -2, RitualComponent.EARTH));
|
||||
featheredKnifeRitual.add(new RitualComponent(-2, 0, 4, RitualComponent.EARTH));
|
||||
featheredKnifeRitual.add(new RitualComponent(-4, 0, -2, RitualComponent.EARTH));
|
||||
featheredKnifeRitual.add(new RitualComponent(-2, 0, -4, RitualComponent.EARTH));
|
||||
featheredKnifeRitual.add(new RitualComponent(4, 0, 3, RitualComponent.EARTH));
|
||||
featheredKnifeRitual.add(new RitualComponent(3, 0, 4, RitualComponent.EARTH));
|
||||
featheredKnifeRitual.add(new RitualComponent(-4, 0, 3, RitualComponent.EARTH));
|
||||
featheredKnifeRitual.add(new RitualComponent(3, 0, -4, RitualComponent.EARTH));
|
||||
featheredKnifeRitual.add(new RitualComponent(4, 0, -3, RitualComponent.EARTH));
|
||||
featheredKnifeRitual.add(new RitualComponent(-3, 0, 4, RitualComponent.EARTH));
|
||||
featheredKnifeRitual.add(new RitualComponent(-4, 0, -3, RitualComponent.EARTH));
|
||||
featheredKnifeRitual.add(new RitualComponent(-3, 0, -4, RitualComponent.EARTH));
|
||||
featheredKnifeRitual.add(new RitualComponent(3, 0, 3, RitualComponent.AIR));
|
||||
featheredKnifeRitual.add(new RitualComponent(3, 0, -3, RitualComponent.AIR));
|
||||
featheredKnifeRitual.add(new RitualComponent(-3, 0, 3, RitualComponent.AIR));
|
||||
featheredKnifeRitual.add(new RitualComponent(-3, 0, -3, RitualComponent.AIR));
|
||||
return featheredKnifeRitual;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,21 +1,24 @@
|
|||
package WayofTime.alchemicalWizardry.common.rituals;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.LifeEssenceNetwork;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
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 java.util.List;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone;
|
||||
import WayofTime.alchemicalWizardry.api.rituals.RitualComponent;
|
||||
import WayofTime.alchemicalWizardry.api.rituals.RitualEffect;
|
||||
import WayofTime.alchemicalWizardry.api.soulNetwork.LifeEssenceNetwork;
|
||||
|
||||
public class RitualEffectFlight extends RitualEffect
|
||||
{
|
||||
@Override
|
||||
public void performEffect(TEMasterStone ritualStone)
|
||||
public void performEffect(IMasterRitualStone ritualStone)
|
||||
{
|
||||
String owner = ritualStone.getOwner();
|
||||
World worldSave = MinecraftServer.getServer().worldServers[0];
|
||||
|
@ -28,10 +31,10 @@ public class RitualEffectFlight extends RitualEffect
|
|||
}
|
||||
|
||||
int currentEssence = data.currentEssence;
|
||||
World world = ritualStone.getWorldObj();
|
||||
int x = ritualStone.xCoord;
|
||||
int y = ritualStone.yCoord;
|
||||
int z = ritualStone.zCoord;
|
||||
World world = ritualStone.getWorld();
|
||||
int x = ritualStone.getXCoord();
|
||||
int y = ritualStone.getYCoord();
|
||||
int z = ritualStone.getZCoord();
|
||||
|
||||
if (ritualStone.getCooldown() > 0)
|
||||
{
|
||||
|
@ -85,4 +88,92 @@ public class RitualEffectFlight extends RitualEffect
|
|||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RitualComponent> getRitualComponentList()
|
||||
{
|
||||
ArrayList<RitualComponent> flightRitual = new ArrayList();
|
||||
flightRitual.add(new RitualComponent(1, 0, 0, RitualComponent.DUSK));
|
||||
flightRitual.add(new RitualComponent(-1, 0, 0, RitualComponent.DUSK));
|
||||
flightRitual.add(new RitualComponent(0, 0, 1, RitualComponent.DUSK));
|
||||
flightRitual.add(new RitualComponent(0, 0, -1, RitualComponent.DUSK));
|
||||
flightRitual.add(new RitualComponent(2, 0, 2, RitualComponent.AIR));
|
||||
flightRitual.add(new RitualComponent(-2, 0, 2, RitualComponent.AIR));
|
||||
flightRitual.add(new RitualComponent(-2, 0, -2, RitualComponent.AIR));
|
||||
flightRitual.add(new RitualComponent(2, 0, -2, RitualComponent.AIR));
|
||||
flightRitual.add(new RitualComponent(1, 0, 3, RitualComponent.EARTH));
|
||||
flightRitual.add(new RitualComponent(0, 0, 3, RitualComponent.EARTH));
|
||||
flightRitual.add(new RitualComponent(-1, 0, 3, RitualComponent.EARTH));
|
||||
flightRitual.add(new RitualComponent(1, 0, -3, RitualComponent.EARTH));
|
||||
flightRitual.add(new RitualComponent(0, 0, -3, RitualComponent.EARTH));
|
||||
flightRitual.add(new RitualComponent(-1, 0, -3, RitualComponent.EARTH));
|
||||
flightRitual.add(new RitualComponent(3, 0, 1, RitualComponent.EARTH));
|
||||
flightRitual.add(new RitualComponent(3, 0, 0, RitualComponent.EARTH));
|
||||
flightRitual.add(new RitualComponent(3, 0, -1, RitualComponent.EARTH));
|
||||
flightRitual.add(new RitualComponent(-3, 0, 1, RitualComponent.EARTH));
|
||||
flightRitual.add(new RitualComponent(-3, 0, 0, RitualComponent.EARTH));
|
||||
flightRitual.add(new RitualComponent(-3, 0, -1, RitualComponent.EARTH));
|
||||
flightRitual.add(new RitualComponent(-3, 0, -4, RitualComponent.WATER));
|
||||
flightRitual.add(new RitualComponent(-4, 0, -3, RitualComponent.WATER));
|
||||
flightRitual.add(new RitualComponent(-3, 0, 4, RitualComponent.WATER));
|
||||
flightRitual.add(new RitualComponent(4, 0, -3, RitualComponent.WATER));
|
||||
flightRitual.add(new RitualComponent(3, 0, -4, RitualComponent.WATER));
|
||||
flightRitual.add(new RitualComponent(-4, 0, 3, RitualComponent.WATER));
|
||||
flightRitual.add(new RitualComponent(3, 0, 4, RitualComponent.WATER));
|
||||
flightRitual.add(new RitualComponent(4, 0, 3, RitualComponent.WATER));
|
||||
flightRitual.add(new RitualComponent(-1, 1, 0, RitualComponent.FIRE));
|
||||
flightRitual.add(new RitualComponent(1, 1, 0, RitualComponent.FIRE));
|
||||
flightRitual.add(new RitualComponent(0, 1, -1, RitualComponent.FIRE));
|
||||
flightRitual.add(new RitualComponent(0, 1, 1, RitualComponent.FIRE));
|
||||
flightRitual.add(new RitualComponent(-2, 1, 0, RitualComponent.BLANK));
|
||||
flightRitual.add(new RitualComponent(2, 1, 0, RitualComponent.BLANK));
|
||||
flightRitual.add(new RitualComponent(0, 1, -2, RitualComponent.BLANK));
|
||||
flightRitual.add(new RitualComponent(0, 1, 2, RitualComponent.BLANK));
|
||||
flightRitual.add(new RitualComponent(-4, 1, 0, RitualComponent.BLANK));
|
||||
flightRitual.add(new RitualComponent(4, 1, 0, RitualComponent.BLANK));
|
||||
flightRitual.add(new RitualComponent(0, 1, -4, RitualComponent.BLANK));
|
||||
flightRitual.add(new RitualComponent(0, 1, 4, RitualComponent.BLANK));
|
||||
flightRitual.add(new RitualComponent(-5, 1, 0, RitualComponent.AIR));
|
||||
flightRitual.add(new RitualComponent(5, 1, 0, RitualComponent.AIR));
|
||||
flightRitual.add(new RitualComponent(0, 1, -5, RitualComponent.AIR));
|
||||
flightRitual.add(new RitualComponent(0, 1, 5, RitualComponent.AIR));
|
||||
flightRitual.add(new RitualComponent(5, 0, 0, RitualComponent.DUSK));
|
||||
flightRitual.add(new RitualComponent(-5, 0, 0, RitualComponent.DUSK));
|
||||
flightRitual.add(new RitualComponent(0, 0, 5, RitualComponent.DUSK));
|
||||
flightRitual.add(new RitualComponent(0, 0, -5, RitualComponent.DUSK));
|
||||
|
||||
for (int i = 2; i <= 4; i++)
|
||||
{
|
||||
flightRitual.add(new RitualComponent(-i, 2, 0, RitualComponent.EARTH));
|
||||
flightRitual.add(new RitualComponent(i, 2, 0, RitualComponent.EARTH));
|
||||
flightRitual.add(new RitualComponent(0, 2, -i, RitualComponent.EARTH));
|
||||
flightRitual.add(new RitualComponent(0, 2, i, RitualComponent.EARTH));
|
||||
}
|
||||
|
||||
flightRitual.add(new RitualComponent(2, 4, 1, RitualComponent.FIRE));
|
||||
flightRitual.add(new RitualComponent(1, 4, 2, RitualComponent.FIRE));
|
||||
flightRitual.add(new RitualComponent(-2, 4, 1, RitualComponent.FIRE));
|
||||
flightRitual.add(new RitualComponent(1, 4, -2, RitualComponent.FIRE));
|
||||
flightRitual.add(new RitualComponent(2, 4, -1, RitualComponent.FIRE));
|
||||
flightRitual.add(new RitualComponent(-1, 4, 2, RitualComponent.FIRE));
|
||||
flightRitual.add(new RitualComponent(-2, 4, -1, RitualComponent.FIRE));
|
||||
flightRitual.add(new RitualComponent(-1, 4, -2, RitualComponent.FIRE));
|
||||
flightRitual.add(new RitualComponent(2, 4, 2, RitualComponent.AIR));
|
||||
flightRitual.add(new RitualComponent(-2, 4, 2, RitualComponent.AIR));
|
||||
flightRitual.add(new RitualComponent(2, 4, -2, RitualComponent.AIR));
|
||||
flightRitual.add(new RitualComponent(-2, 4, -2, RitualComponent.AIR));
|
||||
flightRitual.add(new RitualComponent(-4, 2, -4, RitualComponent.FIRE));
|
||||
flightRitual.add(new RitualComponent(4, 2, 4, RitualComponent.FIRE));
|
||||
flightRitual.add(new RitualComponent(4, 2, -4, RitualComponent.FIRE));
|
||||
flightRitual.add(new RitualComponent(-4, 2, 4, RitualComponent.FIRE));
|
||||
|
||||
for (int i = -1; i <= 1; i++)
|
||||
{
|
||||
flightRitual.add(new RitualComponent(3, 4, i, RitualComponent.EARTH));
|
||||
flightRitual.add(new RitualComponent(-3, 4, i, RitualComponent.EARTH));
|
||||
flightRitual.add(new RitualComponent(i, 4, 3, RitualComponent.EARTH));
|
||||
flightRitual.add(new RitualComponent(i, 4, -3, RitualComponent.EARTH));
|
||||
}
|
||||
return flightRitual;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
package WayofTime.alchemicalWizardry.common.rituals;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.potion.Potion;
|
||||
|
@ -7,14 +10,16 @@ import net.minecraft.potion.PotionEffect;
|
|||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.IPlantable;
|
||||
import WayofTime.alchemicalWizardry.common.LifeEssenceNetwork;
|
||||
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.common.spell.complex.effect.SpellHelper;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone;
|
||||
|
||||
public class RitualEffectGrowth extends RitualEffect
|
||||
{
|
||||
@Override
|
||||
public void performEffect(TEMasterStone ritualStone)
|
||||
public void performEffect(IMasterRitualStone ritualStone)
|
||||
{
|
||||
String owner = ritualStone.getOwner();
|
||||
World worldSave = MinecraftServer.getServer().worldServers[0];
|
||||
|
@ -27,10 +32,10 @@ public class RitualEffectGrowth extends RitualEffect
|
|||
}
|
||||
|
||||
int currentEssence = data.currentEssence;
|
||||
World world = ritualStone.getWorldObj();
|
||||
int x = ritualStone.xCoord;
|
||||
int y = ritualStone.yCoord;
|
||||
int z = ritualStone.zCoord;
|
||||
World world = ritualStone.getWorld();
|
||||
int x = ritualStone.getXCoord();
|
||||
int y = ritualStone.getYCoord();
|
||||
int z = ritualStone.getZCoord();
|
||||
|
||||
if (currentEssence < this.getCostPerRefresh())
|
||||
{
|
||||
|
@ -81,4 +86,19 @@ public class RitualEffectGrowth extends RitualEffect
|
|||
{
|
||||
return 100;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RitualComponent> getRitualComponentList()
|
||||
{
|
||||
ArrayList<RitualComponent> growthRitual = new ArrayList();
|
||||
growthRitual.add(new RitualComponent(1, 0, 0, 1));
|
||||
growthRitual.add(new RitualComponent(-1, 0, 0, 1));
|
||||
growthRitual.add(new RitualComponent(0, 0, 1, 1));
|
||||
growthRitual.add(new RitualComponent(0, 0, -1, 1));
|
||||
growthRitual.add(new RitualComponent(-1, 0, 1, 3));
|
||||
growthRitual.add(new RitualComponent(1, 0, 1, 3));
|
||||
growthRitual.add(new RitualComponent(-1, 0, -1, 3));
|
||||
growthRitual.add(new RitualComponent(1, 0, -1, 3));
|
||||
return growthRitual;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
package WayofTime.alchemicalWizardry.common.rituals;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.LifeEssenceNetwork;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.potion.Potion;
|
||||
|
@ -9,9 +11,10 @@ import net.minecraft.potion.PotionEffect;
|
|||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone;
|
||||
import WayofTime.alchemicalWizardry.api.rituals.RitualComponent;
|
||||
import WayofTime.alchemicalWizardry.api.rituals.RitualEffect;
|
||||
import WayofTime.alchemicalWizardry.api.soulNetwork.LifeEssenceNetwork;
|
||||
|
||||
public class RitualEffectHealing extends RitualEffect
|
||||
{
|
||||
|
@ -19,7 +22,7 @@ public class RitualEffectHealing extends RitualEffect
|
|||
//public final int amount = 10;
|
||||
|
||||
@Override
|
||||
public void performEffect(TEMasterStone ritualStone)
|
||||
public void performEffect(IMasterRitualStone ritualStone)
|
||||
{
|
||||
String owner = ritualStone.getOwner();
|
||||
World worldSave = MinecraftServer.getServer().worldServers[0];
|
||||
|
@ -32,10 +35,10 @@ public class RitualEffectHealing extends RitualEffect
|
|||
}
|
||||
|
||||
int currentEssence = data.currentEssence;
|
||||
World world = ritualStone.getWorldObj();
|
||||
int x = ritualStone.xCoord;
|
||||
int y = ritualStone.yCoord;
|
||||
int z = ritualStone.zCoord;
|
||||
World world = ritualStone.getWorld();
|
||||
int x = ritualStone.getXCoord();
|
||||
int y = ritualStone.getYCoord();
|
||||
int z = ritualStone.getZCoord();
|
||||
|
||||
if (world.getWorldTime() % this.timeDelay != 0)
|
||||
{
|
||||
|
@ -123,4 +126,55 @@ public class RitualEffectHealing extends RitualEffect
|
|||
// TODO Auto-generated method stub
|
||||
return 20;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RitualComponent> getRitualComponentList()
|
||||
{
|
||||
ArrayList<RitualComponent> healingRitual = new ArrayList();
|
||||
healingRitual.add(new RitualComponent(4, 0, 0, RitualComponent.AIR));
|
||||
healingRitual.add(new RitualComponent(5, 0, -1, RitualComponent.AIR));
|
||||
healingRitual.add(new RitualComponent(5, 0, 1, RitualComponent.AIR));
|
||||
healingRitual.add(new RitualComponent(-4, 0, 0, RitualComponent.AIR));
|
||||
healingRitual.add(new RitualComponent(-5, 0, -1, RitualComponent.AIR));
|
||||
healingRitual.add(new RitualComponent(-5, 0, 1, RitualComponent.AIR));
|
||||
healingRitual.add(new RitualComponent(0, 0, 4, RitualComponent.FIRE));
|
||||
healingRitual.add(new RitualComponent(-1, 0, 5, RitualComponent.FIRE));
|
||||
healingRitual.add(new RitualComponent(1, 0, 5, RitualComponent.FIRE));
|
||||
healingRitual.add(new RitualComponent(0, 0, -4, RitualComponent.FIRE));
|
||||
healingRitual.add(new RitualComponent(-1, 0, -5, RitualComponent.FIRE));
|
||||
healingRitual.add(new RitualComponent(1, 0, -5, RitualComponent.FIRE));
|
||||
healingRitual.add(new RitualComponent(3, 0, 5, RitualComponent.WATER));
|
||||
healingRitual.add(new RitualComponent(5, 0, 3, RitualComponent.WATER));
|
||||
healingRitual.add(new RitualComponent(3, 0, -5, RitualComponent.WATER));
|
||||
healingRitual.add(new RitualComponent(5, 0, -3, RitualComponent.WATER));
|
||||
healingRitual.add(new RitualComponent(-3, 0, 5, RitualComponent.WATER));
|
||||
healingRitual.add(new RitualComponent(-5, 0, 3, RitualComponent.WATER));
|
||||
healingRitual.add(new RitualComponent(-3, 0, -5, RitualComponent.WATER));
|
||||
healingRitual.add(new RitualComponent(-5, 0, -3, RitualComponent.WATER));
|
||||
healingRitual.add(new RitualComponent(-3, 0, -3, RitualComponent.DUSK));
|
||||
healingRitual.add(new RitualComponent(-3, 0, 3, RitualComponent.DUSK));
|
||||
healingRitual.add(new RitualComponent(3, 0, -3, RitualComponent.DUSK));
|
||||
healingRitual.add(new RitualComponent(3, 0, 3, RitualComponent.DUSK));
|
||||
healingRitual.add(new RitualComponent(4, 0, 5, RitualComponent.EARTH));
|
||||
healingRitual.add(new RitualComponent(4, -1, 5, RitualComponent.EARTH));
|
||||
healingRitual.add(new RitualComponent(5, 0, 4, RitualComponent.EARTH));
|
||||
healingRitual.add(new RitualComponent(5, -1, 4, RitualComponent.EARTH));
|
||||
healingRitual.add(new RitualComponent(5, 0, 5, RitualComponent.EARTH));
|
||||
healingRitual.add(new RitualComponent(4, 0, -5, RitualComponent.EARTH));
|
||||
healingRitual.add(new RitualComponent(4, -1, -5, RitualComponent.EARTH));
|
||||
healingRitual.add(new RitualComponent(5, 0, -4, RitualComponent.EARTH));
|
||||
healingRitual.add(new RitualComponent(5, -1, -4, RitualComponent.EARTH));
|
||||
healingRitual.add(new RitualComponent(5, 0, -5, RitualComponent.EARTH));
|
||||
healingRitual.add(new RitualComponent(-4, 0, 5, RitualComponent.EARTH));
|
||||
healingRitual.add(new RitualComponent(-4, -1, 5, RitualComponent.EARTH));
|
||||
healingRitual.add(new RitualComponent(-5, 0, 4, RitualComponent.EARTH));
|
||||
healingRitual.add(new RitualComponent(-5, -1, 4, RitualComponent.EARTH));
|
||||
healingRitual.add(new RitualComponent(-5, 0, 5, RitualComponent.EARTH));
|
||||
healingRitual.add(new RitualComponent(-4, 0, -5, RitualComponent.EARTH));
|
||||
healingRitual.add(new RitualComponent(-4, -1, -5, RitualComponent.EARTH));
|
||||
healingRitual.add(new RitualComponent(-5, 0, -4, RitualComponent.EARTH));
|
||||
healingRitual.add(new RitualComponent(-5, -1, -4, RitualComponent.EARTH));
|
||||
healingRitual.add(new RitualComponent(-5, 0, -5, RitualComponent.EARTH));
|
||||
return healingRitual;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
package WayofTime.alchemicalWizardry.common.rituals;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.LifeEssenceNetwork;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.potion.Potion;
|
||||
|
@ -10,14 +11,16 @@ import net.minecraft.potion.PotionEffect;
|
|||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
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.common.spell.complex.effect.SpellHelper;
|
||||
|
||||
public class RitualEffectInterdiction extends RitualEffect
|
||||
{
|
||||
@Override
|
||||
public void performEffect(TEMasterStone ritualStone)
|
||||
public void performEffect(IMasterRitualStone ritualStone)
|
||||
{
|
||||
String owner = ritualStone.getOwner();
|
||||
World worldSave = MinecraftServer.getServer().worldServers[0];
|
||||
|
@ -30,10 +33,10 @@ public class RitualEffectInterdiction extends RitualEffect
|
|||
}
|
||||
|
||||
int currentEssence = data.currentEssence;
|
||||
World world = ritualStone.getWorldObj();
|
||||
int x = ritualStone.xCoord;
|
||||
int y = ritualStone.yCoord;
|
||||
int z = ritualStone.zCoord;
|
||||
World world = ritualStone.getWorld();
|
||||
int x = ritualStone.getXCoord();
|
||||
int y = ritualStone.getYCoord();
|
||||
int z = ritualStone.getZCoord();
|
||||
|
||||
if (currentEssence < this.getCostPerRefresh())
|
||||
{
|
||||
|
@ -91,4 +94,19 @@ public class RitualEffectInterdiction extends RitualEffect
|
|||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RitualComponent> getRitualComponentList()
|
||||
{
|
||||
ArrayList<RitualComponent> interdictionRitual = new ArrayList();
|
||||
interdictionRitual.add(new RitualComponent(1, 0, 0, 4));
|
||||
interdictionRitual.add(new RitualComponent(-1, 0, 0, 4));
|
||||
interdictionRitual.add(new RitualComponent(0, 0, 1, 4));
|
||||
interdictionRitual.add(new RitualComponent(0, 0, -1, 4));
|
||||
interdictionRitual.add(new RitualComponent(-1, 0, 1, 4));
|
||||
interdictionRitual.add(new RitualComponent(1, 0, 1, 4));
|
||||
interdictionRitual.add(new RitualComponent(-1, 0, -1, 4));
|
||||
interdictionRitual.add(new RitualComponent(1, 0, -1, 4));
|
||||
return interdictionRitual;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package WayofTime.alchemicalWizardry.common.rituals;
|
||||
|
||||
import ibxm.Player;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
|
@ -12,15 +11,16 @@ import net.minecraft.potion.PotionEffect;
|
|||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.common.LifeEssenceNetwork;
|
||||
import WayofTime.alchemicalWizardry.common.PacketHandler;
|
||||
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.common.spell.complex.effect.SpellHelper;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone;
|
||||
|
||||
public class RitualEffectJumping extends RitualEffect
|
||||
{
|
||||
@Override
|
||||
public void performEffect(TEMasterStone ritualStone)
|
||||
public void performEffect(IMasterRitualStone ritualStone)
|
||||
{
|
||||
String owner = ritualStone.getOwner();
|
||||
World worldSave = MinecraftServer.getServer().worldServers[0];
|
||||
|
@ -33,10 +33,10 @@ public class RitualEffectJumping extends RitualEffect
|
|||
}
|
||||
|
||||
int currentEssence = data.currentEssence;
|
||||
World world = ritualStone.getWorldObj();
|
||||
int x = ritualStone.xCoord;
|
||||
int y = ritualStone.yCoord;
|
||||
int z = ritualStone.zCoord;
|
||||
World world = ritualStone.getWorld();
|
||||
int x = ritualStone.getXCoord();
|
||||
int y = ritualStone.getYCoord();
|
||||
int z = ritualStone.getZCoord();
|
||||
|
||||
if (currentEssence < this.getCostPerRefresh())
|
||||
{
|
||||
|
@ -96,4 +96,19 @@ public class RitualEffectJumping extends RitualEffect
|
|||
{
|
||||
return 5;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RitualComponent> getRitualComponentList()
|
||||
{
|
||||
ArrayList<RitualComponent> jumpingRitual = new ArrayList();
|
||||
|
||||
for (int i = -1; i <= 1; i++)
|
||||
{
|
||||
jumpingRitual.add(new RitualComponent(1, i, 1, RitualComponent.AIR));
|
||||
jumpingRitual.add(new RitualComponent(-1, i, 1, RitualComponent.AIR));
|
||||
jumpingRitual.add(new RitualComponent(-1, i, -1, RitualComponent.AIR));
|
||||
jumpingRitual.add(new RitualComponent(1, i, -1, RitualComponent.AIR));
|
||||
}
|
||||
return jumpingRitual;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,20 +1,26 @@
|
|||
package WayofTime.alchemicalWizardry.common.rituals;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.common.LifeEssenceNetwork;
|
||||
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.common.block.BlockSpectralContainer;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone;
|
||||
|
||||
public class RitualEffectLava extends RitualEffect
|
||||
{
|
||||
@Override
|
||||
public void performEffect(TEMasterStone ritualStone)
|
||||
public void performEffect(IMasterRitualStone ritualStone)
|
||||
{
|
||||
String owner = ritualStone.getOwner();
|
||||
World worldSave = MinecraftServer.getServer().worldServers[0];
|
||||
|
@ -27,12 +33,14 @@ public class RitualEffectLava extends RitualEffect
|
|||
}
|
||||
|
||||
int currentEssence = data.currentEssence;
|
||||
World world = ritualStone.getWorldObj();
|
||||
int x = ritualStone.xCoord;
|
||||
int y = ritualStone.yCoord;
|
||||
int z = ritualStone.zCoord;
|
||||
World world = ritualStone.getWorld();
|
||||
int x = ritualStone.getXCoord();
|
||||
int y = ritualStone.getYCoord();
|
||||
int z = ritualStone.getZCoord();
|
||||
|
||||
if (world.isAirBlock(x, y + 1, z))
|
||||
Block block = world.getBlock(x, y + 1, z);
|
||||
|
||||
if (world.isAirBlock(x, y + 1, z) && !(block instanceof BlockSpectralContainer))
|
||||
{
|
||||
if (currentEssence < this.getCostPerRefresh())
|
||||
{
|
||||
|
@ -64,4 +72,15 @@ public class RitualEffectLava extends RitualEffect
|
|||
// TODO Auto-generated method stub
|
||||
return 500;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RitualComponent> getRitualComponentList()
|
||||
{
|
||||
ArrayList<RitualComponent> lavaRitual = new ArrayList();
|
||||
lavaRitual.add(new RitualComponent(1, 0, 0, 2));
|
||||
lavaRitual.add(new RitualComponent(-1, 0, 0, 2));
|
||||
lavaRitual.add(new RitualComponent(0, 0, 1, 2));
|
||||
lavaRitual.add(new RitualComponent(0, 0, -1, 2));
|
||||
return lavaRitual;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package WayofTime.alchemicalWizardry.common.rituals;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
|
@ -10,14 +11,16 @@ import net.minecraft.potion.PotionEffect;
|
|||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.common.LifeEssenceNetwork;
|
||||
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.common.spell.complex.effect.SpellHelper;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone;
|
||||
|
||||
public class RitualEffectLeap extends RitualEffect
|
||||
{
|
||||
@Override
|
||||
public void performEffect(TEMasterStone ritualStone)
|
||||
public void performEffect(IMasterRitualStone ritualStone)
|
||||
{
|
||||
String owner = ritualStone.getOwner();
|
||||
World worldSave = MinecraftServer.getServer().worldServers[0];
|
||||
|
@ -30,10 +33,10 @@ public class RitualEffectLeap extends RitualEffect
|
|||
}
|
||||
|
||||
int currentEssence = data.currentEssence;
|
||||
World world = ritualStone.getWorldObj();
|
||||
int x = ritualStone.xCoord;
|
||||
int y = ritualStone.yCoord;
|
||||
int z = ritualStone.zCoord;
|
||||
World world = ritualStone.getWorld();
|
||||
int x = ritualStone.getXCoord();
|
||||
int y = ritualStone.getYCoord();
|
||||
int z = ritualStone.getZCoord();
|
||||
|
||||
if (currentEssence < this.getCostPerRefresh())
|
||||
{
|
||||
|
@ -136,4 +139,20 @@ public class RitualEffectLeap extends RitualEffect
|
|||
{
|
||||
return 5;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RitualComponent> getRitualComponentList()
|
||||
{
|
||||
ArrayList<RitualComponent> leapingRitual = new ArrayList();
|
||||
leapingRitual.add(new RitualComponent(0, 0, -2, RitualComponent.DUSK));
|
||||
leapingRitual.add(new RitualComponent(1, 0, -1, RitualComponent.AIR));
|
||||
leapingRitual.add(new RitualComponent(-1, 0, -1, RitualComponent.AIR));
|
||||
|
||||
for (int i = 0; i <= 2; i++)
|
||||
{
|
||||
leapingRitual.add(new RitualComponent(2, 0, i, RitualComponent.AIR));
|
||||
leapingRitual.add(new RitualComponent(-2, 0, i, RitualComponent.AIR));
|
||||
}
|
||||
return leapingRitual;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package WayofTime.alchemicalWizardry.common.rituals;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.LifeEssenceNetwork;
|
||||
import WayofTime.alchemicalWizardry.common.block.BlockTeleposer;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
@ -11,11 +11,16 @@ import net.minecraft.potion.PotionEffect;
|
|||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
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.common.block.BlockTeleposer;
|
||||
|
||||
public class RitualEffectMagnetic extends RitualEffect
|
||||
{
|
||||
@Override
|
||||
public void performEffect(TEMasterStone ritualStone)
|
||||
public void performEffect(IMasterRitualStone ritualStone)
|
||||
{
|
||||
String owner = ritualStone.getOwner();
|
||||
World worldSave = MinecraftServer.getServer().worldServers[0];
|
||||
|
@ -28,10 +33,10 @@ public class RitualEffectMagnetic extends RitualEffect
|
|||
}
|
||||
|
||||
int currentEssence = data.currentEssence;
|
||||
World world = ritualStone.getWorldObj();
|
||||
int x = ritualStone.xCoord;
|
||||
int y = ritualStone.yCoord;
|
||||
int z = ritualStone.zCoord;
|
||||
World world = ritualStone.getWorld();
|
||||
int x = ritualStone.getXCoord();
|
||||
int y = ritualStone.getYCoord();
|
||||
int z = ritualStone.getZCoord();
|
||||
|
||||
if (world.getWorldTime() % 40 != 0)
|
||||
{
|
||||
|
@ -118,4 +123,27 @@ public class RitualEffectMagnetic extends RitualEffect
|
|||
{
|
||||
return 50;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RitualComponent> getRitualComponentList()
|
||||
{
|
||||
ArrayList<RitualComponent> magneticRitual = new ArrayList();
|
||||
magneticRitual.add(new RitualComponent(1, 0, 1, RitualComponent.EARTH));
|
||||
magneticRitual.add(new RitualComponent(1, 0, -1, RitualComponent.EARTH));
|
||||
magneticRitual.add(new RitualComponent(-1, 0, 1, RitualComponent.EARTH));
|
||||
magneticRitual.add(new RitualComponent(-1, 0, -1, RitualComponent.EARTH));
|
||||
magneticRitual.add(new RitualComponent(2, 1, 0, RitualComponent.EARTH));
|
||||
magneticRitual.add(new RitualComponent(0, 1, 2, RitualComponent.EARTH));
|
||||
magneticRitual.add(new RitualComponent(-2, 1, 0, RitualComponent.EARTH));
|
||||
magneticRitual.add(new RitualComponent(0, 1, -2, RitualComponent.EARTH));
|
||||
magneticRitual.add(new RitualComponent(2, 1, 2, RitualComponent.AIR));
|
||||
magneticRitual.add(new RitualComponent(2, 1, -2, RitualComponent.AIR));
|
||||
magneticRitual.add(new RitualComponent(-2, 1, 2, RitualComponent.AIR));
|
||||
magneticRitual.add(new RitualComponent(-2, 1, -2, RitualComponent.AIR));
|
||||
magneticRitual.add(new RitualComponent(2, 2, 0, RitualComponent.FIRE));
|
||||
magneticRitual.add(new RitualComponent(0, 2, 2, RitualComponent.FIRE));
|
||||
magneticRitual.add(new RitualComponent(-2, 2, 0, RitualComponent.FIRE));
|
||||
magneticRitual.add(new RitualComponent(0, 2, -2, RitualComponent.FIRE));
|
||||
return magneticRitual;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
package WayofTime.alchemicalWizardry.common.rituals;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
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.init.Items;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.potion.Potion;
|
||||
|
@ -14,17 +14,17 @@ import net.minecraft.potion.PotionEffect;
|
|||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.ModItems;
|
||||
import WayofTime.alchemicalWizardry.common.LifeEssenceNetwork;
|
||||
import WayofTime.alchemicalWizardry.api.bindingRegistry.BindingRegistry;
|
||||
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.common.spell.complex.effect.SpellHelper;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone;
|
||||
|
||||
public class RitualEffectSoulBound extends RitualEffect
|
||||
{
|
||||
@Override
|
||||
public void performEffect(TEMasterStone ritualStone)
|
||||
public void performEffect(IMasterRitualStone ritualStone)
|
||||
{
|
||||
String owner = ritualStone.getOwner();
|
||||
World worldSave = MinecraftServer.getServer().worldServers[0];
|
||||
|
@ -37,10 +37,10 @@ public class RitualEffectSoulBound extends RitualEffect
|
|||
}
|
||||
|
||||
int currentEssence = data.currentEssence;
|
||||
World world = ritualStone.getWorldObj();
|
||||
int x = ritualStone.xCoord;
|
||||
int y = ritualStone.yCoord;
|
||||
int z = ritualStone.zCoord;
|
||||
World world = ritualStone.getWorld();
|
||||
int x = ritualStone.getXCoord();
|
||||
int y = ritualStone.getYCoord();
|
||||
int z = ritualStone.getZCoord();
|
||||
|
||||
if (currentEssence < this.getCostPerRefresh())
|
||||
{
|
||||
|
@ -75,58 +75,16 @@ public class RitualEffectSoulBound extends RitualEffect
|
|||
continue;
|
||||
}
|
||||
|
||||
ItemStack itemGoggles = null;
|
||||
|
||||
if (AlchemicalWizardry.isThaumcraftLoaded)
|
||||
if(BindingRegistry.isRequiredItemValid(itemStack))
|
||||
{
|
||||
//itemGoggles = ItemApi.getItem("itemGoggles", 0);
|
||||
ritualStone.setVar1(BindingRegistry.getIndexForItem(itemStack)+1);
|
||||
world.addWeatherEffect(new EntityLightningBolt(world, x, y + 1, z));
|
||||
ritualStone.setCooldown(ritualStone.getCooldown() - 1);
|
||||
item.setDead();
|
||||
break;
|
||||
}
|
||||
|
||||
if (itemStack.getItem() == ModItems.apprenticeBloodOrb)
|
||||
{
|
||||
ritualStone.setVar1(Item.getIdFromItem(ModItems.energyBlaster));
|
||||
world.addWeatherEffect(new EntityLightningBolt(world, x, y + 1, z));
|
||||
ritualStone.setCooldown(ritualStone.getCooldown() - 1);
|
||||
item.setDead();
|
||||
return;
|
||||
} else if (itemStack.getItem() == Items.diamond_sword)
|
||||
{
|
||||
ritualStone.setVar1(Item.getIdFromItem(ModItems.energySword));
|
||||
world.addWeatherEffect(new EntityLightningBolt(world, x, y + 1, z));
|
||||
ritualStone.setCooldown(ritualStone.getCooldown() - 1);
|
||||
item.setDead();
|
||||
return;
|
||||
} else if (itemStack.getItem() == Items.diamond_pickaxe)
|
||||
{
|
||||
ritualStone.setVar1(Item.getIdFromItem(ModItems.boundPickaxe));
|
||||
world.addWeatherEffect(new EntityLightningBolt(world, x, y + 1, z));
|
||||
ritualStone.setCooldown(ritualStone.getCooldown() - 1);
|
||||
item.setDead();
|
||||
return;
|
||||
} else if (itemStack.getItem() == Items.diamond_axe)
|
||||
{
|
||||
ritualStone.setVar1(Item.getIdFromItem(ModItems.boundAxe));
|
||||
world.addWeatherEffect(new EntityLightningBolt(world, x, y + 1, z));
|
||||
ritualStone.setCooldown(ritualStone.getCooldown() - 1);
|
||||
item.setDead();
|
||||
return;
|
||||
} else if (itemStack.getItem() == Items.diamond_shovel)
|
||||
{
|
||||
ritualStone.setVar1(Item.getIdFromItem(ModItems.boundShovel));
|
||||
world.addWeatherEffect(new EntityLightningBolt(world, x, y + 1, z));
|
||||
ritualStone.setCooldown(ritualStone.getCooldown() - 1);
|
||||
item.setDead();
|
||||
return;
|
||||
}
|
||||
// else if (itemGoggles != null && itemGoggles.isItemEqual(itemStack))
|
||||
// {
|
||||
// ritualStone.setVar1(Item.getIdFromItem(ModItems.sanguineHelmet));
|
||||
// world.addWeatherEffect(new EntityLightningBolt(world, x, y + 1, z));
|
||||
// ritualStone.setCooldown(ritualStone.getCooldown() - 1);
|
||||
// item.setDead();
|
||||
// return;
|
||||
// }
|
||||
|
||||
if (world.rand.nextInt(10) == 0)
|
||||
{
|
||||
SpellHelper.sendIndexedParticleToAllAround(world, x, y, z, 20, world.provider.dimensionId, 1, x, y, z);
|
||||
|
@ -181,11 +139,12 @@ public class RitualEffectSoulBound extends RitualEffect
|
|||
|
||||
if (ritualStone.getCooldown() <= 0)
|
||||
{
|
||||
ItemStack spawnedItem = new ItemStack(Item.getItemById(ritualStone.getVar1()), 1, 0);
|
||||
|
||||
ItemStack spawnedItem = BindingRegistry.getOutputForIndex(ritualStone.getVar1()-1);
|
||||
|
||||
if (spawnedItem != null)
|
||||
{
|
||||
EntityItem newItem = new EntityItem(world, x + 0.5, y + 1, z + 0.5, spawnedItem);
|
||||
EntityItem newItem = new EntityItem(world, x + 0.5, y + 1, z + 0.5, spawnedItem.copy());
|
||||
world.spawnEntityInWorld(newItem);
|
||||
}
|
||||
|
||||
|
@ -206,4 +165,35 @@ public class RitualEffectSoulBound extends RitualEffect
|
|||
{
|
||||
return 200;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RitualComponent> getRitualComponentList()
|
||||
{
|
||||
ArrayList<RitualComponent> boundSoulRitual = new ArrayList();
|
||||
boundSoulRitual.add(new RitualComponent(3, 0, 0, 2));
|
||||
boundSoulRitual.add(new RitualComponent(-3, 0, 0, 2));
|
||||
boundSoulRitual.add(new RitualComponent(0, 0, 3, 2));
|
||||
boundSoulRitual.add(new RitualComponent(0, 0, -3, 2));
|
||||
boundSoulRitual.add(new RitualComponent(2, 0, 2, 4));
|
||||
boundSoulRitual.add(new RitualComponent(-2, 0, 2, 4));
|
||||
boundSoulRitual.add(new RitualComponent(2, 0, -2, 4));
|
||||
boundSoulRitual.add(new RitualComponent(-2, 0, -2, 4));
|
||||
boundSoulRitual.add(new RitualComponent(4, 2, 0, 1));
|
||||
boundSoulRitual.add(new RitualComponent(-4, 2, 0, 1));
|
||||
boundSoulRitual.add(new RitualComponent(0, 2, 4, 1));
|
||||
boundSoulRitual.add(new RitualComponent(0, 2, -4, 1));
|
||||
boundSoulRitual.add(new RitualComponent(3, 2, 3, 3));
|
||||
boundSoulRitual.add(new RitualComponent(3, 2, -3, 3));
|
||||
boundSoulRitual.add(new RitualComponent(-3, 2, 3, 3));
|
||||
boundSoulRitual.add(new RitualComponent(-3, 2, -3, 3));
|
||||
boundSoulRitual.add(new RitualComponent(4, 1, 0, 0));
|
||||
boundSoulRitual.add(new RitualComponent(-4, 1, 0, 0));
|
||||
boundSoulRitual.add(new RitualComponent(0, 1, 4, 0));
|
||||
boundSoulRitual.add(new RitualComponent(0, 1, -4, 0));
|
||||
boundSoulRitual.add(new RitualComponent(3, 1, 3, 0));
|
||||
boundSoulRitual.add(new RitualComponent(3, 1, -3, 0));
|
||||
boundSoulRitual.add(new RitualComponent(-3, 1, 3, 0));
|
||||
boundSoulRitual.add(new RitualComponent(-3, 1, -3, 0));
|
||||
return boundSoulRitual;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
package WayofTime.alchemicalWizardry.common.rituals;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.LifeEssenceNetwork;
|
||||
import WayofTime.alchemicalWizardry.common.entity.projectile.EntityMeteor;
|
||||
import WayofTime.alchemicalWizardry.common.summoning.meteor.MeteorRegistry;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.potion.Potion;
|
||||
|
@ -11,13 +10,17 @@ import net.minecraft.potion.PotionEffect;
|
|||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.util.List;
|
||||
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.common.entity.projectile.EntityMeteor;
|
||||
import WayofTime.alchemicalWizardry.common.summoning.meteor.MeteorRegistry;
|
||||
|
||||
public class RitualEffectSummonMeteor extends RitualEffect
|
||||
{
|
||||
@Override
|
||||
public void performEffect(TEMasterStone ritualStone)
|
||||
public void performEffect(IMasterRitualStone ritualStone)
|
||||
{
|
||||
String owner = ritualStone.getOwner();
|
||||
World worldSave = MinecraftServer.getServer().worldServers[0];
|
||||
|
@ -30,10 +33,10 @@ public class RitualEffectSummonMeteor extends RitualEffect
|
|||
}
|
||||
|
||||
int currentEssence = data.currentEssence;
|
||||
World world = ritualStone.getWorldObj();
|
||||
int x = ritualStone.xCoord;
|
||||
int y = ritualStone.yCoord;
|
||||
int z = ritualStone.zCoord;
|
||||
World world = ritualStone.getWorld();
|
||||
int x = ritualStone.getXCoord();
|
||||
int y = ritualStone.getYCoord();
|
||||
int z = ritualStone.getZCoord();
|
||||
|
||||
if (ritualStone.getCooldown() > 0)
|
||||
{
|
||||
|
@ -88,4 +91,113 @@ public class RitualEffectSummonMeteor extends RitualEffect
|
|||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RitualComponent> getRitualComponentList()
|
||||
{
|
||||
ArrayList<RitualComponent> meteorRitual = new ArrayList();
|
||||
meteorRitual.add(new RitualComponent(2, 0, 0, RitualComponent.FIRE));
|
||||
meteorRitual.add(new RitualComponent(-2, 0, 0, RitualComponent.FIRE));
|
||||
meteorRitual.add(new RitualComponent(0, 0, 2, RitualComponent.FIRE));
|
||||
meteorRitual.add(new RitualComponent(0, 0, -2, RitualComponent.FIRE));
|
||||
meteorRitual.add(new RitualComponent(3, 0, 1, RitualComponent.AIR));
|
||||
meteorRitual.add(new RitualComponent(3, 0, -1, RitualComponent.AIR));
|
||||
meteorRitual.add(new RitualComponent(-3, 0, 1, RitualComponent.AIR));
|
||||
meteorRitual.add(new RitualComponent(-3, 0, -1, RitualComponent.AIR));
|
||||
meteorRitual.add(new RitualComponent(1, 0, 3, RitualComponent.AIR));
|
||||
meteorRitual.add(new RitualComponent(-1, 0, 3, RitualComponent.AIR));
|
||||
meteorRitual.add(new RitualComponent(1, 0, -3, RitualComponent.AIR));
|
||||
meteorRitual.add(new RitualComponent(-1, 0, -3, RitualComponent.AIR));
|
||||
meteorRitual.add(new RitualComponent(4, 0, 2, RitualComponent.AIR));
|
||||
meteorRitual.add(new RitualComponent(4, 0, -2, RitualComponent.AIR));
|
||||
meteorRitual.add(new RitualComponent(-4, 0, 2, RitualComponent.AIR));
|
||||
meteorRitual.add(new RitualComponent(-4, 0, -2, RitualComponent.AIR));
|
||||
meteorRitual.add(new RitualComponent(2, 0, 4, RitualComponent.AIR));
|
||||
meteorRitual.add(new RitualComponent(-2, 0, 4, RitualComponent.AIR));
|
||||
meteorRitual.add(new RitualComponent(2, 0, -4, RitualComponent.AIR));
|
||||
meteorRitual.add(new RitualComponent(-2, 0, -4, RitualComponent.AIR));
|
||||
meteorRitual.add(new RitualComponent(5, 0, 3, RitualComponent.DUSK));
|
||||
meteorRitual.add(new RitualComponent(5, 0, -3, RitualComponent.DUSK));
|
||||
meteorRitual.add(new RitualComponent(-5, 0, 3, RitualComponent.DUSK));
|
||||
meteorRitual.add(new RitualComponent(-5, 0, -3, RitualComponent.DUSK));
|
||||
meteorRitual.add(new RitualComponent(3, 0, 5, RitualComponent.DUSK));
|
||||
meteorRitual.add(new RitualComponent(-3, 0, 5, RitualComponent.DUSK));
|
||||
meteorRitual.add(new RitualComponent(3, 0, -5, RitualComponent.DUSK));
|
||||
meteorRitual.add(new RitualComponent(-3, 0, -5, RitualComponent.DUSK));
|
||||
meteorRitual.add(new RitualComponent(-4, 0, -4, RitualComponent.DUSK));
|
||||
meteorRitual.add(new RitualComponent(-4, 0, 4, RitualComponent.DUSK));
|
||||
meteorRitual.add(new RitualComponent(4, 0, 4, RitualComponent.DUSK));
|
||||
meteorRitual.add(new RitualComponent(4, 0, -4, RitualComponent.DUSK));
|
||||
|
||||
for (int i = 4; i <= 6; i++)
|
||||
{
|
||||
meteorRitual.add(new RitualComponent(i, 0, 0, RitualComponent.EARTH));
|
||||
meteorRitual.add(new RitualComponent(-i, 0, 0, RitualComponent.EARTH));
|
||||
meteorRitual.add(new RitualComponent(0, 0, i, RitualComponent.EARTH));
|
||||
meteorRitual.add(new RitualComponent(0, 0, -i, RitualComponent.EARTH));
|
||||
}
|
||||
|
||||
meteorRitual.add(new RitualComponent(8, 0, 0, RitualComponent.EARTH));
|
||||
meteorRitual.add(new RitualComponent(-8, 0, 0, RitualComponent.EARTH));
|
||||
meteorRitual.add(new RitualComponent(0, 0, 8, RitualComponent.EARTH));
|
||||
meteorRitual.add(new RitualComponent(0, 0, -8, RitualComponent.EARTH));
|
||||
meteorRitual.add(new RitualComponent(8, 1, 0, RitualComponent.EARTH));
|
||||
meteorRitual.add(new RitualComponent(-8, 1, 0, RitualComponent.EARTH));
|
||||
meteorRitual.add(new RitualComponent(0, 1, 8, RitualComponent.EARTH));
|
||||
meteorRitual.add(new RitualComponent(0, 1, -8, RitualComponent.EARTH));
|
||||
meteorRitual.add(new RitualComponent(7, 1, 0, RitualComponent.EARTH));
|
||||
meteorRitual.add(new RitualComponent(-7, 1, 0, RitualComponent.EARTH));
|
||||
meteorRitual.add(new RitualComponent(0, 1, 7, RitualComponent.EARTH));
|
||||
meteorRitual.add(new RitualComponent(0, 1, -7, RitualComponent.EARTH));
|
||||
meteorRitual.add(new RitualComponent(7, 2, 0, RitualComponent.FIRE));
|
||||
meteorRitual.add(new RitualComponent(-7, 2, 0, RitualComponent.FIRE));
|
||||
meteorRitual.add(new RitualComponent(0, 2, 7, RitualComponent.FIRE));
|
||||
meteorRitual.add(new RitualComponent(0, 2, -7, RitualComponent.FIRE));
|
||||
meteorRitual.add(new RitualComponent(6, 2, 0, RitualComponent.FIRE));
|
||||
meteorRitual.add(new RitualComponent(-6, 2, 0, RitualComponent.FIRE));
|
||||
meteorRitual.add(new RitualComponent(0, 2, 6, RitualComponent.FIRE));
|
||||
meteorRitual.add(new RitualComponent(0, 2, -6, RitualComponent.FIRE));
|
||||
meteorRitual.add(new RitualComponent(6, 3, 0, RitualComponent.WATER));
|
||||
meteorRitual.add(new RitualComponent(-6, 3, 0, RitualComponent.WATER));
|
||||
meteorRitual.add(new RitualComponent(0, 3, 6, RitualComponent.WATER));
|
||||
meteorRitual.add(new RitualComponent(0, 3, -6, RitualComponent.WATER));
|
||||
meteorRitual.add(new RitualComponent(5, 3, 0, RitualComponent.WATER));
|
||||
meteorRitual.add(new RitualComponent(-5, 3, 0, RitualComponent.WATER));
|
||||
meteorRitual.add(new RitualComponent(0, 3, 5, RitualComponent.WATER));
|
||||
meteorRitual.add(new RitualComponent(0, 3, -5, RitualComponent.WATER));
|
||||
meteorRitual.add(new RitualComponent(5, 4, 0, RitualComponent.AIR));
|
||||
meteorRitual.add(new RitualComponent(-5, 4, 0, RitualComponent.AIR));
|
||||
meteorRitual.add(new RitualComponent(0, 4, 5, RitualComponent.AIR));
|
||||
meteorRitual.add(new RitualComponent(0, 4, -5, RitualComponent.AIR));
|
||||
|
||||
for (int i = -1; i <= 1; i++)
|
||||
{
|
||||
meteorRitual.add(new RitualComponent(i, 4, 4, RitualComponent.AIR));
|
||||
meteorRitual.add(new RitualComponent(i, 4, -4, RitualComponent.AIR));
|
||||
meteorRitual.add(new RitualComponent(4, 4, i, RitualComponent.AIR));
|
||||
meteorRitual.add(new RitualComponent(-4, 4, i, RitualComponent.AIR));
|
||||
}
|
||||
|
||||
meteorRitual.add(new RitualComponent(2, 4, 4, RitualComponent.WATER));
|
||||
meteorRitual.add(new RitualComponent(4, 4, 2, RitualComponent.WATER));
|
||||
meteorRitual.add(new RitualComponent(2, 4, -4, RitualComponent.WATER));
|
||||
meteorRitual.add(new RitualComponent(-4, 4, 2, RitualComponent.WATER));
|
||||
meteorRitual.add(new RitualComponent(-2, 4, 4, RitualComponent.WATER));
|
||||
meteorRitual.add(new RitualComponent(4, 4, -2, RitualComponent.WATER));
|
||||
meteorRitual.add(new RitualComponent(-2, 4, -4, RitualComponent.WATER));
|
||||
meteorRitual.add(new RitualComponent(-4, 4, -2, RitualComponent.WATER));
|
||||
meteorRitual.add(new RitualComponent(2, 4, 3, RitualComponent.FIRE));
|
||||
meteorRitual.add(new RitualComponent(3, 4, 2, RitualComponent.FIRE));
|
||||
meteorRitual.add(new RitualComponent(3, 4, 3, RitualComponent.FIRE));
|
||||
meteorRitual.add(new RitualComponent(-2, 4, 3, RitualComponent.FIRE));
|
||||
meteorRitual.add(new RitualComponent(3, 4, -2, RitualComponent.FIRE));
|
||||
meteorRitual.add(new RitualComponent(3, 4, -3, RitualComponent.FIRE));
|
||||
meteorRitual.add(new RitualComponent(2, 4, -3, RitualComponent.FIRE));
|
||||
meteorRitual.add(new RitualComponent(-3, 4, 2, RitualComponent.FIRE));
|
||||
meteorRitual.add(new RitualComponent(-3, 4, 3, RitualComponent.FIRE));
|
||||
meteorRitual.add(new RitualComponent(-2, 4, -3, RitualComponent.FIRE));
|
||||
meteorRitual.add(new RitualComponent(-3, 4, -2, RitualComponent.FIRE));
|
||||
meteorRitual.add(new RitualComponent(-3, 4, -3, RitualComponent.FIRE));
|
||||
return meteorRitual;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,15 +10,17 @@ import net.minecraft.potion.PotionEffect;
|
|||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.common.IBindable;
|
||||
import WayofTime.alchemicalWizardry.common.LifeEssenceNetwork;
|
||||
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.common.items.EnergyItems;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone;
|
||||
|
||||
public class RitualEffectSummonPlayer extends RitualEffect //Summons a player via the bound item
|
||||
{
|
||||
@Override
|
||||
public void performEffect(TEMasterStone ritualStone)
|
||||
public void performEffect(IMasterRitualStone ritualStone)
|
||||
{
|
||||
String owner = ritualStone.getOwner();
|
||||
World worldSave = MinecraftServer.getServer().worldServers[0];
|
||||
|
@ -31,10 +33,10 @@ public class RitualEffectSummonPlayer extends RitualEffect //Summons a player vi
|
|||
}
|
||||
|
||||
int currentEssence = data.currentEssence;
|
||||
World world = ritualStone.getWorldObj();
|
||||
int x = ritualStone.xCoord;
|
||||
int y = ritualStone.yCoord;
|
||||
int z = ritualStone.zCoord;
|
||||
World world = ritualStone.getWorld();
|
||||
int x = ritualStone.getXCoord();
|
||||
int y = ritualStone.getYCoord();
|
||||
int z = ritualStone.getZCoord();
|
||||
|
||||
if (ritualStone.getCooldown() > 0)
|
||||
{
|
||||
|
@ -100,4 +102,10 @@ public class RitualEffectSummonPlayer extends RitualEffect //Summons a player vi
|
|||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RitualComponent> getRitualComponentList() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,180 @@
|
|||
package WayofTime.alchemicalWizardry.common.rituals;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
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.common.spell.complex.effect.SpellHelper;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TESpectralContainer;
|
||||
|
||||
public class RitualEffectSupression extends RitualEffect
|
||||
{
|
||||
@Override
|
||||
public void performEffect(IMasterRitualStone ritualStone)
|
||||
{
|
||||
String owner = ritualStone.getOwner();
|
||||
World worldSave = MinecraftServer.getServer().worldServers[0];
|
||||
LifeEssenceNetwork data = (LifeEssenceNetwork) worldSave.loadItemData(LifeEssenceNetwork.class, owner);
|
||||
|
||||
if (data == null)
|
||||
{
|
||||
data = new LifeEssenceNetwork(owner);
|
||||
worldSave.setItemData(owner, data);
|
||||
}
|
||||
|
||||
int currentEssence = data.currentEssence;
|
||||
World world = ritualStone.getWorld();
|
||||
int x = ritualStone.getXCoord();
|
||||
int y = ritualStone.getYCoord();
|
||||
int z = ritualStone.getZCoord();
|
||||
|
||||
Block blockish = world.getBlock(x, y-1, z);
|
||||
int costMod = this.getCostModifier(blockish);
|
||||
int radius = this.getRadiusForModifierBlock(blockish);
|
||||
int masterRadius = radius;
|
||||
|
||||
int yIndex = (int)(world.getWorldTime() % (2*radius + 1))-radius;
|
||||
boolean expansion = false;
|
||||
|
||||
if(ritualStone.getVar1()<(radius+1))
|
||||
{
|
||||
expansion = true;
|
||||
radius = ritualStone.getVar1();
|
||||
ritualStone.setVar1(ritualStone.getVar1() + 1);
|
||||
}
|
||||
|
||||
if (currentEssence < this.getCostPerRefresh()*costMod)
|
||||
{
|
||||
EntityPlayer entityOwner = MinecraftServer.getServer().getConfigurationManager().getPlayerForUsername(owner);
|
||||
|
||||
if (entityOwner == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
entityOwner.addPotionEffect(new PotionEffect(Potion.confusion.id, 80));
|
||||
} else
|
||||
{
|
||||
for (int i = -radius; i <= radius; i++)
|
||||
{
|
||||
for (int j = (expansion ? -radius : yIndex); j <= (expansion ? radius : yIndex); j++)
|
||||
{
|
||||
for(int k = -radius; k <= radius; k++)
|
||||
{
|
||||
if (i * i + j * j + k * k >= (radius + 0.50f) * (radius + 0.50f))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
Block block = world.getBlock(x+i, y+j, z+k);
|
||||
|
||||
|
||||
if(SpellHelper.isBlockFluid(block))
|
||||
{
|
||||
TESpectralContainer.createSpectralBlockAtLocation(world, x+i, y+j, z+k, 3*masterRadius);
|
||||
}
|
||||
else
|
||||
{
|
||||
TileEntity tile = world.getTileEntity(x+i, y+j, z+k);
|
||||
if(tile instanceof TESpectralContainer)
|
||||
{
|
||||
((TESpectralContainer) tile).resetDuration(3*masterRadius);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
data.currentEssence = currentEssence - this.getCostPerRefresh()*costMod;
|
||||
data.markDirty();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCostPerRefresh()
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RitualComponent> getRitualComponentList()
|
||||
{
|
||||
ArrayList<RitualComponent> supressionRitual = new ArrayList();
|
||||
supressionRitual.add(new RitualComponent(2,0,2, RitualComponent.WATER));
|
||||
supressionRitual.add(new RitualComponent(2,0,-2, RitualComponent.WATER));
|
||||
supressionRitual.add(new RitualComponent(-2,0,2, RitualComponent.WATER));
|
||||
supressionRitual.add(new RitualComponent(-2,0,-2, RitualComponent.WATER));
|
||||
supressionRitual.add(new RitualComponent(-2,0,-1, RitualComponent.AIR));
|
||||
supressionRitual.add(new RitualComponent(-1,0,-2, RitualComponent.AIR));
|
||||
supressionRitual.add(new RitualComponent(-2,0,1, RitualComponent.AIR));
|
||||
supressionRitual.add(new RitualComponent(1,0,-2, RitualComponent.AIR));
|
||||
supressionRitual.add(new RitualComponent(2,0,1, RitualComponent.AIR));
|
||||
supressionRitual.add(new RitualComponent(1,0,2, RitualComponent.AIR));
|
||||
supressionRitual.add(new RitualComponent(2,0,-1, RitualComponent.AIR));
|
||||
supressionRitual.add(new RitualComponent(-1,0,2, RitualComponent.AIR));
|
||||
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;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
}
|
|
@ -1,9 +1,9 @@
|
|||
package WayofTime.alchemicalWizardry.common.rituals;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.effect.EntityLightningBolt;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
@ -16,17 +16,18 @@ import net.minecraft.util.AxisAlignedBB;
|
|||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.ModBlocks;
|
||||
import WayofTime.alchemicalWizardry.ModItems;
|
||||
import WayofTime.alchemicalWizardry.common.LifeEssenceNetwork;
|
||||
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.common.items.BoundArmour;
|
||||
import WayofTime.alchemicalWizardry.common.items.sigil.SigilOfHolding;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone;
|
||||
|
||||
public class RitualEffectUnbinding extends RitualEffect
|
||||
{
|
||||
@Override
|
||||
public void performEffect(TEMasterStone ritualStone)
|
||||
public void performEffect(IMasterRitualStone ritualStone)
|
||||
{
|
||||
String owner = ritualStone.getOwner();
|
||||
World worldSave = MinecraftServer.getServer().worldServers[0];
|
||||
|
@ -39,10 +40,10 @@ public class RitualEffectUnbinding extends RitualEffect
|
|||
}
|
||||
|
||||
int currentEssence = data.currentEssence;
|
||||
World world = ritualStone.getWorldObj();
|
||||
int x = ritualStone.xCoord;
|
||||
int y = ritualStone.yCoord;
|
||||
int z = ritualStone.zCoord;
|
||||
World world = ritualStone.getWorld();
|
||||
int x = ritualStone.getXCoord();
|
||||
int y = ritualStone.getYCoord();
|
||||
int z = ritualStone.getZCoord();
|
||||
|
||||
if (currentEssence < this.getCostPerRefresh())
|
||||
{
|
||||
|
@ -163,4 +164,43 @@ public class RitualEffectUnbinding extends RitualEffect
|
|||
// TODO Auto-generated method stub
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RitualComponent> getRitualComponentList()
|
||||
{
|
||||
ArrayList<RitualComponent> unbindingRitual = new ArrayList();
|
||||
unbindingRitual.add(new RitualComponent(-2, 0, 0, 4));
|
||||
unbindingRitual.add(new RitualComponent(2, 0, 0, 4));
|
||||
unbindingRitual.add(new RitualComponent(0, 0, 2, 4));
|
||||
unbindingRitual.add(new RitualComponent(0, 0, -2, 4));
|
||||
unbindingRitual.add(new RitualComponent(-2, 0, -2, 3));
|
||||
unbindingRitual.add(new RitualComponent(-2, 0, -3, 3));
|
||||
unbindingRitual.add(new RitualComponent(-3, 0, -2, 3));
|
||||
unbindingRitual.add(new RitualComponent(2, 0, -2, 3));
|
||||
unbindingRitual.add(new RitualComponent(2, 0, -3, 3));
|
||||
unbindingRitual.add(new RitualComponent(3, 0, -2, 3));
|
||||
unbindingRitual.add(new RitualComponent(-2, 0, 2, 3));
|
||||
unbindingRitual.add(new RitualComponent(-2, 0, 3, 3));
|
||||
unbindingRitual.add(new RitualComponent(-3, 0, 2, 3));
|
||||
unbindingRitual.add(new RitualComponent(2, 0, 2, 3));
|
||||
unbindingRitual.add(new RitualComponent(2, 0, 3, 3));
|
||||
unbindingRitual.add(new RitualComponent(3, 0, 2, 3));
|
||||
unbindingRitual.add(new RitualComponent(3, 1, 3, 0));
|
||||
unbindingRitual.add(new RitualComponent(3, 1, -3, 0));
|
||||
unbindingRitual.add(new RitualComponent(-3, 1, -3, 0));
|
||||
unbindingRitual.add(new RitualComponent(-3, 1, 3, 0));
|
||||
unbindingRitual.add(new RitualComponent(3, 2, 3, 0));
|
||||
unbindingRitual.add(new RitualComponent(3, 2, -3, 0));
|
||||
unbindingRitual.add(new RitualComponent(-3, 2, -3, 0));
|
||||
unbindingRitual.add(new RitualComponent(-3, 2, 3, 0));
|
||||
unbindingRitual.add(new RitualComponent(3, 3, 3, 2));
|
||||
unbindingRitual.add(new RitualComponent(3, 3, -3, 2));
|
||||
unbindingRitual.add(new RitualComponent(-3, 3, -3, 2));
|
||||
unbindingRitual.add(new RitualComponent(-3, 3, 3, 2));
|
||||
unbindingRitual.add(new RitualComponent(-5, 0, 0, 2));
|
||||
unbindingRitual.add(new RitualComponent(5, 0, 0, 2));
|
||||
unbindingRitual.add(new RitualComponent(0, 0, 5, 2));
|
||||
unbindingRitual.add(new RitualComponent(0, 0, -5, 2));
|
||||
return unbindingRitual;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,19 +1,25 @@
|
|||
package WayofTime.alchemicalWizardry.common.rituals;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.common.LifeEssenceNetwork;
|
||||
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.common.block.BlockSpectralContainer;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone;
|
||||
|
||||
public class RitualEffectWater extends RitualEffect
|
||||
{
|
||||
public void performEffect(TEMasterStone ritualStone)
|
||||
public void performEffect(IMasterRitualStone ritualStone)
|
||||
{
|
||||
String owner = ritualStone.getOwner();
|
||||
World worldSave = MinecraftServer.getServer().worldServers[0];
|
||||
|
@ -26,12 +32,14 @@ public class RitualEffectWater extends RitualEffect
|
|||
}
|
||||
|
||||
int currentEssence = data.currentEssence;
|
||||
World world = ritualStone.getWorldObj();
|
||||
int x = ritualStone.xCoord;
|
||||
int y = ritualStone.yCoord;
|
||||
int z = ritualStone.zCoord;
|
||||
|
||||
if (world.isAirBlock(x, y + 1, z))
|
||||
World world = ritualStone.getWorld();
|
||||
int x = ritualStone.getXCoord();
|
||||
int y = ritualStone.getYCoord();
|
||||
int z = ritualStone.getZCoord();
|
||||
|
||||
Block block = world.getBlock(x, y + 1, z);
|
||||
|
||||
if (world.isAirBlock(x, y + 1, z) && !(block instanceof BlockSpectralContainer))
|
||||
{
|
||||
if (currentEssence < this.getCostPerRefresh())
|
||||
{
|
||||
|
@ -61,4 +69,15 @@ public class RitualEffectWater extends RitualEffect
|
|||
{
|
||||
return 25;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RitualComponent> getRitualComponentList()
|
||||
{
|
||||
ArrayList<RitualComponent> waterRitual = new ArrayList();
|
||||
waterRitual.add(new RitualComponent(-1, 0, 1, 1));
|
||||
waterRitual.add(new RitualComponent(-1, 0, -1, 1));
|
||||
waterRitual.add(new RitualComponent(1, 0, -1, 1));
|
||||
waterRitual.add(new RitualComponent(1, 0, 1, 1));
|
||||
return waterRitual;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
package WayofTime.alchemicalWizardry.common.rituals;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.LifeEssenceNetwork;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.potion.Potion;
|
||||
|
@ -11,9 +12,11 @@ import net.minecraft.server.MinecraftServer;
|
|||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
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.common.tileEntity.TEAltar;
|
||||
|
||||
public class RitualEffectWellOfSuffering extends RitualEffect
|
||||
{
|
||||
|
@ -21,7 +24,7 @@ public class RitualEffectWellOfSuffering extends RitualEffect
|
|||
public final int amount = 10;
|
||||
|
||||
@Override
|
||||
public void performEffect(TEMasterStone ritualStone)
|
||||
public void performEffect(IMasterRitualStone ritualStone)
|
||||
{
|
||||
String owner = ritualStone.getOwner();
|
||||
World worldSave = MinecraftServer.getServer().worldServers[0];
|
||||
|
@ -34,10 +37,10 @@ public class RitualEffectWellOfSuffering extends RitualEffect
|
|||
}
|
||||
|
||||
int currentEssence = data.currentEssence;
|
||||
World world = ritualStone.getWorldObj();
|
||||
int x = ritualStone.xCoord;
|
||||
int y = ritualStone.yCoord;
|
||||
int z = ritualStone.zCoord;
|
||||
World world = ritualStone.getWorld();
|
||||
int x = ritualStone.getXCoord();
|
||||
int y = ritualStone.getYCoord();
|
||||
int z = ritualStone.getZCoord();
|
||||
|
||||
if (world.getWorldTime() % this.timeDelay != 0)
|
||||
{
|
||||
|
@ -132,4 +135,47 @@ public class RitualEffectWellOfSuffering extends RitualEffect
|
|||
// TODO Auto-generated method stub
|
||||
return 2;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RitualComponent> getRitualComponentList()
|
||||
{
|
||||
ArrayList<RitualComponent> wellOfSufferingRitual = new ArrayList();
|
||||
wellOfSufferingRitual.add(new RitualComponent(1, 0, 1, RitualComponent.FIRE));
|
||||
wellOfSufferingRitual.add(new RitualComponent(-1, 0, 1, RitualComponent.FIRE));
|
||||
wellOfSufferingRitual.add(new RitualComponent(1, 0, -1, RitualComponent.FIRE));
|
||||
wellOfSufferingRitual.add(new RitualComponent(-1, 0, -1, RitualComponent.FIRE));
|
||||
wellOfSufferingRitual.add(new RitualComponent(2, -1, 2, RitualComponent.FIRE));
|
||||
wellOfSufferingRitual.add(new RitualComponent(2, -1, -2, RitualComponent.FIRE));
|
||||
wellOfSufferingRitual.add(new RitualComponent(-2, -1, 2, RitualComponent.FIRE));
|
||||
wellOfSufferingRitual.add(new RitualComponent(-2, -1, -2, RitualComponent.FIRE));
|
||||
wellOfSufferingRitual.add(new RitualComponent(0, -1, 2, RitualComponent.EARTH));
|
||||
wellOfSufferingRitual.add(new RitualComponent(2, -1, 0, RitualComponent.EARTH));
|
||||
wellOfSufferingRitual.add(new RitualComponent(0, -1, -2, RitualComponent.EARTH));
|
||||
wellOfSufferingRitual.add(new RitualComponent(-2, -1, 0, RitualComponent.EARTH));
|
||||
wellOfSufferingRitual.add(new RitualComponent(-3, -1, -3, RitualComponent.DUSK));
|
||||
wellOfSufferingRitual.add(new RitualComponent(3, -1, -3, RitualComponent.DUSK));
|
||||
wellOfSufferingRitual.add(new RitualComponent(-3, -1, 3, RitualComponent.DUSK));
|
||||
wellOfSufferingRitual.add(new RitualComponent(3, -1, 3, RitualComponent.DUSK));
|
||||
wellOfSufferingRitual.add(new RitualComponent(2, -1, 4, RitualComponent.WATER));
|
||||
wellOfSufferingRitual.add(new RitualComponent(4, -1, 2, RitualComponent.WATER));
|
||||
wellOfSufferingRitual.add(new RitualComponent(-2, -1, 4, RitualComponent.WATER));
|
||||
wellOfSufferingRitual.add(new RitualComponent(4, -1, -2, RitualComponent.WATER));
|
||||
wellOfSufferingRitual.add(new RitualComponent(2, -1, -4, RitualComponent.WATER));
|
||||
wellOfSufferingRitual.add(new RitualComponent(-4, -1, 2, RitualComponent.WATER));
|
||||
wellOfSufferingRitual.add(new RitualComponent(-2, -1, -4, RitualComponent.WATER));
|
||||
wellOfSufferingRitual.add(new RitualComponent(-4, -1, -2, RitualComponent.WATER));
|
||||
wellOfSufferingRitual.add(new RitualComponent(1, 0, 4, RitualComponent.WATER));
|
||||
wellOfSufferingRitual.add(new RitualComponent(4, 0, 1, RitualComponent.WATER));
|
||||
wellOfSufferingRitual.add(new RitualComponent(1, 0, -4, RitualComponent.WATER));
|
||||
wellOfSufferingRitual.add(new RitualComponent(-4, 0, 1, RitualComponent.WATER));
|
||||
wellOfSufferingRitual.add(new RitualComponent(-1, 0, 4, RitualComponent.WATER));
|
||||
wellOfSufferingRitual.add(new RitualComponent(4, 0, -1, RitualComponent.WATER));
|
||||
wellOfSufferingRitual.add(new RitualComponent(-1, 0, -4, RitualComponent.WATER));
|
||||
wellOfSufferingRitual.add(new RitualComponent(-4, 0, -1, RitualComponent.WATER));
|
||||
wellOfSufferingRitual.add(new RitualComponent(4, 1, 0, RitualComponent.AIR));
|
||||
wellOfSufferingRitual.add(new RitualComponent(0, 1, 4, RitualComponent.AIR));
|
||||
wellOfSufferingRitual.add(new RitualComponent(-4, 1, 0, RitualComponent.AIR));
|
||||
wellOfSufferingRitual.add(new RitualComponent(0, 1, -4, RitualComponent.AIR));
|
||||
return wellOfSufferingRitual;
|
||||
}
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue