Fixes some Blast Mining stuff. Still issues due to changes in internal

math calculations somewhere...
This commit is contained in:
GJ 2012-03-05 18:01:56 -05:00
parent 99bff1a4f9
commit 36d6221b3b
6 changed files with 16 additions and 6 deletions

View File

@ -11,6 +11,7 @@ Version 2.0.00-dev
+ Added Ocelots to Taming XP tables
+ Added ability to summon Ocelots with Call of the Wild
= Fixed ClassCastException from Taming preventDamage checks
= Fixed issue with Blast Mining not seeing TNT for detonation due to snow
Version 1.3.02
+ Added in game guides for Mining, Excavation, and Acrobatics. Simply type /skillname ? to access them

View File

@ -73,7 +73,6 @@ public class mcBlockListener implements Listener
//TNT placement checks - needed for Blast Mining
if(mat.equals(Material.TNT) && mcPermissions.getInstance().blastMining(player))
plugin.misc.tntTracker.put(block.getLocation(), player);
//Check if the blocks placed should be monitored so they do not give out XP in the future
if(m.shouldBeWatched(mat))
{

View File

@ -165,11 +165,14 @@ public class mcEntityListener implements Listener
if(event.getEntity() instanceof TNTPrimed)
{
Location location = event.getEntity().getLocation();
System.out.println("UNNORMALIZED LOCATION");
System.out.println(location);
//Ugly code to make it recognize the location
location.setX(location.getBlockX()+1);
location.setY(location.getBlockY());
location.setZ(location.getBlockZ()+1);
System.out.println("NORMALIZED LOCATION");
System.out.println(location);
if(plugin.misc.tntTracker.containsKey(location))
{
@ -190,7 +193,7 @@ public class mcEntityListener implements Listener
location.setX(location.getBlockX()+1);
location.setY(location.getBlockY());
location.setZ(location.getBlockZ()+1);
if(plugin.misc.tntTracker.containsKey(location))
{
Player player = plugin.misc.tntTracker.get(location);

View File

@ -16,6 +16,7 @@
*/
package com.gmail.nossr50.listeners;
import java.util.HashSet;
import java.util.logging.Level;
import java.util.logging.Logger;
@ -269,7 +270,12 @@ public class mcPlayerListener implements Listener
//BLAST MINING
if((action == Action.RIGHT_CLICK_BLOCK || action == Action.RIGHT_CLICK_AIR) && is.getTypeId() == LoadProperties.detonatorID)
{
Block b = player.getTargetBlock(null, 100);
//Gotta make snow transparent...
HashSet<Byte> transparent = new HashSet<Byte>();
transparent.add((byte) 78);
transparent.add((byte) 0);
Block b = player.getTargetBlock(transparent, 100);
if(b.getType().equals(Material.TNT) && mcPermissions.getInstance().blastMining(player) && m.blockBreakSimulate(b, player, true) && Users.getProfile(player).getSkillLevel(SkillType.MINING) >= 125)
{
AbilityType ability = AbilityType.BLAST_MINING;

View File

@ -212,8 +212,7 @@ public class BlastMining{
if(skillLevel >= 750)
radius++;
if(skillLevel >= 1000)
radius++;
radius++;
event.setRadius(radius);
}

View File

@ -195,7 +195,9 @@ public class Taming
world.spawnCreature(player.getLocation(), type);
int amount = item.getAmount();
System.out.println(amount);
amount = amount - summonAmount;
System.out.println(amount);
player.setItemInHand(new ItemStack(summonItem, amount));
player.sendMessage(mcLocale.getString("m.TamingSummon"));
}