Initial commit of BM 1.8

This commit is contained in:
WayofTime 2015-07-29 08:23:01 -04:00
parent d99eadbea7
commit c5681dc831
713 changed files with 6502 additions and 27334 deletions

View file

@ -1,25 +1,25 @@
package WayofTime.alchemicalWizardry.common.rituals;
import java.util.HashSet;
import java.util.Set;
import WayofTime.alchemicalWizardry.api.Int3;
import WayofTime.alchemicalWizardry.api.rituals.LocalRitualStorage;
import WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon.IHoardDemon;
public class LocalStorageAlphaPact extends LocalRitualStorage
{
public static Set<IHoardDemon> hoardList = new HashSet();
public void thrallDemon(IHoardDemon demon)
{
if(demon instanceof IHoardDemon)
{
boolean enthrall = ((IHoardDemon) demon).thrallDemon(new Int3(this.xCoord, this.yCoord, this.zCoord));
if(enthrall)
{
this.hoardList.add((IHoardDemon)demon);
}
}
}
}
//package WayofTime.alchemicalWizardry.common.rituals;
//
//import java.util.HashSet;
//import java.util.Set;
//
//import WayofTime.alchemicalWizardry.api.Int3;
//import WayofTime.alchemicalWizardry.api.rituals.LocalRitualStorage;
//import WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon.IHoardDemon;
//
//public class LocalStorageAlphaPact extends LocalRitualStorage
//{
// public static Set<IHoardDemon> hoardList = new HashSet();
//
// public void thrallDemon(IHoardDemon demon)
// {
// if(demon instanceof IHoardDemon)
// {
// boolean enthrall = ((IHoardDemon) demon).thrallDemon(new Int3(this.xCoord, this.yCoord, this.zCoord));
// if(enthrall)
// {
// this.hoardList.add((IHoardDemon)demon);
// }
// }
// }
//}

View file

