Attempt to fix repository

This commit is contained in:
WayofTime 2015-07-31 12:09:09 -04:00
parent e242207d50
commit 1aac4686db
932 changed files with 39272 additions and 11544 deletions

View file

@ -10,9 +10,8 @@ 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.util.EnumFacing;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
import WayofTime.alchemicalWizardry.api.Int3;
import WayofTime.alchemicalWizardry.api.alchemy.energy.IReagentHandler;
import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent;
@ -41,15 +40,17 @@ public class RitualEffectOmegaTest extends RitualEffect
String owner = ritualStone.getOwner();
int currentEssence = SoulNetworkHandler.getCurrentEssence(owner);
World world = ritualStone.getWorldObj();
BlockPos pos = ritualStone.getPosition();
World world = ritualStone.getWorld();
int x = ritualStone.getXCoord();
int y = ritualStone.getYCoord();
int z = ritualStone.getZCoord();
if (world.getWorldTime() % 200 != 0)
{
return;
}
OmegaStructureParameters param = OmegaStructureHandler.getStructureStabilityFactor(world, pos, 5, new Int3(0,1,0));
OmegaStructureParameters param = OmegaStructureHandler.getStructureStabilityFactor(world, x, y, z, 5, new Int3(0,1,0));
int stab = param.stability;
int enchantability = param.enchantability;
int enchantmentLevel = param.enchantmentLevel;
@ -63,20 +64,19 @@ public class RitualEffectOmegaTest extends RitualEffect
double range = 0.5;
List<EntityPlayer> playerList = SpellHelper.getPlayersInRange(world, pos.getX() + 0.5, pos.getY() + 1.5, pos.getZ() + 0.5, range, range);
List<EntityPlayer> playerList = SpellHelper.getPlayersInRange(world, x + 0.5, y + 1.5, z + 0.5, range, range);
Reagent reagent = null;
Map<Reagent, Integer> reagentMap = new HashMap<Reagent, Integer>();
Map<Reagent, Integer> reagentMap = new HashMap();
for(int i=0; i<4; i++)
{
Int3 jarLoc = this.getJarLocation(i);
BlockPos newPos = pos.add(jarLoc.xCoord, jarLoc.yCoord, jarLoc.zCoord);
TileEntity tile = world.getTileEntity(newPos);
TileEntity tile = world.getTileEntity(x + jarLoc.xCoord, y + jarLoc.yCoord, z + jarLoc.zCoord);
if(tile instanceof IReagentHandler)
{
IReagentHandler container = (IReagentHandler)tile;
ReagentContainerInfo[] containerInfoArray = container.getContainerInfo(EnumFacing.UP);
ReagentContainerInfo[] containerInfoArray = container.getContainerInfo(ForgeDirection.UP);
if(containerInfoArray == null)
{
continue;
@ -123,7 +123,7 @@ public class RitualEffectOmegaTest extends RitualEffect
for(EntityPlayer player : playerList)
{
OmegaParadigm waterParadigm = OmegaRegistry.getParadigmForReagent(reagent);
if(waterParadigm != null && waterParadigm.convertPlayerArmour(player, pos.getX(), pos.getY(), pos.getZ(), stab, affinity, enchantability, enchantmentLevel))
if(waterParadigm != null && waterParadigm.convertPlayerArmour(player, x, y, z, stab, affinity, enchantability, enchantmentLevel))
{
APISpellHelper.setPlayerCurrentReagentAmount(player, tickDuration);
APISpellHelper.setPlayerMaxReagentAmount(player, tickDuration);
@ -133,7 +133,7 @@ public class RitualEffectOmegaTest extends RitualEffect
if(!isTesting)
{
int drainLeft = drainTotal;
int drainLeft = this.drainTotal;
for(int i = 0; i < 4; i++)
{
if(drainLeft <= 0)
@ -141,17 +141,16 @@ public class RitualEffectOmegaTest extends RitualEffect
break;
}
Int3 jarLoc = this.getJarLocation(i);
BlockPos newPos = pos.add(jarLoc.xCoord, jarLoc.yCoord, jarLoc.zCoord);
TileEntity tile = world.getTileEntity(newPos);
TileEntity tile = world.getTileEntity(x + jarLoc.xCoord, y + jarLoc.yCoord, z + jarLoc.zCoord);
if(tile instanceof IReagentHandler)
{
IReagentHandler container = (IReagentHandler)tile;
ReagentStack drained = container.drain(EnumFacing.UP, new ReagentStack(reagent, drainLeft), true);
ReagentStack drained = container.drain(ForgeDirection.UP, new ReagentStack(reagent, drainLeft), true);
if(drained != null)
{
drainLeft -= drained.amount;
world.markBlockForUpdate(newPos);
world.addWeatherEffect(new EntityLightningBolt(world, newPos.getX(), newPos.getY(), newPos.getZ()));
world.markBlockForUpdate(x + jarLoc.xCoord, y + jarLoc.yCoord, z + jarLoc.zCoord);
world.addWeatherEffect(new EntityLightningBolt(world, x + jarLoc.xCoord, y + jarLoc.yCoord, z + jarLoc.zCoord));
}
}
}
@ -173,7 +172,7 @@ public class RitualEffectOmegaTest extends RitualEffect
@Override
public List<RitualComponent> getRitualComponentList()
{
ArrayList<RitualComponent> omegaRitual = new ArrayList<RitualComponent>();
ArrayList<RitualComponent> omegaRitual = new ArrayList();
this.addCornerRunes(omegaRitual, 1, 0, RitualComponent.DUSK);
this.addCornerRunes(omegaRitual, 2, 0, RitualComponent.DUSK);
this.addCornerRunes(omegaRitual, 3, 0, RitualComponent.BLANK);