Added Ocelots to Taming XP tables.

This commit is contained in:
GJ 2012-03-02 10:43:08 -05:00
parent c032a27d63
commit b2989a8bab
4 changed files with 29 additions and 13 deletions

View File

@ -8,6 +8,7 @@ Key:
- Removal
Version 2.0.00-dev
+ Added Ocelots to Taming XP tables.
! Changed Ignition to add fire ticks rather than replacing them.
Version 1.3.01

View File

@ -42,7 +42,8 @@ public class LoadProperties {
MySQLserverName, MySQLdbName, MySQLdbPass, nWood, nStone,
nIron, nGold, nDiamond, locale, nString, nLeather;
public static int treeFellerThreshold, mjungle, mtameWolf, mfishing, xpbar_x, xpbar_y, xpicon_x, xpicon_y,
public static int treeFellerThreshold, mjungle, mtameWolf, mtameOcelot,
mfishing, xpbar_x, xpbar_y, xpicon_x, xpicon_y,
chimaeraId, msandstone, mbase, moak, mbirch, mspruce, mmelon,
mcactus, mmushroom, mflower, msugar, mpumpkin, mwheat, mgold,
mdiamond, miron, mredstone, mlapis, mobsidian, mnetherrack,
@ -242,6 +243,7 @@ public class LoadProperties {
mmossstone = readInteger("Experience.Mining.Moss_Stone", 30);
mtameWolf = readInteger("Experience.Taming.Animal_Taming.Wolf", 250);
mtameOcelot = readInteger("Experience.Taming.Animal_Taming.Wolf", 500);
mfishing = readInteger("Experience.Fishing.Base", 800);

View File

@ -17,7 +17,9 @@
package com.gmail.nossr50.listeners;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.entity.Entity;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Player;
import org.bukkit.entity.TNTPrimed;
@ -235,15 +237,15 @@ public class mcEntityListener implements Listener
if(newFoodLevel > currentFoodLevel)
{
int food = player.getItemInHand().getTypeId();
Material food = player.getItemInHand().getType();
int herbLevel = PP.getSkillLevel(SkillType.HERBALISM);
int foodChange = newFoodLevel - currentFoodLevel;
switch(food)
{
case 297:
case BREAD:
{
//BREAD (297) RESTORES 2 1/2 HUNGER
//BREAD RESTORES 2 1/2 HUNGER
//Restores 5 HUNGER @ 1000
if(herbLevel >= 200 && herbLevel < 400)
foodChange = foodChange + 1;
@ -257,9 +259,9 @@ public class mcEntityListener implements Listener
foodChange = foodChange + 5;
break;
}
case 357:
case COOKIE:
{
//COOKIE (357) RESTORES 1/2 HUNGER
//COOKIE RESTORES 1/2 HUNGER
//RESTORES 2 HUNGER @ 1000
if(herbLevel >= 200 && herbLevel < 600)
foodChange = foodChange + 1;
@ -269,9 +271,9 @@ public class mcEntityListener implements Listener
foodChange = foodChange + 3;
break;
}
case 360:
case MELON:
{
//MELON (360) RESTORES 1 HUNGER
//MELON RESTORES 1 HUNGER
//RESTORES 2 1/2 HUNGER @ 1000
if(herbLevel >= 200 && herbLevel < 600)
foodChange = foodChange + 1;
@ -281,9 +283,9 @@ public class mcEntityListener implements Listener
foodChange = foodChange + 3;
break;
}
case 282:
case MUSHROOM_SOUP:
{
//STEW (282) RESTORES 4 HUNGER
//MUSHROOM SOUP RESTORES 4 HUNGER
//RESTORES 6 1/2 HUNGER @ 1000
if(herbLevel >= 200 && herbLevel < 400)
foodChange = foodChange + 1;
@ -317,11 +319,21 @@ public class mcEntityListener implements Listener
if(mcPermissions.getInstance().taming(player))
{
PlayerProfile PP = Users.getProfile(player);
if(event.getEntity() instanceof Wolf)
EntityType type = event.getEntityType();
int xp = 0;
switch(type)
{
PP.addXP(SkillType.TAMING, LoadProperties.mtameWolf, player);
case WOLF:
xp = LoadProperties.mtameWolf;
break;
case OCELOT:
xp = LoadProperties.mtameOcelot;
break;
}
PP.addXP(SkillType.TAMING, xp, player);
Skills.XpCheckSkill(SkillType.TAMING, player);
}
}
}
}

View File

@ -233,6 +233,7 @@ Experience:
Taming:
Animal_Taming:
Wolf: 250
Ocelot: 500
Combat:
Multiplier:
Animals: 1.0