@ -1,179 +1,178 @@
package WayofTime.alchemicalWizardry.common.rituals;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
import net.minecraft.block.Block;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.util.MathHelper;
import net.minecraft.world.World;
import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone;
import WayofTime.alchemicalWizardry.api.rituals.LocalRitualStorage;
import WayofTime.alchemicalWizardry.api.rituals.RitualComponent;
import WayofTime.alchemicalWizardry.api.rituals.RitualEffect;
import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler;
import WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon.EntityMinorDemonGrunt;
import WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon.IHoardDemon;
public class RitualEffectAlphaPact extends RitualEffect
{
Random rand = new Random();
@Override
public void performEffect(IMasterRitualStone ritualStone)
{
String owner = ritualStone.getOwner();
int currentEssence = SoulNetworkHandler.getCurrentEssence(owner);
World world = ritualStone.getWorld();
int x = ritualStone.getXCoord();
int y = ritualStone.getYCoord();
int z = ritualStone.getZCoord();
if (world.getWorldTime() % 20 != 0)
{
return;
}
LocalRitualStorage stor = ritualStone.getLocalStorage();
if(stor instanceof LocalStorageAlphaPact)
{
LocalStorageAlphaPact storage = (LocalStorageAlphaPact)stor;
Object[] demonList = storage.hoardList.toArray();
for(Object demon : demonList)
{
if(demon instanceof EntityLivingBase)
{
if(!((EntityLivingBase) demon).isEntityAlive())
{
System.out.println(storage.hoardList.remove(demon));
}
}
}
System.out.println("Hi!");
int summons = 0;
int horizontalRange = 25;
int verticalRange = 20;
if(storage.hoardList.isEmpty())
{
IHoardDemon demon = this.getRandomDemonForStage(world, x, y, z, horizontalRange, verticalRange);
if(demon instanceof EntityLivingBase)
{
world.spawnEntityInWorld((EntityLivingBase)demon);
storage.thrallDemon(demon);
}
}else
{
}
}
}
public IHoardDemon getRandomDemonForStage(World world, int x, int y, int z, int horizontalRange, int verticalRange)
{
EntityLivingBase entityLiving = new EntityMinorDemonGrunt(world);
boolean isGood = false;
for(int n=0; n<100; n++)
{
double newX = x + (rand.nextInt(horizontalRange) - horizontalRange) + 0.5;
double newY = y + (double) (rand.nextInt((int) verticalRange));
double newZ = z + (rand.nextInt(horizontalRange) - horizontalRange) + 0.5;
entityLiving.posX = newX;
entityLiving.posY = newY;
entityLiving.posZ = newZ;
int i = MathHelper.floor_double(entityLiving.posX);
int j = MathHelper.floor_double(entityLiving.posY);
int k = MathHelper.floor_double(entityLiving.posZ);
Block l;
if (entityLiving.worldObj.blockExists(i, j, k))
{
boolean flag1 = false;
while (!flag1 && j > 0)
{
l = entityLiving.worldObj.getBlock(i, j - 1, k);
if (l != null && l.getMaterial().blocksMovement())
{
flag1 = true;
} else
{
--entityLiving.posY;
--j;
}
}
}
if(entityLiving.worldObj.getCollidingBoundingBoxes(entityLiving, entityLiving.boundingBox).isEmpty() && !entityLiving.worldObj.isAnyLiquid(entityLiving.boundingBox))
{
entityLiving.setPositionAndUpdate(newX, newY, newZ);
isGood = true;
}
}
if(isGood = false)
{
return null;
}
return (IHoardDemon)entityLiving;
}
public int spawnMoreDemons(LocalStorageAlphaPact storage)
{
return 5;
}
@Override
public int getCostPerRefresh()
{
return 1;
}
public LocalRitualStorage getNewLocalStorage()
{
return new LocalStorageAlphaPact();
}
@Override
public List<RitualComponent> getRitualComponentList()
{
ArrayList<RitualComponent> omegaRitual = new ArrayList();
this.addCornerRunes(omegaRitual, 1, 0, RitualComponent.BLANK);
this.addOffsetRunes(omegaRitual, 2, 1, 0, RitualComponent.FIRE);
this.addParallelRunes(omegaRitual, 4, 0, RitualComponent.WATER);
this.addParallelRunes(omegaRitual, 5, 0, RitualComponent.EARTH);
this.addCornerRunes(omegaRitual, 4, 0, RitualComponent.AIR);
this.addOffsetRunes(omegaRitual, 3, 4, 0, RitualComponent.AIR);
this.addParallelRunes(omegaRitual, 5, 1, RitualComponent.WATER);
this.addParallelRunes(omegaRitual, 5, 2, RitualComponent.EARTH);
this.addParallelRunes(omegaRitual, 4, 3, RitualComponent.WATER);
this.addParallelRunes(omegaRitual, 4, 4, RitualComponent.WATER);
this.addParallelRunes(omegaRitual, 3, 5, RitualComponent.BLANK);
this.addParallelRunes(omegaRitual, 2, 5, RitualComponent.FIRE);
this.addParallelRunes(omegaRitual, 1, 5, RitualComponent.DUSK);
this.addOffsetRunes(omegaRitual, 5, 3, 1, RitualComponent.WATER);
this.addOffsetRunes(omegaRitual, 6, 3, 1, RitualComponent.DUSK);
this.addOffsetRunes(omegaRitual, 6, 4, 1, RitualComponent.FIRE);
this.addOffsetRunes(omegaRitual, 6, 5, 1, RitualComponent.BLANK);
this.addCornerRunes(omegaRitual, 4, 2, RitualComponent.FIRE);
this.addCornerRunes(omegaRitual, 4, 3, RitualComponent.AIR);
this.addCornerRunes(omegaRitual, 4, 4, RitualComponent.AIR);
this.addOffsetRunes(omegaRitual, 4, 3, 2, RitualComponent.BLANK);
this.addCornerRunes(omegaRitual, 3, 5, RitualComponent.EARTH);
this.addOffsetRunes(omegaRitual, 2, 3, 5, RitualComponent.AIR);
return omegaRitual;
}
}
//package WayofTime.alchemicalWizardry.common.rituals;
//
//import java.util.ArrayList;
//import java.util.List;
//import java.util.Random;
//
//import net.minecraft.block.Block;
//import net.minecraft.entity.EntityLivingBase;
//import net.minecraft.util.BlockPos;
//import net.minecraft.util.MathHelper;
//import net.minecraft.world.World;
//import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone;
//import WayofTime.alchemicalWizardry.api.rituals.LocalRitualStorage;
//import WayofTime.alchemicalWizardry.api.rituals.RitualComponent;
//import WayofTime.alchemicalWizardry.api.rituals.RitualEffect;
//import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler;
//import WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon.EntityMinorDemonGrunt;
//import WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon.IHoardDemon;
//
//public class RitualEffectAlphaPact extends RitualEffect
//{
// Random rand = new Random();
//
// @Override
// public void performEffect(IMasterRitualStone ritualStone)
// {
// String owner = ritualStone.getOwner();
//
// int currentEssence = SoulNetworkHandler.getCurrentEssence(owner);
// World world = ritualStone.getWorldObj();
// BlockPos pos = ritualStone.getPosition();
//
// if (world.getWorldTime() % 20 != 0)
// {
// return;
// }
//
// LocalRitualStorage stor = ritualStone.getLocalStorage();
// if(stor instanceof LocalStorageAlphaPact)
// {
// LocalStorageAlphaPact storage = (LocalStorageAlphaPact)stor;
//
// Object[] demonList = storage.hoardList.toArray();
//
// for(Object demon : demonList)
// {
// if(demon instanceof EntityLivingBase)
// {
// if(!((EntityLivingBase) demon).isEntityAlive())
// {
// System.out.println(storage.hoardList.remove(demon));
// }
// }
// }
//
// System.out.println("Hi!");
//
// int summons = 0;
//
// int horizontalRange = 25;
// int verticalRange = 20;
//
// if(storage.hoardList.isEmpty())
// {
// IHoardDemon demon = this.getRandomDemonForStage(world, x, y, z, horizontalRange, verticalRange);
// if(demon instanceof EntityLivingBase)
// {
// world.spawnEntityInWorld((EntityLivingBase)demon);
// storage.thrallDemon(demon);
// }
// }else
// {
// }
// }
// }
//
// public IHoardDemon getRandomDemonForStage(World world, int x, int y, int z, int horizontalRange, int verticalRange)
// {
// EntityLivingBase entityLiving = new EntityMinorDemonGrunt(world);
//
// boolean isGood = false;
// for(int n=0; n<100; n++)
// {
// double newX = x + (rand.nextInt(horizontalRange) - horizontalRange) + 0.5;
// double newY = y + (double) (rand.nextInt((int) verticalRange));
// double newZ = z + (rand.nextInt(horizontalRange) - horizontalRange) + 0.5;
//
// entityLiving.posX = newX;
// entityLiving.posY = newY;
// entityLiving.posZ = newZ;
//
// int i = MathHelper.floor_double(entityLiving.posX);
// int j = MathHelper.floor_double(entityLiving.posY);
// int k = MathHelper.floor_double(entityLiving.posZ);
// Block l;
//
// if (entityLiving.worldObj.blockExists(i, j, k))
// {
// boolean flag1 = false;
//
// while (!flag1 && j > 0)
// {
// l = entityLiving.worldObj.getBlock(i, j - 1, k);
//
// if (l != null && l.getMaterial().blocksMovement())
// {
// flag1 = true;
// } else
// {
// --entityLiving.posY;
// --j;
// }
// }
// }
//
// if(entityLiving.worldObj.getCollidingBoundingBoxes(entityLiving, entityLiving.boundingBox).isEmpty() && !entityLiving.worldObj.isAnyLiquid(entityLiving.boundingBox))
// {
// entityLiving.setPositionAndUpdate(newX, newY, newZ);
// isGood = true;
// }
// }
//
// if(isGood = false)
// {
// return null;
// }
//
// return (IHoardDemon)entityLiving;
// }
//
// public int spawnMoreDemons(LocalStorageAlphaPact storage)
// {
// return 5;
// }
//
// @Override
// public int getCostPerRefresh()
// {
// return 1;
// }
//
// public LocalRitualStorage getNewLocalStorage()
// {
// return new LocalStorageAlphaPact();
// }
//
// @Override
// public List<RitualComponent> getRitualComponentList()
// {
// ArrayList<RitualComponent> omegaRitual = new ArrayList();
//
// this.addCornerRunes(omegaRitual, 1, 0, RitualComponent.BLANK);
// this.addOffsetRunes(omegaRitual, 2, 1, 0, RitualComponent.FIRE);
// this.addParallelRunes(omegaRitual, 4, 0, RitualComponent.WATER);
// this.addParallelRunes(omegaRitual, 5, 0, RitualComponent.EARTH);
// this.addCornerRunes(omegaRitual, 4, 0, RitualComponent.AIR);
// this.addOffsetRunes(omegaRitual, 3, 4, 0, RitualComponent.AIR);
// this.addParallelRunes(omegaRitual, 5, 1, RitualComponent.WATER);
// this.addParallelRunes(omegaRitual, 5, 2, RitualComponent.EARTH);
// this.addParallelRunes(omegaRitual, 4, 3, RitualComponent.WATER);
// this.addParallelRunes(omegaRitual, 4, 4, RitualComponent.WATER);
// this.addParallelRunes(omegaRitual, 3, 5, RitualComponent.BLANK);
// this.addParallelRunes(omegaRitual, 2, 5, RitualComponent.FIRE);
// this.addParallelRunes(omegaRitual, 1, 5, RitualComponent.DUSK);
// this.addOffsetRunes(omegaRitual, 5, 3, 1, RitualComponent.WATER);
// this.addOffsetRunes(omegaRitual, 6, 3, 1, RitualComponent.DUSK);
// this.addOffsetRunes(omegaRitual, 6, 4, 1, RitualComponent.FIRE);
// this.addOffsetRunes(omegaRitual, 6, 5, 1, RitualComponent.BLANK);
// this.addCornerRunes(omegaRitual, 4, 2, RitualComponent.FIRE);
// this.addCornerRunes(omegaRitual, 4, 3, RitualComponent.AIR);
// this.addCornerRunes(omegaRitual, 4, 4, RitualComponent.AIR);
// this.addOffsetRunes(omegaRitual, 4, 3, 2, RitualComponent.BLANK);
// this.addCornerRunes(omegaRitual, 3, 5, RitualComponent.EARTH);
// this.addOffsetRunes(omegaRitual, 2, 3, 5, RitualComponent.AIR);
//
// return omegaRitual;
// }
//}

View file

@ -11,6 +11,7 @@ import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.BlockPos;
import net.minecraft.world.World;
import java.util.ArrayList;
@ -28,10 +29,8 @@ public class RitualEffectAnimalGrowth extends RitualEffect
String owner = ritualStone.getOwner();
int currentEssence = SoulNetworkHandler.getCurrentEssence(owner);
World world = ritualStone.getWorld();
int x = ritualStone.getXCoord();
int y = ritualStone.getYCoord();
int z = ritualStone.getZCoord();
World world = ritualStone.getWorldObj();
BlockPos pos = ritualStone.getPosition();
if (world.getWorldTime() % 20 != 0)
{
@ -40,7 +39,7 @@ public class RitualEffectAnimalGrowth extends RitualEffect
double range = 2;
AxisAlignedBB axisalignedbb = AxisAlignedBB.getBoundingBox((double) x, (double) y + 1, (double) z, (double) (x + 1), (double) (y + 3), (double) (z + 1)).expand(range, 0, range);
AxisAlignedBB axisalignedbb = new AxisAlignedBB((double) x, (double) y + 1, (double) z, (double) (x + 1), (double) (y + 3), (double) (z + 1)).expand(range, 0, range);
List<EntityAgeable> list = world.getEntitiesWithinAABB(EntityAgeable.class, axisalignedbb);
int entityCount = 0;

View file

@ -9,6 +9,7 @@ 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.BlockPos;
import net.minecraft.world.World;
import java.util.ArrayList;
@ -30,10 +31,8 @@ public class RitualEffectApiaryOverclock extends RitualEffect
}
int currentEssence = data.currentEssence;
World world = ritualStone.getWorld();
int x = ritualStone.getXCoord();
int y = ritualStone.getYCoord();
int z = ritualStone.getZCoord();
World world = ritualStone.getWorldObj();
BlockPos pos = ritualStone.getPosition();
if (currentEssence < this.getCostPerRefresh())

