From 5a4bb6e8e81c0331521578f42886f8eb6916101a Mon Sep 17 00:00:00 2001 From: WayofTime Date: Fri, 7 Mar 2014 14:17:06 -0500 Subject: [PATCH] Fixed the GC issues --- .../alchemicalWizardry/AlchemicalWizardry.java | 9 +++++++++ .../common/items/SacrificialDagger.java | 5 ----- .../common/items/potion/AlchemyFlask.java | 1 + .../common/spell/complex/effect/SpellHelper.java | 10 ++++++---- 4 files changed, 16 insertions(+), 9 deletions(-) diff --git a/BM_src/WayofTime/alchemicalWizardry/AlchemicalWizardry.java b/BM_src/WayofTime/alchemicalWizardry/AlchemicalWizardry.java index cd8a55ac..657cabe9 100644 --- a/BM_src/WayofTime/alchemicalWizardry/AlchemicalWizardry.java +++ b/BM_src/WayofTime/alchemicalWizardry/AlchemicalWizardry.java @@ -145,6 +145,7 @@ public class AlchemicalWizardry public static boolean isThaumcraftLoaded; public static boolean isForestryLoaded; + public static boolean isGCLoaded; public static CreativeTabs tabBloodMagic = new CreativeTabs("tabBloodMagic") { @@ -958,5 +959,13 @@ public class AlchemicalWizardry { this.isForestryLoaded = false; } + + if(Loader.isModLoaded("GalacticraftCore")) + { + this.isGCLoaded = true; + }else + { + this.isGCLoaded = false; + } } } diff --git a/BM_src/WayofTime/alchemicalWizardry/common/items/SacrificialDagger.java b/BM_src/WayofTime/alchemicalWizardry/common/items/SacrificialDagger.java index 0e23d9f3..b693ffc0 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/items/SacrificialDagger.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/items/SacrificialDagger.java @@ -66,11 +66,6 @@ public class SacrificialDagger extends Item par2World.spawnParticle("reddust", posX + Math.random() - Math.random(), posY + Math.random() - Math.random(), posZ + Math.random() - Math.random(), f1, f2, f3); } - if (!par2World.isRemote && !(par3EntityPlayer.getClass().equals(EntityPlayerMP.class))) - { - return par1ItemStack; - } - findAndFillAltar(par2World, par3EntityPlayer, 200); if (par3EntityPlayer.getHealth() <= 0.5f) diff --git a/BM_src/WayofTime/alchemicalWizardry/common/items/potion/AlchemyFlask.java b/BM_src/WayofTime/alchemicalWizardry/common/items/potion/AlchemyFlask.java index 764b019d..6d6342d3 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/items/potion/AlchemyFlask.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/items/potion/AlchemyFlask.java @@ -39,6 +39,7 @@ public class AlchemyFlask extends Item super(id); this.setMaxDamage(8); this.setMaxStackSize(1); + setNoRepair(); setCreativeTab(AlchemicalWizardry.tabBloodMagic); // TODO Auto-generated constructor stub } diff --git a/BM_src/WayofTime/alchemicalWizardry/common/spell/complex/effect/SpellHelper.java b/BM_src/WayofTime/alchemicalWizardry/common/spell/complex/effect/SpellHelper.java index 9925e9d1..810acdeb 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/spell/complex/effect/SpellHelper.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/spell/complex/effect/SpellHelper.java @@ -3,6 +3,8 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect; import java.util.List; import java.util.Random; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import micdoodle8.mods.galacticraft.core.entities.player.GCCorePlayerMP; import net.minecraft.block.Block; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; @@ -116,13 +118,13 @@ public class SpellHelper return false; } - if(player instanceof FakePlayer) + if(player instanceof FakePlayer || player.username.contains("[CoFH]")) { return true; } - String str = player.getClass().getCanonicalName(); - if(str.contains("GCEntityPlayerMP")) + String str = player.getClass().getSimpleName(); + if(str.contains("GC")) { return false; } @@ -132,6 +134,6 @@ public class SpellHelper return false; } - return true; + return false; } }