Fix Artifact Breaking.
This commit is contained in:
parent
06ab897e43
commit
aae4497d18
Binary file not shown.
@ -178,7 +178,7 @@ public class CustomDamage {
|
|||||||
if (sb.hasMetadata("SPIDERBALL")) {
|
if (sb.hasMetadata("SPIDERBALL")) {
|
||||||
dmg = 10.0*10.0;
|
dmg = 10.0*10.0;
|
||||||
reason = "Spider Ball";
|
reason = "Spider Ball";
|
||||||
TwosideKeeper.log("Got here to damage.", 1);
|
TwosideKeeper.log("Got here to damage.", 5);
|
||||||
GenericFunctions.removeNoDamageTick(target, damager);
|
GenericFunctions.removeNoDamageTick(target, damager);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -130,7 +130,7 @@ public class GenericFunctions {
|
|||||||
if (p!=null) {
|
if (p!=null) {
|
||||||
p.sendMessage(ChatColor.LIGHT_PURPLE+"You still feel the artifact's presence inside of you...");
|
p.sendMessage(ChatColor.LIGHT_PURPLE+"You still feel the artifact's presence inside of you...");
|
||||||
}
|
}
|
||||||
return convertArtifactToDust(item);
|
return convertArtifactToDust(item.clone());
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@ -159,6 +159,7 @@ public class GenericFunctions {
|
|||||||
item.setItemMeta(m);
|
item.setItemMeta(m);
|
||||||
item.setType(Material.SULPHUR);
|
item.setType(Material.SULPHUR);
|
||||||
item.setDurability((short)0);
|
item.setDurability((short)0);
|
||||||
|
item.setAmount(1);
|
||||||
return item;
|
return item;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3080,7 +3081,8 @@ public class GenericFunctions {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static void UpdateArtifactItemType(ItemStack item) {
|
private static void UpdateArtifactItemType(ItemStack item) {
|
||||||
if (isArtifactArmor(item)) {
|
if (isArtifactArmor(item) &&
|
||||||
|
item.getType()!=Material.SULPHUR) {
|
||||||
double durabilityratio = item.getDurability()/item.getType().getMaxDurability();
|
double durabilityratio = item.getDurability()/item.getType().getMaxDurability();
|
||||||
item.setType(Material.valueOf("LEATHER_"+item.getType().name().split("_")[1]));
|
item.setType(Material.valueOf("LEATHER_"+item.getType().name().split("_")[1]));
|
||||||
item.setDurability((short)(durabilityratio*item.getType().getMaxDurability()));
|
item.setDurability((short)(durabilityratio*item.getType().getMaxDurability()));
|
||||||
@ -3553,8 +3555,9 @@ public class GenericFunctions {
|
|||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
for (Integer i : remaining.keySet()) {
|
for (Integer i : remaining.keySet()) {
|
||||||
Item it = p.getWorld().dropItem(p.getLocation(), remaining.get(i));
|
Item it = p.getWorld().dropItemNaturally(p.getLocation(), remaining.get(i));
|
||||||
it.setInvulnerable(true);
|
it.setInvulnerable(true);
|
||||||
|
it.setPickupDelay(0);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -934,6 +934,8 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
|
|||||||
|
|
||||||
filesave=getDataFolder(); //Store the location of where our data folder is.
|
filesave=getDataFolder(); //Store the location of where our data folder is.
|
||||||
log("Data folder at "+filesave+".",3);
|
log("Data folder at "+filesave+".",3);
|
||||||
|
Bukkit.getServer().setSpawnRadius(1);
|
||||||
|
//log("Spawn Radius is "+Bukkit.getServer().getSpawnRadius(),0);
|
||||||
|
|
||||||
time_passed+=-Bukkit.getWorld("world").getFullTime();
|
time_passed+=-Bukkit.getWorld("world").getFullTime();
|
||||||
LASTSERVERCHECK=getServerTickTime();
|
LASTSERVERCHECK=getServerTickTime();
|
||||||
@ -1159,7 +1161,7 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
|
|||||||
if (p.getLocation().add(0,0,0).getBlock().getType()==Material.PISTON_MOVING_PIECE) {
|
if (p.getLocation().add(0,0,0).getBlock().getType()==Material.PISTON_MOVING_PIECE) {
|
||||||
p.getLocation().add(0,0,0).getBlock().setType(Material.AIR);
|
p.getLocation().add(0,0,0).getBlock().setType(Material.AIR);
|
||||||
}
|
}
|
||||||
if ((SERVER_TYPE==ServerType.TEST || SERVER_TYPE==ServerType.QUIET) && p.isOp()) {
|
if (p.isOp()) {
|
||||||
/*PlayerStructure pd = PlayerStructure.GetPlayerStructure(p);
|
/*PlayerStructure pd = PlayerStructure.GetPlayerStructure(p);
|
||||||
pd.swordcombo=20;*/
|
pd.swordcombo=20;*/
|
||||||
/*float f = ((org.bukkit.craftbukkit.v1_9_R1.entity.CraftLivingEntity)p).getHandle().getAbsorptionHearts();
|
/*float f = ((org.bukkit.craftbukkit.v1_9_R1.entity.CraftLivingEntity)p).getHandle().getAbsorptionHearts();
|
||||||
@ -1181,7 +1183,7 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
|
|||||||
//TwosideKeeperAPI.setItemSet(p.getEquipment().getItemInMainHand(), ItemSet.PANROS);
|
//TwosideKeeperAPI.setItemSet(p.getEquipment().getItemInMainHand(), ItemSet.PANROS);
|
||||||
//p.getWorld().dropItemNaturally(p.getLocation(), TwosideKeeperAPI.generateMegaPiece(Material.LEATHER_CHESTPLATE, true, true, 5));
|
//p.getWorld().dropItemNaturally(p.getLocation(), TwosideKeeperAPI.generateMegaPiece(Material.LEATHER_CHESTPLATE, true, true, 5));
|
||||||
//p.getWorld().dropItemNaturally(p.getLocation(), HUNTERS_COMPASS.getItemStack());
|
//p.getWorld().dropItemNaturally(p.getLocation(), HUNTERS_COMPASS.getItemStack());
|
||||||
AwakenedArtifact.setEXP(p.getEquipment().getItemInMainHand(), 999);
|
//AwakenedArtifact.setEXP(p.getEquipment().getItemInMainHand(), 999);
|
||||||
/*p.getWorld().dropItemNaturally(p.getLocation(), UPGRADE_SHARD.getItemStack());
|
/*p.getWorld().dropItemNaturally(p.getLocation(), UPGRADE_SHARD.getItemStack());
|
||||||
ItemStack upgrade = UPGRADE_SHARD.getItemStack();
|
ItemStack upgrade = UPGRADE_SHARD.getItemStack();
|
||||||
GenericFunctions.setUpgradeShardTier(upgrade,3);
|
GenericFunctions.setUpgradeShardTier(upgrade,3);
|
||||||
@ -1265,7 +1267,8 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
|
|||||||
*/
|
*/
|
||||||
/*ItemStack item = p.getEquipment().getItemInMainHand();
|
/*ItemStack item = p.getEquipment().getItemInMainHand();
|
||||||
AwakenedArtifact.addPotentialEXP(item, 50000, p);*/
|
AwakenedArtifact.addPotentialEXP(item, 50000, p);*/
|
||||||
TwosideKeeperAPI.removeAllArtifactAbilityPoints(p.getEquipment().getItemInMainHand());
|
p.getEquipment().getItemInMainHand().setType(Material.SULPHUR);
|
||||||
|
//TwosideKeeperAPI.removeAllArtifactAbilityPoints(p.getEquipment().getItemInMainHand());
|
||||||
//p.sendMessage(tpstracker.getTPS()+"");
|
//p.sendMessage(tpstracker.getTPS()+"");
|
||||||
//GenericFunctions.addObscureHardenedItemBreaks(p.getEquipment().getItemInMainHand(), 4);
|
//GenericFunctions.addObscureHardenedItemBreaks(p.getEquipment().getItemInMainHand(), 4);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user