- 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
|
@ -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
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue