Merge pull request #293 from Glitchfinder/fixes

Additional fixes and patches.
This commit is contained in:
Grant 2012-11-05 07:53:50 -08:00
commit c5120b9c72
5 changed files with 11 additions and 3 deletions

View File

@ -169,6 +169,7 @@ public class Config extends ConfigLoader {
public int getHerbalismXPPotato() { return config.getInt("Experience.Herbalism.Potato", 50); }
public boolean getHerbalismGreenThumbCobbleToMossy() { return config.getBoolean("Skills.Herbalism.Green_Thumb.Cobble_To_Mossy", true); }
public boolean getHerbalismGreenThumbCobbleWallToMossyWall() { return config.getBoolean("Skills.Herbalism.Green_Thumb.CobbleWall_To_MossyWall", true); }
public boolean getHerbalismGreenThumbSmoothbrickToMossy() { return config.getBoolean("Skills.Herbalism.Green_Thumb.SmoothBrick_To_MossyBrick", true); }
public boolean getHerbalismGreenThumbDirtToGrass() { return config.getBoolean("Skills.Herbalism.Green_Thumb.Dirt_To_Grass", true); }

View File

@ -229,10 +229,12 @@ public class EntityListener implements Listener {
@EventHandler (priority = EventPriority.HIGHEST, ignoreCancelled = true)
public void onEnitityExplode(EntityExplodeEvent event) {
Entity entity = event.getEntity();
if(entity == null) return;
if(entity.hasMetadata("NPC")) return; // Check if this player is a Citizens NPC
if (event.getEntity() instanceof TNTPrimed) {
if (entity instanceof TNTPrimed) {
int id = entity.getEntityId();
if (plugin.tntIsTracked(id)) {

View File

@ -65,6 +65,9 @@ public class Herbalism {
// Don't award double drops to mossified cobblestone
mcMMO.placeStore.setTrue(block);
}
else if (Config.getInstance().getHerbalismGreenThumbCobbleWallToMossyWall() && type == Material.COBBLE_WALL) {
block.setData((byte) 1);
}
}
}
@ -237,10 +240,10 @@ public class Herbalism {
if (mat == Material.COCOA) {
is = new ItemStack(Material.INK_SACK, 1, (short) 3);
}
else if (mat == Material.COCOA) {
else if (mat == Material.CARROT) {
is = new ItemStack(Material.CARROT_ITEM, 1, (short) 0);
}
else if (mat == Material.COCOA) {
else if (mat == Material.POTATO) {
is = new ItemStack(Material.POTATO_ITEM, 1, (short) 0);
}

View File

@ -154,6 +154,7 @@ public class BlockChecks {
case DIRT:
return true;
case SMOOTH_BRICK:
case COBBLE_WALL:
if (block.getData() == 0) {
return true;
}

View File

@ -151,6 +151,7 @@ Skills:
Level_Cap: 0
Green_Thumb:
Cobble_To_Mossy: true
CobbleWall_To_MossyWall: true
SmoothBrick_To_MossyBrick: true
Dirt_To_Grass: true
Mining: