- Changed the growth behavior of the crystals
- Fixed Potion getting for various methods - Started work on crystal automation ritual - Finished first iteration of the iterator of AreaDescriptor
This commit is contained in:
parent
78ed6a18e4
commit
f0730791f7
20 changed files with 298 additions and 109 deletions
|
@ -5,9 +5,12 @@ import WayofTime.bloodmagic.api.Constants;
|
|||
import WayofTime.bloodmagic.api.event.AddToNetworkEvent;
|
||||
import WayofTime.bloodmagic.api.event.SoulNetworkEvent;
|
||||
import WayofTime.bloodmagic.api.util.helper.PlayerHelper;
|
||||
|
||||
import com.google.common.base.Strings;
|
||||
|
||||
import lombok.Getter;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.MobEffects;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
|
@ -177,7 +180,7 @@ public class SoulNetwork extends WorldSavedData
|
|||
{
|
||||
if (getPlayer() != null)
|
||||
{
|
||||
getPlayer().addPotionEffect(new PotionEffect(Potion.getPotionFromResourceLocation("confusion"), 99));
|
||||
getPlayer().addPotionEffect(new PotionEffect(MobEffects.confusion, 99));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package WayofTime.bloodmagic.api.ritual;
|
||||
|
||||
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
||||
|
@ -26,6 +25,8 @@ public abstract class AreaDescriptor implements Iterator<BlockPos>
|
|||
|
||||
public abstract boolean isWithinArea(BlockPos pos);
|
||||
|
||||
public abstract void resetIterator();
|
||||
|
||||
public static class Rectangle extends AreaDescriptor
|
||||
{
|
||||
private BlockPos minimumOffset;
|
||||
|
@ -138,8 +139,7 @@ public abstract class AreaDescriptor implements Iterator<BlockPos>
|
|||
@Override
|
||||
public boolean hasNext()
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
return currentPosition == null || !(currentPosition.getX() + 1 == maximumOffset.getX() && currentPosition.getY() + 1 == maximumOffset.getY() && currentPosition.getZ() + 1 == maximumOffset.getZ());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -148,15 +148,15 @@ public abstract class AreaDescriptor implements Iterator<BlockPos>
|
|||
if (currentPosition != null)
|
||||
{
|
||||
int nextX = currentPosition.getX() + 1 >= maximumOffset.getX() ? minimumOffset.getX() : currentPosition.getX() + 1;
|
||||
int nextZ = nextX == minimumOffset.getX() ? currentPosition.getZ() : (currentPosition.getZ() + 1 >= maximumOffset.getZ() ? minimumOffset.getZ() : currentPosition.getZ() + 1);
|
||||
int nextY = nextZ == minimumOffset.getZ() ? currentPosition.getY() : currentPosition.getY() + 1;
|
||||
int nextZ = nextX != minimumOffset.getX() ? currentPosition.getZ() : (currentPosition.getZ() + 1 >= maximumOffset.getZ() ? minimumOffset.getZ() : currentPosition.getZ() + 1);
|
||||
int nextY = (nextZ != minimumOffset.getZ() || nextX != minimumOffset.getX()) ? currentPosition.getY() : (currentPosition.getY() + 1);
|
||||
currentPosition = new BlockPos(nextX, nextY, nextZ);
|
||||
} else
|
||||
{
|
||||
currentPosition = minimumOffset;
|
||||
}
|
||||
|
||||
return cachedPosition.add(currentPosition);
|
||||
return currentPosition;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -164,6 +164,12 @@ public abstract class AreaDescriptor implements Iterator<BlockPos>
|
|||
{
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void resetIterator()
|
||||
{
|
||||
currentPosition = null;
|
||||
}
|
||||
}
|
||||
|
||||
public static class HemiSphere extends AreaDescriptor
|
||||
|
@ -280,6 +286,13 @@ public abstract class AreaDescriptor implements Iterator<BlockPos>
|
|||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void resetIterator()
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public static class Cross extends AreaDescriptor
|
||||
|
@ -345,5 +358,26 @@ public abstract class AreaDescriptor implements Iterator<BlockPos>
|
|||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void forEachRemaining(Consumer<? super BlockPos> arg0)
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void remove()
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void resetIterator()
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,9 +1,12 @@
|
|||
package WayofTime.bloodmagic.api.util.helper;
|
||||
|
||||
import WayofTime.bloodmagic.api.Constants;
|
||||
|
||||
import com.google.common.base.Strings;
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.MobEffects;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
|
@ -93,6 +96,6 @@ public class PlayerHelper
|
|||
if (player == null)
|
||||
return;
|
||||
|
||||
player.addPotionEffect(new PotionEffect(Potion.getPotionFromResourceLocation("confusion"), 80));
|
||||
player.addPotionEffect(new PotionEffect(MobEffects.confusion, 80));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue