Update mcMMO for Minecraft 1.7.2

This commit is contained in:
GJ
2013-12-02 12:08:12 -05:00
committed by TfT_02
parent 80571fbe8f
commit 60ddd799de
10 changed files with 198 additions and 56 deletions

View File

@ -304,6 +304,7 @@ public class FishingManager extends SkillManager {
*/
public void handleFishing(Item fishingCatch) {
this.fishingCatch = fishingCatch;
int fishXp = ExperienceConfig.getInstance().getFishXp(fishingCatch.getItemStack().getData());
int treasureXp = 0;
Player player = getPlayer();
FishingTreasure treasure = null;
@ -351,7 +352,7 @@ public class FishingManager extends SkillManager {
}
}
applyXpGain(ExperienceConfig.getInstance().getFishingBaseXP() + treasureXp);
applyXpGain(fishXp + treasureXp);
}
/**

View File

@ -148,7 +148,12 @@ public class HerbalismManager extends SkillManager {
processGreenThumbPlants(blockState, greenTerra);
}
xp = ExperienceConfig.getInstance().getXp(skill, material);
if (material == Material.DOUBLE_PLANT || material == Material.RED_ROSE || material == Material.LONG_GRASS) {
xp = ExperienceConfig.getInstance().getFlowerAndGrassXp(blockState.getData());
}
else {
xp = ExperienceConfig.getInstance().getXp(skill, material);
}
if (Config.getInstance().getDoubleDropsEnabled(skill, material) && Permissions.secondaryAbilityEnabled(player, SecondaryAbility.HERBALISM_DOUBLE_DROPS)) {
drops = blockState.getBlock().getDrops();

View File

@ -39,11 +39,13 @@ public class Mining {
switch (blockType) {
case ENDER_STONE:
case GOLD_ORE:
case HARD_CLAY:
case IRON_ORE:
case MOSSY_COBBLESTONE:
case NETHERRACK:
case OBSIDIAN:
case SANDSTONE:
case STAINED_CLAY:
handleMiningDrops(blockState);
return;
@ -55,12 +57,13 @@ public class Mining {
case COAL_ORE:
case DIAMOND_ORE:
case REDSTONE_ORE:
case EMERALD_ORE:
case GLOWSTONE:
case LAPIS_ORE:
case STONE:
case EMERALD_ORE:
case PACKED_ICE:
case QUARTZ_ORE:
case REDSTONE_ORE:
case STONE:
Misc.dropItem(blockState.getLocation(), new ItemStack(blockType));
return;
@ -82,17 +85,20 @@ public class Mining {
case COAL_ORE:
case DIAMOND_ORE:
case EMERALD_ORE:
case GLOWSTONE:
case LAPIS_ORE:
case STONE:
case ENDER_STONE:
case GLOWSTONE:
case GOLD_ORE:
case HARD_CLAY:
case IRON_ORE:
case LAPIS_ORE:
case MOSSY_COBBLESTONE:
case NETHERRACK:
case OBSIDIAN:
case PACKED_ICE:
case REDSTONE_ORE:
case SANDSTONE:
case STAINED_CLAY:
case STONE:
case QUARTZ_ORE:
Misc.dropItems(blockState.getLocation(), blockState.getBlock().getDrops());
return;

View File

@ -5,6 +5,7 @@ import java.util.List;
import java.util.Set;
import org.bukkit.Material;
import org.bukkit.TreeSpecies;
import org.bukkit.block.BlockFace;
import org.bukkit.block.BlockState;
import org.bukkit.inventory.ItemStack;
@ -55,28 +56,14 @@ public final class Woodcutting {
return mcMMO.getModManager().getBlock(blockState).getXpGain();
}
switch (((Tree) blockState.getData()).getSpecies()) {
case GENERIC:
return ExperienceConfig.getInstance().getWoodcuttingXPOak();
TreeSpecies species = ((Tree) blockState.getData()).getSpecies();
int xp = ExperienceConfig.getInstance().getWoodcuttingTreeXP(species);
case REDWOOD:
return ExperienceConfig.getInstance().getWoodcuttingXPSpruce();
case BIRCH:
return ExperienceConfig.getInstance().getWoodcuttingXPBirch();
case JUNGLE:
int xp = ExperienceConfig.getInstance().getWoodcuttingXPJungle();
if (experienceGainMethod == ExperienceGainMethod.TREE_FELLER) {
xp *= 0.5;
}
return xp;
default:
return 0;
if (species == TreeSpecies.JUNGLE && experienceGainMethod == ExperienceGainMethod.TREE_FELLER) {
xp *= 0.5;
}
return xp;
}
/**