Minor optimization fixes.

testdev
sigonasr2 8 years ago
parent e511406a0c
commit ebace20b24
  1. BIN
      TwosideKeeper.jar
  2. 2
      src/sig/plugin/TwosideKeeper/HelperStructures/AnvilItem.java
  3. 2
      src/sig/plugin/TwosideKeeper/HelperStructures/Effects/LavaPlume.java
  4. 2
      src/sig/plugin/TwosideKeeper/MonsterController.java
  5. 2
      src/sig/plugin/TwosideKeeper/runServerHeartbeat.java

Binary file not shown.

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

@ -52,7 +52,7 @@ public class LavaPlume {
} else {
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.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()) {
GlowAPI.setGlowing(fallblock, GlowAPI.Color.YELLOW, pl);
}

@ -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) {

@ -442,7 +442,7 @@ final class runServerHeartbeat implements Runnable {
private void PopRandomLavaBlock(Player p) {
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.
int randomx=(int)(Math.random()*32)-16;
int randomz=(int)(Math.random()*32)-16;

Loading…
Cancel
Save