mirror of
https://github.com/GTNewHorizons/ForbiddenMagic.git
synced 2026-11-17 10:55:06 +00:00
Bugfixes and stuff
This commit is contained in:
1 parent
0f75db6587
commit
ffabe6945e
27 files changed
+1057
-349
No files matched your search
@@ -48,6 +48,7 @@ public class Config {
|
||||
public static boolean am2 = false;
|
||||
public static boolean tt = true;
|
||||
public static boolean tc = true;
|
||||
public static boolean special = true;
|
||||
|
||||
public static int wrathCost = 5;
|
||||
public static int wrathEff = 4;
|
||||
@@ -91,6 +92,7 @@ public class Config {
|
||||
am2 = conf.get("compatibility", "Ars Magica 2 Interaction", am2, "AM2 interaction is unsupported. Enable at your own risk.").getBoolean(false);
|
||||
tt = conf.get("compatibility", "Thaumic Tinkerer Interaction", tt).getBoolean(true);
|
||||
tc = conf.get("compatibility", "Tinkers Construct Interaction", tc).getBoolean(true);
|
||||
special = conf.get("compatibility", "Special Mobs Interaction", special).getBoolean(true);
|
||||
} catch (Exception e) {
|
||||
LogHandler.log(Level.ERROR, e, "Had a problem loading its configuration.");
|
||||
} finally {
|
||||
|
||||
@@ -19,7 +19,7 @@ public class WandOverlord implements IWandTriggerManager {
|
||||
}
|
||||
|
||||
public boolean hellfire(World world, ItemStack wand, EntityPlayer player, int x, int y, int z, int side) {
|
||||
if (world.isRemote || wand == null || !(wand.getItem() instanceof ItemWandCasting) || ((ItemWandCasting) wand.getItem()).getFocus(wand) != null || !ResearchManager.isResearchComplete(player.getCommandSenderName(), "HELLFIRE") || !player.canPlayerEdit(x, y, z, side, new ItemStack(Items.fire_charge)))
|
||||
if (world.isRemote || wand == null || !(wand.getItem() instanceof ItemWandCasting) || ((ItemWandCasting) wand.getItem()).getFocusItem(wand) != null || !ResearchManager.isResearchComplete(player.getCommandSenderName(), "HELLFIRE") || !player.canPlayerEdit(x, y, z, side, new ItemStack(Items.fire_charge)))
|
||||
return false;
|
||||
|
||||
if (world.isAirBlock(x, y + 1, z) && ((ItemWandCasting) wand.getItem()).consumeVis(wand, player, Aspect.FIRE, 2, false)) {
|
||||
|
||||
@@ -50,6 +50,8 @@ public class BlockWrathCage extends BlockContainer {
|
||||
NBTTagCompound nbttagcompound = held.getTagCompound();
|
||||
if (nbttagcompound == null)
|
||||
return false;
|
||||
if(!nbttagcompound.hasKey("mob"))
|
||||
return false;
|
||||
String string = nbttagcompound.getString("mob");
|
||||
if (string != null) {
|
||||
if (!world.isRemote) {
|
||||
|
||||
@@ -46,6 +46,7 @@ public class Compat {
|
||||
public static boolean am2 = false;
|
||||
public static boolean botan = false;
|
||||
public static boolean tc = false;
|
||||
public static boolean special = false;
|
||||
|
||||
public static void initiate() {
|
||||
if(!Config.crossMod)
|
||||
@@ -57,6 +58,7 @@ public class Compat {
|
||||
am2 = Config.am2 && Loader.isModLoaded("arsmagica2");
|
||||
botan = Config.botan && Loader.isModLoaded("Botania");
|
||||
tc = Config.tc && Loader.isModLoaded("TConstruct");
|
||||
special = Config.wrathCage && Config.special && Loader.isModLoaded("SpecialMobs");
|
||||
}
|
||||
|
||||
public static void compatify() {
|
||||
@@ -220,5 +222,102 @@ public class Compat {
|
||||
if (botan) {
|
||||
ForbiddenBotany.flowerPowerHippymancy();
|
||||
}
|
||||
|
||||
if(special){
|
||||
Config.spawnerMobs.put("SpecialMobs.SpecialCaveSpider", Aspect.POISON);
|
||||
Config.spawnerMobs.put("SpecialMobs.BabyCaveSpider", Aspect.POISON);
|
||||
Config.spawnerMobs.put("SpecialMobs.FlyingCaveSpider", Aspect.POISON);
|
||||
Config.spawnerMobs.put("SpecialMobs.MotherCaveSpider", Aspect.POISON);
|
||||
Config.spawnerMobs.put("SpecialMobs.ToughCaveSpider", Aspect.POISON);
|
||||
Config.spawnerMobs.put("SpecialMobs.WebCaveSpider", Aspect.POISON);
|
||||
Config.spawnerMobs.put("SpecialMobs.WitchCaveSpider", Aspect.POISON);
|
||||
|
||||
Config.spawnerMobs.put("SpecialMobs.SpecialCreeper", Aspect.FIRE);
|
||||
Config.spawnerMobs.put("SpecialMobs.ArmorCreeper", Aspect.FIRE);
|
||||
Config.spawnerMobs.put("SpecialMobs.DarkCreeper", Aspect.FIRE);
|
||||
Config.spawnerMobs.put("SpecialMobs.DeathCreeper", Aspect.FIRE);
|
||||
Config.spawnerMobs.put("SpecialMobs.DirtCreeper", Aspect.FIRE);
|
||||
Config.spawnerMobs.put("SpecialMobs.DoomCreeper", Aspect.FIRE);
|
||||
Config.spawnerMobs.put("SpecialMobs.DrowningCreeper", Aspect.FIRE);
|
||||
Config.spawnerMobs.put("SpecialMobs.EnderCreeper", Aspect.FIRE);
|
||||
Config.spawnerMobs.put("SpecialMobs.FireCreeper", Aspect.FIRE);
|
||||
Config.spawnerMobs.put("SpecialMobs.JumpingCreeper", Aspect.FIRE);
|
||||
Config.spawnerMobs.put("SpecialMobs.LightningCreeper", Aspect.FIRE);
|
||||
Config.spawnerMobs.put("SpecialMobs.MiniCreeper", Aspect.FIRE);
|
||||
Config.spawnerMobs.put("SpecialMobs.SplittingCreeper", Aspect.FIRE);
|
||||
|
||||
Config.spawnerMobs.put("SpecialMobs.SpecialEnderman", Aspect.ELDRITCH);
|
||||
Config.spawnerMobs.put("SpecialMobs.BlindingEnderman", Aspect.ELDRITCH);
|
||||
Config.spawnerMobs.put("SpecialMobs.CursedEnderman", Aspect.ELDRITCH);
|
||||
Config.spawnerMobs.put("SpecialMobs.IcyEnderman", Aspect.ELDRITCH);
|
||||
Config.spawnerMobs.put("SpecialMobs.LightningEnderman", Aspect.ELDRITCH);
|
||||
Config.spawnerMobs.put("SpecialMobs.MiniEnderman", Aspect.ELDRITCH);
|
||||
Config.spawnerMobs.put("SpecialMobs.MirageEnderman", Aspect.ELDRITCH);
|
||||
Config.spawnerMobs.put("SpecialMobs.ThiefEnderman", Aspect.ELDRITCH);
|
||||
|
||||
Config.spawnerMobs.put("SpecialMobs.SpecialGhast", DarkAspects.NETHER);
|
||||
Config.spawnerMobs.put("SpecialMobs.BabyGhast", DarkAspects.NETHER);
|
||||
Config.spawnerMobs.put("SpecialMobs.FaintGhast", DarkAspects.NETHER);
|
||||
Config.spawnerMobs.put("SpecialMobs.FighterGhast", DarkAspects.NETHER);
|
||||
Config.spawnerMobs.put("SpecialMobs.KingGhast", DarkAspects.NETHER);
|
||||
Config.spawnerMobs.put("SpecialMobs.MiniGhast", DarkAspects.NETHER);
|
||||
Config.spawnerMobs.put("SpecialMobs.QueenGhast", DarkAspects.NETHER);
|
||||
Config.spawnerMobs.put("SpecialMobs.UnholyGhast", DarkAspects.NETHER);
|
||||
|
||||
Config.spawnerMobs.put("SpecialMobs.SpecialPigZombie", Aspect.GREED);
|
||||
Config.spawnerMobs.put("SpecialMobs.BrutishPigZombie", Aspect.GREED);
|
||||
Config.spawnerMobs.put("SpecialMobs.FishingPigZombie", Aspect.GREED);
|
||||
Config.spawnerMobs.put("SpecialMobs.GiantPigZombie", Aspect.GREED);
|
||||
Config.spawnerMobs.put("SpecialMobs.HungryPigZombie", Aspect.GREED);
|
||||
Config.spawnerMobs.put("SpecialMobs.PlaguePigZombie", Aspect.GREED);
|
||||
Config.spawnerMobs.put("SpecialMobs.VampirePigZombie", Aspect.GREED);
|
||||
|
||||
Aspect silver;
|
||||
if(Config.silverfishEmeralds)
|
||||
silver = Aspect.GREED;
|
||||
else
|
||||
silver = Aspect.BEAST;
|
||||
|
||||
Config.spawnerMobs.put("SpecialMobs.SpecialSilverfish", silver);
|
||||
Config.spawnerMobs.put("SpecialMobs.BlindingSilverfish", silver);
|
||||
Config.spawnerMobs.put("SpecialMobs.FishingSilverfish", silver);
|
||||
Config.spawnerMobs.put("SpecialMobs.FlyingSilverfish", silver);
|
||||
Config.spawnerMobs.put("SpecialMobs.PoisonSilverfish", silver);
|
||||
Config.spawnerMobs.put("SpecialMobs.ToughSilverfish", silver);
|
||||
|
||||
Config.spawnerMobs.put("SpecialMobs.SpecialSkeleton", Aspect.DEATH);
|
||||
Config.spawnerMobs.put("SpecialMobs.BrutishSkeleton", Aspect.DEATH);
|
||||
Config.spawnerMobs.put("SpecialMobs.FireSkeleton", Aspect.DEATH);
|
||||
Config.spawnerMobs.put("SpecialMobs.GatlingSkeleton", Aspect.DEATH);
|
||||
Config.spawnerMobs.put("SpecialMobs.GiantSkeleton", Aspect.DEATH);
|
||||
Config.spawnerMobs.put("SpecialMobs.PoisonSkeleton", Aspect.DEATH);
|
||||
Config.spawnerMobs.put("SpecialMobs.SniperSkeleton", Aspect.DEATH);
|
||||
Config.spawnerMobs.put("SpecialMobs.SpitfireSkeleton", Aspect.DEATH);
|
||||
Config.spawnerMobs.put("SpecialMobs.ThiefSkeleton", Aspect.DEATH);
|
||||
|
||||
Config.spawnerMobs.put("SpecialMobs.SpecialSpider", Aspect.CLOTH);
|
||||
Config.spawnerMobs.put("SpecialMobs.BabySpider", Aspect.CLOTH);
|
||||
Config.spawnerMobs.put("SpecialMobs.DesertSpider", Aspect.CLOTH);
|
||||
Config.spawnerMobs.put("SpecialMobs.FlyingSpider", Aspect.CLOTH);
|
||||
Config.spawnerMobs.put("SpecialMobs.GhostSpider", Aspect.CLOTH);
|
||||
Config.spawnerMobs.put("SpecialMobs.GiantSpider", Aspect.CLOTH);
|
||||
Config.spawnerMobs.put("SpecialMobs.HungrySpider", Aspect.CLOTH);
|
||||
Config.spawnerMobs.put("SpecialMobs.MotherSpider", Aspect.CLOTH);
|
||||
Config.spawnerMobs.put("SpecialMobs.PaleSpider", Aspect.CLOTH);
|
||||
Config.spawnerMobs.put("SpecialMobs.PoisonSpider", Aspect.CLOTH);
|
||||
Config.spawnerMobs.put("SpecialMobs.SmallSpider", Aspect.CLOTH);
|
||||
Config.spawnerMobs.put("SpecialMobs.ToughSpider", Aspect.CLOTH);
|
||||
Config.spawnerMobs.put("SpecialMobs.WebSpider", Aspect.CLOTH);
|
||||
Config.spawnerMobs.put("SpecialMobs.WitchSpider", Aspect.CLOTH);
|
||||
|
||||
Config.spawnerMobs.put("SpecialMobs.SpecialZombie", Aspect.FLESH);
|
||||
Config.spawnerMobs.put("SpecialMobs.BrutishZombie", Aspect.FLESH);
|
||||
Config.spawnerMobs.put("SpecialMobs.FireZombie", Aspect.FLESH);
|
||||
Config.spawnerMobs.put("SpecialMobs.FishingZombie", Aspect.FLESH);
|
||||
Config.spawnerMobs.put("SpecialMobs.GiantZombie", Aspect.FLESH);
|
||||
Config.spawnerMobs.put("SpecialMobs.HungryZombie", Aspect.FLESH);
|
||||
Config.spawnerMobs.put("SpecialMobs.PlagueZombie", Aspect.FLESH);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -63,7 +63,8 @@ public class ItemDivineOrb extends Item implements IBloodOrb, IBindable, IWarpin
|
||||
return itemstack;
|
||||
}
|
||||
|
||||
player.setHealth(player.getHealth() - 1);
|
||||
if(!player.capabilities.isCreativeMode)
|
||||
player.setHealth(player.getHealth() - 1);
|
||||
SoulNetworkHandler.addCurrentEssenceToMaximum(itemTag.getString("ownerName"), 200, 700000000);
|
||||
|
||||
return itemstack;
|
||||
|
||||
@@ -34,13 +34,15 @@ public class ItemMobCrystal extends Item {
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean z) {
|
||||
if (stack.hasTagCompound()) {
|
||||
NBTTagCompound nbttagcompound = stack.getTagCompound();
|
||||
String string = nbttagcompound.getString("mob");
|
||||
if(nbttagcompound.hasKey("mob")) {
|
||||
String string = nbttagcompound.getString("mob");
|
||||
|
||||
if (string != null) {
|
||||
Aspect mobAspect = Config.spawnerMobs.get(string);
|
||||
if (mobAspect != null)
|
||||
list.add(mobAspect.getName());
|
||||
}
|
||||
if (string != null) {
|
||||
Aspect mobAspect = Config.spawnerMobs.get(string);
|
||||
if (mobAspect != null)
|
||||
list.add(mobAspect.getName());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,9 +74,7 @@ public class ItemMobCrystal extends Item {
|
||||
public IIcon getIconIndex(ItemStack stack) {
|
||||
if (stack.hasTagCompound()) {
|
||||
NBTTagCompound nbttagcompound = stack.getTagCompound();
|
||||
String string = nbttagcompound.getString("mob");
|
||||
|
||||
if (string != null)
|
||||
if (nbttagcompound.hasKey("mob"))
|
||||
return icons[1];
|
||||
}
|
||||
|
||||
@@ -98,10 +98,12 @@ public class ItemMobCrystal extends Item {
|
||||
public String getItemStackDisplayName(ItemStack stack) {
|
||||
if (stack.hasTagCompound()) {
|
||||
NBTTagCompound nbttagcompound = stack.getTagCompound();
|
||||
String string = nbttagcompound.getString("mob");
|
||||
if(nbttagcompound.hasKey("mob")) {
|
||||
String string = nbttagcompound.getString("mob");
|
||||
|
||||
if (string != null)
|
||||
return ("" + StatCollector.translateToLocal("entity." + string + ".name") + " " + StatCollector.translateToLocal("item.MobCrystal.name")).trim();
|
||||
if (string != null)
|
||||
return ("" + StatCollector.translateToLocal("entity." + string + ".name") + " " + StatCollector.translateToLocal("item.MobCrystal.name")).trim();
|
||||
}
|
||||
}
|
||||
|
||||
return ("" + StatCollector.translateToLocal("item.MobCrystalEmpty.name")).trim();
|
||||
|
||||
@@ -7,10 +7,12 @@ import fox.spiteful.forbidden.Forbidden;
|
||||
import fox.spiteful.forbidden.compat.Compat;
|
||||
import fox.spiteful.forbidden.potions.DarkPotions;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
@@ -111,10 +113,19 @@ public class ItemSubCollar extends ItemAmuletVis {
|
||||
baubles.setInventorySlotContents(0, itemstack.copy());
|
||||
itemstack.stackSize = 0;
|
||||
sub.addChatMessage(new ChatComponentText(player.getDisplayName() + " places a collar around your neck."));
|
||||
player.addChatMessage(new ChatComponentText("You place the collar around " + sub.getDisplayName() + "'s neck."));
|
||||
return true;
|
||||
}
|
||||
else
|
||||
player.addChatMessage(new ChatComponentText(sub.getDisplayName() + " is already wearing something around their neck!"));
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void getSubItems(Item item, CreativeTabs xCreativeTabs, List list) {
|
||||
list.add(new ItemStack(item, 1, 0));
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user