Most items done now

This commit is contained in:
Nick 2016-03-16 01:10:33 -07:00
parent ba0b24d231
commit 03662c0cd3
74 changed files with 677 additions and 314 deletions

View file

@ -1,7 +1,9 @@
package WayofTime.bloodmagic.item.gear;
import java.util.ArrayList;
import java.util.List;
import WayofTime.bloodmagic.client.IVariantProvider;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemArmor;
@ -15,8 +17,10 @@ import WayofTime.bloodmagic.api.altar.IAltarManipulator;
import WayofTime.bloodmagic.api.util.helper.NBTHelper;
import WayofTime.bloodmagic.tile.TileAltar;
import WayofTime.bloodmagic.util.helper.TextHelper;
import org.apache.commons.lang3.tuple.ImmutablePair;
import org.apache.commons.lang3.tuple.Pair;
public class ItemPackSacrifice extends ItemArmor implements IAltarManipulator
public class ItemPackSacrifice extends ItemArmor implements IAltarManipulator, IVariantProvider
{
public final int CAPACITY = 10000; // Max LP storage
@ -90,6 +94,13 @@ public class ItemPackSacrifice extends ItemArmor implements IAltarManipulator
list.add(TextHelper.localize("tooltip.BloodMagic.pack.stored", getStoredLP(stack)));
}
@Override
public List<Pair<Integer, String>> getVariants() {
List<Pair<Integer, String>> ret = new ArrayList<Pair<Integer, String>>();
ret.add(new ImmutablePair<Integer, String>(0, "type=normal"));
return ret;
}
public void addLP(ItemStack stack, int toAdd)
{
stack = NBTHelper.checkNBT(stack);

View file

@ -1,7 +1,9 @@
package WayofTime.bloodmagic.item.gear;
import java.util.ArrayList;
import java.util.List;
import WayofTime.bloodmagic.client.IVariantProvider;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemArmor;
@ -16,8 +18,10 @@ import WayofTime.bloodmagic.api.util.helper.NBTHelper;
import WayofTime.bloodmagic.api.util.helper.NetworkHelper;
import WayofTime.bloodmagic.tile.TileAltar;
import WayofTime.bloodmagic.util.helper.TextHelper;
import org.apache.commons.lang3.tuple.ImmutablePair;
import org.apache.commons.lang3.tuple.Pair;
public class ItemPackSelfSacrifice extends ItemArmor implements IAltarManipulator
public class ItemPackSelfSacrifice extends ItemArmor implements IAltarManipulator, IVariantProvider
{
/** How much LP per half heart */
public final int CONVERSION = 100;
@ -109,6 +113,13 @@ public class ItemPackSelfSacrifice extends ItemArmor implements IAltarManipulato
list.add(TextHelper.localize("tooltip.BloodMagic.pack.stored", getStoredLP(stack)));
}
@Override
public List<Pair<Integer, String>> getVariants() {
List<Pair<Integer, String>> ret = new ArrayList<Pair<Integer, String>>();
ret.add(new ImmutablePair<Integer, String>(0, "type=normal"));
return ret;
}
public void addLP(ItemStack stack, int toAdd)
{
stack = NBTHelper.checkNBT(stack);