Allow rituals to specify an update time. Default is 20
This commit is contained in:
parent
0a0986e9bf
commit
1c8d6d6986
3 changed files with 13 additions and 6 deletions
|
@ -12,7 +12,7 @@ import WayofTime.bloodmagic.api.ritual.Ritual;
|
|||
import WayofTime.bloodmagic.api.ritual.RitualComponent;
|
||||
import WayofTime.bloodmagic.api.util.helper.NetworkHelper;
|
||||
|
||||
public class RitualWater extends Ritual{
|
||||
public class RitualWater extends Ritual {
|
||||
|
||||
public RitualWater() {
|
||||
super("ritualWater", 0, 1000);
|
||||
|
@ -20,14 +20,12 @@ public class RitualWater extends Ritual{
|
|||
|
||||
@Override
|
||||
public void performRitual(IMasterRitualStone masterRitualStone) {
|
||||
System.out.println("Performing Effect");
|
||||
World world = masterRitualStone.getWorld();
|
||||
SoulNetwork network = NetworkHelper.getSoulNetwork(masterRitualStone.getOwner(), world);
|
||||
int currentEssence = network.getCurrentEssence();
|
||||
|
||||
if(currentEssence < getRefreshCost()) {
|
||||
if(currentEssence < getRefreshCost())
|
||||
return;
|
||||
}
|
||||
|
||||
BlockPos pos = masterRitualStone.getPos().up();
|
||||
if(world.isAirBlock(pos)) {
|
||||
|
@ -36,6 +34,11 @@ public class RitualWater extends Ritual{
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRefreshTime() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRefreshCost() {
|
||||
return 50;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue