Minor optimization fixes.

This commit is contained in:
sigonasr2 2016-12-18 16:14:42 -06:00
parent e511406a0c
commit ebace20b24
5 changed files with 4 additions and 4 deletions

Binary file not shown.

View File

@ -30,7 +30,7 @@ public class AnvilItem {
if (validitem(olditem) && validitem(newitem)) { if (validitem(olditem) && validitem(newitem)) {
//Input Item : ᶲ2+Test New Item: 2Jelly //Input Item : ᶲ2+Test New Item: 2Jelly
String var = getColorCodes(); //var = ChatColor.RED (ᶲ2) String var = getColorCodes(); //var = ChatColor.RED (ᶲ2)
TwosideKeeper.log("var = "+var, 2); TwosideKeeper.log("var = "+var, 5);
String newcol = newitem.getItemMeta().getDisplayName(); //2Jelly String newcol = newitem.getItemMeta().getDisplayName(); //2Jelly
String colors = ""; String colors = "";
if (var.length()>=2) { if (var.length()>=2) {

View File

@ -52,7 +52,7 @@ public class LavaPlume {
} else { } else {
FallingBlock fallblock = this.lavaplumeloc.clone().getWorld().spawnFallingBlock(this.lavaplumeloc.clone().add(0,1,0), Material.REDSTONE_BLOCK, (byte)0); FallingBlock fallblock = this.lavaplumeloc.clone().getWorld().spawnFallingBlock(this.lavaplumeloc.clone().add(0,1,0), Material.REDSTONE_BLOCK, (byte)0);
fallblock.setMetadata("DESTROY", new FixedMetadataValue(TwosideKeeper.plugin,true)); fallblock.setMetadata("DESTROY", new FixedMetadataValue(TwosideKeeper.plugin,true));
fallblock.setVelocity(new Vector(0,(float)((Math.random()*2)+2),0)); fallblock.setVelocity(new Vector(0,(float)((Math.random()*2)+1),0));
for (Player pl : Bukkit.getOnlinePlayers()) { for (Player pl : Bukkit.getOnlinePlayers()) {
GlowAPI.setGlowing(fallblock, GlowAPI.Color.YELLOW, pl); GlowAPI.setGlowing(fallblock, GlowAPI.Color.YELLOW, pl);
} }

View File

@ -213,7 +213,7 @@ public class MonsterController {
} }
} }
} }
return (dist<4096 && (GenericFunctions.getNearbyMobs(ent.getLocation(), 16).size()<(nearbyplayers*3)+1)); return (/*dist<4096*/ dist<2304 && (GenericFunctions.getNearbyMobs(ent.getLocation(), 16).size()<(nearbyplayers*2)+1));
} }
private static boolean meetsConditionsToBeElite(LivingEntity ent) { private static boolean meetsConditionsToBeElite(LivingEntity ent) {

View File

@ -442,7 +442,7 @@ final class runServerHeartbeat implements Runnable {
private void PopRandomLavaBlock(Player p) { private void PopRandomLavaBlock(Player p) {
if (p.getWorld().getName().equalsIgnoreCase("world_nether") && if (p.getWorld().getName().equalsIgnoreCase("world_nether") &&
TwosideKeeper.last_lava_plume_time+(TwosideKeeper.LAVA_PLUME_COOLDOWN/(Math.max(Bukkit.getOnlinePlayers().size(),1)))<TwosideKeeper.getServerTickTime()) { TwosideKeeper.last_lava_plume_time+(TwosideKeeper.LAVA_PLUME_COOLDOWN)<TwosideKeeper.getServerTickTime()) {
//Choose a random location near the player. //Choose a random location near the player.
int randomx=(int)(Math.random()*32)-16; int randomx=(int)(Math.random()*32)-16;
int randomz=(int)(Math.random()*32)-16; int randomz=(int)(Math.random()*32)-16;