Initial Work on Rituals

Added the framework for Rituals, including the automatic registration of rituals using the annotation.
This includes:
- The Master Ritual Stone
- The regular Ritual Stones (all 7 types)
- The Ritual Registration system
- The activation crystal items.
- Reintroduction of the Demon Will Aura (changed saved Dimension ID from Integer to ResourceLocation)

Localization needs to be completed, as well as the implementation of all the rituals.
This commit is contained in:
WayofTime 2020-10-24 14:50:25 -04:00
parent 0a9717f1ed
commit 1f0dcb608a
61 changed files with 3943 additions and 26 deletions

View file

@ -0,0 +1,76 @@
package wayoftime.bloodmagic.demonaura;
import org.apache.commons.lang3.builder.ToStringBuilder;
public class PosXY implements Comparable<PosXY>
{
public int x;
public int y;
public PosXY()
{
}
public PosXY(int x, int y)
{
this.x = x;
this.y = y;
}
@Override
public int compareTo(PosXY c)
{
return this.y == c.y ? this.x - c.x : this.y - c.y;
}
public float getDistanceSquared(int x, int z)
{
float f = this.x - x;
float f2 = this.y - z;
return f * f + f2 * f2;
}
public float getDistanceSquaredToChunkCoordinates(PosXY c)
{
return getDistanceSquared(c.x, c.y);
}
public void setX(int x)
{
this.x = x;
}
public void setY(int y)
{
this.y = y;
}
@Override
public String toString()
{
return new ToStringBuilder(this).append("x", x).append("y", y).toString();
}
@Override
public boolean equals(Object o)
{
if (this == o)
return true;
if (!(o instanceof PosXY))
return false;
PosXY posXY = (PosXY) o;
if (x != posXY.x)
return false;
return y == posXY.y;
}
@Override
public int hashCode()
{
int result = x;
result = 31 * result + y;
return result;
}
}