More work on the implementation of events

This commit is contained in:
WayofTime 2014-11-07 13:45:02 -05:00
parent dd3a093825
commit 39b4243a82
27 changed files with 217 additions and 259 deletions

View file

@ -1,6 +1,8 @@
package WayofTime.alchemicalWizardry.api.rituals;
import net.minecraft.world.World;
public interface IRitualStone
{
public int getRuneType(World world, int x, int y, int z, int meta);
}

View file

@ -35,6 +35,16 @@ public class RitualComponent
{
return this.z;
}
public int getX(int direction)
{
return this.x;
}
public int getZ(int direction)
{
return this.z;
}
public int getStoneType()
{

View file

@ -158,7 +158,7 @@ public class Rituals
return false;
}
if (world.getBlockMetadata(x + rc.getX(), y + rc.getY(), z + rc.getZ()) != rc.getStoneType())
if (((IRitualStone)test).getRuneType(world, x, y, z, world.getBlockMetadata(x + rc.getX(), y + rc.getY(), z + rc.getZ())) != rc.getStoneType())
{
return false;
}
@ -176,7 +176,7 @@ public class Rituals
return false;
}
if (world.getBlockMetadata(x - rc.getZ(), y + rc.getY(), z + rc.getX()) != rc.getStoneType())
if (((IRitualStone)test).getRuneType(world, x, y, z, world.getBlockMetadata(x - rc.getZ(), y + rc.getY(), z + rc.getX())) != rc.getStoneType())
{
return false;
}
@ -194,7 +194,7 @@ public class Rituals
return false;
}
if (world.getBlockMetadata(x - rc.getX(), y + rc.getY(), z - rc.getZ()) != rc.getStoneType())
if (((IRitualStone)test).getRuneType(world, x, y, z, world.getBlockMetadata(x - rc.getX(), y + rc.getY(), z - rc.getZ())) != rc.getStoneType())
{
return false;
}
@ -212,7 +212,7 @@ public class Rituals
return false;
}
if (world.getBlockMetadata(x + rc.getZ(), y + rc.getY(), z - rc.getX()) != rc.getStoneType())
if (((IRitualStone)test).getRuneType(world, x, y, z, world.getBlockMetadata(x + rc.getZ(), y + rc.getY(), z - rc.getX())) != rc.getStoneType())
{
return false;
}