Added option to disable Herbalism hunger bonuses

This commit is contained in:
GJ 2012-02-17 17:21:54 -05:00
parent b75e7470ae
commit 4e9333e823
3 changed files with 37 additions and 32 deletions

View File

@ -43,7 +43,7 @@ public class LoadProperties {
diamondArmor, woodenTools, stoneTools, ironTools, goldTools, diamondArmor, woodenTools, stoneTools, ironTools, goldTools,
diamondTools, enderPearl, blazeRod, records, glowstoneDust, diamondTools, enderPearl, blazeRod, records, glowstoneDust,
fishingDiamonds, aDisplayNames, pDisplayNames, enableSmoothToMossy, fishingDiamonds, aDisplayNames, pDisplayNames, enableSmoothToMossy,
enableDirtToGrass, statsTracking, eventCallback; enableDirtToGrass, statsTracking, eventCallback, herbalismHungerBonus;
public static String MySQLtablePrefix, MySQLuserName, public static String MySQLtablePrefix, MySQLuserName,
MySQLserverName, MySQLdbName, MySQLdbPass, nWood, nStone, MySQLserverName, MySQLdbName, MySQLdbPass, nWood, nStone,
@ -248,6 +248,7 @@ public class LoadProperties {
mnetherwart = readInteger("Experience.Herbalism.Nether_Wart", 50); mnetherwart = readInteger("Experience.Herbalism.Nether_Wart", 50);
mlilypad = readInteger("Experience.Herbalism.Lily_Pads", 100); mlilypad = readInteger("Experience.Herbalism.Lily_Pads", 100);
mvines = readInteger("Experience.Herbalism.Vines", 10); mvines = readInteger("Experience.Herbalism.Vines", 10);
herbalismHungerBonus = readBoolean("Skills.Herbalism.Hunger_Bonus", true);
mpine = readInteger("Experience.Woodcutting.Pine", 70); mpine = readInteger("Experience.Woodcutting.Pine", 70);
mbirch = readInteger("Experience.Woodcutting.Birch", 80); mbirch = readInteger("Experience.Woodcutting.Birch", 80);

View File

@ -242,6 +242,8 @@ public class mcEntityListener implements Listener
@EventHandler (priority = EventPriority.LOW) @EventHandler (priority = EventPriority.LOW)
public void onFoodLevelChange(FoodLevelChangeEvent event) public void onFoodLevelChange(FoodLevelChangeEvent event)
{
if(LoadProperties.herbalismHungerBonus)
{ {
if(event.getEntity() instanceof Player) if(event.getEntity() instanceof Player)
{ {
@ -281,6 +283,7 @@ public class mcEntityListener implements Listener
} }
} }
} }
}
public boolean isBow(ItemStack is){ public boolean isBow(ItemStack is){
if (is.getTypeId() == 261){ if (is.getTypeId() == 261){

View File

@ -121,6 +121,7 @@ Skills:
Cobble_To_Mossy: true Cobble_To_Mossy: true
SmoothBrick_To_MossyBrick: true SmoothBrick_To_MossyBrick: true
Dirt_To_Grass: true Dirt_To_Grass: true
Hunger_Bonus: true
Mining: Mining:
Level_Cap: 0 Level_Cap: 0
Requires_Pickaxe: true Requires_Pickaxe: true