Compare commits

..
7 Commits
5 changed files with 137 additions and 97 deletions

No files matched your search

+1 -1
View File
@@ -27,4 +27,4 @@ whitelist.json
*.iws
src/main/resources/mixins.*.json
*.bat
layout.json
/layout.json
+2 -2
View File
@@ -26,7 +26,7 @@ dependencies {
api("com.github.GTNewHorizons:waila:1.8.4:dev")
api("com.github.GTNewHorizons:NotEnoughItems:2.7.34-GTNH:dev")
compileOnly("com.github.GTNewHorizons:GT5-Unofficial:5.09.51.227:dev") {transitive = false }
compileOnly("com.github.GTNewHorizons:GT5-Unofficial:5.09.51.203:dev") {transitive = false }
compileOnly("com.github.GTNewHorizons:Botania:1.12.6-GTNH:api") {transitive = false }
compileOnly("com.github.GTNewHorizons:ForestryMC:4.10.5:api") {transitive = false }
@@ -35,7 +35,7 @@ dependencies {
compileOnly("com.github.GTNewHorizons:Chisel:2.16.2-GTNH:api") {transitive = false }
compileOnly("com.github.GTNewHorizons:ZenScript:1.0.0-GTNH") {transitive = false }
compileOnly("com.github.GTNewHorizons:CraftTweaker:3.4.1:dev") {transitive = false }
compileOnly("com.github.GTNewHorizons:CraftTweaker:3.4.0:dev") {transitive = false }
compileOnly("thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev") {transitive = false }
compileOnly("curse.maven:guide-api-228832:2287185") {transitive = false }
+1 -1
View File
@@ -14,7 +14,7 @@ modId = AWWayofTime
modGroup = WayofTime.alchemicalWizardry
# Whether to use modGroup as the maven publishing group.
# When false, com.github.GTNewHorizons is used.
# Due to a history of using JitPack, the default is com.github.GTNewHorizons for all mods.
useModGroupForPublishing = false
# Updates your build.gradle and settings.gradle automatically whenever an update is available.
+1 -1
View File
@@ -17,7 +17,7 @@ pluginManagement {
}
plugins {
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.38'
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.37'
}
@@ -18,15 +18,10 @@ import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
public class RitualEffectLeap extends RitualEffect {
// Throws mobs with twice the horizontal speed
public static final int aetherDrain = 10;
// Throws mobs with half the vertical speed
public static final int terraeDrain = 10;
// Grants 3 seconds of fall immunity
public static final int reductusDrain = 10;
// Only throws adults (and non-sneaking players)
public static final int tenebraeDrain = 10;
// Only throws babies (and non-sneaking players)
public static final int sanctusDrain = 10;
@Override
@@ -44,107 +39,152 @@ public class RitualEffectLeap extends RitualEffect {
List<EntityLivingBase> livingList = SpellHelper
.getLivingEntitiesInRange(world, x + 0.5, y + 0.5, z + 0.5, range, range);
if (livingList == null || livingList.isEmpty()) {
if (livingList == null) {
return;
}
if (currentEssence < this.getCostPerRefresh() * livingList.size()) {
SoulNetworkHandler.causeNauseaToPlayer(owner);
return;
}
} else {
boolean hasAether = this.canDrainReagent(ritualStone, ReagentRegistry.aetherReagent, aetherDrain, false);
boolean hasTerrae = this.canDrainReagent(ritualStone, ReagentRegistry.terraeReagent, terraeDrain, false);
boolean hasReductus = this
.canDrainReagent(ritualStone, ReagentRegistry.reductusReagent, reductusDrain, false);
boolean hasTenebrae = this
.canDrainReagent(ritualStone, ReagentRegistry.tenebraeReagent, tenebraeDrain, false);
boolean hasSanctus = this.canDrainReagent(ritualStone, ReagentRegistry.sanctusReagent, sanctusDrain, false);
boolean hasAether = true;
boolean hasTerrae = true;
boolean hasReductus = true;
boolean hasTenebrae = true;
boolean hasSanctus = true;
int direction = ritualStone.getDirection();
int direction = ritualStone.getDirection();
int flag = 0;
int count = 0;
for (EntityLivingBase livingEntity : livingList) {
if (livingEntity.isSneaking()) {
continue;
}
hasReductus = hasReductus
&& this.canDrainReagent(ritualStone, ReagentRegistry.reductusReagent, reductusDrain, false);
hasTenebrae = hasTenebrae
&& this.canDrainReagent(ritualStone, ReagentRegistry.tenebraeReagent, tenebraeDrain, false);
hasSanctus = hasSanctus
&& this.canDrainReagent(ritualStone, ReagentRegistry.sanctusReagent, sanctusDrain, false);
// Sanctus only makes it work on children and tenebrae only with adults.
// Both being present prevents the ritual from working for any NPCs.
if (((hasSanctus && !livingEntity.isChild()) || (hasTenebrae && livingEntity.isChild()))
&& !(livingEntity instanceof EntityPlayer)) {
continue;
}
hasAether = hasAether
&& this.canDrainReagent(ritualStone, ReagentRegistry.aetherReagent, aetherDrain, true);
hasTerrae = hasTerrae
&& this.canDrainReagent(ritualStone, ReagentRegistry.terraeReagent, terraeDrain, true);
double motionY = hasTerrae ? 0.6 : 1.2;
double speed = hasAether ? 6.0 : 3.0;
livingEntity.motionY = motionY;
livingEntity.fallDistance = 0;
count++;
if (livingEntity instanceof EntityPlayer) {
switch (direction) {
case 1:
SpellHelper.setPlayerSpeedFromServer((EntityPlayer) livingEntity, 0, motionY, -speed);
break;
case 2:
SpellHelper.setPlayerSpeedFromServer((EntityPlayer) livingEntity, speed, motionY, 0);
break;
case 3:
SpellHelper.setPlayerSpeedFromServer((EntityPlayer) livingEntity, 0, motionY, speed);
break;
case 4:
SpellHelper.setPlayerSpeedFromServer((EntityPlayer) livingEntity, -speed, motionY, 0);
break;
}
} else {
switch (direction) {
case 1:
livingEntity.motionX = 0.0;
livingEntity.motionZ = -speed;
break;
case 2:
livingEntity.motionX = speed;
livingEntity.motionZ = 0.0;
break;
case 3:
livingEntity.motionX = 0.0;
livingEntity.motionZ = speed;
break;
case 4:
livingEntity.motionX = -speed;
livingEntity.motionZ = 0.0;
break;
for (EntityLivingBase livingEntity : livingList) {
if (livingEntity.isSneaking()) {
continue;
}
if (hasTenebrae) {
this.canDrainReagent(ritualStone, ReagentRegistry.tenebraeReagent, tenebraeDrain, true);
} else if (hasSanctus) {
this.canDrainReagent(ritualStone, ReagentRegistry.sanctusReagent, sanctusDrain, true);
hasAether = hasAether
&& this.canDrainReagent(ritualStone, ReagentRegistry.aetherReagent, aetherDrain, false);
hasTerrae = hasTerrae
&& this.canDrainReagent(ritualStone, ReagentRegistry.terraeReagent, terraeDrain, false);
hasReductus = hasReductus
&& this.canDrainReagent(ritualStone, ReagentRegistry.reductusReagent, reductusDrain, false);
hasTenebrae = hasTenebrae
&& this.canDrainReagent(ritualStone, ReagentRegistry.tenebraeReagent, tenebraeDrain, false);
hasSanctus = hasSanctus
&& this.canDrainReagent(ritualStone, ReagentRegistry.sanctusReagent, sanctusDrain, false);
double motionY = hasTerrae ? 0.6 : 1.2;
double speed = hasAether ? 6.0 : 3.0;
if (!(hasTenebrae || hasSanctus) || livingEntity instanceof EntityPlayer) {
livingEntity.motionY = motionY;
livingEntity.fallDistance = 0;
if (livingEntity instanceof EntityPlayer) {
switch (direction) {
case 1:
SpellHelper.setPlayerSpeedFromServer((EntityPlayer) livingEntity, 0, motionY, -speed);
break;
case 2:
SpellHelper.setPlayerSpeedFromServer((EntityPlayer) livingEntity, speed, motionY, 0);
break;
case 3:
SpellHelper.setPlayerSpeedFromServer((EntityPlayer) livingEntity, 0, motionY, speed);
break;
case 4:
SpellHelper.setPlayerSpeedFromServer((EntityPlayer) livingEntity, -speed, motionY, 0);
break;
}
} else {
livingEntity.motionY = motionY;
switch (direction) {
case 1:
livingEntity.motionX = 0.0;
livingEntity.motionZ = -speed;
break;
case 2:
livingEntity.motionX = speed;
livingEntity.motionZ = 0.0;
break;
case 3:
livingEntity.motionX = 0.0;
livingEntity.motionZ = -speed;
break;
case 4:
livingEntity.motionX = -speed;
livingEntity.motionZ = 0.0;
break;
}
}
flag++;
} else {
if ((hasSanctus && !livingEntity.isChild()) || (hasTenebrae && livingEntity.isChild())) {
continue;
}
livingEntity.motionY = motionY;
switch (direction) {
case 1:
livingEntity.motionX = 0.0;
livingEntity.motionZ = -speed;
break;
case 2:
livingEntity.motionX = speed;
livingEntity.motionZ = 0.0;
break;
case 3:
livingEntity.motionX = 0.0;
livingEntity.motionZ = -speed;
break;
case 4:
livingEntity.motionX = -speed;
livingEntity.motionZ = 0.0;
break;
}
if (hasTenebrae) {
this.canDrainReagent(ritualStone, ReagentRegistry.tenebraeReagent, tenebraeDrain, true);
}
if (hasSanctus) {
this.canDrainReagent(ritualStone, ReagentRegistry.sanctusReagent, sanctusDrain, true);
}
livingEntity.fallDistance = 0;
flag++;
}
if (hasAether) {
this.canDrainReagent(ritualStone, ReagentRegistry.aetherReagent, aetherDrain, true);
}
if (hasTerrae) {
this.canDrainReagent(ritualStone, ReagentRegistry.terraeReagent, terraeDrain, true);
}
if (hasReductus) {
if (!livingEntity.isPotionActive(AlchemicalWizardry.customPotionFeatherFall)) {
livingEntity.addPotionEffect(
new PotionEffect(AlchemicalWizardry.customPotionFeatherFall.id, 3 * 20, 0));
this.canDrainReagent(ritualStone, ReagentRegistry.reductusReagent, reductusDrain, true);
}
}
}
if (hasReductus && !livingEntity.isPotionActive(AlchemicalWizardry.customPotionFeatherFall)) {
livingEntity
.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionFeatherFall.id, 3 * 20, 0));
this.canDrainReagent(ritualStone, ReagentRegistry.reductusReagent, reductusDrain, true);
if (flag > 0) {
SoulNetworkHandler.syphonFromNetwork(owner, this.getCostPerRefresh() * flag);
}
}
if (count > 0) {
SoulNetworkHandler.syphonFromNetwork(owner, this.getCostPerRefresh() * count);
}
}
@Override
@@ -154,7 +194,7 @@ public class RitualEffectLeap extends RitualEffect {
@Override
public List<RitualComponent> getRitualComponentList() {
ArrayList<RitualComponent> leapingRitual = new ArrayList<>();
ArrayList<RitualComponent> leapingRitual = new ArrayList();
leapingRitual.add(new RitualComponent(0, 0, -2, RitualComponent.DUSK));
leapingRitual.add(new RitualComponent(1, 0, -1, RitualComponent.AIR));
leapingRitual.add(new RitualComponent(-1, 0, -1, RitualComponent.AIR));