View file

@ -7,6 +7,7 @@ import net.minecraft.inventory.IInventory;
import net.minecraft.inventory.ISidedInventory;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.BlockPos;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
import net.minecraftforge.oredict.OreDictionary;
@ -31,10 +32,8 @@ public class RitualEffectAutoAlchemy extends RitualEffect
String owner = ritualStone.getOwner();
int currentEssence = SoulNetworkHandler.getCurrentEssence(owner);
World world = ritualStone.getWorld();
int x = ritualStone.getXCoord();
int y = ritualStone.getYCoord();
int z = ritualStone.getZCoord();
World world = ritualStone.getWorldObj();
BlockPos pos = ritualStone.getPosition();
if (currentEssence < this.getCostPerRefresh() * 6)
{

View file

@ -13,6 +13,7 @@ import net.minecraft.item.ItemStack;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.BlockPos;
import net.minecraft.world.World;
import java.util.ArrayList;
@ -27,10 +28,8 @@ public class RitualEffectBinding extends RitualEffect
String owner = ritualStone.getOwner();
int currentEssence = SoulNetworkHandler.getCurrentEssence(owner);
World world = ritualStone.getWorld();
int x = ritualStone.getXCoord();
int y = ritualStone.getYCoord();
int z = ritualStone.getZCoord();
World world = ritualStone.getWorldObj();
BlockPos pos = ritualStone.getPosition();
if (currentEssence < this.getCostPerRefresh())
{
@ -47,7 +46,7 @@ public class RitualEffectBinding extends RitualEffect
if (ritualStone.getVar1() == 0)
{
int d0 = 0;
AxisAlignedBB axisalignedbb = AxisAlignedBB.getBoundingBox((double) x, (double) y + 1, (double) z, (double) (x + 1), (double) (y + 2), (double) (z + 1)).expand(d0, d0, d0);
AxisAlignedBB axisalignedbb = new AxisAlignedBB((double) x, (double) y + 1, (double) z, (double) (x + 1), (double) (y + 2), (double) (z + 1)).expand(d0, d0, d0);
List list = world.getEntitiesWithinAABB(EntityItem.class, axisalignedbb);
Iterator iterator = list.iterator();
EntityItem item;
@ -78,7 +77,7 @@ public class RitualEffectBinding extends RitualEffect
if (world.rand.nextInt(10) == 0)
{
SpellHelper.sendIndexedParticleToAllAround(world, x, y, z, 20, world.provider.dimensionId, 1, x, y, z);
SpellHelper.sendIndexedParticleToAllAround(world, x, y, z, 20, world.provider.getDimensionId(), 1, x, y, z);
}
}
@ -94,19 +93,19 @@ public class RitualEffectBinding extends RitualEffect
switch (lightningPoint)
{
case 0:
world.addWeatherEffect(new EntityLightningBolt(world, x + 4, y + 3, z));
world.addWeatherEffect(new EntityLightningBolt(world, x + 4, y + 3, z + 0));
break;
case 1:
world.addWeatherEffect(new EntityLightningBolt(world, x - 4, y + 3, z));
world.addWeatherEffect(new EntityLightningBolt(world, x - 4, y + 3, z + 0));
break;
case 2:
world.addWeatherEffect(new EntityLightningBolt(world, x, y + 3, z + 4));
world.addWeatherEffect(new EntityLightningBolt(world, x + 0, y + 3, z + 4));
break;
case 3:
world.addWeatherEffect(new EntityLightningBolt(world, x, y + 3, z - 4));
world.addWeatherEffect(new EntityLightningBolt(world, x + 0, y + 3, z - 4));
break;
case 4:

View file

@ -18,6 +18,7 @@ import net.minecraft.item.ItemStack;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.BlockPos;
import net.minecraft.world.World;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.chunk.Chunk;
@ -33,10 +34,9 @@ public class RitualEffectBiomeChanger extends RitualEffect
String owner = ritualStone.getOwner();
int cooldown = ritualStone.getCooldown();
World world = ritualStone.getWorld();
int x = ritualStone.getXCoord();
int y = ritualStone.getYCoord();
int z = ritualStone.getZCoord();
World world = ritualStone.getWorldObj();
BlockPos pos = ritualStone.getPosition();
if (cooldown > 0)
{
ritualStone.setCooldown(cooldown - 1);

View file

@ -13,6 +13,7 @@ import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.monster.EntityCreeper;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.potion.PotionEffect;
import net.minecraft.util.BlockPos;
import net.minecraft.world.World;
import java.util.ArrayList;
@ -31,10 +32,8 @@ public class RitualEffectContainment extends RitualEffect
String owner = ritualStone.getOwner();
int currentEssence = SoulNetworkHandler.getCurrentEssence(owner);
World world = ritualStone.getWorld();
int x = ritualStone.getXCoord();
int y = ritualStone.getYCoord();
int z = ritualStone.getZCoord();
World world = ritualStone.getWorldObj();
BlockPos pos = ritualStone.getPosition();
if (currentEssence < this.getCostPerRefresh())
{

View file

@ -15,6 +15,7 @@ import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.CraftingManager;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.BlockPos;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
import net.minecraftforge.oredict.OreDictionary;
@ -40,10 +41,8 @@ public class RitualEffectCrafting extends RitualEffect
String owner = ritualStone.getOwner();
int currentEssence = SoulNetworkHandler.getCurrentEssence(owner);
World world = ritualStone.getWorld();
int x = ritualStone.getXCoord();
int y = ritualStone.getYCoord();
int z = ritualStone.getZCoord();
World world = ritualStone.getWorldObj();
BlockPos pos = ritualStone.getPosition();
boolean hasPotentia = this.canDrainReagent(ritualStone, ReagentRegistry.potentiaReagent, potentiaDrain, false);

View file

@ -11,6 +11,7 @@ import net.minecraft.item.Item;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.BlockPos;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
import WayofTime.alchemicalWizardry.ModBlocks;
@ -35,16 +36,14 @@ public class RitualEffectCrushing extends RitualEffect
String owner = ritualStone.getOwner();
int currentEssence = SoulNetworkHandler.getCurrentEssence(owner);
World world = ritualStone.getWorld();
World world = ritualStone.getWorldObj();
BlockPos pos = ritualStone.getPosition();
if (world.getWorldTime() % 10 != 5)
{
return;
}
int x = ritualStone.getXCoord();
int y = ritualStone.getYCoord();
int z = ritualStone.getZCoord();
TileEntity tile = world.getTileEntity(x, y + 1, z);
IInventory tileEntity;

View file

@ -8,6 +8,7 @@ import net.minecraft.entity.effect.EntityLightningBolt;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.BlockPos;
import net.minecraft.util.ChatComponentTranslation;
import net.minecraft.world.World;
import WayofTime.alchemicalWizardry.ModBlocks;
@ -36,10 +37,8 @@ public class RitualEffectDemonPortal extends RitualEffect
String owner = ritualStone.getOwner();
int currentEssence = SoulNetworkHandler.getCurrentEssence(owner);
World world = ritualStone.getWorld();
int x = ritualStone.getXCoord();
int y = ritualStone.getYCoord();
int z = ritualStone.getZCoord();
World world = ritualStone.getWorldObj();
BlockPos pos = ritualStone.getPosition();
if (currentEssence < this.getCostPerRefresh())
{

View file

@ -12,6 +12,7 @@ import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.BlockPos;
import net.minecraft.world.World;
import WayofTime.alchemicalWizardry.api.Int3;
import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone;
@ -28,10 +29,8 @@ public class RitualEffectEllipsoid extends RitualEffect
String owner = ritualStone.getOwner();
int currentEssence = SoulNetworkHandler.getCurrentEssence(owner);
World world = ritualStone.getWorld();
int x = ritualStone.getXCoord();
int y = ritualStone.getYCoord();
int z = ritualStone.getZCoord();
World world = ritualStone.getWorldObj();
BlockPos pos = ritualStone.getPosition();
TileEntity tile = world.getTileEntity(x, y + 1, z);

View file

@ -11,6 +11,7 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
import net.minecraft.util.BlockPos;
import net.minecraft.world.World;
import java.util.ArrayList;
@ -24,10 +25,8 @@ public class RitualEffectEvaporation extends RitualEffect
String owner = ritualStone.getOwner();
int currentEssence = SoulNetworkHandler.getCurrentEssence(owner);
World world = ritualStone.getWorld();
int x = ritualStone.getXCoord();
int y = ritualStone.getYCoord();
int z = ritualStone.getZCoord();
World world = ritualStone.getWorldObj();
BlockPos pos = ritualStone.getPosition();
if (currentEssence < 0)
{

View file

@ -17,6 +17,7 @@ import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.BlockPos;
import net.minecraft.util.MathHelper;
import net.minecraft.world.World;
import net.minecraftforge.common.MinecraftForge;
@ -38,10 +39,8 @@ public class RitualEffectExpulsion extends RitualEffect
String owner = ritualStone.getOwner();
int currentEssence = SoulNetworkHandler.getCurrentEssence(owner);
World world = ritualStone.getWorld();
int x = ritualStone.getXCoord();
int y = ritualStone.getYCoord();
int z = ritualStone.getZCoord();
World world = ritualStone.getWorldObj();
BlockPos pos = ritualStone.getPosition();
if (currentEssence < this.getCostPerRefresh())
{

View file

@ -8,6 +8,7 @@ import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.effect.EntityLightningBolt;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.BlockPos;
import net.minecraft.world.World;
import java.util.ArrayList;
@ -27,10 +28,8 @@ public class RitualEffectFeatheredEarth extends RitualEffect //Nullifies all fal
String owner = ritualStone.getOwner();
int currentEssence = SoulNetworkHandler.getCurrentEssence(owner);
World world = ritualStone.getWorld();
int x = ritualStone.getXCoord();
int y = ritualStone.getYCoord();
int z = ritualStone.getZCoord();
World world = ritualStone.getWorldObj();
BlockPos pos = ritualStone.getPosition();
if (ritualStone.getCooldown() > 0)
{
@ -47,7 +46,7 @@ public class RitualEffectFeatheredEarth extends RitualEffect //Nullifies all fal
int range = this.getHorizontalRangeForReagent(hasTerrae, hasOrbisTerrae);
int verticalRange = hasAether ? 60 : 30;
List<EntityLivingBase> entities = world.getEntitiesWithinAABB(EntityLivingBase.class, AxisAlignedBB.getBoundingBox(x, y, z, x + 1, y + 1, z + 1).expand(range, verticalRange, range));
List<EntityLivingBase> entities = world.getEntitiesWithinAABB(EntityLivingBase.class, new AxisAlignedBB(x, y, z, x + 1, y + 1, z + 1).expand(range, verticalRange, range));
int entityCount = 0;
boolean flag = false;

View file

@ -8,6 +8,7 @@ import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
import WayofTime.alchemicalWizardry.api.tile.IBloodAltar;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.BlockPos;
import net.minecraft.world.World;
import java.util.ArrayList;
@ -28,10 +29,8 @@ public class RitualEffectFeatheredKnife extends RitualEffect
String owner = ritualStone.getOwner();
int currentEssence = SoulNetworkHandler.getCurrentEssence(owner);
World world = ritualStone.getWorld();
int x = ritualStone.getXCoord();
int y = ritualStone.getYCoord();
int z = ritualStone.getZCoord();
World world = ritualStone.getWorldObj();
BlockPos pos = ritualStone.getPosition();
boolean hasPotentia = this.canDrainReagent(ritualStone, ReagentRegistry.potentiaReagent, potentiaDrain, false);

View file

@ -10,6 +10,7 @@ import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.potion.PotionEffect;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.BlockPos;
import net.minecraft.world.World;
import java.util.ArrayList;
@ -27,14 +28,12 @@ public class RitualEffectFlight extends RitualEffect
String owner = ritualStone.getOwner();
int currentEssence = SoulNetworkHandler.getCurrentEssence(owner);
World world = ritualStone.getWorld();
int x = ritualStone.getXCoord();
int y = ritualStone.getYCoord();
int z = ritualStone.getZCoord();
World world = ritualStone.getWorldObj();
BlockPos pos = ritualStone.getPosition();
int range = 20;
int verticalRange = 30;
AxisAlignedBB axis = AxisAlignedBB.getBoundingBox(x, y, z, x + 1, y + 1, z + 1).expand(range, verticalRange, range);
AxisAlignedBB axis = new AxisAlignedBB(x, y, z, x + 1, y + 1, z + 1).expand(range, verticalRange, range);
axis.maxY = 256;
axis.minY = 0;
List<EntityPlayer> entities = world.getEntitiesWithinAABB(EntityPlayer.class, axis);

View file

@ -9,6 +9,7 @@ import net.minecraft.item.ItemFood;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.BlockPos;
import net.minecraft.util.FoodStats;
import net.minecraft.world.World;
import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone;
@ -26,10 +27,8 @@ public class RitualEffectFullStomach extends RitualEffect
String owner = ritualStone.getOwner();
int currentEssence = SoulNetworkHandler.getCurrentEssence(owner);
World world = ritualStone.getWorld();
int x = ritualStone.getXCoord();
int y = ritualStone.getYCoord();
int z = ritualStone.getZCoord();
World world = ritualStone.getWorldObj();
BlockPos pos = ritualStone.getPosition();
if (world.getWorldTime() % 20 != 0)
{

View file

@ -7,6 +7,7 @@ import WayofTime.alchemicalWizardry.api.rituals.RitualEffect;
import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
import net.minecraft.block.Block;
import net.minecraft.util.BlockPos;
import net.minecraft.world.World;
import net.minecraftforge.common.IPlantable;
import net.minecraft.block.IGrowable;
@ -27,10 +28,8 @@ public class RitualEffectGrowth extends RitualEffect
String owner = ritualStone.getOwner();
int currentEssence = SoulNetworkHandler.getCurrentEssence(owner);
World world = ritualStone.getWorld();
int x = ritualStone.getXCoord();
int y = ritualStone.getYCoord();
int z = ritualStone.getZCoord();
World world = ritualStone.getWorldObj();
BlockPos pos = ritualStone.getPosition();
if (currentEssence < this.getCostPerRefresh() * 9)
{
@ -77,7 +76,7 @@ public class RitualEffectGrowth extends RitualEffect
if (block instanceof IPlantable || block instanceof IGrowable)
{
{
SpellHelper.sendIndexedParticleToAllAround(world, x, y, z, 20, world.provider.dimensionId, 3, x, y, z);
SpellHelper.sendIndexedParticleToAllAround(world, x, y, z, 20, world.provider.getDimensionId(), 3, x, y, z);
block.updateTick(world, x + i, y + 2, z + j, world.rand);
flag++;
}

View file

@ -11,6 +11,7 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
import net.minecraft.util.BlockPos;
import net.minecraft.world.World;
import java.util.ArrayList;
@ -24,10 +25,9 @@ public class RitualEffectHarvest extends RitualEffect
String owner = ritualStone.getOwner();
int currentEssence = SoulNetworkHandler.getCurrentEssence(owner);
World world = ritualStone.getWorld();
int x = ritualStone.getXCoord();
int y = ritualStone.getYCoord();
int z = ritualStone.getZCoord();
World world = ritualStone.getWorldObj();
BlockPos pos = ritualStone.getPosition();
int maxCount = 100;
if (currentEssence < this.getCostPerRefresh() * maxCount)

View file

@ -10,6 +10,7 @@ import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
import net.minecraft.util.BlockPos;
import net.minecraft.world.World;
import java.util.ArrayList;
@ -27,10 +28,8 @@ public class RitualEffectHealing extends RitualEffect
String owner = ritualStone.getOwner();
int currentEssence = SoulNetworkHandler.getCurrentEssence(owner);
World world = ritualStone.getWorld();
int x = ritualStone.getXCoord();
int y = ritualStone.getYCoord();
int z = ritualStone.getZCoord();
World world = ritualStone.getWorldObj();
BlockPos pos = ritualStone.getPosition();
int timeDelay = 50;

View file

@ -10,6 +10,7 @@ import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.BlockPos;
import net.minecraft.world.World;
import java.util.ArrayList;
@ -26,10 +27,8 @@ public class RitualEffectInterdiction extends RitualEffect
String owner = ritualStone.getOwner();
int currentEssence = SoulNetworkHandler.getCurrentEssence(owner);
World world = ritualStone.getWorld();
int x = ritualStone.getXCoord();
int y = ritualStone.getYCoord();
int z = ritualStone.getZCoord();
World world = ritualStone.getWorldObj();
BlockPos pos = ritualStone.getPosition();
if (currentEssence < this.getCostPerRefresh())
{
@ -78,7 +77,7 @@ public class RitualEffectInterdiction extends RitualEffect
int horizontalRadius = 5;
int verticalRadius = 5;
List<EntityItem> itemList = world.getEntitiesWithinAABB(EntityItem.class, AxisAlignedBB.getBoundingBox(x, y, z, x + 1, y + 1, z + 1).expand(horizontalRadius, verticalRadius, horizontalRadius));
List<EntityItem> itemList = world.getEntitiesWithinAABB(EntityItem.class, new AxisAlignedBB(x, y, z, x + 1, y + 1, z + 1).expand(horizontalRadius, verticalRadius, horizontalRadius));
if (itemList != null)
{

View file

@ -10,6 +10,7 @@ import net.minecraft.inventory.IInventory;
import net.minecraft.inventory.ISidedInventory;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.BlockPos;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
import WayofTime.alchemicalWizardry.api.Int3;
@ -33,10 +34,8 @@ public class RitualEffectItemRouting extends RitualEffect
String owner = ritualStone.getOwner();
int currentEssence = SoulNetworkHandler.getCurrentEssence(owner);
World world = ritualStone.getWorld();
int x = ritualStone.getXCoord();
int y = ritualStone.getYCoord();
int z = ritualStone.getZCoord();
World world = ritualStone.getWorldObj();
BlockPos pos = ritualStone.getPosition();
if (world.getWorldTime() % 20 != 0)
{

View file

@ -7,6 +7,7 @@ import net.minecraft.entity.item.EntityItem;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.BlockPos;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry;
@ -28,11 +29,9 @@ public class RitualEffectItemSuction extends RitualEffect
String owner = ritualStone.getOwner();
int currentEssence = SoulNetworkHandler.getCurrentEssence(owner);
World world = ritualStone.getWorld();
int x = ritualStone.getXCoord();
int y = ritualStone.getYCoord();
int z = ritualStone.getZCoord();
World world = ritualStone.getWorldObj();
BlockPos pos = ritualStone.getPosition();
TileEntity tile = world.getTileEntity(x, y + 1, z);
IInventory tileEntity;

View file

@ -10,6 +10,7 @@ import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.potion.PotionEffect;
import net.minecraft.util.BlockPos;
import net.minecraft.world.World;
import java.util.ArrayList;
@ -26,10 +27,8 @@ public class RitualEffectJumping extends RitualEffect
String owner = ritualStone.getOwner();
int currentEssence = SoulNetworkHandler.getCurrentEssence(owner);
World world = ritualStone.getWorld();
int x = ritualStone.getXCoord();
int y = ritualStone.getYCoord();
int z = ritualStone.getZCoord();
World world = ritualStone.getWorldObj();
BlockPos pos = ritualStone.getPosition();
double range = 0.5;
List<EntityLivingBase> livingList = SpellHelper.getLivingEntitiesInRange(world, x + 0.5, y + 1.5, z + 0.5, range, range);

View file

@ -1,5 +1,21 @@
package WayofTime.alchemicalWizardry.common.rituals;
import java.util.ArrayList;
import java.util.List;
import net.minecraft.block.Block;
import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.potion.PotionEffect;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.BlockPos;
import net.minecraft.util.EnumFacing;
import net.minecraft.world.World;
import net.minecraftforge.fluids.FluidRegistry;
import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fluids.IFluidHandler;
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry;
import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone;
@ -8,20 +24,6 @@ import WayofTime.alchemicalWizardry.api.rituals.RitualEffect;
import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler;
import WayofTime.alchemicalWizardry.common.block.BlockSpectralContainer;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
import net.minecraft.block.Block;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.potion.PotionEffect;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
import net.minecraftforge.fluids.FluidRegistry;
import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fluids.IFluidHandler;
import java.util.ArrayList;
import java.util.List;
public class RitualEffectLava extends RitualEffect
{
@ -37,11 +39,8 @@ public class RitualEffectLava extends RitualEffect
String owner = ritualStone.getOwner();
int currentEssence = SoulNetworkHandler.getCurrentEssence(owner);
World world = ritualStone.getWorld();
int x = ritualStone.getXCoord();
int y = ritualStone.getYCoord();
int z = ritualStone.getZCoord();
World world = ritualStone.getWorldObj();
BlockPos pos = ritualStone.getPosition();
if (this.canDrainReagent(ritualStone, ReagentRegistry.offensaReagent, offensaDrain, false) && SoulNetworkHandler.canSyphonFromOnlyNetwork(owner, fireFuseCost))
{
@ -49,7 +48,7 @@ public class RitualEffectLava extends RitualEffect
boolean drainReductus = world.getWorldTime() % 100 == 0;
int range = 5;
List<EntityLivingBase> entityList = SpellHelper.getLivingEntitiesInRange(world, x + 0.5, y + 0.5, z + 0.5, range, range);
List<EntityLivingBase> entityList = SpellHelper.getLivingEntitiesInRange(world, pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5, range, range);
EntityPlayer player = SpellHelper.getPlayerForUsername(owner);
for (EntityLivingBase entity : entityList)
@ -76,9 +75,11 @@ public class RitualEffectLava extends RitualEffect
}
}
Block block = world.getBlock(x, y + 1, z);
BlockPos newPos = pos.offsetUp();
IBlockState state = world.getBlockState(newPos);
Block block = state.getBlock();
if (world.isAirBlock(x, y + 1, z) && !(block instanceof BlockSpectralContainer))
if (world.isAirBlock(newPos) && !(block instanceof BlockSpectralContainer))
{
if (currentEssence < this.getCostPerRefresh())
{
@ -87,10 +88,10 @@ public class RitualEffectLava extends RitualEffect
{
for (int i = 0; i < 10; i++)
{
SpellHelper.sendIndexedParticleToAllAround(world, x, y, z, 20, world.provider.dimensionId, 3, x, y, z);
SpellHelper.sendIndexedParticleToAllAround(world, pos, 20, world.provider.getDimensionId(), 3, pos);
}
world.setBlock(x, y + 1, z, Blocks.lava, 0, 3);
world.setBlockState(newPos, Blocks.lava.getDefaultState());
SoulNetworkHandler.syphonFromNetwork(owner, this.getCostPerRefresh());
}
} else
@ -100,13 +101,13 @@ public class RitualEffectLava extends RitualEffect
{
return;
}
TileEntity tile = world.getTileEntity(x, y + 1, z);
TileEntity tile = world.getTileEntity(newPos);
if (tile instanceof IFluidHandler)
{
int amount = ((IFluidHandler) tile).fill(ForgeDirection.DOWN, new FluidStack(FluidRegistry.LAVA, 1000), false);
int amount = ((IFluidHandler) tile).fill(EnumFacing.DOWN, new FluidStack(FluidRegistry.LAVA, 1000), false);
if (amount >= 1000)
{
((IFluidHandler) tile).fill(ForgeDirection.DOWN, new FluidStack(FluidRegistry.LAVA, 1000), true);
((IFluidHandler) tile).fill(EnumFacing.DOWN, new FluidStack(FluidRegistry.LAVA, 1000), true);
this.canDrainReagent(ritualStone, ReagentRegistry.sanctusReagent, sanctusDrain, true);

View file

@ -10,6 +10,7 @@ import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.potion.PotionEffect;
import net.minecraft.util.BlockPos;
import net.minecraft.world.World;
import java.util.ArrayList;
@ -29,10 +30,8 @@ public class RitualEffectLeap extends RitualEffect
String owner = ritualStone.getOwner();
int currentEssence = SoulNetworkHandler.getCurrentEssence(owner);
World world = ritualStone.getWorld();
int x = ritualStone.getXCoord();
int y = ritualStone.getYCoord();
int z = ritualStone.getZCoord();
World world = ritualStone.getWorldObj();
BlockPos pos = ritualStone.getPosition();
double range = 2.0;

View file

@ -4,6 +4,7 @@ import java.util.ArrayList;
import java.util.List;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.BlockPos;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
import net.minecraftforge.fluids.FluidStack;
@ -24,10 +25,8 @@ public class RitualEffectLifeConduit extends RitualEffect
String owner = ritualStone.getOwner();
int currentEssence = SoulNetworkHandler.getCurrentEssence(owner);
World world = ritualStone.getWorld();
int x = ritualStone.getXCoord();
int y = ritualStone.getYCoord();
int z = ritualStone.getZCoord();
World world = ritualStone.getWorldObj();
BlockPos pos = ritualStone.getPosition();
IBloodAltar tileAltar = null;
boolean testFlag = false;

View file

@ -11,6 +11,7 @@ import net.minecraft.block.BlockRedstoneOre;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.BlockPos;
import net.minecraft.world.World;
import net.minecraftforge.oredict.OreDictionary;
import WayofTime.alchemicalWizardry.api.Int3;
@ -66,10 +67,8 @@ public class RitualEffectMagnetic extends RitualEffect
String owner = ritualStone.getOwner();
int currentEssence = SoulNetworkHandler.getCurrentEssence(owner);
World world = ritualStone.getWorld();
int x = ritualStone.getXCoord();
int y = ritualStone.getYCoord();
int z = ritualStone.getZCoord();
World world = ritualStone.getWorldObj();
BlockPos pos = ritualStone.getPosition();
boolean hasPotentia = this.canDrainReagent(ritualStone, ReagentRegistry.potentiaReagent, potentiaDrain, false);

View file

@ -6,6 +6,7 @@ import java.util.List;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.tileentity.TileEntityBeacon;
import net.minecraft.util.BlockPos;
import net.minecraft.world.World;
import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent;
import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone;
@ -25,10 +26,8 @@ public class RitualEffectOmegaStalling extends RitualEffect
String owner = ritualStone.getOwner();
int currentEssence = SoulNetworkHandler.getCurrentEssence(owner);
World world = ritualStone.getWorld();
int x = ritualStone.getXCoord();
int y = ritualStone.getYCoord();
int z = ritualStone.getZCoord();
World world = ritualStone.getWorldObj();
BlockPos pos = ritualStone.getPosition();
if (world.getWorldTime() % 20 != 0)
{

View file

@ -10,6 +10,7 @@ import net.minecraft.entity.effect.EntityLightningBolt;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.BlockPos;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
import WayofTime.alchemicalWizardry.api.Int3;
@ -40,10 +41,8 @@ public class RitualEffectOmegaTest extends RitualEffect
String owner = ritualStone.getOwner();
int currentEssence = SoulNetworkHandler.getCurrentEssence(owner);
World world = ritualStone.getWorld();
int x = ritualStone.getXCoord();
int y = ritualStone.getYCoord();
int z = ritualStone.getZCoord();
World world = ritualStone.getWorldObj();
BlockPos pos = ritualStone.getPosition();
if (world.getWorldTime() % 200 != 0)
{

View file

@ -6,6 +6,7 @@ import WayofTime.alchemicalWizardry.api.rituals.RitualEffect;
import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler;
import WayofTime.alchemicalWizardry.common.AlchemicalWizardryEventHooks;
import WayofTime.alchemicalWizardry.common.CoordAndRange;
import net.minecraft.util.BlockPos;
import net.minecraft.world.World;
import java.util.ArrayList;
@ -20,10 +21,8 @@ public class RitualEffectSpawnWard extends RitualEffect
String owner = ritualStone.getOwner();
int currentEssence = SoulNetworkHandler.getCurrentEssence(owner);
World world = ritualStone.getWorld();
int x = ritualStone.getXCoord();
int y = ritualStone.getYCoord();
int z = ritualStone.getZCoord();
World world = ritualStone.getWorldObj();
BlockPos pos = ritualStone.getPosition();
if (currentEssence < this.getCostPerRefresh())
{
@ -33,7 +32,7 @@ public class RitualEffectSpawnWard extends RitualEffect
int horizRange = 32;
int vertRange = 32;
int dimension = world.provider.dimensionId;
int dimension = world.provider.getDimensionId();
if (AlchemicalWizardryEventHooks.respawnMap.containsKey(new Integer(dimension)))
{

View file

@ -4,11 +4,13 @@ import java.util.ArrayList;
import java.util.List;
import net.minecraft.block.Block;
import net.minecraft.block.state.IBlockState;
import net.minecraft.init.Blocks;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.BlockPos;
import net.minecraft.world.World;
import WayofTime.alchemicalWizardry.api.Int3;
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry;
@ -31,10 +33,8 @@ public class RitualEffectSphereCreator extends RitualEffect
String owner = ritualStone.getOwner();
int currentEssence = SoulNetworkHandler.getCurrentEssence(owner);
World world = ritualStone.getWorld();
int x = ritualStone.getXCoord();
int y = ritualStone.getYCoord();
int z = ritualStone.getZCoord();
World world = ritualStone.getWorldObj();
BlockPos pos = ritualStone.getPosition();
// boolean hasPotentia = this.canDrainReagent(ritualStone, ReagentRegistry.potentiaReagent, potentiaDrain, false);
@ -48,7 +48,7 @@ public class RitualEffectSphereCreator extends RitualEffect
SoulNetworkHandler.causeNauseaToPlayer(owner);
} else
{
TileEntity tile = world.getTileEntity(x, y+1, z);
TileEntity tile = world.getTileEntity(pos.offsetUp());
if(!(tile instanceof IInventory))
{
return;
@ -107,8 +107,8 @@ public class RitualEffectSphereCreator extends RitualEffect
k = Math.min(radius, Math.max(-radius, lastPos.zCoord));
}
int yP = y + negYOffset;
int yN = y - negYOffset;
int yP = negYOffset;
int yN = -negYOffset;
boolean incrementNext = false;
@ -131,21 +131,25 @@ public class RitualEffectSphereCreator extends RitualEffect
return;
}
Block blk = world.getBlock(x + i, yP + j, z + k);
BlockPos pPos = pos.add(i, j + yP, k);
BlockPos nPos = pos.add(i, j + yN, k);
IBlockState state = world.getBlockState(pPos);
Block blk = state.getBlock();
if (world.isAirBlock(x + i, yN + j, z + k) || (!world.isAirBlock(x + i, yP + j, z + k) && !SpellHelper.isBlockFluid(blk)))
if (world.isAirBlock(nPos) || (!world.isAirBlock(pPos) && !SpellHelper.isBlockFluid(blk)))
{
k++;
continue;
}
if(BlockTeleposer.swapBlocks(this, world, world, x + i, yN + j, z + k, x + i, yP + j, z + k, false, 2))
if(BlockTeleposer.swapBlocks(this, world, world, nPos, pPos, false, 2))
{
SoulNetworkHandler.syphonFromNetwork(owner, this.getCostPerRefresh());
if(this.canDrainReagent(ritualStone, ReagentRegistry.terraeReagent, terraeDrain, true))
{
world.setBlock(x + i, yN + j, z + k, Blocks.dirt, 0, 2);
world.setBlockState(nPos, Blocks.dirt.getDefaultState(), 2);
}
}

View file

@ -13,6 +13,7 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.BlockPos;
import net.minecraft.world.World;
import java.util.ArrayList;
@ -26,10 +27,8 @@ public class RitualEffectSummonMeteor extends RitualEffect
String owner = ritualStone.getOwner();
int currentEssence = SoulNetworkHandler.getCurrentEssence(owner);
World world = ritualStone.getWorld();
int x = ritualStone.getXCoord();
int y = ritualStone.getYCoord();
int z = ritualStone.getZCoord();
World world = ritualStone.getWorldObj();
BlockPos pos = ritualStone.getPosition();
if (ritualStone.getCooldown() > 0)
{
@ -48,7 +47,7 @@ public class RitualEffectSummonMeteor extends RitualEffect
entityOwner.addPotionEffect(new PotionEffect(Potion.confusion.id, 80));
} else
{
List<EntityItem> entities = world.getEntitiesWithinAABB(EntityItem.class, AxisAlignedBB.getBoundingBox(x, y + 1, z, x + 1, y + 2, z + 1));
List<EntityItem> entities = world.getEntitiesWithinAABB(EntityItem.class, new AxisAlignedBB(pos.offsetUp(), pos.add(1, 2, 1)));
if (entities == null)
{
@ -60,7 +59,7 @@ public class RitualEffectSummonMeteor extends RitualEffect
if (entityItem != null && MeteorRegistry.isValidParadigmItem(entityItem.getEntityItem()))
{
int meteorID = MeteorRegistry.getParadigmIDForItem(entityItem.getEntityItem());
EntityMeteor meteor = new EntityMeteor(world, x + 0.5f, 257, z + 0.5f, meteorID);
EntityMeteor meteor = new EntityMeteor(world, pos.getX() + 0.5f, 257, pos.getZ() + 0.5f, meteorID);
meteor.motionY = -1.0f;
if (this.canDrainReagent(ritualStone, ReagentRegistry.terraeReagent, 1000, true))

View file

@ -1,5 +1,16 @@
package WayofTime.alchemicalWizardry.common.rituals;
import java.util.ArrayList;
import java.util.List;
import net.minecraft.block.Block;
import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.BlockPos;
import net.minecraft.world.World;
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry;
import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone;
import WayofTime.alchemicalWizardry.api.rituals.RitualComponent;
@ -7,15 +18,6 @@ import WayofTime.alchemicalWizardry.api.rituals.RitualEffect;
import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
import WayofTime.alchemicalWizardry.common.tileEntity.TESpectralContainer;
import net.minecraft.block.Block;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import java.util.ArrayList;
import java.util.List;
public class RitualEffectSupression extends RitualEffect
{
@ -28,12 +30,11 @@ public class RitualEffectSupression extends RitualEffect
String owner = ritualStone.getOwner();
int currentEssence = SoulNetworkHandler.getCurrentEssence(owner);
World world = ritualStone.getWorld();
int x = ritualStone.getXCoord();
int y = ritualStone.getYCoord();
int z = ritualStone.getZCoord();
World world = ritualStone.getWorldObj();
BlockPos pos = ritualStone.getPosition();
Block blockish = world.getBlock(x, y - 1, z);
IBlockState stateish = world.getBlockState(pos.offsetDown());
Block blockish = stateish.getBlock();
boolean hasAquasalus = this.canDrainReagent(ritualStone, ReagentRegistry.aquasalusReagent, aquasalusDrain, false);
boolean hasAether = this.canDrainReagent(ritualStone, ReagentRegistry.aetherReagent, aetherDrain, false);
@ -74,16 +75,19 @@ public class RitualEffectSupression extends RitualEffect
{
continue;
}
Block block = world.getBlock(x + i, y + j, z + k);
BlockPos newPos = pos.add(i, j, k);
IBlockState state = world.getBlockState(newPos);
Block block = state.getBlock();
if (SpellHelper.isBlockFluid(block))
{
TESpectralContainer.createSpectralBlockAtLocation(world, x + i, y + j, z + k, 3 * masterRadius);
TESpectralContainer.createSpectralBlockAtLocation(world, newPos, 3 * masterRadius);
} else
{
TileEntity tile = world.getTileEntity(x + i, y + j, z + k);
TileEntity tile = world.getTileEntity(newPos);
if (tile instanceof TESpectralContainer)
{
((TESpectralContainer) tile).resetDuration(3 * masterRadius);

View file

@ -16,6 +16,7 @@ import net.minecraft.entity.effect.EntityLightningBolt;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.item.ItemStack;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.BlockPos;
import net.minecraft.world.World;
import java.util.ArrayList;
@ -32,10 +33,8 @@ public class RitualEffectUnbinding extends RitualEffect
String owner = ritualStone.getOwner();
int currentEssence = SoulNetworkHandler.getCurrentEssence(owner);
World world = ritualStone.getWorld();
int x = ritualStone.getXCoord();
int y = ritualStone.getYCoord();
int z = ritualStone.getZCoord();
World world = ritualStone.getWorldObj();
BlockPos pos = ritualStone.getPosition();
if (currentEssence < this.getCostPerRefresh())
{
@ -43,13 +42,17 @@ public class RitualEffectUnbinding extends RitualEffect
} else
{
int d0 = 0;
AxisAlignedBB axisalignedbb = AxisAlignedBB.getBoundingBox((double) x, (double) y + 1, (double) z, (double) (x + 1), (double) (y + 2), (double) (z + 1)).expand(d0, d0, d0);
AxisAlignedBB axisalignedbb = new AxisAlignedBB(pos, pos.add(1, 1, 1)).expand(d0, d0, d0);
List list = world.getEntitiesWithinAABB(EntityItem.class, axisalignedbb);
Iterator iterator = list.iterator();
EntityItem item;
boolean drain = false;
int x = pos.getX();
int y = pos.getY();
int z = pos.getZ();
while (iterator.hasNext())
{
item = (EntityItem) iterator.next();
@ -142,7 +145,7 @@ public class RitualEffectUnbinding extends RitualEffect
if (world.rand.nextInt(10) == 0)
{
SpellHelper.sendIndexedParticleToAllAround(world, x, y, z, 20, world.provider.dimensionId, 1, x, y, z);
SpellHelper.sendIndexedParticleToAllAround(world, pos, 20, world.provider.getDimensionId(), 1, pos);
}
}

View file

@ -6,6 +6,7 @@ import WayofTime.alchemicalWizardry.api.rituals.RitualEffect;
import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler;
import WayofTime.alchemicalWizardry.common.AlchemicalWizardryEventHooks;
import WayofTime.alchemicalWizardry.common.CoordAndRange;
import net.minecraft.util.BlockPos;
import net.minecraft.world.World;
import java.util.ArrayList;
@ -20,10 +21,8 @@ public class RitualEffectVeilOfEvil extends RitualEffect
String owner = ritualStone.getOwner();
int currentEssence = SoulNetworkHandler.getCurrentEssence(owner);
World world = ritualStone.getWorld();
int x = ritualStone.getXCoord();
int y = ritualStone.getYCoord();
int z = ritualStone.getZCoord();
World world = ritualStone.getWorldObj();
BlockPos pos = ritualStone.getPosition();
if (currentEssence < this.getCostPerRefresh())
{
@ -33,41 +32,39 @@ public class RitualEffectVeilOfEvil extends RitualEffect
int horizRange = 32;
int vertRange = 32;
int dimension = world.provider.dimensionId;
int dimension = world.provider.getDimensionId();
if (AlchemicalWizardryEventHooks.forceSpawnMap.containsKey(new Integer(dimension)))
{
List<CoordAndRange> list = AlchemicalWizardryEventHooks.forceSpawnMap.get(new Integer(dimension));
if (list != null)
{
if (!list.contains(new CoordAndRange(x, y, z, horizRange, vertRange)))
if (!list.contains(new CoordAndRange(pos, horizRange, vertRange)))
{
boolean hasFoundAndRemoved = false;
for (CoordAndRange coords : list)
{
int xLocation = coords.xCoord;
int yLocation = coords.yCoord;
int zLocation = coords.zCoord;
BlockPos locationPos = coords.getPos();
if (xLocation == x && yLocation == y && zLocation == z)
if (locationPos.equals(pos))
{
list.remove(coords);
hasFoundAndRemoved = true;
break;
}
}
list.add(new CoordAndRange(x, y, z, horizRange, vertRange));
list.add(new CoordAndRange(pos, horizRange, vertRange));
}
} else
{
list = new LinkedList();
list.add(new CoordAndRange(x, y, z, horizRange, vertRange));
list.add(new CoordAndRange(pos, horizRange, vertRange));
AlchemicalWizardryEventHooks.forceSpawnMap.put(new Integer(dimension), list);
}
} else
{
List<CoordAndRange> list = new LinkedList();
list.add(new CoordAndRange(x, y, z, horizRange, vertRange));
list.add(new CoordAndRange(pos, horizRange, vertRange));
AlchemicalWizardryEventHooks.forceSpawnMap.put(new Integer(dimension), list);
}

View file

@ -1,5 +1,22 @@
package WayofTime.alchemicalWizardry.common.rituals;
import java.util.ArrayList;
import java.util.List;
import net.minecraft.block.Block;
import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.potion.PotionEffect;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.BlockPos;
import net.minecraft.util.EnumFacing;
import net.minecraft.world.World;
import net.minecraftforge.fluids.FluidRegistry;
import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fluids.IFluidHandler;
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry;
import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone;
@ -8,21 +25,6 @@ import WayofTime.alchemicalWizardry.api.rituals.RitualEffect;
import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler;
import WayofTime.alchemicalWizardry.common.block.BlockSpectralContainer;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
import net.minecraft.block.Block;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.potion.PotionEffect;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
import net.minecraftforge.fluids.FluidRegistry;
import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fluids.IFluidHandler;
import java.util.ArrayList;
import java.util.List;
public class RitualEffectWater extends RitualEffect
{
@ -37,10 +39,8 @@ public class RitualEffectWater extends RitualEffect
String owner = ritualStone.getOwner();
int currentEssence = SoulNetworkHandler.getCurrentEssence(owner);
World world = ritualStone.getWorld();
int x = ritualStone.getXCoord();
int y = ritualStone.getYCoord();
int z = ritualStone.getZCoord();
World world = ritualStone.getWorldObj();
BlockPos pos = ritualStone.getPosition();
boolean hasCrystallos = this.canDrainReagent(ritualStone, ReagentRegistry.crystallosReagent, crystallosDrain, false);
boolean hasAquasalus = this.canDrainReagent(ritualStone, ReagentRegistry.aquasalusReagent, aquasalusDrain, false);
@ -57,7 +57,8 @@ public class RitualEffectWater extends RitualEffect
{
for (int k = -hydrationRange; k <= hydrationRange; k++)
{
if (SpellHelper.hydrateSoil(world, x + i, y + j, z + k))
BlockPos newPos = pos.add(i, j, k);
if (SpellHelper.hydrateSoil(world, newPos))
{
this.canDrainReagent(ritualStone, ReagentRegistry.aquasalusReagent, aquasalusDrain, true);
}
@ -72,7 +73,7 @@ public class RitualEffectWater extends RitualEffect
boolean drainReductus = world.getWorldTime() % 100 == 0;
int range = 10;
List<Entity> list = SpellHelper.getEntitiesInRange(world, x + 0.5, y + 0.5, z + 0.5, range, range);
List<Entity> list = SpellHelper.getEntitiesInRange(world, pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5, range, range);
for (Entity entity : list)
{
if (entity instanceof EntityLivingBase)
@ -106,9 +107,11 @@ public class RitualEffectWater extends RitualEffect
}
}
Block block = world.getBlock(x, y + 1, z);
BlockPos newPos = pos.offsetUp();
IBlockState state = world.getBlockState(newPos);
Block block = state.getBlock();
if (world.isAirBlock(x, y + 1, z) && !(block instanceof BlockSpectralContainer))
if (world.isAirBlock(newPos) && !(block instanceof BlockSpectralContainer))
{
if (currentEssence < this.getCostPerRefresh())
{
@ -117,10 +120,10 @@ public class RitualEffectWater extends RitualEffect
{
for (int i = 0; i < 10; i++)
{
SpellHelper.sendIndexedParticleToAllAround(world, x, y, z, 20, world.provider.dimensionId, 3, x, y, z);
SpellHelper.sendIndexedParticleToAllAround(world, pos, 20, world.provider.getDimensionId(), 3, pos);
}
world.setBlock(x, y + 1, z, Blocks.water, 0, 3);
world.setBlockState(newPos, Blocks.water.getDefaultState());
SoulNetworkHandler.syphonFromNetwork(owner, this.getCostPerRefresh());
}
} else
@ -130,13 +133,13 @@ public class RitualEffectWater extends RitualEffect
{
return;
}
TileEntity tile = world.getTileEntity(x, y + 1, z);
TileEntity tile = world.getTileEntity(newPos);
if (tile instanceof IFluidHandler)
{
int amount = ((IFluidHandler) tile).fill(ForgeDirection.DOWN, new FluidStack(FluidRegistry.WATER, 1000), false);
int amount = ((IFluidHandler) tile).fill(EnumFacing.DOWN, new FluidStack(FluidRegistry.WATER, 1000), false);
if (amount >= 1000)
{
((IFluidHandler) tile).fill(ForgeDirection.DOWN, new FluidStack(FluidRegistry.WATER, 1000), true);
((IFluidHandler) tile).fill(EnumFacing.DOWN, new FluidStack(FluidRegistry.WATER, 1000), true);
this.canDrainReagent(ritualStone, ReagentRegistry.sanctusReagent, sanctusDrain, true);
@ -159,12 +162,13 @@ public class RitualEffectWater extends RitualEffect
if (hasCrystallos)
{
boolean success = false;
if (!world.isAirBlock(x + i, y + j, z + k) && SpellHelper.freezeWaterBlock(world, x + i, y + j, z + k))
newPos = pos.add(i, j, k);
if (!world.isAirBlock(newPos) && SpellHelper.freezeWaterBlock(world, newPos))
{
success = true;
} else
{
if (world.rand.nextInt(100) == 0 && world.isSideSolid(x + i, y + j - 1, z + k, ForgeDirection.UP))
if (world.rand.nextInt(100) == 0 && world.isSideSolid(newPos, EnumFacing.UP))
{
success = true;
}

View file

@ -1,5 +1,14 @@
package WayofTime.alchemicalWizardry.common.rituals;
import java.util.ArrayList;
import java.util.List;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.BlockPos;
import net.minecraft.util.DamageSource;
import net.minecraft.world.World;
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry;
import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone;
@ -7,14 +16,6 @@ import WayofTime.alchemicalWizardry.api.rituals.RitualComponent;
import WayofTime.alchemicalWizardry.api.rituals.RitualEffect;
import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler;
import WayofTime.alchemicalWizardry.api.tile.IBloodAltar;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.DamageSource;
import net.minecraft.world.World;
import java.util.ArrayList;
import java.util.List;
public class RitualEffectWellOfSuffering extends RitualEffect
{
@ -31,10 +32,8 @@ public class RitualEffectWellOfSuffering extends RitualEffect
String owner = ritualStone.getOwner();
int currentEssence = SoulNetworkHandler.getCurrentEssence(owner);
World world = ritualStone.getWorld();
int x = ritualStone.getXCoord();
int y = ritualStone.getYCoord();
int z = ritualStone.getZCoord();
World world = ritualStone.getWorldObj();
BlockPos pos = ritualStone.getPosition();
if (world.getWorldTime() % this.timeDelay != 0)
{
@ -50,9 +49,10 @@ public class RitualEffectWellOfSuffering extends RitualEffect
{
for (int k = -10; k <= 10; k++)
{
if (world.getTileEntity(x + i, y + k, z + j) instanceof IBloodAltar)
BlockPos newPos = pos.add(i, j, k);
if (world.getTileEntity(newPos) instanceof IBloodAltar)
{
tileAltar = (IBloodAltar) world.getTileEntity(x + i, y + k, z + j);
tileAltar = (IBloodAltar) world.getTileEntity(newPos);
testFlag = true;
}
}
@ -68,7 +68,7 @@ public class RitualEffectWellOfSuffering extends RitualEffect
int d0 = 10;
int vertRange = hasPotentia ? 20 : 10;
AxisAlignedBB axisalignedbb = AxisAlignedBB.getBoundingBox((double) x, (double) y, (double) z, (double) (x + 1), (double) (y + 1), (double) (z + 1)).expand(d0, vertRange, d0);
AxisAlignedBB axisalignedbb = new AxisAlignedBB(pos, pos.add(1, 1, 1)).expand(d0, vertRange, d0);
List<EntityLivingBase> list = world.getEntitiesWithinAABB(EntityLivingBase.class, axisalignedbb);
int entityCount = 0;