mirror of
https://github.com/GTNewHorizons/BloodMagic.git
synced 2026-11-19 11:49:13 +00:00
Fix rituals not working when doDaylightCycle is set to false. (#72)
This commit is contained in:
1 parent
ead07b752b
commit
f5791ff631
23 files changed
+25
-25
No files matched your search
+1
-1
@@ -31,7 +31,7 @@ public class RitualEffectAlphaPact extends RitualEffect {
|
||||
int y = ritualStone.getYCoord();
|
||||
int z = ritualStone.getZCoord();
|
||||
|
||||
if (world.getWorldTime() % 20 != 0) {
|
||||
if (world.getTotalWorldTime() % 20 != 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -34,7 +34,7 @@ public class RitualEffectAnimalGrowth extends RitualEffect {
|
||||
int y = ritualStone.getYCoord();
|
||||
int z = ritualStone.getZCoord();
|
||||
|
||||
if (world.getWorldTime() % 20 != 0) {
|
||||
if (world.getTotalWorldTime() % 20 != 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -208,7 +208,7 @@ public class RitualEffectAutoAlchemy extends RitualEffect {
|
||||
}
|
||||
}
|
||||
|
||||
if (world.getWorldTime() % 10 == 0) {
|
||||
if (world.getTotalWorldTime() % 10 == 0) {
|
||||
if (flag == 0 && inputInv1 != null) {
|
||||
for (int i = 0; i < recipe.length; i++) {
|
||||
ItemStack recItem = recipe[i];
|
||||
|
||||
+1
-1
@@ -90,7 +90,7 @@ public class RitualEffectContainment extends RitualEffect {
|
||||
}
|
||||
}
|
||||
|
||||
if (world.getWorldTime() % 2 == 0 && flag) {
|
||||
if (world.getTotalWorldTime() % 2 == 0 && flag) {
|
||||
SoulNetworkHandler.syphonFromNetwork(owner, this.getCostPerRefresh());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ public class RitualEffectCrafting extends RitualEffect {
|
||||
|
||||
boolean hasPotentia = this.canDrainReagent(ritualStone, ReagentRegistry.potentiaReagent, potentiaDrain, false);
|
||||
|
||||
if (world.getWorldTime() % (hasPotentia ? 1 : 4) != 0) {
|
||||
if (world.getTotalWorldTime() % (hasPotentia ? 1 : 4) != 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ public class RitualEffectCrushing extends RitualEffect {
|
||||
int currentEssence = SoulNetworkHandler.getCurrentEssence(owner);
|
||||
World world = ritualStone.getWorld();
|
||||
|
||||
if (world.getWorldTime() % 10 != 5) {
|
||||
if (world.getTotalWorldTime() % 10 != 5) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -69,7 +69,7 @@ public class RitualEffectFeatheredEarth extends RitualEffect // Nullifies all fa
|
||||
|
||||
SoulNetworkHandler.syphonFromNetwork(owner, this.getCostPerRefresh() * entityCount);
|
||||
|
||||
if (flag && world.getWorldTime() % costCooldown == 0) {
|
||||
if (flag && world.getTotalWorldTime() % costCooldown == 0) {
|
||||
if (hasTerrae) {
|
||||
this.canDrainReagent(ritualStone, ReagentRegistry.terraeReagent, terraeDrain, true);
|
||||
}
|
||||
|
||||
+1
-1
@@ -38,7 +38,7 @@ public class RitualEffectFeatheredKnife extends RitualEffect {
|
||||
|
||||
int timeDelay = hasPotentia ? 10 : 20;
|
||||
|
||||
if (world.getWorldTime() % timeDelay != 0) {
|
||||
if (world.getTotalWorldTime() % timeDelay != 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ public class RitualEffectFlight extends RitualEffect {
|
||||
entityCount++;
|
||||
}
|
||||
|
||||
if (entityCount > 0 && world.getWorldTime() % reagentCooldown == 0) {
|
||||
if (entityCount > 0 && world.getTotalWorldTime() % reagentCooldown == 0) {
|
||||
if (hasAether) {
|
||||
this.canDrainReagent(ritualStone, ReagentRegistry.aetherReagent, aetherDrain, true);
|
||||
}
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ public class RitualEffectFullStomach extends RitualEffect {
|
||||
int y = ritualStone.getYCoord();
|
||||
int z = ritualStone.getZCoord();
|
||||
|
||||
if (world.getWorldTime() % 20 != 0) {
|
||||
if (world.getTotalWorldTime() % 20 != 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ public class RitualEffectGrowth extends RitualEffect {
|
||||
boolean hasVirtus = this.canDrainReagent(ritualStone, ReagentRegistry.virtusReagent, virtusDrain, false);
|
||||
|
||||
int speed = this.getSpeedForReagents(hasTerrae, hasOrbisTerrae);
|
||||
if (world.getWorldTime() % speed != 0) {
|
||||
if (world.getTotalWorldTime() % speed != 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ public class RitualEffectHarvest extends RitualEffect {
|
||||
|
||||
entityOwner.addPotionEffect(new PotionEffect(Potion.confusion.id, 80));
|
||||
} else {
|
||||
if (world.getWorldTime() % 5 != 0) {
|
||||
if (world.getTotalWorldTime() % 5 != 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ public class RitualEffectHealing extends RitualEffect {
|
||||
|
||||
int timeDelay = 50;
|
||||
|
||||
if (world.getWorldTime() % timeDelay != 0) {
|
||||
if (world.getTotalWorldTime() % timeDelay != 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -100,14 +100,14 @@ public class RitualEffectInterdiction extends RitualEffect {
|
||||
|
||||
if (itemFlag) {
|
||||
flag = true;
|
||||
if (world.getWorldTime() % aetherDrainRate == 0) {
|
||||
if (world.getTotalWorldTime() % aetherDrainRate == 0) {
|
||||
this.canDrainReagent(ritualStone, ReagentRegistry.aetherReagent, aetherDrain, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (world.getWorldTime() % 2 == 0 && flag) {
|
||||
if (world.getTotalWorldTime() % 2 == 0 && flag) {
|
||||
SoulNetworkHandler.syphonFromNetwork(owner, getCostPerRefresh());
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -39,7 +39,7 @@ public class RitualEffectItemRouting extends RitualEffect {
|
||||
int y = ritualStone.getYCoord();
|
||||
int z = ritualStone.getZCoord();
|
||||
|
||||
if (world.getWorldTime() % 20 != 0) {
|
||||
if (world.getTotalWorldTime() % 20 != 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ public class RitualEffectLava extends RitualEffect {
|
||||
&& SoulNetworkHandler.canSyphonFromOnlyNetwork(owner, fireFuseCost)) {
|
||||
boolean hasReductus = this
|
||||
.canDrainReagent(ritualStone, ReagentRegistry.reductusReagent, reductusDrain, false);
|
||||
boolean drainReductus = world.getWorldTime() % 100 == 0;
|
||||
boolean drainReductus = world.getTotalWorldTime() % 100 == 0;
|
||||
|
||||
int range = 5;
|
||||
List<EntityLivingBase> entityList = SpellHelper
|
||||
|
||||
@@ -68,7 +68,7 @@ public class RitualEffectMagnetic extends RitualEffect {
|
||||
|
||||
boolean hasPotentia = this.canDrainReagent(ritualStone, ReagentRegistry.potentiaReagent, potentiaDrain, false);
|
||||
|
||||
if (world.getWorldTime() % (hasPotentia ? 10 : 40) != 0) {
|
||||
if (world.getTotalWorldTime() % (hasPotentia ? 10 : 40) != 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ public class RitualEffectOmegaStalling extends RitualEffect {
|
||||
int y = ritualStone.getYCoord();
|
||||
int z = ritualStone.getZCoord();
|
||||
|
||||
if (world.getWorldTime() % 20 != 0) {
|
||||
if (world.getTotalWorldTime() % 20 != 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -46,7 +46,7 @@ public class RitualEffectOmegaTest extends RitualEffect {
|
||||
int y = ritualStone.getYCoord();
|
||||
int z = ritualStone.getZCoord();
|
||||
|
||||
if (world.getWorldTime() % 200 != 0) {
|
||||
if (world.getTotalWorldTime() % 200 != 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -40,7 +40,7 @@ public class RitualEffectSphereCreator extends RitualEffect {
|
||||
// boolean hasPotentia = this.canDrainReagent(ritualStone, ReagentRegistry.potentiaReagent,
|
||||
// potentiaDrain, false);
|
||||
|
||||
if (world.getWorldTime() % 1 != 0) {
|
||||
if (world.getTotalWorldTime() % 1 != 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -44,7 +44,7 @@ public class RitualEffectSupression extends RitualEffect {
|
||||
int radius = this.getRadiusForReagents(hasAether, hasAquasalus);
|
||||
int masterRadius = radius;
|
||||
|
||||
int yIndex = (int) (world.getWorldTime() % (2 * radius + 1)) - radius;
|
||||
int yIndex = (int) (world.getTotalWorldTime() % (2 * radius + 1)) - radius;
|
||||
boolean expansion = false;
|
||||
|
||||
if (ritualStone.getVar1() < (radius + 1)) {
|
||||
@@ -86,7 +86,7 @@ public class RitualEffectSupression extends RitualEffect {
|
||||
|
||||
SoulNetworkHandler.syphonFromNetwork(owner, this.getCostPerRefresh() * costMod);
|
||||
|
||||
if (world.getWorldTime() % 100 == 0) {
|
||||
if (world.getTotalWorldTime() % 100 == 0) {
|
||||
if (hasAquasalus) {
|
||||
this.canDrainReagent(ritualStone, ReagentRegistry.aquasalusReagent, aquasalusDrain, true);
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ public class RitualEffectWater extends RitualEffect {
|
||||
if (hasOffensa) {
|
||||
boolean hasReductus = this
|
||||
.canDrainReagent(ritualStone, ReagentRegistry.reductusReagent, reductusDrain, false);
|
||||
boolean drainReductus = world.getWorldTime() % 100 == 0;
|
||||
boolean drainReductus = world.getTotalWorldTime() % 100 == 0;
|
||||
|
||||
int range = 10;
|
||||
List<Entity> list = SpellHelper.getEntitiesInRange(world, x + 0.5, y + 0.5, z + 0.5, range, range);
|
||||
|
||||
+1
-1
@@ -35,7 +35,7 @@ public class RitualEffectWellOfSuffering extends RitualEffect {
|
||||
int y = ritualStone.getYCoord();
|
||||
int z = ritualStone.getZCoord();
|
||||
|
||||
if (world.getWorldTime() % timeDelay != 0) {
|
||||
if (world.getTotalWorldTime() % timeDelay != 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user