Attempt to fix repository
This commit is contained in:
parent
e242207d50
commit
1aac4686db
932 changed files with 39272 additions and 11544 deletions
|
@ -1,20 +1,18 @@
|
|||
package WayofTime.alchemicalWizardry.common.rituals;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.IGrowable;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.IPlantable;
|
||||
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.spell.complex.effect.SpellHelper;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.IPlantable;
|
||||
import net.minecraft.block.IGrowable;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class RitualEffectGrowth extends RitualEffect
|
||||
{
|
||||
|
@ -29,8 +27,10 @@ public class RitualEffectGrowth 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 (currentEssence < this.getCostPerRefresh() * 9)
|
||||
{
|
||||
|
@ -56,8 +56,7 @@ public class RitualEffectGrowth extends RitualEffect
|
|||
{
|
||||
if (this.canDrainReagent(ritualStone, ReagentRegistry.aquasalusReagent, aquasalusDrain, false))
|
||||
{
|
||||
BlockPos newPos = pos.add(i, 1, j);
|
||||
if (SpellHelper.hydrateSoil(world, newPos))
|
||||
if (SpellHelper.hydrateSoil(world, x + i, y + 1, z + j))
|
||||
{
|
||||
this.canDrainReagent(ritualStone, ReagentRegistry.aquasalusReagent, aquasalusDrain, true);
|
||||
}
|
||||
|
@ -73,15 +72,13 @@ public class RitualEffectGrowth extends RitualEffect
|
|||
{
|
||||
for (int j = -range; j <= range; j++)
|
||||
{
|
||||
BlockPos newPos = pos.add(i, 2, j);
|
||||
IBlockState state = world.getBlockState(newPos);
|
||||
Block block = state.getBlock();
|
||||
Block block = world.getBlock(x + i, y + 2, z + j);
|
||||
|
||||
if (block instanceof IPlantable || block instanceof IGrowable)
|
||||
{
|
||||
{
|
||||
SpellHelper.sendIndexedParticleToAllAround(world, pos, 20, world.provider.getDimensionId(), 3, pos);
|
||||
block.updateTick(world, newPos, state, world.rand);
|
||||
SpellHelper.sendIndexedParticleToAllAround(world, x, y, z, 20, world.provider.dimensionId, 3, x, y, z);
|
||||
block.updateTick(world, x + i, y + 2, z + j, world.rand);
|
||||
flag++;
|
||||
}
|
||||
}
|
||||
|
@ -111,7 +108,7 @@ public class RitualEffectGrowth extends RitualEffect
|
|||
@Override
|
||||
public List<RitualComponent> getRitualComponentList()
|
||||
{
|
||||
ArrayList<RitualComponent> growthRitual = new ArrayList<RitualComponent>();
|
||||
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));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue