Started working on allowing RitualDiviner to do directions.

Completed refactorization of spell system.
Increased protection against void damage while void sigil is in Bound Armour.
Added an OnRitualStop with an Enum input providing the action.
Added more events.
This commit is contained in:
WayofTime 2014-11-12 17:14:43 -05:00
parent 69abce8f85
commit beea2e875a
97 changed files with 4234 additions and 1414 deletions

View file

@ -0,0 +1,11 @@
package WayofTime.alchemicalWizardry.api.rituals;
public enum RitualBreakMethod
{
REDSTONE,
BREAK_MRS,
BREAK_STONE,
ACTIVATE, //When an activation crystal activates the MRS, overwriting the current ritual
DEACTIVATE,
EXPLOSION, //When the MRS is destroyed by an explosion
}

View file

@ -38,16 +38,34 @@ public class RitualComponent
public int getX(int direction)
{
return this.x;
switch(direction)
{
case 2:
return -this.getZ();
case 3:
return -this.getX();
case 4:
return this.getZ();
default: return this.getX();
}
}
public int getZ(int direction)
{
return this.z;
switch(direction)
{
case 2:
return this.getX();
case 3:
return -this.getZ();
case 4:
return -this.getX();
default: return this.getZ();
}
}
public int getStoneType()
{
return this.stoneType;
}
}
}

View file

@ -1,11 +1,11 @@
package WayofTime.alchemicalWizardry.api.rituals;
import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent;
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentStack;
import java.util.List;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraftforge.common.util.ForgeDirection;
import java.util.List;
import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent;
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentStack;
public abstract class RitualEffect
{
@ -16,7 +16,7 @@ public abstract class RitualEffect
return true;
}
public void onRitualBroken(IMasterRitualStone ritualStone)
public void onRitualBroken(IMasterRitualStone ritualStone, RitualBreakMethod method)
{
}

View file

@ -324,16 +324,18 @@ public class Rituals
return false;
}
public static void onRitualBroken(IMasterRitualStone ritualStone, String ritualID)
public static void onRitualBroken(IMasterRitualStone ritualStone, String ritualID, RitualBreakMethod method)
{
if (ritualMap.containsKey(ritualID))
{
Rituals ritual = ritualMap.get(ritualID);
if (ritual != null && ritual.effect != null)
{
ritual.effect.onRitualBroken(ritualStone);
ritual.effect.onRitualBroken(ritualStone, method);
}
}
System.out.println(method);
}
public static int getNumberOfRituals()