Zombie Pigman is now detected properly when deciding if bonus loot

should be dropped.
Malleable bases do not drop for massive amounts of experience (ex.
Dropped from players dying.)
This commit is contained in:
sigonasr2 2016-08-01 20:50:32 -05:00
parent e8b6d1c109
commit 8be7044e91
5 changed files with 6 additions and 6 deletions

Binary file not shown.

View File

@ -1,6 +1,6 @@
name: TwosideKeeper
main: sig.plugin.TwosideKeeper.TwosideKeeper
version: 3.7.3a
version: 3.7.3ar1
commands:
money:
description: Tells the player the amount of money they are holding.

View File

@ -2117,8 +2117,7 @@ public class GenericFunctions {
}
public static boolean isBossMonster(Monster m) {
if (m.getType()==EntityType.ZOMBIE &&
MonsterController.isZombieLeader(m) ||
if (MonsterController.isZombieLeader(m) ||
(m.getType()==EntityType.GUARDIAN &&
((Guardian)m).isElder()) ||
m.getType()==EntityType.ENDER_DRAGON ||

View File

@ -16,6 +16,7 @@ import org.bukkit.entity.EntityType;
import org.bukkit.entity.Guardian;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Monster;
import org.bukkit.entity.PigZombie;
import org.bukkit.entity.Skeleton;
import org.bukkit.entity.Zombie;
import org.bukkit.entity.Skeleton.SkeletonType;
@ -524,7 +525,7 @@ public class MonsterController {
}
public static boolean isZombieLeader(LivingEntity ent) {
if (ent instanceof Zombie) {
if ((ent instanceof Zombie) || (ent instanceof PigZombie)) {
MonsterDifficulty md = getMonsterDifficulty((Monster)ent);
if
(

View File

@ -3926,7 +3926,7 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
double val = Math.random();
log("ExpChange event: "+val,5);
int amt = ev.getAmount();
if (val<=((double)amt/(double)65)*(0.00125)*ARTIFACT_RARITY) {
if (val<=((double)amt/(double)65)*(0.00125)*ARTIFACT_RARITY && amt<=500) {
ev.getPlayer().getWorld().dropItemNaturally(ev.getPlayer().getLocation(), Artifact.createArtifactItem(ArtifactItem.MALLEABLE_BASE));
ev.getPlayer().sendMessage(ChatColor.LIGHT_PURPLE+"A strange item has appeared nearby.");
}