From 61e6cf2a143207af24d8a6d79169874ad09a35d3 Mon Sep 17 00:00:00 2001 From: WayofTime Date: Sat, 9 Jan 2016 10:47:36 -0500 Subject: [PATCH] Renamed nomenclature to Demonic Will instead of souls - still missing a few spots --- .settings/org.eclipse.jdt.core.prefs | 6 +-- ...geRecipe.java => TartaricForgeRecipe.java} | 8 +-- ....java => TartaricForgeRecipeRegistry.java} | 14 +++--- .../bloodmagic/api/soul/IDemonWill.java | 30 ++++++++++++ .../bloodmagic/api/soul/IDemonWillGem.java | 32 ++++++++++++ .../bloodmagic/api/soul/IDemonWillWeapon.java | 11 +++++ .../WayofTime/bloodmagic/api/soul/ISoul.java | 30 ------------ .../bloodmagic/api/soul/ISoulGem.java | 32 ------------ .../bloodmagic/api/soul/ISoulWeapon.java | 11 ----- ...ndler.java => PlayerDemonWillHandler.java} | 46 +++++++++--------- ...ow.java => RenderEntitySentientArrow.java} | 10 ++-- .../entity/SentientArrowRenderFactory.java | 15 ++++++ .../render/entity/SoulArrowRenderFactory.java | 15 ------ .../compat/jei/BloodMagicPlugin.java | 22 +++------ .../jei/forge/SoulForgeRecipeMaker.java | 23 --------- ....java => TartaricForgeRecipeCategory.java} | 31 +++++++----- ...r.java => TartaricForgeRecipeHandler.java} | 10 ++-- ...peJEI.java => TartaricForgeRecipeJEI.java} | 8 +-- .../jei/forge/TartaricForgeRecipeMaker.java | 23 +++++++++ ...oulArrow.java => EntitySentientArrow.java} | 14 +++--- .../bloodmagic/item/soul/ItemMonsterSoul.java | 20 ++++---- ...{ItemSoulBow.java => ItemSentientBow.java} | 16 +++--- ...mSoulSword.java => ItemSentientSword.java} | 26 +++++----- .../bloodmagic/item/soul/ItemSoulGem.java | 40 +++++++-------- .../bloodmagic/proxy/ClientProxy.java | 6 +-- .../bloodmagic/registry/ModEntities.java | 4 +- .../bloodmagic/registry/ModItems.java | 24 ++++----- .../bloodmagic/registry/ModRecipes.java | 34 ++++++------- .../bloodmagic/tile/TileSoulForge.java | 46 +++++++++--------- .../tile/container/ContainerSoulForge.java | 8 +-- .../bloodmagic/util/handler/EventHandler.java | 24 ++++----- .../assets/bloodmagic/lang/en_US.lang | 26 +++++----- ...{ItemSoulBow.json => ItemSentientBow.json} | 2 +- ..._0.json => ItemSentientBow_pulling_0.json} | 2 +- ..._2.json => ItemSentientBow_pulling_1.json} | 2 +- ..._1.json => ItemSentientBow_pulling_2.json} | 2 +- ...oulSword0.json => ItemSentientSword0.json} | 0 ...oulSword1.json => ItemSentientSword1.json} | 0 .../items/{SoulBow.png => SentientBow.png} | Bin ...ulling_0.png => SentientBow_pulling_0.png} | Bin ...ulling_1.png => SentientBow_pulling_1.png} | Bin ...ulling_2.png => SentientBow_pulling_2.png} | Bin 42 files changed, 334 insertions(+), 339 deletions(-) rename src/main/java/WayofTime/bloodmagic/api/recipe/{SoulForgeRecipe.java => TartaricForgeRecipe.java} (93%) rename src/main/java/WayofTime/bloodmagic/api/registry/{SoulForgeRecipeRegistry.java => TartaricForgeRecipeRegistry.java} (52%) create mode 100644 src/main/java/WayofTime/bloodmagic/api/soul/IDemonWill.java create mode 100644 src/main/java/WayofTime/bloodmagic/api/soul/IDemonWillGem.java create mode 100644 src/main/java/WayofTime/bloodmagic/api/soul/IDemonWillWeapon.java delete mode 100644 src/main/java/WayofTime/bloodmagic/api/soul/ISoul.java delete mode 100644 src/main/java/WayofTime/bloodmagic/api/soul/ISoulGem.java delete mode 100644 src/main/java/WayofTime/bloodmagic/api/soul/ISoulWeapon.java rename src/main/java/WayofTime/bloodmagic/api/soul/{PlayerSoulHandler.java => PlayerDemonWillHandler.java} (59%) rename src/main/java/WayofTime/bloodmagic/client/render/entity/{RenderEntitySoulArrow.java => RenderEntitySentientArrow.java} (91%) create mode 100644 src/main/java/WayofTime/bloodmagic/client/render/entity/SentientArrowRenderFactory.java delete mode 100644 src/main/java/WayofTime/bloodmagic/client/render/entity/SoulArrowRenderFactory.java delete mode 100644 src/main/java/WayofTime/bloodmagic/compat/jei/forge/SoulForgeRecipeMaker.java rename src/main/java/WayofTime/bloodmagic/compat/jei/forge/{SoulForgeRecipeCategory.java => TartaricForgeRecipeCategory.java} (87%) rename src/main/java/WayofTime/bloodmagic/compat/jei/forge/{SoulForgeRecipeHandler.java => TartaricForgeRecipeHandler.java} (61%) rename src/main/java/WayofTime/bloodmagic/compat/jei/forge/{SoulForgeRecipeJEI.java => TartaricForgeRecipeJEI.java} (88%) create mode 100644 src/main/java/WayofTime/bloodmagic/compat/jei/forge/TartaricForgeRecipeMaker.java rename src/main/java/WayofTime/bloodmagic/entity/projectile/{EntitySoulArrow.java => EntitySentientArrow.java} (64%) rename src/main/java/WayofTime/bloodmagic/item/soul/{ItemSoulBow.java => ItemSentientBow.java} (85%) rename src/main/java/WayofTime/bloodmagic/item/soul/{ItemSoulSword.java => ItemSentientSword.java} (85%) rename src/main/resources/assets/bloodmagic/models/item/{ItemSoulBow.json => ItemSentientBow.json} (89%) rename src/main/resources/assets/bloodmagic/models/item/{ItemSoulBow_pulling_0.json => ItemSentientBow_pulling_0.json} (87%) rename src/main/resources/assets/bloodmagic/models/item/{ItemSoulBow_pulling_2.json => ItemSentientBow_pulling_1.json} (87%) rename src/main/resources/assets/bloodmagic/models/item/{ItemSoulBow_pulling_1.json => ItemSentientBow_pulling_2.json} (87%) rename src/main/resources/assets/bloodmagic/models/item/{ItemSoulSword0.json => ItemSentientSword0.json} (100%) rename src/main/resources/assets/bloodmagic/models/item/{ItemSoulSword1.json => ItemSentientSword1.json} (100%) rename src/main/resources/assets/bloodmagic/textures/items/{SoulBow.png => SentientBow.png} (100%) rename src/main/resources/assets/bloodmagic/textures/items/{SoulBow_pulling_0.png => SentientBow_pulling_0.png} (100%) rename src/main/resources/assets/bloodmagic/textures/items/{SoulBow_pulling_1.png => SentientBow_pulling_1.png} (100%) rename src/main/resources/assets/bloodmagic/textures/items/{SoulBow_pulling_2.png => SentientBow_pulling_2.png} (100%) diff --git a/.settings/org.eclipse.jdt.core.prefs b/.settings/org.eclipse.jdt.core.prefs index 52dc701c..83163557 100644 --- a/.settings/org.eclipse.jdt.core.prefs +++ b/.settings/org.eclipse.jdt.core.prefs @@ -1,5 +1,5 @@ # -#Thu Jan 07 22:26:15 EST 2016 +#Sat Jan 09 07:22:26 EST 2016 org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert org.eclipse.jdt.core.formatter.brace_position_for_block=next_line org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert @@ -288,10 +288,10 @@ org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert -org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=next_line eclipse.preferences.version=1 -org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on +org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=next_line org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on org.eclipse.jdt.core.compiler.compliance=1.6 org.eclipse.jdt.core.formatter.blank_lines_after_package=1 org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16 diff --git a/src/main/java/WayofTime/bloodmagic/api/recipe/SoulForgeRecipe.java b/src/main/java/WayofTime/bloodmagic/api/recipe/TartaricForgeRecipe.java similarity index 93% rename from src/main/java/WayofTime/bloodmagic/api/recipe/SoulForgeRecipe.java rename to src/main/java/WayofTime/bloodmagic/api/recipe/TartaricForgeRecipe.java index 378cf994..a5a4ed38 100644 --- a/src/main/java/WayofTime/bloodmagic/api/recipe/SoulForgeRecipe.java +++ b/src/main/java/WayofTime/bloodmagic/api/recipe/TartaricForgeRecipe.java @@ -12,7 +12,7 @@ import net.minecraft.util.BlockPos; import net.minecraft.world.World; import net.minecraftforge.oredict.OreDictionary; -public class SoulForgeRecipe +public class TartaricForgeRecipe { protected ItemStack output = null; protected ArrayList input = new ArrayList(); @@ -21,17 +21,17 @@ public class SoulForgeRecipe @Getter protected double soulsDrained; - public SoulForgeRecipe(Block result, double minSouls, double drain, Object... recipe) + public TartaricForgeRecipe(Block result, double minSouls, double drain, Object... recipe) { this(new ItemStack(result), minSouls, drain, recipe); } - public SoulForgeRecipe(Item result, double minSouls, double drain, Object... recipe) + public TartaricForgeRecipe(Item result, double minSouls, double drain, Object... recipe) { this(new ItemStack(result), minSouls, drain, recipe); } - public SoulForgeRecipe(ItemStack result, double minSouls, double drain, Object... recipe) + public TartaricForgeRecipe(ItemStack result, double minSouls, double drain, Object... recipe) { output = result.copy(); this.minimumSouls = minSouls; diff --git a/src/main/java/WayofTime/bloodmagic/api/registry/SoulForgeRecipeRegistry.java b/src/main/java/WayofTime/bloodmagic/api/registry/TartaricForgeRecipeRegistry.java similarity index 52% rename from src/main/java/WayofTime/bloodmagic/api/registry/SoulForgeRecipeRegistry.java rename to src/main/java/WayofTime/bloodmagic/api/registry/TartaricForgeRecipeRegistry.java index 7646244e..3e974a66 100644 --- a/src/main/java/WayofTime/bloodmagic/api/registry/SoulForgeRecipeRegistry.java +++ b/src/main/java/WayofTime/bloodmagic/api/registry/TartaricForgeRecipeRegistry.java @@ -7,26 +7,26 @@ import lombok.Getter; import net.minecraft.item.ItemStack; import net.minecraft.util.BlockPos; import net.minecraft.world.World; -import WayofTime.bloodmagic.api.recipe.SoulForgeRecipe; +import WayofTime.bloodmagic.api.recipe.TartaricForgeRecipe; -public class SoulForgeRecipeRegistry +public class TartaricForgeRecipeRegistry { @Getter - private static List recipeList = new ArrayList(); + private static List recipeList = new ArrayList(); - public static void registerRecipe(SoulForgeRecipe recipe) + public static void registerRecipe(TartaricForgeRecipe recipe) { recipeList.add(recipe); } public static void registerRecipe(ItemStack outputStack, double minimulSouls, double drain, Object... objects) { - registerRecipe(new SoulForgeRecipe(outputStack, minimulSouls, drain, objects)); + registerRecipe(new TartaricForgeRecipe(outputStack, minimulSouls, drain, objects)); } - public static SoulForgeRecipe getMatchingRecipe(List itemList, World world, BlockPos pos) + public static TartaricForgeRecipe getMatchingRecipe(List itemList, World world, BlockPos pos) { - for (SoulForgeRecipe recipe : recipeList) + for (TartaricForgeRecipe recipe : recipeList) { if (recipe.matches(itemList, world, pos)) { diff --git a/src/main/java/WayofTime/bloodmagic/api/soul/IDemonWill.java b/src/main/java/WayofTime/bloodmagic/api/soul/IDemonWill.java new file mode 100644 index 00000000..c1394e74 --- /dev/null +++ b/src/main/java/WayofTime/bloodmagic/api/soul/IDemonWill.java @@ -0,0 +1,30 @@ +package WayofTime.bloodmagic.api.soul; + +import net.minecraft.item.ItemStack; + +public interface IDemonWill +{ + public double getWill(ItemStack soulStack); + + public void setWill(ItemStack willStack, double will); + + /** + * Drains the demonic will from the willStack. If all of the will is + * drained, the willStack will be removed. + * + * @param willStack + * @param drainAmount + * @return The amount of will drained. + */ + public double drainWill(ItemStack willStack, double drainAmount); + + /** + * Creates a new ItemStack with the specified number of will. Implementation + * should respect the number requested. + * + * @param meta + * @param number + * @return + */ + public ItemStack createWill(int meta, double number); +} diff --git a/src/main/java/WayofTime/bloodmagic/api/soul/IDemonWillGem.java b/src/main/java/WayofTime/bloodmagic/api/soul/IDemonWillGem.java new file mode 100644 index 00000000..f8bcf862 --- /dev/null +++ b/src/main/java/WayofTime/bloodmagic/api/soul/IDemonWillGem.java @@ -0,0 +1,32 @@ +package WayofTime.bloodmagic.api.soul; + +import net.minecraft.item.ItemStack; + +public interface IDemonWillGem +{ + /** + * + * @param willGemStack + * - The ItemStack for this demon will gem. + * @param willStack + * - The ItemStack for the will. Item should extend IDemonWill + * @return - The remainder willStack after the will has been absorbed into + * the gem. Return null if there is no will left in the stack. + */ + public ItemStack fillDemonWillGem(ItemStack willGemStack, ItemStack willStack); + + /** + * Returns the number of souls that are left in the soul gem. Returns a + * double because souls can be fractionally drained. + * + * @param willGemStack + * @return + */ + public double getWill(ItemStack willGemStack); + + public void setWill(ItemStack willGemStack, double amount); + + public int getMaxWill(ItemStack willGemStack); + + public double drainWill(ItemStack stack, double drainAmount); +} diff --git a/src/main/java/WayofTime/bloodmagic/api/soul/IDemonWillWeapon.java b/src/main/java/WayofTime/bloodmagic/api/soul/IDemonWillWeapon.java new file mode 100644 index 00000000..fa75dd6f --- /dev/null +++ b/src/main/java/WayofTime/bloodmagic/api/soul/IDemonWillWeapon.java @@ -0,0 +1,11 @@ +package WayofTime.bloodmagic.api.soul; + +import java.util.List; + +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.item.ItemStack; + +public interface IDemonWillWeapon +{ + public List getRandomDemonWillDrop(EntityLivingBase killedEntity, EntityLivingBase attackingEntity, ItemStack stack, int looting); +} diff --git a/src/main/java/WayofTime/bloodmagic/api/soul/ISoul.java b/src/main/java/WayofTime/bloodmagic/api/soul/ISoul.java deleted file mode 100644 index fc41e24f..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/soul/ISoul.java +++ /dev/null @@ -1,30 +0,0 @@ -package WayofTime.bloodmagic.api.soul; - -import net.minecraft.item.ItemStack; - -public interface ISoul -{ - public double getSouls(ItemStack soulStack); - - public void setSouls(ItemStack soulStack, double souls); - - /** - * Drains the souls from the soulStack. If all of the souls are drained, the - * soulStack will be removed. - * - * @param soulStack - * @param drainAmount - * @return The number of souls drained. - */ - public double drainSouls(ItemStack soulStack, double drainAmount); - - /** - * Creates a new ItemStack with the specified number of souls. - * Implementation should respect the number requested. - * - * @param meta - * @param number - * @return - */ - public ItemStack createSoul(int meta, double number); -} diff --git a/src/main/java/WayofTime/bloodmagic/api/soul/ISoulGem.java b/src/main/java/WayofTime/bloodmagic/api/soul/ISoulGem.java deleted file mode 100644 index 14d6c9d7..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/soul/ISoulGem.java +++ /dev/null @@ -1,32 +0,0 @@ -package WayofTime.bloodmagic.api.soul; - -import net.minecraft.item.ItemStack; - -public interface ISoulGem -{ - /** - * - * @param soulGemStack - * - The ItemStack for this soul gem. - * @param soulStack - * - The ItemStack for the soul. Item should extend ISoul - * @return - The remainder soulStack after the souls have been absorbed into - * the gem. Return null if there are no souls left in the stack. - */ - public ItemStack fillSoulGem(ItemStack soulGemStack, ItemStack soulStack); - - /** - * Returns the number of souls that are left in the soul gem. Returns a - * double because souls can be fractionally drained. - * - * @param soulGemStack - * @return - */ - public double getSouls(ItemStack soulGemStack); - - public void setSouls(ItemStack soulGemStack, double amount); - - public int getMaxSouls(ItemStack soulGemStack); - - public double drainSouls(ItemStack stack, double drainAmount); -} diff --git a/src/main/java/WayofTime/bloodmagic/api/soul/ISoulWeapon.java b/src/main/java/WayofTime/bloodmagic/api/soul/ISoulWeapon.java deleted file mode 100644 index d295c51d..00000000 --- a/src/main/java/WayofTime/bloodmagic/api/soul/ISoulWeapon.java +++ /dev/null @@ -1,11 +0,0 @@ -package WayofTime.bloodmagic.api.soul; - -import java.util.List; - -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.item.ItemStack; - -public interface ISoulWeapon -{ - public List getRandomSoulDrop(EntityLivingBase killedEntity, EntityLivingBase attackingEntity, ItemStack stack, int looting); -} diff --git a/src/main/java/WayofTime/bloodmagic/api/soul/PlayerSoulHandler.java b/src/main/java/WayofTime/bloodmagic/api/soul/PlayerDemonWillHandler.java similarity index 59% rename from src/main/java/WayofTime/bloodmagic/api/soul/PlayerSoulHandler.java rename to src/main/java/WayofTime/bloodmagic/api/soul/PlayerDemonWillHandler.java index 8a4ba2bf..beef1218 100644 --- a/src/main/java/WayofTime/bloodmagic/api/soul/PlayerSoulHandler.java +++ b/src/main/java/WayofTime/bloodmagic/api/soul/PlayerDemonWillHandler.java @@ -12,9 +12,9 @@ import net.minecraft.item.ItemStack; * @author WayofTime * */ -public class PlayerSoulHandler +public class PlayerDemonWillHandler { - public static double getTotalSouls(EntityPlayer player) + public static double getTotalDemonWill(EntityPlayer player) { ItemStack[] inventory = player.inventory.mainInventory; double souls = 0; @@ -24,12 +24,12 @@ public class PlayerSoulHandler ItemStack stack = inventory[i]; if (stack != null) { - if (stack.getItem() instanceof ISoul) + if (stack.getItem() instanceof IDemonWill) { - souls += ((ISoul) stack.getItem()).getSouls(stack); - } else if (stack.getItem() instanceof ISoulGem) + souls += ((IDemonWill) stack.getItem()).getWill(stack); + } else if (stack.getItem() instanceof IDemonWillGem) { - souls += ((ISoulGem) stack.getItem()).getSouls(stack); + souls += ((IDemonWillGem) stack.getItem()).getWill(stack); } } } @@ -43,7 +43,7 @@ public class PlayerSoulHandler * @param amount * @return - amount consumed */ - public static double consumeSouls(EntityPlayer player, double amount) + public static double consumeDemonWill(EntityPlayer player, double amount) { double consumed = 0; @@ -59,16 +59,16 @@ public class PlayerSoulHandler ItemStack stack = inventory[i]; if (stack != null) { - if (stack.getItem() instanceof ISoul) + if (stack.getItem() instanceof IDemonWill) { - consumed += ((ISoul) stack.getItem()).drainSouls(stack, amount - consumed); - if (((ISoul) stack.getItem()).getSouls(stack) <= 0) + consumed += ((IDemonWill) stack.getItem()).drainWill(stack, amount - consumed); + if (((IDemonWill) stack.getItem()).getWill(stack) <= 0) { inventory[i] = null; } - } else if (stack.getItem() instanceof ISoulGem) + } else if (stack.getItem() instanceof IDemonWillGem) { - consumed += ((ISoulGem) stack.getItem()).drainSouls(stack, amount - consumed); + consumed += ((IDemonWillGem) stack.getItem()).drainWill(stack, amount - consumed); } } } @@ -77,15 +77,15 @@ public class PlayerSoulHandler } /** - * Adds an ISoul contained in an ItemStack to one of the Soul Gems in the - * player's inventory. + * Adds an IDemonWill contained in an ItemStack to one of the Soul Gems in + * the player's inventory. * * @param player * @param soulStack - * - ItemStack that contains an ISoul to be added + * - ItemStack that contains an IDemonWill to be added * @return */ - public static ItemStack addSouls(EntityPlayer player, ItemStack soulStack) + public static ItemStack addDemonWill(EntityPlayer player, ItemStack soulStack) { if (soulStack == null) { @@ -99,9 +99,9 @@ public class PlayerSoulHandler ItemStack stack = inventory[i]; if (stack != null) { - if (stack.getItem() instanceof ISoulGem) + if (stack.getItem() instanceof IDemonWillGem) { - ItemStack newStack = ((ISoulGem) stack.getItem()).fillSoulGem(stack, soulStack); + ItemStack newStack = ((IDemonWillGem) stack.getItem()).fillDemonWillGem(stack, soulStack); if (newStack == null) { return null; @@ -113,7 +113,7 @@ public class PlayerSoulHandler return soulStack; } - public static double addSouls(EntityPlayer player, double amount) + public static double addDemonWill(EntityPlayer player, double amount) { ItemStack[] inventory = player.inventory.mainInventory; double remaining = amount; @@ -123,11 +123,11 @@ public class PlayerSoulHandler ItemStack stack = inventory[i]; if (stack != null) { - if (stack.getItem() instanceof ISoulGem) + if (stack.getItem() instanceof IDemonWillGem) { - double souls = ((ISoulGem) stack.getItem()).getSouls(stack); - double fill = Math.min(((ISoulGem) stack.getItem()).getMaxSouls(stack) - souls, remaining); - ((ISoulGem) stack.getItem()).setSouls(stack, fill + souls); + double souls = ((IDemonWillGem) stack.getItem()).getWill(stack); + double fill = Math.min(((IDemonWillGem) stack.getItem()).getMaxWill(stack) - souls, remaining); + ((IDemonWillGem) stack.getItem()).setWill(stack, fill + souls); remaining -= fill; if (remaining <= 0) diff --git a/src/main/java/WayofTime/bloodmagic/client/render/entity/RenderEntitySoulArrow.java b/src/main/java/WayofTime/bloodmagic/client/render/entity/RenderEntitySentientArrow.java similarity index 91% rename from src/main/java/WayofTime/bloodmagic/client/render/entity/RenderEntitySoulArrow.java rename to src/main/java/WayofTime/bloodmagic/client/render/entity/RenderEntitySentientArrow.java index 58c7345d..ab1a1434 100644 --- a/src/main/java/WayofTime/bloodmagic/client/render/entity/RenderEntitySoulArrow.java +++ b/src/main/java/WayofTime/bloodmagic/client/render/entity/RenderEntitySentientArrow.java @@ -13,19 +13,19 @@ import net.minecraftforge.fml.relauncher.SideOnly; import org.lwjgl.opengl.GL11; -import WayofTime.bloodmagic.entity.projectile.EntitySoulArrow; +import WayofTime.bloodmagic.entity.projectile.EntitySentientArrow; @SideOnly(Side.CLIENT) -public class RenderEntitySoulArrow extends Render +public class RenderEntitySentientArrow extends Render { private static final ResourceLocation arrowTextures = new ResourceLocation("bloodmagic:textures/entities/soulArrow.png"); - public RenderEntitySoulArrow(RenderManager renderManagerIn) + public RenderEntitySentientArrow(RenderManager renderManagerIn) { super(renderManagerIn); } - public void doRender(EntitySoulArrow entity, double x, double y, double z, float entityYaw, float partialTicks) + public void doRender(EntitySentientArrow entity, double x, double y, double z, float entityYaw, float partialTicks) { this.bindEntityTexture(entity); GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); @@ -93,7 +93,7 @@ public class RenderEntitySoulArrow extends Render * Returns the location of an entity's texture. Doesn't seem to be called * unless you call Render.bindEntityTexture. */ - protected ResourceLocation getEntityTexture(EntitySoulArrow entity) + protected ResourceLocation getEntityTexture(EntitySentientArrow entity) { return arrowTextures; } diff --git a/src/main/java/WayofTime/bloodmagic/client/render/entity/SentientArrowRenderFactory.java b/src/main/java/WayofTime/bloodmagic/client/render/entity/SentientArrowRenderFactory.java new file mode 100644 index 00000000..78dad32f --- /dev/null +++ b/src/main/java/WayofTime/bloodmagic/client/render/entity/SentientArrowRenderFactory.java @@ -0,0 +1,15 @@ +package WayofTime.bloodmagic.client.render.entity; + +import net.minecraft.client.renderer.entity.Render; +import net.minecraft.client.renderer.entity.RenderManager; +import net.minecraftforge.fml.client.registry.IRenderFactory; +import WayofTime.bloodmagic.entity.projectile.EntitySentientArrow; + +public class SentientArrowRenderFactory implements IRenderFactory +{ + @Override + public Render createRenderFor(RenderManager manager) + { + return new RenderEntitySentientArrow(manager); + } +} diff --git a/src/main/java/WayofTime/bloodmagic/client/render/entity/SoulArrowRenderFactory.java b/src/main/java/WayofTime/bloodmagic/client/render/entity/SoulArrowRenderFactory.java deleted file mode 100644 index 3445254f..00000000 --- a/src/main/java/WayofTime/bloodmagic/client/render/entity/SoulArrowRenderFactory.java +++ /dev/null @@ -1,15 +0,0 @@ -package WayofTime.bloodmagic.client.render.entity; - -import net.minecraft.client.renderer.entity.Render; -import net.minecraft.client.renderer.entity.RenderManager; -import net.minecraftforge.fml.client.registry.IRenderFactory; -import WayofTime.bloodmagic.entity.projectile.EntitySoulArrow; - -public class SoulArrowRenderFactory implements IRenderFactory -{ - @Override - public Render createRenderFor(RenderManager manager) - { - return new RenderEntitySoulArrow(manager); - } -} diff --git a/src/main/java/WayofTime/bloodmagic/compat/jei/BloodMagicPlugin.java b/src/main/java/WayofTime/bloodmagic/compat/jei/BloodMagicPlugin.java index a084aa0d..8ff9e346 100644 --- a/src/main/java/WayofTime/bloodmagic/compat/jei/BloodMagicPlugin.java +++ b/src/main/java/WayofTime/bloodmagic/compat/jei/BloodMagicPlugin.java @@ -10,9 +10,9 @@ import WayofTime.bloodmagic.compat.jei.altar.AltarRecipeMaker; import WayofTime.bloodmagic.compat.jei.binding.BindingRecipeCategory; import WayofTime.bloodmagic.compat.jei.binding.BindingRecipeHandler; import WayofTime.bloodmagic.compat.jei.binding.BindingRecipeMaker; -import WayofTime.bloodmagic.compat.jei.forge.SoulForgeRecipeCategory; -import WayofTime.bloodmagic.compat.jei.forge.SoulForgeRecipeHandler; -import WayofTime.bloodmagic.compat.jei.forge.SoulForgeRecipeMaker; +import WayofTime.bloodmagic.compat.jei.forge.TartaricForgeRecipeCategory; +import WayofTime.bloodmagic.compat.jei.forge.TartaricForgeRecipeHandler; +import WayofTime.bloodmagic.compat.jei.forge.TartaricForgeRecipeMaker; import WayofTime.bloodmagic.registry.ModBlocks; import WayofTime.bloodmagic.registry.ModItems; import mezz.jei.api.*; @@ -26,24 +26,14 @@ public class BloodMagicPlugin implements IModPlugin @Override public void register(IModRegistry registry) { - registry.addRecipeCategories( - new AltarRecipeCategory(), - new BindingRecipeCategory(), - new AlchemyArrayCraftingCategory(), - new SoulForgeRecipeCategory() - ); + registry.addRecipeCategories(new AltarRecipeCategory(), new BindingRecipeCategory(), new AlchemyArrayCraftingCategory(), new TartaricForgeRecipeCategory()); - registry.addRecipeHandlers( - new AltarRecipeHandler(), - new BindingRecipeHandler(), - new AlchemyArrayCraftingRecipeHandler(), - new SoulForgeRecipeHandler() - ); + registry.addRecipeHandlers(new AltarRecipeHandler(), new BindingRecipeHandler(), new AlchemyArrayCraftingRecipeHandler(), new TartaricForgeRecipeHandler()); registry.addRecipes(AltarRecipeMaker.getRecipes()); registry.addRecipes(BindingRecipeMaker.getRecipes()); registry.addRecipes(AlchemyArrayCraftingRecipeMaker.getRecipes()); - registry.addRecipes(SoulForgeRecipeMaker.getRecipes()); + registry.addRecipes(TartaricForgeRecipeMaker.getRecipes()); registry.addDescription(new ItemStack(ModItems.altarMaker), "jei.BloodMagic.desc.altarBuilder"); diff --git a/src/main/java/WayofTime/bloodmagic/compat/jei/forge/SoulForgeRecipeMaker.java b/src/main/java/WayofTime/bloodmagic/compat/jei/forge/SoulForgeRecipeMaker.java deleted file mode 100644 index eee691d7..00000000 --- a/src/main/java/WayofTime/bloodmagic/compat/jei/forge/SoulForgeRecipeMaker.java +++ /dev/null @@ -1,23 +0,0 @@ -package WayofTime.bloodmagic.compat.jei.forge; - -import WayofTime.bloodmagic.api.recipe.SoulForgeRecipe; -import WayofTime.bloodmagic.api.registry.SoulForgeRecipeRegistry; - -import javax.annotation.Nonnull; -import java.util.ArrayList; -import java.util.List; - -public class SoulForgeRecipeMaker -{ - @Nonnull - public static List getRecipes() - { - List recipeList = SoulForgeRecipeRegistry.getRecipeList(); - ArrayList recipes = new ArrayList(); - - for (SoulForgeRecipe recipe : recipeList) - recipes.add(new SoulForgeRecipeJEI(recipe)); - - return recipes; - } -} diff --git a/src/main/java/WayofTime/bloodmagic/compat/jei/forge/SoulForgeRecipeCategory.java b/src/main/java/WayofTime/bloodmagic/compat/jei/forge/TartaricForgeRecipeCategory.java similarity index 87% rename from src/main/java/WayofTime/bloodmagic/compat/jei/forge/SoulForgeRecipeCategory.java rename to src/main/java/WayofTime/bloodmagic/compat/jei/forge/TartaricForgeRecipeCategory.java index f1be1e5c..a362996b 100644 --- a/src/main/java/WayofTime/bloodmagic/compat/jei/forge/SoulForgeRecipeCategory.java +++ b/src/main/java/WayofTime/bloodmagic/compat/jei/forge/TartaricForgeRecipeCategory.java @@ -1,8 +1,10 @@ package WayofTime.bloodmagic.compat.jei.forge; -import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.compat.jei.BloodMagicPlugin; -import WayofTime.bloodmagic.util.helper.TextHelper; +import java.util.List; +import java.util.Set; + +import javax.annotation.Nonnull; + import mezz.jei.api.gui.ICraftingGridHelper; import mezz.jei.api.gui.IDrawable; import mezz.jei.api.gui.IGuiItemStackGroup; @@ -12,12 +14,11 @@ import mezz.jei.api.recipe.IRecipeWrapper; import net.minecraft.client.Minecraft; import net.minecraft.item.ItemStack; import net.minecraft.util.ResourceLocation; +import WayofTime.bloodmagic.api.Constants; +import WayofTime.bloodmagic.compat.jei.BloodMagicPlugin; +import WayofTime.bloodmagic.util.helper.TextHelper; -import javax.annotation.Nonnull; -import java.util.List; -import java.util.Set; - -public class SoulForgeRecipeCategory implements IRecipeCategory +public class TartaricForgeRecipeCategory implements IRecipeCategory { private static final int OUTPUT_SLOT = 0; private static final int GEM_SLOT = 1; @@ -30,7 +31,8 @@ public class SoulForgeRecipeCategory implements IRecipeCategory @Nonnull private final ICraftingGridHelper craftingGridHelper; - public SoulForgeRecipeCategory() { + public TartaricForgeRecipeCategory() + { craftingGridHelper = BloodMagicPlugin.jeiHelper.getGuiHelper().createCraftingGridHelper(INPUT_SLOT, OUTPUT_SLOT); } @@ -76,15 +78,18 @@ public class SoulForgeRecipeCategory implements IRecipeCategory guiItemStacks.init(OUTPUT_SLOT, false, 73, 13); guiItemStacks.init(GEM_SLOT, true, 42, 0); - for (int y = 0; y < 3; ++y) { - for (int x = 0; x < 3; ++x) { + for (int y = 0; y < 3; ++y) + { + for (int x = 0; x < 3; ++x) + { int index = INPUT_SLOT + x + (y * 3); guiItemStacks.init(index, true, x * 18, y * 18); } } - if (recipeWrapper instanceof SoulForgeRecipeJEI) { - SoulForgeRecipeJEI recipe = (SoulForgeRecipeJEI) recipeWrapper; + if (recipeWrapper instanceof TartaricForgeRecipeJEI) + { + TartaricForgeRecipeJEI recipe = (TartaricForgeRecipeJEI) recipeWrapper; guiItemStacks.set(GEM_SLOT, (Set) recipe.getInputs().get(1)); craftingGridHelper.setOutput(guiItemStacks, recipe.getOutputs()); craftingGridHelper.setInput(guiItemStacks, (List) recipe.getInputs().get(0), 2, 3); diff --git a/src/main/java/WayofTime/bloodmagic/compat/jei/forge/SoulForgeRecipeHandler.java b/src/main/java/WayofTime/bloodmagic/compat/jei/forge/TartaricForgeRecipeHandler.java similarity index 61% rename from src/main/java/WayofTime/bloodmagic/compat/jei/forge/SoulForgeRecipeHandler.java rename to src/main/java/WayofTime/bloodmagic/compat/jei/forge/TartaricForgeRecipeHandler.java index 3e5ec9ac..142a0af0 100644 --- a/src/main/java/WayofTime/bloodmagic/compat/jei/forge/SoulForgeRecipeHandler.java +++ b/src/main/java/WayofTime/bloodmagic/compat/jei/forge/TartaricForgeRecipeHandler.java @@ -6,13 +6,13 @@ import mezz.jei.api.recipe.IRecipeWrapper; import javax.annotation.Nonnull; -public class SoulForgeRecipeHandler implements IRecipeHandler +public class TartaricForgeRecipeHandler implements IRecipeHandler { @Nonnull @Override - public Class getRecipeClass() + public Class getRecipeClass() { - return SoulForgeRecipeJEI.class; + return TartaricForgeRecipeJEI.class; } @Nonnull @@ -24,13 +24,13 @@ public class SoulForgeRecipeHandler implements IRecipeHandler 0 && recipe.getOutputs().size() > 0; } diff --git a/src/main/java/WayofTime/bloodmagic/compat/jei/forge/SoulForgeRecipeJEI.java b/src/main/java/WayofTime/bloodmagic/compat/jei/forge/TartaricForgeRecipeJEI.java similarity index 88% rename from src/main/java/WayofTime/bloodmagic/compat/jei/forge/SoulForgeRecipeJEI.java rename to src/main/java/WayofTime/bloodmagic/compat/jei/forge/TartaricForgeRecipeJEI.java index ef416e12..9c175dba 100644 --- a/src/main/java/WayofTime/bloodmagic/compat/jei/forge/SoulForgeRecipeJEI.java +++ b/src/main/java/WayofTime/bloodmagic/compat/jei/forge/TartaricForgeRecipeJEI.java @@ -1,6 +1,6 @@ package WayofTime.bloodmagic.compat.jei.forge; -import WayofTime.bloodmagic.api.recipe.SoulForgeRecipe; +import WayofTime.bloodmagic.api.recipe.TartaricForgeRecipe; import WayofTime.bloodmagic.registry.ModItems; import lombok.Getter; import mezz.jei.api.recipe.BlankRecipeWrapper; @@ -11,14 +11,14 @@ import javax.annotation.Nonnull; import java.util.*; import java.util.List; -public class SoulForgeRecipeJEI extends BlankRecipeWrapper +public class TartaricForgeRecipeJEI extends BlankRecipeWrapper { @Getter - private SoulForgeRecipe recipe; + private TartaricForgeRecipe recipe; @Getter private Set validGems = new HashSet(); - public SoulForgeRecipeJEI(SoulForgeRecipe recipe) + public TartaricForgeRecipeJEI(TartaricForgeRecipe recipe) { this.recipe = recipe; diff --git a/src/main/java/WayofTime/bloodmagic/compat/jei/forge/TartaricForgeRecipeMaker.java b/src/main/java/WayofTime/bloodmagic/compat/jei/forge/TartaricForgeRecipeMaker.java new file mode 100644 index 00000000..17e44668 --- /dev/null +++ b/src/main/java/WayofTime/bloodmagic/compat/jei/forge/TartaricForgeRecipeMaker.java @@ -0,0 +1,23 @@ +package WayofTime.bloodmagic.compat.jei.forge; + +import WayofTime.bloodmagic.api.recipe.TartaricForgeRecipe; +import WayofTime.bloodmagic.api.registry.TartaricForgeRecipeRegistry; + +import javax.annotation.Nonnull; +import java.util.ArrayList; +import java.util.List; + +public class TartaricForgeRecipeMaker +{ + @Nonnull + public static List getRecipes() + { + List recipeList = TartaricForgeRecipeRegistry.getRecipeList(); + ArrayList recipes = new ArrayList(); + + for (TartaricForgeRecipe recipe : recipeList) + recipes.add(new TartaricForgeRecipeJEI(recipe)); + + return recipes; + } +} diff --git a/src/main/java/WayofTime/bloodmagic/entity/projectile/EntitySoulArrow.java b/src/main/java/WayofTime/bloodmagic/entity/projectile/EntitySentientArrow.java similarity index 64% rename from src/main/java/WayofTime/bloodmagic/entity/projectile/EntitySoulArrow.java rename to src/main/java/WayofTime/bloodmagic/entity/projectile/EntitySentientArrow.java index 2738ae1c..e5b1152c 100644 --- a/src/main/java/WayofTime/bloodmagic/entity/projectile/EntitySoulArrow.java +++ b/src/main/java/WayofTime/bloodmagic/entity/projectile/EntitySentientArrow.java @@ -1,33 +1,33 @@ package WayofTime.bloodmagic.entity.projectile; -import WayofTime.bloodmagic.api.soul.PlayerSoulHandler; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.projectile.EntityArrow; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.world.World; +import WayofTime.bloodmagic.api.soul.PlayerDemonWillHandler; -public class EntitySoulArrow extends EntityArrow +public class EntitySentientArrow extends EntityArrow { public double reimbursedAmountOnHit = 0; - public EntitySoulArrow(World worldIn) + public EntitySentientArrow(World worldIn) { super(worldIn); } - public EntitySoulArrow(World worldIn, double x, double y, double z) + public EntitySentientArrow(World worldIn, double x, double y, double z) { super(worldIn, x, y, z); } - public EntitySoulArrow(World worldIn, EntityLivingBase shooter, EntityLivingBase p_i1755_3_, float p_i1755_4_, float p_i1755_5_) + public EntitySentientArrow(World worldIn, EntityLivingBase shooter, EntityLivingBase p_i1755_3_, float p_i1755_4_, float p_i1755_5_) { super(worldIn, shooter, p_i1755_3_, p_i1755_4_, p_i1755_5_); } - public EntitySoulArrow(World worldIn, EntityLivingBase shooter, float velocity, double reimbursement) + public EntitySentientArrow(World worldIn, EntityLivingBase shooter, float velocity, double reimbursement) { super(worldIn, shooter, velocity); this.reimbursedAmountOnHit = reimbursement; @@ -37,7 +37,7 @@ public class EntitySoulArrow extends EntityArrow { if (this.shootingEntity instanceof EntityPlayer) { - PlayerSoulHandler.addSouls((EntityPlayer) this.shootingEntity, reimbursedAmountOnHit); + PlayerDemonWillHandler.addDemonWill((EntityPlayer) this.shootingEntity, reimbursedAmountOnHit); } } diff --git a/src/main/java/WayofTime/bloodmagic/item/soul/ItemMonsterSoul.java b/src/main/java/WayofTime/bloodmagic/item/soul/ItemMonsterSoul.java index 7c73d88c..5bf81a5c 100644 --- a/src/main/java/WayofTime/bloodmagic/item/soul/ItemMonsterSoul.java +++ b/src/main/java/WayofTime/bloodmagic/item/soul/ItemMonsterSoul.java @@ -11,11 +11,11 @@ import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; import WayofTime.bloodmagic.BloodMagic; import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.soul.ISoul; +import WayofTime.bloodmagic.api.soul.IDemonWill; import WayofTime.bloodmagic.api.util.helper.NBTHelper; import WayofTime.bloodmagic.util.helper.TextHelper; -public class ItemMonsterSoul extends Item implements ISoul +public class ItemMonsterSoul extends Item implements IDemonWill { public static String[] names = { "base" }; @@ -47,13 +47,13 @@ public class ItemMonsterSoul extends Item implements ISoul @SideOnly(Side.CLIENT) public void addInformation(ItemStack stack, EntityPlayer player, List tooltip, boolean advanced) { - tooltip.add(TextHelper.localize("tooltip.BloodMagic.souls", getSouls(stack))); + tooltip.add(TextHelper.localize("tooltip.BloodMagic.will", getWill(stack))); super.addInformation(stack, player, tooltip, advanced); } @Override - public double getSouls(ItemStack soulStack) + public double getWill(ItemStack soulStack) { NBTHelper.checkNBT(soulStack); @@ -63,7 +63,7 @@ public class ItemMonsterSoul extends Item implements ISoul } @Override - public void setSouls(ItemStack soulStack, double souls) + public void setWill(ItemStack soulStack, double souls) { NBTHelper.checkNBT(soulStack); @@ -73,21 +73,21 @@ public class ItemMonsterSoul extends Item implements ISoul } @Override - public double drainSouls(ItemStack soulStack, double drainAmount) + public double drainWill(ItemStack soulStack, double drainAmount) { - double souls = getSouls(soulStack); + double souls = getWill(soulStack); double soulsDrained = Math.min(drainAmount, souls); - setSouls(soulStack, souls - soulsDrained); + setWill(soulStack, souls - soulsDrained); return soulsDrained; } @Override - public ItemStack createSoul(int meta, double number) + public ItemStack createWill(int meta, double number) { ItemStack soulStack = new ItemStack(this, 1, meta); - setSouls(soulStack, number); + setWill(soulStack, number); return soulStack; } } diff --git a/src/main/java/WayofTime/bloodmagic/item/soul/ItemSoulBow.java b/src/main/java/WayofTime/bloodmagic/item/soul/ItemSentientBow.java similarity index 85% rename from src/main/java/WayofTime/bloodmagic/item/soul/ItemSoulBow.java rename to src/main/java/WayofTime/bloodmagic/item/soul/ItemSentientBow.java index 1fa01176..ea5d9029 100644 --- a/src/main/java/WayofTime/bloodmagic/item/soul/ItemSoulBow.java +++ b/src/main/java/WayofTime/bloodmagic/item/soul/ItemSentientBow.java @@ -15,14 +15,14 @@ import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; import WayofTime.bloodmagic.BloodMagic; import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.entity.projectile.EntitySoulArrow; +import WayofTime.bloodmagic.entity.projectile.EntitySentientArrow; -public class ItemSoulBow extends ItemBow +public class ItemSentientBow extends ItemBow { - public ItemSoulBow() + public ItemSentientBow() { super(); - setUnlocalizedName(Constants.Mod.MODID + ".soulBow"); + setUnlocalizedName(Constants.Mod.MODID + ".sentientBow"); this.setCreativeTab(BloodMagic.tabBloodMagic); } @@ -51,7 +51,7 @@ public class ItemSoulBow extends ItemBow f = 1.0F; } - EntityArrow entityarrow = new EntitySoulArrow(worldIn, playerIn, f * 2.0F, 0); + EntityArrow entityarrow = new EntitySentientArrow(worldIn, playerIn, f * 2.0F, 0); if (f == 1.0F) { @@ -109,13 +109,13 @@ public class ItemSoulBow extends ItemBow if (i >= 18) { - return new ModelResourceLocation("bloodmagic:ItemSoulBow_pulling_2", "inventory"); + return new ModelResourceLocation("bloodmagic:ItemSentientBow_pulling_2", "inventory"); } else if (i > 13) { - return new ModelResourceLocation("bloodmagic:ItemSoulBow_pulling_1", "inventory"); + return new ModelResourceLocation("bloodmagic:ItemSentientBow_pulling_1", "inventory"); } else if (i > 0) { - return new ModelResourceLocation("bloodmagic:ItemSoulBow_pulling_0", "inventory"); + return new ModelResourceLocation("bloodmagic:ItemSentientBow_pulling_0", "inventory"); } return null; diff --git a/src/main/java/WayofTime/bloodmagic/item/soul/ItemSoulSword.java b/src/main/java/WayofTime/bloodmagic/item/soul/ItemSentientSword.java similarity index 85% rename from src/main/java/WayofTime/bloodmagic/item/soul/ItemSoulSword.java rename to src/main/java/WayofTime/bloodmagic/item/soul/ItemSentientSword.java index 4c236de2..13243cd3 100644 --- a/src/main/java/WayofTime/bloodmagic/item/soul/ItemSoulSword.java +++ b/src/main/java/WayofTime/bloodmagic/item/soul/ItemSentientSword.java @@ -17,9 +17,9 @@ import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; import WayofTime.bloodmagic.BloodMagic; import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.soul.ISoul; -import WayofTime.bloodmagic.api.soul.ISoulWeapon; -import WayofTime.bloodmagic.api.soul.PlayerSoulHandler; +import WayofTime.bloodmagic.api.soul.IDemonWill; +import WayofTime.bloodmagic.api.soul.IDemonWillWeapon; +import WayofTime.bloodmagic.api.soul.PlayerDemonWillHandler; import WayofTime.bloodmagic.api.util.helper.NBTHelper; import WayofTime.bloodmagic.registry.ModItems; import WayofTime.bloodmagic.util.helper.TextHelper; @@ -27,17 +27,17 @@ import WayofTime.bloodmagic.util.helper.TextHelper; import com.google.common.collect.HashMultimap; import com.google.common.collect.Multimap; -public class ItemSoulSword extends ItemSword implements ISoulWeapon +public class ItemSentientSword extends ItemSword implements IDemonWillWeapon { public int[] soulBracket = new int[] { 16 }; public double[] damageAdded = new double[] { 1 }; public double[] soulDrainPerSwing = new double[] { 0.1 }; - public ItemSoulSword() + public ItemSentientSword() { super(ModItems.soulToolMaterial); - setUnlocalizedName(Constants.Mod.MODID + ".soul.sword"); + setUnlocalizedName(Constants.Mod.MODID + ".sentientSword"); setHasSubtypes(true); setNoRepair(); setCreativeTab(BloodMagic.tabBloodMagic); @@ -51,7 +51,7 @@ public class ItemSoulSword extends ItemSword implements ISoulWeapon if (getActivated(stack)) { - double soulsRemaining = PlayerSoulHandler.getTotalSouls(player); + double soulsRemaining = PlayerDemonWillHandler.getTotalDemonWill(player); int level = getLevel(stack, soulsRemaining); double drain = level >= 0 ? soulDrainPerSwing[level] : 0; @@ -90,7 +90,7 @@ public class ItemSoulSword extends ItemSword implements ISoulWeapon { NBTHelper.checkNBT(stack); - tooltip.add(TextHelper.localizeEffect("tooltip.BloodMagic.soul.sword.desc")); + tooltip.add(TextHelper.localizeEffect("tooltip.BloodMagic.sentientSword.desc")); if (getActivated(stack)) tooltip.add(TextHelper.localize("tooltip.BloodMagic.activated")); @@ -107,7 +107,7 @@ public class ItemSoulSword extends ItemSword implements ISoulWeapon double drain = this.getDrainOfActivatedSword(stack); if (drain > 0) { - double soulsRemaining = PlayerSoulHandler.getTotalSouls(player); + double soulsRemaining = PlayerDemonWillHandler.getTotalDemonWill(player); if (drain > soulsRemaining) { @@ -115,7 +115,7 @@ public class ItemSoulSword extends ItemSword implements ISoulWeapon return false; } else { - PlayerSoulHandler.consumeSouls(player, drain); + PlayerDemonWillHandler.consumeDemonWill(player, drain); } } @@ -138,17 +138,17 @@ public class ItemSoulSword extends ItemSword implements ISoulWeapon } @Override - public List getRandomSoulDrop(EntityLivingBase killedEntity, EntityLivingBase attackingEntity, ItemStack stack, int looting) + public List getRandomDemonWillDrop(EntityLivingBase killedEntity, EntityLivingBase attackingEntity, ItemStack stack, int looting) { List soulList = new ArrayList(); if (getActivated(stack)) { - ISoul soul = ((ISoul) ModItems.monsterSoul); + IDemonWill soul = ((IDemonWill) ModItems.monsterSoul); for (int i = 0; i <= looting; i++) { - ItemStack soulStack = soul.createSoul(0, (getDamageOfActivatedSword(stack) - 7) / 2 * attackingEntity.worldObj.rand.nextDouble() + 0.5); + ItemStack soulStack = soul.createWill(0, (getDamageOfActivatedSword(stack) - 7) / 2 * attackingEntity.worldObj.rand.nextDouble() + 0.5); soulList.add(soulStack); } } diff --git a/src/main/java/WayofTime/bloodmagic/item/soul/ItemSoulGem.java b/src/main/java/WayofTime/bloodmagic/item/soul/ItemSoulGem.java index 86612f72..dd5f70f4 100644 --- a/src/main/java/WayofTime/bloodmagic/item/soul/ItemSoulGem.java +++ b/src/main/java/WayofTime/bloodmagic/item/soul/ItemSoulGem.java @@ -11,12 +11,12 @@ import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; import WayofTime.bloodmagic.BloodMagic; import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.soul.ISoul; -import WayofTime.bloodmagic.api.soul.ISoulGem; +import WayofTime.bloodmagic.api.soul.IDemonWill; +import WayofTime.bloodmagic.api.soul.IDemonWillGem; import WayofTime.bloodmagic.api.util.helper.NBTHelper; import WayofTime.bloodmagic.util.helper.TextHelper; -public class ItemSoulGem extends Item implements ISoulGem +public class ItemSoulGem extends Item implements IDemonWillGem { public static String[] names = { "petty", "lesser", "common", "greater", "grand" }; @@ -49,7 +49,7 @@ public class ItemSoulGem extends Item implements ISoulGem for (int i = 0; i < names.length; i++) { ItemStack stack = new ItemStack(this, 1, i); - this.setSouls(stack, this.getMaxSouls(stack)); + this.setWill(stack, this.getMaxWill(stack)); list.add(stack); } } @@ -59,26 +59,26 @@ public class ItemSoulGem extends Item implements ISoulGem public void addInformation(ItemStack stack, EntityPlayer player, List tooltip, boolean advanced) { tooltip.add(TextHelper.localize("tooltip.BloodMagic.soulGem." + names[stack.getItemDamage()])); - tooltip.add(TextHelper.localize("tooltip.BloodMagic.souls", getSouls(stack))); + tooltip.add(TextHelper.localize("tooltip.BloodMagic.will", getWill(stack))); super.addInformation(stack, player, tooltip, advanced); } @Override - public ItemStack fillSoulGem(ItemStack soulGemStack, ItemStack soulStack) + public ItemStack fillDemonWillGem(ItemStack soulGemStack, ItemStack soulStack) { - if (soulStack != null && soulStack.getItem() instanceof ISoul) + if (soulStack != null && soulStack.getItem() instanceof IDemonWill) { - ISoul soul = (ISoul) soulStack.getItem(); - double soulsLeft = getSouls(soulGemStack); + IDemonWill soul = (IDemonWill) soulStack.getItem(); + double soulsLeft = getWill(soulGemStack); - if (soulsLeft < getMaxSouls(soulGemStack)) + if (soulsLeft < getMaxWill(soulGemStack)) { - double newSoulsLeft = Math.min(soulsLeft + soul.getSouls(soulStack), getMaxSouls(soulGemStack)); - soul.drainSouls(soulStack, newSoulsLeft - soulsLeft); + double newSoulsLeft = Math.min(soulsLeft + soul.getWill(soulStack), getMaxWill(soulGemStack)); + soul.drainWill(soulStack, newSoulsLeft - soulsLeft); - setSouls(soulGemStack, newSoulsLeft); - if (soul.getSouls(soulStack) <= 0) + setWill(soulGemStack, newSoulsLeft); + if (soul.getWill(soulStack) <= 0) { return null; } @@ -89,7 +89,7 @@ public class ItemSoulGem extends Item implements ISoulGem } @Override - public double getSouls(ItemStack soulGemStack) + public double getWill(ItemStack soulGemStack) { NBTHelper.checkNBT(soulGemStack); @@ -99,7 +99,7 @@ public class ItemSoulGem extends Item implements ISoulGem } @Override - public void setSouls(ItemStack soulGemStack, double souls) + public void setWill(ItemStack soulGemStack, double souls) { NBTHelper.checkNBT(soulGemStack); @@ -109,18 +109,18 @@ public class ItemSoulGem extends Item implements ISoulGem } @Override - public double drainSouls(ItemStack soulGemStack, double drainAmount) + public double drainWill(ItemStack soulGemStack, double drainAmount) { - double souls = getSouls(soulGemStack); + double souls = getWill(soulGemStack); double soulsDrained = Math.min(drainAmount, souls); - setSouls(soulGemStack, souls - soulsDrained); + setWill(soulGemStack, souls - soulsDrained); return soulsDrained; } @Override - public int getMaxSouls(ItemStack soulGemStack) + public int getMaxWill(ItemStack soulGemStack) { switch (soulGemStack.getMetadata()) { diff --git a/src/main/java/WayofTime/bloodmagic/proxy/ClientProxy.java b/src/main/java/WayofTime/bloodmagic/proxy/ClientProxy.java index a1cc5d4e..9678675a 100644 --- a/src/main/java/WayofTime/bloodmagic/proxy/ClientProxy.java +++ b/src/main/java/WayofTime/bloodmagic/proxy/ClientProxy.java @@ -10,9 +10,9 @@ import net.minecraftforge.fml.common.FMLCommonHandler; import WayofTime.bloodmagic.api.Constants; import WayofTime.bloodmagic.client.render.RenderAlchemyArray; import WayofTime.bloodmagic.client.render.RenderAltar; -import WayofTime.bloodmagic.client.render.entity.SoulArrowRenderFactory; +import WayofTime.bloodmagic.client.render.entity.SentientArrowRenderFactory; import WayofTime.bloodmagic.client.render.entity.SoulSnareRenderFactory; -import WayofTime.bloodmagic.entity.projectile.EntitySoulArrow; +import WayofTime.bloodmagic.entity.projectile.EntitySentientArrow; import WayofTime.bloodmagic.entity.projectile.EntitySoulSnare; import WayofTime.bloodmagic.registry.ModBlocks; import WayofTime.bloodmagic.registry.ModItems; @@ -54,7 +54,7 @@ public class ClientProxy extends CommonProxy public void registerRenderers() { RenderingRegistry.registerEntityRenderingHandler(EntitySoulSnare.class, new SoulSnareRenderFactory()); - RenderingRegistry.registerEntityRenderingHandler(EntitySoulArrow.class, new SoulArrowRenderFactory()); + RenderingRegistry.registerEntityRenderingHandler(EntitySentientArrow.class, new SentientArrowRenderFactory()); } @Override diff --git a/src/main/java/WayofTime/bloodmagic/registry/ModEntities.java b/src/main/java/WayofTime/bloodmagic/registry/ModEntities.java index a467175c..12667fef 100644 --- a/src/main/java/WayofTime/bloodmagic/registry/ModEntities.java +++ b/src/main/java/WayofTime/bloodmagic/registry/ModEntities.java @@ -3,7 +3,7 @@ package WayofTime.bloodmagic.registry; import net.minecraftforge.fml.common.registry.EntityRegistry; import WayofTime.bloodmagic.BloodMagic; import WayofTime.bloodmagic.entity.projectile.EntityBloodLight; -import WayofTime.bloodmagic.entity.projectile.EntitySoulArrow; +import WayofTime.bloodmagic.entity.projectile.EntitySentientArrow; import WayofTime.bloodmagic.entity.projectile.EntitySoulSnare; public class ModEntities @@ -14,6 +14,6 @@ public class ModEntities EntityRegistry.registerModEntity(EntityBloodLight.class, "BloodLight", id++, BloodMagic.instance, 64, 20, true); EntityRegistry.registerModEntity(EntitySoulSnare.class, "SoulSnare", id++, BloodMagic.instance, 64, 1, true); - EntityRegistry.registerModEntity(EntitySoulArrow.class, "SoulArrow", id++, BloodMagic.instance, 64, 1, true); + EntityRegistry.registerModEntity(EntitySentientArrow.class, "SoulArrow", id++, BloodMagic.instance, 64, 1, true); } } diff --git a/src/main/java/WayofTime/bloodmagic/registry/ModItems.java b/src/main/java/WayofTime/bloodmagic/registry/ModItems.java index 94c23679..38b3ff0e 100644 --- a/src/main/java/WayofTime/bloodmagic/registry/ModItems.java +++ b/src/main/java/WayofTime/bloodmagic/registry/ModItems.java @@ -47,10 +47,10 @@ import WayofTime.bloodmagic.item.sigil.ItemSigilVoid; import WayofTime.bloodmagic.item.sigil.ItemSigilWater; import WayofTime.bloodmagic.item.sigil.ItemSigilWhirlwind; import WayofTime.bloodmagic.item.soul.ItemMonsterSoul; -import WayofTime.bloodmagic.item.soul.ItemSoulBow; +import WayofTime.bloodmagic.item.soul.ItemSentientBow; +import WayofTime.bloodmagic.item.soul.ItemSentientSword; import WayofTime.bloodmagic.item.soul.ItemSoulGem; import WayofTime.bloodmagic.item.soul.ItemSoulSnare; -import WayofTime.bloodmagic.item.soul.ItemSoulSword; import WayofTime.bloodmagic.util.helper.InventoryRenderHelper; public class ModItems @@ -117,8 +117,8 @@ public class ModItems public static Item soulGem; public static Item soulSnare; - public static Item soulSword; - public static Item soulBow; + public static Item sentientSword; + public static Item sentientBow; public static Item.ToolMaterial boundToolMaterial = EnumHelper.addToolMaterial("BoundToolMaterial", 4, 0, 10, 8, 50); public static Item.ToolMaterial soulToolMaterial = EnumHelper.addToolMaterial("SoulToolMaterial", 4, 0, 7, 8, 50); @@ -195,8 +195,8 @@ public class ModItems soulGem = registerItem(new ItemSoulGem()); soulSnare = registerItem(new ItemSoulSnare()); - soulSword = registerItem(new ItemSoulSword()); - soulBow = registerItem(new ItemSoulBow()); + sentientSword = registerItem(new ItemSentientSword()); + sentientBow = registerItem(new ItemSentientBow()); } public static void initRenders() @@ -303,12 +303,12 @@ public class ModItems renderHelper.itemRender(soulGem, 4); renderHelper.itemRender(soulSnare); - renderHelper.itemRender(soulSword, 0); - renderHelper.itemRender(soulSword, 1); - renderHelper.itemRender(soulBow, 0, "ItemSoulBow"); - renderHelper.itemRender(soulBow, 1, "ItemSoulBow_pulling_0"); - renderHelper.itemRender(soulBow, 2, "ItemSoulBow_pulling_1"); - renderHelper.itemRender(soulBow, 3, "ItemSoulBow_pulling_2"); + renderHelper.itemRender(sentientSword, 0); + renderHelper.itemRender(sentientSword, 1); + renderHelper.itemRender(sentientBow, 0, "ItemSentientBow"); + renderHelper.itemRender(sentientBow, 1, "ItemSentientBow_pulling_0"); + renderHelper.itemRender(sentientBow, 2, "ItemSentientBow_pulling_1"); + renderHelper.itemRender(sentientBow, 3, "ItemSentientBow_pulling_2"); } diff --git a/src/main/java/WayofTime/bloodmagic/registry/ModRecipes.java b/src/main/java/WayofTime/bloodmagic/registry/ModRecipes.java index 1847c8d0..6ea4bf82 100644 --- a/src/main/java/WayofTime/bloodmagic/registry/ModRecipes.java +++ b/src/main/java/WayofTime/bloodmagic/registry/ModRecipes.java @@ -17,7 +17,7 @@ import WayofTime.bloodmagic.api.recipe.ShapelessBloodOrbRecipe; import WayofTime.bloodmagic.api.registry.AlchemyArrayRecipeRegistry; import WayofTime.bloodmagic.api.registry.AltarRecipeRegistry; import WayofTime.bloodmagic.api.registry.OrbRegistry; -import WayofTime.bloodmagic.api.registry.SoulForgeRecipeRegistry; +import WayofTime.bloodmagic.api.registry.TartaricForgeRecipeRegistry; import WayofTime.bloodmagic.api.ritual.EnumRuneType; import WayofTime.bloodmagic.client.render.alchemyArray.BindingAlchemyCircleRenderer; import WayofTime.bloodmagic.compress.AdvancedCompressionHandler; @@ -151,21 +151,21 @@ public class ModRecipes public static void addSoulForgeRecipes() { - SoulForgeRecipeRegistry.registerRecipe(new ItemStack(ModItems.soulGem), 1, 1, "dustRedstone", "ingotGold", "blockGlass", "dyeBlue"); - SoulForgeRecipeRegistry.registerRecipe(new ItemStack(ModItems.soulGem, 1, 1), 60, 20, new ItemStack(ModItems.soulGem), "gemDiamond", "blockRedstone", "blockLapis"); - SoulForgeRecipeRegistry.registerRecipe(new ItemStack(ModItems.soulGem, 1, 2), 240, 50, new ItemStack(ModItems.soulGem, 1, 1), "gemDiamond", "blockGold", new ItemStack(ModItems.slate, 1, 2)); - SoulForgeRecipeRegistry.registerRecipe(new ItemStack(ModItems.soulSword), 0, 0, new ItemStack(ModItems.soulGem), new ItemStack(Items.iron_sword)); - SoulForgeRecipeRegistry.registerRecipe(new ItemStack(ModItems.soulBow), 70, 0, new ItemStack(Items.bow), new ItemStack(ModItems.soulGem, 1, 1), Items.string, Items.string); - SoulForgeRecipeRegistry.registerRecipe(new ItemStack(ModItems.arcaneAshes), 0, 0, "dustRedstone", "dyeWhite", new ItemStack(Items.gunpowder), Items.coal); - SoulForgeRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.REAGENT_WATER), 10, 3, "sugar", new ItemStack(Items.water_bucket), new ItemStack(Items.water_bucket)); - SoulForgeRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.REAGENT_LAVA), 32, 10, Items.lava_bucket, "dustRedstone", "cobblestone", "blockCoal"); - SoulForgeRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.REAGENT_VOID), 64, 10, Items.bucket, Items.string, Items.string, Items.gunpowder); - SoulForgeRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.REAGENT_GROWTH), 128, 20, "treeSapling", "treeSapling", Items.reeds, Items.sugar); - SoulForgeRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.REAGENT_AIR), 128, 20, Items.ghast_tear, Items.feather, Items.feather); - SoulForgeRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.REAGENT_SIGHT), 64, 0, ModItems.sigilDivination, "blockGlass", "blockGlass", "dustGlowstone"); - SoulForgeRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.REAGENT_FASTMINER), 128, 10, Items.iron_pickaxe, Items.iron_axe, Items.iron_shovel, Items.gunpowder); - SoulForgeRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.REAGENT_AFFINITY), 300, 30, ModItems.sigilWater, ModItems.sigilAir, ModItems.sigilLava, Blocks.obsidian); - SoulForgeRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.REAGENT_SUPPRESSION), 500, 50, ModBlocks.teleposer, Items.water_bucket, Items.lava_bucket, Items.blaze_rod); - SoulForgeRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.REAGENT_BINDING), 400, 10, "dustGlowstone", "dustRedstone", "nuggetGold", Items.gunpowder); + TartaricForgeRecipeRegistry.registerRecipe(new ItemStack(ModItems.soulGem), 1, 1, "dustRedstone", "ingotGold", "blockGlass", "dyeBlue"); + TartaricForgeRecipeRegistry.registerRecipe(new ItemStack(ModItems.soulGem, 1, 1), 60, 20, new ItemStack(ModItems.soulGem), "gemDiamond", "blockRedstone", "blockLapis"); + TartaricForgeRecipeRegistry.registerRecipe(new ItemStack(ModItems.soulGem, 1, 2), 240, 50, new ItemStack(ModItems.soulGem, 1, 1), "gemDiamond", "blockGold", new ItemStack(ModItems.slate, 1, 2)); + TartaricForgeRecipeRegistry.registerRecipe(new ItemStack(ModItems.sentientSword), 0, 0, new ItemStack(ModItems.soulGem), new ItemStack(Items.iron_sword)); + TartaricForgeRecipeRegistry.registerRecipe(new ItemStack(ModItems.sentientBow), 70, 0, new ItemStack(Items.bow), new ItemStack(ModItems.soulGem, 1, 1), Items.string, Items.string); + TartaricForgeRecipeRegistry.registerRecipe(new ItemStack(ModItems.arcaneAshes), 0, 0, "dustRedstone", "dyeWhite", new ItemStack(Items.gunpowder), Items.coal); + TartaricForgeRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.REAGENT_WATER), 10, 3, "sugar", new ItemStack(Items.water_bucket), new ItemStack(Items.water_bucket)); + TartaricForgeRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.REAGENT_LAVA), 32, 10, Items.lava_bucket, "dustRedstone", "cobblestone", "blockCoal"); + TartaricForgeRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.REAGENT_VOID), 64, 10, Items.bucket, Items.string, Items.string, Items.gunpowder); + TartaricForgeRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.REAGENT_GROWTH), 128, 20, "treeSapling", "treeSapling", Items.reeds, Items.sugar); + TartaricForgeRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.REAGENT_AIR), 128, 20, Items.ghast_tear, Items.feather, Items.feather); + TartaricForgeRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.REAGENT_SIGHT), 64, 0, ModItems.sigilDivination, "blockGlass", "blockGlass", "dustGlowstone"); + TartaricForgeRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.REAGENT_FASTMINER), 128, 10, Items.iron_pickaxe, Items.iron_axe, Items.iron_shovel, Items.gunpowder); + TartaricForgeRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.REAGENT_AFFINITY), 300, 30, ModItems.sigilWater, ModItems.sigilAir, ModItems.sigilLava, Blocks.obsidian); + TartaricForgeRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.REAGENT_SUPPRESSION), 500, 50, ModBlocks.teleposer, Items.water_bucket, Items.lava_bucket, Items.blaze_rod); + TartaricForgeRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.REAGENT_BINDING), 400, 10, "dustGlowstone", "dustRedstone", "nuggetGold", Items.gunpowder); } } diff --git a/src/main/java/WayofTime/bloodmagic/tile/TileSoulForge.java b/src/main/java/WayofTime/bloodmagic/tile/TileSoulForge.java index 20b0041e..dbd75750 100644 --- a/src/main/java/WayofTime/bloodmagic/tile/TileSoulForge.java +++ b/src/main/java/WayofTime/bloodmagic/tile/TileSoulForge.java @@ -7,10 +7,10 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.ITickable; import WayofTime.bloodmagic.api.Constants; -import WayofTime.bloodmagic.api.recipe.SoulForgeRecipe; -import WayofTime.bloodmagic.api.registry.SoulForgeRecipeRegistry; -import WayofTime.bloodmagic.api.soul.ISoul; -import WayofTime.bloodmagic.api.soul.ISoulGem; +import WayofTime.bloodmagic.api.recipe.TartaricForgeRecipe; +import WayofTime.bloodmagic.api.registry.TartaricForgeRecipeRegistry; +import WayofTime.bloodmagic.api.soul.IDemonWill; +import WayofTime.bloodmagic.api.soul.IDemonWillGem; public class TileSoulForge extends TileInventory implements ITickable { @@ -53,7 +53,7 @@ public class TileSoulForge extends TileInventory implements ITickable return; } - double soulsInGem = getSouls(); + double soulsInGem = getWill(); List inputList = new ArrayList(); @@ -65,7 +65,7 @@ public class TileSoulForge extends TileInventory implements ITickable } } - SoulForgeRecipe recipe = SoulForgeRecipeRegistry.getMatchingRecipe(inputList, getWorld(), getPos()); + TartaricForgeRecipe recipe = TartaricForgeRecipeRegistry.getMatchingRecipe(inputList, getWorld(), getPos()); if (recipe != null && (soulsInGem >= recipe.getMinimumSouls() || burnTime > 0)) { if (canCraft(recipe)) @@ -103,7 +103,7 @@ public class TileSoulForge extends TileInventory implements ITickable return ((double) burnTime) / ticksRequired; } - private boolean canCraft(SoulForgeRecipe recipe) + private boolean canCraft(TartaricForgeRecipe recipe) { if (recipe == null) { @@ -123,7 +123,7 @@ public class TileSoulForge extends TileInventory implements ITickable } - public void craftItem(SoulForgeRecipe recipe) + public void craftItem(TartaricForgeRecipe recipe) { if (this.canCraft(recipe)) { @@ -148,7 +148,7 @@ public class TileSoulForge extends TileInventory implements ITickable if (soulStack != null) { - if (soulStack.getItem() instanceof ISoul || soulStack.getItem() instanceof ISoulGem) + if (soulStack.getItem() instanceof IDemonWill || soulStack.getItem() instanceof IDemonWillGem) { return true; } @@ -157,22 +157,22 @@ public class TileSoulForge extends TileInventory implements ITickable return false; } - public double getSouls() + public double getWill() { ItemStack soulStack = getStackInSlot(soulSlot); if (soulStack != null) { - if (soulStack.getItem() instanceof ISoul) + if (soulStack.getItem() instanceof IDemonWill) { - ISoul soul = (ISoul) soulStack.getItem(); - return soul.getSouls(soulStack); + IDemonWill soul = (IDemonWill) soulStack.getItem(); + return soul.getWill(soulStack); } - if (soulStack.getItem() instanceof ISoulGem) + if (soulStack.getItem() instanceof IDemonWillGem) { - ISoulGem soul = (ISoulGem) soulStack.getItem(); - return soul.getSouls(soulStack); + IDemonWillGem soul = (IDemonWillGem) soulStack.getItem(); + return soul.getWill(soulStack); } } @@ -185,21 +185,21 @@ public class TileSoulForge extends TileInventory implements ITickable if (soulStack != null) { - if (soulStack.getItem() instanceof ISoul) + if (soulStack.getItem() instanceof IDemonWill) { - ISoul soul = (ISoul) soulStack.getItem(); - double souls = soul.drainSouls(soulStack, requested); - if (soul.getSouls(soulStack) <= 0) + IDemonWill soul = (IDemonWill) soulStack.getItem(); + double souls = soul.drainWill(soulStack, requested); + if (soul.getWill(soulStack) <= 0) { setInventorySlotContents(soulSlot, null); } return souls; } - if (soulStack.getItem() instanceof ISoulGem) + if (soulStack.getItem() instanceof IDemonWillGem) { - ISoulGem soul = (ISoulGem) soulStack.getItem(); - return soul.drainSouls(soulStack, requested); + IDemonWillGem soul = (IDemonWillGem) soulStack.getItem(); + return soul.drainWill(soulStack, requested); } } diff --git a/src/main/java/WayofTime/bloodmagic/tile/container/ContainerSoulForge.java b/src/main/java/WayofTime/bloodmagic/tile/container/ContainerSoulForge.java index 9ba7e8a9..439cfa50 100644 --- a/src/main/java/WayofTime/bloodmagic/tile/container/ContainerSoulForge.java +++ b/src/main/java/WayofTime/bloodmagic/tile/container/ContainerSoulForge.java @@ -6,8 +6,8 @@ import net.minecraft.inventory.Container; import net.minecraft.inventory.IInventory; import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; -import WayofTime.bloodmagic.api.soul.ISoul; -import WayofTime.bloodmagic.api.soul.ISoulGem; +import WayofTime.bloodmagic.api.soul.IDemonWill; +import WayofTime.bloodmagic.api.soul.IDemonWillGem; import WayofTime.bloodmagic.tile.TileSoulForge; public class ContainerSoulForge extends Container @@ -59,7 +59,7 @@ public class ContainerSoulForge extends Container slot.onSlotChange(itemstack1, itemstack); } else if (index > 5) { - if (itemstack1.getItem() instanceof ISoul || itemstack1.getItem() instanceof ISoulGem) + if (itemstack1.getItem() instanceof IDemonWill || itemstack1.getItem() instanceof IDemonWillGem) { if (!this.mergeItemStack(itemstack1, 4, 5, false)) { @@ -109,7 +109,7 @@ public class ContainerSoulForge extends Container @Override public boolean isItemValid(ItemStack itemStack) { - return itemStack.getItem() instanceof ISoulGem || itemStack.getItem() instanceof ISoul; + return itemStack.getItem() instanceof IDemonWillGem || itemStack.getItem() instanceof IDemonWill; } } diff --git a/src/main/java/WayofTime/bloodmagic/util/handler/EventHandler.java b/src/main/java/WayofTime/bloodmagic/util/handler/EventHandler.java index 22bf7e91..fa33d84e 100644 --- a/src/main/java/WayofTime/bloodmagic/util/handler/EventHandler.java +++ b/src/main/java/WayofTime/bloodmagic/util/handler/EventHandler.java @@ -36,12 +36,12 @@ import WayofTime.bloodmagic.api.Constants; import WayofTime.bloodmagic.api.event.SacrificeKnifeUsedEvent; import WayofTime.bloodmagic.api.event.TeleposeEvent; import WayofTime.bloodmagic.api.livingArmour.LivingArmourUpgrade; -import WayofTime.bloodmagic.api.soul.ISoul; -import WayofTime.bloodmagic.api.soul.ISoulWeapon; -import WayofTime.bloodmagic.api.soul.PlayerSoulHandler; +import WayofTime.bloodmagic.api.soul.IDemonWill; +import WayofTime.bloodmagic.api.soul.IDemonWillWeapon; +import WayofTime.bloodmagic.api.soul.PlayerDemonWillHandler; import WayofTime.bloodmagic.api.util.helper.PlayerHelper; import WayofTime.bloodmagic.block.BlockAltar; -import WayofTime.bloodmagic.entity.projectile.EntitySoulArrow; +import WayofTime.bloodmagic.entity.projectile.EntitySentientArrow; import WayofTime.bloodmagic.item.ItemAltarMaker; import WayofTime.bloodmagic.item.armour.ItemLivingArmour; import WayofTime.bloodmagic.item.gear.ItemPackSacrifice; @@ -272,10 +272,10 @@ public class EventHandler } } - if (sourceEntity instanceof EntitySoulArrow) + if (sourceEntity instanceof EntitySentientArrow) { // Soul Weapon handling - ((EntitySoulArrow) sourceEntity).reimbursePlayer(); + ((EntitySentientArrow) sourceEntity).reimbursePlayer(); } if (sourceEntity instanceof EntityPlayer) @@ -414,7 +414,7 @@ public class EventHandler int lvl = eff.getAmplifier(); double amountOfSouls = random.nextDouble() * (lvl + 1) * (lvl + 1) * 5; - ItemStack soulStack = ((ISoul) ModItems.monsterSoul).createSoul(0, amountOfSouls); + ItemStack soulStack = ((IDemonWill) ModItems.monsterSoul).createWill(0, amountOfSouls); event.drops.add(new EntityItem(attackedEntity.worldObj, attackedEntity.posX, attackedEntity.posY, attackedEntity.posZ, soulStack)); } @@ -422,9 +422,9 @@ public class EventHandler { EntityLivingBase attackingEntity = (EntityLivingBase) entity; ItemStack heldStack = attackingEntity.getHeldItem(); - if (heldStack != null && heldStack.getItem() instanceof ISoulWeapon) + if (heldStack != null && heldStack.getItem() instanceof IDemonWillWeapon) { - List droppedSouls = ((ISoulWeapon) heldStack.getItem()).getRandomSoulDrop(attackedEntity, attackingEntity, heldStack, event.lootingLevel); + List droppedSouls = ((IDemonWillWeapon) heldStack.getItem()).getRandomDemonWillDrop(attackedEntity, attackingEntity, heldStack, event.lootingLevel); if (!droppedSouls.isEmpty()) { for (ItemStack soulStack : droppedSouls) @@ -440,13 +440,13 @@ public class EventHandler public void onItemPickup(EntityItemPickupEvent event) { ItemStack stack = event.item.getEntityItem(); - if (stack != null && stack.getItem() instanceof ISoul) + if (stack != null && stack.getItem() instanceof IDemonWill) { EntityPlayer player = event.entityPlayer; - ItemStack remainder = PlayerSoulHandler.addSouls(player, stack); + ItemStack remainder = PlayerDemonWillHandler.addDemonWill(player, stack); - if (remainder == null || ((ISoul) stack.getItem()).getSouls(stack) < 0.0001) + if (remainder == null || ((IDemonWill) stack.getItem()).getWill(stack) < 0.0001) { stack.stackSize = 0; event.setResult(Result.ALLOW); diff --git a/src/main/resources/assets/bloodmagic/lang/en_US.lang b/src/main/resources/assets/bloodmagic/lang/en_US.lang index 443f2932..1e4c22d2 100644 --- a/src/main/resources/assets/bloodmagic/lang/en_US.lang +++ b/src/main/resources/assets/bloodmagic/lang/en_US.lang @@ -76,7 +76,7 @@ item.BloodMagic.baseComponent.reagentSight.name=Sight Reagent item.BloodMagic.baseComponent.reagentBinding.name=Binding Reagent item.BloodMagic.baseComponent.reagentSuppression.name=Suppression Reagent -item.BloodMagic.monsterSoul.base.name=Monster Soul +item.BloodMagic.monsterSoul.base.name=Demonic Will item.BloodMagic.sigil.air.name=Air Sigil item.BloodMagic.sigil.bloodLight.name=Sigil of the Blood Lamp @@ -109,14 +109,14 @@ item.BloodMagic.ritualDivinerdawn.name=Ritual Diviner [Dawn] item.BloodMagic.arcaneAshes.name=Arcane Ashes -item.BloodMagic.soul.sword.name=Soul Sword -item.BloodMagic.soulGem.petty.name=Petty Soul Gem -item.BloodMagic.soulGem.lesser.name=Lesser Soul Gem -item.BloodMagic.soulGem.common.name=Common Soul Gem -item.BloodMagic.soulGem.greater.name=Greater Soul Gem -item.BloodMagic.soulGem.grand.name=Grand Soul Gem -item.BloodMagic.soulSnare.base.name=Rudimentary Soul Snare -item.BloodMagic.soulBow.name=Soul Bow +item.BloodMagic.sentientSword.name=Sentient Sword +item.BloodMagic.soulGem.petty.name=Petty Tartaric Gem +item.BloodMagic.soulGem.lesser.name=Lesser Tartaric Gem +item.BloodMagic.soulGem.common.name=Common Tartaric Gem +item.BloodMagic.soulGem.greater.name=Greater Tartaric Gem +item.BloodMagic.soulGem.grand.name=Grand Tartaric Gem +item.BloodMagic.soulSnare.base.name=Rudimentary Snare +item.BloodMagic.sentientBow.name=Sentient Bow # Blocks tile.BloodMagic.fluid.lifeEssence.name=Life Essence @@ -155,7 +155,7 @@ tile.BloodMagic.spectralBlock.name=Spectral Block tile.BloodMagic.phantomBlock.name=Phantom Block tile.BloodMagic.teleposer.name=Teleposer -tile.BloodMagic.soulForge.name=Soul Forge +tile.BloodMagic.soulForge.name=Hellfire Forge # Tooltips tooltip.BloodMagic.orb.desc=Stores raw Life Essence @@ -243,15 +243,15 @@ tooltip.BloodMagic.livingArmour.upgrade.meleeDamage=Fierce Strike tooltip.BloodMagic.livingArmour.upgrade.arrowShot=Trick Shot tooltip.BloodMagic.livingArmour.upgrade.level=(Level %d) -tooltip.BloodMagic.souls=Soul Quality: %1$,.2f -tooltip.BloodMagic.soul.sword.desc=Uses souls to unleash its full potential. +tooltip.BloodMagic.will=Will Quality: %1$,.2f +tooltip.BloodMagic.sentientSword.desc=Uses souls to unleash its full potential. tooltip.BloodMagic.soulGem.petty=A gem used to contain a few souls tooltip.BloodMagic.soulGem.lesser=A gem used to contain more souls tooltip.BloodMagic.soulGem.common=A gem used to contain many souls tooltip.BloodMagic.soulGem.greater=A gem used to contain a great amount of souls tooltip.BloodMagic.soulGem.grand=A gem that can hold a LOT of souls tooltip.BloodMagic.soulSnare.desc1=Throw at a monster and then -tooltip.BloodMagic.soulSnare.desc2=kill them to get a monster soul +tooltip.BloodMagic.soulSnare.desc2=kill them to obtain their demonic will # Ritual ritual.BloodMagic.testRitual=Test Ritual diff --git a/src/main/resources/assets/bloodmagic/models/item/ItemSoulBow.json b/src/main/resources/assets/bloodmagic/models/item/ItemSentientBow.json similarity index 89% rename from src/main/resources/assets/bloodmagic/models/item/ItemSoulBow.json rename to src/main/resources/assets/bloodmagic/models/item/ItemSentientBow.json index 7b3bd30b..7becea77 100644 --- a/src/main/resources/assets/bloodmagic/models/item/ItemSoulBow.json +++ b/src/main/resources/assets/bloodmagic/models/item/ItemSentientBow.json @@ -1,7 +1,7 @@ { "parent": "builtin/generated", "textures": { - "layer0": "bloodmagic:items/SoulBow" + "layer0": "bloodmagic:items/SentientBow" }, "display": { "thirdperson": { diff --git a/src/main/resources/assets/bloodmagic/models/item/ItemSoulBow_pulling_0.json b/src/main/resources/assets/bloodmagic/models/item/ItemSentientBow_pulling_0.json similarity index 87% rename from src/main/resources/assets/bloodmagic/models/item/ItemSoulBow_pulling_0.json rename to src/main/resources/assets/bloodmagic/models/item/ItemSentientBow_pulling_0.json index 7e269129..08eb3bb7 100644 --- a/src/main/resources/assets/bloodmagic/models/item/ItemSoulBow_pulling_0.json +++ b/src/main/resources/assets/bloodmagic/models/item/ItemSentientBow_pulling_0.json @@ -1,7 +1,7 @@ { "parent": "builtin/generated", "textures": { - "layer0": "bloodmagic:items/SoulBow_pulling_0" + "layer0": "bloodmagic:items/SentientBow_pulling_0" }, "display": { "thirdperson": { diff --git a/src/main/resources/assets/bloodmagic/models/item/ItemSoulBow_pulling_2.json b/src/main/resources/assets/bloodmagic/models/item/ItemSentientBow_pulling_1.json similarity index 87% rename from src/main/resources/assets/bloodmagic/models/item/ItemSoulBow_pulling_2.json rename to src/main/resources/assets/bloodmagic/models/item/ItemSentientBow_pulling_1.json index a26ab923..c1c5d61f 100644 --- a/src/main/resources/assets/bloodmagic/models/item/ItemSoulBow_pulling_2.json +++ b/src/main/resources/assets/bloodmagic/models/item/ItemSentientBow_pulling_1.json @@ -1,7 +1,7 @@ { "parent": "builtin/generated", "textures": { - "layer0": "bloodmagic:items/SoulBow_pulling_2" + "layer0": "bloodmagic:items/SentientBow_pulling_1" }, "display": { "thirdperson": { diff --git a/src/main/resources/assets/bloodmagic/models/item/ItemSoulBow_pulling_1.json b/src/main/resources/assets/bloodmagic/models/item/ItemSentientBow_pulling_2.json similarity index 87% rename from src/main/resources/assets/bloodmagic/models/item/ItemSoulBow_pulling_1.json rename to src/main/resources/assets/bloodmagic/models/item/ItemSentientBow_pulling_2.json index 5f28c697..42c22e8a 100644 --- a/src/main/resources/assets/bloodmagic/models/item/ItemSoulBow_pulling_1.json +++ b/src/main/resources/assets/bloodmagic/models/item/ItemSentientBow_pulling_2.json @@ -1,7 +1,7 @@ { "parent": "builtin/generated", "textures": { - "layer0": "bloodmagic:items/SoulBow_pulling_1" + "layer0": "bloodmagic:items/SentientBow_pulling_2" }, "display": { "thirdperson": { diff --git a/src/main/resources/assets/bloodmagic/models/item/ItemSoulSword0.json b/src/main/resources/assets/bloodmagic/models/item/ItemSentientSword0.json similarity index 100% rename from src/main/resources/assets/bloodmagic/models/item/ItemSoulSword0.json rename to src/main/resources/assets/bloodmagic/models/item/ItemSentientSword0.json diff --git a/src/main/resources/assets/bloodmagic/models/item/ItemSoulSword1.json b/src/main/resources/assets/bloodmagic/models/item/ItemSentientSword1.json similarity index 100% rename from src/main/resources/assets/bloodmagic/models/item/ItemSoulSword1.json rename to src/main/resources/assets/bloodmagic/models/item/ItemSentientSword1.json diff --git a/src/main/resources/assets/bloodmagic/textures/items/SoulBow.png b/src/main/resources/assets/bloodmagic/textures/items/SentientBow.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SoulBow.png rename to src/main/resources/assets/bloodmagic/textures/items/SentientBow.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SoulBow_pulling_0.png b/src/main/resources/assets/bloodmagic/textures/items/SentientBow_pulling_0.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SoulBow_pulling_0.png rename to src/main/resources/assets/bloodmagic/textures/items/SentientBow_pulling_0.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SoulBow_pulling_1.png b/src/main/resources/assets/bloodmagic/textures/items/SentientBow_pulling_1.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SoulBow_pulling_1.png rename to src/main/resources/assets/bloodmagic/textures/items/SentientBow_pulling_1.png diff --git a/src/main/resources/assets/bloodmagic/textures/items/SoulBow_pulling_2.png b/src/main/resources/assets/bloodmagic/textures/items/SentientBow_pulling_2.png similarity index 100% rename from src/main/resources/assets/bloodmagic/textures/items/SoulBow_pulling_2.png rename to src/main/resources/assets/bloodmagic/textures/items/SentientBow_pulling_2.png