From 4070e560d12faf0eddc357470d8918b16c7acb63 Mon Sep 17 00:00:00 2001 From: WayofTime Date: Sat, 26 Apr 2014 10:49:34 -0400 Subject: [PATCH] 1.0.2 push --- .../AlchemicalWizardry.java | 75 ++- .../BloodMagicConfiguration.java | 23 + .../alchemicalWizardry/ModItems.java | 2 +- .../client/ClientProxy.java | 3 + .../common/AlchemicalWizardryEventHooks.java | 16 +- .../CombinedPotionCreationHandler.java | 11 + .../CombinedPotionHandlerComponent.java | 52 ++ .../common/entity/mob/EntityFallenAngel.java | 1 + .../common/entity/mob/EntityTestDemon.java | 502 ++++++++++++++++++ .../entity/mob/ai/PathNavigateFlying.java | 18 + .../common/items/sigil/SigilOfGrowth.java | 12 +- .../common/items/sigil/SigilOfHolding.java | 4 + .../renderer/mob/RenderFallenAngel.java | 4 +- .../common/rituals/RitualEffectCrushing.java | 4 +- .../common/rituals/RitualEffectSoulBound.java | 2 +- .../common/summoning/SummoningHelperAW.java | 6 + .../container/ContainerWritingTable.java | 2 +- 17 files changed, 701 insertions(+), 36 deletions(-) create mode 100644 BM_src/WayofTime/alchemicalWizardry/common/alchemy/CombinedPotionCreationHandler.java create mode 100644 BM_src/WayofTime/alchemicalWizardry/common/alchemy/CombinedPotionHandlerComponent.java create mode 100644 BM_src/WayofTime/alchemicalWizardry/common/entity/mob/EntityTestDemon.java create mode 100644 BM_src/WayofTime/alchemicalWizardry/common/entity/mob/ai/PathNavigateFlying.java diff --git a/BM_src/WayofTime/alchemicalWizardry/AlchemicalWizardry.java b/BM_src/WayofTime/alchemicalWizardry/AlchemicalWizardry.java index feb5484e..c8517d60 100644 --- a/BM_src/WayofTime/alchemicalWizardry/AlchemicalWizardry.java +++ b/BM_src/WayofTime/alchemicalWizardry/AlchemicalWizardry.java @@ -3,7 +3,6 @@ package WayofTime.alchemicalWizardry; import java.io.File; import java.lang.reflect.Field; import java.lang.reflect.Modifier; -import java.util.ArrayList; import net.minecraft.block.Block; import net.minecraft.creativetab.CreativeTabs; @@ -25,7 +24,6 @@ import WayofTime.alchemicalWizardry.api.alchemy.AlchemicalPotionCreationHandler; import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry; import WayofTime.alchemicalWizardry.api.altarRecipeRegistry.AltarRecipeRegistry; import WayofTime.alchemicalWizardry.api.bindingRegistry.BindingRegistry; -import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; import WayofTime.alchemicalWizardry.api.rituals.Rituals; import WayofTime.alchemicalWizardry.api.summoningRegistry.SummoningRegistry; import WayofTime.alchemicalWizardry.common.AlchemicalWizardryEventHooks; @@ -60,6 +58,7 @@ import WayofTime.alchemicalWizardry.common.entity.mob.EntityLowerGuardian; import WayofTime.alchemicalWizardry.common.entity.mob.EntityShade; import WayofTime.alchemicalWizardry.common.entity.mob.EntityShadeElemental; import WayofTime.alchemicalWizardry.common.entity.mob.EntitySmallEarthGolem; +import WayofTime.alchemicalWizardry.common.entity.mob.EntityTestDemon; import WayofTime.alchemicalWizardry.common.entity.mob.EntityWaterElemental; import WayofTime.alchemicalWizardry.common.entity.mob.EntityWingedFireDemon; import WayofTime.alchemicalWizardry.common.items.ItemBloodRuneBlock; @@ -151,6 +150,29 @@ public class AlchemicalWizardry public static String[] netherStarMeteorArray; public static int netherStarMeteorRadius; + public static boolean regenerationAllowed; + public static boolean nightVisionAllowed; + public static boolean fireResistanceAllowed; + public static boolean waterBreathingAllowed; + public static boolean moveSpeedAllowed; + public static boolean healAllowed; + public static boolean poisonAllowed; + public static boolean weaknessAllowed; + public static boolean damageBoostAllowed; + public static boolean jumpAllowed; + public static boolean moveSlowdownAllowed; + public static boolean digSpeedAllowed; + public static boolean drowningAllowed; + public static boolean invisibilityAllowed; + public static boolean resistanceAllowed; + public static boolean saturationAllowed; + public static boolean healthBoostAllowed; + public static boolean absorptionAllowed; + public static boolean boostAllowed; + public static boolean flightAllowed; + public static boolean reciprocationAllowed; + public static boolean planarBindingAllowed; + public static String[] allowedCrushedOresArray; public static Potion customPotionDrowning; @@ -218,6 +240,7 @@ public class AlchemicalWizardry public static int entityFireElementalID = 31; public static int entityShadeElementalID = 32; public static int entityHolyElementalID = 33; + public static int entityTestDemonID = 34; public static Item bucketLife; public static Fluid lifeEssenceFluid; @@ -955,6 +978,8 @@ public class AlchemicalWizardry SummoningRegistry.registerSummon(new SummoningHelperAW(this.entityFireElementalID), new ItemStack[]{incendiumStack, incendiumStack, incendiumStack, incendiumStack, incendiumStack, incendiumStack}, new ItemStack[]{}, new ItemStack[]{}, 0, 4); //TODO SummoningRegistry.registerSummon(new SummoningHelperAW(this.entityShadeElementalID), new ItemStack[]{tennebraeStack,tennebraeStack,tennebraeStack,tennebraeStack,tennebraeStack,tennebraeStack}, new ItemStack[]{}, new ItemStack[]{}, 0, 4); SummoningRegistry.registerSummon(new SummoningHelperAW(this.entityHolyElementalID), new ItemStack[]{sanctusStack, sanctusStack, sanctusStack, sanctusStack, sanctusStack, sanctusStack}, new ItemStack[]{}, new ItemStack[]{}, 0, 4); + SummoningRegistry.registerSummon(new SummoningHelperAW(this.entityTestDemonID), new ItemStack[]{stoneStack,stoneStack,stoneStack,stoneStack,stoneStack,stoneStack}, new ItemStack[]{}, new ItemStack[]{}, 0, 4); + //Custom mobs EntityRegistry.registerModEntity(EntityFallenAngel.class, "FallenAngel", this.entityFallenAngelID, this, 80, 3, true); EntityRegistry.registerModEntity(EntityLowerGuardian.class, "LowerGuardian", this.entityLowerGuardianID, this, 80, 3, true); @@ -970,6 +995,7 @@ public class AlchemicalWizardry EntityRegistry.registerModEntity(EntityFireElemental.class, "FireElemental", this.entityFireElementalID, this, 120, 3, true); EntityRegistry.registerModEntity(EntityShadeElemental.class, "ShadeElemental", this.entityShadeElementalID, this, 120, 3, true); EntityRegistry.registerModEntity(EntityHolyElemental.class, "HolyElemental", this.entityHolyElementalID, this, 120, 3, true); + EntityRegistry.registerModEntity(EntityTestDemon.class, "TestDemon", this.entityTestDemonID, this, 120, 3, true); //EntityRegistry.addSpawn(EntityFallenAngel.class, 5, 1, 5, EnumCreatureType.creature, BiomeGenBase.biomeList); LanguageRegistry.instance().addStringLocalization("entity.AlchemicalWizardry.FallenAngel.name", "en_US", "Fallen Angel"); LanguageRegistry.instance().addStringLocalization("entity.AlchemicalWizardry.LowerGuardian.name", "en_US", "Lower Stone Guardian"); @@ -1222,29 +1248,28 @@ public class AlchemicalWizardry public static void initAlchemyPotionRecipes() { - AlchemicalPotionCreationHandler.addPotion(new ItemStack(Item.ghastTear), Potion.regeneration.id, 450); - AlchemicalPotionCreationHandler.addPotion(new ItemStack(Item.goldenCarrot), Potion.nightVision.id, 2 * 60 * 20); - AlchemicalPotionCreationHandler.addPotion(new ItemStack(Item.magmaCream), Potion.fireResistance.id, 2 * 60 * 20); - AlchemicalPotionCreationHandler.addPotion(new ItemStack(Item.bucketWater), Potion.waterBreathing.id, 2 * 60 * 20); - AlchemicalPotionCreationHandler.addPotion(new ItemStack(Item.sugar), Potion.moveSpeed.id, 2 * 60 * 20); - AlchemicalPotionCreationHandler.addPotion(new ItemStack(Item.speckledMelon), Potion.heal.id, 2 * 60 * 20); - AlchemicalPotionCreationHandler.addPotion(new ItemStack(Item.spiderEye), Potion.poison.id, 450); - AlchemicalPotionCreationHandler.addPotion(new ItemStack(Item.fermentedSpiderEye), Potion.weakness.id, 450); - AlchemicalPotionCreationHandler.addPotion(new ItemStack(Item.blazePowder), Potion.damageBoost.id, 2 * 60 * 20); - AlchemicalPotionCreationHandler.addPotion(new ItemStack(ModItems.aether), Potion.jump.id, 2 * 60 * 20); - AlchemicalPotionCreationHandler.addPotion(new ItemStack(Item.clay), Potion.moveSlowdown.id, 450); - AlchemicalPotionCreationHandler.addPotion(new ItemStack(Item.redstone), Potion.digSpeed.id, 2 * 60 * 20); - AlchemicalPotionCreationHandler.addPotion(new ItemStack(Item.potion, 1, 0), AlchemicalWizardry.customPotionDrowning.id, 450); - //AlchemicalPotionCreationHandler.addPotion(new ItemStack(Item.goldenCarrot),Potion.nightVision.id,2*60*20); - AlchemicalPotionCreationHandler.addPotion(new ItemStack(Item.glassBottle), Potion.invisibility.id, 2 * 60 * 20); - AlchemicalPotionCreationHandler.addPotion(new ItemStack(Item.diamond), Potion.resistance.id, 2 * 60 * 20); - AlchemicalPotionCreationHandler.addPotion(new ItemStack(Item.poisonousPotato), Potion.field_76443_y.id, 2); //saturation - AlchemicalPotionCreationHandler.addPotion(new ItemStack(ModItems.demonBloodShard), Potion.field_76434_w.id, 4 * 60 * 20); //health boost - AlchemicalPotionCreationHandler.addPotion(new ItemStack(ModItems.weakBloodShard), Potion.field_76444_x.id, 4 * 60 * 20); //Absorption - AlchemicalPotionCreationHandler.addPotion(new ItemStack(ModItems.terrae), AlchemicalWizardry.customPotionBoost.id, 1 * 60 * 20); - AlchemicalPotionCreationHandler.addPotion(new ItemStack(Item.feather), AlchemicalWizardry.customPotionFlight.id, 1 * 60 * 20); - AlchemicalPotionCreationHandler.addPotion(new ItemStack(Item.arrow), AlchemicalWizardry.customPotionReciprocation.id, 1 * 60 * 20); - AlchemicalPotionCreationHandler.addPotion(new ItemStack(Item.enderPearl),AlchemicalWizardry.customPotionPlanarBinding.id,1*60*20); + if(regenerationAllowed)AlchemicalPotionCreationHandler.addPotion(new ItemStack(Item.ghastTear), Potion.regeneration.id, 450); + if(nightVisionAllowed)AlchemicalPotionCreationHandler.addPotion(new ItemStack(Item.goldenCarrot), Potion.nightVision.id, 2 * 60 * 20); + if(fireResistanceAllowed)AlchemicalPotionCreationHandler.addPotion(new ItemStack(Item.magmaCream), Potion.fireResistance.id, 2 * 60 * 20); + if(waterBreathingAllowed)AlchemicalPotionCreationHandler.addPotion(new ItemStack(Item.bucketWater), Potion.waterBreathing.id, 2 * 60 * 20); + if(moveSpeedAllowed)AlchemicalPotionCreationHandler.addPotion(new ItemStack(Item.sugar), Potion.moveSpeed.id, 2 * 60 * 20); + if(healAllowed)AlchemicalPotionCreationHandler.addPotion(new ItemStack(Item.speckledMelon), Potion.heal.id, 2 * 60 * 20); + if(poisonAllowed)AlchemicalPotionCreationHandler.addPotion(new ItemStack(Item.spiderEye), Potion.poison.id, 450); + if(weaknessAllowed)AlchemicalPotionCreationHandler.addPotion(new ItemStack(Item.fermentedSpiderEye), Potion.weakness.id, 450); + if(damageBoostAllowed)AlchemicalPotionCreationHandler.addPotion(new ItemStack(Item.blazePowder), Potion.damageBoost.id, 2 * 60 * 20); + if(jumpAllowed)AlchemicalPotionCreationHandler.addPotion(new ItemStack(ModItems.aether), Potion.jump.id, 2 * 60 * 20); + if(moveSlowdownAllowed)AlchemicalPotionCreationHandler.addPotion(new ItemStack(Item.clay), Potion.moveSlowdown.id, 450); + if(digSpeedAllowed)AlchemicalPotionCreationHandler.addPotion(new ItemStack(Item.redstone), Potion.digSpeed.id, 2 * 60 * 20); + if(drowningAllowed)AlchemicalPotionCreationHandler.addPotion(new ItemStack(Item.potion, 1, 0), AlchemicalWizardry.customPotionDrowning.id, 450); + if(invisibilityAllowed)AlchemicalPotionCreationHandler.addPotion(new ItemStack(Item.glassBottle), Potion.invisibility.id, 2 * 60 * 20); + if(resistanceAllowed)AlchemicalPotionCreationHandler.addPotion(new ItemStack(Item.diamond), Potion.resistance.id, 2 * 60 * 20); + if(saturationAllowed)AlchemicalPotionCreationHandler.addPotion(new ItemStack(Item.poisonousPotato), Potion.field_76443_y.id, 2); //saturation + if(healthBoostAllowed)AlchemicalPotionCreationHandler.addPotion(new ItemStack(ModItems.demonBloodShard), Potion.field_76434_w.id, 4 * 60 * 20); //health boost + if(absorptionAllowed)AlchemicalPotionCreationHandler.addPotion(new ItemStack(ModItems.weakBloodShard), Potion.field_76444_x.id, 4 * 60 * 20); //Absorption + if(boostAllowed)AlchemicalPotionCreationHandler.addPotion(new ItemStack(ModItems.terrae), AlchemicalWizardry.customPotionBoost.id, 1 * 60 * 20); + if(flightAllowed)AlchemicalPotionCreationHandler.addPotion(new ItemStack(Item.feather), AlchemicalWizardry.customPotionFlight.id, 1 * 60 * 20); + if(reciprocationAllowed)AlchemicalPotionCreationHandler.addPotion(new ItemStack(Item.arrow), AlchemicalWizardry.customPotionReciprocation.id, 1 * 60 * 20); + if(planarBindingAllowed)AlchemicalPotionCreationHandler.addPotion(new ItemStack(Item.enderPearl),AlchemicalWizardry.customPotionPlanarBinding.id,1*60*20); } public static void initAltarRecipes() diff --git a/BM_src/WayofTime/alchemicalWizardry/BloodMagicConfiguration.java b/BM_src/WayofTime/alchemicalWizardry/BloodMagicConfiguration.java index 604df182..b6c3f8b7 100644 --- a/BM_src/WayofTime/alchemicalWizardry/BloodMagicConfiguration.java +++ b/BM_src/WayofTime/alchemicalWizardry/BloodMagicConfiguration.java @@ -50,6 +50,29 @@ public class BloodMagicConfiguration AlchemicalWizardry.customPotionFireFuseID = config.get("Potion ID","FireFuse",109).getInt(); AlchemicalWizardry.customPotionPlanarBindingID = config.get("Potion ID","PlanarBinding",110).getInt(); + AlchemicalWizardry.regenerationAllowed = config.get("AlchemyPotionRegistry", "regeneration", true).getBoolean(true); + AlchemicalWizardry.nightVisionAllowed = config.get("AlchemyPotionRegistry", "nightVision", true).getBoolean(true); + AlchemicalWizardry.fireResistanceAllowed = config.get("AlchemyPotionRegistry", "fireResistance", true).getBoolean(true); + AlchemicalWizardry.waterBreathingAllowed = config.get("AlchemyPotionRegistry", "waterBreathing", true).getBoolean(true); + AlchemicalWizardry.moveSpeedAllowed = config.get("AlchemyPotionRegistry", "moveSpeed", true).getBoolean(true); + AlchemicalWizardry.healAllowed = config.get("AlchemyPotionRegistry", "heal", true).getBoolean(true); + AlchemicalWizardry.poisonAllowed = config.get("AlchemyPotionRegistry", "poison", true).getBoolean(true); + AlchemicalWizardry.weaknessAllowed = config.get("AlchemyPotionRegistry", "weakness", true).getBoolean(true); + AlchemicalWizardry.damageBoostAllowed = config.get("AlchemyPotionRegistry", "damageBoost", true).getBoolean(true); + AlchemicalWizardry.jumpAllowed = config.get("AlchemyPotionRegistry", "jump", true).getBoolean(true); + AlchemicalWizardry.moveSlowdownAllowed = config.get("AlchemyPotionRegistry", "moveSlowdown", true).getBoolean(true); + AlchemicalWizardry.digSpeedAllowed = config.get("AlchemyPotionRegistry", "digSpeed", true).getBoolean(true); + AlchemicalWizardry.drowningAllowed = config.get("AlchemyPotionRegistry", "drowning", true).getBoolean(true); + AlchemicalWizardry.invisibilityAllowed = config.get("AlchemyPotionRegistry", "invisibility", true).getBoolean(true); + AlchemicalWizardry.resistanceAllowed = config.get("AlchemyPotionRegistry", "resistance", true).getBoolean(true); + AlchemicalWizardry.saturationAllowed = config.get("AlchemyPotionRegistry", "saturation", true).getBoolean(true); + AlchemicalWizardry.healthBoostAllowed = config.get("AlchemyPotionRegistry", "healthBoost", true).getBoolean(true); + AlchemicalWizardry.absorptionAllowed = config.get("AlchemyPotionRegistry", "absorption", true).getBoolean(true); + AlchemicalWizardry.boostAllowed = config.get("AlchemyPotionRegistry", "boost", true).getBoolean(true); + AlchemicalWizardry.flightAllowed = config.get("AlchemyPotionRegistry", "flight", true).getBoolean(true); + AlchemicalWizardry.reciprocationAllowed = config.get("AlchemyPotionRegistry", "reciprocation", true).getBoolean(true); + AlchemicalWizardry.planarBindingAllowed = config.get("AlchemyPotionRegistry", "planarBinding", true).getBoolean(true); + MeteorParadigm.maxChance = config.get("meteor", "maxChance", 1000).getInt(); AlchemicalWizardry.doMeteorsDestroyBlocks = config.get("meteor", "doMeteorsDestroyBlocks", true).getBoolean(true); AlchemicalWizardry.diamondMeteorArray = config.get("meteor", "diamondMeteor", new String[]{"oreDiamond", "100", "oreEmerald", "75", "oreCinnabar", "200", "oreAmber", "200"}).getStringList(); diff --git a/BM_src/WayofTime/alchemicalWizardry/ModItems.java b/BM_src/WayofTime/alchemicalWizardry/ModItems.java index 3a4aaa8b..97d0a76b 100644 --- a/BM_src/WayofTime/alchemicalWizardry/ModItems.java +++ b/BM_src/WayofTime/alchemicalWizardry/ModItems.java @@ -253,6 +253,6 @@ public class ModItems baseItems = new ItemComponents(AlchemicalWizardry.baseComponentsItemID).setUnlocalizedName("baseItems"); baseAlchemyItems = new ItemAlchemyBase(AlchemicalWizardry.baseAlchemyComponentsItemID).setUnlocalizedName("baseAlchemyItems"); itemSigilOfSupression = new ItemSigilOfSupression(AlchemicalWizardry.itemSigilOfSupressionItemID).setUnlocalizedName("itemSigilOfSupression"); - itemBloodBook = new ItemBloodArchives(AlchemicalWizardry.itemBloodBookItemID).setUnlocalizedName("bloodanomicon"); + //itemBloodBook = new ItemBloodArchives(AlchemicalWizardry.itemBloodBookItemID).setUnlocalizedName("bloodanomicon"); } } diff --git a/BM_src/WayofTime/alchemicalWizardry/client/ClientProxy.java b/BM_src/WayofTime/alchemicalWizardry/client/ClientProxy.java index e7b6c6c0..e4002c32 100644 --- a/BM_src/WayofTime/alchemicalWizardry/client/ClientProxy.java +++ b/BM_src/WayofTime/alchemicalWizardry/client/ClientProxy.java @@ -43,6 +43,7 @@ import WayofTime.alchemicalWizardry.common.entity.mob.EntityLowerGuardian; import WayofTime.alchemicalWizardry.common.entity.mob.EntityShade; import WayofTime.alchemicalWizardry.common.entity.mob.EntityShadeElemental; import WayofTime.alchemicalWizardry.common.entity.mob.EntitySmallEarthGolem; +import WayofTime.alchemicalWizardry.common.entity.mob.EntityTestDemon; import WayofTime.alchemicalWizardry.common.entity.mob.EntityWaterElemental; import WayofTime.alchemicalWizardry.common.entity.mob.EntityWingedFireDemon; import WayofTime.alchemicalWizardry.common.entity.projectile.EnergyBlastProjectile; @@ -144,6 +145,8 @@ public class ClientProxy extends CommonProxy RenderingRegistry.registerEntityRenderingHandler(EntityShadeElemental.class, new RenderElemental(new ModelElemental(), 0.5F)); //EntityRegistry.registerGlobalEntityID(EntityHolyElemental.class, "AlchemicalWizardry.HolyElemental", EntityRegistry.findGlobalUniqueEntityId(),0x40FF00, 0x0B610B); RenderingRegistry.registerEntityRenderingHandler(EntityHolyElemental.class, new RenderElemental(new ModelElemental(), 0.5F)); + RenderingRegistry.registerEntityRenderingHandler(EntityTestDemon.class, new RenderFallenAngel(new ModelFallenAngel(), 0.5F)); + ClientRegistry.bindTileEntitySpecialRenderer(TEPedestal.class, new RenderPedestal()); ClientRegistry.bindTileEntitySpecialRenderer(TEPlinth.class, new RenderPlinth()); ClientRegistry.bindTileEntitySpecialRenderer(TEWritingTable.class, new RenderWritingTable()); diff --git a/BM_src/WayofTime/alchemicalWizardry/common/AlchemicalWizardryEventHooks.java b/BM_src/WayofTime/alchemicalWizardry/common/AlchemicalWizardryEventHooks.java index ccb57bea..fd01570b 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/AlchemicalWizardryEventHooks.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/AlchemicalWizardryEventHooks.java @@ -7,9 +7,9 @@ import java.util.List; import java.util.Map; import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLiving; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.IProjectile; +import net.minecraft.entity.monster.EntityZombie; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.projectile.EntityArrow; import net.minecraft.potion.Potion; @@ -24,8 +24,6 @@ import net.minecraftforge.event.entity.living.LivingEvent.LivingUpdateEvent; import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.common.entity.projectile.EnergyBlastProjectile; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar; -import cpw.mods.fml.common.network.PacketDispatcher; public class AlchemicalWizardryEventHooks { @@ -162,6 +160,18 @@ public class AlchemicalWizardryEventHooks if (event.entityLiving.isPotionActive(AlchemicalWizardry.customPotionBoost)) { int i = event.entityLiving.getActivePotionEffect(AlchemicalWizardry.customPotionBoost).getAmplifier(); + + //Testing code + List entities = SpellHelper.getEntitiesInRange(event.entity.worldObj, xPos, yPos, zPos, 10, 10); + for(Entity entity : entities) + { + if(entity instanceof EntityZombie) + { + ((EntityZombie) entity).setAttackTarget(null); + } + } + // + EntityLivingBase entity = event.entityLiving; //if(!entity.isSneaking()) { diff --git a/BM_src/WayofTime/alchemicalWizardry/common/alchemy/CombinedPotionCreationHandler.java b/BM_src/WayofTime/alchemicalWizardry/common/alchemy/CombinedPotionCreationHandler.java new file mode 100644 index 00000000..a84852bc --- /dev/null +++ b/BM_src/WayofTime/alchemicalWizardry/common/alchemy/CombinedPotionCreationHandler.java @@ -0,0 +1,11 @@ +package WayofTime.alchemicalWizardry.common.alchemy; + +import net.minecraft.item.ItemStack; + +public class CombinedPotionCreationHandler +{ + public static void getPotionPotionIDForFlask(ItemStack flaskStack) + { + + } +} diff --git a/BM_src/WayofTime/alchemicalWizardry/common/alchemy/CombinedPotionHandlerComponent.java b/BM_src/WayofTime/alchemicalWizardry/common/alchemy/CombinedPotionHandlerComponent.java new file mode 100644 index 00000000..c97be872 --- /dev/null +++ b/BM_src/WayofTime/alchemicalWizardry/common/alchemy/CombinedPotionHandlerComponent.java @@ -0,0 +1,52 @@ +package WayofTime.alchemicalWizardry.common.alchemy; + +import java.util.ArrayList; + +import net.minecraft.item.ItemStack; +import WayofTime.alchemicalWizardry.api.alchemy.AlchemyPotionHelper; +import WayofTime.alchemicalWizardry.common.items.potion.AlchemyFlask; + +public class CombinedPotionHandlerComponent +{ + private int potionID; + private int req1; + private int req2; + private int tickDuration; + + public CombinedPotionHandlerComponent(int potionID, int req1, int req2, int tickDuration) + { + this.potionID = potionID; + this.req1 = req1; + this.req2 = req2; + this.tickDuration = tickDuration; + } + + public boolean doesFlaskContentsMatch(ItemStack flaskStack) + { + ArrayList list = AlchemyFlask.getEffects(flaskStack); + + boolean bool1 = false; + boolean bool2 = false; + + if (list != null) + { + for (AlchemyPotionHelper aph : list) + { + if (aph.getPotionID() == req1) + { + bool1 = true; + } + if (aph.getPotionID() == req2) + { + bool2 = true; + } + if(bool1&&bool2) + { + return true; + } + } + } + + return false; + } +} diff --git a/BM_src/WayofTime/alchemicalWizardry/common/entity/mob/EntityFallenAngel.java b/BM_src/WayofTime/alchemicalWizardry/common/entity/mob/EntityFallenAngel.java index ea33d5b3..9987e866 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/entity/mob/EntityFallenAngel.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/entity/mob/EntityFallenAngel.java @@ -211,6 +211,7 @@ public class EntityFallenAngel extends EntityDemon implements IRangedAttackMob, public void onUpdate() { super.onUpdate(); + this.onGround = false; } public float getEyeHeight() diff --git a/BM_src/WayofTime/alchemicalWizardry/common/entity/mob/EntityTestDemon.java b/BM_src/WayofTime/alchemicalWizardry/common/entity/mob/EntityTestDemon.java new file mode 100644 index 00000000..77a29d97 --- /dev/null +++ b/BM_src/WayofTime/alchemicalWizardry/common/entity/mob/EntityTestDemon.java @@ -0,0 +1,502 @@ +package WayofTime.alchemicalWizardry.common.entity.mob; + +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.ModItems; +import WayofTime.alchemicalWizardry.common.EntityAITargetAggro; +import WayofTime.alchemicalWizardry.common.entity.projectile.HolyProjectile; +import cpw.mods.fml.common.network.Player; +import net.minecraft.block.BlockColored; +import net.minecraft.entity.*; +import net.minecraft.entity.ai.*; +import net.minecraft.entity.monster.EntityCreeper; +import net.minecraft.entity.monster.EntityGhast; +import net.minecraft.entity.passive.EntityAnimal; +import net.minecraft.entity.passive.EntityHorse; +import net.minecraft.entity.passive.EntityWolf; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.projectile.EntityArrow; +import net.minecraft.item.Item; +import net.minecraft.item.ItemFood; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.pathfinding.PathEntity; +import net.minecraft.util.DamageSource; +import net.minecraft.world.World; + +public class EntityTestDemon extends EntityDemon implements IRangedAttackMob, Player +{ + private EntityAIArrowAttack aiArrowAttack = new EntityAIArrowAttack(this, 1.0D, 40, 40, 15.0F); + private EntityAIAttackOnCollide aiAttackOnCollide = new EntityAIAttackOnCollide(this, EntityPlayer.class, 1.2D, false); + + private static float maxTamedHealth = 50.0F; + private static float maxUntamedHealth = 50.0F; + + public EntityTestDemon(World par1World) + { + super(par1World, AlchemicalWizardry.entityFallenAngelID); + this.setSize(0.7F, 1.8F); + this.getNavigator().setAvoidsWater(true); + this.tasks.addTask(1, new EntityAISwimming(this)); + this.tasks.addTask(2, this.aiSit); + //this.tasks.addTask(3, new EntityAILeapAtTarget(this, 0.4F)); + //this.tasks.addTask(4, new EntityAIAttackOnCollide(this, 1.0D, true)); + this.tasks.addTask(5, new EntityAIFollowOwner(this, 1.0D, 10.0F, 2.0F)); + //this.tasks.addTask(6, new EntityAIMate(this, 1.0D)); + this.tasks.addTask(7, new EntityAIWander(this, 1.0D)); + //this.tasks.addTask(8, new EntityAIBeg(this, 8.0F)); + this.tasks.addTask(9, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F)); + this.tasks.addTask(9, new EntityAILookIdle(this)); + this.targetTasks.addTask(1, new EntityAIOwnerHurtByTarget(this)); + this.targetTasks.addTask(2, new EntityAIOwnerHurtTarget(this)); + this.targetTasks.addTask(3, new EntityAIHurtByTarget(this, true)); + this.targetTasks.addTask(4, new EntityAITargetAggro(this, EntityPlayer.class, 0, false)); + this.setAggro(false); + //this.targetTasks.addTask(4, new EntityAITargetNonTamed(this, EntitySheep.class, 200, false)); + this.setTamed(false); + + if (par1World != null && !par1World.isRemote) + { + this.setCombatTask(); + } + + //this.isImmuneToFire = true; + } + + @Override + protected void applyEntityAttributes() + { + super.applyEntityAttributes(); + //This line affects the speed of the monster + this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setAttribute(0.30000001192092896D); + + //My guess is that this will alter the max health + if (this.isTamed()) + { + this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setAttribute(this.maxTamedHealth); + } else + { + this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setAttribute(this.maxUntamedHealth); + } + + //this.func_110148_a(SharedMonsterAttributes.field_111267_a).func_111128_a(10.0D); + } + + /** + * Returns true if the newer Entity AI code should be run + */ + public boolean isAIEnabled() + { + return true; + } + + /** + * Sets the active target the Task system uses for tracking + */ + public void setAttackTarget(EntityLivingBase par1EntityLivingBase) + { + super.setAttackTarget(par1EntityLivingBase); + + if (par1EntityLivingBase == null) + { + this.setAngry(false); + } else if (!this.isTamed()) + { + this.setAngry(true); + } + } + + /** + * main AI tick function, replaces updateEntityActionState + */ + protected void updateAITick() + { + this.dataWatcher.updateObject(18, Float.valueOf(this.getHealth())); + } + + protected void entityInit() + { + super.entityInit(); + this.dataWatcher.addObject(18, new Float(this.getHealth())); + this.dataWatcher.addObject(19, new Byte((byte) 0)); + this.dataWatcher.addObject(20, new Byte((byte) BlockColored.getBlockFromDye(1))); + } + + /** + * Plays step sound at given x, y, z for the entity + */ + protected void playStepSound(int par1, int par2, int par3, int par4) + { + this.playSound("mob.zombie.step", 0.15F, 1.0F); + } + + /** + * (abstract) Protected helper method to write subclass entity data to NBT. + */ + public void writeEntityToNBT(NBTTagCompound par1NBTTagCompound) + { + super.writeEntityToNBT(par1NBTTagCompound); + par1NBTTagCompound.setBoolean("Angry", this.isAngry()); + par1NBTTagCompound.setByte("CollarColor", (byte) this.getCollarColor()); + } + + /** + * (abstract) Protected helper method to read subclass entity data from NBT. + */ + public void readEntityFromNBT(NBTTagCompound par1NBTTagCompound) + { + super.readEntityFromNBT(par1NBTTagCompound); + this.setAngry(par1NBTTagCompound.getBoolean("Angry")); + + if (par1NBTTagCompound.hasKey("CollarColor")) + { + this.setCollarColor(par1NBTTagCompound.getByte("CollarColor")); + } + + this.setCombatTask(); + } + + /** + * Returns the sound this mob makes while it's alive. + */ + protected String getLivingSound() + { + //TODO change sounds + return "none"; + } + + /** + * Returns the sound this mob makes when it is hurt. + */ + protected String getHurtSound() + { + return "none"; + } + + /** + * Returns the sound this mob makes on death. + */ + protected String getDeathSound() + { + return "mob.wolf.death"; + } + + /** + * Returns the volume for the sounds this mob makes. + */ + protected float getSoundVolume() + { + return 0.4F; + } + + /** + * Returns the item ID for the item the mob drops on death. + */ + protected int getDropItemId() + { + return -1; + } + + /** + * Called frequently so the entity can update its state every tick as required. For example, zombies and skeletons + * use this to react to sunlight and start to burn. + */ + public void onLivingUpdate() + { + super.onLivingUpdate(); + } + + /** + * Called to update the entity's position/logic. + */ + public void onUpdate() + { + super.onUpdate(); + } + + public float getEyeHeight() + { + return this.height * 0.8F; + } + + /** + * The speed it takes to move the entityliving's rotationPitch through the faceEntity method. This is only currently + * use in wolves. + */ + public int getVerticalFaceSpeed() + { + return this.isSitting() ? 20 : super.getVerticalFaceSpeed(); + } + + /** + * Called when the entity is attacked. + */ + public boolean attackEntityFrom(DamageSource par1DamageSource, float par2) + { + if (this.isEntityInvulnerable()) + { + return false; + } else + { + Entity entity = par1DamageSource.getEntity(); + this.aiSit.setSitting(false); + + if (entity != null && !(entity instanceof EntityPlayer) && !(entity instanceof EntityArrow)) + { + par2 = (par2 + 1.0F) / 2.0F; + } + + return super.attackEntityFrom(par1DamageSource, par2); + } + } + + public boolean attackEntityAsMob(Entity par1Entity) + { + int i = this.isTamed() ? 4 : 2; + return par1Entity.attackEntityFrom(DamageSource.causeMobDamage(this), (float) i); + } + + public void setTamed(boolean par1) + { + super.setTamed(par1); + + if (par1) + { + this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setAttribute(this.maxTamedHealth); + } else + { + this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setAttribute(this.maxUntamedHealth); + } + } + + /** + * Called when a player interacts with a mob. e.g. gets milk from a cow, gets into the saddle on a pig. + */ + public boolean interact(EntityPlayer par1EntityPlayer) + { + ItemStack itemstack = par1EntityPlayer.inventory.getCurrentItem(); + + if (this.isTamed()) + { + if (itemstack != null) + { + if (Item.itemsList[itemstack.itemID] instanceof ItemFood) + { + ItemFood itemfood = (ItemFood) Item.itemsList[itemstack.itemID]; + + if (itemfood.isWolfsFavoriteMeat() && this.dataWatcher.getWatchableObjectFloat(18) < this.maxTamedHealth) + { + if (!par1EntityPlayer.capabilities.isCreativeMode) + { + --itemstack.stackSize; + } + + this.heal((float) itemfood.getHealAmount()); + + if (itemstack.stackSize <= 0) + { + par1EntityPlayer.inventory.setInventorySlotContents(par1EntityPlayer.inventory.currentItem, (ItemStack) null); + } + + return true; + } + } + } + + if (par1EntityPlayer.getCommandSenderName().equalsIgnoreCase(this.getOwnerName()) && !this.isBreedingItem(itemstack)) + { + if (!this.worldObj.isRemote) + { + this.aiSit.setSitting(!this.isSitting()); + this.isJumping = false; + this.setPathToEntity((PathEntity) null); + this.setTarget((Entity) null); + this.setAttackTarget((EntityLivingBase) null); + } + + this.sendSittingMessageToPlayer(par1EntityPlayer, !this.isSitting()); + } + } else if (itemstack != null && itemstack.itemID == ModItems.weakBloodOrb.itemID && !this.isAngry() && !this.isAggro()) + { + if (!par1EntityPlayer.capabilities.isCreativeMode) + { + --itemstack.stackSize; + } + + if (itemstack.stackSize <= 0) + { + par1EntityPlayer.inventory.setInventorySlotContents(par1EntityPlayer.inventory.currentItem, (ItemStack) null); + } + + if (!this.worldObj.isRemote) + { + if (this.rand.nextInt(1) == 0) + { + this.setTamed(true); + this.setPathToEntity((PathEntity) null); + this.setAttackTarget((EntityLivingBase) null); + this.aiSit.setSitting(true); + this.setHealth(this.maxTamedHealth); + this.setOwner(par1EntityPlayer.getCommandSenderName()); + this.playTameEffect(true); + this.worldObj.setEntityState(this, (byte) 7); + } else + { + this.playTameEffect(false); + this.worldObj.setEntityState(this, (byte) 6); + } + } + + return true; + } + + return super.interact(par1EntityPlayer); + } + + /** + * Checks if the parameter is an item which this animal can be fed to breed it (wheat, carrots or seeds depending on + * the animal type) + */ + public boolean isBreedingItem(ItemStack par1ItemStack) + { + return false; + //return par1ItemStack == null ? false : (!(Item.itemsList[par1ItemStack.itemID] instanceof ItemFood) ? false : ((ItemFood)Item.itemsList[par1ItemStack.itemID]).isWolfsFavoriteMeat()); + } + + /** + * Determines whether this wolf is angry or not. + */ + public boolean isAngry() + { + return (this.dataWatcher.getWatchableObjectByte(16) & 2) != 0; + } + + /** + * Sets whether this wolf is angry or not. + */ + public void setAngry(boolean par1) + { + byte b0 = this.dataWatcher.getWatchableObjectByte(16); + + if (par1) + { + this.dataWatcher.updateObject(16, Byte.valueOf((byte) (b0 | 2))); + } else + { + this.dataWatcher.updateObject(16, Byte.valueOf((byte) (b0 & -3))); + } + } + + /** + * Return this wolf's collar color. + */ + public int getCollarColor() + { + return this.dataWatcher.getWatchableObjectByte(20) & 15; + } + + /** + * Set this wolf's collar color. + */ + public void setCollarColor(int par1) + { + this.dataWatcher.updateObject(20, Byte.valueOf((byte) (par1 & 15))); + } + + /** + * This function is used when two same-species animals in 'love mode' breed to generate the new baby animal. + */ + public EntityWolf spawnBabyAnimal(EntityAgeable par1EntityAgeable) + { + return null; + } + + public void func_70918_i(boolean par1) + { + if (par1) + { + this.dataWatcher.updateObject(19, Byte.valueOf((byte) 1)); + } else + { + this.dataWatcher.updateObject(19, Byte.valueOf((byte) 0)); + } + } + + /** + * Returns true if the mob is currently able to mate with the specified mob. + */ + public boolean canMateWith(EntityAnimal par1EntityAnimal) + { + return false; + } + + public boolean func_70922_bv() + { + return this.dataWatcher.getWatchableObjectByte(19) == 1; + } + + /** + * Determines if an entity can be despawned, used on idle far away entities + */ + protected boolean canDespawn() + { + //return !this.isTamed() && this.ticksExisted > 2400; + return false; + } + + public boolean func_142018_a(EntityLivingBase par1EntityLivingBase, EntityLivingBase par2EntityLivingBase) + { + if (!(par1EntityLivingBase instanceof EntityCreeper) && !(par1EntityLivingBase instanceof EntityGhast)) + { + if (par1EntityLivingBase instanceof EntityTestDemon) + { + EntityTestDemon entitywolf = (EntityTestDemon) par1EntityLivingBase; + + if (entitywolf.isTamed() && entitywolf.func_130012_q() == par2EntityLivingBase) + { + return false; + } + } + + return par1EntityLivingBase instanceof EntityPlayer && par2EntityLivingBase instanceof EntityPlayer && !((EntityPlayer) par2EntityLivingBase).canAttackPlayer((EntityPlayer) par1EntityLivingBase) ? false : !(par1EntityLivingBase instanceof EntityHorse) || !((EntityHorse) par1EntityLivingBase).isTame(); + } else + { + return false; + } + } + + public EntityAgeable createChild(EntityAgeable par1EntityAgeable) + { + return this.spawnBabyAnimal(par1EntityAgeable); + } + + /** + * Attack the specified entity using a ranged attack. + */ + public void attackEntityWithRangedAttack(EntityLivingBase par1EntityLivingBase, float par2) + { + double xCoord; + double yCoord; + double zCoord; + HolyProjectile hol = new HolyProjectile(worldObj, this, par1EntityLivingBase, 1.8f, 0f, 5, 600); + this.worldObj.spawnEntityInWorld(hol); + } + + /** + * sets this entity's combat AI. + */ + public void setCombatTask() + { + this.tasks.removeTask(this.aiAttackOnCollide); + this.tasks.removeTask(this.aiArrowAttack); + ItemStack itemstack = this.getHeldItem(); + this.tasks.addTask(4, this.aiArrowAttack); + } + + protected void fall(float par1) + { + } + + protected void updateFallState(double par1, boolean par3) + { + } +} diff --git a/BM_src/WayofTime/alchemicalWizardry/common/entity/mob/ai/PathNavigateFlying.java b/BM_src/WayofTime/alchemicalWizardry/common/entity/mob/ai/PathNavigateFlying.java new file mode 100644 index 00000000..de146df9 --- /dev/null +++ b/BM_src/WayofTime/alchemicalWizardry/common/entity/mob/ai/PathNavigateFlying.java @@ -0,0 +1,18 @@ +package WayofTime.alchemicalWizardry.common.entity.mob.ai; + +import net.minecraft.entity.EntityLiving; +import net.minecraft.pathfinding.PathNavigate; +import net.minecraft.world.World; + +public class PathNavigateFlying extends PathNavigate +{ + public PathNavigateFlying(EntityLiving par1EntityLiving, World par2World) + { + super(par1EntityLiving, par2World); + } + + public boolean canFlyingNavigate() + { + return true; + } +} diff --git a/BM_src/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfGrowth.java b/BM_src/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfGrowth.java index 573a4c83..5eb38771 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfGrowth.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfGrowth.java @@ -187,6 +187,11 @@ public class SigilOfGrowth extends EnergyItems implements ArmourUpgrade EnergyItems.syphonBatteries(par1ItemStack, (EntityPlayer) par3Entity, getEnergyUsed()); } + if(par2World.isRemote) + { + return; + } + int range = 5; int verticalRange = 2; int posX = (int) Math.round(par3Entity.posX - 0.5f); @@ -204,7 +209,7 @@ public class SigilOfGrowth extends EnergyItems implements ArmourUpgrade if (block instanceof IPlantable) { - if (par2World.rand.nextInt(20) == 0) + if (par2World.rand.nextInt(17) == 0) { block.updateTick(par2World, ix, iy, iz, par2World.rand); } @@ -361,6 +366,11 @@ public class SigilOfGrowth extends EnergyItems implements ArmourUpgrade @Override public void onArmourUpdate(World world, EntityPlayer player, ItemStack thisItemStack) { + if(world.isRemote) + { + return; + } + int range = 5; int verticalRange = 2; int posX = (int) Math.round(player.posX - 0.5f); diff --git a/BM_src/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfHolding.java b/BM_src/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfHolding.java index 643361bf..42c3ad96 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfHolding.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfHolding.java @@ -344,6 +344,10 @@ public class SigilOfHolding extends EnergyItems allowedSigils.add(new Integer(ModItems.growthSigil.itemID)); allowedSigils.add(new Integer(ModItems.sigilOfHaste.itemID)); allowedSigils.add(new Integer(ModItems.sigilOfWind.itemID)); + allowedSigils.add(new Integer(ModItems.sigilOfTheBridge.itemID)); + allowedSigils.add(new Integer(ModItems.sigilOfMagnetism.itemID)); + allowedSigils.add(new Integer(ModItems.itemSigilOfSupression.itemID)); + allowedSigils.add(new Integer(ModItems.itemBloodLightSigil.itemID)); } public ItemStack getCurrentItem(ItemStack sigilItemStack) diff --git a/BM_src/WayofTime/alchemicalWizardry/common/renderer/mob/RenderFallenAngel.java b/BM_src/WayofTime/alchemicalWizardry/common/renderer/mob/RenderFallenAngel.java index 28a18eaa..02f038fc 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/renderer/mob/RenderFallenAngel.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/renderer/mob/RenderFallenAngel.java @@ -18,13 +18,13 @@ public class RenderFallenAngel extends RenderLiving super(par1ModelBase, par2); } - public ResourceLocation func_110832_a(EntityFallenAngel par1EntityFallenAngel) + public ResourceLocation func_110832_a(Entity par1EntityFallenAngel) { return field_110833_a; } public ResourceLocation getEntityTexture(Entity par1Entity) { - return this.func_110832_a((EntityFallenAngel) par1Entity); + return this.func_110832_a(par1Entity); } } diff --git a/BM_src/WayofTime/alchemicalWizardry/common/rituals/RitualEffectCrushing.java b/BM_src/WayofTime/alchemicalWizardry/common/rituals/RitualEffectCrushing.java index df3bcbd5..f4dcb012 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/rituals/RitualEffectCrushing.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/rituals/RitualEffectCrushing.java @@ -37,7 +37,7 @@ public class RitualEffectCrushing extends RitualEffect int currentEssence = data.currentEssence; World world = ritualStone.getWorld(); - if (world.getWorldTime() % 40 != 0) + if (world.getWorldTime() % 40 != 20) { return; } @@ -86,7 +86,7 @@ public class RitualEffectCrushing extends RitualEffect if (block != null) { - if ((block.equals(ModBlocks.ritualStone) || block.equals(ModBlocks.blockMasterStone))) + if ((block.equals(ModBlocks.ritualStone) || block.equals(ModBlocks.blockMasterStone)) || block.getBlockHardness(world, x + i, y + j, z + k) == -1) { continue; } diff --git a/BM_src/WayofTime/alchemicalWizardry/common/rituals/RitualEffectSoulBound.java b/BM_src/WayofTime/alchemicalWizardry/common/rituals/RitualEffectSoulBound.java index 1b3ca600..39326daa 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/rituals/RitualEffectSoulBound.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/rituals/RitualEffectSoulBound.java @@ -145,7 +145,7 @@ public class RitualEffectSoulBound extends RitualEffect if (spawnedItem != null) { - EntityItem newItem = new EntityItem(world, x + 0.5, y + 1, z + 0.5, spawnedItem); + EntityItem newItem = new EntityItem(world, x + 0.5, y + 1, z + 0.5, spawnedItem.copy()); world.spawnEntityInWorld(newItem); } diff --git a/BM_src/WayofTime/alchemicalWizardry/common/summoning/SummoningHelperAW.java b/BM_src/WayofTime/alchemicalWizardry/common/summoning/SummoningHelperAW.java index 8d615cf1..d740598b 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/summoning/SummoningHelperAW.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/summoning/SummoningHelperAW.java @@ -17,6 +17,7 @@ import WayofTime.alchemicalWizardry.common.entity.mob.EntityLowerGuardian; import WayofTime.alchemicalWizardry.common.entity.mob.EntityShade; import WayofTime.alchemicalWizardry.common.entity.mob.EntityShadeElemental; import WayofTime.alchemicalWizardry.common.entity.mob.EntitySmallEarthGolem; +import WayofTime.alchemicalWizardry.common.entity.mob.EntityTestDemon; import WayofTime.alchemicalWizardry.common.entity.mob.EntityWaterElemental; import WayofTime.alchemicalWizardry.common.entity.mob.EntityWingedFireDemon; @@ -98,6 +99,11 @@ public class SummoningHelperAW extends SummoningHelper { return new EntityHolyElemental(worldObj); } + + if (this.id == AlchemicalWizardry.entityTestDemonID) + { + return new EntityTestDemon(worldObj); + } return new EntityPig(worldObj); } diff --git a/BM_src/WayofTime/alchemicalWizardry/common/tileEntity/container/ContainerWritingTable.java b/BM_src/WayofTime/alchemicalWizardry/common/tileEntity/container/ContainerWritingTable.java index aaf63b67..619be77d 100644 --- a/BM_src/WayofTime/alchemicalWizardry/common/tileEntity/container/ContainerWritingTable.java +++ b/BM_src/WayofTime/alchemicalWizardry/common/tileEntity/container/ContainerWritingTable.java @@ -80,7 +80,7 @@ public class ContainerWritingTable extends Container } } //places it into the tileEntity is possible since its in the player inventory - else if (!this.mergeItemStack(stackInSlot, 0, 6, false)) + else if (!this.mergeItemStack(stackInSlot, 0, 7, false)) { return null; }