Revert "Fire modifications. Move of tick code."

This reverts commit 35c249bc8f.
dev
sigonasr2 11 years ago
parent 35c249bc8f
commit df4a0b905a
  1. 28
      BankEconomyMod/src/me/kaZep/Base/Main.java
  2. 97
      BankEconomyMod/src/me/kaZep/Base/PlayerListener.java
  3. 6
      BankEconomyMod/src/me/kaZep/Base/RecyclingCenterNode.java

@ -62,7 +62,6 @@ import org.bukkit.inventory.Inventory;
import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.PlayerInventory; import org.bukkit.inventory.PlayerInventory;
import org.bukkit.inventory.ShapedRecipe; import org.bukkit.inventory.ShapedRecipe;
import org.bukkit.inventory.ShapelessRecipe;
import org.bukkit.inventory.meta.ItemMeta; import org.bukkit.inventory.meta.ItemMeta;
import org.bukkit.inventory.meta.SkullMeta; import org.bukkit.inventory.meta.SkullMeta;
import org.bukkit.map.MapRenderer; import org.bukkit.map.MapRenderer;
@ -109,7 +108,6 @@ public class Main extends JavaPlugin
public long last_bank_deposit_use_time=0; public long last_bank_deposit_use_time=0;
public String last_bank_deposit_user=""; public String last_bank_deposit_user="";
public long last_bank_withdraw_use_time=0; public long last_bank_withdraw_use_time=0;
public long last_player_death_time=0;
public String last_bank_withdraw_user=""; public String last_bank_withdraw_user="";
public long last_boss_dungeon_time=0; public long last_boss_dungeon_time=0;
public long check_nether_time=0; public long check_nether_time=0;
@ -502,19 +500,6 @@ public class Main extends JavaPlugin
item_cube.setIngredient('c', Material.EMERALD_BLOCK); item_cube.setIngredient('c', Material.EMERALD_BLOCK);
Bukkit.addRecipe(item_cube); Bukkit.addRecipe(item_cube);
ItemStack artifact = new ItemStack(Material.CLAY_BALL);
artifact.addEnchantment(Enchantment.LOOT_BONUS_MOBS, 0);
ItemMeta meta = artifact.getItemMeta();
List<String> lore = new ArrayList<String>();
lore.add("This clump of material seems to");
lore.add("be part of something ancient.");
lore.add("");
lore.add(ChatColor.LIGHT_PURPLE+""+ChatColor.ITALIC+"There is a small chance the piece will");
lore.add(ChatColor.LIGHT_PURPLE+""+ChatColor.ITALIC+"be restored.");
meta.setLore(lore);
artifact.setItemMeta(meta);
ShapelessRecipe artifact_recipe = new ShapelessRecipe(artifact);
DMGCALC = new DamageAPI(); DMGCALC = new DamageAPI();
//System.out.println("Running BankEconomy in "+this.getDataFolder().getAbsolutePath()); //System.out.println("Running BankEconomy in "+this.getDataFolder().getAbsolutePath());
//System.out.println("File size: "+f.length()); //System.out.println("File size: "+f.length());
@ -1068,9 +1053,11 @@ public class Main extends JavaPlugin
sign.update(); sign.update();
} }
final public void runTick() { public void runTick() {
Bukkit.getLogger().info("Run tick "+SERVER_TICK_TIME); final Main plugin = this;
Main.SERVER_TICK_TIME++; this.getServer().getScheduler().scheduleSyncRepeatingTask(this, new Runnable(){
public void run(){
SERVER_TICK_TIME++;
for (int i=0;i<ARROW_SHOOTERS.size();i++) { for (int i=0;i<ARROW_SHOOTERS.size();i++) {
ArrowShooter shooter = ARROW_SHOOTERS.get(i); ArrowShooter shooter = ARROW_SHOOTERS.get(i);
shooter.timer--; shooter.timer--;
@ -1356,7 +1343,6 @@ final public void runTick() {
} }
if (Math.abs(i)<4 && Math.abs(j)<4 && Math.abs(k)<4 &&Bukkit.getWorld("world").getBlockAt(p.getLocation().getBlockX()+i,p.getLocation().getBlockY()+k,p.getLocation().getBlockZ()+j).getType()==Material.COMMAND) { if (Math.abs(i)<4 && Math.abs(j)<4 && Math.abs(k)<4 &&Bukkit.getWorld("world").getBlockAt(p.getLocation().getBlockX()+i,p.getLocation().getBlockY()+k,p.getLocation().getBlockZ()+j).getType()==Material.COMMAND) {
//Bukkit.getWorld("world").getBlockAt(p.getLocation().getBlockX()+i,p.getLocation().getBlockY()+k,p.getLocation().getBlockZ()+j).setType(Material.COBBLESTONE); //Bukkit.getWorld("world").getBlockAt(p.getLocation().getBlockX()+i,p.getLocation().getBlockY()+k,p.getLocation().getBlockZ()+j).setType(Material.COBBLESTONE);
Bukkit.getLogger().info("Near command block. Attempt to spawn a boss.");
List<Entity> nearby = p.getNearbyEntities(30, 30, 30); List<Entity> nearby = p.getNearbyEntities(30, 30, 30);
boolean exists=false; boolean exists=false;
for (int m=0;m<nearby.size();m++) { for (int m=0;m<nearby.size();m++) {
@ -1371,7 +1357,6 @@ final public void runTick() {
} }
} }
if (!exists) { if (!exists) {
Bukkit.getLogger().info("Does not exist, spawn it.");
//Create an EnderDragon npc for the healthbar. //Create an EnderDragon npc for the healthbar.
//Create the Charge Zombie III. //Create the Charge Zombie III.
//Bukkit.getServer().dispatchCommand(Bukkit.getServer().getConsoleSender(), "npc create Boss --type EnderDragon --at "+(p.getLocation().getBlockX()+i)+":-50:"+(p.getLocation().getBlockZ()+j)); //Bukkit.getServer().dispatchCommand(Bukkit.getServer().getConsoleSender(), "npc create Boss --type EnderDragon --at "+(p.getLocation().getBlockX()+i)+":-50:"+(p.getLocation().getBlockZ()+j));
@ -2538,9 +2523,6 @@ final public void runTick() {
} }
} }
} }
this.getServer().getScheduler().scheduleSyncRepeatingTask(this, new Runnable(){
public void run(){
runTick();
} }
}, 1l, 1l); }, 1l, 1l);
} }

