mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-25 22:56:45 +01:00
getExperienceFromLog cleanup
This commit is contained in:
parent
4ae276d1d7
commit
f3e823997b
@ -93,19 +93,16 @@ 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) {
|
case HUGE_MUSHROOM_1:
|
||||||
switch(log.getType()) {
|
return Config.getInstance().getWoodcuttingXPHugeBrownMushroom();
|
||||||
case HUGE_MUSHROOM_1:
|
case HUGE_MUSHROOM_2:
|
||||||
return Config.getInstance().getWoodcuttingXPHugeBrownMushroom();
|
return Config.getInstance().getWoodcuttingXPHugeRedMushroom();
|
||||||
case HUGE_MUSHROOM_2:
|
default:
|
||||||
return Config.getInstance().getWoodcuttingXPHugeRedMushroom();
|
break;
|
||||||
default:
|
}
|
||||||
throw new IllegalArgumentException();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
TreeSpecies logType = TreeSpecies.getByData(extractLogItemData(log.getData()));
|
TreeSpecies logType = TreeSpecies.getByData(extractLogItemData(log.getData()));
|
||||||
|
|
||||||
// Apparently species can be null in certain cases (custom server mods?)
|
// Apparently species can be null in certain cases (custom server mods?)
|
||||||
|
Loading…
Reference in New Issue
Block a user