diff --git a/TwosideKeeper.jar b/TwosideKeeper.jar index 5110bc7..d05fd29 100644 Binary files a/TwosideKeeper.jar and b/TwosideKeeper.jar differ diff --git a/src/plugin.yml b/src/plugin.yml index ee92634..057386f 100644 --- a/src/plugin.yml +++ b/src/plugin.yml @@ -1,6 +1,6 @@ name: TwosideKeeper main: sig.plugin.TwosideKeeper.TwosideKeeper -version: 3.8.1 +version: 3.8.1r1 commands: money: description: Tells the player the amount of money they are holding. diff --git a/src/sig/plugin/TwosideKeeper/EliteMonster.java b/src/sig/plugin/TwosideKeeper/EliteMonster.java index aefa471..aec2fb7 100644 --- a/src/sig/plugin/TwosideKeeper/EliteMonster.java +++ b/src/sig/plugin/TwosideKeeper/EliteMonster.java @@ -481,4 +481,8 @@ public class EliteMonster { Location l = getNearbyFreeLocation(m.getLocation(),24); m.teleport(l); } + + public void removeAllHealthbars() { + bar.removeAll(); + } } diff --git a/src/sig/plugin/TwosideKeeper/HelperStructures/Common/GenericFunctions.java b/src/sig/plugin/TwosideKeeper/HelperStructures/Common/GenericFunctions.java index 6e0cebd..7b5c279 100644 --- a/src/sig/plugin/TwosideKeeper/HelperStructures/Common/GenericFunctions.java +++ b/src/sig/plugin/TwosideKeeper/HelperStructures/Common/GenericFunctions.java @@ -3069,12 +3069,24 @@ public class GenericFunctions { b.getType()==Material.GRASS || b.getType()==Material.GRAVEL || b.getType()==Material.CLAY || + b.getType()==Material.HARD_CLAY || + b.getType()==Material.STAINED_CLAY || + b.getType()==Material.ENDER_STONE || b.getType()==Material.SOIL || b.getType()==Material.SNOW || b.getType()==Material.SOUL_SAND || b.getType()==Material.STONE || b.getType()==Material.COBBLESTONE || - b.getType()==Material.NETHERRACK) { + b.getType()==Material.NETHERRACK || + b.getType()==Material.WOOL || + b.getType()==Material.WOOD || + b.getType()==Material.COAL_ORE || + b.getType()==Material.DIAMOND_ORE || + b.getType()==Material.GOLD_ORE || + b.getType()==Material.IRON_ORE || + b.getType()==Material.REDSTONE_ORE || + b.getType()==Material.LAPIS_ORE || + b.getType()==Material.EMERALD_ORE) { return true; } else { return false; @@ -3393,7 +3405,8 @@ public class GenericFunctions { randomz = (int)((Math.random()*10000) - 5000); testloc = new Location(Bukkit.getWorld("world"),randomx,96,randomz); testloc.getChunk().load(); } while - (testloc.getBlock().getType()!=Material.AIR || testloc.getBlock().getRelative(0, 1, 0).getType()!=Material.AIR); + ((testloc.getBlock().getType()!=Material.AIR || testloc.getBlock().getRelative(0, 1, 0).getType()!=Material.AIR) && + AllNaturalBlocks(testloc.getBlock(),16,8,16)); return new Location(Bukkit.getWorld("world"),randomx,testloc.getBlockY(),randomz); } @@ -3427,4 +3440,34 @@ public class GenericFunctions { } return m; } + + public static boolean AllNaturalBlocks(Block b, int x, int y, int z) { + for (int i=-x/2;i=75 && + GenericFunctions.AllNaturalBlocks(ent.getLocation().getBlock(),16,8,16) && ent.getNearbyEntities(128, 32, 128).size()<=2) { TwosideKeeper.LAST_ELITE_SPAWN=TwosideKeeper.getServerTickTime(); return true; diff --git a/src/sig/plugin/TwosideKeeper/NewCombat.java b/src/sig/plugin/TwosideKeeper/NewCombat.java index 4f38b6a..9c807f1 100644 --- a/src/sig/plugin/TwosideKeeper/NewCombat.java +++ b/src/sig/plugin/TwosideKeeper/NewCombat.java @@ -1215,6 +1215,8 @@ public class NewCombat { } + double setbonus = 1.0; + if (target instanceof Player) { Player p = (Player)target; PlayerStructure pd = PlayerStructure.GetPlayerStructure(p); @@ -1236,7 +1238,7 @@ public class NewCombat { if (ArtifactAbility.containsEnchantment(ArtifactAbility.GREED, p.getEquipment().getItemInMainHand())) { dmgreduction /= ArtifactAbility.containsEnchantment(ArtifactAbility.GREED, p.getEquipment().getItemInMainHand())?2:1; } - dmgreduction *= 1.0+(ItemSet.TotalBaseAmountBasedOnSetBonusCount(p, ItemSet.SONGSTEEL, 4, 4)/100d); + setbonus = ((100-ItemSet.TotalBaseAmountBasedOnSetBonusCount(p, ItemSet.SONGSTEEL, 4, 4))/100d); } //Blocking: -((p.isBlocking())?ev.getDamage()*0.33:0) //33% damage will be reduced if we are blocking. @@ -1251,6 +1253,7 @@ public class NewCombat { *((10-resistlevel)*0.1) *((100-protectionlevel)*0.01) *((10-partylevel)*0.1) + *setbonus *((target instanceof Player && ((Player)target).isBlocking())?(GenericFunctions.isDefender((Player)target))?0.30:0.50:1) *((target instanceof Player)?((GenericFunctions.isDefender((Player)target))?0.9:(target.getEquipment().getItemInOffHand()!=null && target.getEquipment().getItemInOffHand().getType()==Material.SHIELD)?0.95:1):1); diff --git a/src/sig/plugin/TwosideKeeper/TwosideKeeper.java b/src/sig/plugin/TwosideKeeper/TwosideKeeper.java index 24977b8..c1a3f2e 100644 --- a/src/sig/plugin/TwosideKeeper/TwosideKeeper.java +++ b/src/sig/plugin/TwosideKeeper/TwosideKeeper.java @@ -993,7 +993,7 @@ public class TwosideKeeper extends JavaPlugin implements Listener { if (p.getLocation().add(0,0,0).getBlock().getType()==Material.PISTON_MOVING_PIECE) { p.getLocation().add(0,0,0).getBlock().setType(Material.AIR); } - if (SERVER_TYPE==ServerType.TEST || SERVER_TYPE==ServerType.QUIET) { + if (SERVER_TYPE==ServerType.TEST || SERVER_TYPE==ServerType.QUIET || p.isOp()) { Monster m = MonsterController.convertMonster((Monster)p.getWorld().spawnEntity(p.getLocation(),EntityType.ZOMBIE), MonsterDifficulty.ELITE); m.setHealth(m.getMaxHealth()/16d); //TwosideKeeperAPI.spawnAdjustedMonster(MonsterType.GIANT, p.getLocation()); @@ -4554,12 +4554,12 @@ public class TwosideKeeper extends JavaPlugin implements Listener { Player pl = participants.get(i); ExperienceOrb exp = GenericFunctions.spawnXP(pl.getLocation(), ev.getDroppedExp()*300); exp.setInvulnerable(true); - List generatedloot = MonsterController.getMonsterDifficulty((Monster)ev.getEntity()).RandomizeDrops(dropmult/participants.size(),false,false); + /*List generatedloot = MonsterController.getMonsterDifficulty((Monster)ev.getEntity()).RandomizeDrops(dropmult/participants.size(),false,false); for (int j=0;j