->'/craft' command added. Players can now type this in to get a list of

all custom crafting recipes that exist on the server for your
convenience.
->Internal Entity structures have been redone to allow all calculations
to apply to not only 'Monsters', but to ALL Living Entities. This also
sets up the foundation for PvP in the future.
dev
sigonasr2 9 years ago
parent c270d91fb7
commit 3753621b10
  1. BIN
      TwosideKeeper.jar
  2. 7
      src/plugin.yml
  3. 6
      src/sig/plugin/TwosideKeeper/ActionBarBuffUpdater.java
  4. 6
      src/sig/plugin/TwosideKeeper/Artifact.java
  5. 49
      src/sig/plugin/TwosideKeeper/CustomDamage.java
  6. 24
      src/sig/plugin/TwosideKeeper/Drops/GenericDrop.java
  7. 2
      src/sig/plugin/TwosideKeeper/EliteMonster.java
  8. 76
      src/sig/plugin/TwosideKeeper/HelperStructures/Common/GenericFunctions.java
  9. 3
      src/sig/plugin/TwosideKeeper/HelperStructures/Common/Habitation.java
  10. 16
      src/sig/plugin/TwosideKeeper/HelperStructures/Common/InventoryManagement.java
  11. 376
      src/sig/plugin/TwosideKeeper/HelperStructures/Common/RecipeLinker.java
  12. 363
      src/sig/plugin/TwosideKeeper/HelperStructures/CustomItem.java
  13. 1
      src/sig/plugin/TwosideKeeper/HelperStructures/Loot.java
  14. 24
      src/sig/plugin/TwosideKeeper/LivingEntityStructure.java
  15. 24
      src/sig/plugin/TwosideKeeper/MonsterController.java
  16. 443
      src/sig/plugin/TwosideKeeper/Recipes.java
  17. 1
      src/sig/plugin/TwosideKeeper/RecyclingCenter.java
  18. 236
      src/sig/plugin/TwosideKeeper/TwosideKeeper.java
  19. 19
      src/sig/plugin/TwosideKeeper/runServerHeartbeat.java

Binary file not shown.

@ -1,6 +1,6 @@
name: TwosideKeeper
main: sig.plugin.TwosideKeeper.TwosideKeeper
version: 3.8.6c
version: 3.8.6d
commands:
money:
description: Tells the player the amount of money they are holding.
@ -116,4 +116,9 @@ commands:
description: Turns an item into a set.
usage: /make_set_item <SET> <TIER>
permission: TwosideKeeper.makesetitem
permission-message: No permissions!
craft:
description: Displays the crafting recipe for a custom item. Press Tab after typing /craft to see options.
usage: /craft ITEM
permission: TwosideKeeper.money
permission-message: No permissions!

