Merge pull request #24 from jacklin213/bugfix

[BUGFIX] Fixed Extraction Bug, ClassCastException in RapidPunch, Surge/OctoForm making Lava
This commit is contained in:
MistPhizzle 2014-08-29 20:45:26 -04:00
commit 61f5b19fac
3 changed files with 5 additions and 4 deletions

View file

@ -53,13 +53,13 @@ public class TempBlock {
instances.get(block).revertBlock(); instances.get(block).revertBlock();
} else { } else {
if ((defaulttype == Material.LAVA if ((defaulttype == Material.LAVA
|| defaulttype == Material.STATIONARY_LAVA || defaulttype == Material.AIR) || defaulttype == Material.STATIONARY_LAVA)
&& Methods.isAdjacentToThreeOrMoreSources(block)) { && Methods.isAdjacentToThreeOrMoreSources(block)) {
block.setType(Material.LAVA); block.setType(Material.LAVA);
block.setData((byte) 0x0); block.setData((byte) 0x0);
} }
else if ((defaulttype == Material.WATER else if ((defaulttype == Material.WATER
|| defaulttype == Material.STATIONARY_WATER || defaulttype == Material.AIR) || defaulttype == Material.STATIONARY_WATER )
&& Methods.isAdjacentToThreeOrMoreSources(block)) { && Methods.isAdjacentToThreeOrMoreSources(block)) {
block.setType(Material.WATER); block.setType(Material.WATER);
block.setData((byte) 0x0); block.setData((byte) 0x0);

View file

@ -56,13 +56,14 @@ public class RapidPunch {
if (target instanceof LivingEntity && target != null) { if (target instanceof LivingEntity && target != null) {
LivingEntity lt = (LivingEntity) target; LivingEntity lt = (LivingEntity) target;
Methods.damageEntity(p, target, damage); Methods.damageEntity(p, target, damage);
if (target instanceof Player) if (target instanceof Player) {
if (ChiPassive.willChiBlock((Player) target)) { if (ChiPassive.willChiBlock((Player) target)) {
ChiPassive.blockChi((Player) target); ChiPassive.blockChi((Player) target);
} }
if(Suffocate.isChannelingSphere((Player) target)) { if(Suffocate.isChannelingSphere((Player) target)) {
Suffocate.remove((Player) target); Suffocate.remove((Player) target);
} }
}
lt.setNoDamageTicks(0); lt.setNoDamageTicks(0);
} }
cooldowns.put(p.getName(), System.currentTimeMillis()); cooldowns.put(p.getName(), System.currentTimeMillis());

View file

@ -59,7 +59,7 @@ public class Extraction {
private int getAmount() { private int getAmount() {
Random rand = new Random(); Random rand = new Random();
return rand.nextInt(99) + 1 <= triplechance ? 3 : rand.nextInt(99) + 1 <= doublechance ? 2: 0; return rand.nextInt(99) + 1 <= triplechance ? 3 : rand.nextInt(99) + 1 <= doublechance ? 2: 1;
} }
} }