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

@ -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);
}