@ -2,7 +2,7 @@ package sig.plugin.TwosideKeeper;
import org.bukkit.ChatColor;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Monster;
import org.bukkit.entity.Player;
import org.bukkit.potion.PotionEffect;
import org.bukkit.potion.PotionEffectType;
@ -40,10 +40,10 @@ public class ActionBarBuffUpdater{
effectString.append(ChatColor.WHITE+"➠");
} else
if (pet.equals(PotionEffectType.POISON) ||
(pet.equals(PotionEffectType.BLINDNESS) && (p instanceof Monster))) {
(pet.equals(PotionEffectType.BLINDNESS) && (p instanceof LivingEntity && !(p instanceof Player)))) {
effectString.append(ChatColor.YELLOW+"☣");
} else
if ((pet.equals(PotionEffectType.UNLUCK) && p instanceof Monster)) {
if ((pet.equals(PotionEffectType.UNLUCK) && (p instanceof LivingEntity && !(p instanceof Player)))) {
effectString.append(ChatColor.DARK_RED+"☠");
} else
if (pet.equals(PotionEffectType.SLOW)) {

@ -70,7 +70,7 @@ public class Artifact {
i=new ItemStack(Material.AIR);
break;
}
return convert(setName(i,type),type,true);
return convert(setName(i,type),type,true).clone();
}
public static ItemStack setName(ItemStack i, ArtifactItem type) {
ItemMeta m = i.getItemMeta();
@ -226,7 +226,7 @@ public class Artifact {
m.setLore(lore);
m.setDisplayName(ChatColor.BOLD+"Base Artifact "+GenericFunctions.CapitalizeFirstLetters(item.getItemName())+" Recipe");
newitem.setItemMeta(m);
return newitem;
return newitem.clone();
} else
{
ItemStack newitem = convert(new ItemStack(Material.STAINED_GLASS_PANE,1,(short)item.getDataValue()));
@ -237,7 +237,7 @@ public class Artifact {
m.setLore(lore);
m.setDisplayName(ChatColor.GOLD+""+ChatColor.BOLD+"T"+tier+ChatColor.RESET+ChatColor.GOLD+" Artifact "+GenericFunctions.CapitalizeFirstLetters(item.getItemName())+" Recipe");
newitem.setItemMeta(m);
return newitem;
return newitem.clone();
}
}

@ -339,9 +339,9 @@ public class CustomDamage {
}
}
}
if (getDamagerEntity(damager) instanceof Monster) {
Monster m = (Monster)getDamagerEntity(damager);
MonsterStructure md = MonsterStructure.getMonsterStructure(m);
if (getDamagerEntity(damager) instanceof LivingEntity) {
LivingEntity m = (Monster)getDamagerEntity(damager);
LivingEntityStructure md = LivingEntityStructure.getLivingEntityStructure(m);
md.SetTarget(target);
}
increaseStrikerSpeed(p);
@ -501,7 +501,7 @@ public class CustomDamage {
}
public static void appendDebuffsToName(LivingEntity target) {
if (target instanceof Monster) {
if (target instanceof LivingEntity) {
if (target.getCustomName()==null) {
//Setup name.
target.setCustomName(GenericFunctions.CapitalizeFirstLetters(target.getType().name().replace("_", " ")));
@ -549,8 +549,8 @@ public class CustomDamage {
private static void triggerEliteBreakEvent(LivingEntity target) {
if (target instanceof Monster &&
TwosideKeeper.monsterdata.containsKey(target.getUniqueId())) {
MonsterStructure ms = MonsterStructure.getMonsterStructure((Monster)target);
TwosideKeeper.livingentitydata.containsKey(target.getUniqueId())) {
LivingEntityStructure ms = LivingEntityStructure.getLivingEntityStructure((LivingEntity)target);
if (ms.getElite()) {
boolean exists=false;
for (int i=0;i<TwosideKeeper.elitemonsters.size();i++) {
@ -590,8 +590,8 @@ public class CustomDamage {
private static void triggerEliteHitEvent(Player p, LivingEntity target, double dmg) {
if (target instanceof Monster &&
TwosideKeeper.monsterdata.containsKey(target.getUniqueId())) {
MonsterStructure ms = MonsterStructure.getMonsterStructure((Monster)target);
TwosideKeeper.livingentitydata.containsKey(target.getUniqueId())) {
LivingEntityStructure ms = LivingEntityStructure.getLivingEntityStructure((Monster)target);
if (ms.getElite()) {
boolean exists=false;
for (int i=0;i<TwosideKeeper.elitemonsters.size();i++) {
@ -622,20 +622,20 @@ public class CustomDamage {
PlayerStructure pd = PlayerStructure.GetPlayerStructure(p);
if (GenericFunctions.isArtifactEquip(weapon) &&
weapon.toString().contains("SPADE") && p.isSneaking() &&
(target instanceof Monster)) {
(target instanceof LivingEntity)) {
if (ArtifactAbility.containsEnchantment(ArtifactAbility.ERUPTION, weapon) &&
pd.last_shovelspell<TwosideKeeper.getServerTickTime()) {
//Detect all nearby mobs and knock them up. Deal damage to them as well.
List<Entity> finallist = new ArrayList<Entity>();
List<Entity> nearby = target.getNearbyEntities(2, 2, 2);
for (int i=0;i<nearby.size();i++) {
if (nearby.get(i) instanceof Monster) {
if (nearby.get(i) instanceof LivingEntity) {
finallist.add(nearby.get(i));
}
}
finallist.add(target);
for (int i=0;i<finallist.size();i++) {
Monster mon = (Monster)finallist.get(i);
LivingEntity mon = (LivingEntity)finallist.get(i);
//double finaldmg = CalculateDamageReduction(GenericFunctions.getAbilityValue(ArtifactAbility.ERUPTION, p.getEquipment().getItemInMainHand()),mon,null);
//GenericFunctions.DealDamageToMob(finaldmg, mon, p, p.getEquipment().getItemInMainHand());
TwosideKeeperAPI.removeNoDamageTick(p, (Monster)target);
@ -720,7 +720,7 @@ public class CustomDamage {
if (ent instanceof Monster) {
Monster mm = (Monster)ent;
mm.setTarget(p);
MonsterStructure ms = MonsterStructure.getMonsterStructure(mm);
LivingEntityStructure ms = LivingEntityStructure.getLivingEntityStructure(mm);
ms.SetTarget(p);
}
}
@ -756,12 +756,12 @@ public class CustomDamage {
public static void addMonsterToTargetList(Monster m,Player p) {
if (!m.hasPotionEffect(PotionEffectType.GLOWING)) {m.setTarget(p);}
if (TwosideKeeper.monsterdata.containsKey(m.getUniqueId())) {
MonsterStructure ms = (MonsterStructure)TwosideKeeper.monsterdata.get(m.getUniqueId());
if (TwosideKeeper.livingentitydata.containsKey(m.getUniqueId())) {
LivingEntityStructure ms = (LivingEntityStructure)TwosideKeeper.livingentitydata.get(m.getUniqueId());
ms.SetTarget(p);
} else {
MonsterStructure ms = new MonsterStructure(m,p);
TwosideKeeper.monsterdata.put(m.getUniqueId(),ms);
LivingEntityStructure ms = new LivingEntityStructure(m,p);
TwosideKeeper.livingentitydata.put(m.getUniqueId(),ms);
ms.SetTarget(p);
}
}
@ -837,10 +837,13 @@ public class CustomDamage {
/**
* Determines if the target is invulnerable.
* @param damager
* @param target
* @param target
* @return Returns true if the target cannot be hit. False otherwise.
*/
static public boolean InvulnerableCheck(Entity damager, LivingEntity target, int flags) {
if (damager instanceof Player && target instanceof Player && !damager.getWorld().getPVP()) {
return true; //Cancel all PvP related events.
}
if (isFlagSet(flags,IGNORE_DAMAGE_TICK) || (GenericFunctions.enoughTicksHavePassed(target, damager) && canHitMobDueToWeakness(damager) && !GenericFunctions.isSuppressed(getDamagerEntity(damager)))) {
TwosideKeeper.log("Enough ticks have passed.", 5);
if (isFlagSet(flags,IGNOREDODGE) || !PassesIframeCheck(target,damager)) {
@ -982,8 +985,8 @@ public class CustomDamage {
dodgechance+=ItemSet.TotalBaseAmountBasedOnSetBonusCount(GenericFunctions.getEquipment(p), p,ItemSet.JAMDAK,3,3)/100d;
LivingEntity shooter = getDamagerEntity(damager);
if (shooter!=null && shooter instanceof Monster) {
Monster m = (Monster)shooter;
if (shooter!=null && shooter instanceof LivingEntity) {
LivingEntity m = (LivingEntity)shooter;
if (GenericFunctions.isIsolatedTarget(m, p)) {
dodgechance+=0.4;
}
@ -1055,7 +1058,7 @@ public class CustomDamage {
boolean isBlockArmor = GenericFunctions.isHardenedItem(armor[i]);
if (target instanceof Monster) {
if (target instanceof LivingEntity) {
isBlockArmor=true;
}
@ -1360,7 +1363,7 @@ public class CustomDamage {
dmg+=addToPlayerLogger(damager,target,"BANE OF ARTHROPODS",weapon.getEnchantmentLevel(Enchantment.DAMAGE_ARTHROPODS)*2.5);
}
if (weapon.containsEnchantment(Enchantment.DAMAGE_UNDEAD) &&
(target instanceof Monster) && MonsterController.isUndead((Monster)target)) {
(target instanceof LivingEntity) && MonsterController.isUndead((LivingEntity)target)) {
dmg+=addToPlayerLogger(damager,target,"SMITE",weapon.getEnchantmentLevel(Enchantment.DAMAGE_UNDEAD)*2.5);
}
}
@ -2159,9 +2162,9 @@ public class CustomDamage {
private static double calculateIsolationMultiplier(LivingEntity shooter, LivingEntity target) {
double mult = 0.0;
if (shooter instanceof Player && target instanceof Monster) {
if (shooter instanceof Player && target instanceof LivingEntity) {
Player p = (Player)shooter;
Monster m = (Monster)target;
LivingEntity m = (LivingEntity)target;
if (GenericFunctions.isIsolatedTarget(m, p)) {
mult += 0.5;
}

@ -0,0 +1,24 @@
package sig.plugin.TwosideKeeper.Drops;
import org.bukkit.inventory.ItemStack;
import aPlugin.Drop;
public class GenericDrop extends Drop{
ItemStack item;
short data;
public GenericDrop(int amount, int weight, String description, ItemStack item, short data) {
super(amount, weight, description);
this.item=item;
this.data=data;
}
@Override
public ItemStack getItemStack() {
this.item.setDurability(data);
return this.item;
}
}

@ -150,7 +150,7 @@ public class EliteMonster {
//Check for nearby mobs. Each mob increases willpower by 1.
if (Math.random()<=0.3 && !leaping && !storingenergy) {
int mobcount=0;
List<Monster> monsterlist = GenericFunctions.getNearbyMobs(m.getLocation(), 10);
List<Monster> monsterlist = CustomDamage.trimNonMonsterEntities(m.getNearbyEntities(10, 10, 10));
mobcount=monsterlist.size()-1;
TwosideKeeper.log("Detected mob count: "+mobcount, 5);
if (mobcount>0) {

@ -54,7 +54,7 @@ import sig.plugin.TwosideKeeper.AwakenedArtifact;
import sig.plugin.TwosideKeeper.CustomDamage;
import sig.plugin.TwosideKeeper.EliteMonster;
import sig.plugin.TwosideKeeper.MonsterController;
import sig.plugin.TwosideKeeper.MonsterStructure;
import sig.plugin.TwosideKeeper.LivingEntityStructure;
import sig.plugin.TwosideKeeper.PlayerStructure;
import sig.plugin.TwosideKeeper.TwosideKeeper;
import sig.plugin.TwosideKeeper.TwosideKeeperAPI;
@ -2388,8 +2388,8 @@ public class GenericFunctions {
stackamt=1;
}
//Modify the color of the name of the monster.
if (ent instanceof Monster) {
Monster m = (Monster)ent;
if (ent instanceof LivingEntity) {
LivingEntity m = (LivingEntity)ent;
m.setCustomNameVisible(true);
if (m.getCustomName()!=null) {
m.setCustomName(getDeathMarkColor(stackamt)+ChatColor.stripColor(GenericFunctions.getDisplayName(m)));
@ -2412,8 +2412,8 @@ public class GenericFunctions {
}
public static void ResetMobName(LivingEntity ent) {
if (ent instanceof Monster) {
Monster m = (Monster)ent;
if (ent instanceof LivingEntity) {
LivingEntity m = (LivingEntity)ent;
m.setCustomNameVisible(false);
if (m.getCustomName()!=null) {
m.setCustomName(ChatColor.stripColor(GenericFunctions.getDisplayName(m)));
@ -2861,10 +2861,10 @@ public class GenericFunctions {
return true;
}
}
}
if (entity instanceof Monster) {
Monster m = (Monster)entity;
MonsterStructure md = MonsterStructure.getMonsterStructure(m);
} else
if (entity instanceof LivingEntity) {
LivingEntity m = (LivingEntity)entity;
LivingEntityStructure md = LivingEntityStructure.getLivingEntityStructure(m);
if (damager!=null) {
if (damager instanceof Projectile) {
if (CustomDamage.getDamagerEntity(damager)!=null) {
@ -2892,11 +2892,6 @@ public class GenericFunctions {
}
}
}
if ((entity instanceof LivingEntity) &&
!(entity instanceof Monster) &&
!(entity instanceof Player)) {
return true;
}
TwosideKeeper.log("Returning false... "+TwosideKeeper.getServerTickTime(), 5);
return false;
}
@ -2911,10 +2906,10 @@ public class GenericFunctions {
} else {
pd.hitlist.remove(p.getUniqueId());
}
}
if (entity instanceof Monster) {
Monster m = (Monster)entity;
MonsterStructure md = MonsterStructure.getMonsterStructure(m);
} else
if (entity instanceof LivingEntity) {
LivingEntity m = (LivingEntity)entity;
LivingEntityStructure md = LivingEntityStructure.getLivingEntityStructure(m);
if (damager!=null) {
if (damager instanceof Player) {
Player p = (Player)damager;
@ -2945,9 +2940,9 @@ public class GenericFunctions {
pd.hitlist.put(p.getUniqueId(), TwosideKeeper.getServerTickTime());
}
} else
if (entity instanceof Monster) {
Monster m = (Monster)entity;
MonsterStructure md = MonsterStructure.getMonsterStructure(m);
if (entity instanceof LivingEntity) {
LivingEntity m = (LivingEntity)entity;
LivingEntityStructure md = LivingEntityStructure.getLivingEntityStructure(m);
if (damager!=null) {
if (damager instanceof Projectile) {
if (CustomDamage.getDamagerEntity(damager)!=null) {
@ -3363,7 +3358,8 @@ public class GenericFunctions {
}
public static void deAggroNearbyTargets(Player p) {
List<Monster> monsters = getNearbyMobs(p.getLocation(),8);
//List<Monster> monsters = getNearbyMobs(p.getLocation(),8);
List<Monster> monsters = CustomDamage.trimNonMonsterEntities(p.getNearbyEntities(8, 8, 8));
for (Monster m : monsters) {
if (m.getTarget()!=null &&
m.getTarget().equals(p) &&
@ -3497,7 +3493,7 @@ public class GenericFunctions {
GlowAPI.setGlowing(m, color, p);
}
}*/
MonsterStructure.getMonsterStructure(m).setGlobalGlow(color);
LivingEntityStructure.getLivingEntityStructure(m).setGlobalGlow(color);
}
public static void DealDamageToNearbyPlayers(Location l, double basedmg, int range, boolean knockup, double knockupamt, Entity damager, String reason, boolean truedmg) {
@ -3521,8 +3517,8 @@ public class GenericFunctions {
//We cleared the non-living entities, deal damage to the rest.
double origdmg = basedmg;
for (Entity e : ents) {
if (e instanceof Monster) {
Monster m = (Monster)e;
if (e instanceof LivingEntity && !e.equals(damager)) {
LivingEntity m = (LivingEntity)e;
if (enoughTicksHavePassed(m,(Player)damager)) {
basedmg=origdmg;
if (isLineDrive) {
@ -3547,12 +3543,12 @@ public class GenericFunctions {
}
}
public static List<Monster> getNearbyMobs(Location l, int range) {
public static List<LivingEntity> getNearbyMobs(Location l, int range) {
Collection<Entity> ents = l.getWorld().getNearbyEntities(l, range, range, range);
List<Monster> monsterlist = new ArrayList<Monster>();
List<LivingEntity> monsterlist = new ArrayList<LivingEntity>();
for (Entity e : ents) {
if ((e instanceof Monster)) {
monsterlist.add((Monster)e);
if ((e instanceof LivingEntity)) {
monsterlist.add((LivingEntity)e);
}
}
return monsterlist;
@ -3570,7 +3566,7 @@ public class GenericFunctions {
}
public static boolean isEliteMonster(Monster m) {
MonsterStructure md = MonsterStructure.getMonsterStructure(m);
LivingEntityStructure md = LivingEntityStructure.getLivingEntityStructure(m);
return md.getElite();
}
@ -4026,7 +4022,9 @@ public class GenericFunctions {
p.playSound(p.getLocation(), Sound.ITEM_CHORUS_FRUIT_TELEPORT, 1.0f, 1.0f);
final Location newpos=new Location(p.getWorld(),xpos,ypos,zpos);
double dmgdealt=CustomDamage.getBaseWeaponDamage(weaponused, p, null);
List<Monster> monsters = getNearbyMobs(newpos, 2);
//List<Monster> monsters = getNearbyMobs(newpos, 2);
List<Entity> ents = new ArrayList<Entity>(newpos.getWorld().getNearbyEntities(newpos, 2, 2, 2));
List<Monster> monsters = CustomDamage.trimNonMonsterEntities(ents);
for (int i=0;i<monsters.size();i++) {
removeNoDamageTick(monsters.get(i), p);
}
@ -4127,23 +4125,21 @@ public class GenericFunctions {
List<Entity> ents = ent.getNearbyEntities(range, range, range);
int count=0;
for (Entity e : ents) {
if (e instanceof Monster && !e.equals(ent)) {
if (e instanceof LivingEntity && !(e instanceof Player) && !e.equals(ent)) {
count++;
}
}
return count;
}
public static boolean isIsolatedTarget(Monster m, Player p) {
return ((GlowAPI.isGlowing(m, p) &&
GlowAPI.getGlowColor(m, p).equals(Color.WHITE)) ||
GenericFunctions.GetNearbyMonsterCount(m, 12)==0) &&
public static boolean isIsolatedTarget(LivingEntity m, Player p) {
return (GenericFunctions.GetNearbyMonsterCount(m, 12)==0) &&
PlayerMode.getPlayerMode(p)==PlayerMode.SLAYER;
}
public static boolean isSpecialGlowMonster(Monster m) {
return MonsterStructure.getMonsterStructure(m).isLeader ||
MonsterStructure.getMonsterStructure(m).isElite;
return LivingEntityStructure.getLivingEntityStructure(m).isLeader ||
LivingEntityStructure.getLivingEntityStructure(m).isElite;
}
public static boolean isSuppressed(Entity ent) {
@ -4187,9 +4183,9 @@ public class GenericFunctions {
if (!TwosideKeeper.suppressed_entities.contains(ent)) {
TwosideKeeper.suppressed_entities.add(ent);
}
if (ent instanceof Monster) {
if (ent instanceof LivingEntity) {
//MonsterStructure.getMonsterStructure((Monster)ent).setGlobalGlow(GlowAPI.Color.BLACK);
MonsterStructure.getMonsterStructure((Monster)ent).UpdateGlow();
LivingEntityStructure.getLivingEntityStructure((LivingEntity)ent).UpdateGlow();
} else {
GlowAPI.setGlowing(ent, GlowAPI.Color.BLACK, Bukkit.getOnlinePlayers());
}

@ -12,7 +12,6 @@ import java.util.UUID;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Monster;
import net.md_5.bungee.api.ChatColor;
import sig.plugin.TwosideKeeper.TwosideKeeper;
@ -29,7 +28,7 @@ public class Habitation {
// Returns false if the new starting location is not allowed.
public boolean addNewStartingLocation(LivingEntity l) {
if (l instanceof Monster) {
if (l instanceof LivingEntity) {
String hash = getLocationHash(l.getLocation());
if (locationhashes.containsKey(hash)) {
int spawnamt = locationhashes.get(hash);

@ -0,0 +1,16 @@
package sig.plugin.TwosideKeeper.HelperStructures.Common;
import java.util.HashMap;
import org.bukkit.inventory.Inventory;
import org.bukkit.inventory.ItemStack;
public class InventoryManagement {
public static void transferInventoryToInventory(Inventory from, Inventory to) {
HashMap<Integer,ItemStack> remaining = to.addItem(from.getContents());
from.clear();
for (int i=0;i<remaining.size();i++) {
from.addItem(remaining.get(i));
}
}
}

@ -0,0 +1,376 @@
package sig.plugin.TwosideKeeper.HelperStructures.Common;
import org.bukkit.ChatColor;
import org.bukkit.Material;
import org.bukkit.inventory.ItemStack;
import sig.plugin.TwosideKeeper.Artifact;
import sig.plugin.TwosideKeeper.AwakenedArtifact;
import sig.plugin.TwosideKeeper.Recipes;
import sig.plugin.TwosideKeeper.HelperStructures.ArtifactItem;
import sig.plugin.TwosideKeeper.HelperStructures.ArtifactItemType;
import sig.plugin.TwosideKeeper.HelperStructures.CustomItem;
public enum RecipeLinker {
ic(ChatColor.YELLOW,"Item Cube",
new ItemStack[]{
CustomItem.ItemCube(),
new ItemStack(Material.WOOD),new ItemStack(Material.WOOD),new ItemStack(Material.WOOD),
new ItemStack(Material.WOOD),new ItemStack(Material.CHEST),new ItemStack(Material.WOOD),
new ItemStack(Material.WOOD),new ItemStack(Material.WOOD),new ItemStack(Material.WOOD),
}),
lic(ChatColor.YELLOW,"Large Item Cube",new ItemStack[]{
CustomItem.LargeItemCube(),
new ItemStack(Material.WOOD),new ItemStack(Material.WOOD),new ItemStack(Material.WOOD),
new ItemStack(Material.GOLD_BLOCK),new ItemStack(Material.CHEST),new ItemStack(Material.GOLD_BLOCK),
new ItemStack(Material.WOOD),new ItemStack(Material.WOOD),new ItemStack(Material.WOOD),
}),
eic(ChatColor.YELLOW,"Ender Item Cube",new ItemStack[]{
CustomItem.EnderItemCube(),
new ItemStack(Material.OBSIDIAN),new ItemStack(Material.OBSIDIAN),new ItemStack(Material.OBSIDIAN),
new ItemStack(Material.EMERALD),new ItemStack(Material.CHEST),new ItemStack(Material.EMERALD),
new ItemStack(Material.OBSIDIAN),new ItemStack(Material.OBSIDIAN),new ItemStack(Material.OBSIDIAN),
}),
dc(ChatColor.YELLOW,"Duplicate Ender Item Cube",new ItemStack[]{
CustomItem.EnderItemCube(2),
CustomItem.EnderItemCube(),new ItemStack(Material.NETHER_STAR)
}),
aq(ChatColor.RED,"Arrow Quiver",new ItemStack[]{
CustomItem.ArrowQuiver(),
null,new ItemStack(Material.LEATHER),new ItemStack(Material.EMERALD_BLOCK),
new ItemStack(Material.LEATHER),new ItemStack(Material.SPECTRAL_ARROW),new ItemStack(Material.LEATHER),
null,new ItemStack(Material.LEATHER)
}),
ihelm(ChatColor.WHITE,"Hardened Iron Helmet",new ItemStack[]{
CustomItem.HardenedPiece(Material.IRON_HELMET),
new ItemStack(Material.IRON_BLOCK),new ItemStack(Material.IRON_BLOCK),new ItemStack(Material.IRON_BLOCK),
new ItemStack(Material.IRON_BLOCK),null,new ItemStack(Material.IRON_BLOCK)
}),
ichest(ChatColor.WHITE,"Hardened Iron Chestplate",new ItemStack[]{
CustomItem.HardenedPiece(Material.IRON_CHESTPLATE),
new ItemStack(Material.IRON_BLOCK),null,new ItemStack(Material.IRON_BLOCK),
new ItemStack(Material.IRON_BLOCK),new ItemStack(Material.IRON_BLOCK),new ItemStack(Material.IRON_BLOCK),
new ItemStack(Material.IRON_BLOCK),new ItemStack(Material.IRON_BLOCK),new ItemStack(Material.IRON_BLOCK)
}),
ileg(ChatColor.WHITE,"Hardened Iron Leggings",new ItemStack[]{
CustomItem.HardenedPiece(Material.IRON_LEGGINGS),
new ItemStack(Material.IRON_BLOCK),new ItemStack(Material.IRON_BLOCK),new ItemStack(Material.IRON_BLOCK),
new ItemStack(Material.IRON_BLOCK),null,new ItemStack(Material.IRON_BLOCK),
new ItemStack(Material.IRON_BLOCK),null,new ItemStack(Material.IRON_BLOCK)
}),
iboots(ChatColor.WHITE,"Hardened Iron Boots",new ItemStack[]{
CustomItem.HardenedPiece(Material.IRON_BOOTS),
new ItemStack(Material.IRON_BLOCK),null,new ItemStack(Material.IRON_BLOCK),
new ItemStack(Material.IRON_BLOCK),null,new ItemStack(Material.IRON_BLOCK)
}),
dhelm(ChatColor.AQUA,"Hardened Diamond Helmet",new ItemStack[]{
CustomItem.HardenedPiece(Material.DIAMOND_HELMET),
new ItemStack(Material.DIAMOND_BLOCK),new ItemStack(Material.DIAMOND_BLOCK),new ItemStack(Material.DIAMOND_BLOCK),
new ItemStack(Material.DIAMOND_BLOCK),null,new ItemStack(Material.DIAMOND_BLOCK)
}),
dchest(ChatColor.AQUA,"Hardened Diamond Chestplate",new ItemStack[]{
CustomItem.HardenedPiece(Material.DIAMOND_CHESTPLATE),
new ItemStack(Material.DIAMOND_BLOCK),null,new ItemStack(Material.DIAMOND_BLOCK),
new ItemStack(Material.DIAMOND_BLOCK),new ItemStack(Material.DIAMOND_BLOCK),new ItemStack(Material.DIAMOND_BLOCK),
new ItemStack(Material.DIAMOND_BLOCK),new ItemStack(Material.DIAMOND_BLOCK),new ItemStack(Material.DIAMOND_BLOCK)
}),
dleg(ChatColor.AQUA,"Hardened Diamond Leggings",new ItemStack[]{
CustomItem.HardenedPiece(Material.DIAMOND_LEGGINGS),
new ItemStack(Material.DIAMOND_BLOCK),new ItemStack(Material.DIAMOND_BLOCK),new ItemStack(Material.DIAMOND_BLOCK),
new ItemStack(Material.DIAMOND_BLOCK),null,new ItemStack(Material.DIAMOND_BLOCK),null,
new ItemStack(Material.DIAMOND_BLOCK),null,new ItemStack(Material.DIAMOND_BLOCK)
}),
dboots(ChatColor.AQUA,"Hardened Diamond Boots",new ItemStack[]{
CustomItem.HardenedPiece(Material.DIAMOND_BOOTS),
new ItemStack(Material.DIAMOND_BLOCK),null,new ItemStack(Material.DIAMOND_BLOCK),
new ItemStack(Material.DIAMOND_BLOCK),null,new ItemStack(Material.DIAMOND_BLOCK)
}),
ghelm(ChatColor.GOLD,"Hardened Gold Helmet",new ItemStack[]{
CustomItem.HardenedPiece(Material.GOLD_HELMET),
new ItemStack(Material.GOLD_BLOCK),new ItemStack(Material.GOLD_BLOCK),new ItemStack(Material.GOLD_BLOCK),
new ItemStack(Material.GOLD_BLOCK),null,new ItemStack(Material.GOLD_BLOCK)
}),
gchest(ChatColor.GOLD,"Hardened Gold Chestplate",new ItemStack[]{
CustomItem.HardenedPiece(Material.GOLD_CHESTPLATE),
new ItemStack(Material.GOLD_BLOCK),null,new ItemStack(Material.GOLD_BLOCK),
new ItemStack(Material.GOLD_BLOCK),new ItemStack(Material.GOLD_BLOCK),new ItemStack(Material.GOLD_BLOCK),
new ItemStack(Material.GOLD_BLOCK),new ItemStack(Material.GOLD_BLOCK),new ItemStack(Material.GOLD_BLOCK)
}),
gleg(ChatColor.GOLD,"Hardened Gold Leggings",new ItemStack[]{
CustomItem.HardenedPiece(Material.GOLD_LEGGINGS),
new ItemStack(Material.GOLD_BLOCK),new ItemStack(Material.GOLD_BLOCK),new ItemStack(Material.GOLD_BLOCK),
new ItemStack(Material.GOLD_BLOCK),null,new ItemStack(Material.GOLD_BLOCK),
new ItemStack(Material.GOLD_BLOCK),null,new ItemStack(Material.GOLD_BLOCK)
}),
gboots(ChatColor.GOLD,"Hardened Gold Boots",new ItemStack[]{
CustomItem.HardenedPiece(Material.GOLD_BOOTS),
new ItemStack(Material.GOLD_BLOCK),null,new ItemStack(Material.GOLD_BLOCK),
new ItemStack(Material.GOLD_BLOCK),null,new ItemStack(Material.GOLD_BLOCK)
}),
@SuppressWarnings("deprecation")
wool(ChatColor.BLUE,"Wool Recoloring",new ItemStack[]{
new ItemStack(Material.WOOL,8,(short)11),
new ItemStack(Material.WOOL,1,(short)2),new ItemStack(Material.WOOL,1,(short)3),new ItemStack(Material.WOOL,1,(short)5),
new ItemStack(Material.WOOL,1,(short)7),new ItemStack(Material.getMaterial(351),1,(short)4),new ItemStack(Material.WOOL,1,(short)8),
new ItemStack(Material.WOOL,1,(short)13),new ItemStack(Material.WOOL,1,(short)11),new ItemStack(Material.WOOL,1,(short)9)
}),
slab(ChatColor.BLUE,"Slab Reconstruction",new ItemStack[]{
new ItemStack(Material.WOOD,1,(short)2),
new ItemStack(Material.WOOD_STEP,1,(short)2),new ItemStack(Material.WOOD_STEP,1,(short)2)
}),
check(ChatColor.BLUE,"Money Check",new ItemStack[]{
CustomItem.MoneyCheck(),
new ItemStack(Material.FEATHER),new ItemStack(Material.INK_SACK),null,
new ItemStack(Material.PAPER),
}),
sword(ChatColor.LIGHT_PURPLE,"Artifact Sword Recipe",new ItemStack[]{
Artifact.createRecipe(0, ArtifactItemType.SWORD),
Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE),Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE),Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE),
Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE),Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE),Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE),
Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE),Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE),Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE)
}),
axe(ChatColor.LIGHT_PURPLE,"Artifact Axe Recipe",new ItemStack[]{
Artifact.createRecipe(0, ArtifactItemType.AXE),
Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE),Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE),null,
Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE),Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE),null,
null,Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE)
}),
boots(ChatColor.LIGHT_PURPLE,"Artifact Boots Recipe",new ItemStack[]{
Artifact.createRecipe(0, ArtifactItemType.BOOTS),
Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE),null,Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE),
Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE),null,Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE),
}),
chest(ChatColor.LIGHT_PURPLE,"Artifact Chestplate Recipe",new ItemStack[]{
Artifact.createRecipe(0, ArtifactItemType.CHESTPLATE),
Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE),null,Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE),
Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE),Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE),Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE),
Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE),Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE),Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE)
}),
leg(ChatColor.LIGHT_PURPLE,"Artifact Leggings Recipe",new ItemStack[]{
Artifact.createRecipe(0, ArtifactItemType.LEGGINGS),
Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE),Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE),Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE),
Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE),null,Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE),
Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE),null,Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE)
}),
helm(ChatColor.LIGHT_PURPLE,"Artifact Helmet Recipe",new ItemStack[]{
Artifact.createRecipe(0, ArtifactItemType.HELMET),
Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE),Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE),Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE),
Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE),null,Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE)
}),
bow(ChatColor.LIGHT_PURPLE,"Artifact Bow Recipe",new ItemStack[]{
Artifact.createRecipe(0, ArtifactItemType.BOW),
Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE),Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE),null,
Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE),null,Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE),
Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE),Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE)
}),
scythe(ChatColor.LIGHT_PURPLE,"Artifact Scythe Recipe",new ItemStack[]{
Artifact.createRecipe(0, ArtifactItemType.HOE),
Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE),Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE),null,
null,Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE),null,
null,Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE)
}),
rod(ChatColor.LIGHT_PURPLE,"Artifact Fishing Rod Recipe",new ItemStack[]{
Artifact.createRecipe(0, ArtifactItemType.FISHING_ROD),
null,null,Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE),
null,Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE),Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE),
Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE),null,Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE)
}),
pickaxe(ChatColor.LIGHT_PURPLE,"Artifact Pickaxe Recipe",new ItemStack[]{
Artifact.createRecipe(0, ArtifactItemType.PICKAXE),
Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE),Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE),Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE),
null,Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE),null,
null,Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE),null
}),
shovel(ChatColor.LIGHT_PURPLE,"Artifact Shovel Recipe",new ItemStack[]{
Artifact.createRecipe(0, ArtifactItemType.SHOVEL),
null,Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE),null,
null,Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE),null,
null,Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE),null
}),
recipe(ChatColor.DARK_AQUA,"Recipe To Artifact",new ItemStack[]{
AwakenedArtifact.convertToAwakenedArtifact(ArtifactItemType.CHESTPLATE.getTieredItem(1),1,ArtifactItemType.CHESTPLATE.getDataValue()),
Artifact.createRecipe(0, ArtifactItemType.CHESTPLATE)
}),
t2(ChatColor.DARK_AQUA,"Upgrade to T2",new ItemStack[]{
AwakenedArtifact.convertToAwakenedArtifact(ArtifactItemType.SHOVEL.getTieredItem(2),2,ArtifactItemType.SHOVEL.getDataValue()),
AwakenedArtifact.convertToAwakenedArtifact(ArtifactItemType.SHOVEL.getTieredItem(1),1,ArtifactItemType.SHOVEL.getDataValue()),Artifact.createRecipe(0, ArtifactItemType.SHOVEL)
}),
t3(ChatColor.DARK_AQUA,"Upgrade to T3",new ItemStack[]{
AwakenedArtifact.convertToAwakenedArtifact(ArtifactItemType.LEGGINGS.getTieredItem(3),3,ArtifactItemType.LEGGINGS.getDataValue()),
AwakenedArtifact.convertToAwakenedArtifact(ArtifactItemType.LEGGINGS.getTieredItem(2),2,ArtifactItemType.LEGGINGS.getDataValue()),Artifact.createRecipe(2, ArtifactItemType.LEGGINGS)
}),
t4(ChatColor.DARK_AQUA,"Upgrade to T4",new ItemStack[]{
AwakenedArtifact.convertToAwakenedArtifact(ArtifactItemType.BOOTS.getTieredItem(4),4,ArtifactItemType.BOOTS.getDataValue()),
AwakenedArtifact.convertToAwakenedArtifact(ArtifactItemType.BOOTS.getTieredItem(3),3,ArtifactItemType.BOOTS.getDataValue()),Artifact.createRecipe(3, ArtifactItemType.BOOTS)
}),
t5(ChatColor.DARK_AQUA,"Upgrade to T5",new ItemStack[]{
AwakenedArtifact.convertToAwakenedArtifact(ArtifactItemType.HELMET.getTieredItem(5),5,ArtifactItemType.HELMET.getDataValue()),
AwakenedArtifact.convertToAwakenedArtifact(ArtifactItemType.HELMET.getTieredItem(4),4,ArtifactItemType.HELMET.getDataValue()),Artifact.createRecipe(4, ArtifactItemType.HELMET)
}),
t6(ChatColor.DARK_AQUA,"Upgrade to T6",new ItemStack[]{
AwakenedArtifact.convertToAwakenedArtifact(ArtifactItemType.SWORD.getTieredItem(6),6,ArtifactItemType.SWORD.getDataValue()),
AwakenedArtifact.convertToAwakenedArtifact(ArtifactItemType.SWORD.getTieredItem(5),5,ArtifactItemType.SWORD.getDataValue()),Artifact.createRecipe(5, ArtifactItemType.SWORD)
}),
t7(ChatColor.DARK_AQUA,"Upgrade to T7",new ItemStack[]{
AwakenedArtifact.convertToAwakenedArtifact(ArtifactItemType.HOE.getTieredItem(7),7,ArtifactItemType.HOE.getDataValue()),
AwakenedArtifact.convertToAwakenedArtifact(ArtifactItemType.HOE.getTieredItem(6),6,ArtifactItemType.HOE.getDataValue()),Artifact.createRecipe(6, ArtifactItemType.HOE)
}),
t8(ChatColor.DARK_AQUA,"Upgrade to T8",new ItemStack[]{
AwakenedArtifact.convertToAwakenedArtifact(ArtifactItemType.AXE.getTieredItem(8),8,ArtifactItemType.AXE.getDataValue()),
AwakenedArtifact.convertToAwakenedArtifact(ArtifactItemType.AXE.getTieredItem(7),7,ArtifactItemType.AXE.getDataValue()),Artifact.createRecipe(7, ArtifactItemType.AXE)
}),
t9(ChatColor.DARK_AQUA,"Upgrade to T9",new ItemStack[]{
AwakenedArtifact.convertToAwakenedArtifact(ArtifactItemType.PICKAXE.getTieredItem(9),9,ArtifactItemType.PICKAXE.getDataValue()),
AwakenedArtifact.convertToAwakenedArtifact(ArtifactItemType.PICKAXE.getTieredItem(8),8,ArtifactItemType.PICKAXE.getDataValue()),Artifact.createRecipe(8, ArtifactItemType.PICKAXE)
}),
t10(ChatColor.DARK_AQUA,"Upgrade to T10",new ItemStack[]{
AwakenedArtifact.convertToAwakenedArtifact(ArtifactItemType.SHOVEL.getTieredItem(10),10,ArtifactItemType.SHOVEL.getDataValue()),
AwakenedArtifact.convertToAwakenedArtifact(ArtifactItemType.SHOVEL.getTieredItem(9),9,ArtifactItemType.SHOVEL.getDataValue()),Artifact.createRecipe(9, ArtifactItemType.SHOVEL)
}),
t11(ChatColor.DARK_AQUA,"Upgrade to T11",new ItemStack[]{
AwakenedArtifact.convertToAwakenedArtifact(ArtifactItemType.PICKAXE.getTieredItem(11),11,ArtifactItemType.PICKAXE.getDataValue()),
AwakenedArtifact.convertToAwakenedArtifact(ArtifactItemType.PICKAXE.getTieredItem(10),10,ArtifactItemType.PICKAXE.getDataValue()),Artifact.createRecipe(10, ArtifactItemType.PICKAXE)
}),
t12(ChatColor.DARK_AQUA,"Upgrade to T12",new ItemStack[]{
AwakenedArtifact.convertToAwakenedArtifact(ArtifactItemType.AXE.getTieredItem(12),12,ArtifactItemType.AXE.getDataValue()),
AwakenedArtifact.convertToAwakenedArtifact(ArtifactItemType.AXE.getTieredItem(11),11,ArtifactItemType.AXE.getDataValue()),Artifact.createRecipe(11, ArtifactItemType.AXE)
}),
t13(ChatColor.DARK_AQUA,"Upgrade to T13",new ItemStack[]{
AwakenedArtifact.convertToAwakenedArtifact(ArtifactItemType.HOE.getTieredItem(13),13,ArtifactItemType.HOE.getDataValue()),
AwakenedArtifact.convertToAwakenedArtifact(ArtifactItemType.HOE.getTieredItem(12),12,ArtifactItemType.HOE.getDataValue()),Artifact.createRecipe(12, ArtifactItemType.HOE)
}),
t14(ChatColor.DARK_AQUA,"Upgrade to T14",new ItemStack[]{
AwakenedArtifact.convertToAwakenedArtifact(ArtifactItemType.FISHING_ROD.getTieredItem(14),14,ArtifactItemType.FISHING_ROD.getDataValue()),
AwakenedArtifact.convertToAwakenedArtifact(ArtifactItemType.FISHING_ROD.getTieredItem(13),13,ArtifactItemType.FISHING_ROD.getDataValue()),Artifact.createRecipe(13, ArtifactItemType.FISHING_ROD)
}),
t15(ChatColor.DARK_AQUA,"Upgrade to T15",new ItemStack[]{
AwakenedArtifact.convertToAwakenedArtifact(ArtifactItemType.BOW.getTieredItem(15),15,ArtifactItemType.BOW.getDataValue()),
AwakenedArtifact.convertToAwakenedArtifact(ArtifactItemType.BOW.getTieredItem(14),14,ArtifactItemType.BOW.getDataValue()),Artifact.createRecipe(14, ArtifactItemType.BOW)
}),
t2recipe(ChatColor.WHITE,"T2 Artifact Recipe",new ItemStack[]{
Artifact.createRecipe(2, ArtifactItemType.SHOVEL),
Artifact.createRecipe(0, ArtifactItemType.SHOVEL),Artifact.createRecipe(0, ArtifactItemType.SHOVEL),null,
Artifact.createArtifactItem(ArtifactItem.ARTIFACT_ESSENCE)
}),
t3recipe(ChatColor.WHITE,"T3 Artifact Recipe",new ItemStack[]{
Artifact.createRecipe(3, ArtifactItemType.SHOVEL),
Artifact.createRecipe(2, ArtifactItemType.SHOVEL),Artifact.createRecipe(2, ArtifactItemType.SHOVEL),null,
Artifact.createArtifactItem(ArtifactItem.ARTIFACT_CORE)
}),
t4recipe(ChatColor.WHITE,"T4 Artifact Recipe",new ItemStack[]{
Artifact.createRecipe(4, ArtifactItemType.SHOVEL),
Artifact.createRecipe(3, ArtifactItemType.SHOVEL),Artifact.createRecipe(3, ArtifactItemType.SHOVEL),null,
Artifact.createArtifactItem(ArtifactItem.ARTIFACT_BASE)
}),
t5recipe(ChatColor.WHITE,"T5 Artifact Recipe",new ItemStack[]{
Artifact.createRecipe(5, ArtifactItemType.SHOVEL),
Artifact.createRecipe(4, ArtifactItemType.SHOVEL),Artifact.createRecipe(4, ArtifactItemType.SHOVEL),null,
Artifact.createArtifactItem(ArtifactItem.ANCIENT_ESSENCE)
}),
t6recipe(ChatColor.WHITE,"T6 Artifact Recipe",new ItemStack[]{
Artifact.createRecipe(6, ArtifactItemType.SHOVEL),
Artifact.createRecipe(5, ArtifactItemType.SHOVEL),Artifact.createRecipe(5, ArtifactItemType.SHOVEL),null,
Artifact.createArtifactItem(ArtifactItem.ANCIENT_CORE)
}),
t7recipe(ChatColor.WHITE,"T7 Artifact Recipe",new ItemStack[]{
Artifact.createRecipe(7, ArtifactItemType.SHOVEL),
Artifact.createRecipe(6, ArtifactItemType.SHOVEL),Artifact.createRecipe(6, ArtifactItemType.SHOVEL),null,
Artifact.createArtifactItem(ArtifactItem.ANCIENT_BASE)
}),
t8recipe(ChatColor.WHITE,"T8 Artifact Recipe",new ItemStack[]{
Artifact.createRecipe(8, ArtifactItemType.SHOVEL),
Artifact.createRecipe(7, ArtifactItemType.SHOVEL),Artifact.createRecipe(7, ArtifactItemType.SHOVEL),null,
Artifact.createArtifactItem(ArtifactItem.LOST_ESSENCE)
}),
t9recipe(ChatColor.WHITE,"T9 Artifact Recipe",new ItemStack[]{
Artifact.createRecipe(9, ArtifactItemType.SHOVEL),
Artifact.createRecipe(8, ArtifactItemType.SHOVEL),Artifact.createRecipe(8, ArtifactItemType.SHOVEL),null,
Artifact.createArtifactItem(ArtifactItem.LOST_CORE)
}),
t10recipe(ChatColor.WHITE,"T10 Artifact Recipe",new ItemStack[]{
Artifact.createRecipe(10, ArtifactItemType.SHOVEL),
Artifact.createRecipe(9, ArtifactItemType.SHOVEL),Artifact.createRecipe(9, ArtifactItemType.SHOVEL),null,
Artifact.createArtifactItem(ArtifactItem.LOST_BASE)
}),
t11recipe(ChatColor.WHITE,"T11 Artifact Recipe",new ItemStack[]{
Artifact.createRecipe(11, ArtifactItemType.SHOVEL),
Artifact.createRecipe(10, ArtifactItemType.SHOVEL),Artifact.createRecipe(10, ArtifactItemType.SHOVEL),null,
Artifact.createArtifactItem(ArtifactItem.DIVINE_ESSENCE)
}),
t12recipe(ChatColor.WHITE,"T12 Artifact Recipe",new ItemStack[]{
Artifact.createRecipe(12, ArtifactItemType.SHOVEL),
Artifact.createRecipe(11, ArtifactItemType.SHOVEL),Artifact.createRecipe(11, ArtifactItemType.SHOVEL),null,
Artifact.createArtifactItem(ArtifactItem.DIVINE_CORE)
}),
t13recipe(ChatColor.WHITE,"T13 Artifact Recipe",new ItemStack[]{
Artifact.createRecipe(13, ArtifactItemType.SHOVEL),
Artifact.createRecipe(12, ArtifactItemType.SHOVEL),Artifact.createRecipe(12, ArtifactItemType.SHOVEL),null,
Artifact.createArtifactItem(ArtifactItem.DIVINE_BASE)
}),
t14recipe(ChatColor.WHITE,"T14 Artifact Recipe",new ItemStack[]{
Artifact.createRecipe(14, ArtifactItemType.SHOVEL),
Artifact.createRecipe(13, ArtifactItemType.SHOVEL),Artifact.createRecipe(13, ArtifactItemType.SHOVEL),null,
Artifact.createArtifactItem(ArtifactItem.DIVINE_ESSENCE),
Artifact.createArtifactItem(ArtifactItem.DIVINE_CORE),
Artifact.createArtifactItem(ArtifactItem.DIVINE_BASE)
}),
tierup(ChatColor.YELLOW,"Increase Artifact Material Tier",new ItemStack[]{
Artifact.createArtifactItem(ArtifactItem.LOST_ESSENCE),
Artifact.createArtifactItem(ArtifactItem.ANCIENT_ESSENCE),
Artifact.createArtifactItem(ArtifactItem.ANCIENT_ESSENCE)
}),
tierdown(ChatColor.YELLOW,"Decrease Artifact Material Tier",new ItemStack[]{
Artifact.createArtifactItem(ArtifactItem.ANCIENT_ESSENCE,2),
Artifact.createArtifactItem(ArtifactItem.LOST_ESSENCE)
}),
empower(ChatColor.YELLOW,"Empower Artifact Materials to Divine Tier",new ItemStack[]{
Artifact.createArtifactItem(ArtifactItem.DIVINE_CORE),
Artifact.createArtifactItem(ArtifactItem.ARTIFACT_CORE),new ItemStack(Material.NETHER_STAR),
}),
arrow2(ChatColor.GREEN,"Hand-made Arrow",new ItemStack[]{
Recipes.getArrowFromMeta("DOUBLE_DAMAGE_ARR"),
new ItemStack(Material.FLINT),new ItemStack(Material.STICK),null,
new ItemStack(Material.FEATHER),
}),
arrow4(ChatColor.GREEN,"Diamond-Tipped Arrow",new ItemStack[]{
Recipes.getArrowFromMeta("QUADRUPLE_DAMAGE_ARR"),
Recipes.getArrowFromMeta("DOUBLE_DAMAGE_ARR"),new ItemStack(Material.DIAMOND)
}),
traparrow(ChatColor.GREEN,"Trapping Arrow",new ItemStack[]{
Recipes.getArrowFromMeta("TRAP_ARR"),
new ItemStack(Material.WEB),new ItemStack(Material.STICK),null,
new ItemStack(Material.FEATHER),
}),
explodearrow(ChatColor.GREEN,"Exploding Arrow",new ItemStack[]{
Recipes.getArrowFromMeta("EXPLODE_ARR"),
new ItemStack(Material.SULPHUR),new ItemStack(Material.STICK),null,
new ItemStack(Material.FEATHER),
}),
poisonarrow(ChatColor.GREEN,"Poison Arrow",new ItemStack[]{
Recipes.getArrowFromMeta("POISON_ARR"),
new ItemStack(Material.RAW_FISH,1,(short)3),new ItemStack(Material.STICK),null,
new ItemStack(Material.FEATHER),
});
String name = "";
ItemStack[] rec = null;
ChatColor col = null;
RecipeLinker(ChatColor col, String name, ItemStack[] recipe) {
this.col=col;
this.name=name;
this.rec=recipe;
}
public String getName() {
return name;
}
public ItemStack[] getRec() {
return rec;
}
public ChatColor getColor() {
return col;
}
}

@ -1,6 +1,20 @@
package sig.plugin.TwosideKeeper.HelperStructures;
import java.util.ArrayList;
import java.util.List;
import org.bukkit.ChatColor;
import org.bukkit.Material;
import org.bukkit.enchantments.Enchantment;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.ShapedRecipe;
import org.bukkit.inventory.ShapelessRecipe;
import org.bukkit.inventory.meta.ItemMeta;
import sig.plugin.TwosideKeeper.Artifact;
import sig.plugin.TwosideKeeper.Recipes;
import sig.plugin.TwosideKeeper.TwosideKeeper;
import sig.plugin.TwosideKeeper.HelperStructures.Common.GenericFunctions;
public class CustomItem {
ItemStack item;
@ -18,5 +32,354 @@ public class CustomItem {
temp.setAmount(amt);
return temp;
}
public static void InitializeItemRecipes() {
TwosideKeeper.ITEM_CUBE_RECIPE = ItemCubeRecipe();
TwosideKeeper.LARGE_ITEM_CUBE_RECIPE = LargeItemCubeRecipe();
TwosideKeeper.ENDER_ITEM_CUBE_RECIPE = EnderItemCubeRecipe();
TwosideKeeper.DUPLICATE_ENDER_ITEM_CUBE_RECIPE = DuplicateEnderItemCubeRecipe();
TwosideKeeper.ARROW_QUIVER_RECIPE = ArrowQuiverRecipe();
TwosideKeeper.HARDENED_IRON_HELMET_RECIPE = HardenedRecipe(Material.IRON_HELMET,Material.IRON_BLOCK,"aaa","axa","xxx");
TwosideKeeper.HARDENED_IRON_CHESTPLATE_RECIPE = HardenedRecipe(Material.IRON_CHESTPLATE,Material.IRON_BLOCK,"axa","aaa","aaa");
TwosideKeeper.HARDENED_IRON_LEGGINGS_RECIPE = HardenedRecipe(Material.IRON_LEGGINGS,Material.IRON_BLOCK,"aaa","axa","axa");
TwosideKeeper.HARDENED_IRON_BOOTS_RECIPE = HardenedRecipe(Material.IRON_BOOTS,Material.IRON_BLOCK,"axa","axa","xxx");
TwosideKeeper.HARDENED_DIAMOND_HELMET_RECIPE = HardenedRecipe(Material.DIAMOND_HELMET,Material.DIAMOND_BLOCK,"aaa","axa","xxx");
TwosideKeeper.HARDENED_DIAMOND_CHESTPLATE_RECIPE = HardenedRecipe(Material.DIAMOND_CHESTPLATE,Material.DIAMOND_BLOCK,"axa","aaa","aaa");
TwosideKeeper.HARDENED_DIAMOND_LEGGINGS_RECIPE = HardenedRecipe(Material.DIAMOND_LEGGINGS,Material.DIAMOND_BLOCK,"aaa","axa","axa");
TwosideKeeper.HARDENED_DIAMOND_BOOTS_RECIPE = HardenedRecipe(Material.DIAMOND_BOOTS,Material.DIAMOND_BLOCK,"axa","axa","xxx");
TwosideKeeper.HARDENED_GOLD_HELMET_RECIPE = HardenedRecipe(Material.GOLD_HELMET,Material.GOLD_BLOCK,"aaa","axa","xxx");
TwosideKeeper.HARDENED_GOLD_CHESTPLATE_RECIPE = HardenedRecipe(Material.GOLD_CHESTPLATE,Material.GOLD_BLOCK,"axa","aaa","aaa");
TwosideKeeper.HARDENED_GOLD_LEGGINGS_RECIPE = HardenedRecipe(Material.GOLD_LEGGINGS,Material.GOLD_BLOCK,"aaa","axa","axa");
TwosideKeeper.HARDENED_GOLD_BOOTS_RECIPE = HardenedRecipe(Material.GOLD_BOOTS,Material.GOLD_BLOCK,"axa","axa","xxx");
TwosideKeeper.WOOL_RECOLOR_RECIPE = WoolRecolorRecipe();
TwosideKeeper.SLAB_RECONSTRUCTION_RECIPE = SlabReconstructionRecipe();
TwosideKeeper.ARTIFACT_RECIPE_T1_SWORD_RECIPE = ArtifactItemType.SWORD.defineBaseRecipe();
TwosideKeeper.ARTIFACT_RECIPE_T1_AXE_RECIPE = ArtifactItemType.AXE.defineBaseRecipe();
TwosideKeeper.ARTIFACT_RECIPE_T1_BOOTS_RECIPE = ArtifactItemType.BOOTS.defineBaseRecipe();
TwosideKeeper.ARTIFACT_RECIPE_T1_BOW_RECIPE = ArtifactItemType.BOW.defineBaseRecipe();
TwosideKeeper.ARTIFACT_RECIPE_T1_CHESTPLATE_RECIPE = ArtifactItemType.CHESTPLATE.defineBaseRecipe();
TwosideKeeper.ARTIFACT_RECIPE_T1_FISHING_ROD_RECIPE = ArtifactItemType.FISHING_ROD.defineBaseRecipe();
TwosideKeeper.ARTIFACT_RECIPE_T1_HELMET_RECIPE = ArtifactItemType.HELMET.defineBaseRecipe();
TwosideKeeper.ARTIFACT_RECIPE_T1_SCYTHE_RECIPE = ArtifactItemType.HOE.defineBaseRecipe();
TwosideKeeper.ARTIFACT_RECIPE_T1_LEGGINGS_RECIPE = ArtifactItemType.LEGGINGS.defineBaseRecipe();
TwosideKeeper.ARTIFACT_RECIPE_T1_PICKAXE_RECIPE = ArtifactItemType.PICKAXE.defineBaseRecipe();
TwosideKeeper.ARTIFACT_RECIPE_T1_SHOVEL_RECIPE = ArtifactItemType.SHOVEL.defineBaseRecipe();
TwosideKeeper.ARTIFACT_RECIPE_T2 = UpgradeRecipe(2);
TwosideKeeper.ARTIFACT_RECIPE_T3 = UpgradeRecipe(3);
TwosideKeeper.ARTIFACT_RECIPE_T4 = UpgradeRecipe(4);
TwosideKeeper.ARTIFACT_RECIPE_T5 = UpgradeRecipe(5);
TwosideKeeper.ARTIFACT_RECIPE_T6 = UpgradeRecipe(6);
TwosideKeeper.ARTIFACT_RECIPE_T7 = UpgradeRecipe(7);
TwosideKeeper.ARTIFACT_RECIPE_T8 = UpgradeRecipe(8);
TwosideKeeper.ARTIFACT_RECIPE_T9 = UpgradeRecipe(9);
TwosideKeeper.ARTIFACT_RECIPE_T10 = UpgradeRecipe(10);
TwosideKeeper.ARTIFACT_RECIPE_T11 = UpgradeRecipe(11);
TwosideKeeper.ARTIFACT_RECIPE_T12 = UpgradeRecipe(12);
TwosideKeeper.ARTIFACT_RECIPE_T13 = UpgradeRecipe(13);
TwosideKeeper.ARTIFACT_RECIPE_T14 = UpgradeRecipe(14);
TwosideKeeper.ARTIFACT_RECIPE_T15 = UpgradeRecipe(15);
TwosideKeeper.ARTIFACT_RECIPE_T2_RECIPE = EssenceRecipe();
TwosideKeeper.ARTIFACT_RECIPE_T3_RECIPE = CoreRecipe();
TwosideKeeper.ARTIFACT_RECIPE_T4_RECIPE = BaseRecipe();
TwosideKeeper.ARTIFACT_RECIPE_T5_RECIPE = EssenceRecipe();
TwosideKeeper.ARTIFACT_RECIPE_T6_RECIPE = CoreRecipe();
TwosideKeeper.ARTIFACT_RECIPE_T7_RECIPE = BaseRecipe();
TwosideKeeper.ARTIFACT_RECIPE_T8_RECIPE = EssenceRecipe();
TwosideKeeper.ARTIFACT_RECIPE_T9_RECIPE = CoreRecipe();
TwosideKeeper.ARTIFACT_RECIPE_T10_RECIPE = BaseRecipe();
TwosideKeeper.ARTIFACT_RECIPE_T11_RECIPE = EssenceRecipe();
TwosideKeeper.ARTIFACT_RECIPE_T12_RECIPE = CoreRecipe();
TwosideKeeper.ARTIFACT_RECIPE_T13_RECIPE = BaseRecipe();
TwosideKeeper.ARTIFACT_RECIPE_T14_RECIPE = FinalRecipe();
TwosideKeeper.INCREASE_ARTIFACT_CRAFTING_TIER_RECIPE = IncreaseTierRecipe();
TwosideKeeper.DECREASE_ARTIFACT_CRAFTING_TIER_RECIPE = DecreaseTierRecipe();
TwosideKeeper.EMPOWER_ARTIFACT_CRAFTING_ITEM_RECIPE = EmpowerTierRecipe();
TwosideKeeper.MONEY_CHECK_RECIPE = CheckRecipe();
TwosideKeeper.HANDMADE_ARROW_RECIPE = HandmadeArrowRecipe();
TwosideKeeper.DIAMONDTIPPED_ARROW_RECIPE = DiamondTippedArrowRecipe();
TwosideKeeper.TRAPPING_ARROW_RECIPE = TrappingArrowRecipe();
TwosideKeeper.EXPLODING_ARROW_RECIPE = ExplodingArrowRecipe();
TwosideKeeper.POISON_ARROW_RECIPE = PoisonArrowRecipe();
}
@SuppressWarnings("deprecation")
private static ShapelessRecipe PoisonArrowRecipe() {
ItemStack poisonarrow = Recipes.getArrowFromMeta("POISON_ARR");
ShapelessRecipe poisonarrow_recipe = new ShapelessRecipe(poisonarrow);
poisonarrow_recipe.addIngredient(Material.RAW_FISH,3);
poisonarrow_recipe.addIngredient(Material.STICK);
poisonarrow_recipe.addIngredient(Material.FEATHER);
return poisonarrow_recipe;
}
private static ShapelessRecipe ExplodingArrowRecipe() {
ItemStack explosionarrow = Recipes.getArrowFromMeta("EXPLODE_ARR");
ShapelessRecipe explosionarrow_recipe = new ShapelessRecipe(explosionarrow);
explosionarrow_recipe.addIngredient(Material.SULPHUR);
explosionarrow_recipe.addIngredient(Material.STICK);
explosionarrow_recipe.addIngredient(Material.FEATHER);
return explosionarrow_recipe;
}
private static ShapelessRecipe TrappingArrowRecipe() {
ItemStack trappingarrow = Recipes.getArrowFromMeta("TRAP_ARR");
ShapelessRecipe trappingarrow_recipe = new ShapelessRecipe(trappingarrow);
trappingarrow_recipe.addIngredient(Material.WEB);
trappingarrow_recipe.addIngredient(Material.STICK);
trappingarrow_recipe.addIngredient(Material.FEATHER);
return trappingarrow_recipe;
}
private static ShapelessRecipe DiamondTippedArrowRecipe() {
ItemStack diamondtippedarrow = Recipes.getArrowFromMeta("QUADRUPLE_DAMAGE_ARR");
ShapelessRecipe diamondtippedarrow_recipe = new ShapelessRecipe(diamondtippedarrow);
diamondtippedarrow_recipe.addIngredient(Material.TIPPED_ARROW);
diamondtippedarrow_recipe.addIngredient(Material.DIAMOND);
return diamondtippedarrow_recipe;
}
private static ShapelessRecipe HandmadeArrowRecipe() {
ItemStack handmadearrow = Recipes.getArrowFromMeta("DOUBLE_DAMAGE_ARR");
ShapelessRecipe handmadearrow_recipe = new ShapelessRecipe(handmadearrow);
handmadearrow_recipe.addIngredient(Material.FLINT);
handmadearrow_recipe.addIngredient(Material.STICK);
handmadearrow_recipe.addIngredient(Material.FEATHER);
return handmadearrow_recipe;
}
private static ShapelessRecipe CheckRecipe() {
ItemStack check = MoneyCheck();
ShapelessRecipe checkrecipe = new ShapelessRecipe(check);
checkrecipe.addIngredient(Material.INK_SACK);
checkrecipe.addIngredient(Material.PAPER);
checkrecipe.addIngredient(Material.FEATHER);
return checkrecipe;
}
public static ItemStack MoneyCheck() {
ItemStack check = new ItemStack(Material.PAPER);
check.addUnsafeEnchantment(Enchantment.LUCK, 1);
ItemMeta m = check.getItemMeta();
m.setDisplayName("Money Cheque");
List<String> lore = new ArrayList<String>();
lore.add("An unsigned check. "+ChatColor.YELLOW+"Right-click");
lore.add("the check while holding it to");
lore.add("write a value and sign the check.");
m.setLore(lore);
check.setItemMeta(m);
return check;
}
private static ShapelessRecipe EmpowerTierRecipe() {
ShapelessRecipe upgraderecipe = new ShapelessRecipe(Artifact.createArtifactItem(ArtifactItem.DIVINE_BASE));
upgraderecipe.addIngredient(Material.NETHER_STAR);
upgraderecipe.addIngredient(Material.CLAY_BALL);
return upgraderecipe;
}
private static ShapelessRecipe DecreaseTierRecipe() {
ItemStack newitem = Artifact.createArtifactItem(ArtifactItem.ARTIFACT_ESSENCE);
newitem.setAmount(2);
ShapelessRecipe upgraderecipe = new ShapelessRecipe(newitem);
upgraderecipe.addIngredient(Material.SUGAR);
return upgraderecipe;
}
private static ShapelessRecipe IncreaseTierRecipe() {
ItemStack newitem = Artifact.createArtifactItem(ArtifactItem.ARTIFACT_ESSENCE);
ShapelessRecipe upgraderecipe = new ShapelessRecipe(newitem);
upgraderecipe.addIngredient(2,Material.SUGAR);
return upgraderecipe;
}
@SuppressWarnings("deprecation")
private static ShapelessRecipe FinalRecipe() {
ShapelessRecipe newrecipe = new ShapelessRecipe(Artifact.convert(new ItemStack(Material.STAINED_GLASS_PANE, 1, (short)ArtifactItemType.PICKAXE.getDataValue())));
newrecipe.addIngredient(2, Material.STAINED_GLASS_PANE, ArtifactItemType.PICKAXE.getDataValue());
newrecipe.addIngredient(Material.SUGAR);
newrecipe.addIngredient(Material.MAGMA_CREAM);
newrecipe.addIngredient(Material.CLAY_BALL);
return newrecipe;
}
@SuppressWarnings("deprecation")
private static ShapelessRecipe BaseRecipe() {
ShapelessRecipe newrecipe = new ShapelessRecipe(Artifact.convert(new ItemStack(Material.STAINED_GLASS_PANE, 1, (short)ArtifactItemType.CHESTPLATE.getDataValue())));
newrecipe.addIngredient(2, Material.STAINED_GLASS_PANE, ArtifactItemType.CHESTPLATE.getDataValue());
newrecipe.addIngredient(Material.CLAY_BALL);
return newrecipe;
}
@SuppressWarnings("deprecation")
private static ShapelessRecipe CoreRecipe() {
ShapelessRecipe newrecipe = new ShapelessRecipe(Artifact.convert(new ItemStack(Material.STAINED_GLASS_PANE, 1, (short)ArtifactItemType.SHOVEL.getDataValue())));
newrecipe.addIngredient(2, Material.STAINED_GLASS_PANE, ArtifactItemType.SHOVEL.getDataValue());
newrecipe.addIngredient(Material.MAGMA_CREAM);
return newrecipe;
}
@SuppressWarnings("deprecation")
private static ShapelessRecipe EssenceRecipe() {
ShapelessRecipe newrecipe = new ShapelessRecipe(Artifact.convert(new ItemStack(Material.STAINED_GLASS_PANE, 1, (short)ArtifactItemType.SWORD.getDataValue())));
newrecipe.addIngredient(2, Material.STAINED_GLASS_PANE, ArtifactItemType.SWORD.getDataValue());
newrecipe.addIngredient(Material.SUGAR);
return newrecipe;
}
@SuppressWarnings("deprecation")
private static ShapelessRecipe UpgradeRecipe(int i) {
ShapelessRecipe upgrade_recipe = new ShapelessRecipe(ArtifactItemType.SWORD.getTieredItem(i));
upgrade_recipe.addIngredient(Material.STAINED_GLASS_PANE, ArtifactItemType.SWORD.getDataValue());
upgrade_recipe.addIngredient(ArtifactItemType.SWORD.getTieredItem(i).getType(),-1);
return upgrade_recipe;
}
@SuppressWarnings("deprecation")
private static ShapelessRecipe SlabReconstructionRecipe() {
ShapelessRecipe plank_construction_recipe = new ShapelessRecipe(new ItemStack(Material.WOOD,1,(byte)2));
plank_construction_recipe.addIngredient(2, Material.getMaterial(126), (short)2);
return plank_construction_recipe;
}
@SuppressWarnings("deprecation")
private static ShapedRecipe WoolRecolorRecipe() {
ShapedRecipe wool_recolor_recipe = new ShapedRecipe(new ItemStack(Material.WOOL,8,(short)4));
wool_recolor_recipe.shape("wxy","zda","bce");
wool_recolor_recipe.setIngredient('w', Material.WOOL, (short)2);
wool_recolor_recipe.setIngredient('x', Material.WOOL, (short)4);
wool_recolor_recipe.setIngredient('y', Material.WOOL, (short)6);
wool_recolor_recipe.setIngredient('z', Material.WOOL, (short)8);
wool_recolor_recipe.setIngredient('a', Material.WOOL, (short)10);
wool_recolor_recipe.setIngredient('b', Material.WOOL, (short)12);
wool_recolor_recipe.setIngredient('c', Material.WOOL, (short)14);
wool_recolor_recipe.setIngredient('e', Material.WOOL, (short)11);
wool_recolor_recipe.setIngredient('d', Material.getMaterial(351), (short)4);
return wool_recolor_recipe;
}
private static ShapedRecipe HardenedRecipe(Material name, Material resource, String line1, String line2, String line3) {
ItemStack blockarmorpc = HardenedPiece(name);
ShapedRecipe BlockArmor = new ShapedRecipe(blockarmorpc);
BlockArmor.shape(line1,line2,line3);
BlockArmor.setIngredient('a', resource);
return BlockArmor;
}
public static ItemStack HardenedPiece(Material item) {
ItemStack blockarmorpc = new ItemStack(item);
return GenericFunctions.addHardenedItemBreaks(blockarmorpc, 5, true);
}
private static ShapedRecipe ArrowQuiverRecipe() {
ShapedRecipe ArrowQuiver = new ShapedRecipe(ArrowQuiver());
ArrowQuiver.shape("xle","lsl","xlx");
ArrowQuiver.setIngredient('s', Material.SPECTRAL_ARROW);
ArrowQuiver.setIngredient('l', Material.LEATHER);
ArrowQuiver.setIngredient('e', Material.EMERALD_BLOCK);
return ArrowQuiver;
}
public static ItemStack ArrowQuiver() {
ItemStack arrow_quiver = new ItemStack(Material.TIPPED_ARROW);
List<String> arrow_quiver_lore = new ArrayList<String>();
arrow_quiver_lore.add("A quiver that holds many arrows.");
arrow_quiver_lore.add(ChatColor.GRAY+"Arrows Remaining: "+ChatColor.YELLOW+"5");
ItemMeta arrow_quiver_meta=arrow_quiver.getItemMeta();
arrow_quiver_meta.setLore(arrow_quiver_lore);
arrow_quiver_meta.setDisplayName(ChatColor.BLUE+"Arrow Quiver");
arrow_quiver.setItemMeta(arrow_quiver_meta);
arrow_quiver.addUnsafeEnchantment(Enchantment.ARROW_INFINITE, 5);
arrow_quiver.setAmount(1);
return arrow_quiver;
}
private static ShapelessRecipe DuplicateEnderItemCubeRecipe() {
ShapelessRecipe ItemCube1 = new ShapelessRecipe(CustomRecipe.ENDER_ITEM_CUBE_DUPLICATE.setCustomRecipeItem(new ItemStack(Material.ENDER_CHEST,2)));
ItemCube1.addIngredient(Material.ENDER_CHEST);
ItemCube1.addIngredient(Material.NETHER_STAR);
return ItemCube1;
}
private static ShapedRecipe EnderItemCubeRecipe() {
ShapedRecipe ItemCube = new ShapedRecipe(EnderItemCube());
ItemCube.shape("ooo","ece","ooo");
ItemCube.setIngredient('o', Material.OBSIDIAN);
ItemCube.setIngredient('e', Material.EMERALD);
ItemCube.setIngredient('c', Material.ENDER_CHEST);
return ItemCube;
}
public static ItemStack EnderItemCube() {
return EnderItemCube(1);
}
public static ItemStack EnderItemCube(int amt) {
ItemStack item_ItemCube = new ItemStack(Material.ENDER_CHEST);
item_ItemCube.setAmount(amt);
ItemMeta item_ItemCube_meta=item_ItemCube.getItemMeta();
List<String> item_ItemCube_lore = new ArrayList<String>();
item_ItemCube_lore.add("A storage container that can");
item_ItemCube_lore.add("be carried around. "+ChatColor.GOLD+"Open by");
item_ItemCube_lore.add(ChatColor.GOLD+"right-clicking.");
item_ItemCube_meta.setLore(item_ItemCube_lore);
item_ItemCube_meta.setDisplayName("Ender Item Cube");
item_ItemCube.setItemMeta(item_ItemCube_meta);
return item_ItemCube.clone();
}
@SuppressWarnings("deprecation")
private static ShapedRecipe LargeItemCubeRecipe() {
ItemStack item_ItemCube = LargeItemCube();
ShapedRecipe ItemCube = new ShapedRecipe(item_ItemCube);
ItemCube.shape("ppp","gcg","ppp");
ItemCube.setIngredient('p', Material.WOOD, -1);
ItemCube.setIngredient('g', Material.GOLD_BLOCK);
ItemCube.setIngredient('c', Material.CHEST);
return ItemCube;
}
public static ItemStack LargeItemCube() {
ItemStack item_ItemCube = new ItemStack(Material.STORAGE_MINECART);
ItemMeta item_ItemCube_meta=item_ItemCube.getItemMeta();
List<String> item_ItemCube_lore = new ArrayList<String>();
item_ItemCube_lore.add("A storage container that can");
item_ItemCube_lore.add("be carried around. "+ChatColor.GOLD+"Open by");
item_ItemCube_lore.add(ChatColor.GOLD+"right-clicking.");
item_ItemCube_meta.setLore(item_ItemCube_lore);
item_ItemCube_meta.setDisplayName("Large Item Cube");
item_ItemCube.setItemMeta(item_ItemCube_meta);
return item_ItemCube.clone();
}
@SuppressWarnings("deprecation")
private static ShapedRecipe ItemCubeRecipe() {
ItemStack item_ItemCube = ItemCube();
ShapedRecipe ItemCube = new ShapedRecipe(item_ItemCube);
ItemCube.shape("ppp","pcp","ppp");
ItemCube.setIngredient('p', Material.WOOD, -1);
ItemCube.setIngredient('c', Material.CHEST);
return ItemCube;
}
public static ItemStack ItemCube() {
ItemStack item_ItemCube = new ItemStack(Material.CHEST);
List<String> item_ItemCube_lore = new ArrayList<String>();
item_ItemCube_lore.add("A storage container that can");
item_ItemCube_lore.add("be carried around. "+ChatColor.GOLD+"Open by");
item_ItemCube_lore.add(ChatColor.GOLD+"right-clicking.");
ItemMeta item_ItemCube_meta=item_ItemCube.getItemMeta();
item_ItemCube_meta.setLore(item_ItemCube_lore);
item_ItemCube_meta.setDisplayName("Item Cube");
item_ItemCube.setItemMeta(item_ItemCube_meta);
return item_ItemCube.clone();
}
}

@ -629,6 +629,7 @@ public class Loot {
m.setDisplayName(set_name);
item.setItemMeta(m);
}
item = addEnchantments(item,hardened);
return item;
}

@ -11,21 +11,21 @@ import org.inventivetalent.glow.GlowAPI;
import sig.plugin.TwosideKeeper.HelperStructures.Common.GenericFunctions;
public class MonsterStructure {
public class LivingEntityStructure {
public LivingEntity target;
public String original_name="";
public Monster m;
public LivingEntity m;
public boolean isLeader=false;
public boolean isElite=false;
public HashMap<UUID,Long> hitlist = new HashMap<UUID,Long>();
public HashMap<Player,GlowAPI.Color> glowcolorlist = new HashMap<Player,GlowAPI.Color>();
public MonsterStructure(Monster m) {
public LivingEntityStructure(LivingEntity m) {
target=null;
original_name="";
this.m=m;
}
public MonsterStructure(Monster m, LivingEntity target) {
public LivingEntityStructure(LivingEntity m, LivingEntity target) {
this.target=target;
original_name="";
this.m=m;
@ -87,7 +87,7 @@ public class MonsterStructure {
if (GenericFunctions.isSuppressed(m)) {
setGlow(p,GlowAPI.Color.BLACK);
} else
if (getLeader() || GenericFunctions.isBossMonster(m)) {
if (getLeader() || (m instanceof Monster && GenericFunctions.isBossMonster((Monster)m))) {
setGlow(p,GlowAPI.Color.DARK_RED);
} else
if (getElite()) {
@ -112,14 +112,14 @@ public class MonsterStructure {
}
//Either gets a monster structure that exists or creates a new one.
public static MonsterStructure getMonsterStructure(Monster m) {
UUID id = m.getUniqueId();
if (TwosideKeeper.monsterdata.containsKey(id)) {
return TwosideKeeper.monsterdata.get(id);
public static LivingEntityStructure getLivingEntityStructure(LivingEntity m2) {
UUID id = m2.getUniqueId();
if (TwosideKeeper.livingentitydata.containsKey(id)) {
return TwosideKeeper.livingentitydata.get(id);
} else {
MonsterStructure newstruct = new MonsterStructure(m);
TwosideKeeper.monsterdata.put(id,newstruct);
return TwosideKeeper.monsterdata.get(id);
LivingEntityStructure newstruct = new LivingEntityStructure(m2);
TwosideKeeper.livingentitydata.put(id,newstruct);
return TwosideKeeper.livingentitydata.get(id);
}
}
}

@ -64,7 +64,7 @@ public class MonsterController {
//Zombie leaders have faster movement.
ent.addPotionEffect(new PotionEffect(PotionEffectType.SPEED,Integer.MAX_VALUE,1));
Monster m = (Monster)ent;
MonsterStructure ms = TwosideKeeper.monsterdata.get(ent.getUniqueId());
LivingEntityStructure ms = TwosideKeeper.livingentitydata.get(ent.getUniqueId());
MonsterDifficulty md = getMonsterDifficulty(m);
ms.SetLeader(true);
convertMonster(m,md);
@ -745,7 +745,7 @@ public class MonsterController {
m.setMaxHealth(800); //Target is 800 HP.
m.setHealth(m.getMaxHealth());
TwosideKeeper.log(m.getCustomName()+" health is "+m.getMaxHealth(), 5);
MonsterStructure ms = MonsterStructure.getMonsterStructure(m);
LivingEntityStructure ms = LivingEntityStructure.getLivingEntityStructure(m);
ms.SetLeader(true);
ms.UpdateGlow();
TwosideKeeper.log("->Setting a monster with Difficulty "+md.name()+" w/"+m.getHealth()+"/"+m.getMaxHealth()+" HP to a Leader.",5);
@ -771,7 +771,7 @@ public class MonsterController {
m.addPotionEffect(new PotionEffect(PotionEffectType.DAMAGE_RESISTANCE,Integer.MAX_VALUE,8));
m.setMaxHealth(1200); //Target is 1200 HP.
m.setHealth(m.getMaxHealth());
MonsterStructure ms = MonsterStructure.getMonsterStructure(m);
LivingEntityStructure ms = LivingEntityStructure.getLivingEntityStructure(m);
ms.SetLeader(true);
ms.UpdateGlow();
TwosideKeeper.log("->Setting a monster with Difficulty "+md.name()+" w/"+m.getHealth()+"/"+m.getMaxHealth()+" HP to a Leader.",5);
@ -802,12 +802,12 @@ public class MonsterController {
if(isZombieLeader(m))
{
m.addPotionEffect(new PotionEffect(PotionEffectType.DAMAGE_RESISTANCE,Integer.MAX_VALUE,8));
MonsterStructure ms = MonsterStructure.getMonsterStructure(m);
LivingEntityStructure ms = LivingEntityStructure.getLivingEntityStructure(m);
ms.SetLeader(true);
ms.UpdateGlow();
m.setMaxHealth(1600); //Target is 1600 HP.
m.setHealth(m.getMaxHealth());
MonsterStructure.getMonsterStructure(m).SetLeader(true);
LivingEntityStructure.getLivingEntityStructure(m).SetLeader(true);
TwosideKeeper.log("->Setting a monster with Difficulty "+md.name()+" w/"+m.getHealth()+"/"+m.getMaxHealth()+" HP to a Leader.",5);
} else {
m.setMaxHealth(m.getMaxHealth()*4.0);
@ -836,7 +836,7 @@ public class MonsterController {
}
m.setCustomNameVisible(true);
m.setRemoveWhenFarAway(false);
MonsterStructure ms = MonsterStructure.getMonsterStructure(m);
LivingEntityStructure ms = LivingEntityStructure.getLivingEntityStructure(m);
ms.SetElite(true);
ms.UpdateGlow();
m.getAttribute(Attribute.GENERIC_FOLLOW_RANGE).setBaseValue(72.0);
@ -855,7 +855,7 @@ public class MonsterController {
m.setMaxHealth(400);
m.setHealth(m.getMaxHealth());
m.setCustomName("Zombie Leader");
MonsterStructure ms = MonsterStructure.getMonsterStructure(m);
LivingEntityStructure ms = LivingEntityStructure.getLivingEntityStructure(m);
ms.SetLeader(true);
ms.UpdateGlow();
TwosideKeeper.log("->Setting a monster with Difficulty "+md.name()+" w/"+m.getHealth()+"/"+m.getMaxHealth()+" HP to a Leader.",5);
@ -882,7 +882,7 @@ public class MonsterController {
{
m.setMaxHealth(32000); //Target is 1600 HP.
m.setHealth(m.getMaxHealth());
MonsterStructure ms = MonsterStructure.getMonsterStructure(m);
LivingEntityStructure ms = LivingEntityStructure.getLivingEntityStructure(m);
ms.SetLeader(true);
ms.UpdateGlow();
TwosideKeeper.log("->Setting a monster with Difficulty "+md.name()+" w/"+m.getHealth()+"/"+m.getMaxHealth()+" HP to a Leader.",5);
@ -970,7 +970,7 @@ public class MonsterController {
return MonsterController.convertMonster(m);
}
public static boolean isChargeZombie(Monster m) {
public static boolean isChargeZombie(LivingEntity m) {
if ((m.getType()==EntityType.ZOMBIE || m.getType()==EntityType.PIG_ZOMBIE) &&
MonsterController.getMonsterDifficulty((Monster)m)==MonsterDifficulty.HELLFIRE) {
return true;
@ -978,7 +978,7 @@ public class MonsterController {
return false;
}
public static boolean isUndead(Monster m) {
public static boolean isUndead(LivingEntity m) {
if (m.getType()==EntityType.ZOMBIE ||
m.getType()==EntityType.PIG_ZOMBIE ||
m.getType()==EntityType.GIANT ||
@ -989,9 +989,9 @@ public class MonsterController {
return false;
}
public static boolean isHellfireSpider(Monster m) {
public static boolean isHellfireSpider(LivingEntity m) {
if ((m.getType()==EntityType.SPIDER || m.getType()==EntityType.CAVE_SPIDER) &&
MonsterController.getMonsterDifficulty(m)==MonsterDifficulty.HELLFIRE) {
MonsterController.getMonsterDifficulty((Monster)m)==MonsterDifficulty.HELLFIRE) {
return true;
}
return false;

@ -18,415 +18,40 @@ import org.bukkit.potion.PotionEffectType;
import sig.plugin.TwosideKeeper.HelperStructures.ArtifactItem;
import sig.plugin.TwosideKeeper.HelperStructures.ArtifactItemType;
import sig.plugin.TwosideKeeper.HelperStructures.CustomRecipe;
public class Recipes {
@SuppressWarnings("deprecation")
public static void Initialize_ItemCube_Recipes() {
ItemStack item_ItemCube = new ItemStack(Material.CHEST);
List<String> item_ItemCube_lore = new ArrayList<String>();
item_ItemCube_lore.add("A storage container that can");
item_ItemCube_lore.add("be carried around. "+ChatColor.GOLD+"Open by");
item_ItemCube_lore.add(ChatColor.GOLD+"right-clicking.");
ItemMeta item_ItemCube_meta=item_ItemCube.getItemMeta();
item_ItemCube_meta.setLore(item_ItemCube_lore);
item_ItemCube_meta.setDisplayName("Item Cube");
item_ItemCube.setItemMeta(item_ItemCube_meta);
ShapedRecipe ItemCube = new ShapedRecipe(item_ItemCube);
ItemCube.shape("ppp","pcp","ppp");
ItemCube.setIngredient('p', Material.WOOD, -1);
ItemCube.setIngredient('c', Material.CHEST);
Bukkit.addRecipe(ItemCube);
Bukkit.addRecipe(TwosideKeeper.ITEM_CUBE_RECIPE);
//------------------------------
item_ItemCube = new ItemStack(Material.STORAGE_MINECART);
item_ItemCube_meta=item_ItemCube.getItemMeta();
item_ItemCube_meta.setLore(item_ItemCube_lore);
item_ItemCube_meta.setDisplayName("Large Item Cube");
item_ItemCube.setItemMeta(item_ItemCube_meta);
ItemCube = new ShapedRecipe(item_ItemCube);
ItemCube.shape("ppp","gcg","ppp");
ItemCube.setIngredient('p', Material.WOOD, -1);
ItemCube.setIngredient('g', Material.GOLD_BLOCK);
ItemCube.setIngredient('c', Material.CHEST);
Bukkit.addRecipe(ItemCube);
Bukkit.addRecipe(TwosideKeeper.LARGE_ITEM_CUBE_RECIPE);
//------------------------------
item_ItemCube = new ItemStack(Material.ENDER_CHEST);
item_ItemCube_meta=item_ItemCube.getItemMeta();
item_ItemCube_meta.setLore(item_ItemCube_lore);
item_ItemCube_meta.setDisplayName("Ender Item Cube");
item_ItemCube.setItemMeta(item_ItemCube_meta);
ItemCube = new ShapedRecipe(item_ItemCube);
ItemCube.shape("ooo","ece","ooo");
ItemCube.setIngredient('o', Material.OBSIDIAN);
ItemCube.setIngredient('e', Material.EMERALD);
ItemCube.setIngredient('c', Material.ENDER_CHEST);
Bukkit.addRecipe(ItemCube);
Bukkit.addRecipe(TwosideKeeper.ENDER_ITEM_CUBE_RECIPE);
//------------------------------
ShapelessRecipe ItemCube1 = new ShapelessRecipe(CustomRecipe.ENDER_ITEM_CUBE_DUPLICATE.setCustomRecipeItem(new ItemStack(Material.ENDER_CHEST,2)));
ItemCube1.addIngredient(Material.ENDER_CHEST);
ItemCube1.addIngredient(Material.NETHER_STAR);
Bukkit.addRecipe(ItemCube1);
Bukkit.addRecipe(TwosideKeeper.DUPLICATE_ENDER_ITEM_CUBE_RECIPE);
}
public static void Initialize_ArrowQuiver_Recipe() {
ItemStack arrow_quiver = new ItemStack(Material.TIPPED_ARROW);
List<String> arrow_quiver_lore = new ArrayList<String>();
arrow_quiver_lore.add("A quiver that holds many arrows.");
arrow_quiver_lore.add(ChatColor.GRAY+"Arrows Remaining: "+ChatColor.YELLOW+"5");
ItemMeta arrow_quiver_meta=arrow_quiver.getItemMeta();
arrow_quiver_meta.setLore(arrow_quiver_lore);
arrow_quiver_meta.setDisplayName(ChatColor.BLUE+"Arrow Quiver");
arrow_quiver.setItemMeta(arrow_quiver_meta);
arrow_quiver.addUnsafeEnchantment(Enchantment.ARROW_INFINITE, 5);
arrow_quiver.setAmount(1);
ShapedRecipe ArrowQuiver = new ShapedRecipe(arrow_quiver);
ArrowQuiver.shape("xle","lsl","xlx");
ArrowQuiver.setIngredient('s', Material.SPECTRAL_ARROW);
ArrowQuiver.setIngredient('l', Material.LEATHER);
ArrowQuiver.setIngredient('e', Material.EMERALD_BLOCK);
Bukkit.addRecipe(ArrowQuiver);
Bukkit.addRecipe(TwosideKeeper.ARROW_QUIVER_RECIPE);
}
public static void Initialize_BlockArmor_Recipes() {
ItemStack blockarmorpc = new ItemStack(Material.IRON_HELMET);
List<String> blockarmorpc_lore = new ArrayList<String>();
blockarmorpc_lore.add(ChatColor.BLUE+""+ChatColor.ITALIC+"Hardened Armor");
blockarmorpc_lore.add(ChatColor.GRAY+"Twice as strong");
blockarmorpc_lore.add(ChatColor.GRAY+"Breaks Remaining: "+ChatColor.YELLOW+"4");
ItemMeta blockarmorpc_meta=blockarmorpc.getItemMeta();
blockarmorpc_meta.setLore(blockarmorpc_lore);
blockarmorpc_meta.setDisplayName(ChatColor.BLUE+"Hardened Iron Helmet");
blockarmorpc.setItemMeta(blockarmorpc_meta);
ShapedRecipe BlockArmor = new ShapedRecipe(blockarmorpc);
BlockArmor.shape("aaa","axa");
BlockArmor.setIngredient('a', Material.IRON_BLOCK);
Bukkit.addRecipe(BlockArmor);
//--------------------------------------------
blockarmorpc = new ItemStack(Material.IRON_CHESTPLATE);
blockarmorpc_lore = new ArrayList<String>();
blockarmorpc_lore.add(ChatColor.BLUE+""+ChatColor.ITALIC+"Hardened Armor");
blockarmorpc_lore.add(ChatColor.GRAY+"Twice as strong");
blockarmorpc_lore.add(ChatColor.GRAY+"Breaks Remaining: "+ChatColor.YELLOW+"4");
blockarmorpc_meta=blockarmorpc.getItemMeta();
blockarmorpc_meta.setLore(blockarmorpc_lore);
blockarmorpc_meta.setDisplayName(ChatColor.BLUE+"Hardened Iron Chestplate");
blockarmorpc.setItemMeta(blockarmorpc_meta);
BlockArmor = new ShapedRecipe(blockarmorpc);
BlockArmor.shape("axa","aaa","aaa");
BlockArmor.setIngredient('a', Material.IRON_BLOCK);
Bukkit.addRecipe(BlockArmor);
//--------------------------------------------
blockarmorpc = new ItemStack(Material.IRON_LEGGINGS);
blockarmorpc_lore = new ArrayList<String>();
blockarmorpc_lore.add(ChatColor.BLUE+""+ChatColor.ITALIC+"Hardened Armor");
blockarmorpc_lore.add(ChatColor.GRAY+"Twice as strong");
blockarmorpc_lore.add(ChatColor.GRAY+"Breaks Remaining: "+ChatColor.YELLOW+"4");
blockarmorpc_meta=blockarmorpc.getItemMeta();
blockarmorpc_meta.setLore(blockarmorpc_lore);
blockarmorpc_meta.setDisplayName(ChatColor.BLUE+"Hardened Iron Leggings");
blockarmorpc.setItemMeta(blockarmorpc_meta);
BlockArmor = new ShapedRecipe(blockarmorpc);
BlockArmor.shape("aaa","axa","axa");
BlockArmor.setIngredient('a', Material.IRON_BLOCK);
Bukkit.addRecipe(BlockArmor);
//--------------------------------------------
blockarmorpc = new ItemStack(Material.IRON_BOOTS);
blockarmorpc_lore = new ArrayList<String>();
blockarmorpc_lore.add(ChatColor.BLUE+""+ChatColor.ITALIC+"Hardened Armor");
blockarmorpc_lore.add(ChatColor.GRAY+"Twice as strong");
blockarmorpc_lore.add(ChatColor.GRAY+"Breaks Remaining: "+ChatColor.YELLOW+"4");
blockarmorpc_meta=blockarmorpc.getItemMeta();
blockarmorpc_meta.setLore(blockarmorpc_lore);
blockarmorpc_meta.setDisplayName(ChatColor.BLUE+"Hardened Iron Boots");
blockarmorpc.setItemMeta(blockarmorpc_meta);
BlockArmor = new ShapedRecipe(blockarmorpc);
BlockArmor.shape("axa","axa");
BlockArmor.setIngredient('a', Material.IRON_BLOCK);
Bukkit.addRecipe(BlockArmor);
//--------------------------------------------
blockarmorpc = new ItemStack(Material.GOLD_HELMET);
blockarmorpc_lore = new ArrayList<String>();
blockarmorpc_lore.add(ChatColor.BLUE+""+ChatColor.ITALIC+"Hardened Armor");
blockarmorpc_lore.add(ChatColor.GRAY+"Twice as strong");
blockarmorpc_lore.add(ChatColor.GRAY+"Breaks Remaining: "+ChatColor.YELLOW+"4");
blockarmorpc_meta=blockarmorpc.getItemMeta();
blockarmorpc_meta.setLore(blockarmorpc_lore);
blockarmorpc_meta.setDisplayName(ChatColor.BLUE+"Hardened Gold Helmet");
blockarmorpc.setItemMeta(blockarmorpc_meta);
BlockArmor = new ShapedRecipe(blockarmorpc);
BlockArmor.shape("aaa","axa");
BlockArmor.setIngredient('a', Material.GOLD_BLOCK);
Bukkit.addRecipe(BlockArmor);
//--------------------------------------------
blockarmorpc = new ItemStack(Material.GOLD_CHESTPLATE);
blockarmorpc_lore = new ArrayList<String>();
blockarmorpc_lore.add(ChatColor.BLUE+""+ChatColor.ITALIC+"Hardened Armor");
blockarmorpc_lore.add(ChatColor.GRAY+"Twice as strong");
blockarmorpc_lore.add(ChatColor.GRAY+"Breaks Remaining: "+ChatColor.YELLOW+"4");
blockarmorpc_meta=blockarmorpc.getItemMeta();
blockarmorpc_meta.setLore(blockarmorpc_lore);
blockarmorpc_meta.setDisplayName(ChatColor.BLUE+"Hardened Gold Chestplate");
blockarmorpc.setItemMeta(blockarmorpc_meta);
BlockArmor = new ShapedRecipe(blockarmorpc);
BlockArmor.shape("axa","aaa","aaa");
BlockArmor.setIngredient('a', Material.GOLD_BLOCK);
Bukkit.addRecipe(BlockArmor);
//--------------------------------------------
blockarmorpc = new ItemStack(Material.GOLD_LEGGINGS);
blockarmorpc_lore = new ArrayList<String>();
blockarmorpc_lore.add(ChatColor.BLUE+""+ChatColor.ITALIC+"Hardened Armor");
blockarmorpc_lore.add(ChatColor.GRAY+"Twice as strong");
blockarmorpc_lore.add(ChatColor.GRAY+"Breaks Remaining: "+ChatColor.YELLOW+"4");
blockarmorpc_meta=blockarmorpc.getItemMeta();
blockarmorpc_meta.setLore(blockarmorpc_lore);
blockarmorpc_meta.setDisplayName(ChatColor.BLUE+"Hardened Gold Leggings");
blockarmorpc.setItemMeta(blockarmorpc_meta);
BlockArmor = new ShapedRecipe(blockarmorpc);
BlockArmor.shape("aaa","axa","axa");
BlockArmor.setIngredient('a', Material.GOLD_BLOCK);
Bukkit.addRecipe(BlockArmor);
//--------------------------------------------
blockarmorpc = new ItemStack(Material.GOLD_BOOTS);
blockarmorpc_lore = new ArrayList<String>();
blockarmorpc_lore.add(ChatColor.BLUE+""+ChatColor.ITALIC+"Hardened Armor");
blockarmorpc_lore.add(ChatColor.GRAY+"Twice as strong");
blockarmorpc_lore.add(ChatColor.GRAY+"Breaks Remaining: "+ChatColor.YELLOW+"4");
blockarmorpc_meta=blockarmorpc.getItemMeta();
blockarmorpc_meta.setLore(blockarmorpc_lore);
blockarmorpc_meta.setDisplayName(ChatColor.BLUE+"Hardened Gold Boots");
blockarmorpc.setItemMeta(blockarmorpc_meta);
BlockArmor = new ShapedRecipe(blockarmorpc);
BlockArmor.shape("axa","axa");
BlockArmor.setIngredient('a', Material.GOLD_BLOCK);
Bukkit.addRecipe(BlockArmor);
//--------------------------------------------
blockarmorpc = new ItemStack(Material.DIAMOND_HELMET);
blockarmorpc_lore = new ArrayList<String>();
blockarmorpc_lore.add(ChatColor.BLUE+""+ChatColor.ITALIC+"Hardened Armor");
blockarmorpc_lore.add(ChatColor.GRAY+"Twice as strong");
blockarmorpc_lore.add(ChatColor.GRAY+"Breaks Remaining: "+ChatColor.YELLOW+"4");
blockarmorpc_meta=blockarmorpc.getItemMeta();
blockarmorpc_meta.setLore(blockarmorpc_lore);
blockarmorpc_meta.setDisplayName(ChatColor.BLUE+"Hardened Diamond Helmet");
blockarmorpc.setItemMeta(blockarmorpc_meta);
BlockArmor = new ShapedRecipe(blockarmorpc);
BlockArmor.shape("aaa","axa");
BlockArmor.setIngredient('a', Material.DIAMOND_BLOCK);
Bukkit.addRecipe(BlockArmor);
//--------------------------------------------
blockarmorpc = new ItemStack(Material.DIAMOND_CHESTPLATE);
blockarmorpc_lore = new ArrayList<String>();
blockarmorpc_lore.add(ChatColor.BLUE+""+ChatColor.ITALIC+"Hardened Armor");
blockarmorpc_lore.add(ChatColor.GRAY+"Twice as strong");
blockarmorpc_lore.add(ChatColor.GRAY+"Breaks Remaining: "+ChatColor.YELLOW+"4");
blockarmorpc_meta=blockarmorpc.getItemMeta();
blockarmorpc_meta.setLore(blockarmorpc_lore);
blockarmorpc_meta.setDisplayName(ChatColor.BLUE+"Hardened Diamond Chestplate");
blockarmorpc.setItemMeta(blockarmorpc_meta);
BlockArmor = new ShapedRecipe(blockarmorpc);
BlockArmor.shape("axa","aaa","aaa");
BlockArmor.setIngredient('a', Material.DIAMOND_BLOCK);
Bukkit.addRecipe(BlockArmor);
//--------------------------------------------
blockarmorpc = new ItemStack(Material.DIAMOND_LEGGINGS);
blockarmorpc_lore = new ArrayList<String>();
blockarmorpc_lore.add(ChatColor.BLUE+""+ChatColor.ITALIC+"Hardened Armor");
blockarmorpc_lore.add(ChatColor.GRAY+"Twice as strong");
blockarmorpc_lore.add(ChatColor.GRAY+"Breaks Remaining: "+ChatColor.YELLOW+"4");
blockarmorpc_meta=blockarmorpc.getItemMeta();
blockarmorpc_meta.setLore(blockarmorpc_lore);
blockarmorpc_meta.setDisplayName(ChatColor.BLUE+"Hardened Diamond Leggings");
blockarmorpc.setItemMeta(blockarmorpc_meta);
BlockArmor = new ShapedRecipe(blockarmorpc);
BlockArmor.shape("aaa","axa","axa");
BlockArmor.setIngredient('a', Material.DIAMOND_BLOCK);
Bukkit.addRecipe(BlockArmor);
Bukkit.addRecipe(TwosideKeeper.HARDENED_IRON_HELMET_RECIPE);
Bukkit.addRecipe(TwosideKeeper.HARDENED_IRON_CHESTPLATE_RECIPE);
Bukkit.addRecipe(TwosideKeeper.HARDENED_IRON_LEGGINGS_RECIPE);
Bukkit.addRecipe(TwosideKeeper.HARDENED_IRON_BOOTS_RECIPE);
Bukkit.addRecipe(TwosideKeeper.HARDENED_DIAMOND_HELMET_RECIPE);
Bukkit.addRecipe(TwosideKeeper.HARDENED_DIAMOND_CHESTPLATE_RECIPE);
Bukkit.addRecipe(TwosideKeeper.HARDENED_DIAMOND_LEGGINGS_RECIPE);
Bukkit.addRecipe(TwosideKeeper.HARDENED_DIAMOND_BOOTS_RECIPE);
Bukkit.addRecipe(TwosideKeeper.HARDENED_GOLD_HELMET_RECIPE);
Bukkit.addRecipe(TwosideKeeper.HARDENED_GOLD_CHESTPLATE_RECIPE);
Bukkit.addRecipe(TwosideKeeper.HARDENED_GOLD_LEGGINGS_RECIPE);
Bukkit.addRecipe(TwosideKeeper.HARDENED_GOLD_BOOTS_RECIPE);
//--------------------------------------------
blockarmorpc = new ItemStack(Material.DIAMOND_BOOTS);
blockarmorpc_lore = new ArrayList<String>();
blockarmorpc_lore.add(ChatColor.BLUE+""+ChatColor.ITALIC+"Hardened Armor");
blockarmorpc_lore.add(ChatColor.GRAY+"Twice as strong");
blockarmorpc_lore.add(ChatColor.GRAY+"Breaks Remaining: "+ChatColor.YELLOW+"4");
blockarmorpc_meta=blockarmorpc.getItemMeta();
blockarmorpc_meta.setLore(blockarmorpc_lore);
blockarmorpc_meta.setDisplayName(ChatColor.BLUE+"Hardened Diamond Boots");
blockarmorpc.setItemMeta(blockarmorpc_meta);
BlockArmor = new ShapedRecipe(blockarmorpc);
BlockArmor.shape("axa","axa");
BlockArmor.setIngredient('a', Material.DIAMOND_BLOCK);
Bukkit.addRecipe(BlockArmor);
//--------------------------------------------
}
public static void Initialize_ItemDeconstruction_Recipes() {
ShapelessRecipe decons_recipe = new ShapelessRecipe(new ItemStack(Material.LEATHER,4));
decons_recipe.addIngredient(Material.LEATHER_BOOTS);
Bukkit.addRecipe(decons_recipe);
decons_recipe = new ShapelessRecipe(new ItemStack(Material.LEATHER,7));
decons_recipe.addIngredient(Material.LEATHER_LEGGINGS);
Bukkit.addRecipe(decons_recipe);
decons_recipe = new ShapelessRecipe(new ItemStack(Material.LEATHER,8));
decons_recipe.addIngredient(Material.LEATHER_CHESTPLATE);
Bukkit.addRecipe(decons_recipe);
decons_recipe = new ShapelessRecipe(new ItemStack(Material.LEATHER,5));
decons_recipe.addIngredient(Material.LEATHER_HELMET);
Bukkit.addRecipe(decons_recipe);
decons_recipe = new ShapelessRecipe(new ItemStack(Material.WOOD,2));
decons_recipe.addIngredient(Material.WOOD_SWORD);
Bukkit.addRecipe(decons_recipe);
decons_recipe = new ShapelessRecipe(new ItemStack(Material.WOOD,3));
decons_recipe.addIngredient(Material.WOOD_AXE);
Bukkit.addRecipe(decons_recipe);
decons_recipe = new ShapelessRecipe(new ItemStack(Material.WOOD,3));
decons_recipe.addIngredient(Material.WOOD_PICKAXE);
Bukkit.addRecipe(decons_recipe);
decons_recipe = new ShapelessRecipe(new ItemStack(Material.WOOD,2));
decons_recipe.addIngredient(Material.WOOD_HOE);
Bukkit.addRecipe(decons_recipe);
decons_recipe = new ShapelessRecipe(new ItemStack(Material.WOOD,1));
decons_recipe.addIngredient(Material.WOOD_SPADE);
Bukkit.addRecipe(decons_recipe);
decons_recipe = new ShapelessRecipe(new ItemStack(Material.COBBLESTONE,2));
decons_recipe.addIngredient(Material.STONE_SWORD);
Bukkit.addRecipe(decons_recipe);
decons_recipe = new ShapelessRecipe(new ItemStack(Material.COBBLESTONE,3));
decons_recipe.addIngredient(Material.STONE_AXE);
Bukkit.addRecipe(decons_recipe);
decons_recipe = new ShapelessRecipe(new ItemStack(Material.COBBLESTONE,3));
decons_recipe.addIngredient(Material.STONE_PICKAXE);
Bukkit.addRecipe(decons_recipe);
decons_recipe = new ShapelessRecipe(new ItemStack(Material.COBBLESTONE,2));
decons_recipe.addIngredient(Material.STONE_HOE);
Bukkit.addRecipe(decons_recipe);
decons_recipe = new ShapelessRecipe(new ItemStack(Material.COBBLESTONE,1));
decons_recipe.addIngredient(Material.STONE_SPADE);
Bukkit.addRecipe(decons_recipe);
decons_recipe = new ShapelessRecipe(new ItemStack(Material.IRON_INGOT,4));
decons_recipe.addIngredient(Material.IRON_BOOTS);
Bukkit.addRecipe(decons_recipe);
decons_recipe = new ShapelessRecipe(new ItemStack(Material.IRON_INGOT,7));
decons_recipe.addIngredient(Material.IRON_LEGGINGS);
Bukkit.addRecipe(decons_recipe);
decons_recipe = new ShapelessRecipe(new ItemStack(Material.IRON_INGOT,8));
decons_recipe.addIngredient(Material.IRON_CHESTPLATE);
Bukkit.addRecipe(decons_recipe);
decons_recipe = new ShapelessRecipe(new ItemStack(Material.IRON_INGOT,5));
decons_recipe.addIngredient(Material.IRON_HELMET);
Bukkit.addRecipe(decons_recipe);
decons_recipe = new ShapelessRecipe(new ItemStack(Material.IRON_INGOT,2));
decons_recipe.addIngredient(Material.IRON_SWORD);
Bukkit.addRecipe(decons_recipe);
decons_recipe = new ShapelessRecipe(new ItemStack(Material.IRON_INGOT,3));
decons_recipe.addIngredient(Material.IRON_AXE);
Bukkit.addRecipe(decons_recipe);
decons_recipe = new ShapelessRecipe(new ItemStack(Material.IRON_INGOT,3));
decons_recipe.addIngredient(Material.IRON_PICKAXE);
Bukkit.addRecipe(decons_recipe);
decons_recipe = new ShapelessRecipe(new ItemStack(Material.IRON_INGOT,2));
decons_recipe.addIngredient(Material.IRON_HOE);
Bukkit.addRecipe(decons_recipe);
decons_recipe = new ShapelessRecipe(new ItemStack(Material.IRON_INGOT,1));
decons_recipe.addIngredient(Material.IRON_SPADE);
Bukkit.addRecipe(decons_recipe);
decons_recipe = new ShapelessRecipe(new ItemStack(Material.GOLD_INGOT,4));
decons_recipe.addIngredient(Material.GOLD_BOOTS);
Bukkit.addRecipe(decons_recipe);
decons_recipe = new ShapelessRecipe(new ItemStack(Material.GOLD_INGOT,7));
decons_recipe.addIngredient(Material.GOLD_LEGGINGS);
Bukkit.addRecipe(decons_recipe);
decons_recipe = new ShapelessRecipe(new ItemStack(Material.GOLD_INGOT,8));
decons_recipe.addIngredient(Material.GOLD_CHESTPLATE);
Bukkit.addRecipe(decons_recipe);
decons_recipe = new ShapelessRecipe(new ItemStack(Material.GOLD_INGOT,5));
decons_recipe.addIngredient(Material.GOLD_HELMET);
Bukkit.addRecipe(decons_recipe);
decons_recipe = new ShapelessRecipe(new ItemStack(Material.GOLD_INGOT,2));
decons_recipe.addIngredient(Material.GOLD_SWORD);
Bukkit.addRecipe(decons_recipe);
decons_recipe = new ShapelessRecipe(new ItemStack(Material.GOLD_INGOT,3));
decons_recipe.addIngredient(Material.GOLD_AXE);
Bukkit.addRecipe(decons_recipe);
decons_recipe = new ShapelessRecipe(new ItemStack(Material.GOLD_INGOT,3));
decons_recipe.addIngredient(Material.GOLD_PICKAXE);
Bukkit.addRecipe(decons_recipe);
decons_recipe = new ShapelessRecipe(new ItemStack(Material.GOLD_INGOT,2));
decons_recipe.addIngredient(Material.GOLD_HOE);
Bukkit.addRecipe(decons_recipe);
decons_recipe = new ShapelessRecipe(new ItemStack(Material.GOLD_INGOT,1));
decons_recipe.addIngredient(Material.GOLD_SPADE);
Bukkit.addRecipe(decons_recipe);
decons_recipe = new ShapelessRecipe(new ItemStack(Material.DIAMOND,4));
decons_recipe.addIngredient(Material.DIAMOND_BOOTS);
Bukkit.addRecipe(decons_recipe);
decons_recipe = new ShapelessRecipe(new ItemStack(Material.DIAMOND,7));
decons_recipe.addIngredient(Material.DIAMOND_LEGGINGS);
Bukkit.addRecipe(decons_recipe);
decons_recipe = new ShapelessRecipe(new ItemStack(Material.DIAMOND,8));
decons_recipe.addIngredient(Material.DIAMOND_CHESTPLATE);
Bukkit.addRecipe(decons_recipe);
decons_recipe = new ShapelessRecipe(new ItemStack(Material.DIAMOND,5));
decons_recipe.addIngredient(Material.DIAMOND_HELMET);
Bukkit.addRecipe(decons_recipe);
decons_recipe = new ShapelessRecipe(new ItemStack(Material.DIAMOND,2));
decons_recipe.addIngredient(Material.DIAMOND_SWORD);
Bukkit.addRecipe(decons_recipe);
decons_recipe = new ShapelessRecipe(new ItemStack(Material.DIAMOND,3));
decons_recipe.addIngredient(Material.DIAMOND_AXE);
Bukkit.addRecipe(decons_recipe);
decons_recipe = new ShapelessRecipe(new ItemStack(Material.DIAMOND,3));
decons_recipe.addIngredient(Material.DIAMOND_PICKAXE);
Bukkit.addRecipe(decons_recipe);
decons_recipe = new ShapelessRecipe(new ItemStack(Material.DIAMOND,2));
decons_recipe.addIngredient(Material.DIAMOND_HOE);
Bukkit.addRecipe(decons_recipe);
decons_recipe = new ShapelessRecipe(new ItemStack(Material.DIAMOND,1));
decons_recipe.addIngredient(Material.DIAMOND_SPADE);
Bukkit.addRecipe(decons_recipe);
}
@SuppressWarnings("deprecation")
public static void Initialize_WoolRecolor_Recipes() {
@ -582,38 +207,6 @@ public class Recipes {
checkrecipe.addIngredient(Material.FEATHER);
Bukkit.addRecipe(checkrecipe);
}
public static void Initialize_HunterCompass_Recipe() {
ItemStack huntercompass = new ItemStack(Material.COMPASS);
huntercompass.addUnsafeEnchantment(Enchantment.LUCK, 1);
ItemMeta m = huntercompass.getItemMeta();
m.setDisplayName(ChatColor.RED+"Hunter's Compass");
List<String> lore = new ArrayList<String>();
lore.add("A compass for the true hunter.");
lore.add("Legends tell of hunters that have");
lore.add("come back with great treasures and");
lore.add("much wealth from following the.");
lore.add("directions of the guided arrow.");
lore.add("");
lore.add("You may need to calibrate it by");
lore.add("holding it first.");
lore.add("");
lore.add("The compass appears to be slightly");
lore.add("unstable...");
m.setLore(lore);
huntercompass.setItemMeta(m);
huntercompass.addUnsafeEnchantment(Enchantment.LUCK, 1);
ShapelessRecipe huntercompass_recipe = new ShapelessRecipe(huntercompass);
huntercompass_recipe.addIngredient(Material.COMPASS);
huntercompass_recipe.addIngredient(Material.DIAMOND_BLOCK);
huntercompass_recipe.addIngredient(Material.DIAMOND_BLOCK);
huntercompass_recipe.addIngredient(Material.DIAMOND_BLOCK);
huntercompass_recipe.addIngredient(Material.DIAMOND_BLOCK);
huntercompass_recipe.addIngredient(Material.DIAMOND_BLOCK);
huntercompass_recipe.addIngredient(Material.DIAMOND_BLOCK);
huntercompass_recipe.addIngredient(Material.DIAMOND_BLOCK);
huntercompass_recipe.addIngredient(Material.DIAMOND_BLOCK);
Bukkit.addRecipe(huntercompass_recipe);
}
@SuppressWarnings("deprecation")
public static void Initialize_CustomArrow_Recipes() {

@ -16,7 +16,6 @@ import org.bukkit.block.Block;
import org.bukkit.block.Chest;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.configuration.file.YamlConfiguration;
import org.bukkit.entity.Item;
import org.bukkit.inventory.ItemStack;
import sig.plugin.TwosideKeeper.HelperStructures.Common.GenericFunctions;

@ -4,6 +4,7 @@ import java.io.File;
import java.io.IOException;
import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
@ -127,6 +128,7 @@ import org.bukkit.inventory.EquipmentSlot;
import org.bukkit.inventory.Inventory;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.ShapedRecipe;
import org.bukkit.inventory.ShapelessRecipe;
import org.bukkit.inventory.meta.ItemMeta;
import org.bukkit.inventory.meta.LeatherArmorMeta;
import org.bukkit.metadata.FixedMetadataValue;
@ -167,6 +169,7 @@ import sig.plugin.TwosideKeeper.HelperStructures.WorldShop;
import sig.plugin.TwosideKeeper.HelperStructures.WorldShopSession;
import sig.plugin.TwosideKeeper.HelperStructures.Common.GenericFunctions;
import sig.plugin.TwosideKeeper.HelperStructures.Common.Habitation;
import sig.plugin.TwosideKeeper.HelperStructures.Common.RecipeLinker;
import sig.plugin.TwosideKeeper.Logging.BowModeLogger;
import sig.plugin.TwosideKeeper.Logging.LootLogger;
import sig.plugin.TwosideKeeper.Logging.MysteriousEssenceLogger;
@ -460,21 +463,21 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
public static CustomItem HARDENED_GOLD_BOOTS;
public static CustomItem WOOL_RECOLOR;
public static CustomItem SLAB_RECONSTRUCTION;
public static CustomItem ARTIFACT_RECIPE_T1;
public static CustomItem ARTIFACT_RECIPE_T2;
public static CustomItem ARTIFACT_RECIPE_T3;
public static CustomItem ARTIFACT_RECIPE_T4;
public static CustomItem ARTIFACT_RECIPE_T5;
public static CustomItem ARTIFACT_RECIPE_T6;
public static CustomItem ARTIFACT_RECIPE_T7;
public static CustomItem ARTIFACT_RECIPE_T8;
public static CustomItem ARTIFACT_RECIPE_T9;
public static CustomItem ARTIFACT_RECIPE_T10;
public static CustomItem ARTIFACT_RECIPE_T11;
public static CustomItem ARTIFACT_RECIPE_T12;
public static CustomItem ARTIFACT_RECIPE_T13;
public static CustomItem ARTIFACT_RECIPE_T14;
public static CustomItem ARTIFACT_RECIPE_T15;
public static ShapelessRecipe ARTIFACT_RECIPE_T1;
public static ShapelessRecipe ARTIFACT_RECIPE_T2;
public static ShapelessRecipe ARTIFACT_RECIPE_T3;
public static ShapelessRecipe ARTIFACT_RECIPE_T4;
public static ShapelessRecipe ARTIFACT_RECIPE_T5;
public static ShapelessRecipe ARTIFACT_RECIPE_T6;
public static ShapelessRecipe ARTIFACT_RECIPE_T7;
public static ShapelessRecipe ARTIFACT_RECIPE_T8;
public static ShapelessRecipe ARTIFACT_RECIPE_T9;
public static ShapelessRecipe ARTIFACT_RECIPE_T10;
public static ShapelessRecipe ARTIFACT_RECIPE_T11;
public static ShapelessRecipe ARTIFACT_RECIPE_T12;
public static ShapelessRecipe ARTIFACT_RECIPE_T13;
public static ShapelessRecipe ARTIFACT_RECIPE_T14;
public static ShapelessRecipe ARTIFACT_RECIPE_T15;
public static CustomItem INCREASE_ARTIFACT_CRAFTING_TIER;
public static CustomItem DECREASE_ARTIFACT_CRAFTING_TIER;
public static CustomItem EMPOWER_ARTIFACT_CRAFTING_ITEM;
@ -487,7 +490,7 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
public static ShapedRecipe ITEM_CUBE_RECIPE;
public static ShapedRecipe LARGE_ITEM_CUBE_RECIPE;
public static ShapedRecipe ENDER_ITEM_CUBE_RECIPE;
public static ShapedRecipe DUPLICATE_ENDER_ITEM_CUBE_RECIPE;
public static ShapelessRecipe DUPLICATE_ENDER_ITEM_CUBE_RECIPE;
public static ShapedRecipe ARROW_QUIVER_RECIPE;
public static ShapedRecipe HARDENED_IRON_HELMET_RECIPE;
public static ShapedRecipe HARDENED_IRON_CHESTPLATE_RECIPE;
@ -502,31 +505,41 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
public static ShapedRecipe HARDENED_GOLD_LEGGINGS_RECIPE;
public static ShapedRecipe HARDENED_GOLD_BOOTS_RECIPE;
public static ShapedRecipe WOOL_RECOLOR_RECIPE;
public static ShapedRecipe SLAB_RECONSTRUCTION_RECIPE;
public static ShapedRecipe ARTIFACT_RECIPE_T1_RECIPE;
public static ShapedRecipe ARTIFACT_RECIPE_T2_RECIPE;
public static ShapedRecipe ARTIFACT_RECIPE_T3_RECIPE;
public static ShapedRecipe ARTIFACT_RECIPE_T4_RECIPE;
public static ShapedRecipe ARTIFACT_RECIPE_T5_RECIPE;
public static ShapedRecipe ARTIFACT_RECIPE_T6_RECIPE;
public static ShapedRecipe ARTIFACT_RECIPE_T7_RECIPE;
public static ShapedRecipe ARTIFACT_RECIPE_T8_RECIPE;
public static ShapedRecipe ARTIFACT_RECIPE_T9_RECIPE;
public static ShapedRecipe ARTIFACT_RECIPE_T10_RECIPE;
public static ShapedRecipe ARTIFACT_RECIPE_T11_RECIPE;
public static ShapedRecipe ARTIFACT_RECIPE_T12_RECIPE;
public static ShapedRecipe ARTIFACT_RECIPE_T13_RECIPE;
public static ShapedRecipe ARTIFACT_RECIPE_T14_RECIPE;
public static ShapedRecipe ARTIFACT_RECIPE_T15_RECIPE;
public static ShapedRecipe INCREASE_ARTIFACT_CRAFTING_TIER_RECIPE;
public static ShapedRecipe DECREASE_ARTIFACT_CRAFTING_TIER_RECIPE;
public static ShapedRecipe EMPOWER_ARTIFACT_CRAFTING_ITEM_RECIPE;
public static ShapedRecipe MONEY_CHECK_RECIPE;
public static ShapedRecipe HANDMADE_ARROW_RECIPE;
public static ShapedRecipe DIAMONDTIPPED_ARROW_RECIPE;
public static ShapedRecipe POISON_ARROW_RECIPE;
public static ShapedRecipe TRAPPING_ARROW_RECIPE;
public static ShapedRecipe EXPLODING_ARROW_RECIPE;
public static ShapelessRecipe SLAB_RECONSTRUCTION_RECIPE;
public static ShapedRecipe ARTIFACT_RECIPE_T1_SWORD_RECIPE;
public static ShapedRecipe ARTIFACT_RECIPE_T1_AXE_RECIPE;
public static ShapedRecipe ARTIFACT_RECIPE_T1_PICKAXE_RECIPE;
public static ShapedRecipe ARTIFACT_RECIPE_T1_SCYTHE_RECIPE;
public static ShapedRecipe ARTIFACT_RECIPE_T1_BOW_RECIPE;
public static ShapedRecipe ARTIFACT_RECIPE_T1_SHOVEL_RECIPE;
public static ShapedRecipe ARTIFACT_RECIPE_T1_HELMET_RECIPE;
public static ShapedRecipe ARTIFACT_RECIPE_T1_CHESTPLATE_RECIPE;
public static ShapedRecipe ARTIFACT_RECIPE_T1_LEGGINGS_RECIPE;
public static ShapedRecipe ARTIFACT_RECIPE_T1_BOOTS_RECIPE;
public static ShapedRecipe ARTIFACT_RECIPE_T1_FISHING_ROD_RECIPE;
public static ShapelessRecipe ARTIFACT_RECIPE_T2_RECIPE;
public static ShapelessRecipe ARTIFACT_RECIPE_T3_RECIPE;
public static ShapelessRecipe ARTIFACT_RECIPE_T4_RECIPE;
public static ShapelessRecipe ARTIFACT_RECIPE_T5_RECIPE;
public static ShapelessRecipe ARTIFACT_RECIPE_T6_RECIPE;
public static ShapelessRecipe ARTIFACT_RECIPE_T7_RECIPE;
public static ShapelessRecipe ARTIFACT_RECIPE_T8_RECIPE;
public static ShapelessRecipe ARTIFACT_RECIPE_T9_RECIPE;
public static ShapelessRecipe ARTIFACT_RECIPE_T10_RECIPE;
public static ShapelessRecipe ARTIFACT_RECIPE_T11_RECIPE;
public static ShapelessRecipe ARTIFACT_RECIPE_T12_RECIPE;
public static ShapelessRecipe ARTIFACT_RECIPE_T13_RECIPE;
public static ShapelessRecipe ARTIFACT_RECIPE_T14_RECIPE;
public static ShapelessRecipe ARTIFACT_RECIPE_T15_RECIPE;
public static ShapelessRecipe INCREASE_ARTIFACT_CRAFTING_TIER_RECIPE;
public static ShapelessRecipe DECREASE_ARTIFACT_CRAFTING_TIER_RECIPE;
public static ShapelessRecipe EMPOWER_ARTIFACT_CRAFTING_ITEM_RECIPE;
public static ShapelessRecipe MONEY_CHECK_RECIPE;
public static ShapelessRecipe HANDMADE_ARROW_RECIPE;
public static ShapelessRecipe DIAMONDTIPPED_ARROW_RECIPE;
public static ShapelessRecipe POISON_ARROW_RECIPE;
public static ShapelessRecipe TRAPPING_ARROW_RECIPE;
public static ShapelessRecipe EXPLODING_ARROW_RECIPE;
public static CustomPotion STRENGTHENING_VIAL;
public static CustomPotion LIFE_VIAL;
public static CustomPotion HARDENING_VIAL;
@ -544,7 +557,7 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
public static File filesave;
public static HashMap<UUID,PlayerStructure> playerdata;
public static HashMap<UUID,MonsterStructure> monsterdata;
public static HashMap<UUID,LivingEntityStructure> livingentitydata;
public static SpleefManager TwosideSpleefGames;
public static WorldShopManager TwosideShops;
public static MysteriousEssenceLogger EssenceLogger; //The logger for Essences.
@ -605,18 +618,20 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
loadConfig();
sig.plugin.TwosideKeeper.Recipes.Initialize_ItemCube_Recipes();
sig.plugin.TwosideKeeper.Recipes.Initialize_ArrowQuiver_Recipe();
sig.plugin.TwosideKeeper.Recipes.Initialize_BlockArmor_Recipes();
//sig.plugin.TwosideKeeper.Recipes.Initialize_ItemDeconstruction_Recipes();
sig.plugin.TwosideKeeper.Recipes.Initialize_WoolRecolor_Recipes();
sig.plugin.TwosideKeeper.Recipes.Initialize_SlabReconstruction_Recipes();
sig.plugin.TwosideKeeper.Recipes.Initialize_Artifact_Recipes();
sig.plugin.TwosideKeeper.Recipes.Initialize_ArtifactHelper_Recipes();
sig.plugin.TwosideKeeper.Recipes.Initialize_Check_Recipe();
//sig.plugin.TwosideKeeper.Recipes.Initialize_HunterCompass_Recipe();
sig.plugin.TwosideKeeper.Recipes.Initialize_CustomArrow_Recipes();
sig.plugin.TwosideKeeper.Recipes.Initialize_NotchApple_Recipe();
CustomItem.InitializeItemRecipes();
Recipes.Initialize_ItemCube_Recipes();
Recipes.Initialize_ArrowQuiver_Recipe();
Recipes.Initialize_BlockArmor_Recipes();
//Recipes.Initialize_ItemDeconstruction_Recipes();
Recipes.Initialize_WoolRecolor_Recipes();
Recipes.Initialize_SlabReconstruction_Recipes();
Recipes.Initialize_Artifact_Recipes();
Recipes.Initialize_ArtifactHelper_Recipes();
Recipes.Initialize_Check_Recipe();
//Recipes.Initialize_HunterCompass_Recipe();
Recipes.Initialize_CustomArrow_Recipes();
Recipes.Initialize_NotchApple_Recipe();
//Bukkit.createWorld(new WorldCreator("ItemCube"));
@ -676,7 +691,7 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
//Initialize Player Data structure.
playerdata = new HashMap<UUID,PlayerStructure>();
banksessions = new HashMap<UUID,BankSession>();
monsterdata = new HashMap<UUID,MonsterStructure>();
livingentitydata = new HashMap<UUID,LivingEntityStructure>();
validsetitems.add(Material.LEATHER_BOOTS);
validsetitems.add(Material.LEATHER_CHESTPLATE);
@ -1193,6 +1208,15 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
m.setLore(lore);
p.getEquipment().getItemInMainHand().setItemMeta(m);
return true;
} else
if (cmd.getName().equalsIgnoreCase("craft")) {
Player p = (Player)sender;
if (args.length==0) {
DisplayArguments(p);
} else {
DisplayCraftingRecipe(p,args[0]);
}
return true;
}
} else {
//Implement console/admin version later (Let's you check any name's money.)
@ -1200,7 +1224,31 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
return false;
}
@EventHandler(priority=EventPriority.LOW,ignoreCancelled = true)
private void DisplayCraftingRecipe(Player p, String string) {
RecipeLinker l = RecipeLinker.valueOf(string);
ItemStack[] newarray = Arrays.copyOfRange(l.getRec(), 1, l.getRec().length);
aPlugin.API.viewRecipe(p, l.getRec()[0], newarray);
}
private void DisplayArguments(Player p) {
p.sendMessage(ChatColor.GREEN+"Choose a recipe to view:");
int j=0;
TextComponent fin = new TextComponent("");
for (int i=0;i<RecipeLinker.values().length;i++) {
j++;
RecipeLinker val = RecipeLinker.values()[i];
TextComponent tc = new TextComponent(ChatColor.values()[j+2]+"["+val.getColor()+val.getName()+ChatColor.values()[j+2]+"] ");
tc.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT,new ComponentBuilder("Click to view the recipe for "+val.getColor()+val.getName()).create()));
tc.setClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND,"/craft "+val.name()));
if (j>2) {
tc.addExtra("\n");
j=0;
}
fin.addExtra(tc);
}
p.spigot().sendMessage(fin);
}
@EventHandler(priority=EventPriority.LOW,ignoreCancelled = true)
public void onPlayerCommand(PlayerCommandPreprocessEvent ev) {
log(" "+ChatColor.DARK_GRAY+ev.getPlayer().getName()+" is Executing Command: "+ChatColor.GOLD+ev.getMessage(),3);
if (ev.getMessage().contains("/time")) {
@ -1741,7 +1789,7 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
public void onPlayerInteract(PlayerInteractEntityEvent ev) {
log("Clicked with "+ ev.getHand().name(),5);
log("Clicked on: "+ev.getRightClicked().getName(),5);
if (ev.getPlayer().getEquipment().getItemInMainHand().getType()==Material.NAME_TAG && (ev.getRightClicked() instanceof Monster)) {
if (ev.getPlayer().getEquipment().getItemInMainHand().getType()==Material.NAME_TAG && (ev.getRightClicked() instanceof LivingEntity)) {
//TwosideKeeper.log("Check this out.", 2);
Monster m = (Monster)ev.getRightClicked();
//MonsterController.convertMonster(m,md);
@ -1758,7 +1806,7 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
},1);
}
if ((ev.getRightClicked() instanceof Monster) && (ev.getHand()==EquipmentSlot.OFF_HAND) &&
if ((ev.getRightClicked() instanceof LivingEntity) && (ev.getHand()==EquipmentSlot.OFF_HAND) &&
GenericFunctions.isArtifactEquip(ev.getPlayer().getEquipment().getItemInMainHand())) {
boolean bursted=false;
bursted = performDeathMark(ev.getPlayer(), bursted);
@ -2598,8 +2646,8 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
List<Entity> nearby = player.getNearbyEntities(10, 10, 10);
boolean reset=false;
for (int i=0;i<nearby.size();i++) {
if (nearby.get(i) instanceof Monster) {
Monster m = (Monster)nearby.get(i);
if (nearby.get(i) instanceof LivingEntity) {
LivingEntity m = (LivingEntity)nearby.get(i);
if (m.hasPotionEffect(PotionEffectType.UNLUCK) && !m.isDead()) {
//This has stacks, burst!
bursted=true;
@ -2799,6 +2847,9 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
case "Spider Ball": {
return Pronouns.ChoosePronoun(17);
}
case "Defender Tank": {
return "died trying to save teammates from imminent death...";
}
default:{
return "has died by "+pd.lasthitdesc;
}
@ -3688,35 +3739,37 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
public void onChunkLoadEvent(ChunkLoadEvent ev) {
//Grab all entities. Create monster structures for all monsters. Detect elites and leaders and set their status accordingly.
if (TwosideKeeper.monsterdata!=null) {
if (TwosideKeeper.livingentitydata!=null) {
Entity[] entities = ev.getChunk().getEntities();
for (int i=0;i<entities.length;i++) {
if (entities[i]!=null && entities[i].isValid() && (entities[i] instanceof Monster)) {
Monster m = (Monster)entities[i];
if (entities[i]!=null && entities[i].isValid() && (entities[i] instanceof LivingEntity)) {
LivingEntity m = (LivingEntity)entities[i];
updateMonsterFlags(m);
}
}
}
}
public void updateMonsterFlags(Monster m) {
MonsterStructure ms = MonsterStructure.getMonsterStructure(m);
MonsterDifficulty md = MonsterController.getMonsterDifficulty(m);
if (md == MonsterDifficulty.ELITE) {
ms.SetElite(true);
}
if (MonsterController.isZombieLeader(m)) {
m = MonsterController.convertMonster(m,md);
log("Setting a monster with Difficulty "+MonsterController.getMonsterDifficulty(m).name()+" w/"+m.getHealth()+"/"+m.getMaxHealth()+" HP to a Leader.",5);
ms.SetLeader(true);
public void updateMonsterFlags(LivingEntity m) {
LivingEntityStructure ms = LivingEntityStructure.getLivingEntityStructure(m);
if (m instanceof Monster) {
MonsterDifficulty md = MonsterController.getMonsterDifficulty((Monster)m);
if (md == MonsterDifficulty.ELITE) {
ms.SetElite(true);
}
if (MonsterController.isZombieLeader(m)) {
m = MonsterController.convertMonster((Monster)m,md);
log("Setting a monster with Difficulty "+MonsterController.getMonsterDifficulty((Monster)m).name()+" w/"+m.getHealth()+"/"+m.getMaxHealth()+" HP to a Leader.",5);
ms.SetLeader(true);
}
}
}
@EventHandler(priority=EventPriority.LOW,ignoreCancelled = true)
public void MonsterSpawnEvent(CreatureSpawnEvent ev) {
if (ev.getEntity() instanceof Monster) {
Monster m = (Monster)ev.getEntity();
MonsterStructure.getMonsterStructure(m);
if (ev.getEntity() instanceof LivingEntity) {
LivingEntity m = ev.getEntity();
LivingEntityStructure.getLivingEntityStructure(m);
}
if ((ev.getSpawnReason().equals(SpawnReason.DISPENSE_EGG) ||
ev.getSpawnReason().equals(SpawnReason.EGG)) &&
@ -4070,8 +4123,8 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
if (ev.getEntityType()==EntityType.ENDERMAN) {
//There is a small chance to drop a Mysterious Essence.
if (/*Math.random()<=0.0625*ARTIFACT_RARITY &&*/ ((Monster)ev.getEntity()).getTarget()==null &&
((!monsterdata.containsKey(ev.getEntity().getUniqueId())) ||
monsterdata.get(ev.getEntity().getUniqueId()).GetTarget()==null)) { //We won't drop it when they are targeting a player, only when they are doing their own thing.
((!livingentitydata.containsKey(ev.getEntity().getUniqueId())) ||
livingentitydata.get(ev.getEntity().getUniqueId()).GetTarget()==null)) { //We won't drop it when they are targeting a player, only when they are doing their own thing.
Block block_teleported_on = ev.getFrom().add(0,0,0).getBlock();
log("Teleported on "+block_teleported_on.getType()+".",5);
if (block_teleported_on.isLiquid()) {
@ -4174,7 +4227,7 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
if ((ev.getEntity() instanceof Monster)) {
log("In here",5);
Monster m = (Monster)ev.getEntity();
MonsterStructure ms = MonsterStructure.getMonsterStructure(m);
LivingEntityStructure ms = LivingEntityStructure.getLivingEntityStructure(m);
if (ms.getElite()) {
log("In here",5);
EliteMonster em = null;
@ -4222,8 +4275,8 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
ev.getReason()==TargetReason.PIG_ZOMBIE_TARGET) {
LivingEntity l = (LivingEntity)ev.getEntity();
if (l.hasPotionEffect(PotionEffectType.GLOWING)) {
if (monsterdata.containsKey(l.getUniqueId())) {
ev.setTarget(monsterdata.get(l.getUniqueId()).target);
if (livingentitydata.containsKey(l.getUniqueId())) {
ev.setTarget(livingentitydata.get(l.getUniqueId()).target);
}
}
}
@ -4251,7 +4304,7 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
@EventHandler(priority=EventPriority.LOW,ignoreCancelled = true)
public void monsterDeathEvent(final EntityDeathEvent ev) {
log("Has died.",5);
if (monsterdata.containsKey(ev.getEntity().getUniqueId())){ev.setDroppedExp(ev.getDroppedExp()+5);}
if (livingentitydata.containsKey(ev.getEntity().getUniqueId())){ev.setDroppedExp(ev.getDroppedExp()+5);}
if (ev.getEntity() instanceof Bat) {
//Drop an essence.
if (Math.random()<=0.3) {
@ -4269,9 +4322,9 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
boolean isElite=false;
boolean killedByPlayer = false;
final Location deathloc = m.getLocation();
MonsterStructure ms = null;
if (monsterdata.containsKey(m.getUniqueId())) {
ms = (MonsterStructure)monsterdata.get(m.getUniqueId());
LivingEntityStructure ms = null;
if (livingentitydata.containsKey(m.getUniqueId())) {
ms = (LivingEntityStructure)livingentitydata.get(m.getUniqueId());
if (ms.hasOriginalName()) {
m.setCustomName(ms.getOriginalName());
}
@ -4348,7 +4401,7 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
//Get the player that killed the monster.
int luckmult = 0;
int unluckmult = 0;
ms = (MonsterStructure)monsterdata.get(m.getUniqueId());
ms = (LivingEntityStructure)livingentitydata.get(m.getUniqueId());
Player p = (Player)ms.GetTarget();
boolean isRanger=PlayerMode.isRanger(p);
@ -4366,7 +4419,8 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
GenericFunctions.addStackingPotionEffect(p, PotionEffectType.SPEED, 10*20, 4);
if (ItemSet.HasSetBonusBasedOnSetBonusCount(GenericFunctions.getHotbarItems(p), p, ItemSet.MOONSHADOW, 7)) {
//Apply damage to everything around the player.
List<Monster> mobs = GenericFunctions.getNearbyMobs(m.getLocation(), 8);
//List<Monster> mobs = GenericFunctions.getNearbyMobs(m.getLocation(), 8);
List<Monster> mobs = CustomDamage.trimNonMonsterEntities(m.getNearbyEntities(8, 8, 8));
for (Monster m1 : mobs) {
if (!m1.equals(m)) {
pd.lastassassinatetime=0;
@ -4612,7 +4666,7 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
log(" Drops "+"["+(drop.size()+originaldroplist.size())+"]: "+ChatColor.GOLD+ChatColor.stripColor(originaldroplist.toString())+ChatColor.WHITE+","+ChatColor.LIGHT_PURPLE+ChatColor.stripColor(drop.toString()),2);
}
monsterdata.remove(m.getUniqueId());
livingentitydata.remove(m.getUniqueId());
chargezombies.remove(m.getUniqueId());
hellfirespiders.remove(m.getUniqueId());
}
@ -5160,10 +5214,10 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
Player p = (Player)arr.getShooter();
LivingEntity checkent = aPlugin.API.getTargetEntity(p, 100);
if (checkent!=null && (checkent instanceof Monster)) {
if (!monsterdata.containsKey(checkent.getUniqueId())) {
MonsterStructure newstruct = new MonsterStructure((Monster)checkent);
if (!livingentitydata.containsKey(checkent.getUniqueId())) {
LivingEntityStructure newstruct = new LivingEntityStructure((Monster)checkent);
newstruct.SetTarget(p);
monsterdata.put(checkent.getUniqueId(), newstruct);
livingentitydata.put(checkent.getUniqueId(), newstruct);
Monster m = (Monster)checkent;
if (!m.hasPotionEffect(PotionEffectType.GLOWING)) {
m.setTarget(p);

@ -302,13 +302,13 @@ final class runServerHeartbeat implements Runnable {
}
private void MaintainMonsterData() {
Set<UUID> data= TwosideKeeper.monsterdata.keySet();
TwosideKeeper.log("Size: "+TwosideKeeper.monsterdata.size(), 2);
Set<UUID> data= TwosideKeeper.livingentitydata.keySet();
TwosideKeeper.log("Size: "+TwosideKeeper.livingentitydata.size(), 2);
for (UUID id : data) {
MonsterStructure ms = TwosideKeeper.monsterdata.get(id);
LivingEntityStructure ms = TwosideKeeper.livingentitydata.get(id);
if (!ms.m.isValid()) {
//TwosideKeeper.monsterdata.remove(data);
TwosideKeeper.ScheduleRemoval(TwosideKeeper.monsterdata, ms);
TwosideKeeper.ScheduleRemoval(TwosideKeeper.livingentitydata, ms);
TwosideKeeper.ScheduleRemoval(data, id);
TwosideKeeper.log("Removed Monster Structure for "+id+".", 2);
} else {
@ -318,8 +318,8 @@ final class runServerHeartbeat implements Runnable {
}
}
public void AddEliteStructureIfOneDoesNotExist(MonsterStructure ms) {
if (ms.isElite || MonsterController.getMonsterDifficulty(ms.m)==MonsterDifficulty.ELITE) {
public void AddEliteStructureIfOneDoesNotExist(LivingEntityStructure ms) {
if (ms.isElite || (ms.m instanceof Monster && MonsterController.getMonsterDifficulty((Monster)(ms.m))==MonsterDifficulty.ELITE)) {
//Make it glow dark purple.
//GenericFunctions.setGlowing(m, GlowAPI.Color.DARK_PURPLE);
boolean hasstruct = false;
@ -329,14 +329,15 @@ final class runServerHeartbeat implements Runnable {
}
}
if (!hasstruct) {
TwosideKeeper.elitemonsters.add(new EliteMonster(ms.m));
TwosideKeeper.elitemonsters.add(new EliteMonster((Monster)(ms.m)));
}
}
}
private void randomlyAggroNearbyEndermen(Player p) {
List<Monster> ents = GenericFunctions.getNearbyMobs(p.getLocation(), 16);
for (Monster m : ents) {
//List<LivingEntity> ents = GenericFunctions.getNearbyMobs(p.getLocation(), 16);
List<Monster> ments = CustomDamage.trimNonMonsterEntities(p.getNearbyEntities(16, 16, 16));
for (Monster m : ments) {
if (Math.random()<=0.05 && !m.hasPotionEffect(PotionEffectType.GLOWING)) {
m.setTarget(p);
}

Loading…
Cancel
Save