getExperienceFromLog cleanup

This commit is contained in:
bm01 2013-02-16 21:22:41 +01:00
parent 4ae276d1d7
commit f3e823997b

View File

@ -93,17 +93,14 @@ public final class Woodcutting {
* @throws IllegalArgumentException if 'log' is invalid * @throws IllegalArgumentException if 'log' is invalid
*/ */
protected static int getExperienceFromLog(Block log, ExperienceGainMethod experienceGainMethod) { protected static int getExperienceFromLog(Block log, ExperienceGainMethod experienceGainMethod) {
// Mushrooms aren't trees so we could never get species data from them
//Mushrooms aren't trees so we could never get species data from them switch (log.getType()) {
if(log.getType() == Material.HUGE_MUSHROOM_1 || log.getType() == Material.HUGE_MUSHROOM_2) {
switch(log.getType()) {
case HUGE_MUSHROOM_1: case HUGE_MUSHROOM_1:
return Config.getInstance().getWoodcuttingXPHugeBrownMushroom(); return Config.getInstance().getWoodcuttingXPHugeBrownMushroom();
case HUGE_MUSHROOM_2: case HUGE_MUSHROOM_2:
return Config.getInstance().getWoodcuttingXPHugeRedMushroom(); return Config.getInstance().getWoodcuttingXPHugeRedMushroom();
default: default:
throw new IllegalArgumentException(); break;
}
} }
TreeSpecies logType = TreeSpecies.getByData(extractLogItemData(log.getData())); TreeSpecies logType = TreeSpecies.getByData(extractLogItemData(log.getData()));