Renamed nomenclature to Demonic Will instead of souls - still missing a few spots

This commit is contained in:
WayofTime 2016-01-09 10:47:36 -05:00
parent 9eb49dd5a9
commit 61e6cf2a14
42 changed files with 334 additions and 339 deletions

View file

@ -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

View file

@ -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<Object> input = new ArrayList<Object>();
@ -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;

View file

@ -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<SoulForgeRecipe> recipeList = new ArrayList<SoulForgeRecipe>();
private static List<TartaricForgeRecipe> recipeList = new ArrayList<TartaricForgeRecipe>();
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<ItemStack> itemList, World world, BlockPos pos)
public static TartaricForgeRecipe getMatchingRecipe(List<ItemStack> itemList, World world, BlockPos pos)
{
for (SoulForgeRecipe recipe : recipeList)
for (TartaricForgeRecipe recipe : recipeList)
{
if (recipe.matches(itemList, world, pos))
{

View file

@ -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);
}

View file

@ -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);
}

View file

@ -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<ItemStack> getRandomDemonWillDrop(EntityLivingBase killedEntity, EntityLivingBase attackingEntity, ItemStack stack, int looting);
}

View file

@ -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);
}

View file

@ -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);
}

View file

@ -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<ItemStack> getRandomSoulDrop(EntityLivingBase killedEntity, EntityLivingBase attackingEntity, ItemStack stack, int looting);
}

View file

@ -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)

View file

@ -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<EntitySoulArrow>
public class RenderEntitySentientArrow extends Render<EntitySentientArrow>
{
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<EntitySoulArrow>
* 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;
}

View file

@ -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<EntitySentientArrow>
{
@Override
public Render<? super EntitySentientArrow> createRenderFor(RenderManager manager)
{
return new RenderEntitySentientArrow(manager);
}
}

View file

@ -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<EntitySoulArrow>
{
@Override
public Render<? super EntitySoulArrow> createRenderFor(RenderManager manager)
{
return new RenderEntitySoulArrow(manager);
}
}

View file

@ -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");

View file

@ -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<SoulForgeRecipeJEI> getRecipes()
{
List<SoulForgeRecipe> recipeList = SoulForgeRecipeRegistry.getRecipeList();
ArrayList<SoulForgeRecipeJEI> recipes = new ArrayList<SoulForgeRecipeJEI>();
for (SoulForgeRecipe recipe : recipeList)
recipes.add(new SoulForgeRecipeJEI(recipe));
return recipes;
}
}

View file

@ -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<ItemStack>) recipe.getInputs().get(1));
craftingGridHelper.setOutput(guiItemStacks, recipe.getOutputs());
craftingGridHelper.setInput(guiItemStacks, (List) recipe.getInputs().get(0), 2, 3);

View file

@ -6,13 +6,13 @@ import mezz.jei.api.recipe.IRecipeWrapper;
import javax.annotation.Nonnull;
public class SoulForgeRecipeHandler implements IRecipeHandler<SoulForgeRecipeJEI>
public class TartaricForgeRecipeHandler implements IRecipeHandler<TartaricForgeRecipeJEI>
{
@Nonnull
@Override
public Class<SoulForgeRecipeJEI> getRecipeClass()
public Class<TartaricForgeRecipeJEI> getRecipeClass()
{
return SoulForgeRecipeJEI.class;
return TartaricForgeRecipeJEI.class;
}
@Nonnull
@ -24,13 +24,13 @@ public class SoulForgeRecipeHandler implements IRecipeHandler<SoulForgeRecipeJEI
@Nonnull
@Override
public IRecipeWrapper getRecipeWrapper(@Nonnull SoulForgeRecipeJEI recipe)
public IRecipeWrapper getRecipeWrapper(@Nonnull TartaricForgeRecipeJEI recipe)
{
return recipe;
}
@Override
public boolean isRecipeValid(@Nonnull SoulForgeRecipeJEI recipe)
public boolean isRecipeValid(@Nonnull TartaricForgeRecipeJEI recipe)
{
return recipe.getInputs().get(0).size() > 0 && recipe.getOutputs().size() > 0;
}

View file

@ -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<ItemStack> validGems = new HashSet<ItemStack>();
public SoulForgeRecipeJEI(SoulForgeRecipe recipe)
public TartaricForgeRecipeJEI(TartaricForgeRecipe recipe)
{
this.recipe = recipe;

View file

@ -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<TartaricForgeRecipeJEI> getRecipes()
{
List<TartaricForgeRecipe> recipeList = TartaricForgeRecipeRegistry.getRecipeList();
ArrayList<TartaricForgeRecipeJEI> recipes = new ArrayList<TartaricForgeRecipeJEI>();
for (TartaricForgeRecipe recipe : recipeList)
recipes.add(new TartaricForgeRecipeJEI(recipe));
return recipes;
}
}

View file

@ -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);
}
}

View file

@ -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<String> 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;
}
}

View file

@ -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;

View file

@ -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<ItemStack> getRandomSoulDrop(EntityLivingBase killedEntity, EntityLivingBase attackingEntity, ItemStack stack, int looting)
public List<ItemStack> getRandomDemonWillDrop(EntityLivingBase killedEntity, EntityLivingBase attackingEntity, ItemStack stack, int looting)
{
List<ItemStack> soulList = new ArrayList<ItemStack>();
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);
}
}

View file

@ -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<String> 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())
{

View file

@ -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

View file

@ -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);
}
}

View file

@ -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");
}

View file

@ -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);
}
}

View file

@ -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<ItemStack> inputList = new ArrayList<ItemStack>();
@ -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);
}
}

View file

@ -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;
}
}

View file

@ -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<ItemStack> droppedSouls = ((ISoulWeapon) heldStack.getItem()).getRandomSoulDrop(attackedEntity, attackingEntity, heldStack, event.lootingLevel);
List<ItemStack> 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);

View file

@ -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

View file

@ -1,7 +1,7 @@
{
"parent": "builtin/generated",
"textures": {
"layer0": "bloodmagic:items/SoulBow"
"layer0": "bloodmagic:items/SentientBow"
},
"display": {
"thirdperson": {

View file

@ -1,7 +1,7 @@
{
"parent": "builtin/generated",
"textures": {
"layer0": "bloodmagic:items/SoulBow_pulling_0"
"layer0": "bloodmagic:items/SentientBow_pulling_0"
},
"display": {
"thirdperson": {

View file

@ -1,7 +1,7 @@
{
"parent": "builtin/generated",
"textures": {
"layer0": "bloodmagic:items/SoulBow_pulling_2"
"layer0": "bloodmagic:items/SentientBow_pulling_1"
},
"display": {
"thirdperson": {

View file

@ -1,7 +1,7 @@
{
"parent": "builtin/generated",
"textures": {
"layer0": "bloodmagic:items/SoulBow_pulling_1"
"layer0": "bloodmagic:items/SentientBow_pulling_2"
},
"display": {
"thirdperson": {

View file

Before

Width:  |  Height:  |  Size: 708 B

After

Width:  |  Height:  |  Size: 708 B