forked from tilera/infinity-craft
Added StarTech compatiblity
This commit is contained in:
parent
993ed37ccc
commit
6aa4b66ae5
7 changed files with 123 additions and 1 deletions
|
@ -91,9 +91,10 @@ repositories {
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
deobfCompile ("com.gitlab.lcoremodders:LucraftCore:2.4.2")
|
deobfCompile 'com.gitlab.lcoremodders:LucraftCore:85e6c788'
|
||||||
deobfCompile 'com.gitlab.lcoremodders:HeroesExpansion:1.3.3'
|
deobfCompile 'com.gitlab.lcoremodders:HeroesExpansion:1.3.3'
|
||||||
deobfCompile 'com.gitlab.lcoremodders:SpeedsterHeroes:1e4b1fb951'
|
deobfCompile 'com.gitlab.lcoremodders:SpeedsterHeroes:1e4b1fb951'
|
||||||
|
deobfCompile "star-tech-man-the-legendary-mod:star:tech:1.1.1"
|
||||||
compile fileTree(dir: 'libs', include: ['*.jar'])
|
compile fileTree(dir: 'libs', include: ['*.jar'])
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,13 +5,16 @@ import net.minecraftforge.fml.common.Loader;
|
||||||
public class CompatHandler {
|
public class CompatHandler {
|
||||||
public static boolean isHeroesExpansion;
|
public static boolean isHeroesExpansion;
|
||||||
public static boolean isSpeedsterHeroes;
|
public static boolean isSpeedsterHeroes;
|
||||||
|
public static boolean isStarTech;
|
||||||
|
|
||||||
public static HEProxy HeroesExpension;
|
public static HEProxy HeroesExpension;
|
||||||
public static SHProxy SpeedsterHeroes;
|
public static SHProxy SpeedsterHeroes;
|
||||||
|
public static STProxy StarTech;
|
||||||
|
|
||||||
public static void check() {
|
public static void check() {
|
||||||
isHeroesExpansion = Loader.isModLoaded("heroesexpansion");
|
isHeroesExpansion = Loader.isModLoaded("heroesexpansion");
|
||||||
isSpeedsterHeroes = Loader.isModLoaded("speedsterheroes");
|
isSpeedsterHeroes = Loader.isModLoaded("speedsterheroes");
|
||||||
|
isStarTech = Loader.isModLoaded("star-tech");
|
||||||
|
|
||||||
if (isHeroesExpansion) {
|
if (isHeroesExpansion) {
|
||||||
HeroesExpension = new HELoadedProxy();
|
HeroesExpension = new HELoadedProxy();
|
||||||
|
@ -25,5 +28,11 @@ public class CompatHandler {
|
||||||
SpeedsterHeroes = new SHNotLoadedProxy();
|
SpeedsterHeroes = new SHNotLoadedProxy();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isStarTech) {
|
||||||
|
StarTech = new STLoadedProxy();
|
||||||
|
} else {
|
||||||
|
StarTech = new STNotLoadedProxy();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
38
src/main/java/anvil/infinity/compat/STLoadedProxy.java
Normal file
38
src/main/java/anvil/infinity/compat/STLoadedProxy.java
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
package anvil.infinity.compat;
|
||||||
|
|
||||||
|
import com.nic.st.power.*;
|
||||||
|
import lucraft.mods.lucraftcore.superpowers.abilities.Ability;
|
||||||
|
import net.minecraft.entity.EntityLivingBase;
|
||||||
|
|
||||||
|
public class STLoadedProxy implements STProxy {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Ability getAbilityPowerBlast(EntityLivingBase entity) {
|
||||||
|
return new AbilityPowerBlast(entity);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Ability getAbilityPowerImpower(EntityLivingBase entity) {
|
||||||
|
return new AbilityPowerImpower(entity);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Ability getAbilityPowerRocketBurst(EntityLivingBase entity) {
|
||||||
|
return new AbilityRocketBurst(entity);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Ability getAbilityTendrils(EntityLivingBase entity) {
|
||||||
|
return new AbilityTendrils(entity);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Ability getAbilityCyclone(EntityLivingBase entity) {
|
||||||
|
return new AbilityPowerCyclone(entity);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Ability getAbilityBurnout(EntityLivingBase entity) {
|
||||||
|
return new AbilityGiveBurnout(entity);
|
||||||
|
}
|
||||||
|
}
|
37
src/main/java/anvil/infinity/compat/STNotLoadedProxy.java
Normal file
37
src/main/java/anvil/infinity/compat/STNotLoadedProxy.java
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
package anvil.infinity.compat;
|
||||||
|
|
||||||
|
import lucraft.mods.lucraftcore.superpowers.abilities.Ability;
|
||||||
|
import net.minecraft.entity.EntityLivingBase;
|
||||||
|
|
||||||
|
public class STNotLoadedProxy implements STProxy {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Ability getAbilityPowerBlast(EntityLivingBase entity) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Ability getAbilityPowerImpower(EntityLivingBase entity) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Ability getAbilityPowerRocketBurst(EntityLivingBase entity) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Ability getAbilityTendrils(EntityLivingBase entity) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Ability getAbilityCyclone(EntityLivingBase entity) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Ability getAbilityBurnout(EntityLivingBase entity) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
20
src/main/java/anvil/infinity/compat/STProxy.java
Normal file
20
src/main/java/anvil/infinity/compat/STProxy.java
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
package anvil.infinity.compat;
|
||||||
|
|
||||||
|
import lucraft.mods.lucraftcore.superpowers.abilities.Ability;
|
||||||
|
import net.minecraft.entity.EntityLivingBase;
|
||||||
|
|
||||||
|
public interface STProxy {
|
||||||
|
|
||||||
|
Ability getAbilityPowerBlast(EntityLivingBase entity);
|
||||||
|
|
||||||
|
Ability getAbilityPowerImpower(EntityLivingBase entity);
|
||||||
|
|
||||||
|
Ability getAbilityPowerRocketBurst(EntityLivingBase entity);
|
||||||
|
|
||||||
|
Ability getAbilityTendrils(EntityLivingBase entity);
|
||||||
|
|
||||||
|
Ability getAbilityCyclone(EntityLivingBase entity);
|
||||||
|
|
||||||
|
Ability getAbilityBurnout(EntityLivingBase entity);
|
||||||
|
|
||||||
|
}
|
|
@ -14,6 +14,8 @@ public class ConfigHandler {
|
||||||
public static int soulWorldID;
|
public static int soulWorldID;
|
||||||
public static boolean snapCreative;
|
public static boolean snapCreative;
|
||||||
public static boolean heAbilities;
|
public static boolean heAbilities;
|
||||||
|
public static int powerCooldown;
|
||||||
|
public static boolean stAbilities;
|
||||||
|
|
||||||
public static void refreshConfig(File file) {
|
public static void refreshConfig(File file) {
|
||||||
config = new Configuration(file);
|
config = new Configuration(file);
|
||||||
|
@ -33,6 +35,8 @@ public class ConfigHandler {
|
||||||
soulWorldID = config.getInt("Soul World ID", category, 10, -255, 255, "The ID of the Soul World Dimension");
|
soulWorldID = config.getInt("Soul World ID", category, 10, -255, 255, "The ID of the Soul World Dimension");
|
||||||
snapCreative = config.getBoolean("Can Snap change Gamemode", category, false, "Can the Snap change the Gamemode to Creative");
|
snapCreative = config.getBoolean("Can Snap change Gamemode", category, false, "Can the Snap change the Gamemode to Creative");
|
||||||
heAbilities = config.getBoolean("HeroesExpansion Abilities", category, true, "Should some stones use abilities from HeroesExpansion");
|
heAbilities = config.getBoolean("HeroesExpansion Abilities", category, true, "Should some stones use abilities from HeroesExpansion");
|
||||||
|
stAbilities = config.getBoolean("StarTech Abilities", category, true, "Should the Power Stone use the abilities from the StarTech Power Stone if installed");
|
||||||
|
powerCooldown= config.getInt("Power Burst Cooldown", category, 100, 0, 1000, "How big long should the StarTech Power Stone burst cooldown be");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,8 @@ package anvil.infinity.items;
|
||||||
|
|
||||||
import anvil.infinity.abilities.AbilityHasPowerStone;
|
import anvil.infinity.abilities.AbilityHasPowerStone;
|
||||||
import anvil.infinity.abilities.AbilitySaturation;
|
import anvil.infinity.abilities.AbilitySaturation;
|
||||||
|
import anvil.infinity.compat.CompatHandler;
|
||||||
|
import anvil.infinity.config.ConfigHandler;
|
||||||
import lucraft.mods.lucraftcore.infinity.EnumInfinityStone;
|
import lucraft.mods.lucraftcore.infinity.EnumInfinityStone;
|
||||||
import lucraft.mods.lucraftcore.infinity.ModuleInfinity;
|
import lucraft.mods.lucraftcore.infinity.ModuleInfinity;
|
||||||
import lucraft.mods.lucraftcore.infinity.items.ItemInfinityStone;
|
import lucraft.mods.lucraftcore.infinity.items.ItemInfinityStone;
|
||||||
|
@ -41,6 +43,12 @@ public class ItemPowerStone extends ItemInfinityStone implements IAbilityProvide
|
||||||
abilities.put("damage", new AbilityPunch(entity).setDataValue(AbilityPunch.AMOUNT, Float.MAX_VALUE));
|
abilities.put("damage", new AbilityPunch(entity).setDataValue(AbilityPunch.AMOUNT, Float.MAX_VALUE));
|
||||||
abilities.put("resistance", new AbilityDamageResistance(entity).setDataValue(AbilityAttributeModifier.AMOUNT, Float.MAX_VALUE));
|
abilities.put("resistance", new AbilityDamageResistance(entity).setDataValue(AbilityAttributeModifier.AMOUNT, Float.MAX_VALUE));
|
||||||
abilities.put("saturation", new AbilitySaturation(entity));
|
abilities.put("saturation", new AbilitySaturation(entity));
|
||||||
|
if (CompatHandler.isStarTech && ConfigHandler.stAbilities) {
|
||||||
|
abilities.put("power_blat", CompatHandler.StarTech.getAbilityPowerBlast(entity).setMaxCooldown(ConfigHandler.powerCooldown));
|
||||||
|
abilities.put("power_impower", CompatHandler.StarTech.getAbilityPowerImpower(entity));
|
||||||
|
abilities.put("power_rocket_burst", CompatHandler.StarTech.getAbilityPowerRocketBurst(entity).setMaxCooldown(100));
|
||||||
|
abilities.put("power_tendrils", CompatHandler.StarTech.getAbilityTendrils(entity));
|
||||||
|
}
|
||||||
return super.addStoneAbilities(entity, abilities, context);
|
return super.addStoneAbilities(entity, abilities, context);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -55,6 +63,11 @@ public class ItemPowerStone extends ItemInfinityStone implements IAbilityProvide
|
||||||
abilities.put("strength", new AbilityStrength(entity).setDataValue(AbilityAttributeModifier.AMOUNT, Float.MAX_VALUE));
|
abilities.put("strength", new AbilityStrength(entity).setDataValue(AbilityAttributeModifier.AMOUNT, Float.MAX_VALUE));
|
||||||
abilities.put("damage", new AbilityPunch(entity).setDataValue(AbilityPunch.AMOUNT, Float.MAX_VALUE));
|
abilities.put("damage", new AbilityPunch(entity).setDataValue(AbilityPunch.AMOUNT, Float.MAX_VALUE));
|
||||||
abilities.put("resistance", new AbilityDamageResistance(entity).setDataValue(AbilityAttributeModifier.AMOUNT, Float.MAX_VALUE));
|
abilities.put("resistance", new AbilityDamageResistance(entity).setDataValue(AbilityAttributeModifier.AMOUNT, Float.MAX_VALUE));
|
||||||
|
if (CompatHandler.isStarTech && ConfigHandler.stAbilities) {
|
||||||
|
abilities.put("power_tendrils", CompatHandler.StarTech.getAbilityTendrils(entity));
|
||||||
|
abilities.put("power_cyclone", CompatHandler.StarTech.getAbilityCyclone(entity));
|
||||||
|
abilities.put("power_burnout", CompatHandler.StarTech.getAbilityBurnout(entity));
|
||||||
|
}
|
||||||
return abilities;
|
return abilities;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue