mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 15:16:45 +01:00
Fixes some Blast Mining stuff. Still issues due to changes in internal
math calculations somewhere...
This commit is contained in:
parent
99bff1a4f9
commit
36d6221b3b
@ -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
|
||||
|
@ -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))
|
||||
{
|
||||
|
@ -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))
|
||||
{
|
||||
|
@ -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;
|
||||
|
@ -213,7 +213,6 @@ public class BlastMining{
|
||||
radius++;
|
||||
if(skillLevel >= 1000)
|
||||
radius++;
|
||||
|
||||
event.setRadius(radius);
|
||||
}
|
||||
|
||||
|
@ -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"));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user