Modify Zombie Leader HP. Remove unnecssary debug messages. Localized
Name function returns the name of the item if possible. Add Frosted Ice back into the blacklist of Malleable Base Quest items. Increased loot of zombie leaders at surface level.
This commit is contained in:
parent
04cb3b2b55
commit
143f371086
Binary file not shown.
@ -1,6 +1,6 @@
|
|||||||
name: TwosideKeeper
|
name: TwosideKeeper
|
||||||
main: sig.plugin.TwosideKeeper.TwosideKeeper
|
main: sig.plugin.TwosideKeeper.TwosideKeeper
|
||||||
version: 3.5.4r5
|
version: 3.5.4r6
|
||||||
commands:
|
commands:
|
||||||
money:
|
money:
|
||||||
description: Tells the player the amount of money they are holding.
|
description: Tells the player the amount of money they are holding.
|
||||||
|
@ -347,6 +347,10 @@ public class GenericFunctions {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static String UserFriendlyMaterialName(ItemStack type) {
|
public static String UserFriendlyMaterialName(ItemStack type) {
|
||||||
|
if (type.hasItemMeta() &&
|
||||||
|
type.getItemMeta().hasDisplayName()) {
|
||||||
|
return type.getItemMeta().getDisplayName();
|
||||||
|
}
|
||||||
switch (type.getType()) {
|
switch (type.getType()) {
|
||||||
case ACACIA_DOOR_ITEM:{
|
case ACACIA_DOOR_ITEM:{
|
||||||
return "Acacia Door";
|
return "Acacia Door";
|
||||||
@ -2213,14 +2217,14 @@ public class GenericFunctions {
|
|||||||
}
|
}
|
||||||
TwosideKeeper.log("Attack is dealing "+finaldmg, 2);
|
TwosideKeeper.log("Attack is dealing "+finaldmg, 2);
|
||||||
if (target.getHealth()>finaldmg) {
|
if (target.getHealth()>finaldmg) {
|
||||||
TwosideKeeper.log("NOT FULL HEALTH. HP: "+target.getHealth(), 2);
|
TwosideKeeper.log("NOT FULL HEALTH. HP: "+target.getHealth(), 5);
|
||||||
//target.setHealth(target.getHealth()-finaldmg);
|
target.setHealth(target.getHealth()-finaldmg);
|
||||||
target.damage(finaldmg);
|
target.damage(0.000001);
|
||||||
target.setNoDamageTicks(20);
|
target.setNoDamageTicks(20);
|
||||||
} else {
|
} else {
|
||||||
//Bukkit.getPluginManager().callEvent(new EntityDamageByEntityEvent(damager,target,DamageCause.ENTITY_ATTACK,finaldmg));
|
//Bukkit.getPluginManager().callEvent(new EntityDamageByEntityEvent(damager,target,DamageCause.ENTITY_ATTACK,finaldmg));
|
||||||
target.setHealth(0);
|
target.setHealth(0.00000000001);
|
||||||
//target.damage(999999);
|
target.damage(99999);
|
||||||
//TwosideKeeper.log("New Health."+target.getHealth(), 2);
|
//TwosideKeeper.log("New Health."+target.getHealth(), 2);
|
||||||
target.setNoDamageTicks(20);
|
target.setNoDamageTicks(20);
|
||||||
}
|
}
|
||||||
|
@ -20,6 +20,9 @@ public class Loot {
|
|||||||
ItemStack raresword = new ItemStack(mat_type);
|
ItemStack raresword = new ItemStack(mat_type);
|
||||||
ItemMeta sword_meta = raresword.getItemMeta();
|
ItemMeta sword_meta = raresword.getItemMeta();
|
||||||
sword_meta.setDisplayName(ChatColor.AQUA+""+ChatColor.BOLD+"Mega "+GenericFunctions.UserFriendlyMaterialName(mat_type));
|
sword_meta.setDisplayName(ChatColor.AQUA+""+ChatColor.BOLD+"Mega "+GenericFunctions.UserFriendlyMaterialName(mat_type));
|
||||||
|
List<String> fakelore = new ArrayList<String>();
|
||||||
|
fakelore.add(" ");
|
||||||
|
sword_meta.setLore(fakelore);
|
||||||
raresword.setItemMeta(sword_meta);
|
raresword.setItemMeta(sword_meta);
|
||||||
raresword = addEnchantments(raresword,false);
|
raresword = addEnchantments(raresword,false);
|
||||||
if (hardened) {
|
if (hardened) {
|
||||||
|
@ -219,6 +219,7 @@ public class MalleableBaseQuest {
|
|||||||
blacklisted_items.add(Material.FIRE);
|
blacklisted_items.add(Material.FIRE);
|
||||||
blacklisted_items.add(Material.FIREBALL);
|
blacklisted_items.add(Material.FIREBALL);
|
||||||
blacklisted_items.add(Material.FLOWER_POT);
|
blacklisted_items.add(Material.FLOWER_POT);
|
||||||
|
blacklisted_items.add(Material.FROSTED_ICE);
|
||||||
blacklisted_items.add(Material.GLOWING_REDSTONE_ORE);
|
blacklisted_items.add(Material.GLOWING_REDSTONE_ORE);
|
||||||
blacklisted_items.add(Material.GOLD_RECORD);
|
blacklisted_items.add(Material.GOLD_RECORD);
|
||||||
blacklisted_items.add(Material.GRASS);
|
blacklisted_items.add(Material.GRASS);
|
||||||
|
@ -17,9 +17,17 @@ public enum MonsterDifficulty {
|
|||||||
},
|
},
|
||||||
new LootStructure[]{ //Rare Loot
|
new LootStructure[]{ //Rare Loot
|
||||||
new LootStructure(Material.STONE_SWORD, false),
|
new LootStructure(Material.STONE_SWORD, false),
|
||||||
|
new LootStructure(Material.IRON_INGOT),
|
||||||
|
new LootStructure(Material.DIAMOND),
|
||||||
|
new LootStructure(Material.GOLD_NUGGET),
|
||||||
},
|
},
|
||||||
new LootStructure[]{ //Legendary Loot
|
new LootStructure[]{ //Legendary Loot
|
||||||
new LootStructure(Material.STONE_SWORD, true),
|
new LootStructure(Material.STONE_SWORD, true),
|
||||||
|
new LootStructure(Material.IRON_INGOT,(int)((Math.random()*3)+1)),
|
||||||
|
new LootStructure(Material.DIAMOND,(int)((Math.random()*3)+1)),
|
||||||
|
new LootStructure(Material.GOLD_NUGGET,(int)((Math.random()*3)+1)),
|
||||||
|
new LootStructure(Material.ENDER_PEARL,(int)((Math.random()*3)+1)),
|
||||||
|
new LootStructure(Material.ENDER_CHEST),
|
||||||
}
|
}
|
||||||
),
|
),
|
||||||
DANGEROUS(
|
DANGEROUS(
|
||||||
@ -202,19 +210,26 @@ public enum MonsterDifficulty {
|
|||||||
TwosideKeeper.log("Adding "+gen_loot.toString()+" to loot table.", 4);
|
TwosideKeeper.log("Adding "+gen_loot.toString()+" to loot table.", 4);
|
||||||
droplist.add(gen_loot);
|
droplist.add(gen_loot);
|
||||||
if (Math.random()<=0.2) {
|
if (Math.random()<=0.2) {
|
||||||
switch (this) {
|
switch (this) {
|
||||||
case DANGEROUS:
|
case DANGEROUS:
|
||||||
droplist.add(sig.plugin.TwosideKeeper.Artifact.createArtifactItem(ArtifactItem.ANCIENT_CORE));
|
droplist.add(sig.plugin.TwosideKeeper.Artifact.createArtifactItem(ArtifactItem.ANCIENT_CORE));
|
||||||
break;
|
break;
|
||||||
case DEADLY:
|
case DEADLY:
|
||||||
droplist.add(sig.plugin.TwosideKeeper.Artifact.createArtifactItem(ArtifactItem.LOST_CORE));
|
droplist.add(sig.plugin.TwosideKeeper.Artifact.createArtifactItem(ArtifactItem.LOST_CORE));
|
||||||
break;
|
break;
|
||||||
case HELLFIRE:
|
case HELLFIRE:
|
||||||
droplist.add(sig.plugin.TwosideKeeper.Artifact.createArtifactItem(ArtifactItem.DIVINE_CORE));
|
droplist.add(sig.plugin.TwosideKeeper.Artifact.createArtifactItem(ArtifactItem.DIVINE_CORE));
|
||||||
break;
|
break;
|
||||||
case NORMAL:
|
case NORMAL:
|
||||||
droplist.add(sig.plugin.TwosideKeeper.Artifact.createArtifactItem(ArtifactItem.ARTIFACT_CORE));
|
droplist.add(sig.plugin.TwosideKeeper.Artifact.createArtifactItem(ArtifactItem.ARTIFACT_CORE));
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (Math.random()<=0.6) {
|
||||||
|
switch (this) {
|
||||||
|
case NORMAL:
|
||||||
|
droplist.add(sig.plugin.TwosideKeeper.Artifact.createArtifactItem(ArtifactItem.MYSTERIOUS_ESSENCE));
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -48,6 +48,7 @@ public class MonsterController {
|
|||||||
if (isZombieLeader(ent)) {
|
if (isZombieLeader(ent)) {
|
||||||
//Zombie leaders have faster movement.
|
//Zombie leaders have faster movement.
|
||||||
ent.addPotionEffect(new PotionEffect(PotionEffectType.SPEED,999999,1));
|
ent.addPotionEffect(new PotionEffect(PotionEffectType.SPEED,999999,1));
|
||||||
|
//Set the HP of the leader to a more proper amount.
|
||||||
}
|
}
|
||||||
if (ylv>=128) {
|
if (ylv>=128) {
|
||||||
//This is a 95% chance this will despawn.
|
//This is a 95% chance this will despawn.
|
||||||
@ -563,6 +564,11 @@ public class MonsterController {
|
|||||||
m.getEquipment().clear();
|
m.getEquipment().clear();
|
||||||
RandomizeEquipment(m,1);
|
RandomizeEquipment(m,1);
|
||||||
}
|
}
|
||||||
|
if(isZombieLeader(m))
|
||||||
|
{
|
||||||
|
m.setMaxHealth(13);
|
||||||
|
m.setHealth(m.getMaxHealth());
|
||||||
|
}
|
||||||
}break;
|
}break;
|
||||||
case DEADLY: {
|
case DEADLY: {
|
||||||
String MonsterName = m.getType().toString().toLowerCase();
|
String MonsterName = m.getType().toString().toLowerCase();
|
||||||
@ -574,6 +580,11 @@ public class MonsterController {
|
|||||||
RandomizeEquipment(m,2);
|
RandomizeEquipment(m,2);
|
||||||
}
|
}
|
||||||
m.addPotionEffect(new PotionEffect(PotionEffectType.DAMAGE_RESISTANCE,99999,1));
|
m.addPotionEffect(new PotionEffect(PotionEffectType.DAMAGE_RESISTANCE,99999,1));
|
||||||
|
if(isZombieLeader(m))
|
||||||
|
{
|
||||||
|
m.setMaxHealth(26);
|
||||||
|
m.setHealth(m.getMaxHealth());
|
||||||
|
}
|
||||||
}break;
|
}break;
|
||||||
case HELLFIRE:{
|
case HELLFIRE:{
|
||||||
String MonsterName = m.getType().toString().toLowerCase();
|
String MonsterName = m.getType().toString().toLowerCase();
|
||||||
@ -594,6 +605,11 @@ public class MonsterController {
|
|||||||
m.addPotionEffect(new PotionEffect(PotionEffectType.DAMAGE_RESISTANCE,99999,1));
|
m.addPotionEffect(new PotionEffect(PotionEffectType.DAMAGE_RESISTANCE,99999,1));
|
||||||
m.addPotionEffect(new PotionEffect(PotionEffectType.FIRE_RESISTANCE,99999,1));
|
m.addPotionEffect(new PotionEffect(PotionEffectType.FIRE_RESISTANCE,99999,1));
|
||||||
if (Math.random()<=0.2) {m.addPotionEffect(new PotionEffect(PotionEffectType.REGENERATION,99999,1));}
|
if (Math.random()<=0.2) {m.addPotionEffect(new PotionEffect(PotionEffectType.REGENERATION,99999,1));}
|
||||||
|
if(isZombieLeader(m))
|
||||||
|
{
|
||||||
|
m.setMaxHealth(54);
|
||||||
|
m.setHealth(m.getMaxHealth());
|
||||||
|
}
|
||||||
}break;
|
}break;
|
||||||
default: {
|
default: {
|
||||||
if (isAllowedToEquipItems(m)) {
|
if (isAllowedToEquipItems(m)) {
|
||||||
@ -603,6 +619,11 @@ public class MonsterController {
|
|||||||
if (isZombieLeader(m)) {
|
if (isZombieLeader(m)) {
|
||||||
m.setCustomName(ChatColor.WHITE+"Zombie Leader");
|
m.setCustomName(ChatColor.WHITE+"Zombie Leader");
|
||||||
}
|
}
|
||||||
|
if(isZombieLeader(m))
|
||||||
|
{
|
||||||
|
m.setMaxHealth(6);
|
||||||
|
m.setHealth(m.getMaxHealth());
|
||||||
|
}
|
||||||
}break;
|
}break;
|
||||||
}
|
}
|
||||||
return m;
|
return m;
|
||||||
|
@ -336,15 +336,6 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
|
|||||||
}
|
}
|
||||||
Player p;
|
Player p;
|
||||||
//Announce the server has restarted soon after.
|
//Announce the server has restarted soon after.
|
||||||
if (SERVER_TYPE!=ServerType.QUIET) {
|
|
||||||
Bukkit.getScheduler().scheduleSyncDelayedTask(this, new Runnable() {
|
|
||||||
@Override
|
|
||||||
public void run() {
|
|
||||||
boolean sent=false;
|
|
||||||
do {DiscordMessageSender.sendItalicizedRawMessageDiscord(SERVER_TYPE.GetServerName()+"Server has been restarted.\nRunning v."+Bukkit.getPluginManager().getPlugin("TwosideKeeper").getDescription().getVersion()+" of TwosideKeeper\nRunning v"+Bukkit.getPluginManager().getPlugin("aPlugin").getDescription().getVersion()+" of Jobs.");} while (!Bukkit.getPluginManager().isPluginEnabled("aPlugin"));
|
|
||||||
}
|
|
||||||
},100);
|
|
||||||
}
|
|
||||||
|
|
||||||
getServer().getScheduler().scheduleSyncRepeatingTask(this, new Runnable(){
|
getServer().getScheduler().scheduleSyncRepeatingTask(this, new Runnable(){
|
||||||
public void run(){
|
public void run(){
|
||||||
@ -3323,9 +3314,9 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
|
|||||||
public void updateHealthbarDamageEvent(EntityDamageEvent ev) {
|
public void updateHealthbarDamageEvent(EntityDamageEvent ev) {
|
||||||
Entity e = ev.getEntity();
|
Entity e = ev.getEntity();
|
||||||
|
|
||||||
log(ev.getCause().toString(),2);
|
log(ev.getCause().toString(),5);
|
||||||
|
|
||||||
log(ev.getDamage()+"",2);
|
log(ev.getDamage()+"",5);
|
||||||
|
|
||||||
if (ev.getCause()==DamageCause.FIRE || ev.getCause()==DamageCause.FIRE_TICK ||
|
if (ev.getCause()==DamageCause.FIRE || ev.getCause()==DamageCause.FIRE_TICK ||
|
||||||
ev.getCause()==DamageCause.WITHER || ev.getCause()==DamageCause.POISON
|
ev.getCause()==DamageCause.WITHER || ev.getCause()==DamageCause.POISON
|
||||||
@ -6464,4 +6455,10 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
|
|||||||
finalstring.insert(((vel*93.182445)<20)?(int)((vel*93.182445)+12):31, ChatColor.GRAY+"");
|
finalstring.insert(((vel*93.182445)<20)?(int)((vel*93.182445)+12):31, ChatColor.GRAY+"");
|
||||||
return finalstring.toString();
|
return finalstring.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void announcePluginVersions() {
|
||||||
|
if (SERVER_TYPE!=ServerType.QUIET) {
|
||||||
|
DiscordMessageSender.sendItalicizedRawMessageDiscord(SERVER_TYPE.GetServerName()+"Server has been restarted.\nRunning v."+Bukkit.getPluginManager().getPlugin("TwosideKeeper").getDescription().getVersion()+" of TwosideKeeper\nRunning v"+Bukkit.getPluginManager().getPlugin("aPlugin").getDescription().getVersion()+" of Jobs.");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
@ -121,6 +121,9 @@ public final class TwosideKeeperAPI {
|
|||||||
public static ServerType getServerType() {
|
public static ServerType getServerType() {
|
||||||
return TwosideKeeper.getServerType();
|
return TwosideKeeper.getServerType();
|
||||||
}
|
}
|
||||||
|
public static void announcePluginVersions() {
|
||||||
|
TwosideKeeper.announcePluginVersions();
|
||||||
|
}
|
||||||
|
|
||||||
//Party COMMANDS.
|
//Party COMMANDS.
|
||||||
public static List<Player> getPartyMembers(Player p) {
|
public static List<Player> getPartyMembers(Player p) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user