@ -3646,7 +3646,6 @@ implements Listener
e.getBlock().getType()==Material.SAND || e.getBlock().getType()==Material.SAND ||
e.getBlock().getType()==Material.GRAVEL && Math.random()<=0.0025 /*0.25% chance*/) { e.getBlock().getType()==Material.GRAVEL && Math.random()<=0.0025 /*0.25% chance*/) {
ItemStack artifact = new ItemStack(Material.CLAY_BALL); ItemStack artifact = new ItemStack(Material.CLAY_BALL);
artifact.addEnchantment(Enchantment.LOOT_BONUS_MOBS, 0);
ItemMeta meta = artifact.getItemMeta(); ItemMeta meta = artifact.getItemMeta();
List<String> lore = new ArrayList<String>(); List<String> lore = new ArrayList<String>();
lore.add("This clump of material seems to"); lore.add("This clump of material seems to");
@ -7109,59 +7108,6 @@ implements Listener
this.plugin.explorers.add(ev); this.plugin.explorers.add(ev);
} }
final public void doFireAspectDamage(final LivingEntity l, final Main plug) {
Bukkit.getScheduler().scheduleSyncDelayedTask(this.plugin, new Runnable() {
@Override
public void run() {
if (l.getHealth()!=0 && l.getFireTicks()>60 && !l.hasPotionEffect(PotionEffectType.FIRE_RESISTANCE)) {
double firedmg=1;
double oldfireticks=l.getFireTicks();
DecimalFormat df = new DecimalFormat("#0.0");
DecimalFormat df2 = new DecimalFormat("#0");
//Bukkit.getLogger().info(l.getType().name()+" health: "+l.getHealth()+", Fire ticks:"+l.getFireTicks());
//Get all fire protection values.
if (l.getEquipment().getBoots()!=null) {
for (int i=0;i<l.getEquipment().getBoots().getEnchantmentLevel(Enchantment.PROTECTION_FIRE);i++) {
firedmg*=0.92;
oldfireticks*=0.92;
}
}
if (l.getEquipment().getLeggings()!=null) {
for (int i=0;i<l.getEquipment().getLeggings().getEnchantmentLevel(Enchantment.PROTECTION_FIRE);i++) {
firedmg*=0.92;
oldfireticks*=0.92;
}
}
if (l.getEquipment().getChestplate()!=null) {
for (int i=0;i<l.getEquipment().getChestplate().getEnchantmentLevel(Enchantment.PROTECTION_FIRE);i++) {
firedmg*=0.92;
oldfireticks*=0.92;
}
}
if (l.getEquipment().getHelmet()!=null) {
for (int i=0;i<l.getEquipment().getHelmet().getEnchantmentLevel(Enchantment.PROTECTION_FIRE);i++) {
firedmg*=0.92;
oldfireticks*=0.92;
}
}
l.setFireTicks((int)oldfireticks);
l.getWorld().playSound(l.getLocation(), Sound.FIZZ, 0.2f, 1);
if (l.getHealth()-firedmg>0) {
l.setHealth(l.getHealth()-firedmg);
} else {
l.setHealth(0);
}
if (l instanceof Player) {
if (plug.getAccountsConfig().getBoolean(((Player)l).getName()+".settings.notify5")) {
((Player)l).sendMessage(ChatColor.DARK_PURPLE+""+ChatColor.ITALIC+"Took "+df.format(firedmg)+" damage from "+ChatColor.WHITE+"FIRE_TICK"+ChatColor.DARK_PURPLE+""+ChatColor.ITALIC+" (-"+df2.format(((firedmg)/l.getMaxHealth())*100)+"%)");
}
}
doFireAspectDamage(l, plug);
}
}
},(int)(20/((double)l.getFireTicks()/60))+1);
}
@EventHandler @EventHandler
public void onHurt(EntityDamageEvent e) { public void onHurt(EntityDamageEvent e) {
final EntityDamageEvent f = e; final EntityDamageEvent f = e;
@ -7177,7 +7123,7 @@ implements Listener
} }
},5); },5);
//p.sendMessage("Your Health: "+p.getHealth()+", Damage: "+e.getDamage()+", Actual: "+this.plugin.DMGCALC.getDamage(p, e.getDamage(), DamageCause.ENTITY_ATTACK)); //p.sendMessage("Your Health: "+p.getHealth()+", Damage: "+e.getDamage()+", Actual: "+this.plugin.DMGCALC.getDamage(p, e.getDamage(), DamageCause.ENTITY_ATTACK));
//double actualdmg = this.plugin.DMGCALC.getDamage(p, e.getDamage(), e.getCause()); double actualdmg = this.plugin.DMGCALC.getDamage(p, e.getDamage(), e.getCause());
List<Entity> nearby = p.getNearbyEntities(10, 10, 10); List<Entity> nearby = p.getNearbyEntities(10, 10, 10);
for (int i=0;i<nearby.size();i++) { for (int i=0;i<nearby.size();i++) {
if (nearby.get(i).getType()==EntityType.PLAYER && this.plugin.PlayerinJob((Player)nearby.get(i), "Support") && this.plugin.getJobLv("Support", (Player)nearby.get(i))>=20) { if (nearby.get(i).getType()==EntityType.PLAYER && this.plugin.PlayerinJob((Player)nearby.get(i), "Support") && this.plugin.getJobLv("Support", (Player)nearby.get(i))>=20) {
@ -7254,11 +7200,14 @@ implements Listener
} }
} }
EntityType allowedtypes[] = {EntityType.BAT,EntityType.BLAZE,EntityType.CAVE_SPIDER,EntityType.ENDERMAN,EntityType.GHAST,EntityType.MAGMA_CUBE,EntityType.PIG_ZOMBIE,EntityType.SILVERFISH,EntityType.SLIME,EntityType.SPIDER,EntityType.ZOMBIE,EntityType.SKELETON,EntityType.CREEPER}; EntityType allowedtypes[] = {EntityType.BAT,EntityType.BLAZE,EntityType.CAVE_SPIDER,EntityType.ENDERMAN,EntityType.GHAST,EntityType.MAGMA_CUBE,EntityType.PIG_ZOMBIE,EntityType.SILVERFISH,EntityType.SLIME,EntityType.SPIDER,EntityType.ZOMBIE,EntityType.SKELETON,EntityType.CREEPER};
boolean contains=e.getEntity() instanceof LivingEntity; boolean contains=e.getEntity() instanceof Monster;
if (contains) { if (contains) {
LivingEntity l = (LivingEntity)e.getEntity(); LivingEntity l = (LivingEntity)e.getEntity();
if (l.getFireTicks()>60 && e.getCause()==DamageCause.LAVA && !l.hasPotionEffect(PotionEffectType.FIRE_RESISTANCE)) { if ((l.getCustomName()==null || (!l.getCustomName().contains(ChatColor.DARK_PURPLE+"") && !l.getCustomName().contains(ChatColor.DARK_AQUA+""))) && l.getType()!=EntityType.ENDER_DRAGON) {
l.setFireTicks(l.getFireTicks()+20); if ((l.getTicksLived()<120 && e.getCause()==DamageCause.SUFFOCATION)) {
l.remove();
e.setCancelled(true);
}
} }
} }
} }
@ -7322,9 +7271,6 @@ implements Listener
@EventHandler @EventHandler
public void onPlayerOnFire(EntityCombustEvent e) { public void onPlayerOnFire(EntityCombustEvent e) {
if (e.getEntity() instanceof LivingEntity) {
doFireAspectDamage(((LivingEntity)e.getEntity()), this.plugin);
}
if (e.getEntity().getType()==EntityType.PLAYER) { if (e.getEntity().getType()==EntityType.PLAYER) {
Player p = (Player)e.getEntity(); Player p = (Player)e.getEntity();
if (this.plugin.getAccountsConfig().getInt(p.getName()+".stats.stat6")>0) { if (this.plugin.getAccountsConfig().getInt(p.getName()+".stats.stat6")>0) {
@ -7399,16 +7345,6 @@ implements Listener
if (e.getEntity() instanceof LivingEntity) { if (e.getEntity() instanceof LivingEntity) {
final LivingEntity l = (LivingEntity)e.getEntity(); final LivingEntity l = (LivingEntity)e.getEntity();
if (e.getDamager() instanceof LivingEntity) {
//They are both living entities. Check if damager has fire aspect.
LivingEntity l2 = (LivingEntity)e.getDamager();
if (l2.getEquipment().getItemInHand().getEnchantmentLevel(Enchantment.FIRE_ASPECT)>0) {
l.setFireTicks(l.getFireTicks()+l2.getEquipment().getItemInHand().getEnchantmentLevel(Enchantment.FIRE_ASPECT)*60);
}
if (l2.getEquipment().getItemInHand().getEnchantmentLevel(Enchantment.ARROW_FIRE)>0) {
l.setFireTicks(l.getFireTicks()+l2.getEquipment().getItemInHand().getEnchantmentLevel(Enchantment.ARROW_FIRE)*60);
}
}
if (l instanceof Player) { if (l instanceof Player) {
e.setDamage(e.getDamage()*1.45d); e.setDamage(e.getDamage()*1.45d);
if (e.getDamager() instanceof Wither) { if (e.getDamager() instanceof Wither) {
@ -10955,7 +10891,7 @@ implements Listener
} }
//There is a small chance we can swap items between two centers. //There is a small chance we can swap items between two centers.
if (Math.random()<=0.1) { if (Math.random()<=0.01) {
//Get the first center. It's randomly picked. //Get the first center. It's randomly picked.
if (this.plugin.recycling_center_list.size()<=2) { if (this.plugin.recycling_center_list.size()<=2) {
//If there are only two centers in the list, it has to be those two... //If there are only two centers in the list, it has to be those two...
@ -11815,7 +11751,6 @@ implements Listener
final Player p = e.getEntity(); final Player p = e.getEntity();
e.setDeathMessage(e.getDeathMessage().replace(p.getScoreboard().getTeam(p.getName()).getPrefix()+p.getName()+p.getScoreboard().getTeam(p.getName()).getSuffix(),p.getName())); e.setDeathMessage(e.getDeathMessage().replace(p.getScoreboard().getTeam(p.getName()).getPrefix()+p.getName()+p.getScoreboard().getTeam(p.getName()).getSuffix(),p.getName()));
p.getScoreboard().getTeam(p.getName()).setSuffix(""); p.getScoreboard().getTeam(p.getName()).setSuffix("");
this.plugin.last_player_death_time = Main.SERVER_TICK_TIME;
boolean survivor=false; boolean survivor=false;
if (this.plugin.PlayerinJob(p, "Explorer")) { if (this.plugin.PlayerinJob(p, "Explorer")) {
if (this.plugin.getJobLv("Explorer", p)>=10) { if (this.plugin.getJobLv("Explorer", p)>=10) {
@ -12621,6 +12556,10 @@ implements Listener
//******************************//All Job Buff related items go in here. //******************************//All Job Buff related items go in here.
if (e.getAction()==Action.LEFT_CLICK_BLOCK || e.getAction()==Action.RIGHT_CLICK_AIR) { if (e.getAction()==Action.LEFT_CLICK_BLOCK || e.getAction()==Action.RIGHT_CLICK_AIR) {
if (this.plugin.hasJobBuff("Builder", p, Job.JOB10)) { if (this.plugin.hasJobBuff("Builder", p, Job.JOB10)) {
if (this.plugin.hasJobBuff("Builder", p, Job.JOB30B)) {
p.removePotionEffect(PotionEffectType.JUMP);
p.addPotionEffect(new PotionEffect(PotionEffectType.JUMP,200,9));
}
if (this.plugin.hasJobBuff("Builder", p, Job.JOB40) && !p.getAllowFlight()) { if (this.plugin.hasJobBuff("Builder", p, Job.JOB40) && !p.getAllowFlight()) {
p.setAllowFlight(true); p.setAllowFlight(true);
p.sendMessage(ChatColor.DARK_GRAY+""+ChatColor.ITALIC+"Flight enabled..."); p.sendMessage(ChatColor.DARK_GRAY+""+ChatColor.ITALIC+"Flight enabled...");
@ -12646,10 +12585,6 @@ implements Listener
pd.SetClickedBlock(checkblock.getLocation()); pd.SetClickedBlock(checkblock.getLocation());
} else { } else {
if (pd.GetClickedBlock().distance(checkblock.getLocation())<=500) {//Make sure the range is small enough. if (pd.GetClickedBlock().distance(checkblock.getLocation())<=500) {//Make sure the range is small enough.
if (this.plugin.hasJobBuff("Builder", p, Job.JOB30B)) {
p.removePotionEffect(PotionEffectType.JUMP);
p.addPotionEffect(new PotionEffect(PotionEffectType.JUMP,200,9));
}
//Compare the blocks and see if they are the same. //Compare the blocks and see if they are the same.
boolean successful=true; boolean successful=true;
int expbefore = (int)this.plugin.getPlayerCurrentJobExp(p, "Builder"); int expbefore = (int)this.plugin.getPlayerCurrentJobExp(p, "Builder");
@ -12782,6 +12717,10 @@ implements Listener
} }
} }
if (e.getAction()==Action.LEFT_CLICK_BLOCK && this.plugin.hasJobBuff("Builder", p, Job.JOB5)) { if (e.getAction()==Action.LEFT_CLICK_BLOCK && this.plugin.hasJobBuff("Builder", p, Job.JOB5)) {
if (this.plugin.hasJobBuff("Builder", p, Job.JOB30B)) {
p.removePotionEffect(PotionEffectType.JUMP);
p.addPotionEffect(new PotionEffect(PotionEffectType.JUMP,200,9));
}
if (this.plugin.hasJobBuff("Builder", p, Job.JOB40) && !p.getAllowFlight()) { if (this.plugin.hasJobBuff("Builder", p, Job.JOB40) && !p.getAllowFlight()) {
p.setAllowFlight(true); p.setAllowFlight(true);
p.sendMessage(ChatColor.DARK_GRAY+""+ChatColor.ITALIC+"Flight enabled..."); p.sendMessage(ChatColor.DARK_GRAY+""+ChatColor.ITALIC+"Flight enabled...");
@ -12800,10 +12739,6 @@ implements Listener
pd.SetClickedBlock(e.getClickedBlock().getLocation()); pd.SetClickedBlock(e.getClickedBlock().getLocation());
} else { } else {
if (pd.GetClickedBlock().distance(e.getClickedBlock().getLocation())<=500) {//Make sure the range is small enough. if (pd.GetClickedBlock().distance(e.getClickedBlock().getLocation())<=500) {//Make sure the range is small enough.
if (this.plugin.hasJobBuff("Builder", p, Job.JOB30B)) {
p.removePotionEffect(PotionEffectType.JUMP);
p.addPotionEffect(new PotionEffect(PotionEffectType.JUMP,200,9));
}
int expbefore = (int)this.plugin.getPlayerCurrentJobExp(p, "Builder"); int expbefore = (int)this.plugin.getPlayerCurrentJobExp(p, "Builder");
//Compare the blocks and see if they are the same. //Compare the blocks and see if they are the same.
boolean successful=true; boolean successful=true;

@ -15,8 +15,8 @@ import org.bukkit.plugin.Plugin;
//deposit, choosing the closest one. //deposit, choosing the closest one.
public class RecyclingCenterNode { public class RecyclingCenterNode {
public static double chanceincrease = 1.5; //The amount of chance that each item will increase the chest as it gets placed. Increase this for less items. public static double chanceincrease = 3.0; //The amount of chance that each item will increase the chest as it gets placed. Increase this for less items.
public static double chestdecrease = 0.25; //The amount of chance that each item will decrease the chest. Increase this for more items. public static double chestdecrease = 0.05; //The amount of chance that each item will decrease the chest. Increase this for more items.
//Store our items we can give out array along with our rare items we might potentially track. //Store our items we can give out array along with our rare items we might potentially track.
public static int[] items = {1,3,4,5,6,12,13,14,15,17,18,20,22,23,24,25,27,28,39,31,32,33,35,37,38,39,40,41,42,44,45,46,47,48,49,50,53,54,57,58,61,65,66,67,69,70,72,76,77,78,80,81,82,84,85,86,87,88,89,91,96,98,101,102,103,106,107,108,109,111,112,113,114,116,121,122,123,126,128,130,131,133,134,135,136,138,139,143,145,146,147,148,151,152,154,155,156,157,158,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,385,386,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,2256,2257,2258,2259,2260,2261,2262,2263,2264,2265,2266,2267}; public static int[] items = {1,3,4,5,6,12,13,14,15,17,18,20,22,23,24,25,27,28,39,31,32,33,35,37,38,39,40,41,42,44,45,46,47,48,49,50,53,54,57,58,61,65,66,67,69,70,72,76,77,78,80,81,82,84,85,86,87,88,89,91,96,98,101,102,103,106,107,108,109,111,112,113,114,116,121,122,123,126,128,130,131,133,134,135,136,138,139,143,145,146,147,148,151,152,154,155,156,157,158,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,385,386,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,2256,2257,2258,2259,2260,2261,2262,2263,2264,2265,2266,2267};
//Rare items can only be given out in quantities of 1. To prevent massive amounts of OP. //Rare items can only be given out in quantities of 1. To prevent massive amounts of OP.
@ -102,7 +102,7 @@ public class RecyclingCenterNode {
tempchance*=2.0d; tempchance*=2.0d;
} }
} }
if (Math.random()*tempchance<1.0d || (Main.SERVER_TICK_TIME-this.plugin.last_player_death_time<=12000 && Math.random()*tempchance<4.0d) /*Drop items frequently for the next 10 minutes if someone just died.*/) { if (Math.random()*tempchance<1.0d) {
boolean contains=false; boolean contains=false;
for (int k=0;k<unalloweditems.length;k++) { for (int k=0;k<unalloweditems.length;k++) {
if (itemslot==unalloweditems[k]) { if (itemslot==unalloweditems[k]) {

Loading…
Cancel
Save