diff options
| author | OnyxDarkKnight <sor1n.iliutza16@gmail.com> | 2013-12-26 00:50:16 +0200 |
|---|---|---|
| committer | OnyxDarkKnight <sor1n.iliutza16@gmail.com> | 2013-12-26 00:50:16 +0200 |
| commit | 1a3455b24d90b0def912c28467cbc51662d660e0 (patch) | |
| tree | 90232ffe1b1a52ab43594b438cfac44ad3c0b60e /common/darkknight/jewelrycraft/util/JewelrycraftUtil.java | |
| parent | 1997f4547812121223836dcacfcb31ea63acdda6 (diff) | |
Major changes. Thanks domi for helping me with the chest linking ring :)
Diffstat (limited to 'common/darkknight/jewelrycraft/util/JewelrycraftUtil.java')
| -rw-r--r-- | common/darkknight/jewelrycraft/util/JewelrycraftUtil.java | 111 |
1 files changed, 111 insertions, 0 deletions
diff --git a/common/darkknight/jewelrycraft/util/JewelrycraftUtil.java b/common/darkknight/jewelrycraft/util/JewelrycraftUtil.java new file mode 100644 index 0000000..255d4f5 --- /dev/null +++ b/common/darkknight/jewelrycraft/util/JewelrycraftUtil.java @@ -0,0 +1,111 @@ +package darkknight.jewelrycraft.util; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Iterator; + +import net.minecraft.block.Block; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import darkknight.jewelrycraft.item.ItemList; + +public class JewelrycraftUtil +{ + public static ArrayList<ItemStack> modifiers = new ArrayList<ItemStack>(); + public static ArrayList<ItemStack> jewel = new ArrayList<ItemStack>(); + public static ArrayList<ItemStack> jewelry = new ArrayList<ItemStack>(); + public static ArrayList<String> jamcraftPlayers = new ArrayList<String>(); + public static HashMap<ItemStack, ItemStack> combinations = new HashMap<ItemStack, ItemStack>(); + + public static void addStuff() + { + //Modifiers + modifiers.add(new ItemStack(Item.blazePowder)); + modifiers.add(new ItemStack(Item.sugar)); + modifiers.add(new ItemStack(Block.chest)); + modifiers.add(new ItemStack(Item.pickaxeIron)); + modifiers.add(new ItemStack(Item.bed)); + modifiers.add(new ItemStack(Item.eyeOfEnder)); + + //Jewels + jewel.add(new ItemStack(Item.enderPearl)); + jewel.add(new ItemStack(Item.diamond)); + jewel.add(new ItemStack(Item.emerald)); + jewel.add(new ItemStack(Block.obsidian)); + jewel.add(new ItemStack(Item.netherStar)); + + //Jewelry + jewelry.add(new ItemStack(ItemList.ring)); + } + + public static void addSpecialCombinations() + { + combinations.put(new ItemStack(Item.enderPearl), new ItemStack(Block.chest)); + combinations.put(new ItemStack(Item.enderPearl), new ItemStack(Item.bed)); + combinations.put(new ItemStack(Block.obsidian), new ItemStack(Item.eyeOfEnder)); + combinations.put(new ItemStack(Item.netherStar), new ItemStack(Block.chest)); + //An ender pearl with any modifier that is not a chest or bed + combinations.put(new ItemStack(Item.enderPearl), new ItemStack(Item.itemsList.length, 0, 0)); + } + + public static void jamcrafters() + { + jamcraftPlayers.add("allout58"); + jamcraftPlayers.add("ChewBaker"); + jamcraftPlayers.add("domi1819"); + jamcraftPlayers.add("founderio"); + jamcraftPlayers.add("Ironhammer354"); + jamcraftPlayers.add("isomgirls6"); + jamcraftPlayers.add("jmjmjm439"); + jamcraftPlayers.add("Joban"); + jamcraftPlayers.add("KJ4IPS"); + jamcraftPlayers.add("Mitchellbrine"); + jamcraftPlayers.add("MrComputerGhost"); + jamcraftPlayers.add("MrKol999"); + jamcraftPlayers.add("Resinresin"); + jamcraftPlayers.add("sci4me"); + jamcraftPlayers.add("sor1n"); + jamcraftPlayers.add("theminecoder"); + jamcraftPlayers.add("YSPilot"); + jamcraftPlayers.add("direwolf20"); + } + + public static boolean isModifier(ItemStack item) + { + Iterator<ItemStack> i = modifiers.iterator(); + + while (i.hasNext()) + { + ItemStack temp = i.next(); + if (temp.itemID == item.itemID && temp.getItemDamage() == item.getItemDamage()) + return true; + } + return false; + } + + public static boolean isJewel(ItemStack item) + { + Iterator<ItemStack> i = jewel.iterator(); + + while (i.hasNext()) + { + ItemStack temp = i.next(); + if (temp.itemID == item.itemID && temp.getItemDamage() == item.getItemDamage()) + return true; + } + return false; + } + + public static boolean isJewelry(ItemStack item) + { + Iterator<ItemStack> i = jewelry.iterator(); + + while (i.hasNext()) + { + ItemStack temp = i.next(); + if (temp.itemID == item.itemID && temp.getItemDamage() == item.getItemDamage()) + return true; + } + return false; + } +} |
