75 lines
3.3 KiB
Java
75 lines
3.3 KiB
Java
package WayofTime.alchemicalWizardry.common.rituals;
|
|
|
|
import java.util.ArrayList;
|
|
import java.util.List;
|
|
|
|
import net.minecraft.entity.player.EntityPlayer;
|
|
import net.minecraft.world.World;
|
|
import WayofTime.alchemicalWizardry.ModItems;
|
|
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry;
|
|
import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone;
|
|
import WayofTime.alchemicalWizardry.api.rituals.RitualComponent;
|
|
import WayofTime.alchemicalWizardry.api.rituals.RitualEffect;
|
|
import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler;
|
|
import WayofTime.alchemicalWizardry.common.omega.OmegaParadigm;
|
|
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
|
|
|
public class RitualEffectOmegaTest extends RitualEffect
|
|
{
|
|
@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() % 200 != 0)
|
|
{
|
|
return;
|
|
}
|
|
|
|
double range = 2;
|
|
|
|
List<EntityPlayer> playerList = SpellHelper.getPlayersInRange(world, x + 0.5, y + 0.5, z + 0.5, range, range);
|
|
|
|
for(EntityPlayer player : playerList)
|
|
{
|
|
OmegaParadigm waterParadigm = new OmegaParadigm(ReagentRegistry.aquasalusReagent, ModItems.boundHelmetWater, ModItems.boundPlateWater, ModItems.boundLeggingsWater, ModItems.boundBootsWater);
|
|
waterParadigm.convertPlayerArmour(player);
|
|
}
|
|
}
|
|
|
|
@Override
|
|
public int getCostPerRefresh()
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
@Override
|
|
public List<RitualComponent> getRitualComponentList()
|
|
{
|
|
ArrayList<RitualComponent> animalGrowthRitual = new ArrayList();
|
|
animalGrowthRitual.add(new RitualComponent(0, 0, 2, RitualComponent.WATER));
|
|
animalGrowthRitual.add(new RitualComponent(2, 0, 0, RitualComponent.WATER));
|
|
animalGrowthRitual.add(new RitualComponent(0, 0, -2, RitualComponent.WATER));
|
|
animalGrowthRitual.add(new RitualComponent(-2, 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(0, 0, -1, RitualComponent.WATER));
|
|
animalGrowthRitual.add(new RitualComponent(-1, 0, 0, RitualComponent.WATER));
|
|
animalGrowthRitual.add(new RitualComponent(1, 0, 2, RitualComponent.WATER));
|
|
animalGrowthRitual.add(new RitualComponent(-1, 0, 2, RitualComponent.WATER));
|
|
animalGrowthRitual.add(new RitualComponent(1, 0, -2, RitualComponent.WATER));
|
|
animalGrowthRitual.add(new RitualComponent(-1, 0, -2, RitualComponent.WATER));
|
|
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;
|
|
}
|
|
}
|